@wtfalch/design 0.10.2 → 0.11.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 +6 -0
- package/dist/components/DangerZone.js +1 -1
- package/dist/components/Field.d.ts +8 -1
- package/dist/components/Field.js +2 -2
- package/dist/components/Toggle.d.ts +8 -1
- package/dist/components/Toggle.js +2 -2
- package/dist/styles/index.css +21 -21
- package/dist/tf.css +21 -21
- package/dist/valet.css +21 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,12 @@ draws them changes. 0.9.0 did exactly that to several of them, and 0.10.0
|
|
|
17
17
|
deleted 41 more: the components that drew them draw themselves now, so the
|
|
18
18
|
rules had no reader left.
|
|
19
19
|
|
|
20
|
+
0.11.0 went the other way and removed the rules that reached *through* a
|
|
21
|
+
class, which is the same mistake seen from the other side. `.row > .switch-row`
|
|
22
|
+
styled a Toggle by the container a caller had written round it, so the caller
|
|
23
|
+
had to know to write `.row` -- a class no component here renders. Those are
|
|
24
|
+
props now: `inRow` on `Toggle` and on `Field`, `tile` on `Checkbox`.
|
|
25
|
+
|
|
20
26
|
If you need a card, render `<Card>`; if you need a row of your own, write it
|
|
21
27
|
in the token vocabulary:
|
|
22
28
|
|
|
@@ -53,5 +53,5 @@ match, label, busyLabel, busy = false, disabled = false, onConfirm,
|
|
|
53
53
|
unavailable, }) {
|
|
54
54
|
const [asking, setAsking] = useState(false);
|
|
55
55
|
const [typed, setTyped] = useState('');
|
|
56
|
-
return (_jsxs("div", { className: `danger-act${kind === 'plain' ? ' plain' : ''}`, children: [_jsx("h4", { children: title }), _jsx("div", { className: "set-hint", children: description }), unavailable ? (_jsx("div", { className: "set-hint mt-2", children: unavailable })) : confirm === 'type' ? (_jsx(_Fragment, { children: _jsxs("div", { className: "row danger-
|
|
56
|
+
return (_jsxs("div", { className: `danger-act${kind === 'plain' ? ' plain' : ''}`, children: [_jsx("h4", { children: title }), _jsx("div", { className: "set-hint", children: description }), unavailable ? (_jsx("div", { className: "set-hint mt-2", children: unavailable })) : confirm === 'type' ? (_jsx(_Fragment, { children: _jsxs("div", { className: "danger-row danger-field-row", children: [_jsx(Field, { inRow: true, label: "Confirm", hint: _jsxs(_Fragment, { children: ["Type ", _jsx("code", { className: "mono danger-name", children: match }), " to confirm."] }), children: (f) => (_jsx(Input, { ...f, mono: true, value: typed, disabled: disabled || busy, autoComplete: "off", spellCheck: false, onChange: (e) => setTyped(e.target.value) })) }), _jsx(Button, { kind: "danger", isDisabled: disabled || busy || typed.trim() !== match, onPress: onConfirm, children: busy ? (busyLabel ?? '…') : label })] }) })) : confirm === 'none' ? (_jsx("div", { className: "danger-row", children: _jsx(Button, { kind: kind === 'plain' ? 'primary' : 'danger', isDisabled: disabled || busy, onPress: onConfirm, children: busy ? (busyLabel ?? '…') : label }) })) : asking ? (_jsxs("div", { className: "danger-row", children: [_jsx(Button, { kind: "danger", isDisabled: disabled || busy, onPress: onConfirm, children: busy ? (busyLabel ?? '…') : label }), _jsx(Button, { isDisabled: disabled || busy, onPress: () => setAsking(false), children: "Cancel" })] })) : (_jsx("div", { className: "danger-row", children: _jsx(Button, { kind: "danger", isDisabled: disabled || busy, onPress: () => setAsking(true), children: label }) }))] }));
|
|
57
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FieldWiring } from './fieldWiring.js';
|
|
2
2
|
export type { FieldWiring } from './fieldWiring.js';
|
|
3
|
-
export default function Field({ label, hint, error, required, children, labelHidden, layout, className, }: {
|
|
3
|
+
export default function Field({ label, hint, error, required, children, labelHidden, layout, inRow, className, }: {
|
|
4
4
|
/** What the field is. Always given -- there is no unlabelled case, only
|
|
5
5
|
* fields whose label is hidden. */
|
|
6
6
|
label: string;
|
|
@@ -39,5 +39,12 @@ export default function Field({ label, hint, error, required, children, labelHid
|
|
|
39
39
|
* rendered somewhere the provider does not reach.
|
|
40
40
|
*/
|
|
41
41
|
children: React.ReactNode | ((field: FieldWiring) => React.ReactNode);
|
|
42
|
+
/** Sitting in a row of controls rather than in a column of settings.
|
|
43
|
+
*
|
|
44
|
+
* This was a rule keyed on the container -- `.field-row > .field` -- which
|
|
45
|
+
* meant the package reaching through a class the caller had to know to
|
|
46
|
+
* write, and `.field-row` is not a class this package hands out. A prop says the
|
|
47
|
+
* same thing and travels with the component. */
|
|
48
|
+
inRow?: boolean;
|
|
42
49
|
className?: string;
|
|
43
50
|
}): import("react").JSX.Element;
|
package/dist/components/Field.js
CHANGED
|
@@ -39,7 +39,7 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
39
39
|
*/
|
|
40
40
|
import { useId } from 'react';
|
|
41
41
|
import { FieldWiringContext } from './fieldWiring.js';
|
|
42
|
-
export default function Field({ label, hint, error, required, children, labelHidden, layout = 'stack', className, }) {
|
|
42
|
+
export default function Field({ label, hint, error, required, children, labelHidden, layout = 'stack', inRow, className, }) {
|
|
43
43
|
const id = useId();
|
|
44
44
|
const hintId = `${id}-hint`;
|
|
45
45
|
const errorId = `${id}-error`;
|
|
@@ -53,5 +53,5 @@ export default function Field({ label, hint, error, required, children, labelHid
|
|
|
53
53
|
'aria-describedby': [hint && hintId, error && errorId].filter(Boolean).join(' ') || undefined,
|
|
54
54
|
'aria-invalid': error ? true : undefined,
|
|
55
55
|
};
|
|
56
|
-
return (_jsxs("div", { className: `field field-${layout}-layout${error ? ' field-bad' : ''}${className ? ` ${className}` : ''}`, children: [_jsxs("label", { id: labelId, className: labelHidden ? 'sr-only' : 'field-label', htmlFor: id, children: [label, required && (_jsxs("span", { className: "text-muted", "aria-label": "required", children: [' ', "*"] }))] }), hint && (_jsx("p", { className: "field-hint", id: hintId, children: hint })), typeof children === 'function' ? (children(wiring)) : (_jsx(FieldWiringContext.Provider, { value: wiring, children: children })), error && (_jsx("p", { className: "field-error", id: errorId, role: "alert", children: error }))] }));
|
|
56
|
+
return (_jsxs("div", { className: `field field-${layout}-layout${error ? ' field-bad' : ''}${inRow ? ' field-in-row' : ''}${className ? ` ${className}` : ''}`, children: [_jsxs("label", { id: labelId, className: labelHidden ? 'sr-only' : 'field-label', htmlFor: id, children: [label, required && (_jsxs("span", { className: "text-muted", "aria-label": "required", children: [' ', "*"] }))] }), hint && (_jsx("p", { className: "field-hint", id: hintId, children: hint })), typeof children === 'function' ? (children(wiring)) : (_jsx(FieldWiringContext.Provider, { value: wiring, children: children })), error && (_jsx("p", { className: "field-error", id: errorId, role: "alert", children: error }))] }));
|
|
57
57
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function Toggle({ label, hint, checked, onChange, disabled, said, labelHidden, size, className, }: {
|
|
1
|
+
export default function Toggle({ label, hint, checked, onChange, disabled, said, labelHidden, size, inRow, className, }: {
|
|
2
2
|
label: React.ReactNode;
|
|
3
3
|
/** What it does, or what turning it off costs. Under the label, in the same
|
|
4
4
|
* column, so a long explanation does not push the switch off its row. */
|
|
@@ -22,5 +22,12 @@ export default function Toggle({ label, hint, checked, onChange, disabled, said,
|
|
|
22
22
|
/** The same three the rest of the controls take. `sm` for a switch in a
|
|
23
23
|
* toolbar or a dense row; `lg` where it is the only thing on the screen. */
|
|
24
24
|
size?: 'sm' | 'md' | 'lg';
|
|
25
|
+
/** Sitting in a row of controls rather than in a column of settings.
|
|
26
|
+
*
|
|
27
|
+
* This was a rule keyed on the container -- `.row > .switch-row` -- which
|
|
28
|
+
* meant the package reaching through a class the caller had to know to
|
|
29
|
+
* write, and `.row` is not a class this package hands out. A prop says the
|
|
30
|
+
* same thing and travels with the component. */
|
|
31
|
+
inRow?: boolean;
|
|
25
32
|
className?: string;
|
|
26
33
|
}): import("react").JSX.Element;
|
|
@@ -49,7 +49,7 @@ const KNOB = { sm: 10, md: 12, lg: 16 };
|
|
|
49
49
|
* than pressed. Six is over the jitter and still a third of the way across
|
|
50
50
|
* the shortest track. */
|
|
51
51
|
const SLOP = 6;
|
|
52
|
-
export default function Toggle({ label, hint, checked, onChange, disabled, said, labelHidden, size = 'md', className, }) {
|
|
52
|
+
export default function Toggle({ label, hint, checked, onChange, disabled, said, labelHidden, size = 'md', inRow, className, }) {
|
|
53
53
|
/* React Aria's `Switch` is the `<label>`: it owns a visually-hidden
|
|
54
54
|
`<input type="checkbox" role="switch">` and stamps `data-selected`,
|
|
55
55
|
`data-disabled`, `data-focus-visible` and `data-pressed` on the label. So
|
|
@@ -154,7 +154,7 @@ export default function Toggle({ label, hint, checked, onChange, disabled, said,
|
|
|
154
154
|
return 0;
|
|
155
155
|
return Math.min(1, Math.max(0, (x - box.left - 2 - knobWidth / 2) / travel));
|
|
156
156
|
};
|
|
157
|
-
return (_jsxs(Switch, { ref: rowRef, className: `switch-row switch-${size}${className ? ` ${className}` : ''}`, isSelected: shown, onChange: commit, isDisabled: disabled,
|
|
157
|
+
return (_jsxs(Switch, { ref: rowRef, className: `switch-row switch-${size}${inRow ? ' switch-in-row' : ''}${className ? ` ${className}` : ''}`, isSelected: shown, onChange: commit, isDisabled: disabled,
|
|
158
158
|
/* Read-only, not disabled, while a request is out: focus stays where it
|
|
159
159
|
is and the row does not dim, it just refuses a second answer until
|
|
160
160
|
the first has been taken. */
|
package/dist/styles/index.css
CHANGED
|
@@ -1243,13 +1243,6 @@ select:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
|
1243
1243
|
to { transform: scaleX(0); }
|
|
1244
1244
|
}
|
|
1245
1245
|
|
|
1246
|
-
/* (The bordered head bar that used to live here is gone. It was a second
|
|
1247
|
-
`.card-head` -- same name, different thing -- and the only place it was ever
|
|
1248
|
-
used was the gallery page documenting it. A card that holds rows now takes
|
|
1249
|
-
`title` like any other, and the header the component draws is the one
|
|
1250
|
-
header.) */
|
|
1251
|
-
.row { display: flex; align-items: center; gap: var(--space-3); }
|
|
1252
|
-
|
|
1253
1246
|
.ctl-grow { flex: 1; min-width: 0; }
|
|
1254
1247
|
|
|
1255
1248
|
.mono { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
@@ -1510,13 +1503,6 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
1510
1503
|
template are allowed to diverge, and this is only saying that they have. */
|
|
1511
1504
|
.set-hint.drifted { color: var(--warn); }
|
|
1512
1505
|
|
|
1513
|
-
/* One applet, alone on the page, at `/applet/<id>`. Fills the window: there is
|
|
1514
|
-
no grid here to decide a height, and a screenshot of an applet letterboxed
|
|
1515
|
-
inside a page is mostly not the applet. */
|
|
1516
|
-
.bare { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
|
|
1517
|
-
|
|
1518
|
-
.bare > * { flex: 1; min-height: 0; }
|
|
1519
|
-
|
|
1520
1506
|
/* A round is in flight. On the button that asks for one, because that is where
|
|
1521
1507
|
you are looking when you have just pressed it -- and not in the foot, which
|
|
1522
1508
|
would flicker every thirty seconds on a tile that is working perfectly. */
|
|
@@ -1864,7 +1850,15 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
1864
1850
|
|
|
1865
1851
|
.danger-act > .set-hint + .set-hint { margin-top: var(--space-1); }
|
|
1866
1852
|
|
|
1867
|
-
.
|
|
1853
|
+
/* `display: flex` is here now. These rows carried `.row` as well, which is a
|
|
1854
|
+
class no component of this package renders -- it only ever reached them
|
|
1855
|
+
because a consumer's stylesheet happened to define it too. */
|
|
1856
|
+
.danger-row {
|
|
1857
|
+
display: flex;
|
|
1858
|
+
margin-top: var(--space-2);
|
|
1859
|
+
gap: var(--space-2);
|
|
1860
|
+
align-items: center;
|
|
1861
|
+
}
|
|
1868
1862
|
|
|
1869
1863
|
.danger-row > input { min-width: 0; }
|
|
1870
1864
|
|
|
@@ -1886,15 +1880,15 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
1886
1880
|
column-gap: var(--space-3);
|
|
1887
1881
|
}
|
|
1888
1882
|
|
|
1889
|
-
.field-row { align-items: flex-end; gap: var(--space-2); }
|
|
1883
|
+
.danger-field-row { align-items: flex-end; gap: var(--space-2); }
|
|
1890
1884
|
|
|
1891
|
-
.field-row > button { flex: none; }
|
|
1885
|
+
.danger-field-row > button { flex: none; }
|
|
1892
1886
|
|
|
1893
1887
|
/* Two forms one under the other, whose buttons say different words -- "Add"
|
|
1894
1888
|
and "Block". Sized to their text they came out different widths, and two
|
|
1895
1889
|
controls in the same column at the same indent that do not line up read as
|
|
1896
1890
|
an accident rather than as a pair. */
|
|
1897
|
-
.field-row > button { min-width: 9ch; }
|
|
1891
|
+
.danger-field-row > button { min-width: 9ch; }
|
|
1898
1892
|
}
|
|
1899
1893
|
|
|
1900
1894
|
/* ---- ./callout.css ---- */
|
|
@@ -2225,9 +2219,12 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
2225
2219
|
/* Sized to its words, for a switch that sits in a row of other controls rather
|
|
2226
2220
|
than owning a row of its own. `flex: 1` there would push the label away from
|
|
2227
2221
|
the switch by the whole width of the bar. */
|
|
2228
|
-
|
|
2222
|
+
/* `inRow`: a toggle beside other controls rather than in a column of
|
|
2223
|
+
settings. Was `.row > .switch-row`, which reached through `.row` -- a class
|
|
2224
|
+
no component here renders. */
|
|
2225
|
+
.switch-in-row { flex: none; padding-block: 0; }
|
|
2229
2226
|
|
|
2230
|
-
.
|
|
2227
|
+
.switch-in-row .switch-body { flex: none; }
|
|
2231
2228
|
|
|
2232
2229
|
/* The opposite case: a switch that *is* the row, with something small beside it
|
|
2233
2230
|
-- a tooltip, a state word. `.set-row` wraps, so a switch that does not grow
|
|
@@ -3816,7 +3813,10 @@ input[type='range'].slider:disabled::-moz-range-thumb { opacity: 0; }
|
|
|
3816
3813
|
/* Fields stacked down a form. Wider than the gap inside one field, so the
|
|
3817
3814
|
label of the next belongs to the input under it rather than to the error
|
|
3818
3815
|
above it. */
|
|
3819
|
-
|
|
3816
|
+
/* `inRow`: a field sharing a line with other controls rather than stacked in a
|
|
3817
|
+
column. Was `.field-row > .field`, which reached through a container class
|
|
3818
|
+
the caller had to write and this package does not hand out. */
|
|
3819
|
+
.field-in-row { flex: 1; min-width: 0; }
|
|
3820
3820
|
|
|
3821
3821
|
/* A password with an eye -- `Input type="password"`.
|
|
3822
3822
|
A grid rather than `position: absolute`: both children take the one cell, the
|
package/dist/tf.css
CHANGED
|
@@ -1513,13 +1513,6 @@ select:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
|
1513
1513
|
to { transform: scaleX(0); }
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
-
/* (The bordered head bar that used to live here is gone. It was a second
|
|
1517
|
-
`.card-head` -- same name, different thing -- and the only place it was ever
|
|
1518
|
-
used was the gallery page documenting it. A card that holds rows now takes
|
|
1519
|
-
`title` like any other, and the header the component draws is the one
|
|
1520
|
-
header.) */
|
|
1521
|
-
.row { display: flex; align-items: center; gap: var(--space-3); }
|
|
1522
|
-
|
|
1523
1516
|
.ctl-grow { flex: 1; min-width: 0; }
|
|
1524
1517
|
|
|
1525
1518
|
.mono { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
@@ -1780,13 +1773,6 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
1780
1773
|
template are allowed to diverge, and this is only saying that they have. */
|
|
1781
1774
|
.set-hint.drifted { color: var(--warn); }
|
|
1782
1775
|
|
|
1783
|
-
/* One applet, alone on the page, at `/applet/<id>`. Fills the window: there is
|
|
1784
|
-
no grid here to decide a height, and a screenshot of an applet letterboxed
|
|
1785
|
-
inside a page is mostly not the applet. */
|
|
1786
|
-
.bare { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
|
|
1787
|
-
|
|
1788
|
-
.bare > * { flex: 1; min-height: 0; }
|
|
1789
|
-
|
|
1790
1776
|
/* A round is in flight. On the button that asks for one, because that is where
|
|
1791
1777
|
you are looking when you have just pressed it -- and not in the foot, which
|
|
1792
1778
|
would flicker every thirty seconds on a tile that is working perfectly. */
|
|
@@ -2134,7 +2120,15 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
2134
2120
|
|
|
2135
2121
|
.danger-act > .set-hint + .set-hint { margin-top: var(--space-1); }
|
|
2136
2122
|
|
|
2137
|
-
.
|
|
2123
|
+
/* `display: flex` is here now. These rows carried `.row` as well, which is a
|
|
2124
|
+
class no component of this package renders -- it only ever reached them
|
|
2125
|
+
because a consumer's stylesheet happened to define it too. */
|
|
2126
|
+
.danger-row {
|
|
2127
|
+
display: flex;
|
|
2128
|
+
margin-top: var(--space-2);
|
|
2129
|
+
gap: var(--space-2);
|
|
2130
|
+
align-items: center;
|
|
2131
|
+
}
|
|
2138
2132
|
|
|
2139
2133
|
.danger-row > input { min-width: 0; }
|
|
2140
2134
|
|
|
@@ -2156,15 +2150,15 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
2156
2150
|
column-gap: var(--space-3);
|
|
2157
2151
|
}
|
|
2158
2152
|
|
|
2159
|
-
.field-row { align-items: flex-end; gap: var(--space-2); }
|
|
2153
|
+
.danger-field-row { align-items: flex-end; gap: var(--space-2); }
|
|
2160
2154
|
|
|
2161
|
-
.field-row > button { flex: none; }
|
|
2155
|
+
.danger-field-row > button { flex: none; }
|
|
2162
2156
|
|
|
2163
2157
|
/* Two forms one under the other, whose buttons say different words -- "Add"
|
|
2164
2158
|
and "Block". Sized to their text they came out different widths, and two
|
|
2165
2159
|
controls in the same column at the same indent that do not line up read as
|
|
2166
2160
|
an accident rather than as a pair. */
|
|
2167
|
-
.field-row > button { min-width: 9ch; }
|
|
2161
|
+
.danger-field-row > button { min-width: 9ch; }
|
|
2168
2162
|
}
|
|
2169
2163
|
|
|
2170
2164
|
/* ---- ./callout.css ---- */
|
|
@@ -2495,9 +2489,12 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
2495
2489
|
/* Sized to its words, for a switch that sits in a row of other controls rather
|
|
2496
2490
|
than owning a row of its own. `flex: 1` there would push the label away from
|
|
2497
2491
|
the switch by the whole width of the bar. */
|
|
2498
|
-
|
|
2492
|
+
/* `inRow`: a toggle beside other controls rather than in a column of
|
|
2493
|
+
settings. Was `.row > .switch-row`, which reached through `.row` -- a class
|
|
2494
|
+
no component here renders. */
|
|
2495
|
+
.switch-in-row { flex: none; padding-block: 0; }
|
|
2499
2496
|
|
|
2500
|
-
.
|
|
2497
|
+
.switch-in-row .switch-body { flex: none; }
|
|
2501
2498
|
|
|
2502
2499
|
/* The opposite case: a switch that *is* the row, with something small beside it
|
|
2503
2500
|
-- a tooltip, a state word. `.set-row` wraps, so a switch that does not grow
|
|
@@ -4086,7 +4083,10 @@ input[type='range'].slider:disabled::-moz-range-thumb { opacity: 0; }
|
|
|
4086
4083
|
/* Fields stacked down a form. Wider than the gap inside one field, so the
|
|
4087
4084
|
label of the next belongs to the input under it rather than to the error
|
|
4088
4085
|
above it. */
|
|
4089
|
-
|
|
4086
|
+
/* `inRow`: a field sharing a line with other controls rather than stacked in a
|
|
4087
|
+
column. Was `.field-row > .field`, which reached through a container class
|
|
4088
|
+
the caller had to write and this package does not hand out. */
|
|
4089
|
+
.field-in-row { flex: 1; min-width: 0; }
|
|
4090
4090
|
|
|
4091
4091
|
/* A password with an eye -- `Input type="password"`.
|
|
4092
4092
|
A grid rather than `position: absolute`: both children take the one cell, the
|
package/dist/valet.css
CHANGED
|
@@ -1517,13 +1517,6 @@ select:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
|
1517
1517
|
to { transform: scaleX(0); }
|
|
1518
1518
|
}
|
|
1519
1519
|
|
|
1520
|
-
/* (The bordered head bar that used to live here is gone. It was a second
|
|
1521
|
-
`.card-head` -- same name, different thing -- and the only place it was ever
|
|
1522
|
-
used was the gallery page documenting it. A card that holds rows now takes
|
|
1523
|
-
`title` like any other, and the header the component draws is the one
|
|
1524
|
-
header.) */
|
|
1525
|
-
.row { display: flex; align-items: center; gap: var(--space-3); }
|
|
1526
|
-
|
|
1527
1520
|
.ctl-grow { flex: 1; min-width: 0; }
|
|
1528
1521
|
|
|
1529
1522
|
.mono { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
@@ -1784,13 +1777,6 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
1784
1777
|
template are allowed to diverge, and this is only saying that they have. */
|
|
1785
1778
|
.set-hint.drifted { color: var(--warn); }
|
|
1786
1779
|
|
|
1787
|
-
/* One applet, alone on the page, at `/applet/<id>`. Fills the window: there is
|
|
1788
|
-
no grid here to decide a height, and a screenshot of an applet letterboxed
|
|
1789
|
-
inside a page is mostly not the applet. */
|
|
1790
|
-
.bare { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
|
|
1791
|
-
|
|
1792
|
-
.bare > * { flex: 1; min-height: 0; }
|
|
1793
|
-
|
|
1794
1780
|
/* A round is in flight. On the button that asks for one, because that is where
|
|
1795
1781
|
you are looking when you have just pressed it -- and not in the foot, which
|
|
1796
1782
|
would flicker every thirty seconds on a tile that is working perfectly. */
|
|
@@ -2138,7 +2124,15 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
2138
2124
|
|
|
2139
2125
|
.danger-act > .set-hint + .set-hint { margin-top: var(--space-1); }
|
|
2140
2126
|
|
|
2141
|
-
.
|
|
2127
|
+
/* `display: flex` is here now. These rows carried `.row` as well, which is a
|
|
2128
|
+
class no component of this package renders -- it only ever reached them
|
|
2129
|
+
because a consumer's stylesheet happened to define it too. */
|
|
2130
|
+
.danger-row {
|
|
2131
|
+
display: flex;
|
|
2132
|
+
margin-top: var(--space-2);
|
|
2133
|
+
gap: var(--space-2);
|
|
2134
|
+
align-items: center;
|
|
2135
|
+
}
|
|
2142
2136
|
|
|
2143
2137
|
.danger-row > input { min-width: 0; }
|
|
2144
2138
|
|
|
@@ -2160,15 +2154,15 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
2160
2154
|
column-gap: var(--space-3);
|
|
2161
2155
|
}
|
|
2162
2156
|
|
|
2163
|
-
.field-row { align-items: flex-end; gap: var(--space-2); }
|
|
2157
|
+
.danger-field-row { align-items: flex-end; gap: var(--space-2); }
|
|
2164
2158
|
|
|
2165
|
-
.field-row > button { flex: none; }
|
|
2159
|
+
.danger-field-row > button { flex: none; }
|
|
2166
2160
|
|
|
2167
2161
|
/* Two forms one under the other, whose buttons say different words -- "Add"
|
|
2168
2162
|
and "Block". Sized to their text they came out different widths, and two
|
|
2169
2163
|
controls in the same column at the same indent that do not line up read as
|
|
2170
2164
|
an accident rather than as a pair. */
|
|
2171
|
-
.field-row > button { min-width: 9ch; }
|
|
2165
|
+
.danger-field-row > button { min-width: 9ch; }
|
|
2172
2166
|
}
|
|
2173
2167
|
|
|
2174
2168
|
/* ---- ./callout.css ---- */
|
|
@@ -2499,9 +2493,12 @@ input:active, textarea:active, select:active { transform: none; }
|
|
|
2499
2493
|
/* Sized to its words, for a switch that sits in a row of other controls rather
|
|
2500
2494
|
than owning a row of its own. `flex: 1` there would push the label away from
|
|
2501
2495
|
the switch by the whole width of the bar. */
|
|
2502
|
-
|
|
2496
|
+
/* `inRow`: a toggle beside other controls rather than in a column of
|
|
2497
|
+
settings. Was `.row > .switch-row`, which reached through `.row` -- a class
|
|
2498
|
+
no component here renders. */
|
|
2499
|
+
.switch-in-row { flex: none; padding-block: 0; }
|
|
2503
2500
|
|
|
2504
|
-
.
|
|
2501
|
+
.switch-in-row .switch-body { flex: none; }
|
|
2505
2502
|
|
|
2506
2503
|
/* The opposite case: a switch that *is* the row, with something small beside it
|
|
2507
2504
|
-- a tooltip, a state word. `.set-row` wraps, so a switch that does not grow
|
|
@@ -4090,7 +4087,10 @@ input[type='range'].slider:disabled::-moz-range-thumb { opacity: 0; }
|
|
|
4090
4087
|
/* Fields stacked down a form. Wider than the gap inside one field, so the
|
|
4091
4088
|
label of the next belongs to the input under it rather than to the error
|
|
4092
4089
|
above it. */
|
|
4093
|
-
|
|
4090
|
+
/* `inRow`: a field sharing a line with other controls rather than stacked in a
|
|
4091
|
+
column. Was `.field-row > .field`, which reached through a container class
|
|
4092
|
+
the caller had to write and this package does not hand out. */
|
|
4093
|
+
.field-in-row { flex: 1; min-width: 0; }
|
|
4094
4094
|
|
|
4095
4095
|
/* A password with an eye -- `Input type="password"`.
|
|
4096
4096
|
A grid rather than `position: absolute`: both children take the one cell, the
|