@wallarm-org/design-system 1.18.1 → 1.18.2

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.
@@ -1,17 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export declare const SIMPLE_TOAST_DURATION_MS = 5000;
3
3
  export declare const EXTENDED_TOAST_DURATION_MS = 10000;
4
- /**
5
- * The fields a toast is actually made of.
6
- *
7
- * Kept apart from `ToastData` so they survive an `Omit`: an index signature
8
- * swallows every named field it is declared beside, which left
9
- * `ToastCreateOptions` — `Omit<ToastData, 'id'>` — checking nothing at all
10
- * (`toaster.create({ titl: 'x' })` compiled) and widening each field back to
11
- * `unknown` under the declaration compiler, invisibly to `tsc --noEmit`.
12
- */
13
- export interface ToastFields {
14
- id: string;
4
+ export interface ToastOptions {
15
5
  title?: string;
16
6
  description?: string;
17
7
  type?: 'success' | 'error' | 'warning' | 'info' | 'loading' | 'default';
@@ -22,8 +12,8 @@ export interface ToastFields {
22
12
  closable?: boolean;
23
13
  duration?: number;
24
14
  }
25
- export interface ToastData extends ToastFields {
26
- [key: string]: unknown;
15
+ export interface ToastData extends ToastOptions {
16
+ id: string;
27
17
  }
28
18
  export interface ToastProps {
29
19
  toast: ToastData;
@@ -32,4 +22,4 @@ export declare function Toast({ toast }: ToastProps): import("react").JSX.Elemen
32
22
  export declare namespace Toast {
33
23
  var displayName: string;
34
24
  }
35
- export declare const resolveToastVariant: (variant: ToastFields['variant'], description: ToastFields['description']) => NonNullable<ToastFields['variant']>;
25
+ export declare const resolveToastVariant: (variant: ToastOptions['variant'], description: ToastOptions['description']) => NonNullable<ToastOptions['variant']>;
@@ -1,12 +1,19 @@
1
1
  import type { FC } from 'react';
2
2
  import { type CreateToasterReturn } from '@ark-ui/react/toast';
3
- import { type ToastFields } from './Toast';
4
- export interface ToastCreateOptions extends Omit<ToastFields, 'id'> {
3
+ import { type ToastOptions } from './Toast';
4
+ export interface ToastCreateOptions extends ToastOptions {
5
+ /**
6
+ * Stable id for this toast. Creating with an id that is already showing
7
+ * updates that toast instead of stacking a duplicate, which is how a caller
8
+ * keeps a repeated action (copy to clipboard, say) to one visible toast.
9
+ * Omit it and the toaster assigns one.
10
+ */
11
+ id?: string;
5
12
  priority?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
6
13
  }
7
14
  export interface TypedToaster extends Omit<CreateToasterReturn, 'create' | 'update'> {
8
15
  create: (options: ToastCreateOptions) => string;
9
- update: (id: string, options: Partial<ToastCreateOptions>) => string;
16
+ update: (id: string, options: Omit<Partial<ToastCreateOptions>, 'id'>) => string;
10
17
  __arkToaster: CreateToasterReturn;
11
18
  }
12
19
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.18.0",
3
- "generatedAt": "2026-09-08T14:43:53.098Z",
2
+ "version": "1.18.1",
3
+ "generatedAt": "2026-09-08T15:27:22.704Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "1.18.1",
3
+ "version": "1.18.2",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",