@mistriwork/kit 1.0.0-rc.65 → 1.0.0-rc.67
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.
|
@@ -63,12 +63,13 @@
|
|
|
63
63
|
.multi-step-form[data-style='intake'] [data-slot='input'][data-hidden] { letter-spacing: 0.12em; }
|
|
64
64
|
|
|
65
65
|
/* The actions: Back a quiet word, the primary the one filled thing on the page, in the theme's primary-action color
|
|
66
|
-
(formDress.css). No rule over them.
|
|
66
|
+
(formDress.css). No rule over them. Their ground is the form's (--form-ground, which a look that draws the form
|
|
67
|
+
as a panel or a card sets): on the page's own, a look whose page is tinted drew a grey band across the panel. */
|
|
67
68
|
.intake-actions {
|
|
68
69
|
margin-inline: 0;
|
|
69
70
|
padding: var(--space-4) 0 max(var(--space-4), env(safe-area-inset-bottom));
|
|
70
71
|
border-top: 0;
|
|
71
|
-
background: var(--ground);
|
|
72
|
+
background: var(--form-ground, var(--ground));
|
|
72
73
|
align-items: center;
|
|
73
74
|
}
|
|
74
75
|
.intake-actions [data-slot='button'] { min-height: var(--control-h); }
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
.intake-actions { margin-top: auto; }
|
|
92
93
|
.intake-actions::before {
|
|
93
94
|
content: ''; position: absolute; inset-inline: 0; bottom: 100%; height: var(--space-5);
|
|
94
|
-
background: linear-gradient(to bottom, transparent, var(--ground)); pointer-events: none;
|
|
95
|
+
background: linear-gradient(to bottom, transparent, var(--form-ground, var(--ground))); pointer-events: none;
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -43,7 +43,7 @@ import { DateField } from './DateField.js';
|
|
|
43
43
|
import { isPickerDate } from '@mistriwork/ui/internal/datePickerModel.js';
|
|
44
44
|
import { appNow, formatClockZone, formatLocale, formatTimezone } from '../locale.js';
|
|
45
45
|
import { InputSlot, columnInput } from './inputRenderers.js';
|
|
46
|
-
import { autoKey, enteredNow, isRequired, platformWritten } from '@mistriwork/engine/shared/form.js';
|
|
46
|
+
import { appAssignedKey, autoKey, enteredNow, isRequired, platformWritten } from '@mistriwork/engine/shared/form.js';
|
|
47
47
|
import { columnTextRule, textRuleBreak } from '@mistriwork/engine/shared/textRules.js';
|
|
48
48
|
import { shell } from '../shellMode.js';
|
|
49
49
|
import { resourceOf } from './appRooms.js';
|
|
@@ -104,7 +104,8 @@ function NewRecordFormAsking({ words, ...props }) {
|
|
|
104
104
|
}
|
|
105
105
|
function NewRecordFormBody({ table, form, app, label: columnLabel, target, insert, onAdded, onCancel, onPendingChange, onDiscardChange, onUnresolvedChange, compact = false, retainUncertain = compact, display, frame = app ? 'drawer' : 'dialog', }) {
|
|
106
106
|
useMessageLanguage();
|
|
107
|
-
|
|
107
|
+
/* An App's store fills a single text key nothing in the catalog fills (filledKey), so its form does not demand one. */
|
|
108
|
+
const assigned = app ? appAssignedKey(table) : autoKey(table);
|
|
108
109
|
const written = app ? newFormWritten(table) : undefined;
|
|
109
110
|
/* A display-only vocabulary is chosen from in an App's form (withDisplayChoices). */
|
|
110
111
|
const choosing = (column) => app ? withDisplayChoices(column, display?.(column), [form?.defaults?.[column.name], literalDefault(column.default)]) : column;
|
package/dist/client/features.css
CHANGED
|
@@ -1305,14 +1305,14 @@ body.app-mode .sidebar[data-density="comfortable"] #table-list .nav-dot { width:
|
|
|
1305
1305
|
max-height: var(--available-height);
|
|
1306
1306
|
overflow-y: auto; overscroll-behavior: contain;
|
|
1307
1307
|
background: var(--surface); border: 1px solid var(--line-strong);
|
|
1308
|
-
border-radius: var(--radius);
|
|
1308
|
+
border-radius: var(--radius-pop, var(--radius));
|
|
1309
1309
|
box-shadow: var(--shadow-pop);
|
|
1310
1310
|
display: flex; flex-direction: column;
|
|
1311
1311
|
}
|
|
1312
1312
|
/* display:flex outranks the UA's [hidden] rule — say it ourselves. */
|
|
1313
1313
|
.tn-pop[hidden] { display: none; }
|
|
1314
1314
|
.tn-popitem {
|
|
1315
|
-
background: none; border: none; border-radius: var(--radius);
|
|
1315
|
+
background: none; border: none; border-radius: var(--radius-item, var(--radius));
|
|
1316
1316
|
font: var(--text-base) var(--mono); color: var(--ink);
|
|
1317
1317
|
padding: var(--space-2h) var(--space-3); text-align: left; white-space: normal; overflow-wrap: anywhere;
|
|
1318
1318
|
}
|
|
@@ -1326,6 +1326,7 @@
|
|
|
1326
1326
|
/* A form is a white card too: a drawer's body, a page form. */
|
|
1327
1327
|
:root[data-look-fields='card'] .form-page {
|
|
1328
1328
|
background: var(--surface);
|
|
1329
|
+
--form-ground: var(--surface);
|
|
1329
1330
|
border: var(--panel-border-width, 1px) solid var(--line);
|
|
1330
1331
|
border-radius: var(--radius-lg);
|
|
1331
1332
|
box-shadow: var(--shadow-card);
|
package/dist/client/sageLook.css
CHANGED
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
page not held, beside panels (`fields: 'card'` has always drawn the form as its card). */
|
|
101
101
|
:root[data-look-fields='panel'] .form-page {
|
|
102
102
|
background: var(--surface);
|
|
103
|
+
--form-ground: var(--surface);
|
|
103
104
|
border: var(--panel-border-width, 1px) solid var(--line);
|
|
104
105
|
border-radius: var(--radius-lg);
|
|
105
106
|
box-shadow: none;
|
|
@@ -231,6 +231,74 @@
|
|
|
231
231
|
is, it read as a second primary over every list and on every record. */
|
|
232
232
|
html:root[data-theme-style][data-look-tabs='pill'] :is(.tab, :where(body.app-mode) .page-tab)[aria-selected='true'] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
|
|
233
233
|
:root[data-theme-style] .tab .tab-count { font-size: var(--text-sm); line-height: 1; }
|
|
234
|
+
/* A two-or-three-way switch (a Segmented, a list's Rows/Board, the phone's Records/Table, Tree/Raw) is one drawing in every
|
|
235
|
+
look: a tray on the raised ground with a hairline, and the chosen one inside it. The tray's corner is the item's plus
|
|
236
|
+
what stands between them (padding and the hairline), so the two curves share a centre: a pill in a pill under round
|
|
237
|
+
controls, and 0 in 0 under square ones (the min() holds a square item's tray square). Its height is the toolbar
|
|
238
|
+
control's, so it stands level with the search and the filters beside it; a finger's 44px (kit.css) still outgrows it.
|
|
239
|
+
Never a `--line-control` edge: that is a field's, and a switch framed like a text field read as one. How the chosen
|
|
240
|
+
one shows is the look's `current` recipe, as the dashboard's windows are (`data-look-windows`): a filled segment
|
|
241
|
+
(the base), a lifted key (`lifted`) or a tint (`tint`). */
|
|
242
|
+
:root[data-theme-style] :is(.kit-segmented, .list-layout, .record-presentation, .json-modes) {
|
|
243
|
+
--seg-pad: var(--space-1h);
|
|
244
|
+
--seg-item-radius: var(--control-radius, var(--radius));
|
|
245
|
+
box-sizing: border-box; align-items: stretch; gap: var(--space-1); padding: var(--seg-pad);
|
|
246
|
+
border: 1px solid var(--line); background: var(--raised);
|
|
247
|
+
border-radius: min(calc(var(--seg-item-radius) + var(--seg-pad) + 1px), calc(var(--seg-item-radius) * 1000));
|
|
248
|
+
}
|
|
249
|
+
:root[data-theme-style] :is(.kit-segmented:not(.kit-segmented-compact), .list-layout, .record-presentation) { min-height: var(--control-h-sm); }
|
|
250
|
+
:root[data-theme-style] .record-presentation { width: fit-content; }
|
|
251
|
+
html:root[data-theme-style] .record-presentation { margin-inline-start: auto; }
|
|
252
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode) { margin: 0; border: 0; border-radius: var(--seg-item-radius); }
|
|
253
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):not([aria-checked='true'], [aria-pressed='true']) { background: transparent; color: var(--ink-muted); }
|
|
254
|
+
@media (min-width: 761px) and (pointer: fine) {
|
|
255
|
+
:root[data-theme-style] :is(.kit-segmented, .list-layout) > :is(.kit-segment, .list-layout-seg) { min-height: 0; }
|
|
256
|
+
}
|
|
257
|
+
@media (hover: hover) {
|
|
258
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):hover:not([aria-checked='true'], [aria-pressed='true']) { color: var(--ink); }
|
|
259
|
+
}
|
|
260
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):focus-visible { outline: var(--focus-width, 2px) solid var(--focus); outline-offset: -2px; }
|
|
261
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
262
|
+
:root[data-theme-style] :is(.list-layout-seg, .presentation-seg, .json-mode) { transition: color var(--t-hover, 120ms) ease, background-color var(--t-hover, 120ms) ease; }
|
|
263
|
+
}
|
|
264
|
+
/* The base: the chosen segment filled, in the accent, or in the ink where the look inverts its current one (Mono). */
|
|
265
|
+
:root[data-theme-style]:not([data-look-windows='lifted'], [data-look-windows='tint']) :is(.list-layout-seg, .presentation-seg, .json-mode):is([aria-pressed='true']) { background: var(--accent); color: var(--on-accent); }
|
|
266
|
+
:root[data-theme-style][data-look-tabs='inverted']:not([data-look-windows='lifted'], [data-look-windows='tint']) :is(.list-layout-seg, .presentation-seg, .json-mode)[aria-pressed='true'] { background: var(--ink); color: var(--surface); }
|
|
267
|
+
/* Lifted: the chosen one is a white key out of the tray, in the ink, with the control's hairline of shadow and no fill in the accent. */
|
|
268
|
+
:root[data-theme-style][data-look-windows='lifted'] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) {
|
|
269
|
+
--kit-segment-fill: var(--ink); --kit-segment-ink: var(--raised);
|
|
270
|
+
background: var(--surface); color: var(--ink); box-shadow: var(--shadow-control);
|
|
271
|
+
}
|
|
272
|
+
/* In the dark a lifted chip is lit, not shaded: --surface sits below --raised there, so the chosen one would sink. */
|
|
273
|
+
@media (prefers-color-scheme: dark) {
|
|
274
|
+
:root[data-theme-style][data-look-windows='lifted']:not([data-theme='light']) :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) { background: color-mix(in oklab, var(--raised) 86%, var(--ink)); }
|
|
275
|
+
}
|
|
276
|
+
:root[data-theme-style][data-look-windows='lifted'][data-theme='dark'] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) { background: color-mix(in oklab, var(--raised) 86%, var(--ink)); }
|
|
277
|
+
/* Tint: no tray, the chosen one a soft wash of the accent, as the dashboard's windows are. */
|
|
278
|
+
:root[data-theme-style][data-look-windows='tint'] :is(.kit-segmented, .list-layout, .record-presentation, .json-modes) { background: transparent; border-color: transparent; }
|
|
279
|
+
:root[data-theme-style][data-look-windows='tint'] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) {
|
|
280
|
+
--kit-segment-fill: var(--ink); --kit-segment-ink: var(--surface);
|
|
281
|
+
background: var(--chosen, var(--accent-soft)); color: var(--ink);
|
|
282
|
+
}
|
|
283
|
+
/* A toolbar's controls stand at one height: the dashboard's window, its filters and a chart's series pick, a list's
|
|
284
|
+
Filters toggle beside its Columns. Each had its own (a literal 32, the field's 34, a literal 28, a toggle sized by its
|
|
285
|
+
padding to 27), so a row of them was ragged by up to six pixels. The compact size is the token a bar's control takes
|
|
286
|
+
(@mistriwork/ui tokens.css); a finger's 44px (the coarse-pointer rule on a Select trigger) still outgrows it. */
|
|
287
|
+
:root[data-theme-style] :is(.dash-window-button, .dash-picks [data-slot='select-trigger'], .dash-period [data-slot='select-trigger'], .chart-series-pick, .applist-toggle) { box-sizing: border-box; height: var(--control-h-sm); min-height: var(--control-h-sm); }
|
|
288
|
+
:root[data-theme-style] .applist-toggle { display: inline-flex; align-items: center; }
|
|
289
|
+
@media (pointer: coarse), (max-width: 40rem) { :root[data-theme-style] :is(.dash-picks, .dash-period) [data-slot='select-trigger'] { min-height: calc(44px / var(--density-zoom, 1)); } }
|
|
290
|
+
/* A facet's date is a field in a narrow rail, the text box's height beside it: the form's 36px on its inner box stood two
|
|
291
|
+
pixels over the 34px one under the same label. */
|
|
292
|
+
:root[data-theme-style] .facet-input [data-slot='input'] { min-height: var(--control-h); }
|
|
293
|
+
/* Round controls: what opens from a pill is a card of the same family, not the house's 8px box with 5px rows. The popup
|
|
294
|
+
takes the round step (a menu rounder than 16px loses its first row's corner) and a row is the popup's corner less the
|
|
295
|
+
padding between them, so the two curves share a centre (as the switch's tray and its keys, above). Square and sharp looks
|
|
296
|
+
set no --control-radius and keep --radius-pop and --radius-item as they were. */
|
|
297
|
+
:root[data-control-radius][data-visual-theme] body { --radius-pop: 16px; }
|
|
298
|
+
:root[data-control-radius][data-visual-theme] :is([data-slot='menu-content'], [data-slot='select-content'], [data-slot='autocomplete-content'], .page-actions-popup, .th-menu, .account-menu-popup, .export-menu, .picker-popup) { --radius-item: calc(var(--radius-pop) - var(--space-2)); }
|
|
299
|
+
:root[data-control-radius][data-visual-theme] .tn-pop { --radius-item: calc(var(--radius-pop) - var(--space-2h)); }
|
|
300
|
+
/* A keycap and a brand mark inside a pill are pills: a corner of the box's own on a pill's end read as a square in a curve. */
|
|
301
|
+
:root[data-control-radius] :is(.tn-search-key, #home-button .brand-mark.brand-mark--logo) { border-radius: var(--control-radius); }
|
|
234
302
|
:root[data-theme-style] button.ghost:not(.fav-star, .dash-open, .account, .live-act, .pager *) { border-color: var(--line); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-control); }
|
|
235
303
|
:root[data-theme-style] button.ghost:not(.fav-star, .dash-open, .account, .live-act, .pager *):hover:not(:disabled) { background: var(--raised); }
|
|
236
304
|
/* A secondary Button that is a toggle says it is on: the ink's edge on the tinted ground, in every look. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mistriwork/kit",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.67",
|
|
4
4
|
"description": "The shared React client both shells are drawn with: the walk and the address, Grid, Value, the record page, lists, filters and charts.",
|
|
5
5
|
"homepage": "https://mistriwork.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"./package.json": "./package.json"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@mistriwork/engine": "1.0.0-rc.
|
|
89
|
-
"@mistriwork/ui": "1.0.0-rc.
|
|
88
|
+
"@mistriwork/engine": "1.0.0-rc.67",
|
|
89
|
+
"@mistriwork/ui": "1.0.0-rc.67",
|
|
90
90
|
"intl-messageformat": "12.1.2",
|
|
91
91
|
"qrcode-generator": "^2.0.4"
|
|
92
92
|
},
|