diff --git a/AGENTS.md b/AGENTS.md index a6faa28..9fde436 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -76,7 +76,10 @@ - Do not include React-only APIs such as `asChild`. - Do not add "Composition" sections unless they describe stable Basecoat markup. - Do not add API Reference sections for native/CSS-only components unless there is a real Basecoat API. +- Structure component docs as: title and preview, `## Usage`, optional `### HTML structure` for stable markup requirements, optional `### JavaScript API` for components with Basecoat JS methods/events/options, then `## Examples`. +- Keep `Usage` focused on the minimal working snippet and important Basecoat/upstream differences; put variants, states, RTL, and richer patterns under `Examples`. - Keep snippets minimal and aligned with current behavior. +- In HTML snippets, keep text-only elements on one line, such as `

Text

`; use multiline formatting when the element contains child elements or when line length would hurt readability. - Document intentional differences from upstream near the relevant example. ## Validation diff --git a/CHANGELOG.md b/CHANGELOG.md index e0c3474..8b84d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ ## Unreleased +## [1.0.0-beta.5] - 2026-06-22 + +### Added + +- Added a dedicated Accordion component with native `
` markup, single-item JavaScript behavior, `data-multiple`, disabled item handling, style-pack spacing, and docs. +- Added a dedicated Breadcrumb component with semantic `nav`/`ol` markup, style-pack visuals, collapsed and dropdown examples, and docs. +- Added documented Card action support with `.card-action`. +- Added Combobox clear button, popup trigger, and input-group support, with docs aligned to upstream examples. + +### Fixed + +- Fixed Combobox single selection reopening immediately after selection and filtering the reopened list to the selected value. +- Improved Combobox multiple chips and remove buttons to match style-pack button sizing more closely. + ## [1.0.0-beta.4] - 2026-06-20 ### Changed diff --git a/astro.config.mjs b/astro.config.mjs index d414331..e57339e 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,41 +1,6 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import { defineConfig } from 'astro/config'; import reallySimpleDocs from 'reallysimpledocs/astro'; -const rsdCssPath = (relativePath) => - fileURLToPath(new URL(`./node_modules/reallysimpledocs/src/css/${relativePath}`, import.meta.url)); - -function basecoatDocsStyles() { - return { - name: 'basecoat-docs-styles', - hooks: { - 'astro:config:setup': ({ config }) => { - const root = fileURLToPath(config.root); - const generatedStyles = path.join(root, '.astro', 'reallysimpledocs', 'styles.css'); - - fs.mkdirSync(path.dirname(generatedStyles), { recursive: true }); - fs.writeFileSync( - generatedStyles, - [ - '@import "tailwindcss/theme";', - '@import "tailwindcss/utilities";', - '@reference "basecoat-css/base";', - `@import ${JSON.stringify(rsdCssPath('components.css'))};`, - `@import ${JSON.stringify(rsdCssPath('sources.css'))};`, - `@import ${JSON.stringify(rsdCssPath('custom.css'))};`, - `@import ${JSON.stringify(rsdCssPath('overrides.css'))};`, - `@source ${JSON.stringify(fileURLToPath(new URL('./node_modules/reallysimpledocs/src/runtime/**/*.{astro,js,ts}', import.meta.url)))};`, - `@source ${JSON.stringify(path.join(root, 'docs/src/**/*.{md,mdx}'))};`, - '', - ].join('\n'), - ); - }, - }, - }; -} - export default defineConfig({ site: process.env.SITE_URL || 'https://basecoatui.com', vite: { @@ -51,13 +16,14 @@ export default defineConfig({ docsDir: './docs/src', routeBase: '/', style: 'vega', + css: false, components: { Head: './docs/src/site/StyleHead.astro', ContentHeader: './docs/src/site/ContentHeader.astro', }, site: { title: 'Basecoat', - subtitle: 'v1.0.0-beta.2', + subtitle: 'v1.0.0-beta.4', description: 'A components library built with Tailwind CSS that works with any web stack.', url: process.env.SITE_URL || 'https://basecoatui.com', keywords: ['components', 'component library', 'component system', 'UI', 'UI kit', 'shadcn', 'shadcn/ui', 'Tailwind CSS', 'Tailwind', 'CSS', 'HTML', 'Jinja', 'Nunjucks', 'JS', 'JavaScript', 'vanilla JS', 'vanilla JavaScript'], @@ -75,6 +41,5 @@ export default defineConfig({ }, }, }), - basecoatDocsStyles(), ], }); diff --git a/docs/src/assets/styles/style-luma.css b/docs/src/assets/styles/style-luma.css index 83b2418..02c4b0f 100644 --- a/docs/src/assets/styles/style-luma.css +++ b/docs/src/assets/styles/style-luma.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-luma.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/luma.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/luma"; diff --git a/docs/src/assets/styles/style-lyra.css b/docs/src/assets/styles/style-lyra.css index 4cc4a30..61c05be 100644 --- a/docs/src/assets/styles/style-lyra.css +++ b/docs/src/assets/styles/style-lyra.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-lyra.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/lyra.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/lyra"; diff --git a/docs/src/assets/styles/style-maia.css b/docs/src/assets/styles/style-maia.css index 4cc7cb3..9bd61f7 100644 --- a/docs/src/assets/styles/style-maia.css +++ b/docs/src/assets/styles/style-maia.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-maia.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/maia.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/maia"; diff --git a/docs/src/assets/styles/style-mira.css b/docs/src/assets/styles/style-mira.css index 04ab443..a0fce36 100644 --- a/docs/src/assets/styles/style-mira.css +++ b/docs/src/assets/styles/style-mira.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-mira.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/mira.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/mira"; diff --git a/docs/src/assets/styles/style-nova.css b/docs/src/assets/styles/style-nova.css index 0f5e3e8..15d68a9 100644 --- a/docs/src/assets/styles/style-nova.css +++ b/docs/src/assets/styles/style-nova.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-nova.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/nova.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/nova"; diff --git a/docs/src/assets/styles/style-rhea.css b/docs/src/assets/styles/style-rhea.css index faf450c..ebce78d 100644 --- a/docs/src/assets/styles/style-rhea.css +++ b/docs/src/assets/styles/style-rhea.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-rhea.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/rhea.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/rhea"; diff --git a/docs/src/assets/styles/style-sera.css b/docs/src/assets/styles/style-sera.css index b053ea7..635ca89 100644 --- a/docs/src/assets/styles/style-sera.css +++ b/docs/src/assets/styles/style-sera.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-sera.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/sera.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/sera"; diff --git a/docs/src/assets/styles/style-vega.css b/docs/src/assets/styles/style-vega.css index 50a4eca..05ad161 100644 --- a/docs/src/assets/styles/style-vega.css +++ b/docs/src/assets/styles/style-vega.css @@ -1,5 +1,8 @@ @import "tailwindcss" source(none); +@source "../../../../docs/src/**/*.{astro,html,js,md,mdx}"; +@source "../../../../src/pages/**/*.{astro,html,js}"; @reference "tailwindcss"; @reference "../../../../src/css/base/base.css"; @import "../../../../src/css/basecoat-vega.css"; -@import "../../../../node_modules/reallysimpledocs/src/css/styles/vega.css"; +@import "reallysimpledocs/css"; +@import "reallysimpledocs/css/styles/vega"; diff --git a/docs/src/components/accordion.mdx b/docs/src/components/accordion.mdx index 224e689..b35f40f 100644 --- a/docs/src/components/accordion.mdx +++ b/docs/src/components/accordion.mdx @@ -1,74 +1,322 @@ # Accordion - - There is no dedicated Accordion component in Basecoat. - +A vertically stacked set of interactive headings that each reveal a section of content. - +
-
- -

- Is it accessible? - -

-
-
-

Yes. It adheres to the WAI-ARIA design pattern.

-
-
-
- -

- Is it styled? - -

-
-
-

Yes. It comes with default styles that matches the other components' aesthetic.

-
-
-
- -

- Is it animated? - -

+
+ + What are your shipping options? +
-

Yes. It's animated by default, but you can disable it if you prefer.

+ We offer standard (5-7 days), express (2-3 days), and overnight shipping. Free shipping on international orders. +
+
+
+ + What is your return policy? + + +
+ You can return items within 30 days of delivery. Items must be unused and in their original packaging. +
+
+
+ + How can I contact customer support? + + +
+ Email support@example.com or use live chat during business hours.
-
## Usage -Basecoat styles native `
` disclosure animations. Use semantic `
` and `` markup, then add your own utility classes for the visual treatment. + + ```html -
- Is it accessible? -

Yes. It uses native disclosure semantics.

-
+ + ``` -The example above show you how to use a small script to create an accordion with a group of `
` elements. + + + +```html +
+
+ + Is it accessible? + + +
+ Yes. It uses native disclosure semantics. +
+
+
+``` + +
+ + +Basecoat uses native `
` and `` elements for disclosure semantics. The accordion JavaScript only enforces single-item behavior by default and prevents disabled items from toggling. Add `data-multiple` to the root when more than one item can be open at a time. + +### HTML structure + +
+
<section class="accordion">
+
+ Root accordion container. Add data-multiple to allow multiple open items. +
+
<details open>
+
+ Accordion item. Use the native open attribute for the default expanded item. Add aria-disabled="true" when an item should not toggle. +
+
<summary>
+
Accordion trigger. Keep the trigger text visible and add an optional trailing icon.
+
<section>
+
Accordion content. Use any semantic element that fits your content.
+
+
+
+
+
+ +### JavaScript API + +Accordion does not expose custom methods or events. Programmatically open or close an item with the native `details.open` boolean. + +```js +document.querySelector("#billing").open = true +``` + +## Examples + +### Basic + +A basic accordion that shows one item at a time. The first item is open by default. + + +
+
+ + How do I reset my password? + + +
+ Click on 'Forgot Password' on the login page, enter your email address, and we'll send you a link to reset your password. The link will expire in 24 hours. +
+
+
+ + Can I change my subscription plan? + + +
+ Yes. You can upgrade or downgrade your plan from the billing settings page. +
+
+
+ + What payment methods do you accept? + + +
+ We accept all major credit cards, PayPal, and bank transfers for annual plans. +
+
+
+
+ +### Multiple + +Use `data-multiple` to allow multiple items to be open at the same time. + + +
+
+ + Notification Settings + + +
+ Manage how you receive notifications. You can enable email alerts for updates or push notifications for mobile devices. +
+
+
+ + Privacy & Security + + +
+ Control account security, session history, and privacy preferences. +
+
+
+ + Billing & Subscription + + +
+ Review invoices, change plans, and update payment methods. +
+
+
+
+ +### Disabled + +Use `aria-disabled="true"` on an item to disable it. + + +
+
+ + Can I access my account history? + + +
+ Yes. Your account history is available from the activity page. +
+
+
+ + Premium feature information + + +
+ This item is disabled. +
+
+
+ + How do I update my email address? + + +
+ Go to account settings, update your email, then confirm the change from your inbox. +
+
+
+
+ +### Borders + +Add horizontal padding to the rows when using a bordered root. + + +
+
+ + How does billing work? + + +
+ We offer monthly and annual subscription plans. Billing is charged at the beginning of each cycle, and you can cancel anytime. All plans include automatic backups, 24/7 support, and unlimited team members. +
+
+
+ + Is my data secure? + + +
+ Data is encrypted in transit and at rest. +
+
+
+ + What integrations do you support? + + +
+ We support Slack, GitHub, Google Workspace, and webhooks. +
+
+
+
+ +### Card + +Wrap the accordion in a card for grouped support or billing content. + + +
+
+

Subscription & Billing

+

Common questions about your account, plans, payments and cancellations.

+
+
+
+
+ + What subscription plans do you offer? + + +
+ We offer three subscription tiers: Starter ($9/month), Professional ($29/month), and Enterprise ($99/month). Each plan includes increasing storage limits, API access, priority support, and team collaboration features. +
+
+
+ + How does billing work? + + +
+ Billing is charged at the beginning of each cycle. +
+
+
+ + How do I cancel my subscription? + + +
+ Cancel from billing settings. Your plan remains active until the end of the current cycle. +
+
+
+
+
+
+ +### RTL + +Accordion spacing uses logical properties. Set `dir="rtl"` on the accordion or a parent element. + + +
+
+ + كيف يمكنني إعادة تعيين كلمة المرور؟ + + +
+ انقر على 'نسيت كلمة المرور' في صفحة تسجيل الدخول، أدخل عنوان بريدك الإلكتروني، وسنرسل لك رابطا لإعادة تعيين كلمة المرور. سينتهي صلاحية الرابط خلال 24 ساعة. +
+
+
+ + هل يمكنني تغيير خطة الاشتراك الخاصة بي؟ + + +
+ نعم، يمكنك تغيير الخطة من إعدادات الفوترة. +
+
+
+ + ما هي طرق الدفع التي تقبلونها؟ + + +
+ نقبل بطاقات الائتمان الرئيسية والتحويلات البنكية. +
+
+
+
diff --git a/docs/src/components/alert-dialog.mdx b/docs/src/components/alert-dialog.mdx index 58a6ea9..b743e0c 100644 --- a/docs/src/components/alert-dialog.mdx +++ b/docs/src/components/alert-dialog.mdx @@ -1,16 +1,18 @@ # Alert Dialog +A modal dialog that interrupts the user with important content and expects a response. + - - + +
-

Are you absolutely sure?

-

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

+

Are you absolutely sure?

+

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

- - + +
@@ -18,23 +20,19 @@ ## Usage - - This component can use the `dialog()` macro for Jinja and Nunjucks. - - -Alert Dialog uses the same `.dialog` class as [Dialog](/components/dialog), but the example omits the close button and does not close on backdrop click. +Alert Dialog uses a native `` element. Omit the close button and backdrop-click handler when the user must choose an explicit action. ```html - - + +
-

Are you absolutely sure?

-

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

+

Are you absolutely sure?

+

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

- - + +
@@ -43,32 +41,122 @@ Alert Dialog uses the same `.dialog` class as [Dialog](/components/dialog), but ### HTML structure
-
<button type="button"> Optional
-
The trigger button to open the alert dialog (using the native showModal() method).
-
<dialog class="dialog" id="{ DIALOG_ID }">
+
<button type="button" onclick="dialog.showModal()"> Optional
+
Trigger button. Basecoat uses the native HTMLDialogElement.showModal() method.
+
<dialog class="alert-dialog" id="{ DIALOG_ID }">
Native modal dialog. Add aria-labelledby and aria-describedby when title and description are present.
<div>
- Wraps the content of the alert dialog. + Dialog content surface.
<header>
- Contains the header for the alert dialog: + Alert dialog header.
-
<h2>
-
The title of the alert dialog, must have an id if you use the aria-labelledby attribute on the <dialog>.
-
<p> Optional
-
The description of the alert dialog, must have an id if you use the aria-describedby attribute on the <dialog>.
+
<figure> Optional
+
Media area for an icon or image.
+
<h2 id="{ TITLE_ID }">
+
Alert dialog title. Reference it from aria-labelledby.
+
<p id="{ DESCRIPTION_ID }"> Optional
+
Alert dialog description. Reference it from aria-describedby.
-
<section> Optional
-
For the content.
-
<footer> Optional
-
Usually contains actions.
+
<footer>
+
Action area. Include a cancel action and the primary action.
+ +## Examples + +### Basic + +A basic alert dialog with a title, description, and cancel and continue buttons. + + + + +
+
+

Are you absolutely sure?

+

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

+
+
+ + +
+
+
+
+ +### Media + +Use a `
` in the header to add a media element such as an icon or image to the alert dialog. + + + + +
+
+
+ +
+

Share this project?

+

Anyone with the link will be able to view and edit this project.

+
+
+ + +
+
+
+
+ +### Destructive + +Use a destructive action button when the alert dialog confirms a destructive operation. + + + + +
+
+
+ +
+

Delete this chat?

+

This action cannot be undone. This will permanently delete the chat and remove it from your history.

+
+
+ + +
+
+
+
+ +### RTL + +Alert Dialog supports document direction. Set `dir="rtl"` on the dialog or a parent element. + + +
+ + +
+
+

هل أنت متأكد تماماً؟

+

لا يمكن التراجع عن هذا الإجراء. سيتم حذف حسابك نهائياً وإزالة بياناتك من خوادمنا.

+
+
+ + +
+
+
+
+
diff --git a/docs/src/components/alert.mdx b/docs/src/components/alert.mdx index 8ff52b0..cbd6171 100644 --- a/docs/src/components/alert.mdx +++ b/docs/src/components/alert.mdx @@ -1,28 +1,16 @@ # Alert - -
+ +
-

Success! Your changes have been saved

-
This is an alert with icon, title and description.
+

Payment successful

+
Your payment of $29.99 has been processed. A receipt has been sent to your email address.
- -

This Alert has a title and an icon. No description.

-
This is an alert with icon, title and description.
-
-
- -

Unable to process your payment.

-
-

Please verify your billing information and try again.

-
    -
  • Check your card details
  • -
  • Ensure sufficient funds
  • -
  • Verify billing address
  • -
-
+ +

New feature available

+
We've added dark mode support. You can enable it in your account settings.
@@ -33,9 +21,12 @@ Use `alert` for default styling. Add `data-variant="destructive"` for error stat ```html
- -

Success! Your changes have been saved

-
This is an alert with icon, title and description.
+ +

Heads up!

+
You can add components and dependencies to your app using the cli.
+
+ +
``` @@ -60,63 +51,53 @@ Use `alert` for default styling. Add `data-variant="destructive"` for error stat ## Examples +### Basic + +A basic alert with an icon, title and description. + + +
+ +

Account updated successfully

+
Your profile information has been saved. Changes will be reflected immediately.
+
+
+ ### Destructive - +Use `data-variant="destructive"` to create a destructive alert. + +
-

Something went wrong!

-
Your session has expired. Please log in again.
-
-
- -### No description - - -
- -

This is a very long alert title that demonstrates how the component handles extended text content and potentially wraps across multiple lines

-
-
- -### No icon - - -
-

Success! Your changes have been saved

-
This is an alert with icon, title and description.
+

Payment failed

+
Your payment could not be processed. Please check your payment method and try again.
### Action - -
-
- -

The selected emails have been marked as spam.

-
- -
-
-
- -

The selected emails have been marked as spam.

-
This is a longer alert description that demonstrates how the action stays aligned to the inline end.
-
- Badge -
-
+Use `
` to add a button or other action element to the alert. + + +
+

Dark mode is now available

+
Enable it under your profile settings to get started.
+
+ +
-### Custom Colors +### Custom colors - -
- -

Storage almost full

-
Upgrade your plan or delete unused files.
+You can customize the alert colors by adding custom classes such as `bg-amber-50 dark:bg-amber-950` to the alert. + + +
+ +

Your subscription will expire in 3 days.

+
Renew now to avoid service interruption or upgrade to a paid plan to continue using the service.
@@ -124,13 +105,17 @@ Use `alert` for default styling. Add `data-variant="destructive"` for error stat Add `dir="rtl"` to the alert or an ancestor. - -
- -

تم حفظ التغييرات

-
تم تحديث إعداداتك بنجاح.
-
- -
+ +
+
+ +

تم الدفع بنجاح

+
تمت معالجة دفعتك البالغة 29.99 دولارًا. تم إرسال إيصال إلى عنوان بريدك الإلكتروني.
+
+
+ +

ميزة جديدة متاحة

+
لقد أضفنا دعم الوضع الداكن. يمكنك تفعيله في إعدادات حسابك.
+
diff --git a/docs/src/components/avatar.mdx b/docs/src/components/avatar.mdx index 82950bf..4cf9238 100644 --- a/docs/src/components/avatar.mdx +++ b/docs/src/components/avatar.mdx @@ -9,7 +9,6 @@ @evilrabbit ER -
@@ -24,14 +23,13 @@ @evilrabbit ER - +3
## Usage -Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data-size="lg"` when needed. Put the image first and a fallback `` after it. +Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data-size="lg"` when needed. Put the image first and a fallback `` after it. Add `.avatar-badge` for a status badge or badge icon. ```html @@ -55,8 +53,8 @@ Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data-
The avatar image. Provide meaningful alt text.
<span>
Fallback initials or icon.
-
<span data-badge> Optional
-
Status badge positioned at the block-end inline-end corner.
+
<span class="avatar-badge"> Optional
+
Status badge positioned at the block-end inline-end corner. It can be empty or contain an icon.
<span data-count> Optional
@@ -71,7 +69,7 @@ Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data- - @shadcn + @shadcn CN @@ -82,36 +80,36 @@ Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data- @shadcn CN - + -### Badge With Icon +### Badge with icon - + @pranathip PP - + -### Avatar Group +### Avatar group -
+
@shadcnCN @maxleiterLR @evilrabbitER
-### Avatar Group Count +### Avatar group count -
+
@shadcnCN @maxleiterLR @evilrabbitER @@ -119,10 +117,10 @@ Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data-
-### Avatar Group With Icon +### Avatar group with icon -
+
@shadcnCN @maxleiterLR @evilrabbitER @@ -135,19 +133,32 @@ Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data- ### Sizes -
- - @shadcn - CN - - - @shadcn - CN - - - @shadcn - CN - +
+
+ + @shadcn + CN + + + @shadcn + CN + + + @shadcn + CN + +
+
+ + CN + + + CN + + + CN + +
@@ -176,21 +187,19 @@ Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data- ### RTL -
+
- @shadcn + @shadcn CN - + @evilrabbit ER - -
+
@shadcnCN @maxleiterLR @evilrabbitER - +٣
diff --git a/docs/src/components/badge.mdx b/docs/src/components/badge.mdx index a973007..b85e2a7 100644 --- a/docs/src/components/badge.mdx +++ b/docs/src/components/badge.mdx @@ -1,22 +1,11 @@ # Badge -
-
- Badge - Secondary - Destructive - Outline -
-
- - - Verified - - 8 - 99 - 20+ -
+
+ Badge + Secondary + Destructive + Outline
@@ -27,76 +16,101 @@ Add `class="badge"` to an inline element. Add `data-variant` when the badge is n Inline SVG icons are spaced automatically by the badge gap. ```html -Badge +Default Secondary Destructive Outline +Ghost ``` Badges support right-to-left layouts through native text flow. Flip directional icons explicitly. ## Examples -### Primary +### Variants + +Use `data-variant` to change the badge variant. -Primary - - -### Secondary - - -Secondary - - -### Destructive - - -Destructive - - -### Outline - - -Outline +
+ Default + Secondary + Destructive + Outline + Ghost +
### With icon +Use `data-icon="inline-start"` or `data-icon="inline-end"` on the icon for icon-aware spacing. + - - - With icon - +
+ + + Verified + + + Bookmark + + +
+
+ +### With spinner + +Use an inline loading icon with `data-icon="inline-start"` or `data-icon="inline-end"`. + + +
+ + + Deleting + + + Generating + + +
### Link - - Link - + + Open Link + -### Custom Colors +### Custom colors - - Custom - +
+ Blue + Green + Sky + Purple + Red +
### RTL -Flip directional icons explicitly. -
- نشط - - التفاصيل - - + شارة + ثانوي + مدمر + مخطط + + + متحقق + + + إشارة مرجعية + +
diff --git a/docs/src/components/breadcrumb.mdx b/docs/src/components/breadcrumb.mdx index 2d398b6..4af270d 100644 --- a/docs/src/components/breadcrumb.mdx +++ b/docs/src/components/breadcrumb.mdx @@ -1,62 +1,162 @@ # Breadcrumb - - There is no dedicated Breadcrumb component in Basecoat. - - -
    -
  1. - Home -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
  9. - Components -
  10. -
  11. - -
  12. -
  13. - Breadcrumb -
  14. -
+
## Usage -You can style an ordered list of links combined with chevron icons as show below. The example above demonstrates a more complex use case using the [Dropdown Menu](/components/dropdown-menu) component. +Use a navigation landmark with an ordered list. Mark the current page with `aria-current="page"`. ```html -
    -
  1. - Home -
  2. -
  3. - -
  4. -
  5. - Components -
  6. -
+ ``` + +## HTML structure + +- `nav.breadcrumb` is the root landmark and should include `aria-label="Breadcrumb"`. +- `ol` contains the breadcrumb items in hierarchy order. +- `li > a` represents navigable ancestors. +- `li[aria-hidden="true"]` represents a visual separator. +- `[aria-current="page"]` represents the current page. +- `li > span[aria-hidden="true"]` represents a collapsed ellipsis. + +## Examples + +### Basic + + + + + +### Custom separator + + + + + +### Dropdown + + + + + +### Collapsed + + + + + +### RTL + + + + diff --git a/docs/src/components/button-group.mdx b/docs/src/components/button-group.mdx index 2994fa8..8de352c 100644 --- a/docs/src/components/button-group.mdx +++ b/docs/src/components/button-group.mdx @@ -70,7 +70,7 @@ Use `data-orientation="vertical"` to stack items. Use `
` Use `data-orientation="vertical"` to stack buttons vertically. -
+
@@ -113,6 +113,8 @@ Use `data-orientation="vertical"` to stack buttons vertically. ### Nested +Nest `button-group` components to keep controls joined within each group while adding spacing between groups. +
@@ -124,10 +126,10 @@ Use `data-orientation="vertical"` to stack buttons vertically.
@@ -139,58 +141,60 @@ Use `
` to visually divide buttons within a group.
- +
- +
### Split -Use a separator to create a split action with a primary action and a secondary menu trigger. +Use a separator to create a split action. -
- +
+
- - +
### Input -
+
-
-### Input Group +### Input group -
- $ - - USD +
+
+ +
+
+
+ +
+ +
+
+
-### Dropdown Menu +### Dropdown menu
@@ -240,7 +244,7 @@ Use a separator to create a split action with a primary action and a secondary m ### Select -
+
- - + +

Copilot will open a pull request for review.

@@ -304,12 +308,21 @@ Add `dir="rtl"` to the group or an ancestor. Flip directional icons explicitly.
- - - +
+ +
+
+ + +
+
+ + +
diff --git a/docs/src/components/button.mdx b/docs/src/components/button.mdx index 5b637b8..cdce041 100644 --- a/docs/src/components/button.mdx +++ b/docs/src/components/button.mdx @@ -1,7 +1,12 @@ # Button - +
+ + +
## Usage @@ -66,10 +71,22 @@ Use `data-size` to change the size of the button.
- - - - + + + + + + + +
@@ -113,16 +130,16 @@ Use `data-size` to change the size of the button. -### With Icon +### With icon Use `data-icon="inline-start"` or `data-icon="inline-end"` on inline icons to match upstream icon-aware spacing. - @@ -130,12 +147,11 @@ Use `data-icon="inline-start"` or `data-icon="inline-end"` on inline icons to ma ### Rounded -Use standard Tailwind classes to override the button radius. +Use the `rounded-full` class to make the button rounded. - @@ -144,31 +160,66 @@ Use standard Tailwind classes to override the button radius.
-
-### Button Group +### Button group To group related buttons, use the [Button Group](/components/button-group/) component.
+
- +
@@ -185,8 +236,11 @@ Add `dir="rtl"` to the button or an ancestor. Flip directional icons explicitly. إرسال +
diff --git a/docs/src/components/card.mdx b/docs/src/components/card.mdx index 97a49aa..6314041 100644 --- a/docs/src/components/card.mdx +++ b/docs/src/components/card.mdx @@ -1,30 +1,32 @@ # Card -
+

Login to your account

-

Enter your details below to login to your account

+

Enter your email below to login to your account

+
+ +
- - + +
-
- + - +
-
+
-

Don't have an account? Sign up

@@ -36,6 +38,7 @@

Card Title

Card Description

+
Card Action

Card Content

@@ -46,7 +49,7 @@
``` -### HTML structure +## HTML structure
<div class="card">
@@ -55,18 +58,20 @@
<header>
- The header of the card. + The card header.
-
<h2>
-
The title of the card.
+
<h2> or <h3>
+
The card title.
<p> Optional
-
The description of the card.
+
The card description.
+
<div class="card-action"> Optional
+
Action or metadata placed in the top-right of the header. Use <menu class="card-action"> when the content is a list of commands.
<section>
-
The content of the card.
+
The main card content.
<footer> Optional
-
The footer of the card.
+
Footer actions or secondary content at the bottom of the card.
@@ -75,103 +80,78 @@ ### Size - +Use `data-size="sm"` to set the size of the card to small. The small size variant uses smaller spacing. + +

Small Card

-

A compact card with reduced spacing.

+

This card uses the small size variant.

+
+ +
-

Use data-size="sm" for denser layouts.

+

The card component supports a size attribute that can be set to sm for a more compact appearance.

-### With content and footer +### Image - +Add an image before the card header to create a card with an image. + +
+ Event cover
-

Meeting Notes

-

Transcript from the meeting with the client.

-
-
-

Client requested dashboard redesign with focus on mobile responsiveness.

-
    -
  1. New analytics widgets for daily/weekly metrics
  2. -
  3. Simplified navigation menu
  4. -
  5. Dark mode support
  6. -
  7. Timeline: 6 weeks
  8. -
  9. Follow-up meeting scheduled for next Tuesday
  10. -
-
-
-
- @hunvreus - @shadcn - @adamwathan +

Design systems meetup

+

A practical talk on component APIs, accessibility, and shipping faster.

+
+ Featured
-
-
-
- -### With image - - -
-
-

Is this an image?

-

This is a card with an image.

-
- Photo by Drew Beamer -
-
- - - 1 - - - - 2 - - - - 350m² - - - $135,000 - +
+
-### RTL +## RTL Add `dir="rtl"` to the card or an ancestor. - +
-

إعدادات الحساب

-

راجع إعدادات الأمان والإشعارات.

+

تسجيل الدخول إلى حسابك

+

أدخل بريدك الإلكتروني أدناه لتسجيل الدخول إلى حسابك

+
+ +
-

يمكنك تعديل هذه الإعدادات في أي وقت.

+
+
+ + +
+
+
+ + نسيت كلمة المرور؟ +
+ +
+
-
- +
+ +
diff --git a/docs/src/components/chart.mdx b/docs/src/components/chart.mdx index 2e0cb23..f577c3d 100644 --- a/docs/src/components/chart.mdx +++ b/docs/src/components/chart.mdx @@ -149,37 +149,37 @@ window.basecoat.chart("#custom-chart", { ## Examples -### Bar Chart - Multiple +### Bar chart - multiple -### Line Chart - Linear +### Line chart - linear -### Line Chart - Step +### Line chart - step -### Bar Chart - Stacked +### Bar chart - stacked -### Pie Chart - Donut +### Pie chart - donut -### Radar Chart +### Radar chart diff --git a/docs/src/components/checkbox.mdx b/docs/src/components/checkbox.mdx index 4f11817..ccb167b 100644 --- a/docs/src/components/checkbox.mdx +++ b/docs/src/components/checkbox.mdx @@ -1,9 +1,31 @@ # Checkbox -
- - +
+
+ + +
+
+ +
+ +

By clicking this checkbox, you agree to the terms.

+
+
+
+ + +
+
@@ -19,65 +41,83 @@ Add `class="input"` to checkbox inputs. Pair it with [Field](/components/field) ### Basic +Pair the checkbox with `field` and a native `

لا توجد مشاريع بعد

-

ابدأ بإنشاء مشروعك الأول.

+

لم تقم بإنشاء أي مشاريع بعد. ابدأ بإنشاء مشروعك الأول.

diff --git a/docs/src/components/field.mdx b/docs/src/components/field.mdx index f3a7524..198371c 100644 --- a/docs/src/components/field.mdx +++ b/docs/src/components/field.mdx @@ -1,7 +1,7 @@ # Field - -
+ +
Payment Method @@ -186,23 +186,6 @@ Use `class="field"` for one control and `class="fieldset"` for related controls.

Set your maximum budget (up to $800).

-
### Fieldset @@ -304,7 +287,7 @@ Use `class="field"` for one control and `class="fieldset"` for related controls. -### Choice Card +### Choice card Wrap a `.field` inside a `