raft-ui 0.0.9 → 0.0.10

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/dist/index.mjs CHANGED
@@ -2,16 +2,17 @@ import { cn } from "./cn.mjs";
2
2
  import { a as useThemeFamily, c as tv, i as useTheme, n as buttonVariants, o as ThemeContext, r as Spinner, s as ThemeStateContext, t as Button } from "./button-jUlaK4eN.mjs";
3
3
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
4
4
  import { AlertTriangle, Check, CheckCircle2, ChevronDown, Copy, Info, Minus, X } from "lucide-react";
5
- import { createContext, use, useCallback, useContext, useEffect, useId, useMemo, useState, useSyncExternalStore } from "react";
5
+ import { cloneElement, createContext, isValidElement, use, useCallback, useContext, useEffect, useId, useMemo, useState, useSyncExternalStore } from "react";
6
6
  import { mergeProps } from "@base-ui/react/merge-props";
7
7
  import { useRender } from "@base-ui/react/use-render";
8
- import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useClipboard } from "foxact/use-clipboard";
10
10
  import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
11
11
  import { Avatar as Avatar$1, ContextMenu as ContextMenu$1 } from "@base-ui/react";
12
12
  import { Menu } from "@base-ui/react/menu";
13
13
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
14
14
  import { Popover as Popover$1 } from "@base-ui/react/popover";
15
+ import { PreviewCard as PreviewCard$1 } from "@base-ui/react/preview-card";
15
16
  import { Input as Input$1 } from "@base-ui/react/input";
16
17
  import { Field as Field$1 } from "@base-ui/react/field";
17
18
  import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
@@ -19,6 +20,8 @@ import { Select as Select$1 } from "@base-ui/react/select";
19
20
  import { Radio } from "@base-ui/react/radio";
20
21
  import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
21
22
  import { Switch as Switch$1 } from "@base-ui/react/switch";
23
+ import { Progress as Progress$1 } from "@base-ui/react/progress";
24
+ import { Toast } from "@base-ui/react/toast";
22
25
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
23
26
  import { DndContext, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
24
27
  import { SortableContext, arrayMove, horizontalListSortingStrategy, useSortable } from "@dnd-kit/sortable";
@@ -1792,60 +1795,52 @@ const tooltip = tv({
1792
1795
  trigger: ["select-none"],
1793
1796
  positioner: ["isolate z-50 outline-none"],
1794
1797
  content: [
1795
- "relative inline-flex max-w-xs items-center gap-1.5 px-3 py-2",
1796
- "text-[13px] leading-[18px] whitespace-normal",
1798
+ "relative inline-block max-w-[min(20rem,var(--available-width,20rem))] min-w-0 px-3 py-2",
1799
+ "text-[13px] leading-[18px] whitespace-normal break-words",
1797
1800
  "origin-[var(--transform-origin)] outline-none",
1798
- "transition-[opacity,transform] duration-100",
1799
- "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
1800
- "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
1801
+ "transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)]",
1802
+ "data-[starting-style]:scale-[0.97] data-[starting-style]:opacity-0",
1803
+ "data-[ending-style]:scale-[0.99] data-[ending-style]:opacity-0",
1801
1804
  "data-[instant]:transition-none",
1802
- "[&>svg]:size-3.5 [&>svg]:shrink-0",
1805
+ "motion-reduce:transition-none",
1806
+ "[&>svg]:mr-1.5 [&>svg]:inline-block [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:align-[-0.125em]",
1803
1807
  "has-[[data-slot=kbd]]:py-1.5 has-[[data-slot=kbd]]:pr-1.5",
1804
- "[&_[data-slot=kbd]]:relative [&_[data-slot=kbd]]:z-10",
1808
+ "[&_[data-slot=kbd]]:relative [&_[data-slot=kbd]]:z-10 [&_[data-slot=kbd]]:ml-1.5",
1805
1809
  "[&_[data-slot=kbd]]:h-4 [&_[data-slot=kbd]]:min-w-4 [&_[data-slot=kbd]]:px-1 [&_[data-slot=kbd]]:py-0",
1806
1810
  "[&_[data-slot=kbd]]:text-[10px] [&_[data-slot=kbd]]:font-semibold [&_[data-slot=kbd]]:leading-none"
1807
1811
  ],
1808
1812
  arrow: [
1809
- "pointer-events-none flex",
1810
- "data-[side=top]:bottom-[-6px]",
1811
- "data-[side=bottom]:top-[-6px] data-[side=bottom]:rotate-180",
1813
+ "pointer-events-none flex overflow-visible",
1814
+ "data-[side=top]:bottom-[-5px]",
1815
+ "data-[side=bottom]:top-[-5px] data-[side=bottom]:rotate-180",
1812
1816
  "data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
1813
1817
  "data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
1814
1818
  "data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
1815
1819
  "data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
1816
1820
  ]
1817
1821
  },
1818
- variants: {
1819
- theme: {
1820
- brutal: {
1821
- content: [
1822
- "border-2 border-black bg-white",
1823
- "font-sans font-bold text-black",
1824
- "shadow-none",
1825
- "[&_[data-slot=kbd]]:text-black/60"
1826
- ],
1827
- arrow: ["hidden"]
1828
- },
1829
- elegant: {
1830
- content: [
1831
- "rounded-md bg-layer-popover",
1832
- "font-sans text-[13px] font-medium tracking-[-0.005em] text-foreground-strong",
1833
- "shadow-[0_0_0_1px_oklch(0.21_0.006_285_/_0.10),0_1px_1px_oklch(0.21_0.006_285_/_0.04),0_1px_4px_-3px_oklch(0.21_0.006_285_/_0.10)]",
1834
- "[&_[data-slot=kbd]]:bg-foreground-muted/10 [&_[data-slot=kbd]]:text-foreground-muted [&_[data-slot=kbd]]:ring-0"
1835
- ],
1836
- arrow: []
1837
- }
1822
+ variants: { theme: {
1823
+ brutal: {
1824
+ content: [
1825
+ "border-2 border-black bg-soft-signal",
1826
+ "font-sans font-bold text-black",
1827
+ "shadow-[var(--shadow-brutal-sm)]",
1828
+ "[&_[data-slot=kbd]]:border-black/70 [&_[data-slot=kbd]]:bg-white [&_[data-slot=kbd]]:text-black/70 [&_[data-slot=kbd]]:ring-0"
1829
+ ],
1830
+ arrow: ["hidden"]
1838
1831
  },
1839
- variant: {
1840
- default: {},
1841
- inverse: { content: [
1842
- "bg-foreground-strong text-foreground-inverse",
1843
- "!shadow-[0_12px_24px_0_oklch(0.21_0.006_285_/_0.045),0_1px_2px_0_oklch(0.21_0.006_285_/_0.035)]",
1844
- "[&_[data-slot=kbd]]:bg-white/10 [&_[data-slot=kbd]]:text-foreground-inverse [&_[data-slot=kbd]]:ring-0"
1845
- ] }
1832
+ elegant: {
1833
+ content: [
1834
+ "rounded-xl bg-[oklch(0.263_0.009_294.9)] text-[oklch(0.965_0.002_286)]",
1835
+ "font-sans text-[13px] font-medium tracking-[-0.005em]",
1836
+ "shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.54)]",
1837
+ "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-white/35 after:mix-blend-overlay after:content-['']",
1838
+ "dark:bg-[oklch(0.230_0.010_294.8)] dark:shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.68)]",
1839
+ "[&_[data-slot=kbd]]:bg-white/[0.08] [&_[data-slot=kbd]]:text-white/72 [&_[data-slot=kbd]]:ring-0"
1840
+ ],
1841
+ arrow: []
1846
1842
  }
1847
- },
1848
- defaultVariants: { variant: "default" }
1843
+ } }
1849
1844
  });
1850
1845
  function TooltipProvider({ delay = 0, ...props }) {
1851
1846
  return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
@@ -1870,43 +1865,38 @@ function TooltipPortal(props) {
1870
1865
  ...props
1871
1866
  });
1872
1867
  }
1873
- function TooltipArrow({ className, variant, ...props }) {
1874
- const { arrow } = tooltip({
1875
- theme: useThemeFamily(),
1876
- variant
1877
- });
1868
+ function TooltipArrow({ className, ...props }) {
1869
+ const theme = useThemeFamily();
1870
+ const { arrow } = tooltip({ theme });
1878
1871
  return /* @__PURE__ */ jsx(Tooltip$1.Arrow, {
1879
1872
  "data-slot": "tooltip-arrow",
1880
1873
  className: arrow({ className }),
1881
1874
  ...props,
1882
- children: /* @__PURE__ */ jsx(TooltipArrowSvg, { variant })
1875
+ children: /* @__PURE__ */ jsx(TooltipArrowSvg, { theme })
1883
1876
  });
1884
1877
  }
1885
- function TooltipArrowSvg({ variant, ...props }) {
1886
- const isInverse = variant === "inverse";
1887
- return /* @__PURE__ */ jsxs("svg", {
1878
+ function TooltipArrowSvg({ theme, ...props }) {
1879
+ const isElegant = theme === "elegant";
1880
+ return /* @__PURE__ */ jsx("svg", {
1888
1881
  width: "12",
1889
1882
  height: "6",
1890
1883
  viewBox: "0 0 12 6",
1891
1884
  fill: "none",
1892
1885
  ...props,
1893
- children: [/* @__PURE__ */ jsx("path", {
1886
+ children: /* @__PURE__ */ jsx("path", {
1894
1887
  d: "M1 0H11L6 5.25Z",
1895
- className: isInverse ? "fill-foreground-strong" : "fill-layer-popover"
1896
- }), /* @__PURE__ */ jsx("path", {
1897
- d: "M1 0.5L6 5.25L11 0.5",
1898
- className: isInverse ? "stroke-[oklch(0_0_0_/_0.18)]" : "stroke-[oklch(0.21_0.006_285_/_0.10)]",
1899
- strokeLinecap: "round",
1900
- strokeLinejoin: "round",
1901
- vectorEffect: "non-scaling-stroke"
1902
- })]
1888
+ className: isElegant ? "fill-[oklch(0.263_0.009_294.9)] dark:fill-[oklch(0.230_0.010_294.8)]" : "fill-layer-popover"
1889
+ })
1903
1890
  });
1904
1891
  }
1905
- function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "top", sideOffset = 6, sticky, portalProps, variant, className, children, ...props }) {
1906
- const { positioner, content } = tooltip({
1907
- theme: useThemeFamily(),
1908
- variant
1909
- });
1892
+ function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance = {
1893
+ side: "shift",
1894
+ align: "shift",
1895
+ fallbackAxisSide: "none"
1896
+ }, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "top", sideOffset, sticky, portalProps, className, children, ...props }) {
1897
+ const theme = useThemeFamily();
1898
+ const { positioner, content } = tooltip({ theme });
1899
+ const resolvedSideOffset = sideOffset ?? (theme === "elegant" ? 8 : 6);
1910
1900
  return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
1911
1901
  ...portalProps,
1912
1902
  children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
@@ -1920,14 +1910,14 @@ function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPaddin
1920
1910
  disableAnchorTracking,
1921
1911
  positionMethod,
1922
1912
  side,
1923
- sideOffset,
1913
+ sideOffset: resolvedSideOffset,
1924
1914
  sticky,
1925
1915
  className: positioner(),
1926
1916
  children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
1927
1917
  "data-slot": "tooltip-content",
1928
1918
  className: content({ className }),
1929
1919
  ...props,
1930
- children: [children, /* @__PURE__ */ jsx(TooltipArrow, { variant })]
1920
+ children: [children, /* @__PURE__ */ jsx(TooltipArrow, {})]
1931
1921
  })
1932
1922
  })
1933
1923
  });
@@ -2096,6 +2086,142 @@ function PopoverBackdrop({ className, ...props }) {
2096
2086
  });
2097
2087
  }
2098
2088
  //#endregion
2089
+ //#region src/components/preview-card/preview-card.tsx
2090
+ const previewCard = tv({
2091
+ slots: {
2092
+ trigger: ["select-none"],
2093
+ positioner: ["isolate z-50 outline-none"],
2094
+ popup: [
2095
+ "max-h-[var(--available-height)] min-w-[220px] overflow-hidden",
2096
+ "outline-none",
2097
+ "origin-[var(--transform-origin)] transform-gpu opacity-100 will-change-[transform,opacity]",
2098
+ "transition-[opacity,transform] duration-[250ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
2099
+ "data-[starting-style]:scale-[0.97] data-[starting-style]:opacity-0",
2100
+ "data-[ending-style]:scale-[0.99] data-[ending-style]:opacity-0 data-[ending-style]:duration-150",
2101
+ "data-[instant]:transition-none motion-reduce:transition-none"
2102
+ ],
2103
+ header: ["flex items-start gap-3 px-3 pt-3 pb-2"],
2104
+ separator: ["border-t"],
2105
+ title: ["m-0 truncate text-sm leading-none"],
2106
+ description: ["m-0 truncate px-3 py-2 text-xs leading-5"],
2107
+ arrow: ["size-2 rotate-45"]
2108
+ },
2109
+ variants: { theme: {
2110
+ brutal: {
2111
+ popup: ["border-2 border-black bg-white shadow-lg"],
2112
+ separator: ["border-black"],
2113
+ title: ["font-sans font-bold text-black"],
2114
+ description: ["font-sans text-black/70"],
2115
+ arrow: ["hidden"]
2116
+ },
2117
+ elegant: {
2118
+ popup: ["rounded-md bg-layer-popover shadow-xl"],
2119
+ separator: ["border-line-subtle"],
2120
+ title: ["font-sans font-medium text-foreground-strong"],
2121
+ description: ["bg-black/[0.015] font-sans", "text-[oklch(0.48_0_0)] dark:text-[oklch(0.76_0_0)]"],
2122
+ arrow: ["border-l border-t border-line-muted bg-layer-popover"]
2123
+ }
2124
+ } }
2125
+ });
2126
+ function PreviewCard(props) {
2127
+ return /* @__PURE__ */ jsx(PreviewCard$1.Root, {
2128
+ "data-slot": "preview-card",
2129
+ ...props
2130
+ });
2131
+ }
2132
+ function PreviewCardTrigger({ delay = 80, closeDelay = 40, className, ...props }) {
2133
+ const { trigger } = previewCard({ theme: useThemeFamily() });
2134
+ return /* @__PURE__ */ jsx(PreviewCard$1.Trigger, {
2135
+ "data-slot": "preview-card-trigger",
2136
+ delay,
2137
+ closeDelay,
2138
+ className: trigger({ className }),
2139
+ ...props
2140
+ });
2141
+ }
2142
+ function PreviewCardPortal(props) {
2143
+ return /* @__PURE__ */ jsx(PreviewCard$1.Portal, {
2144
+ "data-slot": "preview-card-portal",
2145
+ ...props
2146
+ });
2147
+ }
2148
+ function PreviewCardPopup({ className, ...props }) {
2149
+ const { popup } = previewCard({ theme: useThemeFamily() });
2150
+ return /* @__PURE__ */ jsx("div", {
2151
+ "data-slot": "preview-card-content",
2152
+ className: popup({ className }),
2153
+ ...props
2154
+ });
2155
+ }
2156
+ function PreviewCardContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "bottom", sideOffset = 6, sticky, portalProps, className, ...props }) {
2157
+ const { positioner, popup } = previewCard({ theme: useThemeFamily() });
2158
+ return /* @__PURE__ */ jsx(PreviewCard$1.Portal, {
2159
+ ...portalProps,
2160
+ children: /* @__PURE__ */ jsx(PreviewCard$1.Positioner, {
2161
+ align,
2162
+ alignOffset,
2163
+ anchor,
2164
+ arrowPadding,
2165
+ collisionAvoidance,
2166
+ collisionBoundary,
2167
+ collisionPadding,
2168
+ disableAnchorTracking,
2169
+ positionMethod,
2170
+ side,
2171
+ sideOffset,
2172
+ sticky,
2173
+ className: positioner(),
2174
+ children: /* @__PURE__ */ jsx(PreviewCard$1.Popup, {
2175
+ "data-slot": "preview-card-content",
2176
+ className: popup({ className }),
2177
+ ...props
2178
+ })
2179
+ })
2180
+ });
2181
+ }
2182
+ function PreviewCardHeader({ className, ...props }) {
2183
+ const { header } = previewCard({ theme: useThemeFamily() });
2184
+ return /* @__PURE__ */ jsx("div", {
2185
+ "data-slot": "preview-card-header",
2186
+ className: header({ className }),
2187
+ ...props
2188
+ });
2189
+ }
2190
+ function PreviewCardSeparator({ className, ...props }) {
2191
+ const { separator } = previewCard({ theme: useThemeFamily() });
2192
+ return /* @__PURE__ */ jsx("div", {
2193
+ role: "separator",
2194
+ "aria-orientation": "horizontal",
2195
+ "data-slot": "preview-card-separator",
2196
+ className: separator({ className }),
2197
+ ...props
2198
+ });
2199
+ }
2200
+ function PreviewCardTitle({ className, ...props }) {
2201
+ const { title } = previewCard({ theme: useThemeFamily() });
2202
+ return /* @__PURE__ */ jsx("p", {
2203
+ "data-slot": "preview-card-title",
2204
+ className: title({ className }),
2205
+ ...props
2206
+ });
2207
+ }
2208
+ function PreviewCardDescription({ className, ...props }) {
2209
+ const { description } = previewCard({ theme: useThemeFamily() });
2210
+ return /* @__PURE__ */ jsx("p", {
2211
+ "data-slot": "preview-card-description",
2212
+ className: description({ className }),
2213
+ ...props
2214
+ });
2215
+ }
2216
+ function PreviewCardArrow({ className, ...props }) {
2217
+ const { arrow } = previewCard({ theme: useThemeFamily() });
2218
+ return /* @__PURE__ */ jsx(PreviewCard$1.Arrow, {
2219
+ "data-slot": "preview-card-arrow",
2220
+ className: arrow({ className }),
2221
+ ...props
2222
+ });
2223
+ }
2224
+ //#endregion
2099
2225
  //#region src/components/label/label.tsx
2100
2226
  const label = tv({
2101
2227
  slots: {
@@ -4081,6 +4207,207 @@ function StatusRoot({ size, variant, pulse, className, render, ...props }) {
4081
4207
  }
4082
4208
  const Status = StatusRoot;
4083
4209
  //#endregion
4210
+ //#region src/components/progress/progress.tsx
4211
+ const PROGRESS_STYLE = `
4212
+ @keyframes raft-progress-indeterminate {
4213
+ 0% {
4214
+ transform: translateX(-65%) scaleX(0.35);
4215
+ }
4216
+ 50% {
4217
+ transform: translateX(70%) scaleX(0.6);
4218
+ }
4219
+ 100% {
4220
+ transform: translateX(185%) scaleX(0.35);
4221
+ }
4222
+ }
4223
+
4224
+ @media (prefers-reduced-motion: reduce) {
4225
+ [data-slot="progress-indicator"][data-indeterminate] {
4226
+ animation-duration: 2400ms;
4227
+ }
4228
+ }
4229
+ `;
4230
+ const progress = tv({
4231
+ slots: {
4232
+ root: [
4233
+ "group/progress grid w-full min-w-0 gap-1.5",
4234
+ "[--progress-color:var(--foreground-strong)]",
4235
+ "[--progress-light:var(--layer-muted)]",
4236
+ "[--progress-indicator:var(--progress-color)]",
4237
+ "[--progress-track:var(--layer-muted)]"
4238
+ ],
4239
+ header: ["flex min-w-0 items-center justify-between gap-3"],
4240
+ label: ["min-w-0 truncate"],
4241
+ value: ["shrink-0 tabular-nums"],
4242
+ track: ["relative w-full overflow-hidden bg-[var(--progress-track)]"],
4243
+ indicator: [
4244
+ "block h-full bg-[var(--progress-indicator)]",
4245
+ "transition-[width,background-color] duration-200 ease-out",
4246
+ "data-[indeterminate]:absolute data-[indeterminate]:inset-y-0 data-[indeterminate]:w-1/2",
4247
+ "data-[indeterminate]:origin-left data-[indeterminate]:[animation:raft-progress-indeterminate_1.4s_ease-in-out_infinite]"
4248
+ ]
4249
+ },
4250
+ variants: {
4251
+ theme: {
4252
+ brutal: {
4253
+ root: ["font-heading"],
4254
+ label: ["text-xs font-bold text-foreground-strong"],
4255
+ value: ["font-mono text-xs font-bold text-foreground/70"],
4256
+ track: [
4257
+ "border-2 border-line-strong bg-layer-panel",
4258
+ "shadow-xs",
4259
+ "group-data-[complete]/progress:shadow-none"
4260
+ ]
4261
+ },
4262
+ elegant: {
4263
+ root: [
4264
+ "font-sans",
4265
+ "[--progress-indicator:color-mix(in_oklab,var(--progress-color)_90%,transparent)]",
4266
+ "[--progress-track:color-mix(in_oklab,var(--line-subtle)_35%,var(--layer-panel))]",
4267
+ "data-[indeterminate]:[--progress-track:color-mix(in_oklab,var(--line-subtle)_65%,var(--layer-panel))]"
4268
+ ],
4269
+ label: ["text-[13px] font-medium leading-5 text-foreground"],
4270
+ value: ["font-mono text-[11px] font-medium leading-5 text-foreground-placeholder"],
4271
+ track: ["rounded-full"],
4272
+ indicator: ["rounded-full"]
4273
+ }
4274
+ },
4275
+ variant: {
4276
+ primary: { root: ["[--progress-color:var(--color-primary-400)]", "[--progress-light:var(--color-primary-200)]"] },
4277
+ information: { root: ["[--progress-color:var(--color-info-base)]", "[--progress-light:var(--color-info-light)]"] },
4278
+ accent: { root: ["[--progress-color:var(--color-accent-400)]", "[--progress-light:var(--color-accent-200)]"] },
4279
+ success: { root: ["[--progress-color:var(--color-success-base)]", "[--progress-light:var(--color-success-light)]"] },
4280
+ warning: { root: ["[--progress-color:var(--color-warning-base)]", "[--progress-light:var(--color-warning-light)]"] },
4281
+ danger: { root: ["[--progress-color:var(--color-danger-base)]", "[--progress-light:var(--color-danger-light)]"] }
4282
+ },
4283
+ size: {
4284
+ sm: { track: ["h-1.5"] },
4285
+ md: { track: ["h-2"] },
4286
+ lg: { track: ["h-2.5"] }
4287
+ }
4288
+ },
4289
+ defaultVariants: {
4290
+ variant: "primary",
4291
+ size: "md"
4292
+ },
4293
+ compoundVariants: [
4294
+ {
4295
+ theme: "brutal",
4296
+ size: "sm",
4297
+ class: { track: "h-3" }
4298
+ },
4299
+ {
4300
+ theme: "brutal",
4301
+ size: "md",
4302
+ class: { track: "h-4" }
4303
+ },
4304
+ {
4305
+ theme: "brutal",
4306
+ size: "lg",
4307
+ class: { track: "h-5" }
4308
+ }
4309
+ ]
4310
+ });
4311
+ const progressStyle = /* @__PURE__ */ jsx("style", {
4312
+ href: "raft-ui-progress",
4313
+ precedence: "default",
4314
+ children: PROGRESS_STYLE
4315
+ });
4316
+ function Progress({ size = "md", variant = "primary", className, ...props }) {
4317
+ const { root } = progress({
4318
+ theme: useThemeFamily(),
4319
+ size,
4320
+ variant
4321
+ });
4322
+ return /* @__PURE__ */ jsx(Progress$1.Root, {
4323
+ "data-slot": "progress",
4324
+ "data-size": size,
4325
+ "data-variant": variant,
4326
+ className: root({ className }),
4327
+ ...props
4328
+ });
4329
+ }
4330
+ function ProgressHeader({ className, ...props }) {
4331
+ const { header } = progress({ theme: useThemeFamily() });
4332
+ return /* @__PURE__ */ jsx("div", {
4333
+ "data-slot": "progress-header",
4334
+ className: header({ className }),
4335
+ ...props
4336
+ });
4337
+ }
4338
+ function ProgressLabel({ className, ...props }) {
4339
+ const { label } = progress({ theme: useThemeFamily() });
4340
+ return /* @__PURE__ */ jsx(Progress$1.Label, {
4341
+ "data-slot": "progress-label",
4342
+ className: label({ className }),
4343
+ ...props
4344
+ });
4345
+ }
4346
+ function ProgressValue({ className, ...props }) {
4347
+ const { value } = progress({ theme: useThemeFamily() });
4348
+ return /* @__PURE__ */ jsx(Progress$1.Value, {
4349
+ "data-slot": "progress-value",
4350
+ className: value({ className }),
4351
+ ...props
4352
+ });
4353
+ }
4354
+ function ProgressTrack({ className, ...props }) {
4355
+ const { track } = progress({ theme: useThemeFamily() });
4356
+ return /* @__PURE__ */ jsx(Progress$1.Track, {
4357
+ "data-slot": "progress-track",
4358
+ className: track({ className }),
4359
+ ...props
4360
+ });
4361
+ }
4362
+ function ProgressIndicator({ className, ...props }) {
4363
+ const { indicator } = progress({ theme: useThemeFamily() });
4364
+ return /* @__PURE__ */ jsx(Progress$1.Indicator, {
4365
+ "data-slot": "progress-indicator",
4366
+ className: indicator({ className }),
4367
+ ...props,
4368
+ children: progressStyle
4369
+ });
4370
+ }
4371
+ //#endregion
4372
+ //#region src/components/skeleton/skeleton.tsx
4373
+ const skeleton = tv({
4374
+ slots: { root: ["animate-pulse", "aria-hidden:pointer-events-none"] },
4375
+ variants: {
4376
+ theme: {
4377
+ brutal: { root: ["data-[variant=line]:bg-black/10", "data-[variant=block]:bg-black/10"] },
4378
+ elegant: { root: ["data-[variant=line]:rounded-full data-[variant=line]:bg-foreground/[0.08]", "data-[variant=block]:rounded-md data-[variant=block]:bg-foreground/[0.08]"] }
4379
+ },
4380
+ variant: {
4381
+ line: { root: "h-3" },
4382
+ block: { root: "" },
4383
+ circle: { root: "rounded-full" }
4384
+ }
4385
+ },
4386
+ compoundVariants: [{
4387
+ theme: "brutal",
4388
+ variant: "circle",
4389
+ class: { root: "bg-black/10" }
4390
+ }, {
4391
+ theme: "elegant",
4392
+ variant: "circle",
4393
+ class: { root: "bg-foreground/[0.08]" }
4394
+ }],
4395
+ defaultVariants: { variant: "block" }
4396
+ });
4397
+ function Skeleton({ variant = "block", className, ...props }) {
4398
+ const { root } = skeleton({
4399
+ theme: useThemeFamily(),
4400
+ variant
4401
+ });
4402
+ return /* @__PURE__ */ jsx("div", {
4403
+ "aria-hidden": "true",
4404
+ "data-slot": "skeleton",
4405
+ "data-variant": variant,
4406
+ className: root({ className }),
4407
+ ...props
4408
+ });
4409
+ }
4410
+ //#endregion
4084
4411
  //#region src/components/banner/banner.tsx
4085
4412
  const banner = tv({
4086
4413
  slots: {
@@ -4747,6 +5074,478 @@ function NotificationCenterEmptyState(props) {
4747
5074
  });
4748
5075
  }
4749
5076
  //#endregion
5077
+ //#region src/components/toast/toast.tsx
5078
+ const toastStyles = tv({
5079
+ slots: {
5080
+ viewport: ["pointer-events-none isolate z-[70] w-[min(24rem,calc(100vw-2rem))]", "outline-none"],
5081
+ positioner: ["isolate z-[70] outline-none"],
5082
+ root: [
5083
+ "group/toast pointer-events-auto",
5084
+ "select-text overflow-hidden text-foreground-strong",
5085
+ "outline outline-1 outline-offset-2 outline-transparent",
5086
+ "[--toast-scale:calc(max(0.84,1-(var(--toast-index)*0.04)))]",
5087
+ "[--toast-peek:0.5rem]",
5088
+ "[--toast-gap:0.5rem]",
5089
+ "[--toast-stack-height:var(--toast-frontmost-height,var(--toast-height))]",
5090
+ "[--toast-y:calc((var(--toast-offset-y)*-1)-(var(--toast-index)*var(--toast-gap))+var(--toast-swipe-movement-y))]",
5091
+ "transition-[transform,opacity,height] duration-[220ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
5092
+ "data-[limited]:opacity-0",
5093
+ "data-[starting-style]:opacity-0",
5094
+ "data-[ending-style]:opacity-0",
5095
+ "motion-reduce:transition-none"
5096
+ ],
5097
+ content: [
5098
+ "relative grid grid-cols-[minmax(0,1fr)] items-center gap-x-3 overflow-hidden",
5099
+ "[&:has([data-slot=toast-description])_[data-slot=toast-body]]:self-start [&:has([data-slot=toast-description])_[data-slot=toast-icon]]:self-start",
5100
+ "[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-h-[var(--toast-title-only-min-h,2.25rem)]",
5101
+ "[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-w-[var(--toast-title-only-min-w,7rem)]",
5102
+ "[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:px-[var(--toast-title-only-px,0.75rem)]",
5103
+ "[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:py-[var(--toast-title-only-py,0.5rem)]",
5104
+ "[&:not(:has([data-slot=toast-description]))>[data-slot=toast-body]:only-child]:justify-self-center [&:not(:has([data-slot=toast-description]))>[data-slot=toast-body]:only-child]:text-center",
5105
+ "transition-opacity duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]",
5106
+ "data-[behind]:opacity-0 data-[expanded]:opacity-100",
5107
+ "motion-reduce:transition-none"
5108
+ ],
5109
+ icon: ["flex size-5 shrink-0 items-center justify-center", "[&_svg]:size-3.5 [&_svg]:shrink-0"],
5110
+ body: ["min-w-0"],
5111
+ title: ["m-0 truncate text-sm leading-5"],
5112
+ description: ["m-0 text-sm leading-5"],
5113
+ actions: ["flex items-center justify-end gap-1.5"],
5114
+ close: [
5115
+ "absolute top-1.5 right-1.5 inline-flex size-7 shrink-0 items-center justify-center",
5116
+ "outline outline-1 outline-offset-2 outline-transparent",
5117
+ "transition-[background-color,color,border-color,box-shadow,transform] duration-150",
5118
+ "disabled:pointer-events-none disabled:opacity-40",
5119
+ "focus-visible:outline-line-strong",
5120
+ "[&_svg]:size-3.5"
5121
+ ],
5122
+ arrow: [
5123
+ "pointer-events-none flex",
5124
+ "data-[side=top]:bottom-[-6px]",
5125
+ "data-[side=bottom]:top-[-6px] data-[side=bottom]:rotate-180",
5126
+ "data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
5127
+ "data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
5128
+ "data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
5129
+ "data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
5130
+ ]
5131
+ },
5132
+ variants: {
5133
+ theme: {
5134
+ brutal: {
5135
+ root: ["border-2 border-black bg-soft-signal text-black shadow-[var(--shadow-brutal)]", "focus-visible:outline-transparent"],
5136
+ content: [
5137
+ "min-h-0 min-w-0 grid-cols-1 px-3 py-2 font-sans",
5138
+ "gap-y-1.5",
5139
+ "[&:has([data-slot=toast-icon])]:grid-cols-[auto_minmax(0,1fr)]"
5140
+ ],
5141
+ icon: ["size-7 border-2 border-black bg-white p-1.5 text-black shadow-[2px_2px_0_0_black]", "[&_svg]:size-4 [&_svg]:stroke-[2.5]"],
5142
+ title: ["font-bold text-black"],
5143
+ description: ["font-semibold text-black/75"],
5144
+ actions: ["col-start-1 row-start-2 col-span-full w-full justify-self-stretch justify-end gap-1"],
5145
+ close: ["static order-1 size-auto min-h-7 shrink-0 whitespace-nowrap border-2 border-line-strong bg-white px-2 text-xs font-bold text-black/70 shadow-xs", "hover:bg-brutal-yellow hover:text-black active:translate-x-px active:translate-y-px active:shadow-none"],
5146
+ arrow: ["hidden"]
5147
+ },
5148
+ elegant: {
5149
+ root: [
5150
+ "relative rounded-xl bg-[oklch(0.263_0.009_294.9_/_0.50)] text-[oklch(0.965_0.002_286)] backdrop-blur-2xl saturate-150",
5151
+ "shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.54)]",
5152
+ "data-[expanded]:bg-[oklch(0.254_0.010_298_/_0.54)] data-[expanded]:shadow-[0_18px_40px_-18px_oklch(0_0_0_/_0.54)]",
5153
+ "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-white/35 after:mix-blend-overlay after:content-['']",
5154
+ "dark:bg-[oklch(0.230_0.010_294.8_/_0.50)] dark:shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.68)] dark:data-[expanded]:bg-[oklch(0.220_0.010_294.7_/_0.54)]"
5155
+ ],
5156
+ content: [
5157
+ "gap-x-3.5 font-sans",
5158
+ "[&:has([data-slot=toast-icon])]:grid-cols-[auto_minmax(0,1fr)]",
5159
+ "[&:has([data-slot=toast-actions])]:min-w-[18rem]",
5160
+ "[&:has([data-slot=toast-actions])]:min-h-14",
5161
+ "[&:has([data-slot=toast-actions])]:py-3",
5162
+ "[&:has([data-slot=toast-actions])]:pl-3.5",
5163
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-h-14",
5164
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-w-[18rem]",
5165
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:py-3",
5166
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:pl-3.5",
5167
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:min-h-14",
5168
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:min-w-[18rem]",
5169
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:py-3",
5170
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:pl-3.5",
5171
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:min-h-14",
5172
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:min-w-[18rem]",
5173
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:py-3",
5174
+ "[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:pl-3.5",
5175
+ "[&:has([data-slot=toast-close])]:pr-3",
5176
+ "[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-w-0",
5177
+ "[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-h-10",
5178
+ "[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:pl-3.5",
5179
+ "[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:py-2",
5180
+ "[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:pr-3.5",
5181
+ "[&:has([data-slot=toast-actions])]:grid-cols-[minmax(0,1fr)]",
5182
+ "[&:has([data-slot=toast-actions])]:gap-y-2",
5183
+ "[&:has([data-slot=toast-icon]):has([data-slot=toast-actions])]:grid-cols-[auto_minmax(0,1fr)]"
5184
+ ],
5185
+ icon: ["text-white/85", "[&_svg]:size-[1.125rem] [&_svg]:stroke-[1.5]"],
5186
+ title: ["font-medium text-[oklch(0.985_0.001_286)]"],
5187
+ description: ["text-white/62"],
5188
+ actions: ["col-start-1 row-start-2 col-span-full w-full justify-self-stretch justify-end"],
5189
+ close: ["static order-1 size-auto min-h-7 shrink-0 whitespace-nowrap rounded-full border-0 bg-transparent px-2 text-xs font-medium text-white/52 shadow-none", "hover:bg-white/[0.05] hover:text-white/72 active:scale-[0.985]"],
5190
+ arrow: []
5191
+ }
5192
+ },
5193
+ placement: {
5194
+ "bottom-center": { viewport: "bottom-4 left-1/2 -translate-x-1/2" },
5195
+ "bottom-right": { viewport: "right-4 bottom-4" },
5196
+ "top-center": { viewport: "top-4 left-1/2 -translate-x-1/2" },
5197
+ "top-right": { viewport: "top-4 right-4" },
5198
+ none: { viewport: "contents" }
5199
+ },
5200
+ strategy: {
5201
+ fixed: { viewport: "fixed" },
5202
+ absolute: { viewport: "absolute" }
5203
+ },
5204
+ layout: {
5205
+ stacked: { root: [
5206
+ "absolute right-0 bottom-0 left-0 mx-auto h-[var(--toast-stack-height)] w-full origin-bottom",
5207
+ "z-[calc(70-var(--toast-index))]",
5208
+ "[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))))_scale(var(--toast-scale))]",
5209
+ "data-[expanded]:h-[var(--toast-height)]",
5210
+ "data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-y))_scale(1)]",
5211
+ "data-[starting-style]:[transform:translateY(120%)_scale(0.98)]",
5212
+ "[&[data-ending-style]:not([data-swipe-direction])]:[transform:translateY(120%)_scale(0.98)]",
5213
+ "data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+120%))_translateY(var(--toast-y))]",
5214
+ "data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-120%))_translateY(var(--toast-y))]",
5215
+ "data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+120%))]",
5216
+ "data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-120%))]"
5217
+ ] },
5218
+ inline: { root: [
5219
+ "relative mx-auto w-max max-w-[min(24rem,var(--available-width,calc(100vw-2rem)))] overflow-visible",
5220
+ "origin-[var(--transform-origin)]",
5221
+ "data-[starting-style]:[transform:scale(0.97)]",
5222
+ "data-[ending-style]:[transform:scale(0.99)]"
5223
+ ] }
5224
+ },
5225
+ tone: {
5226
+ info: {},
5227
+ success: {},
5228
+ warning: {},
5229
+ error: {}
5230
+ }
5231
+ },
5232
+ defaultVariants: {
5233
+ placement: "bottom-center",
5234
+ layout: "stacked",
5235
+ strategy: "fixed"
5236
+ },
5237
+ compoundVariants: [
5238
+ {
5239
+ theme: "brutal",
5240
+ tone: "success",
5241
+ class: { root: "bg-brutal-lime" }
5242
+ },
5243
+ {
5244
+ theme: "brutal",
5245
+ tone: "warning",
5246
+ class: { root: "bg-brutal-orange" }
5247
+ },
5248
+ {
5249
+ theme: "brutal",
5250
+ tone: "error",
5251
+ class: { root: "bg-brutal-orange shadow-[var(--shadow-brutal-sm)]" }
5252
+ },
5253
+ {
5254
+ theme: "brutal",
5255
+ layout: "stacked",
5256
+ class: { root: "w-max max-w-full" }
5257
+ }
5258
+ ]
5259
+ });
5260
+ const toastAction = tv({
5261
+ extend: buttonVariants,
5262
+ slots: { root: [
5263
+ "inline-flex min-h-7 shrink-0 items-center justify-center whitespace-nowrap px-2 text-xs leading-none",
5264
+ "font-sans shadow-none",
5265
+ "outline outline-1 outline-offset-2 outline-transparent",
5266
+ "transition-[background-color,color,border-color,box-shadow,transform] duration-150",
5267
+ "disabled:pointer-events-none disabled:opacity-40 data-[loading=true]:opacity-100",
5268
+ "focus-visible:outline-line-strong",
5269
+ "[&_[data-icon]]:size-[1em] [&_svg:not([class*='size-'])]:size-3"
5270
+ ] },
5271
+ variants: { toastTheme: {
5272
+ brutal: { root: ["order-2 border-2 border-line-strong bg-black font-bold text-white shadow-xs", "hover:bg-black/85 active:translate-x-px active:translate-y-px active:shadow-none"] },
5273
+ elegant: { root: [
5274
+ "toast-gradient-border order-2 min-h-7 rounded-full bg-white/[0.06] px-3 font-medium text-white/74",
5275
+ "[--toast-gradient-border-angle:to_bottom] [--toast-gradient-border-from:rgb(255_255_255_/_0.1)] [--toast-gradient-border-to:rgb(255_255_255_/_0)] [--toast-gradient-border-via:rgb(255_255_255_/_0.05)]",
5276
+ "hover:bg-white/[0.075] hover:text-white/88 hover:[--toast-gradient-border-from:rgb(255_255_255_/_0.24)] hover:[--toast-gradient-border-via:rgb(255_255_255_/_0.08)] active:scale-[0.985]"
5277
+ ] }
5278
+ } },
5279
+ defaultVariants: {
5280
+ variant: void 0,
5281
+ size: void 0
5282
+ }
5283
+ });
5284
+ const createToastManager = Toast.createToastManager;
5285
+ const useToastManager = Toast.useToastManager;
5286
+ const defaultToastManager = createToastManager();
5287
+ function addDefaultToast(intent, title, options = {}) {
5288
+ const { action, dismissible, icon, priority, ...toastOptions } = options;
5289
+ return defaultToastManager.add({
5290
+ ...toastOptions,
5291
+ actionProps: action ? {
5292
+ children: action.label,
5293
+ onClick: action.onClick
5294
+ } : void 0,
5295
+ title,
5296
+ type: intent,
5297
+ priority: priority ?? (intent === "error" ? "high" : void 0),
5298
+ data: {
5299
+ intent,
5300
+ hasClose: dismissible,
5301
+ hasIcon: icon
5302
+ }
5303
+ });
5304
+ }
5305
+ const toast = {
5306
+ add(options) {
5307
+ const { title, type = "info", ...toastOptions } = options;
5308
+ return addDefaultToast(type, title, toastOptions);
5309
+ },
5310
+ info(title, options) {
5311
+ return addDefaultToast("info", title, options);
5312
+ },
5313
+ success(title, options) {
5314
+ return addDefaultToast("success", title, options);
5315
+ },
5316
+ warning(title, options) {
5317
+ return addDefaultToast("warning", title, options);
5318
+ },
5319
+ error(title, options) {
5320
+ return addDefaultToast("error", title, options);
5321
+ },
5322
+ dismiss(id) {
5323
+ return defaultToastManager.close(id);
5324
+ }
5325
+ };
5326
+ function getToastTone(type) {
5327
+ if (type === "success" || type === "warning" || type === "error") return type;
5328
+ return "info";
5329
+ }
5330
+ function ToastProvider({ children, portalContainer, renderViewport = true, toastManager = defaultToastManager, viewportClassName, viewportPlacement = "bottom-center", viewportStrategy = "fixed", ...props }) {
5331
+ return /* @__PURE__ */ jsxs(Toast.Provider, {
5332
+ toastManager,
5333
+ ...props,
5334
+ children: [children, renderViewport ? /* @__PURE__ */ jsx(DefaultToastLayer, {
5335
+ placement: viewportPlacement,
5336
+ portalContainer,
5337
+ strategy: viewportStrategy,
5338
+ viewportClassName
5339
+ }) : null]
5340
+ });
5341
+ }
5342
+ function ToastPortal(props) {
5343
+ return /* @__PURE__ */ jsx(Toast.Portal, {
5344
+ "data-slot": "toast-portal",
5345
+ ...props
5346
+ });
5347
+ }
5348
+ function ToastViewport({ placement = "bottom-center", strategy = "fixed", className, ...props }) {
5349
+ const { viewport } = toastStyles({
5350
+ theme: useThemeFamily(),
5351
+ placement,
5352
+ strategy
5353
+ });
5354
+ return /* @__PURE__ */ jsx(Toast.Viewport, {
5355
+ "data-slot": "toast-viewport",
5356
+ className: viewport({ className }),
5357
+ ...props
5358
+ });
5359
+ }
5360
+ function ToastPositioner({ className, ...props }) {
5361
+ const { positioner } = toastStyles({ theme: useThemeFamily() });
5362
+ return /* @__PURE__ */ jsx(Toast.Positioner, {
5363
+ "data-slot": "toast-positioner",
5364
+ className: positioner({ className }),
5365
+ ...props
5366
+ });
5367
+ }
5368
+ function ToastRoot({ layout = "stacked", className, toast: toastObject, ...props }) {
5369
+ const { root } = toastStyles({
5370
+ theme: useThemeFamily(),
5371
+ layout,
5372
+ tone: getToastTone(toastObject.type)
5373
+ });
5374
+ return /* @__PURE__ */ jsx(Toast.Root, {
5375
+ "data-slot": "toast",
5376
+ "data-toast-type": toastObject.type ?? "info",
5377
+ toast: toastObject,
5378
+ className: root({ className }),
5379
+ ...props
5380
+ });
5381
+ }
5382
+ function ToastContent({ children, className, ...props }) {
5383
+ const { content } = toastStyles({ theme: useThemeFamily() });
5384
+ return /* @__PURE__ */ jsx(Toast.Content, {
5385
+ "data-slot": "toast-content",
5386
+ className: content({ className }),
5387
+ ...props,
5388
+ children
5389
+ });
5390
+ }
5391
+ function ToastIcon({ className, ...props }) {
5392
+ const { icon } = toastStyles({ theme: useThemeFamily() });
5393
+ return /* @__PURE__ */ jsx("div", {
5394
+ "data-slot": "toast-icon",
5395
+ className: icon({ className }),
5396
+ ...props
5397
+ });
5398
+ }
5399
+ function ToastBody({ className, ...props }) {
5400
+ const { body } = toastStyles({ theme: useThemeFamily() });
5401
+ return /* @__PURE__ */ jsx("div", {
5402
+ "data-slot": "toast-body",
5403
+ className: body({ className }),
5404
+ ...props
5405
+ });
5406
+ }
5407
+ function ToastActions({ className, ...props }) {
5408
+ const { actions } = toastStyles({ theme: useThemeFamily() });
5409
+ return /* @__PURE__ */ jsx("div", {
5410
+ "data-slot": "toast-actions",
5411
+ className: actions({ className }),
5412
+ ...props
5413
+ });
5414
+ }
5415
+ function ToastTitle({ className, ...props }) {
5416
+ const { title } = toastStyles({ theme: useThemeFamily() });
5417
+ return /* @__PURE__ */ jsx(Toast.Title, {
5418
+ "data-slot": "toast-title",
5419
+ className: title({ className }),
5420
+ ...props
5421
+ });
5422
+ }
5423
+ function ToastDescription({ className, ...props }) {
5424
+ const { description } = toastStyles({ theme: useThemeFamily() });
5425
+ return /* @__PURE__ */ jsx(Toast.Description, {
5426
+ "data-slot": "toast-description",
5427
+ className: description({ className }),
5428
+ ...props
5429
+ });
5430
+ }
5431
+ function ToastAction({ className, children, disabled, loading = false, loadingLabel = "Loading", render, ...props }) {
5432
+ const { root, content, loadingIndicator } = toastAction({ toastTheme: useThemeFamily() });
5433
+ const renderActionContent = (actionChildren) => /* @__PURE__ */ jsxs(Fragment$1, { children: [loading ? /* @__PURE__ */ jsx("span", {
5434
+ "data-slot": "toast-action-loading-indicator",
5435
+ className: loadingIndicator(),
5436
+ children: /* @__PURE__ */ jsx(Spinner, { "aria-label": loadingLabel })
5437
+ }) : null, /* @__PURE__ */ jsx("span", {
5438
+ "data-slot": "toast-action-content",
5439
+ "data-loading": loading ? "true" : void 0,
5440
+ className: content(),
5441
+ children: actionChildren
5442
+ })] });
5443
+ const renderAction = (renderProps, state) => {
5444
+ const actionChildren = renderActionContent(renderProps.children);
5445
+ const nextRenderProps = {
5446
+ ...renderProps,
5447
+ children: actionChildren
5448
+ };
5449
+ if (typeof render === "function") return render(nextRenderProps, state);
5450
+ if (isValidElement(render)) {
5451
+ const renderElement = render;
5452
+ return cloneElement(renderElement, {
5453
+ ...nextRenderProps,
5454
+ className: cn(renderProps.className, renderElement.props.className),
5455
+ children: actionChildren
5456
+ });
5457
+ }
5458
+ return /* @__PURE__ */ jsx("button", { ...nextRenderProps });
5459
+ };
5460
+ return /* @__PURE__ */ jsx(Toast.Action, {
5461
+ "data-slot": "toast-action",
5462
+ "data-loading": loading ? "true" : void 0,
5463
+ className: root({ className }),
5464
+ disabled: disabled || loading,
5465
+ "aria-disabled": loading || void 0,
5466
+ render: renderAction,
5467
+ ...props,
5468
+ children
5469
+ });
5470
+ }
5471
+ function ToastClose({ className, children, ...props }) {
5472
+ const { close } = toastStyles({ theme: useThemeFamily() });
5473
+ const usesDefaultText = children == null;
5474
+ return /* @__PURE__ */ jsx(Toast.Close, {
5475
+ "aria-label": usesDefaultText ? void 0 : "Dismiss toast",
5476
+ "data-slot": "toast-close",
5477
+ className: close({ className }),
5478
+ ...props,
5479
+ children: children ?? "Dismiss"
5480
+ });
5481
+ }
5482
+ function ToastArrow({ className, ...props }) {
5483
+ const theme = useThemeFamily();
5484
+ const { arrow } = toastStyles({ theme });
5485
+ return /* @__PURE__ */ jsx(Toast.Arrow, {
5486
+ "data-slot": "toast-arrow",
5487
+ className: arrow({ className }),
5488
+ ...props,
5489
+ children: /* @__PURE__ */ jsx(ToastArrowSvg, { theme })
5490
+ });
5491
+ }
5492
+ function DefaultToastLayer({ placement, portalContainer, strategy, viewportClassName }) {
5493
+ return /* @__PURE__ */ jsx(ToastPortal, {
5494
+ container: portalContainer,
5495
+ children: /* @__PURE__ */ jsx(ToastViewport, {
5496
+ placement,
5497
+ strategy,
5498
+ className: viewportClassName,
5499
+ children: /* @__PURE__ */ jsx(DefaultToastList, {})
5500
+ })
5501
+ });
5502
+ }
5503
+ function DefaultToastList() {
5504
+ const { toasts } = useToastManager();
5505
+ return toasts.map((toastObject) => /* @__PURE__ */ jsx(DefaultToastItem, { toast: toastObject }, toastObject.id));
5506
+ }
5507
+ function DefaultToastItem({ toast: toastObject }) {
5508
+ const showDescription = Boolean(toastObject.description);
5509
+ const showAction = Boolean(toastObject.actionProps?.children);
5510
+ const showClose = toastObject.data?.hasClose !== false;
5511
+ const showIcon = toastObject.data?.hasIcon !== false;
5512
+ return /* @__PURE__ */ jsx(ToastRoot, {
5513
+ toast: toastObject,
5514
+ layout: !showIcon && !showDescription && !showAction && !showClose ? "inline" : "stacked",
5515
+ children: /* @__PURE__ */ jsxs(ToastContent, {
5516
+ className: toastObject.data?.contentClassName,
5517
+ children: [
5518
+ showIcon ? /* @__PURE__ */ jsx(DefaultToastIcon, { toast: toastObject }) : null,
5519
+ /* @__PURE__ */ jsxs(ToastBody, { children: [/* @__PURE__ */ jsx(ToastTitle, {}), showDescription ? /* @__PURE__ */ jsx(ToastDescription, {}) : null] }),
5520
+ showAction || showClose ? /* @__PURE__ */ jsxs(ToastActions, { children: [showClose ? /* @__PURE__ */ jsx(ToastClose, {}) : null, showAction ? /* @__PURE__ */ jsx(ToastAction, {}) : null] }) : null
5521
+ ]
5522
+ })
5523
+ });
5524
+ }
5525
+ function DefaultToastIcon({ toast: toastObject }) {
5526
+ const intent = toastObject.data?.intent ?? getToastTone(toastObject.type);
5527
+ return /* @__PURE__ */ jsx(ToastIcon, { children: /* @__PURE__ */ jsx(intent === "success" ? CheckCircle2 : intent === "warning" || intent === "error" ? AlertTriangle : Info, { "aria-hidden": true }) });
5528
+ }
5529
+ function ToastArrowSvg({ theme, ...props }) {
5530
+ return /* @__PURE__ */ jsxs("svg", {
5531
+ width: "12",
5532
+ height: "6",
5533
+ viewBox: "0 0 12 6",
5534
+ fill: "none",
5535
+ ...props,
5536
+ children: [/* @__PURE__ */ jsx("path", {
5537
+ d: "M1 0H11L6 5.25Z",
5538
+ className: theme === "elegant" ? "fill-[oklch(0.263_0.009_294.9_/_0.50)] dark:fill-[oklch(0.230_0.010_294.8_/_0.50)]" : "fill-soft-signal"
5539
+ }), /* @__PURE__ */ jsx("path", {
5540
+ d: "M1 0.5L6 5.25L11 0.5",
5541
+ className: theme === "elegant" ? "stroke-white/28" : "stroke-line-strong",
5542
+ strokeLinecap: "round",
5543
+ strokeLinejoin: "round",
5544
+ vectorEffect: "non-scaling-stroke"
5545
+ })]
5546
+ });
5547
+ }
5548
+ //#endregion
4750
5549
  //#region src/components/tabs/tabs.tsx
4751
5550
  const tabs = tv({
4752
5551
  slots: {
@@ -5082,28 +5881,60 @@ function reconcileTabOrder(items, order) {
5082
5881
  //#endregion
5083
5882
  //#region src/components/separator/separator.tsx
5084
5883
  const separator = tv({
5085
- base: [
5086
- "shrink-0",
5087
- "data-[orientation=horizontal]:w-full",
5088
- "data-[orientation=vertical]:self-stretch"
5089
- ],
5884
+ slots: {
5885
+ root: [
5886
+ "shrink-0",
5887
+ "data-[orientation=horizontal]:w-full",
5888
+ "data-[orientation=vertical]:self-stretch"
5889
+ ],
5890
+ labeledRoot: ["grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 py-3"],
5891
+ labeledLine: ["w-full shrink-0"],
5892
+ labeledContent: ["min-w-0 font-mono text-xs font-medium"]
5893
+ },
5090
5894
  variants: { theme: {
5091
- brutal: ["data-[orientation=horizontal]:h-0 data-[orientation=horizontal]:border-t-2 data-[orientation=horizontal]:border-black", "data-[orientation=vertical]:w-0 data-[orientation=vertical]:border-l-2 data-[orientation=vertical]:border-black"],
5092
- elegant: [
5093
- "bg-line-muted",
5094
- "data-[orientation=horizontal]:h-px",
5095
- "data-[orientation=vertical]:w-px"
5096
- ]
5895
+ brutal: {
5896
+ root: ["data-[orientation=horizontal]:h-0 data-[orientation=horizontal]:border-t-2 data-[orientation=horizontal]:border-line-strong", "data-[orientation=vertical]:w-0 data-[orientation=vertical]:border-l-2 data-[orientation=vertical]:border-line-strong"],
5897
+ labeledLine: ["h-0 border-t-2 border-line-strong"],
5898
+ labeledContent: ["font-medium text-foreground/70"]
5899
+ },
5900
+ elegant: {
5901
+ root: [
5902
+ "bg-line-muted",
5903
+ "data-[orientation=horizontal]:h-px",
5904
+ "data-[orientation=vertical]:w-px"
5905
+ ],
5906
+ labeledLine: ["h-px bg-line-muted"],
5907
+ labeledContent: ["text-foreground-placeholder"]
5908
+ }
5097
5909
  } }
5098
5910
  });
5099
- function Separator({ className, orientation = "horizontal", ...props }) {
5911
+ function Separator({ children, className, orientation = "horizontal", ...props }) {
5912
+ const { labeledContent, labeledLine, labeledRoot, root } = separator({ theme: useThemeFamily() });
5913
+ if (children != null && orientation === "horizontal") return /* @__PURE__ */ jsxs(Separator$1, {
5914
+ "data-slot": "separator",
5915
+ orientation,
5916
+ className: labeledRoot({ className }),
5917
+ ...props,
5918
+ children: [
5919
+ /* @__PURE__ */ jsx("span", {
5920
+ "aria-hidden": "true",
5921
+ className: labeledLine()
5922
+ }),
5923
+ /* @__PURE__ */ jsx("span", {
5924
+ "data-slot": "separator-content",
5925
+ className: labeledContent(),
5926
+ children
5927
+ }),
5928
+ /* @__PURE__ */ jsx("span", {
5929
+ "aria-hidden": "true",
5930
+ className: labeledLine()
5931
+ })
5932
+ ]
5933
+ });
5100
5934
  return /* @__PURE__ */ jsx(Separator$1, {
5101
5935
  "data-slot": "separator",
5102
5936
  orientation,
5103
- className: separator({
5104
- theme: useThemeFamily(),
5105
- className
5106
- }),
5937
+ className: root({ className }),
5107
5938
  ...props
5108
5939
  });
5109
5940
  }
@@ -5202,4 +6033,4 @@ function ThemeProvider({ theme, defaultTheme = "brutal", onThemeChange, mode, de
5202
6033
  });
5203
6034
  }
5204
6035
  //#endregion
5205
- export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Banner, BannerAction, BannerDescription, BannerTitle, Button, Checkbox, Combobox, ComboboxChip, ComboboxChipRemove, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxControl, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxHeader, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPortal, ComboboxRow, ComboboxSeparator, ComboboxTrigger, ComboboxTriggerIndicator, ComboboxValue, ContextMenu, ContextMenuCheckboxItem, ContextMenuCheckboxItemIndicator, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRadioItemIndicator, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSubmenu, ContextMenuSubmenuTrigger, ContextMenuTrigger, CopyableCode, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemCount, DropdownMenuLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemIndicator, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EmptyState, EmptyStateActions, EmptyStateContent, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupInput, Kbd, KbdGroup, Label, LabelAsterisk, LabelOptional, LabelSub, NotificationCenter, NotificationCenterActionButton, NotificationCenterCount, NotificationCenterEmptyState, NotificationCenterHeader, NotificationCenterItem, NotificationCenterItemActions, NotificationCenterItemBody, NotificationCenterItemContent, NotificationCenterItemIcon, NotificationCenterItemRow, NotificationCenterItemTitle, NotificationCenterList, NotificationCenterPopup, NotificationCenterScroller, NotificationCenterTitle, NotificationCenterTrigger, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverPopup, PopoverPortal, PopoverSeparator, PopoverTitle, PopoverTrigger, PopoverViewport, RadioGroup, RadioGroupIndicator, RadioGroupItem, SegmentedControl, SegmentedControlCount, SegmentedControlItem, SegmentedControlLabel, Select, SelectArrow, SelectContent, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPopup, SelectPortal, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, Separator, SortableTabsList, SortableTabsTab, Spinner, Status, Switch, SwitchThumb, Tabs, TabsBackground, TabsIndicator, TabsLabel, TabsList, TabsPanel, TabsTab, Text, TextHeading, TextMono, TextSans, Textarea, TextareaCounter, TextareaGroup, ThemeProvider, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, buttonVariants, cn, useOrderedTabs, useTheme, useThemeFamily };
6036
+ export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Banner, BannerAction, BannerDescription, BannerTitle, Button, Checkbox, Combobox, ComboboxChip, ComboboxChipRemove, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxControl, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxHeader, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPortal, ComboboxRow, ComboboxSeparator, ComboboxTrigger, ComboboxTriggerIndicator, ComboboxValue, ContextMenu, ContextMenuCheckboxItem, ContextMenuCheckboxItemIndicator, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRadioItemIndicator, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSubmenu, ContextMenuSubmenuTrigger, ContextMenuTrigger, CopyableCode, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemCount, DropdownMenuLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemIndicator, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EmptyState, EmptyStateActions, EmptyStateContent, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupInput, Kbd, KbdGroup, Label, LabelAsterisk, LabelOptional, LabelSub, NotificationCenter, NotificationCenterActionButton, NotificationCenterCount, NotificationCenterEmptyState, NotificationCenterHeader, NotificationCenterItem, NotificationCenterItemActions, NotificationCenterItemBody, NotificationCenterItemContent, NotificationCenterItemIcon, NotificationCenterItemRow, NotificationCenterItemTitle, NotificationCenterList, NotificationCenterPopup, NotificationCenterScroller, NotificationCenterTitle, NotificationCenterTrigger, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverPopup, PopoverPortal, PopoverSeparator, PopoverTitle, PopoverTrigger, PopoverViewport, PreviewCard, PreviewCardArrow, PreviewCardContent, PreviewCardDescription, PreviewCardHeader, PreviewCardPopup, PreviewCardPortal, PreviewCardSeparator, PreviewCardTitle, PreviewCardTrigger, Progress, ProgressHeader, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupIndicator, RadioGroupItem, SegmentedControl, SegmentedControlCount, SegmentedControlItem, SegmentedControlLabel, Select, SelectArrow, SelectContent, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPopup, SelectPortal, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, SortableTabsList, SortableTabsTab, Spinner, Status, Switch, SwitchThumb, Tabs, TabsBackground, TabsIndicator, TabsLabel, TabsList, TabsPanel, TabsTab, Text, TextHeading, TextMono, TextSans, Textarea, TextareaCounter, TextareaGroup, ThemeProvider, ToastAction, ToastActions, ToastArrow, ToastBody, ToastClose, ToastContent, ToastDescription, ToastIcon, ToastPortal, ToastPositioner, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, buttonVariants, cn, createToastManager, toast, useOrderedTabs, useTheme, useThemeFamily, useToastManager };