@salemcobalt/ui 0.2.0-rc.15 → 0.2.0-rc.17

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.15 — requires @salemcobalt/tokens/css. */
1
+ /* @salemcobalt/ui 0.2.0-rc.17 — requires @salemcobalt/tokens/css. */
2
2
  @layer sc {
3
3
  /* ---- base.css ---- */
4
4
  /* Shared: focus ring, reduced motion. Component files follow. */
@@ -2072,6 +2072,37 @@
2072
2072
  .sc-priority-nav__ellipsis {
2073
2073
  display: none;
2074
2074
  }
2075
+ /* Item badge (`badge`): a count pill or a dot after the label, in accent. Decorative (aria-hidden); the link's
2076
+ name carries `badgeLabel`. "More" shows the collapsed items' badges summed. No transition or animation. */
2077
+ .sc-priority-nav__badge {
2078
+ display: inline-grid;
2079
+ place-items: center;
2080
+ flex: none;
2081
+ box-sizing: border-box;
2082
+ border-radius: var(--sc-radius-full);
2083
+ background: var(--sc-color-accent-default);
2084
+ color: var(--sc-color-text-on-accent);
2085
+ pointer-events: none;
2086
+ }
2087
+ .sc-priority-nav__badge[data-kind='count'] {
2088
+ min-inline-size: var(--sc-size-icon-md);
2089
+ block-size: var(--sc-size-icon-md);
2090
+ padding-inline: var(--sc-spacing-3xs);
2091
+ font-size: var(--sc-font-size-xs);
2092
+ font-weight: var(--sc-font-weight-semibold);
2093
+ font-variant-numeric: tabular-nums;
2094
+ line-height: 1;
2095
+ }
2096
+ .sc-priority-nav__badge[data-kind='dot'] {
2097
+ inline-size: 8px;
2098
+ block-size: 8px;
2099
+ }
2100
+ .sc-priority-nav__panel .sc-priority-nav__badge {
2101
+ margin-inline-start: auto;
2102
+ }
2103
+ .sc-priority-nav__toggle {
2104
+ position: relative;
2105
+ }
2075
2106
  @container sc-priority-nav (inline-size <= 400px) {
2076
2107
  .sc-priority-nav__toggle {
2077
2108
  justify-content: center;
@@ -2084,6 +2115,17 @@
2084
2115
  .sc-priority-nav__chevron {
2085
2116
  display: none;
2086
2117
  }
2118
+ /* Icon-only: the badge sits on the toggle's inline-end corner, ringed like IconButton's dot. */
2119
+ .sc-priority-nav__toggle > .sc-priority-nav__badge {
2120
+ position: absolute;
2121
+ inset-block-start: 0;
2122
+ inset-inline-end: 0;
2123
+ box-shadow: 0 0 0 var(--sc-border-width-focus) var(--sc-color-surface-default);
2124
+ }
2125
+ .sc-priority-nav__toggle > .sc-priority-nav__badge[data-kind='dot'] {
2126
+ inset-block-start: var(--sc-spacing-2xs);
2127
+ inset-inline-end: var(--sc-spacing-2xs);
2128
+ }
2087
2129
  /* Visually hidden, still part of the accessible name ("More, 3 links"). */
2088
2130
  .sc-priority-nav__toggle-label {
2089
2131
  position: absolute;
@@ -5395,6 +5437,12 @@
5395
5437
  --_solid: var(--sc-color-danger-solid);
5396
5438
  --_on-solid: var(--sc-color-text-on-status);
5397
5439
  }
5440
+ /* Not scored (`value={null}`): no tone, a muted dash on the neutral tile or inside an empty ring. --_solid stays
5441
+ accent, so a selected row still turns the tile solid accent, as neutral does. */
5442
+ .sc-score[data-unscored] {
5443
+ --_bg: var(--sc-color-surface-active);
5444
+ --_fg: var(--sc-color-text-muted);
5445
+ }
5398
5446
  .sc-score__body {
5399
5447
  display: grid;
5400
5448
  justify-items: center;
@@ -5458,8 +5506,9 @@
5458
5506
  stroke-linecap: round;
5459
5507
  stroke-dasharray: 100;
5460
5508
  stroke-dashoffset: calc(100 - var(--sc-score-fill, 0));
5461
- /* Moves only when the value changes; the first render draws it in place. */
5462
- transition: stroke-dashoffset var(--sc-duration-slow) var(--sc-ease-enter);
5509
+ /* Moves only when the value changes; the first render draws it in place. The data motion (600ms, a long soft
5510
+ landing) is what makes a change from one score to the next read; the 300ms panel timing was over too soon. */
5511
+ transition: stroke-dashoffset var(--sc-duration-data) var(--sc-ease-data);
5463
5512
  }
5464
5513
  .sc-score[data-variant='ring'] .sc-score__body {
5465
5514
  position: relative;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salemcobalt/ui",
3
- "version": "0.2.0-rc.15",
3
+ "version": "0.2.0-rc.17",
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.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "peerDependencies": {
34
34
  "react": "^19.0.0",
35
35
  "react-dom": "^19.0.0",
36
- "@salemcobalt/tokens": "^0.2.0-rc.15"
36
+ "@salemcobalt/tokens": "^0.2.0-rc.17"
37
37
  },
38
38
  "dependencies": {
39
39
  "@base-ui/react": "^1.9.0",
@@ -57,7 +57,7 @@
57
57
  "tsup": "^9.0.0",
58
58
  "typescript": "^5.9.3",
59
59
  "vitest": "^5.0.5",
60
- "@salemcobalt/tokens": "^0.2.0-rc.15"
60
+ "@salemcobalt/tokens": "^0.2.0-rc.17"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public"