@blakesteve/roster 4.9.0 → 4.10.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.
- package/README.md +30 -0
- package/dist/meta.json +2 -2
- package/dist/roster.cjs.js +1 -1
- package/dist/roster.css +1 -1
- package/dist/roster.es.js +82 -19
- package/package.json +1 -1
package/dist/roster.es.js
CHANGED
|
@@ -9395,16 +9395,66 @@ const Eg = st("rst:flex rst:flex-col rst:text-left", {
|
|
|
9395
9395
|
})
|
|
9396
9396
|
] }) });
|
|
9397
9397
|
}, Pg = st(
|
|
9398
|
-
|
|
9398
|
+
/* `@container` on the card itself, with the flex layout moved to an inner
|
|
9399
|
+
element. The row/column switch is a CONTAINER query, not `md:`: `md:`
|
|
9400
|
+
asks how wide the WINDOW is, so a 228px card on a 1200px page laid itself
|
|
9401
|
+
out as a row, put the action beside the content, and squeezed the text
|
|
9402
|
+
column until it overflowed the `overflow-hidden` here.
|
|
9403
|
+
|
|
9404
|
+
An element cannot query itself, which is why the layout is one level in
|
|
9405
|
+
rather than on this element. An earlier pass wrapped the card in a
|
|
9406
|
+
container instead — that worked, and made the card a grandchild, so a
|
|
9407
|
+
consumer's `className` with `col-span-2` or `flex-1` landed on something
|
|
9408
|
+
that was no longer the grid or flex item. */
|
|
9409
|
+
"rst:@container rst:font-ui rst:relative rst:overflow-hidden rst:rounded-lg rst:border rst:p-6 rst:shadow-sm rst:transition-all",
|
|
9399
9410
|
{
|
|
9400
9411
|
variants: {
|
|
9412
|
+
/* Light-mode fills moved -50 -> -100 and borders -200 -> -600.
|
|
9413
|
+
Reported as "light mode is too white", and measured: the old surface
|
|
9414
|
+
was primary-50 on a gray-50 page at 1.03:1, with a 1.30:1 border. A
|
|
9415
|
+
call to action that cannot be seen as a distinct block is not one.
|
|
9416
|
+
|
|
9417
|
+
The fill is the smaller half. Nothing in the -50 to -100 range
|
|
9418
|
+
separates from a near-white page by ratio — -100 only reaches 1.12:1 —
|
|
9419
|
+
so it buys colour, and the BORDER is what makes the surface exist.
|
|
9420
|
+
|
|
9421
|
+
Why -600 rather than the -200/-300 the rest of the library uses on
|
|
9422
|
+
filled surfaces: NOT 1.4.11, which does not reach a tinted banner any
|
|
9423
|
+
more than it reaches `Pill`. This is a prominence decision. A call to
|
|
9424
|
+
action is the one component whose job is to be looked at first, so it
|
|
9425
|
+
is deliberately the most defined bordered block on the page, and being
|
|
9426
|
+
louder than `Card` or `ErrorState` is the intent rather than a
|
|
9427
|
+
drift. -500 was the alternative and was rejected for being uneven
|
|
9428
|
+
across schemes: amber lands at 2.06 there while primary is at 6.10.
|
|
9429
|
+
|
|
9430
|
+
Measured against the gray-50 page, every figure read from
|
|
9431
|
+
`src/tokens.css` rather than assumed — an earlier pass quoted
|
|
9432
|
+
Tailwind's ramp for `error` and `success` and was wrong by a third:
|
|
9433
|
+
|
|
9434
|
+
border -600 primary 8.34 error 7.96 gray 7.30
|
|
9435
|
+
success 4.80 info 3.92 amber 3.05
|
|
9436
|
+
text -900 on its own -100 fill
|
|
9437
|
+
gray 16.03 primary 14.02 error 13.22
|
|
9438
|
+
success 8.30 info 8.24 amber 8.15
|
|
9439
|
+
|
|
9440
|
+
`neutral` keeps `bg-white`. Deepening it to gray-100 measured 1.04:1
|
|
9441
|
+
against the page — exactly what white already measured — so it changed
|
|
9442
|
+
the "raised white card" reading for no contrast at all.
|
|
9443
|
+
|
|
9444
|
+
`info` takes `info-*`, not Tailwind's stock `blue-*` it used before.
|
|
9445
|
+
Roster ships `--roster-info-600`, and the old classes resolved to a
|
|
9446
|
+
palette a consumer cannot retheme through `--roster-*`, which is the
|
|
9447
|
+
one thing every other variant here allows.
|
|
9448
|
+
|
|
9449
|
+
Dark mode is untouched. The complaint was specific to light, and the
|
|
9450
|
+
dark surfaces already separate from a dark page. */
|
|
9401
9451
|
variant: {
|
|
9402
|
-
primary: "rst:border-primary-
|
|
9403
|
-
neutral: "rst:border-gray-
|
|
9404
|
-
warning: "rst:border-amber-
|
|
9405
|
-
error: "rst:border-error-
|
|
9406
|
-
success: "rst:border-success-
|
|
9407
|
-
info: "rst:border-
|
|
9452
|
+
primary: "rst:border-primary-600 rst:bg-primary-100 rst:text-primary-900 rst:dark:border-primary-800 rst:dark:bg-primary-900/30 rst:dark:text-primary-200",
|
|
9453
|
+
neutral: "rst:border-gray-600 rst:bg-white rst:text-gray-900 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100",
|
|
9454
|
+
warning: "rst:border-amber-600 rst:bg-amber-100 rst:text-amber-900 rst:dark:border-amber-800 rst:dark:bg-amber-900/30 rst:dark:text-amber-200",
|
|
9455
|
+
error: "rst:border-error-600 rst:bg-error-100 rst:text-error-900 rst:dark:border-error-800 rst:dark:bg-error-900/30 rst:dark:text-error-200",
|
|
9456
|
+
success: "rst:border-success-600 rst:bg-success-100 rst:text-success-900 rst:dark:border-success-800 rst:dark:bg-success-900/30 rst:dark:text-success-200",
|
|
9457
|
+
info: "rst:border-info-600 rst:bg-info-100 rst:text-info-900 rst:dark:border-info-800 rst:dark:bg-info-900/30 rst:dark:text-info-200"
|
|
9408
9458
|
}
|
|
9409
9459
|
},
|
|
9410
9460
|
defaultVariants: {
|
|
@@ -9420,15 +9470,15 @@ const Eg = st("rst:flex rst:flex-col rst:text-left", {
|
|
|
9420
9470
|
onDismiss: o,
|
|
9421
9471
|
className: a,
|
|
9422
9472
|
...i
|
|
9423
|
-
}) => /* @__PURE__ */ f.
|
|
9424
|
-
/* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:items-
|
|
9425
|
-
s && /* @__PURE__ */ f.jsx("div", { className: "rst:
|
|
9426
|
-
/* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:flex-col rst:gap-1.5 rst:w-full", children: [
|
|
9473
|
+
}) => /* @__PURE__ */ f.jsx("div", { className: C(Pg({ variant: n }), a), ...i, children: /* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:flex-col rst:gap-4 rst:@[32rem]:flex-row rst:@[32rem]:items-center rst:@[32rem]:justify-between", children: [
|
|
9474
|
+
/* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:flex-col rst:items-center rst:gap-4 rst:@[32rem]:flex-row rst:@[32rem]:items-start", children: [
|
|
9475
|
+
s && /* @__PURE__ */ f.jsx("div", { className: "rst:shrink-0 rst:text-current rst:@[32rem]:mt-1", children: s }),
|
|
9476
|
+
/* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:min-w-0 rst:flex-col rst:gap-1.5 rst:w-full", children: [
|
|
9427
9477
|
/* @__PURE__ */ f.jsx("h3", { className: "rst:text-lg rst:font-bold rst:leading-tight rst:tracking-tight rst:text-current", children: t }),
|
|
9428
9478
|
r && /* @__PURE__ */ f.jsx("div", { className: "rst:max-w-prose rst:text-sm rst:leading-relaxed rst:text-current rst:opacity-90 rst:dark:opacity-80", children: r })
|
|
9429
9479
|
] })
|
|
9430
9480
|
] }),
|
|
9431
|
-
e && /* @__PURE__ */ f.jsx("div", { className: "rst:shrink-0 rst:pt-2 rst:
|
|
9481
|
+
e && /* @__PURE__ */ f.jsx("div", { className: "rst:flex rst:w-full rst:shrink-0 rst:pt-2 rst:[&>*]:w-full rst:@[32rem]:w-auto rst:@[32rem]:pt-0 rst:@[32rem]:[&>*]:w-auto", children: e }),
|
|
9432
9482
|
o && /* @__PURE__ */ f.jsx("div", { className: "rst:absolute rst:right-2 rst:top-2", children: /* @__PURE__ */ f.jsx(
|
|
9433
9483
|
oe,
|
|
9434
9484
|
{
|
|
@@ -9440,7 +9490,7 @@ const Eg = st("rst:flex rst:flex-col rst:text-left", {
|
|
|
9440
9490
|
children: /* @__PURE__ */ f.jsx(gt, { icon: xe, className: "rst:h-4 rst:w-4" })
|
|
9441
9491
|
}
|
|
9442
9492
|
) })
|
|
9443
|
-
] }), Ig = st(
|
|
9493
|
+
] }) }), Ig = st(
|
|
9444
9494
|
"rst:font-ui rst:flex rst:flex-col rst:items-center rst:justify-center rst:text-center rst:p-8 rst:rounded-lg rst:transition-colors",
|
|
9445
9495
|
{
|
|
9446
9496
|
variants: {
|
|
@@ -9917,7 +9967,11 @@ const th = (t) => {
|
|
|
9917
9967
|
}
|
|
9918
9968
|
}
|
|
9919
9969
|
), rh = st(
|
|
9920
|
-
|
|
9970
|
+
/* Tracking steps down in a narrow container. The labels are what set each column's
|
|
9971
|
+
width — "SECONDS" is wider than any digit pair — and dropping 0.1em to
|
|
9972
|
+
0.025em across those 23 characters recovers about 17px, measured. The
|
|
9973
|
+
tracked-out look is kept everywhere it fits. */
|
|
9974
|
+
"rst:uppercase rst:tracking-wide rst:@[22rem]:tracking-widest rst:mt-1 rst:transition-colors rst:text-gray-500 rst:dark:text-gray-400",
|
|
9921
9975
|
{
|
|
9922
9976
|
variants: {
|
|
9923
9977
|
size: {
|
|
@@ -9934,7 +9988,16 @@ const th = (t) => {
|
|
|
9934
9988
|
}
|
|
9935
9989
|
), Br = ({ value: t, label: r, size: e, variant: s }) => /* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:flex-col rst:items-center", children: [
|
|
9936
9990
|
/* @__PURE__ */ f.jsx("span", { className: C(eh({ size: e, variant: s })), children: String(t).padStart(2, "0") }),
|
|
9937
|
-
/* @__PURE__ */ f.jsx(
|
|
9991
|
+
/* @__PURE__ */ f.jsx(
|
|
9992
|
+
"span",
|
|
9993
|
+
{
|
|
9994
|
+
className: C(
|
|
9995
|
+
rh({ size: e }),
|
|
9996
|
+
"rst:@max-[22rem]:text-[9px]"
|
|
9997
|
+
),
|
|
9998
|
+
children: r
|
|
9999
|
+
}
|
|
10000
|
+
)
|
|
9938
10001
|
] }), sh = S.forwardRef(
|
|
9939
10002
|
({
|
|
9940
10003
|
targetDate: t,
|
|
@@ -9957,7 +10020,7 @@ const th = (t) => {
|
|
|
9957
10020
|
...a,
|
|
9958
10021
|
children: /* @__PURE__ */ f.jsx("h3", { className: C(ca({ size: e }), "rst:mb-0"), children: o })
|
|
9959
10022
|
}
|
|
9960
|
-
) : null : /* @__PURE__ */ f.
|
|
10023
|
+
) : null : /* @__PURE__ */ f.jsx(
|
|
9961
10024
|
"div",
|
|
9962
10025
|
{
|
|
9963
10026
|
ref: i,
|
|
@@ -9966,9 +10029,9 @@ const th = (t) => {
|
|
|
9966
10029
|
n
|
|
9967
10030
|
),
|
|
9968
10031
|
...a,
|
|
9969
|
-
children: [
|
|
10032
|
+
children: /* @__PURE__ */ f.jsxs("div", { className: "rst:@container rst:w-full", children: [
|
|
9970
10033
|
r && /* @__PURE__ */ f.jsx("h3", { className: C(ca({ size: e })), children: r }),
|
|
9971
|
-
/* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:justify-center rst:gap-
|
|
10034
|
+
/* @__PURE__ */ f.jsxs("div", { className: "rst:flex rst:justify-center rst:gap-3 rst:@[22rem]:gap-6 rst:@[35rem]:gap-8", children: [
|
|
9972
10035
|
/* @__PURE__ */ f.jsx(
|
|
9973
10036
|
Br,
|
|
9974
10037
|
{
|
|
@@ -10006,7 +10069,7 @@ const th = (t) => {
|
|
|
10006
10069
|
}
|
|
10007
10070
|
)
|
|
10008
10071
|
] })
|
|
10009
|
-
]
|
|
10072
|
+
] })
|
|
10010
10073
|
}
|
|
10011
10074
|
);
|
|
10012
10075
|
}
|
package/package.json
CHANGED