diff --git a/CLAUDE.md b/CLAUDE.md index 408f81a4..b907c4d0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,21 +22,24 @@ src/ This file contains four main sections: 1. **Primitive Tokens** - Raw design values (should not be used directly) + ```css --color-neutral-200: hsl(0, 0%, 92%); --font-diatype: 'Diatype', -apple-system, ...; ``` 2. **Semantic/Utility Tokens** - Theme-aware variables that map to utilities + ```css /* Light mode */ --text-warning: var(--color-feedback-orange-700); --bg-warning: var(--color-feedback-orange-100); - + /* Automatically switches in dark mode */ ``` 3. **Component Tokens** - Higher-level semantic tokens + ```css --radius: 0.625rem; --shadow: hsl(0 0% 50%); @@ -67,14 +70,16 @@ Handles Tailwind configuration and imports: ### Why Custom Typography Utilities? Instead of allowing arbitrary combinations like: + ```css /* ❌ Bad - leads to inconsistency */ .heading { - @apply text-[1.813rem] leading-[1.5] tracking-[0.0015em] font-light; + @apply text-[1.813rem] leading-[1.5] font-light tracking-[0.0015em]; } ``` We provide semantic utilities: + ```css /* ✅ Good - enforces design system */ .heading { @@ -98,6 +103,7 @@ The "utility tokens" pattern in base.css enables automatic theme switching: ### Preventing Design System Escape Hatches We intentionally: + - Don't expose raw color values as utilities - Provide complete typography utilities (not individual properties) - Use semantic naming to guide correct usage @@ -119,1638 +125,1403 @@ We intentionally: ### Extending Responsive Utilities Add new `@source` declarations in global.css: -```css -@source inline("{,sm:,md:,lg:,xl:,2xl:}your-utility-{value1,value2}"); -``` - -## Available Utility Classes - -This section is auto-generated from the CSS files. Last updated: 2025-07-25T19:46:22.449Z - -### Typography Utilities - -#### `typography-heading-xl` - -```css -.typography-heading-xl { - font-size: 2.063rem; - font-weight: 300; - line-height: 1.375; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); -} -``` - -#### `typography-heading-lg` - -```css -.typography-heading-lg { - font-size: 1.813rem; - font-weight: 300; - line-height: 1.5; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); -} -``` - -#### `typography-heading-md` ```css -.typography-heading-md { - font-size: 1.625rem; - font-weight: 300; - line-height: 1.6; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); -} +/* Format: @source inline("{breakpoints}{utility-name}{values}"); */ +@source inline("{,sm:,md:,lg:,xl:,2xl:}your-utility-{small,medium,large}"); ``` -#### `typography-heading-sm` +**Example - Creating responsive margin utilities:** ```css -.typography-heading-sm { - font-size: 1.438rem; - font-weight: 300; - line-height: 1.6; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); -} -``` - -#### `typography-heading-xs` - -```css -.typography-heading-xs { - font-size: 1.25rem; - font-weight: 300; - line-height: 1.6; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); -} +@source inline("{,sm:,md:,lg:,xl:,2xl:}m-{0,1,2,4,8,16}"); ``` -#### `typography-heading-xxs` +This generates classes like: `m-0`, `sm:m-0`, `md:m-2`, `lg:m-8`, etc. -```css -.typography-heading-xxs { - font-size: 1.125rem; - font-weight: 300; - line-height: 1.778; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); -} -``` - -#### `typography-body-lg` - -```css -.typography-body-lg { - font-size: 1.125rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); -} -``` - -#### `typography-body-md` - -```css -.typography-body-md { - font-size: 1rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); -} -``` - -#### `typography-body-sm` - -```css -.typography-body-sm { - font-size: 0.875rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); -} -``` +## Available Utility Classes -#### `typography-body-xs` +This section is auto-generated from the CSS files. Last updated: 2025-08-05T10:11:38.811Z -```css -.typography-body-xs { - font-size: 0.75rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); -} -``` +### Typography Utilities #### `text-display-2xl` -```css -.text-display-2xl { - font-size: 11.375rem; - font-weight: 100; - line-height: 1; - letter-spacing: -0.04em; - font-family: var(--font-tobias); - color: var(--text-display); -} +```tsx +

+Hello world +

``` #### `text-display-xl` -```css -.text-display-xl { - font-size: 5.625rem; - font-weight: 100; - line-height: 1.1; - letter-spacing: -0.04em; - font-family: var(--font-tobias); - color: var(--text-display); -} +```tsx +

+Hello world +

``` #### `text-display-lg` -```css -.text-display-lg { - font-size: 4.188rem; - font-weight: 100; - line-height: 1.2; - letter-spacing: -0.04em; - font-family: var(--font-tobias); - color: var(--text-display); -} +```tsx +

+Hello world +

``` #### `text-display-md` -```css -.text-display-md { - font-size: 3.188rem; - font-weight: 100; - line-height: 1.3; - letter-spacing: -0.04em; - font-family: var(--font-tobias); - color: var(--text-display); -} +```tsx +

+Hello world +

``` #### `text-display-sm` -```css -.text-display-sm { - font-size: 2.375rem; - font-weight: 100; - line-height: 1.375; - letter-spacing: -0.04em; - font-family: var(--font-tobias); - color: var(--text-display); -} +```tsx +

+Hello world +

``` #### `text-display-xs` -```css -.text-display-xs { - font-size: 1.75rem; - font-weight: 100; - line-height: 1.4; - letter-spacing: -0.04em; - font-family: var(--font-tobias); - color: var(--text-display); -} +```tsx +

+Hello world +

``` #### `text-heading-xl` -```css -.text-heading-xl { - font-size: 2.063rem; - font-weight: 300; - line-height: 1.375; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); - color: var(--text-heading-xl); -} +```tsx +

+Hello world +

``` #### `text-heading-lg` -```css -.text-heading-lg { - font-size: 1.813rem; - font-weight: 300; - line-height: 1.5; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); - color: var(--text-heading-lg); -} +```tsx +

+Hello world +

``` #### `text-heading-md` -```css -.text-heading-md { - font-size: 1.625rem; - font-weight: 300; - line-height: 1.6; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); - color: var(--text-heading-md); -} +```tsx +

+Hello world +

``` #### `text-heading-sm` -```css -.text-heading-sm { - font-size: 1.438rem; - font-weight: 300; - line-height: 1.6; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); - color: var(--text-heading-sm); -} +```tsx +

+Hello world +

``` #### `text-heading-xs` -```css -.text-heading-xs { - font-size: 1.25rem; - font-weight: 300; - line-height: 1.6; - letter-spacing: 0.0015em; - font-family: var(--font-diatype); - color: var(--text-heading-xs); -} +```tsx +

+Hello world +

``` #### `text-body-lg` -```css -.text-body-lg { - font-size: 1.125rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-body-md` -```css -.text-body-md { - font-size: 1rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-body-sm` -```css -.text-body-sm { - font-size: 0.875rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-body-xs` -```css -.text-body-xs { - font-size: 0.75rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-codeline-md` -```css -.text-codeline-md { - font-size: 1rem; - font-weight: 300; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype-mono); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-codeline-sm` -```css -.text-codeline-sm { - font-size: 0.875rem; - font-weight: 300; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype-mono); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-codeline-xs` -```css -.text-codeline-xs { - font-size: 0.75rem; - font-weight: 300; - line-height: 1.7; - letter-spacing: 0.0025em; - font-family: var(--font-diatype-mono); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-button-md` -```css -.text-button-md { - font-size: 1rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-button-sm` -```css -.text-button-sm { - font-size: 0.875rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-button-xs` -```css -.text-button-xs { - font-size: 0.75rem; - font-weight: 400; - line-height: 1.75; - letter-spacing: 0.0025em; - font-family: var(--font-diatype); - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-highlight` -```css -.text-highlight { - color: var(--text-highlight); -} +```tsx +

+Hello world +

``` #### `text-default` -```css -.text-default { - color: var(--text-default); -} +```tsx +

+Hello world +

``` #### `text-muted` -```css -.text-muted { - color: var(--text-muted); -} +```tsx +

+Hello world +

``` #### `text-placeholder` -```css -.text-placeholder { - color: var(--text-placeholder); -} +```tsx +

+Hello world +

``` #### `text-disabled` -```css -.text-disabled { - color: var(--text-disabled); -} +```tsx +

+Hello world +

``` #### `text-highlight-fixed-dark` -```css -.text-highlight-fixed-dark { - color: var(--text-highlight-fixed-dark); -} +```tsx +

+Hello world +

``` #### `text-default-fixed-dark` -```css -.text-default-fixed-dark { - color: var(--text-default-fixed-dark); -} +```tsx +

+Hello world +

``` #### `text-muted-fixed-dark` -```css -.text-muted-fixed-dark { - color: var(--text-muted-fixed-dark); -} +```tsx +

+Hello world +

``` #### `text-highlight-fixed-light` -```css -.text-highlight-fixed-light { - color: var(--text-highlight-fixed-light); -} +```tsx +

+Hello world +

``` #### `text-default-fixed-light` -```css -.text-default-fixed-light { - color: var(--text-default-fixed-light); -} +```tsx +

+Hello world +

``` #### `text-muted-fixed-light` -```css -.text-muted-fixed-light { - color: var(--text-muted-fixed-light); -} +```tsx +

+Hello world +

``` #### `text-highlight-inverse` -```css -.text-highlight-inverse { - color: var(--text-highlight-inverse); -} +```tsx +

+Hello world +

``` #### `text-default-inverse` -```css -.text-default-inverse { - color: var(--text-default-inverse); -} +```tsx +

+Hello world +

``` #### `text-muted-inverse` -```css -.text-muted-inverse { - color: var(--text-muted-inverse); -} +```tsx +

+Hello world +

``` #### `text-link-primary` -```css -.text-link-primary { - color: var(--text-link-primary); -} +```tsx +

+Hello world +

``` #### `text-link-secondary` -```css -.text-link-secondary { - color: var(--text-link-secondary); -} +```tsx +

+Hello world +

``` #### `text-link-visited` -```css -.text-link-visited { - color: var(--text-link-visited); -} +```tsx +

+Hello world +

``` #### `text-default-destructive` -```css -.text-default-destructive { - color: var(--text-default-destructive); -} +```tsx +

+Hello world +

``` #### `text-link-destructive` -```css -.text-link-destructive { - color: var(--text-link-destructive); -} +```tsx +

+Hello world +

``` #### `text-default-information` -```css -.text-default-information { - color: var(--text-default-information); -} +```tsx +

+Hello world +

``` #### `text-link-information` -```css -.text-link-information { - color: var(--text-link-information); -} +```tsx +

+Hello world +

``` #### `text-default-success` -```css -.text-default-success { - color: var(--text-default-success); -} +```tsx +

+Hello world +

``` #### `text-link-success` -```css -.text-link-success { - color: var(--text-link-success); -} +```tsx +

+Hello world +

``` #### `text-default-warning` -```css -.text-default-warning { - color: var(--text-default-warning); -} +```tsx +

+Hello world +

``` #### `text-link-warning` -```css -.text-link-warning { - color: var(--text-link-warning); -} +```tsx +

+Hello world +

``` #### `text-warning` -```css -.text-warning { - color: var(--text-warning); -} +```tsx +

+Hello world +

``` ### Background Utilities #### `bg-mask` -```css -.bg-mask { - background-image: linear-gradient( - to bottom, - var(--background) 0%, - var(--color-transparent) 5%, - var(--color-transparent) 95%, - var(--background) 100% - ); -} +```tsx +
+Hello world +
``` #### `bg-gradient-primary` -```css -.bg-gradient-primary { - background: var(--gradient-brand-primary); -} +```tsx +
+Hello world +
``` #### `bg-surface-primary` -```css -.bg-surface-primary { - background-color: var(--color-base-white); - - /* dark variant */ - background-color: var(--color-base-black); -} +```tsx +
+Hello world +
``` #### `bg-surface-secondary` -```css -.bg-surface-secondary { - background-color: var(--color-neutral-100); -} +```tsx +
+Hello world +
``` #### `bg-warning` -```css -.bg-warning { - background-color: var(--bg-warning); -} +```tsx +
+Hello world +
``` #### `bg-surface-primary-default` -```css -.bg-surface-primary-default { - background-color: var(--bg-surface-primary-default); -} +```tsx +
+Hello world +
``` #### `bg-surface-primary-inverse` -```css -.bg-surface-primary-inverse { - background-color: var(--bg-surface-primary-inverse); -} +```tsx +
+Hello world +
``` #### `bg-surface-secondary-default` -```css -.bg-surface-secondary-default { - background-color: var(--bg-surface-secondary-default); -} +```tsx +
+Hello world +
``` #### `bg-surface-secondary-inverse` -```css -.bg-surface-secondary-inverse { - background-color: var(--bg-surface-secondary-inverse); -} +```tsx +
+Hello world +
``` #### `bg-surface-tertiary-default` -```css -.bg-surface-tertiary-default { - background-color: var(--bg-surface-tertiary-default); -} +```tsx +
+Hello world +
``` #### `bg-surface-tertiary-inverse` -```css -.bg-surface-tertiary-inverse { - background-color: var(--bg-surface-tertiary-inverse); -} +```tsx +
+Hello world +
``` #### `bg-highlight` -```css -.bg-highlight { - background-color: var(--bg-highlight); -} +```tsx +
+Hello world +
``` #### `bg-active` -```css -.bg-active { - background-color: var(--bg-active); -} +```tsx +
+Hello world +
``` #### `bg-default` -```css -.bg-default { - background-color: var(--bg-default); -} +```tsx +
+Hello world +
``` #### `bg-muted` -```css -.bg-muted { - background-color: var(--bg-muted); -} +```tsx +
+Hello world +
``` #### `bg-inset` -```css -.bg-inset { - background-color: var(--bg-inset); -} +```tsx +
+Hello world +
``` #### `bg-surface-primary-fixed-light` -```css -.bg-surface-primary-fixed-light { - background-color: var(--bg-surface-primary-fixed-light); -} +```tsx +
+Hello world +
``` #### `bg-surface-secondary-fixed-light` -```css -.bg-surface-secondary-fixed-light { - background-color: var(--bg-surface-secondary-fixed-light); -} +```tsx +
+Hello world +
``` #### `bg-surface-tertiary-fixed-light` -```css -.bg-surface-tertiary-fixed-light { - background-color: var(--bg-surface-tertiary-fixed-light); -} +```tsx +
+Hello world +
``` #### `bg-surface-primary-fixed-dark` -```css -.bg-surface-primary-fixed-dark { - background-color: var(--bg-surface-primary-fixed-dark); -} +```tsx +
+Hello world +
``` #### `bg-surface-secondary-fixed-dark` -```css -.bg-surface-secondary-fixed-dark { - background-color: var(--bg-surface-secondary-fixed-dark); -} +```tsx +
+Hello world +
``` #### `bg-surface-tertiary-fixed-dark` -```css -.bg-surface-tertiary-fixed-dark { - background-color: var(--bg-surface-tertiary-fixed-dark); -} +```tsx +
+Hello world +
``` #### `bg-destructive-highlight` -```css -.bg-destructive-highlight { - background-color: var(--bg-destructive-highlight); -} +```tsx +
+Hello world +
``` #### `bg-destructive-default` -```css -.bg-destructive-default { - background-color: var(--bg-destructive-default); -} +```tsx +
+Hello world +
``` #### `bg-destructive-muted` -```css -.bg-destructive-muted { - background-color: var(--bg-destructive-muted); -} +```tsx +
+Hello world +
``` #### `bg-destructive-softest` -```css -.bg-destructive-softest { - background-color: var(--bg-destructive-softest); -} +```tsx +
+Hello world +
``` #### `bg-information-highlight` -```css -.bg-information-highlight { - background-color: var(--bg-information-highlight); -} +```tsx +
+Hello world +
``` #### `bg-information-default` -```css -.bg-information-default { - background-color: var(--bg-information-default); -} +```tsx +
+Hello world +
``` #### `bg-information-muted` -```css -.bg-information-muted { - background-color: var(--bg-information-muted); -} +```tsx +
+Hello world +
``` #### `bg-information-softest` -```css -.bg-information-softest { - background-color: var(--bg-information-softest); -} +```tsx +
+Hello world +
``` #### `bg-success-highlight` -```css -.bg-success-highlight { - background-color: var(--bg-success-highlight); -} +```tsx +
+Hello world +
``` #### `bg-success-default` -```css -.bg-success-default { - background-color: var(--bg-success-default); -} +```tsx +
+Hello world +
``` #### `bg-success-muted` -```css -.bg-success-muted { - background-color: var(--bg-success-muted); -} +```tsx +
+Hello world +
``` #### `bg-success-softest` -```css -.bg-success-softest { - background-color: var(--bg-success-softest); -} +```tsx +
+Hello world +
``` #### `bg-warning-highlight` -```css -.bg-warning-highlight { - background-color: var(--bg-warning-highlight); -} +```tsx +
+Hello world +
``` #### `bg-warning-default` -```css -.bg-warning-default { - background-color: var(--bg-warning-default); -} +```tsx +
+Hello world +
``` #### `bg-warning-muted` -```css -.bg-warning-muted { - background-color: var(--bg-warning-muted); -} +```tsx +
+Hello world +
``` #### `bg-warning-softest` -```css -.bg-warning-softest { - background-color: var(--bg-warning-softest); -} +```tsx +
+Hello world +
``` ### Border Utilities #### `border-gradient-primary` -```css -.border-gradient-primary { - border-image: var(--gradient-brand-primary) 1; -} +```tsx +
+Hello world +
``` #### `border-warning` -```css -.border-warning { - border-color: var(--border-warning); - border-width: 1px; - border-style: solid; -} +```tsx +
+Hello world +
``` #### `border-neutral-active` -```css -.border-neutral-active { - border-color: var(--border-neutral-active); -} +```tsx +
+Hello world +
``` #### `border-neutral-hover` -```css -.border-neutral-hover { - border-color: var(--border-neutral-hover); -} +```tsx +
+Hello world +
``` #### `border-neutral-default` -```css -.border-neutral-default { - border-color: var(--border-neutral-default); -} +```tsx +
+Hello world +
``` #### `border-neutral-disabled` -```css -.border-neutral-disabled { - border-color: var(--border-neutral-disabled); - opacity: 0.4; -} +```tsx +
+Hello world +
``` #### `border-neutral-softest` -```css -.border-neutral-softest { - border-color: var(--border-neutral-softest); -} +```tsx +
+Hello world +
``` #### `border-neutral-inset` -```css -.border-neutral-inset { - border-color: var(--border-neutral-inset); -} +```tsx +
+Hello world +
``` #### `border-neutral-alpha` -```css -.border-neutral-alpha { - border-color: var(--border-neutral-alpha); -} +```tsx +
+Hello world +
``` #### `border-destructive-highlight` -```css -.border-destructive-highlight { - border-color: var(--border-destructive-highlight); -} +```tsx +
+Hello world +
``` #### `border-destructive-default` -```css -.border-destructive-default { - border-color: var(--border-destructive-default); -} +```tsx +
+Hello world +
``` #### `border-destructive-muted` -```css -.border-destructive-muted { - border-color: var(--border-destructive-muted); -} +```tsx +
+Hello world +
``` #### `border-destructive-softest` -```css -.border-destructive-softest { - border-color: var(--border-destructive-softest); -} +```tsx +
+Hello world +
``` #### `border-information-highlight` -```css -.border-information-highlight { - border-color: var(--border-information-highlight); -} +```tsx +
+Hello world +
``` #### `border-information-default` -```css -.border-information-default { - border-color: var(--border-information-default); -} +```tsx +
+Hello world +
``` #### `border-information-muted` -```css -.border-information-muted { - border-color: var(--border-information-muted); -} +```tsx +
+Hello world +
``` #### `border-information-softest` -```css -.border-information-softest { - border-color: var(--border-information-softest); -} +```tsx +
+Hello world +
``` #### `border-success-highlight` -```css -.border-success-highlight { - border-color: var(--border-success-highlight); -} +```tsx +
+Hello world +
``` #### `border-success-default` -```css -.border-success-default { - border-color: var(--border-success-default); -} +```tsx +
+Hello world +
``` #### `border-success-muted` -```css -.border-success-muted { - border-color: var(--border-success-muted); -} +```tsx +
+Hello world +
``` #### `border-success-softest` -```css -.border-success-softest { - border-color: var(--border-success-softest); -} +```tsx +
+Hello world +
``` #### `border-warning-highlight` -```css -.border-warning-highlight { - border-color: var(--border-warning-highlight); -} +```tsx +
+Hello world +
``` #### `border-warning-default` -```css -.border-warning-default { - border-color: var(--border-warning-default); -} +```tsx +
+Hello world +
``` #### `border-warning-muted` -```css -.border-warning-muted { - border-color: var(--border-warning-muted); -} +```tsx +
+Hello world +
``` #### `border-warning-softest` -```css -.border-warning-softest { - border-color: var(--border-warning-softest); -} +```tsx +
+Hello world +
``` #### `border-focus` -```css -.border-focus { - border-color: var(--border-focus); -} +```tsx +
+Hello world +
``` ### Other Utilities #### `container` -```css -.container { - padding-inline: 1rem; - margin-inline: auto; -} +```tsx +
+Hello world +
``` #### `underline-link-primary` -```css -.underline-link-primary { - color: var(--underline-link-primary); - text-decoration: underline; - text-underline-offset: 0.125rem; -} +```tsx +
+Hello world +
``` #### `underline-link-secondary` -```css -.underline-link-secondary { - color: var(--underline-link-secondary); - text-decoration: underline; - text-underline-offset: 0.125rem; -} +```tsx +
+Hello world +
``` #### `underline-link-visited` -```css -.underline-link-visited { - color: var(--underline-link-visited); - text-decoration: underline; - text-underline-offset: 0.125rem; -} +```tsx +
+Hello world +
``` #### `fill-neutral-highlight` -```css -.fill-neutral-highlight { - fill: var(--fill-neutral-highlight); -} +```tsx +
+Hello world +
``` #### `fill-neutral-active` -```css -.fill-neutral-active { - fill: var(--fill-neutral-active); -} +```tsx +
+Hello world +
``` #### `fill-neutral-default` -```css -.fill-neutral-default { - fill: var(--fill-neutral-default); -} +```tsx +
+Hello world +
``` #### `fill-neutral-muted` -```css -.fill-neutral-muted { - fill: var(--fill-neutral-muted); -} +```tsx +
+Hello world +
``` #### `fill-neutral-highlight-fixed-dark` -```css -.fill-neutral-highlight-fixed-dark { - fill: var(--fill-neutral-highlight-fixed-dark); -} +```tsx +
+Hello world +
``` #### `fill-neutral-default-fixed-dark` -```css -.fill-neutral-default-fixed-dark { - fill: var(--fill-neutral-default-fixed-dark); -} +```tsx +
+Hello world +
``` #### `fill-neutral-muted-fixed-dark` -```css -.fill-neutral-muted-fixed-dark { - fill: var(--fill-neutral-muted-fixed-dark); -} +```tsx +
+Hello world +
``` #### `fill-neutral-highlight-fixed-light` -```css -.fill-neutral-highlight-fixed-light { - fill: var(--fill-neutral-highlight-fixed-light); -} +```tsx +
+Hello world +
``` #### `fill-neutral-default-fixed-light` -```css -.fill-neutral-default-fixed-light { - fill: var(--fill-neutral-default-fixed-light); -} +```tsx +
+Hello world +
``` #### `fill-neutral-muted-fixed-light` -```css -.fill-neutral-muted-fixed-light { - fill: var(--fill-neutral-muted-fixed-light); -} +```tsx +
+Hello world +
``` #### `fill-neutral-highlight-inverse` -```css -.fill-neutral-highlight-inverse { - fill: var(--fill-neutral-highlight-inverse); -} +```tsx +
+Hello world +
``` #### `fill-neutral-default-inverse` -```css -.fill-neutral-default-inverse { - fill: var(--fill-neutral-default-inverse); -} +```tsx +
+Hello world +
``` #### `fill-neutral-muted-inverse` -```css -.fill-neutral-muted-inverse { - fill: var(--fill-neutral-muted-inverse); -} +```tsx +
+Hello world +
``` #### `fill-link-primary` -```css -.fill-link-primary { - fill: var(--fill-link-primary); -} +```tsx +
+Hello world +
``` #### `fill-link-secondary` -```css -.fill-link-secondary { - fill: var(--fill-link-secondary); -} +```tsx +
+Hello world +
``` #### `fill-link-visited` -```css -.fill-link-visited { - fill: var(--fill-link-visited); -} +```tsx +
+Hello world +
``` #### `fill-destructive-highlight` -```css -.fill-destructive-highlight { - fill: var(--fill-destructive-highlight); -} +```tsx +
+Hello world +
``` #### `fill-destructive-default` -```css -.fill-destructive-default { - fill: var(--fill-destructive-default); -} +```tsx +
+Hello world +
``` #### `fill-destructive-muted` -```css -.fill-destructive-muted { - fill: var(--fill-destructive-muted); -} +```tsx +
+Hello world +
``` #### `fill-information-highlight` -```css -.fill-information-highlight { - fill: var(--fill-information-highlight); -} +```tsx +
+Hello world +
``` #### `fill-information-default` -```css -.fill-information-default { - fill: var(--fill-information-default); -} +```tsx +
+Hello world +
``` #### `fill-information-muted` -```css -.fill-information-muted { - fill: var(--fill-information-muted); -} +```tsx +
+Hello world +
``` #### `fill-success-highlight` -```css -.fill-success-highlight { - fill: var(--fill-success-highlight); -} +```tsx +
+Hello world +
``` #### `fill-success-default` -```css -.fill-success-default { - fill: var(--fill-success-default); -} +```tsx +
+Hello world +
``` #### `fill-success-muted` -```css -.fill-success-muted { - fill: var(--fill-success-muted); -} +```tsx +
+Hello world +
``` #### `fill-warning-highlight` -```css -.fill-warning-highlight { - fill: var(--fill-warning-highlight); -} +```tsx +
+Hello world +
``` #### `fill-warning-default` -```css -.fill-warning-default { - fill: var(--fill-warning-default); -} +```tsx +
+Hello world +
``` #### `fill-warning-muted` -```css -.fill-warning-muted { - fill: var(--fill-warning-muted); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-highlight` -```css -.stroke-neutral-highlight { - stroke: var(--stroke-neutral-highlight); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-active` -```css -.stroke-neutral-active { - stroke: var(--stroke-neutral-active); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-default` -```css -.stroke-neutral-default { - stroke: var(--stroke-neutral-default); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-muted` -```css -.stroke-neutral-muted { - stroke: var(--stroke-neutral-muted); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-highlight-fixed-dark` -```css -.stroke-neutral-highlight-fixed-dark { - stroke: var(--stroke-neutral-highlight-fixed-dark); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-default-fixed-dark` -```css -.stroke-neutral-default-fixed-dark { - stroke: var(--stroke-neutral-default-fixed-dark); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-muted-fixed-dark` -```css -.stroke-neutral-muted-fixed-dark { - stroke: var(--stroke-neutral-muted-fixed-dark); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-highlight-fixed-light` -```css -.stroke-neutral-highlight-fixed-light { - stroke: var(--stroke-neutral-highlight-fixed-light); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-default-fixed-light` -```css -.stroke-neutral-default-fixed-light { - stroke: var(--stroke-neutral-default-fixed-light); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-muted-fixed-light` -```css -.stroke-neutral-muted-fixed-light { - stroke: var(--stroke-neutral-muted-fixed-light); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-highlight-inverse` -```css -.stroke-neutral-highlight-inverse { - stroke: var(--stroke-neutral-highlight-inverse); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-default-inverse` -```css -.stroke-neutral-default-inverse { - stroke: var(--stroke-neutral-default-inverse); -} +```tsx +
+Hello world +
``` #### `stroke-neutral-muted-inverse` -```css -.stroke-neutral-muted-inverse { - stroke: var(--stroke-neutral-muted-inverse); -} +```tsx +
+Hello world +
``` #### `stroke-link-primary` -```css -.stroke-link-primary { - stroke: var(--stroke-link-primary); -} +```tsx +
+Hello world +
``` #### `stroke-link-secondary` -```css -.stroke-link-secondary { - stroke: var(--stroke-link-secondary); -} +```tsx +
+Hello world +
``` #### `stroke-link-visited` -```css -.stroke-link-visited { - stroke: var(--stroke-link-visited); -} +```tsx +
+Hello world +
``` #### `stroke-destructive-highlight` -```css -.stroke-destructive-highlight { - stroke: var(--stroke-destructive-highlight); -} +```tsx +
+Hello world +
``` #### `stroke-destructive-default` -```css -.stroke-destructive-default { - stroke: var(--stroke-destructive-default); -} +```tsx +
+Hello world +
``` #### `stroke-destructive-muted` -```css -.stroke-destructive-muted { - stroke: var(--stroke-destructive-muted); -} +```tsx +
+Hello world +
``` #### `stroke-information-highlight` -```css -.stroke-information-highlight { - stroke: var(--stroke-information-highlight); -} +```tsx +
+Hello world +
``` #### `stroke-information-default` -```css -.stroke-information-default { - stroke: var(--stroke-information-default); -} +```tsx +
+Hello world +
``` #### `stroke-information-muted` -```css -.stroke-information-muted { - stroke: var(--stroke-information-muted); -} +```tsx +
+Hello world +
``` #### `stroke-success-highlight` -```css -.stroke-success-highlight { - stroke: var(--stroke-success-highlight); -} +```tsx +
+Hello world +
``` #### `stroke-success-default` -```css -.stroke-success-default { - stroke: var(--stroke-success-default); -} +```tsx +
+Hello world +
``` #### `stroke-success-muted` -```css -.stroke-success-muted { - stroke: var(--stroke-success-muted); -} +```tsx +
+Hello world +
``` #### `stroke-warning-highlight` -```css -.stroke-warning-highlight { - stroke: var(--stroke-warning-highlight); -} +```tsx +
+Hello world +
``` #### `stroke-warning-default` -```css -.stroke-warning-default { - stroke: var(--stroke-warning-default); -} +```tsx +
+Hello world +
``` #### `stroke-warning-muted` -```css -.stroke-warning-muted { - stroke: var(--stroke-warning-muted); -} +```tsx +
+Hello world +
``` ## Migration Notes - **Shadcn components**: Currently using deprecated tokens, will need updates -- **Typography consolidation**: `typography-*` utilities should be removed in favor of `text-*` - **Raw color usage**: Audit and replace any `var(--color-neutral-*)` usage with semantic utilities ## Performance Considerations diff --git a/scripts/generate-utility-docs.js b/scripts/generate-utility-docs.js index 1d75be52..38de7266 100644 --- a/scripts/generate-utility-docs.js +++ b/scripts/generate-utility-docs.js @@ -6,7 +6,6 @@ const postcss = require('postcss') // Paths const UTILITIES_CSS = path.join(__dirname, '../src/utilities.css') -const BASE_CSS = path.join(__dirname, '../src/base.css') const CLAUDE_MD = path.join(__dirname, '../CLAUDE.md') const TYPES_DIR = path.join(__dirname, '../types') const UTILITIES_TYPES = path.join(TYPES_DIR, 'utilities.d.ts') @@ -115,30 +114,30 @@ function generateTypeDefinitions(utilities, themeColors) { * DO NOT EDIT THIS FILE DIRECTLY * Run 'pnpm generate:docs' to update */ - +/* eslint-disable */ +/* prettier-ignore */ /** * Custom utility classes defined in utilities.css */ export type MoonshineUtilities = -${utilityTypes}; +${utilityTypes} /** * Semantic color utilities available from theme * These are auto-generated from theme colors with standard prefixes */ export type MoonshineColorUtilities = -${colorUtilities}; +${colorUtilities} /** * All available Moonshine utility classes */ -export type MoonshineClasses = MoonshineUtilities | MoonshineColorUtilities; +export type MoonshineClasses = MoonshineUtilities | MoonshineColorUtilities /** * Helper type for className props */ -export type MoonshineClassName = MoonshineClasses | MoonshineClasses[] | undefined | null | false; -` +export type MoonshineClassName = MoonshineClasses | MoonshineClasses[] | undefined | null | false` } // Generate documentation section for CLAUDE.md @@ -147,14 +146,13 @@ function generateDocSection(utilities) { // Group utilities by type const typography = utilities.filter( - (u) => u.name.startsWith('text-') || u.name.startsWith('typography-') + (u) => u.name.startsWith('text-') ) const backgrounds = utilities.filter((u) => u.name.startsWith('bg-')) const borders = utilities.filter((u) => u.name.startsWith('border-')) const other = utilities.filter( (u) => !u.name.startsWith('text-') && - !u.name.startsWith('typography-') && !u.name.startsWith('bg-') && !u.name.startsWith('border-') ) @@ -171,18 +169,10 @@ function generateDocSection(utilities) { sections.push('### Typography Utilities\n') typography.forEach((u) => { sections.push(`#### \`${u.name}\`\n`) - sections.push('```css') - sections.push(`.${u.name} {`) - sections.push(u.properties.join('\n')) - - if (u.variants.length > 0) { - u.variants.forEach((v) => { - sections.push(`\n /* ${v.name} variant */`) - sections.push(v.properties.join('\n')) - }) - } - - sections.push('}') + sections.push('```tsx') + sections.push(`

`) + sections.push(`Hello world`) + sections.push(`

`) sections.push('```\n') }) } @@ -192,18 +182,10 @@ function generateDocSection(utilities) { sections.push('### Background Utilities\n') backgrounds.forEach((u) => { sections.push(`#### \`${u.name}\`\n`) - sections.push('```css') - sections.push(`.${u.name} {`) - sections.push(u.properties.join('\n')) - - if (u.variants.length > 0) { - u.variants.forEach((v) => { - sections.push(`\n /* ${v.name} variant */`) - sections.push(v.properties.join('\n')) - }) - } - - sections.push('}') + sections.push('```tsx') + sections.push(`
`) + sections.push(`Hello world`) + sections.push(`
`) sections.push('```\n') }) } @@ -213,10 +195,10 @@ function generateDocSection(utilities) { sections.push('### Border Utilities\n') borders.forEach((u) => { sections.push(`#### \`${u.name}\`\n`) - sections.push('```css') - sections.push(`.${u.name} {`) - sections.push(u.properties.join('\n')) - sections.push('}') + sections.push('```tsx') + sections.push(`
`) + sections.push(`Hello world`) + sections.push(`
`) sections.push('```\n') }) } @@ -226,10 +208,10 @@ function generateDocSection(utilities) { sections.push('### Other Utilities\n') other.forEach((u) => { sections.push(`#### \`${u.name}\`\n`) - sections.push('```css') - sections.push(`.${u.name} {`) - sections.push(u.properties.join('\n')) - sections.push('}') + sections.push('```tsx') + sections.push(`
`) + sections.push(`Hello world`) + sections.push(`
`) sections.push('```\n') }) } diff --git a/src/components/AIChat/parts/AIChatMessageToolInvocationPart.tsx b/src/components/AIChat/parts/AIChatMessageToolInvocationPart.tsx index ab05b1fb..b2bef72c 100644 --- a/src/components/AIChat/parts/AIChatMessageToolInvocationPart.tsx +++ b/src/components/AIChat/parts/AIChatMessageToolInvocationPart.tsx @@ -43,7 +43,7 @@ export function AIChatMessageToolInvocationPart({ Input: -
+          
             {JSON.stringify(toolInput, null, 2)}
           
diff --git a/src/components/AIChat/parts/AIChatMessageToolPart.tsx b/src/components/AIChat/parts/AIChatMessageToolPart.tsx index 3aabc23e..4ea5557d 100644 --- a/src/components/AIChat/parts/AIChatMessageToolPart.tsx +++ b/src/components/AIChat/parts/AIChatMessageToolPart.tsx @@ -44,7 +44,7 @@ export interface AIChatMessageToolPartComponents extends BaseComponents { } const inputResultClassName = - 'typography-body-xs max-h-48 overflow-auto rounded p-2 break-all whitespace-pre-wrap text-foreground bg-muted' + 'text-body-xs max-h-48 overflow-auto rounded p-2 break-all whitespace-pre-wrap text-foreground bg-muted' const defaultComponents: DefaultComponents = { toolName: ({ toolName, confirmMessage, className }) => ( diff --git a/src/components/AIChat/parts/AIChatMessageToolResultPart.tsx b/src/components/AIChat/parts/AIChatMessageToolResultPart.tsx index dc288525..e54ee407 100644 --- a/src/components/AIChat/parts/AIChatMessageToolResultPart.tsx +++ b/src/components/AIChat/parts/AIChatMessageToolResultPart.tsx @@ -37,7 +37,7 @@ export function AIChatMessageToolResultPart({
-
+        
           {content}
         
diff --git a/src/components/AppLayout/index.tsx b/src/components/AppLayout/index.tsx index f3ce287a..f6b67e1d 100644 --- a/src/components/AppLayout/index.tsx +++ b/src/components/AppLayout/index.tsx @@ -160,7 +160,7 @@ const AppLayoutBreadcrumb = ({ AppLayoutBreadcrumb.displayName = 'AppLayout.Breadcrumb' const AppLayoutBreadcrumbDivider = () => { - return / + return / } interface AppLayoutBreadcrumbItemProps extends PropsWithChildren { @@ -176,7 +176,7 @@ const AppLayoutBreadcrumbItem = ({ return (