@sableui/react 0.3.1 → 0.4.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 +8 -4
- package/CHANGELOG.md +60 -0
- package/CONTRIBUTING.md +2 -2
- package/DESIGN.md +7 -7
- package/README.md +7 -3
- package/bin/sable-lint.mjs +0 -0
- package/bin/sable.mjs +10 -5
- package/dist/{_contract-o3tUc8Ig.d.ts → _contract-Cn3lUpih.d.ts} +10 -5
- package/dist/blocks/index.js +2 -2
- package/dist/{chunk-YXBOYWBN.js → chunk-C4Z3CF54.js} +1 -1
- package/dist/{chunk-CKNM7KSB.js → chunk-CCUDFLU3.js} +23 -6
- package/dist/{chunk-6LCIBMMG.js → chunk-D2ETQBHV.js} +1 -1
- package/dist/{chunk-MXJX3NZI.js → chunk-EFLC4NA3.js} +4 -4
- package/dist/{chunk-EP55KSYA.js → chunk-EHH4MHO6.js} +6 -6
- package/dist/{chunk-WCFLQVK5.js → chunk-FBSL2LZQ.js} +1 -1
- package/dist/{chunk-X276MF2W.js → chunk-OQACYT2D.js} +2 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +13 -13
- package/dist/patterns/index.js +2 -2
- package/dist/presets/index.d.ts +1 -1
- package/dist/presets/index.js +2 -2
- package/dist/styles.css +16 -6
- package/dist/{theme-provider-BE-KqUG-.d.ts → theme-provider-CGeiusgu.d.ts} +3 -3
- package/dist/themes/atelier/index.d.ts +1 -1
- package/dist/themes/atelier/index.js +1 -1
- package/dist/themes/ember/ember.css +8 -5
- package/dist/themes/ember/index.d.ts +1 -1
- package/dist/themes/index.d.ts +3 -3
- package/dist/themes/index.js +3 -3
- package/dist/themes/meridian/index.d.ts +1 -1
- package/dist/themes/poppy/index.d.ts +1 -1
- package/dist/themes/poppy/poppy.css +1 -1
- package/dist/themes/prism/index.d.ts +1 -1
- package/dist/themes/sable/index.d.ts +9 -0
- package/dist/themes/sable/index.js +1 -0
- package/dist/themes/{base/base.css → sable/sable.css} +6 -6
- package/dist/themes/verdant/index.d.ts +1 -1
- package/dist/themes.css +3 -3
- package/llms/components/button.md +15 -3
- package/llms/components/input.md +1 -1
- package/llms/components/scrub-field.md +1 -1
- package/llms/components/select.md +1 -1
- package/llms/components/theme-selector.md +1 -1
- package/llms/reference/token-intent.md +5 -1
- package/llms/tasks/building-a-page.md +1 -1
- package/llms/tasks/creating-a-preset.md +1 -1
- package/llms/tasks/designing-a-surface.md +1 -1
- package/llms/tasks/getting-started.md +4 -0
- package/llms-full.txt +32 -12
- package/llms.txt +1 -1
- package/package.json +5 -5
- package/registry.json +2456 -18
- package/scripts/agent-setup.mjs +34 -7
- package/scripts/design-presets.mjs +1 -1
- package/scripts/grade.mjs +50 -11
- package/scripts/lint-rules.mjs +20 -1
- package/dist/themes/base/index.d.ts +0 -9
- package/dist/themes/base/index.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import { C as ComponentMeta } from './meta-CcE_SeFu.js';
|
|
3
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-CcE_SeFu.js';
|
|
4
|
-
import { T as ThemeManifest, a as ThemeMode$1 } from './_contract-
|
|
5
|
-
export { 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-
|
|
6
|
-
import { T as ThemeId } from './theme-provider-
|
|
7
|
-
export { D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, h as applySableColorMode, i as applySableTheme, k as defaultThemeId, m as getThemeManifest, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from './theme-provider-
|
|
4
|
+
import { T as ThemeManifest, a as ThemeMode$1 } from './_contract-Cn3lUpih.js';
|
|
5
|
+
export { 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-Cn3lUpih.js';
|
|
6
|
+
import { T as ThemeId } from './theme-provider-CGeiusgu.js';
|
|
7
|
+
export { D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, h as applySableColorMode, i as applySableTheme, k as defaultThemeId, m as getThemeManifest, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from './theme-provider-CGeiusgu.js';
|
|
8
8
|
export { AspectBox, AspectBoxProps, Bleed, BleedProps, Breakpoint, Center, CenterProps, Col, ColProps, Columns, ColumnsProps, Grid, GridOverlay, GridOverlayProps, GridProps, Page, PageProps, Region, RegionMax, RegionProps, Responsive, Row, RowProps, SafeArea, SafeAreaProps, Spacer, SpacerProps, SplitPane, SplitPaneProps, Stack, StackProps } from './layout/index.js';
|
|
9
9
|
export { Icon, IconContextValue, IconProps, IconProvider, IconProviderProps, composeIconSets, useIconSet } from './icon/index.js';
|
|
10
10
|
export { reiconIconSet as fallbackIconSet, reiconIconNames, reiconIconSet } from './icon-sets/reicon.js';
|
|
@@ -348,7 +348,7 @@ declare namespace ViewTransitionName {
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
declare const buttonVariants: (props?: ({
|
|
351
|
-
variant?: "link" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | "floating" | "on-color" | "on-color-outline" | "on-color-ghost" | null | undefined;
|
|
351
|
+
variant?: "link" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | "floating" | "field" | "on-color" | "on-color-outline" | "on-color-ghost" | null | undefined;
|
|
352
352
|
size?: "icon" | "sm" | "md" | "xs" | "cta" | "icon-sm" | "icon-xs" | null | undefined;
|
|
353
353
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
354
354
|
|
|
@@ -1819,7 +1819,7 @@ type ChartTone = "edition" | "collectible" | "standard" | "info" | "warning" | "
|
|
|
1819
1819
|
declare const CHART_SERIES_COUNT = 8;
|
|
1820
1820
|
/**
|
|
1821
1821
|
* The colour of series `index` when it names none: the theme's chart palette,
|
|
1822
|
-
* in order. The palette (`--chart-1` … `--chart-8`, defined by the
|
|
1822
|
+
* in order. The palette (`--chart-1` … `--chart-8`, defined by the Sable theme
|
|
1823
1823
|
* and inherited by every other) is validated for colour-blind separation of
|
|
1824
1824
|
* neighbours, a normal-vision floor, a lightness band and a chroma floor, in
|
|
1825
1825
|
* light and dark. Past eight series, fold the rest into "Other".
|
|
@@ -2485,7 +2485,7 @@ type TriggerProps$2 = Omit<ComponentProps<typeof Select$1.Trigger>, "className"
|
|
|
2485
2485
|
* The surface is the part a `h-(--control-xs)` override could never reach,
|
|
2486
2486
|
* and it is what the eye actually catches. A property grid's fields are
|
|
2487
2487
|
* inset, not raised: `ScrubField` — the control immediately beside this one
|
|
2488
|
-
* on the same rung — is `bg-
|
|
2488
|
+
* on the same rung — is `bg-panel-field` with no border, and a bordered `bg-card`
|
|
2489
2489
|
* select beside it reads as a different KIND of control rather than the same
|
|
2490
2490
|
* control holding a word. Consumers that overrode the height got an
|
|
2491
2491
|
* md-register 8px radius on a 24px box and a raised card among inset fields;
|
|
@@ -7499,6 +7499,6 @@ interface UseCopyResult {
|
|
|
7499
7499
|
*/
|
|
7500
7500
|
declare function useCopy(text: string, { timeout }?: UseCopyOptions): UseCopyResult;
|
|
7501
7501
|
|
|
7502
|
-
declare const SABLE_UI_VERSION: "0.
|
|
7502
|
+
declare const SABLE_UI_VERSION: "0.4.0";
|
|
7503
7503
|
|
|
7504
7504
|
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, AppHeader, type AppHeaderProps, AppShell, type AppShellProps, AreaChart, type AreaChartProps, 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 ButtonProps, CHART_SERIES_COUNT, COMPONENT_GROUPS, COMPONENT_TAXONOMY, Calendar, type CalendarProps, Card, CardAction, CardContent, type CardContentProps, CardDescription, CardFooter, 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, 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, Form, type FormProps, GlidingHighlight, type GlidingHighlightProps, 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, 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, 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, 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, SheetPortal, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, SideNav, type SideNavActiveVariant, SideNavGroup, type SideNavGroupProps, SideNavItem, type SideNavItemProps, type SideNavProps, type SideNavSize, Sidebar, 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, ThemeSelector, type ThemeSelectorProps, ThemeSwitcher, type ThemeSwitcherProps, ThinkingOrb, type ThinkingOrbProps, ToastAction, type ToastApi, ToastClose, 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, emptyStateMeta, entityMeta, feedbackMeta, fieldsetMeta, fileDropzoneMeta, fileDropzoneVariants, formMeta, formatFileSize, formatHex, glidingHighlightMeta, hsvToRgb, hueColor, inlineStatusMeta, inputMeta, isTransparent, kbdMeta, labelMeta, lineChartMeta, markerMeta, marqueeMeta, 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, 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, useInView, useMotion, usePanelWidth, useReducedMotion, useScrollActivity, useSidebar, useToast, useToastManager, useTypeTier, videoMeta, workspaceMeta };
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export { DENSITY_TOKENS, MOTION_TOKENS, RADIUS_TOKENS, SEMANTIC_TOKENS, TYPE_OVERLINE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_SCALE_TOKENS, TYPE_UI_TOKENS, WORKSPACE_SURFACE_TOKENS } from './chunk-
|
|
1
|
+
export { DENSITY_TOKENS, MOTION_TOKENS, RADIUS_TOKENS, SEMANTIC_TOKENS, TYPE_OVERLINE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_SCALE_TOKENS, TYPE_UI_TOKENS, WORKSPACE_SURFACE_TOKENS } from './chunk-OQACYT2D.js';
|
|
2
2
|
export { Phone, phoneMeta } from './chunk-KFZ43RKU.js';
|
|
3
3
|
import './chunk-NEQNXI2G.js';
|
|
4
|
-
export { AppHeader, AppShell, BottomNav, BottomNavItem, Browser, ChatComposer, DataTable, EmptyState, Marker, MessageScroller, Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue, NotificationBadge, PageHeader, Presence, RelativeTime, Reveal, SearchInput, SettingsMenu, SettingsRow, SideNav, SideNavGroup, SideNavItem, Sidebar, SidebarFooter, SidebarHeader, SidebarItem, SidebarNav, Skeleton, StreamingText, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarLink, ToolbarSeparator, ViewTransitionName, appHeaderMeta, appShellMeta, bottomNavMeta, browserMeta, chatComposerMeta, dataTableMeta, emptyStateMeta, markerMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, pageHeaderMeta, relativeTimeMeta, searchInputMeta, settingsMenuMeta, sideNavMeta, sidebarMeta, skeletonMeta, startViewTransition, streamingTextMeta, supportsViewTransitions, tabsMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, useInView, useSidebar } from './chunk-
|
|
5
|
-
import { SELECTION_CARD_CHECKED, CartesianChart, resolveSeries, chartFormatters, categoryText, numberValue, niceTicks, ChartFrame, polar, riseTransition, stagger, pathStyle, morphTransition, ChartLegend, RADIO_DOT, RADIO_RING, SELECTION_CARD_TILE_HEAD, SELECTION_CARD_GLYPH, SELECTION_CARD_SHELL, SELECTION_CARD_LAYOUT, CheckboxMark, CHECK_BOX, SEGMENTED_STEP, SEGMENTED_ITEM, SEGMENTED_TRACK, ToggleGroup, Toggle, approxTextWidth, ChartTooltipContent } from './chunk-
|
|
6
|
-
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AreaChart, BarChart, CHART_SERIES_COUNT, Checkbox, CommandMenu, CommandMenuGroup, CommandMenuItem, CommandMenuPanel, CommandMenuTrigger, DateTile, Kbd, KbdGroup, OtpField, PieChart, RadialChart, SEGMENTED_BAR_TONES, Scroller, SegmentedBar, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, Stepper, StepperItem, Toggle, ToggleGroup, Toggle as ToggleGroupItem, accordionMeta, areaChartMeta, barChartMeta, chartColor, toneColor as chartToneColor, checkboxMeta, commandMenuMeta, dateTileMeta, kbdMeta, otpFieldMeta, pieChartMeta, radialChartMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, sliderMeta, sparklineMeta, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, toggleMeta, useCommandMenuShortcut } from './chunk-
|
|
7
|
-
import { withPortalThemeScope, FIELD_SHELL_XS, useTypeTier, useDensity, FIELD_SHELL, MOBILE_FIELD_TIER, useMotion, HighlightGlide, useAnchoredDensity, anchoredScroll, useIsomorphicLayoutEffect, mergeRefs, buttonVariants, FIELD_INVALID, Select, SelectTrigger, SelectContent, SelectItem, Button, Spinner, Badge, anchoredListScroll, useResizeObserver, MENU_ITEM_DESTRUCTIVE, DensityProvider, Input, Textarea, Progress } from './chunk-
|
|
8
|
-
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, Attachment, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, Bubble, BubbleReaction, BubbleReactions, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, Code, CodeBlock, CodeHighlightProvider, Density, DensityProvider, DestructiveActionModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Entity, Field, Form, Input, Label, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, MotionProvider, OverflowMenu, Pill, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, SimpleTooltip, Spinner, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bubbleMeta, buttonMeta, buttonVariants, cardMeta, codeBlockMeta, codeMeta, destructiveActionModalMeta, dialogMeta, entityMeta, formMeta, inputMeta, labelMeta, menuMeta, messageMeta, overflowMenuMeta, pillVariants, progressMeta, progressTrackVariants, selectMeta, separatorMeta, spinnerMeta, statusDotMeta, statusDotVariants, switchMeta, tableMeta, textareaMeta, tooltipMeta, useAnchoredDensity, useCopy, useDensity, useMotion, useReducedMotion, useScrollActivity, useTypeTier } from './chunk-
|
|
4
|
+
export { AppHeader, AppShell, BottomNav, BottomNavItem, Browser, ChatComposer, DataTable, EmptyState, Marker, MessageScroller, Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue, NotificationBadge, PageHeader, Presence, RelativeTime, Reveal, SearchInput, SettingsMenu, SettingsRow, SideNav, SideNavGroup, SideNavItem, Sidebar, SidebarFooter, SidebarHeader, SidebarItem, SidebarNav, Skeleton, StreamingText, Tabs, TabsPanel as TabsContent, TabsList, TabsPanel, TabsTrigger, TextReveal, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarLink, ToolbarSeparator, ViewTransitionName, appHeaderMeta, appShellMeta, bottomNavMeta, browserMeta, chatComposerMeta, dataTableMeta, emptyStateMeta, markerMeta, messageScrollerMeta, meterIndicatorVariants, meterMeta, meterTrackVariants, notificationBadgeMeta, notificationCountVariants, notificationDotVariants, pageHeaderMeta, relativeTimeMeta, searchInputMeta, settingsMenuMeta, sideNavMeta, sidebarMeta, skeletonMeta, startViewTransition, streamingTextMeta, supportsViewTransitions, tabsMeta, toolbarGroupVariants, toolbarMeta, toolbarSeparatorVariants, toolbarVariants, useInView, useSidebar } from './chunk-D2ETQBHV.js';
|
|
5
|
+
import { SELECTION_CARD_CHECKED, CartesianChart, resolveSeries, chartFormatters, categoryText, numberValue, niceTicks, ChartFrame, polar, riseTransition, stagger, pathStyle, morphTransition, ChartLegend, RADIO_DOT, RADIO_RING, SELECTION_CARD_TILE_HEAD, SELECTION_CARD_GLYPH, SELECTION_CARD_SHELL, SELECTION_CARD_LAYOUT, CheckboxMark, CHECK_BOX, SEGMENTED_STEP, SEGMENTED_ITEM, SEGMENTED_TRACK, ToggleGroup, Toggle, approxTextWidth, ChartTooltipContent } from './chunk-FBSL2LZQ.js';
|
|
6
|
+
export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AreaChart, BarChart, CHART_SERIES_COUNT, Checkbox, CommandMenu, CommandMenuGroup, CommandMenuItem, CommandMenuPanel, CommandMenuTrigger, DateTile, Kbd, KbdGroup, OtpField, PieChart, RadialChart, SEGMENTED_BAR_TONES, Scroller, SegmentedBar, Slider, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue, Sparkline, Stepper, StepperItem, Toggle, ToggleGroup, Toggle as ToggleGroupItem, accordionMeta, areaChartMeta, barChartMeta, chartColor, toneColor as chartToneColor, checkboxMeta, commandMenuMeta, dateTileMeta, kbdMeta, otpFieldMeta, pieChartMeta, radialChartMeta, segmentedBarMeta, segmentedBarSegmentVariants, segmentedBarVariants, sliderMeta, sparklineMeta, stepperConnectorVariants, stepperIndicatorVariants, stepperMeta, toggleMeta, useCommandMenuShortcut } from './chunk-FBSL2LZQ.js';
|
|
7
|
+
import { withPortalThemeScope, FIELD_SHELL_XS, useTypeTier, useDensity, FIELD_SHELL, MOBILE_FIELD_TIER, useMotion, HighlightGlide, useAnchoredDensity, anchoredScroll, useIsomorphicLayoutEffect, mergeRefs, buttonVariants, FIELD_INVALID, Select, SelectTrigger, SelectContent, SelectItem, Button, Spinner, Badge, anchoredListScroll, useResizeObserver, MENU_ITEM_DESTRUCTIVE, DensityProvider, Input, Textarea, Progress } from './chunk-CCUDFLU3.js';
|
|
8
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, Attachment, Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarRoot, BADGE_APPEARANCES, BADGE_TONES, Badge, Bubble, BubbleReaction, BubbleReactions, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, Code, CodeBlock, CodeHighlightProvider, Density, DensityProvider, DestructiveActionModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Entity, Field, Form, Input, Label, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Message, MotionProvider, OverflowMenu, Pill, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, SimpleTooltip, Spinner, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bubbleMeta, buttonMeta, buttonVariants, cardMeta, codeBlockMeta, codeMeta, destructiveActionModalMeta, dialogMeta, entityMeta, formMeta, inputMeta, labelMeta, menuMeta, messageMeta, overflowMenuMeta, pillVariants, progressMeta, progressTrackVariants, selectMeta, separatorMeta, spinnerMeta, statusDotMeta, statusDotVariants, switchMeta, tableMeta, textareaMeta, tooltipMeta, useAnchoredDensity, useCopy, useDensity, useMotion, useReducedMotion, useScrollActivity, useTypeTier } from './chunk-CCUDFLU3.js';
|
|
9
9
|
export { AspectBox, Bleed, Center, Col, Columns, Grid, GridOverlay, Page, Region, Row, SafeArea, Spacer, SplitPane, Stack } from './chunk-3IWZYBGH.js';
|
|
10
10
|
import { cn } from './chunk-SRQWQUTW.js';
|
|
11
11
|
export { cn } from './chunk-SRQWQUTW.js';
|
|
12
12
|
import { Icon } from './chunk-NGBDP3BM.js';
|
|
13
13
|
export { Icon, IconProvider, composeIconSets, useIconSet } from './chunk-NGBDP3BM.js';
|
|
14
14
|
export { reiconIconSet as fallbackIconSet, reiconIconNames, reiconIconSet } from './chunk-TH563WLW.js';
|
|
15
|
-
import { featuredThemeManifests, defaultThemeId } from './chunk-
|
|
16
|
-
export { DEFAULT_THEME_ID, SABLE_COLOR_STORAGE_KEY, SABLE_THEME_ATTRIBUTE, SABLE_THEME_STORAGE_KEY, SableThemeProvider, applySableColorMode, applySableTheme, defaultThemeId, getThemeManifest, isThemeId, themeIds, themeManifestById, themeManifests, useSableTheme } from './chunk-
|
|
15
|
+
import { featuredThemeManifests, defaultThemeId } from './chunk-EFLC4NA3.js';
|
|
16
|
+
export { DEFAULT_THEME_ID, SABLE_COLOR_STORAGE_KEY, SABLE_THEME_ATTRIBUTE, SABLE_THEME_STORAGE_KEY, SableThemeProvider, applySableColorMode, applySableTheme, defaultThemeId, getThemeManifest, isThemeId, themeIds, themeManifestById, themeManifests, useSableTheme } from './chunk-EFLC4NA3.js';
|
|
17
17
|
import './chunk-7MG4SHYX.js';
|
|
18
18
|
import './chunk-KO3NAEBF.js';
|
|
19
19
|
import './chunk-L4IEIQQA.js';
|
|
20
|
-
import './chunk-
|
|
20
|
+
import './chunk-EHH4MHO6.js';
|
|
21
21
|
import './chunk-ADLLDWLW.js';
|
|
22
22
|
import './chunk-K7RUHUGC.js';
|
|
23
|
-
import './chunk-
|
|
23
|
+
import './chunk-C4Z3CF54.js';
|
|
24
24
|
import { NumberField as NumberField$1 } from '@base-ui/react/number-field';
|
|
25
25
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
26
26
|
import { createContext, useId, useRef, useState, useEffect, useLayoutEffect, useContext, useMemo, useCallback, useSyncExternalStore, Children } from 'react';
|
|
@@ -7003,7 +7003,7 @@ var scrubFieldMeta = {
|
|
|
7003
7003
|
"Every scrub gesture is reachable from the keyboard: ArrowUp/ArrowDown step by `step`, Shift+Arrow by ten steps.",
|
|
7004
7004
|
"Enter commits, Escape reverts to the last committed value, and blur commits \u2014 so a partial edit is never silently kept."
|
|
7005
7005
|
],
|
|
7006
|
-
tokensUsed: ["foreground", "muted-foreground", "ring", "
|
|
7006
|
+
tokensUsed: ["foreground", "muted-foreground", "ring", "panel-field", "panel-field-hover"],
|
|
7007
7007
|
examples: [
|
|
7008
7008
|
{
|
|
7009
7009
|
label: "Opacity with a glyph handle",
|
|
@@ -9358,7 +9358,7 @@ var themeSelectorMeta = {
|
|
|
9358
9358
|
},
|
|
9359
9359
|
{
|
|
9360
9360
|
label: "Controlled",
|
|
9361
|
-
code: 'const [themeId, setThemeId] = useState<ThemeId>("
|
|
9361
|
+
code: 'const [themeId, setThemeId] = useState<ThemeId>("sable")\n<ThemeSelector value={themeId} onValueChange={setThemeId} />'
|
|
9362
9362
|
},
|
|
9363
9363
|
{
|
|
9364
9364
|
label: "In chrome \u2014 a popover or a docked panel",
|
|
@@ -11260,6 +11260,6 @@ var carouselMeta = {
|
|
|
11260
11260
|
};
|
|
11261
11261
|
|
|
11262
11262
|
// src/index.ts
|
|
11263
|
-
var SABLE_UI_VERSION = "0.
|
|
11263
|
+
var SABLE_UI_VERSION = "0.4.0";
|
|
11264
11264
|
|
|
11265
11265
|
export { Banner, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, COMPONENT_GROUPS, COMPONENT_TAXONOMY, Calendar, Carousel, CheckboxCard, CheckboxGroup, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger, ColorField, Combobox, ComboboxChips, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList, ComboboxPortal, ComboboxValue, ComboboxVirtualList, ContextCard, ContextCardArrow, ContextCardContent, ContextCardPortal, ContextCardTrigger, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DatePicker, Feedback, Fieldset, FieldsetContent, FieldsetDescription, FieldsetFooter, FieldsetLegend, FileDropzone, GlidingHighlight, InlineStatus, LineChart, Marquee, MiddleTruncate, Note, NumberField, PageLoader, Pagination, Panel, PanelGroup, PanelResizer, PanelSection, Popover, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, PropertyPair, PropertyRow, RadarChart, Radio, RadioCard, RadioGroup, SABLE_UI_VERSION, STATUS_TONES, STATUS_TONE_ICON, ScrubField, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, ShowMore, StatusBar, StatusBarGroup, StatusBarSeparator, TRANSPARENT, ThemeSelector, ThemeSwitcher, ThinkingOrb, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Tree, TreeAddRow, TreeEmpty, TreeRow, TreeSection, Video, Workspace, WorkspaceBar, WorkspaceCanvas, bannerMeta, bannerVariants, breadcrumbsMeta, calendarMeta, carouselMeta, checkboxCardMeta, collapsibleMeta, colorFieldMeta, comboboxMeta, componentGuidance, componentLabel, componentSlug, componentsInGroup, contextCardMeta, contextMenuMeta, datePickerMeta, feedbackMeta, fieldsetMeta, fileDropzoneMeta, fileDropzoneVariants, formatFileSize, formatHex, glidingHighlightMeta, hsvToRgb, hueColor, inlineStatusMeta, isTransparent, lineChartMeta, marqueeMeta, middleTruncateMeta, noteMeta, noteVariants, numberFieldMeta, pageLoaderMeta, paginationMeta, panelGroupMeta, panelSectionMeta, parseHex, pillMeta, popoverMeta, radarChartMeta, radioCardMeta, radioMeta, rgbToHsv, scrollerMeta, scrubFieldMeta, sheetMeta, sheetVariants, showMoreMeta, statusBarMeta, themeSelectorMeta, themeSwitcherMeta, thinkingOrbMeta, toast, toastMeta, treeIndent, treeMeta, useComboboxFilteredItems, usePanelWidth, useToast, useToastManager, videoMeta, workspaceMeta };
|
package/dist/patterns/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextReveal, Reveal, MessageScroller, Marker, Toolbar, ToolbarButton, StreamingText, ChatComposer, SettingsMenu, SettingsRow, AppShell, PageHeader, DataTable, Meter, RelativeTime, Sidebar, SidebarHeader, SidebarNav, SidebarItem, NotificationBadge, SidebarFooter, BottomNav, BottomNavItem, AppHeader, Tabs, TabsList, TabsTrigger, TabsPanel, Skeleton, Browser, MeterLabel, MeterValue, MeterTrack, SearchInput, EmptyState, SideNav, SideNavItem } from '../chunk-
|
|
2
|
-
import { Form, Field, Input, Button, Separator, Card, CardContent, Badge, Entity, Avatar, StatusDot, CardHeader, CardTitle, CardDescription, CardAction, Message, Bubble, CodeBlock, SimpleTooltip, Attachment, CardFooter, MenuRadioGroup, MenuRadioItem, CardList, OverflowMenu, MenuItem, MenuSeparator, Textarea, Code, Select, SelectTrigger, SelectContent, SelectItem, DestructiveActionModal, Switch } from '../chunk-
|
|
1
|
+
import { TextReveal, Reveal, MessageScroller, Marker, Toolbar, ToolbarButton, StreamingText, ChatComposer, SettingsMenu, SettingsRow, AppShell, PageHeader, DataTable, Meter, RelativeTime, Sidebar, SidebarHeader, SidebarNav, SidebarItem, NotificationBadge, SidebarFooter, BottomNav, BottomNavItem, AppHeader, Tabs, TabsList, TabsTrigger, TabsPanel, Skeleton, Browser, MeterLabel, MeterValue, MeterTrack, SearchInput, EmptyState, SideNav, SideNavItem } from '../chunk-D2ETQBHV.js';
|
|
2
|
+
import { Form, Field, Input, Button, Separator, Card, CardContent, Badge, Entity, Avatar, StatusDot, CardHeader, CardTitle, CardDescription, CardAction, Message, Bubble, CodeBlock, SimpleTooltip, Attachment, CardFooter, MenuRadioGroup, MenuRadioItem, CardList, OverflowMenu, MenuItem, MenuSeparator, Textarea, Code, Select, SelectTrigger, SelectContent, SelectItem, DestructiveActionModal, Switch } from '../chunk-CCUDFLU3.js';
|
|
3
3
|
import { Region, Stack, Row, Grid, Page, Columns, Col, AspectBox } from '../chunk-3IWZYBGH.js';
|
|
4
4
|
import '../chunk-SRQWQUTW.js';
|
|
5
5
|
import { Icon } from '../chunk-NGBDP3BM.js';
|
package/dist/presets/index.d.ts
CHANGED
package/dist/presets/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SEMANTIC_TOKENS, WORKSPACE_SURFACE_TOKENS, DERIVED_EDGE_TOKENS, RADIUS_TOKENS, MOTION_TOKENS, TYPE_SCALE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_OVERLINE_TOKENS, DENSITY_TOKENS, LAYERING_TOKENS, TYPE_UI_TOKENS } from '../chunk-
|
|
1
|
+
import { SEMANTIC_TOKENS, WORKSPACE_SURFACE_TOKENS, DERIVED_EDGE_TOKENS, RADIUS_TOKENS, MOTION_TOKENS, TYPE_SCALE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_OVERLINE_TOKENS, DENSITY_TOKENS, LAYERING_TOKENS, TYPE_UI_TOKENS } from '../chunk-OQACYT2D.js';
|
|
2
2
|
|
|
3
3
|
// src/presets/index.ts
|
|
4
4
|
var PRESET_TOKEN_NAMES = [.../* @__PURE__ */ new Set([
|
|
@@ -24,7 +24,7 @@ var PRESET_TOKEN_NAMES = [.../* @__PURE__ */ new Set([
|
|
|
24
24
|
"theme-shadow-md",
|
|
25
25
|
"theme-shadow-lg",
|
|
26
26
|
"theme-shadow-xl",
|
|
27
|
-
// Chart series colours: optional — a preset without them inherits
|
|
27
|
+
// Chart series colours: optional — a preset without them inherits the Sable theme's validated set.
|
|
28
28
|
"chart-1",
|
|
29
29
|
"chart-2",
|
|
30
30
|
"chart-3",
|
package/dist/styles.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@utility set, and an @source directive so Tailwind scans the package.
|
|
13
13
|
========================================================================== */
|
|
14
14
|
|
|
15
|
-
/*
|
|
15
|
+
/* The Sable theme ONLY. It is the default theme, and it is also the layout floor:
|
|
16
16
|
`--page-inset`, the `--region-*` caps, `--rhythm-unit`, `--grid-*` and
|
|
17
17
|
`--z-*` are declared here on a bare `:root`, so every other theme — bundled
|
|
18
18
|
or app-owned — inherits them. Removing it does not save 18 KB, it silently
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
@import "@sableui/react/themes.css";
|
|
31
31
|
|
|
32
32
|
The failure mode if you forget: `data-sable-theme` is set, nothing matches,
|
|
33
|
-
and the page renders as
|
|
33
|
+
and the page renders as the Sable theme — no error, just the wrong theme. If a
|
|
34
34
|
theme selector looks like it does nothing, this import is the first thing
|
|
35
35
|
to check. */
|
|
36
|
-
@import "./themes/
|
|
36
|
+
@import "./themes/sable/sable.css";
|
|
37
37
|
|
|
38
38
|
/* Scan the package for utility classes (path is relative to THIS file). Covers
|
|
39
39
|
both workspace source (.ts/.tsx next to this file in src/) and the compiled
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
/* Motion easings → ease-* utilities (ease-standard/decelerate/emphasized;
|
|
120
120
|
`linear` is built-in). Durations stay raw CSS vars and are consumed via
|
|
121
121
|
`duration-(--motion-duration-*)` so the --motion-scale kill-switch applies.
|
|
122
|
-
See themes/
|
|
122
|
+
See themes/sable/sable.css → Motion tokens, and DESIGN.md → Motion. */
|
|
123
123
|
--ease-standard: var(--motion-ease-standard);
|
|
124
124
|
--ease-decelerate: var(--motion-ease-decelerate);
|
|
125
125
|
--ease-emphasized: var(--motion-ease-emphasized);
|
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
--color-panel: var(--panel);
|
|
134
134
|
--color-panel-foreground: var(--panel-foreground);
|
|
135
135
|
--color-panel-raised: var(--panel-raised);
|
|
136
|
+
--color-panel-field: var(--panel-field);
|
|
137
|
+
--color-panel-field-hover: var(--panel-field-hover);
|
|
136
138
|
--color-hairline: var(--hairline);
|
|
137
139
|
--color-hairline-strong: var(--hairline-strong);
|
|
138
140
|
}
|
|
@@ -166,7 +168,7 @@
|
|
|
166
168
|
dims what is behind it, per mode.
|
|
167
169
|
|
|
168
170
|
`--overlay` is near-black in every theme and mode, which is right for a
|
|
169
|
-
scrim. But a dark page is near-black too:
|
|
171
|
+
scrim. But a dark page is near-black too: the Sable theme's dark `--background` IS its
|
|
170
172
|
`--overlay`, so a 50% scrim over it changed nothing, and with a dialog open
|
|
171
173
|
the page's text stayed at nearly full strength — while foundations/surfaces
|
|
172
174
|
calls the scrim "the primary depth cue" for a modal. Dark mode needs more of
|
|
@@ -319,6 +321,14 @@
|
|
|
319
321
|
--panel-foreground: var(--theme-panel-foreground, var(--foreground));
|
|
320
322
|
--panel-raised: var(--theme-panel-raised, color-mix(in oklch, var(--background) 94%, var(--foreground)));
|
|
321
323
|
|
|
324
|
+
/* A compact control docked in a panel: the xs field rung and a field-style
|
|
325
|
+
button. Mixed from the panel it sits in, a further step under the pointer.
|
|
326
|
+
It used to borrow the canvas tone (3% ink), which measured 1.04:1 against
|
|
327
|
+
a dark panel: the field all but vanished. 9% is what a shipped inspector
|
|
328
|
+
settled on (1.15:1 dark, 1.25:1 light). */
|
|
329
|
+
--panel-field: var(--theme-panel-field, color-mix(in oklch, var(--panel) 91%, var(--panel-foreground)));
|
|
330
|
+
--panel-field-hover: var(--theme-panel-field-hover, color-mix(in oklch, var(--panel) 88%, var(--panel-foreground)));
|
|
331
|
+
|
|
322
332
|
/* The structural edge. Alpha-based so it holds over any surface beneath it. */
|
|
323
333
|
--hairline: var(--theme-hairline, color-mix(in oklch, transparent 93%, var(--foreground)));
|
|
324
334
|
--hairline-strong: var(--theme-hairline-strong, color-mix(in oklch, transparent 86%, var(--foreground)));
|
|
@@ -1468,7 +1478,7 @@
|
|
|
1468
1478
|
|
|
1469
1479
|
Motion is a first-class layer of Sable. Three ideas:
|
|
1470
1480
|
|
|
1471
|
-
1. TOKENS (themes/
|
|
1481
|
+
1. TOKENS (themes/sable/sable.css): a duration ladder + semantic
|
|
1472
1482
|
easings, every duration scaled by --motion-scale.
|
|
1473
1483
|
2. RECIPES (below): named, reusable motion behaviours a component opts into
|
|
1474
1484
|
with ONE class (e.g. `motion-pop`, `motion-press`) instead of hand-rolling
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { T as ThemeManifest } from './_contract-
|
|
3
|
+
import { T as ThemeManifest } from './_contract-Cn3lUpih.js';
|
|
4
4
|
|
|
5
5
|
declare const SABLE_THEME_ATTRIBUTE: "data-sable-theme";
|
|
6
6
|
declare const DEFAULT_THEME_ID: string;
|
|
@@ -62,7 +62,7 @@ interface SableThemeProviderProps {
|
|
|
62
62
|
preference?: SableThemePreference;
|
|
63
63
|
/** Notified whenever setPreference/setColorPreference is called. */
|
|
64
64
|
onPreferenceChange?: (preference: SableThemePreference) => void;
|
|
65
|
-
/** Initial design theme when uncontrolled and no stored value exists. @default "
|
|
65
|
+
/** Initial design theme when uncontrolled and no stored value exists. @default "sable" */
|
|
66
66
|
defaultThemeId?: AnyThemeId;
|
|
67
67
|
/** Controlled design theme id. */
|
|
68
68
|
themeId?: AnyThemeId;
|
|
@@ -98,7 +98,7 @@ declare function applySableTheme(themeId: AnyThemeId, target?: HTMLElement | nul
|
|
|
98
98
|
declare function SableThemeProvider({ children, defaultPreference, preference: controlledPreference, onPreferenceChange, defaultThemeId, themeId: controlledThemeId, onThemeIdChange, colorStorageKey, themeStorageKey, target, customThemes, }: SableThemeProviderProps): react.JSX.Element;
|
|
99
99
|
/**
|
|
100
100
|
* Reads Sable's active color preference and design theme. Safe without a
|
|
101
|
-
* provider; mutators become no-ops and the default (
|
|
101
|
+
* provider; mutators become no-ops and the default (Sable, dark) is reported.
|
|
102
102
|
*/
|
|
103
103
|
declare function useSableTheme(): SableThemeContextValue;
|
|
104
104
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { atelierTheme, atelier_default as default } from '../../chunk-
|
|
1
|
+
export { atelierTheme, atelier_default as default } from '../../chunk-C4Z3CF54.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--tone-edition, …), never any palette ramp directly. See themes/_contract.ts.
|
|
6
6
|
========================================================================== */
|
|
7
7
|
|
|
8
|
-
/* Scoped only — never a bare `:root`.
|
|
8
|
+
/* Scoped only — never a bare `:root`. The Sable theme alone owns `:root` as the
|
|
9
9
|
package default; a second theme claiming it leaks its tokens into every other
|
|
10
10
|
theme, and `themes.test.ts` fails the build on it. */
|
|
11
11
|
[data-sable-theme="ember"] {
|
|
@@ -238,8 +238,11 @@
|
|
|
238
238
|
--input: oklch(33% 0.012 65);
|
|
239
239
|
--control-border: oklch(55.6% 0.0084 67.7);
|
|
240
240
|
--ring: oklch(65.2% 0.235 32.9);
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
/* The light-mode fill, not a brighter one: on the brighter fill WCAG preferred
|
|
242
|
+
dark ink (5.6:1), but it reads at APCA Lc 42 — muddy — against Lc 67 for
|
|
243
|
+
white. At 58% white clears both (4.8:1, Lc 76). */
|
|
244
|
+
--primary: oklch(58% 0.245 32.9);
|
|
245
|
+
--primary-foreground: oklch(100% 0 0);
|
|
243
246
|
--secondary: oklch(26% 0.012 67.2); /* a step ABOVE the card, so a secondary Button reads on a card and on the page */
|
|
244
247
|
--secondary-foreground: oklch(100% 0 0);
|
|
245
248
|
--accent: oklch(29% 0.014 60);
|
|
@@ -264,8 +267,8 @@
|
|
|
264
267
|
--overlay-foreground: oklch(100% 0 0);
|
|
265
268
|
--sidebar: oklch(15.9% 0.016 65);
|
|
266
269
|
--sidebar-foreground: oklch(100% 0 0);
|
|
267
|
-
--sidebar-primary: oklch(
|
|
268
|
-
--sidebar-primary-foreground: oklch(
|
|
270
|
+
--sidebar-primary: oklch(58% 0.245 32.9);
|
|
271
|
+
--sidebar-primary-foreground: oklch(100% 0 0);
|
|
269
272
|
--sidebar-accent: oklch(22% 0.010 60);
|
|
270
273
|
--sidebar-accent-foreground: oklch(100% 0 0);
|
|
271
274
|
--sidebar-border: oklch(25.2% 0.012 67.2);
|
package/dist/themes/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { A as AnyThemeId, D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, T as ThemeId, h as applySableColorMode, i as applySableTheme, j as buildThemeManifestById, k as defaultThemeId, l as featuredThemeManifests, m as getThemeManifest, n as isKnownThemeId, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from '../theme-provider-
|
|
1
|
+
export { A as AnyThemeId, D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, T as ThemeId, h as applySableColorMode, i as applySableTheme, j as buildThemeManifestById, k as defaultThemeId, l as featuredThemeManifests, m as getThemeManifest, n as isKnownThemeId, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from '../theme-provider-CGeiusgu.js';
|
|
2
2
|
export { atelierTheme } from './atelier/index.js';
|
|
3
|
-
export { baseTheme } from './base/index.js';
|
|
4
3
|
export { default as emberTheme } from './ember/index.js';
|
|
5
4
|
export { default as meridianTheme } from './meridian/index.js';
|
|
6
5
|
export { default as poppyTheme } from './poppy/index.js';
|
|
7
6
|
export { default as prismTheme } from './prism/index.js';
|
|
7
|
+
export { default as sableTheme } from './sable/index.js';
|
|
8
8
|
export { default as verdantTheme } from './verdant/index.js';
|
|
9
9
|
import 'react';
|
|
10
|
-
import '../_contract-
|
|
10
|
+
import '../_contract-Cn3lUpih.js';
|
package/dist/themes/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DEFAULT_THEME_ID, SABLE_COLOR_STORAGE_KEY, SABLE_THEME_ATTRIBUTE, SABLE_THEME_STORAGE_KEY, SableThemeProvider, applySableColorMode, applySableTheme, buildThemeManifestById, defaultThemeId, featuredThemeManifests, getThemeManifest, isKnownThemeId, isThemeId, themeIds, themeManifestById, themeManifests, useSableTheme } from '../chunk-
|
|
1
|
+
export { DEFAULT_THEME_ID, SABLE_COLOR_STORAGE_KEY, SABLE_THEME_ATTRIBUTE, SABLE_THEME_STORAGE_KEY, SableThemeProvider, applySableColorMode, applySableTheme, buildThemeManifestById, defaultThemeId, featuredThemeManifests, getThemeManifest, isKnownThemeId, isThemeId, themeIds, themeManifestById, themeManifests, useSableTheme } from '../chunk-EFLC4NA3.js';
|
|
2
2
|
export { prismTheme } from '../chunk-7MG4SHYX.js';
|
|
3
3
|
export { verdantTheme } from '../chunk-KO3NAEBF.js';
|
|
4
4
|
export { emberTheme } from '../chunk-L4IEIQQA.js';
|
|
5
|
-
export {
|
|
5
|
+
export { sableTheme } from '../chunk-EHH4MHO6.js';
|
|
6
6
|
export { poppyTheme } from '../chunk-ADLLDWLW.js';
|
|
7
7
|
export { meridianTheme } from '../chunk-K7RUHUGC.js';
|
|
8
|
-
export { atelierTheme } from '../chunk-
|
|
8
|
+
export { atelierTheme } from '../chunk-C4Z3CF54.js';
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
--theme-button-radius: 12px;
|
|
123
123
|
--button-radius: var(--theme-button-radius);
|
|
124
124
|
/* Hard offsets the whole way up. Only sm and md were declared, so the
|
|
125
|
-
default, lg and xl steps fell through to
|
|
125
|
+
default, lg and xl steps fell through to the Sable theme's soft blurs and one ladder
|
|
126
126
|
spoke two shadow languages. Offset doubles roughly per step. */
|
|
127
127
|
--theme-shadow-sm: 3px 3px 0 oklch(32% 0.05 320 / 0.12);
|
|
128
128
|
--theme-shadow: 4px 4px 0 oklch(32% 0.05 320 / 0.13);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { T as ThemeManifest } from '../../_contract-Cn3lUpih.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sable — the default theme. Concrete token values live in
|
|
5
|
+
* `sable.css`; this manifest is the typed, machine-readable description.
|
|
6
|
+
*/
|
|
7
|
+
declare const sableTheme: ThemeManifest;
|
|
8
|
+
|
|
9
|
+
export { sableTheme as default, sableTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { sable_default as default, sableTheme } from '../../chunk-EHH4MHO6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
|
-
|
|
2
|
+
Sable — the default theme.
|
|
3
3
|
|
|
4
4
|
Dark-by-default, content-first, fluid product aesthetic. Palette authored in
|
|
5
5
|
OKLCH (locked hue per ramp, perceptually-even lightness, sRGB-capped chroma).
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
========================================================================== */
|
|
15
15
|
|
|
16
16
|
:root,
|
|
17
|
-
[data-sable-theme="
|
|
17
|
+
[data-sable-theme="sable"] {
|
|
18
18
|
/* Chart series colours — a categorical palette validated for colour-blind
|
|
19
19
|
separation (adjacent pairs), a normal-vision floor, a lightness band and a
|
|
20
20
|
chroma floor against this theme's surfaces. Charts take them in order
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
font size. The docs app runs a 14px responsive root, so `56rem` rendered
|
|
320
320
|
784px while claiming 896px and `80rem` rendered 1120px while claiming
|
|
321
321
|
1280px — the default theme silently 12.5% under its own spec, in its own
|
|
322
|
-
primary consumer. Every generated theme already declares px;
|
|
322
|
+
primary consumer. Every generated theme already declares px; Sable was
|
|
323
323
|
the only one that did not, which is the worst possible one to get wrong.
|
|
324
324
|
The values below are DESIGN.md's table verbatim. */
|
|
325
325
|
--region-form: 480px; /* narrow single-col forms, auth, dialogs */
|
|
@@ -382,11 +382,11 @@
|
|
|
382
382
|
Semantic tokens — dark mode (the brand default)
|
|
383
383
|
========================================================================== */
|
|
384
384
|
.dark,
|
|
385
|
-
.dark[data-sable-theme="
|
|
386
|
-
[data-sable-theme="
|
|
385
|
+
.dark[data-sable-theme="sable"],
|
|
386
|
+
[data-sable-theme="sable"].dark,
|
|
387
387
|
/* A preset-scoped subtree inside a dark page follows the page into dark mode;
|
|
388
388
|
add `.light` to that subtree to pin it light. */
|
|
389
|
-
.dark [data-sable-theme="
|
|
389
|
+
.dark [data-sable-theme="sable"]:not(.light) {
|
|
390
390
|
/* The same eight hues, stepped for the dark band (L 0.48–0.67, >= 3:1 on
|
|
391
391
|
the dark surfaces) and validated as a set — not a lightness flip. */
|
|
392
392
|
--chart-1: oklch(62.21% 0.1612 255.05); /* #3987e5 */
|
package/dist/themes.css
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
@import "@sableui/react/themes.css"; ← this file
|
|
7
7
|
|
|
8
8
|
For an app that offers the bundled set as user-selectable themes (a
|
|
9
|
-
`<ThemeSelector>` over
|
|
10
|
-
carries
|
|
9
|
+
`<ThemeSelector>` over Sable / Meridian / Prism / Verdant / Ember / Poppy). `styles.css`
|
|
10
|
+
carries the Sable theme alone, since the alternates are `[data-sable-theme]`-scoped
|
|
11
11
|
and dead weight in the overwhelmingly common single-theme app.
|
|
12
12
|
|
|
13
13
|
Needing exactly one alternate? Import just that one instead — this file is a
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
@import "@sableui/react/theme/prism.css";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The Sable theme is NOT here: it ships in `styles.css` and must, since it declares
|
|
19
19
|
the layout floor (`--page-inset`, `--region-*`, `--rhythm-unit`) on a bare
|
|
20
20
|
`:root` that every other theme inherits.
|
|
21
21
|
========================================================================== */
|
|
@@ -35,7 +35,7 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
|
|
|
35
35
|
|
|
36
36
|
| Name | Type | Default | Description |
|
|
37
37
|
| --- | --- | --- | --- |
|
|
38
|
-
| variant | "primary" \| "secondary" \| "ghost" \| "outline" \| "destructive" \| "link" \| "floating" \| "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. |
|
|
38
|
+
| 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. |
|
|
39
39
|
| 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. |
|
|
40
40
|
| render | ReactElement \| (props, state) => ReactElement | — | Compose with another element/component through the Base UI render prop. |
|
|
41
41
|
| loading | boolean | false | Disable the button and show a leading Spinner while an action is in flight. Sets aria-busy; a native button is disabled, a render element (e.g. an <a>) gets aria-disabled. |
|
|
@@ -46,12 +46,12 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
|
|
|
46
46
|
|
|
47
47
|
## Variants
|
|
48
48
|
|
|
49
|
-
- **variant**: primary, secondary, ghost, outline, destructive, link, floating, on-color, on-color-outline, on-color-ghost
|
|
49
|
+
- **variant**: primary, secondary, ghost, outline, destructive, link, floating, field, on-color, on-color-outline, on-color-ghost
|
|
50
50
|
- **size**: xs, sm, md, cta, icon, icon-sm, icon-xs
|
|
51
51
|
|
|
52
52
|
## Tokens used
|
|
53
53
|
|
|
54
|
-
`primary`, `primary-foreground`, `secondary`, `secondary-foreground`, `accent`, `accent-foreground`, `input`, `destructive`, `destructive-foreground`, `ring`
|
|
54
|
+
`primary`, `primary-foreground`, `secondary`, `secondary-foreground`, `accent`, `accent-foreground`, `input`, `destructive`, `destructive-foreground`, `ring`, `panel-field`, `panel-field-hover`, `panel-foreground`
|
|
55
55
|
|
|
56
56
|
## Motion
|
|
57
57
|
|
|
@@ -182,6 +182,18 @@ import { Button, Icon, NotificationBadge } from "@sableui/react"
|
|
|
182
182
|
<Button size="icon" variant="ghost" aria-label="Notifications" badge={<NotificationBadge dot />}><Icon name="bell" /></Button>
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
+
### Field button in a panel row
|
|
186
|
+
|
|
187
|
+
```tsx
|
|
188
|
+
import { Button, Icon, PanelSection, PropertyRow } from "@sableui/react"
|
|
189
|
+
|
|
190
|
+
<PanelSection title="Text">
|
|
191
|
+
<PropertyRow label="Font">
|
|
192
|
+
<Button variant="field" size="xs" className="w-full justify-between" iconEnd={<Icon name="chevron-down" />}>Figtree</Button>
|
|
193
|
+
</PropertyRow>
|
|
194
|
+
</PanelSection>
|
|
195
|
+
```
|
|
196
|
+
|
|
185
197
|
### On a coloured band
|
|
186
198
|
|
|
187
199
|
```tsx
|
package/llms/components/input.md
CHANGED
|
@@ -33,7 +33,7 @@ Use Input for short freeform text, search, email, password, file, and native inp
|
|
|
33
33
|
|
|
34
34
|
| Name | Type | Default | Description |
|
|
35
35
|
| --- | --- | --- | --- |
|
|
36
|
-
| size | "md" \| "xs" | "md" | md is the form field. xs is the dense inset field of a tool panel (an inset
|
|
36
|
+
| size | "md" \| "xs" | "md" | md is the form field. xs is the dense inset field of a tool panel (an inset panel-field fill, no outline, tight padding) — the same ladder as Select and Combobox. Use it instead of overriding the height with className. |
|
|
37
37
|
| type | string | "text" | Native input type (text, email, password, search, number, file, …). type="file" themes the native selector button via file: token utilities. |
|
|
38
38
|
| disabled | boolean | false | Dims the control and blocks pointer interaction. |
|
|
39
39
|
| aria-invalid | boolean | — | Surfaces the destructive border + ring. Base UI form fields set this automatically. |
|
|
@@ -40,7 +40,7 @@ Use ScrubField for numeric properties in tool chrome — an inspector, a propert
|
|
|
40
40
|
|
|
41
41
|
## Tokens used
|
|
42
42
|
|
|
43
|
-
`foreground`, `muted-foreground`, `ring`, `
|
|
43
|
+
`foreground`, `muted-foreground`, `ring`, `panel-field`, `panel-field-hover`
|
|
44
44
|
|
|
45
45
|
## Accessibility
|
|
46
46
|
|
|
@@ -33,7 +33,7 @@ Use Select when users choose one value from a known, finite set. Use Combobox fo
|
|
|
33
33
|
|
|
34
34
|
| Name | Type | Description |
|
|
35
35
|
| --- | --- | --- |
|
|
36
|
-
| SelectTrigger | Base UI Trigger props + placeholder?: ReactNode + size?: "md" \| "xs" + className | The button. Composes Trigger + Value + a chevron Icon that flips on open (data-[popup-open]). `size="xs"` is the property-grid rung — height, padding, radius AND surface move together, which is why it is a prop and not a className: the xs trigger is an inset `bg-
|
|
36
|
+
| SelectTrigger | Base UI Trigger props + placeholder?: ReactNode + size?: "md" \| "xs" + className | The button. Composes Trigger + Value + a chevron Icon that flips on open (data-[popup-open]). `size="xs"` is the property-grid rung — height, padding, radius AND surface move together, which is why it is a prop and not a className: the xs trigger is an inset `bg-panel-field` field with no border, matching ScrubField on the same row. A consumer overriding only the height gets an md-register 8px radius on a 24px box and a raised card sitting among inset fields; one inspector panel had eleven of those, and both tells are visible at a glance. |
|
|
37
37
|
| SelectContent | Base UI Popup props + side, align, sideOffset + className | Portal + Positioner + Popup + List. side="bottom", align="start", sideOffset=6 by default; matches trigger width. |
|
|
38
38
|
| SelectItem | { value: string; disabled?: boolean; label?: string } + className | An option. Composes Item + ItemText + a check ItemIndicator for the selected row. String children double as the item's `label`, so the closed trigger shows the display text — pass `label` explicitly only when children are richer than a string. |
|
|
39
39
|
| SelectGroup | Base UI Group props + className | Optional grouping of related options. |
|
|
@@ -62,7 +62,7 @@ const { themeId, setThemeId, themes, mode } = useSableTheme()
|
|
|
62
62
|
```tsx
|
|
63
63
|
import { ThemeSelector, type ThemeId } from "@sableui/react"
|
|
64
64
|
|
|
65
|
-
const [themeId, setThemeId] = useState<ThemeId>("
|
|
65
|
+
const [themeId, setThemeId] = useState<ThemeId>("sable")
|
|
66
66
|
<ThemeSelector value={themeId} onValueChange={setThemeId} />
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -306,7 +306,7 @@ Which token to reach for, and what it is most often confused with. Generated fro
|
|
|
306
306
|
- **`type-mono-sm-tracking`** — The monospace family: mono-xl through mono-sm, plus mono-caption. *Use for:* Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.
|
|
307
307
|
- **Not** the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page.
|
|
308
308
|
|
|
309
|
-
### derived (
|
|
309
|
+
### derived (10)
|
|
310
310
|
|
|
311
311
|
- **`canvas`** — The WORK surface — the artboard, the document being edited. *Use for:* Behind the thing the tool operates on. `WorkspaceCanvas` uses it.
|
|
312
312
|
- **Not** `background`. The thing being edited is not the page behind the UI, and collapsing the two makes the document indistinguishable from its chrome.
|
|
@@ -318,6 +318,10 @@ Which token to reach for, and what it is most often confused with. Generated fro
|
|
|
318
318
|
- **Not** `foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.
|
|
319
319
|
- **`panel-raised`** — One step up from `panel`: a selected row, a hover fill, a nested well. *Use for:* Tree row selection, hovered panel rows, and the light square of a checkerboard.
|
|
320
320
|
- **Not** `accent`. In a workspace the tonal band is only a few units wide; `accent` is a page-register step and reads as a shout in chrome.
|
|
321
|
+
- **`panel-field`** — The inset fill of a compact control docked in a panel. *Use for:* The `size="xs"` field rung (Input, SelectTrigger, ScrubField share it) and `<Button variant="field">`. A panel control of your own that should sit among those fields.
|
|
322
|
+
- **Not** `canvas`. `canvas` names the work surface, and its step off the panel is too faint to read as a field in dark mode. This one is mixed from the panel itself, so it follows a theme that retunes the panel. Tune it with `--theme-panel-field`.
|
|
323
|
+
- **`panel-field-hover`** — The hover step of a `panel-field` control. *Use for:* `hover:bg-panel-field-hover` on anything filled with `panel-field`.
|
|
324
|
+
- **Not** `hover:bg-panel-raised`. A fixed surface token as a hover is what the surface-hover lint rejects; this one is defined against the panel field it steps from.
|
|
321
325
|
- **`hairline`** — The 1px structural line that carries all separation in tool chrome. *Use for:* Between panel sections, under a toolbar, above a status bar.
|
|
322
326
|
- **Not** a bigger tonal step. This is one of the two rules the workspace register deliberately reverses: on a page prefer space or tone over a line, in chrome the hairline *is* the structure.
|
|
323
327
|
- **`hairline-strong`** — A hairline that must be seen — an input edge, a swatch ring. *Use for:* Bounding a control whose fill is arbitrary (a colour swatch) or user content.
|