@salemcobalt/ui 0.2.0-rc.30 → 0.2.0-rc.31

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.30 — requires @salemcobalt/tokens/css. */
1
+ /* @salemcobalt/ui 0.2.0-rc.31 — requires @salemcobalt/tokens/css. */
2
2
  @layer sc {
3
3
  /* ---- base.css ---- */
4
4
  /* Shared: focus ring, reduced motion. Component files follow. */
@@ -20,6 +20,26 @@
20
20
  outline: var(--sc-border-width-focus) solid var(--sc-color-border-focus);
21
21
  outline-offset: var(--sc-border-width-focus);
22
22
  }
23
+ /* Controls on an accent fill. The scope repoints the semantic tokens its descendants read, the way raised surfaces
24
+ repoint the washes (docs/adr/0003), so secondary and ghost Buttons, IconButtons, muted text and focus rings inside
25
+ need no rules of their own: text, strong borders and focus rings take text.on-accent; hover and pressed take
26
+ accent.hover and accent.active, the primary Button's states. The element's own focus ring is outside the fill, so it
27
+ keeps its colour by setting it again. Contrast: packages/tokens/test/contrast.test.ts. */
28
+ .sc-on-accent,
29
+ .sc-toast[data-tone='accent'] {
30
+ --sc-color-text-default: var(--sc-color-text-on-accent);
31
+ --sc-color-text-muted: var(--sc-color-text-on-accent);
32
+ --sc-color-border-strong: var(--sc-color-text-on-accent);
33
+ --sc-color-border-focus: var(--sc-color-text-on-accent);
34
+ --sc-color-surface-hover: var(--sc-color-accent-hover);
35
+ --sc-color-surface-active: var(--sc-color-accent-active);
36
+ background: var(--sc-color-accent-default);
37
+ color: var(--sc-color-text-on-accent);
38
+ }
39
+ .sc-on-accent:focus-visible,
40
+ .sc-toast[data-tone='accent']:focus-visible {
41
+ outline-color: var(--sc-color-accent-default);
42
+ }
23
43
  /* Keeps content for assistive tech only. */
24
44
  .sc-visually-hidden {
25
45
  position: absolute;
@@ -3130,6 +3150,10 @@
3130
3150
  .sc-toast[data-tone='danger'] {
3131
3151
  border-inline-start-color: var(--sc-color-danger-solid);
3132
3152
  }
3153
+ /* Filled; the fill, text and button states come from the .sc-on-accent scope (base.css). */
3154
+ .sc-toast[data-tone='accent'] {
3155
+ border-color: var(--sc-color-accent-default);
3156
+ }
3133
3157
  .sc-toast[data-starting-style],
3134
3158
  .sc-toast[data-ending-style] {
3135
3159
  opacity: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salemcobalt/ui",
3
- "version": "0.2.0-rc.30",
3
+ "version": "0.2.0-rc.31",
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.30"
49
+ "@salemcobalt/tokens": "^0.2.0-rc.31"
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.30"
112
+ "@salemcobalt/tokens": "^0.2.0-rc.31"
113
113
  },
114
114
  "publishConfig": {
115
115
  "access": "public"