From eb932c5b8749286600d1bc0a2b9623aa9f38f050 Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Mon, 12 Oct 2026 13:01:50 +0530 Subject: [PATCH 1/8] fix: [docs] sync props tables with components --- .../content/docs/components/calendar/props.ts | 5 ++++ .../src/content/docs/components/chip/props.ts | 3 +++ .../docs/components/code-block/index.mdx | 2 +- .../docs/components/code-block/props.ts | 22 +++++++++++++--- .../content/docs/components/field/props.ts | 11 ++++++++ .../docs/components/floating-actions/props.ts | 6 +++++ .../docs/components/indicator/index.mdx | 2 +- .../docs/components/indicator/props.ts | 2 +- .../src/content/docs/components/list/demo.ts | 26 +++---------------- .../content/docs/components/list/index.mdx | 7 ----- .../src/content/docs/components/list/props.ts | 9 +++---- .../content/docs/components/select/props.ts | 3 +++ .../content/docs/components/toast/props.ts | 5 ++++ 13 files changed, 62 insertions(+), 41 deletions(-) diff --git a/apps/www/src/content/docs/components/calendar/props.ts b/apps/www/src/content/docs/components/calendar/props.ts index e3f047615..6d76f01ec 100644 --- a/apps/www/src/content/docs/components/calendar/props.ts +++ b/apps/www/src/content/docs/components/calendar/props.ts @@ -137,6 +137,11 @@ export interface CalendarProps { } export interface RangePickerProps { + /** + * Additional CSS class names for the group that holds the start and end inputs. + */ + pickerGroupClassName?: string; + /** * Format for displaying the date. Supports various formats: * - With slashes: "DD/MM/YYYY", "MM/DD/YYYY", "YYYY/MM/DD" diff --git a/apps/www/src/content/docs/components/chip/props.ts b/apps/www/src/content/docs/components/chip/props.ts index 09aff3b13..13ca6d5c9 100644 --- a/apps/www/src/content/docs/components/chip/props.ts +++ b/apps/www/src/content/docs/components/chip/props.ts @@ -31,6 +31,9 @@ export interface ChipProps { /** Callback function when dismiss button is clicked */ onDismiss?: () => void; + /** Disables the chip and its dismiss button */ + disabled?: boolean; + /** Content to display inside the chip */ children?: React.ReactNode; diff --git a/apps/www/src/content/docs/components/code-block/index.mdx b/apps/www/src/content/docs/components/code-block/index.mdx index 9a044bdd4..95ca9acb1 100644 --- a/apps/www/src/content/docs/components/code-block/index.mdx +++ b/apps/www/src/content/docs/components/code-block/index.mdx @@ -111,7 +111,7 @@ Renders a text label displayed in the header. ### LanguageSelect -Renders a language selection dropdown container. +Renders a language selection dropdown container. It accepts the props of a single-selection `Select` root. diff --git a/apps/www/src/content/docs/components/code-block/props.ts b/apps/www/src/content/docs/components/code-block/props.ts index 397d4996d..6d4928bef 100644 --- a/apps/www/src/content/docs/components/code-block/props.ts +++ b/apps/www/src/content/docs/components/code-block/props.ts @@ -119,12 +119,28 @@ export interface CodeBlockLanguageSelectProps { /** * Available languages for selection */ - children: ReactNode; + children?: ReactNode; /** - * Additional CSS class name + * The controlled open state of the dropdown */ - className?: string; + open?: boolean; + + /** + * The initial open state when uncontrolled + * @defaultValue false + */ + defaultOpen?: boolean; + + /** + * Callback fired when the open state changes + */ + onOpenChange?: (open: boolean) => void; + + /** + * Prevents the user from changing the language + */ + disabled?: boolean; } export interface CodeBlockLanguageSelectTriggerProps { diff --git a/apps/www/src/content/docs/components/field/props.ts b/apps/www/src/content/docs/components/field/props.ts index a7b4c0974..43a34f554 100644 --- a/apps/www/src/content/docs/components/field/props.ts +++ b/apps/www/src/content/docs/components/field/props.ts @@ -52,6 +52,17 @@ export interface FieldLabelProps { */ required?: boolean; + /** + * Text rendered next to the label when `required={false}`. + * @defaultValue "(optional)" + */ + optionalText?: string; + + /** + * Text rendered next to the label when `required={true}`. No indicator is rendered when it is omitted. + */ + requiredText?: string; + /** Additional CSS class names. */ className?: string; } diff --git a/apps/www/src/content/docs/components/floating-actions/props.ts b/apps/www/src/content/docs/components/floating-actions/props.ts index 630583412..e1f1f7af8 100644 --- a/apps/www/src/content/docs/components/floating-actions/props.ts +++ b/apps/www/src/content/docs/components/floating-actions/props.ts @@ -47,6 +47,12 @@ export interface FloatingActionsSeparatorProps { */ size?: 'small' | 'half' | 'full'; + /** + * Hides the separator from assistive technology. + * @defaultValue false + */ + decorative?: boolean; + /** Additional CSS class names. */ className?: string; diff --git a/apps/www/src/content/docs/components/indicator/index.mdx b/apps/www/src/content/docs/components/indicator/index.mdx index 6f2620720..8518ee8e4 100644 --- a/apps/www/src/content/docs/components/indicator/index.mdx +++ b/apps/www/src/content/docs/components/indicator/index.mdx @@ -76,7 +76,7 @@ The Indicator component includes several accessibility features: - Uses `role="status"` to indicate its purpose to screen readers - Provides appropriate `aria-label` based on the content: - - Uses custom `ariaLabel` prop if provided + - Uses custom `aria-label` prop if provided - Falls back to the label text if available - Uses a default "indicator" if neither is provided - Hides decorative dot from screen readers when no label is present diff --git a/apps/www/src/content/docs/components/indicator/props.ts b/apps/www/src/content/docs/components/indicator/props.ts index 96c6f13b3..df10960e3 100644 --- a/apps/www/src/content/docs/components/indicator/props.ts +++ b/apps/www/src/content/docs/components/indicator/props.ts @@ -15,7 +15,7 @@ export interface IndicatorProps { pulse?: boolean; /** Optional custom description for screen readers */ - ariaLabel?: string; + 'aria-label'?: string; /** The content to show the indicator on */ children: React.ReactNode; diff --git a/apps/www/src/content/docs/components/list/demo.ts b/apps/www/src/content/docs/components/list/demo.ts index 638f9e5a1..23075ad44 100644 --- a/apps/www/src/content/docs/components/list/demo.ts +++ b/apps/www/src/content/docs/components/list/demo.ts @@ -6,15 +6,15 @@ export const preview = { User Information - + Status Active - + Type Premium Account - + Created April 24, 2024 @@ -27,28 +27,10 @@ export const basicDemo = { code: ` User Information - + Status Active ; ` }; - -export const alignDemo = { - type: 'code', - code: ` - - Deployment - - Status - Succeeded - - - Notes - - Rolled out to three regions. Two nodes were drained and replaced during the rollout. - - -` -}; diff --git a/apps/www/src/content/docs/components/list/index.mdx b/apps/www/src/content/docs/components/list/index.mdx index 96ef76fdf..361cd4e3f 100644 --- a/apps/www/src/content/docs/components/list/index.mdx +++ b/apps/www/src/content/docs/components/list/index.mdx @@ -5,7 +5,6 @@ source: packages/react/components/list --- import { basicDemo, preview, - alignDemo, } from "./demo.ts"; @@ -36,12 +35,6 @@ A `Header` labels the group, then each `Item` pairs a `Label` with its `Value`. -### Aligning rows - -`align` on an `Item` controls how the label sits against its value. `center` suits one-line values; switch to `start` when the value wraps, so the label stays level with the first line rather than floating in the middle. - - - ## API Reference Each item holds an aligned label and value, with an optional header above them. diff --git a/apps/www/src/content/docs/components/list/props.ts b/apps/www/src/content/docs/components/list/props.ts index 7fd35a1eb..ab013dae7 100644 --- a/apps/www/src/content/docs/components/list/props.ts +++ b/apps/www/src/content/docs/components/list/props.ts @@ -1,4 +1,7 @@ export interface ListRootProps { + /** List items and an optional header. */ + children: React.ReactNode; + /** Additional CSS class names. */ className?: string; } @@ -18,12 +21,6 @@ export interface ListHeaderProps { } export interface ListItemProps { - /** - * Alignment of the item content. - * @default "start" - */ - align?: 'start' | 'center' | 'end'; - /** Content to be displayed in the item. */ children?: React.ReactNode; diff --git a/apps/www/src/content/docs/components/select/props.ts b/apps/www/src/content/docs/components/select/props.ts index 80ddce754..1a2006ecb 100644 --- a/apps/www/src/content/docs/components/select/props.ts +++ b/apps/www/src/content/docs/components/select/props.ts @@ -93,6 +93,9 @@ export interface SelectItemProps { /** The value of the item. */ value: string; + /** Icon rendered before the item text. */ + leadingIcon?: React.ReactNode; + /** Additional CSS class names. */ className?: string; } diff --git a/apps/www/src/content/docs/components/toast/props.ts b/apps/www/src/content/docs/components/toast/props.ts index ebf6970a0..67c862cf9 100644 --- a/apps/www/src/content/docs/components/toast/props.ts +++ b/apps/www/src/content/docs/components/toast/props.ts @@ -23,6 +23,11 @@ export interface ToastProviderProps { */ timeout?: number; + /** + * Toast manager instance. Defaults to the exported `toastManager`. Pass one from `Toast.createToastManager()` to scope toasts to this provider. + */ + toastManager?: CreateToastManagerReturn; + children?: React.ReactNode; } From d0e1a52d5fd112d3d27e7f51a56b9d627bfe6ed5 Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Wed, 14 Oct 2026 15:15:53 +0530 Subject: [PATCH 2/8] fix: [docs] list the props each component declares --- .../docs/components/breadcrumb/props.ts | 8 ++--- .../content/docs/components/callout/props.ts | 3 ++ .../docs/components/icon-button/props.ts | 3 ++ .../content/docs/components/search/props.ts | 6 ++++ .../content/docs/components/select/props.ts | 35 +++++++++++++++++++ apps/www/src/content/docs/dataview/props.ts | 33 ++++++++++++++++- .../src/content/docs/theme/overview/props.ts | 16 +++++++++ .../components/code-block/code-block-root.tsx | 1 + .../data-view/components/filters.tsx | 1 + .../react/components/indicator/indicator.tsx | 1 + packages/react/components/menu/menu-root.tsx | 3 ++ 11 files changed, 105 insertions(+), 5 deletions(-) diff --git a/apps/www/src/content/docs/components/breadcrumb/props.ts b/apps/www/src/content/docs/components/breadcrumb/props.ts index eba73e64f..3f271581b 100644 --- a/apps/www/src/content/docs/components/breadcrumb/props.ts +++ b/apps/www/src/content/docs/components/breadcrumb/props.ts @@ -1,16 +1,16 @@ import { ReactElement, ReactNode } from 'react'; export interface BreadcrumbItem { - /** Text to display for the item */ - label: string; + /** Content of the item, usually its text */ + children?: ReactNode; /** URL for the item link */ href?: string; - /** Optional icon element to display before the label */ + /** Optional icon element to display before the content */ leadingIcon?: ReactNode; - /** Optional icon element to display after the label */ + /** Optional icon element to display after the content */ trailingIcon?: ReactNode; /** diff --git a/apps/www/src/content/docs/components/callout/props.ts b/apps/www/src/content/docs/components/callout/props.ts index e9d09584c..205c19946 100644 --- a/apps/www/src/content/docs/components/callout/props.ts +++ b/apps/www/src/content/docs/components/callout/props.ts @@ -51,6 +51,9 @@ export interface CalloutProps { /** Additional CSS class names */ className?: string; + /** Inline styles for the callout */ + style?: React.CSSProperties; + /** * Corner radius for this callout only. Overrides the theme's `radius`. * @defaultValue The theme's `radius` diff --git a/apps/www/src/content/docs/components/icon-button/props.ts b/apps/www/src/content/docs/components/icon-button/props.ts index 25c81193a..453536ae3 100644 --- a/apps/www/src/content/docs/components/icon-button/props.ts +++ b/apps/www/src/content/docs/components/icon-button/props.ts @@ -52,4 +52,7 @@ export interface IconButtonProps { * @defaultValue The theme's `radius` */ radius?: 'none' | 'small' | 'medium' | 'large' | 'full'; + + /** Accessible name for the button. */ + 'aria-label'?: string; } diff --git a/apps/www/src/content/docs/components/search/props.ts b/apps/www/src/content/docs/components/search/props.ts index 91fff7996..efd6491cd 100644 --- a/apps/www/src/content/docs/components/search/props.ts +++ b/apps/www/src/content/docs/components/search/props.ts @@ -5,6 +5,12 @@ export interface SearchProps { */ size?: 'small' | 'large'; + /** + * Visual variant of the input. + * @default "default" + */ + variant?: 'default' | 'borderless'; + /** Placeholder text for the input. */ placeholder?: string; diff --git a/apps/www/src/content/docs/components/select/props.ts b/apps/www/src/content/docs/components/select/props.ts index 1a2006ecb..da95234a0 100644 --- a/apps/www/src/content/docs/components/select/props.ts +++ b/apps/www/src/content/docs/components/select/props.ts @@ -1,4 +1,36 @@ export interface SelectRootProps { + /** The selected value. An array when `multiple` is set. */ + value?: string | string[]; + + /** The value selected on first render when `value` is not set. An array when `multiple` is set. */ + defaultValue?: string | string[]; + + /** Called when the selection changes. Receives an array when `multiple` is set. */ + onValueChange?: (value: string | string[]) => void; + + /** Whether the list is open. */ + open?: boolean; + + /** Whether the list is open on first render when `open` is not set. + * @default false + */ + defaultOpen?: boolean; + + /** Called when the list opens or closes. */ + onOpenChange?: (open: boolean) => void; + + /** Whether the select is disabled. */ + disabled?: boolean; + + /** Whether a value is required. Defaults to the `required` of the surrounding `Field`. */ + required?: boolean; + + /** Name of the field when the select is submitted with a form. */ + name?: string; + + /** The select's parts, such as `Select.Trigger` and `Select.Content`. */ + children?: React.ReactNode; + /** Enables multiple selection. * When enabled, value, onValueChange, and defaultValue will be an array of strings. * @default false @@ -25,6 +57,9 @@ export interface SelectRootProps { /** Callback fired when the search value changes */ onSearch?: (value: string) => void; + + /** All item values. In autocomplete mode, setting it turns off the filtering of `Select.Item` children. */ + items?: string[]; } export interface SelectTriggerProps { diff --git a/apps/www/src/content/docs/dataview/props.ts b/apps/www/src/content/docs/dataview/props.ts index 39513c39b..3259d7528 100644 --- a/apps/www/src/content/docs/dataview/props.ts +++ b/apps/www/src/content/docs/dataview/props.ts @@ -1,4 +1,4 @@ -import { ReactNode, RefObject } from 'react'; +import { CSSProperties, ReactNode, RefObject } from 'react'; // Documentation-only placeholders so `auto-type-table` can render the public // API without surfacing real generics (TData is shown as `T` for readability). @@ -74,6 +74,9 @@ export interface DataViewProps { * Keeps the wire format (`group_by: string[]`) unchanged. */ groupByResolvers?: Record string>; + + /** The DataView's toolbar, renderers and other parts. */ + children?: ReactNode; } export interface DataViewField { @@ -120,6 +123,27 @@ export interface DataViewField { * takes no section. */ groupOrder?: string[]; + + /** + * Value type of a `select` or `multiselect` filter. + * @defaultValue "string" + */ + dataType?: 'string' | 'number' | 'boolean'; + + /** + * Value a new filter on this field starts with. + * @defaultValue today for `date`, the first option for `select`, otherwise `""` + */ + defaultFilterValue?: unknown; + + /** Props for the filter's control. `select` is passed to the filter's `Select`. */ + filterProps?: { select?: Record }; + + /** + * Count shown next to each group header when `showGroupCount` is on, by raw group value. + * @defaultValue the group's row count + */ + groupCountMap?: Record; } export interface DataViewListProps { @@ -181,6 +205,9 @@ export interface DataViewListColumn { * @defaultValue "1fr" */ width?: string | number; + + /** Inline styles for the column's cells and its header cell. */ + styles?: { cell?: CSSProperties; header?: CSSProperties }; } /** Date inputs accepted by Timeline props and row fields. */ @@ -419,12 +446,16 @@ export interface DataViewDisplayAccessProps { export interface DataViewEmptyStateProps { /** Restrict to a specific view's `name`. */ forView?: string; + /** Additional CSS class names. */ + className?: string; children: ReactNode; } export interface DataViewZeroStateProps { /** Restrict to a specific view's `name`. */ forView?: string; + /** Additional CSS class names. */ + className?: string; children: ReactNode; } diff --git a/apps/www/src/content/docs/theme/overview/props.ts b/apps/www/src/content/docs/theme/overview/props.ts index 8d0319859..a4938aa79 100644 --- a/apps/www/src/content/docs/theme/overview/props.ts +++ b/apps/www/src/content/docs/theme/overview/props.ts @@ -1,3 +1,5 @@ +import type { IconOptions } from '../icons/props'; + export type Appearance = 'light' | 'dark'; export type AppearanceSetting = 'light' | 'dark' | 'system'; export type AccentColor = 'indigo' | 'orange' | 'mint'; @@ -109,6 +111,15 @@ export type ThemeProps = { className?: string; children?: React.ReactNode; + + /** Icon overrides: `components` replaces icons by key, and `props` applies to every icon. */ + icons?: IconOptions; + + /** Ref to the theme's element: its `div`, or the element passed to `render`. */ + ref?: React.Ref; + + /** Inline styles for the theme's element. */ + style?: React.CSSProperties; }; /** The theme, as read and driven from anywhere inside a provider. */ @@ -139,4 +150,9 @@ export type ThemeSwitcherProps = { * @defaultValue "nearest" */ target?: 'nearest' | 'root'; + /** + * Accessible name for the button. + * @defaultValue "Switch to light theme" or "Switch to dark theme", by the current appearance + */ + 'aria-label'?: string; }; diff --git a/packages/react/components/code-block/code-block-root.tsx b/packages/react/components/code-block/code-block-root.tsx index 3d0d43e30..4eb187006 100644 --- a/packages/react/components/code-block/code-block-root.tsx +++ b/packages/react/components/code-block/code-block-root.tsx @@ -40,6 +40,7 @@ export interface CodeBlockProps extends ComponentProps<'div'>, CodeBlockCommonProps { defaultValue?: string; + /** @deprecated Has no effect. */ maxHeight?: string | number; onValueChange?: (value: string) => void; defaultCollapsed?: boolean; diff --git a/packages/react/components/data-view/components/filters.tsx b/packages/react/components/data-view/components/filters.tsx index 28f6a5cdc..621d68878 100644 --- a/packages/react/components/data-view/components/filters.tsx +++ b/packages/react/components/data-view/components/filters.tsx @@ -103,6 +103,7 @@ function AddFilter({ } export interface DataViewFiltersProps extends PositionerProps { + /** @deprecated Use the `data-slot` selectors named on each key instead. */ classNames?: { /** @deprecated Use `[data-slot="filter-chip"]` instead. */ filterChips?: string; diff --git a/packages/react/components/indicator/indicator.tsx b/packages/react/components/indicator/indicator.tsx index e6dbbe29d..dc8109cb4 100644 --- a/packages/react/components/indicator/indicator.tsx +++ b/packages/react/components/indicator/indicator.tsx @@ -29,6 +29,7 @@ export interface IndicatorProps pulse?: boolean; children?: ReactNode; 'aria-label'?: string; + /** @deprecated Use `[data-slot="indicator"]` instead. */ classNames?: { /** @deprecated Use `[data-slot="indicator"]` instead. */ container?: string; diff --git a/packages/react/components/menu/menu-root.tsx b/packages/react/components/menu/menu-root.tsx index 3af2ef47e..9e9084cf9 100644 --- a/packages/react/components/menu/menu-root.tsx +++ b/packages/react/components/menu/menu-root.tsx @@ -13,8 +13,11 @@ interface CommonProps { autocomplete?: boolean; autocompleteMode?: 'auto' | 'manual'; inputValue?: string; + /** @internal Set by `Menu` and `Menu.Submenu` for their parts. */ inputRef?: React.RefObject; + /** @internal Set by `Menu` and `Menu.Submenu` for their parts. */ contentRef?: React.RefObject; + /** @internal Set by `Menu` and `Menu.Submenu` for their parts. */ isInitialRender?: React.RefObject; open?: boolean; } From 8dca4c0c8210f965684b896af60e2fc209abfe6a Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Thu, 15 Oct 2026 18:34:40 +0530 Subject: [PATCH 3/8] fix: [docs] correct required props, defaults and examples --- apps/www/src/content/docs/components/breadcrumb/index.mdx | 2 +- apps/www/src/content/docs/components/calendar/props.ts | 2 +- apps/www/src/content/docs/components/callout/props.ts | 2 +- apps/www/src/content/docs/components/chip/props.ts | 2 +- apps/www/src/content/docs/components/field/props.ts | 3 +-- apps/www/src/content/docs/components/indicator/index.mdx | 2 +- apps/www/src/content/docs/components/indicator/props.ts | 4 ++-- apps/www/src/content/docs/components/list/props.ts | 8 ++++---- apps/www/src/content/docs/components/select/props.ts | 2 +- apps/www/src/content/docs/components/toast/index.mdx | 6 +++--- apps/www/src/content/docs/theme/overview/props.ts | 2 +- packages/react/components/menu/menu-root.tsx | 6 +++--- 12 files changed, 20 insertions(+), 21 deletions(-) diff --git a/apps/www/src/content/docs/components/breadcrumb/index.mdx b/apps/www/src/content/docs/components/breadcrumb/index.mdx index cc8b5e010..c3e401d48 100644 --- a/apps/www/src/content/docs/components/breadcrumb/index.mdx +++ b/apps/www/src/content/docs/components/breadcrumb/index.mdx @@ -58,7 +58,7 @@ Use the `Breadcrumb.Ellipsis` component to truncate the breadcrumb trail when yo ### Icons -Breadcrumb items can include icons via `leadingIcon` (before the label) or `trailingIcon` (after the label), either alongside text or as standalone elements. +Breadcrumb items can include icons via `leadingIcon` (before the content) or `trailingIcon` (after the content), either alongside text or as standalone elements. diff --git a/apps/www/src/content/docs/components/calendar/props.ts b/apps/www/src/content/docs/components/calendar/props.ts index 6d76f01ec..f5b3e24fd 100644 --- a/apps/www/src/content/docs/components/calendar/props.ts +++ b/apps/www/src/content/docs/components/calendar/props.ts @@ -138,7 +138,7 @@ export interface CalendarProps { export interface RangePickerProps { /** - * Additional CSS class names for the group that holds the start and end inputs. + * Additional CSS class names for the group that holds the start and end inputs. Ignored when `children` is set. */ pickerGroupClassName?: string; diff --git a/apps/www/src/content/docs/components/callout/props.ts b/apps/www/src/content/docs/components/callout/props.ts index 205c19946..1913f7ed6 100644 --- a/apps/www/src/content/docs/components/callout/props.ts +++ b/apps/www/src/content/docs/components/callout/props.ts @@ -46,7 +46,7 @@ export interface CalloutProps { onDismiss?: () => void; /** Text content of the callout */ - children?: React.ReactNode; + children: React.ReactNode; /** Additional CSS class names */ className?: string; diff --git a/apps/www/src/content/docs/components/chip/props.ts b/apps/www/src/content/docs/components/chip/props.ts index 13ca6d5c9..c8fa0066e 100644 --- a/apps/www/src/content/docs/components/chip/props.ts +++ b/apps/www/src/content/docs/components/chip/props.ts @@ -31,7 +31,7 @@ export interface ChipProps { /** Callback function when dismiss button is clicked */ onDismiss?: () => void; - /** Disables the chip and its dismiss button */ + /** Disables the chip and blocks pointer clicks on it */ disabled?: boolean; /** Content to display inside the chip */ diff --git a/apps/www/src/content/docs/components/field/props.ts b/apps/www/src/content/docs/components/field/props.ts index 43a34f554..733f3df51 100644 --- a/apps/www/src/content/docs/components/field/props.ts +++ b/apps/www/src/content/docs/components/field/props.ts @@ -47,8 +47,7 @@ export interface FieldProps { export interface FieldLabelProps { /** - * Whether the field is required. When false, shows an (optional) indicator next to the label. - * @defaultValue true + * Whether the field is required. `true` shows `requiredText`, `false` shows `optionalText`, and nothing is shown when it is not set. */ required?: boolean; diff --git a/apps/www/src/content/docs/components/indicator/index.mdx b/apps/www/src/content/docs/components/indicator/index.mdx index 8518ee8e4..906677a81 100644 --- a/apps/www/src/content/docs/components/indicator/index.mdx +++ b/apps/www/src/content/docs/components/indicator/index.mdx @@ -78,7 +78,7 @@ The Indicator component includes several accessibility features: - Provides appropriate `aria-label` based on the content: - Uses custom `aria-label` prop if provided - Falls back to the label text if available - - Uses a default "indicator" if neither is provided + - Uses `" indicator"`, for example `"accent indicator"`, if neither is provided - Hides decorative dot from screen readers when no label is present Example with custom aria label: diff --git a/apps/www/src/content/docs/components/indicator/props.ts b/apps/www/src/content/docs/components/indicator/props.ts index df10960e3..cf13ebf7d 100644 --- a/apps/www/src/content/docs/components/indicator/props.ts +++ b/apps/www/src/content/docs/components/indicator/props.ts @@ -18,8 +18,8 @@ export interface IndicatorProps { 'aria-label'?: string; /** The content to show the indicator on */ - children: React.ReactNode; + children?: React.ReactNode; - /** Additional CSS class names */ + /** Additional CSS class names for the badge */ className?: string; } diff --git a/apps/www/src/content/docs/components/list/props.ts b/apps/www/src/content/docs/components/list/props.ts index ab013dae7..0d553025b 100644 --- a/apps/www/src/content/docs/components/list/props.ts +++ b/apps/www/src/content/docs/components/list/props.ts @@ -8,7 +8,7 @@ export interface ListRootProps { export interface ListHeaderProps { /** Content to be displayed in the header. */ - children?: React.ReactNode; + children: React.ReactNode; /** * Heading level set as `aria-level` on the underlying heading element. @@ -22,7 +22,7 @@ export interface ListHeaderProps { export interface ListItemProps { /** Content to be displayed in the item. */ - children?: React.ReactNode; + children: React.ReactNode; /** Additional CSS class names. */ className?: string; @@ -30,7 +30,7 @@ export interface ListItemProps { export interface ListLabelProps { /** Content to be displayed in the label. */ - children?: React.ReactNode; + children: React.ReactNode; /** Additional CSS class names. */ className?: string; @@ -38,7 +38,7 @@ export interface ListLabelProps { export interface ListValueProps { /** Content to be displayed in the value. */ - children?: React.ReactNode; + children: React.ReactNode; /** Additional CSS class names. */ className?: string; diff --git a/apps/www/src/content/docs/components/select/props.ts b/apps/www/src/content/docs/components/select/props.ts index da95234a0..c0220ae8d 100644 --- a/apps/www/src/content/docs/components/select/props.ts +++ b/apps/www/src/content/docs/components/select/props.ts @@ -58,7 +58,7 @@ export interface SelectRootProps { /** Callback fired when the search value changes */ onSearch?: (value: string) => void; - /** All item values. In autocomplete mode, setting it turns off the filtering of `Select.Item` children. */ + /** All item values. In autocomplete mode, Base UI filters this list instead of the `Select.Item` children. It has no effect without `autocomplete`. */ items?: string[]; } diff --git a/apps/www/src/content/docs/components/toast/index.mdx b/apps/www/src/content/docs/components/toast/index.mdx index e5386a71c..c2cbe7277 100644 --- a/apps/www/src/content/docs/components/toast/index.mdx +++ b/apps/www/src/content/docs/components/toast/index.mdx @@ -104,14 +104,14 @@ Creates a new toast and returns its unique ID. If `id` matches an open toast, it -### createToastManager() +### Toast.createToastManager() Factory that returns a fresh toast manager. The exported singleton `toastManager` is one such instance created at module load. Pass a custom manager to `` to scope toasts to that provider. ```tsx -import { Toast, createToastManager } from '@raystack/apsara' +import { Toast } from '@raystack/apsara' -const manager = createToastManager() +const manager = Toast.createToastManager() diff --git a/apps/www/src/content/docs/theme/overview/props.ts b/apps/www/src/content/docs/theme/overview/props.ts index a4938aa79..86d68fb2a 100644 --- a/apps/www/src/content/docs/theme/overview/props.ts +++ b/apps/www/src/content/docs/theme/overview/props.ts @@ -152,7 +152,7 @@ export type ThemeSwitcherProps = { target?: 'nearest' | 'root'; /** * Accessible name for the button. - * @defaultValue "Switch to light theme" or "Switch to dark theme", by the current appearance + * @defaultValue "Switch to light theme" when the target theme is dark, otherwise "Switch to dark theme" */ 'aria-label'?: string; }; diff --git a/packages/react/components/menu/menu-root.tsx b/packages/react/components/menu/menu-root.tsx index 9e9084cf9..f0febec24 100644 --- a/packages/react/components/menu/menu-root.tsx +++ b/packages/react/components/menu/menu-root.tsx @@ -13,11 +13,11 @@ interface CommonProps { autocomplete?: boolean; autocompleteMode?: 'auto' | 'manual'; inputValue?: string; - /** @internal Set by `Menu` and `Menu.Submenu` for their parts. */ + /** @internal Set by the menu and context menu roots and submenus for their parts. */ inputRef?: React.RefObject; - /** @internal Set by `Menu` and `Menu.Submenu` for their parts. */ + /** @internal Set by the menu and context menu roots and submenus for their parts. */ contentRef?: React.RefObject; - /** @internal Set by `Menu` and `Menu.Submenu` for their parts. */ + /** @internal Set by the menu and context menu roots and submenus for their parts. */ isInitialRender?: React.RefObject; open?: boolean; } From a7fa54505a65f166ec563c4d8587bc7eba40c23c Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Fri, 16 Oct 2026 00:51:06 +0530 Subject: [PATCH 4/8] fix: [docs] document button style, search placeholder and select details --- apps/www/src/content/docs/components/button/props.ts | 3 +++ apps/www/src/content/docs/components/search/props.ts | 5 ++++- apps/www/src/content/docs/components/select/props.ts | 4 ++-- apps/www/src/content/docs/dataview/props.ts | 8 +++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/apps/www/src/content/docs/components/button/props.ts b/apps/www/src/content/docs/components/button/props.ts index f08e8cdf1..3af27f246 100644 --- a/apps/www/src/content/docs/components/button/props.ts +++ b/apps/www/src/content/docs/components/button/props.ts @@ -62,6 +62,9 @@ export type ButtonProps = { /** Additional CSS class names */ className?: string; + /** Inline styles for the button */ + style?: React.CSSProperties; + /** * Corner radius for this button only. Overrides the theme's `radius`. * @defaultValue The theme's `radius` diff --git a/apps/www/src/content/docs/components/search/props.ts b/apps/www/src/content/docs/components/search/props.ts index efd6491cd..246b76a52 100644 --- a/apps/www/src/content/docs/components/search/props.ts +++ b/apps/www/src/content/docs/components/search/props.ts @@ -11,7 +11,10 @@ export interface SearchProps { */ variant?: 'default' | 'borderless'; - /** Placeholder text for the input. */ + /** + * Placeholder text for the input. + * @default "Search" + */ placeholder?: string; /** Whether the search input is disabled. */ diff --git a/apps/www/src/content/docs/components/select/props.ts b/apps/www/src/content/docs/components/select/props.ts index c0220ae8d..fcc2553be 100644 --- a/apps/www/src/content/docs/components/select/props.ts +++ b/apps/www/src/content/docs/components/select/props.ts @@ -22,7 +22,7 @@ export interface SelectRootProps { /** Whether the select is disabled. */ disabled?: boolean; - /** Whether a value is required. Defaults to the `required` of the surrounding `Field`. */ + /** Whether a value is required. Defaults to the `required` of the surrounding `Field`, which is `true` unless the `Field` sets `required={false}`. */ required?: boolean; /** Name of the field when the select is submitted with a form. */ @@ -128,7 +128,7 @@ export interface SelectItemProps { /** The value of the item. */ value: string; - /** Icon rendered before the item text. */ + /** Icon rendered before the item text. Rendered only when `children` is a string. */ leadingIcon?: React.ReactNode; /** Additional CSS class names. */ diff --git a/apps/www/src/content/docs/dataview/props.ts b/apps/www/src/content/docs/dataview/props.ts index 3259d7528..b632f1b63 100644 --- a/apps/www/src/content/docs/dataview/props.ts +++ b/apps/www/src/content/docs/dataview/props.ts @@ -1,4 +1,5 @@ import { CSSProperties, ReactNode, RefObject } from 'react'; +import type { SelectRootProps } from '../components/select/props'; // Documentation-only placeholders so `auto-type-table` can render the public // API without surfacing real generics (TData is shown as `T` for readability). @@ -137,7 +138,12 @@ export interface DataViewField { defaultFilterValue?: unknown; /** Props for the filter's control. `select` is passed to the filter's `Select`. */ - filterProps?: { select?: Record }; + filterProps?: { + select?: Omit< + SelectRootProps, + 'multiple' | 'value' | 'defaultValue' | 'onValueChange' + >; + }; /** * Count shown next to each group header when `showGroupCount` is on, by raw group value. From d0846d7f4db7c4f0e9522dfb8764b83039a3505f Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Fri, 16 Oct 2026 01:21:02 +0530 Subject: [PATCH 5/8] fix: [docs] remove extra JSDoc tags and wording changes --- .../src/content/docs/components/breadcrumb/index.mdx | 2 +- .../src/content/docs/components/breadcrumb/props.ts | 4 ++-- .../src/content/docs/components/code-block/index.mdx | 2 +- apps/www/src/content/docs/components/toast/index.mdx | 2 +- apps/www/src/content/docs/dataview/props.ts | 10 ++-------- .../react/components/data-view/components/filters.tsx | 1 - packages/react/components/indicator/indicator.tsx | 1 - packages/react/components/menu/menu-root.tsx | 3 --- 8 files changed, 7 insertions(+), 18 deletions(-) diff --git a/apps/www/src/content/docs/components/breadcrumb/index.mdx b/apps/www/src/content/docs/components/breadcrumb/index.mdx index c3e401d48..cc8b5e010 100644 --- a/apps/www/src/content/docs/components/breadcrumb/index.mdx +++ b/apps/www/src/content/docs/components/breadcrumb/index.mdx @@ -58,7 +58,7 @@ Use the `Breadcrumb.Ellipsis` component to truncate the breadcrumb trail when yo ### Icons -Breadcrumb items can include icons via `leadingIcon` (before the content) or `trailingIcon` (after the content), either alongside text or as standalone elements. +Breadcrumb items can include icons via `leadingIcon` (before the label) or `trailingIcon` (after the label), either alongside text or as standalone elements. diff --git a/apps/www/src/content/docs/components/breadcrumb/props.ts b/apps/www/src/content/docs/components/breadcrumb/props.ts index 3f271581b..7affca9a1 100644 --- a/apps/www/src/content/docs/components/breadcrumb/props.ts +++ b/apps/www/src/content/docs/components/breadcrumb/props.ts @@ -7,10 +7,10 @@ export interface BreadcrumbItem { /** URL for the item link */ href?: string; - /** Optional icon element to display before the content */ + /** Optional icon element to display before the label */ leadingIcon?: ReactNode; - /** Optional icon element to display after the content */ + /** Optional icon element to display after the label */ trailingIcon?: ReactNode; /** diff --git a/apps/www/src/content/docs/components/code-block/index.mdx b/apps/www/src/content/docs/components/code-block/index.mdx index 95ca9acb1..882896b40 100644 --- a/apps/www/src/content/docs/components/code-block/index.mdx +++ b/apps/www/src/content/docs/components/code-block/index.mdx @@ -111,7 +111,7 @@ Renders a text label displayed in the header. ### LanguageSelect -Renders a language selection dropdown container. It accepts the props of a single-selection `Select` root. +Renders a language selection dropdown container. It accepts the props of a single-selection `Select` root, except `value`, `defaultValue` and `onValueChange`. Set those on the `CodeBlock` root. diff --git a/apps/www/src/content/docs/components/toast/index.mdx b/apps/www/src/content/docs/components/toast/index.mdx index c2cbe7277..894f32f2d 100644 --- a/apps/www/src/content/docs/components/toast/index.mdx +++ b/apps/www/src/content/docs/components/toast/index.mdx @@ -104,7 +104,7 @@ Creates a new toast and returns its unique ID. If `id` matches an open toast, it -### Toast.createToastManager() +### createToastManager() Factory that returns a fresh toast manager. The exported singleton `toastManager` is one such instance created at module load. Pass a custom manager to `` to scope toasts to that provider. diff --git a/apps/www/src/content/docs/dataview/props.ts b/apps/www/src/content/docs/dataview/props.ts index b632f1b63..2cf8e3369 100644 --- a/apps/www/src/content/docs/dataview/props.ts +++ b/apps/www/src/content/docs/dataview/props.ts @@ -1,5 +1,4 @@ import { CSSProperties, ReactNode, RefObject } from 'react'; -import type { SelectRootProps } from '../components/select/props'; // Documentation-only placeholders so `auto-type-table` can render the public // API without surfacing real generics (TData is shown as `T` for readability). @@ -137,13 +136,8 @@ export interface DataViewField { */ defaultFilterValue?: unknown; - /** Props for the filter's control. `select` is passed to the filter's `Select`. */ - filterProps?: { - select?: Omit< - SelectRootProps, - 'multiple' | 'value' | 'defaultValue' | 'onValueChange' - >; - }; + /** Props for the filter's control. `select` takes the `Select` root props, without the value props, and is passed to the filter's `Select`. */ + filterProps?: { select?: Record }; /** * Count shown next to each group header when `showGroupCount` is on, by raw group value. diff --git a/packages/react/components/data-view/components/filters.tsx b/packages/react/components/data-view/components/filters.tsx index 621d68878..28f6a5cdc 100644 --- a/packages/react/components/data-view/components/filters.tsx +++ b/packages/react/components/data-view/components/filters.tsx @@ -103,7 +103,6 @@ function AddFilter({ } export interface DataViewFiltersProps extends PositionerProps { - /** @deprecated Use the `data-slot` selectors named on each key instead. */ classNames?: { /** @deprecated Use `[data-slot="filter-chip"]` instead. */ filterChips?: string; diff --git a/packages/react/components/indicator/indicator.tsx b/packages/react/components/indicator/indicator.tsx index dc8109cb4..e6dbbe29d 100644 --- a/packages/react/components/indicator/indicator.tsx +++ b/packages/react/components/indicator/indicator.tsx @@ -29,7 +29,6 @@ export interface IndicatorProps pulse?: boolean; children?: ReactNode; 'aria-label'?: string; - /** @deprecated Use `[data-slot="indicator"]` instead. */ classNames?: { /** @deprecated Use `[data-slot="indicator"]` instead. */ container?: string; diff --git a/packages/react/components/menu/menu-root.tsx b/packages/react/components/menu/menu-root.tsx index f0febec24..3af2ef47e 100644 --- a/packages/react/components/menu/menu-root.tsx +++ b/packages/react/components/menu/menu-root.tsx @@ -13,11 +13,8 @@ interface CommonProps { autocomplete?: boolean; autocompleteMode?: 'auto' | 'manual'; inputValue?: string; - /** @internal Set by the menu and context menu roots and submenus for their parts. */ inputRef?: React.RefObject; - /** @internal Set by the menu and context menu roots and submenus for their parts. */ contentRef?: React.RefObject; - /** @internal Set by the menu and context menu roots and submenus for their parts. */ isInitialRender?: React.RefObject; open?: boolean; } From df259d939174d459a270a2b2cb3ddf65e12569dc Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Fri, 16 Oct 2026 01:42:20 +0530 Subject: [PATCH 6/8] fix: [docs] correct sidepanel, empty state, tooltip and preview card docs --- .../docs/components/empty-state/props.ts | 2 +- .../docs/components/preview-card/props.ts | 2 +- .../content/docs/components/sidepanel/demo.ts | 18 +++++++++--------- .../content/docs/components/sidepanel/props.ts | 2 +- .../content/docs/components/tooltip/props.ts | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) 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..6a97e53d8 100644 --- a/apps/www/src/content/docs/components/empty-state/props.ts +++ b/apps/www/src/content/docs/components/empty-state/props.ts @@ -1,6 +1,6 @@ export interface EmptyStateProps { /** Icon to show in top of empty state */ - icon?: React.ReactNode; + icon: React.ReactNode; /** Primary heading message */ heading?: string; diff --git a/apps/www/src/content/docs/components/preview-card/props.ts b/apps/www/src/content/docs/components/preview-card/props.ts index 1445b6251..f4c8cd651 100644 --- a/apps/www/src/content/docs/components/preview-card/props.ts +++ b/apps/www/src/content/docs/components/preview-card/props.ts @@ -104,7 +104,7 @@ export interface PreviewCardContentProps { * May automatically change to avoid collisions. * @defaultValue 'bottom' */ - side?: 'top' | 'right' | 'bottom' | 'left'; + side?: 'top' | 'right' | 'bottom' | 'left' | 'inline-start' | 'inline-end'; /** * How to align the popup relative to the specified side. diff --git a/apps/www/src/content/docs/components/sidepanel/demo.ts b/apps/www/src/content/docs/components/sidepanel/demo.ts index 0b1cf1bdd..0630c5ef3 100644 --- a/apps/www/src/content/docs/components/sidepanel/demo.ts +++ b/apps/www/src/content/docs/components/sidepanel/demo.ts @@ -9,15 +9,15 @@ export const preview = { User Information - + Status Active - + Type Premium Account - + Created April 24, 2024 @@ -26,15 +26,15 @@ export const preview = { User Information - + Status Active - + Type Premium Account - + Created April 24, 2024 @@ -52,7 +52,7 @@ export const basicDemo = { User Information - + Status Active @@ -73,7 +73,7 @@ export const positionDemo = { User Information - + Status Active @@ -90,7 +90,7 @@ export const positionDemo = { User Information - + Status Active diff --git a/apps/www/src/content/docs/components/sidepanel/props.ts b/apps/www/src/content/docs/components/sidepanel/props.ts index 8c01c1e5f..dfcb8c04d 100644 --- a/apps/www/src/content/docs/components/sidepanel/props.ts +++ b/apps/www/src/content/docs/components/sidepanel/props.ts @@ -1,7 +1,7 @@ export interface SidePanelProps { /** * The side to position the panel. - * @default "left" + * @default "right" */ side?: 'left' | 'right'; diff --git a/apps/www/src/content/docs/components/tooltip/props.ts b/apps/www/src/content/docs/components/tooltip/props.ts index c9ec4deaf..ff6aa3af4 100644 --- a/apps/www/src/content/docs/components/tooltip/props.ts +++ b/apps/www/src/content/docs/components/tooltip/props.ts @@ -92,7 +92,7 @@ export interface TooltipContentProps { * Side placement of the tooltip * @default "top" */ - side?: 'top' | 'bottom' | 'left' | 'right'; + side?: 'top' | 'bottom' | 'left' | 'right' | 'inline-start' | 'inline-end'; /** * Alignment of the tooltip From 54ff415f9979e4174837fb9355e265fcf96eedad Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Fri, 16 Oct 2026 01:55:39 +0530 Subject: [PATCH 7/8] fix: [docs] correct callback arguments, field error match, message slots and sidepanel source --- apps/www/src/content/docs/ai-elements/message/index.mdx | 3 ++- apps/www/src/content/docs/components/checkbox/props.ts | 2 +- apps/www/src/content/docs/components/field/props.ts | 2 +- apps/www/src/content/docs/components/number-field/props.ts | 2 +- apps/www/src/content/docs/components/sidepanel/index.mdx | 2 +- apps/www/src/content/docs/components/switch/props.ts | 2 +- apps/www/src/content/docs/components/toggle/props.ts | 4 ++-- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/www/src/content/docs/ai-elements/message/index.mdx b/apps/www/src/content/docs/ai-elements/message/index.mdx index d89f4a808..44df422fb 100644 --- a/apps/www/src/content/docs/ai-elements/message/index.mdx +++ b/apps/www/src/content/docs/ai-elements/message/index.mdx @@ -101,7 +101,8 @@ Every rendered part carries a stable `data-slot` attribute for [styling and test | `message-group` | Wrapper around consecutive messages from one sender | | `message-avatar` | The sender avatar | | `message-header` | Row above the bubble, for sender name and timestamp | -| `message-content` | The bubble holding the message body | +| `message-content` | Column holding the message bubbles | +| `message-bubble` | The message surface | | `message-actions` | Action row revealed on the message | | `message-footer` | Row below the bubble | diff --git a/apps/www/src/content/docs/components/checkbox/props.ts b/apps/www/src/content/docs/components/checkbox/props.ts index 1d40d3887..58eb0927f 100644 --- a/apps/www/src/content/docs/components/checkbox/props.ts +++ b/apps/www/src/content/docs/components/checkbox/props.ts @@ -75,7 +75,7 @@ export interface CheckboxGroupProps { value?: string[]; /** Event handler called when the checked values change. */ - onValueChange?: (value: string[], event: Event) => void; + onValueChange?: (value: string[], eventDetails: unknown) => void; /** * All checkbox values in the group. Required when using a parent checkbox. diff --git a/apps/www/src/content/docs/components/field/props.ts b/apps/www/src/content/docs/components/field/props.ts index 733f3df51..e1be1d081 100644 --- a/apps/www/src/content/docs/components/field/props.ts +++ b/apps/www/src/content/docs/components/field/props.ts @@ -76,7 +76,7 @@ export interface FieldErrorProps { * Match a specific ValidityState property (e.g., "valueMissing", "typeMismatch", "customError") * or pass `true` to match any error. */ - match?: string | boolean; + match?: boolean | keyof ValidityState; /** Additional CSS class names. */ className?: string; diff --git a/apps/www/src/content/docs/components/number-field/props.ts b/apps/www/src/content/docs/components/number-field/props.ts index a87487d26..6a0bc47ff 100644 --- a/apps/www/src/content/docs/components/number-field/props.ts +++ b/apps/www/src/content/docs/components/number-field/props.ts @@ -9,7 +9,7 @@ export interface NumberFieldProps { defaultValue?: number; /** Event handler called when the value changes. */ - onValueChange?: (value: number | null, event: Event) => void; + onValueChange?: (value: number | null, eventDetails: unknown) => void; /** Minimum allowed value. */ min?: number; diff --git a/apps/www/src/content/docs/components/sidepanel/index.mdx b/apps/www/src/content/docs/components/sidepanel/index.mdx index 8b6fdc0f6..bd90be00c 100644 --- a/apps/www/src/content/docs/components/sidepanel/index.mdx +++ b/apps/www/src/content/docs/components/sidepanel/index.mdx @@ -1,7 +1,7 @@ --- title: Side Panel description: A flexible side panel component to place content on either side of the page. -source: packages/react/components/sidepanel +source: packages/react/components/side-panel --- import { basicDemo, positionDemo, preview } from "./demo.ts"; diff --git a/apps/www/src/content/docs/components/switch/props.ts b/apps/www/src/content/docs/components/switch/props.ts index baa6000c5..6419b78b4 100644 --- a/apps/www/src/content/docs/components/switch/props.ts +++ b/apps/www/src/content/docs/components/switch/props.ts @@ -6,7 +6,7 @@ export interface SwitchProps { defaultChecked?: boolean; /** Event handler called when the checked state changes. */ - onCheckedChange?: (checked: boolean, event: Event) => void; + onCheckedChange?: (checked: boolean, eventDetails: unknown) => void; /** When true, prevents the user from interacting with the switch. */ disabled?: boolean; diff --git a/apps/www/src/content/docs/components/toggle/props.ts b/apps/www/src/content/docs/components/toggle/props.ts index 52d943314..1225e7a4b 100644 --- a/apps/www/src/content/docs/components/toggle/props.ts +++ b/apps/www/src/content/docs/components/toggle/props.ts @@ -12,7 +12,7 @@ export interface ToggleProps { pressed?: boolean; /** Event handler called when the pressed state changes. */ - onPressedChange?: (pressed: boolean, event: Event) => void; + onPressedChange?: (pressed: boolean, eventDetails: unknown) => void; /** * The size of the toggle. @@ -50,7 +50,7 @@ export interface ToggleGroupProps { value?: string[]; /** Event handler called when the pressed values change. */ - onValueChange?: (value: string[], event: Event) => void; + onValueChange?: (value: string[], eventDetails: unknown) => void; /** * When true, multiple toggles can be pressed at the same time. From d82720200715c44e96e2c9db95145920838599c1 Mon Sep 17 00:00:00 2001 From: Shreyag02 Date: Fri, 16 Oct 2026 02:07:33 +0530 Subject: [PATCH 8/8] fix: [docs] document drawer, popover and code block parts --- .../src/content/docs/components/code-block/index.mdx | 11 +++++++++++ .../www/src/content/docs/components/drawer/index.mdx | 12 ++++++++++++ apps/www/src/content/docs/components/drawer/props.ts | 5 ++++- .../src/content/docs/components/popover/index.mdx | 4 ++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/apps/www/src/content/docs/components/code-block/index.mdx b/apps/www/src/content/docs/components/code-block/index.mdx index 882896b40..9c22f0753 100644 --- a/apps/www/src/content/docs/components/code-block/index.mdx +++ b/apps/www/src/content/docs/components/code-block/index.mdx @@ -28,6 +28,9 @@ import { CodeBlock } from '@raystack/apsara' + + + @@ -121,6 +124,14 @@ Renders the button that opens language selection. +### LanguageSelectContent + +Renders the dropdown that lists the languages. It is [`Select.Content`](/docs/components/select) and takes the same props. + +### LanguageSelectItem + +Renders one language in the dropdown. Selecting it shows the `CodeBlock.Code` with the same `value`, or the same `language` when that block sets no `value`. It is [`Select.Item`](/docs/components/select) and takes the same props. + ### CopyButton Renders a button for copying code to clipboard. diff --git a/apps/www/src/content/docs/components/drawer/index.mdx b/apps/www/src/content/docs/components/drawer/index.mdx index 4c11cf1c6..9fe36a213 100644 --- a/apps/www/src/content/docs/components/drawer/index.mdx +++ b/apps/www/src/content/docs/components/drawer/index.mdx @@ -61,6 +61,18 @@ Groups all parts of the drawer. The `side` prop determines both the slide direct +### Trigger + +Renders the button that opens the drawer. + +- Inherits all Base UI Drawer.Trigger props + +### Close + +Renders a button that closes the drawer. `Drawer.Content` already renders one unless `showCloseButton` is `false`. + +- Inherits all Base UI Drawer.Close props + ### Content Renders the drawer panel that slides in from a screen edge. diff --git a/apps/www/src/content/docs/components/drawer/props.ts b/apps/www/src/content/docs/components/drawer/props.ts index bff6148de..688f975a6 100644 --- a/apps/www/src/content/docs/components/drawer/props.ts +++ b/apps/www/src/content/docs/components/drawer/props.ts @@ -31,7 +31,10 @@ export interface DrawerContentProps { /** The direction from which the drawer appears. */ side?: 'top' | 'right' | 'bottom' | 'left'; - /** Whether to show the close button. */ + /** + * Whether to show the close button. + * @default true + */ showCloseButton?: boolean; /** diff --git a/apps/www/src/content/docs/components/popover/index.mdx b/apps/www/src/content/docs/components/popover/index.mdx index 8a0de78c7..934478ac2 100644 --- a/apps/www/src/content/docs/components/popover/index.mdx +++ b/apps/www/src/content/docs/components/popover/index.mdx @@ -67,6 +67,10 @@ Renders the popover content panel. +### Close + +Renders a button that closes the popover. It takes the Base UI `Popover.Close` props. + ### Trigger Renders the element that opens the popover.