@pythia-software/query-table-ui 0.9.5 → 0.9.7
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 +53 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +1891 -1188
- package/dist/index.js.map +1 -1
- package/dist/theme.css +309 -117
- package/dist/theme.css.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -115,7 +115,11 @@ Open **Column Widths** to resize in one step:
|
|
|
115
115
|
- **Fit All to Screen** fills the viewport; when content overflows, narrow
|
|
116
116
|
columns keep their content width and only the widest ones are trimmed. It
|
|
117
117
|
sets `query.fitToScreen`, so shared links and saved queries fit each viewer's
|
|
118
|
-
available table area after loading and when that area changes.
|
|
118
|
+
available table area after loading and when that area changes. No column
|
|
119
|
+
is trimmed below what its buttons and links need (links shorten to an
|
|
120
|
+
ellipsis first); if those minimums exceed the screen, the table scrolls
|
|
121
|
+
horizontally. Set `select.minWidth` on a field whose host renderer needs
|
|
122
|
+
room the table cannot measure.
|
|
119
123
|
- **Equal Widths** splits the viewport evenly.
|
|
120
124
|
- **Reset Widths** drops explicit widths back to schema defaults.
|
|
121
125
|
|
|
@@ -379,6 +383,54 @@ status indicators an accessible label on their wrapper.
|
|
|
379
383
|
|
|
380
384
|
## Mobile behavior
|
|
381
385
|
|
|
386
|
+
### Responsive target sizing
|
|
387
|
+
|
|
388
|
+
Set the public, unitless `--qt-touch-target-scale` CSS custom property to
|
|
389
|
+
configure the **added** touch-target size in the bundled theme:
|
|
390
|
+
|
|
391
|
+
| Value | Target sizing |
|
|
392
|
+
| --- | --- |
|
|
393
|
+
| `1` (default, including when unset) | Existing responsive enlargement |
|
|
394
|
+
| `0.5` | Half the added size |
|
|
395
|
+
| `0` | Desktop target sizing with the responsive layout |
|
|
396
|
+
|
|
397
|
+
```css
|
|
398
|
+
/* Scope to a host wrapper containing the builder, table and metrics. */
|
|
399
|
+
.pharos-query-table {
|
|
400
|
+
--qt-touch-target-scale: 0.5;
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
For each enlarged dimension, the theme uses
|
|
405
|
+
`desktop + (responsive - desktop) * scale`. A desktop 24px button that normally
|
|
406
|
+
grows to 44px therefore becomes 34px at `0.5`. Each control uses its own desktop
|
|
407
|
+
baseline, including its line box, padding and borders; collapse controls, chips,
|
|
408
|
+
picker rows and editor buttons have different baselines. Narrow and coarse
|
|
409
|
+
pointer rules use the final responsive size once, so matching both does not
|
|
410
|
+
compound the enlargement. Use a number from `0` to `1`, without a unit.
|
|
411
|
+
|
|
412
|
+
The setting covers query actions/chips, table cells/actions, picker and menu
|
|
413
|
+
rows, selection actions, saved-query controls, JSON controls, and select,
|
|
414
|
+
property and metric editor controls. Content remains a lower bound: wrapped
|
|
415
|
+
labels, icons, native controls and the retained mobile input fonts can require
|
|
416
|
+
more room than the scaled minimum. Existing responsive size reductions stay
|
|
417
|
+
compact. Layout widths, wrapping, sheets, scrolling, focus behavior, drag/touch
|
|
418
|
+
actions, breakpoints and input font sizes are independent of the factor.
|
|
419
|
+
|
|
420
|
+
Use `:root` for an application-wide setting, or a wrapper for independent
|
|
421
|
+
instances. Built-in portaled menus, pickers, dialogs and sheets inherit the
|
|
422
|
+
setting from their trigger/overlay anchor through the same theme propagation
|
|
423
|
+
as the palette, including live ancestor `class`, `style` and `data-theme`
|
|
424
|
+
changes. Keep standalone overlays beneath that wrapper in the React tree (and
|
|
425
|
+
their anchor within it). Host-owned portals and controls with custom styling
|
|
426
|
+
must propagate/apply their own sizing. `QueryBuilder`'s `compact` prop controls
|
|
427
|
+
clause presentation separately.
|
|
428
|
+
|
|
429
|
+
Run `npm run test:touch-targets` with `npm run demo` running to check relative
|
|
430
|
+
sizing, scoped portal updates and interactions in Chromium and WebKit.
|
|
431
|
+
|
|
432
|
+
### Responsive layout and interactions
|
|
433
|
+
|
|
382
434
|
The bundled theme keeps the table as a horizontally scrollable grid on narrow
|
|
383
435
|
screens so columns remain comparable. Narrow screens (up to 760px) and short,
|
|
384
436
|
touch-based landscape viewports use a mobile interaction model:
|
package/dist/index.d.ts
CHANGED
|
@@ -246,7 +246,14 @@ interface MetricClassNames {
|
|
|
246
246
|
}
|
|
247
247
|
declare function createMetricColorResolver(theme?: MetricTheme): {
|
|
248
248
|
token: (name: MetricToken) => string;
|
|
249
|
-
color(field: string, value: MetricValue)
|
|
249
|
+
color: (field: string, value: MetricValue) => string;
|
|
250
|
+
/**
|
|
251
|
+
* Colours whole group keys drawn together. Single values resolve as
|
|
252
|
+
* `color`. A tuple's colour depends only on the theme and its values,
|
|
253
|
+
* except that tuples sharing a chart take the next free colour rather
|
|
254
|
+
* than repeat one while the palette has room.
|
|
255
|
+
*/
|
|
256
|
+
tupleColors(fields: readonly string[], tuples: ReadonlyArray<readonly MetricValue[]>): (values: readonly MetricValue[]) => string;
|
|
250
257
|
};
|
|
251
258
|
|
|
252
259
|
interface QueryBuilderProps<Row> {
|
|
@@ -526,6 +533,9 @@ interface ObjectPropertiesProps<Row> {
|
|
|
526
533
|
onOpenReference?: (reference: ObjectReference) => void;
|
|
527
534
|
/** Explicit projection coverage distinguishes unloaded fields from NULL values. */
|
|
528
535
|
loadedFields?: readonly string[];
|
|
536
|
+
/** The collection query the row came from, passed to renderers; group link
|
|
537
|
+
* summaries resolve their destinations from it. */
|
|
538
|
+
query?: QueryState;
|
|
529
539
|
locale?: string;
|
|
530
540
|
theme?: MetricTheme;
|
|
531
541
|
now?: number;
|