Merge pull request #30540 from backstage/docs-ui
Move canon-docs to docs-ui
@@ -7,7 +7,7 @@
|
||||
**/.git/**
|
||||
**/public/**
|
||||
**/microsite/**
|
||||
**/canon-docs/**
|
||||
**/docs-ui/**
|
||||
**/templates/**
|
||||
**/sample-templates/**
|
||||
playwright.config.ts
|
||||
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
sync-canon-docs:
|
||||
sync-docs-ui:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
@@ -26,11 +26,11 @@ jobs:
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v20.x
|
||||
|
||||
- name: Checkout backstage/canon-docs
|
||||
- name: Checkout backstage/docs-ui
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
repository: backstage/canon-docs
|
||||
path: canon-external-docs
|
||||
repository: backstage/docs-ui
|
||||
path: bui-external-docs
|
||||
token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
|
||||
- name: Configure Git
|
||||
@@ -39,22 +39,22 @@ jobs:
|
||||
git config --global user.name 'Github Canon Docs workflow'
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: canon-docs
|
||||
working-directory: docs-ui
|
||||
run: yarn install
|
||||
|
||||
- name: Build Canon Docs
|
||||
working-directory: canon-docs
|
||||
- name: Build Docs UI
|
||||
working-directory: docs-ui
|
||||
run: |
|
||||
yarn build
|
||||
|
||||
- name: Replace contents of canon-external-docs repo with docs build output
|
||||
working-directory: canon-external-docs
|
||||
- name: Replace contents of bui-external-docs repo with docs build output
|
||||
working-directory: bui-external-docs
|
||||
run: |
|
||||
git rm -rf .
|
||||
cp -R ../canon-docs/dist/. .
|
||||
cp -R ../docs-ui/dist/. .
|
||||
|
||||
- name: Commit to canon-storybook repo
|
||||
working-directory: canon-external-docs
|
||||
working-directory: bui-external-docs
|
||||
run: |
|
||||
git add .
|
||||
git commit -am "Canon Docs build for backstage/backstage@${{ github.sha }}"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.yarn
|
||||
dist
|
||||
microsite
|
||||
canon-docs/.next
|
||||
canon-docs/public
|
||||
canon-docs/out
|
||||
docs-ui/.next
|
||||
docs-ui/public
|
||||
docs-ui/out
|
||||
packages/ui/css
|
||||
coverage
|
||||
*.hbs
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,39 +0,0 @@
|
||||
import styles from './Sidebar.module.css';
|
||||
import { Docs } from './docs';
|
||||
import { Playground } from './playground';
|
||||
import Link from 'next/link';
|
||||
import { ScrollArea } from '@base-ui-components/react/scroll-area';
|
||||
|
||||
export const Sidebar = () => {
|
||||
return (
|
||||
<div className={styles.sidebar}>
|
||||
<ScrollArea.Root className={styles.root}>
|
||||
<ScrollArea.Viewport className={styles.viewport}>
|
||||
<div className={styles.content}>
|
||||
<div className={styles.logoContainer}>
|
||||
<Link href="/">
|
||||
<svg
|
||||
width="89"
|
||||
height="27"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className={styles.logo}
|
||||
>
|
||||
<path d="M77.414 9.71h3.036v2.992l-.264-.022c.279-.88.748-1.65 1.408-2.31.675-.66 1.533-.99 2.574-.99 1.086 0 1.9.352 2.442 1.056.558.689.836 1.598.836 2.728v7.502H84.41v-6.6c0-.66-.117-1.159-.352-1.496-.234-.338-.623-.506-1.166-.506-.601 0-1.122.271-1.562.814a4.321 4.321 0 0 0-.88 1.848v5.94h-3.036V9.71ZM69.868 21.04c-1.13 0-2.142-.257-3.036-.77a5.547 5.547 0 0 1-2.068-2.09c-.484-.895-.726-1.892-.726-2.992 0-1.115.242-2.112.726-2.992a5.503 5.503 0 0 1 2.068-2.112c.88-.514 1.892-.77 3.036-.77 1.144 0 2.156.256 3.036.77a5.347 5.347 0 0 1 2.046 2.112c.498.88.748 1.87.748 2.97 0 1.114-.25 2.12-.748 3.014a5.343 5.343 0 0 1-2.068 2.09c-.88.513-1.885.77-3.014.77Zm0-2.618c.557 0 1.048-.132 1.474-.396a2.79 2.79 0 0 0 .99-1.144c.234-.499.352-1.064.352-1.694 0-.63-.118-1.188-.352-1.672a2.764 2.764 0 0 0-.99-1.166c-.426-.279-.917-.418-1.474-.418-.558 0-1.05.14-1.474.418a2.764 2.764 0 0 0-.99 1.166c-.22.484-.33 1.041-.33 1.672 0 .63.11 1.195.33 1.694.234.484.564.865.99 1.144.425.264.916.396 1.474.396ZM52.385 9.71h3.036v2.992l-.264-.022c.279-.88.748-1.65 1.408-2.31.675-.66 1.533-.99 2.574-.99 1.085 0 1.9.352 2.442 1.056.557.689.836 1.598.836 2.728v7.502h-3.036v-6.6c0-.66-.117-1.159-.352-1.496-.235-.338-.623-.506-1.166-.506-.601 0-1.122.271-1.562.814a4.321 4.321 0 0 0-.88 1.848v5.94h-3.036V9.71ZM43.904 20.952c-1.026 0-1.87-.308-2.53-.924-.66-.616-.99-1.416-.99-2.398 0-1.115.418-2.01 1.254-2.684.85-.69 2.105-1.034 3.762-1.034h2.75l-.924.352v-.462c0-.572-.176-1.02-.528-1.342-.352-.338-.931-.506-1.738-.506-.69 0-1.386.154-2.09.462-.704.308-1.29.69-1.76 1.144v-2.882c.47-.352 1.1-.66 1.892-.924a7.942 7.942 0 0 1 2.486-.396c1.599 0 2.78.41 3.542 1.232.778.806 1.166 1.914 1.166 3.322v5.742c0 .176.008.352.022.528.03.161.066.322.11.484h-3.014v-3.3l.044 1.386a4.044 4.044 0 0 1-1.32 1.606c-.572.396-1.283.594-2.134.594Zm.858-2.156c.558 0 1.049-.206 1.474-.616.44-.426.77-.954.99-1.584v-.792h-1.562c-.762 0-1.334.146-1.716.44-.381.278-.572.674-.572 1.188 0 .41.125.74.374.99.264.25.602.374 1.012.374ZM34.66 21.04c-1.525 0-2.874-.345-4.047-1.034-1.174-.704-2.09-1.68-2.75-2.926-.646-1.247-.968-2.662-.968-4.246 0-1.584.322-2.992.968-4.224.66-1.232 1.576-2.193 2.75-2.882 1.173-.704 2.522-1.056 4.048-1.056.968 0 1.818.11 2.552.33.748.22 1.356.506 1.826.858v3.498c-.396-.484-.96-.895-1.694-1.232-.719-.338-1.51-.506-2.376-.506-.939 0-1.775.22-2.508.66-.719.44-1.284 1.056-1.694 1.848-.396.792-.594 1.694-.594 2.706 0 1.026.198 1.943.594 2.75.41.792.975 1.408 1.694 1.848.733.44 1.57.66 2.508.66.88 0 1.68-.162 2.398-.484.718-.323 1.276-.726 1.672-1.21v3.41a5.686 5.686 0 0 1-1.87.902c-.704.22-1.54.33-2.508.33ZM11.275 6.271c.276.526.019 1.152-.464 1.498a5.846 5.846 0 0 0 1.004 10.082c.454.205.789.632.789 1.13v6.206a.837.837 0 0 1-.838.837C5.33 26.024.112 20.804.112 14.366V.862C.112.399.487.024.95.024c4.483 0 8.376 2.533 10.325 6.247Z" />
|
||||
<path d="M14.037 16.729a4.237 4.237 0 0 0 4.234-4.24 4.237 4.237 0 0 0-4.234-4.242 4.237 4.237 0 0 0-4.234 4.241 4.237 4.237 0 0 0 4.234 4.24Z" />
|
||||
</svg>
|
||||
</Link>
|
||||
</div>
|
||||
<div className={styles.menu}>
|
||||
<Docs />
|
||||
<Playground />
|
||||
</div>
|
||||
</div>
|
||||
</ScrollArea.Viewport>
|
||||
<ScrollArea.Scrollbar className={styles.scrollbar}>
|
||||
<ScrollArea.Thumb className={styles.thumb} />
|
||||
</ScrollArea.Scrollbar>
|
||||
</ScrollArea.Root>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
# Canon Docs
|
||||
# Backstage UI Docs
|
||||
|
||||
Canon is our internal UI library built for Backstage. We built this website to document the library and its components. You can view this website [here](https://canon.backstage.io).
|
||||
Backstage UI is our internal UI library built for Backstage. We built this website to document the library and its components. You can view this website [here](https://ui.backstage.io).
|
||||
|
||||
## How to run locally
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "canon-docs",
|
||||
"name": "docs-ui",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
@@ -5,7 +5,7 @@ const chokidar = require('chokidar');
|
||||
|
||||
// Configuration
|
||||
const config = {
|
||||
canonPath: '../../packages/canon',
|
||||
UIPath: '../../packages/ui',
|
||||
publicPath: '../public',
|
||||
files: [
|
||||
{
|
||||
@@ -23,13 +23,13 @@ const config = {
|
||||
|
||||
class CSSSync {
|
||||
constructor() {
|
||||
this.canonPath = path.resolve(__dirname, config.canonPath);
|
||||
this.UIPath = path.resolve(__dirname, config.UIPath);
|
||||
this.publicPath = path.resolve(__dirname, config.publicPath);
|
||||
this.isWatching = process.argv.includes('--watch');
|
||||
}
|
||||
|
||||
async syncFile(fileConfig) {
|
||||
const sourcePath = path.join(this.canonPath, fileConfig.source);
|
||||
const sourcePath = path.join(this.UIPath, fileConfig.source);
|
||||
const destPath = path.join(this.publicPath, fileConfig.destination);
|
||||
|
||||
try {
|
||||
@@ -93,7 +93,7 @@ class CSSSync {
|
||||
|
||||
// Watch all source files
|
||||
const watchPaths = config.files.map(file =>
|
||||
path.join(this.canonPath, file.source),
|
||||
path.join(this.UIPath, file.source),
|
||||
);
|
||||
|
||||
const watcher = chokidar.watch(watchPaths, {
|
||||
@@ -103,7 +103,7 @@ class CSSSync {
|
||||
|
||||
watcher.on('change', async filePath => {
|
||||
console.log(
|
||||
`\n🔄 Change detected: ${path.relative(this.canonPath, filePath)}`,
|
||||
`\n🔄 Change detected: ${path.relative(this.UIPath, filePath)}`,
|
||||
);
|
||||
|
||||
// Find which file changed and sync it
|
||||
@@ -127,8 +127,8 @@ class CSSSync {
|
||||
}
|
||||
|
||||
async run() {
|
||||
console.log('🎨 Canon CSS Sync Tool\n');
|
||||
console.log(`📂 Canon path: ${this.canonPath}`);
|
||||
console.log('🎨 BUI CSS Sync Tool\n');
|
||||
console.log(`📂 BUI path: ${this.UIPath}`);
|
||||
console.log(`📂 Public path: ${this.publicPath}\n`);
|
||||
|
||||
// Initial sync
|
||||
@@ -1,7 +1,7 @@
|
||||
# About Canon
|
||||
# About Backstage UI
|
||||
|
||||
Canon is a design system created specifically for Backstage, built with React, TypeScript, and vanilla CSS.
|
||||
This open-source library is hosted in the Backstage monorepo. While it can be used in other projects, Canon
|
||||
Backstage UI is a design system created specifically for Backstage, built with React, TypeScript, and vanilla CSS.
|
||||
This open-source library is hosted in the Backstage monorepo. While it can be used in other projects, Backstage UI
|
||||
is designed to deliver a consistent, accessible, and extensible experience tailored to Backstage users.
|
||||
|
||||
## Philosophy
|
||||
@@ -17,16 +17,16 @@ and flexible theming system.
|
||||
|
||||
## Team
|
||||
|
||||
Canon is designed and maintained primarily by Spotify's Backstage team, leveraging Spotify's expertise in
|
||||
Backstage UI is designed and maintained primarily by Spotify's Backstage team, leveraging Spotify's expertise in
|
||||
crafting high-quality design and technology. Drawing from our experience in building reliable and intuitive
|
||||
user experiences for the music industry, we've created a design system that looks great and works seamlessly.
|
||||
|
||||
## Community
|
||||
|
||||
Canon is an open-source project and we welcome contributions from the community. If you are interested in
|
||||
contributing to Canon, please read our [contributing guide](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md)
|
||||
Backstage UI is an open-source project and we welcome contributions from the community. If you are interested in
|
||||
contributing to Backstage UI, please read our [contributing guide](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md)
|
||||
and our [code of conduct](https://github.com/backstage/backstage/blob/master/CODE_OF_CONDUCT.md).
|
||||
|
||||
## License
|
||||
|
||||
Canon is licensed under the Apache 2.0 license. See the [LICENSE](https://github.com/backstage/backstage/blob/master/LICENSE) file for more details.
|
||||
Backstage UI is licensed under the Apache 2.0 license. See the [LICENSE](https://github.com/backstage/backstage/blob/master/LICENSE) file for more details.
|
||||
@@ -6,8 +6,8 @@ import { Changelog } from '@/components/Changelog';
|
||||
|
||||
## Version 0.1.0
|
||||
|
||||
We're excited to share the initial release of Canon 💚 In this first alpha version,
|
||||
We're excited to share the initial release of Backstage UI 💚 In this first alpha version,
|
||||
you'll find the foundation of our design system: a set of versatile layout components
|
||||
and a handful of essential atomic elements to help you get started. While Canon is
|
||||
and a handful of essential atomic elements to help you get started. While Backstage UI is
|
||||
still in its early stages, it's ready for exploration and we'd love for you to give
|
||||
it a try and share your feedback.
|
||||
@@ -3,7 +3,7 @@ import type { Metadata } from 'next';
|
||||
import styles from './layout.module.css';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Canon',
|
||||
title: 'Backstage UI',
|
||||
description: 'UI library for Backstage',
|
||||
};
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
|
||||
<img
|
||||
src="header.png"
|
||||
style={{ width: '100%', marginBottom: '32px', marginTop: '64px' }}
|
||||
/>
|
||||
# Backstage UI
|
||||
|
||||
Welcome to the Canon, the new design library for Backstage plugins. This
|
||||
Welcome to the Backstage UI, the new design library for Backstage plugins. This
|
||||
project is still under active development but we will make sure to document
|
||||
the API as we go. We are aiming to improve the general UI of Backstage and
|
||||
plugins across Backstage. This new library will take time to build but we are
|
||||
@@ -13,18 +10,18 @@ building it incrementally with not conflict with the existing theming system.
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Install canon
|
||||
### 1. Install Backstage UI
|
||||
|
||||
Install Canon using a package manager.
|
||||
Install Backstage UI using a package manager.
|
||||
|
||||
<CodeBlock lang="shell" code={`yarn add @backstage/canon`} />
|
||||
<CodeBlock lang="shell" code={`yarn add @backstage/ui`} />
|
||||
|
||||
### 2. Import the css files
|
||||
|
||||
Import the global CSS file at the root of your application.
|
||||
|
||||
```tsx
|
||||
import '@backstage/canon/css/styles.css';
|
||||
import '@backstage/ui/css/styles.css';
|
||||
```
|
||||
|
||||
### 3. Start building ✨
|
||||
@@ -32,7 +29,7 @@ import '@backstage/canon/css/styles.css';
|
||||
Now you can start building your plugin using the new design system.
|
||||
|
||||
```tsx
|
||||
import { Flex, Button, Text } from '@backstage/canon';
|
||||
import { Flex, Button, Text } from '@backstage/ui';
|
||||
|
||||
<Flex>
|
||||
<Text>Hello World</Text>
|
||||
@@ -40,10 +37,6 @@ import { Flex, Button, Text } from '@backstage/canon';
|
||||
</Flex>;
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
||||
You can check our roadmap [on GitHub](https://github.com/orgs/backstage/projects/10). We'll do our best to keep you updated on the progress.
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you have the basics down, you can start building your plugin using the new design system.
|
||||
@@ -3,7 +3,7 @@ import { CodeBlock } from '@/components/CodeBlock';
|
||||
|
||||
# Layout
|
||||
|
||||
Canon is made for extensibility. We built this library to make it easy for any
|
||||
Backstage UI is made for extensibility. We built this library to make it easy for any
|
||||
Backstage plugin creator to be able to build their ideas at speed ensuring
|
||||
consistency across the rest of your ecosystem. Each component is designed to
|
||||
be editable to match your need but sometimes you want to have more control
|
||||
@@ -4,7 +4,7 @@ import { CodeBlock } from '@/components/CodeBlock';
|
||||
|
||||
# Responsive
|
||||
|
||||
Canon is built on a responsive design system, meaning that the components are
|
||||
Backstage UI is built on a responsive design system, meaning that the components are
|
||||
designed to adapt to different screen sizes. By default we offer a set of
|
||||
breakpoints that you can use to create responsive components.
|
||||
|
||||
@@ -90,7 +90,7 @@ breakpoints that you can use to create responsive components.
|
||||
|
||||
## Responsive components
|
||||
|
||||
Canon components are designed to be responsive, meaning that they will adapt
|
||||
Backstage UI components are designed to be responsive, meaning that they will adapt
|
||||
to different screen sizes. Not every component is responsive, but the ones
|
||||
that are will have a prop to control the responsive behavior.
|
||||
|
||||
@@ -5,7 +5,7 @@ import { customTheme } from '@/snippets/code-snippets';
|
||||
|
||||
# Theming
|
||||
|
||||
Canon's theming is built entirely on CSS, without relying on any CSS-in-JS libraries.
|
||||
Backstage UI theming is built entirely on CSS, without relying on any CSS-in-JS libraries.
|
||||
At its core, it provides a solid default theme that is easily customizable using a
|
||||
comprehensive set of CSS variables. Additionally, it enables anyone to adapt the design
|
||||
to their specific needs. Each component comes with fixed class names, making customization
|
||||
@@ -13,7 +13,7 @@ even more straightforward.
|
||||
|
||||
## Light & Dark modes
|
||||
|
||||
By default, Canon supports both light and dark modes using the `data-theme` attribute.
|
||||
By default, Backstage UI supports both light and dark modes using the `data-theme` attribute.
|
||||
The light theme is applied by default if no `data-theme` attribute is specified. To create
|
||||
a custom theme, you'll need to define both light and dark modes as outlined below. If
|
||||
only one mode is defined, the other will fall back to the default theme.
|
||||
@@ -31,7 +31,7 @@ Here's an example of how your theme.css file should look like:
|
||||
|
||||
## CSS class name structure
|
||||
|
||||
All Canon components come with a set of CSS classes that you can use to style them. To make it
|
||||
All Backstage UI components come with a set of CSS classes that you can use to style them. To make it
|
||||
easier to identify the class name you can use, we use a specific structure for the class names.
|
||||
|
||||
<img
|
||||
@@ -39,7 +39,7 @@ easier to identify the class name you can use, we use a specific structure for t
|
||||
style={{ width: '100%', marginBottom: '32px', marginTop: '16px' }}
|
||||
/>
|
||||
|
||||
Every component has a unique prefix `.canon-` followed by the component name. Component props
|
||||
Every component has a unique prefix `.bui-` followed by the component name. Component props
|
||||
are represented using the `data-` attribute. That way, class names are easily identifiable.
|
||||
|
||||
## Available CSS variables
|
||||
@@ -58,7 +58,7 @@ These colors are used for special purposes like ring, scrollbar, ...
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-black</Chip>
|
||||
<Chip head>--bui-black</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
Pure black color. This one should be the same in light and dark themes.
|
||||
@@ -66,7 +66,7 @@ These colors are used for special purposes like ring, scrollbar, ...
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-white</Chip>
|
||||
<Chip head>--bui-white</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
Pure white color. This one should be the same in light and dark themes.
|
||||
@@ -74,49 +74,49 @@ These colors are used for special purposes like ring, scrollbar, ...
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-1</Chip>
|
||||
<Chip head>--bui-gray-1</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-2</Chip>
|
||||
<Chip head>--bui-gray-2</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-3</Chip>
|
||||
<Chip head>--bui-gray-3</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-4</Chip>
|
||||
<Chip head>--bui-gray-4</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-5</Chip>
|
||||
<Chip head>--bui-gray-5</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-6</Chip>
|
||||
<Chip head>--bui-gray-6</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-7</Chip>
|
||||
<Chip head>--bui-gray-7</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-gray-8</Chip>
|
||||
<Chip head>--bui-gray-8</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>You can use these mostly for backgrounds colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
@@ -126,7 +126,7 @@ These colors are used for special purposes like ring, scrollbar, ...
|
||||
### Core background colors
|
||||
|
||||
These colors are used for the background of your application. We are mostly using for now a
|
||||
single elevated background for panels. `--canon-bg` should mostly use as the main background
|
||||
single elevated background for panels. `--bui-bg` should mostly use as the main background
|
||||
color of your app.
|
||||
|
||||
<Table.Root>
|
||||
@@ -139,85 +139,85 @@ color of your app.
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg</Chip>
|
||||
<Chip head>--bui-bg</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The background color of your Backstage instance.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-surface-1</Chip>
|
||||
<Chip head>--bui-bg-surface-1</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Use for any panels or elevated surfaces.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-surface-2</Chip>
|
||||
<Chip head>--bui-bg-surface-2</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Use for any panels or elevated surfaces.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-solid</Chip>
|
||||
<Chip head>--bui-bg-solid</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for solid background colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-solid-hover</Chip>
|
||||
<Chip head>--bui-bg-solid-hover</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for solid background colors when hovered.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-solid-pressed</Chip>
|
||||
<Chip head>--bui-bg-solid-pressed</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for solid background colors when pressed.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-solid-disabled</Chip>
|
||||
<Chip head>--bui-bg-solid-disabled</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for solid background colors when disabled.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-tint</Chip>
|
||||
<Chip head>--bui-bg-tint</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for tint background colors.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-tint-hover</Chip>
|
||||
<Chip head>--bui-bg-tint-hover</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for tint background colors when hovered.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-tint-focus</Chip>
|
||||
<Chip head>--bui-bg-tint-focus</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for tint background colors when active.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-tint-disabled</Chip>
|
||||
<Chip head>--bui-bg-tint-disabled</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used for tint background colors when disabled.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-danger</Chip>
|
||||
<Chip head>--bui-bg-danger</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used to show errors information.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-warning</Chip>
|
||||
<Chip head>--bui-bg-warning</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used to show warnings information.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-bg-success</Chip>
|
||||
<Chip head>--bui-bg-success</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used to show success information.</Table.Cell>
|
||||
</Table.Row>
|
||||
@@ -240,7 +240,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-primary</Chip>
|
||||
<Chip head>--bui-fg-primary</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of main background surfaces.
|
||||
@@ -248,7 +248,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-secondary</Chip>
|
||||
<Chip head>--bui-fg-secondary</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of main background surfaces.
|
||||
@@ -256,7 +256,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-link</Chip>
|
||||
<Chip head>--bui-fg-link</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of main background surfaces.
|
||||
@@ -264,7 +264,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-link-hover</Chip>
|
||||
<Chip head>--bui-fg-link-hover</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of main background surfaces.
|
||||
@@ -272,7 +272,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-disabled</Chip>
|
||||
<Chip head>--bui-fg-disabled</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of main background surfaces.
|
||||
@@ -280,7 +280,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-solid</Chip>
|
||||
<Chip head>--bui-fg-solid</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of solid background colors.
|
||||
@@ -288,7 +288,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-tint</Chip>
|
||||
<Chip head>--bui-fg-tint</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of tint background colors.
|
||||
@@ -296,7 +296,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-tint-disabled</Chip>
|
||||
<Chip head>--bui-fg-tint-disabled</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of tint background colors when disabled.
|
||||
@@ -304,7 +304,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-danger</Chip>
|
||||
<Chip head>--bui-fg-danger</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of danger background colors.
|
||||
@@ -312,7 +312,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-warning</Chip>
|
||||
<Chip head>--bui-fg-warning</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of warning background colors.
|
||||
@@ -320,7 +320,7 @@ are prefixed with `fg` to make it easier to identify.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-fg-success</Chip>
|
||||
<Chip head>--bui-fg-success</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of success background colors.
|
||||
@@ -344,15 +344,13 @@ low contrast to help as a separator with the different background colors.
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-border</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
It should be used on top of `--canon-bg-surface-1`.
|
||||
<Chip head>--bui-border</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>It should be used on top of `--bui-bg-surface-1`.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-border-hover</Chip>
|
||||
<Chip head>--bui-border-hover</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
Used when the component is interactive and hovered.
|
||||
@@ -360,7 +358,7 @@ low contrast to help as a separator with the different background colors.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-border-pressed</Chip>
|
||||
<Chip head>--bui-border-pressed</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
Used when the component is interactive and focused.
|
||||
@@ -368,27 +366,27 @@ low contrast to help as a separator with the different background colors.
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-border-disabled</Chip>
|
||||
<Chip head>--bui-border-disabled</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Used when the component is disabled.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-border-danger</Chip>
|
||||
<Chip head>--bui-border-danger</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>It should be used on top of `--canon-bg-danger`.</Table.Cell>
|
||||
<Table.Cell>It should be used on top of `--bui-bg-danger`.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-border-warning</Chip>
|
||||
<Chip head>--bui-border-warning</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>It should be used on top of `--canon-bg-warning`.</Table.Cell>
|
||||
<Table.Cell>It should be used on top of `--bui-bg-warning`.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-border-success</Chip>
|
||||
<Chip head>--bui-border-success</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>It should be used on top of `--canon-bg-success`.</Table.Cell>
|
||||
<Table.Cell>It should be used on top of `--bui-bg-success`.</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table.Body>
|
||||
</Table.Root>
|
||||
@@ -407,19 +405,19 @@ These colors are used for special purposes like ring, scrollbar, ...
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-ring</Chip>
|
||||
<Chip head>--bui-ring</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The color of the ring.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-scrollbar</Chip>
|
||||
<Chip head>--bui-scrollbar</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The color of the scrollbar.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-scrollbar-thumb</Chip>
|
||||
<Chip head>--bui-scrollbar-thumb</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The color of the scrollbar thumb.</Table.Cell>
|
||||
</Table.Row>
|
||||
@@ -428,7 +426,7 @@ These colors are used for special purposes like ring, scrollbar, ...
|
||||
|
||||
### Font families
|
||||
|
||||
We have two fonts that we use across Canon. The first one is the sans-serif
|
||||
We have two fonts that we use across Backstage UI. The first one is the sans-serif
|
||||
font that we use for the body of the application. The second one is the
|
||||
monospace font that we use for code blocks and tables.
|
||||
|
||||
@@ -442,13 +440,13 @@ monospace font that we use for code blocks and tables.
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-font-regular</Chip>
|
||||
<Chip head>--bui-font-regular</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The sans-serif font for the theme.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-font-mono</Chip>
|
||||
<Chip head>--bui-font-mono</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The monospace font for the theme.</Table.Cell>
|
||||
</Table.Row>
|
||||
@@ -457,7 +455,7 @@ monospace font that we use for code blocks and tables.
|
||||
|
||||
### Font weights
|
||||
|
||||
We have two font weights that we use across Canon. Regular or Bold.
|
||||
We have two font weights that we use across Backstage UI. Regular or Bold.
|
||||
|
||||
<Table.Root>
|
||||
<Table.Header>
|
||||
@@ -469,13 +467,13 @@ We have two font weights that we use across Canon. Regular or Bold.
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-font-weight-regular</Chip>
|
||||
<Chip head>--bui-font-weight-regular</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The regular font weight for the theme.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-font-weight-bold</Chip>
|
||||
<Chip head>--bui-font-weight-bold</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>The bold font weight for the theme.</Table.Cell>
|
||||
</Table.Row>
|
||||
@@ -484,12 +482,12 @@ We have two font weights that we use across Canon. Regular or Bold.
|
||||
|
||||
### Spacing
|
||||
|
||||
We built a spacing system based on a single value `--canon-space`. This value is
|
||||
We built a spacing system based on a single value `--bui-space`. This value is
|
||||
used to calculate the spacing for all the components. By default if you would like to
|
||||
increase or decrease the spacing between your components you can do it simply by updating
|
||||
`--canon-space` and it will apply to all spacing values.
|
||||
`--bui-space` and it will apply to all spacing values.
|
||||
|
||||
`--canon-space` is not used directly in any components but serve as an easy way to
|
||||
`--bui-space` is not used directly in any components but serve as an easy way to
|
||||
calculate the other values.
|
||||
|
||||
<Table.Root>
|
||||
@@ -502,7 +500,7 @@ calculate the other values.
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space</Chip>
|
||||
<Chip head>--bui-space</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The base unit for the spacing system. Default value is `0.25rem`.
|
||||
@@ -524,99 +522,99 @@ tokens for pretty much each spacing properties like padding, margin, gaps, ...
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-0_5</Chip>
|
||||
<Chip head>--bui-space-0_5</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 0.5.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 0.5.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-1</Chip>
|
||||
<Chip head>--bui-space-1</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`).</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`).</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-1_5</Chip>
|
||||
<Chip head>--bui-space-1_5</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 1.5.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 1.5.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-2</Chip>
|
||||
<Chip head>--bui-space-2</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 2.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 2.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-3</Chip>
|
||||
<Chip head>--bui-space-3</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 3.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 3.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-4</Chip>
|
||||
<Chip head>--bui-space-4</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 4.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 4.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-5</Chip>
|
||||
<Chip head>--bui-space-5</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 5.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 5.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-6</Chip>
|
||||
<Chip head>--bui-space-6</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 6.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 6.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-7</Chip>
|
||||
<Chip head>--bui-space-7</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 7.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 7.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-8</Chip>
|
||||
<Chip head>--bui-space-8</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 8.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 8.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-9</Chip>
|
||||
<Chip head>--bui-space-9</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 9.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 9.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-10</Chip>
|
||||
<Chip head>--bui-space-10</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 10.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 10.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-11</Chip>
|
||||
<Chip head>--bui-space-11</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 11.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 11.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-12</Chip>
|
||||
<Chip head>--bui-space-12</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 12.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 12.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-13</Chip>
|
||||
<Chip head>--bui-space-13</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 13.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 13.</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-space-14</Chip>
|
||||
<Chip head>--bui-space-14</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>Base unit (`--canon-space`) times 14.</Table.Cell>
|
||||
<Table.Cell>Base unit (`--bui-space`) times 14.</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table.Body>
|
||||
</Table.Root>
|
||||
@@ -635,7 +633,7 @@ We use a radius system to make sure that the components have a consistent look a
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-radius-1</Chip>
|
||||
<Chip head>--bui-radius-1</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The radius of the component. Default value is `0.125rem`.
|
||||
@@ -643,7 +641,7 @@ We use a radius system to make sure that the components have a consistent look a
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-radius-2</Chip>
|
||||
<Chip head>--bui-radius-2</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The radius of the component. Default value is `0.25rem`.
|
||||
@@ -651,7 +649,7 @@ We use a radius system to make sure that the components have a consistent look a
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-radius-3</Chip>
|
||||
<Chip head>--bui-radius-3</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The radius of the component. Default value is `0.5rem`.
|
||||
@@ -659,7 +657,7 @@ We use a radius system to make sure that the components have a consistent look a
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-radius-4</Chip>
|
||||
<Chip head>--bui-radius-4</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The radius of the component. Default value is `0.75rem`.
|
||||
@@ -667,7 +665,7 @@ We use a radius system to make sure that the components have a consistent look a
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-radius-5</Chip>
|
||||
<Chip head>--bui-radius-5</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The radius of the component. Default value is `1rem`.
|
||||
@@ -675,7 +673,7 @@ We use a radius system to make sure that the components have a consistent look a
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-radius-6</Chip>
|
||||
<Chip head>--bui-radius-6</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The radius of the component. Default value is `1.25rem`.
|
||||
@@ -683,7 +681,7 @@ We use a radius system to make sure that the components have a consistent look a
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Chip head>--canon-radius-full</Chip>
|
||||
<Chip head>--bui-radius-full</Chip>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
The radius of the component. Default value is `9999px`.
|
||||
@@ -3,7 +3,7 @@ import { Snippet } from '@/components/Snippet';
|
||||
|
||||
# Typography
|
||||
|
||||
Canon offers a suite of typography components designed to seamlessly align
|
||||
Backstage UI offers a suite of typography components designed to seamlessly align
|
||||
with the rest of your Backstage instance. While you can customize their
|
||||
appearance to match your brand, the underlying API remains consistent and
|
||||
unchanged. Each component is built on a responsive structure, allowing you to
|
||||
@@ -31,7 +31,7 @@ component](?path=/docs/components-heading--docs).
|
||||
|
||||
## Text
|
||||
|
||||
Canon provides four distinct text variants, each offering different font sizes
|
||||
Backstage UI provides four distinct text variants, each offering different font sizes
|
||||
carefully designed to cover the majority of use cases. These variants are
|
||||
versatile and can be paired with regular and bold of font weights. You can use
|
||||
the [Text component](?path=/docs/components-text--docs) to add text to your
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { ReactNode } from 'react';
|
||||
import { Grid, Flex, Text } from '../../../../../packages/canon';
|
||||
import { Grid, Flex, Text } from '../../../../../packages/ui';
|
||||
import { screenSizes } from '@/utils/data';
|
||||
import { Frame } from '@/components/Frame';
|
||||
import { usePlayground } from '@/utils/playground-context';
|
||||
|
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 702 B |
@@ -10,9 +10,9 @@ import '/public/theme-backstage.css';
|
||||
import '/public/theme-spotify.css';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Canon',
|
||||
title: 'Backstage UI',
|
||||
description: 'UI library for Backstage',
|
||||
metadataBase: new URL('https://canon.backstage.io'),
|
||||
metadataBase: new URL('https://ui.backstage.io'),
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
|
Before Width: | Height: | Size: 350 KiB After Width: | Height: | Size: 350 KiB |
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { CodeBlockProps } from '.';
|
||||
import { Text } from '@backstage/canon';
|
||||
import { Text } from '@backstage/ui';
|
||||
import styles from './styles.module.css';
|
||||
import parse from 'html-react-parser';
|
||||
|
||||
@@ -6,12 +6,12 @@ import { sass } from '@codemirror/lang-sass';
|
||||
import styles from './styles.module.css';
|
||||
import { usePlayground } from '@/utils/playground-context';
|
||||
import { AnimatePresence, motion } from 'motion/react';
|
||||
import { Icon } from '../../../../packages/canon';
|
||||
import { Icon } from '../../../../packages/ui';
|
||||
import { createTheme } from '@uiw/codemirror-themes';
|
||||
import { tags as t } from '@lezer/highlight';
|
||||
|
||||
const defaultTheme = `:root {
|
||||
--canon-bg-solid: #000;
|
||||
--bui-bg-solid: #000;
|
||||
}`;
|
||||
|
||||
const myTheme = createTheme({
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { Icon, Text } from '../../../../packages/canon';
|
||||
import { Icon, Text } from '../../../../packages/ui';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
interface BaseUIProps {
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { Text, Icon, icons } from '../../../../packages/canon';
|
||||
import type { IconNames } from '../../../../packages/canon';
|
||||
import { Text, Icon, icons } from '../../../../packages/ui';
|
||||
import type { IconNames } from '../../../../packages/ui';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
export const IconLibrary = () => {
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import * as Table from '../Table';
|
||||
import { Chip } from '../Chip';
|
||||
import { icons } from '../../../../packages/canon';
|
||||
import { icons } from '../../../../packages/ui';
|
||||
|
||||
// Define a more specific type for the data object
|
||||
type PropData = {
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
.logoContainer {
|
||||
padding-left: 6px;
|
||||
padding-top: 32px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.logo path {
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { components } from '@/utils/data';
|
||||
import { Checkbox } from '@backstage/canon';
|
||||
import { Checkbox } from '@backstage/ui';
|
||||
import { motion } from 'motion/react';
|
||||
import styles from './Sidebar.module.css';
|
||||
import { usePathname } from 'next/navigation';
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Select } from '@base-ui-components/react/select';
|
||||
import styles from './theme-name.module.css';
|
||||
import { Icon } from '@backstage/canon';
|
||||
import { Icon } from '@backstage/ui';
|
||||
import { usePlayground } from '@/utils/playground-context';
|
||||
|
||||
const themes = [
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { Tabs } from '@base-ui-components/react/tabs';
|
||||
import { Icon } from '@backstage/canon';
|
||||
import { Icon } from '@backstage/ui';
|
||||
import { usePlayground } from '@/utils/playground-context';
|
||||
import styles from './theme.module.css';
|
||||
|
||||
@@ -25,12 +25,12 @@ An avatar component with a fallback for initials.
|
||||
component="avatar"
|
||||
usageCode={snippetUsage}
|
||||
classNames={[
|
||||
'canon-AvatarRoot',
|
||||
'canon-AvatarRoot[data-size="small"]',
|
||||
'canon-AvatarRoot[data-size="medium"]',
|
||||
'canon-AvatarRoot[data-size="large"]',
|
||||
'canon-AvatarImage',
|
||||
'canon-AvatarFallback',
|
||||
'bui-AvatarRoot',
|
||||
'bui-AvatarRoot[data-size="small"]',
|
||||
'bui-AvatarRoot[data-size="medium"]',
|
||||
'bui-AvatarRoot[data-size="large"]',
|
||||
'bui-AvatarImage',
|
||||
'bui-AvatarFallback',
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -18,7 +18,7 @@ export const avatarPropDefs: Record<string, PropDef> = {
|
||||
...stylePropDefs,
|
||||
};
|
||||
|
||||
export const snippetUsage = `import { Avatar } from '@backstage/canon';
|
||||
export const snippetUsage = `import { Avatar } from '@backstage/ui';
|
||||
|
||||
<Avatar
|
||||
src="https://avatars.githubusercontent.com/u/1540635?v=4"
|
||||
@@ -14,7 +14,7 @@ import { ComponentInfos } from '@/components/ComponentInfos';
|
||||
|
||||
# Box
|
||||
|
||||
Box is the lowest-level component in Canon. It provides a consistent API for styling and layout.
|
||||
Box is the lowest-level component in Backstage UI. It provides a consistent API for styling and layout.
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
@@ -23,7 +23,7 @@ export const boxPropDefs: Record<string, PropDef> = {
|
||||
...stylePropDefs,
|
||||
};
|
||||
|
||||
export const snippetUsage = `import { Box } from '@backstage/canon';
|
||||
export const snippetUsage = `import { Box } from '@backstage/ui';
|
||||
|
||||
<Box />`;
|
||||
|
||||
@@ -27,7 +27,7 @@ A button component with a single icon that can be used to trigger actions.
|
||||
|
||||
<ComponentInfos
|
||||
component="button-icon"
|
||||
classNames={['canon-Button', 'canon-ButtonIcon']}
|
||||
classNames={['bui-Button', 'bui-ButtonIcon']}
|
||||
usageCode={buttonIconUsageSnippet}
|
||||
/>
|
||||
|
||||
@@ -29,7 +29,7 @@ export const buttonIconPropDefs: Record<string, PropDef> = {
|
||||
...stylePropDefs,
|
||||
};
|
||||
|
||||
export const buttonIconUsageSnippet = `import { ButtonIcon } from '@backstage/canon';
|
||||
export const buttonIconUsageSnippet = `import { ButtonIcon } from '@backstage/ui';
|
||||
|
||||
<ButtonIcon />`;
|
||||
|
||||
@@ -52,8 +52,8 @@ export const buttonIconDisabledSnippet = `<ButtonIcon icon={<Icon name="cloud" /
|
||||
|
||||
export const buttonIconResponsiveSnippet = `<ButtonIcon icon={<Icon name="cloud" />} variant={{ initial: 'primary', lg: 'secondary' }} />`;
|
||||
|
||||
export const buttonIconAsLinkSnippet = `import { ButtonLink } from '@backstage/canon';
|
||||
export const buttonIconAsLinkSnippet = `import { ButtonLink } from '@backstage/ui';
|
||||
|
||||
<ButtonLink href="https://canon.backstage.io" target="_blank">
|
||||
<ButtonLink href="https://ui.backstage.io" target="_blank">
|
||||
Button
|
||||
</ButtonLink>`;
|
||||