@lt-three/love3 0.1.0 → 0.1.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 (271) hide show
  1. package/README.md +40 -40
  2. package/dist/native/analytics/animation.d.ts +1 -1
  3. package/dist/native/analytics/animation.js +1 -1
  4. package/dist/native/analytics/chart.types.d.ts +3 -3
  5. package/dist/native/analytics/metric-card.d.ts +3 -3
  6. package/dist/native/analytics/metric-card.js +3 -3
  7. package/dist/native/analytics/multi-line-chart.d.ts +9 -8
  8. package/dist/native/analytics/multi-line-chart.js +14 -13
  9. package/dist/native/analytics/pie-chart.d.ts +7 -7
  10. package/dist/native/analytics/pie-chart.js +8 -8
  11. package/dist/native/analytics/single-number.d.ts +4 -4
  12. package/dist/native/analytics/single-number.js +2 -2
  13. package/dist/native/atom/avatar.d.ts +6 -6
  14. package/dist/native/atom/avatar.js +2 -2
  15. package/dist/native/atom/badge.d.ts +5 -5
  16. package/dist/native/atom/button.d.ts +12 -12
  17. package/dist/native/atom/button.js +8 -8
  18. package/dist/native/atom/checkbox.d.ts +4 -4
  19. package/dist/native/atom/checkbox.js +2 -2
  20. package/dist/native/atom/colored-value.d.ts +4 -4
  21. package/dist/native/atom/colored-value.js +4 -4
  22. package/dist/native/atom/image.d.ts +7 -7
  23. package/dist/native/atom/image.js +2 -2
  24. package/dist/native/atom/label.d.ts +5 -5
  25. package/dist/native/atom/label.js +2 -2
  26. package/dist/native/atom/link.d.ts +5 -5
  27. package/dist/native/atom/link.js +5 -5
  28. package/dist/native/atom/readout.d.ts +7 -7
  29. package/dist/native/atom/readout.js +3 -3
  30. package/dist/native/atom/search-input.d.ts +2 -2
  31. package/dist/native/atom/search-input.js +2 -2
  32. package/dist/native/atom/select.d.ts +14 -14
  33. package/dist/native/atom/select.js +8 -8
  34. package/dist/native/atom/separator.d.ts +2 -3
  35. package/dist/native/atom/separator.js +2 -3
  36. package/dist/native/atom/skeleton.d.ts +3 -3
  37. package/dist/native/atom/skeleton.js +3 -3
  38. package/dist/native/atom/slider.d.ts +6 -6
  39. package/dist/native/atom/slider.js +3 -3
  40. package/dist/native/atom/spinner.d.ts +4 -4
  41. package/dist/native/atom/spinner.js +2 -2
  42. package/dist/native/atom/switch.d.ts +4 -4
  43. package/dist/native/atom/switch.js +3 -3
  44. package/dist/native/atom/symbol.d.ts +7 -7
  45. package/dist/native/atom/symbol.js +7 -7
  46. package/dist/native/atom/symbol.types.d.ts +8 -8
  47. package/dist/native/atom/symbol.types.js +7 -7
  48. package/dist/native/atom/text-field.d.ts +15 -15
  49. package/dist/native/atom/text-field.js +5 -5
  50. package/dist/native/atom/theme-toggle.d.ts +7 -7
  51. package/dist/native/atom/theme-toggle.js +4 -4
  52. package/dist/native/atom/timezone-select.d.ts +5 -5
  53. package/dist/native/atom/timezone-select.js +4 -4
  54. package/dist/native/atom/typography.d.ts +2 -2
  55. package/dist/native/atom/typography.js +2 -2
  56. package/dist/native/base/button.d.ts +13 -13
  57. package/dist/native/base/button.js +4 -4
  58. package/dist/native/base/form.d.ts +15 -15
  59. package/dist/native/base/form.js +11 -11
  60. package/dist/native/base/glass-card.d.ts +3 -3
  61. package/dist/native/base/glass-card.js +3 -3
  62. package/dist/native/base/input.d.ts +8 -8
  63. package/dist/native/base/input.js +7 -7
  64. package/dist/native/base/sheet.d.ts +27 -27
  65. package/dist/native/base/sheet.js +15 -15
  66. package/dist/native/form/checkbox.d.ts +3 -3
  67. package/dist/native/form/checkbox.js +2 -2
  68. package/dist/native/form/date-picker.d.ts +9 -9
  69. package/dist/native/form/date-picker.js +9 -9
  70. package/dist/native/form/form.d.ts +5 -6
  71. package/dist/native/form/form.js +4 -5
  72. package/dist/native/form/radio-group.d.ts +5 -5
  73. package/dist/native/form/radio-group.js +4 -4
  74. package/dist/native/form/select.d.ts +2 -2
  75. package/dist/native/form/select.js +2 -2
  76. package/dist/native/form/slider.d.ts +2 -2
  77. package/dist/native/form/slider.js +2 -2
  78. package/dist/native/form/switch.d.ts +2 -2
  79. package/dist/native/form/switch.js +2 -2
  80. package/dist/native/form/text-area.d.ts +2 -2
  81. package/dist/native/form/text-area.js +1 -1
  82. package/dist/native/form/text-input.d.ts +5 -5
  83. package/dist/native/form/text-input.js +8 -8
  84. package/dist/native/layout/accordion.d.ts +5 -5
  85. package/dist/native/layout/accordion.js +2 -2
  86. package/dist/native/layout/card.d.ts +8 -8
  87. package/dist/native/layout/card.js +3 -3
  88. package/dist/native/layout/description.d.ts +2 -2
  89. package/dist/native/layout/description.js +2 -2
  90. package/dist/native/layout/error.d.ts +5 -5
  91. package/dist/native/layout/error.js +2 -2
  92. package/dist/native/layout/information.d.ts +4 -4
  93. package/dist/native/layout/information.js +3 -3
  94. package/dist/native/layout/locked.d.ts +15 -15
  95. package/dist/native/layout/locked.js +7 -7
  96. package/dist/native/layout/modal.d.ts +8 -8
  97. package/dist/native/layout/modal.js +5 -5
  98. package/dist/native/layout/not-found.d.ts +4 -4
  99. package/dist/native/layout/not-found.js +3 -3
  100. package/dist/native/layout/page-frame.d.ts +8 -8
  101. package/dist/native/layout/page-frame.js +3 -3
  102. package/dist/native/layout/panel.d.ts +5 -5
  103. package/dist/native/layout/panel.js +5 -5
  104. package/dist/native/layout/reorderable-list.d.ts +14 -14
  105. package/dist/native/layout/reorderable-list.js +10 -10
  106. package/dist/native/layout/sheet.d.ts +10 -10
  107. package/dist/native/layout/sheet.js +4 -4
  108. package/dist/native/layout/simple-dialog.d.ts +3 -3
  109. package/dist/native/layout/simple-dialog.js +2 -2
  110. package/dist/native/layout/simple-table.d.ts +18 -18
  111. package/dist/native/layout/simple-table.js +1 -1
  112. package/dist/native/layout/tab-bar.d.ts +10 -10
  113. package/dist/native/layout/tab-bar.js +4 -4
  114. package/dist/native/layout/tabs.d.ts +6 -6
  115. package/dist/native/layout/tabs.js +4 -4
  116. package/dist/native/layout/tuning-panel.d.ts +10 -10
  117. package/dist/native/layout/tuning-panel.js +15 -15
  118. package/dist/native/lib/autocomplete.d.ts +1 -1
  119. package/dist/native/lib/autocomplete.js +1 -1
  120. package/dist/native/lib/breakpoints.d.ts +3 -3
  121. package/dist/native/lib/breakpoints.js +3 -3
  122. package/dist/native/lib/chart-palette.d.ts +2 -2
  123. package/dist/native/lib/chart-palette.js +2 -2
  124. package/dist/native/lib/confirm.d.ts +15 -16
  125. package/dist/native/lib/confirm.js +9 -10
  126. package/dist/native/lib/control.d.ts +9 -9
  127. package/dist/native/lib/external-store.d.ts +4 -5
  128. package/dist/native/lib/keyboard.d.ts +7 -7
  129. package/dist/native/lib/keyboard.js +7 -7
  130. package/dist/native/lib/labels.d.ts +6 -6
  131. package/dist/native/lib/labels.js +6 -6
  132. package/dist/native/lib/loading.d.ts +3 -3
  133. package/dist/native/lib/loading.js +3 -3
  134. package/dist/native/lib/network.d.ts +5 -6
  135. package/dist/native/lib/network.js +5 -6
  136. package/dist/native/lib/scheme.d.ts +7 -7
  137. package/dist/native/lib/scheme.js +3 -3
  138. package/dist/native/lib/snackbar.d.ts +12 -13
  139. package/dist/native/lib/snackbar.js +7 -8
  140. package/dist/native/lib/theme.d.ts +15 -15
  141. package/dist/native/lib/theme.js +15 -15
  142. package/dist/native/lib/timezone.d.ts +13 -13
  143. package/dist/native/lib/timezone.js +13 -13
  144. package/dist/native/lib/token-color.d.ts +1 -1
  145. package/dist/native/lib/token-color.js +1 -1
  146. package/dist/native/lib/tuning-context.d.ts +2 -2
  147. package/dist/native/lib/tuning.d.ts +10 -10
  148. package/dist/native/lib/tuning.js +8 -8
  149. package/dist/native/lib/typography.d.ts +3 -3
  150. package/dist/native/lib/typography.js +3 -3
  151. package/dist/native/lib/utils.d.ts +3 -3
  152. package/dist/native/lib/utils.js +3 -3
  153. package/dist/native/once/confirm.d.ts +2 -2
  154. package/dist/native/once/confirm.js +2 -2
  155. package/dist/native/once/error-boundary.d.ts +3 -3
  156. package/dist/native/once/error-boundary.js +2 -2
  157. package/dist/native/once/loading-lock.d.ts +3 -3
  158. package/dist/native/once/loading-lock.js +3 -3
  159. package/dist/native/once/offline-banner.d.ts +6 -6
  160. package/dist/native/once/offline-banner.js +5 -5
  161. package/dist/native/once/snackbar.d.ts +7 -7
  162. package/dist/native/once/snackbar.js +5 -5
  163. package/dist/native/styles.css +21 -21
  164. package/dist/shared/analytics.d.ts +23 -23
  165. package/dist/shared/button.d.ts +1 -1
  166. package/dist/shared/form.d.ts +7 -7
  167. package/dist/shared/form.js +2 -2
  168. package/dist/tokens/contrast-pairs.d.ts +9 -9
  169. package/dist/tokens/contrast-pairs.js +10 -10
  170. package/dist/tokens/index.d.ts +1 -1
  171. package/dist/tokens/index.js +1 -1
  172. package/dist/tokens/styles.gen.css +87 -87
  173. package/dist/tokens/tokens.gen.d.ts +2 -2
  174. package/dist/tokens/tokens.gen.js +2 -2
  175. package/dist/tuning/catalog.d.ts +8 -8
  176. package/dist/tuning/catalog.js +9 -9
  177. package/dist/tuning/color.d.ts +4 -4
  178. package/dist/tuning/color.js +5 -5
  179. package/dist/tuning/css.d.ts +13 -13
  180. package/dist/tuning/css.js +17 -17
  181. package/dist/tuning/model.d.ts +11 -11
  182. package/dist/tuning/model.js +11 -11
  183. package/dist/tuning/native.d.ts +18 -18
  184. package/dist/tuning/native.js +18 -18
  185. package/dist/tuning/schema.d.ts +15 -15
  186. package/dist/tuning/schema.js +22 -22
  187. package/dist/tuning/types.d.ts +25 -25
  188. package/dist/tuning/types.js +6 -6
  189. package/dist/web/analytics/line-chart.d.ts +6 -6
  190. package/dist/web/analytics/line-chart.js +3 -3
  191. package/dist/web/analytics/metric-card.d.ts +6 -6
  192. package/dist/web/analytics/metric-card.js +5 -5
  193. package/dist/web/analytics/multi-line-chart.d.ts +23 -23
  194. package/dist/web/analytics/multi-line-chart.js +33 -33
  195. package/dist/web/atom/avatar.d.ts +1 -1
  196. package/dist/web/atom/checkbox.d.ts +6 -6
  197. package/dist/web/atom/checkbox.js +2 -2
  198. package/dist/web/atom/colored-value.d.ts +4 -4
  199. package/dist/web/atom/colored-value.js +4 -4
  200. package/dist/web/atom/help.d.ts +1 -1
  201. package/dist/web/atom/segmented-control.d.ts +13 -14
  202. package/dist/web/atom/segmented-control.js +6 -7
  203. package/dist/web/atom/select.d.ts +7 -7
  204. package/dist/web/atom/select.js +5 -5
  205. package/dist/web/atom/slider.d.ts +3 -3
  206. package/dist/web/atom/slider.js +2 -2
  207. package/dist/web/atom/switch.d.ts +3 -3
  208. package/dist/web/atom/text-area.d.ts +9 -8
  209. package/dist/web/atom/text-area.js +9 -8
  210. package/dist/web/atom/text-field.d.ts +5 -4
  211. package/dist/web/atom/text-field.js +5 -4
  212. package/dist/web/atom/toggle-chip.d.ts +6 -6
  213. package/dist/web/atom/toggle-chip.js +4 -4
  214. package/dist/web/atom/tooltip.d.ts +6 -6
  215. package/dist/web/atom/tooltip.js +2 -2
  216. package/dist/web/base/accordion.js +1 -1
  217. package/dist/web/base/breadcrumb.d.ts +1 -1
  218. package/dist/web/base/breadcrumb.js +1 -1
  219. package/dist/web/base/card.d.ts +3 -3
  220. package/dist/web/base/card.js +2 -2
  221. package/dist/web/base/dialog.d.ts +1 -1
  222. package/dist/web/base/dialog.js +1 -1
  223. package/dist/web/base/form.d.ts +7 -7
  224. package/dist/web/base/form.js +5 -5
  225. package/dist/web/base/pagination.d.ts +5 -5
  226. package/dist/web/base/pagination.js +1 -1
  227. package/dist/web/base/sheet.d.ts +1 -1
  228. package/dist/web/base/sheet.js +1 -1
  229. package/dist/web/base/slider.d.ts +1 -1
  230. package/dist/web/base/sonner.d.ts +2 -2
  231. package/dist/web/base/sonner.js +2 -2
  232. package/dist/web/base/spinner.js +1 -1
  233. package/dist/web/form/checkbox.d.ts +8 -8
  234. package/dist/web/form/checkbox.js +3 -3
  235. package/dist/web/form/radio-group.js +3 -3
  236. package/dist/web/form/select.js +1 -1
  237. package/dist/web/form/slider.d.ts +3 -3
  238. package/dist/web/form/slider.js +3 -3
  239. package/dist/web/form/switch.d.ts +3 -3
  240. package/dist/web/form/switch.js +4 -4
  241. package/dist/web/form/text-area.js +1 -1
  242. package/dist/web/form/text-input.d.ts +1 -1
  243. package/dist/web/form/text-input.js +1 -1
  244. package/dist/web/layout/accordion.d.ts +5 -5
  245. package/dist/web/layout/accordion.js +2 -2
  246. package/dist/web/layout/alert-modal.d.ts +11 -11
  247. package/dist/web/layout/alert-modal.js +7 -7
  248. package/dist/web/layout/card.d.ts +1 -1
  249. package/dist/web/layout/information.d.ts +9 -9
  250. package/dist/web/layout/information.js +7 -7
  251. package/dist/web/layout/modal.d.ts +1 -1
  252. package/dist/web/layout/page-frame.d.ts +14 -14
  253. package/dist/web/layout/page-frame.js +7 -7
  254. package/dist/web/layout/scroll-area.d.ts +1 -1
  255. package/dist/web/layout/sheet.d.ts +4 -4
  256. package/dist/web/layout/simple-table.d.ts +18 -18
  257. package/dist/web/layout/simple-table.js +2 -2
  258. package/dist/web/layout/tabs.d.ts +4 -4
  259. package/dist/web/layout/titled-modal.d.ts +10 -11
  260. package/dist/web/layout/titled-modal.js +7 -8
  261. package/dist/web/lib/css-vars.d.ts +6 -6
  262. package/dist/web/lib/css-vars.js +5 -5
  263. package/dist/web/lib/dialog.d.ts +4 -4
  264. package/dist/web/lib/labels.d.ts +8 -8
  265. package/dist/web/lib/labels.js +8 -8
  266. package/dist/web/lib/modal-open-focus.d.ts +7 -7
  267. package/dist/web/lib/modal-open-focus.js +9 -9
  268. package/dist/web/lib/restore-focus.d.ts +4 -4
  269. package/dist/web/lib/restore-focus.js +4 -4
  270. package/dist/web/styles.css +33 -33
  271. package/package.json +2 -2
@@ -6,16 +6,16 @@ import { TriangleAlertIcon } from "lucide-react";
6
6
 
7
7
  //#region src/web/layout/alert-modal.tsx
8
8
  /**
9
- * 確認のための小さなモーダル(× を持たない)。
9
+ * A small modal for confirmation (it has no ×).
10
10
  *
11
- * overlay 面・p-5・幅 400(ビューポートに収まる)。見出し(16/24 semibold)と本文(13/20・muted)、右寄せの操作(gap-2・Button の既定サイズ)。
12
- * `danger` では見出しの左に小さな state-error のアイコンが付き、主操作が destructive-solid の塗りになる。
13
- * 枠もリングも付けない(影だけで浮く。`DialogContent` の流儀)。開閉状態は呼び出し側が持つ(制御専用)。
11
+ * Overlay surface, p-5, width 400 (fitted to the viewport). A heading (16/24 semibold) and body text (13/20, muted), with right-aligned actions (gap-2, the default Button size).
12
+ * With `danger`, a small state-error icon is added to the left of the heading and the primary action gets the destructive-solid fill.
13
+ * No border and no ring (it floats on the shadow alone, like `DialogContent`). The caller holds the open state (controlled only).
14
14
  *
15
- * 表示中は `data-modal-open` を持つので、浮いている常駐 UI を CSS で隠せる。
15
+ * While shown it carries `data-modal-open`, so floating persistent UI can be hidden with CSS.
16
16
  *
17
- * 開いたときの初期フォーカスは、キーボードで開いたときだけ最初の操作に置き、それ以外はモーダルの本体に置く
18
- * (マウスで開いて最初のボタンに枠が出ないように。`useModalOpenAutoFocus`)。
17
+ * The initial focus on open goes to the first action only when it was opened by keyboard, and otherwise to the modal body
18
+ * (so that no ring appears on the first button when opened with the mouse; `useModalOpenAutoFocus`).
19
19
  */
20
20
  function AlertModal({ open, onOpenChange, tone = "default", title, description, actions, dismissible = true, "data-testid": testId }) {
21
21
  const danger = tone === "danger";
@@ -3,7 +3,7 @@ import React from "react";
3
3
  //#region src/web/layout/card.d.ts
4
4
  export type CardProps = {
5
5
  title?: React.ReactNode;
6
- /** 題を見出し(`<h2>`〜`<h6>`)にする。見出しの階層に入れたいときに渡す(省略は `<div>`)。native も同じ名前。 */
6
+ /** Make the title a heading (`<h2>` to `<h6>`). Pass it when you want it in the heading hierarchy (omitted means `<div>`). Native has the same name. */
7
7
  headingLevel?: CardHeadingLevel;
8
8
  description?: React.ReactNode;
9
9
  action?: React.ReactNode;
@@ -15,21 +15,21 @@ type InformationProps = {
15
15
  fields: InformationField[][];
16
16
  wrap?: "no-wrap" | "pre-wrap";
17
17
  /**
18
- * 列を並べる内側の要素(flex コンテナ)のクラス。`className` は外側のコンテナ(`@container`)に付くので、
19
- * 列の間隔(`gap-*`)や並び(`flex-*`)を変えるときはこちらを使う。
18
+ * The class of the inner element (a flex container) that lays out the columns. `className` goes on the outer container (`@container`),
19
+ * so use this one when changing the column spacing (`gap-*`) or direction (`flex-*`).
20
20
  */
21
21
  columnsClassName?: string;
22
22
  } & React.HTMLAttributes<HTMLDivElement>;
23
23
  /**
24
- * ラベルと値の組を並べる、読み取り専用の詳細表示。
24
+ * A read-only detail view that lays out pairs of a label and a value.
25
25
  *
26
- * **親が幅を持つこと前提。** 列を縦に積むか横に並べるかは、外側の要素のコンテナクエリ(`@container`・`@xl:`)で決める。
27
- * コンテナクエリは外側の幅を中身から測れない(inline-size の containment)ので、**幅が中身で決まる親**
28
- * (`flex` の子・`inline-block`・`inline-flex`・table セル・`grid-cols-[auto_…]`)の中に置くと、幅 0 に潰れる。
29
- * そういう親の中では、`className` に具体的な幅(`w-96` など。`flex` の子なら `flex-1` でもよい)を与える。
30
- * `w-full` は効かない(親の幅が中身で決まるので、割合の基準が無い)。
26
+ * **It assumes the parent has a width.** Whether columns stack vertically or sit side by side is decided by the outer element's container query (`@container`, `@xl:`).
27
+ * A container query cannot measure the outer width from the content (inline-size containment), so inside a **parent whose width is determined by its content**
28
+ * (a `flex` child, `inline-block`, `inline-flex`, a table cell, `grid-cols-[auto_…]`) it collapses to width 0.
29
+ * In such parents, give `className` a concrete width (such as `w-96`; `flex-1` also works for a `flex` child).
30
+ * `w-full` does not work (the parent's width is decided by the content, so there is no basis for the percentage).
31
31
  *
32
- * `className` と残りの属性は**外側のコンテナ**に付く(移植元では flex コンテナそのものだった)。
32
+ * `className` and the remaining attributes go on the **outer container**.
33
33
  */
34
34
  export declare const Information: ({ displayType, highlighted, fields, className, columnsClassName, wrap, ...remain }: InformationProps) => React.JSX.Element;
35
35
  //#endregion
@@ -5,15 +5,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/web/layout/information.tsx
7
7
  /**
8
- * ラベルと値の組を並べる、読み取り専用の詳細表示。
8
+ * A read-only detail view that lays out pairs of a label and a value.
9
9
  *
10
- * **親が幅を持つこと前提。** 列を縦に積むか横に並べるかは、外側の要素のコンテナクエリ(`@container`・`@xl:`)で決める。
11
- * コンテナクエリは外側の幅を中身から測れない(inline-size の containment)ので、**幅が中身で決まる親**
12
- * (`flex` の子・`inline-block`・`inline-flex`・table セル・`grid-cols-[auto_…]`)の中に置くと、幅 0 に潰れる。
13
- * そういう親の中では、`className` に具体的な幅(`w-96` など。`flex` の子なら `flex-1` でもよい)を与える。
14
- * `w-full` は効かない(親の幅が中身で決まるので、割合の基準が無い)。
10
+ * **It assumes the parent has a width.** Whether columns stack vertically or sit side by side is decided by the outer element's container query (`@container`, `@xl:`).
11
+ * A container query cannot measure the outer width from the content (inline-size containment), so inside a **parent whose width is determined by its content**
12
+ * (a `flex` child, `inline-block`, `inline-flex`, a table cell, `grid-cols-[auto_…]`) it collapses to width 0.
13
+ * In such parents, give `className` a concrete width (such as `w-96`; `flex-1` also works for a `flex` child).
14
+ * `w-full` does not work (the parent's width is decided by the content, so there is no basis for the percentage).
15
15
  *
16
- * `className` と残りの属性は**外側のコンテナ**に付く(移植元では flex コンテナそのものだった)。
16
+ * `className` and the remaining attributes go on the **outer container**.
17
17
  */
18
18
  const Information = ({ displayType = "fitContent", highlighted, fields, className, columnsClassName, wrap = "pre-wrap", ...remain }) => {
19
19
  return /* @__PURE__ */ jsx("div", {
@@ -8,7 +8,7 @@ type Props = {
8
8
  content: React.ReactNode;
9
9
  footer: React.ReactNode;
10
10
  size?: "md" | "flexible";
11
- /** 閉じるボタンの読み上げ名(既定は「閉じる」) */
11
+ /** Accessible name of the close button (defaults to the Japanese "Close" label) */
12
12
  closeLabel?: string;
13
13
  };
14
14
  export declare function Modal({ title, description, dialog, content, footer, size, closeLabel }: Props): React.JSX.Element;
@@ -2,36 +2,36 @@ import React from "react";
2
2
  //#region src/web/layout/page-frame.d.ts
3
3
  export type PageFrameNavItem = {
4
4
  label: string;
5
- /** 現在の画面。`aria-current="page"` になる。 */
5
+ /** The current screen. It gets `aria-current="page"`. */
6
6
  current?: boolean;
7
- /** あればリンク(`<a>`)、無ければボタン(`<button>`。押すと `onSelect`)。 */
7
+ /** A link (`<a>`) when present, otherwise a button (`<button>`; pressing it calls `onSelect`). */
8
8
  href?: string;
9
9
  onSelect?: () => void;
10
10
  };
11
11
  export type PageFrameProps = {
12
- /** ヘッダ左端のブランド(文字でも要素でも)。 */
12
+ /** The brand at the left end of the header (text or an element). */
13
13
  brand: React.ReactNode;
14
14
  nav?: readonly PageFrameNavItem[];
15
- /** ナビの読み上げ名(ランドマークが複数あるとき区別する)。 */
15
+ /** Accessible name of the nav (to tell landmarks apart when there are several). */
16
16
  navLabel?: string;
17
- /** ヘッダ右端(テーマ切替・ユーザーなど)。 */
17
+ /** The right end of the header (theme toggle, user and so on). */
18
18
  trailing?: React.ReactNode;
19
19
  children: React.ReactNode;
20
- /** フッタの中身。未指定なら年を持たない著作権表記(年は使う側が決める)。 */
20
+ /** The content of the footer. When omitted, a copyright notice with no year (the year is decided by the consumer). */
21
21
  footer?: React.ReactNode;
22
- /** ヘッダ・本文・フッタの中身の最大幅(Tailwind のクラス)。 */
22
+ /** The maximum width of the header, body and footer content (a Tailwind class). */
23
23
  maxWidthClassName?: string;
24
24
  className?: string;
25
25
  };
26
26
  /**
27
- * ページの骨組み。`header`(banner)・`nav`・`main`・`footer`(contentinfo)を持ち、ランドマークが揃う。
28
- * 画面ごとに手で組むと、`main` を忘れる・ナビに名前が無い・狭い幅で崩れる、が起きるので、ここに 1 つだけ置く。
27
+ * The skeleton of a page. It has `header` (banner), `nav`, `main` and `footer` (contentinfo), so the landmarks are complete.
28
+ * Assembling each screen by hand leads to forgetting `main`, a nav with no name, and breaking at narrow widths, so it is placed here once.
29
29
  *
30
- * - ヘッダの DOM の順(ブランド・ナビ・右端)が、見た目の順(狭い幅は 1 行ずつ)と同じ。`order` で見た目だけを入れ替えると
31
- * Tab の順が見た目とずれる
32
- * - 本文は `flex-1`(短い画面でもフッタが下に付く)。`main` の `id` は `main`(使う側がスキップリンクを置くときの飛び先。
33
- * PageFrame 自身はスキップリンクを置かない。`main` ランドマークがあるので、axe の bypass(ブロックのスキップ)は満たされる)
34
- * - 色は `border-border` / `text-muted-foreground` だけ。ダークはトークンが切り替える
30
+ * - The DOM order of the header (brand, nav, right end) matches the visual order (one row at a time at narrow widths). Swapping only the look with `order`
31
+ * would make the Tab order differ from the visual order
32
+ * - The body is `flex-1` (the footer sticks to the bottom even on a short screen). The `id` of `main` is `main` (the target a consumer can jump to when placing a skip link.
33
+ * PageFrame itself places no skip link. The `main` landmark satisfies axe's bypass (skipping blocks))
34
+ * - Colours are only `border-border` / `text-muted-foreground`. The tokens switch them for dark
35
35
  */
36
36
  export declare function PageFrame({ brand, nav, navLabel, trailing, children, footer, maxWidthClassName, className }: PageFrameProps): React.JSX.Element;
37
37
  //#endregion
@@ -3,14 +3,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
 
4
4
  //#region src/web/layout/page-frame.tsx
5
5
  /**
6
- * ページの骨組み。`header`(banner)・`nav`・`main`・`footer`(contentinfo)を持ち、ランドマークが揃う。
7
- * 画面ごとに手で組むと、`main` を忘れる・ナビに名前が無い・狭い幅で崩れる、が起きるので、ここに 1 つだけ置く。
6
+ * The skeleton of a page. It has `header` (banner), `nav`, `main` and `footer` (contentinfo), so the landmarks are complete.
7
+ * Assembling each screen by hand leads to forgetting `main`, a nav with no name, and breaking at narrow widths, so it is placed here once.
8
8
  *
9
- * - ヘッダの DOM の順(ブランド・ナビ・右端)が、見た目の順(狭い幅は 1 行ずつ)と同じ。`order` で見た目だけを入れ替えると
10
- * Tab の順が見た目とずれる
11
- * - 本文は `flex-1`(短い画面でもフッタが下に付く)。`main` の `id` は `main`(使う側がスキップリンクを置くときの飛び先。
12
- * PageFrame 自身はスキップリンクを置かない。`main` ランドマークがあるので、axe の bypass(ブロックのスキップ)は満たされる)
13
- * - 色は `border-border` / `text-muted-foreground` だけ。ダークはトークンが切り替える
9
+ * - The DOM order of the header (brand, nav, right end) matches the visual order (one row at a time at narrow widths). Swapping only the look with `order`
10
+ * would make the Tab order differ from the visual order
11
+ * - The body is `flex-1` (the footer sticks to the bottom even on a short screen). The `id` of `main` is `main` (the target a consumer can jump to when placing a skip link.
12
+ * PageFrame itself places no skip link. The `main` landmark satisfies axe's bypass (skipping blocks))
13
+ * - Colours are only `border-border` / `text-muted-foreground`. The tokens switch them for dark
14
14
  */
15
15
  function PageFrame({ brand, nav = [], navLabel = "メイン", trailing, children, footer, maxWidthClassName = "max-w-[1280px]", className }) {
16
16
  return /* @__PURE__ */ jsxs("div", {
@@ -2,7 +2,7 @@ import { ScrollArea as ScrollArea$1 } from "../base/scroll-area.js";
2
2
  import { ComponentProps } from "react";
3
3
  //#region src/web/layout/scroll-area.d.ts
4
4
  type ScrollAreaProps = ComponentProps<typeof ScrollArea$1> & {
5
- /** 水平スクロールバーを表示する */
5
+ /** Show the horizontal scrollbar */
6
6
  horizontal?: boolean;
7
7
  };
8
8
  export declare function ScrollArea({ horizontal, children, ...props }: ScrollAreaProps): import("react").JSX.Element;
@@ -7,13 +7,13 @@ type BaseProps = {
7
7
  description?: string;
8
8
  content: React.ReactNode;
9
9
  footer?: React.ReactNode;
10
- /** シートの表示方向 */
10
+ /** The direction the sheet appears from */
11
11
  side?: ComponentProps<typeof SheetContent>["side"];
12
- /** SheetContent に渡すクラス名 */
12
+ /** Class name passed to SheetContent */
13
13
  contentClassName?: string;
14
- /** SheetTitle に渡すクラス名 */
14
+ /** Class name passed to SheetTitle */
15
15
  titleClassName?: string;
16
- /** 閉じるボタンの読み上げ名(既定は「閉じる」) */
16
+ /** Accessible name of the close button (defaults to the Japanese "Close" label) */
17
17
  closeLabel?: string;
18
18
  };
19
19
  type DialogModeProps = BaseProps & {
@@ -2,46 +2,46 @@ import { TableRow } from "../base/table.js";
2
2
  import React from "react";
3
3
  //#region src/web/layout/simple-table.d.ts
4
4
  /**
5
- * 宣言的な薄い罫線のデータテーブル。columns / data を渡すだけで使える。
6
- * ヘッダは frame の淡い面、行罫線は 1px の極薄の線(base/table を踏襲)。
7
- * 数値列は mono + tabular-nums + 右寄せにする。
5
+ * A declarative data table with thin rules. Just pass columns / data.
6
+ * The header is a pale frame surface and the row rules are an ultra-thin 1px line (following base/table).
7
+ * Numeric columns are mono + tabular-nums + right-aligned.
8
8
  *
9
- * TanStack ベースの DataTable(ページネーション/選択つき・layout/table)とは別物で、
10
- * ソートやページングが不要な短い表(ダッシュボードのサマリ等)向けの軽量版。
9
+ * It is a different thing from a TanStack-based DataTable (with pagination and selection),
10
+ * and is a lightweight version for short tables that need no sorting or paging (dashboard summaries and the like).
11
11
  */
12
12
  export type SimpleColumn<T> = {
13
- /** 列キー(行内で一意)。 */
13
+ /** Column key (unique within a row). */
14
14
  key: string;
15
15
  header: React.ReactNode;
16
- /** セル / ヘッダの揃え(既定 left)。 */
16
+ /** Alignment of the cell / header (default left). */
17
17
  align?: "left" | "right" | "center";
18
- /** 等幅 + tabular-nums(数値・ID 向け)。 */
18
+ /** Monospace + tabular-nums (for numbers and IDs). */
19
19
  mono?: boolean;
20
- /** 強調(font-medium)。 */
20
+ /** Emphasis (font-medium). */
21
21
  strong?: boolean;
22
- /** セルの追加クラス。 */
22
+ /** Extra class for the cell. */
23
23
  cellClassName?: string;
24
- /** ヘッダの追加クラス。 */
24
+ /** Extra class for the header. */
25
25
  headClassName?: string;
26
- /** セルの描画。未指定時は row[key] を表示する。 */
26
+ /** Cell rendering. When not given, row[key] is shown. */
27
27
  render?: (row: T) => React.ReactNode;
28
28
  /**
29
- * この幅(Tailwind のブレークポイント)より狭いときは列ごと隠す。狭い幅で重要でない列(ID・補足など)を畳んで、
30
- * 横スクロールを避けるために使う。未指定なら常に出す。
29
+ * Hide the column when narrower than this width (a Tailwind breakpoint). Used to fold away columns that are not important at narrow widths (IDs, supplements and so on)
30
+ * and avoid horizontal scrolling. When not given, the column is always shown.
31
31
  */
32
32
  hideBelow?: "sm" | "md" | "lg";
33
33
  };
34
34
  export declare function SimpleTable<T extends object>({ columns, data, getRowKey, onRowClick, getRowProps, className, wrapperClassName }: {
35
35
  columns: SimpleColumn<T>[];
36
36
  data: T[];
37
- /** 行キーの導出。未指定時は index を使う。 */
37
+ /** Derives the row key. When not given, the index is used. */
38
38
  getRowKey?: (row: T, index: number) => string;
39
39
  /**
40
- * 行クリック(任意)。渡すと行にフォーカスでき(tabIndex=0)、Enter・Space でも押せる。
41
- * 行の中のボタンやリンクのキー操作は奪わない(行そのものにフォーカスがあるときだけ反応する)。
40
+ * Row click (optional). When passed, a row can take focus (tabIndex=0) and can also be pressed with Enter and Space.
41
+ * It does not steal key handling from buttons or links inside the row (it reacts only when the row itself has focus).
42
42
  */
43
43
  onRowClick?: (row: T) => void;
44
- /** 行ごとの追加属性(data-* / className 等)。行全体クリックや e2e セレクタ付与に使う。 */
44
+ /** Extra attributes per row (data-* / className and so on). Used for whole-row clicks and for attaching e2e selectors. */
45
45
  getRowProps?: (row: T, index: number) => Omit<React.ComponentPropsWithoutRef<typeof TableRow>, "key">;
46
46
  className?: string;
47
47
  wrapperClassName?: string;
@@ -4,7 +4,7 @@ import { isValidElement } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/web/layout/simple-table.tsx
7
- /** Tailwind はクラス名を静的に拾うので、文字列を組み立てず表にしておく。 */
7
+ /** Tailwind picks up class names statically, so they are kept in a table rather than assembled from strings. */
8
8
  const hideBelowClass = {
9
9
  sm: "hidden sm:table-cell",
10
10
  md: "hidden md:table-cell",
@@ -15,7 +15,7 @@ const alignClass = {
15
15
  right: "text-right",
16
16
  center: "text-center"
17
17
  };
18
- /** `render` が無い列の既定の描画。行の `key` の値が、文字・数値・要素のときだけ表示する。 */
18
+ /** The default rendering of a column with no `render`. It shows the row's `key` value only when it is a string, a number or an element. */
19
19
  function cellValue(row, key) {
20
20
  const value = Reflect.get(row, key);
21
21
  if (typeof value === "string" || typeof value === "number" || isValidElement(value)) return value;
@@ -11,14 +11,14 @@ export type TabsProps = {
11
11
  tabs: TabType;
12
12
  full?: boolean;
13
13
  defaultValue?: string;
14
- /** 制御モード: 外部から値を管理する場合に指定 */
14
+ /** Controlled mode: specify when the value is managed from outside */
15
15
  value?: string;
16
16
  onValueChange?: (value: string) => void;
17
- /** TabsList と同じ高さで横並びに配置する右側のスロット(ツールバー的に利用する) */
17
+ /** A slot on the right, laid out side by side at the same height as TabsList (used like a toolbar) */
18
18
  trailing?: React.ReactNode;
19
19
  /**
20
- * DEV-E2E: 各トリガーに `${testIdPrefix}-${value}` の data-testid を付与する。
21
- * 省略時は data-testid を出力しない。
20
+ * DEV-E2E: adds a data-testid of `${testIdPrefix}-${value}` to each trigger.
21
+ * When omitted, no data-testid is output.
22
22
  */
23
23
  testIdPrefix?: string;
24
24
  };
@@ -4,29 +4,28 @@ type TitledModalProps = {
4
4
  open: boolean;
5
5
  onOpenChange: (open: boolean) => void;
6
6
  title: React$1.ReactNode;
7
- /** 本文の先頭に置く説明。支援技術向けの description も兼ねる。 */
7
+ /** A description placed at the top of the body. It also serves as the description for assistive technology. */
8
8
  description?: React$1.ReactNode;
9
9
  children?: React$1.ReactNode;
10
- /** 右寄せで並べる操作。あると上に 1px の区切り線が入る。 */
10
+ /** Actions laid out right-aligned. When present, a 1px divider is added above them. */
11
11
  footer?: React$1.ReactNode;
12
- /** 閉じるボタンの読み上げ名。 */
12
+ /** Accessible name of the close button. */
13
13
  closeLabel?: string;
14
- /** × の中身(省略時は lucide の X)。 */
14
+ /** The content of the × (lucide's X when omitted). */
15
15
  closeIcon?: React$1.ReactNode;
16
16
  className?: string;
17
17
  "data-testid"?: string;
18
18
  };
19
19
  /**
20
- * 見出しと × を持つ大きめのモーダル。
20
+ * A larger modal with a heading and a ×.
21
21
  *
22
- * overlay 面(枠もリングも無し・影だけ)・幅 560。見出し(16/24 semibold)と × の下に 1px の薄い区切り線、本文は p-5、
23
- * フッターがあれば上に区切り線を引いて右寄せで操作を並べる。開閉状態は呼び出し側が持つ(制御専用)。
22
+ * Overlay surface (no border or ring, shadow only), width 560. A thin 1px divider under the heading (16/24 semibold) and ×, the body is p-5,
23
+ * and if there is a footer, a divider is drawn above it and the actions are laid out right-aligned. The caller holds the open state (controlled only).
24
24
  *
25
- * 表示中は `data-modal-open` を持つので、浮いている常駐 UI を CSS で隠せる
26
- * (`body:has([data-modal-open])`)。
25
+ * While shown it carries `data-modal-open`, so floating persistent UI can be hidden with CSS
27
26
  *
28
- * 開いたときの初期フォーカスは、キーボードで開いたときだけ最初の操作に置き、それ以外はモーダルの本体に置く
29
- * (マウスで開いて最初のボタンに枠が出ないように。`useModalOpenAutoFocus`)。
27
+ * The initial focus on open goes to the first action only when it was opened by keyboard, and otherwise to the modal body
28
+ * (so that no ring appears on the first button when opened with the mouse; `useModalOpenAutoFocus`).
30
29
  */
31
30
  export declare function TitledModal({ open, onOpenChange, title, description, children, footer, closeLabel, closeIcon, className, "data-testid": testId }: TitledModalProps): React$1.JSX.Element;
32
31
  //#endregion
@@ -1,5 +1,5 @@
1
- import { CLOSE_LABEL } from "../lib/labels.js";
2
1
  import { cn } from "../lib/utils.js";
2
+ import { CLOSE_LABEL } from "../lib/labels.js";
3
3
  import { Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle } from "../base/dialog.js";
4
4
  import { useModalOpenAutoFocus } from "../lib/modal-open-focus.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -7,16 +7,15 @@ import { XIcon } from "lucide-react";
7
7
 
8
8
  //#region src/web/layout/titled-modal.tsx
9
9
  /**
10
- * 見出しと × を持つ大きめのモーダル。
10
+ * A larger modal with a heading and a ×.
11
11
  *
12
- * overlay 面(枠もリングも無し・影だけ)・幅 560。見出し(16/24 semibold)と × の下に 1px の薄い区切り線、本文は p-5、
13
- * フッターがあれば上に区切り線を引いて右寄せで操作を並べる。開閉状態は呼び出し側が持つ(制御専用)。
12
+ * Overlay surface (no border or ring, shadow only), width 560. A thin 1px divider under the heading (16/24 semibold) and ×, the body is p-5,
13
+ * and if there is a footer, a divider is drawn above it and the actions are laid out right-aligned. The caller holds the open state (controlled only).
14
14
  *
15
- * 表示中は `data-modal-open` を持つので、浮いている常駐 UI を CSS で隠せる
16
- * (`body:has([data-modal-open])`)。
15
+ * While shown it carries `data-modal-open`, so floating persistent UI can be hidden with CSS
17
16
  *
18
- * 開いたときの初期フォーカスは、キーボードで開いたときだけ最初の操作に置き、それ以外はモーダルの本体に置く
19
- * (マウスで開いて最初のボタンに枠が出ないように。`useModalOpenAutoFocus`)。
17
+ * The initial focus on open goes to the first action only when it was opened by keyboard, and otherwise to the modal body
18
+ * (so that no ring appears on the first button when opened with the mouse; `useModalOpenAutoFocus`).
20
19
  */
21
20
  function TitledModal({ open, onOpenChange, title, description, children, footer, closeLabel = CLOSE_LABEL, closeIcon, className, "data-testid": testId }) {
22
21
  const { contentRef, onOpenAutoFocus } = useModalOpenAutoFocus();
@@ -1,14 +1,14 @@
1
1
  import { CSSProperties } from "react";
2
2
  //#region src/web/lib/css-vars.d.ts
3
- /** CSS カスタムプロパティ(`--foo`)だけを持つ style の部品。 */
3
+ /** A style part that holds only CSS custom properties (`--foo`). */
4
4
  export type CssVars = Record<`--${string}`, string | number>;
5
5
  /**
6
- * CSS カスタムプロパティを `style` に渡せる形にする。
6
+ * Turns CSS custom properties into something that can be passed to `style`.
7
7
  *
8
- * `CSSProperties` は `--foo` を知らないので、オブジェクトリテラルを直に渡すと tsc が
9
- * 余剰プロパティとして落とす。`as CSSProperties` で黙らせると型の検査が消えるため、
10
- * テンプレートリテラル型のキーで受けて `CSSProperties` として返す。
11
- * `overrides` が後勝ち(呼び出し側から渡された `style` が既定の変数を上書きできる)。
8
+ * `CSSProperties` does not know about `--foo`, so passing an object literal directly makes tsc
9
+ * reject it as an excess property. Silencing it with `as CSSProperties` removes the type check, so
10
+ * it is received with template-literal-type keys and returned as `CSSProperties`.
11
+ * `overrides` wins (a `style` passed by the caller can override the default variables).
12
12
  */
13
13
  export declare function cssVars(vars: CssVars, overrides?: CSSProperties): CSSProperties;
14
14
  //#endregion
@@ -1,11 +1,11 @@
1
1
  //#region src/web/lib/css-vars.ts
2
2
  /**
3
- * CSS カスタムプロパティを `style` に渡せる形にする。
3
+ * Turns CSS custom properties into something that can be passed to `style`.
4
4
  *
5
- * `CSSProperties` は `--foo` を知らないので、オブジェクトリテラルを直に渡すと tsc が
6
- * 余剰プロパティとして落とす。`as CSSProperties` で黙らせると型の検査が消えるため、
7
- * テンプレートリテラル型のキーで受けて `CSSProperties` として返す。
8
- * `overrides` が後勝ち(呼び出し側から渡された `style` が既定の変数を上書きできる)。
5
+ * `CSSProperties` does not know about `--foo`, so passing an object literal directly makes tsc
6
+ * reject it as an excess property. Silencing it with `as CSSProperties` removes the type check, so
7
+ * it is received with template-literal-type keys and returned as `CSSProperties`.
8
+ * `overrides` wins (a `style` passed by the caller can override the default variables).
9
9
  */
10
10
  function cssVars(vars, overrides) {
11
11
  return {
@@ -1,13 +1,13 @@
1
1
  //#region src/web/lib/dialog.d.ts
2
2
  /**
3
- * `Modal` / `Sheet` が開閉の状態を受け取る形(構造的な型)。
4
- * `useState` で自前に作ってもよいし、アプリ側の未保存ガードつきの hook の戻り値をそのまま渡してもよい
5
- * (love3 は i18n や form に依存しないので、hook そのものは持たない)。
3
+ * The shape (a structural type) in which `Modal` / `Sheet` receive the open/close state.
4
+ * You can build it yourself with `useState`, or pass the return value of an app-side hook with an unsaved-changes guard as is
5
+ * (love3 depends on neither i18n nor forms, so it does not include the hook itself).
6
6
  */
7
7
  export type DialogController = {
8
8
  isOpen: boolean;
9
9
  close: () => void;
10
- /** 外側のクリックで閉じてよいか決める。確認を挟みたいときはここで処理する(既定は `close` と同じ扱いにする) */
10
+ /** Decides whether a click outside may close it. When you want to insert a confirmation, handle it here (by default it is treated the same as `close`) */
11
11
  onOutsideClick: () => void;
12
12
  };
13
13
  //#endregion
@@ -1,27 +1,27 @@
1
1
  //#region src/web/lib/labels.d.ts
2
- /** 閉じるボタン(Dialog・Sheet・TitledModal) */
2
+ /** Close button (Dialog, Sheet, TitledModal) */
3
3
  export declare const CLOSE_LABEL = "閉じる";
4
- /** ヘルプのトリガー(atom/help・base/form の FormLabel) */
4
+ /** Help trigger (atom/help, FormLabel of base/form) */
5
5
  export declare const HELP_LABEL = "ヘルプ";
6
- /** 読み込み中の表示(Spinner) */
6
+ /** Loading indicator (Spinner) */
7
7
  export declare const LOADING_LABEL = "読み込み中";
8
- /** ページネーションの nav と、その中のボタン */
8
+ /** The pagination nav and the buttons inside it */
9
9
  export declare const PAGINATION_LABEL = "ページネーション";
10
10
  export declare const PREVIOUS_PAGE_LABEL = "前のページへ";
11
11
  export declare const NEXT_PAGE_LABEL = "次のページへ";
12
- /** 途中が省略されているページ番号 */
12
+ /** Page numbers that are omitted in the middle */
13
13
  export declare const MORE_PAGES_LABEL = "他のページ";
14
- /** パンくずリストの nav と、省略されている途中の階層 */
14
+ /** The breadcrumb nav and the omitted levels in the middle */
15
15
  export declare const BREADCRUMB_LABEL = "パンくずリスト";
16
16
  export declare const MORE_LEVELS_LABEL = "他の階層";
17
- /** 折れ線の表の代替(読み上げ用に隠す表)の列名と、名前の既定 */
17
+ /** Column names of the line chart's table alternative (a table hidden for screen readers), and the default name */
18
18
  export declare const LINE_CHART_TABLE_SERIES_LABEL = "系列";
19
19
  export declare const LINE_CHART_TABLE_POINT_LABEL = "見出し";
20
20
  export declare const LINE_CHART_TABLE_VALUE_LABEL = "値";
21
21
  export declare const LINE_CHART_DEFAULT_LABEL = "折れ線チャート";
22
22
  export declare const LINE_CHART_SINGLE_SERIES_LABEL = "値";
23
23
  export declare const LINE_CHART_EMPTY_TEXT = "データがありません";
24
- /** 読み上げ用の表に添える注記(数でない点を除いたとき・点が多くて抜き出したとき) */
24
+ /** Notes added to the table for screen readers (when non-numeric points were dropped, or when many points were sampled) */
25
25
  export declare const lineChartTableDropped: (count: number) => string;
26
26
  export declare const lineChartTableThinned: (shown: number, total: number) => string;
27
27
  //#endregion
@@ -1,27 +1,27 @@
1
1
  //#region src/web/lib/labels.ts
2
- /** 閉じるボタン(Dialog・Sheet・TitledModal) */
2
+ /** Close button (Dialog, Sheet, TitledModal) */
3
3
  const CLOSE_LABEL = "閉じる";
4
- /** ヘルプのトリガー(atom/help・base/form の FormLabel) */
4
+ /** Help trigger (atom/help, FormLabel of base/form) */
5
5
  const HELP_LABEL = "ヘルプ";
6
- /** 読み込み中の表示(Spinner) */
6
+ /** Loading indicator (Spinner) */
7
7
  const LOADING_LABEL = "読み込み中";
8
- /** ページネーションの nav と、その中のボタン */
8
+ /** The pagination nav and the buttons inside it */
9
9
  const PAGINATION_LABEL = "ページネーション";
10
10
  const PREVIOUS_PAGE_LABEL = "前のページへ";
11
11
  const NEXT_PAGE_LABEL = "次のページへ";
12
- /** 途中が省略されているページ番号 */
12
+ /** Page numbers that are omitted in the middle */
13
13
  const MORE_PAGES_LABEL = "他のページ";
14
- /** パンくずリストの nav と、省略されている途中の階層 */
14
+ /** The breadcrumb nav and the omitted levels in the middle */
15
15
  const BREADCRUMB_LABEL = "パンくずリスト";
16
16
  const MORE_LEVELS_LABEL = "他の階層";
17
- /** 折れ線の表の代替(読み上げ用に隠す表)の列名と、名前の既定 */
17
+ /** Column names of the line chart's table alternative (a table hidden for screen readers), and the default name */
18
18
  const LINE_CHART_TABLE_SERIES_LABEL = "系列";
19
19
  const LINE_CHART_TABLE_POINT_LABEL = "見出し";
20
20
  const LINE_CHART_TABLE_VALUE_LABEL = "値";
21
21
  const LINE_CHART_DEFAULT_LABEL = "折れ線チャート";
22
22
  const LINE_CHART_SINGLE_SERIES_LABEL = "値";
23
23
  const LINE_CHART_EMPTY_TEXT = "データがありません";
24
- /** 読み上げ用の表に添える注記(数でない点を除いたとき・点が多くて抜き出したとき) */
24
+ /** Notes added to the table for screen readers (when non-numeric points were dropped, or when many points were sampled) */
25
25
  const lineChartTableDropped = (count) => `数でない値の点 ${count.toString()} 件は除いています。`;
26
26
  const lineChartTableThinned = (shown, total) => `点が多いので、${total.toString()} 点のうち ${shown.toString()} 点を等間隔に抜き出しています。`;
27
27
 
@@ -1,14 +1,14 @@
1
1
  //#region src/web/lib/modal-open-focus.d.ts
2
2
  /**
3
- * モーダルを開いたときの初期フォーカスの置き先を、開いた手段で変える。
3
+ * Changes where the initial focus goes when a modal opens, depending on how it was opened.
4
4
  *
5
- * - キーボードで開いた: Radix の既定どおり最初の操作(ボタン)に置く。フォーカスの枠も出る
6
- * - ポインターで開いた / 操作なしで開いた(起動時に出るもの等): モーダルの本体に置く。
7
- * 最初のボタンに枠が出ない(WebKit はスクリプトによるフォーカスにも `:focus-visible` を当てるため、
8
- * ボタンに置くと枠が出てしまう)。フォーカスはモーダルの中にあるので、Tab で最初の操作へ進め、
9
- * Esc で閉じられ、支援技術はダイアログとして読み上げる
5
+ * - Opened by keyboard: put it on the first action (a button), as Radix does by default. The focus ring also shows
6
+ * - Opened by pointer / opened with no interaction (something shown at start-up, etc.): put it on the modal body.
7
+ * No ring appears on the first button (WebKit applies `:focus-visible` even to script-driven focus,
8
+ * so putting it on the button would show a ring). Focus is inside the modal, so Tab moves to the first action,
9
+ * Esc closes it, and assistive technology announces it as a dialog
10
10
  *
11
- * 返す `contentRef` と `onOpenAutoFocus` を DialogContent に渡す。本体には `outline-none` を付けること。
11
+ * Pass the returned `contentRef` and `onOpenAutoFocus` to DialogContent. Give the body `outline-none`.
12
12
  */
13
13
  export declare function useModalOpenAutoFocus(): {
14
14
  contentRef: import("react").RefObject<HTMLDivElement | null>;
@@ -4,8 +4,8 @@ import { useCallback, useRef } from "react";
4
4
  let lastModality = "unknown";
5
5
  let listening = false;
6
6
  /**
7
- * 直前の操作がキーボードかポインターかを覚える(document に 1 度だけ張る)。
8
- * capture で拾うので、途中で stopPropagation されても取りこぼさない。
7
+ * Remembers whether the previous action was by keyboard or by pointer (attached to the document only once).
8
+ * It listens in the capture phase, so it is not missed even if stopPropagation is called along the way.
9
9
  */
10
10
  function listenModality() {
11
11
  if (listening || typeof document === "undefined") return;
@@ -17,15 +17,15 @@ function listenModality() {
17
17
  document.addEventListener("pointerdown", () => lastModality = "pointer", true);
18
18
  }
19
19
  /**
20
- * モーダルを開いたときの初期フォーカスの置き先を、開いた手段で変える。
20
+ * Changes where the initial focus goes when a modal opens, depending on how it was opened.
21
21
  *
22
- * - キーボードで開いた: Radix の既定どおり最初の操作(ボタン)に置く。フォーカスの枠も出る
23
- * - ポインターで開いた / 操作なしで開いた(起動時に出るもの等): モーダルの本体に置く。
24
- * 最初のボタンに枠が出ない(WebKit はスクリプトによるフォーカスにも `:focus-visible` を当てるため、
25
- * ボタンに置くと枠が出てしまう)。フォーカスはモーダルの中にあるので、Tab で最初の操作へ進め、
26
- * Esc で閉じられ、支援技術はダイアログとして読み上げる
22
+ * - Opened by keyboard: put it on the first action (a button), as Radix does by default. The focus ring also shows
23
+ * - Opened by pointer / opened with no interaction (something shown at start-up, etc.): put it on the modal body.
24
+ * No ring appears on the first button (WebKit applies `:focus-visible` even to script-driven focus,
25
+ * so putting it on the button would show a ring). Focus is inside the modal, so Tab moves to the first action,
26
+ * Esc closes it, and assistive technology announces it as a dialog
27
27
  *
28
- * 返す `contentRef` と `onOpenAutoFocus` を DialogContent に渡す。本体には `outline-none` を付けること。
28
+ * Pass the returned `contentRef` and `onOpenAutoFocus` to DialogContent. Give the body `outline-none`.
29
29
  */
30
30
  function useModalOpenAutoFocus() {
31
31
  listenModality();
@@ -1,9 +1,9 @@
1
1
  //#region src/web/lib/restore-focus.d.ts
2
2
  /**
3
- * Radix の Dialog は、閉じたあとのフォーカスを `DialogTrigger` にしか戻さない。love3 の Modal・Sheet・AlertModal は `open` を状態で持つ
4
- * (トリガーが無い)ので、そのままだとフォーカスが `body` に落ちる(キーボード・支援技術の利用者が、開いた場所を見失う)。
5
- * 開いた時点でフォーカスのあった要素を覚えて、閉じたときにそこへ戻す。`DialogTrigger` で開いた場合など、覚えた要素が無いとき・
6
- * 呼び出し側が `preventDefault` したときは、何もしない(Radix の既定の動きに任せる)。
3
+ * Radix's Dialog returns focus after closing only to `DialogTrigger`. love3's Modal, Sheet and AlertModal keep `open` in state
4
+ * (there is no trigger), so as is, focus falls to `body` (keyboard and assistive-technology users lose track of where they opened it).
5
+ * It remembers the element that had focus when the dialog opened and returns focus there on close. When there is no remembered element, such as when it was opened with `DialogTrigger`, or
6
+ * when the caller called `preventDefault`, it does nothing (it leaves it to Radix's default behaviour).
7
7
  */
8
8
  export declare function useRestoreFocus(onOpenAutoFocus: ((event: Event) => void) | undefined, onCloseAutoFocus: ((event: Event) => void) | undefined): {
9
9
  onOpenAutoFocus: (event: Event) => void;