@photon-ai/pho-ui 4.25.0 → 4.27.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/README.md +2 -2
- package/dist/chunks/{avatar-PgBOfszL.js → avatar-BJvgi8ON.js} +24 -30
- package/dist/chunks/avatar-BJvgi8ON.js.map +1 -0
- package/dist/chunks/{basic-page-DYBjCadG.js → basic-page-DSPzDKrZ.js} +80 -83
- package/dist/chunks/basic-page-DSPzDKrZ.js.map +1 -0
- package/dist/chunks/{box-search-CMl5bQ7Y.js → box-search-DD2EPtDy.js} +18 -19
- package/dist/chunks/box-search-DD2EPtDy.js.map +1 -0
- package/dist/chunks/{calendar-DDWITGo4.js → calendar-s-QRks1Z.js} +66 -69
- package/dist/chunks/calendar-s-QRks1Z.js.map +1 -0
- package/dist/chunks/{chat-D98GCjbe.js → chat-D6SGRahp.js} +226 -276
- package/dist/chunks/chat-D6SGRahp.js.map +1 -0
- package/dist/chunks/{checkbox-D8smFViR.js → checkbox-B3fVczYP.js} +2 -2
- package/dist/chunks/checkbox-B3fVczYP.js.map +1 -0
- package/dist/chunks/{close-button-Ck4rY1Fp.js → close-button-Bwv_OoCZ.js} +2 -2
- package/dist/chunks/close-button-Bwv_OoCZ.js.map +1 -0
- package/dist/chunks/{code-block-CthLWfxd.js → code-block-CiZWZBO2.js} +169 -238
- package/dist/chunks/code-block-CiZWZBO2.js.map +1 -0
- package/dist/chunks/copy-button-DNNZu6r4.js +69 -0
- package/dist/chunks/copy-button-DNNZu6r4.js.map +1 -0
- package/dist/chunks/{data-table-C1tLUdw0.js → data-table-CshUlqIu.js} +11 -12
- package/dist/chunks/data-table-CshUlqIu.js.map +1 -0
- package/dist/chunks/{date-picker-D-sWo3i8.js → date-picker-BaAkim2u.js} +126 -151
- package/dist/chunks/date-picker-BaAkim2u.js.map +1 -0
- package/dist/chunks/{description-list-DcTvBHzI.js → description-list-VTNz1MmJ.js} +2 -2
- package/dist/chunks/{description-list-DcTvBHzI.js.map → description-list-VTNz1MmJ.js.map} +1 -1
- package/dist/chunks/{dialog-H72fZGtf.js → dialog-C116Qr0w.js} +2 -2
- package/dist/chunks/{dialog-H72fZGtf.js.map → dialog-C116Qr0w.js.map} +1 -1
- package/dist/chunks/{filter-bar-D_sBAT5Y.js → filter-bar-DI5JO1Cd.js} +63 -72
- package/dist/chunks/filter-bar-DI5JO1Cd.js.map +1 -0
- package/dist/chunks/{ghost-search-CMUI2UH0.js → ghost-search-DhADxaWi.js} +11 -12
- package/dist/chunks/ghost-search-DhADxaWi.js.map +1 -0
- package/dist/chunks/icons-eq5FZ3Yc.js +1254 -0
- package/dist/chunks/icons-eq5FZ3Yc.js.map +1 -0
- package/dist/chunks/{input-DWnb33UF.js → input-hrrPhzXp.js} +37 -56
- package/dist/chunks/input-hrrPhzXp.js.map +1 -0
- package/dist/chunks/{select-Dux2SBVc.js → select-DlyDd7AB.js} +10 -10
- package/dist/chunks/select-DlyDd7AB.js.map +1 -0
- package/dist/chunks/{sidebar-ttBkgGRh.js → sidebar-DTRcoxrB.js} +95 -111
- package/dist/chunks/sidebar-DTRcoxrB.js.map +1 -0
- package/dist/chunks/{toast-Cbnn8lcA.js → toast-Btwu5Kjk.js} +7 -7
- package/dist/chunks/toast-Btwu5Kjk.js.map +1 -0
- package/dist/chunks/{trace-ClMpG82z.js → trace-CKYAff2U.js} +498 -607
- package/dist/chunks/trace-CKYAff2U.js.map +1 -0
- package/dist/components/avatar.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/chat.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code-block.js +1 -1
- package/dist/components/command.js +36 -37
- package/dist/components/command.js.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.js +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/description-list.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/error.js +252 -11
- package/dist/components/error.js.map +1 -0
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/notification.js +27 -34
- package/dist/components/notification.js.map +1 -1
- package/dist/components/phone-input.js +3 -4
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/scope.js +52 -53
- package/dist/components/scope.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/theme-toggle.js +69 -95
- package/dist/components/theme-toggle.js.map +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/trace.js +1 -1
- package/dist/icons.js +235 -78
- package/dist/icons.js.map +1 -1
- package/dist/index.js +158 -158
- package/dist/sections/basic-page.js +2 -2
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/avatar/avatar.d.ts +1 -1
- package/dist/src/components/notification/notification.d.ts +2 -2
- package/dist/src/components/trace/decorations.d.ts +3 -3
- package/dist/src/icons/index.d.ts +1 -0
- package/dist/src/icons/photon/icons.d.ts +315 -0
- package/dist/src/icons/photon/index.d.ts +2 -0
- package/dist/src/icons/photon/photon-icon.d.ts +51 -0
- package/package.json +5 -3
- package/src/styles/fonts.css +2 -1
- package/src/styles/theme.css +3 -1
- package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js +0 -14
- package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js.map +0 -1
- package/dist/chunks/IconCheck-DwSMn1wK.js +0 -11
- package/dist/chunks/IconCheck-DwSMn1wK.js.map +0 -1
- package/dist/chunks/IconChevronDown-Cd68NnX2.js +0 -11
- package/dist/chunks/IconChevronDown-Cd68NnX2.js.map +0 -1
- package/dist/chunks/IconChevronLeft-CptqhdxO.js +0 -11
- package/dist/chunks/IconChevronLeft-CptqhdxO.js.map +0 -1
- package/dist/chunks/IconChevronRight-BNkXCTk6.js +0 -11
- package/dist/chunks/IconChevronRight-BNkXCTk6.js.map +0 -1
- package/dist/chunks/IconChevronUp-Bxllwz8J.js +0 -11
- package/dist/chunks/IconChevronUp-Bxllwz8J.js.map +0 -1
- package/dist/chunks/IconInfoCircle-CTAynhe8.js +0 -21
- package/dist/chunks/IconInfoCircle-CTAynhe8.js.map +0 -1
- package/dist/chunks/IconSearch-DkcWWZ1H.js +0 -14
- package/dist/chunks/IconSearch-DkcWWZ1H.js.map +0 -1
- package/dist/chunks/IconX-DnPlFC68.js +0 -14
- package/dist/chunks/IconX-DnPlFC68.js.map +0 -1
- package/dist/chunks/avatar-PgBOfszL.js.map +0 -1
- package/dist/chunks/basic-page-DYBjCadG.js.map +0 -1
- package/dist/chunks/box-search-CMl5bQ7Y.js.map +0 -1
- package/dist/chunks/calendar-DDWITGo4.js.map +0 -1
- package/dist/chunks/chat-D98GCjbe.js.map +0 -1
- package/dist/chunks/checkbox-D8smFViR.js.map +0 -1
- package/dist/chunks/close-button-Ck4rY1Fp.js.map +0 -1
- package/dist/chunks/code-block-CthLWfxd.js.map +0 -1
- package/dist/chunks/copy-button-BLvirhXk.js +0 -76
- package/dist/chunks/copy-button-BLvirhXk.js.map +0 -1
- package/dist/chunks/data-table-C1tLUdw0.js.map +0 -1
- package/dist/chunks/date-picker-D-sWo3i8.js.map +0 -1
- package/dist/chunks/error-BT71wcUd.js +0 -270
- package/dist/chunks/error-BT71wcUd.js.map +0 -1
- package/dist/chunks/filter-bar-D_sBAT5Y.js.map +0 -1
- package/dist/chunks/ghost-search-CMUI2UH0.js.map +0 -1
- package/dist/chunks/input-DWnb33UF.js.map +0 -1
- package/dist/chunks/select-Dux2SBVc.js.map +0 -1
- package/dist/chunks/sidebar-ttBkgGRh.js.map +0 -1
- package/dist/chunks/toast-Cbnn8lcA.js.map +0 -1
- package/dist/chunks/trace-ClMpG82z.js.map +0 -1
|
@@ -3,18 +3,18 @@ import { t as n } from "./cn-CPbhpG1q.js";
|
|
|
3
3
|
import { FADE_SWAP as y } from "../motion.js";
|
|
4
4
|
import { n as _ } from "./spinner-BSutFL4l.js";
|
|
5
5
|
import { a as b } from "./button-KM0lAQ4x.js";
|
|
6
|
+
import { L as w } from "./icons-eq5FZ3Yc.js";
|
|
6
7
|
import { t as s } from "./createReactComponent-yKZn9MIX.js";
|
|
7
|
-
import { t as w } from "./IconX-DnPlFC68.js";
|
|
8
8
|
import { t as k } from "./IconAlertTriangleFilled-QV-gsVQW.js";
|
|
9
9
|
import { n as T } from "./scroll-area-DjdSnx2p.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
12
|
-
import { AnimatePresence as z, motion as
|
|
12
|
+
import { AnimatePresence as z, motion as C, useReducedMotion as N } from "motion/react";
|
|
13
13
|
import { Toast as o } from "@base-ui/react/toast";
|
|
14
|
-
var
|
|
14
|
+
var A = [["path", {
|
|
15
15
|
d: "M14.897 1a4 4 0 0 1 2.664 1.016l.165 .156l4.1 4.1a4 4 0 0 1 1.168 2.605l.006 .227v5.794a4 4 0 0 1 -1.016 2.664l-.156 .165l-4.1 4.1a4 4 0 0 1 -2.603 1.168l-.227 .006h-5.795a3.999 3.999 0 0 1 -2.664 -1.017l-.165 -.156l-4.1 -4.1a4 4 0 0 1 -1.168 -2.604l-.006 -.227v-5.794a4 4 0 0 1 1.016 -2.664l.156 -.165l4.1 -4.1a4 4 0 0 1 2.605 -1.168l.227 -.006h5.793zm-2.887 14l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",
|
|
16
16
|
key: "svg-0"
|
|
17
|
-
}]], P = s("filled", "alert-octagon-filled", "AlertOctagonFilled",
|
|
17
|
+
}]], P = s("filled", "alert-octagon-filled", "AlertOctagonFilled", A), M = [["path", {
|
|
18
18
|
d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z",
|
|
19
19
|
key: "svg-0"
|
|
20
20
|
}]], F = s("filled", "circle-check-filled", "CircleCheckFilled", M), I = [["path", {
|
|
@@ -82,7 +82,7 @@ function D({ type: a }) {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
function j() {
|
|
85
|
-
const { toasts: a, close: e } = o.useToastManager(), l =
|
|
85
|
+
const { toasts: a, close: e } = o.useToastManager(), l = N() ? "blur(0px)" : `blur(${T}px)`;
|
|
86
86
|
return a.map((r) => /* @__PURE__ */ i(h, {
|
|
87
87
|
toast: r,
|
|
88
88
|
children: [
|
|
@@ -94,7 +94,7 @@ function j() {
|
|
|
94
94
|
className: "grid",
|
|
95
95
|
children: /* @__PURE__ */ t(z, {
|
|
96
96
|
initial: !1,
|
|
97
|
-
children: /* @__PURE__ */ i(
|
|
97
|
+
children: /* @__PURE__ */ i(C.div, {
|
|
98
98
|
className: "flex min-w-0 flex-col [grid-area:1/1]",
|
|
99
99
|
initial: {
|
|
100
100
|
opacity: 0,
|
|
@@ -160,4 +160,4 @@ export {
|
|
|
160
160
|
tt as t
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
//# sourceMappingURL=toast-
|
|
163
|
+
//# sourceMappingURL=toast-Btwu5Kjk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-Btwu5Kjk.js","names":["__iconNode","__iconNode","BaseToast","Toast","cn","FADE_SWAP","Spinner","Button","CloseIcon","createReactComponent","IconAlertTriangleFilled","BLUR_MAX_PX","jsx","jsxs","AnimatePresence","motion","useReducedMotion","Toast","__iconNode$2","IconAlertOctagonFilled","__iconNode$1","IconCircleCheckFilled","__iconNode","IconInfoCircleFilled","FACE_SWAP","Provider","Portal","Action","useToastManager","createToastManager","TOAST_ICONS","TOAST_WASH","Viewport","className","props","Root","Content","Title","Description","Close","TypeIcon","type","Glyph","ToastyList","toasts","close","blurAway","toast","event","Toasty","children","toastManager","Toast$1"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertOctagonFilled.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheckFilled.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircleFilled.mjs","../../src/components/toast/toast.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.49.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M14.897 1a4 4 0 0 1 2.664 1.016l.165 .156l4.1 4.1a4 4 0 0 1 1.168 2.605l.006 .227v5.794a4 4 0 0 1 -1.016 2.664l-.156 .165l-4.1 4.1a4 4 0 0 1 -2.603 1.168l-.227 .006h-5.795a3.999 3.999 0 0 1 -2.664 -1.017l-.165 -.156l-4.1 -4.1a4 4 0 0 1 -1.168 -2.604l-.006 -.227v-5.794a4 4 0 0 1 1.016 -2.664l.156 -.165l4.1 -4.1a4 4 0 0 1 2.605 -1.168l.227 -.006h5.793zm-2.887 14l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z\", \"key\": \"svg-0\" }]];\nconst IconAlertOctagonFilled = createReactComponent(\"filled\", \"alert-octagon-filled\", \"AlertOctagonFilled\", __iconNode);\n\nexport { __iconNode, IconAlertOctagonFilled as default };\n","/**\n * @license @tabler/icons-react v3.49.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z\", \"key\": \"svg-0\" }]];\nconst IconCircleCheckFilled = createReactComponent(\"filled\", \"circle-check-filled\", \"CircleCheckFilled\", __iconNode);\n\nexport { __iconNode, IconCircleCheckFilled as default };\n","/**\n * @license @tabler/icons-react v3.49.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z\", \"key\": \"svg-0\" }]];\nconst IconInfoCircleFilled = createReactComponent(\"filled\", \"info-circle-filled\", \"InfoCircleFilled\", __iconNode);\n\nexport { __iconNode, IconInfoCircleFilled as default };\n","import { type ComponentProps, type ElementType, type ReactNode } from \"react\";\nimport { FADE_SWAP } from \"../../motion\";\nimport { Toast as BaseToast } from \"@base-ui/react/toast\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport {\n IconAlertOctagonFilled,\n IconAlertTriangleFilled,\n IconCircleCheckFilled,\n IconInfoCircleFilled,\n type Icon,\n} from \"@tabler/icons-react\";\nimport { CloseIcon } from \"../../icons/photon\";\nimport { BLUR_MAX_PX } from \"../scroll-area\";\nimport { Button } from \"../button\";\nimport { Spinner } from \"../spinner\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** The system's swap: fade through the 1px soft focus, ease-out. */\nconst FACE_SWAP = FADE_SWAP;\n\nconst Provider = BaseToast.Provider;\nconst Portal = BaseToast.Portal;\nconst Action = BaseToast.Action;\n\n/** Imperative toast API: `const toast = useToastManager(); toast.add({ title })`. */\nconst useToastManager = BaseToast.useToastManager;\nconst createToastManager = BaseToast.createToastManager;\n\n/**\n * Status glyphs per toast `type` (Kumo's set in Tabler's hand): the glyph\n * and the title take the status ink, the hairline tints with it, and a\n * translucent wash of the same ink sits over the surface. `info` speaks\n * in the brand ink — Pho has no separate info hue. `loading` is what\n * `manager.promise` shows while the work runs.\n */\nconst TOAST_ICONS: Record<string, Icon> = {\n success: IconCircleCheckFilled,\n error: IconAlertOctagonFilled,\n warning: IconAlertTriangleFilled,\n info: IconInfoCircleFilled,\n};\n\nconst TOAST_WASH: Record<string, string> = {\n success:\n \"bg-[color-mix(in_oklab,var(--text-color-pho-success)_7%,transparent)]\",\n error: \"bg-[color-mix(in_oklab,var(--text-color-pho-error)_7%,transparent)]\",\n warning:\n \"bg-[color-mix(in_oklab,var(--text-color-pho-warning)_7%,transparent)]\",\n info: \"bg-[color-mix(in_oklab,var(--text-color-pho-brand)_7%,transparent)]\",\n};\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseToast.Viewport>) {\n return (\n <BaseToast.Viewport\n // The stack's anchor box; the cards position themselves absolutely\n // against its bottom edge, and hovering any card expands the stack.\n className={cn(\n \"fixed right-4 bottom-4 z-50 flex w-[calc(100%-2rem)] outline-none sm:w-[22rem]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseToast.Root>) {\n return (\n <BaseToast.Root\n className={cn(\n // Floating layer: keeps its elevation shadow, sits on the card surface\n // with the site hairline (ring-pho-secondary).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base absolute right-0 bottom-0 w-full origin-bottom ring-1 select-none ring-inset\",\n // Kumo's stack math on Base UI's variables: a 12px gap folded into\n // the expanded offsets, a 12px peek and −10% scale per depth at\n // rest, the newest card on top.\n \"[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]\",\n \"[--offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--gap)*-1+var(--toast-swipe-movement-y,0px))]\",\n \"[z-index:calc(1000-var(--toast-index))] h-[var(--height)]\",\n \"[transform:translateX(var(--toast-swipe-movement-x,0px))_translateY(calc(var(--toast-swipe-movement-y,0px)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))]\",\n \"[transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s,box-shadow_0.2s_ease-out]\",\n // Invisible bridge below each card so the hover survives the gaps.\n \"after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']\",\n // Hovering (or focusing) the stack expands it into a true list.\n \"data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x,0px))_translateY(var(--offset-y))]\",\n // Beyond the provider's limit a card parks invisibly until room frees.\n \"data-[limited]:opacity-0\",\n // In from below; out along the swipe, or back down when timed out.\n \"data-[starting-style]:[transform:translateY(150%)]\",\n \"data-[ending-style]:opacity-0\",\n \"[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)+150%))]\",\n \"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)-150%))_translateY(var(--offset-y))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)+150%))_translateY(var(--offset-y))]\",\n \"data-[swiping]:[transition:none]\",\n // Status inks: hairline, glyph, and title tint together per type.\n \"data-[type=success]:[&_[data-toast-icon]]:text-pho-success data-[type=success]:[&_[data-toast-title]]:text-pho-success data-[type=success]:[&_[data-toast-action]]:text-pho-success data-[type=success]:[&_[data-toast-close]]:text-pho-success data-[type=success]:ring-[color-mix(in_oklab,var(--text-color-pho-success)_45%,transparent)] data-[type=success]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-success)_45%,transparent)]\",\n \"data-[type=error]:[&_[data-toast-icon]]:text-pho-error data-[type=error]:[&_[data-toast-title]]:text-pho-error data-[type=error]:[&_[data-toast-action]]:text-pho-error data-[type=error]:[&_[data-toast-close]]:text-pho-error data-[type=error]:ring-[color-mix(in_oklab,var(--text-color-pho-error)_45%,transparent)] data-[type=error]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-error)_45%,transparent)]\",\n \"data-[type=warning]:[&_[data-toast-icon]]:text-pho-warning data-[type=warning]:[&_[data-toast-title]]:text-pho-warning data-[type=warning]:[&_[data-toast-action]]:text-pho-warning data-[type=warning]:[&_[data-toast-close]]:text-pho-warning data-[type=warning]:ring-[color-mix(in_oklab,var(--text-color-pho-warning)_45%,transparent)] data-[type=warning]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-warning)_45%,transparent)]\",\n \"data-[type=info]:[&_[data-toast-icon]]:text-pho-brand data-[type=info]:[&_[data-toast-title]]:text-pho-brand data-[type=info]:[&_[data-toast-action]]:text-pho-brand data-[type=info]:[&_[data-toast-close]]:text-pho-brand data-[type=info]:ring-[color-mix(in_oklab,var(--text-color-pho-brand)_45%,transparent)] data-[type=info]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-brand)_45%,transparent)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Content({\n className,\n ...props\n}: StyledProps<typeof BaseToast.Content>) {\n return (\n <BaseToast.Content\n // Cards behind the front one show only their peeking edge — the\n // words appear when the stack expands.\n className={cn(\n \"isolate flex flex-col p-4 pr-10 transition-opacity [transition-duration:250ms]\",\n \"data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseToast.Title>) {\n return (\n <BaseToast.Title\n data-toast-title\n className={cn(\n \"text-pho-primary font-heading text-md font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseToast.Description>) {\n return (\n <BaseToast.Description\n className={cn(\"text-pho-description text-md\", className)}\n {...props}\n />\n );\n}\n\nfunction Close({ className, ...props }: StyledProps<typeof BaseToast.Close>) {\n return (\n <BaseToast.Close\n data-toast-close\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover hover:bg-pho-ghost-hover outline-pho-brand absolute top-2.5 right-2.5 flex size-6 cursor-pointer items-center justify-center rounded-sm transition focus-visible:outline-2 [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * The status glyph for a typed toast — its own row above the title, the\n * Dialog header's arrangement at card scale, an 8px breath before the\n * title. `loading` shows the spinner.\n */\nfunction TypeIcon({ type }: { type?: string }) {\n if (type === \"loading\") {\n return <Spinner aria-hidden className=\"mb-2 size-6 shrink-0\" />;\n }\n const Glyph = type != null ? TOAST_ICONS[type] : undefined;\n if (Glyph == null) return null;\n return <Glyph aria-hidden data-toast-icon className=\"mb-2 size-6 shrink-0\" />;\n}\n\nfunction ToastyList() {\n const { toasts, close } = BaseToast.useToastManager();\n const reduceMotion = useReducedMotion();\n const blurAway = reduceMotion ? \"blur(0px)\" : `blur(${BLUR_MAX_PX}px)`;\n return toasts.map((toast) => (\n <Root key={toast.id} toast={toast}>\n {/* The status wash: a breath of the status ink over the surface. */}\n <div\n aria-hidden\n className={cn(\n \"pointer-events-none absolute inset-0 rounded-[inherit] transition-colors duration-200 ease-out\",\n toast.type != null ? TOAST_WASH[toast.type] : undefined,\n )}\n />\n <Content>\n {/* One grid cell, faces stacked: when a promise walks the card\n from loading to its outcome, the old face fades out through\n the system's soft focus exactly where the new one fades in —\n the values ride each face, so the goer keeps its words. */}\n <span className=\"grid\">\n <AnimatePresence initial={false}>\n <motion.div\n key={`${toast.type ?? \"\"}|${String(toast.title ?? \"\")}`}\n className=\"flex min-w-0 flex-col [grid-area:1/1]\"\n initial={{ opacity: 0, filter: blurAway }}\n animate={{ opacity: 1, filter: \"blur(0px)\" }}\n exit={{ opacity: 0, filter: blurAway }}\n transition={FACE_SWAP}\n >\n <TypeIcon type={toast.type} />\n <Title>{toast.title}</Title>\n <Description>{toast.description}</Description>\n {toast.actionProps != null ? (\n <Action\n data-toast-action\n render={<Button variant=\"outlined\" size=\"sm\" />}\n className=\"mt-2 self-start\"\n onClick={(event) => {\n toast.actionProps?.onClick?.(event);\n close(toast.id);\n }}\n >\n {toast.actionProps.children}\n </Action>\n ) : null}\n </motion.div>\n </AnimatePresence>\n </span>\n </Content>\n <Close aria-label=\"Dismiss\">\n <CloseIcon />\n </Close>\n </Root>\n ));\n}\n\n/**\n * Toasty — the whole toast system in one wrapper, Kumo-shaped: provider,\n * portal, viewport, and the stacked card list with status variants. Wrap\n * the app once and call `Toast.useToastManager().add({ title, type })`\n * from any child; pass a `toastManager` from `createToastManager()` so\n * code outside the tree (a form's auto-save, a query cache) can speak\n * through the same lane. `manager.promise` shows loading → success/error\n * with the matching glyphs.\n */\nexport function Toasty({\n children,\n toastManager,\n}: {\n children?: ReactNode;\n toastManager?: ComponentProps<typeof BaseToast.Provider>[\"toastManager\"];\n}) {\n return (\n <Provider toastManager={toastManager}>\n {children}\n <Portal>\n <Viewport>\n <ToastyList />\n </Viewport>\n </Portal>\n </Provider>\n );\n}\n\n/**\n * Toast built on Base UI `Toast` — transient, non-blocking notifications\n * in a sonner-style stack, styled after Cloudflare's Kumo: at rest the\n * cards collapse into a peek (12px rise and −10% scale per depth, words\n * hidden behind the front card), expand into a true list with a 12px gap\n * on hover or focus, swipe to dismiss, three visible at most. `type`\n * (`success` / `error` / `warning` / `info` / `loading`) tints hairline,\n * glyph, and title together. Reach for `Toasty` unless you need to\n * compose the parts yourself.\n */\nexport const Toast = {\n Provider,\n Portal,\n Viewport,\n Root,\n Content,\n Title,\n Description,\n Close,\n Action,\n useToastManager,\n createToastManager,\n};\n"],"ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;AASA,IAAMA,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAujB,KAAO;AAAQ,CAAC,CAAC,GACtmBmB,IAAyBV,EAAqB,UAAU,wBAAwB,sBAAsBT,CAAU,GCDhHC,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAgS,KAAO;AAAQ,CAAC,CAAC,GAC/UoB,IAAwBZ,EAAqB,UAAU,uBAAuB,qBAAqBR,CAAU,GCD7GqB,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAA6b,KAAO;AAAQ,CAAC,CAAC,GAC5eC,IAAuBd,EAAqB,UAAU,sBAAsB,oBAAoBa,CAAU,GCgB1GE,IAAYn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