kaleido-ui 0.2.4 → 0.2.6

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 (189) hide show
  1. package/README.md +45 -10
  2. package/dist/web/{chunk-2GNXC446.js → chunk-255X76ZW.js} +4 -4
  3. package/dist/web/{chunk-YTXWYWVD.js → chunk-4WUXBF7Q.js} +7 -7
  4. package/dist/web/{chunk-NSA777UY.js → chunk-536NL4X2.js} +4 -4
  5. package/dist/web/{chunk-LFAORJQK.js → chunk-5NCVH6N5.js} +2 -2
  6. package/dist/web/{chunk-M6RXTQEL.js → chunk-6AAKKRZJ.js} +9 -9
  7. package/dist/web/{chunk-L2UPQLY7.js → chunk-73BRW657.js} +4 -4
  8. package/dist/web/{chunk-PCKRLEAO.js → chunk-7BPEZ3TA.js} +1 -1
  9. package/dist/web/{chunk-QXCCUYNY.js → chunk-7IQ4YJZS.js} +1 -1
  10. package/dist/web/{chunk-CRDCVB5X.js → chunk-AMCV2D3Q.js} +31 -17
  11. package/dist/web/{chunk-4246Y2F2.js → chunk-ARO323RW.js} +11 -11
  12. package/dist/web/{chunk-76DAZT7Q.js → chunk-AVJ56TMD.js} +4 -4
  13. package/dist/web/{chunk-XPHFJPUQ.js → chunk-BAV3MTRA.js} +1 -1
  14. package/dist/web/{chunk-Z5LVT3BD.js → chunk-BBKINPMF.js} +7 -7
  15. package/dist/web/{chunk-ZTVV4KBT.js → chunk-BI3WGWOO.js} +1 -1
  16. package/dist/web/{chunk-QFIGSIXA.js → chunk-CRQ6QCAN.js} +10 -10
  17. package/dist/web/{chunk-YNB4SSLD.js → chunk-CSOMNAM5.js} +9 -9
  18. package/dist/web/{chunk-GMJGTSCQ.js → chunk-DUIRXCBO.js} +8 -8
  19. package/dist/web/{chunk-2Q5SSNFO.js → chunk-ELT34EZJ.js} +1 -1
  20. package/dist/web/{chunk-R3IIXFGK.js → chunk-EODZVHEU.js} +3 -3
  21. package/dist/web/{chunk-G373WZMN.js → chunk-EZ34YRLM.js} +1 -1
  22. package/dist/web/{chunk-DNHRMPKI.js → chunk-G2K423HV.js} +6 -6
  23. package/dist/web/{chunk-RIOY4LFJ.js → chunk-GJB3GMDE.js} +1 -1
  24. package/dist/web/{chunk-5BNDC7M4.js → chunk-GPTAAEPK.js} +2 -2
  25. package/dist/web/{chunk-QCQRA6L5.js → chunk-GQBELVPV.js} +4 -4
  26. package/dist/web/{chunk-HWKXZNBN.js → chunk-HIIB5NGX.js} +4 -4
  27. package/dist/web/{chunk-A6MSV4MA.js → chunk-HLHCPDCZ.js} +4 -4
  28. package/dist/web/{chunk-QBZSLR7U.js → chunk-HLPL5AHD.js} +1 -1
  29. package/dist/web/{chunk-2OGYEUYV.js → chunk-HMHG36RK.js} +4 -11
  30. package/dist/web/{chunk-TBEKRQGW.js → chunk-HO65ENYH.js} +1 -1
  31. package/dist/web/{chunk-Y3W6LOOE.js → chunk-HSV2WS2C.js} +4 -4
  32. package/dist/web/{chunk-LPDB7EHH.js → chunk-I6ESLPWR.js} +1 -1
  33. package/dist/web/{chunk-2NCH2ZDU.js → chunk-I7MYUZ56.js} +4 -4
  34. package/dist/web/{chunk-JZ3BUM5L.js → chunk-IEEIIE3Q.js} +13 -13
  35. package/dist/web/{chunk-O2TTO5FS.js → chunk-KDNTZ2BX.js} +3 -3
  36. package/dist/web/{chunk-TPGNO74K.js → chunk-KGBJAITC.js} +4 -4
  37. package/dist/web/{chunk-NEXA6VGG.js → chunk-KIMCXNLP.js} +1 -1
  38. package/dist/web/{chunk-UK6ZL4MX.js → chunk-M7JNBTLT.js} +21 -8
  39. package/dist/web/{chunk-STMNX3QT.js → chunk-MRQXL6NY.js} +3 -3
  40. package/dist/web/{chunk-FWOIRFV5.js → chunk-MUSLMJF3.js} +5 -5
  41. package/dist/web/{chunk-A3TKIXSI.js → chunk-ND6LNJST.js} +11 -11
  42. package/dist/web/{chunk-LZ6PIXUO.js → chunk-OITKJK5K.js} +2 -2
  43. package/dist/web/{chunk-HDLOPDFX.js → chunk-OZB5M3SQ.js} +7 -7
  44. package/dist/web/{chunk-TMK3SVYI.js → chunk-PIXLIWSO.js} +1 -1
  45. package/dist/web/{chunk-PTSOVDKH.js → chunk-QFE2KEC2.js} +3 -3
  46. package/dist/web/{chunk-Z5O67WTL.js → chunk-QNT2GSHF.js} +1 -1
  47. package/dist/web/{chunk-27CY5EHL.js → chunk-SA6ODI7U.js} +8 -8
  48. package/dist/web/{chunk-DH7VXKGM.js → chunk-SJW4IXDG.js} +9 -9
  49. package/dist/web/{chunk-O6NPTMDN.js → chunk-SU32VRD7.js} +1 -1
  50. package/dist/web/{chunk-S2ICIIH2.js → chunk-TCFHLDRK.js} +10 -10
  51. package/dist/web/{chunk-GX7GBHJ6.js → chunk-TGYM5AF6.js} +7 -7
  52. package/dist/web/{chunk-4QLR4ZNK.js → chunk-U4WWGKI5.js} +13 -13
  53. package/dist/web/{chunk-VUGV3ELU.js → chunk-UNZZVCZY.js} +6 -6
  54. package/dist/web/{chunk-EK5N3ZPW.js → chunk-UR2Q5DZF.js} +27 -14
  55. package/dist/web/{chunk-JY73M73T.js → chunk-VNNGXLQC.js} +7 -7
  56. package/dist/web/{chunk-WOAWUXER.js → chunk-VRMLE4BA.js} +3 -3
  57. package/dist/web/{chunk-WWF7IJBF.js → chunk-XB4FFFU6.js} +16 -16
  58. package/dist/web/{chunk-PS7Q6MMU.js → chunk-XHOWUR5T.js} +3 -3
  59. package/dist/web/{chunk-ZXCT3Y6P.js → chunk-XNLQEGBW.js} +1 -1
  60. package/dist/web/{chunk-JYM5NHBA.js → chunk-Y4MOWCLO.js} +1 -1
  61. package/dist/web/{chunk-CZPNI33A.js → chunk-Y74IX3Z3.js} +1 -1
  62. package/dist/web/{chunk-IK32AIOS.js → chunk-Y7G7SETL.js} +1 -1
  63. package/dist/web/{chunk-DXFFYCU3.js → chunk-YPINO6TQ.js} +4 -4
  64. package/dist/web/{chunk-7NS5S2PG.js → chunk-Z7IFO623.js} +5 -5
  65. package/dist/web/components/account-capabilities-card.js +10 -10
  66. package/dist/web/components/account-menu.js +5 -5
  67. package/dist/web/components/account-settings-shared.js +9 -9
  68. package/dist/web/components/account-status-tabs.js +6 -6
  69. package/dist/web/components/activity-detail-row.js +10 -10
  70. package/dist/web/components/activity-filter-bar.js +10 -10
  71. package/dist/web/components/activity-list.js +10 -10
  72. package/dist/web/components/activity-network-filters.js +7 -7
  73. package/dist/web/components/activity-row.js +6 -6
  74. package/dist/web/components/activity-type-tabs.js +7 -7
  75. package/dist/web/components/alert-banner.js +5 -5
  76. package/dist/web/components/app-icon.js +5 -5
  77. package/dist/web/components/asset-card.js +10 -10
  78. package/dist/web/components/asset-icon.js +2 -2
  79. package/dist/web/components/asset-selector.js +11 -11
  80. package/dist/web/components/balance-breakdown.js +6 -6
  81. package/dist/web/components/basic-collapsible.js +3 -3
  82. package/dist/web/components/bottom-nav.js +5 -5
  83. package/dist/web/components/bottom-sheet.js +5 -5
  84. package/dist/web/components/btc-unified-receive.js +14 -14
  85. package/dist/web/components/charts/bar-chart.js +10 -10
  86. package/dist/web/components/charts/bar-list.js +10 -10
  87. package/dist/web/components/charts/core.js +15 -9
  88. package/dist/web/components/charts/donut-chart.js +10 -10
  89. package/dist/web/components/charts/index.js +16 -16
  90. package/dist/web/components/charts/line-chart.js +10 -10
  91. package/dist/web/components/charts/meter.js +10 -10
  92. package/dist/web/components/charts/mixed-chart.js +10 -10
  93. package/dist/web/components/charts/scatter-chart.js +10 -10
  94. package/dist/web/components/code-block.js +10 -10
  95. package/dist/web/components/confirm-dialog.js +3 -3
  96. package/dist/web/components/copy-button.js +8 -8
  97. package/dist/web/components/copyable.js +9 -9
  98. package/dist/web/components/date-range-filter.js +3 -3
  99. package/dist/web/components/deposit-asset-selection.js +12 -12
  100. package/dist/web/components/deposit-generated-view.js +10 -10
  101. package/dist/web/components/deposit-invoice-generation.js +21 -21
  102. package/dist/web/components/deposit-network-default-modal.js +3 -3
  103. package/dist/web/components/deposit-pre-generation.js +7 -7
  104. package/dist/web/components/deposit-success-screen.js +9 -9
  105. package/dist/web/components/deposit-ui-shared.js +5 -5
  106. package/dist/web/components/disclosure-card.js +3 -3
  107. package/dist/web/components/error-boundary.js +1 -1
  108. package/dist/web/components/extension-page-frame.js +4 -4
  109. package/dist/web/components/filter-bar.js +4 -4
  110. package/dist/web/components/filter-dropdown.js +3 -3
  111. package/dist/web/components/floating-notice.js +2 -2
  112. package/dist/web/components/info-chip.js +7 -7
  113. package/dist/web/components/info-panel.js +5 -5
  114. package/dist/web/components/inline-selector.js +2 -2
  115. package/dist/web/components/instants-statement.js +9 -9
  116. package/dist/web/components/list-field.js +2 -2
  117. package/dist/web/components/metric-card.js +5 -5
  118. package/dist/web/components/one-time-secret-dialog.js +8 -8
  119. package/dist/web/components/option-selector.js +3 -3
  120. package/dist/web/components/page-header.js +2 -2
  121. package/dist/web/components/page-shell.js +2 -2
  122. package/dist/web/components/pager.js +2 -2
  123. package/dist/web/components/period-select.js +6 -6
  124. package/dist/web/components/query-state.js +6 -6
  125. package/dist/web/components/read-status.js +2 -2
  126. package/dist/web/components/record-list.js +3 -3
  127. package/dist/web/components/recovery-phrase-card.js +9 -9
  128. package/dist/web/components/secret-reveal-card.js +9 -9
  129. package/dist/web/components/setting-item.js +5 -5
  130. package/dist/web/components/settings-tile.js +7 -7
  131. package/dist/web/components/status-badge.js +5 -5
  132. package/dist/web/components/status-icon-badge.js +5 -5
  133. package/dist/web/components/stepper-number-input.js +2 -2
  134. package/dist/web/components/swap-input-card.js +16 -16
  135. package/dist/web/components/swap-step-list.js +2 -2
  136. package/dist/web/components/theme-toggle.js +3 -3
  137. package/dist/web/components/transaction-card.js +6 -6
  138. package/dist/web/components/trend-chart.js +10 -10
  139. package/dist/web/components/value-list.js +9 -9
  140. package/dist/web/components/wallet-asset-list.js +11 -11
  141. package/dist/web/components/withdraw-amount-input.js +4 -4
  142. package/dist/web/components/withdraw-confirmation.js +5 -5
  143. package/dist/web/components/withdraw-destination-input.js +2 -2
  144. package/dist/web/components/withdraw-success.js +2 -2
  145. package/dist/web/icons/index.js +2 -2
  146. package/dist/web/icons/public.js +12 -12
  147. package/dist/web/index.cjs +58 -31
  148. package/dist/web/index.d.cts +16 -4
  149. package/dist/web/index.d.ts +16 -4
  150. package/dist/web/index.js +337 -337
  151. package/dist/web/primitives/collapsible.js +2 -2
  152. package/dist/web/primitives/dialog.js +2 -2
  153. package/dist/web/primitives/drawer.js +3 -3
  154. package/dist/web/primitives/dropdown-menu.js +3 -3
  155. package/dist/web/primitives/icon-button.js +5 -5
  156. package/dist/web/primitives/icon.js +4 -4
  157. package/dist/web/primitives/menu-search.js +1 -1
  158. package/dist/web/primitives/number-input.js +2 -2
  159. package/dist/web/primitives/select.js +3 -3
  160. package/dist/web/primitives/table.js +3 -3
  161. package/dist/web/primitives/toast.js +2 -2
  162. package/dist/web/primitives/toaster.js +5 -5
  163. package/package.json +1 -1
  164. package/dist/web/{chunk-UHXOPILM.js → chunk-46KGJZSU.js} +3 -3
  165. package/dist/web/{chunk-2VAS6VYJ.js → chunk-7L35JISL.js} +3 -3
  166. package/dist/web/{chunk-4MLPMRXA.js → chunk-7L7DQFHJ.js} +3 -3
  167. package/dist/web/{chunk-VZF5C3C6.js → chunk-7VDPOFP7.js} +6 -6
  168. package/dist/web/{chunk-5PZ2XVWL.js → chunk-7Y7FEBKK.js} +3 -3
  169. package/dist/web/{chunk-C7YIQDGQ.js → chunk-A5LNLZWX.js} +3 -3
  170. package/dist/web/{chunk-DDMDRAD6.js → chunk-CLJMCDUS.js} +6 -6
  171. package/dist/web/{chunk-LZ723UCB.js → chunk-D2ZG6TZM.js} +3 -3
  172. package/dist/web/{chunk-ZPNGHBKB.js → chunk-DY72P3EE.js} +5 -5
  173. package/dist/web/{chunk-JWMFTRDC.js → chunk-ESAYAG7H.js} +7 -7
  174. package/dist/web/{chunk-VYQHGSK6.js → chunk-GCOOW7Y6.js} +7 -7
  175. package/dist/web/{chunk-TCFHH5TE.js → chunk-HBPFGIYS.js} +6 -6
  176. package/dist/web/{chunk-XCQGJYGF.js → chunk-IZCLPO4E.js} +3 -3
  177. package/dist/web/{chunk-6VKWG5FJ.js → chunk-LXDHO6BZ.js} +6 -6
  178. package/dist/web/{chunk-62HIDJCD.js → chunk-MKMZH4XD.js} +3 -3
  179. package/dist/web/{chunk-IMER4KGH.js → chunk-NHOCTXPF.js} +3 -3
  180. package/dist/web/{chunk-WURSWAKE.js → chunk-NXPVF5WX.js} +3 -3
  181. package/dist/web/{chunk-BY2KCPTX.js → chunk-OO7Y5FVA.js} +11 -11
  182. package/dist/web/{chunk-6IBQJIHT.js → chunk-Q2IXLUSM.js} +3 -3
  183. package/dist/web/{chunk-RV7Z3B3V.js → chunk-RA5YGBRB.js} +3 -3
  184. package/dist/web/{chunk-ZRIBB4EB.js → chunk-SIE2FP2T.js} +3 -3
  185. package/dist/web/{chunk-SJNOBBU5.js → chunk-U2UWLSDG.js} +3 -3
  186. package/dist/web/{chunk-2REWXJEN.js → chunk-Y276JDXI.js} +4 -4
  187. package/dist/web/{chunk-Z2SS7UJ4.js → chunk-YRRZ22OK.js} +3 -3
  188. package/dist/web/{chunk-A3XHFJ6J.js → chunk-Z3H2FQVX.js} +3 -3
  189. package/dist/web/{chunk-KIMWCG5N.js → chunk-ZDCKYQKS.js} +3 -3
@@ -10462,6 +10462,16 @@ function FilterChipGroup({
10462
10462
 
10463
10463
  // src/web/components/charts/core.tsx
10464
10464
  var import_jsx_runtime116 = require("react/jsx-runtime");
10465
+ var BAR_GAP = 2;
10466
+ var BAR_RADIUS = 4;
10467
+ function barPath(x, y, w, h, end) {
10468
+ const r = Math.min(BAR_RADIUS, w / 2, h / 2);
10469
+ if (end === "none" || r <= 0) return `M${x},${y}h${w}v${h}h${-w}Z`;
10470
+ if (end === "top") {
10471
+ return `M${x},${y + h}V${y + r}Q${x},${y} ${x + r},${y}H${x + w - r}Q${x + w},${y} ${x + w},${y + r}V${y + h}Z`;
10472
+ }
10473
+ return `M${x},${y}H${x + w - r}Q${x + w},${y} ${x + w},${y + r}V${y + h - r}Q${x + w},${y + h} ${x + w - r},${y + h}H${x}Z`;
10474
+ }
10465
10475
  var seriesColor = (slot) => `var(--series-${slot % chartSeriesLimit + 1})`;
10466
10476
  var defaultChartFormat = (value) => formatAmount(value);
10467
10477
  var TICK_FONT = 11;
@@ -10925,7 +10935,7 @@ function TrendChart({
10925
10935
  const barWidth = band >= 4 ? Math.min(band * 0.72, MAX_BAR_WIDTH) : Math.max(1, band - 0.75);
10926
10936
  const barOffset = (band - barWidth) / 2;
10927
10937
  const labelIndices = trendChartLabelIndices(count3, plotWidth / X_LABEL_SPACING);
10928
- const fillFor = (index) => textures[index] === "hatch" ? `url(#${idBase}-hatch-${index})` : toneFill[series[index].tone];
10938
+ const fillFor = (index) => textures[index] === "hatch" ? `url(#${idBase}-hatch-${index})` : `url(#${idBase}-fill-${index})`;
10929
10939
  const activePoint = active === null ? null : points[active];
10930
10940
  const readoutId = `${idBase}-readout`;
10931
10941
  const activeRows = activePoint ? series.map((s) => ({
@@ -10987,7 +10997,7 @@ function TrendChart({
10987
10997
  "aria-hidden": "true",
10988
10998
  children: [
10989
10999
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("defs", { children: series.map(
10990
- (s, index) => textures[index] === "hatch" ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Texture, { id: `${idBase}-hatch-${index}`, tone: s.tone, texture: "hatch" }, s.id) : null
11000
+ (s, index) => textures[index] === "hatch" ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Texture, { id: `${idBase}-hatch-${index}`, tone: s.tone, texture: "hatch" }, s.id) : /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(SolidFill, { id: `${idBase}-fill-${index}`, tone: s.tone }, s.id)
10991
11001
  ) }),
10992
11002
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("g", { "data-slot": "trend-chart-y-axis", children: ticks.map((tick, index) => /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("g", { children: [
10993
11003
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
@@ -11035,16 +11045,21 @@ function TrendChart({
11035
11045
  if (value <= 0) return null;
11036
11046
  const top = y(base + value);
11037
11047
  const bottom = y(base);
11048
+ const seam = base > 0 ? BAR_GAP : 0;
11038
11049
  base += value;
11050
+ const isTop = series.slice(seriesIndex + 1).every((next) => (point.values[next.id] ?? 0) <= 0);
11039
11051
  const hatched = textures[seriesIndex] === "hatch";
11040
11052
  return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
11041
- "rect",
11053
+ "path",
11042
11054
  {
11043
11055
  "data-series": s.id,
11044
- x: plotLeft + pointIndex * band + barOffset,
11045
- y: top,
11046
- width: barWidth,
11047
- height: Math.max(0.5, bottom - top - (seriesIndex > 0 ? 1 : 0)),
11056
+ d: barPath(
11057
+ plotLeft + pointIndex * band + barOffset,
11058
+ top,
11059
+ barWidth,
11060
+ Math.max(0.5, bottom - top - seam),
11061
+ isTop ? "top" : "none"
11062
+ ),
11048
11063
  fill: fillFor(seriesIndex),
11049
11064
  stroke: hatched ? toneFill[s.tone] : void 0,
11050
11065
  strokeWidth: hatched && barWidth >= 4 ? 1 : 0
@@ -11126,6 +11141,12 @@ function TrendChart({
11126
11141
  }
11127
11142
  );
11128
11143
  }
11144
+ function SolidFill({ id, tone }) {
11145
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
11146
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0%", style: { stopColor: `color-mix(in oklab, ${toneFill[tone]}, white 35%)` } }),
11147
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "100%", style: { stopColor: toneFill[tone] } })
11148
+ ] });
11149
+ }
11129
11150
  function Texture({
11130
11151
  id,
11131
11152
  tone,
@@ -11349,16 +11370,7 @@ function AreaChart2(props) {
11349
11370
  var import_react35 = require("react");
11350
11371
  var import_jsx_runtime119 = require("react/jsx-runtime");
11351
11372
  var MAX_BAR = 24;
11352
- var GAP = 2;
11353
- var RADIUS = 4;
11354
- function barPath(x, y, w, h, end) {
11355
- const r = Math.min(RADIUS, w / 2, h / 2);
11356
- if (end === "none" || r <= 0) return `M${x},${y}h${w}v${h}h${-w}Z`;
11357
- if (end === "top") {
11358
- return `M${x},${y + h}V${y + r}Q${x},${y} ${x + r},${y}H${x + w - r}Q${x + w},${y} ${x + w},${y + r}V${y + h}Z`;
11359
- }
11360
- return `M${x},${y}H${x + w - r}Q${x + w},${y} ${x + w},${y + r}V${y + h - r}Q${x + w},${y + h} ${x + w - r},${y + h}H${x}Z`;
11361
- }
11373
+ var GAP = BAR_GAP;
11362
11374
  function BarChart2({
11363
11375
  data,
11364
11376
  series: allSeries,
@@ -11822,6 +11834,7 @@ function BarList({
11822
11834
  max,
11823
11835
  sort = "none",
11824
11836
  showPercent = true,
11837
+ labelWidth,
11825
11838
  empty,
11826
11839
  className,
11827
11840
  ...head
@@ -11832,40 +11845,54 @@ function BarList({
11832
11845
  const sum = rows.reduce((acc, item) => acc + Math.max(0, item.value), 0);
11833
11846
  const percentOf = (item) => formatPercent(item.percent ?? (sum > 0 ? Math.max(0, item.value) / sum : 0));
11834
11847
  const framed = head.title !== void 0 || (head.timeframes?.length ?? 0) > 0;
11848
+ const label_ = labelWidth ? `minmax(0,${labelWidth})` : "auto";
11849
+ const wideColumns = showPercent ? `${label_} 1fr auto auto` : `${label_} 1fr auto`;
11835
11850
  const list = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
11836
11851
  "ol",
11837
11852
  {
11838
11853
  "data-slot": "bar-list",
11839
11854
  "aria-label": label,
11840
11855
  className: cn(
11841
- "m-0 grid list-none items-center gap-x-3 gap-y-2 p-0 text-caption",
11856
+ "m-0 grid list-none gap-y-3 p-0 text-caption sm:items-center sm:gap-x-3 sm:gap-y-2",
11857
+ "sm:[grid-template-columns:var(--bar-list-columns)]",
11842
11858
  // Under a head, a little more air than the plots' own top margin.
11843
11859
  framed && "pt-2",
11844
- showPercent ? "grid-cols-[auto_1fr_auto_auto]" : "grid-cols-[auto_1fr_auto]",
11845
11860
  className
11846
11861
  ),
11862
+ style: { "--bar-list-columns": wideColumns },
11847
11863
  children: rows.map((item) => {
11848
11864
  const share = Math.max(0, item.value) / top;
11849
11865
  return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
11850
11866
  "li",
11851
11867
  {
11852
11868
  "data-slot": "bar-list-row",
11853
- className: "col-span-full grid grid-cols-subgrid items-center",
11869
+ className: cn(
11870
+ // Narrow: label and value on one line, the bar under them.
11871
+ "grid items-baseline gap-x-3 gap-y-1.5",
11872
+ showPercent ? "grid-cols-[minmax(0,1fr)_auto_auto]" : "grid-cols-[minmax(0,1fr)_auto]",
11873
+ "sm:col-span-full sm:grid-cols-subgrid sm:items-center sm:gap-y-0"
11874
+ ),
11854
11875
  children: [
11855
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "max-w-[10rem] truncate text-muted-foreground", children: item.label }),
11856
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "h-2 overflow-hidden rounded-full bg-secondary/15 shadow-inner", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
11876
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: cn("min-w-0 truncate text-muted-foreground", !labelWidth && "sm:max-w-[10rem]"), children: item.label }),
11877
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
11857
11878
  "span",
11858
11879
  {
11859
- className: "block h-full rounded-full",
11860
- style: {
11861
- width: `${share * 100}%`,
11862
- // A non-zero value keeps a sliver, so it never reads as zero.
11863
- minWidth: item.value > 0 ? 4 : 0,
11864
- background: seriesColor(0)
11865
- }
11880
+ className: "order-last col-span-full h-2 overflow-hidden rounded-full bg-primary/15 shadow-inner sm:order-none sm:col-span-1",
11881
+ "aria-hidden": "true",
11882
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
11883
+ "span",
11884
+ {
11885
+ className: "block h-full rounded-full bg-primary bg-gradient-primary",
11886
+ style: {
11887
+ width: `${share * 100}%`,
11888
+ // A non-zero value keeps a sliver, so it never reads as zero.
11889
+ minWidth: item.value > 0 ? 4 : 0
11890
+ }
11891
+ }
11892
+ )
11866
11893
  }
11867
- ) }),
11868
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-right font-semibold tabular-nums text-foreground", children: item.valueText ?? formatValue(item.value) }),
11894
+ ),
11895
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "whitespace-nowrap text-right font-semibold tabular-nums text-foreground", children: item.valueText ?? formatValue(item.value) }),
11869
11896
  showPercent && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-right tabular-nums text-muted-foreground", children: percentOf(item) })
11870
11897
  ]
11871
11898
  },
@@ -3041,7 +3041,6 @@ interface ChartDatum {
3041
3041
  detail?: string;
3042
3042
  values: Readonly<Record<string, number>>;
3043
3043
  }
3044
- /** The series colour for a slot. Slots past the palette are a bug, not a new hue. */
3045
3044
  declare const seriesColor: (slot: number) => string;
3046
3045
  /**
3047
3046
  * Value-axis ticks that only name values the chart reaches: from zero, round
@@ -3386,6 +3385,13 @@ interface BarListProps extends ChartTitleProps {
3386
3385
  sort?: 'desc' | 'none';
3387
3386
  /** Prints each row's percentage after its value. On by default. */
3388
3387
  showPercent?: boolean;
3388
+ /**
3389
+ * A fixed width for the label column, as a CSS length ("8rem"). Lists that
3390
+ * sit one under another (one per asset, say) each size their labels to
3391
+ * their own, so their bars start at different points; one width lines them
3392
+ * up. Longer labels are truncated. Defaults to the longest label.
3393
+ */
3394
+ labelWidth?: string;
3389
3395
  empty?: ReactNode;
3390
3396
  className?: string;
3391
3397
  }
@@ -3398,11 +3404,17 @@ interface BarListProps extends ChartTitleProps {
3398
3404
  * Given a `title` or `timeframes`, it carries the common chart head (title,
3399
3405
  * timeframe, the chart / table switch) like the other charts.
3400
3406
  *
3401
- * One series, so one colour (series slot 1) for every bar: colouring nominal
3407
+ * One series, so one fill for every bar: the primary gradient on a lighter
3408
+ * step of the same colour, as `Meter` draws its normal state, so a bar list
3409
+ * and a meter on one page read as the same kind of mark. Colouring nominal
3402
3410
  * rows darker-where-bigger would re-encode what the bar length already shows.
3403
- * Rows separate by spacing on the muted track, never by dividers.
3411
+ * Rows separate by spacing on the track, never by dividers.
3412
+ *
3413
+ * On a phone the label and value share the top line and the bar runs the full
3414
+ * width under them, so a long label or value never squeezes the bar to a
3415
+ * sliver.
3404
3416
  */
3405
- declare function BarList({ items, label, formatValue, max, sort, showPercent, empty, className, ...head }: BarListProps): react_jsx_runtime.JSX.Element;
3417
+ declare function BarList({ items, label, formatValue, max, sort, showPercent, labelWidth, empty, className, ...head }: BarListProps): react_jsx_runtime.JSX.Element;
3406
3418
 
3407
3419
  interface DonutSegment {
3408
3420
  id: string;
@@ -3041,7 +3041,6 @@ interface ChartDatum {
3041
3041
  detail?: string;
3042
3042
  values: Readonly<Record<string, number>>;
3043
3043
  }
3044
- /** The series colour for a slot. Slots past the palette are a bug, not a new hue. */
3045
3044
  declare const seriesColor: (slot: number) => string;
3046
3045
  /**
3047
3046
  * Value-axis ticks that only name values the chart reaches: from zero, round
@@ -3386,6 +3385,13 @@ interface BarListProps extends ChartTitleProps {
3386
3385
  sort?: 'desc' | 'none';
3387
3386
  /** Prints each row's percentage after its value. On by default. */
3388
3387
  showPercent?: boolean;
3388
+ /**
3389
+ * A fixed width for the label column, as a CSS length ("8rem"). Lists that
3390
+ * sit one under another (one per asset, say) each size their labels to
3391
+ * their own, so their bars start at different points; one width lines them
3392
+ * up. Longer labels are truncated. Defaults to the longest label.
3393
+ */
3394
+ labelWidth?: string;
3389
3395
  empty?: ReactNode;
3390
3396
  className?: string;
3391
3397
  }
@@ -3398,11 +3404,17 @@ interface BarListProps extends ChartTitleProps {
3398
3404
  * Given a `title` or `timeframes`, it carries the common chart head (title,
3399
3405
  * timeframe, the chart / table switch) like the other charts.
3400
3406
  *
3401
- * One series, so one colour (series slot 1) for every bar: colouring nominal
3407
+ * One series, so one fill for every bar: the primary gradient on a lighter
3408
+ * step of the same colour, as `Meter` draws its normal state, so a bar list
3409
+ * and a meter on one page read as the same kind of mark. Colouring nominal
3402
3410
  * rows darker-where-bigger would re-encode what the bar length already shows.
3403
- * Rows separate by spacing on the muted track, never by dividers.
3411
+ * Rows separate by spacing on the track, never by dividers.
3412
+ *
3413
+ * On a phone the label and value share the top line and the bar runs the full
3414
+ * width under them, so a long label or value never squeezes the bar to a
3415
+ * sliver.
3404
3416
  */
3405
- declare function BarList({ items, label, formatValue, max, sort, showPercent, empty, className, ...head }: BarListProps): react_jsx_runtime.JSX.Element;
3417
+ declare function BarList({ items, label, formatValue, max, sort, showPercent, labelWidth, empty, className, ...head }: BarListProps): react_jsx_runtime.JSX.Element;
3406
3418
 
3407
3419
  interface DonutSegment {
3408
3420
  id: string;