@sableui/react 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +73 -0
- package/README.md +2 -0
- package/bin/sable.mjs +34 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +10 -9
- package/dist/components/breadcrumbs/breadcrumbs.meta.js +2 -2
- package/dist/components/button/button.meta.js +4 -0
- package/dist/components/chat-composer/chat-composer.js +4 -2
- package/dist/components/chat-composer/chat-composer.meta.js +8 -2
- package/dist/components/command-menu/command-menu.js +9 -2
- package/dist/components/command-menu/command-menu.meta.js +3 -3
- package/dist/components/data-table/data-table.js +117 -64
- package/dist/components/data-table/data-table.meta.js +27 -1
- package/dist/components/form/form.js +30 -9
- package/dist/components/form/form.meta.js +17 -3
- package/dist/components/message-scroller/message-scroller.meta.js +1 -1
- package/dist/components/page-header/page-header.js +1 -0
- package/dist/components/page-header/page-header.meta.js +1 -1
- package/dist/components/settings-menu/settings-menu.js +10 -1
- package/dist/components/settings-menu/settings-menu.meta.js +1 -1
- package/dist/components/sidebar/sidebar.js +1 -1
- package/dist/components/sidebar/sidebar.meta.js +5 -0
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/switch/switch.meta.js +2 -2
- package/dist/components/toggle/toggle.js +2 -1
- package/dist/file-hashes.json +603 -0
- package/dist/icon-sets/reicon.js +13 -1
- package/dist/index.d.ts +80 -13
- package/dist/index.js +1 -1
- package/dist/lib/heading-row.js +3 -2
- package/dist/lib/trim-label.js +17 -4
- package/dist/styles.css +27 -2
- package/llms/components/breadcrumbs.md +1 -1
- package/llms/components/button.md +1 -0
- package/llms/components/chat-composer.md +3 -2
- package/llms/components/command-menu.md +2 -2
- package/llms/components/data-table.md +33 -1
- package/llms/components/form.md +19 -2
- package/llms/components/message-scroller.md +1 -1
- package/llms/components/page-header.md +1 -1
- package/llms/components/settings-menu.md +1 -1
- package/llms/components/sidebar.md +1 -0
- package/llms/components/switch.md +2 -2
- package/llms/tasks/patching-a-component.md +48 -0
- package/llms/tasks/reviewing-a-design.md +5 -0
- package/llms-full.txt +121 -13
- package/llms.txt +1 -1
- package/package.json +4 -2
- package/registry.json +97 -20
- package/scripts/design-memory.mjs +7 -2
- package/scripts/lint-rules.mjs +32 -1
- package/scripts/patches.mjs +219 -0
- package/scripts/sources.mjs +247 -0
- package/skills/sable/SKILL.md +5 -2
package/dist/icon-sets/reicon.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// src/icon-sets/reicon.tsx
|
|
2
2
|
import { Pipette } from "reicon-react/icons/Pipette";
|
|
3
|
+
import { AtSign } from "reicon-react/icons/AtSign";
|
|
4
|
+
import { ChartBar } from "reicon-react/icons/ChartBar";
|
|
5
|
+
import { Flag } from "reicon-react/icons/Flag";
|
|
6
|
+
import { Paperclip } from "reicon-react/icons/Paperclip";
|
|
7
|
+
import { Tag } from "reicon-react/icons/Tag";
|
|
3
8
|
import { Key } from "reicon-react/icons/Key";
|
|
4
9
|
import { Stop } from "reicon-react/icons/Stop";
|
|
5
10
|
import { ThumbsDown } from "reicon-react/icons/ThumbsDown";
|
|
@@ -167,7 +172,14 @@ var ICONS = {
|
|
|
167
172
|
"volume-low": VolumeLow2,
|
|
168
173
|
"volume-off": VolumeCross,
|
|
169
174
|
queue: Playlist,
|
|
170
|
-
music: MusicNote
|
|
175
|
+
music: MusicNote,
|
|
176
|
+
// Added when a support inbox had no glyph for labels, attachments, reports,
|
|
177
|
+
// priority or mentions, and stood in `layout` and `list` for them.
|
|
178
|
+
tag: Tag,
|
|
179
|
+
paperclip: Paperclip,
|
|
180
|
+
chart: ChartBar,
|
|
181
|
+
flag: Flag,
|
|
182
|
+
"at-sign": AtSign
|
|
171
183
|
};
|
|
172
184
|
var WEIGHTS = {
|
|
173
185
|
regular: "Outline",
|
package/dist/index.d.ts
CHANGED
|
@@ -2967,6 +2967,7 @@ interface DataTableColumn<Row> {
|
|
|
2967
2967
|
/** Extra classes for this column's header + cells. */
|
|
2968
2968
|
className?: string;
|
|
2969
2969
|
}
|
|
2970
|
+
type DataTableRowKey = string | number;
|
|
2970
2971
|
interface DataTableProps<Row> {
|
|
2971
2972
|
/** Column definitions, left to right. */
|
|
2972
2973
|
columns: DataTableColumn<Row>[];
|
|
@@ -2976,8 +2977,21 @@ interface DataTableProps<Row> {
|
|
|
2976
2977
|
rowKey?: (row: Row, index: number) => string | number;
|
|
2977
2978
|
/** Row click handler — makes rows pointer-interactive. */
|
|
2978
2979
|
onRowClick?: (row: Row) => void;
|
|
2979
|
-
/** Mark a row visually selected (`data-selected`). */
|
|
2980
|
+
/** Mark a row visually selected (`data-selected`), e.g. the one open in a detail pane. */
|
|
2980
2981
|
isRowSelected?: (row: Row) => boolean;
|
|
2982
|
+
/**
|
|
2983
|
+
* The checked rows, by `rowKey`, for bulk actions. With `onSelectedKeysChange`
|
|
2984
|
+
* it adds a checkbox column and a select-all box in the header. Controlled:
|
|
2985
|
+
* when the rows shown change (a filter, another view), set the keys you want
|
|
2986
|
+
* kept — usually none.
|
|
2987
|
+
*/
|
|
2988
|
+
selectedKeys?: ReadonlySet<DataTableRowKey>;
|
|
2989
|
+
/** Called with the new set of checked keys. Its presence turns selection on. */
|
|
2990
|
+
onSelectedKeysChange?: (keys: Set<DataTableRowKey>) => void;
|
|
2991
|
+
/** A row checkbox's accessible name. Name the row: `(t) => \`Select ${t.subject}\``. @default "Select row" */
|
|
2992
|
+
rowSelectionLabel?: (row: Row) => string;
|
|
2993
|
+
/** The select-all checkbox's accessible name. @default (count) => `Select all ${count} shown` */
|
|
2994
|
+
selectAllLabel?: (count: number) => string;
|
|
2981
2995
|
/** Initial sort. */
|
|
2982
2996
|
defaultSort?: {
|
|
2983
2997
|
key: string;
|
|
@@ -2992,7 +3006,8 @@ interface DataTableProps<Row> {
|
|
|
2992
3006
|
/**
|
|
2993
3007
|
* DataTable — a data-driven table over the Table primitives: a `columns` def + a
|
|
2994
3008
|
* `data` array, with built-in client-side sorting (click a `sortable` header to
|
|
2995
|
-
* cycle asc → desc → none), optional row click
|
|
3009
|
+
* cycle asc → desc → none), optional row click, checkbox selection for bulk
|
|
3010
|
+
* actions (`selectedKeys` + `onSelectedKeysChange`), and an empty state.
|
|
2996
3011
|
* For server-side data or paging, sort/page the `data` you pass in and pair it
|
|
2997
3012
|
* with `Pagination`.
|
|
2998
3013
|
*
|
|
@@ -3006,7 +3021,7 @@ interface DataTableProps<Row> {
|
|
|
3006
3021
|
* ]}
|
|
3007
3022
|
* />
|
|
3008
3023
|
*/
|
|
3009
|
-
declare function DataTable<Row>({ columns, data, rowKey, onRowClick, isRowSelected, defaultSort, empty, caption, className, }: DataTableProps<Row>): react.JSX.Element;
|
|
3024
|
+
declare function DataTable<Row>({ columns, data, rowKey, onRowClick, isRowSelected, selectedKeys, onSelectedKeysChange, rowSelectionLabel, selectAllLabel, defaultSort, empty, caption, className, }: DataTableProps<Row>): react.JSX.Element;
|
|
3010
3025
|
declare namespace DataTable {
|
|
3011
3026
|
var displayName: string;
|
|
3012
3027
|
}
|
|
@@ -4001,9 +4016,14 @@ declare namespace BreadcrumbItem {
|
|
|
4001
4016
|
var displayName: string;
|
|
4002
4017
|
}
|
|
4003
4018
|
interface BreadcrumbLinkProps extends ComponentPropsWithRef<"a"> {
|
|
4019
|
+
/**
|
|
4020
|
+
* Render another element, such as a router link, so navigating stays in the
|
|
4021
|
+
* app: `render={<Link to="/library" />}`. Keeps the crumb's styling.
|
|
4022
|
+
*/
|
|
4023
|
+
render?: useRender.RenderProp;
|
|
4004
4024
|
}
|
|
4005
4025
|
/** An interactive ancestor crumb — muted, brightening to foreground on hover. */
|
|
4006
|
-
declare function BreadcrumbLink({ className,
|
|
4026
|
+
declare function BreadcrumbLink({ className, render, ...props }: BreadcrumbLinkProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
4007
4027
|
declare namespace BreadcrumbLink {
|
|
4008
4028
|
var displayName: string;
|
|
4009
4029
|
}
|
|
@@ -5100,7 +5120,12 @@ declare function Sidebar({ collapsed, icons, variant, className, children, ...pr
|
|
|
5100
5120
|
declare namespace Sidebar {
|
|
5101
5121
|
var displayName: string;
|
|
5102
5122
|
}
|
|
5103
|
-
/**
|
|
5123
|
+
/**
|
|
5124
|
+
* Brand/logo row pinned to the top of the rail. At least 64px tall, not exactly:
|
|
5125
|
+
* a second row under the brand (a search field, a notifications button) wraps
|
|
5126
|
+
* onto its own line and the header grows to hold it, where a fixed height
|
|
5127
|
+
* clipped it. Give that row `basis-full` (or `w-full`) to put it on its own line.
|
|
5128
|
+
*/
|
|
5104
5129
|
declare function SidebarHeader({ className, ...props }: ComponentPropsWithRef<"div">): react.JSX.Element;
|
|
5105
5130
|
declare namespace SidebarHeader {
|
|
5106
5131
|
var displayName: string;
|
|
@@ -5516,6 +5541,14 @@ interface FormProps extends ComponentPropsWithRef<"form"> {
|
|
|
5516
5541
|
onFormSubmit?: Form$1.Props["onFormSubmit"];
|
|
5517
5542
|
/** Imperative actions: `actionsRef.current.validate(name?)`. */
|
|
5518
5543
|
actionsRef?: Form$1.Props["actionsRef"];
|
|
5544
|
+
/**
|
|
5545
|
+
* Your code owns validation: `onSubmit` always runs, and each Field shows its
|
|
5546
|
+
* `error`. Nothing is checked first, neither the Fields nor the browser, so a
|
|
5547
|
+
* `required` Field keeps its asterisk and `aria-required` without blocking the
|
|
5548
|
+
* submit. `validationMode`, `errors`, `onFormSubmit` and `actionsRef` do
|
|
5549
|
+
* nothing here: they drive Sable's own validation.
|
|
5550
|
+
*/
|
|
5551
|
+
noValidate?: boolean;
|
|
5519
5552
|
}
|
|
5520
5553
|
/**
|
|
5521
5554
|
* Form — a styled `<form>` that lays its fields out in a vertical column with
|
|
@@ -5528,14 +5561,22 @@ interface FormProps extends ComponentPropsWithRef<"form"> {
|
|
|
5528
5561
|
* and pass each `Field` an `error` string. Library-agnostic by design.
|
|
5529
5562
|
*
|
|
5530
5563
|
* <Form onSubmit={handleSubmit}>
|
|
5531
|
-
* <Field label="Email"
|
|
5564
|
+
* <Field label="Email" required messages={{ valueMissing: "Enter your email." }}>
|
|
5565
|
+
* <Input type="email" />
|
|
5566
|
+
* </Field>
|
|
5532
5567
|
* <Button type="submit">Save</Button>
|
|
5533
5568
|
* </Form>
|
|
5569
|
+
*
|
|
5570
|
+
* Validating in your own code instead? Pass `noValidate`: `onSubmit` always
|
|
5571
|
+
* runs, and each Field shows the `error` you give it. Without it, an empty
|
|
5572
|
+
* `required` Field stops the submit before your handler could set that error.
|
|
5534
5573
|
*/
|
|
5535
|
-
declare function Form({ className, onSubmit, onFormSubmit, noValidate, ...props }: FormProps): react.JSX.Element;
|
|
5574
|
+
declare function Form({ className, onSubmit, onFormSubmit, noValidate, validationMode, errors, actionsRef, ...props }: FormProps): react.JSX.Element;
|
|
5536
5575
|
declare namespace Form {
|
|
5537
5576
|
var displayName: string;
|
|
5538
5577
|
}
|
|
5578
|
+
/** The native constraint flags of `ValidityState` a Field can word itself. */
|
|
5579
|
+
type ConstraintFlag = "valueMissing" | "typeMismatch" | "patternMismatch" | "tooShort" | "tooLong" | "rangeUnderflow" | "rangeOverflow" | "stepMismatch" | "badInput";
|
|
5539
5580
|
interface FieldProps {
|
|
5540
5581
|
/** Field label (wired to the control via htmlFor). */
|
|
5541
5582
|
label?: ReactNode;
|
|
@@ -5548,6 +5589,13 @@ interface FieldProps {
|
|
|
5548
5589
|
error?: ReactNode;
|
|
5549
5590
|
/** Marks the field required: adds the control's `required` + a visual asterisk. */
|
|
5550
5591
|
required?: boolean;
|
|
5592
|
+
/**
|
|
5593
|
+
* Your wording for a failed native constraint, by the `ValidityState` flag it
|
|
5594
|
+
* sets: `{ valueMissing: "Enter a subject.", typeMismatch: "That isn't an
|
|
5595
|
+
* email address." }`. A constraint without one shows the browser's message.
|
|
5596
|
+
* `error` still wins over both.
|
|
5597
|
+
*/
|
|
5598
|
+
messages?: Partial<Record<ConstraintFlag, ReactNode>>;
|
|
5551
5599
|
/**
|
|
5552
5600
|
* Disables the control (and any Base UI control inside) and dims the label.
|
|
5553
5601
|
* @default false
|
|
@@ -5596,7 +5644,7 @@ interface FieldProps {
|
|
|
5596
5644
|
* </Field>
|
|
5597
5645
|
* <Field label="Subscribe" orientation="horizontal"><Checkbox /></Field>
|
|
5598
5646
|
*/
|
|
5599
|
-
declare function Field({ label, description, error, required, disabled, name, validate, validationMode, validationDebounceTime, orientation, className, children, }: FieldProps): react.JSX.Element;
|
|
5647
|
+
declare function Field({ label, description, error, required, messages, disabled, name, validate, validationMode, validationDebounceTime, orientation, className, children, }: FieldProps): react.JSX.Element;
|
|
5600
5648
|
declare namespace Field {
|
|
5601
5649
|
var displayName: string;
|
|
5602
5650
|
}
|
|
@@ -6373,6 +6421,12 @@ interface CommandItem {
|
|
|
6373
6421
|
icon?: string;
|
|
6374
6422
|
/** Secondary text after the label — a destination, a type, an owner. */
|
|
6375
6423
|
detail?: ReactNode;
|
|
6424
|
+
/**
|
|
6425
|
+
* Put `detail` on its own line under the label instead of after it. For
|
|
6426
|
+
* results that only their detail tells apart (two tickets with one subject):
|
|
6427
|
+
* beside a long label the detail truncates first.
|
|
6428
|
+
*/
|
|
6429
|
+
stacked?: boolean;
|
|
6376
6430
|
/**
|
|
6377
6431
|
* End-aligned trailing slot: a shortcut (`<Kbd>`), a count — or, when the row
|
|
6378
6432
|
* is `disabled`, the reason it is.
|
|
@@ -6544,6 +6598,8 @@ interface CommandMenuItemProps extends Omit<ComponentPropsWithRef<"div">, "title
|
|
|
6544
6598
|
icon?: string;
|
|
6545
6599
|
/** Secondary text after the label. */
|
|
6546
6600
|
detail?: ReactNode;
|
|
6601
|
+
/** Put `detail` on its own line under the label, so it never truncates away first. */
|
|
6602
|
+
stacked?: boolean;
|
|
6547
6603
|
/** End-aligned trailing slot: a shortcut, a count, or a disabled row's reason. */
|
|
6548
6604
|
hint?: ReactNode;
|
|
6549
6605
|
/**
|
|
@@ -6560,7 +6616,7 @@ interface CommandMenuItemProps extends Omit<ComponentPropsWithRef<"div">, "title
|
|
|
6560
6616
|
* combobox: keyboard focus stays in the input and Enter clicks the highlighted
|
|
6561
6617
|
* row, so the row itself is not in the tab order.
|
|
6562
6618
|
*/
|
|
6563
|
-
declare function CommandMenuItem({ onSelect, icon, detail, hint, id: idProp, className, children, disabled, ...props }: CommandMenuItemProps): react.JSX.Element | null;
|
|
6619
|
+
declare function CommandMenuItem({ onSelect, icon, detail, stacked, hint, id: idProp, className, children, disabled, ...props }: CommandMenuItemProps): react.JSX.Element | null;
|
|
6564
6620
|
|
|
6565
6621
|
/**
|
|
6566
6622
|
* Listens for the platform's palette shortcut — ⌘K on macOS, Ctrl+K elsewhere —
|
|
@@ -7513,6 +7569,13 @@ interface ChatComposerProps extends Omit<ComponentPropsWithRef<"form">, "onSubmi
|
|
|
7513
7569
|
onSend?: (value: string) => void;
|
|
7514
7570
|
/** Placeholder for the field. @default "Send a message…" */
|
|
7515
7571
|
placeholder?: string;
|
|
7572
|
+
/**
|
|
7573
|
+
* Which key sends. `enter` for chat: Enter sends, Shift+Enter breaks the line.
|
|
7574
|
+
* `mod-enter` for long-form replies (an email, a support answer): Enter breaks
|
|
7575
|
+
* the line and ⌘/Ctrl+Enter sends, so a paragraph break never mails a draft.
|
|
7576
|
+
* @default "enter"
|
|
7577
|
+
*/
|
|
7578
|
+
sendOn?: "enter" | "mod-enter";
|
|
7516
7579
|
/**
|
|
7517
7580
|
* A reply is streaming. Disables send, and swaps it for a stop control when
|
|
7518
7581
|
* `onStop` is supplied.
|
|
@@ -7559,7 +7622,8 @@ interface ChatComposerProps extends Omit<ComponentPropsWithRef<"form">, "onSubmi
|
|
|
7559
7622
|
*
|
|
7560
7623
|
* The three details that are the whole job:
|
|
7561
7624
|
*
|
|
7562
|
-
* - **Enter sends, Shift+Enter breaks the line**
|
|
7625
|
+
* - **Enter sends, Shift+Enter breaks the line** (or, with `sendOn="mod-enter"`,
|
|
7626
|
+
* Enter breaks it and ⌘/Ctrl+Enter sends) — and neither fires mid-IME.
|
|
7563
7627
|
* A Japanese, Chinese, or Korean reader confirming a candidate in the
|
|
7564
7628
|
* composition popup presses Enter to *choose a word*, and a composer that
|
|
7565
7629
|
* reads that as "send" mails half a sentence. `event.nativeEvent.isComposing`
|
|
@@ -7570,7 +7634,7 @@ interface ChatComposerProps extends Omit<ComponentPropsWithRef<"form">, "onSubmi
|
|
|
7570
7634
|
* Interrupting a long generation is the most common thing a reader wants
|
|
7571
7635
|
* during one, and it belongs where their cursor already is.
|
|
7572
7636
|
*/
|
|
7573
|
-
declare function ChatComposer({ value, defaultValue, onValueChange, onSend, placeholder, busy, onStop, disabled, invalid, attachments, leading, actions, onAttach, label, sendLabel, stopLabel, footer, fieldRef, className, children, ...props }: ChatComposerProps): react.JSX.Element;
|
|
7637
|
+
declare function ChatComposer({ value, defaultValue, onValueChange, onSend, placeholder, sendOn, busy, onStop, disabled, invalid, attachments, leading, actions, onAttach, label, sendLabel, stopLabel, footer, fieldRef, className, children, ...props }: ChatComposerProps): react.JSX.Element;
|
|
7574
7638
|
declare namespace ChatComposer {
|
|
7575
7639
|
var displayName: string;
|
|
7576
7640
|
}
|
|
@@ -7632,6 +7696,9 @@ interface SettingsMenuProps extends Omit<ComponentProps<typeof Menu>, "children"
|
|
|
7632
7696
|
*
|
|
7633
7697
|
* Opens upward and end-aligned by default, because its home is the bottom-right
|
|
7634
7698
|
* of a composer or a toolbar — where a downward menu would open off-screen.
|
|
7699
|
+
*
|
|
7700
|
+
* One setting opens straight to its options, under the row's label: a lone row
|
|
7701
|
+
* that then opens a submenu is two clicks for one choice.
|
|
7635
7702
|
*/
|
|
7636
7703
|
declare function SettingsMenu({ summary, label, variant, size, side, align, disabled, className, children, ...props }: SettingsMenuProps): react.JSX.Element;
|
|
7637
7704
|
declare namespace SettingsMenu {
|
|
@@ -8224,6 +8291,6 @@ interface UseCopyResult {
|
|
|
8224
8291
|
*/
|
|
8225
8292
|
declare function useCopy(text: string, { timeout }?: UseCopyOptions): UseCopyResult;
|
|
8226
8293
|
|
|
8227
|
-
declare const SABLE_UI_VERSION: "0.
|
|
8294
|
+
declare const SABLE_UI_VERSION: "0.8.0";
|
|
8228
8295
|
|
|
8229
|
-
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, AppHeader, type AppHeaderProps, AppShell, type AppShellProps, AreaChart, type AreaChartProps, type ArtTone, Attachment, type AttachmentProps, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, type AvatarGroupCountProps, type AvatarGroupProps, AvatarImage, type AvatarProps, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, type BadgeAppearance, type BadgeProps, type BadgeTone, Banner, type BannerProps, BarChart, type BarChartProps, BottomNav, BottomNavItem, type BottomNavItemProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Browser, type BrowserProps, Bubble, type BubbleProps, BubbleReaction, type BubbleReactionProps, BubbleReactions, type BubbleReactionsProps, Button, type ButtonBleed, type ButtonProps, CHART_SERIES_COUNT, COMPONENT_GROUPS, COMPONENT_TAXONOMY, Calendar, type CalendarProps, Card, CardAction, CardContent, type CardContentProps, CardDescription, CardFooter, type CardFooterProps, CardHeader, CardList, type CardProps, CardTitle, type CardTitleProps, Carousel, type CarouselProps, type CarouselSlidesToShow, type ChartCategories, type ChartCenterLabel, type ChartCurve, type ChartDatum, type ChartSeries, type ChartTone, type ChartTooltipIndicator, type ChartTooltipOptions, type ChartValueFormatter, ChatComposer, type ChatComposerProps, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxCardTone, CheckboxGroup, type CheckboxGroupProps, Code, CodeBlock, type CodeBlockProps, CodeHighlightProvider, type CodeHighlighter, type CodeProps, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger, ColorField, type ColorFieldProps, Combobox, ComboboxChips, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, type ComboboxItemGroup, ComboboxItemIndicator, ComboboxList, ComboboxPortal, type ComboboxProps, ComboboxValue, ComboboxVirtualList, type ComboboxVirtualListProps, type CommandFilter, type CommandItem, CommandMenu, CommandMenuGroup, type CommandMenuGroupProps, CommandMenuItem, type CommandMenuItemProps, CommandMenuPanel, type CommandMenuPanelProps, type CommandMenuProps, CommandMenuTrigger, type CommandMenuTriggerProps, type ComponentGroup, type ComponentGuidance, ComponentMeta, type ComponentRegister, ContextCard, ContextCardArrow, ContextCardContent, ContextCardPortal, ContextCardTrigger, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, DateTile, type DateTileProps, Density, DensityProvider, Density as DensityValue, DestructiveActionModal, type DestructiveActionModalProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogSize, DialogTitle, DialogTrigger, DisclosurePicker, DisclosurePickerEmpty, DisclosurePickerList, type DisclosurePickerListProps, DisclosurePickerOption, type DisclosurePickerOptionProps, DisclosurePickerPanel, type DisclosurePickerPanelProps, type DisclosurePickerProps, type DisclosurePickerSearch, DisclosurePickerTrigger, type DisclosurePickerTriggerProps, EmptyState, type EmptyStateProps, Entity, type EntityProps, Feedback, type FeedbackData, type FeedbackProps, type FeedbackRating, Field, type FieldProps, Fieldset, FieldsetContent, FieldsetDescription, FieldsetFooter, FieldsetLegend, FileDropzone, type FileDropzoneProps, type FileRejection, type FileRejectionCode, FontPicker, type FontPickerFont, type FontPickerOption, type FontPickerProps, Form, type FormProps, GlidingHighlight, type GlidingHighlightProps, GradientArt, type GradientArtProps, type Hsv, InlineStatus, type InlineStatusProps, type StatusTone as InlineTone, Input, type InputProps$1 as InputProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps$2 as LabelProps, LineChart, type LineChartProps, Marker, type MarkerProps, Marquee, type MarqueeProps, MediaImage, type MediaImageProps, MediaTile, type MediaTileProps, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, type MessageProps, MessageScroller, type MessageScrollerHandle, type MessageScrollerProps, Meter, MeterIndicator, MeterLabel, type MeterSize, type MeterTone, MeterTrack, MeterValue, MiddleTruncate, type MiddleTruncateProps, type MotionPolicy, MotionProvider, type MotionProviderProps, Note, type NoteAction, type NoteProps, NotificationBadge, type NotificationBadgeProps, NumberField, type NumberFieldProps, type OrbMode, type OrbSize, OtpField, type OtpFieldProps, OverflowMenu, type OverflowMenuProps, PageHeader, type PageHeaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Panel, PanelGroup, PanelResizer, type PanelResizerProps, PanelSection, type PanelWidthBounds, Phone, type PhoneProps, PieChart, type PieChartProps, Pill, type PillProps, Popover, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Presence, type PresenceProps, type Presentation, PresentationProvider, Progress, ProgressIndicator, ProgressLabel, type ProgressSize, ProgressTrack, ProgressValue, PropertyPair, PropertyRow, RadarChart, type RadarChartProps, RadialChart, type RadialChartProps, Radio, RadioCard, type RadioCardProps, type RadioCardTone, RadioGroup, RelativeTime, type RelativeTimeProps, Reveal, type RevealProps, type Rgb, SABLE_UI_VERSION, SEGMENTED_BAR_TONES, STATUS_TONES, STATUS_TONE_ICON, type ScrollCommandOptions, Scroller, type ScrollerProps, ScrubField, type ScrubFieldProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedBar, type SegmentedBarProps, type SegmentedBarSegment, type SegmentedBarTone, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps$3 as SeparatorProps, SettingsMenu, type SettingsMenuProps, SettingsRow, type SettingsRowProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetList, SheetPortal, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, SideNav, type SideNavActiveVariant, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, type SideNavSize, Sidebar, SidebarBrand, type SidebarBrandProps, SidebarFooter, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarProps, SimpleTooltip, Skeleton, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, StatusBar, StatusBarGroup, StatusBarSeparator, StatusDot, type StatusDotProps, type StatusTone, type StepStatus, Stepper, StepperItem, type StepperItemProps, type StepperOrientation, type StepperProps, StreamingText, type StreamingTextProps, Switch, TRANSPARENT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, type TextRevealProps, Textarea, type TextareaProps, ThemeId, ThemeManifest, ThemeMode$1 as ThemeManifestMode, type ThemeMode, ThemePreview, type ThemePreviewProps, ThemeSelector, type ThemeSelectorProps, ThemeSwitcher, type ThemeSwitcherProps, ThinkingOrb, type ThinkingOrbProps, ToastAction, type ToastApi, ToastClose, ToastContent, ToastDescription, type ToastManagerApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, ToastRoot, ToastTitle, type ToastType, ToastViewport, Toggle, ToggleGroup, type ToggleGroupAppearance, Toggle as ToggleGroupItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarInput, type ToolbarInputProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Tree, TreeAddRow, TreeEmpty, TreeRow, TreeSection, type UseCopyOptions, type UseCopyResult, type UseInViewOptions, type UsePanelWidthOptions, Video, type VideoProps, ViewTransitionName, type ViewTransitionNameProps, Workspace, WorkspaceBar, WorkspaceCanvas, accordionMeta, appHeaderMeta, appShellMeta, areaChartMeta, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bannerMeta, bannerVariants, barChartMeta, bottomNavMeta, breadcrumbsMeta, browserMeta, bubbleMeta, buttonMeta, buttonVariants, calendarMeta, cardMeta, carouselMeta, chartColor, toneColor as chartToneColor, chatComposerMeta, checkboxCardMeta, checkboxMeta, cn, codeBlockMeta, codeMeta, collapsibleMeta, colorFieldMeta, comboboxMeta, commandMenuMeta, componentGuidance, componentLabel, componentSlug, componentsInGroup, contextCardMeta, contextMenuMeta, dataTableMeta, datePickerMeta, dateTileMeta, destructiveActionModalMeta, dialogMeta, disclosurePickerMeta, emptyStateMeta, entityMeta, feedbackMeta, fieldsetMeta, fileDropzoneMeta, fileDropzoneVariants, fontPickerMeta, formMeta, formatFileSize, formatHex, glidingHighlightMeta, gradientArtMeta, hsvToRgb, hueColor, inlineStatusMeta, inputMeta, isTransparent, kbdMeta, labelMeta, lineChartMeta, markerMeta, marqueeMeta, mediaImageMeta, mediaTileMeta, menuMeta, messageMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, middleTruncateMeta, noteMeta, noteVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, numberFieldMeta, otpFieldMeta, overflowMenuMeta, pageHeaderMeta, pageLoaderMeta, paginationMeta, panelGroupMeta, panelSectionMeta, parseHex, phoneMeta, pieChartMeta, pillMeta, pillVariants, popoverMeta, progressMeta, progressTrackVariants, radarChartMeta, radialChartMeta, radioCardMeta, radioMeta, relativeTimeMeta, rgbToHsv, scrollerMeta, scrubFieldMeta, searchInputMeta, sectionHeaderMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, selectMeta, separatorMeta, settingsMenuMeta, sheetMeta, sheetVariants, showMoreMeta, sideNavMeta, sidebarMeta, skeletonMeta, sliderMeta, sparklineMeta, spinnerMeta, startViewTransition, statusBarMeta, statusDotMeta, statusDotVariants, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, streamingTextMeta, supportsViewTransitions, switchMeta, tableMeta, tabsMeta, textareaMeta, themeSelectorMeta, themeSwitcherMeta, thinkingOrbMeta, toast, toastMeta, toggleMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, tooltipMeta, treeIndent, treeMeta, useAnchoredDensity, useComboboxFilteredItems, useCommandMenuShortcut, useCopy, useDensity, useDisclosurePicker, useInView, useMotion, usePanelWidth, usePresentation, useReducedMotion, useScrollActivity, useSidebar, useToast, useToastManager, useTypeTier, videoMeta, workspaceMeta };
|
|
8296
|
+
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, AppHeader, type AppHeaderProps, AppShell, type AppShellProps, AreaChart, type AreaChartProps, type ArtTone, Attachment, type AttachmentProps, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, type AvatarGroupCountProps, type AvatarGroupProps, AvatarImage, type AvatarProps, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, type BadgeAppearance, type BadgeProps, type BadgeTone, Banner, type BannerProps, BarChart, type BarChartProps, BottomNav, BottomNavItem, type BottomNavItemProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Browser, type BrowserProps, Bubble, type BubbleProps, BubbleReaction, type BubbleReactionProps, BubbleReactions, type BubbleReactionsProps, Button, type ButtonBleed, type ButtonProps, CHART_SERIES_COUNT, COMPONENT_GROUPS, COMPONENT_TAXONOMY, Calendar, type CalendarProps, Card, CardAction, CardContent, type CardContentProps, CardDescription, CardFooter, type CardFooterProps, CardHeader, CardList, type CardProps, CardTitle, type CardTitleProps, Carousel, type CarouselProps, type CarouselSlidesToShow, type ChartCategories, type ChartCenterLabel, type ChartCurve, type ChartDatum, type ChartSeries, type ChartTone, type ChartTooltipIndicator, type ChartTooltipOptions, type ChartValueFormatter, ChatComposer, type ChatComposerProps, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxCardTone, CheckboxGroup, type CheckboxGroupProps, Code, CodeBlock, type CodeBlockProps, CodeHighlightProvider, type CodeHighlighter, type CodeProps, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger, ColorField, type ColorFieldProps, Combobox, ComboboxChips, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, type ComboboxItemGroup, ComboboxItemIndicator, ComboboxList, ComboboxPortal, type ComboboxProps, ComboboxValue, ComboboxVirtualList, type ComboboxVirtualListProps, type CommandFilter, type CommandItem, CommandMenu, CommandMenuGroup, type CommandMenuGroupProps, CommandMenuItem, type CommandMenuItemProps, CommandMenuPanel, type CommandMenuPanelProps, type CommandMenuProps, CommandMenuTrigger, type CommandMenuTriggerProps, type ComponentGroup, type ComponentGuidance, ComponentMeta, type ComponentRegister, type ConstraintFlag, ContextCard, ContextCardArrow, ContextCardContent, ContextCardPortal, ContextCardTrigger, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DataTable, type DataTableColumn, type DataTableProps, type DataTableRowKey, DatePicker, type DatePickerProps, DateTile, type DateTileProps, Density, DensityProvider, Density as DensityValue, DestructiveActionModal, type DestructiveActionModalProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogSize, DialogTitle, DialogTrigger, DisclosurePicker, DisclosurePickerEmpty, DisclosurePickerList, type DisclosurePickerListProps, DisclosurePickerOption, type DisclosurePickerOptionProps, DisclosurePickerPanel, type DisclosurePickerPanelProps, type DisclosurePickerProps, type DisclosurePickerSearch, DisclosurePickerTrigger, type DisclosurePickerTriggerProps, EmptyState, type EmptyStateProps, Entity, type EntityProps, Feedback, type FeedbackData, type FeedbackProps, type FeedbackRating, Field, type FieldProps, Fieldset, FieldsetContent, FieldsetDescription, FieldsetFooter, FieldsetLegend, FileDropzone, type FileDropzoneProps, type FileRejection, type FileRejectionCode, FontPicker, type FontPickerFont, type FontPickerOption, type FontPickerProps, Form, type FormProps, GlidingHighlight, type GlidingHighlightProps, GradientArt, type GradientArtProps, type Hsv, InlineStatus, type InlineStatusProps, type StatusTone as InlineTone, Input, type InputProps$1 as InputProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps$2 as LabelProps, LineChart, type LineChartProps, Marker, type MarkerProps, Marquee, type MarqueeProps, MediaImage, type MediaImageProps, MediaTile, type MediaTileProps, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, type MessageProps, MessageScroller, type MessageScrollerHandle, type MessageScrollerProps, Meter, MeterIndicator, MeterLabel, type MeterSize, type MeterTone, MeterTrack, MeterValue, MiddleTruncate, type MiddleTruncateProps, type MotionPolicy, MotionProvider, type MotionProviderProps, Note, type NoteAction, type NoteProps, NotificationBadge, type NotificationBadgeProps, NumberField, type NumberFieldProps, type OrbMode, type OrbSize, OtpField, type OtpFieldProps, OverflowMenu, type OverflowMenuProps, PageHeader, type PageHeaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Panel, PanelGroup, PanelResizer, type PanelResizerProps, PanelSection, type PanelWidthBounds, Phone, type PhoneProps, PieChart, type PieChartProps, Pill, type PillProps, Popover, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Presence, type PresenceProps, type Presentation, PresentationProvider, Progress, ProgressIndicator, ProgressLabel, type ProgressSize, ProgressTrack, ProgressValue, PropertyPair, PropertyRow, RadarChart, type RadarChartProps, RadialChart, type RadialChartProps, Radio, RadioCard, type RadioCardProps, type RadioCardTone, RadioGroup, RelativeTime, type RelativeTimeProps, Reveal, type RevealProps, type Rgb, SABLE_UI_VERSION, SEGMENTED_BAR_TONES, STATUS_TONES, STATUS_TONE_ICON, type ScrollCommandOptions, Scroller, type ScrollerProps, ScrubField, type ScrubFieldProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedBar, type SegmentedBarProps, type SegmentedBarSegment, type SegmentedBarTone, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps$3 as SeparatorProps, SettingsMenu, type SettingsMenuProps, SettingsRow, type SettingsRowProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetList, SheetPortal, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, SideNav, type SideNavActiveVariant, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, type SideNavSize, Sidebar, SidebarBrand, type SidebarBrandProps, SidebarFooter, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarProps, SimpleTooltip, Skeleton, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, type SparklineProps, Spinner, type SpinnerProps, StatusBar, StatusBarGroup, StatusBarSeparator, StatusDot, type StatusDotProps, type StatusTone, type StepStatus, Stepper, StepperItem, type StepperItemProps, type StepperOrientation, type StepperProps, StreamingText, type StreamingTextProps, Switch, TRANSPARENT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, type TextRevealProps, Textarea, type TextareaProps, ThemeId, ThemeManifest, ThemeMode$1 as ThemeManifestMode, type ThemeMode, ThemePreview, type ThemePreviewProps, ThemeSelector, type ThemeSelectorProps, ThemeSwitcher, type ThemeSwitcherProps, ThinkingOrb, type ThinkingOrbProps, ToastAction, type ToastApi, ToastClose, ToastContent, ToastDescription, type ToastManagerApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, ToastRoot, ToastTitle, type ToastType, ToastViewport, Toggle, ToggleGroup, type ToggleGroupAppearance, Toggle as ToggleGroupItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarInput, type ToolbarInputProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Tree, TreeAddRow, TreeEmpty, TreeRow, TreeSection, type UseCopyOptions, type UseCopyResult, type UseInViewOptions, type UsePanelWidthOptions, Video, type VideoProps, ViewTransitionName, type ViewTransitionNameProps, Workspace, WorkspaceBar, WorkspaceCanvas, accordionMeta, appHeaderMeta, appShellMeta, areaChartMeta, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bannerMeta, bannerVariants, barChartMeta, bottomNavMeta, breadcrumbsMeta, browserMeta, bubbleMeta, buttonMeta, buttonVariants, calendarMeta, cardMeta, carouselMeta, chartColor, toneColor as chartToneColor, chatComposerMeta, checkboxCardMeta, checkboxMeta, cn, codeBlockMeta, codeMeta, collapsibleMeta, colorFieldMeta, comboboxMeta, commandMenuMeta, componentGuidance, componentLabel, componentSlug, componentsInGroup, contextCardMeta, contextMenuMeta, dataTableMeta, datePickerMeta, dateTileMeta, destructiveActionModalMeta, dialogMeta, disclosurePickerMeta, emptyStateMeta, entityMeta, feedbackMeta, fieldsetMeta, fileDropzoneMeta, fileDropzoneVariants, fontPickerMeta, formMeta, formatFileSize, formatHex, glidingHighlightMeta, gradientArtMeta, hsvToRgb, hueColor, inlineStatusMeta, inputMeta, isTransparent, kbdMeta, labelMeta, lineChartMeta, markerMeta, marqueeMeta, mediaImageMeta, mediaTileMeta, menuMeta, messageMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, middleTruncateMeta, noteMeta, noteVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, numberFieldMeta, otpFieldMeta, overflowMenuMeta, pageHeaderMeta, pageLoaderMeta, paginationMeta, panelGroupMeta, panelSectionMeta, parseHex, phoneMeta, pieChartMeta, pillMeta, pillVariants, popoverMeta, progressMeta, progressTrackVariants, radarChartMeta, radialChartMeta, radioCardMeta, radioMeta, relativeTimeMeta, rgbToHsv, scrollerMeta, scrubFieldMeta, searchInputMeta, sectionHeaderMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, selectMeta, separatorMeta, settingsMenuMeta, sheetMeta, sheetVariants, showMoreMeta, sideNavMeta, sidebarMeta, skeletonMeta, sliderMeta, sparklineMeta, spinnerMeta, startViewTransition, statusBarMeta, statusDotMeta, statusDotVariants, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, streamingTextMeta, supportsViewTransitions, switchMeta, tableMeta, tabsMeta, textareaMeta, themeSelectorMeta, themeSwitcherMeta, thinkingOrbMeta, toast, toastMeta, toggleMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, tooltipMeta, treeIndent, treeMeta, useAnchoredDensity, useComboboxFilteredItems, useCommandMenuShortcut, useCopy, useDensity, useDisclosurePicker, useInView, useMotion, usePanelWidth, usePresentation, useReducedMotion, useScrollActivity, useSidebar, useToast, useToastManager, useTypeTier, videoMeta, workspaceMeta };
|
package/dist/index.js
CHANGED
|
@@ -160,7 +160,7 @@ import { PresentationProvider, usePresentation } from "./lib/presentation.js";
|
|
|
160
160
|
import { useScrollActivity } from "./lib/use-scroll-activity.js";
|
|
161
161
|
import { useCopy } from "./lib/use-copy.js";
|
|
162
162
|
import { STATUS_TONES, STATUS_TONE_ICON } from "./lib/status-tone.js";
|
|
163
|
-
var SABLE_UI_VERSION = "0.
|
|
163
|
+
var SABLE_UI_VERSION = "0.8.0";
|
|
164
164
|
export {
|
|
165
165
|
ART_TOKENS,
|
|
166
166
|
CHART_SERIES_COUNT,
|
package/dist/lib/heading-row.js
CHANGED
|
@@ -9,11 +9,12 @@ function HeadingRow({
|
|
|
9
9
|
titleClassName,
|
|
10
10
|
band,
|
|
11
11
|
leading,
|
|
12
|
-
actions
|
|
12
|
+
actions,
|
|
13
|
+
titleBasis = "basis-48"
|
|
13
14
|
}) {
|
|
14
15
|
const hasControls = Boolean(leading || actions);
|
|
15
16
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-start justify-between gap-x-3 gap-y-2", children: [
|
|
16
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1
|
|
17
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 flex-1 items-start gap-2", titleBasis), children: [
|
|
17
18
|
leading ? /* @__PURE__ */ jsx("div", { className: cn("shrink-0", BLEED_FIRST_START), children: leading }) : null,
|
|
18
19
|
title ? /* @__PURE__ */ jsx(
|
|
19
20
|
Title,
|
package/dist/lib/trim-label.js
CHANGED
|
@@ -7,12 +7,25 @@ function trimLabel(children) {
|
|
|
7
7
|
}
|
|
8
8
|
if (children == null || typeof children === "boolean") return children;
|
|
9
9
|
if (isValidElement(children)) return children;
|
|
10
|
+
const out = [];
|
|
11
|
+
let run = [];
|
|
10
12
|
let wrapped = false;
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
+
const flush = () => {
|
|
14
|
+
if (!run.length) return;
|
|
13
15
|
wrapped = true;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
out.push(
|
|
17
|
+
/* @__PURE__ */ jsx("span", { className: "sable-label-trim", children: run.join("") }, `label-${out.length}`)
|
|
18
|
+
);
|
|
19
|
+
run = [];
|
|
20
|
+
};
|
|
21
|
+
for (const child of Children.toArray(children)) {
|
|
22
|
+
if (typeof child === "string" || typeof child === "number") run.push(child);
|
|
23
|
+
else {
|
|
24
|
+
flush();
|
|
25
|
+
out.push(child);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
flush();
|
|
16
29
|
return wrapped ? out : children;
|
|
17
30
|
}
|
|
18
31
|
export {
|
package/dist/styles.css
CHANGED
|
@@ -375,9 +375,15 @@
|
|
|
375
375
|
|
|
376
376
|
/* The Switch knob when OFF: light in BOTH modes, like every physical toggle.
|
|
377
377
|
It used to be `--background`, which in a dark theme is a near-black knob on
|
|
378
|
-
a dark track (well under 3:1).
|
|
379
|
-
the ink every theme already tunes against its primary fill. */
|
|
378
|
+
a dark track (well under 3:1). */
|
|
380
379
|
--switch-thumb: var(--theme-switch-thumb, oklch(99% 0.002 90));
|
|
380
|
+
/* ON, the knob stays white too. It used to take `--primary-foreground`, the
|
|
381
|
+
ink tuned for LABELS on the primary fill, so a mid-light brand colour that
|
|
382
|
+
needs dark text gave a dark knob, which no switch has. A knob is a shape, not
|
|
383
|
+
text: the track carries the state, and the knob only has to separate from
|
|
384
|
+
it, which white does on any track short of near-white. So it turns dark
|
|
385
|
+
only on a track lighter than L 0.9 (the near-white primary of a dark mode). */
|
|
386
|
+
--switch-thumb-on: var(--theme-switch-thumb-on, oklch(from var(--primary) clamp(0.25, calc((0.9 - l) * 1000), 0.99) 0.002 90));
|
|
381
387
|
|
|
382
388
|
/* The contact shadow under a knob: the Switch thumb, the Slider thumb, the
|
|
383
389
|
ColorField handle. NOT the elevation ladder. `shadow-sm` is a surface's
|
|
@@ -1522,6 +1528,25 @@
|
|
|
1522
1528
|
visibility utilities the app-shell components already use.
|
|
1523
1529
|
========================================================================== */
|
|
1524
1530
|
|
|
1531
|
+
/* Each element owns its breakpoint values. Custom properties inherit, so a
|
|
1532
|
+
breakpoint a nested Grid or Col leaves unset read its ancestor's: a `cols={2}`
|
|
1533
|
+
Grid inside `Columns count={{ lg: 12 }}` drew 12 tracks at lg. Resetting
|
|
1534
|
+
them here makes an unset one invalid, so the fallback chain below runs on the
|
|
1535
|
+
element itself; the values it was given are inline and win over this. */
|
|
1536
|
+
[data-sable-col] {
|
|
1537
|
+
--col-span-base: initial; --col-span-sm: initial; --col-span-md: initial;
|
|
1538
|
+
--col-span-lg: initial; --col-span-xl: initial; --col-span-2xl: initial;
|
|
1539
|
+
--col-start-base: initial; --col-start-sm: initial; --col-start-md: initial;
|
|
1540
|
+
--col-start-lg: initial; --col-start-xl: initial; --col-start-2xl: initial;
|
|
1541
|
+
}
|
|
1542
|
+
[data-sable-grid-cols] {
|
|
1543
|
+
--cols-base: initial; --cols-sm: initial; --cols-md: initial;
|
|
1544
|
+
--cols-lg: initial; --cols-xl: initial; --cols-2xl: initial;
|
|
1545
|
+
}
|
|
1546
|
+
[data-sable-split] {
|
|
1547
|
+
--split-gap: initial;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1525
1550
|
/* `Col span={{ base, md, lg }}` / `start={…}` — each breakpoint resolves to the
|
|
1526
1551
|
most specific value defined at or below it (mobile-first cascade). */
|
|
1527
1552
|
[data-sable-col] {
|
|
@@ -31,7 +31,7 @@ Use Breadcrumbs to show the user's location inside a hierarchy and provide light
|
|
|
31
31
|
| Name | Type | Description |
|
|
32
32
|
| --- | --- | --- |
|
|
33
33
|
| BreadcrumbItem | ComponentPropsWithRef<'li'> | A single crumb slot (<li>) holding a link or the current page. |
|
|
34
|
-
| BreadcrumbLink | ComponentPropsWithRef<'a'> | An interactive ancestor crumb (<a>). Muted by default, brightens to foreground on hover/focus. |
|
|
34
|
+
| BreadcrumbLink | ComponentPropsWithRef<'a'> & { render?: useRender.RenderProp } | An interactive ancestor crumb (<a>). Muted by default, brightens to foreground on hover/focus. render composes another element with the crumb's styling, e.g. a router link: render={<Link to="/library" />}, so navigating stays in the app. |
|
|
35
35
|
| BreadcrumbPage | ComponentPropsWithRef<'span'> | The current-page crumb (<span aria-current="page">). Non-interactive, full-contrast. |
|
|
36
36
|
| BreadcrumbSeparator | ComponentPropsWithRef<'li'> + { children? } | Decorative divider (<li aria-hidden>) between crumbs. Defaults to a chevron-right icon; pass children to swap the glyph. |
|
|
37
37
|
|
|
@@ -13,6 +13,7 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
|
|
|
13
13
|
### Best practices
|
|
14
14
|
|
|
15
15
|
- Do: Use a single primary button in a view or dense panel so the action hierarchy stays obvious.
|
|
16
|
+
- Do: For a copy control, pair an icon Button with `useCopy(text, { timeout? })`. It takes the text when the hook is called and returns `{ copy, copied }`; `copy()` takes no argument, so pass the value the button copies to the hook, not to `copy`.
|
|
16
17
|
- Do: Write labels as actions, such as "Save changes" or "Delete draft", instead of vague labels like "OK".
|
|
17
18
|
- Do: Use loading with loadingLabel for async work so the action cannot double-fire and the state is announced.
|
|
18
19
|
- Do: Put icons in iconStart / iconEnd rather than as children, so the button applies its optical padding. Start icons say what the action is (plus, share); end icons say where it goes (chevron-right, external).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** stable
|
|
4
4
|
|
|
5
|
-
The input half of a conversation: one surface holding attachments, an auto-growing field, and its controls. Enter sends, Shift+Enter breaks the line, and send becomes stop while a reply streams.
|
|
5
|
+
The input half of a conversation: one surface holding attachments, an auto-growing field, and its controls. Enter sends, Shift+Enter breaks the line (sendOn="mod-enter" swaps them for long-form replies), and send becomes stop while a reply streams.
|
|
6
6
|
|
|
7
7
|
**Keywords:** chat input, composer, message input, prompt input, send message, ai chat, support chat, textarea
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ Pairs with MessageScroller to make a working chat. A single surface rather than
|
|
|
19
19
|
- Do: Building a docked agent panel inside a tool? Wrap the whole conversation — scroller, messages and composer — in `<Density value="compact">`. The entire set follows the workspace register from there: prose drops a tier, the rhythm tightens, and the controls come off the compact ladder. Do not hand-size it at the call site.
|
|
20
20
|
- Don't: Do not clear a controlled composer for the user on send. Only the caller knows whether the send succeeded, and clearing on their behalf loses the message when it did not.
|
|
21
21
|
- Don't: Do not add your own Enter-to-send handler on top. The built-in one already guards against firing mid-IME-composition, which is the line hand-rolled chat inputs miss.
|
|
22
|
-
- Don't: Do not use it as a general multi-line input. That is `Textarea
|
|
22
|
+
- Don't: Do not use it as a general multi-line input inside a larger form. That is `Textarea`. A standalone reply box that sends multi-paragraph messages (email, support replies) is this one with sendOn="mod-enter".
|
|
23
23
|
- Don't: Do not override the field's type utility to make it match your transcript. The field and `Bubble` both read the same tier already, which is what stops a message changing size the moment it is sent — overriding one breaks that pairing.
|
|
24
24
|
- Don't: Do not remove the height cap to let the field grow without limit. A pasted essay would push the conversation off the screen; past the cap it scrolls.
|
|
25
25
|
|
|
@@ -41,6 +41,7 @@ Pairs with MessageScroller to make a working chat. A single surface rather than
|
|
|
41
41
|
| onValueChange | (value: string) => void | — | Notified on every keystroke. Required when `value` is supplied. |
|
|
42
42
|
| onSend | (value: string) => void | — | Called with the trimmed message. An uncontrolled composer clears itself afterwards; a controlled one is the caller's to clear. |
|
|
43
43
|
| placeholder | string | "Send a message…" | Placeholder for the field. |
|
|
44
|
+
| sendOn | "enter" \| "mod-enter" | "enter" | Which key sends. enter for chat (Shift+Enter breaks the line). mod-enter for long-form replies such as an email or a support answer: Enter breaks the line and Cmd/Ctrl+Enter sends, so a paragraph break never mails a draft. Say so in footer ("Cmd+Enter to send"). |
|
|
44
45
|
| busy | boolean | false | A reply is streaming. Disables send, and swaps it for a stop control when `onStop` is supplied. |
|
|
45
46
|
| onStop | () => void | — | Interrupt the in-flight reply. Supplying it turns send into stop while busy. |
|
|
46
47
|
| disabled | boolean | false | Block sending entirely — over a limit, disconnected, read-only thread. Distinct from `busy`, which is temporary and offers a way out (stop). |
|
|
@@ -44,7 +44,7 @@ Use CommandMenu for global or contextual keyboard-driven actions: navigation, cr
|
|
|
44
44
|
| useCommandMenuShortcut | (onShortcut: (event: KeyboardEvent) => void, key?: string \| false) => void | The page-wide ⌘K / Ctrl+K listener CommandMenuTrigger installs, for a palette with no visible trigger. Ignored while focus is in a text field, textarea, select or contenteditable (Ctrl+K belongs to the field there) except the palette's own input, so the callback may toggle. It calls preventDefault() on a match and skips an event already prevented, so two listeners on one page fire once. key defaults to "k"; false turns it off. Removed on unmount. |
|
|
45
45
|
| CommandMenuPanel | { items?: CommandItem[]; query?: string; onQueryChange?: (query: string) => void; filter?: CommandFilter; listClassName?: string; placeholder?: string; emptyMessage?: string; title?: string; scope?: ReactNode; inputProps?: ComponentProps<'input'>; className?: string; children?: ReactNode } | The palette rendered in place: the same search header, filtered and grouped listbox, keyboard model and result-count live region, on a static card (border-border, bg-card, no shadow) instead of in a Dialog. Takes every CommandMenu prop except open, onOpenChange, finalFocus and description; className lands on the card, title names the listbox. Focus is not trapped and the input does not take focus on mount (inputProps.autoFocus opts in). Esc clears the query, and passes through once it is empty, so a Popover around the panel still closes. A chosen row runs its onSelect and the panel stays as it was. The page-wide shortcut does not fire from its input. |
|
|
46
46
|
| CommandMenuGroup | { label: string; children } | A labelled group of command rows. |
|
|
47
|
-
| CommandMenuItem | { onSelect?: () => void; icon?: string; detail?: ReactNode; hint?: ReactNode; disabled?: boolean; id?: string; children } | A selectable row. Self-filters by its text (unless the root was given a filter), runs onSelect, then closes the palette. detail is secondary text after the label; hint is the end-aligned trailing slot — a shortcut, a count, or a disabled row's reason. A disabled row stays listed, stays announced, and stays reachable by arrow key so its reason can be read, but is inert to Enter and to a click. |
|
|
47
|
+
| CommandMenuItem | { onSelect?: () => void; icon?: string; detail?: ReactNode; stacked?: boolean; hint?: ReactNode; disabled?: boolean; id?: string; children } | A selectable row. Self-filters by its text (unless the root was given a filter), runs onSelect, then closes the palette. detail is secondary text after the label, or under it with stacked; hint is the end-aligned trailing slot — a shortcut, a count, or a disabled row's reason. A disabled row stays listed, stays announced, and stays reachable by arrow key so its reason can be read, but is inert to Enter and to a click. |
|
|
48
48
|
|
|
49
49
|
## Props
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ Use CommandMenu for global or contextual keyboard-driven actions: navigation, cr
|
|
|
54
54
|
| inputProps | Omit<ComponentProps<'input'>, 'role' \| 'value' \| 'onChange' \| aria-*> | — | Extra props for the search input. `onKeyDown` runs BEFORE the palette's own handling and opts out of a key by calling preventDefault() — which is what makes a scope chip Backspace-dismissable. Running first is deliberate: Backspace happens not to be a key the palette claims today, so a plain passthrough would work until the palette grows a 'Backspace clears the query' affordance, at which point the consumer's behaviour breaks silently. The combobox wiring (role, aria relationships, controlled value) is not overridable; aria-label and className compose. |
|
|
55
55
|
| open | boolean | — | Controlled open state of the palette. |
|
|
56
56
|
| onOpenChange | (open: boolean) => void | — | Called on open/close (select, Esc, outside click). |
|
|
57
|
-
| items | CommandItem[] | — | Data-driven commands ({ group, label, onSelect, id?, icon?, detail?, hint?, disabled? }). Ignored when children are provided. id is optional identity: filter is handed these same objects, so it is how a caller that ranks over its own richer model maps the array back onto it — and it becomes the row's DOM id (namespaced to the palette) and React key, so two rows may share a label. |
|
|
57
|
+
| items | CommandItem[] | — | Data-driven commands ({ group, label, onSelect, id?, icon?, detail?, stacked?, hint?, disabled? }). stacked puts detail on its own line under the label, for results only their detail tells apart (two tickets with one subject); beside a long label an inline detail truncates first. Ignored when children are provided. id is optional identity: filter is handed these same objects, so it is how a caller that ranks over its own richer model maps the array back onto it — and it becomes the row's DOM id (namespaced to the palette) and React key, so two rows may share a label. |
|
|
58
58
|
| query | string | — | Controlled query. Leave undefined to let the palette own it; either way it resets on close (a controlled caller gets onQueryChange('')). |
|
|
59
59
|
| onQueryChange | (query: string) => void | — | Called on every query change. Required to control query, optional otherwise. |
|
|
60
60
|
| filter | ((items: CommandItem[], query: string) => CommandItem[]) \| null | case-insensitive substring match on label | Replaces or disables the built-in match. A function ranks and filters items itself and its order is kept verbatim; null renders items exactly as given. Either also stops declarative CommandMenuItem children self-filtering. The query arrives raw — trimming and case are policy, and this is the prop that hands policy over. |
|
|
@@ -36,7 +36,11 @@ Use DataTable when a data array and column definition should render a sortable,
|
|
|
36
36
|
| data | Row[] | — | The rows to render. |
|
|
37
37
|
| rowKey | (row, index) => string \| number | index | Stable React key per row. |
|
|
38
38
|
| onRowClick | (row) => void | — | Row click handler — makes rows pointer-interactive. |
|
|
39
|
-
| isRowSelected | (row) => boolean | — | Mark a row visually selected (data-selected). Derive it from a stable id (row.id === selectedId), not the row index, so selection survives re-sorts. |
|
|
39
|
+
| isRowSelected | (row) => boolean | — | Mark a row visually selected (data-selected), e.g. the one open in a detail pane. Derive it from a stable id (row.id === selectedId), not the row index, so selection survives re-sorts. For checking several rows, use selectedKeys. |
|
|
40
|
+
| selectedKeys | ReadonlySet<string \| number> | — | The checked rows, by rowKey, for bulk actions. With onSelectedKeysChange it adds a checkbox column (each box named by rowSelectionLabel) and a select-all box in the header that acts on the rows shown and goes mixed when some are checked. Checked rows get the selected fill. Controlled: when the rows shown change (a filter, another view), set the keys to keep, usually none. Needs rowKey. |
|
|
41
|
+
| onSelectedKeysChange | (keys: Set<string \| number>) => void | — | Called with the new set of checked keys. Its presence turns selection on. A click on a box never fires onRowClick. |
|
|
42
|
+
| rowSelectionLabel | (row) => string | () => "Select row" | A row checkbox's accessible name. Name the row, e.g. (t) => `Select ${t.subject}`, so a screen reader can tell the boxes apart. |
|
|
43
|
+
| selectAllLabel | (count: number) => string | (count) => `Select all ${count} shown` | The select-all checkbox's accessible name; say what it acts on ("Select all 7 tickets shown"). |
|
|
40
44
|
| defaultSort | { key: string; direction: "asc" \| "desc" } | — | Initial sort column + direction. |
|
|
41
45
|
| empty | ReactNode | "No results." | Rendered spanning all columns when data is empty. Pass an EmptyState for the full treatment (icon, title, next step). |
|
|
42
46
|
| caption | ReactNode | — | Bottom table caption. |
|
|
@@ -58,6 +62,34 @@ Use DataTable when a data array and column definition should render a sortable,
|
|
|
58
62
|
|
|
59
63
|
## Examples
|
|
60
64
|
|
|
65
|
+
### Checkbox selection with a bulk-action bar
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { Button, DataTable, Stack, Toolbar } from "@sableui/react"
|
|
69
|
+
|
|
70
|
+
const [selected, setSelected] = useState<Set<string | number>>(new Set())
|
|
71
|
+
|
|
72
|
+
<Stack gap={2}>
|
|
73
|
+
{/* Mounted from the start, so a screen reader hears each change. */}
|
|
74
|
+
<span role="status" className="sr-only">{selected.size ? `${selected.size} of ${tickets.length} selected` : ""}</span>
|
|
75
|
+
{selected.size ? (
|
|
76
|
+
<Toolbar aria-label="Bulk actions">
|
|
77
|
+
<span className="text-label-md">{selected.size} of {tickets.length} selected</span>
|
|
78
|
+
<Button size="sm" variant="secondary" onClick={() => resolve(selected)}>Resolve</Button>
|
|
79
|
+
</Toolbar>
|
|
80
|
+
) : null}
|
|
81
|
+
<DataTable
|
|
82
|
+
data={tickets}
|
|
83
|
+
rowKey={(t) => t.id}
|
|
84
|
+
columns={columns}
|
|
85
|
+
selectedKeys={selected}
|
|
86
|
+
onSelectedKeysChange={setSelected}
|
|
87
|
+
rowSelectionLabel={(t) => `Select ${t.subject}`}
|
|
88
|
+
selectAllLabel={(n) => `Select all ${n} tickets shown`}
|
|
89
|
+
/>
|
|
90
|
+
</Stack>
|
|
91
|
+
```
|
|
92
|
+
|
|
61
93
|
### Sortable columns
|
|
62
94
|
|
|
63
95
|
```tsx
|
package/llms/components/form.md
CHANGED
|
@@ -32,16 +32,17 @@ Use Form and Field as the default wrapper for Sable form controls. Field owns th
|
|
|
32
32
|
|
|
33
33
|
| Name | Type | Description |
|
|
34
34
|
| --- | --- | --- |
|
|
35
|
-
| Field | { label?: ReactNode; description?: ReactNode; error?: ReactNode; required?: boolean; disabled?: boolean; name?: string; validate?: (value, formValues) => string \| string[] \| null \| Promise<…>; validationMode?: "onSubmit" \| "onBlur" \| "onChange"; validationDebounceTime?: number; orientation?: "vertical" \| "horizontal"; className?: string; children: ReactElement } | Wraps a single control element (e.g. <Input />) on Base UI Field and wires label (htmlFor + aria-labelledby), helper text and error (aria-describedby), aria-invalid, and required onto it automatically. Base UI-backed controls (Input, Textarea, Select, Combobox, NumberField, Checkbox, Switch, Slider, OtpField…) register through context; the child is also cloned so plain elements keep the same wiring. error renders a destructive message and takes precedence; without it the slot shows Base UI's validation message
|
|
35
|
+
| Field | { label?: ReactNode; description?: ReactNode; error?: ReactNode; required?: boolean; messages?: Partial<Record<"valueMissing" \| "typeMismatch" \| "patternMismatch" \| "tooShort" \| "tooLong" \| "rangeUnderflow" \| "rangeOverflow" \| "stepMismatch" \| "badInput", ReactNode>>; disabled?: boolean; name?: string; validate?: (value, formValues) => string \| string[] \| null \| Promise<…>; validationMode?: "onSubmit" \| "onBlur" \| "onChange"; validationDebounceTime?: number; orientation?: "vertical" \| "horizontal"; className?: string; children: ReactElement } | Wraps a single control element (e.g. <Input />) on Base UI Field and wires label (htmlFor + aria-labelledby), helper text and error (aria-describedby), aria-invalid, and required onto it automatically. Base UI-backed controls (Input, Textarea, Select, Combobox, NumberField, Checkbox, Switch, Slider, OtpField…) register through context; the child is also cloned so plain elements keep the same wiring. error renders a destructive message and takes precedence; without it the slot shows the field's messages entry for the native constraint that failed (messages={{ valueMissing: "Enter a subject." }}), else Base UI's validation message (the browser's wording for a native constraint, validate, or Form errors). required adds the native attribute plus a visual asterisk (defaults to false). disabled disables the control and dims the label. name keys the field in Form errors / onFormSubmit. validationMode overrides the Form's. orientation defaults to "vertical" (label → control); "horizontal" places control then label inline for a single checkbox / switch / radio — the control centres on the label's first line (it stays there when the label wraps) and description/error sit in the label's column. The root, label, description, error and control carry data-invalid / data-valid, data-touched, data-dirty, data-filled, data-focused and data-disabled for state styling. |
|
|
36
36
|
|
|
37
37
|
## Props
|
|
38
38
|
|
|
39
39
|
| Name | Type | Default | Description |
|
|
40
40
|
| --- | --- | --- | --- |
|
|
41
|
-
| Form | { validationMode?: "onSubmit" \| "onBlur" \| "onChange"; errors?: Record<string, string \| string[]>; onFormSubmit?: (values, details) => void; actionsRef?: RefObject<Form.Actions> } + ComponentPropsWithRef<"form"> | — | A <form> laid out as a vertical column with comfortable field spacing (override with className, e.g. gap-4). On submit it validates every Field (native constraints plus Field validate), shows each message under its field, focuses the first invalid control, and only then calls onSubmit. validationMode defaults to "onSubmit" (then live re-validation on change). errors shows external (e.g. server) messages keyed by Field name and clears one when its field is edited. onFormSubmit receives the named Field values and prevents the native submit. A control outside any Field is still checked by the browser before onSubmit runs
|
|
41
|
+
| Form | { validationMode?: "onSubmit" \| "onBlur" \| "onChange"; errors?: Record<string, string \| string[]>; onFormSubmit?: (values, details) => void; actionsRef?: RefObject<Form.Actions> } + ComponentPropsWithRef<"form"> | — | A <form> laid out as a vertical column with comfortable field spacing (override with className, e.g. gap-4). On submit it validates every Field (native constraints plus Field validate), shows each message under its field, focuses the first invalid control, and only then calls onSubmit. validationMode defaults to "onSubmit" (then live re-validation on change). errors shows external (e.g. server) messages keyed by Field name and clears one when its field is edited. onFormSubmit receives the named Field values and prevents the native submit. A control outside any Field is still checked by the browser before onSubmit runs. Validating in your own code (react-hook-form, a schema, state)? Pass noValidate: onSubmit always runs and each Field shows the error you set; without it an empty required Field stops the submit before your handler can set that error. |
|
|
42
42
|
| validationMode | "onSubmit" \| "onBlur" \| "onChange" | "onSubmit" | When Fields validate. After the first submit, fields re-check as the user edits. A Field's own validationMode wins. |
|
|
43
43
|
| errors | Record<string, string \| string[]> | — | External (e.g. server) messages keyed by Field name, shown under that field. Each clears when its field is edited. |
|
|
44
44
|
| onFormSubmit | (values: Record<string, unknown>, details) => void | — | Called with the named Field values after validation passes; prevents the native submit. |
|
|
45
|
+
| noValidate | boolean | false | Your code owns validation: nothing is checked before onSubmit (neither the Fields nor the browser), so it always runs and each Field shows the error you pass. required Fields keep their asterisk and aria-required. validationMode, errors, onFormSubmit and actionsRef do nothing with it. |
|
|
45
46
|
| actionsRef | RefObject<{ validate(name?: string): void }> | — | Imperative handle to validate every field, or one by name. |
|
|
46
47
|
|
|
47
48
|
## Tokens used
|
|
@@ -78,6 +79,22 @@ import { Field, Input } from "@sableui/react"
|
|
|
78
79
|
<Field label="Password" error="Must be at least 8 characters."><Input type="password" /></Field>
|
|
79
80
|
```
|
|
80
81
|
|
|
82
|
+
### Your own wording for a missing value
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
import { Button, Field, Form, Input } from "@sableui/react"
|
|
86
|
+
|
|
87
|
+
<Form onSubmit={handleSubmit}><Field label="Subject" required messages={{ valueMissing: "Enter a subject." }}><Input name="subject" /></Field><Button type="submit">Send</Button></Form>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Validation in your own code
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { Button, Field, Form, Input } from "@sableui/react"
|
|
94
|
+
|
|
95
|
+
<Form noValidate onSubmit={handleSubmit}><Field label="Subject" required error={errors.subject}><Input name="subject" /></Field><Button type="submit">Send</Button></Form>
|
|
96
|
+
```
|
|
97
|
+
|
|
81
98
|
### Validated on submit
|
|
82
99
|
|
|
83
100
|
```tsx
|
|
@@ -35,7 +35,7 @@ The scroll region a conversation lives in. It owns the scrolling and nothing els
|
|
|
35
35
|
|
|
36
36
|
| Name | Type | Default | Description |
|
|
37
37
|
| --- | --- | --- | --- |
|
|
38
|
-
| ref | Ref<MessageScrollerHandle> | — | Imperative commands, not the DOM node: `scrollToBottom(opts)`, `scrollToTop(opts)`, `scrollToMessage(id, opts)` (returns false when the message is not rendered), `isFollowing()`, and `element` for the scrolling node itself. |
|
|
38
|
+
| ref | Ref<MessageScrollerHandle> | — | Imperative commands, not the DOM node: `scrollToBottom(opts)`, `scrollToTop(opts)`, `scrollToMessage(id, opts)` (returns false when the message is not rendered), `isFollowing()`, and `element` for the scrolling node itself. `opts` is `ScrollCommandOptions`: `{ animate?: boolean }` (default true, and off whenever motion is), not the DOM's `behavior`. |
|
|
39
39
|
| autoFollow | boolean | true | Keep the newest message in view as content arrives, until the reader scrolls away from the bottom. Set false for a transcript that must never move under the reader. |
|
|
40
40
|
| followThreshold | number | 64 | Distance from the bottom, in px, that still counts as following. A band rather than a pixel, so a token arriving mid-frame does not flicker the state. |
|
|
41
41
|
| onFollowChange | (following: boolean) => void | — | Notified when the viewport pins to, or releases from, the newest message. |
|
|
@@ -25,7 +25,7 @@ Use PageHeader to establish a page's title, supporting description, and primary
|
|
|
25
25
|
| title | ReactNode | — | The page title (renders an <h1>). |
|
|
26
26
|
| description | ReactNode | — | Supporting copy beneath the title. |
|
|
27
27
|
| back | ReactNode | — | Leading element before the title — typically a back control on drill-in routes. Keep it a ghost icon Button (size="icon", variant="ghost", aria-label="Back") so it stays quieter than the title. A ghost back control bleeds by its inset at the start, so its glyph lines up with the content edge below (Button bleed="none" opts out). |
|
|
28
|
-
| actions | ReactNode | — | Trailing actions aligned to the title row's end. They drop under the title when the
|
|
28
|
+
| actions | ReactNode | — | Trailing actions aligned to the title row's end. They drop under the title when the title would have less than 20rem beside them (on a phone, nearly always), and the title wraps rather than truncating. A ghost or link Button at either end of the group bleeds by its own padding, so its label meets the content edge (the end on the title row, the start once wrapped); filled buttons keep their edge on the line. Direct children only. |
|
|
29
29
|
| titleAs | "h1" \| "h2" | "h1" | The title's heading element. Keep h1 — the route's one h1. Use h2 only when something above already owns the h1: a shell that renders the route title, or a page showing a PageHeader as an example. |
|
|
30
30
|
|
|
31
31
|
## Tokens used
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** stable
|
|
4
4
|
|
|
5
|
-
A compact trigger that states the current settings, over a menu of rows that change them. Each row shows its own value and opens a submenu.
|
|
5
|
+
A compact trigger that states the current settings, over a menu of rows that change them. Each row shows its own value and opens a submenu; with one setting, the menu opens straight to its options under the row's label.
|
|
6
6
|
|
|
7
7
|
**Keywords:** settings, model picker, model switcher, options menu, preferences, submenu, quality settings, ai chat
|
|
8
8
|
|
|
@@ -28,6 +28,7 @@ Use Sidebar for persistent desktop navigation or application chrome outside the
|
|
|
28
28
|
|
|
29
29
|
| Name | Type | Description |
|
|
30
30
|
| --- | --- | --- |
|
|
31
|
+
| SidebarHeader | div props | The top of the rail, at least 64px tall. It holds SidebarBrand and may take a second row under it, such as a search field or a notifications button: give that row basis-full and the header grows to hold it instead of clipping. |
|
|
31
32
|
| SidebarBrand | { mark: ReactNode; label: ReactNode; render?: useRender.RenderProp } + div props | The brand row, inside SidebarHeader, on the same grid as SidebarItem: mark in the icons' 24px slot, label on the labels' column, so a logo lines up with the nav below it without copying the rail's inset numbers. Collapsed, it shows the mark alone (named by a string label). render={<Link to="/" />} makes it the home link. |
|
|
32
33
|
| SidebarItem | { label: ReactNode; icon?: ReactNode; active?: boolean; badge?: ReactNode; render?: useRender.RenderProp } + button props | A single nav row. label is the row text (inline when expanded, in a hover tooltip when collapsed); icon is the leading icon node (the consumer swaps fill weight for the active state); active marks the current route (accent fill + aria-current="page"); badge is a trailing node (e.g. a count) pushed to the row end and hidden when collapsed; render composes another element, e.g. render={<Link to="/x" />}. |
|
|
33
34
|
|