@blakesteve/roster 4.8.1 → 4.8.2

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/roster.es.js CHANGED
@@ -4487,7 +4487,13 @@ const Jf = Z(
4487
4487
  },
4488
4488
  checked: {
4489
4489
  true: "",
4490
- false: "rst:bg-white rst:border-gray-300 rst:dark:bg-gray-900 rst:dark:border-gray-700 rst:text-transparent"
4490
+ /* The unchecked box reads `--roster-control-border` like every other
4491
+ field. It was gray-300 / gray-700 — 1.49:1 on white and 1.70:1 on a
4492
+ gray-900 surface — which is the same hairline the 1.4.11 pass raised
4493
+ on Input, Textarea and Select, on a control 1.4.11 covers at least as
4494
+ squarely. Left alone it would have sat next to an `outline` field
4495
+ with a visibly lighter edge. */
4496
+ false: "rst:bg-white rst:border-[var(--roster-control-border)] rst:dark:bg-gray-900 rst:text-transparent"
4491
4497
  },
4492
4498
  colorScheme: {
4493
4499
  primary: "",
@@ -4692,18 +4698,30 @@ const e0 = Z(
4692
4698
  variants: {
4693
4699
  variant: {
4694
4700
  white: "rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500",
4695
- soft: "rst:border-transparent rst:bg-gray-100 rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500 rst:dark:focus-visible:bg-gray-900",
4701
+ /* A boundary that does not depend on what is behind it. `soft` used
4702
+ `border-transparent` and leaned on its fill alone, which fails the
4703
+ moment the fill matches the surface — exactly 1.00:1 inside a
4704
+ `white` Dialog in dark mode, where both are gray-800, so the field
4705
+ vanished until focus. Reported twice in one app before anyone read
4706
+ the variant. The border is the same token `outline` reads, so a
4707
+ consumer repaints both at once. */
4708
+ soft: "rst:border-[var(--roster-control-border)] rst:bg-gray-100 rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:focus-visible:border-primary-400 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500 rst:dark:focus-visible:bg-gray-900",
4696
4709
  slate: "rst:border-transparent rst:bg-gray-700 rst:text-gray-100 rst:placeholder:text-gray-400 rst:focus-visible:bg-gray-600 rst:dark:bg-gray-900 rst:dark:placeholder:text-gray-500 rst:dark:focus-visible:bg-gray-800",
4697
4710
  /* The default variant, and the only one that reads tokens.
4698
- `Button`'s colors resolve through `--roster-*`, so remapping a palette
4699
- carries; these were hardcoded, so a consumer wanting a field border in
4700
- their own accent had no variant for it and no token to point at.
4701
- The four tokens default to exactly the values this variant used
4702
- before, so nothing moves for a consumer who sets none of them at
4703
- `:root`. The other four
4704
- variants stay opinionated on purpose: `white`, `soft`, `slate` and
4705
- `ghost` each name a specific surface, and a token that meant something
4706
- different in each would not be a token. */
4711
+ `Button`'s colors resolve through `--roster-*`, so remapping a palette
4712
+ carries; these were hardcoded, so a consumer wanting a field border in
4713
+ their own accent had no variant for it and no token to point at.
4714
+ Three of the four still default to what this variant used before.
4715
+ `--roster-control-border` does not: the 1.4.11 pass raised it two
4716
+ ramp steps, because gray-300 was a 1.49:1 hairline rather than a
4717
+ boundary — so field borders DO get heavier on a bump, deliberately.
4718
+
4719
+ `soft` reads that one token too. It is the only thing it borrows: a
4720
+ filled field cannot supply its own boundary on a surface it does not
4721
+ know, and `soft` leaning on fill alone made it invisible at 1.00:1
4722
+ inside a `white` Dialog in dark mode. `white`, `slate` and `ghost`
4723
+ stay fully opinionated — each names a specific surface, and a token
4724
+ that meant something different in each would not be a token. */
4707
4725
  outline: "rst:border-[var(--roster-control-border)] rst:bg-[var(--roster-control-bg)] rst:text-[var(--roster-control-text)] rst:placeholder:text-gray-400 rst:focus-visible:border-[var(--roster-control-border-focus)] rst:dark:placeholder:text-gray-500",
4708
4726
  ghost: "rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:placeholder:text-gray-400 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800"
4709
4727
  },
@@ -4789,7 +4807,7 @@ const e0 = Z(
4789
4807
  {
4790
4808
  className: P(
4791
4809
  "rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-left rst:mb-1.5 rst:transition-colors",
4792
- "rst:text-gray-900 rst:dark:text-gray-100",
4810
+ "rst:text-[var(--roster-control-text)]",
4793
4811
  "rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70"
4794
4812
  ),
4795
4813
  children: r
@@ -5295,7 +5313,9 @@ const y0 = Z(
5295
5313
  variants: {
5296
5314
  variant: {
5297
5315
  white: "rst:bg-white rst:text-gray-900 rst:ring-gray-300 rst:hover:bg-gray-50 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:ring-gray-700 rst:dark:hover:bg-gray-700",
5298
- soft: "rst:bg-gray-100 rst:text-gray-900 rst:ring-transparent rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",
5316
+ /* Same reasoning as Input's and Textarea's `soft`; the trigger draws a
5317
+ ring rather than a border, so the token lands there. */
5318
+ soft: "rst:bg-gray-100 rst:text-gray-900 rst:ring-[var(--roster-control-border)] rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",
5299
5319
  slate: "rst:bg-gray-700 rst:text-gray-100 rst:ring-transparent rst:hover:bg-gray-600 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800",
5300
5320
  /* The default variant, and the only one that reads tokens, exactly as
5301
5321
  in Input. It takes three of the four: focus on the trigger is the
@@ -5402,7 +5422,7 @@ const y0 = Z(
5402
5422
  className: P("rst:flex rst:flex-col rst:gap-1.5", l),
5403
5423
  ...g,
5404
5424
  children: [
5405
- d && /* @__PURE__ */ f.jsx(Fe, { className: "rst:block rst:text-sm rst:font-medium rst:text-inherit rst:text-left", children: d }),
5425
+ d && /* @__PURE__ */ f.jsx(Fe, { className: "rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left", children: d }),
5406
5426
  /* @__PURE__ */ f.jsx(
5407
5427
  Wd,
5408
5428
  {
@@ -5634,8 +5654,36 @@ const y0 = Z(
5634
5654
  {
5635
5655
  variants: {
5636
5656
  variant: {
5637
- outline: "rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-950 rst:dark:text-gray-100 rst:dark:focus-visible:border-primary-400",
5638
- soft: "rst:border-transparent rst:bg-gray-100 rst:text-gray-900 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:bg-gray-800/50 rst:dark:text-gray-100 rst:dark:focus-visible:bg-gray-900 rst:dark:focus-visible:border-primary-400",
5657
+ /* Reads `--roster-control-*`, the same four `Input` and `Select` read.
5658
+ 4.8.0 migrated those two and not this one, so an `Input` above a
5659
+ `Textarea` in the same form disagreed twice: light, the Input took
5660
+ the consumer's border token while this stayed gray-300; dark, the
5661
+ Input was transparent and followed its surface while this was
5662
+ gray-950, a near-black box on a gray-800 dialog. Both were reported
5663
+ by eye before anyone read the variants.
5664
+
5665
+ No `dark:placeholder:text-gray-500` here even though Input's
5666
+ `outline` carries one: Input has no placeholder rule in its base, so
5667
+ its variant supplies both scopes. This base already sets gray-400,
5668
+ and copying Input's line across darkened it to gray-500 — 3.30:1 on
5669
+ the page, under the 4.5:1 placeholder text needs.
5670
+
5671
+ The border and text defaults are the values this variant already
5672
+ used. The fill does change,
5673
+ from `bg-white` / `dark:bg-gray-950` to the token's `transparent` —
5674
+ which is invisible on the default page surfaces those two named, and
5675
+ is the entire point everywhere else: a field drawn inside a Dialog
5676
+ now takes the Dialog's surface instead of punching a white or
5677
+ near-black hole in it. */
5678
+ outline: "rst:border-[var(--roster-control-border)] rst:bg-[var(--roster-control-bg)] rst:text-[var(--roster-control-text)] rst:focus-visible:border-[var(--roster-control-border-focus)]",
5679
+ /* A boundary that does not depend on what is behind it. `soft` used
5680
+ `border-transparent` and leaned on its fill alone, which fails the
5681
+ moment the fill matches the surface — exactly 1.00:1 inside a
5682
+ `white` Dialog in dark mode, where both are gray-800, so the field
5683
+ vanished until focus. Reported twice in one app before anyone read
5684
+ the variant. The border is the same token `outline` reads, so a
5685
+ consumer repaints both at once. */
5686
+ soft: "rst:border-[var(--roster-control-border)] rst:bg-gray-100 rst:text-gray-900 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:bg-gray-800/50 rst:dark:text-gray-100 rst:dark:focus-visible:bg-gray-900 rst:dark:focus-visible:border-primary-400",
5639
5687
  ghost: "rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800",
5640
5688
  white: "rst:border-gray-200 rst:bg-white rst:text-gray-900 rst:focus-visible:border-primary-500 rst:dark:border-gray-800 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:focus-visible:border-primary-400"
5641
5689
  },
@@ -5680,7 +5728,9 @@ const y0 = Z(
5680
5728
  only because it spaces with `gap`, and the hidden element is
5681
5729
  `display: none` so it is not a flex item. */
5682
5730
  /* @__PURE__ */ f.jsxs(Qr, { className: P("rst:w-full", t), children: [
5683
- e && /* @__PURE__ */ f.jsx(Fe, { className: "rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-gray-900 rst:dark:text-gray-100 rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70 rst:text-left rst:mb-1.5", children: e }),
5731
+ e && /* `--roster-control-text`, matching Input's label — see the comment
5732
+ there for why not `text-inherit`. */
5733
+ /* @__PURE__ */ f.jsx(Fe, { className: "rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-[var(--roster-control-text)] rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70 rst:text-left rst:mb-1.5", children: e }),
5684
5734
  /* @__PURE__ */ f.jsx(
5685
5735
  Kf,
5686
5736
  {
@@ -8042,8 +8092,35 @@ const wm = Z(
8042
8092
  surface and stay opinionated — a token that meant something
8043
8093
  different inside each name would not be a token. */
8044
8094
  white: "rst:bg-[var(--roster-popover-bg)] rst:border-[var(--roster-popover-border)] rst:text-[var(--roster-popover-text)]",
8045
- slate: "rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800",
8046
- primary: "rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900",
8095
+ /* These two carry their own ring, because they are the two that invert.
8096
+ `--roster-ring` and `--roster-ring-offset` are declared once at
8097
+ `:root` and once under `.dark`, so they follow the PAGE — and on a
8098
+ light page that hands a dark panel the light-mode ring, primary-500
8099
+ on gray-700: 1.61:1, which is not a focus indicator. A consumer found
8100
+ it by saying the focus "was just not noticeable".
8101
+
8102
+ So the variant states what it knows: it is dark regardless of the
8103
+ page. primary-400 gives 3.80 on the light-mode slate and 6.47 on the
8104
+ dark one, 4.04 and 6.75 on `primary`. The offset is set to each
8105
+ surface's own color so the gap between border and ring reads as a
8106
+ gap rather than as a stray white or black line — the offset was the
8107
+ most visible part of the indicator before, at 10.27:1 against slate
8108
+ while the ring itself sat at 1.61.
8109
+
8110
+ The `--roster-control-*` trio rides along for the same reason, and
8111
+ fixing only the ring would have been worse than fixing neither: an
8112
+ `outline` field on these panels draws `--roster-control-text`, which
8113
+ is `:root`'s gray-900 on a light page — 1.70:1 on slate, 1.60:1 on
8114
+ primary. That has been true of `Input` since 4.8.0 and was about to
8115
+ become true of `Textarea`, which previously drew its own white box
8116
+ and so escaped it. A correct focus ring around illegible text is not
8117
+ an improvement. Inverted values give 9.42 / 16.03 for the text and
8118
+ 4.07 / 6.93 for the border.
8119
+
8120
+ `white` and `glass` are not here on purpose: both follow the page's
8121
+ scheme, so the page-level tokens are already right for them. */
8122
+ slate: "rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-gray-700,#44403c)] rst:dark:[--roster-ring-offset:var(--roster-gray-900,#1c1917)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",
8123
+ primary: "rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-primary-700,#084063)] rst:dark:[--roster-ring-offset:var(--roster-primary-950,#021724)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",
8047
8124
  glass: "rst:bg-white/80 rst:border-white/20 rst:backdrop-blur-xl rst:text-gray-900 rst:dark:bg-slate-900/80 rst:dark:border-slate-700/50 rst:dark:text-white rst:shadow-2xl rst:dark:shadow-black/50"
8048
8125
  },
8049
8126
  status: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blakesteve/roster",
3
- "version": "4.8.1",
3
+ "version": "4.8.2",
4
4
  "description": "A production-grade atomic component library: accessible, theme-aware, and documented in Storybook. React 19, TypeScript, Tailwind CSS v4.",
5
5
  "keywords": [
6
6
  "react",