@slotted/react 0.1.0-beta.4 → 0.1.0-beta.5

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 (183) hide show
  1. package/README.md +16 -1
  2. package/dist/{action-bar-OACchRZw.js → action-bar-ti3e6FK1.js} +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/{app-shell-CmYvnu_7.js → app-shell-nnSP44OO.js} +271 -267
  5. package/dist/app-shell.js +1 -1
  6. package/dist/bin/slotted-agent-docs.mjs +297 -0
  7. package/dist/{cascader-D1AhTyBL.js → cascader-Cn2Acpcv.js} +227 -210
  8. package/dist/cascader.js +1 -1
  9. package/dist/chart-04i6NZQA.js +968 -0
  10. package/dist/chart.js +1 -1
  11. package/dist/{checkbox-DfxFHZaU.js → checkbox-B4Sb1eXj.js} +3 -3
  12. package/dist/{checkbox-group-9sDgrV5Z.js → checkbox-group-LpGMuq9w.js} +2 -2
  13. package/dist/checkbox-group.js +1 -1
  14. package/dist/checkbox.js +1 -1
  15. package/dist/{code-block-CFHf8uTm.js → code-block-CTNiyt0U.js} +1 -1
  16. package/dist/code-block.js +1 -1
  17. package/dist/{color-picker-CwbWzCKg.js → color-picker-BcRCeISx.js} +4 -4
  18. package/dist/color-picker.js +1 -1
  19. package/dist/{column-manager-CTtizVhm.js → column-manager-BtkYLs5G.js} +4 -4
  20. package/dist/column-manager.js +1 -1
  21. package/dist/{combobox-BVMI9lg8.js → combobox-C1D5doWM.js} +227 -198
  22. package/dist/combobox.js +1 -1
  23. package/dist/{context-menu-BuST6W94.js → context-menu-B00UIBVC.js} +1 -1
  24. package/dist/context-menu.js +1 -1
  25. package/dist/{currency-field-DD9A5U3D.js → currency-field-Dti9JFu0.js} +1 -1
  26. package/dist/currency-field.js +1 -1
  27. package/dist/{dashboard-grid-CBMP_-JV.js → dashboard-grid-CoLKLvYL.js} +1 -1
  28. package/dist/dashboard-grid.js +1 -1
  29. package/dist/{data-grid-Eb-a4jg3.js → data-grid-DX95Y7mY.js} +18 -18
  30. package/dist/data-grid.js +1 -1
  31. package/dist/{data-list-oICmxGkA.js → data-list-CWYTPNm-.js} +2 -2
  32. package/dist/data-list.js +1 -1
  33. package/dist/{date-field-Hr-OCU-H.js → date-field-BxEpqAPg.js} +1 -1
  34. package/dist/date-field.js +1 -1
  35. package/dist/date-picker-DRk9SZp1.js +308 -0
  36. package/dist/date-picker.js +1 -1
  37. package/dist/date-range-picker-6Yz7avTS.js +483 -0
  38. package/dist/date-range-picker.js +1 -1
  39. package/dist/{datetime-field-B8TrmsDK.js → datetime-field-D2f9u6im.js} +1 -1
  40. package/dist/datetime-field.js +1 -1
  41. package/dist/datetime-picker-STqSWMkH.js +645 -0
  42. package/dist/datetime-picker.js +1 -1
  43. package/dist/datetime-range-picker-DQNQwr3K.js +1000 -0
  44. package/dist/datetime-range-picker.js +1 -1
  45. package/dist/{detail-panel-CW53lUjp.js → detail-panel-z6WGleP4.js} +1 -1
  46. package/dist/detail-panel.js +1 -1
  47. package/dist/docs/AGENTS.snippet.md +2 -0
  48. package/dist/docs/app-shell.examples.md +1 -1
  49. package/dist/docs/app-shell.json +4 -4
  50. package/dist/docs/app-shell.md +2 -2
  51. package/dist/docs/guidelines/README.md +2 -2
  52. package/dist/docs/guidelines/index.md +1 -1
  53. package/dist/docs/guidelines/own-elements.md +1 -1
  54. package/dist/docs/page-header.json +1 -0
  55. package/dist/docs/page-header.md +1 -1
  56. package/dist/docs/skills/build-own-element/SKILL.md +6 -6
  57. package/dist/docs/skills/compose-screen/SKILL.md +6 -6
  58. package/dist/docs/skills/review-screen/SKILL.md +6 -6
  59. package/dist/docs/skills/theme-app/SKILL.md +1 -1
  60. package/dist/docs/skills/waiting-states/SKILL.md +2 -2
  61. package/dist/docs/tabs.json +13 -3
  62. package/dist/docs/tabs.md +3 -2
  63. package/dist/{entity-picker-Dn1T7JCq.js → entity-picker-BdySwW8F.js} +274 -256
  64. package/dist/entity-picker.js +1 -1
  65. package/dist/{event-calendar-CnF3iIZD.js → event-calendar-CiphPXdV.js} +4 -4
  66. package/dist/event-calendar.js +1 -1
  67. package/dist/{field-NJaCxl2h.js → field-BxQFpOXS.js} +1 -1
  68. package/dist/{field-group-hAzVa2O9.js → field-group-DcN_hiZN.js} +1 -1
  69. package/dist/field-group.js +1 -1
  70. package/dist/field.js +1 -1
  71. package/dist/{filter-bar-CHyy1o--.js → filter-bar-C_dXljI_.js} +10 -10
  72. package/dist/filter-bar.js +1 -1
  73. package/dist/{hover-card-BJE5dtaQ.js → hover-card-DpVzwvDJ.js} +1 -1
  74. package/dist/hover-card.js +1 -1
  75. package/dist/{import-export-center-jF37b909.js → import-export-center-BQnMJz4g.js} +3 -3
  76. package/dist/import-export-center.js +1 -1
  77. package/dist/index.js +63 -63
  78. package/dist/{listbox-Dv856z9I.js → listbox-D0MJcAMm.js} +1 -1
  79. package/dist/listbox.js +1 -1
  80. package/dist/{markdown-CeG8mUbI.js → markdown-IiVoh6yi.js} +2 -2
  81. package/dist/markdown.js +1 -1
  82. package/dist/menu-parts-D6v_mz6O.js +809 -0
  83. package/dist/menu.js +1 -1
  84. package/dist/{menubar-b2CruimJ.js → menubar-DApIg1eR.js} +1 -1
  85. package/dist/menubar.js +1 -1
  86. package/dist/{multi-select-DQ5ds0fX.js → multi-select-B8z6ApgW.js} +286 -257
  87. package/dist/multi-select.js +1 -1
  88. package/dist/{notification-center-C1iWWl5Y.js → notification-center-CGEEHcRA.js} +2 -2
  89. package/dist/notification-center.js +1 -1
  90. package/dist/{number-field-BFIAmv-z.js → number-field-DXk1TAXA.js} +1 -1
  91. package/dist/number-field.js +1 -1
  92. package/dist/{otp-input-BNQhuKaT.js → otp-input-CI-kdNgx.js} +1 -1
  93. package/dist/otp-input.js +1 -1
  94. package/dist/{popover-Be7JWbGJ.js → popover-DEp8Bf3e.js} +186 -166
  95. package/dist/popover.js +1 -1
  96. package/dist/{prompt-composer-BxpdkTpZ.js → prompt-composer-DdcU3S3L.js} +1 -1
  97. package/dist/prompt-composer.js +1 -1
  98. package/dist/{radio-group-BaVIP9UH.js → radio-group-D8csBZ8Z.js} +2 -2
  99. package/dist/radio-group.js +1 -1
  100. package/dist/{rating-DYBQBzwB.js → rating-rI3b5zII.js} +1 -1
  101. package/dist/rating.js +1 -1
  102. package/dist/{saved-views-DlE_--Z9.js → saved-views-B3brBTD9.js} +4 -4
  103. package/dist/saved-views.js +1 -1
  104. package/dist/scroll-area-DQ_ansLu.js +112 -0
  105. package/dist/scroll-area.js +1 -1
  106. package/dist/{segmented-control-DmuOGiu6.js → segmented-control-C-PzkTtg.js} +2 -2
  107. package/dist/segmented-control.js +1 -1
  108. package/dist/{select-M7Io4UL9.js → select-BUylPwpb.js} +241 -203
  109. package/dist/select.js +1 -1
  110. package/dist/{side-navigation-CBLtCzuJ.js → side-navigation-Bm-BZma1.js} +156 -140
  111. package/dist/side-navigation.js +1 -1
  112. package/dist/{slider-DTes4HLF.js → slider-fp7kyg-6.js} +1 -1
  113. package/dist/slider.js +1 -1
  114. package/dist/{split-button-CPgHiy9G.js → split-button-DKRm0j5c.js} +1 -1
  115. package/dist/split-button.js +1 -1
  116. package/dist/styles.css +1 -1
  117. package/dist/{switch-DQzuIhPX.js → switch-aVoc4C2F.js} +1 -1
  118. package/dist/switch.js +1 -1
  119. package/dist/{table-U9eJYCuB.js → table-BYEvFr4P.js} +276 -275
  120. package/dist/table.js +1 -1
  121. package/dist/{tabs-BtHmjlnM.js → tabs-HWmvOKM4.js} +109 -102
  122. package/dist/tabs.js +1 -1
  123. package/dist/{tags-input-CcOkm0AW.js → tags-input-pbv6x1Pi.js} +1 -1
  124. package/dist/tags-input.js +1 -1
  125. package/dist/{text-field-DLfIZ0fk.js → text-field-CbQ6UCAP.js} +1 -1
  126. package/dist/text-field.js +1 -1
  127. package/dist/{textarea-CBJBJBi6.js → textarea-DJSfhrXH.js} +1 -1
  128. package/dist/textarea.js +1 -1
  129. package/dist/{time-field-DrhiCtUl.js → time-field-BI9n607q.js} +1 -1
  130. package/dist/time-field.js +1 -1
  131. package/dist/time-picker-D6SlQWNF.js +402 -0
  132. package/dist/time-picker.js +1 -1
  133. package/dist/time-range-picker-CcV3_45h.js +751 -0
  134. package/dist/time-range-picker.js +1 -1
  135. package/dist/{toggle-group-7iBR9Rn1.js → toggle-group-i7JPO8BM.js} +1 -1
  136. package/dist/toggle-group.js +1 -1
  137. package/dist/{toolbar-DDZpEftQ.js → toolbar-B9knmgHA.js} +1 -1
  138. package/dist/toolbar.js +1 -1
  139. package/dist/tooltip-CgjIROUy.js +410 -0
  140. package/dist/tooltip.js +1 -1
  141. package/dist/{top-navigation-e-tWMGNr.js → top-navigation-DiG2PF5W.js} +2 -2
  142. package/dist/top-navigation.js +1 -1
  143. package/dist/{transfer-CqZOTLMP.js → transfer--UOQVeKE.js} +5 -5
  144. package/dist/transfer.js +1 -1
  145. package/dist/types/app-shell/app-shell-parts.d.ts +6 -4
  146. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  147. package/dist/types/app-shell/app-shell.d.ts.map +1 -1
  148. package/dist/types/cascader/cascader.d.ts.map +1 -1
  149. package/dist/types/chart/chart.d.ts.map +1 -1
  150. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  151. package/dist/types/date-picker/date-picker.d.ts.map +1 -1
  152. package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
  153. package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
  154. package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
  155. package/dist/types/entity-picker/entity-picker-popup.d.ts.map +1 -1
  156. package/dist/types/menu/menu-parts.d.ts.map +1 -1
  157. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  158. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  159. package/dist/types/scroll-area/scroll-area.d.ts.map +1 -1
  160. package/dist/types/select/select-parts.d.ts.map +1 -1
  161. package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
  162. package/dist/types/stat-card/stat-card.types.d.ts +2 -2
  163. package/dist/types/stat-card/stat-card.types.d.ts.map +1 -1
  164. package/dist/types/table/table-content.d.ts.map +1 -1
  165. package/dist/types/tabs/tabs-parts.d.ts +2 -4
  166. package/dist/types/tabs/tabs-parts.d.ts.map +1 -1
  167. package/dist/types/tabs/tabs.d.ts.map +1 -1
  168. package/dist/types/time-picker/time-picker.d.ts.map +1 -1
  169. package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
  170. package/dist/types/tooltip/tooltip-parts.d.ts.map +1 -1
  171. package/dist/{upload-DjnlVR8y.js → upload-CLX5cURk.js} +1 -1
  172. package/dist/upload.js +1 -1
  173. package/package.json +10 -7
  174. package/dist/chart-O0ZhkzJe.js +0 -966
  175. package/dist/date-picker-D3-y2Jxw.js +0 -295
  176. package/dist/date-range-picker-y3b82Wmf.js +0 -471
  177. package/dist/datetime-picker-CIRHVLQp.js +0 -629
  178. package/dist/datetime-range-picker-DM-1m98z.js +0 -994
  179. package/dist/menu-parts-W58pVNUt.js +0 -786
  180. package/dist/scroll-area-BriwmvYY.js +0 -111
  181. package/dist/time-picker-CRQsMJbQ.js +0 -396
  182. package/dist/time-range-picker-DlZJsj1e.js +0 -745
  183. package/dist/tooltip-DbKTPe_i.js +0 -392
@@ -0,0 +1,968 @@
1
+ import { n as e, t } from "./icon-T9Yt4tnm.js";
2
+ import { n, r } from "./i18n-DpW8lqJ1.js";
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ import { createFocusOrigin as i } from "@slotted/core/focus";
7
+ import { createControllable as a } from "@slotted/core/state";
8
+ import { Fragment as o, createContext as s, createElement as c, useCallback as l, useContext as u, useEffect as d, useId as ee, useImperativeHandle as te, useLayoutEffect as ne, useMemo as re, useRef as f, useState as p } from "react";
9
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
10
+ import { collapseState as ie } from "@slotted/core/overflow";
11
+ import { chartMessages as ae } from "@slotted/core/i18n";
12
+ import { getLiveAnnouncer as oe } from "@slotted/core/live-announcer";
13
+ import { FULL_ZOOM as _, TOOLTIP_DOCK_WIDTH as se, cachedChartTheme as ce, categoryIndex as le, chartKeyAction as ue, chartTable as de, chartToCsv as fe, createChartModel as pe, createLatestAnnouncer as me, defaultTrigger as he, describeChart as ge, describePoint as _e, describeZoom as ve, firstPoint as ye, isDrawn as be, isFullZoom as xe, observeChartTheme as Se, placeLayer as Ce, placeTooltip as we, readChartTheme as Te, sameTheme as Ee, seriesOf as v, toggleHidden as De, tooltipContext as Oe, trackModality as ke } from "@slotted/core/chart";
14
+ import { mountChartEngine as Ae, preloadChartEngine as je } from "@slotted/core/chart-echarts";
15
+ //#region src/chart/chart-defaults.tsx
16
+ var y = s({});
17
+ function Me() {
18
+ return u(y);
19
+ }
20
+ function Ne({ children: e, ...t }) {
21
+ let n = Me(), r = { ...n };
22
+ for (let [e, n] of Object.entries(t)) n !== void 0 && (r[e] = n);
23
+ return r.tooltip = {
24
+ ...n.tooltip,
25
+ ...t.tooltip
26
+ }, /* @__PURE__ */ h(y.Provider, {
27
+ value: r,
28
+ children: e
29
+ });
30
+ }
31
+ //#endregion
32
+ //#region src/chart/chart.tsx
33
+ var Pe = Object.freeze([]), Fe = (e, t) => e === t || e !== null && t !== null && e.series === t.series && e.key === t.key, Ie = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Le = (e, t) => e.start === t.start && e.end === t.end, Re = (e) => typeof e == "object" && !!e && Object.getPrototypeOf(e) === Object.prototype;
34
+ function b(e, t) {
35
+ if (Object.is(e, t)) return !0;
36
+ if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) => b(e, t[n]));
37
+ if (!Re(e) || !Re(t)) return !1;
38
+ let n = Object.keys(e);
39
+ return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) && b(e[n], t[n]));
40
+ }
41
+ function ze(e) {
42
+ let t = f(e);
43
+ return b(t.current, e) || (t.current = e), t.current;
44
+ }
45
+ function x(e, t, n, r) {
46
+ let [i, o] = p(t), s = e === void 0 ? i : e, c = f({
47
+ controlled: e,
48
+ value: s,
49
+ onChange: n
50
+ });
51
+ return c.current = {
52
+ controlled: e,
53
+ value: s,
54
+ onChange: n
55
+ }, [s, l((e, t, n) => {
56
+ let i = c.current;
57
+ a({
58
+ controlled: i.controlled,
59
+ initial: i.value,
60
+ equals: r,
61
+ onRequest: (e) => i.onChange?.(e.value, e)
62
+ }).request(e, t, n) && o(e);
63
+ }, [r])];
64
+ }
65
+ var Be = {
66
+ crosshair: null,
67
+ markers: [],
68
+ tooltip: null,
69
+ docked: !1
70
+ };
71
+ function Ve(e) {
72
+ try {
73
+ return e.matches(":focus-visible");
74
+ } catch {
75
+ return !1;
76
+ }
77
+ }
78
+ function He(e) {
79
+ for (let t = e.length - 1; t >= 0; --t) if (e[t] !== null) return t;
80
+ return -1;
81
+ }
82
+ function Ue(e) {
83
+ return e.type === "slot" ? { "data-slot": String(e.slot) } : e.type === "tone" ? { "data-tone": e.tone } : { "data-overflow": "" };
84
+ }
85
+ function We(e) {
86
+ return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, `${t}px`]));
87
+ }
88
+ function Ge(e, t = !0) {
89
+ let n = f(null), r = f(null), [i, a] = p(!1), o = (i) => {
90
+ let o = i.newState === "open";
91
+ a(o);
92
+ let s = r.current, c = n.current;
93
+ if (s && c) {
94
+ if (o) {
95
+ let n = s.getBoundingClientRect(), r = Ce({
96
+ anchor: c.getBoundingClientRect(),
97
+ size: {
98
+ width: n.width,
99
+ height: n.height
100
+ },
101
+ viewport: {
102
+ width: window.innerWidth,
103
+ height: window.innerHeight
104
+ },
105
+ align: e,
106
+ dir: getComputedStyle(c).direction === "rtl" ? "rtl" : "ltr"
107
+ });
108
+ s.style.setProperty("--slotted-chart-x", `${r.x}px`), s.style.setProperty("--slotted-chart-y", `${r.y}px`), t && s.querySelector("button")?.focus();
109
+ } else (s.contains(document.activeElement) || document.activeElement === document.body) && c.focus();
110
+ }
111
+ }, s = (e) => {
112
+ let t = [...e.currentTarget.querySelectorAll("button")].filter((e) => !e.hidden), n = t.indexOf(document.activeElement), r = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0, i;
113
+ r && (i = t[(n + r + t.length) % t.length]), e.key === "Home" && (i = t[0]), e.key === "End" && (i = t[t.length - 1]), i && (e.preventDefault(), i.focus());
114
+ };
115
+ return {
116
+ open: i,
117
+ close: () => r.current?.hidePopover?.(),
118
+ controlProps: {
119
+ ref: n,
120
+ "aria-expanded": i,
121
+ ...i ? { "data-open": "" } : {},
122
+ onClick: () => r.current?.togglePopover?.()
123
+ },
124
+ layerProps: {
125
+ ref: r,
126
+ popover: "auto",
127
+ onToggle: o,
128
+ onKeyDown: s
129
+ }
130
+ };
131
+ }
132
+ function S() {
133
+ let e = f(null), t = f(null);
134
+ return d(() => {
135
+ if (!e.current) return;
136
+ let n = ke(e.current);
137
+ return t.current = n, () => n.destroy();
138
+ }, []), [e, () => t.current?.read() ?? "programmatic"];
139
+ }
140
+ function Ke(e, t) {
141
+ typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
142
+ }
143
+ function qe({ context: e, model: t, totalLabel: n, indicator: r }) {
144
+ return /* @__PURE__ */ g(m, { children: [
145
+ /* @__PURE__ */ h("div", {
146
+ "data-part": "tooltip-title",
147
+ children: e.title
148
+ }),
149
+ e.notes.map((e) => /* @__PURE__ */ h("div", {
150
+ "data-part": "tooltip-note",
151
+ children: e
152
+ }, e)),
153
+ e.items.map((n) => {
154
+ let i = v(t, n.series), a = r === "line" || n.kind === "line" ? "line" : n.kind === "scatter" ? "scatter" : "bar";
155
+ return /* @__PURE__ */ c("div", {
156
+ "data-part": "tooltip-item",
157
+ ...e.items.length > 1 && n.current ? { "data-current": "" } : {},
158
+ ...Ue(n.color),
159
+ key: `${n.series}-${n.label}`
160
+ }, r === "none" ? null : /* @__PURE__ */ h("span", {
161
+ "data-kind": a,
162
+ "data-part": "tooltip-marker",
163
+ ...i && i.stroke !== "solid" ? { "data-stroke": i.stroke } : {}
164
+ }), /* @__PURE__ */ h("span", {
165
+ "data-part": "tooltip-label",
166
+ children: n.label
167
+ }), /* @__PURE__ */ h("span", {
168
+ "data-part": "tooltip-value",
169
+ children: n.share ? `${n.share} · ${n.formatted}` : n.formatted
170
+ }));
171
+ }),
172
+ e.total ? /* @__PURE__ */ g("div", {
173
+ "data-part": "tooltip-total",
174
+ children: [/* @__PURE__ */ h("span", { children: n }), /* @__PURE__ */ h("span", {
175
+ "data-part": "tooltip-value",
176
+ children: e.total.formatted
177
+ })]
178
+ }) : null
179
+ ] });
180
+ }
181
+ function C(a) {
182
+ let { data: s, series: u, x: Ce, y: ke, orientation: je, stackMode: y, annotations: Ne, recordKey: Re, locale: b, title: S, description: C, help: w, actions: et, messages: tt, size: nt, variant: rt, palette: it, toolbar: at, grid: ot, texture: st, renderer: ct, sampling: lt, animate: ut, legend: dt, legendInteractive: ft, legendValues: pt, legendOverflow: mt, trigger: ht, tooltip: gt, zoomable: _t, selectable: vt, loading: yt, error: bt, onRetry: xt, hidden: St, defaultHidden: Ct, onHiddenChange: wt, activePoint: Tt, defaultActivePoint: Et, onActivePointChange: Dt, selection: Ot, defaultSelection: kt, onSelectionChange: At, zoom: jt, defaultZoom: Mt, onZoomChange: Nt, tableOpen: Pt, defaultTableOpen: Ft, onTableOpenChange: It, fullscreen: Lt, defaultFullscreen: Rt, onFullscreenChange: zt, renderTooltip: Bt, renderLegendItem: Vt, renderCenter: Ht, renderEmpty: Ut, renderError: Wt, render: Gt, extendOption: Kt, handleRef: qt, ref: Jt, ...Yt } = a, T = Me(), E = ee(), D = r(ae, tt), Xt = n(), O = {
183
+ size: nt ?? T.size ?? "md",
184
+ variant: rt ?? T.variant ?? "plain",
185
+ palette: it ?? T.palette ?? "categorical",
186
+ toolbar: at ?? T.toolbar ?? "visible",
187
+ renderer: ct ?? T.renderer ?? "auto",
188
+ grid: ot ?? T.grid,
189
+ legendOverflow: mt ?? T.legendOverflow ?? "collapse",
190
+ animate: ut ?? T.animate ?? !0,
191
+ tooltip: {
192
+ ...T.tooltip,
193
+ ...gt
194
+ }
195
+ }, [Zt, Qt] = x(St, Ct ?? Pe, wt, Ie), [k, A] = x(Tt, Et ?? null, Dt, Fe), [j, $t] = x(Ot, kt ?? null, At, Fe), [M, N] = x(jt, Mt ?? _, Nt, Le), [P, en] = x(Pt, Ft ?? !1, It, Object.is), [F, tn] = x(Lt, Rt ?? !1, zt, Object.is), nn = ze(u), rn = ze(Ce), an = ze(ke), on = ze(Ne), I = re(() => ({
196
+ data: s,
197
+ series: nn,
198
+ x: rn,
199
+ y: an,
200
+ orientation: je,
201
+ stackMode: y,
202
+ annotations: on,
203
+ recordKey: Re,
204
+ locale: b ?? Xt
205
+ }), [
206
+ s,
207
+ nn,
208
+ rn,
209
+ an,
210
+ je,
211
+ y,
212
+ on,
213
+ Re,
214
+ b,
215
+ Xt
216
+ ]), sn = re(() => {
217
+ try {
218
+ return {
219
+ model: pe(I, { hidden: Zt }),
220
+ failure: null
221
+ };
222
+ } catch (e) {
223
+ return {
224
+ model: null,
225
+ failure: e
226
+ };
227
+ }
228
+ }, [I, Zt]), L = sn.model, [cn, ln] = p(null), R = !!bt || sn.failure !== null || cn !== null, z = !!yt, B = !(!L || z || R || L.empty), V = !(!L || z || R || L.empty === "no-data"), H = L ? ht ?? he(L) : "none", U = f(null), W = f(null), un = f(null), dn = f(null), fn = f(null), G = f(null), [pn, mn] = p(null), [K, hn] = p(Be), gn = re(() => me((e) => oe().announce(e)), []), _n = (e) => oe().announce(e);
229
+ d(() => {
230
+ let e = W.current;
231
+ if (!e) return;
232
+ let t = e.ownerDocument.defaultView, n = (e) => mn((t) => Ee(t, e) ? t : e), r = () => n(Te(e)), i = ce(e), a = 0;
233
+ i ? n(i) : t && (a = t.requestAnimationFrame(() => {
234
+ a = 0, r();
235
+ }));
236
+ let o = Se(e, r);
237
+ return () => {
238
+ o(), a && t?.cancelAnimationFrame(a);
239
+ };
240
+ }, [
241
+ O.palette,
242
+ O.variant,
243
+ F
244
+ ]);
245
+ let q = f({
246
+ onPointer: () => {},
247
+ onPress: () => {},
248
+ onZoom: () => {},
249
+ onRender: () => {}
250
+ });
251
+ d(() => {
252
+ let e = un.current;
253
+ if (!e) return;
254
+ let t = Ae(e, {
255
+ onPointer: (e, t) => q.current.onPointer(e, t),
256
+ onPress: (e, t) => q.current.onPress(e, t),
257
+ onZoom: (e, t) => q.current.onZoom(e, t),
258
+ onRender: () => q.current.onRender(),
259
+ onError: (e) => ln(e)
260
+ });
261
+ return G.current = t, () => {
262
+ t.dispose(), G.current = null;
263
+ };
264
+ }, []), d(() => {
265
+ G.current && pn && L && B && G.current.update({
266
+ model: L,
267
+ theme: pn,
268
+ selection: j,
269
+ zoom: M,
270
+ zoomable: !!_t,
271
+ grid: O.grid,
272
+ texture: !!st,
273
+ renderer: O.renderer,
274
+ sampling: lt,
275
+ trigger: H,
276
+ animate: O.animate,
277
+ extendOption: Kt
278
+ });
279
+ }, [
280
+ L,
281
+ pn,
282
+ B,
283
+ j,
284
+ M,
285
+ _t,
286
+ O.grid,
287
+ st,
288
+ O.renderer,
289
+ lt,
290
+ H,
291
+ O.animate,
292
+ Kt
293
+ ]);
294
+ let vn = () => {
295
+ let e = G.current, t = W.current;
296
+ if (!e || !t || !L || !B || P) {
297
+ hn(Be);
298
+ return;
299
+ }
300
+ let n = [];
301
+ if (j && be(L, j) && L.shape === "cartesian") {
302
+ let t = v(L, j.series), r = e.locate(j);
303
+ t && t.kind !== "bar" && r && n.push({
304
+ key: `selected-${t.id}`,
305
+ color: t.color,
306
+ at: r,
307
+ selected: !0,
308
+ current: !1
309
+ });
310
+ }
311
+ L.shape === "pie" && e.emphasize(k && be(L, k) ? k.key : null);
312
+ let r = k && be(L, k) ? e.locate(k) : null;
313
+ if (!k || !r) {
314
+ hn({
315
+ crosshair: null,
316
+ markers: n,
317
+ tooltip: null,
318
+ docked: !1
319
+ });
320
+ return;
321
+ }
322
+ let i = L.series.some((e) => e.visible && e.kind === "bar"), a = L.shape === "cartesian" && H === "axis" ? {
323
+ ...r,
324
+ isBand: i && L.xType === "category"
325
+ } : null;
326
+ if (L.shape === "cartesian") {
327
+ let t = le(L, k.key), r = H === "axis" ? L.series.filter((e) => e.visible && e.kind !== "bar" && e.values[t] !== null) : [v(L, k.series)].filter((e) => !!(e && e.kind !== "bar"));
328
+ for (let t of r) {
329
+ let r = e.locate({
330
+ series: t.id,
331
+ key: k.key
332
+ });
333
+ r && n.push({
334
+ key: t.id,
335
+ color: t.color,
336
+ at: r,
337
+ selected: !1,
338
+ current: t.id === k.series
339
+ });
340
+ }
341
+ }
342
+ let o = H === "none" ? null : Oe(L, k, {
343
+ trigger: H,
344
+ sort: O.tooltip.sort,
345
+ total: O.tooltip.total
346
+ });
347
+ hn({
348
+ crosshair: a,
349
+ markers: n,
350
+ tooltip: o,
351
+ docked: t.clientWidth < se
352
+ });
353
+ };
354
+ ne(() => {
355
+ vn();
356
+ }, [
357
+ k,
358
+ j,
359
+ L,
360
+ B,
361
+ P,
362
+ H
363
+ ]);
364
+ let J = f(!1);
365
+ ne(() => {
366
+ let e = dn.current, t = W.current;
367
+ if (!e || !t) return;
368
+ if (!K.tooltip || !k) {
369
+ J.current = !1;
370
+ return;
371
+ }
372
+ let n = G.current?.locate(k);
373
+ if (!n) return;
374
+ J.current || (e.style.transition = "none");
375
+ let r = we({
376
+ anchor: {
377
+ x: n.x,
378
+ y: n.y
379
+ },
380
+ size: {
381
+ width: e.offsetWidth,
382
+ height: e.offsetHeight
383
+ },
384
+ bounds: {
385
+ width: t.clientWidth,
386
+ height: t.clientHeight
387
+ },
388
+ dir: U.current && getComputedStyle(U.current).direction === "rtl" ? "rtl" : "ltr"
389
+ });
390
+ e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`), J.current || requestAnimationFrame(() => e.style.transition = ""), J.current = !0;
391
+ }, [K, k]), q.current = {
392
+ onPointer: (e, t) => {
393
+ e ? A(e, "pointer", t) : document.activeElement !== W.current && A(null, "pointer", t);
394
+ },
395
+ onPress: (e, t) => {
396
+ vt && e && $t(Fe(j, e) ? null : e, "pointer", t);
397
+ },
398
+ onZoom: (e, t) => N(e, "pointer", t),
399
+ onRender: () => vn()
400
+ };
401
+ let yn = (e) => {
402
+ if (!L || !B || P) return;
403
+ let t = ue(L, {
404
+ active: k,
405
+ selection: j,
406
+ zoom: M,
407
+ zoomable: !!_t,
408
+ selectable: !!vt
409
+ }, e.key);
410
+ if (t !== null) {
411
+ e.preventDefault();
412
+ for (let n of t) n.type === "active" ? (A(n.point, n.reason, e.nativeEvent), n.point ? gn.say(_e(L, n.point, j, D)) : gn.cancel()) : n.type === "select" ? ($t(n.point, "keyboard", e.nativeEvent), n.point && gn.say(_e(L, n.point, n.point, D))) : (N(n.zoom, n.reason, e.nativeEvent), _n(ve(L, n.zoom, D)));
413
+ }
414
+ }, bn = l((e) => e === null ? void 0 : i(e).destroy, []), xn = (e) => {
415
+ if (!L || !B || P || k || !Ve(e.currentTarget)) return;
416
+ let t = ye(L);
417
+ t && (A(t, "keyboard", e.nativeEvent), gn.say(_e(L, t, j, D)));
418
+ }, Sn = (e, t) => {
419
+ let n = !F;
420
+ tn(n, e, t);
421
+ let r = U.current;
422
+ r && (n && Lt === void 0 && document.fullscreenEnabled && e !== "programmatic" && r.requestFullscreen?.().catch(() => {}), !n && document.fullscreenElement === r && document.exitFullscreen().catch(() => {}));
423
+ };
424
+ d(() => {
425
+ let e = U.current;
426
+ if (!e) return;
427
+ let t = !1, n = () => {
428
+ document.fullscreenElement === e ? t = !0 : t && (t = !1, Cn.current(!1, "escape"));
429
+ };
430
+ return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
431
+ }, []);
432
+ let Cn = f(tn);
433
+ Cn.current = tn, d(() => {
434
+ let e = U.current;
435
+ !F && e && document.fullscreenElement === e && document.exitFullscreen().catch(() => {});
436
+ }, [F]);
437
+ let wn = (e) => {
438
+ Yt.onKeyDown?.(e), !e.defaultPrevented && e.key === "Escape" && F && (e.preventDefault(), Sn("escape", e.nativeEvent));
439
+ }, [Y, Tn] = p([]), En = f(/* @__PURE__ */ new Map()), [Dn, On] = p(null), kn = ft ?? !0, X = L?.legend ?? [], An = () => {
440
+ let e = fn.current;
441
+ if (!e || !L) return;
442
+ if (O.legendOverflow === "wrap") {
443
+ Tn((e) => e.length ? [] : e);
444
+ return;
445
+ }
446
+ let t = [...e.querySelectorAll(":scope > [data-part=\"legend-item\"]")];
447
+ for (let e of t) e.hidden || En.current.set(e.dataset.key ?? "", e.getBoundingClientRect().width);
448
+ let n = Number.parseFloat(getComputedStyle(e).columnGap) || 0, r = e.querySelector(":scope > [data-part=\"legend-more\"]"), i = r && !r.hidden ? r.getBoundingClientRect().width : 40, a = ie({
449
+ units: X.map((e) => ({
450
+ size: En.current.get(e.key) ?? 0,
451
+ collapsible: !0
452
+ })),
453
+ available: e.clientWidth,
454
+ gap: n,
455
+ triggerSize: i
456
+ });
457
+ Tn((e) => e.length === a.collapsed.length && e.every((e, t) => e === a.collapsed[t]) ? e : a.collapsed);
458
+ };
459
+ ne(() => {
460
+ An();
461
+ }, [
462
+ X,
463
+ O.legendOverflow,
464
+ pt,
465
+ k
466
+ ]), d(() => {
467
+ let e = fn.current;
468
+ if (!e || typeof ResizeObserver > "u") return;
469
+ let t = new ResizeObserver(() => jn.current());
470
+ return t.observe(e), () => t.disconnect();
471
+ }, []);
472
+ let jn = f(An);
473
+ jn.current = An;
474
+ let Mn = (e, t, n, r) => {
475
+ let i = X.map((e) => e.key), a = De(i, Zt, e.key, t);
476
+ On(e.key), Qt(a, n, r), _n(D(a.includes(e.key) ? "hidden" : "shown", { series: e.label }));
477
+ }, Z = k && L && be(L, k) ? k.key : null, Nn = (e) => {
478
+ if (!L) return "";
479
+ let t = L.shape === "pie" ? L.series[0] : v(L, e.key);
480
+ if (!t) return "";
481
+ let n = L.shape === "pie" ? le(L, e.key) : Z ? le(L, Z) : He(t.values), r = n >= 0 ? t.values[n] : null;
482
+ return r == null ? "" : t.format(r);
483
+ }, Pn = Ge("start"), Fn = X.filter((e, t) => !Y.includes(t)).map((e) => e.key), In = Dn && Fn.includes(Dn) ? Dn : Fn[0] ?? null, Ln = (e, t, n) => {
484
+ let r = L?.shape === "pie" ? L.series[0] : L ? v(L, e.key) : void 0, i = L?.shape === "pie" ? e.key === Z : k?.series === e.key && Z !== null, a = !n && Y.includes(t), s = /* @__PURE__ */ g(m, { children: [
485
+ /* @__PURE__ */ h("span", {
486
+ "data-kind": e.kind === "area" || e.kind === "bar" || e.kind === "pie" ? "bar" : e.kind,
487
+ "data-part": "legend-marker",
488
+ ...r && r.stroke !== "solid" ? { "data-stroke": r.stroke } : {}
489
+ }),
490
+ /* @__PURE__ */ h("span", {
491
+ "data-part": "legend-label",
492
+ title: e.label,
493
+ children: e.label
494
+ }),
495
+ pt ? /* @__PURE__ */ h("span", {
496
+ "data-part": "legend-value",
497
+ children: Nn(e)
498
+ }) : null
499
+ ] }), l = {
500
+ "data-part": "legend-item",
501
+ "data-key": e.key,
502
+ ...Ue(e.color),
503
+ ...i ? { "data-current": "" } : {},
504
+ hidden: a,
505
+ onPointerEnter: () => e.visible && G.current?.emphasize(e.key),
506
+ onPointerLeave: () => G.current?.emphasize(null)
507
+ }, u = kn ? /* @__PURE__ */ c(Je, {
508
+ ...l,
509
+ entry: e,
510
+ focused: n || In === e.key,
511
+ key: `${n ? "layer" : "row"}-${e.key}`,
512
+ onActivate: (t, n, r) => Mn(e, t, n, r),
513
+ onFocusEntry: () => {
514
+ n || On(e.key), e.visible && G.current?.emphasize(e.key);
515
+ },
516
+ onBlurEntry: () => G.current?.emphasize(null)
517
+ }, s) : /* @__PURE__ */ c("span", {
518
+ ...l,
519
+ key: `${n ? "layer" : "row"}-${e.key}`,
520
+ role: "listitem"
521
+ }, s);
522
+ return Vt ? /* @__PURE__ */ h(o, { children: Vt(e, l, u) }, `${n ? "layer" : "row"}-${e.key}`) : u;
523
+ }, Rn = (e) => {
524
+ let t = e.target;
525
+ if (t.closest("[data-part=\"menu\"]")) return;
526
+ let n = [...e.currentTarget.querySelectorAll(":scope > button:not([hidden])")], r = n.indexOf(t);
527
+ if (r === -1) return;
528
+ let i = U.current ? getComputedStyle(U.current).direction === "rtl" : !1, a = e.key === "ArrowRight" ? i ? -1 : 1 : e.key === "ArrowLeft" ? i ? 1 : -1 : 0, o;
529
+ a && (o = n[(r + a + n.length) % n.length]), e.key === "Home" && (o = n[0]), e.key === "End" && (o = n[n.length - 1]), o && (e.preventDefault(), On(o.dataset.key ?? "__more"), o.focus());
530
+ }, Q = Ge("end"), zn = Ge("start", !1), Bn = (e, t) => {
531
+ let n = document.createElement("a");
532
+ n.href = t, n.download = e, document.body.append(n), n.click(), n.remove();
533
+ }, Vn = typeof S == "string" ? S : "chart";
534
+ te(qt, () => ({
535
+ focus: () => W.current?.focus(),
536
+ resetZoom: () => N(_, "programmatic"),
537
+ toDataURL: () => G.current?.toDataURL() ?? null,
538
+ toCsv: () => L ? fe(L, D) : ""
539
+ }), [
540
+ L,
541
+ D,
542
+ N
543
+ ]);
544
+ let Hn = z ? D("loading") : R ? D("error") : L ? ge(L, D) : "", Un = `${E}-title`, Wn = `${E}-description`, Gn = `${E}-summary`, Kn = I.series.some((e) => e.kind === "pie") ? "pie" : I.series.every((e) => e.kind === "line" || e.kind === "area") ? "line" : "bar", $ = P && V && L ? de(L, D) : null, qn = () => {
545
+ ln(null), xt?.();
546
+ }, Jn = S !== void 0 || C !== void 0 || et !== void 0 || O.toolbar !== "none" ? /* @__PURE__ */ g("figcaption", {
547
+ "data-part": "header",
548
+ children: [
549
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", { children: [S === void 0 ? null : /* @__PURE__ */ h("span", {
550
+ "data-part": "title",
551
+ id: Un,
552
+ children: S
553
+ }), w === void 0 ? null : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
554
+ ...zn.controlProps,
555
+ "aria-controls": `${E}-help`,
556
+ "aria-label": D("help"),
557
+ "data-part": "help",
558
+ type: "button",
559
+ children: /* @__PURE__ */ h(t, { children: /* @__PURE__ */ h(e, { name: "circle-info" }) })
560
+ }), /* @__PURE__ */ h("div", {
561
+ ...zn.layerProps,
562
+ "data-part": "help-content",
563
+ id: `${E}-help`,
564
+ role: "note",
565
+ children: w
566
+ })] })] }), C === void 0 ? null : /* @__PURE__ */ h("span", {
567
+ "data-part": "description",
568
+ id: Wn,
569
+ children: C
570
+ })] }),
571
+ et === void 0 ? null : /* @__PURE__ */ h("div", {
572
+ "data-part": "actions",
573
+ children: et
574
+ }),
575
+ O.toolbar === "none" ? null : /* @__PURE__ */ g("div", {
576
+ "aria-hidden": !V || void 0,
577
+ "aria-label": V ? D("toolbar") : void 0,
578
+ "data-part": "toolbar",
579
+ "data-waiting": V ? void 0 : "",
580
+ inert: !V,
581
+ role: V ? "toolbar" : void 0,
582
+ children: [
583
+ L && _t && !xe(M) && L.shape === "cartesian" ? /* @__PURE__ */ h(Ye, {
584
+ label: D("resetZoom"),
585
+ onPress: (e, t) => {
586
+ N(_, "clear", t), _n(ve(L, _, D)), W.current?.focus();
587
+ },
588
+ glyph: "rotate-ccw",
589
+ part: "zoom-reset"
590
+ }) : null,
591
+ /* @__PURE__ */ h(Ye, {
592
+ label: D("tableView"),
593
+ onPress: (e, t) => en(!P, e, t),
594
+ glyph: "file-spreadsheet",
595
+ part: "view-toggle",
596
+ pressed: P
597
+ }),
598
+ /* @__PURE__ */ h(Ye, {
599
+ label: D(F ? "exitFullscreen" : "fullscreen"),
600
+ glyph: F ? "minimize" : "maximize",
601
+ onPress: (e, t) => Sn(e, t),
602
+ part: "fullscreen-toggle"
603
+ }),
604
+ /* @__PURE__ */ h("button", {
605
+ ...Q.controlProps,
606
+ "aria-haspopup": "menu",
607
+ "aria-label": D("more"),
608
+ "data-part": "menu-trigger",
609
+ title: D("more"),
610
+ type: "button",
611
+ children: /* @__PURE__ */ h(t, { children: /* @__PURE__ */ h(e, { name: "ellipsis" }) })
612
+ }),
613
+ /* @__PURE__ */ g("div", {
614
+ ...Q.layerProps,
615
+ "aria-label": D("more"),
616
+ "data-part": "menu",
617
+ role: "menu",
618
+ children: [
619
+ /* @__PURE__ */ h(Xe, {
620
+ action: "view",
621
+ label: D("tableView"),
622
+ onPress: (e, t) => {
623
+ Q.close(), en(!P, e, t);
624
+ }
625
+ }),
626
+ /* @__PURE__ */ h(Xe, {
627
+ action: "fullscreen",
628
+ label: D(F ? "exitFullscreen" : "fullscreen"),
629
+ onPress: (e, t) => {
630
+ Q.close(), Sn(e, t);
631
+ }
632
+ }),
633
+ /* @__PURE__ */ h(Xe, {
634
+ action: "csv",
635
+ label: D("downloadCsv"),
636
+ onPress: () => {
637
+ Q.close(), L && Bn(`${Vn}.csv`, `data:text/csv;charset=utf-8,${encodeURIComponent(fe(L, D))}`);
638
+ }
639
+ }),
640
+ /* @__PURE__ */ h(Xe, {
641
+ action: "image",
642
+ label: D("downloadImage"),
643
+ onPress: () => {
644
+ Q.close();
645
+ let e = G.current?.toDataURL();
646
+ e && Bn(`${Vn}.${e.startsWith("data:image/svg") ? "svg" : "png"}`, e);
647
+ }
648
+ })
649
+ ]
650
+ })
651
+ ]
652
+ })
653
+ ]
654
+ }) : null, Yn = dt === !1 ? null : /* @__PURE__ */ h("div", {
655
+ "aria-label": z && (!L || L.shape === "pie") ? void 0 : D("legend"),
656
+ "data-part": "legend",
657
+ onKeyDown: Rn,
658
+ ref: fn,
659
+ role: z && (!L || L.shape === "pie") ? void 0 : kn ? "toolbar" : "list",
660
+ children: z && (!L || L.shape === "pie") ? /* @__PURE__ */ g(m, { children: [
661
+ /* @__PURE__ */ h(Ze, {}),
662
+ /* @__PURE__ */ h(Ze, {}),
663
+ /* @__PURE__ */ h(Ze, {})
664
+ ] }) : /* @__PURE__ */ g(m, { children: [
665
+ X.map((e, t) => Ln(e, t, !1)),
666
+ /* @__PURE__ */ h("button", {
667
+ ...Pn.controlProps,
668
+ "aria-haspopup": "true",
669
+ "aria-label": D("legendMore", { series: new Intl.ListFormat(b ?? Xt, { type: "unit" }).format(Y.map((e) => X[e]?.label ?? "")) }),
670
+ "data-part": "legend-more",
671
+ hidden: Y.length === 0,
672
+ tabIndex: In === null ? 0 : -1,
673
+ type: "button",
674
+ children: D("moreSeries", { count: Y.length })
675
+ }),
676
+ /* @__PURE__ */ h("div", {
677
+ ...Pn.layerProps,
678
+ "aria-label": D("legend"),
679
+ "data-part": "menu",
680
+ role: "group",
681
+ children: Y.map((e) => {
682
+ let t = X[e];
683
+ return t ? Ln(t, e, !0) : null;
684
+ })
685
+ })
686
+ ] })
687
+ }), Xn = {
688
+ ...Yt,
689
+ "data-ui": "chart",
690
+ "data-part": "root",
691
+ "data-size": O.size,
692
+ "data-variant": O.variant,
693
+ "data-palette": O.palette,
694
+ "data-toolbar": O.toolbar,
695
+ "data-legend-overflow": O.legendOverflow,
696
+ ...z ? { "data-loading": "" } : {},
697
+ ...F ? { "data-fullscreen": "" } : {},
698
+ onKeyDown: wn,
699
+ ref: (e) => {
700
+ U.current = e, Ke(Jt, e);
701
+ },
702
+ children: /* @__PURE__ */ g(m, { children: [
703
+ Jn,
704
+ Yn,
705
+ /* @__PURE__ */ g("div", {
706
+ "aria-busy": z || void 0,
707
+ "aria-describedby": C === void 0 ? Gn : `${Wn} ${Gn}`,
708
+ "aria-label": S === void 0 ? Yt["aria-label"] ?? D("roledescription") : void 0,
709
+ "aria-labelledby": S === void 0 ? void 0 : Un,
710
+ "aria-roledescription": D("roledescription"),
711
+ "data-part": "plot",
712
+ onBlur: (e) => A(null, "blur", e.nativeEvent),
713
+ onFocus: xn,
714
+ onKeyDown: yn,
715
+ ref: W,
716
+ role: "group",
717
+ tabIndex: 0,
718
+ children: [
719
+ /* @__PURE__ */ h("div", {
720
+ "data-part": "crosshair",
721
+ hidden: !K.crosshair,
722
+ ...K.crosshair?.isBand ? { "data-band": "" } : {},
723
+ "data-orientation": L?.orientation ?? "vertical",
724
+ style: K.crosshair ? We({
725
+ "--slotted-chart-x": K.crosshair.x,
726
+ "--slotted-chart-y": K.crosshair.y,
727
+ "--slotted-chart-band-start": K.crosshair.band.start,
728
+ "--slotted-chart-band-size": K.crosshair.band.size,
729
+ "--slotted-chart-frame-start": K.crosshair.frame.start,
730
+ "--slotted-chart-frame-size": K.crosshair.frame.size
731
+ }) : void 0
732
+ }),
733
+ /* @__PURE__ */ h("div", {
734
+ "aria-hidden": "true",
735
+ "data-part": "canvas",
736
+ hidden: !B,
737
+ ref: un
738
+ }),
739
+ K.markers.map((e) => /* @__PURE__ */ h("div", {
740
+ "aria-hidden": "true",
741
+ "data-part": "marker",
742
+ ...Ue(e.color),
743
+ ...e.selected ? { "data-selected": "" } : {},
744
+ ...e.current ? { "data-current": "" } : {},
745
+ style: We({
746
+ "--slotted-chart-x": e.at.x,
747
+ "--slotted-chart-y": e.at.y
748
+ })
749
+ }, e.key)),
750
+ /* @__PURE__ */ h("div", {
751
+ "aria-hidden": "true",
752
+ "data-part": "tooltip",
753
+ ref: dn,
754
+ ...K.tooltip ? { "data-open": "" } : {},
755
+ ...K.docked ? { "data-docked": "" } : {},
756
+ children: K.tooltip && L ? Bt?.(K.tooltip, L) ?? /* @__PURE__ */ h(qe, {
757
+ context: K.tooltip,
758
+ indicator: O.tooltip.indicator,
759
+ model: L,
760
+ totalLabel: D("total")
761
+ }) : null
762
+ }),
763
+ B && L?.shape === "pie" && (L.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */ h("div", {
764
+ "aria-hidden": "true",
765
+ "data-part": "center",
766
+ children: Ht?.(L) ?? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
767
+ "data-part": "center-value",
768
+ children: L.series[0].format(L.total)
769
+ }), /* @__PURE__ */ h("span", {
770
+ "data-part": "center-label",
771
+ children: D("total")
772
+ })] })
773
+ }) : null,
774
+ $ ? /* @__PURE__ */ h("div", {
775
+ "aria-labelledby": S === void 0 ? void 0 : Un,
776
+ "data-part": "table-region",
777
+ ref: bn,
778
+ role: "region",
779
+ tabIndex: 0,
780
+ children: /* @__PURE__ */ g("table", {
781
+ "data-part": "table",
782
+ children: [
783
+ /* @__PURE__ */ h("caption", { children: $.omitted ? typeof S == "string" ? D("truncatedCaption", {
784
+ title: S,
785
+ shown: $.rows.length,
786
+ count: $.rows.length + $.omitted
787
+ }) : D("truncated", {
788
+ shown: $.rows.length,
789
+ count: $.rows.length + $.omitted
790
+ }) : typeof S == "string" ? S : null }),
791
+ /* @__PURE__ */ h("thead", { children: /* @__PURE__ */ h("tr", { children: $.columns.map((e, t) => /* @__PURE__ */ c("th", {
792
+ ...t > 0 ? { "data-numeric": "" } : {},
793
+ key: e.key,
794
+ scope: "col"
795
+ }, e.label)) }) }),
796
+ /* @__PURE__ */ h("tbody", { children: $.rows.map((e) => /* @__PURE__ */ c("tr", {
797
+ ...e.key === Z ? { "data-current": "" } : {},
798
+ key: e.key
799
+ }, e.cells.map((e, t) => t === 0 ? /* @__PURE__ */ h("th", {
800
+ scope: "row",
801
+ children: e.text
802
+ }, "category") : /* @__PURE__ */ h("td", {
803
+ "data-numeric": "",
804
+ children: e.text
805
+ }, t)))) })
806
+ ]
807
+ })
808
+ }) : null,
809
+ z ? /* @__PURE__ */ h(Qe, { kind: Kn }) : null,
810
+ !z && R ? /* @__PURE__ */ h("div", {
811
+ "data-part": "error",
812
+ children: Wt?.() ?? /* @__PURE__ */ h($e, {
813
+ action: xt || cn ? D("retry") : void 0,
814
+ onAction: qn,
815
+ status: "error",
816
+ text: D("error")
817
+ })
818
+ }) : null,
819
+ !z && !R && L?.empty ? /* @__PURE__ */ h("div", {
820
+ "data-part": "empty",
821
+ children: Ut?.(L.empty) ?? /* @__PURE__ */ h($e, {
822
+ action: L.empty === "all-hidden" ? D("showAll") : void 0,
823
+ onAction: (e) => Qt(Pe, "pointer", e),
824
+ status: L.empty === "all-hidden" ? "no-results" : "empty",
825
+ text: L.empty === "all-hidden" ? D("allHidden") : D("noData")
826
+ })
827
+ }) : null,
828
+ /* @__PURE__ */ h("p", {
829
+ "data-part": "summary",
830
+ id: Gn,
831
+ children: Hn
832
+ })
833
+ ]
834
+ })
835
+ ] })
836
+ };
837
+ return Gt ? Gt(Xn) : /* @__PURE__ */ h("figure", { ...Xn });
838
+ }
839
+ function Je({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i, onBlurEntry: a, ...o }) {
840
+ let [s, c] = S();
841
+ return /* @__PURE__ */ h("button", {
842
+ ...o,
843
+ "aria-pressed": t.visible,
844
+ ...t.visible ? { "data-pressed": "" } : {},
845
+ onBlur: a,
846
+ onClick: (e) => r(e.shiftKey ? "isolate" : "toggle", c(), e.nativeEvent),
847
+ onFocus: i,
848
+ onKeyDown: (e) => {
849
+ e.key === "Enter" && e.shiftKey && (e.preventDefault(), r("isolate", "keyboard", e.nativeEvent));
850
+ },
851
+ ref: s,
852
+ tabIndex: n ? 0 : -1,
853
+ type: "button",
854
+ children: e
855
+ });
856
+ }
857
+ function Ye({ glyph: n, label: r, onPress: i, part: a, pressed: o }) {
858
+ let [s, c] = S();
859
+ return /* @__PURE__ */ h("button", {
860
+ "aria-label": r,
861
+ ...o === void 0 ? {} : {
862
+ "aria-pressed": o,
863
+ ...o ? { "data-pressed": "" } : {}
864
+ },
865
+ "data-part": a,
866
+ onClick: (e) => i(c(), e.nativeEvent),
867
+ ref: s,
868
+ title: r,
869
+ type: "button",
870
+ children: /* @__PURE__ */ h(t, { children: /* @__PURE__ */ h(e, { name: n }) })
871
+ });
872
+ }
873
+ function Xe({ action: e, label: t, onPress: n }) {
874
+ let [r, i] = S();
875
+ return /* @__PURE__ */ h("button", {
876
+ "data-action": e,
877
+ "data-part": "menu-item",
878
+ onClick: (e) => n(i(), e.nativeEvent),
879
+ ref: r,
880
+ role: "menuitem",
881
+ type: "button",
882
+ children: t
883
+ });
884
+ }
885
+ function w({ shape: e = "block" }) {
886
+ return /* @__PURE__ */ h("span", {
887
+ "aria-hidden": "true",
888
+ "data-animation": "shimmer",
889
+ "data-loading": "",
890
+ "data-part": "root",
891
+ "data-shape": e,
892
+ "data-size": "md",
893
+ "data-ui": "skeleton"
894
+ });
895
+ }
896
+ function Ze() {
897
+ return /* @__PURE__ */ h(w, {});
898
+ }
899
+ function Qe({ kind: e }) {
900
+ let t = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ h(w, {}, t));
901
+ return /* @__PURE__ */ h("div", {
902
+ "aria-hidden": "true",
903
+ "data-kind": e,
904
+ "data-part": "skeleton",
905
+ children: /* @__PURE__ */ h("div", {
906
+ "data-animation": "shimmer",
907
+ "data-loading": "",
908
+ "data-part": "region",
909
+ "data-ui": "skeleton",
910
+ children: e === "pie" ? /* @__PURE__ */ h(w, { shape: "circle" }) : /* @__PURE__ */ g(m, { children: [
911
+ /* @__PURE__ */ h("div", {
912
+ "data-skeleton": "y",
913
+ children: t(5)
914
+ }),
915
+ /* @__PURE__ */ h("div", {
916
+ "data-skeleton": "marks",
917
+ children: t(e === "bar" ? 7 : 2)
918
+ }),
919
+ /* @__PURE__ */ h("div", {
920
+ "data-skeleton": "x",
921
+ children: t(6)
922
+ })
923
+ ] })
924
+ })
925
+ });
926
+ }
927
+ function $e({ action: e, onAction: t, status: n, text: r }) {
928
+ return /* @__PURE__ */ g("section", {
929
+ "data-align": "center",
930
+ "data-live": "polite",
931
+ "data-part": "root",
932
+ "data-reach": "section",
933
+ "data-status": n,
934
+ "data-ui": "result-state",
935
+ children: [
936
+ /* @__PURE__ */ h("div", {
937
+ "aria-hidden": "true",
938
+ "data-part": "media"
939
+ }),
940
+ /* @__PURE__ */ h("div", {
941
+ "data-part": "content",
942
+ role: "status",
943
+ children: /* @__PURE__ */ h("div", {
944
+ "data-part": "title",
945
+ children: r
946
+ })
947
+ }),
948
+ e ? /* @__PURE__ */ h("div", {
949
+ "data-part": "actions",
950
+ children: /* @__PURE__ */ h("button", {
951
+ "data-part": "root",
952
+ "data-size": "sm",
953
+ "data-tone": "secondary",
954
+ "data-ui": "button",
955
+ "data-variant": "outline",
956
+ onClick: (e) => t(e.nativeEvent),
957
+ type: "button",
958
+ children: /* @__PURE__ */ h("span", {
959
+ "data-part": "label",
960
+ children: e
961
+ })
962
+ })
963
+ }) : null
964
+ ]
965
+ });
966
+ }
967
+ //#endregion
968
+ export { Me as a, Ne as i, C as n, qe as r, je as t };