@carbonid1/design-system 7.6.1 → 7.6.3
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/Toaster/Toaster.js
CHANGED
|
@@ -55,5 +55,7 @@ const ToastList = ({ richColors }) => {
|
|
|
55
55
|
item.type === 'error' &&
|
|
56
56
|
'border-destructive/40 dark:border-destructive/50 bg-[color-mix(in_oklab,var(--popover)_90%,var(--destructive))]'), children: _jsxs(BaseToast.Content, { className: "flex h-full items-start gap-3 overflow-hidden p-3 transition-opacity duration-180 ease-[cubic-bezier(0.23,1,0.32,1)] data-behind:opacity-0 data-expanded:opacity-100 motion-reduce:transition-none", children: [item.type === 'success' && (_jsx(CircleCheck, { className: "text-success-foreground mt-0.5 size-4 shrink-0", "aria-hidden": "true" })), item.type === 'error' && (_jsx(CircleAlert, { className: "text-destructive mt-0.5 size-4 shrink-0", "aria-hidden": "true" })), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(BaseToast.Title, { className: "m-0 text-sm leading-5 font-medium break-words" }), item.description !== undefined && (_jsx(BaseToast.Description, { className: "text-muted-foreground mt-0.5 mb-0 text-sm leading-5 break-words" }))] }), (item.actionProps || item.data?.closeButton) && (_jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsx(BaseToast.Action, { className: buttonVariants({ variant: 'outline', size: 'default' }) }), item.data?.closeButton && (_jsx(BaseToast.Close, { "aria-label": "Close toast", className: buttonVariants({ variant: 'subtle', size: 'icon' }), children: _jsx(X, { "aria-hidden": "true" }) }))] }))] }) }, item.id)));
|
|
57
57
|
};
|
|
58
|
-
const Toaster = ({ className, duration = DEFAULT_DURATION, richColors = false, visibleToasts = DEFAULT_VISIBLE_TOASTS, }) => (_jsx(BaseToast.Provider, { limit: visibleToasts, timeout: duration, toastManager: toastManager, children: _jsx(BaseToast.Portal, { children: _jsx(BaseToast.Viewport, { className: cn(
|
|
58
|
+
const Toaster = ({ className, duration = DEFAULT_DURATION, richColors = false, visibleToasts = DEFAULT_VISIBLE_TOASTS, }) => (_jsx(BaseToast.Provider, { limit: visibleToasts, timeout: duration, toastManager: toastManager, children: _jsx(BaseToast.Portal, { children: _jsx(BaseToast.Viewport, { className: cn(
|
|
59
|
+
// Toast actions must stay above dialogs and popovers, whose default layer is z-50.
|
|
60
|
+
'fixed right-[max(1rem,env(safe-area-inset-right))] bottom-[max(1rem,env(safe-area-inset-bottom))] z-60 w-[calc(100vw-2rem)] outline-none sm:right-6 sm:bottom-6 sm:w-[22.5rem]', className), children: _jsx(ToastList, { richColors: richColors }) }) }) }));
|
|
59
61
|
export { Toaster, toast };
|
package/package.json
CHANGED
|
@@ -11,13 +11,13 @@ Run these commands from `packages/design-system`:
|
|
|
11
11
|
|
|
12
12
|
## Look at it with agent-browser
|
|
13
13
|
|
|
14
|
-
Story tests prove behavior, not appearance. When a change can affect rendering, drive the affected stories with the
|
|
14
|
+
Story tests prove behavior, not appearance. When a change can affect rendering, drive the affected stories with the globally installed `agent-browser` CLI and open the screenshots with an image viewer. A screenshot command that succeeds is not a visual pass. Playwright stays the Vitest browser provider and e2e runner; don't write ad-hoc Playwright scripts to inspect stories.
|
|
15
15
|
|
|
16
|
-
- Read the CLI's guide first: `
|
|
17
|
-
- Run every call in your own session: `--session "$(
|
|
16
|
+
- Read the CLI's guide first: `agent-browser skills get core`.
|
|
17
|
+
- Run every call in your own session: `--session "$(agent-browser session id --scope worktree --prefix ds)"`.
|
|
18
18
|
- Open a story in isolation at `http://localhost:7006/iframe.html?id=<story-id>&viewMode=story`. Story ids are in `http://localhost:7006/index.json`. Before reusing a running Storybook, confirm it serves this checkout.
|
|
19
19
|
- Palettes and modes go in the URL: `&globals=palette:dashboard;theme:dark`. For reduced motion, use `set media light reduced-motion`.
|
|
20
|
-
- For High Contrast (forced colors),
|
|
20
|
+
- For High Contrast (forced colors), pass `--args "--force-high-contrast"` on every command, not just `open`; a command without it relaunches the browser without forced colors. Confirm it took with `eval "matchMedia('(forced-colors: active)').matches"`. The forced palette is dark.
|
|
21
21
|
- Drive only the states the change touches, with real input: `press Tab` for focus-visible, plus clicks and typing. For a fix, screenshot the broken state before editing so you can compare.
|
|
22
22
|
- When done, `close` the session and stop any Storybook you started.
|
|
23
23
|
|