@bysages/react 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/{ai-response-jZy-0Tvv.mjs → ai-response-BfKTmtCt.mjs} +8 -4
  2. package/dist/components/ai/index.d.mts +2 -2
  3. package/dist/components/ai/index.mjs +25 -10
  4. package/dist/components/ai-attachments/index.mjs +3 -1
  5. package/dist/components/ai-prompt-input/index.d.mts +1 -1
  6. package/dist/components/ai-prompt-input/index.mjs +8 -4
  7. package/dist/components/ai-response/index.d.mts +4 -2
  8. package/dist/components/ai-response/index.mjs +1 -1
  9. package/dist/components/autocomplete/index.mjs +3 -1
  10. package/dist/components/banner/index.mjs +21 -17
  11. package/dist/components/breadcrumb/index.d.mts +3 -8
  12. package/dist/components/breadcrumb/index.mjs +11 -1
  13. package/dist/components/cascade-select/index.mjs +6 -2
  14. package/dist/components/command/index.mjs +9 -3
  15. package/dist/components/config-provider/index.d.mts +5 -2
  16. package/dist/components/config-provider/index.mjs +3 -2
  17. package/dist/components/data-view/index.mjs +4 -2
  18. package/dist/components/dynamic-input/index.mjs +3 -1
  19. package/dist/components/file-upload/index.d.mts +8 -1
  20. package/dist/components/file-upload/index.mjs +20 -1
  21. package/dist/components/float-button/index.mjs +3 -1
  22. package/dist/components/image/index.d.mts +7 -1
  23. package/dist/components/image/index.mjs +3 -1
  24. package/dist/components/image-viewer/index.d.mts +7 -1
  25. package/dist/components/image-viewer/index.mjs +8 -4
  26. package/dist/components/json-tree-view/index.d.mts +3 -3
  27. package/dist/components/json-tree-view/index.mjs +17 -4
  28. package/dist/components/layout/index.mjs +3 -1
  29. package/dist/components/list/index.d.mts +5 -4
  30. package/dist/components/list/index.mjs +10 -1
  31. package/dist/components/menubar/index.mjs +1 -0
  32. package/dist/components/order-list/index.mjs +8 -9
  33. package/dist/components/select/index.d.mts +1 -1
  34. package/dist/components/select/index.mjs +1 -1
  35. package/dist/components/spinner/index.mjs +3 -1
  36. package/dist/components/split-button/index.mjs +3 -1
  37. package/dist/components/steps/index.d.mts +5 -1
  38. package/dist/components/steps/index.mjs +10 -1
  39. package/dist/components/table/index.mjs +19 -15
  40. package/dist/components/terminal/index.mjs +5 -2
  41. package/dist/components/toc/index.d.mts +7 -1
  42. package/dist/components/toc/index.mjs +13 -1
  43. package/dist/components/transfer/index.mjs +6 -4
  44. package/dist/components/tree-select/index.mjs +4 -2
  45. package/dist/components/tree-view/index.d.mts +10 -1
  46. package/dist/components/tree-view/index.mjs +22 -1
  47. package/dist/components/virtual-list/index.mjs +1 -0
  48. package/dist/glyph-VI989p8H.mjs +14 -0
  49. package/dist/{index-CsfxYv6J.d.mts → index-Dn5mHf1g.d.mts} +6 -21
  50. package/dist/{index-DFN9F5Zt.d.mts → index-Iy8m0Qev.d.mts} +1 -1
  51. package/dist/index.d.mts +3 -3
  52. package/dist/index.mjs +5 -5
  53. package/dist/messages-1jJWtaYU.mjs +16 -0
  54. package/dist/{select-D1xiT1oJ.mjs → select-eAHutw56.mjs} +3 -1
  55. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
2
  import { Button } from "../button/index.mjs";
2
3
  import { ButtonGroup } from "../button-group/index.mjs";
3
4
  import { injectComponentStyle } from "@bysages/core";
@@ -33,8 +34,9 @@ const TOOL_GLYPHS = {
33
34
  rotate: () => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M20.49 12A8.5 8.5 0 1 1 18 6.06" }), /* @__PURE__ */ jsx("path", { d: "M20.5 3.5v4h-4" })] }),
34
35
  close: () => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" }), /* @__PURE__ */ jsx("path", { d: "M18 6 6 18" })] })
35
36
  };
36
- function ImageViewer({ src, alt = "", open, zoomable = true, onOpenChange }) {
37
+ function ImageViewer({ src, alt = "", open, zoomable = true, width, height, onOpenChange }) {
37
38
  injectComponentStyle("image-viewer");
39
+ const messages = useComponentMessages();
38
40
  const [localOpen, setLocalOpen] = useState(false);
39
41
  const [scale, setScale] = useState(1);
40
42
  const [rotation, setRotation] = useState(0);
@@ -92,14 +94,16 @@ function ImageViewer({ src, alt = "", open, zoomable = true, onOpenChange }) {
92
94
  "data-part": "viewport",
93
95
  src,
94
96
  alt,
97
+ width,
98
+ height,
95
99
  style: { transform: `scale(${scale}) rotate(${rotation}deg)` }
96
100
  }), /* @__PURE__ */ jsx("div", {
97
101
  "data-scope": "image-viewer",
98
102
  "data-part": "toolbar",
99
103
  children: /* @__PURE__ */ jsxs(ButtonGroup, { children: [
100
- zoomable ? [toolButton("Zoom in", TOOL_GLYPHS.zoomIn, () => zoom(SCALE_STEP)), toolButton("Zoom out", TOOL_GLYPHS.zoomOut, () => zoom(-.25))] : null,
101
- toolButton("Rotate 90 degrees", TOOL_GLYPHS.rotate, rotate),
102
- toolButton("Close", TOOL_GLYPHS.close, () => setOpen(false))
104
+ zoomable ? [toolButton(messages.imageViewer.zoomIn, TOOL_GLYPHS.zoomIn, () => zoom(SCALE_STEP)), toolButton(messages.imageViewer.zoomOut, TOOL_GLYPHS.zoomOut, () => zoom(-.25))] : null,
105
+ toolButton(messages.imageViewer.rotate, TOOL_GLYPHS.rotate, rotate),
106
+ toolButton(messages.imageViewer.close, TOOL_GLYPHS.close, () => setOpen(false))
103
107
  ] })
104
108
  })]
105
109
  })
@@ -1,7 +1,7 @@
1
1
  import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/react/json-tree-view";
2
2
  //#region src/components/json-tree-view/index.d.ts
3
- /** Ark's JsonTreeView, dressed in the paper-and-ink system: the tree-view
4
- * recipes re-scoped, with value nodes reading as tabular data. The API is
5
- * Ark's own — Root, Tree, plus createJsonTreeCollection. */
3
+ /** JsonTreeView, dressed in the paper-and-ink system: the tree-view
4
+ * recipes re-scoped, with value nodes reading as tabular data. The parts —
5
+ * Root, Tree, plus createJsonTreeCollection. */
6
6
  export declare const JsonTreeView: typeof JsonTreeView$1;
7
7
  //#endregion
@@ -1,10 +1,23 @@
1
+ import { t as glyphNode } from "../../glyph-VI989p8H.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
3
+ import { jsx } from "react/jsx-runtime";
2
4
  import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/react/json-tree-view";
5
+ import { chevron_right } from "@bysages/icons";
3
6
  //#region src/components/json-tree-view/index.tsx
4
- /** Ark's JsonTreeView, dressed in the paper-and-ink system: the tree-view
5
- * recipes re-scoped, with value nodes reading as tabular data. The API is
6
- * Ark's own — Root, Tree, plus createJsonTreeCollection. */
7
- const JsonTreeView = JsonTreeView$1;
7
+ /** The auto-rendered tree hands every branch its chevron from the
8
+ * `arrow` element — filled with the house glyph unless the consumer
9
+ * draws their own, so a JSON tree never opens as a bare indent. */
10
+ function JsonTreeViewTree(props) {
11
+ const { arrow = glyphNode(chevron_right), ...rest } = props;
12
+ return /* @__PURE__ */ jsx(JsonTreeView$1.Tree, {
13
+ ...rest,
14
+ arrow
15
+ });
16
+ }
17
+ /** JsonTreeView, dressed in the paper-and-ink system: the tree-view
18
+ * recipes re-scoped, with value nodes reading as tabular data. The parts —
19
+ * Root, Tree, plus createJsonTreeCollection. */
20
+ const JsonTreeView = Object.assign({}, JsonTreeView$1, { Tree: JsonTreeViewTree });
8
21
  injectComponentStyle("json-tree-view");
9
22
  //#endregion
10
23
  export { JsonTreeView };
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { createContext, useContext, useEffect, useRef, useState } from "react";
@@ -41,6 +42,7 @@ const Footer = region("Footer", "footer");
41
42
  const RESIZE_STEP = 16;
42
43
  function Sider({ collapsed = false, width: widthProp, collapsedWidth = "3.5rem", resizable = false, minWidth = "12rem", maxWidth = "24rem", style, onCollapsedChange, onWidthChange, children, ...rest }) {
43
44
  const layout = useContext(LAYOUT_CONTEXT);
45
+ const messages = useComponentMessages();
44
46
  const rail = useRef(null);
45
47
  const [dragging, setDragging] = useState(false);
46
48
  const [innerWidth, setInnerWidth] = useState(widthProp ?? "16rem");
@@ -97,7 +99,7 @@ function Sider({ collapsed = false, width: widthProp, collapsedWidth = "3.5rem",
97
99
  role: "separator",
98
100
  "aria-orientation": "vertical",
99
101
  tabIndex: 0,
100
- "aria-label": "Resize sidebar",
102
+ "aria-label": messages.sidebar.resize,
101
103
  "aria-valuenow": Math.round(rail.current ? rail.current.getBoundingClientRect().width : 0),
102
104
  onPointerDown,
103
105
  onPointerMove,
@@ -10,6 +10,10 @@ declare function Root({ bordered, hoverable, children, ...rest }: ListRootProps)
10
10
  declare namespace Root {
11
11
  var displayName: string;
12
12
  }
13
+ declare function Item({ children, ...attrs }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
14
+ declare namespace Item {
15
+ var displayName: string;
16
+ }
13
17
  /** The row's words: `title` and `description` ride their own slots, the
14
18
  * children follow them for anything else. */
15
19
  export interface ListContentProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
@@ -22,10 +26,7 @@ declare namespace Content {
22
26
  }
23
27
  export declare const List: typeof Root & {
24
28
  Root: typeof Root;
25
- Item: {
26
- ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
27
- displayName: string;
28
- };
29
+ Item: typeof Item;
29
30
  Leading: {
30
31
  ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
31
32
  displayName: string;
@@ -30,7 +30,16 @@ function Root({ bordered = false, hoverable = false, children, ...rest }) {
30
30
  });
31
31
  }
32
32
  Root.displayName = "ListRoot";
33
- const Item = part("Item", "li");
33
+ function Item({ children, ...attrs }) {
34
+ delete attrs.role;
35
+ return /* @__PURE__ */ jsx("li", {
36
+ ...attrs,
37
+ "data-scope": "list",
38
+ "data-part": "item",
39
+ children
40
+ });
41
+ }
42
+ Item.displayName = "ListItem";
34
43
  const Leading = part("Leading", "div");
35
44
  const Actions = part("Actions", "div");
36
45
  function Content({ title, description, children, ...rest }) {
@@ -17,6 +17,7 @@ function Menubar({ items, onSelect, children, ...rest }) {
17
17
  asChild: true,
18
18
  children: /* @__PURE__ */ jsx("button", {
19
19
  type: "button",
20
+ role: "menuitem",
20
21
  "data-scope": "menubar",
21
22
  "data-part": "trigger",
22
23
  children: group.label
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { useRef, useState } from "react";
@@ -29,6 +30,7 @@ function arrowGlyph(paths) {
29
30
  * touch keeps the buttons as its route. */
30
31
  function OrderList({ value, options, label, onValueChange, ...rest }) {
31
32
  injectComponentStyle("order-list");
33
+ const messages = useComponentMessages();
32
34
  const dragging = useRef(null);
33
35
  const [dropLine, setDropLine] = useState(null);
34
36
  const rows = value.map((entry) => options.find((option) => option.value === entry)).filter((option) => option != null);
@@ -69,9 +71,6 @@ function OrderList({ value, options, label, onValueChange, ...rest }) {
69
71
  }
70
72
  return /* @__PURE__ */ jsx("div", {
71
73
  ...rest,
72
- role: "listbox",
73
- "aria-label": label ?? void 0,
74
- "aria-multiselectable": false,
75
74
  "data-scope": "order-list",
76
75
  "data-part": "root",
77
76
  onDragLeave: (event) => {
@@ -81,12 +80,12 @@ function OrderList({ value, options, label, onValueChange, ...rest }) {
81
80
  children: /* @__PURE__ */ jsx("ol", {
82
81
  "data-scope": "order-list",
83
82
  "data-part": "list",
83
+ "aria-label": label ?? void 0,
84
84
  children: rows.map((option, index) => {
85
85
  const seam = dropLine && dropLine.index === index ? dropLine.before ? "top" : "bottom" : void 0;
86
86
  return /* @__PURE__ */ jsxs("li", {
87
- role: "option",
88
- "aria-selected": true,
89
87
  draggable: true,
88
+ "aria-roledescription": "Sortable item",
90
89
  "data-scope": "order-list",
91
90
  "data-part": "item",
92
91
  "data-dragging": dragging.current === option.value ? "" : void 0,
@@ -119,25 +118,25 @@ function OrderList({ value, options, label, onValueChange, ...rest }) {
119
118
  "data-part": "controls",
120
119
  children: [
121
120
  [
122
- "Move to top",
121
+ messages.orderList.toTop,
123
122
  ARROWS.top,
124
123
  -index,
125
124
  0
126
125
  ],
127
126
  [
128
- "Move up",
127
+ messages.orderList.moveUp,
129
128
  ARROWS.up,
130
129
  -1,
131
130
  0
132
131
  ],
133
132
  [
134
- "Move down",
133
+ messages.orderList.moveDown,
135
134
  ARROWS.down,
136
135
  1,
137
136
  rows.length - 1
138
137
  ],
139
138
  [
140
- "Move to bottom",
139
+ messages.orderList.toBottom,
141
140
  ARROWS.bottom,
142
141
  rows.length - 1 - index,
143
142
  rows.length - 1
@@ -1,2 +1,2 @@
1
- import { i as NativeSelectProps, n as NativeSelect, r as NativeSelectOption, t as Select } from "../../index-DFN9F5Zt.mjs";
1
+ import { i as NativeSelectProps, n as NativeSelect, r as NativeSelectOption, t as Select } from "../../index-Iy8m0Qev.mjs";
2
2
  export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select };
@@ -1,2 +1,2 @@
1
- import { n as NativeSelect, t as Select } from "../../select-D1xiT1oJ.mjs";
1
+ import { n as NativeSelect, t as Select } from "../../select-eAHutw56.mjs";
2
2
  export { NativeSelect, Select };
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  //#region src/components/spinner/index.tsx
@@ -5,10 +6,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
6
  * default — it reports progress without claiming attention. */
6
7
  function Spinner({ size = "md", children, ...rest }) {
7
8
  injectComponentStyle("spinner");
9
+ const messages = useComponentMessages();
8
10
  return /* @__PURE__ */ jsxs("span", {
9
11
  ...rest,
10
12
  role: "status",
11
- "aria-label": rest["aria-label"] ?? "Loading",
13
+ "aria-label": rest["aria-label"] ?? messages.spinner.loading,
12
14
  "data-scope": "spinner",
13
15
  "data-part": "root",
14
16
  "data-size": size,
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
2
  import { Button } from "../button/index.mjs";
2
3
  import { injectComponentStyle } from "@bysages/core";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -16,6 +17,7 @@ import { Menu } from "@ark-ui/react/menu";
16
17
  function SplitButton({ label, items = [], variant = "solid", tone = "ink", size = "md", disabled = false, onClick, onSelect, ...rest }) {
17
18
  injectComponentStyle("split-button");
18
19
  injectComponentStyle("menu");
20
+ const messages = useComponentMessages();
19
21
  return /* @__PURE__ */ jsxs("div", {
20
22
  ...rest,
21
23
  "data-scope": "split-button",
@@ -39,7 +41,7 @@ function SplitButton({ label, items = [], variant = "solid", tone = "ink", size
39
41
  "data-size": size,
40
42
  "data-square": "true",
41
43
  "data-motion": "ink-ripple lit",
42
- "aria-label": "More actions",
44
+ "aria-label": messages.more.actions,
43
45
  children: chevronDown()
44
46
  })
45
47
  }), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, { children: items.map((entry) => /* @__PURE__ */ jsx(Menu.Item, {
@@ -13,7 +13,11 @@ declare function StepsRoot({ size, ...rest }: StepsRootProps): import("react").J
13
13
  * PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
14
14
  * data-complete / data-current / data-incomplete.
15
15
  */
16
- export declare const Steps: Omit<typeof Steps$1, "Root"> & {
16
+ /** The machine wraps each tab in an item div; presentation keeps the
17
+ * tablist owned children legal while the tab itself keeps its role. */
18
+ declare function StepsItem(props: ComponentProps<typeof Steps$1.Item>): import("react").JSX.Element;
19
+ export declare const Steps: Omit<typeof Steps$1, "Root" | "Item"> & {
17
20
  Root: typeof StepsRoot;
21
+ Item: typeof StepsItem;
18
22
  };
19
23
  //#endregion
@@ -15,9 +15,18 @@ function StepsRoot({ size = "md", ...rest }) {
15
15
  * PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
16
16
  * data-complete / data-current / data-incomplete.
17
17
  */
18
+ /** The machine wraps each tab in an item div; presentation keeps the
19
+ * tablist owned children legal while the tab itself keeps its role. */
20
+ function StepsItem(props) {
21
+ return /* @__PURE__ */ jsx(Steps$1.Item, {
22
+ ...props,
23
+ role: "presentation"
24
+ });
25
+ }
18
26
  const Steps = {
19
27
  ...Steps$1,
20
- Root: StepsRoot
28
+ Root: StepsRoot,
29
+ Item: StepsItem
21
30
  };
22
31
  injectComponentStyle("steps");
23
32
  //#endregion
@@ -1,5 +1,6 @@
1
+ import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
1
2
  import { Pagination } from "../pagination/index.mjs";
2
- import { t as Select$1 } from "../../select-D1xiT1oJ.mjs";
3
+ import { t as Select$1 } from "../../select-eAHutw56.mjs";
3
4
  import { injectComponentStyle } from "@bysages/core";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { useEffect, useLayoutEffect, useMemo, useReducer, useRef } from "react";
@@ -121,8 +122,10 @@ function DataTable(rawProps) {
121
122
  10,
122
123
  20,
123
124
  50
124
- ], globalFilterPlaceholder = "Filter rows", emptyText = "No rows", reorderable = false } = props;
125
+ ], globalFilterPlaceholder, emptyText, reorderable = false } = props;
125
126
  const merge = props.merge;
127
+ const messages = useComponentMessages();
128
+ const globalFilterText = globalFilterPlaceholder ?? messages.table.filterAll;
126
129
  const virtual = virtualProp && !merge;
127
130
  const mergeMode = !virtualProp && !!merge;
128
131
  /** Features follow the construction-time switches: sorting, selection,
@@ -435,7 +438,7 @@ function DataTable(rawProps) {
435
438
  checked: row.getIsSelected(),
436
439
  indeterminate: false,
437
440
  onToggle: () => row.toggleSelected(!row.getIsSelected()),
438
- label: "Select row"
441
+ label: messages.table.selectRow
439
442
  });
440
443
  else if (isExpandHost) content = /* @__PURE__ */ jsxs("div", {
441
444
  "data-scope": "table",
@@ -447,7 +450,7 @@ function DataTable(rawProps) {
447
450
  "data-part": "expander",
448
451
  "data-expanded": row.getIsExpanded() || void 0,
449
452
  "data-leaf": !row.getCanExpand() || void 0,
450
- "aria-label": row.getIsExpanded() ? "Collapse row" : "Expand row",
453
+ "aria-label": row.getIsExpanded() ? messages.table.collapseRow : messages.table.expandRow,
451
454
  onClick: () => row.toggleExpanded(),
452
455
  children: /* @__PURE__ */ jsx(ChevronGlyph, {})
453
456
  }), /* @__PURE__ */ jsx(FlexRender, { cell })]
@@ -492,9 +495,9 @@ function DataTable(rawProps) {
492
495
  type: "text",
493
496
  "data-scope": "table",
494
497
  "data-part": "header-filter",
495
- "aria-label": `Filter ${column.id}`,
498
+ "aria-label": formatMessage(messages.table.filterColumn, { name: column.id }),
496
499
  value: column.getFilterValue() ?? "",
497
- placeholder: "Filter",
500
+ placeholder: messages.command.filter,
498
501
  draggable: false,
499
502
  onClick: (e) => e.stopPropagation(),
500
503
  onDragStart: (e) => e.stopPropagation(),
@@ -548,7 +551,7 @@ function DataTable(rawProps) {
548
551
  checked: all,
549
552
  indeterminate: table.getIsSomeRowsSelected() && !all,
550
553
  onToggle: () => table.toggleAllRowsSelected(!all),
551
- label: "Select all rows"
554
+ label: messages.table.selectAllRows
552
555
  })
553
556
  }, column.id);
554
557
  }
@@ -568,7 +571,7 @@ function DataTable(rawProps) {
568
571
  children: [virtual ? virtualRows.map((_, index) => renderRow(rows[index], index)) : rows.map((row) => renderRow(row, -1)), rows.length === 0 ? /* @__PURE__ */ jsx("div", {
569
572
  "data-scope": "table",
570
573
  "data-part": "empty",
571
- children: emptyText
574
+ children: emptyText ?? messages.table.empty
572
575
  }) : null]
573
576
  });
574
577
  const hasFooters = table.getFooterGroups().some((group) => group.headers.some((header) => header.column.columnDef.footer));
@@ -581,7 +584,7 @@ function DataTable(rawProps) {
581
584
  "data-scope": "table",
582
585
  "data-part": "row",
583
586
  children: group.headers.map((header) => /* @__PURE__ */ jsx("div", {
584
- role: "columnheader",
587
+ role: "cell",
585
588
  "data-scope": "table",
586
589
  "data-part": "footer-cell",
587
590
  "data-numeric": header.column.columnDef.meta?.numeric ? "" : void 0,
@@ -596,7 +599,7 @@ function DataTable(rawProps) {
596
599
  const pagination = table.atoms.pagination.get();
597
600
  const rowCount = table.getRowCount();
598
601
  const sizeItems = createListCollection({ items: pageSizeOptions.map((size) => ({
599
- label: `${size} / page`,
602
+ label: formatMessage(messages.table.perPage, { size }),
600
603
  value: String(size)
601
604
  })) });
602
605
  const pageSize = /* @__PURE__ */ jsxs(Select$1.Root, {
@@ -605,7 +608,7 @@ function DataTable(rawProps) {
605
608
  onValueChange: (details) => table.setPageSize(Number(details.value[0])),
606
609
  positioning: { placement: "top-start" },
607
610
  children: [/* @__PURE__ */ jsx(Select$1.Control, { children: /* @__PURE__ */ jsxs(Select$1.Trigger, {
608
- "aria-label": "Rows per page",
611
+ "aria-label": messages.table.rowsPerPage,
609
612
  children: [/* @__PURE__ */ jsx(Select$1.ValueText, {}), /* @__PURE__ */ jsx(Select$1.Indicator, { children: chevronDownGlyph() })]
610
613
  }) }), /* @__PURE__ */ jsx(Select$1.Positioner, { children: /* @__PURE__ */ jsx(Select$1.Content, { children: sizeItems.items.map((item) => /* @__PURE__ */ jsxs(Select$1.Item, {
611
614
  item,
@@ -630,10 +633,10 @@ function DataTable(rawProps) {
630
633
  return /* @__PURE__ */ jsxs("div", {
631
634
  "data-scope": "table",
632
635
  "data-part": "pagination",
633
- children: [/* @__PURE__ */ jsxs("span", {
636
+ children: [/* @__PURE__ */ jsx("span", {
634
637
  "data-scope": "table",
635
638
  "data-part": "page-status",
636
- children: [rowCount, " rows"]
639
+ children: formatMessage(messages.table.rowsCount, { count: rowCount })
637
640
  }), /* @__PURE__ */ jsxs("div", {
638
641
  "data-scope": "table",
639
642
  "data-part": "page-nav",
@@ -648,8 +651,8 @@ function DataTable(rawProps) {
648
651
  type: "search",
649
652
  "data-scope": "table",
650
653
  "data-part": "global-filter",
651
- "aria-label": "Filter all columns",
652
- placeholder: globalFilterPlaceholder,
654
+ "aria-label": messages.table.filterAll,
655
+ placeholder: globalFilterText,
653
656
  value: table.atoms.globalFilter.get() ?? "",
654
657
  onInput: (e) => table.setGlobalFilter(e.target.value)
655
658
  })
@@ -668,6 +671,7 @@ function DataTable(rawProps) {
668
671
  "data-scope": "table",
669
672
  "data-part": "viewport",
670
673
  ref: viewport,
674
+ tabIndex: 0,
671
675
  children: /* @__PURE__ */ jsxs("div", {
672
676
  role: "table",
673
677
  "data-scope": "table",
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { useEffect, useRef, useState } from "react";
@@ -8,6 +9,8 @@ import { useEffect, useRef, useState } from "react";
8
9
  * so history stays theirs to shape. */
9
10
  function Terminal({ lines = [], prompt = "$", placeholder, label, onCommand, ...rest }) {
10
11
  injectComponentStyle("terminal");
12
+ const messages = useComponentMessages();
13
+ const commandLineLabel = label ?? messages.terminal.commandLine;
11
14
  const [draft, setDraft] = useState("");
12
15
  const scroll = useRef(null);
13
16
  useEffect(() => {
@@ -22,7 +25,7 @@ function Terminal({ lines = [], prompt = "$", placeholder, label, onCommand, ...
22
25
  return /* @__PURE__ */ jsxs("div", {
23
26
  ...rest,
24
27
  role: "log",
25
- "aria-label": label ?? void 0,
28
+ "aria-label": commandLineLabel,
26
29
  "data-scope": "terminal",
27
30
  "data-part": "root",
28
31
  children: [/* @__PURE__ */ jsx("div", {
@@ -47,7 +50,7 @@ function Terminal({ lines = [], prompt = "$", placeholder, label, onCommand, ...
47
50
  "data-part": "input",
48
51
  value: draft,
49
52
  placeholder,
50
- "aria-label": label ? `${label} command line` : "Command line",
53
+ "aria-label": commandLineLabel,
51
54
  spellCheck: false,
52
55
  autoComplete: "off",
53
56
  onInput: (event) => setDraft(event.target.value),
@@ -1,7 +1,13 @@
1
+ import { ComponentProps } from "react";
1
2
  import { Toc as Toc$1 } from "@ark-ui/react/toc";
2
3
  //#region src/components/toc/index.d.ts
3
4
  /** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
4
5
  * beside the scroll, one stroke of primary ink marking where the reader
5
6
  * stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
6
- export declare const Toc: typeof Toc$1;
7
+ /** The active stroke is decoration; hidden so the list reads as links
8
+ * alone. */
9
+ declare function TocIndicator(props: ComponentProps<typeof Toc$1.Indicator>): import("react").JSX.Element;
10
+ export declare const Toc: Omit<typeof Toc$1, "Indicator"> & {
11
+ Indicator: typeof TocIndicator;
12
+ };
7
13
  //#endregion
@@ -1,10 +1,22 @@
1
1
  import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import { Toc as Toc$1 } from "@ark-ui/react/toc";
3
4
  //#region src/components/toc/index.tsx
4
5
  /** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
5
6
  * beside the scroll, one stroke of primary ink marking where the reader
6
7
  * stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
7
- const Toc = Toc$1;
8
+ /** The active stroke is decoration; hidden so the list reads as links
9
+ * alone. */
10
+ function TocIndicator(props) {
11
+ return /* @__PURE__ */ jsx(Toc$1.Indicator, {
12
+ ...props,
13
+ "aria-hidden": "true"
14
+ });
15
+ }
16
+ const Toc = {
17
+ ...Toc$1,
18
+ Indicator: TocIndicator
19
+ };
8
20
  injectComponentStyle("toc");
9
21
  //#endregion
10
22
  export { Toc };
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
1
2
  import { Button } from "../button/index.mjs";
2
3
  import { t as Input } from "../../input-2oezH-dY.mjs";
3
4
  import { injectComponentStyle } from "@bysages/core";
@@ -36,6 +37,7 @@ function arrowGlyph(direction) {
36
37
  function Transfer({ value = [], data, titles = ["Source", "Target"], searchable = false, disabled = false, onValueChange, ...rest }) {
37
38
  injectComponentStyle("transfer");
38
39
  injectComponentStyle("checkbox");
40
+ const messages = useComponentMessages();
39
41
  const [checkedSource, setCheckedSource] = useState(() => /* @__PURE__ */ new Set());
40
42
  const [checkedTarget, setCheckedTarget] = useState(() => /* @__PURE__ */ new Set());
41
43
  const [sourceQuery, setSourceQuery] = useState("");
@@ -86,8 +88,8 @@ function Transfer({ value = [], data, titles = ["Source", "Target"], searchable
86
88
  size: "sm",
87
89
  value: query,
88
90
  onValueChange: onQuery,
89
- placeholder: "Filter…",
90
- "aria-label": `Filter ${title}`
91
+ placeholder: messages.transfer.filter,
92
+ "aria-label": formatMessage(messages.transfer.filter, { name: title })
91
93
  })
92
94
  }) : null,
93
95
  /* @__PURE__ */ jsx("div", {
@@ -133,7 +135,7 @@ function Transfer({ value = [], data, titles = ["Source", "Target"], searchable
133
135
  size: "sm",
134
136
  square: true,
135
137
  disabled: checkedSource.size === 0 || disabled,
136
- "aria-label": "Move right",
138
+ "aria-label": messages.transfer.moveRight,
137
139
  onClick: () => move(true),
138
140
  children: arrowGlyph("right")
139
141
  }), /* @__PURE__ */ jsx(Button, {
@@ -141,7 +143,7 @@ function Transfer({ value = [], data, titles = ["Source", "Target"], searchable
141
143
  size: "sm",
142
144
  square: true,
143
145
  disabled: checkedTarget.size === 0 || disabled,
144
- "aria-label": "Move left",
146
+ "aria-label": messages.transfer.moveLeft,
145
147
  onClick: () => move(false),
146
148
  children: arrowGlyph("left")
147
149
  })]
@@ -1,3 +1,4 @@
1
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
2
  import { t as Input } from "../../input-2oezH-dY.mjs";
2
3
  import { injectComponentStyle } from "@bysages/core";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -44,6 +45,7 @@ function TreeSelectRow({ node, indexPath }) {
44
45
  function TreeSelect({ value, data, placeholder = "Select…", filterable = false, disabled = false, size = "md", onValueChange, ...rest }) {
45
46
  injectComponentStyle("tree-select");
46
47
  injectComponentStyle("tree-view");
48
+ const messages = useComponentMessages();
47
49
  const [open, setOpen] = useState(false);
48
50
  const [query, setQuery] = useState("");
49
51
  const filterFns = useFilter({ sensitivity: "base" });
@@ -128,8 +130,8 @@ function TreeSelect({ value, data, placeholder = "Select…", filterable = false
128
130
  size: "sm",
129
131
  value: query,
130
132
  onValueChange: setQuery,
131
- placeholder: "Filter…",
132
- "aria-label": "Filter options"
133
+ placeholder: messages.select.filter,
134
+ "aria-label": messages.select.filter
133
135
  })
134
136
  }) : null, /* @__PURE__ */ jsx("div", {
135
137
  "data-scope": "tree-select",
@@ -1,3 +1,4 @@
1
+ import { ComponentProps } from "react";
1
2
  import { CollectionItem } from "@ark-ui/react/collection";
2
3
  import { TreeView as TreeView$1, TreeViewRootComponentProps } from "@ark-ui/react/tree-view";
3
4
  //#region src/components/tree-view/index.d.ts
@@ -13,7 +14,15 @@ type TreeViewOwnProps = {
13
14
  size?: "sm" | "md" | "lg";
14
15
  };
15
16
  declare function TreeViewRoot<T extends CollectionItem>(props: TreeViewRootComponentProps<T, TreeViewOwnProps>): import("react").JSX.Element;
16
- export declare const TreeView: Omit<typeof TreeView$1, "Root"> & {
17
+ /** The node checkbox rides inside the branch control; the branch
18
+ * itself answers the keyboard, so the checkbox stays visual only. */
19
+ declare function TreeViewNodeCheckbox(props: ComponentProps<typeof TreeView$1.NodeCheckbox>): import("react").JSX.Element;
20
+ /** A branch is born with its chevron — the indicator stays a consumer's
21
+ * children to override, never a chore to remember. */
22
+ declare function TreeViewBranchIndicator(props: ComponentProps<typeof TreeView$1.BranchIndicator>): import("react").JSX.Element;
23
+ export declare const TreeView: Omit<typeof TreeView$1, "Root" | "NodeCheckbox" | "BranchIndicator"> & {
17
24
  Root: typeof TreeViewRoot;
25
+ NodeCheckbox: typeof TreeViewNodeCheckbox;
26
+ BranchIndicator: typeof TreeViewBranchIndicator;
18
27
  };
19
28
  //#endregion
@@ -1,5 +1,7 @@
1
+ import { t as glyphNode } from "../../glyph-VI989p8H.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
2
3
  import { jsx } from "react/jsx-runtime";
4
+ import { chevron_right } from "@bysages/icons";
3
5
  import { TreeView as TreeView$1 } from "@ark-ui/react/tree-view";
4
6
  //#region src/components/tree-view/index.tsx
5
7
  function TreeViewRoot(props) {
@@ -9,9 +11,28 @@ function TreeViewRoot(props) {
9
11
  "data-size": size
10
12
  });
11
13
  }
14
+ /** The node checkbox rides inside the branch control; the branch
15
+ * itself answers the keyboard, so the checkbox stays visual only. */
16
+ function TreeViewNodeCheckbox(props) {
17
+ return /* @__PURE__ */ jsx(TreeView$1.NodeCheckbox, {
18
+ ...props,
19
+ "aria-hidden": "true"
20
+ });
21
+ }
22
+ /** A branch is born with its chevron — the indicator stays a consumer's
23
+ * children to override, never a chore to remember. */
24
+ function TreeViewBranchIndicator(props) {
25
+ const { children = glyphNode(chevron_right), ...rest } = props;
26
+ return /* @__PURE__ */ jsx(TreeView$1.BranchIndicator, {
27
+ ...rest,
28
+ children
29
+ });
30
+ }
12
31
  const TreeView = {
13
32
  ...TreeView$1,
14
- Root: TreeViewRoot
33
+ Root: TreeViewRoot,
34
+ NodeCheckbox: TreeViewNodeCheckbox,
35
+ BranchIndicator: TreeViewBranchIndicator
15
36
  };
16
37
  injectComponentStyle("tree-view");
17
38
  //#endregion
@@ -19,6 +19,7 @@ function VirtualList({ items, itemHeight = 40, height = 320, renderItem, ...rest
19
19
  return /* @__PURE__ */ jsx("div", {
20
20
  ...rest,
21
21
  ref: viewport,
22
+ tabIndex: 0,
22
23
  "data-scope": "virtual-list",
23
24
  "data-part": "root",
24
25
  style: {