gridsmith-ui 0.30.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -1
- package/dist/charts.js +21 -8
- package/dist/charts.js.map +1 -1
- package/dist/chat.js +7 -7
- package/dist/{chunk-INGF2CPW.js → chunk-6C2IUMY7.js} +3 -3
- package/dist/{chunk-INGF2CPW.js.map → chunk-6C2IUMY7.js.map} +1 -1
- package/dist/{chunk-RHWTMTU5.js → chunk-DBHVJ7Z3.js} +5 -49
- package/dist/chunk-DBHVJ7Z3.js.map +1 -0
- package/dist/chunk-IELIF4PJ.js +110 -0
- package/dist/chunk-IELIF4PJ.js.map +1 -0
- package/dist/{chunk-Z4MCD73B.js → chunk-ISONVOA7.js} +7 -7
- package/dist/{chunk-Z4MCD73B.js.map → chunk-ISONVOA7.js.map} +1 -1
- package/dist/{chunk-UNS4TGGK.js → chunk-KMKBOTFR.js} +78 -26
- package/dist/chunk-KMKBOTFR.js.map +1 -0
- package/dist/{chunk-6A5RHW2W.js → chunk-NEUWZUK6.js} +4 -5
- package/dist/chunk-NEUWZUK6.js.map +1 -0
- package/dist/{chunk-NLXQ323J.js → chunk-OVHBQT3Z.js} +5 -4
- package/dist/chunk-OVHBQT3Z.js.map +1 -0
- package/dist/{chunk-KTPGMJUK.js → chunk-OX3NNMWG.js} +4 -4
- package/dist/{chunk-KTPGMJUK.js.map → chunk-OX3NNMWG.js.map} +1 -1
- package/dist/{chunk-OIOII5L6.js → chunk-R5QXMNW7.js} +210 -17
- package/dist/chunk-R5QXMNW7.js.map +1 -0
- package/dist/chunk-SJZWEBHL.js +58 -0
- package/dist/chunk-SJZWEBHL.js.map +1 -0
- package/dist/{chunk-NI5542ZM.js → chunk-SLRTSBCJ.js} +58 -22
- package/dist/chunk-SLRTSBCJ.js.map +1 -0
- package/dist/{chunk-F2BNJSON.js → chunk-T52LAFKG.js} +71 -69
- package/dist/chunk-T52LAFKG.js.map +1 -0
- package/dist/{chunk-GQVBZ4GW.js → chunk-UDJOIVKQ.js} +5 -108
- package/dist/chunk-UDJOIVKQ.js.map +1 -0
- package/dist/{chunk-Q36JVJX4.js → chunk-ULCACQSA.js} +4 -4
- package/dist/{chunk-Q36JVJX4.js.map → chunk-ULCACQSA.js.map} +1 -1
- package/dist/{chunk-HP7WUZPK.js → chunk-WIUGPZOH.js} +10 -3
- package/dist/chunk-WIUGPZOH.js.map +1 -0
- package/dist/{chunk-JTU7OBYJ.js → chunk-YL5KD5RC.js} +4 -3
- package/dist/chunk-YL5KD5RC.js.map +1 -0
- package/dist/data-grid.js +9 -9
- package/dist/editor-mentions.js +4 -5
- package/dist/editor-mentions.js.map +1 -1
- package/dist/editor.js +9 -6
- package/dist/editor.js.map +1 -1
- package/dist/index.js +178 -91
- package/dist/index.js.map +1 -1
- package/dist/kanban.js +12 -11
- package/dist/kanban.js.map +1 -1
- package/dist/resizable.js +43 -13
- package/dist/resizable.js.map +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/virtualized.d.ts +6 -1
- package/dist/virtualized.js +14 -11
- package/dist/virtualized.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6A5RHW2W.js.map +0 -1
- package/dist/chunk-F2BNJSON.js.map +0 -1
- package/dist/chunk-GQVBZ4GW.js.map +0 -1
- package/dist/chunk-HP7WUZPK.js.map +0 -1
- package/dist/chunk-JTU7OBYJ.js.map +0 -1
- package/dist/chunk-NI5542ZM.js.map +0 -1
- package/dist/chunk-NLXQ323J.js.map +0 -1
- package/dist/chunk-OIOII5L6.js.map +0 -1
- package/dist/chunk-RHWTMTU5.js.map +0 -1
- package/dist/chunk-UNS4TGGK.js.map +0 -1
- package/dist/chunk-WH2FUFAC.js +0 -15
- package/dist/chunk-WH2FUFAC.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
# gridsmith-ui changelog
|
|
2
2
|
|
|
3
|
-
## Unreleased (0.30.
|
|
3
|
+
## Unreleased (0.30.1)
|
|
4
|
+
|
|
5
|
+
**Added.**
|
|
6
|
+
- **VirtualizedList's name.** `aria-label` names the list for the Tab stop it becomes while it scrolls with nothing in it to Tab to ("Activity log"; default "List").
|
|
7
|
+
|
|
8
|
+
**Fixed.**
|
|
9
|
+
- **The Sidebar's Collapse button keeps focus.** Pressing it by keyboard drew a new button each time, so focus fell to the page; it now stays on the button, which says what it will do next ("Expand sidebar").
|
|
10
|
+
- **A button that turns itself off, or goes, hands focus on.** Pagination's Previous and Next at the first or last page, TransferList's move buttons once nothing is left to move, BulkActionBar's Clear selection and ChatMessageList's suggestions each left focus on the page. Focus now goes on: to the page now current, to the button that moves the other way, to the select-all box of the Table under the bar, to the message field; else to the nearest control still there.
|
|
11
|
+
- **Focus never falls to the page when a whole list goes.** A row's menu action that empties its list, on a page that swaps the table for its empty state, left focus on the page, at once or after a server round trip. It now goes to what took the list's place, its first control, else its heading, else to the nearest container's.
|
|
12
|
+
- **An overlay opened from one that closed as it opened gives focus back.** A preview dialog's "Edit details" that swaps the preview for an edit drawer left the drawer nothing to give focus back to. When the drawer closes, focus now goes to the preview's own opener, the card, once the overlay its opener sat in has closed.
|
|
13
|
+
- **A StackedList or Table item the page takes away while its button has focus hands focus on.** An alert's Acknowledge that filters the alert out of the list left focus on the page. Focus now goes to the same button in the item before, else in the item after; with the list gone, to what took its place, else the section's heading. Focus the person had moved elsewhere stays there.
|
|
14
|
+
- **A panel open from the start gives focus back as it closes.** A CornerPanel or AsidePanel open as the page loaded had no opener, so closing it by Escape left focus on the page. Focus now goes to the control that names it, its Launcher, else to the nearest control where the panel sat.
|
|
15
|
+
- **An infinite list holds while its Load more has keyboard focus.** The list loaded more as the button came into view, which keyboard focus also does, so each load pushed the focused button off the screen again. While the button has keyboard focus the list waits for Enter, and after that load the button is brought back into view.
|
|
16
|
+
- **A card moved from its menu keeps focus on its ⋯.** After a Move, focus went to the card itself. It now goes to the card's ⋯ in its new place, the button that opened the menu, as every menu gives focus back to its button; a refused move leaves it there too.
|
|
17
|
+
- **The shell's phone menu is modal with the navbar in it, and is named.** Under the navbar it was marked modal but let Tab out to the page, and it had no name. While it's open the page behind is now inert, Tab cycles through the navbar and the menu, Escape closes it, and it's named "Menu". The stacked shell's menu, with no navbar above it, traps as before.
|
|
18
|
+
- **A scroll area with nothing in it to Tab to is a Tab stop.** A Drawer's or Dialog's body of text, VirtualizedList, the shell's `<main>` on a page with no control, the Calendar's day headers on a phone, the chat's message list and the Table's phone list scrolled out of a keyboard's reach, since Safari makes no such area focusable by itself. Each is now a named Tab stop while it scrolls and holds nothing to Tab to, drawn with the inset ring SplitView's panes have. `<main>` keeps its landmark and stays the skip link's target, which draws no ring.
|
|
19
|
+
- **The Dropdown's open list is named and in the keyboard's reach.** The list had no name, and no option was a Tab stop, so a list long enough to scroll was out of the keyboard's reach. It's now named by the field's label, its chosen option (else its first) is its one Tab stop, and a list that takes many choices says so. The arrows, Home and End move as before.
|
|
20
|
+
- **A collapsed or mini sidebar's links are named, and the current page says so.** A collapsed link had no name, its label undrawn and its tooltip only a description; it's now named by its label, with the same one tooltip. SidebarNav's current item and BottomNav's current tab are marked `aria-current="page"`, not by their colour alone.
|
|
21
|
+
- **TreeView's three-state checkbox is named** by its node's label.
|
|
22
|
+
- **A chart's data rows no longer give its shapes their roles.** Charts drew each bar, slice, stage, track and point with its data row's own fields, so a row with a `role`, `aria-label` or `id` field (a chart of people by role) gave the shape that role. Each now draws from its own props.
|
|
23
|
+
- **Escape asks before throwing away a half-typed tag.** TagInput makes typed text a tag on Enter, a comma or leaving the field, so the other ways out of an overlay asked; Escape closed a Drawer or Dialog with the text lost when the page's `dirty` counted only committed tags. Text a control holds but hasn't committed now always makes the overlay ask, whatever the page's `dirty` says.
|
|
24
|
+
- **SplitView's phone Back works without `onDetailClose`.** A page that passed `detailOpen` but no `onDetailClose` drew a Back on phones that did nothing, leaving the person stranded away from the list. Without the handler the view now shows the list itself, and a press in the list brings the detail back; a development warning names the missing handler. On a phone, the detail giving way to the list leaves focus on the list's chosen item.
|
|
25
|
+
- **A control at the foot of a page shows its whole outline.** The shell's `<main>` keeps the outline's reach at its foot as scroll padding, so a control Tab reaches across the bottom edge comes into view with its outline, the page's last control included. A Checkbox's input now covers its box, so Tab brings the box into view, outline and all; its 1 px hidden input had let the outline be cut by up to 16 px.
|
|
26
|
+
- **A minimal sidebar under a floating navbar keeps room for its first link's outline,** which dropping its top inset had cut by 4 px.
|
|
27
|
+
- **Icon buttons that had no tooltip show the library's one tooltip, their name:** the Drawer's and Dialog's close, Pagination's Previous and Next, a Dropdown's chosen-option remove, the date, date-range and time pickers' buttons, Card's More actions, the Table's row toggle, Tag's remove and the Carousel's arrows. RichTextEditor's toolbar buttons are named by their words and show the same tooltip in place of the browser's title, and its toggles say whether they're on (`aria-pressed`).
|
|
28
|
+
- **A timeline's "Previous period" is unavailable at its start, and "Next period" at its end,** drawn as Zoom's buttons are at their limits. Each had done nothing there.
|
|
29
|
+
- **A Table column of elements sorts only where it can.** Sorted by the Table, a column marked `sortable` whose cells are elements with no `sortValue` drew a sort button that sorted nothing; it now draws none, and a development warning says why. Sorted by the page (`sortKey` with `onSortChange`), the header shows the page's sort whatever its cells are; it had never marked a column of elements as sorted.
|
|
30
|
+
|
|
31
|
+
### Upgrade note for agents (0.30.0 → 0.30.1)
|
|
32
|
+
|
|
33
|
+
`^0.30.0` covers 0.30.1, so `npm update gridsmith-ui` brings it in. Nothing in an app's code changes, and the theme's tokens need no regenerating. What to check:
|
|
34
|
+
- **The Tab order.** A scroll area with nothing in it to Tab to is now a Tab stop while it scrolls: a Drawer's or Dialog's body of text, VirtualizedList, the shell's `<main>` on a page with no control, the Calendar's day headers on a phone, the chat's message list and the Table's phone list. The Dropdown's open list has one Tab stop, its chosen option. A test that counts Tab presses through such a page counts one more.
|
|
35
|
+
- **Where focus goes.** After a Kanban card's Move it's on the card's ⋯, not the card; after BulkActionBar's Clear selection, on the Table's select-all box. A test that expected focus on the page after a list emptied, or after an overlay with no opener closed, now finds it on a heading or a control.
|
|
36
|
+
- **A test that finds an editor toolbar button by its title.** RichTextEditor's toolbar buttons carry no `title`, their tooltip showing the words: find them by role and name (`getByRole('button', { name: 'Bold (Ctrl+B)' })`).
|
|
37
|
+
- **The shell's phone menu** is no longer `aria-modal`. While it's open, the page behind it is `inert`, so a test that reaches the page's controls with the menu open finds them inert.
|
|
38
|
+
- **A Table column marked `sortable` whose cells are elements** draws no sort button when the Table sorts the rows: give it a `sortValue`, or sort the rows in the page with `sortKey` and `onSortChange`, and then the header shows that sort.
|
|
39
|
+
- **A Drawer or Dialog holding a TagInput** asks before Escape closes it while text is typed that isn't yet a tag.
|
|
40
|
+
- **SplitView with `detailOpen` and no `onDetailClose`** shows the list on a phone's Back, and says so in development. A page that closes its detail itself passes `onDetailClose`, as before.
|
|
41
|
+
- **VirtualizedList** takes `aria-label`, its name as a Tab stop.
|
|
42
|
+
|
|
43
|
+
## 0.30.0 — 15 October 2026
|
|
4
44
|
|
|
5
45
|
**Added.**
|
|
6
46
|
- **Days a picker can't choose, beyond `min` and `max`.** DatePicker and DateRangePicker take `disabledDates`: a function of the day, or weekdays as a shorthand (`[0, 6]` for weekends; the `DisabledDates` type). An excluded day can't be chosen by a click, the keyboard or typing, a range's ends are never excluded days though the range may span them, and DatePicker's Today is unavailable when today can't be chosen.
|
package/dist/charts.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { TITLE_TEXT, Skeleton } from './chunk-
|
|
2
|
+
import { TITLE_TEXT, Skeleton } from './chunk-6C2IUMY7.js';
|
|
3
3
|
import { useFormatLocale, useHydrated } from './chunk-LJYSVZMI.js';
|
|
4
4
|
import { formatLocale } from './chunk-7QLXYRPD.js';
|
|
5
5
|
import { elementType } from './chunk-NKUCS67T.js';
|
|
6
6
|
import { mergeRefs } from './chunk-7Q46JXSK.js';
|
|
7
|
-
import { cn, GLASS_SURFACE } from './chunk-
|
|
7
|
+
import { cn, GLASS_SURFACE } from './chunk-YL5KD5RC.js';
|
|
8
8
|
import { createContext, forwardRef, useContext, useRef, useState, useMemo, useLayoutEffect, useEffect, useId, useSyncExternalStore, Children, isValidElement } from 'react';
|
|
9
|
-
import { ResponsiveContainer, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Bar, LineChart as LineChart$1, Line, AreaChart as AreaChart$1, Area, PieChart as PieChart$1, Pie, Cell, ComposedChart, ScatterChart as ScatterChart$1, ZAxis, Scatter, RadarChart as RadarChart$1, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, RadialBarChart as RadialBarChart$1, RadialBar, FunnelChart as FunnelChart$1, Funnel, LabelList, Treemap, Sankey, Text, Legend, getNiceTickValues, Rectangle } from 'recharts';
|
|
9
|
+
import { ResponsiveContainer, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Bar, LineChart as LineChart$1, Line, AreaChart as AreaChart$1, Area, PieChart as PieChart$1, Pie, Cell, ComposedChart, ScatterChart as ScatterChart$1, ZAxis, Scatter, Symbols, RadarChart as RadarChart$1, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, RadialBarChart as RadialBarChart$1, RadialBar, FunnelChart as FunnelChart$1, Funnel, LabelList, Treemap, Sankey, Text, Legend, getNiceTickValues, Rectangle } from 'recharts';
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
11
11
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
12
12
|
|
|
@@ -604,6 +604,14 @@ function seriesValues(data, keys, stacked = false) {
|
|
|
604
604
|
var hasLabel = (label) => label != null && label !== "" && typeof label !== "number";
|
|
605
605
|
var entryName = (entry, label) => !hasLabel(label) && typeof entry.payload?.name === "string" && entry.payload.name || entry.name;
|
|
606
606
|
var entryValue = (entry, format, locale) => typeof entry.value === "number" ? format ? format(entry.value, entry.dataKey) : entry.value.toLocaleString(locale) : entry.value;
|
|
607
|
+
var DRAWING = /* @__PURE__ */ new Set(["x", "y", "cx", "cy", "width", "height", "r", "radius", "innerRadius", "outerRadius", "startAngle", "endAngle", "cornerRadius", "upperWidth", "lowerWidth", "size", "fill", "stroke", "strokeWidth", "opacity", "fillOpacity", "strokeOpacity", "className"]);
|
|
608
|
+
function withoutRowFields(props) {
|
|
609
|
+
const row = props.payload;
|
|
610
|
+
if (!row || typeof row !== "object") return props;
|
|
611
|
+
const own = {};
|
|
612
|
+
for (const [key, value] of Object.entries(props)) if (DRAWING.has(key) || !(key in row)) own[key] = value;
|
|
613
|
+
return own;
|
|
614
|
+
}
|
|
607
615
|
function tooltipAnnouncement(label, payload, format, locale = formatLocale()) {
|
|
608
616
|
if (!payload?.length) return "";
|
|
609
617
|
const values = payload.map((entry) => `${entryName(entry, label)} ${entryValue(entry, format, locale)}`).join(", ");
|
|
@@ -867,7 +875,7 @@ function barShape(bars, index, stacked, radius, horizontal = false) {
|
|
|
867
875
|
const value = Number(row[b.dataKey]);
|
|
868
876
|
return !(down ? value < 0 : value > 0);
|
|
869
877
|
});
|
|
870
|
-
return /* @__PURE__ */ jsx(Rectangle, { ...props, radius: onTop ? round : square });
|
|
878
|
+
return /* @__PURE__ */ jsx(Rectangle, { ...withoutRowFields(props), radius: onTop ? round : square });
|
|
871
879
|
};
|
|
872
880
|
return Shape;
|
|
873
881
|
}
|
|
@@ -1209,12 +1217,13 @@ var PieChart = markChart(forwardRef(function PieChart2({
|
|
|
1209
1217
|
const colors = useChartColors(data.length, false);
|
|
1210
1218
|
const isAnimated = useChartAnimation(animated);
|
|
1211
1219
|
const renderLabel = showLabels ? ({ percent }) => `${((percent ?? 0) * 100).toFixed(0)}%` : false;
|
|
1220
|
+
const chartData = data.map((d) => ({ name: d.name, value: d.value }));
|
|
1212
1221
|
if (!data?.length) return null;
|
|
1213
1222
|
return /* @__PURE__ */ jsx(ChartWrapper, { ref, height, size: { model: "square" }, chart: "pie", className, "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(PieChart$1, { accessibilityLayer: true, children: [
|
|
1214
1223
|
/* @__PURE__ */ jsx(
|
|
1215
1224
|
Pie,
|
|
1216
1225
|
{
|
|
1217
|
-
data,
|
|
1226
|
+
data: chartData,
|
|
1218
1227
|
dataKey: "value",
|
|
1219
1228
|
nameKey: "name",
|
|
1220
1229
|
cx: "50%",
|
|
@@ -1498,7 +1507,8 @@ var ScatterChart = markChart(forwardRef(function ScatterChart2({
|
|
|
1498
1507
|
name: series.name,
|
|
1499
1508
|
data: series.points,
|
|
1500
1509
|
fill: colors[i],
|
|
1501
|
-
isAnimationActive: isAnimated
|
|
1510
|
+
isAnimationActive: isAnimated,
|
|
1511
|
+
shape: (p) => /* @__PURE__ */ jsx(Symbols, { ...withoutRowFields(p), type: "circle" })
|
|
1502
1512
|
},
|
|
1503
1513
|
series.name
|
|
1504
1514
|
))
|
|
@@ -1580,7 +1590,9 @@ var RadialBarChart = markChart(forwardRef(function RadialBarChart2({
|
|
|
1580
1590
|
const colors = useChartColors(data.length, false);
|
|
1581
1591
|
const isAnimated = useChartAnimation(animated);
|
|
1582
1592
|
const chartData = data.map((d, i) => ({
|
|
1583
|
-
|
|
1593
|
+
name: d.name,
|
|
1594
|
+
value: d.value,
|
|
1595
|
+
...d.max !== void 0 ? { max: d.max } : {},
|
|
1584
1596
|
fill: colors[i % colors.length]
|
|
1585
1597
|
}));
|
|
1586
1598
|
if (!data?.length) return null;
|
|
@@ -1624,7 +1636,8 @@ var FunnelChart = markChart(forwardRef(function FunnelChart2({
|
|
|
1624
1636
|
const colors = useChartColors(data.length, false);
|
|
1625
1637
|
const isAnimated = useChartAnimation(animated);
|
|
1626
1638
|
const chartData = data.map((d, i) => ({
|
|
1627
|
-
|
|
1639
|
+
name: d.name,
|
|
1640
|
+
value: d.value,
|
|
1628
1641
|
fill: colors[i % colors.length]
|
|
1629
1642
|
}));
|
|
1630
1643
|
if (!data?.length) return null;
|