@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.
Files changed (161) hide show
  1. package/AGENTS.md +1 -0
  2. package/CHANGELOG.md +35 -0
  3. package/components/Accordion/Accordion.js +48 -48
  4. package/components/ActionButton/ActionButton.js +23 -23
  5. package/components/ActionButton/CopyButton.js +5 -5
  6. package/components/Alert/Alert.js +13 -13
  7. package/components/Avatar/Avatar.js +12 -12
  8. package/components/Badge/Badge.js +6 -6
  9. package/components/Breadcrumbs/Breadcrumbs.js +15 -15
  10. package/components/Button/Button.js +14 -14
  11. package/components/Card/Card.js +26 -26
  12. package/components/Chart/AreaChart.js +103 -103
  13. package/components/Chart/Axis.js +7 -7
  14. package/components/Chart/BarChart.js +62 -62
  15. package/components/Chart/ChartContainer.js +11 -11
  16. package/components/Chart/ChartLegend.js +7 -7
  17. package/components/Chart/ChartTooltip.js +13 -13
  18. package/components/Chart/LineChart.js +88 -88
  19. package/components/Chart/PieChart.js +25 -25
  20. package/components/Chart/RadarChart.js +42 -42
  21. package/components/Chart/Sparkline.js +11 -11
  22. package/components/Chart/TradingChart.js +126 -126
  23. package/components/Chart/trading/period.js +3 -3
  24. package/components/Chip/Chip.js +24 -24
  25. package/components/CodeBlock/CodeBlock.js +31 -31
  26. package/components/CommandPalette/CommandPalette.js +166 -166
  27. package/components/ConfirmDialog/ConfirmDialog.js +60 -60
  28. package/components/Divider/Divider.js +10 -10
  29. package/components/Draggable/Draggable.js +29 -29
  30. package/components/Drawer/Drawer.js +53 -53
  31. package/components/Dropdown/Dropdown.js +66 -66
  32. package/components/Dropdown/DropdownItem.js +13 -13
  33. package/components/Dropdown/DropdownLabel.js +5 -5
  34. package/components/Dropdown/DropdownSeparator.js +5 -5
  35. package/components/Dropzone/Dropzone.js +15 -15
  36. package/components/EmptyState/EmptyState.js +11 -11
  37. package/components/Form/Form.js +17 -17
  38. package/components/Form/FormField.js +21 -21
  39. package/components/Form/FormRow.js +3 -3
  40. package/components/ImageViewer/ImageViewer.js +118 -118
  41. package/components/Kbd/Kbd.js +11 -11
  42. package/components/KeyValueList/KeyValueList.js +32 -32
  43. package/components/Link/Link.js +7 -7
  44. package/components/List/List.js +7 -7
  45. package/components/Loader/Loader.js +39 -39
  46. package/components/Modal/Modal.js +48 -48
  47. package/components/PageHeader/PageHeader.js +18 -18
  48. package/components/Pagination/Pagination.js +23 -23
  49. package/components/Popover/Popover.js +25 -25
  50. package/components/ProgressBar/ProgressBar.js +17 -17
  51. package/components/RelativeTime/RelativeTime.js +10 -10
  52. package/components/SegmentedControl/SegmentedControl.js +38 -38
  53. package/components/Skeleton/Skeleton.js +10 -10
  54. package/components/Spinner/Spinner.js +7 -7
  55. package/components/SplitButton/SplitButton.js +63 -63
  56. package/components/SplitPane/SplitPane.js +50 -50
  57. package/components/StatCard/StatCard.js +32 -32
  58. package/components/StatusDot/StatusDot.js +7 -7
  59. package/components/Table/Table.js +174 -174
  60. package/components/Tabs/Tabs.js +47 -47
  61. package/components/ThemeToggle/ThemeToggle.js +31 -31
  62. package/components/Timeline/GanttTimeline.js +213 -213
  63. package/components/Timeline/HistoryTimeline.js +306 -306
  64. package/components/Timeline/TimelineShared.js +103 -103
  65. package/components/Timeline/TraceEventDetails.js +103 -103
  66. package/components/Timeline/TraceTimeline.js +546 -546
  67. package/components/Timeline/historyLayout.js +2 -2
  68. package/components/Timer/Timer.js +39 -39
  69. package/components/Toast/Toast.js +59 -59
  70. package/components/ToggleIconButton/ToggleIconButton.js +9 -9
  71. package/components/Tooltip/Tooltip.js +16 -16
  72. package/components/Typography/Typography.js +5 -5
  73. package/components/inputs/Checkbox/Checkbox.js +11 -11
  74. package/components/inputs/Checkbox/CheckboxGroup.js +21 -21
  75. package/components/inputs/DatePicker/CalendarPanel.js +113 -113
  76. package/components/inputs/DatePicker/DatePicker.js +39 -39
  77. package/components/inputs/DateTimePicker/DateTimePicker.js +119 -119
  78. package/components/inputs/DateTimePicker/DateTimeSegments.js +40 -40
  79. package/components/inputs/DateTimePicker/TimeField.js +34 -34
  80. package/components/inputs/Input/Input.js +13 -13
  81. package/components/inputs/NumberInput/NumberInput.js +16 -16
  82. package/components/inputs/Radio/Radio.js +17 -17
  83. package/components/inputs/SearchInput/SearchInput.js +25 -25
  84. package/components/inputs/Select/Select.d.ts +55 -3
  85. package/components/inputs/Select/Select.js +485 -344
  86. package/components/inputs/Select/{Select.module.js → Select.module.scss.js} +15 -3
  87. package/components/inputs/Slider/Slider.js +21 -21
  88. package/components/inputs/Switch/Switch.js +4 -4
  89. package/components/inputs/Textarea/Textarea.js +8 -8
  90. package/hooks/usePortalPosition.d.ts +2 -1
  91. package/hooks/usePortalPosition.js +6 -3
  92. package/hooks/useResizable.js +1 -1
  93. package/hooks/useTheme.js +7 -7
  94. package/index.css +1 -1
  95. package/index.js +1 -1
  96. package/index.layered.css +1 -1
  97. package/llms.txt +25 -4
  98. package/manifest.json +33 -4
  99. package/package.json +1 -1
  100. /package/components/Accordion/{Accordion.module.js → Accordion.module.scss.js} +0 -0
  101. /package/components/ActionButton/{ActionButton.module.js → ActionButton.module.scss.js} +0 -0
  102. /package/components/Alert/{Alert.module.js → Alert.module.scss.js} +0 -0
  103. /package/components/Avatar/{Avatar.module.js → Avatar.module.scss.js} +0 -0
  104. /package/components/Badge/{Badge.module.js → Badge.module.scss.js} +0 -0
  105. /package/components/Breadcrumbs/{Breadcrumbs.module.js → Breadcrumbs.module.scss.js} +0 -0
  106. /package/components/Button/{Button.module.js → Button.module.scss.js} +0 -0
  107. /package/components/Card/{Card.module.js → Card.module.scss.js} +0 -0
  108. /package/components/Chart/{Chart.module.js → Chart.module.scss.js} +0 -0
  109. /package/components/Chip/{Chip.module.js → Chip.module.scss.js} +0 -0
  110. /package/components/CodeBlock/{CodeBlock.module.js → CodeBlock.module.scss.js} +0 -0
  111. /package/components/CommandPalette/{CommandPalette.module.js → CommandPalette.module.scss.js} +0 -0
  112. /package/components/ConfirmDialog/{ConfirmDialog.module.js → ConfirmDialog.module.scss.js} +0 -0
  113. /package/components/Divider/{Divider.module.js → Divider.module.scss.js} +0 -0
  114. /package/components/Draggable/{Draggable.module.js → Draggable.module.scss.js} +0 -0
  115. /package/components/Drawer/{Drawer.module.js → Drawer.module.scss.js} +0 -0
  116. /package/components/Dropdown/{Dropdown.module.js → Dropdown.module.scss.js} +0 -0
  117. /package/components/Dropzone/{Dropzone.module.js → Dropzone.module.scss.js} +0 -0
  118. /package/components/EmptyState/{EmptyState.module.js → EmptyState.module.scss.js} +0 -0
  119. /package/components/Form/{Form.module.js → Form.module.scss.js} +0 -0
  120. /package/components/ImageViewer/{ImageViewer.module.js → ImageViewer.module.scss.js} +0 -0
  121. /package/components/Kbd/{Kbd.module.js → Kbd.module.scss.js} +0 -0
  122. /package/components/KeyValueList/{KeyValueList.module.js → KeyValueList.module.scss.js} +0 -0
  123. /package/components/Link/{Link.module.js → Link.module.scss.js} +0 -0
  124. /package/components/List/{List.module.js → List.module.scss.js} +0 -0
  125. /package/components/Loader/{Loader.module.js → Loader.module.scss.js} +0 -0
  126. /package/components/Modal/{Modal.module.js → Modal.module.scss.js} +0 -0
  127. /package/components/PageHeader/{PageHeader.module.js → PageHeader.module.scss.js} +0 -0
  128. /package/components/Pagination/{Pagination.module.js → Pagination.module.scss.js} +0 -0
  129. /package/components/Popover/{Popover.module.js → Popover.module.scss.js} +0 -0
  130. /package/components/ProgressBar/{ProgressBar.module.js → ProgressBar.module.scss.js} +0 -0
  131. /package/components/RelativeTime/{RelativeTime.module.js → RelativeTime.module.scss.js} +0 -0
  132. /package/components/SegmentedControl/{SegmentedControl.module.js → SegmentedControl.module.scss.js} +0 -0
  133. /package/components/Skeleton/{Skeleton.module.js → Skeleton.module.scss.js} +0 -0
  134. /package/components/Spinner/{Spinner.module.js → Spinner.module.scss.js} +0 -0
  135. /package/components/SplitButton/{SplitButton.module.js → SplitButton.module.scss.js} +0 -0
  136. /package/components/SplitPane/{SplitPane.module.js → SplitPane.module.scss.js} +0 -0
  137. /package/components/StatCard/{StatCard.module.js → StatCard.module.scss.js} +0 -0
  138. /package/components/StatusDot/{StatusDot.module.js → StatusDot.module.scss.js} +0 -0
  139. /package/components/Table/{Table.module.js → Table.module.scss.js} +0 -0
  140. /package/components/Tabs/{Tabs.module.js → Tabs.module.scss.js} +0 -0
  141. /package/components/ThemeToggle/{ThemeToggle.module.js → ThemeToggle.module.scss.js} +0 -0
  142. /package/components/Timeline/{GanttTimeline.module.js → GanttTimeline.module.scss.js} +0 -0
  143. /package/components/Timeline/{HistoryTimeline.module.js → HistoryTimeline.module.scss.js} +0 -0
  144. /package/components/Timeline/{Timeline.module.js → Timeline.module.scss.js} +0 -0
  145. /package/components/Timeline/{TraceTimeline.module.js → TraceTimeline.module.scss.js} +0 -0
  146. /package/components/Timer/{Timer.module.js → Timer.module.scss.js} +0 -0
  147. /package/components/Toast/{Toast.module.js → Toast.module.scss.js} +0 -0
  148. /package/components/ToggleIconButton/{ToggleIconButton.module.js → ToggleIconButton.module.scss.js} +0 -0
  149. /package/components/Tooltip/{Tooltip.module.js → Tooltip.module.scss.js} +0 -0
  150. /package/components/Typography/{Typography.module.js → Typography.module.scss.js} +0 -0
  151. /package/components/inputs/Checkbox/{Checkbox.module.js → Checkbox.module.scss.js} +0 -0
  152. /package/components/inputs/Checkbox/{CheckboxGroup.module.js → CheckboxGroup.module.scss.js} +0 -0
  153. /package/components/inputs/DatePicker/{CalendarPanel.module.js → CalendarPanel.module.scss.js} +0 -0
  154. /package/components/inputs/DatePicker/{DatePicker.module.js → DatePicker.module.scss.js} +0 -0
  155. /package/components/inputs/DateTimePicker/{DateTimePicker.module.js → DateTimePicker.module.scss.js} +0 -0
  156. /package/components/inputs/Input/{Input.module.js → Input.module.scss.js} +0 -0
  157. /package/components/inputs/NumberInput/{NumberInput.module.js → NumberInput.module.scss.js} +0 -0
  158. /package/components/inputs/Radio/{Radio.module.js → Radio.module.scss.js} +0 -0
  159. /package/components/inputs/SearchInput/{SearchInput.module.js → SearchInput.module.scss.js} +0 -0
  160. /package/components/inputs/Slider/{Slider.module.js → Slider.module.scss.js} +0 -0
  161. /package/components/inputs/Textarea/{Textarea.module.js → Textarea.module.scss.js} +0 -0
@@ -1,95 +1,95 @@
1
- import e from "./Timeline.module.js";
2
- import { highlightParts as t } from "./timelineCore.js";
3
- import { Draggable as n } from "../Draggable/Draggable.js";
4
- import { useEffect as r, useRef as i, useState as a } from "react";
5
- import o from "clsx";
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: t, className: n }) {
9
- return t.length ? /* @__PURE__ */ c("div", {
10
- className: o(e.legend, n),
11
- children: t.map((t) => /* @__PURE__ */ l("span", {
12
- className: e.legendItem,
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: e.legendDot,
15
- style: { background: t.color }
16
- }), t.name]
17
- }, t.name))
14
+ className: i.legendDot,
15
+ style: { background: e.color }
16
+ }), e.name]
17
+ }, e.name))
18
18
  }) : null;
19
19
  }
20
- function d({ zoomPct: t, fitActive: n, onZoomIn: r, onZoomOut: i, onFit: a, hint: s, children: u, className: d }) {
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: o(e.controls, d),
22
+ className: r(i.controls, d),
23
23
  children: [
24
24
  u,
25
25
  /* @__PURE__ */ c("button", {
26
26
  type: "button",
27
- className: e.zoomBtn,
27
+ className: i.zoomBtn,
28
28
  title: "Zoom out",
29
- onClick: i,
29
+ onClick: a,
30
30
  children: "−"
31
31
  }),
32
32
  /* @__PURE__ */ c("span", {
33
- className: e.zoomPct,
34
- children: t
33
+ className: i.zoomPct,
34
+ children: e
35
35
  }),
36
36
  /* @__PURE__ */ c("button", {
37
37
  type: "button",
38
- className: e.zoomBtn,
38
+ className: i.zoomBtn,
39
39
  title: "Zoom in",
40
- onClick: r,
40
+ onClick: n,
41
41
  children: "+"
42
42
  }),
43
43
  /* @__PURE__ */ c("button", {
44
44
  type: "button",
45
- className: o(e.fitBtn, n && e.fitBtnActive),
46
- onClick: a,
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: e.controlsHint,
50
+ className: i.controlsHint,
51
51
  children: s
52
52
  }) : null
53
53
  ]
54
54
  });
55
55
  }
56
- function f({ value: t, options: n, onChange: r }) {
56
+ function f({ value: e, options: t, onChange: n }) {
57
57
  return /* @__PURE__ */ c("div", {
58
- className: e.segmented,
59
- children: n.map((n) => /* @__PURE__ */ c("button", {
58
+ className: i.segmented,
59
+ children: t.map((t) => /* @__PURE__ */ c("button", {
60
60
  type: "button",
61
- title: n.title,
62
- className: o(e.segmentedBtn, n.value === t && e.segmentedBtnActive),
63
- onClick: () => r(n.value),
64
- children: n.label
65
- }, n.value))
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: t, width: n, min: s, max: l, onResize: u, label: d, className: f }) {
69
- let p = i(null), [m, h] = a(!1), g = i(n);
70
- g.current = n;
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 r(() => {
72
+ return e(() => {
73
73
  if (!m) return;
74
74
  let e = (e) => {
75
- let n = p.current;
76
- if (!n) return;
77
- let r = e.clientX - n.x;
78
- u(Math.min(l, Math.max(s, n.w + (t === "left" ? r : -r))));
79
- }, n = () => {
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", n), () => {
83
- window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", n);
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
- t,
87
+ a,
88
88
  s,
89
89
  l,
90
90
  u
91
91
  ]), /* @__PURE__ */ c("div", {
92
- className: o(e.dockResizer, m && e.dockResizerActive, f),
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 n = e.key === "ArrowLeft" ? -16 : e.key === "ArrowRight" ? 16 : 0;
105
- n && (e.preventDefault(), u(_(g.current + (t === "left" ? n : -n))));
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: t = "Events", items: u, onPick: d, placement: f = "left", floatingDefaultPosition: m, bubbleGlyphColors: h, className: g }) {
110
- let _ = i(null), v = i(!1), [y, b] = a(!1), [x, S] = a(!1), [C, w] = a(262), [T, E] = a({
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
- r(() => {
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: e.summaryGrip,
131
+ className: i.summaryGrip,
132
132
  "aria-hidden": !0,
133
133
  children: "⠿"
134
- }), t] }), D ? /* @__PURE__ */ l("span", {
135
- className: e.summaryHeadTools,
134
+ }), a] }), D ? /* @__PURE__ */ l("span", {
135
+ className: i.summaryHeadTools,
136
136
  children: [
137
137
  /* @__PURE__ */ c("span", {
138
- className: e.summaryCount,
138
+ className: i.summaryCount,
139
139
  children: u.length
140
140
  }),
141
141
  /* @__PURE__ */ c("button", {
142
142
  type: "button",
143
- className: e.summaryDockBtn,
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: e.summaryCollapse,
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: e.summaryCount,
170
+ className: i.summaryCount,
171
171
  children: u.length
172
172
  })] }), F = /* @__PURE__ */ l("div", {
173
- className: o(e.summary, A && e.summaryHorizontal, f === "top" && e.summaryTop, f === "bottom" && e.summaryBottom, O && e.summaryFloatingCard, D && e.summaryBubbleCard, D && x && e.summaryDockCard, g),
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(n.Handle, {
182
- className: o(e.summaryHeader, e.summaryHandle),
181
+ k ? /* @__PURE__ */ c(o.Handle, {
182
+ className: r(i.summaryHeader, i.summaryHandle),
183
183
  children: P
184
184
  }) : /* @__PURE__ */ c("div", {
185
- className: e.summaryHeader,
185
+ className: i.summaryHeader,
186
186
  children: P
187
187
  }),
188
188
  /* @__PURE__ */ c("div", {
189
189
  ref: _,
190
- className: o(e.summaryList, A && e.summaryListGrid),
191
- children: u.map((t) => /* @__PURE__ */ l("div", {
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: o(e.summaryRow, t.inView && e.summaryRowInView, t.selected && e.summaryRowSelected),
196
- onClick: () => d(t.id),
197
- onKeyDown: (e) => {
198
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d(t.id));
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: e.summaryNum,
203
- children: t.number
202
+ className: i.summaryNum,
203
+ children: e.number
204
204
  }),
205
205
  /* @__PURE__ */ c("span", {
206
- className: e.summaryDot,
207
- style: { background: t.color }
206
+ className: i.summaryDot,
207
+ style: { background: e.color }
208
208
  }),
209
209
  /* @__PURE__ */ c("span", {
210
- className: e.summaryLabel,
211
- children: t.label
210
+ className: i.summaryLabel,
211
+ children: e.label
212
212
  }),
213
- t.time && /* @__PURE__ */ c("span", {
214
- className: e.summaryTime,
215
- children: t.time
213
+ e.time && /* @__PURE__ */ c("span", {
214
+ className: i.summaryTime,
215
+ children: e.time
216
216
  })
217
217
  ]
218
- }, t.id))
218
+ }, e.id))
219
219
  }),
220
220
  D && /* @__PURE__ */ c("div", {
221
- className: e.summaryFootnote,
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: e.summaryDock,
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: e.summaryDockResizer
236
+ className: i.summaryDockResizer
237
237
  })]
238
238
  }) : /* @__PURE__ */ c("div", {
239
- className: e.summaryBubbleAnchor,
240
- children: /* @__PURE__ */ c(n, {
241
- className: e.summaryBubblePanel,
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: e.summaryBubbleAnchor,
248
+ className: i.summaryBubbleAnchor,
249
249
  children: /* @__PURE__ */ l("button", {
250
250
  type: "button",
251
- className: o(e.summaryBubble, g),
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: e.summaryBubbleGlyph,
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
- t,
260
+ a,
261
261
  /* @__PURE__ */ c("span", {
262
- className: e.summaryCount,
262
+ className: i.summaryCount,
263
263
  children: u.length
264
264
  })
265
265
  ]
266
266
  })
267
- }) : O ? /* @__PURE__ */ c(n, {
268
- className: e.summaryFloating,
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: t, y: n, children: r, className: i, style: a }) {
277
+ function h({ x: e, y: t, children: n, className: a, style: o }) {
278
278
  return /* @__PURE__ */ c("div", {
279
- className: o(e.tooltip, i),
279
+ className: r(i.tooltip, a),
280
280
  style: {
281
- left: t,
282
- top: n,
283
- ...a
281
+ left: e,
282
+ top: t,
283
+ ...o
284
284
  },
285
- children: r
285
+ children: n
286
286
  });
287
287
  }
288
- function g({ text: n, query: r }) {
289
- let i = t(n, r);
290
- return i.length === 1 && !i[0].hit ? /* @__PURE__ */ c(s, { children: i[0].t }) : /* @__PURE__ */ c(s, { children: i.map((t, n) => t.hit ? /* @__PURE__ */ c("span", {
291
- className: e.mark,
292
- children: t.t
293
- }, n) : /* @__PURE__ */ c("span", { children: t.t }, n)) });
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 };