@wtfalch/design 0.12.0 → 0.13.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/dist/components/Rows.d.ts +8 -1
- package/dist/components/Rows.js +3 -2
- package/dist/styles/index.css +15 -6
- package/dist/tf.css +15 -6
- package/dist/valet.css +15 -6
- package/package.json +1 -1
|
@@ -60,7 +60,7 @@ export declare function Rows({ children, empty, label, look, className, }: {
|
|
|
60
60
|
look?: 'list' | 'pick';
|
|
61
61
|
className?: string;
|
|
62
62
|
}): import("react").JSX.Element | null;
|
|
63
|
-
export declare function Row({ name, pills, hint, trail, actions, below, onClick, tone, picked, loading, waiting, align, className, }: {
|
|
63
|
+
export declare function Row({ name, pills, hint, trail, actions, below, onClick, tone, picked, loading, waiting, disabled, align, className, }: {
|
|
64
64
|
/** The subject. Truncates -- it is the only part that may. */
|
|
65
65
|
name: React.ReactNode;
|
|
66
66
|
/** Qualifiers, on the name's line. Never truncated: a badge that is
|
|
@@ -93,6 +93,13 @@ export declare function Row({ name, pills, hint, trail, actions, below, onClick,
|
|
|
93
93
|
loading?: boolean;
|
|
94
94
|
/** Something else is working, so this one cannot be chosen yet. */
|
|
95
95
|
waiting?: boolean;
|
|
96
|
+
/** This one cannot be chosen, and nothing on the page will change that: the
|
|
97
|
+
* build lacks something, or a setting elsewhere rules it out. Say why in
|
|
98
|
+
* `hint`. Drawn as `waiting` is -- dimmed, its hit area a disabled button,
|
|
99
|
+
* `picked` still showing through -- but a separate word, because tf's
|
|
100
|
+
* About pane borrowed `waiting` for "this build cannot apply updates", and
|
|
101
|
+
* a row that says it is waiting is a row somebody waits on. */
|
|
102
|
+
disabled?: boolean;
|
|
96
103
|
/** `start` when the row has enough text that vertically centred buttons drift
|
|
97
104
|
* away from the name they belong to. */
|
|
98
105
|
align?: 'center' | 'start';
|
package/dist/components/Rows.js
CHANGED
|
@@ -51,12 +51,13 @@ export function Rows({ children, empty, label, look = 'list', className, }) {
|
|
|
51
51
|
// biome-ignore lint/a11y/useSemanticElements: valid ARIA on a div; a <ul> brings the browser's list reset and the stylesheet and 204 baselines key on `div.rows`.
|
|
52
52
|
role: "list", "aria-label": label, children: items }));
|
|
53
53
|
}
|
|
54
|
-
export function Row({ name, pills, hint, trail, actions, below, onClick, tone, picked, loading, waiting, align = 'center', className, }) {
|
|
54
|
+
export function Row({ name, pills, hint, trail, actions, below, onClick, tone, picked, loading, waiting, disabled, align = 'center', className, }) {
|
|
55
55
|
const body = (_jsxs(_Fragment, { children: [_jsxs("span", { className: "row-subject", children: [_jsxs("span", { className: "named", children: [_jsx("span", { className: "truncate", children: name }), pills] }), hint && _jsx("div", { className: "set-hint", children: hint })] }), trail && _jsx("span", { className: "flex-none ml-auto whitespace-nowrap set-hint mono", children: trail })] }));
|
|
56
56
|
const rowClass = `set-row rows-row${tone ? ` rows-${tone}` : ''}` +
|
|
57
57
|
`${align === 'start' ? ' rows-top' : ''}${picked ? ' is-picked' : ''}` +
|
|
58
58
|
`${loading ? ' is-loading' : ''}${waiting ? ' is-waiting' : ''}` +
|
|
59
|
+
`${disabled ? ' is-disabled' : ''}` +
|
|
59
60
|
`${className ? ` ${className}` : ''}`;
|
|
60
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: rowClass, role: "listitem", children: [onClick ? (_jsx("button", { type: "button", className: "row-hit", disabled: waiting, onClick: onClick, children: body })) : (body), actions] }), below] }));
|
|
61
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: rowClass, role: "listitem", children: [onClick ? (_jsx("button", { type: "button", className: "row-hit", disabled: waiting || disabled, onClick: onClick, children: body })) : (body), actions] }), below] }));
|
|
61
62
|
}
|
|
62
63
|
export default Rows;
|
package/dist/styles/index.css
CHANGED
|
@@ -2557,8 +2557,10 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2557
2557
|
}
|
|
2558
2558
|
|
|
2559
2559
|
/* Only where there is something to pick. A row without `row-hit` is not a
|
|
2560
|
-
choice, and lighting it up on hover promises something that does not happen.
|
|
2561
|
-
|
|
2560
|
+
choice, and lighting it up on hover promises something that does not happen.
|
|
2561
|
+
Nor is a row whose hit is disabled: a waiting row lit up under its own
|
|
2562
|
+
`not-allowed` cursor, and `disabled` would have made that permanent. */
|
|
2563
|
+
.rows-pick > .rows-row:has(.row-hit:enabled):hover {
|
|
2562
2564
|
border-color: var(--accent);
|
|
2563
2565
|
background: var(--panel-2);
|
|
2564
2566
|
}
|
|
@@ -2610,9 +2612,16 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2610
2612
|
/* And nothing else can be chosen while it happens: picking a second model
|
|
2611
2613
|
mid-load queues a second load, which is how a machine ends up swapping two
|
|
2612
2614
|
sets of weights it cannot hold at once. */
|
|
2613
|
-
.rows-pick > .rows-row.is-waiting
|
|
2615
|
+
.rows-pick > .rows-row.is-waiting,
|
|
2616
|
+
.rows-pick > .rows-row.is-disabled { opacity: 0.5; }
|
|
2614
2617
|
|
|
2615
|
-
.rows-pick > .rows-row.is-waiting .row-hit
|
|
2618
|
+
.rows-pick > .rows-row.is-waiting .row-hit,
|
|
2619
|
+
.rows-pick > .rows-row.is-disabled .row-hit { cursor: not-allowed; }
|
|
2620
|
+
|
|
2621
|
+
/* Dimmed once. `.row-hit:disabled` dims the button as well, and under the
|
|
2622
|
+
row's own opacity the hint of a disabled row, the line saying why it cannot
|
|
2623
|
+
be chosen, came out at a quarter strength. */
|
|
2624
|
+
.rows-pick > .rows-row.is-disabled > .row-hit:disabled { opacity: 1; }
|
|
2616
2625
|
|
|
2617
2626
|
@media (prefers-reduced-motion: reduce) {
|
|
2618
2627
|
/* The border still says which one, without the breathing. */
|
|
@@ -2664,7 +2673,7 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2664
2673
|
margin-bottom: calc(var(--space-2) * -1);
|
|
2665
2674
|
}
|
|
2666
2675
|
|
|
2667
|
-
.rows-pick > .rows-row.is-picked:has(.row-hit):hover {
|
|
2676
|
+
.rows-pick > .rows-row.is-picked:has(.row-hit:enabled):hover {
|
|
2668
2677
|
background: color-mix(in srgb, var(--accent) 13%, var(--panel));
|
|
2669
2678
|
}
|
|
2670
2679
|
|
|
@@ -2723,7 +2732,7 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2723
2732
|
border-radius: var(--radius-sm);
|
|
2724
2733
|
}
|
|
2725
2734
|
|
|
2726
|
-
.row-hit:hover .truncate { color: var(--accent); }
|
|
2735
|
+
.row-hit:enabled:hover .truncate { color: var(--accent); }
|
|
2727
2736
|
|
|
2728
2737
|
.row-hit:focus-visible { outline: none; box-shadow: var(--focus-ring); }
|
|
2729
2738
|
}
|
package/dist/tf.css
CHANGED
|
@@ -2827,8 +2827,10 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2827
2827
|
}
|
|
2828
2828
|
|
|
2829
2829
|
/* Only where there is something to pick. A row without `row-hit` is not a
|
|
2830
|
-
choice, and lighting it up on hover promises something that does not happen.
|
|
2831
|
-
|
|
2830
|
+
choice, and lighting it up on hover promises something that does not happen.
|
|
2831
|
+
Nor is a row whose hit is disabled: a waiting row lit up under its own
|
|
2832
|
+
`not-allowed` cursor, and `disabled` would have made that permanent. */
|
|
2833
|
+
.rows-pick > .rows-row:has(.row-hit:enabled):hover {
|
|
2832
2834
|
border-color: var(--accent);
|
|
2833
2835
|
background: var(--panel-2);
|
|
2834
2836
|
}
|
|
@@ -2880,9 +2882,16 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2880
2882
|
/* And nothing else can be chosen while it happens: picking a second model
|
|
2881
2883
|
mid-load queues a second load, which is how a machine ends up swapping two
|
|
2882
2884
|
sets of weights it cannot hold at once. */
|
|
2883
|
-
.rows-pick > .rows-row.is-waiting
|
|
2885
|
+
.rows-pick > .rows-row.is-waiting,
|
|
2886
|
+
.rows-pick > .rows-row.is-disabled { opacity: 0.5; }
|
|
2884
2887
|
|
|
2885
|
-
.rows-pick > .rows-row.is-waiting .row-hit
|
|
2888
|
+
.rows-pick > .rows-row.is-waiting .row-hit,
|
|
2889
|
+
.rows-pick > .rows-row.is-disabled .row-hit { cursor: not-allowed; }
|
|
2890
|
+
|
|
2891
|
+
/* Dimmed once. `.row-hit:disabled` dims the button as well, and under the
|
|
2892
|
+
row's own opacity the hint of a disabled row, the line saying why it cannot
|
|
2893
|
+
be chosen, came out at a quarter strength. */
|
|
2894
|
+
.rows-pick > .rows-row.is-disabled > .row-hit:disabled { opacity: 1; }
|
|
2886
2895
|
|
|
2887
2896
|
@media (prefers-reduced-motion: reduce) {
|
|
2888
2897
|
/* The border still says which one, without the breathing. */
|
|
@@ -2934,7 +2943,7 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2934
2943
|
margin-bottom: calc(var(--space-2) * -1);
|
|
2935
2944
|
}
|
|
2936
2945
|
|
|
2937
|
-
.rows-pick > .rows-row.is-picked:has(.row-hit):hover {
|
|
2946
|
+
.rows-pick > .rows-row.is-picked:has(.row-hit:enabled):hover {
|
|
2938
2947
|
background: color-mix(in srgb, var(--accent) 13%, var(--panel));
|
|
2939
2948
|
}
|
|
2940
2949
|
|
|
@@ -2993,7 +3002,7 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2993
3002
|
border-radius: var(--radius-sm);
|
|
2994
3003
|
}
|
|
2995
3004
|
|
|
2996
|
-
.row-hit:hover .truncate { color: var(--accent); }
|
|
3005
|
+
.row-hit:enabled:hover .truncate { color: var(--accent); }
|
|
2997
3006
|
|
|
2998
3007
|
.row-hit:focus-visible { outline: none; box-shadow: var(--focus-ring); }
|
|
2999
3008
|
}
|
package/dist/valet.css
CHANGED
|
@@ -2831,8 +2831,10 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
|
|
2833
2833
|
/* Only where there is something to pick. A row without `row-hit` is not a
|
|
2834
|
-
choice, and lighting it up on hover promises something that does not happen.
|
|
2835
|
-
|
|
2834
|
+
choice, and lighting it up on hover promises something that does not happen.
|
|
2835
|
+
Nor is a row whose hit is disabled: a waiting row lit up under its own
|
|
2836
|
+
`not-allowed` cursor, and `disabled` would have made that permanent. */
|
|
2837
|
+
.rows-pick > .rows-row:has(.row-hit:enabled):hover {
|
|
2836
2838
|
border-color: var(--accent);
|
|
2837
2839
|
background: var(--panel-2);
|
|
2838
2840
|
}
|
|
@@ -2884,9 +2886,16 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2884
2886
|
/* And nothing else can be chosen while it happens: picking a second model
|
|
2885
2887
|
mid-load queues a second load, which is how a machine ends up swapping two
|
|
2886
2888
|
sets of weights it cannot hold at once. */
|
|
2887
|
-
.rows-pick > .rows-row.is-waiting
|
|
2889
|
+
.rows-pick > .rows-row.is-waiting,
|
|
2890
|
+
.rows-pick > .rows-row.is-disabled { opacity: 0.5; }
|
|
2888
2891
|
|
|
2889
|
-
.rows-pick > .rows-row.is-waiting .row-hit
|
|
2892
|
+
.rows-pick > .rows-row.is-waiting .row-hit,
|
|
2893
|
+
.rows-pick > .rows-row.is-disabled .row-hit { cursor: not-allowed; }
|
|
2894
|
+
|
|
2895
|
+
/* Dimmed once. `.row-hit:disabled` dims the button as well, and under the
|
|
2896
|
+
row's own opacity the hint of a disabled row, the line saying why it cannot
|
|
2897
|
+
be chosen, came out at a quarter strength. */
|
|
2898
|
+
.rows-pick > .rows-row.is-disabled > .row-hit:disabled { opacity: 1; }
|
|
2890
2899
|
|
|
2891
2900
|
@media (prefers-reduced-motion: reduce) {
|
|
2892
2901
|
/* The border still says which one, without the breathing. */
|
|
@@ -2938,7 +2947,7 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2938
2947
|
margin-bottom: calc(var(--space-2) * -1);
|
|
2939
2948
|
}
|
|
2940
2949
|
|
|
2941
|
-
.rows-pick > .rows-row.is-picked:has(.row-hit):hover {
|
|
2950
|
+
.rows-pick > .rows-row.is-picked:has(.row-hit:enabled):hover {
|
|
2942
2951
|
background: color-mix(in srgb, var(--accent) 13%, var(--panel));
|
|
2943
2952
|
}
|
|
2944
2953
|
|
|
@@ -2997,7 +3006,7 @@ input[type='radio']:active:not(:disabled) {
|
|
|
2997
3006
|
border-radius: var(--radius-sm);
|
|
2998
3007
|
}
|
|
2999
3008
|
|
|
3000
|
-
.row-hit:hover .truncate { color: var(--accent); }
|
|
3009
|
+
.row-hit:enabled:hover .truncate { color: var(--accent); }
|
|
3001
3010
|
|
|
3002
3011
|
.row-hit:focus-visible { outline: none; box-shadow: var(--focus-ring); }
|
|
3003
3012
|
}
|