@sableui/react 0.4.0 → 0.5.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/CHANGELOG.md +54 -0
- package/dist/blocks/index.js +4 -4
- package/dist/{chunk-FBSL2LZQ.js → chunk-GU3T7SBA.js} +11 -30
- package/dist/{chunk-NGBDP3BM.js → chunk-QJ6FWTUG.js} +1 -1
- package/dist/{chunk-CCUDFLU3.js → chunk-RCLKXF2N.js} +43 -9
- package/dist/{chunk-TH563WLW.js → chunk-XAZGMY73.js} +10 -3
- package/dist/{chunk-D2ETQBHV.js → chunk-ZBZMKOO7.js} +4 -4
- package/dist/icon/index.js +2 -2
- package/dist/icon-sets/brands.d.ts +0 -27
- package/dist/icon-sets/brands.js +7 -1
- package/dist/icon-sets/reicon.js +1 -1
- package/dist/index.d.ts +39 -14
- package/dist/index.js +99 -22
- package/dist/patterns/index.js +4 -4
- package/dist/styles.css +7 -0
- package/llms/components/tabs.md +1 -1
- package/llms/components/toast.md +12 -1
- package/llms-full.txt +13 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/registry.json +32 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# What's new
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
- **Stacked toasts.** `<ToastProvider stacked>` stacks toasts like a deck of
|
|
6
|
+
cards: the newest in front, older ones peeking out behind it a step smaller,
|
|
7
|
+
so a burst of toasts no longer takes over the corner of the page. Hovering
|
|
8
|
+
or focusing the stack fans it out into the list. It works at every
|
|
9
|
+
`position`. `ToastContent` is the new part that holds a toast's row; in a
|
|
10
|
+
stacked viewport it hides the cards behind the front one. Collapsed, the
|
|
11
|
+
deck casts one shadow rather than one per card, so a theme with hard offset
|
|
12
|
+
shadows (Poppy) stays clean.
|
|
13
|
+
- **Depth in Customize.** On sableui.com, Customize has a Depth control (Flat ↔
|
|
14
|
+
Lifted) and a Shadow style (Preset, Soft, Crisp, Offset). They write the five
|
|
15
|
+
`--theme-shadow-*` tokens for light and dark, so the CSS export and preset
|
|
16
|
+
download carry them. Depth scales the reach and strength of every step
|
|
17
|
+
together; lifting a flat preset such as Meridian brings in soft shadows. The
|
|
18
|
+
shadow takes the preset's neutral hue. Advanced replaces the slider with
|
|
19
|
+
exact numbers set on the largest step, which the others follow: light angle
|
|
20
|
+
(90° is overhead), distance, blur and opacity. Blur takes one
|
|
21
|
+
blur-to-distance ratio, so an Offset shadow can be softened; opacity is set
|
|
22
|
+
in light mode and dark mode darkens in proportion.
|
|
23
|
+
- **Knob shadows stay on their track.** The Switch thumb, Slider thumb and
|
|
24
|
+
ColorField handle used `shadow-sm`, the elevation step for raised surfaces.
|
|
25
|
+
Where a theme or a Depth setting made that a long offset (Poppy's hard
|
|
26
|
+
drops), the shadow fell outside the switch's track. Knobs now take
|
|
27
|
+
`--knob-shadow`, one small contact shadow that themes can set through
|
|
28
|
+
`--theme-knob-shadow`. In Sable it looks the same as before.
|
|
29
|
+
- **Pill tabs take the theme's button shape.** `TabsList variant="pill"`
|
|
30
|
+
triggers used the small radius, so in Sable they were rounded rectangles
|
|
31
|
+
beside pill buttons. They now read `--button-radius`
|
|
32
|
+
as `Button` does: pills in Sable, 12px in Poppy, square in Meridian, and a
|
|
33
|
+
theme's own button shape wherever it sets one.
|
|
34
|
+
- **CodeBlock no longer scrolls code under its copy button.** Without a
|
|
35
|
+
filename header, the copy button floated over the code, so on a narrow
|
|
36
|
+
screen a long line ran underneath it. It now has its own column beside the
|
|
37
|
+
code. The code's edges fade while there is more to scroll, like `Scroller`'s.
|
|
38
|
+
- **Scroller's edge fades follow content and size changes.** They were measured
|
|
39
|
+
on mount and on scroll only, so a list that grew, shrank or was resized kept
|
|
40
|
+
the fade it started with until it was scrolled.
|
|
41
|
+
- **Icons no longer redraw on every render.** The default Reicon set and the
|
|
42
|
+
brand set rewrote their SVG each time a parent re-rendered (React 19
|
|
43
|
+
re-applies `dangerouslySetInnerHTML` when the object changes). Inside a
|
|
44
|
+
toast that never settled and froze the page.
|
|
45
|
+
- **A card that is only a header keeps its bottom padding.** `CardHeader` leaves
|
|
46
|
+
the bottom padding to the content that follows it; with nothing after it (a
|
|
47
|
+
stat card: label, number, sparkline) the number sat on the card's edge.
|
|
48
|
+
- **Line and area sparklines span their own range.** They used to include zero,
|
|
49
|
+
so a run from 12 to 26 used only the top half of the box: a flat squiggle over
|
|
50
|
+
a solid block. Bar sparklines keep the zero baseline, since a bar's length is
|
|
51
|
+
the value.
|
|
52
|
+
- **Combobox chips are balanced.** The remove button was a full 28px icon
|
|
53
|
+
button, which swelled each chip into a 34px pill and left more room after the
|
|
54
|
+
label than before it. It is now drawn to the chip (20px, with a 14px X) and
|
|
55
|
+
keeps a 28px pointer target, so the label and the X sit evenly in a 23px chip.
|
|
56
|
+
|
|
3
57
|
## 0.4.0
|
|
4
58
|
|
|
5
59
|
### The default theme is now called Sable
|
package/dist/blocks/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Kbd, CommandMenuPanel, ToggleGroup, Toggle, BarChart, DateTile, Accordion, AccordionItem, AccordionTrigger, AccordionPanel, RadialChart, Sparkline, Slider, Stepper, StepperItem, SegmentedBar, Checkbox, PieChart, AreaChart, OtpField } from '../chunk-
|
|
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-
|
|
1
|
+
import { Kbd, CommandMenuPanel, ToggleGroup, Toggle, BarChart, DateTile, Accordion, AccordionItem, AccordionTrigger, AccordionPanel, RadialChart, Sparkline, Slider, Stepper, StepperItem, SegmentedBar, Checkbox, PieChart, AreaChart, OtpField } from '../chunk-GU3T7SBA.js';
|
|
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-RCLKXF2N.js';
|
|
3
3
|
import { Region, Stack, Row, Grid } from '../chunk-3IWZYBGH.js';
|
|
4
4
|
import { cn } from '../chunk-SRQWQUTW.js';
|
|
5
|
-
import { Icon } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import { Icon } from '../chunk-QJ6FWTUG.js';
|
|
6
|
+
import '../chunk-XAZGMY73.js';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { useId, useState } from 'react';
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FIELD_SHELL, FIELD_INVALID, useMotion, useTypeTier, useScrollActivity, setRef, useAnchoredDensity, Dialog, DialogContent, DialogTitle, DialogDescription, useIsomorphicLayoutEffect } from './chunk-
|
|
1
|
+
import { FIELD_SHELL, FIELD_INVALID, useMotion, useTypeTier, useScrollActivity, setRef, useEdgeFade, useAnchoredDensity, Dialog, DialogContent, DialogTitle, DialogDescription, useIsomorphicLayoutEffect } from './chunk-RCLKXF2N.js';
|
|
2
2
|
import { cn } from './chunk-SRQWQUTW.js';
|
|
3
|
-
import { Icon } from './chunk-
|
|
3
|
+
import { Icon } from './chunk-QJ6FWTUG.js';
|
|
4
4
|
import * as OtpParts from '@base-ui/react/otp-field';
|
|
5
|
-
import { createContext, Fragment, useRef, useState, useId, useEffect, Children, isValidElement, useContext, useCallback,
|
|
5
|
+
import { createContext, Fragment, useRef, useState, useId, useEffect, Children, isValidElement, useContext, useCallback, useSyncExternalStore, useMemo } from 'react';
|
|
6
6
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
7
7
|
import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
@@ -2652,8 +2652,9 @@ function Sparkline({ data, label, variant = "line", tone = "primary", animate =
|
|
|
2652
2652
|
const [ref, inView] = useArrival();
|
|
2653
2653
|
const shown = !animate || !enabled || inView;
|
|
2654
2654
|
const color = toneColor(tone);
|
|
2655
|
-
const
|
|
2656
|
-
const
|
|
2655
|
+
const min = data.length ? Math.min(...data) : 0;
|
|
2656
|
+
const max = data.length ? Math.max(...data) : 1;
|
|
2657
|
+
const [lo, hi] = variant === "bar" ? [Math.min(0, min), Math.max(max, Math.min(0, min) + 1)] : min === max ? [min - 1, max + 1] : [min, max];
|
|
2657
2658
|
const y = (v) => H - 2 - (v - lo) / (hi - lo) * (H - 4);
|
|
2658
2659
|
const nf = new Intl.NumberFormat(locale, { maximumFractionDigits: 2 });
|
|
2659
2660
|
const summary = data.length ? `${label}: from ${nf.format(data[0])} to ${nf.format(data[data.length - 1])}, low ${nf.format(Math.min(...data))}, high ${nf.format(Math.max(...data))}` : label;
|
|
@@ -3775,7 +3776,7 @@ function SliderThumb({ className, children, ...props }) {
|
|
|
3775
3776
|
{
|
|
3776
3777
|
"aria-hidden": true,
|
|
3777
3778
|
className: cn(
|
|
3778
|
-
"pointer-events-none absolute inset-0 rounded-full border-2 border-primary bg-background shadow-
|
|
3779
|
+
"pointer-events-none absolute inset-0 rounded-full border-2 border-primary bg-background shadow-(--knob-shadow)",
|
|
3779
3780
|
// The only thing that resizes. Scale (not width/height) so the box
|
|
3780
3781
|
// metrics — and the row height around them — never move.
|
|
3781
3782
|
"scale-75 motion-interactive ease-spring",
|
|
@@ -4225,35 +4226,15 @@ function Scroller({
|
|
|
4225
4226
|
},
|
|
4226
4227
|
[onKeyDown, orientation]
|
|
4227
4228
|
);
|
|
4228
|
-
const
|
|
4229
|
-
const [showEnd, setShowEnd] = useState(false);
|
|
4230
|
-
const sync = useCallback(
|
|
4231
|
-
(el) => {
|
|
4232
|
-
if (orientation === "horizontal") {
|
|
4233
|
-
const { scrollLeft, scrollWidth, clientWidth } = el;
|
|
4234
|
-
setShowStart(scrollLeft > 0);
|
|
4235
|
-
setShowEnd(scrollLeft < scrollWidth - clientWidth - 1);
|
|
4236
|
-
} else {
|
|
4237
|
-
const { scrollTop, scrollHeight, clientHeight } = el;
|
|
4238
|
-
setShowStart(scrollTop > 0);
|
|
4239
|
-
setShowEnd(scrollTop < scrollHeight - clientHeight - 1);
|
|
4240
|
-
}
|
|
4241
|
-
},
|
|
4242
|
-
[orientation]
|
|
4243
|
-
);
|
|
4244
|
-
useLayoutEffect(() => {
|
|
4245
|
-
if (regionRef.current) sync(regionRef.current);
|
|
4246
|
-
}, [sync]);
|
|
4229
|
+
const { sync: syncFade, style: fadeStyle } = useEdgeFade(regionRef, orientation);
|
|
4247
4230
|
const handleScroll = useCallback(
|
|
4248
4231
|
(event) => {
|
|
4249
|
-
|
|
4232
|
+
syncFade();
|
|
4250
4233
|
onScroll?.(event);
|
|
4251
4234
|
},
|
|
4252
|
-
[
|
|
4235
|
+
[syncFade, onScroll]
|
|
4253
4236
|
);
|
|
4254
4237
|
const isVertical = orientation === "vertical";
|
|
4255
|
-
const fade = "calc(var(--spacing) * 7)";
|
|
4256
|
-
const mask = showStart || showEnd ? `linear-gradient(to ${isVertical ? "bottom" : "right"}, ${showStart ? "transparent" : "#000"}, #000 ${showStart ? fade : "0"}, #000 ${showEnd ? `calc(100% - ${fade})` : "100%"}, ${showEnd ? "transparent" : "#000"})` : void 0;
|
|
4257
4238
|
return (
|
|
4258
4239
|
// The chrome box. Carries the consumer's border/background/radius and the
|
|
4259
4240
|
// sizing, and is NOT masked — which is the entire point of the split. A
|
|
@@ -4269,7 +4250,7 @@ function Scroller({
|
|
|
4269
4250
|
role: "group",
|
|
4270
4251
|
"aria-label": label,
|
|
4271
4252
|
"data-orientation": orientation,
|
|
4272
|
-
style:
|
|
4253
|
+
style: fadeStyle,
|
|
4273
4254
|
className: cn(
|
|
4274
4255
|
// Fill the chrome box without a percentage height. `min-h-0` /
|
|
4275
4256
|
// `min-w-0` because a flex item's default `min-size: auto` refuses to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from './chunk-SRQWQUTW.js';
|
|
2
|
-
import { Icon } from './chunk-
|
|
2
|
+
import { Icon } from './chunk-QJ6FWTUG.js';
|
|
3
3
|
import { createContext, useMemo, useState, useRef, useLayoutEffect, useEffect, useSyncExternalStore, useCallback, useContext, isValidElement, Children, useId, cloneElement } from 'react';
|
|
4
4
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
@@ -837,8 +837,11 @@ function CardHeader({
|
|
|
837
837
|
// one it collapses to a single stacked column (same as before).
|
|
838
838
|
// Zeroes its own bottom padding so it owns the CardHeader/CardContent
|
|
839
839
|
// seam — CardContent always has full padding on its own (see below),
|
|
840
|
-
// so a standalone CardContent never loses its top padding.
|
|
841
|
-
|
|
840
|
+
// so a standalone CardContent never loses its top padding. As the
|
|
841
|
+
// card's last child (a stat card: label, number, sparkline) nothing
|
|
842
|
+
// follows to pad the bottom, so it keeps its own; zeroed, the number
|
|
843
|
+
// sat on the card's bottom edge.
|
|
844
|
+
"grid auto-rows-min grid-cols-1 items-start gap-1.5 p-[var(--card-p,--spacing(6))] pb-0 last:pb-[var(--card-p,--spacing(6))] has-data-[slot=card-action]:grid-cols-[1fr_auto]",
|
|
842
845
|
className
|
|
843
846
|
),
|
|
844
847
|
...props
|
|
@@ -2888,7 +2891,7 @@ function Switch({ className, ...props }) {
|
|
|
2888
2891
|
className
|
|
2889
2892
|
),
|
|
2890
2893
|
...props,
|
|
2891
|
-
children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: "block h-5 w-5 rounded-full bg-(--switch-thumb) shadow-
|
|
2894
|
+
children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: "block h-5 w-5 rounded-full bg-(--switch-thumb) shadow-(--knob-shadow) motion-interactive ease-spring data-[checked]:translate-x-4 rtl:data-[checked]:-translate-x-4 data-[checked]:bg-primary-foreground" })
|
|
2892
2895
|
}
|
|
2893
2896
|
);
|
|
2894
2897
|
}
|
|
@@ -4819,6 +4822,29 @@ function useCopy(text, { timeout = 1500 } = {}) {
|
|
|
4819
4822
|
}, [text, timeout]);
|
|
4820
4823
|
return { copy, copied };
|
|
4821
4824
|
}
|
|
4825
|
+
function useEdgeFade(ref, orientation) {
|
|
4826
|
+
const [showStart, setShowStart] = useState(false);
|
|
4827
|
+
const [showEnd, setShowEnd] = useState(false);
|
|
4828
|
+
const sync = useCallback(() => {
|
|
4829
|
+
const el = ref.current;
|
|
4830
|
+
if (!el) return;
|
|
4831
|
+
if (orientation === "horizontal") {
|
|
4832
|
+
const { scrollLeft, scrollWidth, clientWidth } = el;
|
|
4833
|
+
setShowStart(scrollLeft > 0);
|
|
4834
|
+
setShowEnd(scrollLeft < scrollWidth - clientWidth - 1);
|
|
4835
|
+
} else {
|
|
4836
|
+
const { scrollTop, scrollHeight, clientHeight } = el;
|
|
4837
|
+
setShowStart(scrollTop > 0);
|
|
4838
|
+
setShowEnd(scrollTop < scrollHeight - clientHeight - 1);
|
|
4839
|
+
}
|
|
4840
|
+
}, [ref, orientation]);
|
|
4841
|
+
useIsomorphicLayoutEffect(sync);
|
|
4842
|
+
useResizeObserver(sync, [ref]);
|
|
4843
|
+
const fade = "calc(var(--spacing) * 7)";
|
|
4844
|
+
const direction = orientation === "vertical" ? "bottom" : "right";
|
|
4845
|
+
const mask = showStart || showEnd ? `linear-gradient(to ${direction}, ${showStart ? "transparent" : "#000"}, #000 ${showStart ? fade : "0"}, #000 ${showEnd ? `calc(100% - ${fade})` : "100%"}, ${showEnd ? "transparent" : "#000"})` : void 0;
|
|
4846
|
+
return { sync, style: mask ? { maskImage: mask, WebkitMaskImage: mask } : void 0 };
|
|
4847
|
+
}
|
|
4822
4848
|
var CodeHighlightContext = createContext(null);
|
|
4823
4849
|
function CodeHighlightProvider({ highlight, children }) {
|
|
4824
4850
|
return /* @__PURE__ */ jsx(CodeHighlightContext.Provider, { value: highlight, children });
|
|
@@ -4836,6 +4862,8 @@ function CodeBlock({
|
|
|
4836
4862
|
const highlighter = highlight === false ? null : highlight ?? contextHighlight;
|
|
4837
4863
|
const hasHeader = Boolean(filename);
|
|
4838
4864
|
const { copy, copied } = useCopy(code);
|
|
4865
|
+
const preRef = useRef(null);
|
|
4866
|
+
const fade = useEdgeFade(preRef, "horizontal");
|
|
4839
4867
|
if (prompt != null) {
|
|
4840
4868
|
return /* @__PURE__ */ jsxs(
|
|
4841
4869
|
"div",
|
|
@@ -4855,11 +4883,13 @@ function CodeBlock({
|
|
|
4855
4883
|
}
|
|
4856
4884
|
);
|
|
4857
4885
|
}
|
|
4886
|
+
const copyColumn = !hasHeader && showCopy;
|
|
4858
4887
|
return /* @__PURE__ */ jsxs(
|
|
4859
4888
|
"div",
|
|
4860
4889
|
{
|
|
4861
4890
|
className: cn(
|
|
4862
|
-
"
|
|
4891
|
+
"overflow-hidden rounded-md border border-border bg-muted/40",
|
|
4892
|
+
copyColumn && "flex items-start",
|
|
4863
4893
|
className
|
|
4864
4894
|
),
|
|
4865
4895
|
...props,
|
|
@@ -4867,17 +4897,21 @@ function CodeBlock({
|
|
|
4867
4897
|
hasHeader ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-border px-4 py-2", children: [
|
|
4868
4898
|
/* @__PURE__ */ jsx("span", { className: "text-mono-caption text-muted-foreground", children: filename }),
|
|
4869
4899
|
showCopy ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Copy code", onClick: copy, className: "text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: copied ? "check" : "copy" }) }) : null
|
|
4870
|
-
] }) :
|
|
4900
|
+
] }) : null,
|
|
4871
4901
|
/* @__PURE__ */ jsx(
|
|
4872
4902
|
"pre",
|
|
4873
4903
|
{
|
|
4904
|
+
ref: preRef,
|
|
4905
|
+
onScroll: fade.sync,
|
|
4906
|
+
style: fade.style,
|
|
4874
4907
|
className: cn(
|
|
4875
4908
|
"overflow-x-auto overscroll-x-contain p-4 text-mono-md text-foreground scrollbar-quiet",
|
|
4876
|
-
|
|
4909
|
+
copyColumn && "min-w-0 flex-1 pe-2"
|
|
4877
4910
|
),
|
|
4878
4911
|
children: /* @__PURE__ */ jsx("code", { children: highlighter ? highlighter(code) : code })
|
|
4879
4912
|
}
|
|
4880
|
-
)
|
|
4913
|
+
),
|
|
4914
|
+
copyColumn ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Copy code", onClick: copy, className: "m-2 ms-0 shrink-0 text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: copied ? "check" : "copy" }) }) : null
|
|
4881
4915
|
]
|
|
4882
4916
|
}
|
|
4883
4917
|
);
|
|
@@ -6804,4 +6838,4 @@ var attachmentMeta = {
|
|
|
6804
6838
|
]
|
|
6805
6839
|
};
|
|
6806
6840
|
|
|
6807
|
-
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_INVALID, FIELD_SHELL, FIELD_SHELL_XS, Field, Form, HighlightGlide, Input, Label, MENU_ITEM_DESTRUCTIVE, MOBILE_FIELD_TIER, 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, anchoredListScroll, anchoredScroll, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bubbleMeta, buttonMeta, buttonVariants, cardMeta, codeBlockMeta, codeMeta, destructiveActionModalMeta, dialogMeta, entityMeta, formMeta, inputMeta, labelMeta, menuMeta, mergeRefs, messageMeta, overflowMenuMeta, pillVariants, progressMeta, progressTrackVariants, selectMeta, separatorMeta, setRef, spinnerMeta, statusDotMeta, statusDotVariants, switchMeta, tableMeta, textareaMeta, tooltipMeta, trimLabel, useAnchoredDensity, useCopy, useDensity, useIsomorphicLayoutEffect, useMotion, useReducedMotion, useResizeObserver, useScrollActivity, useTypeTier, withPortalThemeScope };
|
|
6841
|
+
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_INVALID, FIELD_SHELL, FIELD_SHELL_XS, Field, Form, HighlightGlide, Input, Label, MENU_ITEM_DESTRUCTIVE, MOBILE_FIELD_TIER, 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, anchoredListScroll, anchoredScroll, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bubbleMeta, buttonMeta, buttonVariants, cardMeta, codeBlockMeta, codeMeta, destructiveActionModalMeta, dialogMeta, entityMeta, formMeta, inputMeta, labelMeta, menuMeta, mergeRefs, messageMeta, overflowMenuMeta, pillVariants, progressMeta, progressTrackVariants, selectMeta, separatorMeta, setRef, spinnerMeta, statusDotMeta, statusDotVariants, switchMeta, tableMeta, textareaMeta, tooltipMeta, trimLabel, useAnchoredDensity, useCopy, useDensity, useEdgeFade, useIsomorphicLayoutEffect, useMotion, useReducedMotion, useResizeObserver, useScrollActivity, useTypeTier, withPortalThemeScope };
|
|
@@ -69,6 +69,7 @@ import { Send } from 'reicon-react/icons/Send';
|
|
|
69
69
|
import { Star } from 'reicon-react/icons/Star';
|
|
70
70
|
import { Trash } from 'reicon-react/icons/Trash';
|
|
71
71
|
import { Upload } from 'reicon-react/icons/Upload';
|
|
72
|
+
import { memo } from 'react';
|
|
72
73
|
import { jsx } from 'react/jsx-runtime';
|
|
73
74
|
|
|
74
75
|
// src/icon-sets/reicon.tsx
|
|
@@ -165,16 +166,22 @@ var reiconIconSet = ({
|
|
|
165
166
|
if (!Glyph) return null;
|
|
166
167
|
const a11y = title ? { role: "img", "aria-label": title } : { "aria-hidden": true };
|
|
167
168
|
return /* @__PURE__ */ jsx(
|
|
168
|
-
|
|
169
|
+
ReiconGlyph,
|
|
169
170
|
{
|
|
170
|
-
|
|
171
|
+
glyph: Glyph,
|
|
171
172
|
weight: WEIGHTS[variant] ?? "Outline",
|
|
172
173
|
className: spin ? `motion-spin ${className ?? ""}` : className,
|
|
173
|
-
style: { color: void 0 },
|
|
174
174
|
...a11y
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
177
|
};
|
|
178
|
+
var NO_INLINE_COLOR = { color: void 0 };
|
|
179
|
+
var ReiconGlyph = memo(function ReiconGlyph2({
|
|
180
|
+
glyph: Glyph,
|
|
181
|
+
...props
|
|
182
|
+
}) {
|
|
183
|
+
return /* @__PURE__ */ jsx(Glyph, { size: "1em", style: NO_INLINE_COLOR, ...props });
|
|
184
|
+
});
|
|
178
185
|
var reiconIconNames = Object.keys(ICONS);
|
|
179
186
|
|
|
180
187
|
export { reiconIconNames, reiconIconSet };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useMotion, useIsomorphicLayoutEffect, mergeRefs, trimLabel, useTypeTier, buttonVariants, Input, Table, TableCaption, TableHeader, TableRow, TableHead, Button, TableBody, TableCell, Card, SimpleTooltip, useDensity, FIELD_SHELL, FIELD_INVALID, MOBILE_FIELD_TIER, Tooltip, TooltipTrigger, TooltipContent, useScrollActivity, setRef, Textarea, Menu, MenuTrigger, MenuContent, MenuSubmenu, MenuSubmenuTrigger, Separator } from './chunk-
|
|
1
|
+
import { useMotion, useIsomorphicLayoutEffect, mergeRefs, trimLabel, useTypeTier, buttonVariants, Input, Table, TableCaption, TableHeader, TableRow, TableHead, Button, TableBody, TableCell, Card, SimpleTooltip, useDensity, FIELD_SHELL, FIELD_INVALID, MOBILE_FIELD_TIER, Tooltip, TooltipTrigger, TooltipContent, useScrollActivity, setRef, Textarea, Menu, MenuTrigger, MenuContent, MenuSubmenu, MenuSubmenuTrigger, Separator } from './chunk-RCLKXF2N.js';
|
|
2
2
|
import { cn } from './chunk-SRQWQUTW.js';
|
|
3
|
-
import { Icon } from './chunk-
|
|
3
|
+
import { Icon } from './chunk-QJ6FWTUG.js';
|
|
4
4
|
import { createContext, useRef, useState, useEffect, isValidElement, cloneElement, useContext, useMemo, useCallback, useImperativeHandle } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { flushSync } from 'react-dom';
|
|
@@ -287,7 +287,7 @@ function TabsTrigger({ className, children, ...props }) {
|
|
|
287
287
|
// On the control ladder like the pill variant (it was py-2 plus
|
|
288
288
|
// the label's line, ~36px — no rung).
|
|
289
289
|
"-mb-px inline-flex h-(--control-md) items-center border-b-2 border-transparent px-3 data-[active]:border-foreground"
|
|
290
|
-
) : "inline-flex h-(--control-sm) items-center rounded-
|
|
290
|
+
) : "inline-flex h-(--control-sm) items-center rounded-[var(--button-radius,9999px)] px-3 data-[active]:bg-muted",
|
|
291
291
|
className
|
|
292
292
|
),
|
|
293
293
|
...props,
|
|
@@ -385,7 +385,7 @@ var tabsMeta = {
|
|
|
385
385
|
{
|
|
386
386
|
name: "TabsList",
|
|
387
387
|
type: 'Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: "underline" | "pill" + className',
|
|
388
|
-
description:
|
|
388
|
+
description: `The tablist row. variant="underline" (default) draws a divider rule beneath the triggers; variant="pill" drops the rule and fills the active trigger, which takes the theme's button shape (--button-radius). Triggers inherit the variant.`
|
|
389
389
|
},
|
|
390
390
|
{
|
|
391
391
|
name: "TabsTrigger",
|
package/dist/icon/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Icon, IconProvider, composeIconSets, useIconSet } from '../chunk-
|
|
2
|
-
export { reiconIconSet as fallbackIconSet, reiconIconNames, reiconIconSet } from '../chunk-
|
|
1
|
+
export { Icon, IconProvider, composeIconSets, useIconSet } from '../chunk-QJ6FWTUG.js';
|
|
2
|
+
export { reiconIconSet as fallbackIconSet, reiconIconNames, reiconIconSet } from '../chunk-XAZGMY73.js';
|
|
@@ -10,33 +10,6 @@ interface BrandGlyph {
|
|
|
10
10
|
declare const BRAND_GRID = 24;
|
|
11
11
|
declare const BRAND_GLYPHS: Record<string, BrandGlyph>;
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Brand marks as a Sable icon set — `<Icon name="github" />`.
|
|
15
|
-
*
|
|
16
|
-
* This is an ADDITIVE set: it answers only for the brands it carries and
|
|
17
|
-
* returns `null` for everything else, which is exactly what `composeIconSets`
|
|
18
|
-
* falls through on. So it layers under a UI set rather than replacing one:
|
|
19
|
-
*
|
|
20
|
-
* <IconProvider set={composeIconSets(brandIconSet, reiconIconSet)} />
|
|
21
|
-
*
|
|
22
|
-
* Order matters only if a name collides. None do today — the brand names are
|
|
23
|
-
* proper nouns (`github`, `figma`) and the contract's names are common ones
|
|
24
|
-
* (`gear`, `chevron-down`) — but put the brand set first if you ever want a
|
|
25
|
-
* brand to win.
|
|
26
|
-
*
|
|
27
|
-
* **Marks are monochrome by default and take the surrounding ink**, because
|
|
28
|
-
* that is what a footer social row wants and it keeps rule #1 intact: nothing
|
|
29
|
-
* here names a color, so `text-muted-foreground` on the icon governs. The
|
|
30
|
-
* generator strips upstream `fill`/`stroke` colors for this reason. A brand
|
|
31
|
-
* that must appear in its official color is a deliberate act at the call site —
|
|
32
|
-
* a token, or an arbitrary color utility on that one instance — never a
|
|
33
|
-
* default. A page where every logo asserts its own brand color is how a footer
|
|
34
|
-
* turns into a fruit salad.
|
|
35
|
-
*
|
|
36
|
-
* The glyph data is vendored and committed, never fetched at render time; see
|
|
37
|
-
* `scripts/fetch-brand-icons.mjs` for why. Trademark note: these designs belong
|
|
38
|
-
* to their owners — follow each brand's usage guidelines.
|
|
39
|
-
*/
|
|
40
13
|
declare const brandIconSet: IconSet;
|
|
41
14
|
/** The brand names this set answers to — useful for a coverage assertion. */
|
|
42
15
|
declare const brandIconNames: string[];
|
package/dist/icon-sets/brands.js
CHANGED
|
@@ -119,6 +119,12 @@ var BRAND_GLYPHS = {
|
|
|
119
119
|
markup: '<path d="M15.337 23.979l7.216-1.561s-2.604-17.613-2.625-17.73c-.018-.116-.114-.192-.211-.192s-1.929-.136-1.929-.136-1.275-1.274-1.439-1.411c-.045-.037-.075-.057-.121-.074l-.914 21.104h.023zM11.71 11.305s-.81-.424-1.774-.424c-1.447 0-1.504.906-1.504 1.141 0 1.232 3.24 1.715 3.24 4.629 0 2.295-1.44 3.76-3.406 3.76-2.354 0-3.54-1.465-3.54-1.465l.646-2.086s1.245 1.066 2.28 1.066c.675 0 .975-.545.975-.932 0-1.619-2.654-1.694-2.654-4.359-.034-2.237 1.571-4.416 4.827-4.416 1.257 0 1.875.361 1.875.361l-.945 2.715-.02.01zM11.17.83c.136 0 .271.038.405.135-.984.465-2.064 1.639-2.508 3.992-.656.213-1.293.405-1.889.578C7.697 3.75 8.951.84 11.17.84V.83zm1.235 2.949v.135c-.754.232-1.583.484-2.394.736.466-1.777 1.333-2.645 2.085-2.971.193.501.309 1.176.309 2.1zm.539-2.234c.694.074 1.141.867 1.429 1.755-.349.114-.735.231-1.158.366v-.252c0-.752-.096-1.371-.271-1.871v.002zm2.992 1.289c-.02 0-.06.021-.078.021s-.289.075-.714.21c-.423-1.233-1.176-2.37-2.508-2.37h-.115C12.135.209 11.669 0 11.265 0 8.159 0 6.675 3.877 6.21 5.846c-1.194.365-2.063.636-2.16.674-.675.213-.694.232-.772.87-.075.462-1.83 14.063-1.83 14.063L15.009 24l.927-21.166z"/>'
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
+
var MARKUP = /* @__PURE__ */ new WeakMap();
|
|
123
|
+
function markupOf(glyph) {
|
|
124
|
+
let markup = MARKUP.get(glyph);
|
|
125
|
+
if (!markup) MARKUP.set(glyph, markup = { __html: glyph.markup });
|
|
126
|
+
return markup;
|
|
127
|
+
}
|
|
122
128
|
var brandIconSet = ({
|
|
123
129
|
name,
|
|
124
130
|
spin,
|
|
@@ -137,7 +143,7 @@ var brandIconSet = ({
|
|
|
137
143
|
height: "1em",
|
|
138
144
|
fill: "currentColor",
|
|
139
145
|
className: spin ? `motion-spin ${className ?? ""}` : className,
|
|
140
|
-
dangerouslySetInnerHTML:
|
|
146
|
+
dangerouslySetInnerHTML: markupOf(glyph),
|
|
141
147
|
...a11y
|
|
142
148
|
}
|
|
143
149
|
);
|
package/dist/icon-sets/reicon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { reiconIconNames, reiconIconSet } from '../chunk-
|
|
1
|
+
export { reiconIconNames, reiconIconSet } from '../chunk-XAZGMY73.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1095,7 +1095,9 @@ type TriggerProps$3 = Omit<ComponentProps<typeof Tabs$1.Tab>, "className"> & {
|
|
|
1095
1095
|
* A single tab button (Base UI's Tabs.Tab). Underline: the active tab draws its
|
|
1096
1096
|
* rule via `data-active`, and `-mb-px` overlaps the list's divider. Pill: the
|
|
1097
1097
|
* active tab takes a muted fill on the control ladder, and its label is trimmed
|
|
1098
|
-
* to the cap height so it centres optically in the short pill.
|
|
1098
|
+
* to the cap height so it centres optically in the short pill. A pill tab is a
|
|
1099
|
+
* button-shaped control, so it takes the theme's button shape (`--button-radius`,
|
|
1100
|
+
* as Button does): a pill in Sable, rounded in Poppy, square in Meridian.
|
|
1099
1101
|
*/
|
|
1100
1102
|
declare function TabsTrigger({ className, children, ...props }: TriggerProps$3): react.JSX.Element;
|
|
1101
1103
|
type PanelProps$3 = Omit<ComponentProps<typeof Tabs$1.Panel>, "className"> & {
|
|
@@ -2504,7 +2506,7 @@ type TriggerProps$2 = Omit<ComponentProps<typeof Select$1.Trigger>, "className"
|
|
|
2504
2506
|
*/
|
|
2505
2507
|
declare function SelectTrigger({ className, placeholder, size, children, ...props }: TriggerProps$2): react.JSX.Element;
|
|
2506
2508
|
type PositionerProps$5 = ComponentProps<typeof Select$1.Positioner>;
|
|
2507
|
-
type ContentProps$
|
|
2509
|
+
type ContentProps$7 = Omit<ComponentProps<typeof Select$1.Popup>, "className"> & {
|
|
2508
2510
|
className?: string;
|
|
2509
2511
|
/** Which side of the trigger to render against. @default "bottom" */
|
|
2510
2512
|
side?: PositionerProps$5["side"];
|
|
@@ -2517,7 +2519,7 @@ type ContentProps$6 = Omit<ComponentProps<typeof Select$1.Popup>, "className"> &
|
|
|
2517
2519
|
* The popup surface. Composes Portal + Positioner + Popup + List so callers pass
|
|
2518
2520
|
* SelectItems directly. Scrolls when the option list overflows.
|
|
2519
2521
|
*/
|
|
2520
|
-
declare function SelectContent({ className, children, side, align, sideOffset, ...props }: ContentProps$
|
|
2522
|
+
declare function SelectContent({ className, children, side, align, sideOffset, ...props }: ContentProps$7): react.JSX.Element;
|
|
2521
2523
|
type ItemProps$4 = Omit<ComponentProps<typeof Select$1.Item>, "className"> & {
|
|
2522
2524
|
className?: string;
|
|
2523
2525
|
};
|
|
@@ -2567,7 +2569,7 @@ declare const PopoverPortal: {
|
|
|
2567
2569
|
};
|
|
2568
2570
|
declare const PopoverClose: react.ForwardRefExoticComponent<Omit<_base_ui_react.PopoverCloseProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
2569
2571
|
type PositionerProps$4 = ComponentProps<typeof Popover$1.Positioner>;
|
|
2570
|
-
type ContentProps$
|
|
2572
|
+
type ContentProps$6 = Omit<ComponentProps<typeof Popover$1.Popup>, "className"> & {
|
|
2571
2573
|
className?: string;
|
|
2572
2574
|
/** Which side of the trigger to render against. @default "bottom" */
|
|
2573
2575
|
side?: PositionerProps$4["side"];
|
|
@@ -2586,7 +2588,7 @@ type ContentProps$5 = Omit<ComponentProps<typeof Popover$1.Popup>, "className">
|
|
|
2586
2588
|
* The popover surface. Composes Portal + Positioner + Popup so callers pass a
|
|
2587
2589
|
* single element. Defaults to the `bottom` side with an 8px offset.
|
|
2588
2590
|
*/
|
|
2589
|
-
declare function PopoverContent({ className, children, side, align, sideOffset, anchor, ...props }: ContentProps$
|
|
2591
|
+
declare function PopoverContent({ className, children, side, align, sideOffset, anchor, ...props }: ContentProps$6): react.JSX.Element;
|
|
2590
2592
|
type TitleProps$2 = Omit<ComponentProps<typeof Popover$1.Title>, "className"> & {
|
|
2591
2593
|
className?: string;
|
|
2592
2594
|
};
|
|
@@ -2633,7 +2635,7 @@ declare const MenuPortal: {
|
|
|
2633
2635
|
displayName: string;
|
|
2634
2636
|
};
|
|
2635
2637
|
type PositionerProps$3 = ComponentProps<typeof Menu$1.Positioner>;
|
|
2636
|
-
type ContentProps$
|
|
2638
|
+
type ContentProps$5 = Omit<ComponentProps<typeof Menu$1.Popup>, "className"> & {
|
|
2637
2639
|
className?: string;
|
|
2638
2640
|
/** Which side of the trigger to render against. @default "bottom" */
|
|
2639
2641
|
side?: PositionerProps$3["side"];
|
|
@@ -2646,7 +2648,7 @@ type ContentProps$4 = Omit<ComponentProps<typeof Menu$1.Popup>, "className"> & {
|
|
|
2646
2648
|
* The dropdown surface. Composes Portal + Positioner + Popup so callers pass a
|
|
2647
2649
|
* single element. Defaults to the `bottom` side, `start` aligned, 6px offset.
|
|
2648
2650
|
*/
|
|
2649
|
-
declare function MenuContent({ className, children, side, align, sideOffset, ...props }: ContentProps$
|
|
2651
|
+
declare function MenuContent({ className, children, side, align, sideOffset, ...props }: ContentProps$5): react.JSX.Element;
|
|
2650
2652
|
type ItemProps$3 = Omit<ComponentProps<typeof Menu$1.Item>, "className"> & {
|
|
2651
2653
|
className?: string;
|
|
2652
2654
|
/**
|
|
@@ -2768,7 +2770,7 @@ declare const SheetPortal: {
|
|
|
2768
2770
|
(props: _base_ui_react.DrawerPortalProps & react.RefAttributes<HTMLDivElement>): react.JSX.Element;
|
|
2769
2771
|
displayName: string;
|
|
2770
2772
|
};
|
|
2771
|
-
type ContentProps$
|
|
2773
|
+
type ContentProps$4 = Omit<ComponentProps<typeof Drawer.Popup>, "className"> & VariantProps<typeof sheetVariants> & {
|
|
2772
2774
|
className?: string;
|
|
2773
2775
|
};
|
|
2774
2776
|
/**
|
|
@@ -2779,7 +2781,7 @@ type ContentProps$3 = Omit<ComponentProps<typeof Drawer.Popup>, "className"> & V
|
|
|
2779
2781
|
* stay flex items of the popup column): a mouse drag that starts on content
|
|
2780
2782
|
* selects text instead of dragging the sheet. Touch swipes work anywhere.
|
|
2781
2783
|
*/
|
|
2782
|
-
declare function SheetContent({ className, children, side, initialFocus, ref, ...props }: ContentProps$
|
|
2784
|
+
declare function SheetContent({ className, children, side, initialFocus, ref, ...props }: ContentProps$4): react.JSX.Element;
|
|
2783
2785
|
type TitleProps$1 = Omit<ComponentProps<typeof Drawer.Title>, "className"> & {
|
|
2784
2786
|
className?: string;
|
|
2785
2787
|
};
|
|
@@ -3249,6 +3251,11 @@ type ViewportProps = Omit<ComponentProps<typeof Toast.Viewport>, "className"> &
|
|
|
3249
3251
|
className?: string;
|
|
3250
3252
|
/** Screen anchor for the toast stack. @default "top-right" */
|
|
3251
3253
|
position?: ToastPosition;
|
|
3254
|
+
/**
|
|
3255
|
+
* Stack the toasts on top of one another, the newest in front, instead of
|
|
3256
|
+
* listing them. Hovering or focusing the stack fans it out. @default false
|
|
3257
|
+
*/
|
|
3258
|
+
stacked?: boolean;
|
|
3252
3259
|
};
|
|
3253
3260
|
/**
|
|
3254
3261
|
* The fixed region that hosts the toast stack. Top-right by default; collision
|
|
@@ -3260,7 +3267,7 @@ type ViewportProps = Omit<ComponentProps<typeof Toast.Viewport>, "className"> &
|
|
|
3260
3267
|
* with a transform, translate, filter or contain (a route's enter animation is
|
|
3261
3268
|
* enough), so the stack landed in the content column instead of the screen corner.
|
|
3262
3269
|
*/
|
|
3263
|
-
declare function ToastViewport({ className, position, ...props }: ViewportProps): react.JSX.Element;
|
|
3270
|
+
declare function ToastViewport({ className, position, stacked, ...props }: ViewportProps): react.JSX.Element;
|
|
3264
3271
|
type RootProps$1 = Omit<ComponentProps<typeof Toast.Root>, "className"> & {
|
|
3265
3272
|
className?: string;
|
|
3266
3273
|
};
|
|
@@ -3270,6 +3277,15 @@ type RootProps$1 = Omit<ComponentProps<typeof Toast.Root>, "className"> & {
|
|
|
3270
3277
|
* is wired by Base UI.
|
|
3271
3278
|
*/
|
|
3272
3279
|
declare function ToastRoot({ className, ...props }: RootProps$1): react.JSX.Element;
|
|
3280
|
+
type ContentProps$3 = Omit<ComponentProps<typeof Toast.Content>, "className"> & {
|
|
3281
|
+
className?: string;
|
|
3282
|
+
};
|
|
3283
|
+
/**
|
|
3284
|
+
* The toast's contents (icon, text, action, close) as one row. In a stacked
|
|
3285
|
+
* viewport the contents of the cards behind the front one fade, since only an
|
|
3286
|
+
* edge of them shows, and come back when the stack fans out.
|
|
3287
|
+
*/
|
|
3288
|
+
declare function ToastContent({ className, ...props }: ContentProps$3): react.JSX.Element;
|
|
3273
3289
|
type TitleProps = Omit<ComponentProps<typeof Toast.Title>, "className"> & {
|
|
3274
3290
|
className?: string;
|
|
3275
3291
|
};
|
|
@@ -3320,6 +3336,12 @@ interface ToastProviderProps {
|
|
|
3320
3336
|
closeIcon?: ReactNode;
|
|
3321
3337
|
/** Screen anchor for the toast stack. @default "top-right" */
|
|
3322
3338
|
position?: ToastPosition;
|
|
3339
|
+
/**
|
|
3340
|
+
* Stack the toasts like a deck of cards, the newest in front and the older
|
|
3341
|
+
* ones peeking out behind it, instead of listing them one under another.
|
|
3342
|
+
* Hovering or focusing the stack fans it out into the list. @default false
|
|
3343
|
+
*/
|
|
3344
|
+
stacked?: boolean;
|
|
3323
3345
|
/**
|
|
3324
3346
|
* Extra classes merged LAST onto the fixed viewport region — for safe-area
|
|
3325
3347
|
* insets or an offset (e.g. clearing a sidebar). @example
|
|
@@ -3340,7 +3362,7 @@ interface ToastProviderProps {
|
|
|
3340
3362
|
* The action does NOT dismiss the toast — Base UI leaves that to the handler, so
|
|
3341
3363
|
* call `toast.dismiss(id)` yourself when the action should close it.
|
|
3342
3364
|
*/
|
|
3343
|
-
declare function ToastProvider({ children, timeout, limit, closeIcon, position, viewportClassName, }: ToastProviderProps): react.JSX.Element;
|
|
3365
|
+
declare function ToastProvider({ children, timeout, limit, closeIcon, position, stacked, viewportClassName, }: ToastProviderProps): react.JSX.Element;
|
|
3344
3366
|
|
|
3345
3367
|
declare const toastMeta: ComponentMeta;
|
|
3346
3368
|
|
|
@@ -3983,7 +4005,10 @@ interface CodeBlockProps extends ComponentPropsWithRef<"div"> {
|
|
|
3983
4005
|
}
|
|
3984
4006
|
/**
|
|
3985
4007
|
* A multi-line code block. An optional header bar carries the filename and a
|
|
3986
|
-
* copy affordance; the body is a horizontally scrollable monospace pre
|
|
4008
|
+
* copy affordance; the body is a horizontally scrollable monospace pre whose
|
|
4009
|
+
* edges fade while there is more to scroll (see useEdgeFade). Without a
|
|
4010
|
+
* header, the copy button takes its own column beside the code rather than
|
|
4011
|
+
* floating over it, so a long line can never scroll underneath it.
|
|
3987
4012
|
* Highlighting is opt-in through `highlight` or `CodeHighlightProvider`.
|
|
3988
4013
|
* Soft-square (rounded-md), never a pill.
|
|
3989
4014
|
*/
|
|
@@ -7499,6 +7524,6 @@ interface UseCopyResult {
|
|
|
7499
7524
|
*/
|
|
7500
7525
|
declare function useCopy(text: string, { timeout }?: UseCopyOptions): UseCopyResult;
|
|
7501
7526
|
|
|
7502
|
-
declare const SABLE_UI_VERSION: "0.
|
|
7527
|
+
declare const SABLE_UI_VERSION: "0.5.0";
|
|
7503
7528
|
|
|
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 };
|
|
7529
|
+
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, ToastContent, ToastDescription, type ToastManagerApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, ToastRoot, ToastTitle, type ToastType, ToastViewport, Toggle, ToggleGroup, type ToggleGroupAppearance, Toggle as ToggleGroupItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarInput, type ToolbarInputProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Tree, TreeAddRow, TreeEmpty, TreeRow, TreeSection, type UseCopyOptions, type UseCopyResult, type UseInViewOptions, type UsePanelWidthOptions, Video, type VideoProps, ViewTransitionName, type ViewTransitionNameProps, Workspace, WorkspaceBar, WorkspaceCanvas, accordionMeta, appHeaderMeta, appShellMeta, areaChartMeta, attachmentMeta, avatarGroupVariants, avatarMeta, avatarVariants, badgeMeta, badgeVariants, bannerMeta, bannerVariants, barChartMeta, bottomNavMeta, breadcrumbsMeta, browserMeta, bubbleMeta, buttonMeta, buttonVariants, calendarMeta, cardMeta, carouselMeta, chartColor, toneColor as chartToneColor, chatComposerMeta, checkboxCardMeta, checkboxMeta, cn, codeBlockMeta, codeMeta, collapsibleMeta, colorFieldMeta, comboboxMeta, commandMenuMeta, componentGuidance, componentLabel, componentSlug, componentsInGroup, contextCardMeta, contextMenuMeta, dataTableMeta, datePickerMeta, dateTileMeta, destructiveActionModalMeta, dialogMeta, 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,17 +1,17 @@
|
|
|
1
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-ZBZMKOO7.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-GU3T7SBA.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-GU3T7SBA.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-RCLKXF2N.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-RCLKXF2N.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
|
-
import { Icon } from './chunk-
|
|
13
|
-
export { Icon, IconProvider, composeIconSets, useIconSet } from './chunk-
|
|
14
|
-
export { reiconIconSet as fallbackIconSet, reiconIconNames, reiconIconSet } from './chunk-
|
|
12
|
+
import { Icon } from './chunk-QJ6FWTUG.js';
|
|
13
|
+
export { Icon, IconProvider, composeIconSets, useIconSet } from './chunk-QJ6FWTUG.js';
|
|
14
|
+
export { reiconIconSet as fallbackIconSet, reiconIconNames, reiconIconSet } from './chunk-XAZGMY73.js';
|
|
15
15
|
import { featuredThemeManifests, defaultThemeId } from './chunk-EFLC4NA3.js';
|
|
16
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';
|
|
@@ -3512,7 +3512,43 @@ var ENTER_MOTION = {
|
|
|
3512
3512
|
"bottom-center": "motion-slide-up",
|
|
3513
3513
|
"bottom-right": "motion-slide-left"
|
|
3514
3514
|
};
|
|
3515
|
-
var
|
|
3515
|
+
var STACKED_ROOT = [
|
|
3516
|
+
// design-lint-disable-next-line raw-z-index -- orders the cards inside the viewport's own stacking context (it is fixed at z-(--z-toast)); not a page layer
|
|
3517
|
+
"absolute inset-x-0 z-[calc(100-var(--toast-index))] select-none",
|
|
3518
|
+
"[--toast-gap:--spacing(2)] [--toast-peek:--spacing(3)]",
|
|
3519
|
+
"[--toast-scale:max(0,1-var(--toast-index)*0.05)]",
|
|
3520
|
+
"[--toast-h:var(--toast-frontmost-height,var(--toast-height))]",
|
|
3521
|
+
"h-(--toast-h) data-expanded:h-(--toast-height)",
|
|
3522
|
+
// Collapsed: shrink about the anchored edge, then lift a peek per card.
|
|
3523
|
+
"[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+var(--toast-dir)*(var(--toast-index)*var(--toast-peek)+(1-var(--toast-scale))*var(--toast-h))))_scale(var(--toast-scale))]",
|
|
3524
|
+
// Fanned out: Base UI's offset is the heights in front of it; add the gaps.
|
|
3525
|
+
"data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+var(--toast-dir)*(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap))))]",
|
|
3526
|
+
// Arrive from the anchored edge and leave the same way, unless swiped or
|
|
3527
|
+
// pushed out by the limit, which only fade.
|
|
3528
|
+
"data-starting-style:[translate:0_calc(var(--toast-dir)*-100%)] data-starting-style:opacity-0",
|
|
3529
|
+
"[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[translate:0_calc(var(--toast-dir)*-100%)]",
|
|
3530
|
+
"data-ending-style:opacity-0 data-limited:opacity-0",
|
|
3531
|
+
// Fanned out, bridges the gap to the next card, so the pointer stays on the
|
|
3532
|
+
// stack and the list does not collapse under it.
|
|
3533
|
+
"after:absolute after:inset-x-0 after:h-[calc(var(--toast-gap)+1px)] not-data-expanded:after:hidden",
|
|
3534
|
+
// Collapsed, the deck lifts as one: cards resting on each other barely shade
|
|
3535
|
+
// each other. A full shadow on every card stacked a slab per card, and a
|
|
3536
|
+
// theme with hard offset shadows (Poppy's reach 12px, past the 12px peek)
|
|
3537
|
+
// painted the front card's slab over the cards behind it. So the front card
|
|
3538
|
+
// steps down to shadow-md and the cards behind to shadow-sm; fanned out,
|
|
3539
|
+
// each is a toast again and takes the full step back.
|
|
3540
|
+
"not-data-expanded:shadow-md not-data-expanded:has-[>[data-behind]]:shadow-sm",
|
|
3541
|
+
"transition-[transform,translate,opacity,height,box-shadow] duration-(--motion-duration-slow) ease-emphasized"
|
|
3542
|
+
].join(" ");
|
|
3543
|
+
var STACKED_EDGE = {
|
|
3544
|
+
top: "top-0 origin-top [--toast-dir:1] after:top-full",
|
|
3545
|
+
bottom: "bottom-0 origin-bottom [--toast-dir:-1] after:bottom-full"
|
|
3546
|
+
};
|
|
3547
|
+
var edgeOf = (position) => position.startsWith("top") ? "top" : "bottom";
|
|
3548
|
+
var ToastViewportContext = createContext({
|
|
3549
|
+
position: "top-right",
|
|
3550
|
+
stacked: false
|
|
3551
|
+
});
|
|
3516
3552
|
function persistsByDefault(type, options) {
|
|
3517
3553
|
return type === "loading" || type === "error" || options?.actionProps !== void 0;
|
|
3518
3554
|
}
|
|
@@ -3548,13 +3584,16 @@ var ToastPortal = withPortalThemeScope(Toast.Portal);
|
|
|
3548
3584
|
function ToastViewport({
|
|
3549
3585
|
className,
|
|
3550
3586
|
position = "top-right",
|
|
3587
|
+
stacked = false,
|
|
3551
3588
|
...props
|
|
3552
3589
|
}) {
|
|
3553
|
-
return /* @__PURE__ */ jsx(
|
|
3590
|
+
return /* @__PURE__ */ jsx(ToastViewportContext.Provider, { value: { position, stacked }, children: /* @__PURE__ */ jsx(ToastPortal, { children: /* @__PURE__ */ jsx(
|
|
3554
3591
|
Toast.Viewport,
|
|
3555
3592
|
{
|
|
3556
3593
|
className: cn(
|
|
3557
|
-
"fixed z-(--z-toast)
|
|
3594
|
+
"fixed z-(--z-toast) w-95 max-w-[90vw] outline-none",
|
|
3595
|
+
// Stacked toasts are positioned against the viewport, not laid out in it.
|
|
3596
|
+
!stacked && "flex flex-col gap-2",
|
|
3558
3597
|
POSITION[position],
|
|
3559
3598
|
className
|
|
3560
3599
|
),
|
|
@@ -3563,13 +3602,27 @@ function ToastViewport({
|
|
|
3563
3602
|
) }) });
|
|
3564
3603
|
}
|
|
3565
3604
|
function ToastRoot({ className, ...props }) {
|
|
3566
|
-
const position = useContext(
|
|
3605
|
+
const { position, stacked } = useContext(ToastViewportContext);
|
|
3567
3606
|
return /* @__PURE__ */ jsx(
|
|
3568
3607
|
Toast.Root,
|
|
3569
3608
|
{
|
|
3570
3609
|
className: cn(
|
|
3571
3610
|
"flex w-full gap-3 rounded-md border border-border-floating bg-popover p-4 text-popover-foreground shadow-xl",
|
|
3572
|
-
ENTER_MOTION[position],
|
|
3611
|
+
stacked ? [STACKED_ROOT, STACKED_EDGE[edgeOf(position)]] : ENTER_MOTION[position],
|
|
3612
|
+
className
|
|
3613
|
+
),
|
|
3614
|
+
...props
|
|
3615
|
+
}
|
|
3616
|
+
);
|
|
3617
|
+
}
|
|
3618
|
+
function ToastContent({ className, ...props }) {
|
|
3619
|
+
const { stacked } = useContext(ToastViewportContext);
|
|
3620
|
+
return /* @__PURE__ */ jsx(
|
|
3621
|
+
Toast.Content,
|
|
3622
|
+
{
|
|
3623
|
+
className: cn(
|
|
3624
|
+
"flex min-w-0 flex-1 gap-3",
|
|
3625
|
+
stacked && "transition-opacity duration-(--motion-duration-base) ease-standard data-behind:not-data-expanded:pointer-events-none data-behind:not-data-expanded:opacity-0",
|
|
3573
3626
|
className
|
|
3574
3627
|
),
|
|
3575
3628
|
...props
|
|
@@ -3619,6 +3672,7 @@ function ToastProvider({
|
|
|
3619
3672
|
limit,
|
|
3620
3673
|
closeIcon,
|
|
3621
3674
|
position,
|
|
3675
|
+
stacked,
|
|
3622
3676
|
viewportClassName
|
|
3623
3677
|
}) {
|
|
3624
3678
|
return /* @__PURE__ */ jsxs(Toast.Provider, { timeout, limit, toastManager, children: [
|
|
@@ -3628,6 +3682,7 @@ function ToastProvider({
|
|
|
3628
3682
|
{
|
|
3629
3683
|
closeIcon,
|
|
3630
3684
|
position,
|
|
3685
|
+
stacked,
|
|
3631
3686
|
viewportClassName
|
|
3632
3687
|
}
|
|
3633
3688
|
)
|
|
@@ -3642,12 +3697,13 @@ var TYPE_ACCENT = {
|
|
|
3642
3697
|
function ToastList({
|
|
3643
3698
|
closeIcon,
|
|
3644
3699
|
position,
|
|
3700
|
+
stacked,
|
|
3645
3701
|
viewportClassName
|
|
3646
3702
|
}) {
|
|
3647
3703
|
const { toasts } = useToast();
|
|
3648
|
-
return /* @__PURE__ */ jsx(ToastViewport, { position, className: viewportClassName, children: toasts.map((item) => {
|
|
3704
|
+
return /* @__PURE__ */ jsx(ToastViewport, { position, stacked, className: viewportClassName, children: toasts.map((item) => {
|
|
3649
3705
|
const accent = item.type ? TYPE_ACCENT[item.type] : void 0;
|
|
3650
|
-
return /* @__PURE__ */
|
|
3706
|
+
return /* @__PURE__ */ jsx(ToastRoot, { toast: item, children: /* @__PURE__ */ jsxs(ToastContent, { children: [
|
|
3651
3707
|
item.type === "loading" ? /* @__PURE__ */ jsx(
|
|
3652
3708
|
Spinner,
|
|
3653
3709
|
{
|
|
@@ -3667,7 +3723,7 @@ function ToastList({
|
|
|
3667
3723
|
] }),
|
|
3668
3724
|
/* @__PURE__ */ jsx(ToastAction, { className: "self-center" }),
|
|
3669
3725
|
/* @__PURE__ */ jsx(ToastClose, { children: closeIcon ?? /* @__PURE__ */ jsx(Icon, { name: "xmark", className: "text-sm" }) })
|
|
3670
|
-
] }, item.id);
|
|
3726
|
+
] }) }, item.id);
|
|
3671
3727
|
}) });
|
|
3672
3728
|
}
|
|
3673
3729
|
|
|
@@ -3753,7 +3809,7 @@ var toastMeta = {
|
|
|
3753
3809
|
props: [
|
|
3754
3810
|
{
|
|
3755
3811
|
name: "ToastProvider",
|
|
3756
|
-
type: "{ children, timeout?, limit?, closeIcon?, position?, viewportClassName? }",
|
|
3812
|
+
type: "{ children, timeout?, limit?, closeIcon?, position?, stacked?, viewportClassName? }",
|
|
3757
3813
|
default: "\u2014",
|
|
3758
3814
|
description: "Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast()."
|
|
3759
3815
|
},
|
|
@@ -3763,6 +3819,12 @@ var toastMeta = {
|
|
|
3763
3819
|
default: '"top-right"',
|
|
3764
3820
|
description: "Screen anchor for the toast stack."
|
|
3765
3821
|
},
|
|
3822
|
+
{
|
|
3823
|
+
name: "stacked",
|
|
3824
|
+
type: "boolean",
|
|
3825
|
+
default: "false",
|
|
3826
|
+
description: "Stack the toasts like a deck of cards, the newest in front and the older ones peeking out behind it, a step smaller, instead of listing them one under another. Hovering or focusing the stack fans it out into the list. Use it when an app can raise several toasts in a row, so they don't take over the corner of the page."
|
|
3827
|
+
},
|
|
3766
3828
|
{
|
|
3767
3829
|
name: "viewportClassName",
|
|
3768
3830
|
type: "string",
|
|
@@ -3811,6 +3873,11 @@ var toastMeta = {
|
|
|
3811
3873
|
type: "Base UI Toast.Root props + className (requires the `toast` object)",
|
|
3812
3874
|
description: "A single toast surface. Animates enter/leave via data-[starting-style]/data-[ending-style]; swipe-to-dismiss is wired by Base UI."
|
|
3813
3875
|
},
|
|
3876
|
+
{
|
|
3877
|
+
name: "ToastContent",
|
|
3878
|
+
type: "Base UI Toast.Content props + className",
|
|
3879
|
+
description: "The toast's contents as one row. In a stacked viewport it fades on the cards behind the front one and returns when the stack fans out. Wrap a hand-composed toast's parts in it so a stacked viewport can hide them."
|
|
3880
|
+
},
|
|
3814
3881
|
{
|
|
3815
3882
|
name: "ToastTitle",
|
|
3816
3883
|
type: "Base UI Toast.Title props + className",
|
|
@@ -3866,6 +3933,12 @@ var toastMeta = {
|
|
|
3866
3933
|
part: "ToastRoot",
|
|
3867
3934
|
why: "Leaving the same way it entered keeps the stack legible when several dismiss at once; toasts that fade in place leave the remaining ones jumping to fill gaps with no visible cause."
|
|
3868
3935
|
},
|
|
3936
|
+
{
|
|
3937
|
+
slot: "transition",
|
|
3938
|
+
recipe: "custom",
|
|
3939
|
+
part: "ToastRoot (stacked)",
|
|
3940
|
+
why: "A stacked toast arrives from the anchored edge in front of the others, which step back and shrink to make room; hovering fans the deck out into the list. Moving every card, rather than snapping them, shows that the new one went on top and the old ones are still there."
|
|
3941
|
+
},
|
|
3869
3942
|
{
|
|
3870
3943
|
slot: "activity",
|
|
3871
3944
|
recipe: "none",
|
|
@@ -3902,6 +3975,10 @@ var toastMeta = {
|
|
|
3902
3975
|
label: "Undo action",
|
|
3903
3976
|
code: 'toast.message("Post archived", { actionProps: { children: "Undo", onClick: () => restorePost() } })'
|
|
3904
3977
|
},
|
|
3978
|
+
{
|
|
3979
|
+
label: "Stacked",
|
|
3980
|
+
code: '<ToastProvider stacked position="bottom-right">{children}</ToastProvider>'
|
|
3981
|
+
},
|
|
3905
3982
|
{
|
|
3906
3983
|
label: "Provider with app chrome",
|
|
3907
3984
|
code: '<ToastProvider position="bottom-right" limit={3}><AppShell><Region max="feed"><Button onClick={() => toast.success("Saved")}>Save</Button></Region></AppShell></ToastProvider>'
|
|
@@ -4181,7 +4258,7 @@ function ComboboxChips({
|
|
|
4181
4258
|
Combobox$1.Chip,
|
|
4182
4259
|
{
|
|
4183
4260
|
render: /* @__PURE__ */ jsx(Badge, { appearance: "soft", size: "sm" }),
|
|
4184
|
-
className: "pe-0.5 outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4261
|
+
className: "gap-0.5 pe-0.5 outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4185
4262
|
children: [
|
|
4186
4263
|
label,
|
|
4187
4264
|
/* @__PURE__ */ jsx(
|
|
@@ -4192,7 +4269,7 @@ function ComboboxChips({
|
|
|
4192
4269
|
{
|
|
4193
4270
|
variant: "ghost",
|
|
4194
4271
|
size: "icon-xs",
|
|
4195
|
-
className: "-my-1"
|
|
4272
|
+
className: cn("-my-1 size-5 [--button-icon:0.875rem]", hitTargetMin)
|
|
4196
4273
|
}
|
|
4197
4274
|
),
|
|
4198
4275
|
"aria-label": `Remove ${label}`,
|
|
@@ -8034,7 +8111,7 @@ function ColorField({
|
|
|
8034
8111
|
"aria-hidden": true,
|
|
8035
8112
|
className: (
|
|
8036
8113
|
// design-lint-disable-next-line raw-black-white -- handle over arbitrary user colour; no token can guarantee contrast
|
|
8037
|
-
"absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full ring-2 ring-white ring-inset shadow-
|
|
8114
|
+
"absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full ring-2 ring-white ring-inset shadow-(--knob-shadow)"
|
|
8038
8115
|
),
|
|
8039
8116
|
style: {
|
|
8040
8117
|
left: `${picker.hsv.s * 100}%`,
|
|
@@ -11260,6 +11337,6 @@ var carouselMeta = {
|
|
|
11260
11337
|
};
|
|
11261
11338
|
|
|
11262
11339
|
// src/index.ts
|
|
11263
|
-
var SABLE_UI_VERSION = "0.
|
|
11340
|
+
var SABLE_UI_VERSION = "0.5.0";
|
|
11264
11341
|
|
|
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 };
|
|
11342
|
+
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, ToastContent, 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,9 +1,9 @@
|
|
|
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-ZBZMKOO7.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-RCLKXF2N.js';
|
|
3
3
|
import { Region, Stack, Row, Grid, Page, Columns, Col, AspectBox } from '../chunk-3IWZYBGH.js';
|
|
4
4
|
import '../chunk-SRQWQUTW.js';
|
|
5
|
-
import { Icon } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import { Icon } from '../chunk-QJ6FWTUG.js';
|
|
6
|
+
import '../chunk-XAZGMY73.js';
|
|
7
7
|
import { useState, useRef, useEffect } from 'react';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
|
package/dist/styles.css
CHANGED
|
@@ -345,6 +345,13 @@
|
|
|
345
345
|
a dark track (well under 3:1). When ON the knob takes `--primary-foreground`,
|
|
346
346
|
the ink every theme already tunes against its primary fill. */
|
|
347
347
|
--switch-thumb: var(--theme-switch-thumb, oklch(99% 0.002 90));
|
|
348
|
+
|
|
349
|
+
/* The contact shadow under a knob: the Switch thumb, the Slider thumb, the
|
|
350
|
+
ColorField handle. NOT the elevation ladder. `shadow-sm` is a surface's
|
|
351
|
+
lift, and a theme or a Depth setting may make it a long offset (Poppy's
|
|
352
|
+
are hard 3–12px drops); on a 20px knob inside its track that drop escaped
|
|
353
|
+
the track. A knob only sits on its rail, so it keeps one small shadow. */
|
|
354
|
+
--knob-shadow: var(--theme-knob-shadow, 0 1px 2px 0 rgb(0 0 0 / 0.05));
|
|
348
355
|
}
|
|
349
356
|
|
|
350
357
|
/* ==========================================================================
|
package/llms/components/tabs.md
CHANGED
|
@@ -31,7 +31,7 @@ Use Tabs to switch between related panels within the same page context.
|
|
|
31
31
|
|
|
32
32
|
| Name | Type | Description |
|
|
33
33
|
| --- | --- | --- |
|
|
34
|
-
| TabsList | Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: "underline" \| "pill" + className | The tablist row. variant="underline" (default) draws a divider rule beneath the triggers; variant="pill" drops the rule and fills the active trigger. Triggers inherit the variant. |
|
|
34
|
+
| TabsList | Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: "underline" \| "pill" + className | The tablist row. variant="underline" (default) draws a divider rule beneath the triggers; variant="pill" drops the rule and fills the active trigger, which takes the theme's button shape (--button-radius). Triggers inherit the variant. |
|
|
35
35
|
| TabsTrigger | Base UI Tabs.Tab props (value, disabled) + className | A single tab button. value pairs it with the panel of the same value. |
|
|
36
36
|
| TabsPanel | Base UI Tabs.Panel props (value, keepMounted) + className | The content shown when the matching trigger is active. |
|
|
37
37
|
| TabsContent | Alias of TabsPanel | Re-export of TabsPanel for consumers that prefer this name. |
|
package/llms/components/toast.md
CHANGED
|
@@ -34,6 +34,7 @@ Use Toast for transient feedback caused by a user action: saved, failed, copied,
|
|
|
34
34
|
| Name | Type | Description |
|
|
35
35
|
| --- | --- | --- |
|
|
36
36
|
| ToastRoot | Base UI Toast.Root props + className (requires the `toast` object) | A single toast surface. Animates enter/leave via data-[starting-style]/data-[ending-style]; swipe-to-dismiss is wired by Base UI. |
|
|
37
|
+
| ToastContent | Base UI Toast.Content props + className | The toast's contents as one row. In a stacked viewport it fades on the cards behind the front one and returns when the stack fans out. Wrap a hand-composed toast's parts in it so a stacked viewport can hide them. |
|
|
37
38
|
| ToastTitle | Base UI Toast.Title props + className | The toast headline (text-title-sm). Auto-associated as the toast's accessible name. |
|
|
38
39
|
| ToastDescription | Base UI Toast.Description props + className | Supporting body copy beneath the title (text-body-sm, muted). Auto-associated as the toast's accessible description. |
|
|
39
40
|
| ToastClose | Base UI Toast.Close props + className | Dismiss button. Base UI handles the close and leave animation; labelled "Dismiss" by default. |
|
|
@@ -43,8 +44,9 @@ Use Toast for transient feedback caused by a user action: saved, failed, copied,
|
|
|
43
44
|
|
|
44
45
|
| Name | Type | Default | Description |
|
|
45
46
|
| --- | --- | --- | --- |
|
|
46
|
-
| ToastProvider | { children, timeout?, limit?, closeIcon?, position?, viewportClassName? } | — | Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast(). |
|
|
47
|
+
| ToastProvider | { children, timeout?, limit?, closeIcon?, position?, stacked?, viewportClassName? } | — | Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast(). |
|
|
47
48
|
| position | "top-left" \| "top-center" \| "top-right" \| "bottom-left" \| "bottom-center" \| "bottom-right" | "top-right" | Screen anchor for the toast stack. |
|
|
49
|
+
| stacked | boolean | false | Stack the toasts like a deck of cards, the newest in front and the older ones peeking out behind it, a step smaller, instead of listing them one under another. Hovering or focusing the stack fans it out into the list. Use it when an app can raise several toasts in a row, so they don't take over the corner of the page. |
|
|
48
50
|
| viewportClassName | string | — | Extra classes merged LAST onto the fixed viewport region — for safe-area insets or an offset (e.g. clearing a sidebar). |
|
|
49
51
|
| timeout | number | 5000 | Default auto-dismiss time in ms for toasts. 0 keeps a toast until it is dismissed. Error toasts, loading toasts, and any toast carrying actionProps default to 0 regardless of this value; a per-toast timeout overrides both. |
|
|
50
52
|
| limit | number | 3 | Maximum toasts shown at once; older toasts are pushed out when the limit is exceeded. |
|
|
@@ -62,6 +64,7 @@ Use Toast for transient feedback caused by a user action: saved, failed, copied,
|
|
|
62
64
|
- **arrival** · ToastRoot · `motion-slide-left` — A toast interrupts without being asked, so where it came from is the reader's first question. Sliding in from the viewport edge answers it and marks the toast as belonging to the edge rather than to whatever it happens to cover.
|
|
63
65
|
- **response** · ToastAction · `motion-interactive` — Toasts are on a timer, so the action has to look actionable at a glance — there is no time to hunt for the hit target.
|
|
64
66
|
- **transition** · ToastRoot · `motion-slide-left` — Leaving the same way it entered keeps the stack legible when several dismiss at once; toasts that fade in place leave the remaining ones jumping to fill gaps with no visible cause.
|
|
67
|
+
- **transition** · ToastRoot (stacked) · _custom (outside the recipe layer)_ — A stacked toast arrives from the anchored edge in front of the others, which step back and shrink to make room; hovering fans the deck out into the list. Moving every card, rather than snapping them, shows that the new one went on top and the old ones are still there.
|
|
65
68
|
- **activity** · ToastRoot · _no motion_ — A toast reports a result that has already happened. Anything still in flight belongs in the surface that started it, where the reader is still looking.
|
|
66
69
|
|
|
67
70
|
## Accessibility
|
|
@@ -121,6 +124,14 @@ import { toast } from "@sableui/react"
|
|
|
121
124
|
toast.message("Post archived", { actionProps: { children: "Undo", onClick: () => restorePost() } })
|
|
122
125
|
```
|
|
123
126
|
|
|
127
|
+
### Stacked
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import { ToastProvider } from "@sableui/react"
|
|
131
|
+
|
|
132
|
+
<ToastProvider stacked position="bottom-right">{children}</ToastProvider>
|
|
133
|
+
```
|
|
134
|
+
|
|
124
135
|
### Provider with app chrome
|
|
125
136
|
|
|
126
137
|
```tsx
|
package/llms-full.txt
CHANGED
|
@@ -18634,7 +18634,7 @@ Use Tabs to switch between related panels within the same page context.
|
|
|
18634
18634
|
|
|
18635
18635
|
| Name | Type | Description |
|
|
18636
18636
|
| --- | --- | --- |
|
|
18637
|
-
| TabsList | Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: "underline" \| "pill" + className | The tablist row. variant="underline" (default) draws a divider rule beneath the triggers; variant="pill" drops the rule and fills the active trigger. Triggers inherit the variant. |
|
|
18637
|
+
| TabsList | Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: "underline" \| "pill" + className | The tablist row. variant="underline" (default) draws a divider rule beneath the triggers; variant="pill" drops the rule and fills the active trigger, which takes the theme's button shape (--button-radius). Triggers inherit the variant. |
|
|
18638
18638
|
| TabsTrigger | Base UI Tabs.Tab props (value, disabled) + className | A single tab button. value pairs it with the panel of the same value. |
|
|
18639
18639
|
| TabsPanel | Base UI Tabs.Panel props (value, keepMounted) + className | The content shown when the matching trigger is active. |
|
|
18640
18640
|
| TabsContent | Alias of TabsPanel | Re-export of TabsPanel for consumers that prefer this name. |
|
|
@@ -19081,6 +19081,7 @@ Use Toast for transient feedback caused by a user action: saved, failed, copied,
|
|
|
19081
19081
|
| Name | Type | Description |
|
|
19082
19082
|
| --- | --- | --- |
|
|
19083
19083
|
| ToastRoot | Base UI Toast.Root props + className (requires the `toast` object) | A single toast surface. Animates enter/leave via data-[starting-style]/data-[ending-style]; swipe-to-dismiss is wired by Base UI. |
|
|
19084
|
+
| ToastContent | Base UI Toast.Content props + className | The toast's contents as one row. In a stacked viewport it fades on the cards behind the front one and returns when the stack fans out. Wrap a hand-composed toast's parts in it so a stacked viewport can hide them. |
|
|
19084
19085
|
| ToastTitle | Base UI Toast.Title props + className | The toast headline (text-title-sm). Auto-associated as the toast's accessible name. |
|
|
19085
19086
|
| ToastDescription | Base UI Toast.Description props + className | Supporting body copy beneath the title (text-body-sm, muted). Auto-associated as the toast's accessible description. |
|
|
19086
19087
|
| ToastClose | Base UI Toast.Close props + className | Dismiss button. Base UI handles the close and leave animation; labelled "Dismiss" by default. |
|
|
@@ -19090,8 +19091,9 @@ Use Toast for transient feedback caused by a user action: saved, failed, copied,
|
|
|
19090
19091
|
|
|
19091
19092
|
| Name | Type | Default | Description |
|
|
19092
19093
|
| --- | --- | --- | --- |
|
|
19093
|
-
| ToastProvider | { children, timeout?, limit?, closeIcon?, position?, viewportClassName? } | — | Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast(). |
|
|
19094
|
+
| ToastProvider | { children, timeout?, limit?, closeIcon?, position?, stacked?, viewportClassName? } | — | Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast(). |
|
|
19094
19095
|
| position | "top-left" \| "top-center" \| "top-right" \| "bottom-left" \| "bottom-center" \| "bottom-right" | "top-right" | Screen anchor for the toast stack. |
|
|
19096
|
+
| stacked | boolean | false | Stack the toasts like a deck of cards, the newest in front and the older ones peeking out behind it, a step smaller, instead of listing them one under another. Hovering or focusing the stack fans it out into the list. Use it when an app can raise several toasts in a row, so they don't take over the corner of the page. |
|
|
19095
19097
|
| viewportClassName | string | — | Extra classes merged LAST onto the fixed viewport region — for safe-area insets or an offset (e.g. clearing a sidebar). |
|
|
19096
19098
|
| timeout | number | 5000 | Default auto-dismiss time in ms for toasts. 0 keeps a toast until it is dismissed. Error toasts, loading toasts, and any toast carrying actionProps default to 0 regardless of this value; a per-toast timeout overrides both. |
|
|
19097
19099
|
| limit | number | 3 | Maximum toasts shown at once; older toasts are pushed out when the limit is exceeded. |
|
|
@@ -19109,6 +19111,7 @@ Use Toast for transient feedback caused by a user action: saved, failed, copied,
|
|
|
19109
19111
|
- **arrival** · ToastRoot · `motion-slide-left` — A toast interrupts without being asked, so where it came from is the reader's first question. Sliding in from the viewport edge answers it and marks the toast as belonging to the edge rather than to whatever it happens to cover.
|
|
19110
19112
|
- **response** · ToastAction · `motion-interactive` — Toasts are on a timer, so the action has to look actionable at a glance — there is no time to hunt for the hit target.
|
|
19111
19113
|
- **transition** · ToastRoot · `motion-slide-left` — Leaving the same way it entered keeps the stack legible when several dismiss at once; toasts that fade in place leave the remaining ones jumping to fill gaps with no visible cause.
|
|
19114
|
+
- **transition** · ToastRoot (stacked) · _custom (outside the recipe layer)_ — A stacked toast arrives from the anchored edge in front of the others, which step back and shrink to make room; hovering fans the deck out into the list. Moving every card, rather than snapping them, shows that the new one went on top and the old ones are still there.
|
|
19112
19115
|
- **activity** · ToastRoot · _no motion_ — A toast reports a result that has already happened. Anything still in flight belongs in the surface that started it, where the reader is still looking.
|
|
19113
19116
|
|
|
19114
19117
|
## Accessibility
|
|
@@ -19168,6 +19171,14 @@ import { toast } from "@sableui/react"
|
|
|
19168
19171
|
toast.message("Post archived", { actionProps: { children: "Undo", onClick: () => restorePost() } })
|
|
19169
19172
|
```
|
|
19170
19173
|
|
|
19174
|
+
### Stacked
|
|
19175
|
+
|
|
19176
|
+
```tsx
|
|
19177
|
+
import { ToastProvider } from "@sableui/react"
|
|
19178
|
+
|
|
19179
|
+
<ToastProvider stacked position="bottom-right">{children}</ToastProvider>
|
|
19180
|
+
```
|
|
19181
|
+
|
|
19171
19182
|
### Provider with app chrome
|
|
19172
19183
|
|
|
19173
19184
|
```tsx
|
package/llms.txt
CHANGED
|
@@ -446,7 +446,7 @@ import { Button, Card, IconProvider, MotionProvider, SableThemeProvider, useSabl
|
|
|
446
446
|
- **ThemeSelector** — A presentational radiogroup for choosing a Sable design theme from theme manifests — swatch-strip cards for a settings page, or compact rows for tool chrome. → [`llms/components/theme-selector.md`](./llms/components/theme-selector.md)
|
|
447
447
|
- **ThemeSwitcher** — A segmented light / dark / system switch. → [`llms/components/theme-switcher.md`](./llms/components/theme-switcher.md)
|
|
448
448
|
- **ThinkingOrb** — Canvas dot-cloud 'agent is thinking' indicator. → [`llms/components/thinking-orb.md`](./llms/components/thinking-orb.md)
|
|
449
|
-
- **Toast** — Imperative notification system over Base UI Toast — auto-dismiss timers, swipe-to-dismiss, focus management, ARIA live-region announcements, and a limit-aware stack. *Parts:* ToastRoot, ToastTitle, ToastDescription, ToastClose, ToastAction. → [`llms/components/toast.md`](./llms/components/toast.md)
|
|
449
|
+
- **Toast** — Imperative notification system over Base UI Toast — auto-dismiss timers, swipe-to-dismiss, focus management, ARIA live-region announcements, and a limit-aware stack. *Parts:* ToastRoot, ToastContent, ToastTitle, ToastDescription, ToastClose, ToastAction. → [`llms/components/toast.md`](./llms/components/toast.md)
|
|
450
450
|
- **Toggle** — Pressed-state button over Base UI Toggle, plus ToggleGroup for shared single- or multi-select rows. *Parts:* ToggleGroup, ToggleGroupItem. → [`llms/components/toggle.md`](./llms/components/toggle.md)
|
|
451
451
|
- **Toolbar** — A row or column of controls that is one tab stop, with arrow-key movement between its items (role="toolbar"), over Base UI Toolbar. *Parts:* ToolbarButton, ToolbarLink, ToolbarInput, ToolbarGroup, ToolbarSeparator. → [`llms/components/toolbar.md`](./llms/components/toolbar.md)
|
|
452
452
|
- **Tooltip** — Hover/focus label over Base UI Tooltip (collision-aware positioning, ARIA wiring, delay grouping via TooltipProvider). *Parts:* TooltipProvider, TooltipTrigger, TooltipContent, TooltipArrow, SimpleTooltip. → [`llms/components/tooltip.md`](./llms/components/tooltip.md)
|
package/package.json
CHANGED
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.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "Themeable React components, semantic tokens, layout patterns, presets, and package-owned agent skills. Default theme: Sable.",
|
|
6
6
|
"engine": {
|
|
7
7
|
"behavior": "@base-ui/react",
|
|
@@ -16798,7 +16798,7 @@
|
|
|
16798
16798
|
{
|
|
16799
16799
|
"name": "TabsList",
|
|
16800
16800
|
"type": "Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: \"underline\" | \"pill\" + className",
|
|
16801
|
-
"description": "The tablist row. variant=\"underline\" (default) draws a divider rule beneath the triggers; variant=\"pill\" drops the rule and fills the active trigger. Triggers inherit the variant."
|
|
16801
|
+
"description": "The tablist row. variant=\"underline\" (default) draws a divider rule beneath the triggers; variant=\"pill\" drops the rule and fills the active trigger, which takes the theme's button shape (--button-radius). Triggers inherit the variant."
|
|
16802
16802
|
},
|
|
16803
16803
|
{
|
|
16804
16804
|
"name": "TabsTrigger",
|
|
@@ -17450,7 +17450,7 @@
|
|
|
17450
17450
|
"props": [
|
|
17451
17451
|
{
|
|
17452
17452
|
"name": "ToastProvider",
|
|
17453
|
-
"type": "{ children, timeout?, limit?, closeIcon?, position?, viewportClassName? }",
|
|
17453
|
+
"type": "{ children, timeout?, limit?, closeIcon?, position?, stacked?, viewportClassName? }",
|
|
17454
17454
|
"default": "—",
|
|
17455
17455
|
"description": "Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast()."
|
|
17456
17456
|
},
|
|
@@ -17460,6 +17460,12 @@
|
|
|
17460
17460
|
"default": "\"top-right\"",
|
|
17461
17461
|
"description": "Screen anchor for the toast stack."
|
|
17462
17462
|
},
|
|
17463
|
+
{
|
|
17464
|
+
"name": "stacked",
|
|
17465
|
+
"type": "boolean",
|
|
17466
|
+
"default": "false",
|
|
17467
|
+
"description": "Stack the toasts like a deck of cards, the newest in front and the older ones peeking out behind it, a step smaller, instead of listing them one under another. Hovering or focusing the stack fans it out into the list. Use it when an app can raise several toasts in a row, so they don't take over the corner of the page."
|
|
17468
|
+
},
|
|
17463
17469
|
{
|
|
17464
17470
|
"name": "viewportClassName",
|
|
17465
17471
|
"type": "string",
|
|
@@ -17508,6 +17514,11 @@
|
|
|
17508
17514
|
"type": "Base UI Toast.Root props + className (requires the `toast` object)",
|
|
17509
17515
|
"description": "A single toast surface. Animates enter/leave via data-[starting-style]/data-[ending-style]; swipe-to-dismiss is wired by Base UI."
|
|
17510
17516
|
},
|
|
17517
|
+
{
|
|
17518
|
+
"name": "ToastContent",
|
|
17519
|
+
"type": "Base UI Toast.Content props + className",
|
|
17520
|
+
"description": "The toast's contents as one row. In a stacked viewport it fades on the cards behind the front one and returns when the stack fans out. Wrap a hand-composed toast's parts in it so a stacked viewport can hide them."
|
|
17521
|
+
},
|
|
17511
17522
|
{
|
|
17512
17523
|
"name": "ToastTitle",
|
|
17513
17524
|
"type": "Base UI Toast.Title props + className",
|
|
@@ -17563,6 +17574,12 @@
|
|
|
17563
17574
|
"part": "ToastRoot",
|
|
17564
17575
|
"why": "Leaving the same way it entered keeps the stack legible when several dismiss at once; toasts that fade in place leave the remaining ones jumping to fill gaps with no visible cause."
|
|
17565
17576
|
},
|
|
17577
|
+
{
|
|
17578
|
+
"slot": "transition",
|
|
17579
|
+
"recipe": "custom",
|
|
17580
|
+
"part": "ToastRoot (stacked)",
|
|
17581
|
+
"why": "A stacked toast arrives from the anchored edge in front of the others, which step back and shrink to make room; hovering fans the deck out into the list. Moving every card, rather than snapping them, shows that the new one went on top and the old ones are still there."
|
|
17582
|
+
},
|
|
17566
17583
|
{
|
|
17567
17584
|
"slot": "activity",
|
|
17568
17585
|
"recipe": "none",
|
|
@@ -17604,6 +17621,11 @@
|
|
|
17604
17621
|
"code": "toast.message(\"Post archived\", { actionProps: { children: \"Undo\", onClick: () => restorePost() } })",
|
|
17605
17622
|
"imports": "import { toast } from \"@sableui/react\""
|
|
17606
17623
|
},
|
|
17624
|
+
{
|
|
17625
|
+
"label": "Stacked",
|
|
17626
|
+
"code": "<ToastProvider stacked position=\"bottom-right\">{children}</ToastProvider>",
|
|
17627
|
+
"imports": "import { ToastProvider } from \"@sableui/react\""
|
|
17628
|
+
},
|
|
17607
17629
|
{
|
|
17608
17630
|
"label": "Provider with app chrome",
|
|
17609
17631
|
"code": "<ToastProvider position=\"bottom-right\" limit={3}><AppShell><Region max=\"feed\"><Button onClick={() => toast.success(\"Saved\")}>Save</Button></Region></AppShell></ToastProvider>",
|
|
@@ -23699,6 +23721,11 @@
|
|
|
23699
23721
|
"render",
|
|
23700
23722
|
"style"
|
|
23701
23723
|
],
|
|
23724
|
+
"ToastContent": [
|
|
23725
|
+
"className",
|
|
23726
|
+
"render",
|
|
23727
|
+
"style"
|
|
23728
|
+
],
|
|
23702
23729
|
"ToastDescription": [
|
|
23703
23730
|
"className",
|
|
23704
23731
|
"render",
|
|
@@ -23709,6 +23736,7 @@
|
|
|
23709
23736
|
"closeIcon",
|
|
23710
23737
|
"limit",
|
|
23711
23738
|
"position",
|
|
23739
|
+
"stacked",
|
|
23712
23740
|
"timeout",
|
|
23713
23741
|
"viewportClassName"
|
|
23714
23742
|
],
|
|
@@ -23728,6 +23756,7 @@
|
|
|
23728
23756
|
"className",
|
|
23729
23757
|
"position",
|
|
23730
23758
|
"render",
|
|
23759
|
+
"stacked",
|
|
23731
23760
|
"style"
|
|
23732
23761
|
],
|
|
23733
23762
|
"Toggle": [
|