Danny White
9bd86bee93
feat(design-system): document shared inline code defaults ( #51984 )
...
## Problem
The design system repeats inline-code styles and does not document the
new shared defaults.
## Solution
Import the shared styles from #51980 and document how sizing, colour,
weight and wrapping work. Add examples of bare and linked code, tables,
long values, Tailwind overrides and `data-code-style="plain"`. Remove
repeated styles from existing examples.
Highlighted code blocks keep an explicit `text-sm` size so removing
inline-code classes does not enlarge them.
## Review instructions
This PR changes the design-system app only.
1. Open the [Layout
page](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/layout ).
Check the inline-code examples at narrow and desktop widths in both
themes.
2. Check code in headings, long values, explicit size overrides and the
plain display example. Code should use the default foreground colour and
follow the surrounding weight unless a class overrides it.
3. Check the [chart palette
example](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/charts ).
CSS variable names should remain `<code>` elements with their own
display styles.
| Before | After |
| --- | --- |
| <img width="1666" height="770" alt="CleanShot 2026-10-20 at 16 37
20@2x"
src="https://github.com/user-attachments/assets/2ac87442-12a9-49ab-8e4f-f82436308567 "
/> | <img width="1680" height="782" alt="CleanShot 2026-10-20 at 16 36
12@2x"
src="https://github.com/user-attachments/assets/b0074844-3431-4fb9-827b-c6fd0de889fe "
/> |
| _Layout
([live](https://supabase.com/design-system/docs/ui-patterns/layout ))_ |
_Layout
([preview](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/layout ))_
|
| <img width="1072" height="476" alt="CleanShot 2026-10-20 at 16 35
14@2x"
src="https://github.com/user-attachments/assets/242bf850-58fa-4b29-a978-bd0e296c2e8b "
/> | <img width="1072" height="484" alt="CleanShot 2026-10-20 at 16 34
47@2x"
src="https://github.com/user-attachments/assets/962adef0-05b7-47ed-8fdc-5229a3a332e1 "
/> |
| _Charts
([live](https://supabase.com/design-system/docs/ui-patterns/charts ))_ |
_Charts
([preview](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/charts )):
no visual changes as `data-code-style="plain"` has been used_ |
2026-10-22 00:48:57 +00:00
Gildas Garcia and Ivan Vasilov
96d43099bb
chore: refactor Button API so that it can be used a standard button ( #46880 )
...
## Problem
Our `<Button>` component breaks the default `button` contract by
redefining the `type` prop to set its variant (`primary`, `default`,
etc) instead of the button type (`submit`, `button`, etc).
This is confusing and forces to write more code when using it with
shadcn components that expect/inject the standard button props.
## Solution
- rename the `type` prop to `variant`
- rename the `htmlType` prop to `type`
- propagate the changes where necessary
- format code
## How to test
As this is just prop renaming, if it builds it's ok
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com >
2026-06-16 23:59:58 +02:00
Danny White and coderabbitai[bot]
f6e8207e6d
docs(design-system) add dialog pattern documentation ( #41296 )
...
* docs
* naming
* docs
* mini fix
* update policies component
* use destructured prop
* rls policies dialogs
* custom domain dialogs
* restart server dialog
* remove ConfirmDialog (aka ConfirmModal)
* docs updates
* remove unrelated work
* remove unrelated work
* remove unrelated work
* confirmation-modal demo
* use indicative components
* links
* tiny docs updates
* examples
* sheets and alert dialog examples
* docs and examples
* docs
* docs
* text confirm modal
* docs
* docs
* revert cursor rules
* fixes
* fix links
* Update apps/design-system/registry/examples.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* rabbit
* rabbit
* use variants
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-17 11:24:36 +00:00
b8243e06d8
Feat/design system site ( #26586 )
...
* init site
* add nav menu
* add props table component
* init all the examples
• also includes moving a bunch of ./ui files to ./ui-patterns
* update package
• might need to remove some of these
* Update rehype-component.ts
* move nav
* more changes
* add new source information to contentlayer
* fix copy buttons
* add text-confirm. start new concept of "fragments"
* move base path. add homepage. add theme selection
* added colors
* add form-item-layout
* temporary fix code blocks in light mode. they currently don't switch theme to theme
* start adding code themes
* Update dark.json
* update code block themes
* fix animations
* add cdmk search
* export registry of icons in ./icons package
* add comments
* add icon copy stuff
* Update icons.tsx
* more docs
* more docs. cleaned up colors and icons docs
* Update theming.mdx
* add more docs
* update
* add package
* Update tailwind.config.js
* update content
* Update drawer-demo.tsx
* Update aspect-ratio-demo.tsx
* add new blocks
* Update source-panel.tsx
* Update source-panel.tsx
* Update source-panel.tsx
* add new source block
* Update source-panel.tsx
* Update _app.tsx
* Update page.tsx
* Delete layout-old.tsx
* remove old themes
* remove old ui registry
* comment out nav items
* Update package-lock.json
* Update AssistantChatForm.tsx
* move back
* move again
* update
* Update index.tsx
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* update package
* udpate prettier
* fix tag issues
* Update package-lock.json
* update to contentlayer2
* update package-lock.json
* fix type errors
* ignore spelling
* Update avoid-typos.yml
* Update avoid-typos.yml
* Update package-lock.json
* Use ui type definitions.
* move tsconfig base stuff. fix content layer issue
* Update package-lock.json
* Update package-lock.json
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com >
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com >
2024-05-23 17:39:56 +08:00