@salemcobalt/ui 0.2.0-rc.28 → 0.2.0-rc.29

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/styles.css CHANGED
@@ -1,4 +1,4 @@
1
- /* @salemcobalt/ui 0.2.0-rc.28 — requires @salemcobalt/tokens/css. */
1
+ /* @salemcobalt/ui 0.2.0-rc.29 — requires @salemcobalt/tokens/css. */
2
2
  @layer sc {
3
3
  /* ---- base.css ---- */
4
4
  /* Shared: focus ring, reduced motion. Component files follow. */
@@ -3028,6 +3028,8 @@
3028
3028
  translate var(--sc-duration-base) var(--sc-ease-standard);
3029
3029
  }
3030
3030
  .sc-selection-bar[data-open] {
3031
+ /* Toasts sit above it (toast.css). */
3032
+ anchor-name: --sc-bottom-bar;
3031
3033
  opacity: 1;
3032
3034
  translate: none;
3033
3035
  pointer-events: auto;
@@ -3067,18 +3069,32 @@
3067
3069
 
3068
3070
  /* ---- toast.css ---- */
3069
3071
  /* ---- Toast ----------------------------------------------------------------- */
3072
+ /* Bottom-end, clear of a bar fixed along the bottom: an open SelectionBar, or any bar of the app's that sets
3073
+ `anchor-name: --sc-bottom-bar`. Without one, the gutter. Phones use the md gutter on both sides. */
3070
3074
  .sc-toast-viewport {
3075
+ --_gutter: var(--sc-spacing-lg);
3076
+ --_bottom: calc(var(--_gutter) + env(safe-area-inset-bottom, 0px));
3071
3077
  position: fixed;
3072
- inset-block-end: var(--sc-spacing-lg);
3073
- inset-inline-end: var(--sc-spacing-lg);
3078
+ inset-block-end: var(--_bottom);
3079
+ inset-inline-end: var(--_gutter);
3074
3080
  z-index: var(--sc-z-toast);
3075
3081
  display: flex;
3076
3082
  flex-direction: column;
3077
3083
  align-items: flex-end;
3078
3084
  gap: var(--sc-spacing-xs);
3079
- inline-size: min(360px, 100vw - 2 * var(--sc-spacing-md));
3085
+ inline-size: min(360px, 100vw - 2 * var(--_gutter));
3080
3086
  outline: none;
3081
3087
  }
3088
+ @supports (anchor-name: --a) {
3089
+ .sc-toast-viewport {
3090
+ inset-block-end: max(var(--_bottom), calc(anchor(--sc-bottom-bar top, 0px) + var(--sc-spacing-xs)));
3091
+ }
3092
+ }
3093
+ @media (width < 640px) {
3094
+ .sc-toast-viewport {
3095
+ --_gutter: var(--sc-spacing-md);
3096
+ }
3097
+ }
3082
3098
  /* A raised surface, so washes inside use the raised tokens (docs/adr/0003). */
3083
3099
  .sc-toast {
3084
3100
  --sc-color-surface-hover: var(--sc-color-surface-raised-hover);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salemcobalt/ui",
3
- "version": "0.2.0-rc.28",
3
+ "version": "0.2.0-rc.29",
4
4
  "description": "React components for the Salem Cobalt design system: Button, IconButton, Icon set, BroomIcon, Badge, Card, Stack, Inline, Kbd, Dialog, FullScreenFlow, Tooltip, Menu, Popover, PriorityNav, Toolbar, Banner, Spinner, Progress, Tabs, Input, Textarea, Select, FileInput, Checkbox, Switch, Heading, Text, Table, Stat, Chip, Disclosure, EmptyState, Skeleton, Score, ReasonList, WordDiff, Quote; TextEditor (CodeMirror 6, inline word diffs) at @salemcobalt/ui/editor.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,7 +46,7 @@
46
46
  "diff": "^8.0.4",
47
47
  "react": "^19.0.0",
48
48
  "react-dom": "^19.0.0",
49
- "@salemcobalt/tokens": "^0.2.0-rc.28"
49
+ "@salemcobalt/tokens": "^0.2.0-rc.29"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@codemirror/commands": {
@@ -109,7 +109,7 @@
109
109
  "tsup": "^9.0.0",
110
110
  "typescript": "^5.9.3",
111
111
  "vitest": "^5.0.5",
112
- "@salemcobalt/tokens": "^0.2.0-rc.28"
112
+ "@salemcobalt/tokens": "^0.2.0-rc.29"
113
113
  },
114
114
  "publishConfig": {
115
115
  "access": "public"