@redseed/redseed-ui-tailwindcss 7.70.0 → 7.71.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.
@@ -32,24 +32,34 @@
32
32
  @apply text-sm font-medium;
33
33
  @apply bg-background-primary-contrast text-text-on-color border border-transparent;
34
34
 
35
- /* BOTTOM-LEFT, and it must clear two things the toast cannot see.
36
-
37
- --rsui-toast-offset is the sticky action bar. The standards are explicit that a
38
- toast sits ABOVE such a bar and never over it — the bar owns the bottom edge —
39
- but only the page knows whether it has one, and how tall. Set it on :root, NOT on
40
- a wrapper: the toast is teleported to the body, so a custom property declared on
41
- an ancestor in the consumer's tree never reaches it. The default of 0 means an
42
- ordinary page needs nothing.
35
+ /* BOTTOM-LEFT, and it must clear three things the toast cannot see. Both offsets
36
+ below go on :root, NOT on a wrapper: the toast is teleported to the body, so a
37
+ custom property declared anywhere in the consumer's component tree never reaches
38
+ it. Both default to 0, so an ordinary page sets neither.
39
+
40
+ --rsui-toast-offset moves it UP. Written for a sticky action bar — the standards
41
+ are explicit that a toast sits above one and never over it, because the bar owns
42
+ the bottom edge — but it serves any furniture parked in that corner. In the LMS
43
+ that is the Help Scout Beacon launcher.
44
+
45
+ --rsui-toast-offset-inline moves it IN, and exists for the same reason one corner
46
+ can hold two things: clearing a launcher vertically is not enough if the toast then
47
+ sits flush to the viewport edge while the launcher is indented, because the two
48
+ read as misaligned rather than stacked. The page knows its own left gutter; the
49
+ toast cannot. (Unsuffixed is the vertical axis, for backwards compatibility with
50
+ the name that shipped in 10.1.0.)
43
51
 
44
52
  env(safe-area-inset-bottom) is the home indicator. A toast is the last thing above
45
53
  the bottom edge on a phone, so the inset is a FLOOR under the spacing rather than
46
54
  an addition to it — the same max() shape drawer.css and modal.css already use. */
47
- left: 1rem;
55
+ left: calc(1rem + var(--rsui-toast-offset-inline, 0px));
48
56
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + var(--rsui-toast-offset, 0px));
49
57
 
50
58
  /* Brief, so it is never a paragraph. Wide enough for a sentence, capped so it does
51
- not stretch across a desktop, and held off both edges on a narrow screen. */
52
- max-width: min(28rem, calc(100vw - 2rem));
59
+ not stretch across a desktop, and held off both edges on a narrow screen — the
60
+ inline offset is subtracted too, or pushing the toast right would run it off the
61
+ opposite edge on a phone. */
62
+ max-width: min(28rem, calc(100vw - 2rem - var(--rsui-toast-offset-inline, 0px)));
53
63
  }
54
64
 
55
65
  /* The message is the only part allowed to grow, so the action and the close button keep
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-tailwindcss",
3
- "version": "7.70.0",
3
+ "version": "7.71.0",
4
4
  "description": "RedSeed UI Tailwindcss",
5
5
  "main": "index.js",
6
6
  "style": "index.css",