@sableui/react 0.8.2 → 0.9.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 +1 -1
- package/CHANGELOG.md +83 -0
- package/bin/sable.mjs +26 -11
- package/dist/blocks/index.d.ts +1 -1
- package/dist/components/app-shell/app-shell.js +2 -12
- package/dist/components/app-shell/app-shell.meta.js +22 -0
- package/dist/components/app-shell/index.js +2 -0
- package/dist/components/app-shell/skip-link.js +28 -0
- package/dist/components/button/button.js +35 -8
- package/dist/components/button/button.meta.js +6 -1
- package/dist/components/card/card.meta.js +1 -1
- package/dist/components/command-menu/command-menu.js +27 -2
- package/dist/components/date-tile/date-tile.meta.js +1 -0
- package/dist/components/feedback/feedback.meta.js +1 -0
- package/dist/components/fieldset/fieldset.js +22 -13
- package/dist/components/fieldset/fieldset.meta.js +25 -1
- package/dist/components/form/form.js +45 -9
- package/dist/components/form/form.meta.js +12 -3
- package/dist/components/media-tile/media-tile.js +16 -2
- package/dist/components/media-tile/media-tile.meta.js +8 -0
- package/dist/components/radio-card/radio-card.js +6 -2
- package/dist/components/radio-card/radio-card.meta.js +5 -0
- package/dist/components/sheet/sheet.js +1 -0
- package/dist/components/stepper/stepper.js +7 -2
- package/dist/components/stepper/stepper.meta.js +1 -1
- package/dist/components/toast/toast.js +2 -0
- package/dist/file-hashes.json +28 -27
- package/dist/index.d.ts +109 -22
- package/dist/index.js +1 -1
- package/dist/{meta-CcE_SeFu.d.ts → meta-DVG8ceze.d.ts} +9 -0
- package/dist/patterns/index.d.ts +1 -1
- package/dist/styles.css +30 -0
- package/llms/components/app-shell.md +26 -0
- package/llms/components/button.md +2 -1
- package/llms/components/card.md +1 -1
- package/llms/components/fieldset.md +21 -1
- package/llms/components/form.md +11 -2
- package/llms/components/media-tile.md +32 -0
- package/llms/components/radio-card.md +1 -0
- package/llms/components/stepper.md +1 -1
- package/llms/tasks/creating-a-preset.md +4 -1
- package/llms-full.txt +99 -7
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/registry.json +89 -10
- package/scripts/grade.mjs +14 -3
- package/scripts/sources.mjs +10 -2
- package/skills/sable/SKILL.md +23 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
-
import { C as ComponentMeta } from './meta-
|
|
3
|
-
export { A as AnatomyMeta, a as BestPracticeMeta, E as ExampleMeta, M as MotionMeta, b as MotionSlot, c as PropMeta, R as RelatedMeta, S as SubcomponentMeta, U as UsageMeta } from './meta-
|
|
2
|
+
import { C as ComponentMeta } from './meta-DVG8ceze.js';
|
|
3
|
+
export { A as AnatomyMeta, a as BestPracticeMeta, E as ExampleMeta, M as MotionMeta, b as MotionSlot, c as PropMeta, R as RelatedMeta, S as SubcomponentMeta, U as UsageMeta } from './meta-DVG8ceze.js';
|
|
4
4
|
import { T as ThemeManifest, a as ThemeMode$1 } from './_contract-C2M1SjBf.js';
|
|
5
5
|
export { A as ART_TOKENS, D as DENSITY_TOKENS, b as DensityToken, M as MOTION_TOKENS, c as MotionToken, R as RADIUS_TOKENS, d as RadiusToken, S as SEMANTIC_TOKENS, e as SemanticToken, f as TYPE_OVERLINE_TOKENS, g as TYPE_REFINEMENT_TOKENS, h as TYPE_SCALE_TOKENS, i as TYPE_UI_TOKENS, j as TypeOverlineToken, k as TypeRefinementToken, l as TypeScaleToken, m as TypeUiToken, W as WORKSPACE_SURFACE_TOKENS, n as WorkspaceSurfaceToken } from './_contract-C2M1SjBf.js';
|
|
6
6
|
import { T as ThemeId } from './theme-provider-S0NVJs2Y.js';
|
|
@@ -9,7 +9,7 @@ export { AspectBox, AspectBoxProps, Bleed, BleedProps, Breakpoint, Center, Cente
|
|
|
9
9
|
export { Icon, IconContextValue, IconProps, IconProvider, IconProviderProps, composeIconSets, useIconSet } from './icon/index.js';
|
|
10
10
|
export { a as IconRenderProps, I as IconSet, b as IconVariant } from './registry-CyL28OzJ.js';
|
|
11
11
|
import * as react from 'react';
|
|
12
|
-
import { ReactNode, ComponentPropsWithoutRef, ElementType, ReactElement, Ref, ComponentPropsWithRef, ComponentProps } from 'react';
|
|
12
|
+
import { ReactNode, ComponentPropsWithoutRef, ElementType, ReactElement, Ref, ComponentPropsWithRef, MouseEvent, ComponentProps, FormEvent } from 'react';
|
|
13
13
|
import { VariantProps } from 'class-variance-authority';
|
|
14
14
|
import { useRender } from '@base-ui/react/use-render';
|
|
15
15
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -351,17 +351,24 @@ declare const buttonVariants: (props?: ({
|
|
|
351
351
|
size?: "icon" | "sm" | "md" | "xs" | "cta" | "icon-sm" | "icon-xs" | null | undefined;
|
|
352
352
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
353
353
|
|
|
354
|
-
interface ButtonProps extends ComponentPropsWithRef<"button">, VariantProps<typeof buttonVariants> {
|
|
354
|
+
interface ButtonProps extends Omit<ComponentPropsWithRef<"button">, "onClick">, VariantProps<typeof buttonVariants> {
|
|
355
|
+
/**
|
|
356
|
+
* May return a promise: the button then shows `loading` until it settles and
|
|
357
|
+
* ignores further presses meanwhile, from the first click on (a `busy` flag
|
|
358
|
+
* in React state only takes effect a render later, so three quick clicks
|
|
359
|
+
* all ran).
|
|
360
|
+
*/
|
|
361
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => unknown;
|
|
355
362
|
/**
|
|
356
363
|
* Replace the rendered element or compose with another component
|
|
357
364
|
* (e.g. `render={<a href="…" />}`) through Base UI's render prop.
|
|
358
365
|
*/
|
|
359
366
|
render?: useRender.RenderProp;
|
|
360
367
|
/**
|
|
361
|
-
*
|
|
362
|
-
* Sets `aria-busy
|
|
363
|
-
*
|
|
364
|
-
*
|
|
368
|
+
* Show a leading Spinner while an action is in flight, and ignore presses.
|
|
369
|
+
* Sets `aria-busy` and `aria-disabled`, not the native `disabled`: disabling
|
|
370
|
+
* the focused button dropped focus to the page, so a sheet opened by the
|
|
371
|
+
* action had nowhere to return it. @default false
|
|
365
372
|
*/
|
|
366
373
|
loading?: boolean;
|
|
367
374
|
/** Optional text shown in place of children while loading. */
|
|
@@ -408,7 +415,7 @@ type ButtonBleed = "start" | "end" | "both" | "none";
|
|
|
408
415
|
* Corner radius is theme-driven via `--button-radius` (falls back to full pill) —
|
|
409
416
|
* see `button.variants.ts`.
|
|
410
417
|
*/
|
|
411
|
-
declare function Button({ variant, size, className, render, ref, type, loading, loadingLabel, iconStart, iconEnd, badge, bleed, disabled, children, ...props }: ButtonProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
418
|
+
declare function Button({ variant, size, className, render, ref, type, loading, loadingLabel, iconStart, iconEnd, badge, bleed, disabled, children, onClick, ...props }: ButtonProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
412
419
|
declare namespace Button {
|
|
413
420
|
var displayName: string;
|
|
414
421
|
}
|
|
@@ -2240,7 +2247,10 @@ interface StepperProps extends ComponentPropsWithRef<"ol"> {
|
|
|
2240
2247
|
/**
|
|
2241
2248
|
* `horizontal` for a short flow across the top of a form (checkout, 3–5
|
|
2242
2249
|
* steps); `vertical` for a longer flow or a narrow column, where each step
|
|
2243
|
-
* has room for a description.
|
|
2250
|
+
* has room for a description. Horizontal steps compact themselves when the
|
|
2251
|
+
* stepper is narrower than 28rem (a phone): every disc stays, only the
|
|
2252
|
+
* current step keeps its title on screen, and the others' titles stay for
|
|
2253
|
+
* screen readers.
|
|
2244
2254
|
* @default "horizontal"
|
|
2245
2255
|
*/
|
|
2246
2256
|
orientation?: StepperOrientation;
|
|
@@ -5082,6 +5092,24 @@ declare namespace AppShell {
|
|
|
5082
5092
|
var displayName: string;
|
|
5083
5093
|
}
|
|
5084
5094
|
|
|
5095
|
+
/**
|
|
5096
|
+
* SkipLink — the first stop in the tab order: hidden until focused, then a
|
|
5097
|
+
* small primary button pinned to the top-start corner that jumps past the
|
|
5098
|
+
* header and navigation to the page's main content.
|
|
5099
|
+
*
|
|
5100
|
+
* AppShell renders one already. Use this in a layout of your own (a storefront
|
|
5101
|
+
* with a top header, a marketing page), put it first in the body, and give the
|
|
5102
|
+
* `<main>` the matching id:
|
|
5103
|
+
*
|
|
5104
|
+
* <SkipLink />
|
|
5105
|
+
* <SiteHeader />
|
|
5106
|
+
* <main id="main-content" tabIndex={-1}>…</main>
|
|
5107
|
+
*/
|
|
5108
|
+
declare function SkipLink({ href, children, className, ...props }: ComponentProps<"a">): react.JSX.Element;
|
|
5109
|
+
declare namespace SkipLink {
|
|
5110
|
+
var displayName: string;
|
|
5111
|
+
}
|
|
5112
|
+
|
|
5085
5113
|
declare const appShellMeta: ComponentMeta;
|
|
5086
5114
|
|
|
5087
5115
|
type SidebarContextValue = {
|
|
@@ -5480,12 +5508,29 @@ declare const searchInputMeta: ComponentMeta;
|
|
|
5480
5508
|
*
|
|
5481
5509
|
* Disabling the whole group propagates through Base UI as data-[disabled] on
|
|
5482
5510
|
* the root (native <fieldset disabled> also disables its controls).
|
|
5511
|
+
*
|
|
5512
|
+
* `variant="plain"` drops the surface: a bare group whose legend reads as a
|
|
5513
|
+
* field label, for the question a RadioGroup or a run of checkboxes answers
|
|
5514
|
+
* inside a form that is already framed.
|
|
5515
|
+
*
|
|
5516
|
+
* <Fieldset variant="plain">
|
|
5517
|
+
* <FieldsetLegend>Delivery</FieldsetLegend>
|
|
5518
|
+
* <RadioGroup>…</RadioGroup>
|
|
5519
|
+
* </Fieldset>
|
|
5483
5520
|
*/
|
|
5521
|
+
type FieldsetVariant = "card" | "plain";
|
|
5484
5522
|
type RootProps = Omit<ComponentPropsWithRef<typeof Fieldset$1.Root>, "className"> & {
|
|
5485
5523
|
className?: string;
|
|
5524
|
+
/**
|
|
5525
|
+
* `card` (default) is a bordered, raised section with padded parts. `plain`
|
|
5526
|
+
* is the grouping alone: no border, surface or inset, and a legend in the
|
|
5527
|
+
* field-label style.
|
|
5528
|
+
* @default "card"
|
|
5529
|
+
*/
|
|
5530
|
+
variant?: FieldsetVariant;
|
|
5486
5531
|
};
|
|
5487
|
-
/** The
|
|
5488
|
-
declare function Fieldset({ className, ...props }: RootProps): react.JSX.Element;
|
|
5532
|
+
/** The container. Wraps Base.Root (a native <fieldset>): a raised card surface, or a bare group. */
|
|
5533
|
+
declare function Fieldset({ className, variant, ...props }: RootProps): react.JSX.Element;
|
|
5489
5534
|
declare namespace Fieldset {
|
|
5490
5535
|
var displayName: string;
|
|
5491
5536
|
}
|
|
@@ -5521,7 +5566,13 @@ declare namespace FieldsetFooter {
|
|
|
5521
5566
|
|
|
5522
5567
|
declare const fieldsetMeta: ComponentMeta;
|
|
5523
5568
|
|
|
5524
|
-
interface FormProps extends ComponentPropsWithRef<"form"> {
|
|
5569
|
+
interface FormProps extends Omit<ComponentPropsWithRef<"form">, "onSubmit"> {
|
|
5570
|
+
/**
|
|
5571
|
+
* The native submit handler. It may return a promise: when it (or the
|
|
5572
|
+
* promise) is done, the first control a Field marks invalid takes focus, so
|
|
5573
|
+
* errors your own code sets get the same treatment as Sable's validation.
|
|
5574
|
+
*/
|
|
5575
|
+
onSubmit?: (event: FormEvent<HTMLFormElement>) => unknown;
|
|
5525
5576
|
/**
|
|
5526
5577
|
* When fields validate: `onSubmit` (default — on submit, then live on change
|
|
5527
5578
|
* after the first attempt), `onBlur`, or `onChange`. A Field's own
|
|
@@ -5536,9 +5587,10 @@ interface FormProps extends ComponentPropsWithRef<"form"> {
|
|
|
5536
5587
|
errors?: Form$1.Props["errors"];
|
|
5537
5588
|
/**
|
|
5538
5589
|
* Called with the named Field values (as an object) once every field is
|
|
5539
|
-
* valid. Using it calls `preventDefault()` on the native submit for you.
|
|
5590
|
+
* valid. Using it calls `preventDefault()` on the native submit for you. It
|
|
5591
|
+
* may return a promise, as `onSubmit` may.
|
|
5540
5592
|
*/
|
|
5541
|
-
onFormSubmit?: Form$1.Props["onFormSubmit"];
|
|
5593
|
+
onFormSubmit?: (...args: Parameters<NonNullable<Form$1.Props["onFormSubmit"]>>) => unknown;
|
|
5542
5594
|
/** Imperative actions: `actionsRef.current.validate(name?)`. */
|
|
5543
5595
|
actionsRef?: Form$1.Props["actionsRef"];
|
|
5544
5596
|
/**
|
|
@@ -5577,7 +5629,7 @@ declare namespace Form {
|
|
|
5577
5629
|
}
|
|
5578
5630
|
/** The native constraint flags of `ValidityState` a Field can word itself. */
|
|
5579
5631
|
type ConstraintFlag = "valueMissing" | "typeMismatch" | "patternMismatch" | "tooShort" | "tooLong" | "rangeUnderflow" | "rangeOverflow" | "stepMismatch" | "badInput";
|
|
5580
|
-
interface FieldProps {
|
|
5632
|
+
interface FieldProps extends Omit<ComponentPropsWithRef<"div">, "children" | "title" | "onChange"> {
|
|
5581
5633
|
/** Field label (wired to the control via htmlFor). */
|
|
5582
5634
|
label?: ReactNode;
|
|
5583
5635
|
/** Helper text under the control (wired via aria-describedby). */
|
|
@@ -5621,6 +5673,13 @@ interface FieldProps {
|
|
|
5621
5673
|
* control then the label inline — for a single checkbox / switch / radio.
|
|
5622
5674
|
*/
|
|
5623
5675
|
orientation?: "vertical" | "horizontal";
|
|
5676
|
+
/**
|
|
5677
|
+
* Something at the end of the control's row. Vertically, beside the control:
|
|
5678
|
+
* a promo code's Apply button, with the control taking the rest of the row.
|
|
5679
|
+
* Horizontally, at the end of the label's first line: a facet count or a
|
|
5680
|
+
* price, with the label taking the rest.
|
|
5681
|
+
*/
|
|
5682
|
+
trailing?: ReactNode;
|
|
5624
5683
|
className?: string;
|
|
5625
5684
|
/** The single control element (e.g. `<Input />`, `<Textarea />`, `<Select…>`). */
|
|
5626
5685
|
children: ReactElement;
|
|
@@ -5643,8 +5702,13 @@ interface FieldProps {
|
|
|
5643
5702
|
* <Input />
|
|
5644
5703
|
* </Field>
|
|
5645
5704
|
* <Field label="Subscribe" orientation="horizontal"><Checkbox /></Field>
|
|
5705
|
+
* <Field label="Promo code" trailing={<Button variant="secondary">Apply</Button>}>
|
|
5706
|
+
* <Input />
|
|
5707
|
+
* </Field>
|
|
5708
|
+
*
|
|
5709
|
+
* Other props (`data-*`, `id`, `aria-*`) land on the root element.
|
|
5646
5710
|
*/
|
|
5647
|
-
declare function Field({ label, description, error, required, messages, disabled, name, validate, validationMode, validationDebounceTime, orientation, className, children, }: FieldProps): react.JSX.Element;
|
|
5711
|
+
declare function Field({ label, description, error, required, messages, disabled, name, validate, validationMode, validationDebounceTime, orientation, trailing, className, children, ...props }: FieldProps): react.JSX.Element;
|
|
5648
5712
|
declare namespace Field {
|
|
5649
5713
|
var displayName: string;
|
|
5650
5714
|
}
|
|
@@ -5733,6 +5797,11 @@ type RadioCardProps = Omit<ComponentProps<typeof Radio$1.Root>, "className" | "c
|
|
|
5733
5797
|
title: ReactNode;
|
|
5734
5798
|
/** Optional supporting copy beneath the title. */
|
|
5735
5799
|
description?: ReactNode;
|
|
5800
|
+
/**
|
|
5801
|
+
* End-aligned on the title's line: a price ("$12.00"), a delivery date, a
|
|
5802
|
+
* count. The title takes the rest of the row.
|
|
5803
|
+
*/
|
|
5804
|
+
trailing?: ReactNode;
|
|
5736
5805
|
/**
|
|
5737
5806
|
* Leading icon (e.g. a solid `<Icon>`). Its presence switches the card to the
|
|
5738
5807
|
* two-dimensional layout — icon top-left, indicator top-right, copy below —
|
|
@@ -5755,7 +5824,7 @@ type RadioCardProps = Omit<ComponentProps<typeof Radio$1.Root>, "className" | "c
|
|
|
5755
5824
|
* adding a second selected-state shadow. `value` pairs it with the group's
|
|
5756
5825
|
* selected value.
|
|
5757
5826
|
*/
|
|
5758
|
-
declare function RadioCard({ className, title, description, icon, tone, titleClassName, descriptionClassName, ...props }: RadioCardProps): react.JSX.Element;
|
|
5827
|
+
declare function RadioCard({ className, title, description, trailing, icon, tone, titleClassName, descriptionClassName, ...props }: RadioCardProps): react.JSX.Element;
|
|
5759
5828
|
declare namespace RadioCard {
|
|
5760
5829
|
var displayName: string;
|
|
5761
5830
|
}
|
|
@@ -6419,6 +6488,12 @@ interface CommandItem {
|
|
|
6419
6488
|
onSelect: () => void;
|
|
6420
6489
|
/** Optional leading icon (semantic name, e.g. "home"). */
|
|
6421
6490
|
icon?: string;
|
|
6491
|
+
/**
|
|
6492
|
+
* A leading visual of your own in place of `icon`: a product thumbnail, an
|
|
6493
|
+
* Avatar. Decorative, since the label names the row; size it to the row
|
|
6494
|
+
* (`size-8` beside a `stacked` detail).
|
|
6495
|
+
*/
|
|
6496
|
+
leading?: ReactNode;
|
|
6422
6497
|
/** Secondary text after the label — a destination, a type, an owner. */
|
|
6423
6498
|
detail?: ReactNode;
|
|
6424
6499
|
/**
|
|
@@ -6596,6 +6671,8 @@ interface CommandMenuItemProps extends Omit<ComponentPropsWithRef<"div">, "title
|
|
|
6596
6671
|
onSelect?: () => void;
|
|
6597
6672
|
/** Optional leading icon (semantic name). */
|
|
6598
6673
|
icon?: string;
|
|
6674
|
+
/** A leading visual of your own in place of `icon`: a product thumbnail, an Avatar. */
|
|
6675
|
+
leading?: ReactNode;
|
|
6599
6676
|
/** Secondary text after the label. */
|
|
6600
6677
|
detail?: ReactNode;
|
|
6601
6678
|
/** Put `detail` on its own line under the label, so it never truncates away first. */
|
|
@@ -6616,7 +6693,7 @@ interface CommandMenuItemProps extends Omit<ComponentPropsWithRef<"div">, "title
|
|
|
6616
6693
|
* combobox: keyboard focus stays in the input and Enter clicks the highlighted
|
|
6617
6694
|
* row, so the row itself is not in the tab order.
|
|
6618
6695
|
*/
|
|
6619
|
-
declare function CommandMenuItem({ onSelect, icon, detail, stacked, hint, id: idProp, className, children, disabled, ...props }: CommandMenuItemProps): react.JSX.Element | null;
|
|
6696
|
+
declare function CommandMenuItem({ onSelect, icon, leading, detail, stacked, hint, id: idProp, className, children, disabled, ...props }: CommandMenuItemProps): react.JSX.Element | null;
|
|
6620
6697
|
|
|
6621
6698
|
/**
|
|
6622
6699
|
* Listens for the platform's palette shortcut — ⌘K on macOS, Ctrl+K elsewhere —
|
|
@@ -7347,8 +7424,18 @@ interface MediaTileProps extends Omit<ComponentPropsWithRef<"div">, "title"> {
|
|
|
7347
7424
|
title: ReactNode;
|
|
7348
7425
|
/** The second line — an artist, a channel, a price. Optional. */
|
|
7349
7426
|
subtitle?: ReactNode;
|
|
7427
|
+
/**
|
|
7428
|
+
* Lines under the subtitle, in its muted type: a price beside its sale price,
|
|
7429
|
+
* a count of finishes, a status Badge. A block, so it can wrap and hold
|
|
7430
|
+
* several elements where the one-line subtitle truncates.
|
|
7431
|
+
*/
|
|
7432
|
+
meta?: ReactNode;
|
|
7350
7433
|
/** Cover image URL. Without one (or when it fails) the cover is GradientArt seeded by the item. */
|
|
7351
7434
|
src?: string;
|
|
7435
|
+
/** Responsive cover candidates, passed to the `<img>` with `sizes`. */
|
|
7436
|
+
srcSet?: string;
|
|
7437
|
+
/** Which candidate width the layout needs, e.g. `"(min-width: 64rem) 25vw, 50vw"`. */
|
|
7438
|
+
sizes?: string;
|
|
7352
7439
|
/**
|
|
7353
7440
|
* Cover alt text. Defaults to `""`: the title right below already names the
|
|
7354
7441
|
* item, so describing the cover again makes a screen reader say it twice.
|
|
@@ -7419,7 +7506,7 @@ interface MediaTileProps extends Omit<ComponentPropsWithRef<"div">, "title"> {
|
|
|
7419
7506
|
* and the cover is drawn above it with `order`, so focus moves the way a
|
|
7420
7507
|
* reader names the item — what it is, who made it, then what to do with it.
|
|
7421
7508
|
*/
|
|
7422
|
-
declare function MediaTile({ title, subtitle, src, alt, seed, aspect, size, href, render, subtitleHref, subtitleRender, action, badge, titleAs: TitleTag, loading, className, ...props }: MediaTileProps): react.JSX.Element;
|
|
7509
|
+
declare function MediaTile({ title, subtitle, meta, src, srcSet, sizes, alt, seed, aspect, size, href, render, subtitleHref, subtitleRender, action, badge, titleAs: TitleTag, loading, className, ...props }: MediaTileProps): react.JSX.Element;
|
|
7423
7510
|
declare namespace MediaTile {
|
|
7424
7511
|
var displayName: string;
|
|
7425
7512
|
}
|
|
@@ -8291,6 +8378,6 @@ interface UseCopyResult {
|
|
|
8291
8378
|
*/
|
|
8292
8379
|
declare function useCopy(text: string, { timeout }?: UseCopyOptions): UseCopyResult;
|
|
8293
8380
|
|
|
8294
|
-
declare const SABLE_UI_VERSION: "0.
|
|
8381
|
+
declare const SABLE_UI_VERSION: "0.9.0";
|
|
8295
8382
|
|
|
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 };
|
|
8383
|
+
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, type FieldsetVariant, 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, SkipLink, 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.9.0";
|
|
164
164
|
export {
|
|
165
165
|
ART_TOKENS,
|
|
166
166
|
CHART_SERIES_COUNT,
|
|
@@ -214,6 +214,15 @@ interface ComponentMeta {
|
|
|
214
214
|
* otherwise — a deprecation with no forward path just strands the reader.
|
|
215
215
|
*/
|
|
216
216
|
supersededBy?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Marks a composition: a designed arrangement of parts for one kind of item
|
|
219
|
+
* (a cover tile, a calendar date), not a behaviour. Agents treat it as a
|
|
220
|
+
* reference, used when its layout fits the brief, otherwise rebuilt to the
|
|
221
|
+
* product's own design from the parts named here (e.g. "AspectBox,
|
|
222
|
+
* MediaImage, Card render, Badge"). Behaviour components never set it: those
|
|
223
|
+
* are always used, never rebuilt.
|
|
224
|
+
*/
|
|
225
|
+
composition?: string;
|
|
217
226
|
/** Public props of the root component only — never subcomponents. */
|
|
218
227
|
props: PropMeta[];
|
|
219
228
|
/**
|
package/dist/patterns/index.d.ts
CHANGED
package/dist/styles.css
CHANGED
|
@@ -1547,6 +1547,31 @@
|
|
|
1547
1547
|
--split-gap: initial;
|
|
1548
1548
|
}
|
|
1549
1549
|
|
|
1550
|
+
/* Toasts keep clear of an open Sheet's actions. A right sheet's pinned footer
|
|
1551
|
+
(Check out) sat under a bottom-right toast, and its close button under a
|
|
1552
|
+
top-right one. Where there is room, the stack moves beside the sheet (both are
|
|
1553
|
+
w-95); on a narrower screen a bottom stack moves to the top, away from the
|
|
1554
|
+
footer. A bottom sheet sends a bottom stack to the top at any width. */
|
|
1555
|
+
@media (width >= 52rem) {
|
|
1556
|
+
:root:has([data-sable-sheet="right"][data-open]) [data-sable-toast-viewport][data-position$="right"] {
|
|
1557
|
+
right: calc(min(var(--spacing) * 95, 90vw) + var(--spacing) * 4);
|
|
1558
|
+
}
|
|
1559
|
+
:root:has([data-sable-sheet="left"][data-open]) [data-sable-toast-viewport][data-position$="left"] {
|
|
1560
|
+
left: calc(min(var(--spacing) * 95, 90vw) + var(--spacing) * 4);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
@media (width < 52rem) {
|
|
1564
|
+
:root:has([data-sable-sheet="right"][data-open]) [data-sable-toast-viewport][data-position="bottom-right"],
|
|
1565
|
+
:root:has([data-sable-sheet="left"][data-open]) [data-sable-toast-viewport][data-position="bottom-left"] {
|
|
1566
|
+
top: calc(var(--spacing) * 4);
|
|
1567
|
+
bottom: auto;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
:root:has([data-sable-sheet="bottom"][data-open]) [data-sable-toast-viewport][data-position^="bottom"] {
|
|
1571
|
+
top: calc(var(--spacing) * 4);
|
|
1572
|
+
bottom: auto;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1550
1575
|
/* `Col span={{ base, md, lg }}` / `start={…}` — each breakpoint resolves to the
|
|
1551
1576
|
most specific value defined at or below it (mobile-first cascade). */
|
|
1552
1577
|
[data-sable-col] {
|
|
@@ -1970,7 +1995,12 @@
|
|
|
1970
1995
|
it on data-[starting-style]/data-[ending-style]; this recipe carries the
|
|
1971
1996
|
overflow, the transition, and the content fade. */
|
|
1972
1997
|
@utility motion-disclosure {
|
|
1998
|
+
/* Clipped for the height animation, with a margin so a focus ring (or a
|
|
1999
|
+
control a few pixels proud of its row) at the panel's edge is not cut
|
|
2000
|
+
off. `hidden` is the fallback where `clip` is unsupported. */
|
|
1973
2001
|
overflow: hidden;
|
|
2002
|
+
overflow: clip;
|
|
2003
|
+
overflow-clip-margin: calc(var(--spacing) * 1);
|
|
1974
2004
|
transition-property: height, opacity;
|
|
1975
2005
|
transition-duration: var(--motion-duration-base);
|
|
1976
2006
|
transition-timing-function: var(--motion-ease-standard);
|
|
@@ -30,6 +30,12 @@ Use AppShell as the outer product frame for authenticated or app-like experience
|
|
|
30
30
|
| Bottom nav | no | Mobile fixed navigation with reserved bottom space. |
|
|
31
31
|
| Dock | no | Persistent bottom chrome that outlives routes — a now-playing bar, a call bar. Sticky above the bottom nav; the desktop Sidebar shortens to clear it. |
|
|
32
32
|
|
|
33
|
+
## Subcomponents
|
|
34
|
+
|
|
35
|
+
| Name | Type | Description |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| SkipLink | ComponentProps<"a"> | AppShell's skip link on its own, for a layout that is not an AppShell (a storefront with a top header). Put it first in the body and give the page's <main> the matching id: `<SkipLink />` then `<main id="main-content" tabIndex={-1}>`. `href` defaults to #main-content, the label to "Skip to content". |
|
|
38
|
+
|
|
33
39
|
## Props
|
|
34
40
|
|
|
35
41
|
| Name | Type | Default | Description |
|
|
@@ -90,6 +96,26 @@ import { AppHeader, AppShell, Banner, BottomNav, BottomNavItem, Icon, PageHeader
|
|
|
90
96
|
</AppShell>
|
|
91
97
|
```
|
|
92
98
|
|
|
99
|
+
### SkipLink in a layout of your own
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
import { Button, Icon, PageHeader, Region, SkipLink } from "@sableui/react"
|
|
103
|
+
// <Link> = your router's link (react-router, next/link, @tanstack/router, …)
|
|
104
|
+
|
|
105
|
+
<>
|
|
106
|
+
<SkipLink />
|
|
107
|
+
<header className="flex items-center justify-between px-(--page-inset) py-4">
|
|
108
|
+
<Link to="/">Alder & Lune</Link>
|
|
109
|
+
<Button variant="ghost" size="icon" aria-label="Search"><Icon name="search" /></Button>
|
|
110
|
+
</header>
|
|
111
|
+
<main id="main-content" tabIndex={-1}>
|
|
112
|
+
<Region max="wide">
|
|
113
|
+
<PageHeader title="Lighting" />
|
|
114
|
+
</Region>
|
|
115
|
+
</main>
|
|
116
|
+
</>
|
|
117
|
+
```
|
|
118
|
+
|
|
93
119
|
### Minimal (sidebar + content only)
|
|
94
120
|
|
|
95
121
|
```tsx
|
|
@@ -41,7 +41,8 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
|
|
|
41
41
|
| variant | "primary" \| "secondary" \| "ghost" \| "outline" \| "destructive" \| "link" \| "floating" \| "field" \| "on-color" \| "on-color-outline" \| "on-color-ghost" | "primary" | Visual emphasis tier. One primary per screen. The on-color tiers are for buttons ON a coloured fill: they paint with the inherited text colour (the fill's ink) — on-color is solid (ink background, fill-coloured label via the optional --on-color-fill var, else black/white), on-color-outline and on-color-ghost are transparent with an ink label. Never use them on page or card surfaces. floating is for a control that sits OVER content (carousel arrows, a marquee pause, a jump-to-latest over a conversation): its own edge, lift and translucent popover fill, so it reads on arbitrary content beneath. field is for a button docked in a workspace panel among xs fields: the inset panel-field fill and the field's corner, so a picker trigger or an add action reads as one of the row's controls; pair it with size xs or icon-xs. |
|
|
42
42
|
| size | "xs" \| "sm" \| "md" \| "cta" \| "icon" \| "icon-sm" \| "icon-xs" | "md" | Reads the density ladder, so every value differs by register: page 28/32/40/44, workspace 24/28/32/36. xs and icon-xs were added in 0.31.0 for the workspace control floor and are the sizes tool chrome wants; md is the default everywhere. icon/icon-sm/icon-xs are square. |
|
|
43
43
|
| render | ReactElement \| (props, state) => ReactElement | — | Compose with another element/component through the Base UI render prop. |
|
|
44
|
-
| loading | boolean | false |
|
|
44
|
+
| loading | boolean | false | Show a leading Spinner while an action is in flight and refuse presses. Sets aria-busy and aria-disabled, never the native disabled: disabling the focused button sent focus to <body>, so a sheet the action opened had nowhere to return it. |
|
|
45
|
+
| onClick | (event: MouseEvent<HTMLButtonElement>) => unknown | — | May return a promise: the button shows `loading` until it settles and ignores further presses meanwhile, from the first click on. Prefer it to a `busy` flag in state, which takes effect a render late (three fast clicks ran three times). |
|
|
45
46
|
| badge | ReactNode | — | A corner indicator (usually <NotificationBadge dot /> or a count) overlaid on the top-end corner of the glyph. For icon-only sizes; never hand-position a badge over a Button with absolute offsets. |
|
|
46
47
|
| loadingLabel | ReactNode | — | Optional text shown in place of children while loading. |
|
|
47
48
|
| iconStart | ReactNode | — | Icon before the label. The button takes one 2px step off its start padding so icon + label read as centred. Replaced by the spinner while loading. |
|
package/llms/components/card.md
CHANGED
|
@@ -45,7 +45,7 @@ Use Card for a discrete thing with its own boundary, such as one product, one no
|
|
|
45
45
|
|
|
46
46
|
| Name | Type | Default | Description |
|
|
47
47
|
| --- | --- | --- | --- |
|
|
48
|
-
| variant | "default" \| "flat" | "default" | "default" raises with bg-card + border + soft shadow; "flat" is transparent. |
|
|
48
|
+
| variant | "default" \| "flat" | "default" | "default" raises with bg-card + border + soft shadow; "flat" is transparent, for a card inside a section that already frames it. A flat card made a link or button shows its shape only on hover (the muted fill), so over a photo with square bottom corners it reads as a cropped image at rest: give a linked media card the default variant. |
|
|
49
49
|
| density | "comfortable" \| "compact" | "comfortable" | Padding of the Header/Content/Footer parts: comfortable = p-6 (default), compact = p-4 for denser section panels (pair compact with the flat variant for a settings / form section panel). Threaded to the parts via the inherited --card-p custom property. Card sets --card-p via inline style, which beats a plain (non-!important) stylesheet override of the same property on the same element — use this prop rather than a className override; if an external override is unavoidable, it needs !important. |
|
|
50
50
|
| render | useRender.RenderProp | — | Replace the rendered element through the Base UI render prop — most often `render={<a href="/x" />}` (or a router Link) to make the whole card one link. When the rendered element is a link (a[href]) or a button, the card gains a hover state (stronger border and shadow; a muted fill when flat), a full-card focus-visible ring and motion-interactive easing. Any other element (article, li) stays a static surface. Children can answer the hover with `group-hover/card:`. |
|
|
51
51
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** stable
|
|
4
4
|
|
|
5
|
-
Form section panel (Card-like bordered surface) over Base UI Fieldset, with Legend/Description/Content/Footer parts.
|
|
5
|
+
Form section panel (Card-like bordered surface) over Base UI Fieldset, with Legend/Description/Content/Footer parts; `variant="plain"` is the bare group, for a radio group's shared name.
|
|
6
6
|
|
|
7
7
|
**Keywords:** fieldset, form group, legend, fields
|
|
8
8
|
|
|
@@ -14,6 +14,7 @@ Use Fieldset to group related controls under a shared label or explanation.
|
|
|
14
14
|
|
|
15
15
|
- Do: Use it for grouped form sections such as contact details, preferences, or permissions.
|
|
16
16
|
- Do: Keep the legend meaningful so assistive tech and agents understand the group purpose.
|
|
17
|
+
- Do: Use `variant="plain"` to name a radio group or a run of checkboxes inside a form or card that is already framed: the legend reads as a field label and nothing draws a second box. Do not strip the card variant with classes instead.
|
|
17
18
|
- Don't: Do not use Fieldset as a generic spacing wrapper outside forms.
|
|
18
19
|
- Don't: Do not use a Legend that is really a heading. A legend names the group's question for assistive technology; using it as a section title puts a question mark where the outline should be.
|
|
19
20
|
|
|
@@ -40,6 +41,7 @@ Use Fieldset to group related controls under a shared label or explanation.
|
|
|
40
41
|
|
|
41
42
|
| Name | Type | Default | Description |
|
|
42
43
|
| --- | --- | --- | --- |
|
|
44
|
+
| variant | "card" \| "plain" | "card" | `card` is a bordered, raised section with padded parts. `plain` is the grouping alone (no border, surface or inset) with the legend in the field-label style: the shared name a radio group needs, inside a form that is already framed. |
|
|
43
45
|
| disabled | boolean | — | Disables the whole group. Renders <fieldset disabled> (native control disabling) and surfaces data-[disabled] for dimming. |
|
|
44
46
|
| render | ReactElement \| function | — | Base UI render prop to replace or compose the underlying element. |
|
|
45
47
|
| className | string | — | Merged onto each part via cn() for one-off overrides. |
|
|
@@ -104,3 +106,21 @@ import { Field, Fieldset, FieldsetContent, FieldsetLegend, Radio, RadioGroup } f
|
|
|
104
106
|
// a Card section on a page; a legend that is really a heading lies to
|
|
105
107
|
// assistive technology about the form's structure.
|
|
106
108
|
```
|
|
109
|
+
|
|
110
|
+
### A radio group's name, without a second box
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
import { Card, CardContent, Fieldset, FieldsetLegend, RadioCard, RadioGroup } from "@sableui/react"
|
|
114
|
+
|
|
115
|
+
<Card>
|
|
116
|
+
<CardContent>
|
|
117
|
+
<Fieldset variant="plain">
|
|
118
|
+
<FieldsetLegend>Delivery</FieldsetLegend>
|
|
119
|
+
<RadioGroup defaultValue="standard">
|
|
120
|
+
<RadioCard value="standard" title="Standard" description="3–5 working days" trailing="Free" />
|
|
121
|
+
<RadioCard value="express" title="Express" description="Next working day" trailing="$12.00" />
|
|
122
|
+
</RadioGroup>
|
|
123
|
+
</Fieldset>
|
|
124
|
+
</CardContent>
|
|
125
|
+
</Card>
|
|
126
|
+
```
|
package/llms/components/form.md
CHANGED
|
@@ -32,13 +32,14 @@ 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; 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. |
|
|
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"; trailing?: ReactNode; className?: string; children: ReactElement } + other div props on the root | 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. trailing puts something at the end of the control's row: vertically, beside the control (a promo code's Apply button, the control taking the rest); horizontally, at the end of the label's first line (a facet count). Other props (data-*, id, aria-*) land on the root. 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. 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. |
|
|
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. Either way, once onSubmit returns (or the promise it returns settles), the first control a Field marks invalid takes focus. |
|
|
42
|
+
| onSubmit | (event: FormEvent<HTMLFormElement>) => unknown | — | The native submit handler. It may return a promise. When it returns, or its promise settles, the first control a Field marks invalid takes focus, so errors your own code sets get the same treatment as Sable's validation. |
|
|
42
43
|
| 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
44
|
| 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
45
|
| onFormSubmit | (values: Record<string, unknown>, details) => void | — | Called with the named Field values after validation passes; prevents the native submit. |
|
|
@@ -79,6 +80,14 @@ import { Field, Input } from "@sableui/react"
|
|
|
79
80
|
<Field label="Password" error="Must be at least 8 characters."><Input type="password" /></Field>
|
|
80
81
|
```
|
|
81
82
|
|
|
83
|
+
### An input with its action
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { Button, Field, Input } from "@sableui/react"
|
|
87
|
+
|
|
88
|
+
<Field label="Promo code" error={promoError} trailing={<Button variant="secondary" onClick={applyPromo}>Apply</Button>}><Input name="promo" autoCapitalize="characters" /></Field>
|
|
89
|
+
```
|
|
90
|
+
|
|
82
91
|
### Your own wording for a missing value
|
|
83
92
|
|
|
84
93
|
```tsx
|
|
@@ -36,7 +36,10 @@ The item in a media grid or shelf: an album, a playlist, a video, a podcast, a f
|
|
|
36
36
|
| --- | --- | --- | --- |
|
|
37
37
|
| title | ReactNode | — | The item's name. Seeds the fallback art when it is a string. |
|
|
38
38
|
| subtitle | ReactNode | — | The second line — an artist, a channel, a year. |
|
|
39
|
+
| meta | ReactNode | — | Lines under the subtitle, in its muted type: a price beside its sale price, a count of finishes, a status Badge. A wrapping block, where the subtitle is one truncated line. Use it for a product tile instead of building one. |
|
|
39
40
|
| src | string | — | Cover image URL. Without one, or when it fails, the cover is GradientArt seeded by the item. |
|
|
41
|
+
| srcSet | string | — | Responsive cover candidates, passed to the `<img>`. |
|
|
42
|
+
| sizes | string | — | The cover's layout width for `srcSet`, e.g. `"(min-width: 64rem) 25vw, 50vw"`. |
|
|
40
43
|
| alt | string | "" | Cover alt text. Empty by default: the title below already names the item. |
|
|
41
44
|
| seed | string \| number | — | Seeds the fallback art. Defaults to `title` when it is a string. |
|
|
42
45
|
| aspect | "square" \| "video" \| "poster" \| number | "square" | The cover's shape: square (albums, podcasts), video (16:9), poster (2:3 — films, books), or any width / height ratio. |
|
|
@@ -82,6 +85,35 @@ The item in a media grid or shelf: an album, a playlist, a video, a podcast, a f
|
|
|
82
85
|
|
|
83
86
|
## Examples
|
|
84
87
|
|
|
88
|
+
### Product tile
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { Badge, Grid, MediaTile } from "@sableui/react"
|
|
92
|
+
// <Link> = your router's link (react-router, next/link, @tanstack/router, …)
|
|
93
|
+
|
|
94
|
+
<Grid minItemWidth="14rem" gap={4}>
|
|
95
|
+
{products.map((product) => (
|
|
96
|
+
<MediaTile
|
|
97
|
+
key={product.id}
|
|
98
|
+
aspect={4 / 5}
|
|
99
|
+
title={product.name}
|
|
100
|
+
subtitle={product.material}
|
|
101
|
+
src={product.image}
|
|
102
|
+
srcSet={product.imageSet}
|
|
103
|
+
sizes="(min-width: 64rem) 25vw, 50vw"
|
|
104
|
+
render={<Link to={`/products/${product.slug}`} />}
|
|
105
|
+
badge={product.isNew ? <Badge appearance="overlay">New</Badge> : undefined}
|
|
106
|
+
meta={
|
|
107
|
+
<>
|
|
108
|
+
<span className="text-foreground">{formatPrice(product.price)}</span>
|
|
109
|
+
<span>{product.finishes.length} finishes</span>
|
|
110
|
+
</>
|
|
111
|
+
}
|
|
112
|
+
/>
|
|
113
|
+
))}
|
|
114
|
+
</Grid>
|
|
115
|
+
```
|
|
116
|
+
|
|
85
117
|
### Album grid
|
|
86
118
|
|
|
87
119
|
```tsx
|
|
@@ -37,6 +37,7 @@ Use RadioCard for visual choice cards when users compare a small set of named op
|
|
|
37
37
|
| value | string | — | The unique value that pairs this card with the group's selected value. |
|
|
38
38
|
| title | ReactNode | — | The card's primary label (rendered as text-title-sm). |
|
|
39
39
|
| description | ReactNode | — | Optional supporting copy beneath the title (text-body-sm, muted). |
|
|
40
|
+
| trailing | ReactNode | — | End-aligned on the title's line: a price, a delivery date, a count. The title takes the rest of the row. |
|
|
40
41
|
| icon | ReactNode | — | Leading icon (e.g. a solid <Icon>). Its presence switches to the two-dimensional card — icon top-left, indicator top-right, copy below — and the glyph is rendered as a solid-fill icon in the tone colour. |
|
|
41
42
|
| tone | "neutral" \| "standard" \| "collectible" \| "edition" \| "info" \| "warning" | "neutral" | Semantic colour the selected state carries across the border, radio, and icon glyph. Neutral uses the primary ring with a muted wash. |
|
|
42
43
|
| disabled | boolean | false | Dims the card and blocks selection. The group skips it during keyboard navigation. |
|