diff --git a/apps/www/src/components/docs/search.tsx b/apps/www/src/components/docs/search.tsx index e66779c03..d3c644915 100644 --- a/apps/www/src/components/docs/search.tsx +++ b/apps/www/src/components/docs/search.tsx @@ -231,7 +231,7 @@ export default function DocsSearch({ pageTree }: { pageTree: Root }) { ) : ( } diff --git a/apps/www/src/content/docs/(overview)/upgrading.mdx b/apps/www/src/content/docs/(overview)/upgrading.mdx index 82f756aad..f61d6da0f 100644 --- a/apps/www/src/content/docs/(overview)/upgrading.mdx +++ b/apps/www/src/content/docs/(overview)/upgrading.mdx @@ -7,6 +7,43 @@ One section per release, newest first, with only the changes that need action from you. The full record of every release, features and fixes included, is on [GitHub releases](https://github.com/raystack/apsara/releases). +## Unreleased: variant and enum values are renamed + +Prop values are kebab-case, and a variant uses the same name as on other +components. `Grid` takes `align` and `justify`, as `Flex` does. + +| Component | Before | After | +|---|---|---| +| `Input`, `TextArea`, `Search` `variant` | `default`, `borderless` | `outline`, `text` | +| `FilterChip` `variant` | `default`, `text` | `outline`, `text` | +| `Chip` `variant` | `outline`, `filled` | `outline`, `solid` | +| `EmptyState` `variant` | `empty1`, `empty2` | `compact`, `page` | +| `Grid` props | `alignItems`, `justifyContent` | `align`, `justify` | +| `Grid` `justify` and `alignContent` values | `space-between`, `space-around`, `space-evenly` | `between`, `around`, `evenly` | +| `CalendarPreview` scale | `halfYear` | `half-year` | + +```tsx +// Before + +Label +} heading="No projects" /> + + + +// After + +Label +} heading="No projects" /> + + +``` + +The scale name changes in `scales`, `scale`, `defaultScale`, `onScaleChange`, +the `scale` field of a value, and the `data-scale` attribute. `scales` drops a +name it does not know, so `'halfYear'` hides the half-year view without an +error. Convert stored values that hold `scale: 'halfYear'`, and update CSS that +selects `[data-scale="halfYear"]`. + ## Unreleased: date filters compare whole days `DataView`, `DataTable` and `FilterChip` read and compare dates as calendar diff --git a/apps/www/src/content/docs/ai-elements/prompt-input/index.mdx b/apps/www/src/content/docs/ai-elements/prompt-input/index.mdx index 5e1089aac..cf74b20f5 100644 --- a/apps/www/src/content/docs/ai-elements/prompt-input/index.mdx +++ b/apps/www/src/content/docs/ai-elements/prompt-input/index.mdx @@ -215,7 +215,7 @@ arrive with their ids and your own `data` next to the text: ### Textarea -The text field, built on `TextArea variant="borderless"`. It grows with its +The text field, built on `TextArea variant="text"`. It grows with its content up to a max-height cap (override with `--prompt-input-textarea-max-height`), then scrolls. @@ -308,7 +308,7 @@ Every rendered part carries a stable `data-slot` attribute for [styling and test usual. - Each chip has an accessible name, like `"mention: DataTable"`. - The composer frame carries the focus treatment, so the border tints when a - child has visible focus (`:has(:focus-visible)`), while the borderless + child has visible focus (`:has(:focus-visible)`), while the `text` variant input suppresses its own duplicate focus ring. - Click-to-focus runs on `mousedown` and cancels the default focus shift, so focus never leaves the input and back again, a round trip that would dismiss diff --git a/apps/www/src/content/docs/components/calendar-preview/demo.ts b/apps/www/src/content/docs/components/calendar-preview/demo.ts index e7b290e2a..a4ee93dfd 100644 --- a/apps/www/src/content/docs/components/calendar-preview/demo.ts +++ b/apps/www/src/content/docs/components/calendar-preview/demo.ts @@ -173,7 +173,7 @@ export const periodsDemo = { { name: 'All scales', code: ` @@ -183,7 +183,7 @@ export const periodsDemo = { { name: 'In a popover', code: ` @@ -218,7 +218,7 @@ export const periodsDemo = { { name: 'Trailing value', code: `function CalendarPreviewTrailingExample() { - const scales = ['day', 'month', 'quarter', 'halfYear', 'year']; + const scales = ['day', 'month', 'quarter', 'half-year', 'year']; const [start, setStart] = React.useState({ date: '2026-07-01', scale: 'quarter' }); const [end, setEnd] = React.useState({ date: '2026-09-30', scale: 'quarter' }); @@ -294,7 +294,7 @@ export const limitsDemo = { { name: 'Bounded periods', code: ` Outline - Filled + Solid ` }; @@ -71,11 +71,11 @@ export const colorDemo = { Warning - Neutral - Accent - Danger - Success - Warning + Neutral + Accent + Danger + Success + Warning ` }; @@ -86,7 +86,7 @@ export const dismissableDemo = { alert('dismissed')} aria-label="Dismissible chip">Dismissable Chip alert('dismissed')} aria-label="Dismissible chip">Dismissable Chip - alert('dismissed')} aria-label="Dismissible chip">Dismissable Chip + alert('dismissed')} aria-label="Dismissible chip">Dismissable Chip ` }; @@ -98,7 +98,7 @@ export const iconsDemo = { code: `
Add Item - Selected + Selected
` }, { @@ -106,7 +106,7 @@ export const iconsDemo = { code: `
Next - Open + Open
` }, { @@ -114,7 +114,7 @@ export const iconsDemo = { code: `
Download - Edit Profile + Edit Profile
` } ] diff --git a/apps/www/src/content/docs/components/chip/index.mdx b/apps/www/src/content/docs/components/chip/index.mdx index dfc3c1bb4..874d21ff7 100644 --- a/apps/www/src/content/docs/components/chip/index.mdx +++ b/apps/www/src/content/docs/components/chip/index.mdx @@ -31,7 +31,7 @@ Appearance first, meaning variant, size and color, then the two things a chip ca ### Variant -Choose between outline and filled variants to match your design needs. +Choose between `outline` and `solid` variants. `solid` fills the chip with the base background. diff --git a/apps/www/src/content/docs/components/chip/props.ts b/apps/www/src/content/docs/components/chip/props.ts index 09aff3b13..0cfdf14d0 100644 --- a/apps/www/src/content/docs/components/chip/props.ts +++ b/apps/www/src/content/docs/components/chip/props.ts @@ -3,7 +3,7 @@ export interface ChipProps { * Visual style variant * @defaultValue "outline" */ - variant?: 'outline' | 'filled'; + variant?: 'outline' | 'solid'; /** * Size of the chip diff --git a/apps/www/src/content/docs/components/empty-state/demo.ts b/apps/www/src/content/docs/components/empty-state/demo.ts index 63d430a17..0954cdd9e 100644 --- a/apps/www/src/content/docs/components/empty-state/demo.ts +++ b/apps/www/src/content/docs/components/empty-state/demo.ts @@ -22,8 +22,8 @@ export const playground = { controls: { variant: { type: 'select', - initialValue: 'empty1', - options: ['empty1', 'empty2'] + defaultValue: 'compact', + options: ['compact', 'page'] }, heading: { type: 'text', @@ -57,7 +57,7 @@ export const variantsDemo = { code: ` } heading="No notifications yet" subHeading="When you have notifications, they will appear here" @@ -69,7 +69,7 @@ export const variantsDemo = { } /> } heading="Organization" subHeading="An organization in Aurora is a shared workspace where teams manage projects, AOIs, and image orders. It streamlines collaboration, analysis, and decision-making across industries." diff --git a/apps/www/src/content/docs/components/empty-state/index.mdx b/apps/www/src/content/docs/components/empty-state/index.mdx index f8986d236..d26845d48 100644 --- a/apps/www/src/content/docs/components/empty-state/index.mdx +++ b/apps/www/src/content/docs/components/empty-state/index.mdx @@ -14,7 +14,7 @@ import { playground, variantsDemo, `EmptyState` fills a view that has no content yet: an empty inbox, zero search results, a feature that needs setup. It pairs a required `icon` with an optional `heading`, `subHeading`, and up to two action slots (`primaryAction`, `secondaryAction`) so users always have a next step. -Use `empty1`, the default, for compact centered placeholders inside panels and lists. Use `empty2` for full-page states, which left-align the content and put the actions in a side-by-side row. +Use `compact`, the default, for centered placeholders inside panels and lists. Use `page` for full-page states, which left-align the content and put the actions in a side-by-side row. ## Anatomy @@ -33,7 +33,7 @@ Pick the variant that suits the space, then fill in the icon, the message and up ### Variants -`empty1` (the default) centers everything and stacks the actions vertically, which suits panels, tables, and lists. `empty2` left-aligns the content, uses a larger icon, and places both actions in a row, which suits full-page states. +`compact` (the default) centers everything and stacks the actions vertically, which suits panels, tables, and lists. `page` left-aligns the content, uses a larger icon, and places both actions in a row, which suits full-page states. @@ -61,7 +61,7 @@ Every rendered part carries a stable `data-slot` attribute for [styling and test | `empty-state-content` | Wrapper around the heading and subheading | | `empty-state-heading` | The heading text (when `heading` is set) | | `empty-state-subheading` | The subheading text (when `subHeading` is set) | -| `empty-state-actions` | Wrapper around the action buttons (`empty2` variant only) | +| `empty-state-actions` | Wrapper around the action buttons (`page` variant only) | ## Accessibility diff --git a/apps/www/src/content/docs/components/empty-state/props.ts b/apps/www/src/content/docs/components/empty-state/props.ts index 5bbab566a..eab9329b1 100644 --- a/apps/www/src/content/docs/components/empty-state/props.ts +++ b/apps/www/src/content/docs/components/empty-state/props.ts @@ -14,8 +14,8 @@ export interface EmptyStateProps { /** Secondary action to show in empty state like button or link */ secondaryAction?: React.ReactNode; - /** Visual style variant of the empty state - * @default "empty1" + /** Layout of the empty state + * @default "compact" */ - variant?: 'empty1' | 'empty2'; + variant?: 'compact' | 'page'; } diff --git a/apps/www/src/content/docs/components/filter-chip/demo.ts b/apps/www/src/content/docs/components/filter-chip/demo.ts index 3bd964aba..9dda3768e 100644 --- a/apps/www/src/content/docs/components/filter-chip/demo.ts +++ b/apps/www/src/content/docs/components/filter-chip/demo.ts @@ -29,8 +29,8 @@ export const playground = { }, variant: { type: 'select', - options: ['default', 'text'], - defaultValue: 'default' + options: ['outline', 'text'], + defaultValue: 'outline' }, label: { type: 'text', diff --git a/apps/www/src/content/docs/components/filter-chip/props.ts b/apps/www/src/content/docs/components/filter-chip/props.ts index 161f1f715..c71fd2f52 100644 --- a/apps/www/src/content/docs/components/filter-chip/props.ts +++ b/apps/www/src/content/docs/components/filter-chip/props.ts @@ -16,9 +16,9 @@ export interface FilterChipProps { columnType?: 'select' | 'multiselect' | 'date' | 'string' | 'number'; /** Filterchip variant - * @default "default" + * @default "outline" */ - variant?: 'default' | 'text'; + variant?: 'outline' | 'text'; /** Array of options for the select and multiselect type inputs */ options?: { label: string; value: string | number | boolean }[]; diff --git a/apps/www/src/content/docs/components/grid/demo.ts b/apps/www/src/content/docs/components/grid/demo.ts index 6f7eb6644..ddec9ea4d 100644 --- a/apps/www/src/content/docs/components/grid/demo.ts +++ b/apps/www/src/content/docs/components/grid/demo.ts @@ -41,7 +41,7 @@ export const playground = { options: ['start', 'end', 'center', 'stretch'], initialValue: 'center' }, - alignItems: { + align: { type: 'select', options: ['start', 'end', 'center', 'stretch'], initialValue: 'center' @@ -94,7 +94,7 @@ export const areasDemo = { export const alignmentDemo = { type: 'code', code: ` - + centered alignSelf start alignSelf end diff --git a/apps/www/src/content/docs/components/grid/index.mdx b/apps/www/src/content/docs/components/grid/index.mdx index 48d9516d4..76cff8b36 100644 --- a/apps/www/src/content/docs/components/grid/index.mdx +++ b/apps/www/src/content/docs/components/grid/index.mdx @@ -60,7 +60,7 @@ Reach for Grid when the layout is two-dimensional: rows *and* columns that have ### Alignment -`justifyItems` and `alignItems` position every item inside its own cell. `justifySelf` and `alignSelf` override that for one item. +`justifyItems` and `align` position every item inside its own cell. `justifySelf` and `alignSelf` override that for one item. diff --git a/apps/www/src/content/docs/components/grid/props.ts b/apps/www/src/content/docs/components/grid/props.ts index f909e3c5b..297b2451e 100644 --- a/apps/www/src/content/docs/components/grid/props.ts +++ b/apps/www/src/content/docs/components/grid/props.ts @@ -111,21 +111,21 @@ export interface GridProps { justifyItems?: 'start' | 'end' | 'center' | 'stretch'; /** - * Aligns grid items along the block (column) axis. + * Aligns grid items along the block (column) axis. Sets `align-items`. */ - alignItems?: 'start' | 'end' | 'center' | 'stretch'; + align?: 'start' | 'end' | 'center' | 'stretch'; /** - * Aligns the entire grid along the inline (row) axis. + * Aligns the entire grid along the inline (row) axis. Sets `justify-content`. */ - justifyContent?: + justify?: | 'start' | 'end' | 'center' | 'stretch' - | 'space-around' - | 'space-between' - | 'space-evenly'; + | 'between' + | 'around' + | 'evenly'; /** * Aligns the entire grid along the block (column) axis. @@ -135,9 +135,9 @@ export interface GridProps { | 'end' | 'center' | 'stretch' - | 'space-around' - | 'space-between' - | 'space-evenly'; + | 'between' + | 'around' + | 'evenly'; /** * Renders the grid as an inline element instead of a block element. diff --git a/apps/www/src/content/docs/components/input/props.ts b/apps/www/src/content/docs/components/input/props.ts index cd5a5dba4..95658ca34 100644 --- a/apps/www/src/content/docs/components/input/props.ts +++ b/apps/www/src/content/docs/components/input/props.ts @@ -33,9 +33,9 @@ export interface InputProps { /** * Visual variant of the input. - * @defaultValue "default" + * @defaultValue "outline" */ - variant?: 'default' | 'borderless'; + variant?: 'outline' | 'text'; /** Ref to the outer container div. */ containerRef?: React.RefObject; diff --git a/apps/www/src/content/docs/components/search/props.ts b/apps/www/src/content/docs/components/search/props.ts index 91fff7996..14e9b88bc 100644 --- a/apps/www/src/content/docs/components/search/props.ts +++ b/apps/www/src/content/docs/components/search/props.ts @@ -11,6 +11,12 @@ export interface SearchProps { /** Whether the search input is disabled. */ disabled?: boolean; + /** + * Visual variant of the search input. + * @default outline + */ + variant?: 'outline' | 'text'; + /** * Icon before the input. Pass `null` to hide it. * @default diff --git a/apps/www/src/content/docs/components/textarea/demo.ts b/apps/www/src/content/docs/components/textarea/demo.ts index c0db36fab..129d8ecf0 100644 --- a/apps/www/src/content/docs/components/textarea/demo.ts +++ b/apps/www/src/content/docs/components/textarea/demo.ts @@ -21,8 +21,8 @@ export const playground = { }, variant: { type: 'select', - options: ['default', 'borderless'], - defaultValue: 'default' + options: ['outline', 'text'], + defaultValue: 'outline' }, rows: { type: 'number', @@ -95,8 +95,8 @@ export const sizeDemo = { export const variantDemo = { type: 'code', code: ` -