@bimetal/toast-themes 0.35.0 → 0.36.0
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/package.json +3 -2
- package/src/components.css +29 -4
- package/src/index.css.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bimetal/toast-themes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Framework-agnostic CSS theme + design tokens for the BIMETAL toast (light/dark, WCAG-AA variants). Styles the canonical .bm-toast* contract the toast-{fw}-components render.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
"LICENSE"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "node scripts/generate-css-stubs.mjs",
|
|
18
|
+
"build": "node ../../../scripts/generate-css-stubs.mjs",
|
|
19
19
|
"test": "vitest run",
|
|
20
|
+
"typecheck": "tsc --noEmit -p tsconfig.test.json",
|
|
20
21
|
"prepublishOnly": "npm run build"
|
|
21
22
|
},
|
|
22
23
|
"sideEffects": [
|
package/src/components.css
CHANGED
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
pointer-events: none; /* the empty gaps don't eat host clicks; toasts re-enable it */
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/* mcp-91 (C-4): the class names are LOGICAL (start/end) — map them to logical
|
|
16
|
+
insets too, or a "start" toast sits left under dir=rtl. Alignment mirrors
|
|
17
|
+
with the inset via flex-start/-end (writing-mode aware). */
|
|
18
|
+
.bm-toast__viewport--top-start { top: 16px; inset-inline-start: 16px; align-items: flex-start; }
|
|
16
19
|
.bm-toast__viewport--top-center { top: 16px; left: 50%; transform: translateX(-50%); align-items: center; }
|
|
17
|
-
.bm-toast__viewport--top-end { top: 16px;
|
|
18
|
-
.bm-toast__viewport--bottom-start { bottom: 16px;
|
|
20
|
+
.bm-toast__viewport--top-end { top: 16px; inset-inline-end: 16px; align-items: flex-end; }
|
|
21
|
+
.bm-toast__viewport--bottom-start { bottom: 16px; inset-inline-start: 16px; align-items: flex-start; flex-direction: column-reverse; }
|
|
19
22
|
.bm-toast__viewport--bottom-center { bottom: 16px; left: 50%; transform: translateX(-50%); align-items: center; flex-direction: column-reverse; }
|
|
20
|
-
.bm-toast__viewport--bottom-end { bottom: 16px;
|
|
23
|
+
.bm-toast__viewport--bottom-end { bottom: 16px; inset-inline-end: 16px; align-items: flex-end; flex-direction: column-reverse; }
|
|
21
24
|
|
|
22
25
|
/* ── One toast ── */
|
|
23
26
|
.bm-toast {
|
|
@@ -51,6 +54,28 @@
|
|
|
51
54
|
overflow-wrap: anywhere;
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
/* mcp-63: the inline action — the Undo-USP's missing piece. Same text colour as
|
|
58
|
+
the toast (variants recolour the toast root), bold + underline as affordance;
|
|
59
|
+
min sizes keep it a WCAG-2.5.8-conforming target. */
|
|
60
|
+
.bm-toast__action {
|
|
61
|
+
background: none;
|
|
62
|
+
border: none;
|
|
63
|
+
color: inherit;
|
|
64
|
+
font: inherit;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
padding: 2px 6px;
|
|
69
|
+
min-width: 24px;
|
|
70
|
+
min-height: 24px;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.bm-toast__action:focus-visible {
|
|
75
|
+
outline: 2px solid var(--bmt-focus-ring, currentColor);
|
|
76
|
+
outline-offset: 1px;
|
|
77
|
+
}
|
|
78
|
+
|
|
54
79
|
.bm-toast__close {
|
|
55
80
|
flex: 0 0 auto;
|
|
56
81
|
appearance: none;
|
package/src/index.css.d.ts
CHANGED