@xsolla/xui-toast 0.189.1 → 0.189.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.
Files changed (2) hide show
  1. package/README.md +10 -21
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -6,45 +6,34 @@ A cross-platform toast notification system matching the base Figma toast. Use it
6
6
  A toast is a short, non-blocking message that appears temporarily to inform the user about the result of an action or a change in system state. It appears as a compact bar that slides in from the top of the screen, stays briefly, then dismisses automatically — or can be dismissed manually.
7
7
 
8
8
  ### When to use
9
-
10
9
  - To confirm that an action was completed successfully (e.g. *"Profile updated"*)
11
10
  - To notify the user of a background event they didn't directly trigger (e.g. *"New rewards available"*)
12
11
  - To surface a non-critical warning that doesn't block the user from continuing
13
12
  - To inform about an error that occurred in the background (e.g. *"Connection lost"*)
14
13
 
15
14
  ### When not to use
16
-
17
- For critical errors that require the user to take action before continuing — use a modal or inline error instead
18
-
19
- For information that the user needs to refer back to — toasts disappear and can't be recalled
15
+ - For critical errors that require the user to take action before continuing — use a modal or inline error instead
16
+ - For information that the user needs to refer back to — toasts disappear and can't be recalled
20
17
  - For complex messages with multiple actions — keep it to one optional CTA at most
21
18
  - As a substitute for form validation errors — those belong inline next to the relevant field
22
19
 
23
20
  ### Content guidelines
24
-
25
- Title should be short and specific — 1 to 5 words: *"Profile saved"*, *"Connection lost"*, *"Reward claimed"*
26
-
27
- Subtitle is optional — use it to add one line of supporting context, not to repeat the title
28
-
29
- Button label should be a clear verb: *"Undo"*, *"Retry"*, *"View"* — not *"OK"* or *"Click here"*
21
+ - Title should be short and specific — 1 to 5 words: *"Profile saved"*, *"Connection lost"*, *"Reward claimed"*
22
+ - Subtitle is optional — use it to add one line of supporting context, not to repeat the title
23
+ - Button label should be a clear verb: *"Undo"*, *"Retry"*, *"View"* — not *"OK"* or *"Click here"*
30
24
  - Avoid exclamation marks or dramatic language — keep the tone calm and factual
31
25
  - Match the type to the message: use Alert only for errors, Warning for caution, Success for positive outcomes, Neutral for informational messages
32
26
 
33
27
  ### Behaviour guidelines
34
-
35
- Toasts appear at the top of the viewport, offset from the status bar or navigation
36
-
37
- They auto-dismiss after a set duration (typically 3–5 seconds) — the exact timing is set at the product layer
38
-
39
- When Button=False, a close (×) icon is shown — tapping it dismisses the toast immediately
40
-
41
- When Button=True, the action button replaces the close icon — the toast can be dismissed by tapping the button or waiting for auto-dismiss
28
+ - Toasts appear at the top of the viewport, offset from the status bar or navigation
29
+ - They auto-dismiss after a set duration (typically 3–5 seconds) — the exact timing is set at the product layer
30
+ - When Button=False, a close (×) icon is shown — tapping it dismisses the toast immediately
31
+ - When Button=True, the action button replaces the close icon — the toast can be dismissed by tapping the button or waiting for auto-dismiss
42
32
  - Multiple toasts stack in a ToastGroup — see below
43
33
  - Toasts do not block interaction with the rest of the screen
44
34
 
45
35
  ### Accessibility
46
-
47
- Use role=*"status"* for Neutral and Success toasts — screen readers announce them without interrupting the user
36
+ - Use role=*"status"* for Neutral and Success toasts — screen readers announce them without interrupting the user
48
37
  - Use role=*"alert"* for Warning and Alert toasts — these are announced immediately
49
38
  - The close button must have aria-label=*"Dismiss notification"*
50
39
  - Do not rely on color alone to convey the type — the icon and text must also communicate it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-toast",
3
- "version": "0.189.1",
3
+ "version": "0.189.3",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -14,10 +14,10 @@
14
14
  "test:coverage": "vitest run --coverage"
15
15
  },
16
16
  "dependencies": {
17
- "@xsolla/xui-core": "0.189.1",
18
- "@xsolla/xui-icons": "0.189.1",
19
- "@xsolla/xui-icons-base": "0.189.1",
20
- "@xsolla/xui-primitives-core": "0.189.1"
17
+ "@xsolla/xui-core": "0.189.3",
18
+ "@xsolla/xui-icons": "0.189.3",
19
+ "@xsolla/xui-icons-base": "0.189.3",
20
+ "@xsolla/xui-primitives-core": "0.189.3"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=16.8.0",