@overdoser/react-toolkit 0.21.0 → 0.22.1
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/AGENTS.md +1 -0
- package/CHANGELOG.md +35 -0
- package/components/Accordion/Accordion.js +48 -48
- package/components/ActionButton/ActionButton.js +23 -23
- package/components/ActionButton/CopyButton.js +5 -5
- package/components/Alert/Alert.js +13 -13
- package/components/Avatar/Avatar.js +12 -12
- package/components/Badge/Badge.js +6 -6
- package/components/Breadcrumbs/Breadcrumbs.js +15 -15
- package/components/Button/Button.js +14 -14
- package/components/Card/Card.js +26 -26
- package/components/Chart/AreaChart.js +103 -103
- package/components/Chart/Axis.js +7 -7
- package/components/Chart/BarChart.js +62 -62
- package/components/Chart/ChartContainer.js +11 -11
- package/components/Chart/ChartLegend.js +7 -7
- package/components/Chart/ChartTooltip.js +13 -13
- package/components/Chart/LineChart.js +88 -88
- package/components/Chart/PieChart.js +25 -25
- package/components/Chart/RadarChart.js +42 -42
- package/components/Chart/Sparkline.js +11 -11
- package/components/Chart/TradingChart.js +126 -126
- package/components/Chart/trading/period.js +3 -3
- package/components/Chip/Chip.js +24 -24
- package/components/CodeBlock/CodeBlock.js +31 -31
- package/components/CommandPalette/CommandPalette.js +166 -166
- package/components/ConfirmDialog/ConfirmDialog.js +60 -60
- package/components/Divider/Divider.js +10 -10
- package/components/Draggable/Draggable.js +29 -29
- package/components/Drawer/Drawer.js +53 -53
- package/components/Dropdown/Dropdown.js +66 -66
- package/components/Dropdown/DropdownItem.js +13 -13
- package/components/Dropdown/DropdownLabel.js +5 -5
- package/components/Dropdown/DropdownSeparator.js +5 -5
- package/components/Dropzone/Dropzone.js +15 -15
- package/components/EmptyState/EmptyState.js +11 -11
- package/components/Form/Form.js +17 -17
- package/components/Form/FormField.js +21 -21
- package/components/Form/FormRow.js +3 -3
- package/components/ImageViewer/ImageViewer.js +118 -118
- package/components/Kbd/Kbd.js +11 -11
- package/components/KeyValueList/KeyValueList.js +32 -32
- package/components/Link/Link.js +7 -7
- package/components/List/List.js +7 -7
- package/components/Loader/Loader.js +39 -39
- package/components/Modal/Modal.js +48 -48
- package/components/PageHeader/PageHeader.js +18 -18
- package/components/Pagination/Pagination.js +23 -23
- package/components/Popover/Popover.js +25 -25
- package/components/ProgressBar/ProgressBar.js +17 -17
- package/components/RelativeTime/RelativeTime.js +10 -10
- package/components/SegmentedControl/SegmentedControl.js +38 -38
- package/components/Skeleton/Skeleton.js +10 -10
- package/components/Spinner/Spinner.js +7 -7
- package/components/SplitButton/SplitButton.js +63 -63
- package/components/SplitPane/SplitPane.js +50 -50
- package/components/StatCard/StatCard.js +32 -32
- package/components/StatusDot/StatusDot.js +7 -7
- package/components/Table/Table.js +174 -174
- package/components/Tabs/Tabs.js +47 -47
- package/components/ThemeToggle/ThemeToggle.js +31 -31
- package/components/Timeline/GanttTimeline.js +213 -213
- package/components/Timeline/HistoryTimeline.js +306 -306
- package/components/Timeline/TimelineShared.js +103 -103
- package/components/Timeline/TraceEventDetails.js +103 -103
- package/components/Timeline/TraceTimeline.js +546 -546
- package/components/Timeline/historyLayout.js +2 -2
- package/components/Timer/Timer.js +39 -39
- package/components/Toast/Toast.js +59 -59
- package/components/ToggleIconButton/ToggleIconButton.js +9 -9
- package/components/Tooltip/Tooltip.js +16 -16
- package/components/Typography/Typography.js +5 -5
- package/components/inputs/Checkbox/Checkbox.js +11 -11
- package/components/inputs/Checkbox/CheckboxGroup.js +21 -21
- package/components/inputs/DatePicker/CalendarPanel.js +113 -113
- package/components/inputs/DatePicker/DatePicker.js +39 -39
- package/components/inputs/DateTimePicker/DateTimePicker.js +119 -119
- package/components/inputs/DateTimePicker/DateTimeSegments.js +40 -40
- package/components/inputs/DateTimePicker/TimeField.js +34 -34
- package/components/inputs/Input/Input.js +13 -13
- package/components/inputs/NumberInput/NumberInput.js +16 -16
- package/components/inputs/Radio/Radio.js +17 -17
- package/components/inputs/SearchInput/SearchInput.js +25 -25
- package/components/inputs/Select/Select.d.ts +55 -3
- package/components/inputs/Select/Select.js +485 -344
- package/components/inputs/Select/{Select.module.js → Select.module.scss.js} +15 -3
- package/components/inputs/Slider/Slider.js +21 -21
- package/components/inputs/Switch/Switch.js +4 -4
- package/components/inputs/Textarea/Textarea.js +8 -8
- package/hooks/usePortalPosition.d.ts +2 -1
- package/hooks/usePortalPosition.js +6 -3
- package/hooks/useResizable.js +1 -1
- package/hooks/useTheme.js +7 -7
- package/index.css +1 -1
- package/index.js +1 -1
- package/index.layered.css +1 -1
- package/llms.txt +25 -4
- package/manifest.json +33 -4
- package/package.json +1 -1
- /package/components/Accordion/{Accordion.module.js → Accordion.module.scss.js} +0 -0
- /package/components/ActionButton/{ActionButton.module.js → ActionButton.module.scss.js} +0 -0
- /package/components/Alert/{Alert.module.js → Alert.module.scss.js} +0 -0
- /package/components/Avatar/{Avatar.module.js → Avatar.module.scss.js} +0 -0
- /package/components/Badge/{Badge.module.js → Badge.module.scss.js} +0 -0
- /package/components/Breadcrumbs/{Breadcrumbs.module.js → Breadcrumbs.module.scss.js} +0 -0
- /package/components/Button/{Button.module.js → Button.module.scss.js} +0 -0
- /package/components/Card/{Card.module.js → Card.module.scss.js} +0 -0
- /package/components/Chart/{Chart.module.js → Chart.module.scss.js} +0 -0
- /package/components/Chip/{Chip.module.js → Chip.module.scss.js} +0 -0
- /package/components/CodeBlock/{CodeBlock.module.js → CodeBlock.module.scss.js} +0 -0
- /package/components/CommandPalette/{CommandPalette.module.js → CommandPalette.module.scss.js} +0 -0
- /package/components/ConfirmDialog/{ConfirmDialog.module.js → ConfirmDialog.module.scss.js} +0 -0
- /package/components/Divider/{Divider.module.js → Divider.module.scss.js} +0 -0
- /package/components/Draggable/{Draggable.module.js → Draggable.module.scss.js} +0 -0
- /package/components/Drawer/{Drawer.module.js → Drawer.module.scss.js} +0 -0
- /package/components/Dropdown/{Dropdown.module.js → Dropdown.module.scss.js} +0 -0
- /package/components/Dropzone/{Dropzone.module.js → Dropzone.module.scss.js} +0 -0
- /package/components/EmptyState/{EmptyState.module.js → EmptyState.module.scss.js} +0 -0
- /package/components/Form/{Form.module.js → Form.module.scss.js} +0 -0
- /package/components/ImageViewer/{ImageViewer.module.js → ImageViewer.module.scss.js} +0 -0
- /package/components/Kbd/{Kbd.module.js → Kbd.module.scss.js} +0 -0
- /package/components/KeyValueList/{KeyValueList.module.js → KeyValueList.module.scss.js} +0 -0
- /package/components/Link/{Link.module.js → Link.module.scss.js} +0 -0
- /package/components/List/{List.module.js → List.module.scss.js} +0 -0
- /package/components/Loader/{Loader.module.js → Loader.module.scss.js} +0 -0
- /package/components/Modal/{Modal.module.js → Modal.module.scss.js} +0 -0
- /package/components/PageHeader/{PageHeader.module.js → PageHeader.module.scss.js} +0 -0
- /package/components/Pagination/{Pagination.module.js → Pagination.module.scss.js} +0 -0
- /package/components/Popover/{Popover.module.js → Popover.module.scss.js} +0 -0
- /package/components/ProgressBar/{ProgressBar.module.js → ProgressBar.module.scss.js} +0 -0
- /package/components/RelativeTime/{RelativeTime.module.js → RelativeTime.module.scss.js} +0 -0
- /package/components/SegmentedControl/{SegmentedControl.module.js → SegmentedControl.module.scss.js} +0 -0
- /package/components/Skeleton/{Skeleton.module.js → Skeleton.module.scss.js} +0 -0
- /package/components/Spinner/{Spinner.module.js → Spinner.module.scss.js} +0 -0
- /package/components/SplitButton/{SplitButton.module.js → SplitButton.module.scss.js} +0 -0
- /package/components/SplitPane/{SplitPane.module.js → SplitPane.module.scss.js} +0 -0
- /package/components/StatCard/{StatCard.module.js → StatCard.module.scss.js} +0 -0
- /package/components/StatusDot/{StatusDot.module.js → StatusDot.module.scss.js} +0 -0
- /package/components/Table/{Table.module.js → Table.module.scss.js} +0 -0
- /package/components/Tabs/{Tabs.module.js → Tabs.module.scss.js} +0 -0
- /package/components/ThemeToggle/{ThemeToggle.module.js → ThemeToggle.module.scss.js} +0 -0
- /package/components/Timeline/{GanttTimeline.module.js → GanttTimeline.module.scss.js} +0 -0
- /package/components/Timeline/{HistoryTimeline.module.js → HistoryTimeline.module.scss.js} +0 -0
- /package/components/Timeline/{Timeline.module.js → Timeline.module.scss.js} +0 -0
- /package/components/Timeline/{TraceTimeline.module.js → TraceTimeline.module.scss.js} +0 -0
- /package/components/Timer/{Timer.module.js → Timer.module.scss.js} +0 -0
- /package/components/Toast/{Toast.module.js → Toast.module.scss.js} +0 -0
- /package/components/ToggleIconButton/{ToggleIconButton.module.js → ToggleIconButton.module.scss.js} +0 -0
- /package/components/Tooltip/{Tooltip.module.js → Tooltip.module.scss.js} +0 -0
- /package/components/Typography/{Typography.module.js → Typography.module.scss.js} +0 -0
- /package/components/inputs/Checkbox/{Checkbox.module.js → Checkbox.module.scss.js} +0 -0
- /package/components/inputs/Checkbox/{CheckboxGroup.module.js → CheckboxGroup.module.scss.js} +0 -0
- /package/components/inputs/DatePicker/{CalendarPanel.module.js → CalendarPanel.module.scss.js} +0 -0
- /package/components/inputs/DatePicker/{DatePicker.module.js → DatePicker.module.scss.js} +0 -0
- /package/components/inputs/DateTimePicker/{DateTimePicker.module.js → DateTimePicker.module.scss.js} +0 -0
- /package/components/inputs/Input/{Input.module.js → Input.module.scss.js} +0 -0
- /package/components/inputs/NumberInput/{NumberInput.module.js → NumberInput.module.scss.js} +0 -0
- /package/components/inputs/Radio/{Radio.module.js → Radio.module.scss.js} +0 -0
- /package/components/inputs/SearchInput/{SearchInput.module.js → SearchInput.module.scss.js} +0 -0
- /package/components/inputs/Slider/{Slider.module.js → Slider.module.scss.js} +0 -0
- /package/components/inputs/Textarea/{Textarea.module.js → Textarea.module.scss.js} +0 -0
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import o from "
|
|
1
|
+
import { useEffect as e, useRef as t, useState as n } from "react";
|
|
2
|
+
import r from "clsx";
|
|
3
|
+
import i from "./Timeline.module.scss.js";
|
|
4
|
+
import { highlightParts as a } from "./timelineCore.js";
|
|
5
|
+
import { Draggable as o } from "../Draggable/Draggable.js";
|
|
6
6
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
// src/components/Timeline/TimelineShared.tsx
|
|
8
|
-
function u({ items:
|
|
9
|
-
return
|
|
10
|
-
className:
|
|
11
|
-
children:
|
|
12
|
-
className:
|
|
8
|
+
function u({ items: e, className: t }) {
|
|
9
|
+
return e.length ? /* @__PURE__ */ c("div", {
|
|
10
|
+
className: r(i.legend, t),
|
|
11
|
+
children: e.map((e) => /* @__PURE__ */ l("span", {
|
|
12
|
+
className: i.legendItem,
|
|
13
13
|
children: [/* @__PURE__ */ c("span", {
|
|
14
|
-
className:
|
|
15
|
-
style: { background:
|
|
16
|
-
}),
|
|
17
|
-
},
|
|
14
|
+
className: i.legendDot,
|
|
15
|
+
style: { background: e.color }
|
|
16
|
+
}), e.name]
|
|
17
|
+
}, e.name))
|
|
18
18
|
}) : null;
|
|
19
19
|
}
|
|
20
|
-
function d({ zoomPct:
|
|
20
|
+
function d({ zoomPct: e, fitActive: t, onZoomIn: n, onZoomOut: a, onFit: o, hint: s, children: u, className: d }) {
|
|
21
21
|
return /* @__PURE__ */ l("div", {
|
|
22
|
-
className:
|
|
22
|
+
className: r(i.controls, d),
|
|
23
23
|
children: [
|
|
24
24
|
u,
|
|
25
25
|
/* @__PURE__ */ c("button", {
|
|
26
26
|
type: "button",
|
|
27
|
-
className:
|
|
27
|
+
className: i.zoomBtn,
|
|
28
28
|
title: "Zoom out",
|
|
29
|
-
onClick:
|
|
29
|
+
onClick: a,
|
|
30
30
|
children: "−"
|
|
31
31
|
}),
|
|
32
32
|
/* @__PURE__ */ c("span", {
|
|
33
|
-
className:
|
|
34
|
-
children:
|
|
33
|
+
className: i.zoomPct,
|
|
34
|
+
children: e
|
|
35
35
|
}),
|
|
36
36
|
/* @__PURE__ */ c("button", {
|
|
37
37
|
type: "button",
|
|
38
|
-
className:
|
|
38
|
+
className: i.zoomBtn,
|
|
39
39
|
title: "Zoom in",
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: n,
|
|
41
41
|
children: "+"
|
|
42
42
|
}),
|
|
43
43
|
/* @__PURE__ */ c("button", {
|
|
44
44
|
type: "button",
|
|
45
|
-
className:
|
|
46
|
-
onClick:
|
|
45
|
+
className: r(i.fitBtn, t && i.fitBtnActive),
|
|
46
|
+
onClick: o,
|
|
47
47
|
children: "Fit"
|
|
48
48
|
}),
|
|
49
49
|
s ? /* @__PURE__ */ c("span", {
|
|
50
|
-
className:
|
|
50
|
+
className: i.controlsHint,
|
|
51
51
|
children: s
|
|
52
52
|
}) : null
|
|
53
53
|
]
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function f({ value:
|
|
56
|
+
function f({ value: e, options: t, onChange: n }) {
|
|
57
57
|
return /* @__PURE__ */ c("div", {
|
|
58
|
-
className:
|
|
59
|
-
children:
|
|
58
|
+
className: i.segmented,
|
|
59
|
+
children: t.map((t) => /* @__PURE__ */ c("button", {
|
|
60
60
|
type: "button",
|
|
61
|
-
title:
|
|
62
|
-
className:
|
|
63
|
-
onClick: () =>
|
|
64
|
-
children:
|
|
65
|
-
},
|
|
61
|
+
title: t.title,
|
|
62
|
+
className: r(i.segmentedBtn, t.value === e && i.segmentedBtnActive),
|
|
63
|
+
onClick: () => n(t.value),
|
|
64
|
+
children: t.label
|
|
65
|
+
}, t.value))
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function p({ panel:
|
|
69
|
-
let p =
|
|
70
|
-
g.current =
|
|
68
|
+
function p({ panel: a, width: o, min: s, max: l, onResize: u, label: d, className: f }) {
|
|
69
|
+
let p = t(null), [m, h] = n(!1), g = t(o);
|
|
70
|
+
g.current = o;
|
|
71
71
|
let _ = (e) => Math.min(l, Math.max(s, e));
|
|
72
|
-
return
|
|
72
|
+
return e(() => {
|
|
73
73
|
if (!m) return;
|
|
74
74
|
let e = (e) => {
|
|
75
|
-
let
|
|
76
|
-
if (!
|
|
77
|
-
let
|
|
78
|
-
u(Math.min(l, Math.max(s,
|
|
79
|
-
},
|
|
75
|
+
let t = p.current;
|
|
76
|
+
if (!t) return;
|
|
77
|
+
let n = e.clientX - t.x;
|
|
78
|
+
u(Math.min(l, Math.max(s, t.w + (a === "left" ? n : -n))));
|
|
79
|
+
}, t = () => {
|
|
80
80
|
p.current = null, h(!1);
|
|
81
81
|
};
|
|
82
|
-
return window.addEventListener("pointermove", e), window.addEventListener("pointerup",
|
|
83
|
-
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup",
|
|
82
|
+
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), () => {
|
|
83
|
+
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t);
|
|
84
84
|
};
|
|
85
85
|
}, [
|
|
86
86
|
m,
|
|
87
|
-
|
|
87
|
+
a,
|
|
88
88
|
s,
|
|
89
89
|
l,
|
|
90
90
|
u
|
|
91
91
|
]), /* @__PURE__ */ c("div", {
|
|
92
|
-
className:
|
|
92
|
+
className: r(i.dockResizer, m && i.dockResizerActive, f),
|
|
93
93
|
role: "separator",
|
|
94
94
|
"aria-orientation": "vertical",
|
|
95
95
|
"aria-label": d,
|
|
@@ -101,13 +101,13 @@ function p({ panel: t, width: n, min: s, max: l, onResize: u, label: d, classNam
|
|
|
101
101
|
}, h(!0));
|
|
102
102
|
},
|
|
103
103
|
onKeyDown: (e) => {
|
|
104
|
-
let
|
|
105
|
-
|
|
104
|
+
let t = e.key === "ArrowLeft" ? -16 : e.key === "ArrowRight" ? 16 : 0;
|
|
105
|
+
t && (e.preventDefault(), u(_(g.current + (a === "left" ? t : -t))));
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function m({ heading:
|
|
110
|
-
let _ =
|
|
109
|
+
function m({ heading: a = "Events", items: u, onPick: d, placement: f = "left", floatingDefaultPosition: m, bubbleGlyphColors: h, className: g }) {
|
|
110
|
+
let _ = t(null), v = t(!1), [y, b] = n(!1), [x, S] = n(!1), [C, w] = n(262), [T, E] = n({
|
|
111
111
|
x: 0,
|
|
112
112
|
y: 0
|
|
113
113
|
}), D = f === "bubble", O = f === "floating", k = O || D && !x, A = f === "top" || f === "bottom", j = -1, M = -1;
|
|
@@ -115,7 +115,7 @@ function m({ heading: t = "Events", items: u, onPick: d, placement: f = "left",
|
|
|
115
115
|
e.inView && (j < 0 && (j = t), M = t);
|
|
116
116
|
});
|
|
117
117
|
let N = j === 0 && M === u.length - 1;
|
|
118
|
-
|
|
118
|
+
e(() => {
|
|
119
119
|
let e = _.current;
|
|
120
120
|
if (!e || v.current || j < 0 || N) return;
|
|
121
121
|
let t = e.querySelectorAll("[data-timeline-summary-row]"), n = t[j], r = t[M];
|
|
@@ -128,19 +128,19 @@ function m({ heading: t = "Events", items: u, onPick: d, placement: f = "left",
|
|
|
128
128
|
N
|
|
129
129
|
]);
|
|
130
130
|
let P = /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("span", { children: [k && /* @__PURE__ */ c("span", {
|
|
131
|
-
className:
|
|
131
|
+
className: i.summaryGrip,
|
|
132
132
|
"aria-hidden": !0,
|
|
133
133
|
children: "⠿"
|
|
134
|
-
}),
|
|
135
|
-
className:
|
|
134
|
+
}), a] }), D ? /* @__PURE__ */ l("span", {
|
|
135
|
+
className: i.summaryHeadTools,
|
|
136
136
|
children: [
|
|
137
137
|
/* @__PURE__ */ c("span", {
|
|
138
|
-
className:
|
|
138
|
+
className: i.summaryCount,
|
|
139
139
|
children: u.length
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ c("button", {
|
|
142
142
|
type: "button",
|
|
143
|
-
className:
|
|
143
|
+
className: i.summaryDockBtn,
|
|
144
144
|
"aria-label": x ? "Undock event summary" : "Dock event summary",
|
|
145
145
|
title: x ? "Float the panel" : "Dock to the left edge",
|
|
146
146
|
onClick: (e) => {
|
|
@@ -154,7 +154,7 @@ function m({ heading: t = "Events", items: u, onPick: d, placement: f = "left",
|
|
|
154
154
|
}),
|
|
155
155
|
/* @__PURE__ */ c("button", {
|
|
156
156
|
type: "button",
|
|
157
|
-
className:
|
|
157
|
+
className: i.summaryCollapse,
|
|
158
158
|
"aria-label": "Collapse event summary",
|
|
159
159
|
onClick: (e) => {
|
|
160
160
|
e.stopPropagation(), b(!1), E({
|
|
@@ -167,10 +167,10 @@ function m({ heading: t = "Events", items: u, onPick: d, placement: f = "left",
|
|
|
167
167
|
})
|
|
168
168
|
]
|
|
169
169
|
}) : /* @__PURE__ */ c("span", {
|
|
170
|
-
className:
|
|
170
|
+
className: i.summaryCount,
|
|
171
171
|
children: u.length
|
|
172
172
|
})] }), F = /* @__PURE__ */ l("div", {
|
|
173
|
-
className:
|
|
173
|
+
className: r(i.summary, A && i.summaryHorizontal, f === "top" && i.summaryTop, f === "bottom" && i.summaryBottom, O && i.summaryFloatingCard, D && i.summaryBubbleCard, D && x && i.summaryDockCard, g),
|
|
174
174
|
onMouseEnter: () => {
|
|
175
175
|
v.current = !0;
|
|
176
176
|
},
|
|
@@ -178,53 +178,53 @@ function m({ heading: t = "Events", items: u, onPick: d, placement: f = "left",
|
|
|
178
178
|
v.current = !1;
|
|
179
179
|
},
|
|
180
180
|
children: [
|
|
181
|
-
k ? /* @__PURE__ */ c(
|
|
182
|
-
className:
|
|
181
|
+
k ? /* @__PURE__ */ c(o.Handle, {
|
|
182
|
+
className: r(i.summaryHeader, i.summaryHandle),
|
|
183
183
|
children: P
|
|
184
184
|
}) : /* @__PURE__ */ c("div", {
|
|
185
|
-
className:
|
|
185
|
+
className: i.summaryHeader,
|
|
186
186
|
children: P
|
|
187
187
|
}),
|
|
188
188
|
/* @__PURE__ */ c("div", {
|
|
189
189
|
ref: _,
|
|
190
|
-
className:
|
|
191
|
-
children: u.map((
|
|
190
|
+
className: r(i.summaryList, A && i.summaryListGrid),
|
|
191
|
+
children: u.map((e) => /* @__PURE__ */ l("div", {
|
|
192
192
|
"data-timeline-summary-row": !0,
|
|
193
193
|
role: "button",
|
|
194
194
|
tabIndex: 0,
|
|
195
|
-
className:
|
|
196
|
-
onClick: () => d(
|
|
197
|
-
onKeyDown: (
|
|
198
|
-
(
|
|
195
|
+
className: r(i.summaryRow, e.inView && i.summaryRowInView, e.selected && i.summaryRowSelected),
|
|
196
|
+
onClick: () => d(e.id),
|
|
197
|
+
onKeyDown: (t) => {
|
|
198
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), d(e.id));
|
|
199
199
|
},
|
|
200
200
|
children: [
|
|
201
201
|
/* @__PURE__ */ c("span", {
|
|
202
|
-
className:
|
|
203
|
-
children:
|
|
202
|
+
className: i.summaryNum,
|
|
203
|
+
children: e.number
|
|
204
204
|
}),
|
|
205
205
|
/* @__PURE__ */ c("span", {
|
|
206
|
-
className:
|
|
207
|
-
style: { background:
|
|
206
|
+
className: i.summaryDot,
|
|
207
|
+
style: { background: e.color }
|
|
208
208
|
}),
|
|
209
209
|
/* @__PURE__ */ c("span", {
|
|
210
|
-
className:
|
|
211
|
-
children:
|
|
210
|
+
className: i.summaryLabel,
|
|
211
|
+
children: e.label
|
|
212
212
|
}),
|
|
213
|
-
|
|
214
|
-
className:
|
|
215
|
-
children:
|
|
213
|
+
e.time && /* @__PURE__ */ c("span", {
|
|
214
|
+
className: i.summaryTime,
|
|
215
|
+
children: e.time
|
|
216
216
|
})
|
|
217
217
|
]
|
|
218
|
-
},
|
|
218
|
+
}, e.id))
|
|
219
219
|
}),
|
|
220
220
|
D && /* @__PURE__ */ c("div", {
|
|
221
|
-
className:
|
|
221
|
+
className: i.summaryFootnote,
|
|
222
222
|
children: "Tinted rows are in the viewport"
|
|
223
223
|
})
|
|
224
224
|
]
|
|
225
225
|
});
|
|
226
226
|
return D ? y ? x ? /* @__PURE__ */ l("div", {
|
|
227
|
-
className:
|
|
227
|
+
className: i.summaryDock,
|
|
228
228
|
style: { flexBasis: C },
|
|
229
229
|
children: [F, /* @__PURE__ */ c(p, {
|
|
230
230
|
panel: "left",
|
|
@@ -233,39 +233,39 @@ function m({ heading: t = "Events", items: u, onPick: d, placement: f = "left",
|
|
|
233
233
|
max: 520,
|
|
234
234
|
onResize: w,
|
|
235
235
|
label: "Resize event summary",
|
|
236
|
-
className:
|
|
236
|
+
className: i.summaryDockResizer
|
|
237
237
|
})]
|
|
238
238
|
}) : /* @__PURE__ */ c("div", {
|
|
239
|
-
className:
|
|
240
|
-
children: /* @__PURE__ */ c(
|
|
241
|
-
className:
|
|
239
|
+
className: i.summaryBubbleAnchor,
|
|
240
|
+
children: /* @__PURE__ */ c(o, {
|
|
241
|
+
className: i.summaryBubblePanel,
|
|
242
242
|
bounds: "viewport",
|
|
243
243
|
position: T,
|
|
244
244
|
onDrag: E,
|
|
245
245
|
children: F
|
|
246
246
|
})
|
|
247
247
|
}) : /* @__PURE__ */ c("div", {
|
|
248
|
-
className:
|
|
248
|
+
className: i.summaryBubbleAnchor,
|
|
249
249
|
children: /* @__PURE__ */ l("button", {
|
|
250
250
|
type: "button",
|
|
251
|
-
className:
|
|
251
|
+
className: r(i.summaryBubble, g),
|
|
252
252
|
title: "Event summary",
|
|
253
253
|
onClick: () => b(!0),
|
|
254
254
|
children: [
|
|
255
255
|
/* @__PURE__ */ c("span", {
|
|
256
|
-
className:
|
|
256
|
+
className: i.summaryBubbleGlyph,
|
|
257
257
|
"aria-hidden": !0,
|
|
258
258
|
children: (h && h.length ? h : ["var(--crk-timeline-accent)"]).slice(0, 3).map((e, t) => /* @__PURE__ */ c("span", { style: { background: e } }, t))
|
|
259
259
|
}),
|
|
260
|
-
|
|
260
|
+
a,
|
|
261
261
|
/* @__PURE__ */ c("span", {
|
|
262
|
-
className:
|
|
262
|
+
className: i.summaryCount,
|
|
263
263
|
children: u.length
|
|
264
264
|
})
|
|
265
265
|
]
|
|
266
266
|
})
|
|
267
|
-
}) : O ? /* @__PURE__ */ c(
|
|
268
|
-
className:
|
|
267
|
+
}) : O ? /* @__PURE__ */ c(o, {
|
|
268
|
+
className: i.summaryFloating,
|
|
269
269
|
bounds: "viewport",
|
|
270
270
|
defaultPosition: m ?? {
|
|
271
271
|
x: 0,
|
|
@@ -274,22 +274,22 @@ function m({ heading: t = "Events", items: u, onPick: d, placement: f = "left",
|
|
|
274
274
|
children: F
|
|
275
275
|
}) : F;
|
|
276
276
|
}
|
|
277
|
-
function h({ x:
|
|
277
|
+
function h({ x: e, y: t, children: n, className: a, style: o }) {
|
|
278
278
|
return /* @__PURE__ */ c("div", {
|
|
279
|
-
className:
|
|
279
|
+
className: r(i.tooltip, a),
|
|
280
280
|
style: {
|
|
281
|
-
left:
|
|
282
|
-
top:
|
|
283
|
-
...
|
|
281
|
+
left: e,
|
|
282
|
+
top: t,
|
|
283
|
+
...o
|
|
284
284
|
},
|
|
285
|
-
children:
|
|
285
|
+
children: n
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
|
-
function g({ text:
|
|
289
|
-
let
|
|
290
|
-
return
|
|
291
|
-
className:
|
|
292
|
-
children:
|
|
293
|
-
},
|
|
288
|
+
function g({ text: e, query: t }) {
|
|
289
|
+
let n = a(e, t);
|
|
290
|
+
return n.length === 1 && !n[0].hit ? /* @__PURE__ */ c(s, { children: n[0].t }) : /* @__PURE__ */ c(s, { children: n.map((e, t) => e.hit ? /* @__PURE__ */ c("span", {
|
|
291
|
+
className: i.mark,
|
|
292
|
+
children: e.t
|
|
293
|
+
}, t) : /* @__PURE__ */ c("span", { children: e.t }, t)) });
|
|
294
294
|
}
|
|
295
295
|
export { g as HighlightText, u as TimelineLegend, p as TimelineResizer, f as TimelineSegmented, m as TimelineSummary, h as TimelineTooltip, d as TimelineZoomControls };
|