@ixfx/components 0.16.4 → 0.17.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/bundle/index.d.ts +4192 -1718
- package/bundle/index.js +1237 -234
- package/bundle/rolldown-runtime-CAoDHAWh.js +1 -0
- package/dist/ac-text.d.ts +20 -12
- package/dist/ac-text.js +17 -9
- package/dist/{ac-token-qEs3FsQv.d.ts → ac-token-CTBa93hF.d.ts} +2 -6
- package/dist/ac-token.d.ts +1 -1
- package/dist/ac-token.js +8 -9
- package/dist/{button-ikByJJPN.js → button-BOX1dfyd.js} +5 -7
- package/dist/{button-N92DKoWb.d.ts → button-DyJyyCsb.d.ts} +0 -4
- package/dist/button.d.ts +1 -1
- package/dist/button.js +1 -2
- package/dist/checkbox.d.ts +42 -9
- package/dist/checkbox.js +4 -5
- package/dist/{checked-select-CBUidG7n.js → checked-select-BmwqpgGr.js} +8 -10
- package/dist/{checked-select-CglRukbP.d.ts → checked-select-CNv5zNvR.d.ts} +0 -4
- package/dist/checked-select.d.ts +33 -1
- package/dist/checked-select.js +1 -2
- package/dist/{colour-picker-DwAa6RDh.js → colour-picker-D8g-bTSF.js} +6 -9
- package/dist/colour-picker.d.ts +1 -1
- package/dist/colour-picker.js +1 -2
- package/dist/{crumb-navigation-D3ndPgFg.js → crumb-navigation-D7dAC0H-.js} +11 -13
- package/dist/{crumb-navigation-BbqfmkYs.d.ts → crumb-navigation-Tm4fnsvN.d.ts} +6 -10
- package/dist/crumbs.d.ts +1 -1
- package/dist/crumbs.js +1 -2
- package/dist/{data-controller-DOlmqNKb.js → data-controller-q-rXRMzJ.js} +1 -2
- package/dist/data-display.d.ts +5 -8
- package/dist/data-display.js +3 -4
- package/dist/{data-grid-8TsiF2ES.js → data-grid-BcO3SMac.js} +20 -23
- package/dist/{data-grid-CslzF16R.d.ts → data-grid-vasJtjFP.d.ts} +9 -15
- package/dist/data-grid.d.ts +2 -2
- package/dist/data-grid.js +1 -2
- package/dist/{data-provider-35TyWclX.js → data-provider-C6ZNAcaT.js} +1 -2
- package/dist/{data-provider-BAn_-oR1.d.ts → data-provider-Cq_ylpET.d.ts} +0 -2
- package/dist/date-input.d.ts +57 -0
- package/dist/date-input.js +122 -0
- package/dist/{decorate-VRK8rslU.js → decorate-Dxs8sFX8.js} +2 -4
- package/dist/{defaults-B4ePs4LB.js → defaults-_6ELsqLb.js} +2 -3
- package/dist/{detail-list-n1MbNbhF.d.ts → detail-list-E9WdMVbE.d.ts} +10 -16
- package/dist/{detail-list-w3GXKO2k.js → detail-list-vPVwE1CP.js} +17 -20
- package/dist/detail-list.d.ts +5 -5
- package/dist/detail-list.js +1 -2
- package/dist/{drag-ghost-DtSDvjri.js → drag-ghost-DNWu_RyN.js} +1 -2
- package/dist/{editable-label-rzXkjf1H.d.ts → editable-label-CiHCDlhC.d.ts} +0 -2
- package/dist/editable-label.d.ts +31 -1
- package/dist/editable-label.js +3 -4
- package/dist/{fallbacks-DQ_5OsmR.js → fallbacks-BPjjBoED.js} +1 -2
- package/dist/{flat-list-D_4y3wgn.d.ts → flat-list-CfutGqKY.d.ts} +8 -12
- package/dist/flat-list.d.ts +1 -1
- package/dist/flat-list.js +10 -11
- package/dist/{form-CY0nibZ5.js → form-Cxx2sO8_.js} +5 -9
- package/dist/{form-BGZK3jZd.d.ts → form-raTQNAWF.d.ts} +0 -4
- package/dist/form.d.ts +1 -1
- package/dist/form.js +1 -2
- package/dist/{grid-list-Cz2tKcNZ.js → grid-list-BHo9TBxX.js} +20 -24
- package/dist/{grid-list-CqYS28NY.d.ts → grid-list-Dg8hIiKO.d.ts} +9 -23
- package/dist/grid-list.d.ts +4 -4
- package/dist/grid-list.js +1 -2
- package/dist/{grouped-item-lister-CS4yInuw.d.ts → grouped-item-lister-1MlvJORP.d.ts} +2 -6
- package/dist/grouped-item-lister.d.ts +1 -1
- package/dist/grouped-item-lister.js +3 -4
- package/dist/{grouping-CUKgmkMm.d.ts → grouping-OoQ8WaKc.d.ts} +0 -2
- package/dist/{grouping-RYPnHkrS.js → grouping-kENdqzSV.js} +1 -2
- package/dist/{handle-DAXs7kbJ.js → handle-BVUWv97X.js} +1 -2
- package/dist/{hex-editor-Caq8vNQk.d.ts → hex-editor-BCBKRU9D.d.ts} +0 -4
- package/dist/{hex-editor-DiYpgIKs.js → hex-editor-DephDhuu.js} +12 -13
- package/dist/hex.d.ts +1 -1
- package/dist/hex.js +1 -2
- package/dist/{highlight-B-eQrhhb.js → highlight-noLHFSKZ.js} +1 -2
- package/dist/{icon-CDGprSdE.d.ts → icon-Bhz0c6Yf.d.ts} +0 -2
- package/dist/{icon-1gpwtPx8.js → icon-DvTQuylG.js} +4 -5
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +4 -5
- package/dist/{incr-search-Dc6gYpJG.js → incr-search-C5114RxZ.js} +14 -26
- package/dist/incr-search.d.ts +1 -1
- package/dist/incr-search.js +2 -2
- package/dist/{index-ZaA90u09.d.ts → index-0smh4WCH.d.ts} +3 -21
- package/dist/{index-VAs9akt4.d.ts → index-88ra6YHP.d.ts} +8 -22
- package/dist/{index-UvnoZUAo.d.ts → index-B7odjrlg.d.ts} +4 -8
- package/dist/{index-Bm9a9S3_.d.ts → index-CRLTVAyt.d.ts} +4 -30
- package/dist/{index-9ttcdwlL.d.ts → index-Cdcek1Oj.d.ts} +1 -3
- package/dist/index-Cn0qsz9a.d.ts +1632 -0
- package/dist/{index-YCDugjdu.d.ts → index-CzhYJJsx.d.ts} +7 -17
- package/dist/{index-CYndvTWH.d.ts → index-D6N4Lzek.d.ts} +1 -5
- package/dist/{index-CoqtMSd9.d.ts → index-DN6kC6an.d.ts} +1 -3
- package/dist/{index-DV3iaUBW2.d.ts → index-DrYQBts2.d.ts} +0 -14
- package/dist/{index-o-CWDt11.d.ts → index-DzocgUef.d.ts} +0 -4
- package/dist/{index-DN2BWctP.d.ts → index-PIrgX1bP.d.ts} +1 -7
- package/dist/index.d.ts +391 -490
- package/dist/index.js +269 -207
- package/dist/interaction-8Kbbf6xN.js +3 -0
- package/dist/{item-appearance-BjcMyauw.js → item-appearance-FRO3TRFI.js} +1 -2
- package/dist/{keyboard-B5xD7Fz-.js → keyboard-DMwjIYh7.js} +0 -1
- package/dist/{labelled-input-base-BFa4xlYV.js → labelled-input-base-KUhD02dh.js} +3 -5
- package/dist/{labelled-input-base-DiTme1JO.d.ts → labelled-input-base-jyr_SR6t.d.ts} +0 -2
- package/dist/labelled-radial-input.d.ts +4 -7
- package/dist/labelled-radial-input.js +5 -6
- package/dist/labelled-range-input.d.ts +1 -1
- package/dist/labelled-range-input.js +3 -4
- package/dist/{labelled-slider-input-FdCRi6st.js → labelled-slider-input-CfRKd5kC.js} +9 -11
- package/dist/labelled-slider-input.d.ts +1 -1
- package/dist/labelled-slider-input.js +1 -2
- package/dist/led.d.ts +3 -6
- package/dist/led.js +2 -3
- package/dist/list-group-header.d.ts +3 -6
- package/dist/list-group-header.js +3 -4
- package/dist/{list-native-drag-controller-CcXoS0YX.js → list-native-drag-controller-ByftBooJ.js} +5 -9
- package/dist/{list-native-drag-controller-D_UrXipS.d.ts → list-native-drag-controller-CgXKdmjr.d.ts} +1 -3
- package/dist/{list-selection-controller-D4iIrvJH.js → list-selection-controller-Dkh3m3hX.js} +3 -5
- package/dist/{list-selection-types-Dnamh2Lu.d.ts → list-selection-types-CKTt7Rrw.d.ts} +0 -2
- package/dist/{list-viewport-types-BRZsLcvp.d.ts → list-viewport-types-BJ8c6qur.d.ts} +0 -2
- package/dist/{menu-BX1FHxY8.js → menu-C3DhTjHx.js} +17 -27
- package/dist/{menu-item-oxU1VKiJ.js → menu-item-BSxhlWnW.js} +30 -15
- package/dist/{menu-item-bF6narIz.d.ts → menu-item-DJhaWy9z.d.ts} +10 -7
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +2 -2
- package/dist/{miller-BrmBywNZ.js → miller-DqDEaXqT.js} +15 -19
- package/dist/miller.d.ts +3 -3
- package/dist/miller.js +1 -2
- package/dist/narrowed-text.d.ts +1 -1
- package/dist/narrowed-text.js +8 -9
- package/dist/node-graph-DqEGv5QR.js +5369 -0
- package/dist/node-graph.d.ts +2 -0
- package/dist/node-graph.js +1 -0
- package/dist/{notification-pill-DyZydXoZ.d.ts → notification-pill-BiHEJk-o.d.ts} +0 -4
- package/dist/notifier.d.ts +1 -1
- package/dist/notifier.js +4 -5
- package/dist/{pan-text-CoYmt2qd.d.ts → pan-text-DKe2zinH.d.ts} +0 -2
- package/dist/{pan-text-CqtvjPyK.js → pan-text-DrJYKQKN.js} +3 -4
- package/dist/panel.d.ts +11 -14
- package/dist/panel.js +3 -4
- package/dist/{partial-keys-Ck6CiprB.js → partial-keys-D4l_ede_.js} +2 -3
- package/dist/{pending-BGidHppL.js → pending-Afl4LT64.js} +1 -2
- package/dist/plots.d.ts +1 -1
- package/dist/plots.js +1 -2
- package/dist/polar-pad.d.ts +5 -7
- package/dist/polar-pad.js +6 -7
- package/dist/{popup-D80sj2QC.js → popup-D8IxN1Eq.js} +1 -2
- package/dist/{prominence-DlFShic3.js → prominence-BOOQVWF-.js} +1 -2
- package/dist/{radial-input-KMVltQfe.js → radial-input-Cxys4TOG.js} +7 -9
- package/dist/{radial-input-DU6t2hYO.d.ts → radial-input-DNCSwRGF.d.ts} +1 -5
- package/dist/radial-input.d.ts +10 -1
- package/dist/radial-input.js +1 -2
- package/dist/range-input.d.ts +4 -6
- package/dist/range-input.js +5 -6
- package/dist/range.d.ts +4 -6
- package/dist/range.js +6 -7
- package/dist/{registry-BEtb8_wB.js → registry-DcF0fO7l.js} +1 -2
- package/dist/rolldown-runtime-D3KUYPsf.js +12 -0
- package/dist/{scroll-fade-Xx28D7mH.js → scroll-fade-DH8OXSqL.js} +1 -2
- package/dist/{scroll-hover-guard-Cjw6179Q.js → scroll-hover-guard-BGAjtyXT.js} +1 -2
- package/dist/select-horiz.d.ts +7 -9
- package/dist/select-horiz.js +8 -9
- package/dist/{slider-input-ByHdotzp.js → slider-input-C3mbUBZi.js} +6 -8
- package/dist/{slider-input-BxURAAmD.d.ts → slider-input-DHLGJKWF.d.ts} +1 -5
- package/dist/slider-input.d.ts +34 -1
- package/dist/slider-input.js +1 -2
- package/dist/snackbar.d.ts +5 -8
- package/dist/snackbar.js +4 -5
- package/dist/snap-container.d.ts +8 -11
- package/dist/snap-container.js +2 -3
- package/dist/{split-layout-DTY4PJRp.js → split-layout-BMN_s6d7.js} +10 -15
- package/dist/{split-layout-CophkNeU.d.ts → split-layout-HytcG1Bn.d.ts} +2 -8
- package/dist/split-layout.d.ts +1 -1
- package/dist/split-layout.js +1 -2
- package/dist/sunburst-tree.d.ts +1 -1
- package/dist/sunburst-tree.js +1 -2
- package/dist/{sunbursttree-list-DQF6DcsS.js → sunbursttree-list-C-FuZB5z.js} +23 -32
- package/dist/{sunbursttree-list-Bk20giTF.d.ts → sunbursttree-list-CsrmVSB8.d.ts} +5 -11
- package/dist/swipe.d.ts +7 -9
- package/dist/swipe.js +5 -6
- package/dist/{tab-list-Df371rqw.d.ts → tab-list-BXMRYJeR.d.ts} +1 -5
- package/dist/{tab-list-R_bGbDvO.js → tab-list-CFJy3hVm.js} +6 -15
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +1 -2
- package/dist/{tickled-controller-D-HZymaZ.js → tickled-controller-BVhGKzjZ.js} +1 -2
- package/dist/{tickled-controller-DodxD3eQ.d.ts → tickled-controller-DSPoG551.d.ts} +0 -2
- package/dist/{tickled-styles-BrAHEj1q.js → tickled-styles-pnieYweS.js} +1 -2
- package/dist/{timeline-BP1Ux2EV.js → timeline-Br5JIeLI.js} +9 -15
- package/dist/timeline.d.ts +1 -1
- package/dist/timeline.js +1 -2
- package/dist/{titlebar-Tqu-VvMU.d.ts → titlebar-BtLAF2ws.d.ts} +1 -3
- package/dist/titlebar.d.ts +1 -1
- package/dist/titlebar.js +4 -5
- package/dist/{tooltip-CJt3WLmN.js → tooltip-B7t_u6EY.js} +1 -2
- package/dist/{tooltip-BlvBUQxx.d.ts → tooltip-Bl4HpBue.d.ts} +0 -2
- package/dist/transitory-label.d.ts +3 -6
- package/dist/transitory-label.js +2 -3
- package/dist/{tree-BaXYyt5U.js → tree-BP5fxvEX.js} +24 -34
- package/dist/{tree-CftHwtEb.js → tree-DUc-iQcg.js} +2 -3
- package/dist/{tree-component-DgfkxmVY.d.ts → tree-component-DNuzfo6R.d.ts} +2 -8
- package/dist/tree.d.ts +3 -3
- package/dist/tree.js +1 -2
- package/dist/{types-LU1u0CB8.d.ts → types-16GC5k1z.d.ts} +0 -2
- package/dist/{types-Jky6oNAp.d.ts → types-6hpXRKt7.d.ts} +1 -3
- package/dist/unit-input.d.ts +77 -0
- package/dist/unit-input.js +230 -0
- package/dist/{vertical-list-o5hfqH87.js → vertical-list-B9z1lbjM.js} +13 -15
- package/dist/{vertical-list-DtHX26JO.d.ts → vertical-list-BzeXehBt.d.ts} +7 -13
- package/dist/vertical-list.d.ts +4 -4
- package/dist/vertical-list.js +1 -2
- package/dist/{view-state-controller-BdyXWUUM.js → view-state-controller-DiPAPiA7.js} +3 -6
- package/dist/{wheel-nudge-D5rmht3v.js → wheel-nudge-DgJzrL28.js} +2 -3
- package/dist/{wheel-nudge-By5s_ioH.d.ts → wheel-nudge-oMFKat9P.d.ts} +1 -3
- package/dist/{xy-axis-DQqd2yXJ.d.ts → xy-axis-Bf6WfOS2.d.ts} +0 -12
- package/dist/{xy-axis-CyMd_Bn1.js → xy-axis-CBpml-3S.js} +11 -20
- package/dist/xy-pad.d.ts +7 -9
- package/dist/xy-pad.js +6 -7
- package/docs-user/README.md +3 -0
- package/docs-user/ac-text.md +2 -1
- package/docs-user/ac-token.md +2 -0
- package/docs-user/date-input.md +29 -0
- package/docs-user/dock.md +17 -1
- package/docs-user/index.json +17 -2
- package/docs-user/llms.txt +3 -0
- package/docs-user/node-graph.md +376 -0
- package/docs-user/unit-input.md +39 -0
- package/llms.txt +3 -0
- package/package.json +48 -25
- package/bundle/rolldown-runtime-CEoa-xHZ.js +0 -1
- package/dist/interaction-E-uMGHkJ.js +0 -3
- package/dist/rolldown-runtime-D7D4PA-g.js +0 -13
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
2
|
+
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
3
|
+
import { LitElement, css, html, nothing } from "lit";
|
|
4
|
+
import { property } from "lit/decorators.js";
|
|
5
|
+
// src/unit-input/unit-input.ts
|
|
6
|
+
/** Byte sizes: base unit is the byte. */
|
|
7
|
+
const SIZE_UNITS = [
|
|
8
|
+
{
|
|
9
|
+
id: `B`,
|
|
10
|
+
label: `B`,
|
|
11
|
+
factor: 1
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: `KB`,
|
|
15
|
+
label: `KB`,
|
|
16
|
+
factor: 1024
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: `MB`,
|
|
20
|
+
label: `MB`,
|
|
21
|
+
factor: 1024 ** 2
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: `GB`,
|
|
25
|
+
label: `GB`,
|
|
26
|
+
factor: 1024 ** 3
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
/** Durations: base unit is the minute. */
|
|
30
|
+
const AGE_UNITS = [
|
|
31
|
+
{
|
|
32
|
+
id: `minutes`,
|
|
33
|
+
label: `minutes`,
|
|
34
|
+
factor: 1
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: `hours`,
|
|
38
|
+
label: `hours`,
|
|
39
|
+
factor: 60
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: `days`,
|
|
43
|
+
label: `days`,
|
|
44
|
+
factor: 1440
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: `weeks`,
|
|
48
|
+
label: `weeks`,
|
|
49
|
+
factor: 10080
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
/** `value` expressed in base units. */
|
|
53
|
+
function toBase(value, unit) {
|
|
54
|
+
return value === null ? null : value * (unit?.factor ?? 1);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The largest unit in `units` that `baseValue` is a whole number of (or the
|
|
58
|
+
* smallest unit when none fits), with the value in that unit.
|
|
59
|
+
*/
|
|
60
|
+
function bestUnit(baseValue, units) {
|
|
61
|
+
if (units.length === 0) return void 0;
|
|
62
|
+
const sorted = [...units].sort((a, b) => (b.factor ?? 1) - (a.factor ?? 1));
|
|
63
|
+
const fit = sorted.find((u) => baseValue !== 0 && baseValue % (u.factor ?? 1) === 0) ?? sorted[sorted.length - 1];
|
|
64
|
+
return {
|
|
65
|
+
value: baseValue / (fit.factor ?? 1),
|
|
66
|
+
unit: fit.id
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
let UnitInputElement = class UnitInputElement extends LitElement {
|
|
70
|
+
constructor(..._args) {
|
|
71
|
+
super(..._args);
|
|
72
|
+
this.value = null;
|
|
73
|
+
this.unit = ``;
|
|
74
|
+
this.units = [];
|
|
75
|
+
this.placeholder = ``;
|
|
76
|
+
this.disabled = false;
|
|
77
|
+
this.#onNumber = (e) => {
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
const text = e.target.value;
|
|
80
|
+
const n = text.trim() === `` ? NaN : Number(text);
|
|
81
|
+
this.value = Number.isNaN(n) ? null : n;
|
|
82
|
+
this.#emit();
|
|
83
|
+
};
|
|
84
|
+
this.#onUnit = (e) => {
|
|
85
|
+
e.stopPropagation();
|
|
86
|
+
this.unit = e.target.value;
|
|
87
|
+
this.#emit();
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/** The value in base units (see `UnitInputUnit.factor`), or `null` when empty. */
|
|
91
|
+
get baseValue() {
|
|
92
|
+
return toBase(this.value, this.#selected());
|
|
93
|
+
}
|
|
94
|
+
/** Set the control from a base-unit amount, choosing the largest unit it divides into evenly. */
|
|
95
|
+
setBaseValue(baseValue) {
|
|
96
|
+
if (baseValue === null) {
|
|
97
|
+
this.value = null;
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const best = bestUnit(baseValue, this.units);
|
|
101
|
+
if (best === void 0) {
|
|
102
|
+
this.value = baseValue;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.value = best.value;
|
|
106
|
+
this.unit = best.unit;
|
|
107
|
+
}
|
|
108
|
+
focus(options) {
|
|
109
|
+
this.shadowRoot?.querySelector(`input`)?.focus(options);
|
|
110
|
+
}
|
|
111
|
+
#selected() {
|
|
112
|
+
return this.units.find((u) => u.id === this.unit) ?? this.units[0];
|
|
113
|
+
}
|
|
114
|
+
#emit() {
|
|
115
|
+
this.dispatchEvent(new CustomEvent(`change`, {
|
|
116
|
+
detail: {
|
|
117
|
+
value: this.value,
|
|
118
|
+
unit: this.#selected()?.id ?? ``,
|
|
119
|
+
baseValue: this.baseValue
|
|
120
|
+
},
|
|
121
|
+
bubbles: true,
|
|
122
|
+
composed: true
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
#onNumber;
|
|
126
|
+
#onUnit;
|
|
127
|
+
render() {
|
|
128
|
+
const selected = this.#selected();
|
|
129
|
+
return html`
|
|
130
|
+
<div class="wrap">
|
|
131
|
+
<input
|
|
132
|
+
type="number"
|
|
133
|
+
.value=${this.value === null ? `` : String(this.value)}
|
|
134
|
+
min=${this.min ?? nothing}
|
|
135
|
+
max=${this.max ?? nothing}
|
|
136
|
+
step=${this.step ?? nothing}
|
|
137
|
+
placeholder=${this.placeholder || nothing}
|
|
138
|
+
?disabled=${this.disabled}
|
|
139
|
+
@change=${this.#onNumber}
|
|
140
|
+
>
|
|
141
|
+
<select
|
|
142
|
+
?disabled=${this.disabled}
|
|
143
|
+
aria-label="Unit"
|
|
144
|
+
@change=${this.#onUnit}
|
|
145
|
+
>
|
|
146
|
+
${this.units.map((u) => html`<option value=${u.id} ?selected=${u.id === selected?.id}>${u.label}</option>`)}
|
|
147
|
+
</select>
|
|
148
|
+
</div>
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
static {
|
|
152
|
+
this.styles = [themeFallbacks, css`
|
|
153
|
+
:host {
|
|
154
|
+
--unit-input-padding: var(--space-m, 8px) var(--space-l, 12px);
|
|
155
|
+
--unit-input-background: var(--surface-3, var(--surface-2));
|
|
156
|
+
--unit-input-border: var(--border);
|
|
157
|
+
--unit-input-border-radius: var(--radius-m, 4px);
|
|
158
|
+
|
|
159
|
+
display: inline-block;
|
|
160
|
+
font-family: var(--font-family, system-ui, sans-serif);
|
|
161
|
+
font-size: var(--text-m, 12px);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.wrap {
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: stretch;
|
|
167
|
+
background: var(--unit-input-background);
|
|
168
|
+
border: var(--unit-input-border);
|
|
169
|
+
border-radius: var(--unit-input-border-radius);
|
|
170
|
+
color: var(--surface-2-text);
|
|
171
|
+
transition: border-color var(--transition, 0.15s ease-out);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.wrap:focus-within {
|
|
175
|
+
border-color: var(--accent);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
input, select {
|
|
179
|
+
appearance: none;
|
|
180
|
+
box-sizing: border-box;
|
|
181
|
+
padding: var(--unit-input-padding);
|
|
182
|
+
background: transparent;
|
|
183
|
+
color: inherit;
|
|
184
|
+
border: 0;
|
|
185
|
+
font: inherit;
|
|
186
|
+
outline: none;
|
|
187
|
+
color-scheme: inherit;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
input {
|
|
191
|
+
flex: 1;
|
|
192
|
+
min-width: 4ch;
|
|
193
|
+
width: 100%;
|
|
194
|
+
caret-color: var(--accent);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
input::placeholder {
|
|
198
|
+
color: var(--surface-muted-text);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
select {
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
border-left: var(--unit-input-border);
|
|
204
|
+
border-radius: 0 var(--unit-input-border-radius) var(--unit-input-border-radius) 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
select option {
|
|
208
|
+
background: var(--surface-3, var(--surface-2));
|
|
209
|
+
color: var(--surface-3-text, inherit);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:host([disabled]) .wrap {
|
|
213
|
+
opacity: var(--prominence-disabled-opacity, 0.4);
|
|
214
|
+
}
|
|
215
|
+
`];
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
__decorate([property({ type: Number })], UnitInputElement.prototype, "value", void 0);
|
|
219
|
+
__decorate([property({ type: String })], UnitInputElement.prototype, "unit", void 0);
|
|
220
|
+
__decorate([property({ attribute: false })], UnitInputElement.prototype, "units", void 0);
|
|
221
|
+
__decorate([property({ type: Number })], UnitInputElement.prototype, "min", void 0);
|
|
222
|
+
__decorate([property({ type: Number })], UnitInputElement.prototype, "max", void 0);
|
|
223
|
+
__decorate([property({ type: Number })], UnitInputElement.prototype, "step", void 0);
|
|
224
|
+
__decorate([property({ type: String })], UnitInputElement.prototype, "placeholder", void 0);
|
|
225
|
+
__decorate([property({
|
|
226
|
+
type: Boolean,
|
|
227
|
+
reflect: true
|
|
228
|
+
})], UnitInputElement.prototype, "disabled", void 0);
|
|
229
|
+
UnitInputElement = __decorate([safeCustomElement(`ixfx-unit-input`)], UnitInputElement);
|
|
230
|
+
export { AGE_UNITS, SIZE_UNITS, UnitInputElement, bestUnit, toBase };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
import { i as
|
|
6
|
-
import {
|
|
7
|
-
import { l as keysToArray } from "./pending-
|
|
8
|
-
import {
|
|
9
|
-
import { t as scrollFadeStyles } from "./scroll-fade-
|
|
10
|
-
import { a as restoreElementScroll, n as anchorFromRow, o as scrollToOffset, r as captureElementScroll, t as ViewStateController } from "./view-state-controller-
|
|
11
|
-
import { n as
|
|
1
|
+
import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-FRO3TRFI.js";
|
|
2
|
+
import { c as createElementListSearchAdapter, d as keysOfElements, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-C5114RxZ.js";
|
|
3
|
+
import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-Dkh3m3hX.js";
|
|
4
|
+
import { i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-ByftBooJ.js";
|
|
5
|
+
import { i as sameKeySet, n as applyPartialAttributes, r as isPartialKey } from "./partial-keys-D4l_ede_.js";
|
|
6
|
+
import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
|
|
7
|
+
import { l as keysToArray } from "./pending-Afl4LT64.js";
|
|
8
|
+
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
9
|
+
import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
|
|
10
|
+
import { a as restoreElementScroll, n as anchorFromRow, o as scrollToOffset, r as captureElementScroll, t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
|
|
11
|
+
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
12
12
|
import "./editable-label.js";
|
|
13
13
|
import { LitElement, css, html, render } from "lit";
|
|
14
14
|
import { property } from "lit/decorators.js";
|
|
15
15
|
import { createCommandRegistry } from "@clinth/ui-commands";
|
|
16
16
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
17
|
-
|
|
17
|
+
// src/vertical-list/vertical-list-view-state.ts
|
|
18
18
|
/** Key → row over `rows`. Keyless rows are skipped; the first row with a key wins. */
|
|
19
19
|
function indexByKey(rows, getKey) {
|
|
20
20
|
const out = /* @__PURE__ */ new Map();
|
|
@@ -93,8 +93,7 @@ function virtualScrollTarget(scroll, stride, indexOf) {
|
|
|
93
93
|
const index = indexOf(scroll.anchor.key);
|
|
94
94
|
return index < 0 ? void 0 : index * stride + scroll.anchor.offset;
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
//#region src/vertical-list/vertical-list.ts
|
|
96
|
+
// src/vertical-list/vertical-list.ts
|
|
98
97
|
const ITEM_SELECTOR = `li:not([data-virtual-spacer]), [data-list-item]:not([data-virtual-spacer])`;
|
|
99
98
|
/**
|
|
100
99
|
* Rows rendered above/below the viewport as scroll margin. Grid-list uses 2;
|
|
@@ -2024,5 +2023,4 @@ __decorate([property({
|
|
|
2024
2023
|
__decorate([property({ attribute: false })], VerticalListElement.prototype, "editValidator", void 0);
|
|
2025
2024
|
__decorate([property({ attribute: false })], VerticalListElement.prototype, "canDrop", void 0);
|
|
2026
2025
|
VerticalListElement = __decorate([safeCustomElement(`ixfx-vertical-list`)], VerticalListElement);
|
|
2027
|
-
//#endregion
|
|
2028
2026
|
export { VerticalListElement as t };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { L as ListDragPreviewRenderer, R as ListDragPreviewSourceResolver, V as ListNativeDragStartEvent } from "./tree-component-
|
|
2
|
-
import { a as ViewStateBase, t as GetViewStateOptions } from "./types-
|
|
3
|
-
import "./
|
|
4
|
-
import { n as ListViewportChangeEvent } from "./list-viewport-types-
|
|
5
|
-
import
|
|
6
|
-
import { S as ListSearchController } from "./index-
|
|
7
|
-
import "./editable-label-
|
|
1
|
+
import { L as ListDragPreviewRenderer, R as ListDragPreviewSourceResolver, V as ListNativeDragStartEvent } from "./tree-component-DNuzfo6R.js";
|
|
2
|
+
import { a as ViewStateBase, t as GetViewStateOptions } from "./types-16GC5k1z.js";
|
|
3
|
+
import { h as ListSelectionMode, i as ListInteractionMode, r as ListElementEventMap } from "./list-selection-types-CKTt7Rrw.js";
|
|
4
|
+
import { n as ListViewportChangeEvent } from "./list-viewport-types-BJ8c6qur.js";
|
|
5
|
+
import "./index-Cdcek1Oj.js";
|
|
6
|
+
import { S as ListSearchController } from "./index-CRLTVAyt.js";
|
|
7
|
+
import "./editable-label-CiHCDlhC.js";
|
|
8
8
|
import { LitElement, PropertyValues } from "lit";
|
|
9
9
|
import { CommandId, CommandRegistry } from "@clinth/ui-commands";
|
|
10
|
-
//#region src/vertical-list/types.d.ts
|
|
11
10
|
/**
|
|
12
11
|
* `list-drag-over` / `list-drop`. `key` and `item` are `undefined` when the
|
|
13
12
|
* drag is over empty list space rather than a row.
|
|
@@ -42,8 +41,6 @@ type ListDragLeaveEvent = CustomEvent<ListDragLeaveDetail>;
|
|
|
42
41
|
type ListContextMenuEvent = CustomEvent<ListContextMenuDetail>;
|
|
43
42
|
type ListEditCommitEvent = CustomEvent<ListEditCommitDetail>;
|
|
44
43
|
type ListEditCancelEvent = CustomEvent<ListEditCancelDetail>;
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/vertical-list/vertical-list-view-state.d.ts
|
|
47
44
|
/**
|
|
48
45
|
* Pure helpers behind `ixfx-vertical-list`'s view state. The component runs
|
|
49
46
|
* them whenever its items change (light-DOM edits, `addItem` / `setItems` /
|
|
@@ -56,8 +53,6 @@ type ListEditCancelEvent = CustomEvent<ListEditCancelDetail>;
|
|
|
56
53
|
* and `scroll`. Keys are each row's `data-key` / `data-value`.
|
|
57
54
|
*/
|
|
58
55
|
type VerticalListViewState = ViewStateBase;
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/vertical-list/vertical-list.d.ts
|
|
61
56
|
interface CustomCheckboxOptions {
|
|
62
57
|
renderer: (checked: boolean) => unknown;
|
|
63
58
|
margin?: string;
|
|
@@ -394,5 +389,4 @@ interface VerticalListElementEventMap extends ListElementEventMap {
|
|
|
394
389
|
'list-edit-commit': ListEditCommitEvent;
|
|
395
390
|
'list-edit-cancel': ListEditCancelEvent;
|
|
396
391
|
}
|
|
397
|
-
//#endregion
|
|
398
392
|
export { VerticalListViewState as a, ListDragLeaveDetail as c, ListDropDetail as d, ListDropEvent as f, ListEditCommitEvent as g, ListEditCommitDetail as h, VerticalListElementEventMap as i, ListDragLeaveEvent as l, ListEditCancelEvent as m, CustomCheckboxOptions as n, ListContextMenuDetail as o, ListEditCancelDetail as p, VerticalListElement as r, ListContextMenuEvent as s, AddItemOptions as t, ListDragOverEvent as u };
|
package/dist/vertical-list.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as ListNativeDragStartDetail, F as ListDragPreview, I as ListDragPreviewContext, L as ListDragPreviewRenderer, P as ListDragEntry, V as ListNativeDragStartEvent, z as ListDragSource } from "./tree-component-
|
|
2
|
-
import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-
|
|
3
|
-
import { _ as ListTickleEvent, a as ListItemClickDetail, c as ListSelectDetail, g as ListTickleDetail, h as ListSelectionMode, i as ListInteractionMode, l as ListSelectEvent, n as ListActivateEvent, o as ListItemClickEvent, r as ListElementEventMap, t as ListActivateDetail } from "./list-selection-types-
|
|
4
|
-
import { a as VerticalListViewState, c as ListDragLeaveDetail, d as ListDropDetail, f as ListDropEvent, g as ListEditCommitEvent, h as ListEditCommitDetail, i as VerticalListElementEventMap, l as ListDragLeaveEvent, m as ListEditCancelEvent, n as CustomCheckboxOptions, o as ListContextMenuDetail, p as ListEditCancelDetail, r as VerticalListElement, s as ListContextMenuEvent, t as AddItemOptions, u as ListDragOverEvent } from "./vertical-list-
|
|
1
|
+
import { B as ListNativeDragStartDetail, F as ListDragPreview, I as ListDragPreviewContext, L as ListDragPreviewRenderer, P as ListDragEntry, V as ListNativeDragStartEvent, z as ListDragSource } from "./tree-component-DNuzfo6R.js";
|
|
2
|
+
import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BJ8c6qur.js";
|
|
3
|
+
import { _ as ListTickleEvent, a as ListItemClickDetail, c as ListSelectDetail, g as ListTickleDetail, h as ListSelectionMode, i as ListInteractionMode, l as ListSelectEvent, n as ListActivateEvent, o as ListItemClickEvent, r as ListElementEventMap, t as ListActivateDetail } from "./list-selection-types-CKTt7Rrw.js";
|
|
4
|
+
import { a as VerticalListViewState, c as ListDragLeaveDetail, d as ListDropDetail, f as ListDropEvent, g as ListEditCommitEvent, h as ListEditCommitDetail, i as VerticalListElementEventMap, l as ListDragLeaveEvent, m as ListEditCancelEvent, n as CustomCheckboxOptions, o as ListContextMenuDetail, p as ListEditCancelDetail, r as VerticalListElement, s as ListContextMenuEvent, t as AddItemOptions, u as ListDragOverEvent } from "./vertical-list-BzeXehBt.js";
|
|
5
5
|
export { AddItemOptions, CustomCheckboxOptions, type ListActivateDetail, type ListActivateEvent, type ListContextMenuDetail, type ListContextMenuEvent, type ListDragEntry, type ListDragLeaveDetail, type ListDragLeaveEvent, type ListDragOverEvent, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListDropDetail, type ListDropEvent, type ListEditCancelDetail, type ListEditCancelEvent, type ListEditCommitDetail, type ListEditCommitEvent, type ListElementEventMap, type ListInteractionMode, type ListItemClickDetail, type ListItemClickEvent, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListSelectDetail, type ListSelectEvent, type ListSelectionMode, type ListTickleDetail, type ListTickleEvent, type ListViewportChangeDetail, type ListViewportChangeEvent, VerticalListElement, VerticalListElementEventMap, type VerticalListViewState };
|
package/dist/vertical-list.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { VerticalListElement };
|
|
1
|
+
export { t as VerticalListElement } from "./vertical-list-B9z1lbjM.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/common/view-state/types.ts
|
|
2
2
|
/**
|
|
3
3
|
* Shared view-state contract for list-like components.
|
|
4
4
|
*
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
const VIEW_STATE_VERSION = 1;
|
|
18
18
|
/** Name of the debounced change event every view-stateful component fires. */
|
|
19
19
|
const VIEW_STATE_CHANGE = `view-state-change`;
|
|
20
|
-
|
|
21
|
-
//#region src/common/view-state/scroll-anchor.ts
|
|
20
|
+
// src/common/view-state/scroll-anchor.ts
|
|
22
21
|
/**
|
|
23
22
|
* Capture a {@link ScrollState} for a DOM-rendered list. `items` must be in
|
|
24
23
|
* visual order along `axis`; the first one whose far edge is below / right of
|
|
@@ -143,8 +142,7 @@ function onUserScrollIntent(target, onIntent) {
|
|
|
143
142
|
for (const type of events) target.removeEventListener(type, handler, { capture: true });
|
|
144
143
|
};
|
|
145
144
|
}
|
|
146
|
-
|
|
147
|
-
//#region src/common/view-state/view-state-controller.ts
|
|
145
|
+
// src/common/view-state/view-state-controller.ts
|
|
148
146
|
const REASON_RANK = {
|
|
149
147
|
restore: 0,
|
|
150
148
|
data: 1,
|
|
@@ -301,5 +299,4 @@ var ViewStateController = class {
|
|
|
301
299
|
this.notify(reason);
|
|
302
300
|
}
|
|
303
301
|
};
|
|
304
|
-
//#endregion
|
|
305
302
|
export { restoreElementScroll as a, VIEW_STATE_VERSION as c, onUserScrollIntent as i, anchorFromRow as n, scrollToOffset as o, captureElementScroll as r, VIEW_STATE_CHANGE as s, ViewStateController as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
2
2
|
import { property } from "lit/decorators.js";
|
|
3
|
-
|
|
3
|
+
// src/mixins/wheel-nudge.ts
|
|
4
4
|
/**
|
|
5
5
|
* Mixin that adds mousewheel support with an optional `lighttouch` hover mode.
|
|
6
6
|
*
|
|
@@ -85,5 +85,4 @@ function WheelNudgeMixin(superClass) {
|
|
|
85
85
|
})], WheelNudgeMixinClass.prototype, "lighttouch", void 0);
|
|
86
86
|
return WheelNudgeMixinClass;
|
|
87
87
|
}
|
|
88
|
-
//#endregion
|
|
89
88
|
export { WheelNudgeMixin as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/mixins/wheel-nudge.d.ts
|
|
1
|
+
import "lit";
|
|
3
2
|
/**
|
|
4
3
|
* Direction of a wheel tick. `+1` for `deltaY < 0` (wheel up/away), `-1` for
|
|
5
4
|
* `deltaY > 0` (wheel down/toward).
|
|
@@ -26,5 +25,4 @@ interface WheelNudgeConsumer {
|
|
|
26
25
|
_applyWheelDelta(direction: WheelDirection, event: WheelEvent): void;
|
|
27
26
|
_shouldHandleWheel(): boolean;
|
|
28
27
|
}
|
|
29
|
-
//#endregion
|
|
30
28
|
export { WheelNudgeConsumer as n, WheelDirection as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
-
//#region src/plots/colour-map.d.ts
|
|
3
2
|
type ColourMode = `fixed` | `opacity` | `hue` | `saturation` | `lightness` | `scale`;
|
|
4
3
|
type ColourMapConfig = {
|
|
5
4
|
mode: ColourMode;
|
|
@@ -30,8 +29,6 @@ declare function computeColour(scaledValue: number, baseColour: string, config:
|
|
|
30
29
|
* 'size' is not handled here — the caller adjusts the radius separately.
|
|
31
30
|
*/
|
|
32
31
|
declare function applyAgeModification(base: ColourResult, ageFraction: number, ageStyle: string): ColourResult;
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/plots/data.d.ts
|
|
35
32
|
type PlotDataSeriesOptions = {
|
|
36
33
|
/**
|
|
37
34
|
* Limit of how many data points to store.
|
|
@@ -101,8 +98,6 @@ declare class PlotDataSeries {
|
|
|
101
98
|
*/
|
|
102
99
|
clear(): boolean;
|
|
103
100
|
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/plots/single-axis.d.ts
|
|
106
101
|
type SingleAxisDrawStyle = `line-sharp` | `line-round` | `circles` | `squares` | `vbar` | `hbar` | `hist-bottom` | `hist-top` | `hist-middle`;
|
|
107
102
|
type SingleAxisAgeStyle = `none` | `opacity` | `desaturation` | `size`;
|
|
108
103
|
/**
|
|
@@ -210,8 +205,6 @@ interface PlotSingleAxis {
|
|
|
210
205
|
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
211
206
|
};
|
|
212
207
|
}
|
|
213
|
-
//#endregion
|
|
214
|
-
//#region src/plots/multi-axis.d.ts
|
|
215
208
|
type PlotMultiAxisLayout = `overlap` | `horizontal` | `vertical` | `grid`;
|
|
216
209
|
type PlotMultiAxisDataPointClickDetail = {
|
|
217
210
|
readonly value: number;
|
|
@@ -282,8 +275,6 @@ interface PlotMultiAxis {
|
|
|
282
275
|
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
283
276
|
};
|
|
284
277
|
}
|
|
285
|
-
//#endregion
|
|
286
|
-
//#region src/plots/plot-histogram.d.ts
|
|
287
278
|
type PlotHistogramOrientation = `horizontal` | `vertical`;
|
|
288
279
|
/**
|
|
289
280
|
* - `hover`: floating `ixfx-tooltip` bubble, shown/hidden with a debounce delay.
|
|
@@ -382,8 +373,6 @@ declare global {
|
|
|
382
373
|
interface PlotHistogram {
|
|
383
374
|
addEventListener: (<K extends keyof PlotHistogramElementEventMap>(type: K, listener: (this: PlotHistogram, event: PlotHistogramElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void);
|
|
384
375
|
}
|
|
385
|
-
//#endregion
|
|
386
|
-
//#region src/plots/xy-axis.d.ts
|
|
387
376
|
type XyDrawStyle = `circles` | `squares`;
|
|
388
377
|
type XyAgeStyle = `none` | `opacity` | `desaturation` | `size`;
|
|
389
378
|
declare class PlotXyAxis extends LitElement {
|
|
@@ -422,5 +411,4 @@ declare global {
|
|
|
422
411
|
'ixfx-plot-xy-axis': PlotXyAxis;
|
|
423
412
|
}
|
|
424
413
|
}
|
|
425
|
-
//#endregion
|
|
426
414
|
export { applyAgeModification as A, SingleAxisAgeStyle as C, ColourMapConfig as D, PlotDataSeriesOptions as E, parseColourScaleAttr as M, readBaseColour as N, ColourMode as O, PlotSingleAxisPointerMoveEvent as S, PlotDataSeries as T, PlotMultiAxisElementEventMap as _, PlotHistogramBucketClickDetail as a, PlotSingleAxisElementEventMap as b, PlotHistogramInteractionMode as c, PlotHistogramSelectionChangeEvent as d, PlotHistogramSelectionRange as f, PlotMultiAxisDataPointClickEvent as g, PlotMultiAxisDataPointClickDetail as h, PlotHistogram as i, computeColour as j, ColourResult as k, PlotHistogramOrientation as l, PlotMultiAxis as m, XyAgeStyle as n, PlotHistogramBucketClickEvent as o, PlotHistogramValueTooltips as p, XyDrawStyle as r, PlotHistogramElementEventMap as s, PlotXyAxis as t, PlotHistogramSelectionChangeDetail as u, PlotMultiAxisLayout as v, SingleAxisDrawStyle as w, PlotSingleAxisPointerMoveDetail as x, PlotSingleAxis as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as safeCustomElement, t as __decorate } from "./decorate-
|
|
2
|
-
import { i as hasIcon } from "./registry-
|
|
1
|
+
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
2
|
+
import { i as hasIcon } from "./registry-DcF0fO7l.js";
|
|
3
3
|
import "./icons.js";
|
|
4
4
|
import { LitElement, css, html, nothing, svg } from "lit";
|
|
5
5
|
import { property, state } from "lit/decorators.js";
|
|
@@ -9,7 +9,7 @@ import { Colour } from "@ixfx/visual";
|
|
|
9
9
|
import { clamp, rangeStream } from "@ixfx/numbers";
|
|
10
10
|
import { classMap } from "lit/directives/class-map.js";
|
|
11
11
|
import { Easings } from "@ixfx/modulation";
|
|
12
|
-
|
|
12
|
+
// src/plots/colour-map.ts
|
|
13
13
|
const DEFAULT_BASE = `oklch(60% 0.15 140)`;
|
|
14
14
|
const DEFAULT_PALETTE = [
|
|
15
15
|
`green`,
|
|
@@ -141,8 +141,7 @@ function applyAgeModification(base, ageFraction, ageStyle) {
|
|
|
141
141
|
}
|
|
142
142
|
return base;
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
//#region src/plots/data.ts
|
|
144
|
+
// src/plots/data.ts
|
|
146
145
|
/**
|
|
147
146
|
* A data series
|
|
148
147
|
*/
|
|
@@ -246,16 +245,14 @@ var PlotDataSeries = class {
|
|
|
246
245
|
return !empty;
|
|
247
246
|
}
|
|
248
247
|
};
|
|
249
|
-
|
|
250
|
-
//#region src/util/is-numeric.ts
|
|
248
|
+
// src/util/is-numeric.ts
|
|
251
249
|
function isNumeric(str) {
|
|
252
250
|
if (typeof str === `number`) return true;
|
|
253
251
|
if (typeof str !== `string`) return false;
|
|
254
252
|
const trimmed = str.trim();
|
|
255
253
|
return trimmed !== `` && !Number.isNaN(Number(trimmed));
|
|
256
254
|
}
|
|
257
|
-
|
|
258
|
-
//#region src/util/tooltip.ts
|
|
255
|
+
// src/util/tooltip.ts
|
|
259
256
|
var _TooltipElement;
|
|
260
257
|
let _baseStylesInjected = false;
|
|
261
258
|
function ensureBaseTooltipStyles() {
|
|
@@ -348,8 +345,7 @@ __decorate([property({ type: String })], TooltipElement.prototype, "anchor", voi
|
|
|
348
345
|
__decorate([property()], TooltipElement.prototype, "value", void 0);
|
|
349
346
|
__decorate([property({ type: String })], TooltipElement.prototype, "icon", void 0);
|
|
350
347
|
TooltipElement = _TooltipElement = __decorate([safeCustomElement(`ixfx-tooltip`)], TooltipElement);
|
|
351
|
-
|
|
352
|
-
//#region src/plots/svg-utils.ts
|
|
348
|
+
// src/plots/svg-utils.ts
|
|
353
349
|
let _tooltipEl = null;
|
|
354
350
|
let _tooltipOwner = null;
|
|
355
351
|
function ensureTooltip() {
|
|
@@ -455,8 +451,7 @@ function scaleValue(v, min, max) {
|
|
|
455
451
|
const range = max - min;
|
|
456
452
|
return range === 0 ? .5 : (v - min) / range;
|
|
457
453
|
}
|
|
458
|
-
|
|
459
|
-
//#region src/plots/multi-axis.ts
|
|
454
|
+
// src/plots/multi-axis.ts
|
|
460
455
|
const PLOT_PALETTE = [
|
|
461
456
|
`oklch(60% 0.15 30)`,
|
|
462
457
|
`oklch(60% 0.15 90)`,
|
|
@@ -704,8 +699,7 @@ __decorate([property({
|
|
|
704
699
|
type: Number
|
|
705
700
|
})], PlotMultiAxis.prototype, "gridMinWidth", void 0);
|
|
706
701
|
PlotMultiAxis = __decorate([safeCustomElement(`ixfx-plot-multi-axis`)], PlotMultiAxis);
|
|
707
|
-
|
|
708
|
-
//#region src/plots/plot-histogram.ts
|
|
702
|
+
// src/plots/plot-histogram.ts
|
|
709
703
|
let PlotHistogram = class PlotHistogram extends LitElement {
|
|
710
704
|
constructor(..._args) {
|
|
711
705
|
super(..._args);
|
|
@@ -1284,8 +1278,7 @@ __decorate([state()], PlotHistogram.prototype, "_selectionEnd", void 0);
|
|
|
1284
1278
|
__decorate([state()], PlotHistogram.prototype, "_isDragging", void 0);
|
|
1285
1279
|
__decorate([state()], PlotHistogram.prototype, "_selectionOverlayText", void 0);
|
|
1286
1280
|
PlotHistogram = __decorate([safeCustomElement(`ixfx-plot-histogram`)], PlotHistogram);
|
|
1287
|
-
|
|
1288
|
-
//#region src/plots/single-axis.ts
|
|
1281
|
+
// src/plots/single-axis.ts
|
|
1289
1282
|
function buildLinePath(points) {
|
|
1290
1283
|
if (points.length === 0) return ``;
|
|
1291
1284
|
let d = `M ${points[0].x},${points[0].y}`;
|
|
@@ -1731,8 +1724,7 @@ __decorate([property({ attribute: `color-scale` })], PlotSingleAxis.prototype, "
|
|
|
1731
1724
|
__decorate([state()], PlotSingleAxis.prototype, "_width", void 0);
|
|
1732
1725
|
__decorate([state()], PlotSingleAxis.prototype, "_height", void 0);
|
|
1733
1726
|
PlotSingleAxis = __decorate([safeCustomElement(`ixfx-plot-single-axis`)], PlotSingleAxis);
|
|
1734
|
-
|
|
1735
|
-
//#region src/plots/xy-axis.ts
|
|
1727
|
+
// src/plots/xy-axis.ts
|
|
1736
1728
|
let PlotXyAxis = class PlotXyAxis extends LitElement {
|
|
1737
1729
|
constructor(..._args) {
|
|
1738
1730
|
super(..._args);
|
|
@@ -2001,5 +1993,4 @@ __decorate([property({ attribute: `color-scale` })], PlotXyAxis.prototype, "colo
|
|
|
2001
1993
|
__decorate([state()], PlotXyAxis.prototype, "_width", void 0);
|
|
2002
1994
|
__decorate([state()], PlotXyAxis.prototype, "_height", void 0);
|
|
2003
1995
|
PlotXyAxis = __decorate([safeCustomElement(`ixfx-plot-xy-axis`)], PlotXyAxis);
|
|
2004
|
-
//#endregion
|
|
2005
1996
|
export { TooltipElement as a, computeColour as c, PlotMultiAxis as i, parseColourScaleAttr as l, PlotSingleAxis as n, PlotDataSeries as o, PlotHistogram as r, applyAgeModification as s, PlotXyAxis as t, readBaseColour as u };
|
package/dist/xy-pad.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { n as WheelNudgeConsumer, t as WheelDirection } from "./wheel-nudge-
|
|
1
|
+
import { n as WheelNudgeConsumer, t as WheelDirection } from "./wheel-nudge-oMFKat9P.js";
|
|
2
2
|
import { LitElement, PropertyValues, html } from "lit";
|
|
3
|
-
//#region src/xy-pad/xy-pad.d.ts
|
|
4
3
|
declare const XyPad_base: typeof LitElement & (new (...args: any[]) => WheelNudgeConsumer);
|
|
5
|
-
declare class XyPad extends XyPad_base {
|
|
4
|
+
export declare class XyPad extends XyPad_base {
|
|
6
5
|
static styles: import("lit").CSSResult[];
|
|
7
6
|
xMin: number;
|
|
8
7
|
xMax: number;
|
|
@@ -69,22 +68,21 @@ declare class XyPad extends XyPad_base {
|
|
|
69
68
|
disconnectedCallback(): void;
|
|
70
69
|
render(): ReturnType<typeof html>;
|
|
71
70
|
}
|
|
72
|
-
type XyPadInputDetail = {
|
|
71
|
+
export type XyPadInputDetail = {
|
|
73
72
|
readonly x: number;
|
|
74
73
|
readonly y: number;
|
|
75
74
|
};
|
|
76
|
-
type XyPadInputEvent = CustomEvent<XyPadInputDetail>;
|
|
75
|
+
export type XyPadInputEvent = CustomEvent<XyPadInputDetail>;
|
|
77
76
|
declare global {
|
|
78
77
|
interface HTMLElementTagNameMap {
|
|
79
78
|
'ixfx-xy-pad': XyPad;
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
|
-
interface XyPadEventMap {
|
|
81
|
+
export interface XyPadEventMap {
|
|
83
82
|
input: XyPadInputEvent;
|
|
84
83
|
change: XyPadInputEvent;
|
|
85
84
|
}
|
|
86
|
-
interface XyPad {
|
|
85
|
+
export interface XyPad {
|
|
87
86
|
addEventListener: (<K extends keyof XyPadEventMap>(type: K, listener: (this: XyPad, event: XyPadEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void);
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
export { XyPad, XyPadEventMap, XyPadInputDetail, XyPadInputEvent };
|
|
88
|
+
export {};
|
package/dist/xy-pad.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
1
|
+
import { t as resolveAxisStep } from "./keyboard-DMwjIYh7.js";
|
|
2
|
+
import { t as WheelNudgeMixin } from "./wheel-nudge-DgJzrL28.js";
|
|
3
|
+
import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
|
|
4
|
+
import { t as prominenceStyles } from "./prominence-BOOQVWF-.js";
|
|
5
|
+
import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
|
|
6
6
|
import { LitElement, css, html } from "lit";
|
|
7
7
|
import { property } from "lit/decorators.js";
|
|
8
|
-
|
|
8
|
+
// src/xy-pad/xy-pad.ts
|
|
9
9
|
/**
|
|
10
10
|
* <x-xy-pad> — 2D touch-friendly XY pad for controlling two parameters.
|
|
11
11
|
*
|
|
@@ -475,5 +475,4 @@ __decorate([property({
|
|
|
475
475
|
attribute: `stops-y`
|
|
476
476
|
})], XyPad.prototype, "stopsY", void 0);
|
|
477
477
|
XyPad = __decorate([safeCustomElement(`ixfx-xy-pad`)], XyPad);
|
|
478
|
-
//#endregion
|
|
479
478
|
export { XyPad };
|
package/docs-user/README.md
CHANGED
|
@@ -15,6 +15,7 @@ This directory contains documentation for each component and some architectural
|
|
|
15
15
|
- [data-display](./data-display.md)
|
|
16
16
|
- [data-grid](./data-grid.md)
|
|
17
17
|
- [data-table](./data-table.md)
|
|
18
|
+
- [date-input](./date-input.md)
|
|
18
19
|
- [detail-list](./detail-list.md)
|
|
19
20
|
- [dock](./dock.md)
|
|
20
21
|
- [editable-label](./editable-label.md)
|
|
@@ -35,6 +36,7 @@ This directory contains documentation for each component and some architectural
|
|
|
35
36
|
- [miller](./miller.md)
|
|
36
37
|
- [multicol-list](./multicol-list.md)
|
|
37
38
|
- [narrowed-text](./narrowed-text.md)
|
|
39
|
+
- [node-graph](./node-graph.md)
|
|
38
40
|
- [notifier](./notifier.md)
|
|
39
41
|
- [pan-text](./pan-text.md)
|
|
40
42
|
- [panel](./panel.md)
|
|
@@ -61,6 +63,7 @@ This directory contains documentation for each component and some architectural
|
|
|
61
63
|
- [tree](./tree.md)
|
|
62
64
|
- [treemap](./treemap.md)
|
|
63
65
|
- [twosplit-layout](./twosplit-layout.md)
|
|
66
|
+
- [unit-input](./unit-input.md)
|
|
64
67
|
- [util](./util.md)
|
|
65
68
|
- [vertical-list](./vertical-list.md)
|
|
66
69
|
- [xy-pad](./xy-pad.md)
|