@slotted/react 0.1.0-beta.40 → 0.1.0-beta.41

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 (267) hide show
  1. package/dist/{app-shell-ClwskWBN.js → app-shell-DyPHYe4K.js} +1 -1
  2. package/dist/app-shell.js +1 -1
  3. package/dist/{attachment-AAjprQyU.js → attachment-MqczA38F.js} +1 -1
  4. package/dist/attachment.js +1 -1
  5. package/dist/{badge-pgYVOnZO.js → badge-DFskjsxA.js} +21 -20
  6. package/dist/badge.js +1 -1
  7. package/dist/{calendar-D3QZDlm0.js → calendar-DRuJ7z0H.js} +198 -195
  8. package/dist/calendar.js +1 -1
  9. package/dist/chart-CgXbG6gZ.js +1055 -0
  10. package/dist/chart.js +1 -1
  11. package/dist/{color-picker-CaLcV-63.js → color-picker-CeOl4ikV.js} +7 -7
  12. package/dist/color-picker.js +1 -1
  13. package/dist/column-manager-CnOhzVGP.js +586 -0
  14. package/dist/column-manager.js +1 -1
  15. package/dist/{currency-field-BO2P6FPd.js → currency-field-LAawS9qo.js} +181 -144
  16. package/dist/currency-field.js +1 -1
  17. package/dist/dashboard-grid-Zzqmbzqq.js +1201 -0
  18. package/dist/dashboard-grid.js +1 -1
  19. package/dist/{data-grid-B7UuUvBH.js → data-grid-Y5aX9njc.js} +1424 -1398
  20. package/dist/data-grid.js +1 -1
  21. package/dist/{date-picker-DMcMFW_N.js → date-picker-6hj83x5D.js} +28 -26
  22. package/dist/date-picker.js +2 -2
  23. package/dist/{date-range-picker-D9zo93NE.js → date-range-picker-CBWnFTgL.js} +167 -162
  24. package/dist/date-range-picker.js +1 -1
  25. package/dist/{datetime-picker-lOXZbAx_.js → datetime-picker-DwUYd3zF.js} +174 -163
  26. package/dist/datetime-picker.js +1 -1
  27. package/dist/{datetime-range-picker-DU5ctZbm.js → datetime-range-picker-CX_tBt6b.js} +193 -182
  28. package/dist/datetime-range-picker.js +1 -1
  29. package/dist/{detail-panel-DLgRhEFO.js → detail-panel-EImAtksY.js} +3 -3
  30. package/dist/detail-panel.js +1 -1
  31. package/dist/docs/badge.json +8 -0
  32. package/dist/docs/badge.md +1 -0
  33. package/dist/docs/calendar.json +8 -1
  34. package/dist/docs/calendar.md +2 -1
  35. package/dist/docs/chart.examples.md +48 -0
  36. package/dist/docs/chart.json +60 -7
  37. package/dist/docs/chart.md +9 -5
  38. package/dist/docs/currency-field.examples.md +1 -1
  39. package/dist/docs/currency-field.json +4 -4
  40. package/dist/docs/currency-field.md +3 -3
  41. package/dist/docs/data-grid.json +15 -1
  42. package/dist/docs/data-grid.md +1 -1
  43. package/dist/docs/data-grid.props.md +2 -0
  44. package/dist/docs/date-picker.json +9 -2
  45. package/dist/docs/date-picker.md +3 -2
  46. package/dist/docs/date-range-picker.json +9 -2
  47. package/dist/docs/date-range-picker.md +3 -2
  48. package/dist/docs/datetime-picker.json +9 -2
  49. package/dist/docs/datetime-picker.md +3 -2
  50. package/dist/docs/datetime-range-picker.json +9 -2
  51. package/dist/docs/datetime-range-picker.md +3 -2
  52. package/dist/docs/guidelines/async-feedback.md +11 -1
  53. package/dist/docs/guidelines/index.md +1 -0
  54. package/dist/docs/popover.json +41 -3
  55. package/dist/docs/popover.md +5 -2
  56. package/dist/docs/section.json +1 -1
  57. package/dist/docs/section.md +1 -1
  58. package/dist/docs/skills/theme-app/SKILL.md +3 -2
  59. package/dist/docs/skills/waiting-states/SKILL.md +4 -1
  60. package/dist/docs/stat-card.json +9 -1
  61. package/dist/docs/stat-card.md +2 -1
  62. package/dist/docs/switch.json +12 -5
  63. package/dist/docs/switch.md +5 -4
  64. package/dist/docs/tag.json +8 -0
  65. package/dist/docs/tag.md +1 -0
  66. package/dist/docs/time-picker.json +1 -1
  67. package/dist/docs/time-picker.md +1 -1
  68. package/dist/docs/time-range-picker.json +1 -1
  69. package/dist/docs/time-range-picker.md +1 -1
  70. package/dist/{event-calendar-biSTH0yK.js → event-calendar-DzlL95E4.js} +2 -2
  71. package/dist/event-calendar.js +1 -1
  72. package/dist/{filter-bar-BQZFgV0A.js → filter-bar-DMuP5P6e.js} +19 -19
  73. package/dist/filter-bar.js +1 -1
  74. package/dist/{hover-card-D8OyhmEG.js → hover-card-CWCSZ5_p.js} +1 -1
  75. package/dist/hover-card.js +1 -1
  76. package/dist/{import-export-center-DWSEOV5Z.js → import-export-center-DzAUMTq5.js} +3 -3
  77. package/dist/import-export-center.js +1 -1
  78. package/dist/index.js +47 -47
  79. package/dist/{loading-overlay-BLIrcaoj.js → loading-overlay-BxIktMtQ.js} +1 -1
  80. package/dist/loading-overlay.js +1 -1
  81. package/dist/{page-header-NN3Jq5vb.js → page-header-DmwBGwlm.js} +1 -1
  82. package/dist/page-header.js +1 -1
  83. package/dist/{picker-frame-_9ZqQOjf.js → picker-frame-CT5WNEnw.js} +1 -1
  84. package/dist/popover-B2t__iNO.js +575 -0
  85. package/dist/popover.js +1 -1
  86. package/dist/{progress-indicator-D0acshNn.js → progress-indicator-DRr0Gj6w.js} +1 -0
  87. package/dist/progress-indicator.js +1 -1
  88. package/dist/{saved-views-BvRFgSdg.js → saved-views-zM-DxT1F.js} +6 -6
  89. package/dist/saved-views.js +1 -1
  90. package/dist/{section-CQPQf6RU.js → section-D_qOfdxR.js} +1 -0
  91. package/dist/section.js +1 -1
  92. package/dist/{side-navigation-Cwi2FHOz.js → side-navigation-CtZuP87S.js} +1 -1
  93. package/dist/side-navigation.js +1 -1
  94. package/dist/{stat-card-CmpabaTc.js → stat-card-CL3Xe6pV.js} +4 -1
  95. package/dist/stat-card.js +1 -1
  96. package/dist/styles/action-bar.css +1 -1
  97. package/dist/styles/app-shell.css +4 -2
  98. package/dist/styles/attachment.css +3 -1
  99. package/dist/styles/badge.css +1 -1
  100. package/dist/styles/calendar.css +1 -1
  101. package/dist/styles/cascader.css +1 -1
  102. package/dist/styles/chart.css +3 -1
  103. package/dist/styles/color-picker.css +2 -2
  104. package/dist/styles/column-manager.css +2 -2
  105. package/dist/styles/dashboard-grid.css +2 -2
  106. package/dist/styles/data-grid.css +6 -6
  107. package/dist/styles/date-picker.css +2 -2
  108. package/dist/styles/date-range-picker.css +2 -2
  109. package/dist/styles/datetime-picker.css +2 -2
  110. package/dist/styles/datetime-range-picker.css +2 -2
  111. package/dist/styles/detail-panel.css +5 -3
  112. package/dist/styles/entity-picker.css +1 -1
  113. package/dist/styles/event-calendar.css +4 -2
  114. package/dist/styles/filter-bar.css +5 -5
  115. package/dist/styles/hover-card.css +1 -1
  116. package/dist/styles/import-export-center.css +8 -6
  117. package/dist/styles/index.css +17 -15
  118. package/dist/styles/loading-overlay.css +3 -1
  119. package/dist/styles/multi-select.css +1 -1
  120. package/dist/styles/page-header.css +3 -1
  121. package/dist/styles/popover.css +1 -1
  122. package/dist/styles/progress-indicator.css +3 -1
  123. package/dist/styles/saved-views.css +2 -2
  124. package/dist/styles/section.css +1 -1
  125. package/dist/styles/select.css +1 -1
  126. package/dist/styles/side-navigation.css +4 -2
  127. package/dist/styles/stat-card.css +1 -1
  128. package/dist/styles/switch.css +7 -1
  129. package/dist/styles/table.css +5 -5
  130. package/dist/styles/tag.css +1 -1
  131. package/dist/styles/tags-input.css +1 -1
  132. package/dist/styles/textarea.css +1 -1
  133. package/dist/styles/time-picker.css +1 -1
  134. package/dist/styles/time-range-picker.css +1 -1
  135. package/dist/styles/toast.css +3 -1
  136. package/dist/styles/top-navigation.css +4 -2
  137. package/dist/styles/upload.css +3 -1
  138. package/dist/styles/wizard.css +1 -1
  139. package/dist/styles.css +1 -1
  140. package/dist/switch-CcZAVLiW.js +154 -0
  141. package/dist/switch.js +1 -1
  142. package/dist/{table-MGb3iZY_.js → table-D4oX9Gvn.js} +46 -46
  143. package/dist/table.js +1 -1
  144. package/dist/{tag-BYzDYvM_.js → tag-DCMsVXN6.js} +31 -28
  145. package/dist/tag.js +1 -1
  146. package/dist/{time-picker-z4GSRuha.js → time-picker-Cu1iV039.js} +130 -128
  147. package/dist/time-picker.js +1 -1
  148. package/dist/{time-range-picker-ar40oPcf.js → time-range-picker-sdbaFJFN.js} +117 -115
  149. package/dist/time-range-picker.js +1 -1
  150. package/dist/{toast-Cg28GkqX.js → toast-aM_ga1mc.js} +1 -1
  151. package/dist/toast.js +1 -1
  152. package/dist/{top-navigation-C73WDqLg.js → top-navigation-D3rpgBV2.js} +1 -1
  153. package/dist/top-navigation.js +1 -1
  154. package/dist/types/badge/badge.d.ts +1 -1
  155. package/dist/types/badge/badge.d.ts.map +1 -1
  156. package/dist/types/badge/badge.types.d.ts +6 -0
  157. package/dist/types/badge/badge.types.d.ts.map +1 -1
  158. package/dist/types/calendar/calendar-day-cell.d.ts +3 -1
  159. package/dist/types/calendar/calendar-day-cell.d.ts.map +1 -1
  160. package/dist/types/calendar/calendar-defaults.d.ts +1 -1
  161. package/dist/types/calendar/calendar-defaults.d.ts.map +1 -1
  162. package/dist/types/calendar/calendar.d.ts +1 -1
  163. package/dist/types/calendar/calendar.d.ts.map +1 -1
  164. package/dist/types/calendar/calendar.types.d.ts +8 -0
  165. package/dist/types/calendar/calendar.types.d.ts.map +1 -1
  166. package/dist/types/chart/chart-help.d.ts +11 -0
  167. package/dist/types/chart/chart-help.d.ts.map +1 -0
  168. package/dist/types/chart/chart.d.ts.map +1 -1
  169. package/dist/types/chart/index.d.ts +1 -1
  170. package/dist/types/chart/index.d.ts.map +1 -1
  171. package/dist/types/currency-field/currency-field.d.ts +3 -3
  172. package/dist/types/currency-field/currency-field.d.ts.map +1 -1
  173. package/dist/types/currency-field/currency-field.types.d.ts +4 -3
  174. package/dist/types/currency-field/currency-field.types.d.ts.map +1 -1
  175. package/dist/types/dashboard-grid/dashboard-widget-help.d.ts +3 -1
  176. package/dist/types/dashboard-grid/dashboard-widget-help.d.ts.map +1 -1
  177. package/dist/types/data-grid/data-grid-body.d.ts.map +1 -1
  178. package/dist/types/data-grid/data-grid-context.d.ts +4 -0
  179. package/dist/types/data-grid/data-grid-context.d.ts.map +1 -1
  180. package/dist/types/data-grid/data-grid-header.d.ts.map +1 -1
  181. package/dist/types/data-grid/data-grid.d.ts +1 -1
  182. package/dist/types/data-grid/data-grid.d.ts.map +1 -1
  183. package/dist/types/data-grid/data-grid.types.d.ts +13 -0
  184. package/dist/types/data-grid/data-grid.types.d.ts.map +1 -1
  185. package/dist/types/date-picker/date-picker-defaults.d.ts.map +1 -1
  186. package/dist/types/date-picker/date-picker-panel.d.ts +2 -0
  187. package/dist/types/date-picker/date-picker-panel.d.ts.map +1 -1
  188. package/dist/types/date-picker/date-picker.d.ts.map +1 -1
  189. package/dist/types/date-picker/date-picker.types.d.ts +9 -0
  190. package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
  191. package/dist/types/date-picker/use-date-picker.d.ts +6 -3
  192. package/dist/types/date-picker/use-date-picker.d.ts.map +1 -1
  193. package/dist/types/date-range-picker/date-range-panel.d.ts +2 -0
  194. package/dist/types/date-range-picker/date-range-panel.d.ts.map +1 -1
  195. package/dist/types/date-range-picker/date-range-picker-defaults.d.ts.map +1 -1
  196. package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
  197. package/dist/types/date-range-picker/date-range-picker.types.d.ts +9 -0
  198. package/dist/types/date-range-picker/date-range-picker.types.d.ts.map +1 -1
  199. package/dist/types/date-range-picker/use-date-range-picker.d.ts +1 -0
  200. package/dist/types/date-range-picker/use-date-range-picker.d.ts.map +1 -1
  201. package/dist/types/datetime-picker/datetime-picker-defaults.d.ts.map +1 -1
  202. package/dist/types/datetime-picker/datetime-picker-panel.d.ts +2 -0
  203. package/dist/types/datetime-picker/datetime-picker-panel.d.ts.map +1 -1
  204. package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
  205. package/dist/types/datetime-picker/datetime-picker.types.d.ts +9 -0
  206. package/dist/types/datetime-picker/datetime-picker.types.d.ts.map +1 -1
  207. package/dist/types/datetime-picker/use-datetime-picker.d.ts +2 -1
  208. package/dist/types/datetime-picker/use-datetime-picker.d.ts.map +1 -1
  209. package/dist/types/datetime-range-picker/datetime-range-panel.d.ts +2 -0
  210. package/dist/types/datetime-range-picker/datetime-range-panel.d.ts.map +1 -1
  211. package/dist/types/datetime-range-picker/datetime-range-picker-defaults.d.ts.map +1 -1
  212. package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
  213. package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts +9 -0
  214. package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts.map +1 -1
  215. package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts +2 -1
  216. package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts.map +1 -1
  217. package/dist/types/picker-panel/picker-footer.d.ts +8 -2
  218. package/dist/types/picker-panel/picker-footer.d.ts.map +1 -1
  219. package/dist/types/picker-panel/use-media-query.d.ts +2 -2
  220. package/dist/types/picker-panel/use-media-query.d.ts.map +1 -1
  221. package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -1
  222. package/dist/types/popover/index.d.ts +1 -1
  223. package/dist/types/popover/index.d.ts.map +1 -1
  224. package/dist/types/popover/popover-parts.d.ts +2 -1
  225. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  226. package/dist/types/popover/popover.d.ts +4 -2
  227. package/dist/types/popover/popover.d.ts.map +1 -1
  228. package/dist/types/popover/popover.types.d.ts +17 -0
  229. package/dist/types/popover/popover.types.d.ts.map +1 -1
  230. package/dist/types/progress-indicator/loader.d.ts +1 -0
  231. package/dist/types/progress-indicator/loader.d.ts.map +1 -1
  232. package/dist/types/section/section.d.ts.map +1 -1
  233. package/dist/types/section/section.types.d.ts +4 -2
  234. package/dist/types/section/section.types.d.ts.map +1 -1
  235. package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
  236. package/dist/types/switch/switch-defaults.d.ts.map +1 -1
  237. package/dist/types/switch/switch.d.ts +2 -1
  238. package/dist/types/switch/switch.d.ts.map +1 -1
  239. package/dist/types/switch/switch.types.d.ts +9 -0
  240. package/dist/types/switch/switch.types.d.ts.map +1 -1
  241. package/dist/types/tag/tag-chip.d.ts +4 -1
  242. package/dist/types/tag/tag-chip.d.ts.map +1 -1
  243. package/dist/types/tag/tag.d.ts +1 -1
  244. package/dist/types/tag/tag.d.ts.map +1 -1
  245. package/dist/types/tag/tag.types.d.ts +6 -0
  246. package/dist/types/tag/tag.types.d.ts.map +1 -1
  247. package/dist/types/time-picker/time-picker-panel.d.ts +3 -1
  248. package/dist/types/time-picker/time-picker-panel.d.ts.map +1 -1
  249. package/dist/types/time-picker/time-picker.d.ts.map +1 -1
  250. package/dist/types/time-range-picker/time-range-panel.d.ts +2 -0
  251. package/dist/types/time-range-picker/time-range-panel.d.ts.map +1 -1
  252. package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
  253. package/dist/{upload-DggJrkQ7.js → upload-CPl38p-S.js} +1 -1
  254. package/dist/upload.js +1 -1
  255. package/dist/use-date-picker-DWV7KWS7.js +137 -0
  256. package/dist/use-media-query-DJY5h_K5.js +15 -0
  257. package/dist/{use-picker-draft-Bw8VFaj0.js → use-picker-draft-BJlHcb6J.js} +128 -134
  258. package/dist/{wizard-BokOrtwq.js → wizard-4c0X7Bx_.js} +1 -1
  259. package/dist/wizard.js +1 -1
  260. package/package.json +6 -6
  261. package/dist/chart-DwXqQZjQ.js +0 -1027
  262. package/dist/column-manager-BBGczWQe.js +0 -586
  263. package/dist/dashboard-grid-DAY_CjCW.js +0 -1191
  264. package/dist/picker-jump-BcTRIJs6.js +0 -70
  265. package/dist/popover-BfEn2wdZ.js +0 -500
  266. package/dist/switch-C2krbZHI.js +0 -147
  267. package/dist/use-date-picker-DL8tRXji.js +0 -63
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./datetime-range-picker-DU5ctZbm.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./datetime-range-picker-CX_tBt6b.js";
2
2
  export { n as DATETIME_RANGE_PICKER_MONTHS, i as DATETIME_RANGE_PICKER_STEP, o as DateTimeRangePicker, t as DateTimeRangePickerDefaultsProvider, e as dateTimeRangePickerLengthLabel, a as isSameDateTimeRange, r as useDateTimeRangePickerDefaults };
@@ -1,10 +1,10 @@
1
1
  import { r as e } from "./i18n-D7xXDd8-.js";
2
- import { n as t } from "./badge-pgYVOnZO.js";
2
+ import { n as t } from "./badge-DFskjsxA.js";
3
3
  import { t as n } from "./skeleton-DeEOmm1y.js";
4
4
  import { n as r } from "./container-WoYiHo50.js";
5
5
  import { s as i } from "./page-DT8L0iRT.js";
6
- import { w as a } from "./page-header-NN3Jq5vb.js";
7
- import { c as o, d as s, l as c, o as l, r as u, s as d, t as f } from "./section-CQPQf6RU.js";
6
+ import { w as a } from "./page-header-DmwBGwlm.js";
7
+ import { c as o, d as s, l as c, o as l, r as u, s as d, t as f } from "./section-D_qOfdxR.js";
8
8
  import { a as p, n as m, o as h, r as g, t as _ } from "./tabs-C-Bc7WmQ.js";
9
9
  import { keyedProps as v } from "@slotted/core/selector-key";
10
10
  import { createControllable as ee } from "@slotted/core/state";
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./detail-panel-DLgRhEFO.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./detail-panel-EImAtksY.js";
2
2
  export { t as DetailPanel, o as DetailPanelBody, r as DetailPanelDefaultsProvider, n as DetailPanelSection, i as DetailPanelTabs, e as useDetailPanel, a as useDetailPanelDefaults };
@@ -54,6 +54,7 @@
54
54
  "variant": "soft",
55
55
  "size": "md",
56
56
  "shape": "pill",
57
+ "inline": false,
57
58
  "live": "off",
58
59
  "placement": "top-end",
59
60
  "overlap": "rectangle",
@@ -108,6 +109,13 @@
108
109
  "appliesTo": "Badge",
109
110
  "description": "Type and glyph size follow the control scale, so a badge shrinks with the density of the controls beside it."
110
111
  },
112
+ {
113
+ "name": "inline",
114
+ "type": "boolean",
115
+ "defaultValue": "false",
116
+ "appliesTo": "Badge",
117
+ "description": "No taller than the line of text around it, for a title or a sentence: the line keeps its height and what is under it its distance. The badge takes its own size where the line has the room and one line of the text where it does not; its words are at most nine tenths of the text around it."
118
+ },
111
119
  {
112
120
  "name": "shape",
113
121
  "type": "'pill' | 'square' | 'dot'",
@@ -41,6 +41,7 @@ export default function BadgeBasic() {
41
41
  | `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | Badge | The semantic color of the badge. Six tones are available. |
42
42
  | `variant` | `'solid' \| 'soft' \| 'outline'` | soft | Badge | How the tone is painted: filled, tinted or as an edge alone. All three variants draw the tone edge. |
43
43
  | `size` | `'sm' \| 'md' \| 'lg'` | md | Badge | Type and glyph size follow the control scale, so a badge shrinks with the density of the controls beside it. |
44
+ | `inline` | `boolean` | false | Badge | No taller than the line of text around it, for a title or a sentence: the line keeps its height and what is under it its distance. The badge takes its own size where the line has the room and one line of the text where it does not; its words are at most nine tenths of the text around it. |
44
45
  | `shape` | `'pill' \| 'square' \| 'dot'` | pill | Badge | A dot draws no count. Its children are its only content, so the words of a dot go in a visually hidden element. |
45
46
  | `count` | `number` | — | Badge | The number the badge shows, written before any children and formatted for the locale. |
46
47
  | `max` | `number \| false` | 99 | Badge | The largest count written in full. Above it the badge shows the ceiling and a plus sign. false removes the ceiling. |
@@ -471,6 +471,13 @@
471
471
  "appliesTo": "Calendar",
472
472
  "description": "Which zone answers \"what is today\"."
473
473
  },
474
+ {
475
+ "name": "today",
476
+ "type": "PlainDate",
477
+ "defaultValue": "the clock’s",
478
+ "appliesTo": "Calendar",
479
+ "description": "The day it is: the day marked as today, and the month it opens on."
480
+ },
474
481
  {
475
482
  "name": "firstDayOfWeek",
476
483
  "type": "number",
@@ -520,7 +527,7 @@
520
527
  "type": "component",
521
528
  "defaultValue": "—",
522
529
  "appliesTo": "application",
523
- "description": "Sets timeZone, firstDayOfWeek, months, weekNumbers, fixedWeeks, outsideDays and calendar once for everything under it; a prop on the calendar still wins."
530
+ "description": "Sets timeZone, today, firstDayOfWeek, months, weekNumbers, fixedWeeks, outsideDays and calendar once for everything under it; a prop on the calendar still wins."
524
531
  },
525
532
  {
526
533
  "name": "render",
@@ -80,13 +80,14 @@ Excerpt — not a complete module
80
80
  | `header` | `boolean` | true | Calendar | The name of the page and the controls that turn it. false leaves them out, for a page with a month control of its own: the grid is named by its caption, and focusedDate turns the page. |
81
81
  | `locale` | `string` | the language in force | Calendar | BCP 47. Decides the month names, the weekday names and the day a week starts on. |
82
82
  | `timeZone` | `string` | the runtime’s | Calendar | Which zone answers "what is today". |
83
+ | `today` | `PlainDate` | the clock’s | Calendar | The day it is: the day marked as today, and the month it opens on. |
83
84
  | `firstDayOfWeek` | `number` | the locale’s | Calendar | 0 is Sunday. Overrides what the locale says, for a product that fixes one. |
84
85
  | `calendar` | `'gregory'` | gregory | Calendar | The calendar system. One value today, and an axis rather than a silence. |
85
86
  | `disabled` | `boolean` | — | Calendar | Answers no key and no press, and takes every cell out of the tab sequence. |
86
87
  | `readOnly` | `boolean` | — | Calendar | Readable and not changeable, and never faded. |
87
88
  | `invalid` | `boolean` | — | Calendar | Retargets the focus ring to the danger color. |
88
89
  | `messages` | `Partial<CalendarMessages>` | — | Calendar | Words laid over the language in force, key by key: the back (previous) and forward (next) triggers’ accessible names. |
89
- | `CalendarDefaultsProvider` | `component` | — | application | Sets timeZone, firstDayOfWeek, months, weekNumbers, fixedWeeks, outsideDays and calendar once for everything under it; a prop on the calendar still wins. |
90
+ | `CalendarDefaultsProvider` | `component` | — | application | Sets timeZone, today, firstDayOfWeek, months, weekNumbers, fixedWeeks, outsideDays and calendar once for everything under it; a prop on the calendar still wins. |
90
91
  | `render` | `(props: CalendarRootProps) => ReactNode` | — | Calendar | Substitutes the element the root renders. The props carry the ref, which the family reaches its own cells through. |
91
92
  | `ref` | `Ref<CalendarHandle>` | — | Calendar | focus() puts the reader on the cell holding the tab stop; focusDate() moves them to a date, paging the grid to reach it. |
92
93
  | `onKeyDown` | `KeyboardEventHandler` | — | Calendar | Runs before the family acts, and calling preventDefault stops it acting at all — which is how a surface above the calendar takes a key first. |
@@ -246,6 +246,54 @@ const series: ChartSeries[] = [
246
246
  ];
247
247
  ```
248
248
 
249
+ ### Lines that end with their name
250
+
251
+ endLabel writes the name and the last value after a line’s last point, in its color, and the plot keeps the room of the widest. Labels that would touch move apart, and a hidden series takes its label with it. The strokes tell the lines apart without color.
252
+
253
+ Excerpt — not a complete module
254
+
255
+ ```tsx
256
+ const series: ChartSeries[] = [
257
+ { kind: 'line', field: 'plan', label: 'Plan', endLabel: { strong: true } },
258
+ { kind: 'line', field: 'peers', label: 'Peers', endLabel: true, stroke: 'dashed' },
259
+ { kind: 'line', field: 'market', label: 'Market', endLabel: true, stroke: 'dotted' },
260
+ ];
261
+ ```
262
+
263
+ ### Ticks the application chooses
264
+
265
+ x.ticks names the times that take a tick and a label, and x.secondary writes a second line under each, such as an age. The table and the summary leave the second line out.
266
+
267
+ Excerpt — not a complete module
268
+
269
+ ```tsx
270
+ const x: ChartXAxis = {
271
+ field: 'at',
272
+ type: 'time',
273
+ format: { year: 'numeric' },
274
+ secondary: (date) => `${date.getUTCFullYear() - 1986} years`,
275
+ ticks: ['2020-01-01', '2030-01-01', '2040-01-01'],
276
+ };
277
+ ```
278
+
279
+ ### Two charts on one category axis
280
+
281
+ labelWidth starts both plots at one place, and x.labels writes the months once: the chart above leaves them to the strip under it.
282
+
283
+ Excerpt — not a complete module
284
+
285
+ ```tsx
286
+ <>
287
+ <Chart
288
+ data={monthly}
289
+ series={orders}
290
+ x={{ field: 'month', labels: false }}
291
+ y={{ labelWidth: 64 }}
292
+ />
293
+ <Chart data={monthly} series={revenue} x={{ field: 'month' }} y={{ labelWidth: 64 }} />
294
+ </>;
295
+ ```
296
+
249
297
  ### Targets, ranges and events
250
298
 
251
299
  A band for the tolerance range, a line for the annual target and a vertical line on the month the campaign started — each labelled on the plot.
@@ -35,7 +35,8 @@
35
35
  ],
36
36
  "stroke": [
37
37
  "solid",
38
- "dashed"
38
+ "dashed",
39
+ "dotted"
39
40
  ],
40
41
  "markers": [
41
42
  "none",
@@ -260,7 +261,7 @@
260
261
  "part": "help-content",
261
262
  "element": "div",
262
263
  "required": false,
263
- "purpose": "The help note, a popover anchored to its control."
264
+ "purpose": "The help note, in a popover anchored to its control, or in a sheet headed by the title on a phone."
264
265
  },
265
266
  {
266
267
  "part": "actions",
@@ -493,14 +494,14 @@
493
494
  "type": "ChartXAxis",
494
495
  "defaultValue": "—",
495
496
  "appliesTo": "Chart",
496
- "description": "The category field, and its type (category, time, value), label, format and extent"
497
+ "description": "The category field, and its type (category, time, value), label, format, extent, labels, ticks and secondary"
497
498
  },
498
499
  {
499
500
  "name": "y",
500
501
  "type": "ChartYAxis | [ChartYAxis, ChartYAxis]",
501
502
  "defaultValue": "—",
502
503
  "appliesTo": "Chart",
503
- "description": "The value axis, or the start and end axes: label, format, scale, extent, labelWidth"
504
+ "description": "The value axis, or the start and end axes: label, format, scale, extent, labelWidth, labels"
504
505
  },
505
506
  {
506
507
  "name": "min",
@@ -537,6 +538,27 @@
537
538
  "appliesTo": "y",
538
539
  "description": "The pixels the axis labels take beside an upright plot. Two charts stacked on the same categories with one width start their plots at one place; a longer label is cut with an ellipsis"
539
540
  },
541
+ {
542
+ "name": "labels",
543
+ "type": "boolean",
544
+ "defaultValue": "true",
545
+ "appliesTo": "x, y",
546
+ "description": "Whether the axis writes its labels. false gives their room to the plot, for a chart stacked with one that writes the same categories; a stated labelWidth keeps it"
547
+ },
548
+ {
549
+ "name": "ticks",
550
+ "type": "readonly (string | number | Date)[]",
551
+ "defaultValue": "—",
552
+ "appliesTo": "x",
553
+ "description": "On a time axis, the times that take a tick and a label, in place of the engine’s. One outside the domain in view is not drawn"
554
+ },
555
+ {
556
+ "name": "secondary",
557
+ "type": "(value: Date) => string",
558
+ "defaultValue": "—",
559
+ "appliesTo": "x",
560
+ "description": "On a time axis, a second line under each label. The date holds the axis’ wall clock in UTC, so it is read with getUTC*. The table and the summary leave it out"
561
+ },
540
562
  {
541
563
  "name": "orientation",
542
564
  "type": "'vertical' | 'horizontal'",
@@ -560,10 +582,17 @@
560
582
  },
561
583
  {
562
584
  "name": "stroke",
563
- "type": "'solid' | 'dashed'",
585
+ "type": "'solid' | 'dashed' | 'dotted'",
564
586
  "defaultValue": "solid",
565
587
  "appliesTo": "series",
566
- "description": "A dashed line for a reference"
588
+ "description": "The dash of a line, repeated by the legend and the tooltip: lines told apart without color"
589
+ },
590
+ {
591
+ "name": "endLabel",
592
+ "type": "boolean | (point) => string | { text, strong }",
593
+ "defaultValue": "false",
594
+ "appliesTo": "series",
595
+ "description": "The name and the last value after the last point of a line or an area, in the series’ color. strong takes the text color and the semibold weight, for the line the others are read against. An upright chart with no end axis draws it"
567
596
  },
568
597
  {
569
598
  "name": "markers",
@@ -591,7 +620,7 @@
591
620
  "type": "readonly ChartAnnotation[]",
592
621
  "defaultValue": "—",
593
622
  "appliesTo": "Chart",
594
- "description": "Lines and bands on either axis, labelled, in a tone. On the category axis a value names a category by its key or its x value; one that names none is not drawn"
623
+ "description": "Lines and bands on either axis, labelled, in a tone the label shares. On the category axis a value names a category by its key or its x value; one that names none is not drawn"
595
624
  },
596
625
  {
597
626
  "name": "recordKey",
@@ -1267,6 +1296,30 @@
1267
1296
  "source": "const series: ChartSeries[] = [\n { id: 'forecast', kind: 'line', field: 'forecast', label: 'Forecast', stroke: 'dashed' },\n {\n id: 'likely',\n kind: 'range',\n lower: 'low',\n upper: 'high',\n label: 'Likely range',\n of: 'forecast',\n },\n];\n",
1268
1297
  "verdict": "excerpt"
1269
1298
  },
1299
+ {
1300
+ "id": "end-labels",
1301
+ "title": "Lines that end with their name",
1302
+ "note": "endLabel writes the name and the last value after a line’s last point, in its color, and the plot keeps the room of the widest. Labels that would touch move apart, and a hidden series takes its label with it. The strokes tell the lines apart without color.",
1303
+ "language": "tsx",
1304
+ "source": "const series: ChartSeries[] = [\n { kind: 'line', field: 'plan', label: 'Plan', endLabel: { strong: true } },\n { kind: 'line', field: 'peers', label: 'Peers', endLabel: true, stroke: 'dashed' },\n { kind: 'line', field: 'market', label: 'Market', endLabel: true, stroke: 'dotted' },\n];\n",
1305
+ "verdict": "excerpt"
1306
+ },
1307
+ {
1308
+ "id": "time-ticks",
1309
+ "title": "Ticks the application chooses",
1310
+ "note": "x.ticks names the times that take a tick and a label, and x.secondary writes a second line under each, such as an age. The table and the summary leave the second line out.",
1311
+ "language": "tsx",
1312
+ "source": "const x: ChartXAxis = {\n field: 'at',\n type: 'time',\n format: { year: 'numeric' },\n secondary: (date) => `${date.getUTCFullYear() - 1986} years`,\n ticks: ['2020-01-01', '2030-01-01', '2040-01-01'],\n};\n",
1313
+ "verdict": "excerpt"
1314
+ },
1315
+ {
1316
+ "id": "shared-categories",
1317
+ "title": "Two charts on one category axis",
1318
+ "note": "labelWidth starts both plots at one place, and x.labels writes the months once: the chart above leaves them to the strip under it.",
1319
+ "language": "tsx",
1320
+ "source": "<>\n <Chart\n data={monthly}\n series={orders}\n x={{ field: 'month', labels: false }}\n y={{ labelWidth: 64 }}\n />\n <Chart data={monthly} series={revenue} x={{ field: 'month' }} y={{ labelWidth: 64 }} />\n</>;\n",
1321
+ "verdict": "excerpt"
1322
+ },
1270
1323
  {
1271
1324
  "id": "annotations",
1272
1325
  "title": "Targets, ranges and events",
@@ -74,21 +74,25 @@ Excerpt — not a complete module
74
74
  | --- | --- | --- | --- | --- |
75
75
  | `data` | `readonly ChartRecord[]` | — | Chart | One record per category or per point. Fields are named by x and by each series |
76
76
  | `series` | `readonly ChartSeries[]` | — | Chart | What is drawn: kind (line, area, bar, pie, scatter, range), field, label, and how. Order is legend order and color order |
77
- | `x` | `ChartXAxis` | — | Chart | The category field, and its type (category, time, value), label, format and extent |
78
- | `y` | `ChartYAxis \| [ChartYAxis, ChartYAxis]` | — | Chart | The value axis, or the start and end axes: label, format, scale, extent, labelWidth |
77
+ | `x` | `ChartXAxis` | — | Chart | The category field, and its type (category, time, value), label, format, extent, labels, ticks and secondary |
78
+ | `y` | `ChartYAxis \| [ChartYAxis, ChartYAxis]` | — | Chart | The value axis, or the start and end axes: label, format, scale, extent, labelWidth, labels |
79
79
  | `min` | `number` | — | x, y | The lowest value the axis must hold. The data widens the extent, never narrows it |
80
80
  | `max` | `number` | — | x, y | The highest value the axis must hold |
81
81
  | `scale` | `'linear' \| 'log'` | linear | y | A logarithmic value axis |
82
82
  | `extent` | `'zero' \| 'data'` | zero with a bar or stacked series, else data | y | What the axis holds besides the data: zero, for a bar, or the data alone, for a line |
83
83
  | `labelWidth` | `number` | — | y | The pixels the axis labels take beside an upright plot. Two charts stacked on the same categories with one width start their plots at one place; a longer label is cut with an ellipsis |
84
+ | `labels` | `boolean` | true | x, y | Whether the axis writes its labels. false gives their room to the plot, for a chart stacked with one that writes the same categories; a stated labelWidth keeps it |
85
+ | `ticks` | `readonly (string \| number \| Date)[]` | — | x | On a time axis, the times that take a tick and a label, in place of the engine’s. One outside the domain in view is not drawn |
86
+ | `secondary` | `(value: Date) => string` | — | x | On a time axis, a second line under each label. The date holds the axis’ wall clock in UTC, so it is read with getUTC*. The table and the summary leave it out |
84
87
  | `orientation` | `'vertical' \| 'horizontal'` | vertical | Chart | Which way categories run. Horizontal bars for a ranking with long names |
85
88
  | `stackMode` | `'normal' \| 'percent'` | normal | Chart | How series that share a stack add up: to a total, or to 100 % |
86
89
  | `curve` | `'linear' \| 'monotone' \| 'step'` | linear | series | How a line or an area passes through its points |
87
- | `stroke` | `'solid' \| 'dashed'` | solid | series | A dashed line for a reference |
90
+ | `stroke` | `'solid' \| 'dashed' \| 'dotted'` | solid | series | The dash of a line, repeated by the legend and the tooltip: lines told apart without color |
91
+ | `endLabel` | `boolean \| (point) => string \| { text, strong }` | false | series | The name and the last value after the last point of a line or an area, in the series’ color. strong takes the text color and the semibold weight, for the line the others are read against. An upright chart with no end axis draws it |
88
92
  | `markers` | `'none' \| 'last' \| 'all'` | none | series | Dots on a line: none, the last point, or every point |
89
93
  | `lower, upper` | `string` | — | series | A range series fills between two fields of each record; a record that lacks either leaves a gap |
90
94
  | `of` | `string` | — | series | The id of the line a range belongs to: the band takes its color and axis and is drawn under it |
91
- | `annotations` | `readonly ChartAnnotation[]` | — | Chart | Lines and bands on either axis, labelled, in a tone. On the category axis a value names a category by its key or its x value; one that names none is not drawn |
95
+ | `annotations` | `readonly ChartAnnotation[]` | — | Chart | Lines and bands on either axis, labelled, in a tone the label shares. On the category axis a value names a category by its key or its x value; one that names none is not drawn |
92
96
  | `recordKey` | `string` | — | Chart | The field that names a record when x is a value axis, for points and selection |
93
97
  | `locale` | `string` | — | Chart | BCP 47, for every number and date; the language in force when absent |
94
98
  | `title` | `ReactNode` | — | Chart | The caption, and the plot’s accessible name. Not the native title attribute. Without title, the plot is named by the aria-label passed to Chart; use it when a surrounding heading already names the chart |
@@ -166,7 +170,7 @@ Excerpt — not a complete module
166
170
  | `orientation` | `vertical`, `horizontal` | `vertical` |
167
171
  | `stackMode` | `normal`, `percent` | `normal` |
168
172
  | `curve` | `linear`, `monotone`, `step` | `linear` |
169
- | `stroke` | `solid`, `dashed` | `solid` |
173
+ | `stroke` | `solid`, `dashed`, `dotted` | `solid` |
170
174
  | `markers` | `none`, `last`, `all` | `none` |
171
175
  | `grid` | `horizontal`, `vertical`, `both`, `none` | `horizontal` |
172
176
  | `trigger` | `axis`, `item`, `none` | `axis` |
@@ -13,7 +13,7 @@ Excerpt — not a complete module
13
13
 
14
14
  ```tsx
15
15
  // The default. 1234 is R$ 12,34, the separator is never typed,
16
- // and the caret has one legal position: after the last digit.
16
+ // and the caret keeps the count of digits on its right.
17
17
  <CurrencyField currency="BRL" entry="cents" locale="pt-BR" />;
18
18
 
19
19
  // The model number-field uses: the text is the reader's until a commit.
@@ -196,7 +196,7 @@
196
196
  "type": "'cents' | 'natural'",
197
197
  "defaultValue": "cents",
198
198
  "appliesTo": "CurrencyField, CurrencyFieldDefaultsProvider",
199
- "description": "How the reader types. cents is the cash register: digits enter at the minor unit and shift left, the separator is never typed and the caret has one legal position. natural is the spreadsheet, and the model number-field uses"
199
+ "description": "How the reader types. cents is the cash register: digits enter at the minor unit and shift left, the separator is never typed and the caret keeps the count of digits on its right. natural is the spreadsheet, and the model number-field uses"
200
200
  },
201
201
  {
202
202
  "name": "formatOn",
@@ -217,7 +217,7 @@
217
217
  "type": "'end' | 'start'",
218
218
  "defaultValue": "end",
219
219
  "appliesTo": "CurrencyField, CurrencyFieldDefaultsProvider",
220
- "description": "Which edge the amount is set against. end by default: a column of amounts is compared on its last digit, and the cents-first caret already lives there"
220
+ "description": "Which edge the amount is set against. end by default: a column of amounts is compared on its last digit, which is where a cents-first amount is typed"
221
221
  },
222
222
  {
223
223
  "name": "locale",
@@ -462,7 +462,7 @@
462
462
  "The pattern is the WAI-ARIA APG’s Spinbutton (w3.org/WAI/ARIA/apg/patterns/spinbutton/), taken whole: role=\"spinbutton\" on the focusable element with aria-valuenow, aria-valuemin, aria-valuemax and aria-valuetext, Up and Down stepping, Home and End reaching the bounds, and Page Up and Page Down as the larger step the pattern lists as optional.",
463
463
  "aria-valuenow is the amount in major units and aria-valuetext is the string the reader sees, because aria-valuenow alone announces 1480 for a control showing R$ 1.480,00. When the control is empty neither property is set: no amount is not an amount of nought.",
464
464
  "The frame carries no role. WAI-ARIA requires the children of a spinbutton to be non-interactive and presentational, so the two steppers are the control’s siblings inside a box that announces nothing.",
465
- "Under cents-first entry the caret is put back after the last digit on every edit, and it decides nothing while it is anywhere else: a digit typed against the front of R$ 0,00 is two cents, not twenty reais, because the digits that changed are read from the difference between the text before the edit and the text after it. That is legal here and forbidden in number-field for one reason: the text is generated rather than typed, so there is no reader’s caret to preserve and exactly one position where the next keystroke means something. A separator keystroke is refused outright rather than silently swallowed, and the sign is a key of its own so it never enters the digit run.",
465
+ "Under cents-first entry the caret keeps the count of digits on its right through each edit, which the generated separators do not change: a digit is typed, erased or exchanged where the caret is, and at the end the field is the cash register. Zeros on the right of the caret stay until blur, so the first digit of R$ 10.000,00 can be exchanged. Backspace on a separator erases the digit on its left and Delete the digit on its right; a digit past the fifteenth is refused. A focus by keyboard, and a press on an amount that is nought, put the caret at the end. A separator keystroke is refused outright rather than silently swallowed, and the sign is a key of its own so it never enters the digit run.",
466
466
  "inputMode is numeric under cents-first entry — the separator is never typed and the sign is a single key, so the numeric keypad is complete for the task — and derived from the format under natural entry. It is never derived from the user agent, which would be a hydration mismatch.",
467
467
  "aria-required, never the native required. The native attribute engages browser constraint validation and changes submit behavior, which the library must not impose as a side effect of describing a field. disabled and readonly are native, because that is what those two words mean.",
468
468
  "transaction-amount and transaction-currency are the standard autofill field names for a payment amount, and naming a field’s purpose is what WCAG 2.2 SC 1.3.5 asks for. The family leaves autoComplete off by default and documents the token, because most amounts in a back office are not payment amounts.",
@@ -577,7 +577,7 @@
577
577
  "title": "The two ways an amount is typed",
578
578
  "note": "Type 1234 into each. On the left the digits shift left from the cent, as a cash register does; on the right the text is yours until you leave the field, as a spreadsheet is — regrouped as it arrives, which is what formatOn decides and what cents-first entry has always done.",
579
579
  "language": "tsx",
580
- "source": "// The default. 1234 is R$ 12,34, the separator is never typed,\n// and the caret has one legal position: after the last digit.\n<CurrencyField currency=\"BRL\" entry=\"cents\" locale=\"pt-BR\" />;\n\n// The model number-field uses: the text is the reader's until a commit.\n<CurrencyField currency=\"BRL\" entry=\"natural\" locale=\"pt-BR\" />;\n",
580
+ "source": "// The default. 1234 is R$ 12,34, the separator is never typed,\n// and the caret keeps the count of digits on its right.\n<CurrencyField currency=\"BRL\" entry=\"cents\" locale=\"pt-BR\" />;\n\n// The model number-field uses: the text is the reader's until a commit.\n<CurrencyField currency=\"BRL\" entry=\"natural\" locale=\"pt-BR\" />;\n",
581
581
  "verdict": "excerpt"
582
582
  },
583
583
  {
@@ -43,10 +43,10 @@ Excerpt — not a complete module
43
43
  | `currencyDisplay` | `'symbol' \| 'narrowSymbol' \| 'code' \| 'name'` | symbol | CurrencyField, CurrencyFieldDefaultsProvider | How the currency is written beside the amount, and none writes nothing at all: the amount becomes a plain decimal with the currency’s own fraction digits, so the symbol can live in a start adornment instead of inside the value. It is the one arrangement Intl has no option for |
44
44
  | `value` | `number \| null` | — | CurrencyField | Present means the consumer owns the amount, for the life of the component. It is in major units — reais, not centavos — and null is empty: a required total left blank and a total of nought are different facts |
45
45
  | `defaultValue` | `number \| null` | — | CurrencyField | What an uncontrolled control starts from, read once. A native form reset returns to it |
46
- | `entry` | `'cents' \| 'natural'` | cents | CurrencyField, CurrencyFieldDefaultsProvider | How the reader types. cents is the cash register: digits enter at the minor unit and shift left, the separator is never typed and the caret has one legal position. natural is the spreadsheet, and the model number-field uses |
46
+ | `entry` | `'cents' \| 'natural'` | cents | CurrencyField, CurrencyFieldDefaultsProvider | How the reader types. cents is the cash register: digits enter at the minor unit and shift left, the separator is never typed and the caret keeps the count of digits on its right. natural is the spreadsheet, and the model number-field uses |
47
47
  | `formatOn` | `'change' \| 'commit'` | change | CurrencyField, CurrencyFieldDefaultsProvider | When the text takes the locale’s shape under entry="natural". change regroups on every keystroke; commit holds the reader’s own text until blur, Enter or a step. Cents-first entry generates the text after every edit, so it decides nothing there |
48
48
  | `appearance` | `'control' \| 'display'` | control | CurrencyField | A field among fields, or the headline amount of an entry sheet: the 4xl step, the mark apart and muted, a rule under the amount instead of a box. size and variant do not apply to display |
49
- | `align` | `'end' \| 'start'` | end | CurrencyField, CurrencyFieldDefaultsProvider | Which edge the amount is set against. end by default: a column of amounts is compared on its last digit, and the cents-first caret already lives there |
49
+ | `align` | `'end' \| 'start'` | end | CurrencyField, CurrencyFieldDefaultsProvider | Which edge the amount is set against. end by default: a column of amounts is compared on its last digit, which is where a cents-first amount is typed |
50
50
  | `locale` | `string` | the language in force | CurrencyField | BCP 47. It decides the separators, where the symbol goes and the numbering system — never the symbol itself, which is the currency’s |
51
51
  | `format` | `Intl.NumberFormatOptions` | — | CurrencyField | Any other Intl option: currencySign for accounting parentheses, signDisplay, useGrouping, roundingMode. Every key here wins over the family’s own; style and currency are the family’s |
52
52
  | `fractionDigits` | `number` | the currency’s minor units | CurrencyField | Overrides how many fraction digits the amount is written with, for a unit price quoted finer than the currency’s cent |
@@ -106,7 +106,7 @@ Excerpt — not a complete module
106
106
  - The pattern is the WAI-ARIA APG’s Spinbutton (w3.org/WAI/ARIA/apg/patterns/spinbutton/), taken whole: role="spinbutton" on the focusable element with aria-valuenow, aria-valuemin, aria-valuemax and aria-valuetext, Up and Down stepping, Home and End reaching the bounds, and Page Up and Page Down as the larger step the pattern lists as optional.
107
107
  - aria-valuenow is the amount in major units and aria-valuetext is the string the reader sees, because aria-valuenow alone announces 1480 for a control showing R$ 1.480,00. When the control is empty neither property is set: no amount is not an amount of nought.
108
108
  - The frame carries no role. WAI-ARIA requires the children of a spinbutton to be non-interactive and presentational, so the two steppers are the control’s siblings inside a box that announces nothing.
109
- - Under cents-first entry the caret is put back after the last digit on every edit, and it decides nothing while it is anywhere else: a digit typed against the front of R$ 0,00 is two cents, not twenty reais, because the digits that changed are read from the difference between the text before the edit and the text after it. That is legal here and forbidden in number-field for one reason: the text is generated rather than typed, so there is no reader’s caret to preserve and exactly one position where the next keystroke means something. A separator keystroke is refused outright rather than silently swallowed, and the sign is a key of its own so it never enters the digit run.
109
+ - Under cents-first entry the caret keeps the count of digits on its right through each edit, which the generated separators do not change: a digit is typed, erased or exchanged where the caret is, and at the end the field is the cash register. Zeros on the right of the caret stay until blur, so the first digit of R$ 10.000,00 can be exchanged. Backspace on a separator erases the digit on its left and Delete the digit on its right; a digit past the fifteenth is refused. A focus by keyboard, and a press on an amount that is nought, put the caret at the end. A separator keystroke is refused outright rather than silently swallowed, and the sign is a key of its own so it never enters the digit run.
110
110
  - inputMode is numeric under cents-first entry — the separator is never typed and the sign is a single key, so the numeric keypad is complete for the task — and derived from the format under natural entry. It is never derived from the user agent, which would be a hydration mismatch.
111
111
  - aria-required, never the native required. The native attribute engages browser constraint validation and changes submit behavior, which the library must not impose as a side effect of describing a field. disabled and readonly are native, because that is what those two words mean.
112
112
  - transaction-amount and transaction-currency are the standard autofill field names for a payment amount, and naming a field’s purpose is what WCAG 2.2 SC 1.3.5 asks for. The family leaves autoComplete off by default and documents the token, because most amounts in a back office are not payment amounts.
@@ -583,6 +583,20 @@
583
583
  "appliesTo": "DataGrid",
584
584
  "description": "Rows that are neither selectable nor editable, drawn with data-disabled."
585
585
  },
586
+ {
587
+ "name": "isRowSelectable",
588
+ "type": "(row: Row) => boolean",
589
+ "defaultValue": "—",
590
+ "appliesTo": "DataGrid",
591
+ "description": "Whether a row takes part in the selection. A row it refuses leaves the press, the Shift range, Ctrl+A and the header checkbox, and its checkbox is disabled. It keeps its ink, hover, activation and editing, which a row in disabledKeys loses."
592
+ },
593
+ {
594
+ "name": "isRowMuted",
595
+ "type": "(row: Row) => boolean",
596
+ "defaultValue": "—",
597
+ "appliesTo": "DataGrid",
598
+ "description": "Draws a row that is no longer active, with data-muted: its cells, its pop-in and the links in them take --slotted-data-grid-color-muted. Hover, selection, activation and editing stay, and the selected ground stays under the muted ink."
599
+ },
586
600
  {
587
601
  "name": "query",
588
602
  "type": "GridQuery",
@@ -1211,7 +1225,7 @@
1211
1225
  }
1212
1226
  ],
1213
1227
  "accessibility": [
1214
- "`columns`, `disabledKeys` and a function `rowKey` are compared by identity: a new array or function on a render of the parent re-renders every mounted row, so declare them at module scope or memoize them. The renderers — `cellRenderers`, `editorRenderers`, `renderCell`, `renderEditor`, `renderHeader`, `renderGroup`, `renderDetail` — `messages` and `tree` are read when a row renders and may be written inline. A row renders again for its own row object, selection, cursor, edit or expansion, and for a change of `columns` or the language; a renderer whose output reads state outside its row is refreshed by memoizing `columns` on that state.",
1228
+ "`columns`, `disabledKeys` and a function `rowKey` are compared by identity: a new array or function on a render of the parent re-renders every mounted row, so declare them at module scope or memoize them. The renderers — `cellRenderers`, `editorRenderers`, `renderCell`, `renderEditor`, `renderHeader`, `renderGroup`, `renderDetail` — `messages` and `tree` are read when a row renders and may be written inline, and so may `isRowSelectable` and `isRowMuted`: a row renders again only when its own answer changes. A row renders again for its own row object, selection, cursor, edit or expansion, and for a change of `columns` or the language; a renderer whose output reads state outside its row is refreshed by memoizing `columns` on that state.",
1215
1229
  "The root is role=\"grid\": a composite widget with one tab stop. The current cell — or the single simple widget inside it, a link, a button or a checkbox — is the only element with tabindex=\"0\"; Tab enters there and leaves the grid to the next control of the page, which is what the APG requires of a grid and what a table cannot give.",
1216
1230
  "Every row carries aria-rowindex against aria-rowcount on the root, and every cell aria-colindex against aria-colcount, always: the grid windows its rows and columns, so the DOM is never the whole set, and the counts are what let a screen reader say “row 4,812 of 9,000”.",
1217
1231
  "aria-sort is written on the first sort key’s header only — the practice says more than one is ambiguous — and the whole order is announced through the live announcer: “Sorted by Carrier ascending, Weight descending”. A resize announces the column and its width; a filter announces its sentence through describeFilter; a copy announces the count.",
@@ -200,7 +200,7 @@ See [data-grid.props.md](./data-grid.props.md).
200
200
 
201
201
  ## Rules
202
202
 
203
- - `columns`, `disabledKeys` and a function `rowKey` are compared by identity: a new array or function on a render of the parent re-renders every mounted row, so declare them at module scope or memoize them. The renderers — `cellRenderers`, `editorRenderers`, `renderCell`, `renderEditor`, `renderHeader`, `renderGroup`, `renderDetail` — `messages` and `tree` are read when a row renders and may be written inline. A row renders again for its own row object, selection, cursor, edit or expansion, and for a change of `columns` or the language; a renderer whose output reads state outside its row is refreshed by memoizing `columns` on that state.
203
+ - `columns`, `disabledKeys` and a function `rowKey` are compared by identity: a new array or function on a render of the parent re-renders every mounted row, so declare them at module scope or memoize them. The renderers — `cellRenderers`, `editorRenderers`, `renderCell`, `renderEditor`, `renderHeader`, `renderGroup`, `renderDetail` — `messages` and `tree` are read when a row renders and may be written inline, and so may `isRowSelectable` and `isRowMuted`: a row renders again only when its own answer changes. A row renders again for its own row object, selection, cursor, edit or expansion, and for a change of `columns` or the language; a renderer whose output reads state outside its row is refreshed by memoizing `columns` on that state.
204
204
  - The root is role="grid": a composite widget with one tab stop. The current cell — or the single simple widget inside it, a link, a button or a checkbox — is the only element with tabindex="0"; Tab enters there and leaves the grid to the next control of the page, which is what the APG requires of a grid and what a table cannot give.
205
205
  - Every row carries aria-rowindex against aria-rowcount on the root, and every cell aria-colindex against aria-colcount, always: the grid windows its rows and columns, so the DOM is never the whole set, and the counts are what let a screen reader say “row 4,812 of 9,000”.
206
206
  - aria-sort is written on the first sort key’s header only — the practice says more than one is ambiguous — and the whole order is announced through the live announcer: “Sorted by Carrier ascending, Weight descending”. A resize announces the column and its width; a filter announces its sentence through describeFilter; a copy announces the count.
@@ -21,6 +21,8 @@
21
21
  | `loading` | `boolean \| 'initial' \| 'refresh'` | false | DataGrid | Skeleton rows with no answer to keep; aria-busy over an answer already drawn — rows, which dim, or the empty state, which stays. true is initial until the grid has drawn an answer, and refresh after; rows emptied while a load starts wait in the skeleton. |
22
22
  | `error` | `string \| null` | — | DataGrid | The message of a failed load; draws the error state with Try again when onRetry is set. |
23
23
  | `disabledKeys` | `string[]` | — | DataGrid | Rows that are neither selectable nor editable, drawn with data-disabled. |
24
+ | `isRowSelectable` | `(row: Row) => boolean` | — | DataGrid | Whether a row takes part in the selection. A row it refuses leaves the press, the Shift range, Ctrl+A and the header checkbox, and its checkbox is disabled. It keeps its ink, hover, activation and editing, which a row in disabledKeys loses. |
25
+ | `isRowMuted` | `(row: Row) => boolean` | — | DataGrid | Draws a row that is no longer active, with data-muted: its cells, its pop-in and the links in them take --slotted-data-grid-color-muted. Hover, selection, activation and editing stay, and the selected ground stays under the muted ink. |
24
26
  | `query` | `GridQuery` | — | DataGrid | sort, filter, search, page and group in one object. Present puts the query in controlled mode. |
25
27
  | `defaultQuery` | `GridQuery` | emptyQuery() | DataGrid | The query an uncontrolled grid starts from, read once. |
26
28
  | `onQueryChange` | `(query, request) => void` | — | DataGrid | Asked before the query moves; the request carries change: sort \| filter \| search \| page \| group, the reason, and cancel(). |
@@ -275,6 +275,13 @@
275
275
  "appliesTo": "DatePicker",
276
276
  "description": "Which zone answers \"what is now\"."
277
277
  },
278
+ {
279
+ "name": "today",
280
+ "type": "PlainDate",
281
+ "defaultValue": "the clock’s",
282
+ "appliesTo": "DatePicker",
283
+ "description": "The day it is: the mark of today, Today, and the month an empty panel opens on."
284
+ },
278
285
  {
279
286
  "name": "disabled",
280
287
  "type": "boolean",
@@ -301,7 +308,7 @@
301
308
  "type": "boolean",
302
309
  "defaultValue": "false",
303
310
  "appliesTo": "DatePicker",
304
- "description": "Draws a clear on the control."
311
+ "description": "Draws a clear on the control and in the panel, unless required."
305
312
  },
306
313
  {
307
314
  "name": "messages",
@@ -317,7 +324,7 @@
317
324
  "type": "component",
318
325
  "defaultValue": "—",
319
326
  "appliesTo": "application",
320
- "description": "Sets calendar, confirm, placement, size, timeZone and variant once."
327
+ "description": "Sets calendar, confirm, placement, size, timeZone, today and variant once."
321
328
  },
322
329
  {
323
330
  "name": "footer",
@@ -65,12 +65,13 @@ export default function DatePickerBasic() {
65
65
  | `variant` | `'outline' \| 'subtle' \| 'plain'` | outline | DatePicker | How the control draws its frame. |
66
66
  | `locale` | `string` | the language in force | DatePicker | BCP 47. Writes the field, the panel and the trigger’s name. |
67
67
  | `timeZone` | `string` | the runtime’s | DatePicker | Which zone answers "what is now". |
68
+ | `today` | `PlainDate` | the clock’s | DatePicker | The day it is: the mark of today, Today, and the month an empty panel opens on. |
68
69
  | `disabled` | `boolean` | — | DatePicker | Answers no key and no press. |
69
70
  | `readOnly` | `boolean` | — | DatePicker | Readable and not changeable. |
70
71
  | `required` | `boolean` | — | DatePicker | The form needs a value. |
71
- | `clearable` | `boolean` | false | DatePicker | Draws a clear on the control. |
72
+ | `clearable` | `boolean` | false | DatePicker | Draws a clear on the control and in the panel, unless required. |
72
73
  | `messages` | `Partial<DatePickerMessages>` | — | DatePicker | Words laid over the language in force: the trigger’s two names, and what is said of a refused date. |
73
- | `DatePickerDefaultsProvider` | `component` | — | application | Sets calendar, confirm, placement, size, timeZone and variant once. |
74
+ | `DatePickerDefaultsProvider` | `component` | — | application | Sets calendar, confirm, placement, size, timeZone, today and variant once. |
74
75
  | `footer` | `ReactNode` | the page keys | DatePicker | What the footer says when nothing is wrong. |
75
76
  | `render` | `(props: DatePickerRootProps) => ReactNode` | — | DatePicker | Substitutes the element the root renders. |
76
77
  | `ref` | `Ref<DatePickerHandle>` | — | DatePicker | focus(), open() and close(). |
@@ -345,6 +345,13 @@
345
345
  "appliesTo": "DateRangePicker",
346
346
  "description": "Which zone answers \"what is now\"."
347
347
  },
348
+ {
349
+ "name": "today",
350
+ "type": "PlainDate",
351
+ "defaultValue": "the clock’s",
352
+ "appliesTo": "DateRangePicker",
353
+ "description": "The day it is: the mark of today, and the month an empty panel opens on."
354
+ },
348
355
  {
349
356
  "name": "disabled",
350
357
  "type": "boolean",
@@ -371,7 +378,7 @@
371
378
  "type": "boolean",
372
379
  "defaultValue": "false",
373
380
  "appliesTo": "DateRangePicker",
374
- "description": "Draws a clear on the control."
381
+ "description": "Draws a clear on the control and in the panel, unless required."
375
382
  },
376
383
  {
377
384
  "name": "messages",
@@ -387,7 +394,7 @@
387
394
  "type": "component",
388
395
  "defaultValue": "—",
389
396
  "appliesTo": "application",
390
- "description": "Sets calendar, confirm, count, months, placement, size, timeZone and variant once."
397
+ "description": "Sets calendar, confirm, count, months, placement, size, timeZone, today and variant once."
391
398
  },
392
399
  {
393
400
  "name": "footer",
@@ -73,12 +73,13 @@ export default function DateRangePickerBasic() {
73
73
  | `variant` | `'outline' \| 'subtle' \| 'plain'` | outline | DateRangePicker | How the control draws its frame. |
74
74
  | `locale` | `string` | the language in force | DateRangePicker | BCP 47. Writes the field, the panel and the trigger’s name. |
75
75
  | `timeZone` | `string` | the runtime’s | DateRangePicker | Which zone answers "what is now". |
76
+ | `today` | `PlainDate` | the clock’s | DateRangePicker | The day it is: the mark of today, and the month an empty panel opens on. |
76
77
  | `disabled` | `boolean` | — | DateRangePicker | Answers no key and no press. |
77
78
  | `readOnly` | `boolean` | — | DateRangePicker | Readable and not changeable. |
78
79
  | `required` | `boolean` | — | DateRangePicker | The form needs a value. |
79
- | `clearable` | `boolean` | false | DateRangePicker | Draws a clear on the control. |
80
+ | `clearable` | `boolean` | false | DateRangePicker | Draws a clear on the control and in the panel, unless required. |
80
81
  | `messages` | `Partial<DateRangePickerMessages>` | — | DateRangePicker | Words laid over the language in force: the trigger’s names, the two ends, what is said of a refused run, and the phrases that count it. |
81
- | `DateRangePickerDefaultsProvider` | `component` | — | application | Sets calendar, confirm, count, months, placement, size, timeZone and variant once. |
82
+ | `DateRangePickerDefaultsProvider` | `component` | — | application | Sets calendar, confirm, count, months, placement, size, timeZone, today and variant once. |
82
83
  | `footer` | `ReactNode` | the limits | DateRangePicker | What the footer says when nothing is wrong. |
83
84
  | `render` | `(props: DateRangePickerRootProps) => ReactNode` | — | DateRangePicker | Substitutes the element the root renders. |
84
85
  | `ref` | `Ref<DateRangePickerHandle>` | — | DateRangePicker | focus(), open() and close(). |
@@ -315,6 +315,13 @@
315
315
  "appliesTo": "DateTimePicker",
316
316
  "description": "Which zone answers \"what is now\"."
317
317
  },
318
+ {
319
+ "name": "today",
320
+ "type": "PlainDate",
321
+ "defaultValue": "the clock’s",
322
+ "appliesTo": "DateTimePicker",
323
+ "description": "The day it is: the mark of today, the date of Now, and the empty panel’s month."
324
+ },
318
325
  {
319
326
  "name": "disabled",
320
327
  "type": "boolean",
@@ -341,7 +348,7 @@
341
348
  "type": "boolean",
342
349
  "defaultValue": "false",
343
350
  "appliesTo": "DateTimePicker",
344
- "description": "Draws a clear on the control."
351
+ "description": "Draws a clear on the control and in the panel, unless required."
345
352
  },
346
353
  {
347
354
  "name": "messages",
@@ -357,7 +364,7 @@
357
364
  "type": "component",
358
365
  "defaultValue": "—",
359
366
  "appliesTo": "application",
360
- "description": "Sets calendar, confirm, granularity, hourCycle, placement, size, step, timeZone and variant once."
367
+ "description": "Sets calendar, confirm, granularity, hourCycle, placement, size, step, timeZone, today and variant once."
361
368
  },
362
369
  {
363
370
  "name": "footer",