@ixfx/components 0.8.1 → 0.8.3
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 +326 -103
- package/bundle/index.d.ts.map +1 -1
- package/bundle/index.js +2840 -1285
- package/bundle/index.js.map +1 -1
- package/dist/ac-text.js +3 -3
- package/dist/ac-token.js +3 -3
- package/dist/checkbox.js +1 -1
- package/dist/{colour-picker-Ddsk-7E_.js → colour-picker-CSxwUmtE.js} +2 -2
- package/dist/{colour-picker-Ddsk-7E_.js.map → colour-picker-CSxwUmtE.js.map} +1 -1
- package/dist/colour-picker.js +1 -1
- package/dist/crumbs.js +4 -4
- package/dist/data-display.js +1 -1
- package/dist/data-grid-D-z7bx5-.d.ts.map +1 -1
- package/dist/data-grid.js +9 -6
- package/dist/data-grid.js.map +1 -1
- package/dist/detail-list-_ZJHYEBr.d.ts.map +1 -1
- package/dist/detail-list.js +68 -5
- package/dist/detail-list.js.map +1 -1
- package/dist/editable-label.js +1 -1
- package/dist/{fallbacks-DNI9xt0F.js → fallbacks-BcKGq-2F.js} +17 -1
- package/dist/{fallbacks-DNI9xt0F.js.map → fallbacks-BcKGq-2F.js.map} +1 -1
- package/dist/{grid-list-nRUQOcEL.js → grid-list-BXfY3XXX.js} +531 -29
- package/dist/grid-list-BXfY3XXX.js.map +1 -0
- package/dist/{grid-list-u33vmKzb.d.ts → grid-list-x550wJ0X.d.ts} +115 -3
- package/dist/grid-list-x550wJ0X.d.ts.map +1 -0
- package/dist/grid-list.d.ts +2 -2
- package/dist/grid-list.js +1 -1
- package/dist/handle-BPOxBOKf.js +219 -0
- package/dist/handle-BPOxBOKf.js.map +1 -0
- package/dist/{icon-DcEEGQa_.js → icon-Dy33gu4Z.js} +2 -2
- package/dist/{icon-DcEEGQa_.js.map → icon-Dy33gu4Z.js.map} +1 -1
- package/dist/icons.js +1 -1
- package/dist/{index-BeuCXtiO.d.ts → index-DV3iaUBW.d.ts} +2 -2
- package/dist/{index-BeuCXtiO.d.ts.map → index-DV3iaUBW.d.ts.map} +1 -1
- package/dist/index.d.ts +132 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +554 -206
- package/dist/index.js.map +1 -1
- package/dist/{interaction-Cr13azbM.js → interaction-B9AAlsFO.js} +1 -1
- package/dist/labelled-radial-input.js +2 -2
- package/dist/{labelled-slider-input-BInB5GKL.js → labelled-slider-input-BCH9968c.js} +3 -3
- package/dist/{labelled-slider-input-BInB5GKL.js.map → labelled-slider-input-BCH9968c.js.map} +1 -1
- package/dist/labelled-slider-input.js +1 -1
- package/dist/list-selection-controller-SA4piSBi.js +589 -0
- package/dist/list-selection-controller-SA4piSBi.js.map +1 -0
- package/dist/{menu-Bg90Qr0B.js → menu-HMoxCPY2.js} +5 -5
- package/dist/{menu-Bg90Qr0B.js.map → menu-HMoxCPY2.js.map} +1 -1
- package/dist/{menu-item-Bx-Fs7jq.js → menu-item-BQDYxk5A.js} +5 -5
- package/dist/{menu-item-Bx-Fs7jq.js.map → menu-item-BQDYxk5A.js.map} +1 -1
- package/dist/menu.js +2 -2
- package/dist/miller.d.ts +1 -1
- package/dist/miller.js +3 -3
- package/dist/narrowed-text.js +3 -3
- package/dist/notifier.js +1 -1
- package/dist/panel.d.ts +1 -1
- package/dist/panel.js +1 -1
- package/dist/plots.d.ts +2 -2
- package/dist/plots.js +1 -1
- package/dist/polar-pad.js +1 -1
- package/dist/{radial-input-BfA3GO0H.js → radial-input-DyxfbNzD.js} +2 -2
- package/dist/{radial-input-BfA3GO0H.js.map → radial-input-DyxfbNzD.js.map} +1 -1
- package/dist/radial-input.js +1 -1
- package/dist/range-input.js +1 -1
- package/dist/range.js +1 -1
- package/dist/select-horiz.js +3 -3
- package/dist/{slider-input-Bl1hFE89.js → slider-input-WR8_RwHg.js} +2 -2
- package/dist/{slider-input-Bl1hFE89.js.map → slider-input-WR8_RwHg.js.map} +1 -1
- package/dist/slider-input.js +1 -1
- package/dist/snackbar.js +1 -1
- package/dist/{split-layout-BFSbUZQv.js → split-layout-CA5jbNbG.js} +22 -33
- package/dist/split-layout-CA5jbNbG.js.map +1 -0
- package/dist/split-layout-JK3xWVX2.d.ts.map +1 -1
- package/dist/split-layout.js +1 -1
- package/dist/swipe.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/{tickled-controller-Bn3YdQsM.d.ts → tickled-controller-C1ZsHpyg.d.ts} +10 -1
- package/dist/tickled-controller-C1ZsHpyg.d.ts.map +1 -0
- package/dist/{tickled-controller-C66DgJHl.js → tickled-controller-Dh1Uh_vG.js} +4 -1
- package/dist/tickled-controller-Dh1Uh_vG.js.map +1 -0
- package/dist/{timeline-B2fgDL4U.js → timeline-THyvH8xy.js} +14 -8
- package/dist/timeline-THyvH8xy.js.map +1 -0
- package/dist/timeline.d.ts +1 -1
- package/dist/timeline.js +1 -1
- package/dist/{titlebar-YQ-jVQoS.d.ts → titlebar-Tqu-VvMU.d.ts} +5 -1
- package/dist/titlebar-Tqu-VvMU.d.ts.map +1 -0
- package/dist/titlebar.d.ts +1 -1
- package/dist/titlebar.js +5 -3
- package/dist/titlebar.js.map +1 -1
- package/dist/{tree-Chptss7I.js → tree-DTQon838.js} +4 -4
- package/dist/{tree-Chptss7I.js.map → tree-DTQon838.js.map} +1 -1
- package/dist/tree.d.ts +1 -1
- package/dist/tree.js +1 -1
- package/dist/vertical-list-CFuFDygi.d.ts.map +1 -1
- package/dist/vertical-list.js +68 -4
- package/dist/vertical-list.js.map +1 -1
- package/dist/{xy-axis-DzM1brBZ.js → xy-axis-CrrVdDFe.js} +28 -3
- package/dist/xy-axis-CrrVdDFe.js.map +1 -0
- package/dist/{xy-axis-BfP9hKLj.d.ts → xy-axis-DQqd2yXJ.d.ts} +28 -12
- package/dist/{xy-axis-BfP9hKLj.d.ts.map → xy-axis-DQqd2yXJ.d.ts.map} +1 -1
- package/dist/xy-pad.js +1 -1
- package/docs-user/data-grid.md +1 -1
- package/docs-user/detail-list.md +4 -0
- package/docs-user/dock.md +6 -3
- package/docs-user/grid-list.md +49 -0
- package/docs-user/index.json +2 -2
- package/docs-user/infra-tickled.md +2 -0
- package/docs-user/split-layout.md +2 -4
- package/docs-user/twosplit-layout.md +14 -16
- package/docs-user/vertical-list.md +4 -0
- package/package.json +1 -1
- package/dist/grid-list-nRUQOcEL.js.map +0 -1
- package/dist/grid-list-u33vmKzb.d.ts.map +0 -1
- package/dist/list-selection-controller-DTFI40li.js +0 -264
- package/dist/list-selection-controller-DTFI40li.js.map +0 -1
- package/dist/split-layout-BFSbUZQv.js.map +0 -1
- package/dist/tickled-controller-Bn3YdQsM.d.ts.map +0 -1
- package/dist/tickled-controller-C66DgJHl.js.map +0 -1
- package/dist/timeline-B2fgDL4U.js.map +0 -1
- package/dist/titlebar-YQ-jVQoS.d.ts.map +0 -1
- package/dist/xy-axis-DzM1brBZ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
import { n as buildHighlightTargets, r as clearHighlights, t as applyHighlights } from "./highlight-B-eQrhhb.js";
|
|
2
|
-
import { t as TickledController } from "./tickled-controller-
|
|
2
|
+
import { t as TickledController } from "./tickled-controller-Dh1Uh_vG.js";
|
|
3
3
|
import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-BrAHEj1q.js";
|
|
4
|
-
import { t as themeFallbacks } from "./fallbacks-
|
|
4
|
+
import { t as themeFallbacks } from "./fallbacks-BcKGq-2F.js";
|
|
5
5
|
import { t as popupSurfaceStyles } from "./popup-D80sj2QC.js";
|
|
6
6
|
import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
|
|
7
7
|
import { a as iconBus, c as setIconFont, i as hasIcon, l as svgToDataUri, n as getIconEntry, o as registerFontIcon, r as getIconFont, s as registerIcon, t as getIcon } from "./registry-BEtb8_wB.js";
|
|
8
|
-
import { t as IxfxIconElement } from "./icon-
|
|
8
|
+
import { t as IxfxIconElement } from "./icon-Dy33gu4Z.js";
|
|
9
9
|
import { AcTextElement } from "./ac-text.js";
|
|
10
10
|
import { t as DataController } from "./data-controller-DOlmqNKb.js";
|
|
11
11
|
import { a as LIST_SEARCH_COMMAND_IDS, c as createElementListSearchAdapter, d as createDataListSearchAdapter, f as IncrSearchTreeController, h as createFuzzySearch, i as ListSearchController, l as KeyedElementIndex, m as createAcCompletionProvider, n as listSearchStyles, o as registerListSearchCommands, p as createIncrSearch, r as LIST_SEARCH_MODES, s as createElementIncrSearch, t as createTreeListSearchAdapter, u as keyForElement } from "./incr-search-C05WjbZh.js";
|
|
12
12
|
import { AcTokenElement } from "./ac-token.js";
|
|
13
|
+
import { t as handleStyles } from "./handle-BPOxBOKf.js";
|
|
14
|
+
import { TitlebarElement } from "./titlebar.js";
|
|
13
15
|
import { i as ICON_CLOSE, n as ICON_CHECK, r as ICON_CHEVRON_DOWN, t as ICON_CARET_RIGHT } from "./defaults-BJwDsMH4.js";
|
|
14
16
|
import "./icons.js";
|
|
15
17
|
import { t as prominenceStyles } from "./prominence-DlFShic3.js";
|
|
16
18
|
import { n as buttonStyles, t as ButtonElement } from "./button-DsFbV4XD.js";
|
|
19
|
+
import { n as isMultiMode, r as ListDragSelectController, t as ListSelectionController } from "./list-selection-controller-SA4piSBi.js";
|
|
17
20
|
import { a as prefersReducedMotion, i as listItemFadeKeyframes, n as animateListItemIn, r as animateListItemOut, t as LIST_ITEM_MOTION_MS } from "./list-item-animation-DuiwgN3l.js";
|
|
18
|
-
import
|
|
19
|
-
import "./
|
|
20
|
-
import "./menu-item-Bx-Fs7jq.js";
|
|
21
|
+
import "./interaction-B9AAlsFO.js";
|
|
22
|
+
import "./menu-item-BQDYxk5A.js";
|
|
21
23
|
import { Checkbox } from "./checkbox.js";
|
|
22
|
-
import { n as ColourPicker, t as ColourPickerPopup } from "./colour-picker-
|
|
24
|
+
import { n as ColourPicker, t as ColourPickerPopup } from "./colour-picker-CSxwUmtE.js";
|
|
23
25
|
import { LabelledRangeInput } from "./labelled-range-input.js";
|
|
24
26
|
import { t as collectDataResult } from "./data-provider-35TyWclX.js";
|
|
25
|
-
import { i as TreeDataModel, n as TreeListElement, r as TreeBaseElement, t as TreeController } from "./tree-
|
|
27
|
+
import { i as TreeDataModel, n as TreeListElement, r as TreeBaseElement, t as TreeController } from "./tree-DTQon838.js";
|
|
26
28
|
import { t as scrollFadeStyles } from "./scroll-fade-CAs1EabA.js";
|
|
27
29
|
import { NarrowedTextElement } from "./narrowed-text.js";
|
|
28
30
|
import { CrumbNavigationElement } from "./crumbs.js";
|
|
29
31
|
import { DataDisplayComponent } from "./data-display.js";
|
|
30
32
|
import { t as createDragGhost } from "./drag-ghost-DtSDvjri.js";
|
|
31
|
-
import { t as menu_exports } from "./menu-
|
|
33
|
+
import { t as menu_exports } from "./menu-HMoxCPY2.js";
|
|
32
34
|
import { DataGridElement } from "./data-grid.js";
|
|
33
35
|
import { DetailListElement } from "./detail-list.js";
|
|
34
|
-
import { a as distribute, c as toSnapshot, i as buildModel, l as walk, n as SplitPanelElement, o as normalise, r as applySnapshot, s as resolveTracks, t as SplitLayoutElement } from "./split-layout-
|
|
36
|
+
import { a as distribute, c as toSnapshot, i as buildModel, l as walk, n as SplitPanelElement, o as normalise, r as applySnapshot, s as resolveTracks, t as SplitLayoutElement } from "./split-layout-CA5jbNbG.js";
|
|
35
37
|
import { TabListElement } from "./tabs.js";
|
|
36
|
-
import { TitlebarElement } from "./titlebar.js";
|
|
37
38
|
import { EditableLabel } from "./editable-label.js";
|
|
38
|
-
import { n as EditableNumber, t as LabelledSliderInput } from "./labelled-slider-input-
|
|
39
|
+
import { n as EditableNumber, t as LabelledSliderInput } from "./labelled-slider-input-BCH9968c.js";
|
|
39
40
|
import { t as FormElement } from "./form-CsXJX15p.js";
|
|
40
|
-
import { t as GridListElement } from "./grid-list-
|
|
41
|
+
import { n as PanTextElement, t as GridListElement } from "./grid-list-BXfY3XXX.js";
|
|
41
42
|
import { PanelElement } from "./panel.js";
|
|
42
43
|
import { GroupedItemListerElement } from "./grouped-item-lister.js";
|
|
43
44
|
import { VerticalListElement } from "./vertical-list.js";
|
|
44
45
|
import { t as IxfxHexEditorElement } from "./hex-editor-BiRfwTz1.js";
|
|
45
|
-
import { t as RadialInputElement } from "./radial-input-
|
|
46
|
+
import { t as RadialInputElement } from "./radial-input-DyxfbNzD.js";
|
|
46
47
|
import { LabelledRadialInput } from "./labelled-radial-input.js";
|
|
47
|
-
import { t as SliderInputElement } from "./slider-input-
|
|
48
|
+
import { t as SliderInputElement } from "./slider-input-WR8_RwHg.js";
|
|
48
49
|
import { LedElement } from "./led.js";
|
|
49
50
|
import { MillerBaseElement, MillerListElement, MillerTreeController } from "./miller.js";
|
|
50
51
|
import { NotificationPillElement } from "./notifier.js";
|
|
51
|
-
import { a as TooltipElement, c as computeColour, i as PlotMultiAxis, l as parseColourScaleAttr, n as PlotSingleAxis, o as PlotDataSeries, r as PlotHistogram, s as applyAgeModification, t as PlotXyAxis, u as readBaseColour } from "./xy-axis-
|
|
52
|
+
import { a as TooltipElement, c as computeColour, i as PlotMultiAxis, l as parseColourScaleAttr, n as PlotSingleAxis, o as PlotDataSeries, r as PlotHistogram, s as applyAgeModification, t as PlotXyAxis, u as readBaseColour } from "./xy-axis-CrrVdDFe.js";
|
|
52
53
|
import { PolarPad } from "./polar-pad.js";
|
|
53
54
|
import { t as tooltipValueStyles } from "./tooltip-CJt3WLmN.js";
|
|
54
55
|
import { RangeInput } from "./range-input.js";
|
|
@@ -57,16 +58,518 @@ import { SelectHorizElement } from "./select-horiz.js";
|
|
|
57
58
|
import { SnackbarElement } from "./snackbar.js";
|
|
58
59
|
import { SnapContainer } from "./snap-container.js";
|
|
59
60
|
import { SwipeElement } from "./swipe.js";
|
|
60
|
-
import { a as resolveCssVars, i as attachTimelineInteractions, n as TimelineTrackTabElement, o as resolveGrid, r as timelineStyles, s as TimelineController, t as IxfxTimelineElement } from "./timeline-
|
|
61
|
+
import { a as resolveCssVars, i as attachTimelineInteractions, n as TimelineTrackTabElement, o as resolveGrid, r as timelineStyles, s as TimelineController, t as IxfxTimelineElement } from "./timeline-THyvH8xy.js";
|
|
61
62
|
import { TransitoryLabelElement } from "./transitory-label.js";
|
|
62
63
|
import { XyPad } from "./xy-pad.js";
|
|
63
64
|
import { LitElement, css, html, nothing } from "lit";
|
|
64
65
|
import { customElement, eventOptions, property, query, queryAssignedElements, state } from "lit/decorators.js";
|
|
65
66
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
67
|
+
import { createCommandRegistry } from "@clinth/ui-commands";
|
|
66
68
|
import { Trees } from "@ixfx/collections";
|
|
67
69
|
import { clamp, clamper, scaler } from "@ixfx/numbers";
|
|
68
70
|
import { repeat } from "lit/directives/repeat.js";
|
|
69
|
-
|
|
71
|
+
//#region src/bottom-drawer/bottom-drawer.ts
|
|
72
|
+
/** Builds the command id for a named drawer's command, e.g. `inspector.expand`. */
|
|
73
|
+
function bottomDrawerCommandId(name, command) {
|
|
74
|
+
return `${name.trim()}.${command}`;
|
|
75
|
+
}
|
|
76
|
+
function clampRange(value, min, max) {
|
|
77
|
+
return Math.min(max, Math.max(min, value));
|
|
78
|
+
}
|
|
79
|
+
let BottomDrawerElement = class BottomDrawerElement extends LitElement {
|
|
80
|
+
constructor(..._args) {
|
|
81
|
+
super(..._args);
|
|
82
|
+
this.open = false;
|
|
83
|
+
this.height = 320;
|
|
84
|
+
this.minHeight = 160;
|
|
85
|
+
this.dismissThreshold = 96;
|
|
86
|
+
this.maxHeightRatio = .85;
|
|
87
|
+
this.label = `Drawer`;
|
|
88
|
+
this.iconName = ``;
|
|
89
|
+
this.closable = true;
|
|
90
|
+
this.collapsible = true;
|
|
91
|
+
this.maintainHandle = false;
|
|
92
|
+
this.name = ``;
|
|
93
|
+
this.#dragStartY = 0;
|
|
94
|
+
this.#dragStartHeight = 0;
|
|
95
|
+
this.#collapsedDragging = false;
|
|
96
|
+
this.#commandName = ``;
|
|
97
|
+
this.#commandIds = [];
|
|
98
|
+
this.#onResizeStart = (event) => {
|
|
99
|
+
if (event.button !== 0) return;
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
const edge = event.currentTarget;
|
|
102
|
+
edge.setPointerCapture(event.pointerId);
|
|
103
|
+
if (!this.open) {
|
|
104
|
+
this.#collapsedDragging = false;
|
|
105
|
+
this.#dragStartY = event.clientY;
|
|
106
|
+
this.#dragStartHeight = this.dismissThreshold;
|
|
107
|
+
edge.addEventListener(`pointermove`, this.#onTabPointerMove);
|
|
108
|
+
edge.addEventListener(`pointerup`, this.#onTabPointerUp, { once: true });
|
|
109
|
+
edge.addEventListener(`pointercancel`, this.#onTabPointerUp, { once: true });
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this.#dragStartY = event.clientY;
|
|
113
|
+
this.#dragStartHeight = this.#displayHeight();
|
|
114
|
+
this._dragHeight = this.#dragStartHeight;
|
|
115
|
+
this.toggleAttribute(`resizing`, true);
|
|
116
|
+
edge.addEventListener(`pointermove`, this.#onResizeMove);
|
|
117
|
+
edge.addEventListener(`pointerup`, this.#onResizeEnd, { once: true });
|
|
118
|
+
edge.addEventListener(`pointercancel`, this.#onResizeEnd, { once: true });
|
|
119
|
+
};
|
|
120
|
+
this.#onResizeMove = (event) => {
|
|
121
|
+
this._dragHeight = clampRange(this.#dragStartHeight + this.#dragStartY - event.clientY, 0, this.#maxHeight());
|
|
122
|
+
};
|
|
123
|
+
this.#onResizeEnd = (event) => {
|
|
124
|
+
const edge = event.currentTarget;
|
|
125
|
+
edge.removeEventListener(`pointermove`, this.#onResizeMove);
|
|
126
|
+
edge.removeEventListener(`pointerup`, this.#onResizeEnd);
|
|
127
|
+
edge.removeEventListener(`pointercancel`, this.#onResizeEnd);
|
|
128
|
+
if (edge.hasPointerCapture(event.pointerId)) edge.releasePointerCapture(event.pointerId);
|
|
129
|
+
this.toggleAttribute(`resizing`, false);
|
|
130
|
+
const height = this._dragHeight ?? this.height;
|
|
131
|
+
this._dragHeight = void 0;
|
|
132
|
+
if (height < this.dismissThreshold) {
|
|
133
|
+
this.close();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
this.#setHeight(height);
|
|
137
|
+
};
|
|
138
|
+
this.#onResizeKeyDown = (event) => {
|
|
139
|
+
if (!this.open) {
|
|
140
|
+
if (event.key === `ArrowUp` || event.key === `Enter` || event.key === ` ` || event.key === `Home` || event.key === `End`) {
|
|
141
|
+
event.preventDefault();
|
|
142
|
+
this.show();
|
|
143
|
+
}
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const delta = event.shiftKey ? 64 : 16;
|
|
147
|
+
if (event.key === `ArrowUp`) {
|
|
148
|
+
event.preventDefault();
|
|
149
|
+
this.#setHeight(this.height + delta);
|
|
150
|
+
} else if (event.key === `ArrowDown`) {
|
|
151
|
+
event.preventDefault();
|
|
152
|
+
if (this.height - delta < this.dismissThreshold) this.close();
|
|
153
|
+
else this.#setHeight(this.height - delta);
|
|
154
|
+
} else if (event.key === `Home`) {
|
|
155
|
+
event.preventDefault();
|
|
156
|
+
this.#setHeight(this.minHeight);
|
|
157
|
+
} else if (event.key === `End`) {
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
this.#setHeight(this.#maxHeight());
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
this.#onTabPointerMove = (event) => {
|
|
163
|
+
const delta = this.#dragStartY - event.clientY;
|
|
164
|
+
if (!this.#collapsedDragging) {
|
|
165
|
+
if (delta < 4) return;
|
|
166
|
+
this.#collapsedDragging = true;
|
|
167
|
+
this.show();
|
|
168
|
+
this.toggleAttribute(`resizing`, true);
|
|
169
|
+
}
|
|
170
|
+
this._dragHeight = clampRange(this.#dragStartHeight + this.#dragStartY - event.clientY, 0, this.#maxHeight());
|
|
171
|
+
};
|
|
172
|
+
this.#onTabPointerUp = (event) => {
|
|
173
|
+
const target = event.currentTarget;
|
|
174
|
+
target.removeEventListener(`pointermove`, this.#onTabPointerMove);
|
|
175
|
+
target.removeEventListener(`pointerup`, this.#onTabPointerUp);
|
|
176
|
+
target.removeEventListener(`pointercancel`, this.#onTabPointerUp);
|
|
177
|
+
if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);
|
|
178
|
+
if (!this.#collapsedDragging) {
|
|
179
|
+
this.show();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this.#collapsedDragging = false;
|
|
183
|
+
this.toggleAttribute(`resizing`, false);
|
|
184
|
+
const height = this._dragHeight ?? this.height;
|
|
185
|
+
this._dragHeight = void 0;
|
|
186
|
+
if (height < this.dismissThreshold) {
|
|
187
|
+
this.close();
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.#setHeight(height);
|
|
191
|
+
};
|
|
192
|
+
this.#onDrawerKeyDown = (event) => {
|
|
193
|
+
if (event.key !== `Escape`) return;
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
event.stopPropagation();
|
|
196
|
+
this.close();
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
static {
|
|
200
|
+
this.styles = [
|
|
201
|
+
themeFallbacks,
|
|
202
|
+
handleStyles,
|
|
203
|
+
css`
|
|
204
|
+
:host {
|
|
205
|
+
--bottom-drawer-background: color-mix(in srgb, var(--surface-2) 84%, transparent);
|
|
206
|
+
--bottom-drawer-border: 1px solid color-mix(in srgb, var(--surface-2-text) 14%, transparent);
|
|
207
|
+
--bottom-drawer-radius: var(--radius-l);
|
|
208
|
+
--bottom-drawer-blur: 18px;
|
|
209
|
+
--bottom-drawer-shadow: var(--shadow-l);
|
|
210
|
+
--bottom-drawer-collapsed-width: 96px;
|
|
211
|
+
|
|
212
|
+
display: block;
|
|
213
|
+
position: relative;
|
|
214
|
+
height: 100%;
|
|
215
|
+
min-width: 0;
|
|
216
|
+
min-height: 0;
|
|
217
|
+
overflow: hidden;
|
|
218
|
+
}
|
|
219
|
+
.content {
|
|
220
|
+
position: absolute;
|
|
221
|
+
inset: 0;
|
|
222
|
+
min-width: 0;
|
|
223
|
+
min-height: 0;
|
|
224
|
+
}
|
|
225
|
+
.content ::slotted(*) {
|
|
226
|
+
width: 100%;
|
|
227
|
+
height: 100%;
|
|
228
|
+
}
|
|
229
|
+
.drawer {
|
|
230
|
+
--m: 0;
|
|
231
|
+
position: absolute;
|
|
232
|
+
z-index: 2;
|
|
233
|
+
right: calc(var(--m) * (50% - var(--bottom-drawer-collapsed-width) / 2));
|
|
234
|
+
bottom: 0;
|
|
235
|
+
left: calc(var(--m) * (50% - var(--bottom-drawer-collapsed-width) / 2));
|
|
236
|
+
display: flex;
|
|
237
|
+
flex-direction: column;
|
|
238
|
+
box-sizing: border-box;
|
|
239
|
+
height: var(--bottom-drawer-height);
|
|
240
|
+
max-height: 100%;
|
|
241
|
+
min-height: 0;
|
|
242
|
+
color: var(--surface-2-text);
|
|
243
|
+
background: var(--bottom-drawer-background);
|
|
244
|
+
border: var(--bottom-drawer-border);
|
|
245
|
+
border-bottom: 0;
|
|
246
|
+
border-radius: var(--bottom-drawer-radius) var(--bottom-drawer-radius) 0 0;
|
|
247
|
+
box-shadow: var(--bottom-drawer-shadow);
|
|
248
|
+
backdrop-filter: blur(var(--bottom-drawer-blur)) saturate(1.15);
|
|
249
|
+
-webkit-backdrop-filter: blur(var(--bottom-drawer-blur)) saturate(1.15);
|
|
250
|
+
opacity: 0;
|
|
251
|
+
transform: translateY(100%);
|
|
252
|
+
visibility: hidden;
|
|
253
|
+
transition:
|
|
254
|
+
transform var(--transition),
|
|
255
|
+
opacity var(--transition),
|
|
256
|
+
left var(--transition),
|
|
257
|
+
right var(--transition),
|
|
258
|
+
height var(--transition),
|
|
259
|
+
visibility 0s linear 0.16s;
|
|
260
|
+
will-change: transform, opacity;
|
|
261
|
+
}
|
|
262
|
+
:host([open]) .drawer {
|
|
263
|
+
opacity: var(--bottom-drawer-opacity, 1);
|
|
264
|
+
transform: translateY(0);
|
|
265
|
+
visibility: visible;
|
|
266
|
+
transition:
|
|
267
|
+
transform var(--transition),
|
|
268
|
+
opacity var(--transition),
|
|
269
|
+
left var(--transition),
|
|
270
|
+
right var(--transition),
|
|
271
|
+
height var(--transition);
|
|
272
|
+
}
|
|
273
|
+
:host([resizing]) {
|
|
274
|
+
cursor: ns-resize;
|
|
275
|
+
user-select: none;
|
|
276
|
+
}
|
|
277
|
+
:host([resizing]) .drawer {
|
|
278
|
+
transition: none;
|
|
279
|
+
}
|
|
280
|
+
.resize-edge {
|
|
281
|
+
position: absolute;
|
|
282
|
+
z-index: 1;
|
|
283
|
+
top: -5px;
|
|
284
|
+
right: 0;
|
|
285
|
+
left: 0;
|
|
286
|
+
height: 11px;
|
|
287
|
+
cursor: ns-resize;
|
|
288
|
+
touch-action: none;
|
|
289
|
+
outline: none;
|
|
290
|
+
}
|
|
291
|
+
.resize-edge .ixfx-handle {
|
|
292
|
+
position: absolute;
|
|
293
|
+
top: 7px;
|
|
294
|
+
left: 50%;
|
|
295
|
+
transform: translateX(-50%);
|
|
296
|
+
--ixfx-handle-length: 44px;
|
|
297
|
+
--ixfx-handle-thickness: 3px;
|
|
298
|
+
--ixfx-handle-radius: 999px;
|
|
299
|
+
}
|
|
300
|
+
/* Inner content fades as the drawer morphs into its collapsed tab. */
|
|
301
|
+
ixfx-titlebar,
|
|
302
|
+
.body {
|
|
303
|
+
opacity: calc(1 - var(--m, 0));
|
|
304
|
+
transition: opacity var(--transition);
|
|
305
|
+
}
|
|
306
|
+
:host([resizing]) ixfx-titlebar,
|
|
307
|
+
:host([resizing]) .body {
|
|
308
|
+
transition: none;
|
|
309
|
+
}
|
|
310
|
+
/* Collapsed tab: docked to the bottom edge, narrowed to handle width. */
|
|
311
|
+
:host([maintain-handle]:not([open])) .drawer {
|
|
312
|
+
--m: 1;
|
|
313
|
+
height: 20px;
|
|
314
|
+
opacity: 1;
|
|
315
|
+
transform: translateY(0);
|
|
316
|
+
visibility: visible;
|
|
317
|
+
transition:
|
|
318
|
+
transform var(--transition),
|
|
319
|
+
opacity var(--transition),
|
|
320
|
+
left var(--transition),
|
|
321
|
+
right var(--transition),
|
|
322
|
+
height var(--transition);
|
|
323
|
+
}
|
|
324
|
+
:host([maintain-handle]:not([open])) ixfx-titlebar,
|
|
325
|
+
:host([maintain-handle]:not([open])) .body {
|
|
326
|
+
display: none;
|
|
327
|
+
}
|
|
328
|
+
:host([maintain-handle]:not([open])) .resize-edge {
|
|
329
|
+
top: 0;
|
|
330
|
+
height: 100%;
|
|
331
|
+
}
|
|
332
|
+
:host([maintain-handle]:not([open])) .resize-edge .ixfx-handle {
|
|
333
|
+
top: 50%;
|
|
334
|
+
transform: translate(-50%, -50%);
|
|
335
|
+
}
|
|
336
|
+
ixfx-titlebar {
|
|
337
|
+
flex: none;
|
|
338
|
+
--titlebar-background: var(--bottom-drawer-title-background, transparent);
|
|
339
|
+
border-bottom: 1px solid color-mix(in srgb, var(--surface-2-text) 10%, transparent);
|
|
340
|
+
}
|
|
341
|
+
.body {
|
|
342
|
+
flex: 1;
|
|
343
|
+
min-height: 0;
|
|
344
|
+
overflow: auto;
|
|
345
|
+
overscroll-behavior: contain;
|
|
346
|
+
}
|
|
347
|
+
.body ::slotted(*) {
|
|
348
|
+
box-sizing: border-box;
|
|
349
|
+
}
|
|
350
|
+
@media (prefers-reduced-motion: reduce) {
|
|
351
|
+
.drawer,
|
|
352
|
+
ixfx-titlebar,
|
|
353
|
+
.body {
|
|
354
|
+
transition-duration: 0s;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
`
|
|
358
|
+
];
|
|
359
|
+
}
|
|
360
|
+
#dragStartY;
|
|
361
|
+
#dragStartHeight;
|
|
362
|
+
#collapsedDragging;
|
|
363
|
+
#ownedRegistry;
|
|
364
|
+
#commandTarget;
|
|
365
|
+
#commandName;
|
|
366
|
+
#commandIds;
|
|
367
|
+
connectedCallback() {
|
|
368
|
+
super.connectedCallback();
|
|
369
|
+
this.#syncCommands();
|
|
370
|
+
}
|
|
371
|
+
disconnectedCallback() {
|
|
372
|
+
super.disconnectedCallback();
|
|
373
|
+
this.#teardownCommands();
|
|
374
|
+
if (this.#ownedRegistry !== void 0) {
|
|
375
|
+
if (this.registry === this.#ownedRegistry) this.registry = void 0;
|
|
376
|
+
this.#ownedRegistry = void 0;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
updated(changed) {
|
|
380
|
+
super.updated(changed);
|
|
381
|
+
if (changed.has(`name`) || changed.has(`registry`)) this.#syncCommands();
|
|
382
|
+
}
|
|
383
|
+
show() {
|
|
384
|
+
this.open = true;
|
|
385
|
+
}
|
|
386
|
+
close() {
|
|
387
|
+
if (!this.open) return;
|
|
388
|
+
this.open = false;
|
|
389
|
+
this.dispatchEvent(new CustomEvent(`drawer-close`, {
|
|
390
|
+
bubbles: true,
|
|
391
|
+
composed: true
|
|
392
|
+
}));
|
|
393
|
+
}
|
|
394
|
+
toggle() {
|
|
395
|
+
if (this.open) this.close();
|
|
396
|
+
else this.show();
|
|
397
|
+
}
|
|
398
|
+
#syncCommands() {
|
|
399
|
+
const name = this.name.trim();
|
|
400
|
+
const target = this.registry ?? this.#ownedRegistry;
|
|
401
|
+
if (name !== `` && this.isConnected && target !== void 0 && this.#commandTarget === target && this.#commandName === name) return;
|
|
402
|
+
this.#teardownCommands();
|
|
403
|
+
if (name === `` || !this.isConnected) return;
|
|
404
|
+
const resolved = this.registry ?? (this.#ownedRegistry ??= createCommandRegistry());
|
|
405
|
+
if (this.#ownedRegistry !== void 0 && resolved !== this.#ownedRegistry) this.#ownedRegistry = void 0;
|
|
406
|
+
if (this.registry === void 0) this.registry = resolved;
|
|
407
|
+
const registered = [];
|
|
408
|
+
const commands = [
|
|
409
|
+
{
|
|
410
|
+
command: `expand`,
|
|
411
|
+
label: `Expand ${this.label}`,
|
|
412
|
+
description: `Open the ${this.label} drawer`,
|
|
413
|
+
execute: () => this.show()
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
command: `collapse`,
|
|
417
|
+
label: `Collapse ${this.label}`,
|
|
418
|
+
description: `Close the ${this.label} drawer`,
|
|
419
|
+
execute: () => this.close()
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
command: `toggle`,
|
|
423
|
+
label: `Toggle ${this.label}`,
|
|
424
|
+
description: `Open the ${this.label} drawer if closed, close it if open`,
|
|
425
|
+
execute: () => this.toggle()
|
|
426
|
+
}
|
|
427
|
+
];
|
|
428
|
+
for (const { command, label, description, execute } of commands) {
|
|
429
|
+
const id = bottomDrawerCommandId(name, command);
|
|
430
|
+
if (resolved.has(id)) continue;
|
|
431
|
+
resolved.register({
|
|
432
|
+
id,
|
|
433
|
+
label,
|
|
434
|
+
description,
|
|
435
|
+
execute
|
|
436
|
+
});
|
|
437
|
+
registered.push(id);
|
|
438
|
+
}
|
|
439
|
+
this.#commandTarget = resolved;
|
|
440
|
+
this.#commandName = name;
|
|
441
|
+
this.#commandIds = registered;
|
|
442
|
+
}
|
|
443
|
+
#teardownCommands() {
|
|
444
|
+
if (this.#commandTarget !== void 0) {
|
|
445
|
+
for (const id of this.#commandIds) this.#commandTarget.unregister(id);
|
|
446
|
+
this.#commandTarget = void 0;
|
|
447
|
+
this.#commandName = ``;
|
|
448
|
+
this.#commandIds = [];
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
_onTitlebarToggle(event) {
|
|
452
|
+
event.stopPropagation();
|
|
453
|
+
if (event.detail.collapsed) this.close();
|
|
454
|
+
else this.open = true;
|
|
455
|
+
}
|
|
456
|
+
_onTitlebarClose(event) {
|
|
457
|
+
event.stopPropagation();
|
|
458
|
+
this.close();
|
|
459
|
+
}
|
|
460
|
+
render() {
|
|
461
|
+
const raw = this.#displayHeight();
|
|
462
|
+
const max = this.#maxHeight();
|
|
463
|
+
const morph = this.#morphProgress(raw);
|
|
464
|
+
const height = this.open ? raw * (1 - morph) + 20 * morph : 20;
|
|
465
|
+
const opacity = this.maintainHandle && this.open ? 1 : this.#dragOpacity(raw);
|
|
466
|
+
return html`
|
|
467
|
+
<div class="content"><slot></slot></div>
|
|
468
|
+
<section
|
|
469
|
+
class="drawer"
|
|
470
|
+
style=${`--bottom-drawer-height: ${height}px; --bottom-drawer-opacity: ${opacity}; --m: ${morph}`}
|
|
471
|
+
role="region"
|
|
472
|
+
aria-label=${this.label}
|
|
473
|
+
@keydown=${this.#onDrawerKeyDown}
|
|
474
|
+
>
|
|
475
|
+
<div
|
|
476
|
+
class="resize-edge"
|
|
477
|
+
role="separator"
|
|
478
|
+
tabindex="0"
|
|
479
|
+
aria-label=${`${this.open ? `Resize` : `Expand`} ${this.label}`}
|
|
480
|
+
aria-orientation="horizontal"
|
|
481
|
+
aria-valuemin=${this.minHeight}
|
|
482
|
+
aria-valuemax=${max}
|
|
483
|
+
aria-valuenow=${Math.round(raw)}
|
|
484
|
+
@pointerdown=${this.#onResizeStart}
|
|
485
|
+
@keydown=${this.#onResizeKeyDown}
|
|
486
|
+
><span class="ixfx-handle" data-handle="dimpled" data-shape="horizontal" part="handle"></span></div>
|
|
487
|
+
<ixfx-titlebar
|
|
488
|
+
.title=${this.label}
|
|
489
|
+
.iconName=${this.iconName}
|
|
490
|
+
.closable=${this.closable}
|
|
491
|
+
.collapsible=${this.collapsible}
|
|
492
|
+
.collapsed=${!this.open}
|
|
493
|
+
?inert=${!this.open}
|
|
494
|
+
@toggle=${this._onTitlebarToggle}
|
|
495
|
+
@close=${this._onTitlebarClose}
|
|
496
|
+
>
|
|
497
|
+
<slot name="toolbar" slot="toolbar"></slot>
|
|
498
|
+
</ixfx-titlebar>
|
|
499
|
+
<div class="body" ?inert=${!this.open}><slot name="drawer"></slot></div>
|
|
500
|
+
</section>
|
|
501
|
+
`;
|
|
502
|
+
}
|
|
503
|
+
#maxHeight() {
|
|
504
|
+
const availableHeight = this.clientHeight || this.height;
|
|
505
|
+
return Math.max(this.minHeight, availableHeight * clampRange(this.maxHeightRatio, 0, 1));
|
|
506
|
+
}
|
|
507
|
+
#displayHeight() {
|
|
508
|
+
return clampRange(this._dragHeight ?? this.height, 0, this.#maxHeight());
|
|
509
|
+
}
|
|
510
|
+
#dragOpacity(height) {
|
|
511
|
+
if (this._dragHeight === void 0 || height >= this.minHeight) return 1;
|
|
512
|
+
const fadeRange = this.minHeight - this.dismissThreshold;
|
|
513
|
+
if (fadeRange <= 0) return height >= this.dismissThreshold ? 1 : 0;
|
|
514
|
+
return clampRange((height - this.dismissThreshold) / fadeRange, 0, 1);
|
|
515
|
+
}
|
|
516
|
+
#morphProgress(raw) {
|
|
517
|
+
if (!this.open) return this.maintainHandle ? 1 : 0;
|
|
518
|
+
if (this._dragHeight === void 0 || !this.maintainHandle) return 0;
|
|
519
|
+
const range = this.minHeight - this.dismissThreshold;
|
|
520
|
+
if (range <= 0) return raw < this.dismissThreshold ? 1 : 0;
|
|
521
|
+
return clampRange((this.minHeight - raw) / range, 0, 1);
|
|
522
|
+
}
|
|
523
|
+
#setHeight(height) {
|
|
524
|
+
this.height = clampRange(height, this.minHeight, this.#maxHeight());
|
|
525
|
+
this.dispatchEvent(new CustomEvent(`drawer-resize`, {
|
|
526
|
+
detail: { height: this.height },
|
|
527
|
+
bubbles: true,
|
|
528
|
+
composed: true
|
|
529
|
+
}));
|
|
530
|
+
}
|
|
531
|
+
#onResizeStart;
|
|
532
|
+
#onResizeMove;
|
|
533
|
+
#onResizeEnd;
|
|
534
|
+
#onResizeKeyDown;
|
|
535
|
+
#onTabPointerMove;
|
|
536
|
+
#onTabPointerUp;
|
|
537
|
+
#onDrawerKeyDown;
|
|
538
|
+
};
|
|
539
|
+
__decorate([property({
|
|
540
|
+
type: Boolean,
|
|
541
|
+
reflect: true
|
|
542
|
+
})], BottomDrawerElement.prototype, "open", void 0);
|
|
543
|
+
__decorate([property({ type: Number })], BottomDrawerElement.prototype, "height", void 0);
|
|
544
|
+
__decorate([property({
|
|
545
|
+
type: Number,
|
|
546
|
+
attribute: `min-height`
|
|
547
|
+
})], BottomDrawerElement.prototype, "minHeight", void 0);
|
|
548
|
+
__decorate([property({
|
|
549
|
+
type: Number,
|
|
550
|
+
attribute: `dismiss-threshold`
|
|
551
|
+
})], BottomDrawerElement.prototype, "dismissThreshold", void 0);
|
|
552
|
+
__decorate([property({
|
|
553
|
+
type: Number,
|
|
554
|
+
attribute: `max-height-ratio`
|
|
555
|
+
})], BottomDrawerElement.prototype, "maxHeightRatio", void 0);
|
|
556
|
+
__decorate([property({ type: String })], BottomDrawerElement.prototype, "label", void 0);
|
|
557
|
+
__decorate([property({
|
|
558
|
+
type: String,
|
|
559
|
+
attribute: `icon-name`
|
|
560
|
+
})], BottomDrawerElement.prototype, "iconName", void 0);
|
|
561
|
+
__decorate([property({ type: Boolean })], BottomDrawerElement.prototype, "closable", void 0);
|
|
562
|
+
__decorate([property({ type: Boolean })], BottomDrawerElement.prototype, "collapsible", void 0);
|
|
563
|
+
__decorate([property({
|
|
564
|
+
type: Boolean,
|
|
565
|
+
attribute: `maintain-handle`,
|
|
566
|
+
reflect: true
|
|
567
|
+
})], BottomDrawerElement.prototype, "maintainHandle", void 0);
|
|
568
|
+
__decorate([property({ type: String })], BottomDrawerElement.prototype, "name", void 0);
|
|
569
|
+
__decorate([property({ attribute: false })], BottomDrawerElement.prototype, "registry", void 0);
|
|
570
|
+
__decorate([state()], BottomDrawerElement.prototype, "_dragHeight", void 0);
|
|
571
|
+
BottomDrawerElement = __decorate([safeCustomElement(`ixfx-bottom-drawer`)], BottomDrawerElement);
|
|
572
|
+
//#endregion
|
|
70
573
|
//#region src/button/radio-group.ts
|
|
71
574
|
let RadioGroup = class RadioGroup extends LitElement {
|
|
72
575
|
constructor(..._args) {
|
|
@@ -4180,7 +4683,7 @@ let DockHostElement = class DockHostElement extends LitElement {
|
|
|
4180
4683
|
role="separator"
|
|
4181
4684
|
aria-label="Resize adjacent panels"
|
|
4182
4685
|
@pointerdown=${(e) => this._onJunctionPointerDown(e, junction)}
|
|
4183
|
-
></div>
|
|
4686
|
+
><span class="ixfx-handle" data-handle="dotted" data-shape="spot" part="junction-handle"></span></div>
|
|
4184
4687
|
`)}
|
|
4185
4688
|
</div>
|
|
4186
4689
|
<slot @slotchange=${this._onPoolSlotChange}></slot>
|
|
@@ -4274,7 +4777,10 @@ let DockHostElement = class DockHostElement extends LitElement {
|
|
|
4274
4777
|
};
|
|
4275
4778
|
}
|
|
4276
4779
|
static {
|
|
4277
|
-
this.styles = [
|
|
4780
|
+
this.styles = [
|
|
4781
|
+
themeFallbacks,
|
|
4782
|
+
handleStyles,
|
|
4783
|
+
css`
|
|
4278
4784
|
:host {
|
|
4279
4785
|
display: block;
|
|
4280
4786
|
width: 100%;
|
|
@@ -4402,26 +4908,23 @@ let DockHostElement = class DockHostElement extends LitElement {
|
|
|
4402
4908
|
border-radius: 50%;
|
|
4403
4909
|
cursor: nwse-resize;
|
|
4404
4910
|
pointer-events: auto;
|
|
4911
|
+
display: flex;
|
|
4912
|
+
align-items: center;
|
|
4913
|
+
justify-content: center;
|
|
4405
4914
|
}
|
|
4406
4915
|
|
|
4407
|
-
.junction-handle
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
background: var(--dock-junction-color, var(--accent));
|
|
4413
|
-
opacity: 0;
|
|
4414
|
-
transition: opacity var(--transition);
|
|
4415
|
-
}
|
|
4416
|
-
|
|
4417
|
-
.junction-handle:hover::after {
|
|
4418
|
-
opacity: 0.9;
|
|
4916
|
+
.junction-handle .ixfx-handle {
|
|
4917
|
+
--ixfx-handle-spot-size: 12px;
|
|
4918
|
+
--ixfx-handle-dot-size: 3px;
|
|
4919
|
+
--ixfx-handle-opacity: 0;
|
|
4920
|
+
--ixfx-handle-opacity-active: 0.9;
|
|
4419
4921
|
}
|
|
4420
4922
|
|
|
4421
4923
|
slot:not([name]) {
|
|
4422
4924
|
display: none;
|
|
4423
4925
|
}
|
|
4424
|
-
`
|
|
4926
|
+
`
|
|
4927
|
+
];
|
|
4425
4928
|
}
|
|
4426
4929
|
};
|
|
4427
4930
|
__decorate([property({
|
|
@@ -5160,136 +5663,6 @@ function dismiss(id) {
|
|
|
5160
5663
|
syncRenderer();
|
|
5161
5664
|
}
|
|
5162
5665
|
//#endregion
|
|
5163
|
-
//#region src/pan-text/pan-text.ts
|
|
5164
|
-
const SPEED = 45;
|
|
5165
|
-
const END_PADDING = 4;
|
|
5166
|
-
const START_DELAY = 300;
|
|
5167
|
-
const PAN_EASING = `cubic-bezier(0.25, 0.46, 0.45, 0.94)`;
|
|
5168
|
-
let PanTextElement = class PanTextElement extends LitElement {
|
|
5169
|
-
constructor(..._args) {
|
|
5170
|
-
super(..._args);
|
|
5171
|
-
this.direction = `end`;
|
|
5172
|
-
this.disabled = false;
|
|
5173
|
-
this._isOverflowing = false;
|
|
5174
|
-
this._isHovering = false;
|
|
5175
|
-
this._overflow = 0;
|
|
5176
|
-
this._resizeObserver = null;
|
|
5177
|
-
this._onMouseEnter = () => {
|
|
5178
|
-
this._isHovering = true;
|
|
5179
|
-
};
|
|
5180
|
-
this._onMouseLeave = () => {
|
|
5181
|
-
this._isHovering = false;
|
|
5182
|
-
};
|
|
5183
|
-
this._measure = () => {
|
|
5184
|
-
if (this._isHovering) return;
|
|
5185
|
-
const el = this._textEl;
|
|
5186
|
-
if (!el) return;
|
|
5187
|
-
this._overflow = Math.max(0, el.scrollWidth - el.clientWidth);
|
|
5188
|
-
const overflowing = this._overflow > 0;
|
|
5189
|
-
this.classList.toggle(`is-overflowing`, overflowing);
|
|
5190
|
-
if (overflowing !== this._isOverflowing) this._isOverflowing = overflowing;
|
|
5191
|
-
};
|
|
5192
|
-
}
|
|
5193
|
-
connectedCallback() {
|
|
5194
|
-
super.connectedCallback();
|
|
5195
|
-
this._resizeObserver = new ResizeObserver(() => this._measure());
|
|
5196
|
-
this.addEventListener(`mouseenter`, this._onMouseEnter);
|
|
5197
|
-
this.addEventListener(`mouseleave`, this._onMouseLeave);
|
|
5198
|
-
}
|
|
5199
|
-
disconnectedCallback() {
|
|
5200
|
-
super.disconnectedCallback();
|
|
5201
|
-
this._resizeObserver?.disconnect();
|
|
5202
|
-
this._resizeObserver = null;
|
|
5203
|
-
this.removeEventListener(`mouseenter`, this._onMouseEnter);
|
|
5204
|
-
this.removeEventListener(`mouseleave`, this._onMouseLeave);
|
|
5205
|
-
}
|
|
5206
|
-
firstUpdated() {
|
|
5207
|
-
this._measure();
|
|
5208
|
-
this._resizeObserver?.observe(this);
|
|
5209
|
-
document.fonts?.ready.then(() => this._measure());
|
|
5210
|
-
}
|
|
5211
|
-
updated() {
|
|
5212
|
-
this._measure();
|
|
5213
|
-
}
|
|
5214
|
-
_textStyle() {
|
|
5215
|
-
if (!this._isOverflowing) return ``;
|
|
5216
|
-
const distance = this._overflow + END_PADDING;
|
|
5217
|
-
const duration = Math.max(1.5, distance / SPEED);
|
|
5218
|
-
const revealEnd = this.direction === `end`;
|
|
5219
|
-
const restX = revealEnd ? 0 : -distance;
|
|
5220
|
-
const hoverX = revealEnd ? -distance : 0;
|
|
5221
|
-
if (this._isHovering) return [
|
|
5222
|
-
`transform: translateX(${hoverX}px)`,
|
|
5223
|
-
`transition: transform ${duration}s ${PAN_EASING} ${START_DELAY}ms`,
|
|
5224
|
-
`overflow: visible`,
|
|
5225
|
-
`text-overflow: clip`
|
|
5226
|
-
].join(`; `);
|
|
5227
|
-
return [
|
|
5228
|
-
`transform: translateX(${restX}px)`,
|
|
5229
|
-
`transition: transform 400ms ${PAN_EASING}`,
|
|
5230
|
-
revealEnd ? `` : `overflow: visible; text-overflow: clip`
|
|
5231
|
-
].filter(Boolean).join(`; `);
|
|
5232
|
-
}
|
|
5233
|
-
render() {
|
|
5234
|
-
const textClasses = {
|
|
5235
|
-
"is-overflowing": this._isOverflowing,
|
|
5236
|
-
"is-hovering": this._isHovering
|
|
5237
|
-
};
|
|
5238
|
-
return html`
|
|
5239
|
-
<span class="text ${classMap(textClasses)}" part="text" style=${this._textStyle()}>
|
|
5240
|
-
<slot @slotchange=${this._measure}></slot>
|
|
5241
|
-
</span>
|
|
5242
|
-
`;
|
|
5243
|
-
}
|
|
5244
|
-
static {
|
|
5245
|
-
this.styles = [themeFallbacks, css`
|
|
5246
|
-
/* Renders like plain inline text: no colours, border, padding or margin
|
|
5247
|
-
of its own — it only adds the clipping needed to pan on hover. */
|
|
5248
|
-
:host {
|
|
5249
|
-
display: inline-block;
|
|
5250
|
-
overflow: hidden;
|
|
5251
|
-
white-space: nowrap;
|
|
5252
|
-
max-width: 100%;
|
|
5253
|
-
box-sizing: border-box;
|
|
5254
|
-
font: inherit;
|
|
5255
|
-
color: inherit;
|
|
5256
|
-
}
|
|
5257
|
-
|
|
5258
|
-
:host([disabled]) {
|
|
5259
|
-
opacity: var(--disabled-opacity, 0.5);
|
|
5260
|
-
pointer-events: none;
|
|
5261
|
-
}
|
|
5262
|
-
|
|
5263
|
-
.text {
|
|
5264
|
-
display: block;
|
|
5265
|
-
overflow: hidden;
|
|
5266
|
-
text-overflow: ellipsis;
|
|
5267
|
-
white-space: nowrap;
|
|
5268
|
-
will-change: transform;
|
|
5269
|
-
}
|
|
5270
|
-
|
|
5271
|
-
@media (prefers-reduced-motion: reduce) {
|
|
5272
|
-
.text {
|
|
5273
|
-
transition: none !important;
|
|
5274
|
-
transform: none !important;
|
|
5275
|
-
}
|
|
5276
|
-
}
|
|
5277
|
-
`];
|
|
5278
|
-
}
|
|
5279
|
-
};
|
|
5280
|
-
__decorate([property({
|
|
5281
|
-
type: String,
|
|
5282
|
-
attribute: `direction`
|
|
5283
|
-
})], PanTextElement.prototype, "direction", void 0);
|
|
5284
|
-
__decorate([property({
|
|
5285
|
-
type: Boolean,
|
|
5286
|
-
attribute: `disabled`
|
|
5287
|
-
})], PanTextElement.prototype, "disabled", void 0);
|
|
5288
|
-
__decorate([state()], PanTextElement.prototype, "_isOverflowing", void 0);
|
|
5289
|
-
__decorate([state()], PanTextElement.prototype, "_isHovering", void 0);
|
|
5290
|
-
__decorate([query(`.text`)], PanTextElement.prototype, "_textEl", void 0);
|
|
5291
|
-
PanTextElement = __decorate([safeCustomElement(`ixfx-pan-text`)], PanTextElement);
|
|
5292
|
-
//#endregion
|
|
5293
5666
|
//#region src/panel/panel-group.ts
|
|
5294
5667
|
/** Pointer movement threshold (px) before a press becomes a drag. */
|
|
5295
5668
|
const DRAG_THRESHOLD_PX = 5;
|
|
@@ -8075,29 +8448,29 @@ let TwoSplitLayoutElement = class TwoSplitLayoutElement extends LitElement {
|
|
|
8075
8448
|
<slot style=${sizeA} name="a"></slot>
|
|
8076
8449
|
${this._hasCorner ? html`<div class="corner-zone" @pointerdown=${this.#onCornerResizeDown}></div>` : ``}
|
|
8077
8450
|
<div @pointerdown=${this.#onResizeHandleDown} class="split-bar">
|
|
8078
|
-
${this.showGrabHandle ? html
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
` : ``}
|
|
8451
|
+
${this.showGrabHandle ? html`<span
|
|
8452
|
+
class="ixfx-handle"
|
|
8453
|
+
part="grip"
|
|
8454
|
+
data-handle="dimpled"
|
|
8455
|
+
data-shape=${this.layout === `horizontal` ? `horizontal` : `vertical`}
|
|
8456
|
+
></span>` : ``}
|
|
8085
8457
|
</div>
|
|
8086
8458
|
<slot style=${sizeB} name="b"></slot>
|
|
8087
8459
|
</div>`;
|
|
8088
8460
|
}
|
|
8089
8461
|
static {
|
|
8090
|
-
this.styles = [
|
|
8462
|
+
this.styles = [
|
|
8463
|
+
themeFallbacks,
|
|
8464
|
+
handleStyles,
|
|
8465
|
+
css`
|
|
8091
8466
|
:host {
|
|
8092
8467
|
--handle-size: 2px;
|
|
8093
8468
|
--handle-colour: transparent;
|
|
8094
8469
|
--handle-hover-colour: var(--surface-6);
|
|
8095
8470
|
--handle-active-colour: var(--accent);
|
|
8096
|
-
|
|
8097
|
-
--handle-
|
|
8098
|
-
--handle-
|
|
8099
|
-
--handle-grab-size: 16px;
|
|
8100
|
-
--handle-grab-thickness: 8px;
|
|
8471
|
+
/* Grip — shared handle primitive (docs/infra-handle.md). */
|
|
8472
|
+
--ixfx-handle-length: 16px;
|
|
8473
|
+
--ixfx-handle-thickness: 8px;
|
|
8101
8474
|
|
|
8102
8475
|
display: block;
|
|
8103
8476
|
box-sizing: border-box;
|
|
@@ -8140,40 +8513,14 @@ let TwoSplitLayoutElement = class TwoSplitLayoutElement extends LitElement {
|
|
|
8140
8513
|
to { background-color: var(--handle-hover-colour); }
|
|
8141
8514
|
}
|
|
8142
8515
|
|
|
8143
|
-
.
|
|
8516
|
+
.split-bar .ixfx-handle {
|
|
8144
8517
|
position: absolute;
|
|
8145
8518
|
top: 50%;
|
|
8146
8519
|
left: 50%;
|
|
8147
8520
|
transform: translate(-50%, -50%);
|
|
8148
|
-
display: flex;
|
|
8149
|
-
align-items: center;
|
|
8150
|
-
justify-content: center;
|
|
8151
|
-
gap: var(--handle-grab-dot-size);
|
|
8152
|
-
background: var(--handle-bg);
|
|
8153
|
-
border-radius: var(--radius-s);
|
|
8154
|
-
}
|
|
8155
|
-
|
|
8156
|
-
.grab-handle .dot {
|
|
8157
|
-
width: var(--handle-grab-dot-size);
|
|
8158
|
-
height: var(--handle-grab-dot-size);
|
|
8159
|
-
border-radius: 50%;
|
|
8160
|
-
background: var(--handle-grab-colour);
|
|
8161
|
-
flex-shrink: 0;
|
|
8162
8521
|
}
|
|
8163
8522
|
|
|
8164
|
-
|
|
8165
|
-
flex-direction: column;
|
|
8166
|
-
width: var(--handle-grab-thickness);
|
|
8167
|
-
height: var(--handle-grab-size);
|
|
8168
|
-
}
|
|
8169
|
-
|
|
8170
|
-
:host([layout="horizontal"]) .grab-handle {
|
|
8171
|
-
flex-direction: row;
|
|
8172
|
-
width: var(--handle-grab-size);
|
|
8173
|
-
height: var(--handle-grab-thickness);
|
|
8174
|
-
}
|
|
8175
|
-
|
|
8176
|
-
#zone.user-resizing .grab-handle {
|
|
8523
|
+
#zone.user-resizing .ixfx-handle {
|
|
8177
8524
|
display: none;
|
|
8178
8525
|
}
|
|
8179
8526
|
#zone.user-resizing {
|
|
@@ -8226,7 +8573,8 @@ let TwoSplitLayoutElement = class TwoSplitLayoutElement extends LitElement {
|
|
|
8226
8573
|
:host([data-collapsed-b]) slot[name="b"] {
|
|
8227
8574
|
display: none;
|
|
8228
8575
|
}
|
|
8229
|
-
`
|
|
8576
|
+
`
|
|
8577
|
+
];
|
|
8230
8578
|
}
|
|
8231
8579
|
};
|
|
8232
8580
|
__decorate([property({ type: String })], TwoSplitLayoutElement.prototype, "layout", void 0);
|
|
@@ -8307,6 +8655,6 @@ function init() {
|
|
|
8307
8655
|
console.log(`Init`);
|
|
8308
8656
|
}
|
|
8309
8657
|
//#endregion
|
|
8310
|
-
export { AcTextElement, AcTokenElement, ButtonElement, Checkbox, ColourPicker, ColourPickerPopup, CrumbNavigationElement, CrumbPathController, CrumbPathElement, DataController, DataDisplayComponent, DataGridElement, DataTableElement, DetailListElement, DockHostElement, DockPanelElement, EditableLabel, EditableNumber, FormElement, FormGroupElement, FormPartElement, GridListElement, GroupedItemListerElement, ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, IxfxHexEditorElement, IxfxIconElement, IxfxTimelineElement, KeyedElementIndex, LIST_ITEM_MOTION_MS, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, LabelledRadialInput, LabelledRangeInput, LabelledSliderInput, LedElement, ListSearchController, ListSelectionController, menu_exports as Menu, MillerBaseElement, MillerListElement, MillerTreeController, NarrowedTextElement, NotificationManager, NotificationPillElement, PanTextElement, PanelElement, PanelGroupElement, PlotDataSeries, PlotHistogram, PlotMultiAxis, PlotSingleAxis, PlotXyAxis, PolarPad, RadialInputElement, RadioGroup, RangeElement, RangeInput, RangeMultiElement, RatingElement, SelectHorizElement, SliderInputElement, SlidingNumberElement, SnackbarElement, SnapContainer, SplitButton, SplitLayoutElement, SplitPanelElement, SwipeElement, TabController, TabListElement, TabListItemElement, TabPanelElement, TabPanelsElement, TextShimmerElement, TickledController, TimelineController, TimelineTrackTabElement, TitlebarElement, ToolbarElement, ToolbarGroupElement, TooltipElement, TransitoryLabelElement, TreeBaseElement, TreeController, TreeDataModel, TreeKeyboardNavController, TreeListElement, TwoSplitLayoutElement, VerticalListElement, XyPad, addPanelToStack, animateListItemIn, animateListItemOut, applyAgeModification, applyHighlights, applySnapshot, attachTimelineInteractions, buildHighlightTargets, buildModel, clearHighlights, collectContainerNames, collectDataResult, collectPanelIds, collectStackPaths, computeColour, computeLeafGeoms, createAcCompletionProvider, createDataListSearchAdapter, createElementIncrSearch, createElementListSearchAdapter, createEmptyLayout, createEmptyStack, createFuzzySearch, createIncrSearch, createPillRenderer, createSplit, createStack, createTreeListAdapter, createTreeListSearchAdapter, createVerticalListAdapter, distribute, extractStack, findNode, findParentOf, findStackOf, findStackPathByName, getActiveDragPanelId, getIcon, getIconEntry, getIconFont, getLeafNeighbours, hasIcon, iconBus, init, insertBeside, isDragging, isMultiMode, isSplit, isStack, keyForElement, listItemFadeKeyframes, listSearchStyles, monitorIndeterminate, moveLeafNodeToEdge, moveLeafStep, normalise, normalize, panelGapIndex, parseColourScaleAttr, parseLayout, pointerOverAnyHost, prefersReducedMotion, readBaseColour, registerFontIcon, registerIcon, registerListSearchCommands, removePanelFromStack, resolveCssVars, resolveGrid, resolveLeafPath, resolveTracks, serializeLayout, setActive, setIconFont, svgToDataUri, swapLeaves, tickledItemStyles, tickledStyles, timelineStyles, toSnapshot, walk, wrapRoot };
|
|
8658
|
+
export { AcTextElement, AcTokenElement, BottomDrawerElement, ButtonElement, Checkbox, ColourPicker, ColourPickerPopup, CrumbNavigationElement, CrumbPathController, CrumbPathElement, DataController, DataDisplayComponent, DataGridElement, DataTableElement, DetailListElement, DockHostElement, DockPanelElement, EditableLabel, EditableNumber, FormElement, FormGroupElement, FormPartElement, GridListElement, GroupedItemListerElement, ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, IxfxHexEditorElement, IxfxIconElement, IxfxTimelineElement, KeyedElementIndex, LIST_ITEM_MOTION_MS, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, LabelledRadialInput, LabelledRangeInput, LabelledSliderInput, LedElement, ListDragSelectController, ListSearchController, ListSelectionController, menu_exports as Menu, MillerBaseElement, MillerListElement, MillerTreeController, NarrowedTextElement, NotificationManager, NotificationPillElement, PanTextElement, PanelElement, PanelGroupElement, PlotDataSeries, PlotHistogram, PlotMultiAxis, PlotSingleAxis, PlotXyAxis, PolarPad, RadialInputElement, RadioGroup, RangeElement, RangeInput, RangeMultiElement, RatingElement, SelectHorizElement, SliderInputElement, SlidingNumberElement, SnackbarElement, SnapContainer, SplitButton, SplitLayoutElement, SplitPanelElement, SwipeElement, TabController, TabListElement, TabListItemElement, TabPanelElement, TabPanelsElement, TextShimmerElement, TickledController, TimelineController, TimelineTrackTabElement, TitlebarElement, ToolbarElement, ToolbarGroupElement, TooltipElement, TransitoryLabelElement, TreeBaseElement, TreeController, TreeDataModel, TreeKeyboardNavController, TreeListElement, TwoSplitLayoutElement, VerticalListElement, XyPad, addPanelToStack, animateListItemIn, animateListItemOut, applyAgeModification, applyHighlights, applySnapshot, attachTimelineInteractions, bottomDrawerCommandId, buildHighlightTargets, buildModel, clearHighlights, collectContainerNames, collectDataResult, collectPanelIds, collectStackPaths, computeColour, computeLeafGeoms, createAcCompletionProvider, createDataListSearchAdapter, createElementIncrSearch, createElementListSearchAdapter, createEmptyLayout, createEmptyStack, createFuzzySearch, createIncrSearch, createPillRenderer, createSplit, createStack, createTreeListAdapter, createTreeListSearchAdapter, createVerticalListAdapter, distribute, extractStack, findNode, findParentOf, findStackOf, findStackPathByName, getActiveDragPanelId, getIcon, getIconEntry, getIconFont, getLeafNeighbours, hasIcon, iconBus, init, insertBeside, isDragging, isMultiMode, isSplit, isStack, keyForElement, listItemFadeKeyframes, listSearchStyles, monitorIndeterminate, moveLeafNodeToEdge, moveLeafStep, normalise, normalize, panelGapIndex, parseColourScaleAttr, parseLayout, pointerOverAnyHost, prefersReducedMotion, readBaseColour, registerFontIcon, registerIcon, registerListSearchCommands, removePanelFromStack, resolveCssVars, resolveGrid, resolveLeafPath, resolveTracks, serializeLayout, setActive, setIconFont, svgToDataUri, swapLeaves, tickledItemStyles, tickledStyles, timelineStyles, toSnapshot, walk, wrapRoot };
|
|
8311
8659
|
|
|
8312
8660
|
//# sourceMappingURL=index.js.map
|