@sableui/react 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # What's new
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Charts
6
+
7
+ - **Smoother hover.** The tooltip is anchored to the data instead of chasing
8
+ the pointer, and glides between positions; the cursor and the active dots
9
+ glide too. Moving within one data position no longer re-renders the chart.
10
+ Hover feedback has its own quick timing — dimming the other bars no longer
11
+ waits out the arrival stagger.
12
+ - Active dots on stacked areas draw above every series, so a later fill no
13
+ longer covers the dot below it.
14
+
15
+ ### Presets
16
+
17
+ - Presets may carry the chart palette (`chart-1` … `chart-8`). Optional — a
18
+ preset without them inherits Base's validated set. On sableui.com,
19
+ Customize now generates a chart palette from the brand and the Palette
20
+ setting, held to the same colour-blind and normal-vision separation checks.
21
+
22
+ ### iOS
23
+
24
+ - Layers portalled out of an iOS prototype (a toast stack, a menu) read the
25
+ prototype's safe-area geometry, so a toast placed under the status bar shows
26
+ there instead of below the screen.
27
+
3
28
  ## 0.3.0
4
29
 
5
30
  Blocks, charts, and the components they needed.
@@ -1,4 +1,4 @@
1
- import { Kbd, CommandMenuPanel, ToggleGroup, Toggle, BarChart, DateTile, Accordion, AccordionItem, AccordionTrigger, AccordionPanel, RadialChart, Sparkline, Slider, Stepper, StepperItem, SegmentedBar, Checkbox, PieChart, AreaChart, OtpField } from '../chunk-K6LII3OE.js';
1
+ import { Kbd, CommandMenuPanel, ToggleGroup, Toggle, BarChart, DateTile, Accordion, AccordionItem, AccordionTrigger, AccordionPanel, RadialChart, Sparkline, Slider, Stepper, StepperItem, SegmentedBar, Checkbox, PieChart, AreaChart, OtpField } from '../chunk-WCFLQVK5.js';
2
2
  import { Card, CardHeader, CardTitle, CardDescription, CardAction, Button, CardList, Entity, OverflowMenu, MenuItem, MenuSeparator, Code, CardContent, Message, Bubble, CardFooter, DestructiveActionModal, Badge, AvatarGroup, Avatar, Textarea, CodeBlock, Input, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, StatusDot, Switch, Form, Field, Select, SelectTrigger, SelectContent, SelectItem, Separator, Label, Attachment } from '../chunk-CKNM7KSB.js';
3
3
  import { Region, Stack, Row, Grid } from '../chunk-3IWZYBGH.js';
4
4
  import { cn } from '../chunk-SRQWQUTW.js';
@@ -705,7 +705,6 @@ function ChartFrame({
705
705
  const [size, setSize] = useState(null);
706
706
  const [shown, setShown] = useState(!animate);
707
707
  const [uncontrolled, setUncontrolled] = useState(defaultActiveIndex);
708
- const [pointer, setPointer] = useState(null);
709
708
  const [viaKeyboard, setViaKeyboard] = useState(false);
710
709
  const appeared = useRef(true);
711
710
  const tableId = useId();
@@ -753,8 +752,7 @@ function ChartFrame({
753
752
  const onPointer = (event) => {
754
753
  if (!interactive || !size || !hitTest) return;
755
754
  const p = local(event);
756
- setPointer(p);
757
- setViaKeyboard(false);
755
+ if (viaKeyboard) setViaKeyboard(false);
758
756
  setActive(hitTest(p.x, p.y, size));
759
757
  };
760
758
  const onKeyDown = (event) => {
@@ -767,11 +765,10 @@ function ChartFrame({
767
765
  else if (event.key === "Escape") next = null;
768
766
  if (next === void 0) return;
769
767
  event.preventDefault();
770
- setPointer(null);
771
768
  setViaKeyboard(true);
772
769
  setActive(next);
773
770
  };
774
- const placement = size && active != null && tooltip ? tooltip(active, size, pointer) : null;
771
+ const placement = size && active != null && tooltip ? tooltip(active, size) : null;
775
772
  const flip = placement && size ? placement.x > size.width / 2 : false;
776
773
  return /* @__PURE__ */ jsxs(
777
774
  "figure",
@@ -792,7 +789,6 @@ function ChartFrame({
792
789
  onPointerMove: onPointer,
793
790
  onPointerDown: onPointer,
794
791
  onPointerLeave: () => {
795
- setPointer(null);
796
792
  if (!viaKeyboard) setActive(null);
797
793
  },
798
794
  onKeyDown,
@@ -816,10 +812,11 @@ function ChartFrame({
816
812
  "aria-hidden": true,
817
813
  className: cn(
818
814
  "pointer-events-none absolute start-0 top-0 z-10",
815
+ // Glides between positions; appears in place the first time.
819
816
  !appeared.current && "transition-transform duration-(--motion-duration-fast) ease-standard"
820
817
  ),
821
818
  style: { transform: `translate(${Math.round(placement.x)}px, ${Math.round(placement.y)}px)` },
822
- children: /* @__PURE__ */ jsx("div", { className: cn("w-max -translate-y-1/2", flip ? "-translate-x-[calc(100%+0.75rem)]" : "translate-x-3"), children: placement.content })
819
+ children: /* @__PURE__ */ jsx("div", { className: cn("w-max -translate-y-1/2 transition-transform duration-(--motion-duration-fast) ease-standard", flip ? "-translate-x-[calc(100%+0.75rem)]" : "translate-x-3"), children: placement.content })
823
820
  }
824
821
  ) : null
825
822
  ]
@@ -1002,17 +999,22 @@ function strokeArcPath(cx, cy, r, a0, a1) {
1002
999
  var DRAW_DURATION = "calc(var(--motion-duration-slower) * 1.8)";
1003
1000
  var RISE = "var(--motion-duration-slower) var(--motion-ease-emphasized)";
1004
1001
  var MORPH = "var(--motion-duration-slow) var(--motion-ease-standard)";
1002
+ var HOVER = "var(--motion-duration-fast) var(--motion-ease-standard)";
1003
+ var GLIDE = `transform ${HOVER}, opacity ${HOVER}, cx ${HOVER}, cy ${HOVER}`;
1004
+ function barTransition(delay = "0ms") {
1005
+ return `scale ${RISE} ${delay}, opacity ${HOVER}, d ${MORPH}`;
1006
+ }
1005
1007
  function stagger(index, stepMs = 35) {
1006
1008
  return `calc(${Math.min(index, 24) * stepMs}ms * var(--motion-scale, 1))`;
1007
1009
  }
1008
1010
  function drawTransition(delay = "0ms") {
1009
- return `stroke-dashoffset ${DRAW_DURATION} var(--motion-ease-decelerate) ${delay}, d ${MORPH}`;
1011
+ return `stroke-dashoffset ${DRAW_DURATION} var(--motion-ease-decelerate) ${delay}, d ${MORPH}, opacity ${HOVER}`;
1010
1012
  }
1011
1013
  function riseTransition(delay = "0ms") {
1012
1014
  return `scale ${RISE} ${delay}, opacity ${RISE} ${delay}, d ${MORPH}`;
1013
1015
  }
1014
1016
  function morphTransition() {
1015
- return `d ${MORPH}, opacity ${MORPH}, cx ${MORPH}, cy ${MORPH}`;
1017
+ return `d ${MORPH}, opacity ${HOVER}, cx ${MORPH}, cy ${MORPH}`;
1016
1018
  }
1017
1019
  function pathStyle(d) {
1018
1020
  return { d: `path("${d}")` };
@@ -1186,7 +1188,7 @@ function CartesianChart(props) {
1186
1188
  return best;
1187
1189
  };
1188
1190
  const describe = (i) => `${categories[i]}: ${series.map((s, k) => `${s.label} ${fullValue(k, i)}`).join(", ")}`;
1189
- const tooltipFor = (i, size, pointer) => {
1191
+ const tooltipFor = (i, size) => {
1190
1192
  const L = layoutFor(size);
1191
1193
  const total = values.reduce((sum, s) => sum + s[i], 0);
1192
1194
  const content = /* @__PURE__ */ jsx(
@@ -1198,8 +1200,11 @@ function CartesianChart(props) {
1198
1200
  total: tooltipOptions.showTotal ? fmt.full(total) : void 0
1199
1201
  }
1200
1202
  );
1201
- if (horizontal) return { content, x: pointer?.x ?? (L.x0 + L.x1) / 2, y: L.center(i) };
1202
- return { content, x: L.center(i), y: pointer?.y ?? (L.y0 + L.y1) / 2 };
1203
+ if (horizontal) {
1204
+ const end = Math.max(0, ...series.map((_, k) => stacks ? stacks[k][i][1] : values[k][i]));
1205
+ return { content, x: Math.min(L.value(end), L.x1), y: L.center(i) };
1206
+ }
1207
+ return { content, x: L.center(i), y: (L.y0 + L.y1) / 2 };
1203
1208
  };
1204
1209
  const table = {
1205
1210
  headers: [index.charAt(0).toUpperCase() + index.slice(1), ...series.map((s) => s.label)],
@@ -1224,6 +1229,7 @@ function CartesianChart(props) {
1224
1229
  children: ({ size, activeIndex: active }) => {
1225
1230
  const L = layoutFor(size);
1226
1231
  const marks = [];
1232
+ const activeDots = [];
1227
1233
  const widths = categories.map((_, i) => approxTextWidth(tickText(i)));
1228
1234
  const slot = (horizontal ? L.y1 - L.y0 : L.x1 - L.x0) / Math.max(1, n) || 1;
1229
1235
  const every = Math.max(1, Math.ceil((horizontal ? 18 : Math.max(0, ...widths) + 12) / slot));
@@ -1247,15 +1253,13 @@ function CartesianChart(props) {
1247
1253
  });
1248
1254
  let cursor = null;
1249
1255
  if (active != null && active < n) {
1256
+ const c = L.center(active);
1257
+ const move = { transform: horizontal ? `translate(0px, ${c}px)` : `translate(${c}px, 0px)`, transition: GLIDE };
1250
1258
  if (L.band) {
1251
- const c = L.center(active);
1252
- const half = Math.min(L.band.step, Math.max(L.band.bandwidth, barWidth * 2)) / 2;
1253
- const a = Math.max(horizontal ? L.y0 : L.x0, c - half);
1254
- const b = Math.min(horizontal ? L.y1 : L.x1, c + half);
1255
- cursor = horizontal ? /* @__PURE__ */ jsx("rect", { x: L.x0, y: a, width: L.x1 - L.x0, height: b - a, rx: 6, className: "fill-foreground/5" }) : /* @__PURE__ */ jsx("rect", { x: a, y: L.y0, width: b - a, height: L.y1 - L.y0, rx: 6, className: "fill-foreground/5" });
1259
+ const w = L.band.bandwidth;
1260
+ cursor = /* @__PURE__ */ jsx("g", { style: move, children: horizontal ? /* @__PURE__ */ jsx("rect", { x: L.x0, y: -w / 2, width: L.x1 - L.x0, height: w, rx: 6, className: "fill-foreground/5" }) : /* @__PURE__ */ jsx("rect", { x: -w / 2, y: L.y0, width: w, height: L.y1 - L.y0, rx: 6, className: "fill-foreground/5" }) });
1256
1261
  } else {
1257
- const p = L.center(active);
1258
- cursor = /* @__PURE__ */ jsx("line", { x1: p, x2: p, y1: L.y0, y2: L.y1, className: "stroke-foreground/25" });
1262
+ cursor = /* @__PURE__ */ jsx("g", { style: move, children: /* @__PURE__ */ jsx("line", { x1: 0, x2: 0, y1: L.y0, y2: L.y1, className: "stroke-foreground/25" }) });
1259
1263
  }
1260
1264
  }
1261
1265
  if (kind === "bar" && L.band) {
@@ -1297,14 +1301,13 @@ function CartesianChart(props) {
1297
1301
  d,
1298
1302
  className: cn(
1299
1303
  horizontal ? "[[data-reveal=out]_&]:scale-x-0" : "[[data-reveal=out]_&]:scale-y-0",
1300
- "transition-opacity",
1301
1304
  dim && "opacity-40"
1302
1305
  ),
1303
1306
  style: {
1304
1307
  ...pathStyle(d),
1305
1308
  fill: colorAt(k, i),
1306
1309
  transformOrigin: origin,
1307
- transition: riseTransition(stagger(i))
1310
+ transition: barTransition(stagger(i))
1308
1311
  }
1309
1312
  },
1310
1313
  `b${k}-${i}`
@@ -1406,7 +1409,7 @@ function CartesianChart(props) {
1406
1409
  }
1407
1410
  if (active != null && active < n) {
1408
1411
  const [x, y] = top[active];
1409
- marks.push(/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, strokeWidth: 2, className: SURFACE, style: { fill: s.colorValue } }, `ap${k}`));
1412
+ activeDots.push(/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, strokeWidth: 2, className: SURFACE, style: { fill: s.colorValue, cx: x, cy: y, transition: GLIDE } }, `ap${k}`));
1410
1413
  }
1411
1414
  }
1412
1415
  }
@@ -1415,6 +1418,7 @@ function CartesianChart(props) {
1415
1418
  grid ? /* @__PURE__ */ jsx("g", { children: gridLines }) : null,
1416
1419
  cursor,
1417
1420
  /* @__PURE__ */ jsx("g", { children: marks }),
1421
+ /* @__PURE__ */ jsx("g", { children: activeDots }),
1418
1422
  zero ? horizontal ? /* @__PURE__ */ jsx("line", { x1: L.base, x2: L.base, y1: L.y0, y2: L.y1, className: "stroke-foreground/20" }) : /* @__PURE__ */ jsx("line", { x1: L.x0, x2: L.x1, y1: L.base, y2: L.base, className: "stroke-foreground/20" }) : null,
1419
1423
  (horizontal ? xAxis : yAxis) ? /* @__PURE__ */ jsx("g", { children: valueAxis }) : null,
1420
1424
  (horizontal ? yAxis : xAxis) ? /* @__PURE__ */ jsx("g", { children: categoryAxis }) : null
package/dist/index.d.ts CHANGED
@@ -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.3.0";
7502
+ declare const SABLE_UI_VERSION: "0.3.1";
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
@@ -2,8 +2,8 @@ export { DENSITY_TOKENS, MOTION_TOKENS, RADIUS_TOKENS, SEMANTIC_TOKENS, TYPE_OVE
2
2
  export { Phone, phoneMeta } from './chunk-KFZ43RKU.js';
3
3
  import './chunk-NEQNXI2G.js';
4
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-6LCIBMMG.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-K6LII3OE.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-K6LII3OE.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-WCFLQVK5.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-WCFLQVK5.js';
7
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-CKNM7KSB.js';
8
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-CKNM7KSB.js';
9
9
  export { AspectBox, Bleed, Center, Col, Columns, Grid, GridOverlay, Page, Region, Row, SafeArea, Spacer, SplitPane, Stack } from './chunk-3IWZYBGH.js';
@@ -11260,6 +11260,6 @@ var carouselMeta = {
11260
11260
  };
11261
11261
 
11262
11262
  // src/index.ts
11263
- var SABLE_UI_VERSION = "0.3.0";
11263
+ var SABLE_UI_VERSION = "0.3.1";
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 };
@@ -30,6 +30,14 @@
30
30
  --ios-safe-top: env(safe-area-inset-top, 0px); --ios-header-height: calc(92px + var(--ios-safe-top));
31
31
  --ios-tabbar-bottom: max(12px, env(safe-area-inset-bottom, 0px)); --ios-content-bottom: calc(82px + var(--ios-tabbar-bottom));
32
32
  }
33
+ /* Portalled layers — a toast stack, a menu — render at <body>, outside
34
+ .ios-prototype, so they could not see its geometry: a toast placed at
35
+ top: var(--ios-safe-top) fell back to top: auto and landed below the screen.
36
+ A prototype owns its whole document (the framed page, or a real phone's
37
+ screen), so the root carries the same values whenever one is present.
38
+ Keep these in step with the .ios-prototype rules above. */
39
+ :root:has(.ios-prototype) { --ios-inset: 16px; --ios-safe-top: 62px; --ios-tabbar-bottom: 28px; }
40
+ :root:has(.ios-prototype.ios-bare) { --ios-safe-top: env(safe-area-inset-top, 0px); --ios-tabbar-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
33
41
  .ios-prototype.dark {
34
42
  --ios-canvas: var(--background, #000); --ios-ink: var(--foreground, #f2f2f7); --ios-secondary: var(--muted-foreground, #aeaeb2);
35
43
  --ios-panel: var(--card, #1c1c1e); --ios-primary-ink: var(--primary-foreground, #fff);
@@ -23,7 +23,16 @@ var PRESET_TOKEN_NAMES = [.../* @__PURE__ */ new Set([
23
23
  "theme-shadow",
24
24
  "theme-shadow-md",
25
25
  "theme-shadow-lg",
26
- "theme-shadow-xl"
26
+ "theme-shadow-xl",
27
+ // Chart series colours: optional — a preset without them inherits Base's validated set.
28
+ "chart-1",
29
+ "chart-2",
30
+ "chart-3",
31
+ "chart-4",
32
+ "chart-5",
33
+ "chart-6",
34
+ "chart-7",
35
+ "chart-8"
27
36
  ])];
28
37
  var tokenNames = new Set(PRESET_TOKEN_NAMES);
29
38
  var record = (value) => !!value && typeof value === "object" && !Array.isArray(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sableui/react",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Sable: themeable React components, layout patterns, and tools for coding agents.",
5
5
  "type": "module",
6
6
  "sideEffects": [
package/registry.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://sable.design/registry.schema.json",
3
3
  "name": "@sableui/react",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "Themeable React components, semantic tokens, layout patterns, presets, and package-owned agent skills. Default theme: Base.",
6
6
  "engine": {
7
7
  "behavior": "@base-ui/react",