@mechane-ai/elements 0.44.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +48 -18
  2. package/bin/mechane-elements-catalog.mjs +42 -4
  3. package/dist/ai.js +268 -202
  4. package/dist/catalog.json +95 -31
  5. package/dist/categorical-values-BXi-rJuv.js +74 -0
  6. package/dist/chart-cursor-1mFd48Jc.js +23 -0
  7. package/dist/chart-data-CIJVWCYt.js +21 -0
  8. package/dist/chart-frame-BaxKn_MB.js +236 -0
  9. package/dist/{chart-input-B6_HXFDP.js → chart-input-Bm82_9Rd.js} +2 -2
  10. package/dist/chart-theme-4zprJ3rW.js +404 -0
  11. package/dist/charts/cartesian.js +1624 -1442
  12. package/dist/charts/distribution.js +486 -409
  13. package/dist/charts/graph.js +383 -358
  14. package/dist/charts/hierarchy.js +103 -94
  15. package/dist/charts/matrix.js +340 -333
  16. package/dist/charts/timeline.js +167 -134
  17. package/dist/charts.js +3 -3
  18. package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
  19. package/dist/collections.js +1648 -1188
  20. package/dist/{constants.stylex-CaVa9yGN.js → constants.stylex-CqhVl0uU.js} +9 -9
  21. package/dist/content/code.js +1 -1
  22. package/dist/content/diff.js +67 -66
  23. package/dist/content/link.js +1 -1
  24. package/dist/content/markdown.js +2 -2
  25. package/dist/content/tree.js +3 -3
  26. package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
  27. package/dist/content.js +1 -1
  28. package/dist/csp.js +6 -11
  29. package/dist/feedback.js +1 -1
  30. package/dist/forms/dates.js +274 -214
  31. package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
  32. package/dist/forms.js +3 -3
  33. package/dist/index.js +1 -1
  34. package/dist/layout.js +207 -207
  35. package/dist/navigation.js +4 -3
  36. package/dist/packages/ai/src/conversation.d.ts +2 -0
  37. package/dist/packages/ai/src/prompt-input.d.ts +7 -2
  38. package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -2
  39. package/dist/packages/charts/src/cartesian/index.d.ts +3 -2
  40. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +8 -2
  41. package/dist/packages/charts/src/cartesian/time-series.d.ts +11 -1
  42. package/dist/packages/charts/src/categorical-values.d.ts +14 -9
  43. package/dist/packages/charts/src/chart-frame.d.ts +7 -9
  44. package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
  45. package/dist/packages/charts/src/chart-range.d.ts +33 -0
  46. package/dist/packages/charts/src/chart-rows.d.ts +20 -0
  47. package/dist/packages/charts/src/chart-theme.d.ts +25 -1
  48. package/dist/packages/charts/src/chart.d.ts +81 -0
  49. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +6 -4
  50. package/dist/packages/charts/src/index.d.ts +2 -1
  51. package/dist/packages/charts/src/matrix/matrix-strip.d.ts +3 -3
  52. package/dist/packages/charts/src/plot-width.d.ts +0 -1
  53. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  54. package/dist/packages/charts/src/timeline/waterfall.d.ts +6 -2
  55. package/dist/packages/collections/src/collection-controls.d.ts +5 -1
  56. package/dist/packages/collections/src/collection-filters.d.ts +4 -1
  57. package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
  58. package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
  59. package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
  60. package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
  61. package/dist/packages/collections/src/data-table-text.d.ts +13 -0
  62. package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
  63. package/dist/packages/collections/src/data-table.d.ts +3 -85
  64. package/dist/packages/collections/src/index.d.ts +11 -6
  65. package/dist/packages/collections/src/query-controls.d.ts +6 -2
  66. package/dist/packages/collections/src/table-results.d.ts +47 -13
  67. package/dist/packages/collections/src/timeline.d.ts +1 -0
  68. package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
  69. package/dist/packages/collections/src/use-table-window.d.ts +25 -0
  70. package/dist/packages/content/src/viewer.d.ts +8 -0
  71. package/dist/packages/core/src/disclosure.d.ts +9 -1
  72. package/dist/packages/core/src/index.d.ts +1 -0
  73. package/dist/packages/core/src/route-link.d.ts +11 -0
  74. package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
  75. package/dist/packages/forms/src/file-picker.d.ts +15 -0
  76. package/dist/packages/forms/src/form-controls.d.ts +1 -6
  77. package/dist/packages/forms/src/forms.d.ts +4 -1
  78. package/dist/packages/forms/src/index.d.ts +4 -2
  79. package/dist/packages/forms/src/selection.d.ts +14 -0
  80. package/dist/packages/foundations/src/chart-tones.d.ts +5 -0
  81. package/dist/packages/foundations/src/csp/index.d.ts +1 -1
  82. package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
  83. package/dist/packages/navigation/src/index.d.ts +1 -1
  84. package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
  85. package/dist/plot-width-v2c_rA20.js +63 -0
  86. package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
  87. package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
  88. package/dist/src-CGc_hjxJ.js +409 -0
  89. package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
  90. package/dist/{src-CDp1JtwC.js → src-DVHlknB6.js} +135 -120
  91. package/dist/styles2.css +167 -132
  92. package/dist/tokens.js +1 -1
  93. package/package.json +1 -4
  94. package/packages/foundations/src/constants.stylex.ts +9 -9
  95. package/packages/foundations/src/tokens.stylex.ts +9 -9
  96. package/skills/extend-elements/SKILL.md +74 -0
  97. package/skills/review-elements/SKILL.md +76 -0
  98. package/skills/upgrade-elements/SKILL.md +34 -0
  99. package/skills/upgrade-elements/references/releases.md +58 -0
  100. package/skills/use-elements/SKILL.md +64 -13
  101. package/skills/use-elements/references/agent.md +57 -0
  102. package/skills/use-elements/references/charts.md +63 -0
  103. package/skills/use-elements/references/collections.md +89 -0
  104. package/skills/use-elements/references/conversations.md +47 -0
  105. package/skills/use-elements/references/forms.md +81 -0
  106. package/skills/use-elements/references/reports.md +6 -4
  107. package/skills/use-elements/references/styling.md +70 -0
  108. package/skills/use-elements/references/workspace.md +3 -3
  109. package/dist/categorical-values-ByvFLaNE.js +0 -59
  110. package/dist/chart-frame-Bcd9Tpt5.js +0 -251
  111. package/dist/chart-navigation-BAbb5PV9.js +0 -154
  112. package/dist/header-styles-COxCYFZx.js +0 -90
  113. package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
  114. package/dist/packages/charts/src/chart-surface.d.ts +0 -27
  115. package/dist/packages/navigation/src/route-link.d.ts +0 -2
  116. package/dist/plot-width-8cXdAjoD.js +0 -96
  117. package/dist/src-Bk7M67zy.js +0 -396
package/dist/catalog.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@mechane-ai/elements",
3
- "version": "0.44.0",
3
+ "version": "0.46.0",
4
4
  "recipes": [
5
5
  {
6
6
  "slug": "allocation-report",
@@ -151,6 +151,10 @@
151
151
  "kind": "value",
152
152
  "declaration": "dist/packages/core/src/copy-value.d.ts"
153
153
  },
154
+ "RouteLink": {
155
+ "kind": "value",
156
+ "declaration": "dist/packages/core/src/route-link.d.ts"
157
+ },
154
158
  "Accordion": {
155
159
  "kind": "value",
156
160
  "declaration": "dist/packages/core/src/disclosure.d.ts"
@@ -237,10 +241,6 @@
237
241
  "kind": "value",
238
242
  "declaration": "dist/packages/forms/src/agent-avatar-picker.d.ts"
239
243
  },
240
- "FilePicker": {
241
- "kind": "value",
242
- "declaration": "dist/packages/forms/src/form-controls.d.ts"
243
- },
244
244
  "Fieldset": {
245
245
  "kind": "value",
246
246
  "declaration": "dist/packages/forms/src/form-controls.d.ts"
@@ -257,6 +257,14 @@
257
257
  "kind": "value",
258
258
  "declaration": "dist/packages/forms/src/form-controls.d.ts"
259
259
  },
260
+ "FilePickerProps": {
261
+ "kind": "type",
262
+ "declaration": "dist/packages/forms/src/file-picker.d.ts"
263
+ },
264
+ "FilePicker": {
265
+ "kind": "value",
266
+ "declaration": "dist/packages/forms/src/file-picker.d.ts"
267
+ },
260
268
  "FormActionsProps": {
261
269
  "kind": "type",
262
270
  "declaration": "dist/packages/forms/src/form-actions.d.ts"
@@ -309,6 +317,10 @@
309
317
  "kind": "value",
310
318
  "declaration": "dist/packages/forms/src/selection.d.ts"
311
319
  },
320
+ "SegmentedControl": {
321
+ "kind": "value",
322
+ "declaration": "dist/packages/forms/src/selection.d.ts"
323
+ },
312
324
  "Switch": {
313
325
  "kind": "value",
314
326
  "declaration": "dist/packages/forms/src/selection.d.ts"
@@ -635,7 +647,7 @@
635
647
  },
636
648
  "RouteLink": {
637
649
  "kind": "value",
638
- "declaration": "dist/packages/navigation/src/route-link.d.ts"
650
+ "declaration": "dist/packages/core/src/index.d.ts"
639
651
  },
640
652
  "SkipLink": {
641
653
  "kind": "value",
@@ -847,6 +859,10 @@
847
859
  "kind": "type",
848
860
  "declaration": "dist/packages/collections/src/collection-controls.d.ts"
849
861
  },
862
+ "FilterRemoveDetails": {
863
+ "kind": "type",
864
+ "declaration": "dist/packages/collections/src/collection-controls.d.ts"
865
+ },
850
866
  "DisplayOption": {
851
867
  "kind": "type",
852
868
  "declaration": "dist/packages/collections/src/collection-controls.d.ts"
@@ -877,41 +893,45 @@
877
893
  },
878
894
  "DataTableColumn": {
879
895
  "kind": "type",
880
- "declaration": "dist/packages/collections/src/data-table.d.ts"
896
+ "declaration": "dist/packages/collections/src/data-table-layout.d.ts"
881
897
  },
882
898
  "DataTableColumnLayout": {
883
899
  "kind": "type",
884
- "declaration": "dist/packages/collections/src/data-table.d.ts"
885
- },
886
- "DataTablePlaceholderProps": {
887
- "kind": "type",
888
- "declaration": "dist/packages/collections/src/data-table.d.ts"
900
+ "declaration": "dist/packages/collections/src/data-table-layout.d.ts"
889
901
  },
890
902
  "DataTableColumnRole": {
891
903
  "kind": "type",
892
- "declaration": "dist/packages/collections/src/data-table.d.ts"
904
+ "declaration": "dist/packages/collections/src/data-table-layout.d.ts"
893
905
  },
894
- "DataTableSort": {
906
+ "DataTableWindow": {
895
907
  "kind": "type",
896
- "declaration": "dist/packages/collections/src/data-table.d.ts"
908
+ "declaration": "dist/packages/collections/src/data-table-rows.d.ts"
897
909
  },
898
- "DataTableWindow": {
910
+ "DataTableTextProps": {
899
911
  "kind": "type",
900
- "declaration": "dist/packages/collections/src/data-table.d.ts"
912
+ "declaration": "dist/packages/collections/src/data-table-text.d.ts"
901
913
  },
902
- "DataTableProps": {
914
+ "DataTableTextPlaceholderProps": {
903
915
  "kind": "type",
904
- "declaration": "dist/packages/collections/src/data-table.d.ts"
916
+ "declaration": "dist/packages/collections/src/data-table-text.d.ts"
917
+ },
918
+ "DataTableText": {
919
+ "kind": "value",
920
+ "declaration": "dist/packages/collections/src/data-table-text.d.ts"
921
+ },
922
+ "DataTableTextPlaceholder": {
923
+ "kind": "value",
924
+ "declaration": "dist/packages/collections/src/data-table-text.d.ts"
905
925
  },
906
926
  "DataTableRowAction": {
907
927
  "kind": "type",
908
- "declaration": "dist/packages/collections/src/data-table.d.ts"
928
+ "declaration": "dist/packages/collections/src/data-table-trigger.d.ts"
909
929
  },
910
- "DataTableTextProps": {
930
+ "DataTablePlaceholderProps": {
911
931
  "kind": "type",
912
932
  "declaration": "dist/packages/collections/src/data-table.d.ts"
913
933
  },
914
- "DataTableTextPlaceholderProps": {
934
+ "DataTableProps": {
915
935
  "kind": "type",
916
936
  "declaration": "dist/packages/collections/src/data-table.d.ts"
917
937
  },
@@ -919,18 +939,10 @@
919
939
  "kind": "value",
920
940
  "declaration": "dist/packages/collections/src/data-table.d.ts"
921
941
  },
922
- "DataTableText": {
923
- "kind": "value",
924
- "declaration": "dist/packages/collections/src/data-table.d.ts"
925
- },
926
942
  "DataTablePlaceholder": {
927
943
  "kind": "value",
928
944
  "declaration": "dist/packages/collections/src/data-table.d.ts"
929
945
  },
930
- "DataTableTextPlaceholder": {
931
- "kind": "value",
932
- "declaration": "dist/packages/collections/src/data-table.d.ts"
933
- },
934
946
  "CollectionEndProps": {
935
947
  "kind": "type",
936
948
  "declaration": "dist/packages/collections/src/collection-scroll.d.ts"
@@ -1007,6 +1019,26 @@
1007
1019
  "kind": "type",
1008
1020
  "declaration": "dist/packages/collections/src/query-controls.d.ts"
1009
1021
  },
1022
+ "CollectionSearchDetails": {
1023
+ "kind": "type",
1024
+ "declaration": "dist/packages/collections/src/query-controls.d.ts"
1025
+ },
1026
+ "CollectionSubmitDetails": {
1027
+ "kind": "type",
1028
+ "declaration": "dist/packages/collections/src/query-controls.d.ts"
1029
+ },
1030
+ "DataTableSelectionDetails": {
1031
+ "kind": "type",
1032
+ "declaration": "dist/packages/collections/src/table-results.d.ts"
1033
+ },
1034
+ "DataTableSort": {
1035
+ "kind": "type",
1036
+ "declaration": "dist/packages/collections/src/table-results.d.ts"
1037
+ },
1038
+ "DataTableSortDetails": {
1039
+ "kind": "type",
1040
+ "declaration": "dist/packages/collections/src/table-results.d.ts"
1041
+ },
1010
1042
  "TableResultStatus": {
1011
1043
  "kind": "type",
1012
1044
  "declaration": "dist/packages/collections/src/table-results.d.ts"
@@ -1023,6 +1055,10 @@
1023
1055
  "kind": "type",
1024
1056
  "declaration": "dist/packages/collections/src/collection-filters.d.ts"
1025
1057
  },
1058
+ "CollectionFilterDetails": {
1059
+ "kind": "type",
1060
+ "declaration": "dist/packages/collections/src/collection-filters.d.ts"
1061
+ },
1026
1062
  "FilterOption": {
1027
1063
  "kind": "type",
1028
1064
  "declaration": "dist/packages/collections/src/collection-filters.d.ts"
@@ -1379,6 +1415,10 @@
1379
1415
  "kind": "value",
1380
1416
  "declaration": "dist/packages/charts/src/chart-frame.d.ts"
1381
1417
  },
1418
+ "ChartSelectDetails": {
1419
+ "kind": "type",
1420
+ "declaration": "dist/packages/charts/src/chart.d.ts"
1421
+ },
1382
1422
  "ChartTone": {
1383
1423
  "kind": "type",
1384
1424
  "declaration": "dist/packages/foundations/src/chart-tones.d.ts"
@@ -1387,6 +1427,10 @@
1387
1427
  "kind": "value",
1388
1428
  "declaration": "dist/packages/foundations/src/chart-tones.d.ts"
1389
1429
  },
1430
+ "chartToneOutlines": {
1431
+ "kind": "value",
1432
+ "declaration": "dist/packages/foundations/src/chart-tones.d.ts"
1433
+ },
1390
1434
  "ChartMarkShape": {
1391
1435
  "kind": "type",
1392
1436
  "declaration": "dist/packages/charts/src/chart-series-marker.d.ts"
@@ -1469,6 +1513,10 @@
1469
1513
  "kind": "type",
1470
1514
  "declaration": "dist/packages/charts/src/cartesian/scatter-plot.d.ts"
1471
1515
  },
1516
+ "ScatterRangeDetails": {
1517
+ "kind": "type",
1518
+ "declaration": "dist/packages/charts/src/cartesian/scatter-plot.d.ts"
1519
+ },
1472
1520
  "ScatterRangeSelection": {
1473
1521
  "kind": "type",
1474
1522
  "declaration": "dist/packages/charts/src/cartesian/scatter-plot.d.ts"
@@ -1549,6 +1597,18 @@
1549
1597
  "kind": "type",
1550
1598
  "declaration": "dist/packages/charts/src/cartesian/time-series.d.ts"
1551
1599
  },
1600
+ "TimeRangeSelection": {
1601
+ "kind": "type",
1602
+ "declaration": "dist/packages/charts/src/cartesian/time-series.d.ts"
1603
+ },
1604
+ "ChartRangeDetails": {
1605
+ "kind": "type",
1606
+ "declaration": "dist/packages/charts/src/chart-range.d.ts"
1607
+ },
1608
+ "ChartRangeValue": {
1609
+ "kind": "type",
1610
+ "declaration": "dist/packages/charts/src/chart-range.d.ts"
1611
+ },
1552
1612
  "LineChart": {
1553
1613
  "kind": "value",
1554
1614
  "declaration": "dist/packages/charts/src/cartesian/time-series.d.ts"
@@ -1751,6 +1811,10 @@
1751
1811
  "kind": "type",
1752
1812
  "declaration": "dist/packages/charts/src/timeline/waterfall.d.ts"
1753
1813
  },
1814
+ "WaterfallSelectDetails": {
1815
+ "kind": "type",
1816
+ "declaration": "dist/packages/charts/src/timeline/waterfall.d.ts"
1817
+ },
1754
1818
  "Waterfall": {
1755
1819
  "kind": "value",
1756
1820
  "declaration": "dist/packages/charts/src/timeline/waterfall.d.ts"
@@ -1803,7 +1867,7 @@
1803
1867
  },
1804
1868
  "CSPProviderProps": {
1805
1869
  "kind": "type",
1806
- "declaration": "dist/packages/foundations/src/csp/index.d.ts"
1870
+ "declaration": "dist/packages/foundations/src/csp/provider.d.ts"
1807
1871
  }
1808
1872
  },
1809
1873
  "@mechane-ai/elements/tokens": {
@@ -0,0 +1,74 @@
1
+ import { c as e, l as t } from "./src-DVHlknB6.js";
2
+ import { n } from "./chart-input-Bm82_9Rd.js";
3
+ import { n as r, r as i } from "./plot-width-v2c_rA20.js";
4
+ import * as a from "@stylexjs/stylex";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ // packages/charts/src/categorical-values.tsx
7
+ var c = {
8
+ kzqmXN: "x1xc55vz",
9
+ kZKoxP: "xdk7pt",
10
+ kmuXW: "x2lah0s",
11
+ kGVxlE: "x1iotiob",
12
+ $$css: !0
13
+ }, l = { swatch: (e, t) => [
14
+ c,
15
+ {
16
+ kWkggS: e == null ? e : "xl8spv7",
17
+ $$css: !0
18
+ },
19
+ {
20
+ "--x-backgroundColor": e ?? void 0,
21
+ "--x-boxShadow": `inset 0 0 0 1px ${t}` == null ? void 0 : `inset 0 0 0 1px ${t}`
22
+ }
23
+ ] }, u = {
24
+ items: 200,
25
+ series: 12
26
+ }, d = [
27
+ "series1",
28
+ "series2",
29
+ "series3",
30
+ "series4",
31
+ "series5",
32
+ "series6"
33
+ ];
34
+ function f(e, t) {
35
+ return e ?? d[t % d.length] ?? "series1";
36
+ }
37
+ function p(e) {
38
+ if (e.length > u.items) return `Choose a window with at most ${u.items} items.`;
39
+ if (!n(e)) return "Every breakdown item needs a unique identifier.";
40
+ if (e.some((e) => e.value !== null && (!Number.isFinite(e.value) || e.value < 0))) return "Breakdown values must be finite and nonnegative, or explicitly missing.";
41
+ if (!Number.isFinite(e.reduce((e, t) => e + (t.value ?? 0), 0))) return "The sum of recorded values must be finite.";
42
+ }
43
+ function m(e) {
44
+ return e.map((e) => ({
45
+ id: e.id,
46
+ label: `${e.label}: ${e.valueLabel}`
47
+ }));
48
+ }
49
+ function h({ title: n, items: c, view: u }) {
50
+ return /* @__PURE__ */ o(i, {
51
+ title: n,
52
+ items: m(c),
53
+ view: u,
54
+ children: /* @__PURE__ */ o("ul", {
55
+ className: "xrvj5dj x1ghz6dp x1717udv xe8uvvx",
56
+ children: c.map((n) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(r, {
57
+ id: n.id,
58
+ label: `${n.label}: ${n.valueLabel}`,
59
+ view: u,
60
+ children: [/* @__PURE__ */ s("span", {
61
+ className: "x78zum5 x6s0dn4 x1hnptsi x1slnebi xeuugli",
62
+ children: [/* @__PURE__ */ o("span", {
63
+ "aria-hidden": !0,
64
+ ...a.props(l.swatch(e[n.tone], t[n.tone]))
65
+ }), n.label]
66
+ }), /* @__PURE__ */ o("span", {
67
+ className: "x153jb6y xp4054r xeuugli x193iq5w",
68
+ children: n.valueLabel
69
+ })]
70
+ }) }, n.id))
71
+ })
72
+ });
73
+ }
74
+ export { p as a, f as i, m as n, u as r, h as t };
@@ -0,0 +1,23 @@
1
+ import "@stylexjs/stylex";
2
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
+ // packages/charts/src/chart-cursor.tsx
4
+ function n({ x: n, top: r, bottom: i, width: a }) {
5
+ return /* @__PURE__ */ t("g", {
6
+ "aria-hidden": !0,
7
+ className: "xlshs6z xgs60n x17y187c xbabvq0 x47corl",
8
+ children: [/* @__PURE__ */ e("line", {
9
+ x1: n,
10
+ x2: n,
11
+ y1: r,
12
+ y2: i,
13
+ className: "xnpr05h x1ntoi03 x13efnbd"
14
+ }), /* @__PURE__ */ e("line", {
15
+ x1: n - a / 2,
16
+ x2: n + a / 2,
17
+ y1: i + 4,
18
+ y2: i + 4,
19
+ className: "xzly4p3 x13efnbd"
20
+ })]
21
+ });
22
+ }
23
+ export { n as t };
@@ -0,0 +1,21 @@
1
+ import { t as e } from "./accessibility-P89UG9-r.js";
2
+ import * as t from "@stylexjs/stylex";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ // packages/charts/src/chart-data.tsx
5
+ function i({ label: i, columns: a, rows: o }) {
6
+ return /* @__PURE__ */ n("div", {
7
+ ...t.props(e.hidden),
8
+ children: /* @__PURE__ */ r("table", { children: [
9
+ /* @__PURE__ */ n("caption", { children: i }),
10
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { children: a.map((e) => /* @__PURE__ */ n("th", {
11
+ scope: "col",
12
+ children: e.label
13
+ }, e.id)) }) }),
14
+ /* @__PURE__ */ n("tbody", { children: o.map((e) => /* @__PURE__ */ n("tr", { children: a.map((t, r) => r === 0 ? /* @__PURE__ */ n("th", {
15
+ scope: "row",
16
+ children: e.values[r]
17
+ }, t.id) : /* @__PURE__ */ n("td", { children: e.values[r] }, t.id)) }, e.id)) })
18
+ ] })
19
+ });
20
+ }
21
+ export { i as t };
@@ -0,0 +1,236 @@
1
+ import { u as e } from "./src-CpdJlDhO.js";
2
+ import { c as t, g as n, l as r, p as i } from "./src-DVHlknB6.js";
3
+ import * as a from "@stylexjs/stylex";
4
+ import { mergeProps as o } from "@ui-sdk/react/primitive";
5
+ import { Children as s, useId as c } from "react";
6
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ // packages/charts/src/chart-heading.tsx
8
+ var f = { root: {
9
+ k1C7PZ: "x8zbtdt",
10
+ khm7nJ: "x1gkm1c7",
11
+ kMwMTN: "xbixft",
12
+ kMv6JI: "x1hz01jw",
13
+ kGuDYH: "xtqrqnz",
14
+ kLWn49: "x1778rvt",
15
+ $$css: !0
16
+ } };
17
+ function p({ title: t, id: n, meta: r, actions: i }) {
18
+ let o = s.toArray(r).length > 0, c = s.toArray(i).length > 0, l = o || c, p = o && /* @__PURE__ */ u("div", {
19
+ ...a.props(e.meta),
20
+ children: r
21
+ }), m = c && /* @__PURE__ */ u("div", {
22
+ ...a.props(e.actions),
23
+ children: i
24
+ });
25
+ return /* @__PURE__ */ d("div", {
26
+ ...a.props(e.row, e.reportRow, f.root),
27
+ children: [/* @__PURE__ */ u("p", {
28
+ id: n,
29
+ ...a.props(e.title),
30
+ children: t
31
+ }), l && /* @__PURE__ */ d("div", {
32
+ ...a.props(e.trailing),
33
+ children: [p, m]
34
+ })]
35
+ });
36
+ }
37
+ // packages/charts/src/chart-series-marker.tsx
38
+ var m = {
39
+ kGVxlE: "x1iotiob",
40
+ $$css: !0
41
+ }, h = {
42
+ root: {
43
+ k1xSpc: "x3nfvp2",
44
+ kGNEyG: "x6s0dn4",
45
+ kjj79g: "xl56j7k",
46
+ kmuXW: "x2lah0s",
47
+ $$css: !0
48
+ },
49
+ color: (e) => [{
50
+ kMwMTN: e == null ? e : "x14rh7hd",
51
+ $$css: !0
52
+ }, { "--x-color": e ?? void 0 }],
53
+ icon: {
54
+ kzqmXN: "x1kky2od",
55
+ kZKoxP: "xlup9mm",
56
+ $$css: !0
57
+ },
58
+ swatch: {
59
+ kzqmXN: "x1xc55vz",
60
+ kZKoxP: "xdk7pt",
61
+ kWkggS: "xtwfq29",
62
+ $$css: !0
63
+ },
64
+ edge: (e) => [m, { "--x-boxShadow": `inset 0 0 0 1px ${e}` == null ? void 0 : `inset 0 0 0 1px ${e}` }],
65
+ transparent: {
66
+ kWkggS: "xjbqb8w",
67
+ $$css: !0
68
+ }
69
+ }, g = 8, _ = .3;
70
+ function v({ shape: e }) {
71
+ switch (e) {
72
+ case "line": return /* @__PURE__ */ u("path", {
73
+ d: "M0 4 H8",
74
+ stroke: "currentColor",
75
+ strokeWidth: 2
76
+ });
77
+ case "band": return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("rect", {
78
+ width: 8,
79
+ height: 8,
80
+ fill: "currentColor",
81
+ opacity: _
82
+ }), /* @__PURE__ */ u("path", {
83
+ d: "M0 4 H8",
84
+ stroke: "currentColor",
85
+ strokeWidth: 1.5
86
+ })] });
87
+ case "tick": return /* @__PURE__ */ u("path", {
88
+ d: "M0 4 H8",
89
+ stroke: "currentColor",
90
+ strokeWidth: 3
91
+ });
92
+ case "range": return /* @__PURE__ */ u("path", {
93
+ d: "M1.5 0.75 H6.5 M4 0.75 V7.25 M1.5 7.25 H6.5",
94
+ stroke: "currentColor",
95
+ strokeWidth: 1.5,
96
+ fill: "none"
97
+ });
98
+ case "dashed": return /* @__PURE__ */ u("path", {
99
+ d: "M0 4 H3 M5 4 H8",
100
+ stroke: "currentColor",
101
+ strokeWidth: 1.5
102
+ });
103
+ }
104
+ }
105
+ function y({ tone: e, shape: n = "swatch", children: i }) {
106
+ let o = s.toArray(i).length > 0, c = !o && n !== "swatch", l = o || n === "swatch" ? i : /* @__PURE__ */ u("svg", {
107
+ width: g,
108
+ height: g,
109
+ viewBox: `0 0 ${g} ${g}`,
110
+ focusable: "false",
111
+ className: "x1lliihq x1xc55vz xdk7pt x1rea2x4",
112
+ children: /* @__PURE__ */ u(v, { shape: n })
113
+ });
114
+ return /* @__PURE__ */ u("span", {
115
+ "aria-hidden": !0,
116
+ inert: !0,
117
+ ...a.props(h.root, h.color(t[e]), o ? h.icon : h.swatch, c && h.transparent, !o && !c && h.edge(r[e])),
118
+ children: l
119
+ });
120
+ }
121
+ // packages/charts/src/chart-series-summary.tsx
122
+ function b({ series: e, values: t }) {
123
+ return Object.keys(t).length === e.length && e.every((e) => Object.hasOwn(t, e.id)) ? /* @__PURE__ */ u("dl", {
124
+ "aria-label": "Period summary",
125
+ className: "x78zum5 x1a02dak xaml1ju x1ghz6dp xeuugli",
126
+ children: e.map((e, n) => /* @__PURE__ */ d("div", {
127
+ ...{
128
+ 0: { className: "xeuugli" },
129
+ 1: { className: "xeuugli xo02m6d xpilrb4 x1t7ytsu x97x49r" }
130
+ }[n > 0 | 0],
131
+ children: [/* @__PURE__ */ d("dt", {
132
+ className: "x78zum5 x6s0dn4 xunmzkg x153jb6y xy8obcc",
133
+ children: [/* @__PURE__ */ u(y, {
134
+ tone: e.tone,
135
+ shape: e.shape
136
+ }), e.label]
137
+ }), /* @__PURE__ */ u("dd", {
138
+ className: "x1ghz6dp xbixft x71lla1 xgkpprq xk4h15q x1wjjqco xss6m8b xj0a0fe",
139
+ children: t[e.id] === void 0 ? /* @__PURE__ */ u(i, { width: "6ch" }) : t[e.id]
140
+ })]
141
+ }, e.id))
142
+ }) : /* @__PURE__ */ u(n, {
143
+ hasError: !0,
144
+ children: "Period values must match the chart series identifiers."
145
+ });
146
+ }
147
+ // packages/charts/src/chart-frame.tsx
148
+ function x({ title: t, description: n, children: r, actions: i, footer: f, report: m, series: h = [], figure: g = {} }) {
149
+ let _ = c();
150
+ if (m !== void 0) {
151
+ let e = m.seriesValues === void 0 ? m.summary : /* @__PURE__ */ u(b, {
152
+ series: h,
153
+ values: m.seriesValues
154
+ }), a = e != null && e !== !1, c = s.toArray([m.actions, i]).length > 0, v = /* @__PURE__ */ d(l, { children: [m.actions, i] });
155
+ return /* @__PURE__ */ d("figure", {
156
+ ...o(g, { "aria-labelledby": _ }, { className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt xmkeg23 x1y0btm7 x1ey3b81" }),
157
+ children: [/* @__PURE__ */ u("figcaption", { children: /* @__PURE__ */ u(p, {
158
+ id: _,
159
+ title: t,
160
+ meta: m.meta,
161
+ actions: c && v
162
+ }) }), /* @__PURE__ */ d("div", {
163
+ className: "xeuugli xg7ukam",
164
+ children: [
165
+ a && /* @__PURE__ */ u("div", {
166
+ className: "x1xxlxpq xeuugli",
167
+ children: e
168
+ }),
169
+ n !== void 0 && /* @__PURE__ */ u("p", {
170
+ className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
171
+ children: n
172
+ }),
173
+ r,
174
+ f !== void 0 && /* @__PURE__ */ u("div", {
175
+ className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
176
+ children: f
177
+ })
178
+ ]
179
+ })]
180
+ });
181
+ }
182
+ return /* @__PURE__ */ d("figure", {
183
+ ...o(g, { "aria-labelledby": _ }, { className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt" }),
184
+ children: [
185
+ /* @__PURE__ */ d("figcaption", {
186
+ className: "x78zum5 x1a02dak x1qughib x7a106z x1n8ia3y x1wv5www",
187
+ children: [/* @__PURE__ */ d("div", {
188
+ className: "x1cqoux5 xeuugli xj0a0fe",
189
+ children: [/* @__PURE__ */ u("p", {
190
+ id: _,
191
+ className: "x1ghz6dp x12myhf4 x1778rvt x1b5ytql",
192
+ children: t
193
+ }), n !== void 0 && /* @__PURE__ */ u("p", {
194
+ className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
195
+ children: n
196
+ })]
197
+ }), i !== void 0 && /* @__PURE__ */ u("div", {
198
+ ...a.props(e.actions),
199
+ children: i
200
+ })]
201
+ }),
202
+ r,
203
+ f !== void 0 && /* @__PURE__ */ u("div", {
204
+ className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
205
+ children: f
206
+ })
207
+ ]
208
+ });
209
+ }
210
+ function S({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
211
+ return /* @__PURE__ */ u("ul", {
212
+ "aria-label": t,
213
+ ...{
214
+ 0: { className: "x78zum5 x1a02dak x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k" },
215
+ 1: { className: "x78zum5 x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k xozqiw3 xw2csxc x1mqbd49" }
216
+ }[!!n | 0],
217
+ children: e.map((e) => /* @__PURE__ */ d("li", {
218
+ ...{
219
+ 0: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli x193iq5w xj0a0fe" },
220
+ 1: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli xj0a0fe x2lah0s x1x1rfll xuxw1ft" }
221
+ }[!!n | 0],
222
+ children: [/* @__PURE__ */ u(y, {
223
+ tone: e.tone,
224
+ shape: e.shape
225
+ }), e.label]
226
+ }, e.id))
227
+ });
228
+ }
229
+ function C({ children: e, id: t }) {
230
+ return /* @__PURE__ */ u("p", {
231
+ id: t,
232
+ className: "x1ghz6dp xeuugli x1mqbd49 xbixft xy8obcc xas2l8k xss6m8b xj0a0fe",
233
+ children: e
234
+ });
235
+ }
236
+ export { y as i, S as n, C as r, x as t };
@@ -1,5 +1,5 @@
1
- import { h as e } from "./src-CDp1JtwC.js";
2
- import { n as t } from "./chart-frame-Bcd9Tpt5.js";
1
+ import { g as e } from "./src-DVHlknB6.js";
2
+ import { t } from "./chart-frame-BaxKn_MB.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  // packages/charts/src/chart-input.tsx
5
5
  function r(e) {