@tradalab/lyra 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/package.json +1 -1
- package/styles/globals.css +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,28 @@ import { Button, Card, CardHeader } from "@tradalab/lyra/ui"
|
|
|
39
39
|
import { AppShell, NavItem } from "@tradalab/lyra/shell"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
## Toast
|
|
43
|
+
|
|
44
|
+
`2.0.0` replaced the sonner-based toast with shadcn's Base UI Toast. `sonner` is
|
|
45
|
+
gone — it is no longer a peer dependency, and apps should drop it.
|
|
46
|
+
|
|
47
|
+
`toast` is a **manager object, not a callable**:
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { Toaster, toast } from "@tradalab/lyra/ui"
|
|
51
|
+
|
|
52
|
+
toast.add({ title: "Saved" })
|
|
53
|
+
toast.add({ title: "Upload failed", description: err.message, type: "error" })
|
|
54
|
+
const id = toast.add({ title: "Uploading…", type: "loading", timeout: 0 })
|
|
55
|
+
toast.close(id)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`type` is `"success" | "error" | "info" | "warning" | "loading"` — there is no
|
|
59
|
+
`toast.success("x")`. `timeout: 0` never auto-dismisses (sonner's `duration:
|
|
60
|
+
Infinity`). Position belongs to the viewport this package styles, so sonner's
|
|
61
|
+
`position` and `richColors` props have no equivalent. Mount `<Toaster/>` once —
|
|
62
|
+
apps on `@tradalab/nekit` already get it from `NekitProvider`.
|
|
63
|
+
|
|
42
64
|
## Develop
|
|
43
65
|
|
|
44
66
|
```bash
|
package/package.json
CHANGED
package/styles/globals.css
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
--chart-3: oklch(0.439 0 0);
|
|
94
94
|
--chart-4: oklch(0.371 0 0);
|
|
95
95
|
--chart-5: oklch(0.269 0 0);
|
|
96
|
-
--radius: 0
|
|
96
|
+
--radius: 0; /* tradalab UI is flat — square corners (rounded-{sm..4xl} → 0) */
|
|
97
97
|
--sidebar: oklch(0.985 0 0);
|
|
98
98
|
--sidebar-foreground: oklch(0.145 0 0);
|
|
99
99
|
--sidebar-primary: oklch(0.205 0 0);
|