@ada-cx/lovelace 1.12.0 → 1.14.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.
Files changed (93) hide show
  1. package/dist/components/Avatar/Avatar.css.d.ts +8 -8
  2. package/dist/components/Banner/Banner.css.d.ts +19 -1
  3. package/dist/components/Banner/Banner.css.js +12 -2
  4. package/dist/components/Banner/Banner.css.js.map +1 -1
  5. package/dist/components/Banner/Banner.d.ts +22 -40
  6. package/dist/components/Banner/Banner.js +22 -19
  7. package/dist/components/Banner/Banner.js.map +1 -1
  8. package/dist/components/Banner/BannerContainer.d.ts +35 -0
  9. package/dist/components/Banner/BannerContainer.js +38 -0
  10. package/dist/components/Banner/BannerContainer.js.map +1 -0
  11. package/dist/components/Banner/BannerContainerSlide.d.ts +15 -0
  12. package/dist/components/Banner/BannerContainerSlide.js +26 -0
  13. package/dist/components/Banner/BannerContainerSlide.js.map +1 -0
  14. package/dist/components/Banner/index.d.ts +2 -1
  15. package/dist/components/BubbleOverlay/BubbleOverlay.css.js +2 -2
  16. package/dist/components/BubbleOverlay/BubbleOverlay.css.js.map +1 -1
  17. package/dist/components/Button/Button.css.d.ts +14 -14
  18. package/dist/components/Checkbox/Checkbox.css.d.ts +1 -1
  19. package/dist/components/Chip/Chip.css.d.ts +4 -4
  20. package/dist/components/Dialog/Dialog.css.d.ts +2 -2
  21. package/dist/components/Dialog/Dialog.css.js.map +1 -1
  22. package/dist/components/DialogOverlay/DialogOverlay.css.js +2 -2
  23. package/dist/components/DialogOverlay/DialogOverlay.css.js.map +1 -1
  24. package/dist/components/Divider/Divider.css.d.ts +2 -2
  25. package/dist/components/FullscreenOverlay/FullscreenOverlay.css.js +2 -2
  26. package/dist/components/FullscreenOverlay/FullscreenOverlay.css.js.map +1 -1
  27. package/dist/components/Icon/icons/CheckmarkCircle.d.ts +2 -0
  28. package/dist/components/Icon/icons/CheckmarkCircle.js +14 -0
  29. package/dist/components/Icon/icons/CheckmarkCircle.js.map +1 -0
  30. package/dist/components/Icon/icons/index.d.ts +1 -0
  31. package/dist/components/IconButton/IconButton.css.d.ts +14 -14
  32. package/dist/components/PictureMessage/PictureMessage.css.d.ts +2 -2
  33. package/dist/components/ProactiveMessage/ProactiveMessage.css.js.map +1 -1
  34. package/dist/components/Radio/Radio.css.d.ts +1 -1
  35. package/dist/components/ScrollMarker/ScrollMarker.css.d.ts +6 -6
  36. package/dist/components/ScrollMarker/ScrollMarker.css.js.map +1 -1
  37. package/dist/components/Sheet/Sheet.css.js.map +1 -1
  38. package/dist/components/SheetOverlay/SheetOverlay.css.js +2 -2
  39. package/dist/components/SheetOverlay/SheetOverlay.css.js.map +1 -1
  40. package/dist/components/Spinner/Spinner.css.d.ts +2 -2
  41. package/dist/components/ThinkingShimmer/ThinkingShimmer.css.d.ts +1 -1
  42. package/dist/components/ThinkingShimmer/ThinkingShimmer.css.js.map +1 -1
  43. package/dist/components/Toast/Toast.css.d.ts +36 -0
  44. package/dist/components/Toast/Toast.css.js +19 -0
  45. package/dist/components/Toast/Toast.css.js.map +1 -0
  46. package/dist/components/Toast/Toast.d.ts +52 -0
  47. package/dist/components/Toast/Toast.js +59 -0
  48. package/dist/components/Toast/Toast.js.map +1 -0
  49. package/dist/components/Toast/ToastContainer.d.ts +48 -0
  50. package/dist/components/Toast/ToastContainer.js +104 -0
  51. package/dist/components/Toast/ToastContainer.js.map +1 -0
  52. package/dist/components/{ToastRegion/ToastContent.d.ts → Toast/ToastItem.d.ts} +7 -2
  53. package/dist/components/Toast/index.d.ts +6 -0
  54. package/dist/components/{ToastRegion → Toast}/index.js +2 -1
  55. package/dist/components/Toggle/Toggle.css.js.map +1 -1
  56. package/dist/components/Tooltip/Tooltip.css.js.map +1 -1
  57. package/dist/hooks/index.d.ts +1 -1
  58. package/dist/index.d.ts +1 -2
  59. package/dist/index.js +69 -67
  60. package/dist/style.css +1 -1
  61. package/dist/styles/overlays.css.d.ts +1 -0
  62. package/dist/tokens/generated/tokens.d.ts +2 -2
  63. package/dist/tokens/tokens.d.ts +3 -3
  64. package/dist/tokens/tokens.js.map +1 -1
  65. package/dist/tokens.css +23 -11
  66. package/dist/utils/animation.d.ts +0 -16
  67. package/dist/utils/animation.js +24 -50
  68. package/dist/utils/animation.js.map +1 -1
  69. package/package.json +2 -2
  70. package/dist/components/Banner/BannerSurface.d.ts +0 -17
  71. package/dist/components/Banner/BannerSurface.js +0 -65
  72. package/dist/components/Banner/BannerSurface.js.map +0 -1
  73. package/dist/components/Overlay/overlay.css.d.ts +0 -2
  74. package/dist/components/ToastNotification/ToastNotification.css.d.ts +0 -17
  75. package/dist/components/ToastNotification/ToastNotification.css.js +0 -17
  76. package/dist/components/ToastNotification/ToastNotification.css.js.map +0 -1
  77. package/dist/components/ToastNotification/ToastNotification.d.ts +0 -55
  78. package/dist/components/ToastNotification/ToastNotification.js +0 -42
  79. package/dist/components/ToastNotification/ToastNotification.js.map +0 -1
  80. package/dist/components/ToastNotification/index.d.ts +0 -2
  81. package/dist/components/ToastRegion/ToastRegion.css.d.ts +0 -2
  82. package/dist/components/ToastRegion/ToastRegion.css.js +0 -7
  83. package/dist/components/ToastRegion/ToastRegion.css.js.map +0 -1
  84. package/dist/components/ToastRegion/ToastRegion.d.ts +0 -45
  85. package/dist/components/ToastRegion/ToastRegion.js +0 -38
  86. package/dist/components/ToastRegion/ToastRegion.js.map +0 -1
  87. package/dist/components/ToastRegion/ToastRegionItem.d.ts +0 -13
  88. package/dist/components/ToastRegion/ToastRegionItem.js +0 -49
  89. package/dist/components/ToastRegion/ToastRegionItem.js.map +0 -1
  90. package/dist/components/ToastRegion/ToastRegionLandmark.d.ts +0 -15
  91. package/dist/components/ToastRegion/ToastRegionLandmark.js +0 -62
  92. package/dist/components/ToastRegion/ToastRegionLandmark.js.map +0 -1
  93. package/dist/components/ToastRegion/index.d.ts +0 -4
@@ -0,0 +1,59 @@
1
+ import { cx as e } from "../../utils/cx.js";
2
+ import { CheckmarkCircle as t } from "../Icon/icons/CheckmarkCircle.js";
3
+ import { ExclamationTriangle as n } from "../Icon/icons/ExclamationTriangle.js";
4
+ import { Xmark as r } from "../Icon/icons/Xmark.js";
5
+ import { XmarkCircle as i } from "../Icon/icons/XmarkCircle.js";
6
+ import { IconButton as a } from "../IconButton/IconButton.js";
7
+ import { Spinner as o } from "../Spinner/Spinner.js";
8
+ import { toast as s, toastIcon as c, toastMessage as l } from "./Toast.css.js";
9
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
+ //#region src/components/Toast/Toast.tsx
11
+ var f = {
12
+ success: t,
13
+ warning: n,
14
+ error: i
15
+ };
16
+ function p({ status: e, icon: t }) {
17
+ if (e === "loading") return /* @__PURE__ */ u("span", {
18
+ "aria-hidden": "true",
19
+ children: /* @__PURE__ */ u(o, { size: "sm" })
20
+ });
21
+ if (e === "custom") return t;
22
+ let n = f[e];
23
+ return /* @__PURE__ */ u(n, {});
24
+ }
25
+ function m({ status: t = "success", icon: n, onDismiss: i, dismissLabel: o = "Dismiss notification", dismissDisabled: f = !1, messageProps: m, className: h, children: g, ..._ }) {
26
+ let v = !!i && t !== "loading", y = t !== "custom" || !!n;
27
+ return /* @__PURE__ */ d("div", {
28
+ ..._,
29
+ "data-status": t,
30
+ className: e(s, h),
31
+ children: [
32
+ y ? /* @__PURE__ */ u("span", {
33
+ className: c({ status: t }),
34
+ children: /* @__PURE__ */ u(p, {
35
+ status: t,
36
+ icon: n
37
+ })
38
+ }) : null,
39
+ /* @__PURE__ */ u("div", {
40
+ ...m,
41
+ className: e(m?.className, l),
42
+ children: g
43
+ }),
44
+ v && /* @__PURE__ */ u(a, {
45
+ label: o,
46
+ variant: "tertiary",
47
+ size: "xs",
48
+ isDisabled: f,
49
+ onPress: i,
50
+ className: "_16991609",
51
+ children: /* @__PURE__ */ u(r, {})
52
+ })
53
+ ]
54
+ });
55
+ }
56
+ //#endregion
57
+ export { m as Toast };
58
+
59
+ //# sourceMappingURL=Toast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode, Ref } from \"react\";\nimport type { PressEvent } from \"react-aria\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tCheckmarkCircle,\n\tExclamationTriangle,\n\tXmark,\n\tXmarkCircle,\n} from \"../Icon/icons/index.js\";\nimport { IconButton } from \"../IconButton/IconButton.js\";\nimport { Spinner } from \"../Spinner/Spinner.js\";\nimport { toast, toastDismiss, toastIcon, toastMessage } from \"./Toast.css.js\";\n\nexport type ToastStatus =\n\t| \"success\"\n\t| \"warning\"\n\t| \"error\"\n\t| \"custom\"\n\t| \"loading\";\n\nconst STATUS_ICON = {\n\tsuccess: CheckmarkCircle,\n\twarning: ExclamationTriangle,\n\terror: XmarkCircle,\n} as const;\n\nexport interface ToastProps {\n\t/**\n\t * The outcome being reported — selects the leading glyph and its colour. Bind\n\t * it to the result of the action, not the UI. `custom` takes the glyph from\n\t * `icon`; `loading` shows a spinner and refuses a dismiss control.\n\t */\n\tstatus?: ToastStatus;\n\t/** The glyph for `status=\"custom\"`. Ignored for every other status. */\n\ticon?: ReactNode;\n\t/**\n\t * Renders a trailing dismiss button and runs this when the user presses it.\n\t * Ignored while `status=\"loading\"`, whose lifetime belongs to whatever raised\n\t * it rather than to the reader.\n\t */\n\tonDismiss?: (event: PressEvent) => void;\n\t/** Accessible name for the dismiss button. Localize it. */\n\tdismissLabel?: string;\n\t/**\n\t * Takes the press away while the card is on screen only to finish leaving.\n\t * WebKit added `inert` in 15.5, after the iOS 15.4 floor in\n\t * `messaging/vite.browser-targets.mjs`. At that floor, the container's `inert`\n\t * attribute leaves the button tabbable even though its press no longer acts\n\t * on anything. Disabling keeps the card's layout still through the travel,\n\t * which removing the button would not.\n\t */\n\tdismissDisabled?: boolean;\n\t/**\n\t * Attributes for the message element. A container that owns announcement\n\t * passes its live-region props through here, so the dismiss button stays\n\t * outside what gets announced.\n\t */\n\tmessageProps?: HTMLAttributes<HTMLElement>;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The message to display. Keep it to a single line. */\n\tchildren?: ReactNode;\n}\n\nfunction LeadingGlyph({\n\tstatus,\n\ticon,\n}: {\n\tstatus: ToastStatus;\n\ticon: ReactNode;\n}) {\n\tif (status === \"loading\") {\n\t\t// Spinner carries its own `role=\"status\" aria-label=\"Loading\"`, and the\n\t\t// container already puts a live region on the message. Two of them inside\n\t\t// one alertdialog announces \"Loading\" ahead of the message, so this one is\n\t\t// hidden — the copy is what the reader needs.\n\t\treturn (\n\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t<Spinner size=\"sm\" />\n\t\t\t</span>\n\t\t);\n\t}\n\tif (status === \"custom\") {\n\t\treturn icon;\n\t}\n\tconst StatusIcon = STATUS_ICON[status];\n\treturn <StatusIcon />;\n}\n\n/**\n * The floating surface for a transient event — a card that sits above the\n * transcript on a neutral background, rather than the tinted full-width strip\n * `Banner` paints for a lasting condition. The two differ on purpose:\n * a card reads as passing through, a strip as part of the page.\n *\n * Purely presentational, and carries no live region of its own, so it can sit\n * inside a container that owns the announcement. Rendering it standalone\n * announces nothing — reach for `ToastContainer`.\n */\nexport function Toast({\n\tstatus = \"success\",\n\ticon,\n\tonDismiss,\n\tdismissLabel = \"Dismiss notification\",\n\tdismissDisabled = false,\n\tmessageProps,\n\tclassName,\n\tchildren,\n\t...rest\n}: ToastProps) {\n\t// Loading owns its own lifetime, so it never offers a dismiss control even\n\t// when the consumer passes one.\n\tconst canDismiss = !!onDismiss && status !== \"loading\";\n\t// Decided before the element exists: an element is truthy even when the\n\t// component returns null, so testing the rendered glyph would leave an empty\n\t// slot — and its `gap-8` — indenting the message of an iconless `custom`.\n\tconst hasGlyph = status !== \"custom\" || !!icon;\n\n\treturn (\n\t\t<div {...rest} data-status={status} className={cx(toast, className)}>\n\t\t\t{hasGlyph ? (\n\t\t\t\t<span className={toastIcon({ status })}>\n\t\t\t\t\t<LeadingGlyph status={status} icon={icon} />\n\t\t\t\t</span>\n\t\t\t) : null}\n\t\t\t{/* A div, not a span: a container that owns announcement puts a live\n\t\t\t region here, and React Aria renders that region as a div. */}\n\t\t\t<div\n\t\t\t\t{...messageProps}\n\t\t\t\tclassName={cx(messageProps?.className, toastMessage)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{canDismiss && (\n\t\t\t\t<IconButton\n\t\t\t\t\tlabel={dismissLabel}\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\tisDisabled={dismissDisabled}\n\t\t\t\t\tonPress={onDismiss}\n\t\t\t\t\tclassName={toastDismiss}\n\t\t\t\t>\n\t\t\t\t\t<Xmark />\n\t\t\t\t</IconButton>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAoBA,IAAM,IAAc;CACnB,SAAS;CACT,SAAS;CACT,OAAO;CACP;AAyCD,SAAS,EAAa,EACrB,WACA,WAIE;AACF,KAAI,MAAW,UAKd,QACC,kBAAC,QAAD;EAAM,eAAY;YACjB,kBAAC,GAAD,EAAS,MAAK,MAAO,CAAA;EACf,CAAA;AAGT,KAAI,MAAW,SACd,QAAO;CAER,IAAM,IAAa,EAAY;AAC/B,QAAO,kBAAC,GAAD,EAAc,CAAA;;AAatB,SAAgB,EAAM,EACrB,YAAS,WACT,SACA,cACA,kBAAe,wBACf,qBAAkB,IAClB,iBACA,cACA,aACA,GAAG,KACW;CAGd,IAAM,IAAa,CAAC,CAAC,KAAa,MAAW,WAIvC,IAAW,MAAW,YAAY,CAAC,CAAC;AAE1C,QACC,kBAAC,OAAD;EAAK,GAAI;EAAM,eAAa;EAAQ,WAAW,EAAG,GAAO,EAAU;YAAnE;GACE,IACA,kBAAC,QAAD;IAAM,WAAW,EAAU,EAAE,WAAQ,CAAC;cACrC,kBAAC,GAAD;KAAsB;KAAc;KAAQ,CAAA;IACtC,CAAA,GACJ;GAGJ,kBAAC,OAAD;IACC,GAAI;IACJ,WAAW,EAAG,GAAc,WAAW,EAAa;IAEnD;IACI,CAAA;GACL,KACA,kBAAC,GAAD;IACC,OAAO;IACP,SAAQ;IACR,MAAK;IACL,YAAY;IACZ,SAAS;IACT,WAAA;cAEA,kBAAC,GAAD,EAAS,CAAA;IACG,CAAA;GAET"}
@@ -0,0 +1,48 @@
1
+ import type { CSSProperties, Ref } from "react";
2
+ import type { ToastQueue } from "react-stately";
3
+ import type { ToastItem } from "./ToastItem.js";
4
+ export interface ToastContainerProps {
5
+ /** The queue to display. Create one per surface with `new ToastQueue()`. */
6
+ queue: ToastQueue<ToastItem>;
7
+ /**
8
+ * Keys of the toasts that are leaving. Keep each one on the queue until
9
+ * `onExited` reports it, or it unmounts part-way through its travel.
10
+ */
11
+ exiting: ReadonlySet<string>;
12
+ /** Runs when a leaving toast finishes its travel and can be closed. */
13
+ onExited: (key: string) => void;
14
+ /** Runs when the reader presses a toast's dismiss button. */
15
+ onDismiss: (key: string) => void;
16
+ /**
17
+ * Overrides the region's accessible name. Leave it unset: the default is
18
+ * already localized and counts the toasts on show ("2 notifications."), which
19
+ * is what a screen-reader user hears on navigating here with F6.
20
+ */
21
+ "aria-label"?: string;
22
+ className?: string;
23
+ style?: CSSProperties;
24
+ /** Attaches to the always-mounted anchor, not the region. */
25
+ ref?: Ref<HTMLDivElement>;
26
+ }
27
+ /**
28
+ * Displays the toasts on a queue as a labelled landmark region.
29
+ *
30
+ * The container owns announcement, the card surface and the motion. It does not
31
+ * own the clock: the caller decides which toasts exist, when each one leaves, and
32
+ * what a dismiss press means. Mark a toast in `exiting` to start its travel, and
33
+ * take it off the queue when `onExited` reports it.
34
+ *
35
+ * No region renders while the queue is empty, so it does not sit in the
36
+ * accessibility tree between notifications. The anchor it renders into stays
37
+ * mounted regardless, carrying `data-react-aria-top-layer`: React Aria reads that
38
+ * attribute to decide what an open overlay hides, what a press outside an overlay
39
+ * counts as, and what a focus scope lets go. An anchor that came and went with the
40
+ * toasts would leave the consumer's chrome hidden, and a toast raised afterwards
41
+ * would mount inside that hidden subtree and never be announced.
42
+ *
43
+ * That exemption is why no region renders while a modal overlay is open. The
44
+ * region is anchored in the consumer's chrome, which the overlay paints over and
45
+ * seals off from the pointer, so a toast there would be announced and F6-reachable
46
+ * with a dismiss control nobody could press.
47
+ */
48
+ export declare function ToastContainer({ queue, exiting, onExited, onDismiss, className, style, ref, "aria-label": ariaLabel, }: ToastContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,104 @@
1
+ import { cx as e } from "../../utils/cx.js";
2
+ import { useEnterAnimation as t, useExitAnimation as n } from "../../utils/animation.js";
3
+ import { useHasOpenOverlay as r } from "../../hooks/overlayRegistry.js";
4
+ import { toastAnchor as i, toastCard as a } from "./Toast.css.js";
5
+ import { Toast as o } from "./Toast.js";
6
+ import { jsx as s } from "react/jsx-runtime";
7
+ import { ButtonContext as c, TextContext as l, UNSTABLE_Toast as u, UNSTABLE_ToastList as d, UNSTABLE_ToastRegion as f, useSlottedContext as p } from "react-aria-components";
8
+ import { useCallback as m, useEffect as h, useLayoutEffect as g, useRef as _, useState as v } from "react";
9
+ import { UNSAFE_PortalProvider as y, useFocusVisible as b } from "react-aria";
10
+ //#region src/components/Toast/ToastContainer.tsx
11
+ function x({ status: e, icon: t, message: n, isExiting: r, onPress: i }) {
12
+ let a = p(c, "close"), u = p(l, "title"), [d, f] = v(!1);
13
+ return g(() => f(!0), []), /* @__PURE__ */ s(o, {
14
+ status: e,
15
+ icon: t,
16
+ onDismiss: i,
17
+ dismissDisabled: r,
18
+ dismissLabel: a?.["aria-label"],
19
+ messageProps: {
20
+ id: u && "id" in u ? u.id : void 0,
21
+ role: e === "error" ? "alert" : "status",
22
+ "aria-live": e === "error" ? "assertive" : "polite",
23
+ "aria-atomic": "true",
24
+ "aria-hidden": d ? void 0 : "true"
25
+ },
26
+ children: n
27
+ });
28
+ }
29
+ function S(e) {
30
+ let t = e.closest("[role=\"region\"]"), n = [...t?.querySelectorAll("._1699160d") ?? []], r = n.indexOf(e);
31
+ if (r === -1) return t;
32
+ let i = (e) => !e.hasAttribute("data-exiting");
33
+ return n.slice(0, r).reverse().find(i) ?? n.slice(r + 1).find(i) ?? t;
34
+ }
35
+ function C({ toast: e, isExiting: r, onExited: i, onDismiss: o }) {
36
+ let c = _(null), l = t(c), d = n(c, !r), { isFocusVisible: f } = b();
37
+ h(() => {
38
+ r && !d && i(e.key);
39
+ }, [
40
+ r,
41
+ d,
42
+ i,
43
+ e.key
44
+ ]), g(() => {
45
+ let e = c.current;
46
+ !r || !e || !f || e.contains(document.activeElement) && S(e)?.focus();
47
+ }, [r, f]), g(() => {
48
+ let e = c.current;
49
+ !r || !e || (e.setAttribute("inert", ""), e.setAttribute("aria-hidden", "true"), e.tabIndex = -1, e.removeAttribute("role"));
50
+ }, [r]);
51
+ let { status: p = "success", message: m, icon: v } = e.content;
52
+ return /* @__PURE__ */ s(u, {
53
+ toast: e,
54
+ ref: c,
55
+ className: a,
56
+ "data-entering": l || void 0,
57
+ "data-exiting": r || void 0,
58
+ children: /* @__PURE__ */ s(x, {
59
+ status: p,
60
+ icon: v,
61
+ message: m,
62
+ isExiting: r,
63
+ onPress: (t) => {
64
+ if (t.pointerType === "keyboard") {
65
+ let e = c.current;
66
+ e?.contains(document.activeElement) && S(e)?.focus();
67
+ }
68
+ o(e.key);
69
+ }
70
+ })
71
+ });
72
+ }
73
+ function w({ queue: t, exiting: n, onExited: a, onDismiss: o, className: c, style: l, ref: u, "aria-label": p }) {
74
+ let [h, g] = v(null), _ = r(), b = m((e) => {
75
+ g(e), typeof u == "function" ? u(e) : u && (u.current = e);
76
+ }, [u]), x = m(() => h ?? document.body, [h]);
77
+ return /* @__PURE__ */ s("div", {
78
+ "data-react-aria-top-layer": "true",
79
+ ref: b,
80
+ className: e(i, c),
81
+ style: l,
82
+ children: h && !_ && /* @__PURE__ */ s(y, {
83
+ getContainer: x,
84
+ children: /* @__PURE__ */ s(f, {
85
+ queue: t,
86
+ "aria-label": p,
87
+ className: "_1699160b",
88
+ children: /* @__PURE__ */ s(d, {
89
+ className: "_1699160c",
90
+ children: ({ toast: e }) => /* @__PURE__ */ s(C, {
91
+ toast: e,
92
+ isExiting: n.has(e.key),
93
+ onExited: a,
94
+ onDismiss: o
95
+ })
96
+ })
97
+ })
98
+ })
99
+ });
100
+ }
101
+ //#endregion
102
+ export { w as ToastContainer };
103
+
104
+ //# sourceMappingURL=ToastContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastContainer.js","names":[],"sources":["../../../src/components/Toast/ToastContainer.tsx"],"sourcesContent":["import type { CSSProperties, Ref } from \"react\";\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport type { PressEvent } from \"react-aria\";\nimport { UNSAFE_PortalProvider, useFocusVisible } from \"react-aria\";\nimport {\n\tButtonContext,\n\tTextContext,\n\tUNSTABLE_Toast,\n\tUNSTABLE_ToastList,\n\tUNSTABLE_ToastRegion,\n\tuseSlottedContext,\n} from \"react-aria-components\";\nimport type { QueuedToast, ToastQueue } from \"react-stately\";\nimport { useHasOpenOverlay } from \"../../hooks/overlayRegistry.js\";\nimport { useEnterAnimation, useExitAnimation } from \"../../utils/animation.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport { toastAnchor, toastCard, toastList, toastRegion } from \"./Toast.css.js\";\nimport { Toast } from \"./Toast.js\";\nimport type { ToastItem } from \"./ToastItem.js\";\n\nexport interface ToastContainerProps {\n\t/** The queue to display. Create one per surface with `new ToastQueue()`. */\n\tqueue: ToastQueue<ToastItem>;\n\t/**\n\t * Keys of the toasts that are leaving. Keep each one on the queue until\n\t * `onExited` reports it, or it unmounts part-way through its travel.\n\t */\n\texiting: ReadonlySet<string>;\n\t/** Runs when a leaving toast finishes its travel and can be closed. */\n\tonExited: (key: string) => void;\n\t/** Runs when the reader presses a toast's dismiss button. */\n\tonDismiss: (key: string) => void;\n\t/**\n\t * Overrides the region's accessible name. Leave it unset: the default is\n\t * already localized and counts the toasts on show (\"2 notifications.\"), which\n\t * is what a screen-reader user hears on navigating here with F6.\n\t */\n\t\"aria-label\"?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\t/** Attaches to the always-mounted anchor, not the region. */\n\tref?: Ref<HTMLDivElement>;\n}\n\ninterface ToastCardProps {\n\ttoast: QueuedToast<ToastItem>;\n\tisExiting: boolean;\n\tonExited: (key: string) => void;\n\tonDismiss: (key: string) => void;\n}\n\n/**\n * The card's own dismiss control, named from the one React Aria would have\n * rendered.\n *\n * React Aria hands its close button down through `ButtonContext` under a `close`\n * slot, carrying both the localized name and a press handler that closes the\n * toast outright. `mergeProps` chains `on*` handlers rather than replacing them,\n * so a React Aria button given the container's handler would run both and take\n * the card off the queue before it could travel. Taking the name alone leaves the\n * lifetime with the caller.\n */\nfunction ToastDismiss({\n\tstatus,\n\ticon,\n\tmessage,\n\tisExiting,\n\tonPress,\n}: {\n\tstatus: NonNullable<ToastItem[\"status\"]>;\n\ticon: ToastItem[\"icon\"];\n\tmessage: ToastItem[\"message\"];\n\tisExiting: boolean;\n\tonPress: (event: PressEvent) => void;\n}) {\n\tconst closeButton = useSlottedContext(ButtonContext, \"close\");\n\t// React Aria names the card through `aria-labelledby`, pointing at the id it\n\t// hands down under the `title` slot. Nothing here renders its `Text`, so the\n\t// message has to carry that id or the card has no accessible name at all.\n\tconst title = useSlottedContext(TextContext, \"title\");\n\t// React Aria hides its own content element on the first render and reveals it\n\t// on the next, which is what makes NVDA announce a toast that mounts with its\n\t// text already in place. Those props reach that element through a context the\n\t// package does not export, so the reveal is repeated here.\n\tconst [isRevealed, setIsRevealed] = useState(false);\n\tuseLayoutEffect(() => setIsRevealed(true), []);\n\treturn (\n\t\t<Toast\n\t\t\tstatus={status}\n\t\t\ticon={icon}\n\t\t\tonDismiss={onPress}\n\t\t\t// The card carries `inert` by now, but WebKit added `inert` in 15.5,\n\t\t\t// after the iOS 15.4 floor in `messaging/vite.browser-targets.mjs`. At\n\t\t\t// that floor the button stays tabbable and offers a press that no longer\n\t\t\t// acts on anything, so it has to be disabled in its own right.\n\t\t\tdismissDisabled={isExiting}\n\t\t\tdismissLabel={closeButton?.[\"aria-label\"]}\n\t\t\t// The live region rides the message box itself. React Aria's own\n\t\t\t// `ToastContent` would need `display: contents` to stay out of the card's\n\t\t\t// row, and WebKit drops a box-less element from the accessibility tree\n\t\t\t// until 16, below the floor above, so the announcement would never reach\n\t\t\t// the reader there.\n\t\t\tmessageProps={{\n\t\t\t\tid: title && \"id\" in title ? title.id : undefined,\n\t\t\t\t// React Aria hardcodes `role=\"alert\"` for every toast, which interrupts\n\t\t\t\t// the reader whatever the outcome. The queue is one shared surface, so\n\t\t\t\t// urgency is chosen per card: a failure interrupts, anything else waits\n\t\t\t\t// its turn.\n\t\t\t\trole: status === \"error\" ? \"alert\" : \"status\",\n\t\t\t\t\"aria-live\": status === \"error\" ? \"assertive\" : \"polite\",\n\t\t\t\t\"aria-atomic\": \"true\",\n\t\t\t\t\"aria-hidden\": isRevealed ? undefined : \"true\",\n\t\t\t}}\n\t\t>\n\t\t\t{message}\n\t\t</Toast>\n\t);\n}\n\n/**\n * Where focus goes when the card under it leaves: the next card down the stack,\n * then the one above it, then the region itself. Landing on the region keeps\n * focus inside it, so React Aria still holds the element the reader came from and\n * restores it once the last card has gone.\n */\nfunction nextFocusTarget(element: HTMLElement): HTMLElement | null {\n\tconst region = element.closest<HTMLElement>('[role=\"region\"]');\n\t// React Aria wraps each card in a list item of its own, so the cards are read\n\t// off the region rather than from the element's own parent.\n\tconst cards = [\n\t\t...(region?.querySelectorAll<HTMLElement>(`.${toastCard}`) ?? []),\n\t];\n\tconst index = cards.indexOf(element);\n\tif (index === -1) {\n\t\treturn region;\n\t}\n\tconst settled = (card: HTMLElement) => !card.hasAttribute(\"data-exiting\");\n\t// `toastList` is `column-reverse`, so a higher DOM index sits visually above\n\t// and a lower one below. Take the card below first, nearest first, then walk\n\t// up, so focus lands on the card that rises into the freed row.\n\treturn (\n\t\tcards.slice(0, index).reverse().find(settled) ??\n\t\tcards.slice(index + 1).find(settled) ??\n\t\tregion\n\t);\n}\n\nfunction ToastCard({ toast, isExiting, onExited, onDismiss }: ToastCardProps) {\n\tconst ref = useRef<HTMLDivElement>(null);\n\t// The card rises in from `[data-entering]` and falls back out to\n\t// `[data-exiting]`, both off-screen, with a transition between. A transition\n\t// resumes from the current computed value, so a card dismissed mid-entry\n\t// reverses from wherever it stands. `useExitAnimation` and `useEnterAnimation`\n\t// watch the same transition, the way `BannerContainerSlide` does.\n\tconst isEntering = useEnterAnimation(ref);\n\tconst isLeaving = useExitAnimation(ref, !isExiting);\n\tconst { isFocusVisible } = useFocusVisible();\n\n\tuseEffect(() => {\n\t\tif (isExiting && !isLeaving) {\n\t\t\tonExited(toast.key);\n\t\t}\n\t}, [isExiting, isLeaving, onExited, toast.key]);\n\n\t// `inert` below drops the focus it holds to the document body. React Aria moves\n\t// focus for a toast that leaves the queue, and the card stays on the queue until\n\t// its travel is over, so the reader is handed on from here instead. It runs\n\t// before the effect below, which is what leaves it a card to read focus off.\n\t//\n\t// Only for a reader working the keyboard, though. A dismiss button focuses\n\t// itself under a mouse press in Chrome, so handing that on would park an\n\t// invisible focus on the card left standing, and a consumer that reads focus as\n\t// the reader asking for more time would hold its countdown there for as long as\n\t// the reader left the page alone.\n\tuseLayoutEffect(() => {\n\t\tconst element = ref.current;\n\t\tif (!isExiting || !element || !isFocusVisible) {\n\t\t\treturn;\n\t\t}\n\t\tif (element.contains(document.activeElement)) {\n\t\t\tnextFocusTarget(element)?.focus();\n\t\t}\n\t}, [isExiting, isFocusVisible]);\n\n\t// The caller has already let the card go, so it is on screen only to finish its\n\t// travel. `inert` takes it out of the accessibility tree, out of the tab order\n\t// and away from the pointer in one attribute. WebKit added `inert` in 15.5, and\n\t// the floor in `messaging/vite.browser-targets.mjs` is 15.4, so `role` and\n\t// `tabIndex` come off the element as well. React Aria pins both through props,\n\t// and a card never comes back from leaving, so nothing puts them back.\n\tuseLayoutEffect(() => {\n\t\tconst element = ref.current;\n\t\tif (!isExiting || !element) {\n\t\t\treturn;\n\t\t}\n\t\telement.setAttribute(\"inert\", \"\");\n\t\t// At the 15.4 floor `inert` does nothing, so the card would keep announcing\n\t\t// and stay in the reader's tree for the whole of its travel.\n\t\telement.setAttribute(\"aria-hidden\", \"true\");\n\t\telement.tabIndex = -1;\n\t\telement.removeAttribute(\"role\");\n\t}, [isExiting]);\n\n\tconst { status = \"success\", message, icon } = toast.content;\n\n\treturn (\n\t\t<UNSTABLE_Toast\n\t\t\ttoast={toast}\n\t\t\tref={ref}\n\t\t\tclassName={toastCard}\n\t\t\tdata-entering={isEntering || undefined}\n\t\t\tdata-exiting={isExiting || undefined}\n\t\t>\n\t\t\t<ToastDismiss\n\t\t\t\tstatus={status}\n\t\t\t\ticon={icon}\n\t\t\t\tmessage={message}\n\t\t\t\tisExiting={isExiting}\n\t\t\t\tonPress={(event) => {\n\t\t\t\t\t// The exit re-render disables this button, and a native disabled\n\t\t\t\t\t// button drops its focus to the document body in the same commit,\n\t\t\t\t\t// before the layout effect below can read focus off the card. Hand a\n\t\t\t\t\t// keyboard reader on here, while the button still holds focus.\n\t\t\t\t\tif (event.pointerType === \"keyboard\") {\n\t\t\t\t\t\tconst element = ref.current;\n\t\t\t\t\t\tif (element?.contains(document.activeElement)) {\n\t\t\t\t\t\t\tnextFocusTarget(element)?.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tonDismiss(toast.key);\n\t\t\t\t}}\n\t\t\t/>\n\t\t</UNSTABLE_Toast>\n\t);\n}\n\n/**\n * Displays the toasts on a queue as a labelled landmark region.\n *\n * The container owns announcement, the card surface and the motion. It does not\n * own the clock: the caller decides which toasts exist, when each one leaves, and\n * what a dismiss press means. Mark a toast in `exiting` to start its travel, and\n * take it off the queue when `onExited` reports it.\n *\n * No region renders while the queue is empty, so it does not sit in the\n * accessibility tree between notifications. The anchor it renders into stays\n * mounted regardless, carrying `data-react-aria-top-layer`: React Aria reads that\n * attribute to decide what an open overlay hides, what a press outside an overlay\n * counts as, and what a focus scope lets go. An anchor that came and went with the\n * toasts would leave the consumer's chrome hidden, and a toast raised afterwards\n * would mount inside that hidden subtree and never be announced.\n *\n * That exemption is why no region renders while a modal overlay is open. The\n * region is anchored in the consumer's chrome, which the overlay paints over and\n * seals off from the pointer, so a toast there would be announced and F6-reachable\n * with a dismiss control nobody could press.\n */\nexport function ToastContainer({\n\tqueue,\n\texiting,\n\tonExited,\n\tonDismiss,\n\tclassName,\n\tstyle,\n\tref,\n\t\"aria-label\": ariaLabel,\n}: ToastContainerProps) {\n\tconst [anchor, setAnchor] = useState<HTMLDivElement | null>(null);\n\tconst hasOpenOverlay = useHasOpenOverlay();\n\n\tconst attachAnchor = useCallback(\n\t\t(node: HTMLDivElement | null) => {\n\t\t\tsetAnchor(node);\n\t\t\tif (typeof ref === \"function\") {\n\t\t\t\tref(node);\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = node;\n\t\t\t}\n\t\t},\n\t\t[ref],\n\t);\n\n\t// React Aria's region portals itself through whatever `UNSAFE_PortalProvider`\n\t// it finds, and a consumer that scopes one to its app root would take the\n\t// toasts out of this container entirely. Pointing a nested provider at the\n\t// anchor keeps them where the consumer placed them.\n\tconst getContainer = useCallback(() => anchor ?? document.body, [anchor]);\n\n\treturn (\n\t\t<div\n\t\t\tdata-react-aria-top-layer=\"true\"\n\t\t\tref={attachAnchor}\n\t\t\tclassName={cx(toastAnchor, className)}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{anchor && !hasOpenOverlay && (\n\t\t\t\t<UNSAFE_PortalProvider getContainer={getContainer}>\n\t\t\t\t\t<UNSTABLE_ToastRegion\n\t\t\t\t\t\tqueue={queue}\n\t\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\t\tclassName={toastRegion}\n\t\t\t\t\t>\n\t\t\t\t\t\t<UNSTABLE_ToastList<ToastItem> className={toastList}>\n\t\t\t\t\t\t\t{({ toast }) => (\n\t\t\t\t\t\t\t\t<ToastCard\n\t\t\t\t\t\t\t\t\ttoast={toast}\n\t\t\t\t\t\t\t\t\tisExiting={exiting.has(toast.key)}\n\t\t\t\t\t\t\t\t\tonExited={onExited}\n\t\t\t\t\t\t\t\t\tonDismiss={onDismiss}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</UNSTABLE_ToastList>\n\t\t\t\t\t</UNSTABLE_ToastRegion>\n\t\t\t\t</UNSAFE_PortalProvider>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAoEA,SAAS,EAAa,EACrB,WACA,SACA,YACA,cACA,cAOE;CACF,IAAM,IAAc,EAAkB,GAAe,QAAQ,EAIvD,IAAQ,EAAkB,GAAa,QAAQ,EAK/C,CAAC,GAAY,KAAiB,EAAS,GAAM;AAEnD,QADA,QAAsB,EAAc,GAAK,EAAE,EAAE,CAAC,EAE7C,kBAAC,GAAD;EACS;EACF;EACN,WAAW;EAKX,iBAAiB;EACjB,cAAc,IAAc;EAM5B,cAAc;GACb,IAAI,KAAS,QAAQ,IAAQ,EAAM,KAAK,KAAA;GAKxC,MAAM,MAAW,UAAU,UAAU;GACrC,aAAa,MAAW,UAAU,cAAc;GAChD,eAAe;GACf,eAAe,IAAa,KAAA,IAAY;GACxC;YAEA;EACM,CAAA;;AAUV,SAAS,EAAgB,GAA0C;CAClE,IAAM,IAAS,EAAQ,QAAqB,oBAAkB,EAGxD,IAAQ,CACb,GAAI,GAAQ,iBAA8B,aAAgB,IAAI,EAAE,CAChE,EACK,IAAQ,EAAM,QAAQ,EAAQ;AACpC,KAAI,MAAU,GACb,QAAO;CAER,IAAM,KAAW,MAAsB,CAAC,EAAK,aAAa,eAAe;AAIzE,QACC,EAAM,MAAM,GAAG,EAAM,CAAC,SAAS,CAAC,KAAK,EAAQ,IAC7C,EAAM,MAAM,IAAQ,EAAE,CAAC,KAAK,EAAQ,IACpC;;AAIF,SAAS,EAAU,EAAE,UAAO,cAAW,aAAU,gBAA6B;CAC7E,IAAM,IAAM,EAAuB,KAAK,EAMlC,IAAa,EAAkB,EAAI,EACnC,IAAY,EAAiB,GAAK,CAAC,EAAU,EAC7C,EAAE,sBAAmB,GAAiB;AAkC5C,CAhCA,QAAgB;AACf,EAAI,KAAa,CAAC,KACjB,EAAS,EAAM,IAAI;IAElB;EAAC;EAAW;EAAW;EAAU,EAAM;EAAI,CAAC,EAY/C,QAAsB;EACrB,IAAM,IAAU,EAAI;AAChB,GAAC,KAAa,CAAC,KAAW,CAAC,KAG3B,EAAQ,SAAS,SAAS,cAAc,IAC3C,EAAgB,EAAQ,EAAE,OAAO;IAEhC,CAAC,GAAW,EAAe,CAAC,EAQ/B,QAAsB;EACrB,IAAM,IAAU,EAAI;AAChB,GAAC,KAAa,CAAC,MAGnB,EAAQ,aAAa,SAAS,GAAG,EAGjC,EAAQ,aAAa,eAAe,OAAO,EAC3C,EAAQ,WAAW,IACnB,EAAQ,gBAAgB,OAAO;IAC7B,CAAC,EAAU,CAAC;CAEf,IAAM,EAAE,YAAS,WAAW,YAAS,YAAS,EAAM;AAEpD,QACC,kBAAC,GAAD;EACQ;EACF;EACL,WAAW;EACX,iBAAe,KAAc,KAAA;EAC7B,gBAAc,KAAa,KAAA;YAE3B,kBAAC,GAAD;GACS;GACF;GACG;GACE;GACX,UAAU,MAAU;AAKnB,QAAI,EAAM,gBAAgB,YAAY;KACrC,IAAM,IAAU,EAAI;AACpB,KAAI,GAAS,SAAS,SAAS,cAAc,IAC5C,EAAgB,EAAQ,EAAE,OAAO;;AAGnC,MAAU,EAAM,IAAI;;GAEpB,CAAA;EACc,CAAA;;AAyBnB,SAAgB,EAAe,EAC9B,UACA,YACA,aACA,cACA,cACA,UACA,QACA,cAAc,KACS;CACvB,IAAM,CAAC,GAAQ,KAAa,EAAgC,KAAK,EAC3D,IAAiB,GAAmB,EAEpC,IAAe,GACnB,MAAgC;AAEhC,EADA,EAAU,EAAK,EACX,OAAO,KAAQ,aAClB,EAAI,EAAK,GACC,MACV,EAAI,UAAU;IAGhB,CAAC,EAAI,CACL,EAMK,IAAe,QAAkB,KAAU,SAAS,MAAM,CAAC,EAAO,CAAC;AAEzE,QACC,kBAAC,OAAD;EACC,6BAA0B;EAC1B,KAAK;EACL,WAAW,EAAG,GAAa,EAAU;EAC9B;YAEN,KAAU,CAAC,KACX,kBAAC,GAAD;GAAqC;aACpC,kBAAC,GAAD;IACQ;IACP,cAAY;IACZ,WAAA;cAEA,kBAAC,GAAD;KAA+B,WAAA;gBAC5B,EAAE,eACH,kBAAC,GAAD;MACQ;MACP,WAAW,EAAQ,IAAI,EAAM,IAAI;MACvB;MACC;MACV,CAAA;KAEiB,CAAA;IACC,CAAA;GACA,CAAA;EAEpB,CAAA"}
@@ -1,9 +1,14 @@
1
1
  import type { ReactNode } from "react";
2
- import type { ToastStatus } from "../ToastNotification/ToastNotification.js";
2
+ import type { ToastStatus } from "../Toast/Toast.js";
3
3
  /** What a caller puts on the queue via `queue.add(content, options)`. */
4
- export interface ToastContent {
4
+ export interface ToastItem {
5
5
  /** The message to announce and display. */
6
6
  message: ReactNode;
7
7
  /** The outcome being reported. Defaults to `success`. */
8
8
  status?: ToastStatus;
9
+ /**
10
+ * The glyph for `status: "custom"`. Compose it with `<Icon>`; ignored for
11
+ * every other status.
12
+ */
13
+ icon?: ReactNode;
9
14
  }
@@ -0,0 +1,6 @@
1
+ export type { ToastOptions } from "react-stately";
2
+ export { ToastQueue } from "react-stately";
3
+ export type { ToastProps, ToastStatus } from "./Toast.js";
4
+ export { Toast } from "./Toast.js";
5
+ export { ToastContainer, type ToastContainerProps } from "./ToastContainer.js";
6
+ export type { ToastItem } from "./ToastItem.js";
@@ -1,3 +1,4 @@
1
- import "./ToastRegion.js";
1
+ import "./Toast.js";
2
+ import "./ToastContainer.js";
2
3
  import { ToastQueue as e } from "react-stately";
3
4
  export { e as ToastQueue };
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.css.js","names":[],"sources":["../../../src/components/Toggle/Toggle.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// Figma pins the track at a fixed 44×24 frame and the thumb at 22px with a 1px\n// inset — control-size tiers the token set doesn't expose yet (same treatment as\n// Checkbox's 24px box and Radio's control size).\nconst TRACK_WIDTH = \"44px\";\nconst TRACK_HEIGHT = \"24px\";\nconst THUMB_SIZE = \"22px\";\nconst THUMB_INSET = \"1px\";\n// Trailing rest position: full track − thumb − the trailing inset.\nconst THUMB_TRAVEL_END = `calc(100% - ${THUMB_SIZE} - ${THUMB_INSET})`;\n\n// Elevation shadows Figma draws on the resting off-track and the thumb; no\n// elevation-* token tier exists yet, so these stay literal (contract rule 2).\nconst OFF_TRACK_ELEVATION = \"0 1px 1px rgba(0, 0, 0, 0.08)\";\nconst THUMB_ELEVATION = \"0 1px 2px rgba(0, 0, 0, 0.08)\";\n\nconst FOCUS_RING = `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`;\n\n// TOKEN GAP: disabled-on is Figma's success green under a 30% white veil, which\n// no opacity-state-* member covers (hover .08 / focus .1 / pressed .1). The shared\n// currentColor overlay is raised to a literal 0.3 here until an\n// `opacity-state-disabled` token exists (surfaced per contract rule 3).\nconst DISABLED_OVERLAY_OPACITY = 0.3;\n\n/**\n * The RAC `Switch` label. It carries the interaction `data-*` but draws nothing\n * itself — the pill is `toggleTrack`, so the same track can be hosted by a\n * `MenuItem` row instead.\n */\nexport const toggleRoot = style({\n\tdisplay: \"inline-flex\",\n\tflexShrink: 0,\n\tcursor: \"pointer\",\n\toutline: \"none\",\n\tselectors: {\n\t\t\"&[data-disabled]\": {\n\t\t\tcursor: \"not-allowed\",\n\t\t},\n\t},\n});\n\n/**\n * The pill track. Selection and interaction state are read from whichever host\n * element carries React Aria's `data-*` — the RAC `Switch` label, or a `MenuItem`\n * row — so the rules below are child selectors that name no host. `color` is the\n * inverse content color, so the `currentColor` overlay reads as a white veil over\n * the green / neutral track — matching Figma's white state overlays — with no\n * per-state plumbing.\n *\n * Interaction rules additionally require `[data-state-layer]`, which the track\n * sets only when it is the sole affordance; inside a row the row paints hover and\n * focus itself.\n */\nexport const toggleTrack = style({\n\tposition: \"relative\",\n\tisolation: \"isolate\",\n\tboxSizing: \"border-box\",\n\tdisplay: \"inline-block\",\n\tflexShrink: 0,\n\twidth: TRACK_WIDTH,\n\theight: TRACK_HEIGHT,\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: t(\"color-background-quaternary\"),\n\tcolor: t(\"color-content-inverse\"),\n\tboxShadow: OFF_TRACK_ELEVATION,\n\t\"::after\": {\n\t\tcontent: '\"\"',\n\t\tposition: \"absolute\",\n\t\tinset: 0,\n\t\tborderRadius: \"inherit\",\n\t\tbackgroundColor: \"currentColor\",\n\t\topacity: 0,\n\t\tpointerEvents: \"none\",\n\t\tzIndex: -1,\n\t},\n\tselectors: {\n\t\t// On — success-green track; the resting off-track elevation is dropped.\n\t\t\"[data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-success\"),\n\t\t\tboxShadow: \"none\",\n\t\t},\n\t\t// State layer — currentColor (white) veil at per-state opacity, off & on.\n\t\t\"[data-hovered]:not([data-disabled]) > &[data-state-layer]::after\": {\n\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t},\n\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]::after\": {\n\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t},\n\t\t\"[data-pressed]:not([data-disabled]) > &[data-state-layer]::after\": {\n\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t},\n\t\t// Focus ring — outset box-shadow so it never resizes the pill (matches\n\t\t// Checkbox/Radio); pairs with the focus veil above.\n\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\tboxShadow: FOCUS_RING,\n\t\t},\n\t\t// Disabled — off track fades to the disabled surface.\n\t\t\"[data-disabled] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\tboxShadow: \"none\",\n\t\t},\n\t\t// Disabled — on track stays green under the 30% white veil (see const above).\n\t\t\"[data-disabled][data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-success\"),\n\t\t},\n\t\t\"[data-disabled][data-selected] > &::after\": {\n\t\t\topacity: DISABLED_OVERLAY_OPACITY,\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\ttransitionProperty: \"background-color, box-shadow\",\n\t\t\ttransitionDuration: t(\"duration-fast\"),\n\t\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\tselectors: {\n\t\t\t\t\"&::after\": {\n\t\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// Token-based focus rings vanish under forced colors — redraw in a system color.\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\n/**\n * The 22px thumb. Absolutely positioned and slid by `inset-inline-start` — a\n * logical property, so it mirrors leading↔trailing under `dir=\"rtl\"` on its own,\n * with no direction prop or selector.\n */\nexport const toggleThumb = style({\n\tposition: \"absolute\",\n\tinsetBlockStart: THUMB_INSET,\n\tinsetInlineStart: THUMB_INSET,\n\twidth: THUMB_SIZE,\n\theight: THUMB_SIZE,\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: t(\"color-background-default\"),\n\tboxShadow: THUMB_ELEVATION,\n\tpointerEvents: \"none\",\n\tselectors: {\n\t\t[`[data-selected] > ${toggleTrack} > &`]: {\n\t\t\tinsetInlineStart: THUMB_TRAVEL_END,\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\ttransition: `inset-inline-start ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t},\n\t},\n});\n"],"mappings":""}
1
+ {"version":3,"file":"Toggle.css.js","names":[],"sources":["../../../src/components/Toggle/Toggle.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// Figma pins the track at a fixed 44×24 frame and the thumb at 22px with a 1px\n// inset — control-size tiers the token set doesn't expose yet (same treatment as\n// Checkbox's 24px box and Radio's control size).\nconst TRACK_WIDTH = \"44px\";\nconst TRACK_HEIGHT = \"24px\";\nconst THUMB_SIZE = \"22px\";\nconst THUMB_INSET = \"1px\";\n// Trailing rest position: full track − thumb − the trailing inset.\nconst THUMB_TRAVEL_END = `calc(100% - ${THUMB_SIZE} - ${THUMB_INSET})`;\n\n// Figma draws elevation on the resting off-track too, but its 1px blur matches no\n// elevation tier, so it stays literal (contract rule 2).\nconst OFF_TRACK_ELEVATION = \"0 1px 1px rgba(0, 0, 0, 0.08)\";\n\nconst FOCUS_RING = `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`;\n\n// TOKEN GAP: disabled-on is Figma's success green under a 30% white veil, which\n// no opacity-state-* member covers (hover .08 / focus .1 / pressed .1). The shared\n// currentColor overlay is raised to a literal 0.3 here until an\n// `opacity-state-disabled` token exists (surfaced per contract rule 3).\nconst DISABLED_OVERLAY_OPACITY = 0.3;\n\n/**\n * The RAC `Switch` label. It carries the interaction `data-*` but draws nothing\n * itself — the pill is `toggleTrack`, so the same track can be hosted by a\n * `MenuItem` row instead.\n */\nexport const toggleRoot = style({\n\tdisplay: \"inline-flex\",\n\tflexShrink: 0,\n\tcursor: \"pointer\",\n\toutline: \"none\",\n\tselectors: {\n\t\t\"&[data-disabled]\": {\n\t\t\tcursor: \"not-allowed\",\n\t\t},\n\t},\n});\n\n/**\n * The pill track. Selection and interaction state are read from whichever host\n * element carries React Aria's `data-*` — the RAC `Switch` label, or a `MenuItem`\n * row — so the rules below are child selectors that name no host. `color` is the\n * inverse content color, so the `currentColor` overlay reads as a white veil over\n * the green / neutral track — matching Figma's white state overlays — with no\n * per-state plumbing.\n *\n * Interaction rules additionally require `[data-state-layer]`, which the track\n * sets only when it is the sole affordance; inside a row the row paints hover and\n * focus itself.\n */\nexport const toggleTrack = style({\n\tposition: \"relative\",\n\tisolation: \"isolate\",\n\tboxSizing: \"border-box\",\n\tdisplay: \"inline-block\",\n\tflexShrink: 0,\n\twidth: TRACK_WIDTH,\n\theight: TRACK_HEIGHT,\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: t(\"color-background-quaternary\"),\n\tcolor: t(\"color-content-inverse\"),\n\tboxShadow: OFF_TRACK_ELEVATION,\n\t\"::after\": {\n\t\tcontent: '\"\"',\n\t\tposition: \"absolute\",\n\t\tinset: 0,\n\t\tborderRadius: \"inherit\",\n\t\tbackgroundColor: \"currentColor\",\n\t\topacity: 0,\n\t\tpointerEvents: \"none\",\n\t\tzIndex: -1,\n\t},\n\tselectors: {\n\t\t// On — success-green track; the resting off-track elevation is dropped.\n\t\t\"[data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-success\"),\n\t\t\tboxShadow: \"none\",\n\t\t},\n\t\t// State layer — currentColor (white) veil at per-state opacity, off & on.\n\t\t\"[data-hovered]:not([data-disabled]) > &[data-state-layer]::after\": {\n\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t},\n\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]::after\": {\n\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t},\n\t\t\"[data-pressed]:not([data-disabled]) > &[data-state-layer]::after\": {\n\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t},\n\t\t// Focus ring — outset box-shadow so it never resizes the pill (matches\n\t\t// Checkbox/Radio); pairs with the focus veil above.\n\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\tboxShadow: FOCUS_RING,\n\t\t},\n\t\t// Disabled — off track fades to the disabled surface.\n\t\t\"[data-disabled] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\tboxShadow: \"none\",\n\t\t},\n\t\t// Disabled — on track stays green under the 30% white veil (see const above).\n\t\t\"[data-disabled][data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-success\"),\n\t\t},\n\t\t\"[data-disabled][data-selected] > &::after\": {\n\t\t\topacity: DISABLED_OVERLAY_OPACITY,\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\ttransitionProperty: \"background-color, box-shadow\",\n\t\t\ttransitionDuration: t(\"duration-fast\"),\n\t\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\tselectors: {\n\t\t\t\t\"&::after\": {\n\t\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// Token-based focus rings vanish under forced colors — redraw in a system color.\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\n/**\n * The 22px thumb. Absolutely positioned and slid by `inset-inline-start` — a\n * logical property, so it mirrors leading↔trailing under `dir=\"rtl\"` on its own,\n * with no direction prop or selector.\n */\nexport const toggleThumb = style({\n\tposition: \"absolute\",\n\tinsetBlockStart: THUMB_INSET,\n\tinsetInlineStart: THUMB_INSET,\n\twidth: THUMB_SIZE,\n\theight: THUMB_SIZE,\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: t(\"color-background-default\"),\n\tpointerEvents: \"none\",\n\tselectors: {\n\t\t[`[data-selected] > ${toggleTrack} > &`]: {\n\t\t\tinsetInlineStart: THUMB_TRAVEL_END,\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\ttransition: `inset-inline-start ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t},\n\t},\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.css.js","names":[],"sources":["../../../src/components/Tooltip/Tooltip.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// Figma \"+2\" effect (DROP_SHADOW, color #0000000F, offset 0/4, blur 14).\n// Hardcoded because no elevation token exists in LovelaceToken yet; route\n// through t() once one is added. Applied as a filter so the shadow wraps the\n// arrow silhouette, not just the rectangular bubble.\nconst TOOLTIP_SHADOW = \"drop-shadow(0 4px 14px rgba(0, 0, 0, 0.06))\";\n\nexport const tooltip = style({\n\tboxSizing: \"border-box\",\n\tmaxWidth: \"184px\",\n\tpadding: t(\"spacing-8\"),\n\tborderRadius: t(\"border-radius-6\"),\n\tbackgroundColor: t(\"color-background-inverse\"),\n\tcolor: t(\"color-content-inverse\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-caption\"),\n\tlineHeight: t(\"line-height-caption\"),\n\ttextAlign: \"center\",\n\twordBreak: \"break-word\",\n\tfilter: TOOLTIP_SHADOW,\n\tselectors: {\n\t\t\"&[data-entering]\": { opacity: 0 },\n\t\t\"&[data-exiting]\": { opacity: 0 },\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t},\n\t},\n});\n\nexport const arrow = style({\n\tdisplay: \"block\",\n});\n\n// The triangle's apex points down (correct for a tooltip above its trigger);\n// each placement rotates it to point back at the trigger.\nexport const arrowSvg = style({\n\tdisplay: \"block\",\n\tfill: t(\"color-background-inverse\"),\n});\n\nglobalStyle(`${tooltip}[data-placement^=\"top\"] ${arrowSvg}`, {\n\ttransform: \"rotate(0deg)\",\n});\nglobalStyle(`${tooltip}[data-placement^=\"bottom\"] ${arrowSvg}`, {\n\ttransform: \"rotate(180deg)\",\n});\nglobalStyle(`${tooltip}[data-placement^=\"left\"] ${arrowSvg}`, {\n\ttransform: \"rotate(-90deg)\",\n});\nglobalStyle(`${tooltip}[data-placement^=\"right\"] ${arrowSvg}`, {\n\ttransform: \"rotate(90deg)\",\n});\n"],"mappings":""}
1
+ {"version":3,"file":"Tooltip.css.js","names":[],"sources":["../../../src/components/Tooltip/Tooltip.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// A filter, not a box-shadow, so the shadow wraps the arrow silhouette rather than\n// just the rectangular bubble.\nconst TOOLTIP_SHADOW = t(\"elevation-2-filter\");\n\nexport const tooltip = style({\n\tboxSizing: \"border-box\",\n\tmaxWidth: \"184px\",\n\tpadding: t(\"spacing-8\"),\n\tborderRadius: t(\"border-radius-6\"),\n\tbackgroundColor: t(\"color-background-inverse\"),\n\tcolor: t(\"color-content-inverse\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-caption\"),\n\tlineHeight: t(\"line-height-caption\"),\n\ttextAlign: \"center\",\n\twordBreak: \"break-word\",\n\tfilter: TOOLTIP_SHADOW,\n\tselectors: {\n\t\t\"&[data-entering]\": { opacity: 0 },\n\t\t\"&[data-exiting]\": { opacity: 0 },\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t},\n\t},\n});\n\nexport const arrow = style({\n\tdisplay: \"block\",\n});\n\n// The triangle's apex points down (correct for a tooltip above its trigger);\n// each placement rotates it to point back at the trigger.\nexport const arrowSvg = style({\n\tdisplay: \"block\",\n\tfill: t(\"color-background-inverse\"),\n});\n\nglobalStyle(`${tooltip}[data-placement^=\"top\"] ${arrowSvg}`, {\n\ttransform: \"rotate(0deg)\",\n});\nglobalStyle(`${tooltip}[data-placement^=\"bottom\"] ${arrowSvg}`, {\n\ttransform: \"rotate(180deg)\",\n});\nglobalStyle(`${tooltip}[data-placement^=\"left\"] ${arrowSvg}`, {\n\ttransform: \"rotate(-90deg)\",\n});\nglobalStyle(`${tooltip}[data-placement^=\"right\"] ${arrowSvg}`, {\n\ttransform: \"rotate(90deg)\",\n});\n"],"mappings":""}
@@ -1,3 +1,3 @@
1
- export { useRegisterOverlay } from "./overlayRegistry.js";
1
+ export { useHasOpenOverlay, useRegisterOverlay, } from "./overlayRegistry.js";
2
2
  export { readPrefersReducedMotion, usePrefersReducedMotion, } from "./usePrefersReducedMotion.js";
3
3
  export { useSubmitOnEnter } from "./useSubmitOnEnter.js";
package/dist/index.d.ts CHANGED
@@ -30,8 +30,7 @@ export * from "./components/SheetOverlay/index.js";
30
30
  export * from "./components/Spinner/index.js";
31
31
  export * from "./components/Survey/index.js";
32
32
  export * from "./components/ThinkingShimmer/index.js";
33
- export * from "./components/ToastNotification/index.js";
34
- export * from "./components/ToastRegion/index.js";
33
+ export * from "./components/Toast/index.js";
35
34
  export * from "./components/Toggle/index.js";
36
35
  export * from "./components/Tooltip/index.js";
37
36
  export * from "./components/TypingIndicator/index.js";
package/dist/index.js CHANGED
@@ -2,58 +2,58 @@ import { AgentMessage as e } from "./components/AgentMessage/AgentMessage.js";
2
2
  import { AttachmentChip as t } from "./components/AttachmentChip/AttachmentChip.js";
3
3
  import { AvatarPlaceholder as n } from "./components/Avatar/AvatarPlaceholder.js";
4
4
  import { Avatar as r } from "./components/Avatar/Avatar.js";
5
- import { readPrefersReducedMotion as i, usePrefersReducedMotion as a } from "./hooks/usePrefersReducedMotion.js";
6
- import { Icon as o } from "./components/Icon/Icon.js";
7
- import { AdaLogo as s } from "./components/Icon/icons/AdaLogo.js";
8
- import { ArrowDown as c } from "./components/Icon/icons/ArrowDown.js";
9
- import { ArrowLeft as l } from "./components/Icon/icons/ArrowLeft.js";
10
- import { ArrowNortheast as u } from "./components/Icon/icons/ArrowNortheast.js";
11
- import { ArrowNorthwest as d } from "./components/Icon/icons/ArrowNorthwest.js";
12
- import { ArrowRight as f } from "./components/Icon/icons/ArrowRight.js";
13
- import { Bell as p } from "./components/Icon/icons/Bell.js";
14
- import { BellSlash as m } from "./components/Icon/icons/BellSlash.js";
15
- import { Checkmark as h } from "./components/Icon/icons/Checkmark.js";
16
- import { ChevronLeft as g } from "./components/Icon/icons/ChevronLeft.js";
17
- import { ChevronRight as _ } from "./components/Icon/icons/ChevronRight.js";
18
- import { CloudUpload as v } from "./components/Icon/icons/CloudUpload.js";
19
- import { Document as y } from "./components/Icon/icons/Document.js";
20
- import { Download as b } from "./components/Icon/icons/Download.js";
21
- import { Ellipses as x } from "./components/Icon/icons/Ellipses.js";
22
- import { Email as S } from "./components/Icon/icons/Email.js";
23
- import { ExclamationSync as C } from "./components/Icon/icons/ExclamationSync.js";
24
- import { ExclamationTriangle as w } from "./components/Icon/icons/ExclamationTriangle.js";
25
- import { Eye as T } from "./components/Icon/icons/Eye.js";
26
- import { EyeSlash as E } from "./components/Icon/icons/EyeSlash.js";
27
- import { Language as D } from "./components/Icon/icons/Language.js";
28
- import { MediaSlash as O } from "./components/Icon/icons/MediaSlash.js";
29
- import { MessagingFill as k } from "./components/Icon/icons/MessagingFill.js";
30
- import { Minimize as A } from "./components/Icon/icons/Minimize.js";
31
- import { Mute as j } from "./components/Icon/icons/Mute.js";
32
- import { Paperclip as M } from "./components/Icon/icons/Paperclip.js";
33
- import { PersonFill as N } from "./components/Icon/icons/PersonFill.js";
34
- import { PlayFill as P } from "./components/Icon/icons/PlayFill.js";
35
- import { SendFill as F } from "./components/Icon/icons/SendFill.js";
36
- import { StarBadgeFill as I } from "./components/Icon/icons/StarBadgeFill.js";
37
- import { ThumbsDown as L } from "./components/Icon/icons/ThumbsDown.js";
38
- import { ThumbsUp as R } from "./components/Icon/icons/ThumbsUp.js";
39
- import { Volume as z } from "./components/Icon/icons/Volume.js";
40
- import { Xmark as B } from "./components/Icon/icons/Xmark.js";
41
- import { XmarkCircle as V } from "./components/Icon/icons/XmarkCircle.js";
42
- import { IconButton as H } from "./components/IconButton/IconButton.js";
43
- import { ToastNotification as U } from "./components/ToastNotification/ToastNotification.js";
44
- import { Banner as W } from "./components/Banner/Banner.js";
45
- import { useRegisterOverlay as G } from "./hooks/overlayRegistry.js";
46
- import { BubbleOverlay as K } from "./components/BubbleOverlay/BubbleOverlay.js";
47
- import { Button as q } from "./components/Button/Button.js";
48
- import { Checkbox as J } from "./components/Checkbox/Checkbox.js";
49
- import { CheckboxGroup as Y } from "./components/Checkbox/CheckboxGroup.js";
50
- import { Chip as X } from "./components/Chip/Chip.js";
51
- import { Dialog as Z } from "./components/Dialog/Dialog.js";
52
- import { DialogOverlay as Q } from "./components/DialogOverlay/DialogOverlay.js";
53
- import { Divider as $ } from "./components/Divider/Divider.js";
54
- import { DropZone as ee } from "./components/DropZone/DropZone.js";
55
- import { FullscreenOverlay as te } from "./components/FullscreenOverlay/FullscreenOverlay.js";
56
- import { Header as ne } from "./components/Header/Header.js";
5
+ import { Icon as i } from "./components/Icon/Icon.js";
6
+ import { AdaLogo as a } from "./components/Icon/icons/AdaLogo.js";
7
+ import { ArrowDown as o } from "./components/Icon/icons/ArrowDown.js";
8
+ import { ArrowLeft as s } from "./components/Icon/icons/ArrowLeft.js";
9
+ import { ArrowNortheast as c } from "./components/Icon/icons/ArrowNortheast.js";
10
+ import { ArrowNorthwest as l } from "./components/Icon/icons/ArrowNorthwest.js";
11
+ import { ArrowRight as u } from "./components/Icon/icons/ArrowRight.js";
12
+ import { Bell as d } from "./components/Icon/icons/Bell.js";
13
+ import { BellSlash as f } from "./components/Icon/icons/BellSlash.js";
14
+ import { Checkmark as p } from "./components/Icon/icons/Checkmark.js";
15
+ import { CheckmarkCircle as m } from "./components/Icon/icons/CheckmarkCircle.js";
16
+ import { ChevronLeft as h } from "./components/Icon/icons/ChevronLeft.js";
17
+ import { ChevronRight as g } from "./components/Icon/icons/ChevronRight.js";
18
+ import { CloudUpload as _ } from "./components/Icon/icons/CloudUpload.js";
19
+ import { Document as v } from "./components/Icon/icons/Document.js";
20
+ import { Download as y } from "./components/Icon/icons/Download.js";
21
+ import { Ellipses as b } from "./components/Icon/icons/Ellipses.js";
22
+ import { Email as x } from "./components/Icon/icons/Email.js";
23
+ import { ExclamationSync as S } from "./components/Icon/icons/ExclamationSync.js";
24
+ import { ExclamationTriangle as C } from "./components/Icon/icons/ExclamationTriangle.js";
25
+ import { Eye as w } from "./components/Icon/icons/Eye.js";
26
+ import { EyeSlash as T } from "./components/Icon/icons/EyeSlash.js";
27
+ import { Language as E } from "./components/Icon/icons/Language.js";
28
+ import { MediaSlash as D } from "./components/Icon/icons/MediaSlash.js";
29
+ import { MessagingFill as O } from "./components/Icon/icons/MessagingFill.js";
30
+ import { Minimize as k } from "./components/Icon/icons/Minimize.js";
31
+ import { Mute as A } from "./components/Icon/icons/Mute.js";
32
+ import { Paperclip as j } from "./components/Icon/icons/Paperclip.js";
33
+ import { PersonFill as M } from "./components/Icon/icons/PersonFill.js";
34
+ import { PlayFill as N } from "./components/Icon/icons/PlayFill.js";
35
+ import { SendFill as P } from "./components/Icon/icons/SendFill.js";
36
+ import { StarBadgeFill as F } from "./components/Icon/icons/StarBadgeFill.js";
37
+ import { ThumbsDown as I } from "./components/Icon/icons/ThumbsDown.js";
38
+ import { ThumbsUp as L } from "./components/Icon/icons/ThumbsUp.js";
39
+ import { Volume as R } from "./components/Icon/icons/Volume.js";
40
+ import { Xmark as z } from "./components/Icon/icons/Xmark.js";
41
+ import { XmarkCircle as B } from "./components/Icon/icons/XmarkCircle.js";
42
+ import { Banner as V } from "./components/Banner/Banner.js";
43
+ import { BannerContainer as H } from "./components/Banner/BannerContainer.js";
44
+ import { useHasOpenOverlay as U, useRegisterOverlay as W } from "./hooks/overlayRegistry.js";
45
+ import { BubbleOverlay as G } from "./components/BubbleOverlay/BubbleOverlay.js";
46
+ import { Button as K } from "./components/Button/Button.js";
47
+ import { Checkbox as q } from "./components/Checkbox/Checkbox.js";
48
+ import { CheckboxGroup as J } from "./components/Checkbox/CheckboxGroup.js";
49
+ import { Chip as Y } from "./components/Chip/Chip.js";
50
+ import { Dialog as X } from "./components/Dialog/Dialog.js";
51
+ import { DialogOverlay as Z } from "./components/DialogOverlay/DialogOverlay.js";
52
+ import { Divider as Q } from "./components/Divider/Divider.js";
53
+ import { DropZone as $ } from "./components/DropZone/DropZone.js";
54
+ import { FullscreenOverlay as ee } from "./components/FullscreenOverlay/FullscreenOverlay.js";
55
+ import { Header as te } from "./components/Header/Header.js";
56
+ import { IconButton as ne } from "./components/IconButton/IconButton.js";
57
57
  import { Image as re } from "./components/Image/Image.js";
58
58
  import { Input as ie } from "./components/Input/Input.js";
59
59
  import { Link as ae } from "./components/Link/Link.js";
@@ -69,18 +69,20 @@ import { RadioGroup as me } from "./components/Radio/RadioGroup.js";
69
69
  import { ScrollMarker as he } from "./components/ScrollMarker/ScrollMarker.js";
70
70
  import { Sheet as ge } from "./components/Sheet/Sheet.js";
71
71
  import { SheetOverlay as _e } from "./components/SheetOverlay/SheetOverlay.js";
72
- import { useSubmitOnEnter as ve } from "./hooks/useSubmitOnEnter.js";
73
- import { Spinner as ye } from "./components/Spinner/Spinner.js";
74
- import { SurveyRating as be } from "./components/Survey/SurveyRating/SurveyRating.js";
75
- import { SurveySelect as xe } from "./components/Survey/SurveySelect/SurveySelect.js";
76
- import { ThinkingShimmer as Se } from "./components/ThinkingShimmer/ThinkingShimmer.js";
77
- import { ToastRegion as Ce } from "./components/ToastRegion/ToastRegion.js";
78
- import { ToastQueue as we } from "./components/ToastRegion/index.js";
79
- import { Toggle as Te } from "./components/Toggle/Toggle.js";
80
- import { Tooltip as Ee, TooltipTrigger as De } from "./components/Tooltip/Tooltip.js";
81
- import { TypingIndicator as Oe } from "./components/TypingIndicator/TypingIndicator.js";
82
- import { UserMessage as ke } from "./components/UserMessage/UserMessage.js";
83
- import { VideoMessage as Ae } from "./components/VideoMessage/VideoMessage.js";
84
- import { LOVELACE_SURFACES as je, contrastRatioBetween as Me, createBrandOverrides as Ne, isLegibleAgainst as Pe, isLegibleOnSurface as Fe, readableTextOnAccent as Ie } from "./runtime/branding.js";
85
- import { LovelaceProvider as Le, useResolvedTheme as Re } from "./runtime/LovelaceProvider.js";
86
- export { s as AdaLogo, e as AgentMessage, c as ArrowDown, l as ArrowLeft, u as ArrowNortheast, d as ArrowNorthwest, f as ArrowRight, t as AttachmentChip, r as Avatar, n as AvatarPlaceholder, W as Banner, p as Bell, m as BellSlash, K as BubbleOverlay, q as Button, J as Checkbox, Y as CheckboxGroup, h as Checkmark, g as ChevronLeft, _ as ChevronRight, X as Chip, v as CloudUpload, Z as Dialog, Q as DialogOverlay, $ as Divider, y as Document, b as Download, ee as DropZone, x as Ellipses, S as Email, C as ExclamationSync, w as ExclamationTriangle, T as Eye, E as EyeSlash, te as FullscreenOverlay, ne as Header, o as Icon, H as IconButton, re as Image, ie as Input, je as LOVELACE_SURFACES, D as Language, ae as Link, Le as LovelaceProvider, O as MediaSlash, oe as Menu, se as MenuItem, ce as MessageError, le as MessageRow, k as MessagingFill, A as Minimize, j as Mute, M as Paperclip, N as PersonFill, ue as PictureMessage, de as PillButton, P as PlayFill, fe as ProactiveMessage, pe as Radio, me as RadioGroup, he as ScrollMarker, F as SendFill, ge as Sheet, _e as SheetOverlay, ye as Spinner, I as StarBadgeFill, be as SurveyRating, xe as SurveySelect, Se as ThinkingShimmer, L as ThumbsDown, R as ThumbsUp, U as ToastNotification, we as ToastQueue, Ce as ToastRegion, Te as Toggle, Ee as Tooltip, De as TooltipTrigger, Oe as TypingIndicator, ke as UserMessage, Ae as VideoMessage, z as Volume, B as Xmark, V as XmarkCircle, Me as contrastRatioBetween, Ne as createBrandOverrides, Pe as isLegibleAgainst, Fe as isLegibleOnSurface, i as readPrefersReducedMotion, Ie as readableTextOnAccent, a as usePrefersReducedMotion, G as useRegisterOverlay, Re as useResolvedTheme, ve as useSubmitOnEnter };
72
+ import { readPrefersReducedMotion as ve, usePrefersReducedMotion as ye } from "./hooks/usePrefersReducedMotion.js";
73
+ import { useSubmitOnEnter as be } from "./hooks/useSubmitOnEnter.js";
74
+ import { Spinner as xe } from "./components/Spinner/Spinner.js";
75
+ import { SurveyRating as Se } from "./components/Survey/SurveyRating/SurveyRating.js";
76
+ import { SurveySelect as Ce } from "./components/Survey/SurveySelect/SurveySelect.js";
77
+ import { ThinkingShimmer as we } from "./components/ThinkingShimmer/ThinkingShimmer.js";
78
+ import { Toast as Te } from "./components/Toast/Toast.js";
79
+ import { ToastContainer as Ee } from "./components/Toast/ToastContainer.js";
80
+ import { ToastQueue as De } from "./components/Toast/index.js";
81
+ import { Toggle as Oe } from "./components/Toggle/Toggle.js";
82
+ import { Tooltip as ke, TooltipTrigger as Ae } from "./components/Tooltip/Tooltip.js";
83
+ import { TypingIndicator as je } from "./components/TypingIndicator/TypingIndicator.js";
84
+ import { UserMessage as Me } from "./components/UserMessage/UserMessage.js";
85
+ import { VideoMessage as Ne } from "./components/VideoMessage/VideoMessage.js";
86
+ import { LOVELACE_SURFACES as Pe, contrastRatioBetween as Fe, createBrandOverrides as Ie, isLegibleAgainst as Le, isLegibleOnSurface as Re, readableTextOnAccent as ze } from "./runtime/branding.js";
87
+ import { LovelaceProvider as Be, useResolvedTheme as Ve } from "./runtime/LovelaceProvider.js";
88
+ export { a as AdaLogo, e as AgentMessage, o as ArrowDown, s as ArrowLeft, c as ArrowNortheast, l as ArrowNorthwest, u as ArrowRight, t as AttachmentChip, r as Avatar, n as AvatarPlaceholder, V as Banner, H as BannerContainer, d as Bell, f as BellSlash, G as BubbleOverlay, K as Button, q as Checkbox, J as CheckboxGroup, p as Checkmark, m as CheckmarkCircle, h as ChevronLeft, g as ChevronRight, Y as Chip, _ as CloudUpload, X as Dialog, Z as DialogOverlay, Q as Divider, v as Document, y as Download, $ as DropZone, b as Ellipses, x as Email, S as ExclamationSync, C as ExclamationTriangle, w as Eye, T as EyeSlash, ee as FullscreenOverlay, te as Header, i as Icon, ne as IconButton, re as Image, ie as Input, Pe as LOVELACE_SURFACES, E as Language, ae as Link, Be as LovelaceProvider, D as MediaSlash, oe as Menu, se as MenuItem, ce as MessageError, le as MessageRow, O as MessagingFill, k as Minimize, A as Mute, j as Paperclip, M as PersonFill, ue as PictureMessage, de as PillButton, N as PlayFill, fe as ProactiveMessage, pe as Radio, me as RadioGroup, he as ScrollMarker, P as SendFill, ge as Sheet, _e as SheetOverlay, xe as Spinner, F as StarBadgeFill, Se as SurveyRating, Ce as SurveySelect, we as ThinkingShimmer, I as ThumbsDown, L as ThumbsUp, Te as Toast, Ee as ToastContainer, De as ToastQueue, Oe as Toggle, ke as Tooltip, Ae as TooltipTrigger, je as TypingIndicator, Me as UserMessage, Ne as VideoMessage, R as Volume, z as Xmark, B as XmarkCircle, Fe as contrastRatioBetween, Ie as createBrandOverrides, Le as isLegibleAgainst, Re as isLegibleOnSurface, ve as readPrefersReducedMotion, ze as readableTextOnAccent, U as useHasOpenOverlay, ye as usePrefersReducedMotion, W as useRegisterOverlay, Ve as useResolvedTheme, be as useSubmitOnEnter };