@barqjs/aria 0.2.0-next.0 → 0.2.0-next.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 (78) hide show
  1. package/README.md +24 -13
  2. package/package.json +127 -37
  3. package/src/autocomplete.tsx +581 -0
  4. package/src/breadcrumbs.tsx +21 -20
  5. package/src/button.tsx +151 -25
  6. package/src/calendar.tsx +1019 -92
  7. package/src/checkbox.tsx +214 -52
  8. package/src/collections.ts +88 -5
  9. package/src/color.ts +1580 -23
  10. package/src/colorpicker.tsx +698 -153
  11. package/src/colorswatchpicker.tsx +240 -0
  12. package/src/combobox.tsx +635 -113
  13. package/src/command.tsx +78 -59
  14. package/src/date.ts +31 -9
  15. package/src/datefield.tsx +1451 -336
  16. package/src/datepicker.tsx +465 -114
  17. package/src/dialog.tsx +302 -115
  18. package/src/disclosure.tsx +81 -29
  19. package/src/dnd/clipboard.ts +125 -0
  20. package/src/dnd/collection.ts +1265 -0
  21. package/src/dnd/data.ts +409 -0
  22. package/src/dnd/drag-drop.ts +801 -0
  23. package/src/dnd/index.ts +133 -0
  24. package/src/dnd/manager.ts +639 -0
  25. package/src/dnd/strings.ts +1279 -0
  26. package/src/dnd/targets.ts +726 -0
  27. package/src/dnd/types.ts +212 -0
  28. package/src/dom.ts +3 -6
  29. package/src/drag-and-drop.tsx +669 -0
  30. package/src/dropzone.tsx +208 -0
  31. package/src/file-trigger.tsx +103 -0
  32. package/src/form.tsx +18 -18
  33. package/src/gridlist.tsx +912 -121
  34. package/src/group.tsx +146 -0
  35. package/src/index.ts +402 -0
  36. package/src/interactions/focus-events.ts +13 -5
  37. package/src/interactions/keyboard.ts +195 -2
  38. package/src/interactions/modality.ts +18 -6
  39. package/src/interactions/open-link.ts +46 -13
  40. package/src/interactions/press.ts +35 -18
  41. package/src/label.ts +18 -6
  42. package/src/link.tsx +146 -50
  43. package/src/listbox.tsx +615 -89
  44. package/src/live.ts +4 -0
  45. package/src/menu.tsx +182 -89
  46. package/src/menubar.tsx +21 -17
  47. package/src/navigation-tree.tsx +357 -0
  48. package/src/numberfield.tsx +164 -60
  49. package/src/overlay-arrow.tsx +157 -0
  50. package/src/overlays.ts +364 -62
  51. package/src/platform.ts +2 -1
  52. package/src/preview-trigger.tsx +582 -0
  53. package/src/progress-bar-context.ts +15 -0
  54. package/src/questionnaire.tsx +109 -104
  55. package/src/radio.tsx +101 -27
  56. package/src/select.tsx +225 -145
  57. package/src/selection-indicator.tsx +74 -0
  58. package/src/selection.ts +73 -16
  59. package/src/shared-element-transition.tsx +316 -0
  60. package/src/sheet.tsx +1461 -0
  61. package/src/slider.tsx +139 -44
  62. package/src/switch.tsx +47 -21
  63. package/src/table.tsx +0 -0
  64. package/src/tabs.tsx +198 -89
  65. package/src/tag.tsx +217 -32
  66. package/src/textarea.tsx +186 -0
  67. package/src/textfield.tsx +103 -37
  68. package/src/toast-components.tsx +589 -0
  69. package/src/toggle-button-group.tsx +175 -0
  70. package/src/toggle-input.tsx +38 -0
  71. package/src/toggle.ts +68 -5
  72. package/src/tokenfield.tsx +1673 -0
  73. package/src/toolbar.tsx +15 -10
  74. package/src/tooltip.tsx +46 -29
  75. package/src/tree.tsx +2075 -0
  76. package/src/utils.ts +30 -1
  77. package/src/validation.ts +79 -22
  78. package/src/virtualizer.tsx +186 -23
package/README.md CHANGED
@@ -239,15 +239,29 @@ Components: `Button` `ToggleButton` `Checkbox` `CheckboxGroup` `Switch`
239
239
  `DisclosureGroup` `Dialog` `Modal` `Popover` `Slider` `Calendar`
240
240
  `RangeCalendar` `DateField` `TimeField` `DatePicker` `DateRangePicker`
241
241
  `ColorPicker` `ColorSlider` `ColorArea` `ColorWheel` `ColorField` `ColorSwatch`
242
- `Tooltip` `Form` `Questionnaire` `Virtualizer`.
242
+ `ColorSwatchPicker` `Tooltip` `Form` `Questionnaire` `Virtualizer` `Tree`
243
+ `NavigationTree` `Sheet` `Autocomplete` `TokenField` `DropZone` `FileTrigger`
244
+ `PreviewTrigger` `OverlayArrow` `SelectionIndicator` `SharedElementTransition`
245
+ `ToggleButtonGroup` `Group` `TextArea` and the toast parts (`ToastRegion`,
246
+ `ToastList`, `ToastRoot`).
247
+
248
+ Drag and drop is `dragAndDrop()` from `@barqjs/aria/drag-and-drop`, passed to a
249
+ `ListBox`, `GridList`, `Tree` or `Table` as `dragAndDropHooks`, over the hooks
250
+ in `@barqjs/aria/dnd` (`drag`, `drop`, `clipboard`, the droppable collection and
251
+ its indicators). Pointer, touch, keyboard and screen-reader drags all go through
252
+ it, in the page's language, and inside a `<Virtualizer>` the layout finds the
253
+ target and places the indicator.
254
+
255
+ ## Where this stands against React Aria
256
+
257
+ Compared component by component with React Aria Components 1.22.1
258
+ (`react-aria` 3.53.1, `adobe/react-spectrum` at `2e9496b`, November 2026). The
259
+ next comparison starts from that commit.
243
260
 
244
261
  ## What is not here
245
262
 
246
263
  Deliberately absent:
247
264
 
248
- - **Drag and drop.** `useDrag`, `useDrop`, the droppable collections and the
249
- drop indicators. Nothing in this package is a drop target, and the layout
250
- seam that a virtualised drop target needs is not built.
251
265
  - **React plumbing.** `useEffectEvent`, `useObjectRef`, `useLayoutEffect`,
252
266
  `useValueEffect`, `useSyncRef`, `useDeepMemo`, `useCachedChildren` and the
253
267
  rest exist to work around React's model. `@barqjs/primitives` covers the ones
@@ -258,15 +272,12 @@ Deliberately absent:
258
272
 
259
273
  Not built yet, in rough order of how much is missing:
260
274
 
261
- - A **Toast** region component (the queue is `toastQueue`; `@barqjs/ui` renders
262
- it). **Tree** and `TreeItem`. **Autocomplete** and `SearchAutocomplete`.
263
- **StepList**. **TokenField**. **ActionGroup**. A `ToggleButtonGroup`
264
- component (the hooks are `toggleGroup`). **Landmark** navigation.
265
- - **Selection checkboxes** for a grid, gridlist and table
266
- (`useGridSelectionCheckbox` and its siblings), and the selection announcement
267
- that goes with them.
268
- - **Load more**: `useLoadMore` and the sentinel, for a collection that pages as
269
- it scrolls.
275
+ - **SearchAutocomplete**, **StepList**, **ActionGroup** and **Landmark**
276
+ navigation.
277
+ - **Selection announcements** for a grid, gridlist, tree and table. The
278
+ selection checkboxes are there.
279
+ - **Load more** for a list, gridlist and table. A tree has it
280
+ (`TreeLoadMoreItem`, `loadMoreSentinel`).
270
281
  - **Table column resizing**.
271
282
  - **Calendar month and year pickers.** The grid and the cells are there, the
272
283
  two dropdowns are not.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barqjs/aria",
3
- "version": "0.2.0-next.0",
3
+ "version": "0.2.0-next.1",
4
4
  "description": "Accessible interactions, state and headless components for barq: WAI-ARIA behaviour on fine-grained signals",
5
5
  "keywords": [
6
6
  "a11y",
@@ -43,6 +43,11 @@
43
43
  "barq": "./src/index.ts",
44
44
  "bun": "./src/index.ts"
45
45
  },
46
+ "./autocomplete": {
47
+ "types": "./src/autocomplete.tsx",
48
+ "barq": "./src/autocomplete.tsx",
49
+ "bun": "./src/autocomplete.tsx"
50
+ },
46
51
  "./breadcrumbs": {
47
52
  "types": "./src/breadcrumbs.tsx",
48
53
  "barq": "./src/breadcrumbs.tsx",
@@ -78,6 +83,11 @@
78
83
  "barq": "./src/colorpicker.tsx",
79
84
  "bun": "./src/colorpicker.tsx"
80
85
  },
86
+ "./colorswatchpicker": {
87
+ "types": "./src/colorswatchpicker.tsx",
88
+ "barq": "./src/colorswatchpicker.tsx",
89
+ "bun": "./src/colorswatchpicker.tsx"
90
+ },
81
91
  "./combobox": {
82
92
  "types": "./src/combobox.tsx",
83
93
  "barq": "./src/combobox.tsx",
@@ -113,16 +123,36 @@
113
123
  "barq": "./src/disclosure.tsx",
114
124
  "bun": "./src/disclosure.tsx"
115
125
  },
116
- "./drawer": {
117
- "types": "./src/drawer.ts",
118
- "barq": "./src/drawer.ts",
119
- "bun": "./src/drawer.ts"
126
+ "./dnd": {
127
+ "types": "./src/dnd/index.ts",
128
+ "barq": "./src/dnd/index.ts",
129
+ "bun": "./src/dnd/index.ts"
120
130
  },
121
131
  "./dom": {
122
132
  "types": "./src/dom.ts",
123
133
  "barq": "./src/dom.ts",
124
134
  "bun": "./src/dom.ts"
125
135
  },
136
+ "./drag-and-drop": {
137
+ "types": "./src/drag-and-drop.tsx",
138
+ "barq": "./src/drag-and-drop.tsx",
139
+ "bun": "./src/drag-and-drop.tsx"
140
+ },
141
+ "./drawer": {
142
+ "types": "./src/drawer.ts",
143
+ "barq": "./src/drawer.ts",
144
+ "bun": "./src/drawer.ts"
145
+ },
146
+ "./dropzone": {
147
+ "types": "./src/dropzone.tsx",
148
+ "barq": "./src/dropzone.tsx",
149
+ "bun": "./src/dropzone.tsx"
150
+ },
151
+ "./file-trigger": {
152
+ "types": "./src/file-trigger.tsx",
153
+ "barq": "./src/file-trigger.tsx",
154
+ "bun": "./src/file-trigger.tsx"
155
+ },
126
156
  "./focus": {
127
157
  "types": "./src/focus.ts",
128
158
  "barq": "./src/focus.ts",
@@ -138,6 +168,11 @@
138
168
  "barq": "./src/gridlist.tsx",
139
169
  "bun": "./src/gridlist.tsx"
140
170
  },
171
+ "./group": {
172
+ "types": "./src/group.tsx",
173
+ "barq": "./src/group.tsx",
174
+ "bun": "./src/group.tsx"
175
+ },
141
176
  "./i18n": {
142
177
  "types": "./src/i18n.ts",
143
178
  "barq": "./src/i18n.ts",
@@ -178,6 +213,16 @@
178
213
  "barq": "./src/menubar.tsx",
179
214
  "bun": "./src/menubar.tsx"
180
215
  },
216
+ "./navigation": {
217
+ "types": "./src/navigation.ts",
218
+ "barq": "./src/navigation.ts",
219
+ "bun": "./src/navigation.ts"
220
+ },
221
+ "./navigation-tree": {
222
+ "types": "./src/navigation-tree.tsx",
223
+ "barq": "./src/navigation-tree.tsx",
224
+ "bun": "./src/navigation-tree.tsx"
225
+ },
181
226
  "./numberfield": {
182
227
  "types": "./src/numberfield.tsx",
183
228
  "barq": "./src/numberfield.tsx",
@@ -188,20 +233,30 @@
188
233
  "barq": "./src/otp.ts",
189
234
  "bun": "./src/otp.ts"
190
235
  },
236
+ "./overlay-arrow": {
237
+ "types": "./src/overlay-arrow.tsx",
238
+ "barq": "./src/overlay-arrow.tsx",
239
+ "bun": "./src/overlay-arrow.tsx"
240
+ },
191
241
  "./overlays": {
192
242
  "types": "./src/overlays.ts",
193
243
  "barq": "./src/overlays.ts",
194
244
  "bun": "./src/overlays.ts"
195
245
  },
246
+ "./platform": {
247
+ "types": "./src/platform.ts",
248
+ "barq": "./src/platform.ts",
249
+ "bun": "./src/platform.ts"
250
+ },
196
251
  "./presence": {
197
252
  "types": "./src/presence.ts",
198
253
  "barq": "./src/presence.ts",
199
254
  "bun": "./src/presence.ts"
200
255
  },
201
- "./platform": {
202
- "types": "./src/platform.ts",
203
- "barq": "./src/platform.ts",
204
- "bun": "./src/platform.ts"
256
+ "./preview-trigger": {
257
+ "types": "./src/preview-trigger.tsx",
258
+ "barq": "./src/preview-trigger.tsx",
259
+ "bun": "./src/preview-trigger.tsx"
205
260
  },
206
261
  "./questionnaire": {
207
262
  "types": "./src/questionnaire.tsx",
@@ -228,10 +283,20 @@
228
283
  "barq": "./src/selection.ts",
229
284
  "bun": "./src/selection.ts"
230
285
  },
231
- "./static-collection": {
232
- "types": "./src/static-collection.ts",
233
- "barq": "./src/static-collection.ts",
234
- "bun": "./src/static-collection.ts"
286
+ "./selection-indicator": {
287
+ "types": "./src/selection-indicator.tsx",
288
+ "barq": "./src/selection-indicator.tsx",
289
+ "bun": "./src/selection-indicator.tsx"
290
+ },
291
+ "./shared-element-transition": {
292
+ "types": "./src/shared-element-transition.tsx",
293
+ "barq": "./src/shared-element-transition.tsx",
294
+ "bun": "./src/shared-element-transition.tsx"
295
+ },
296
+ "./sheet": {
297
+ "types": "./src/sheet.tsx",
298
+ "barq": "./src/sheet.tsx",
299
+ "bun": "./src/sheet.tsx"
235
300
  },
236
301
  "./slider": {
237
302
  "types": "./src/slider.tsx",
@@ -243,6 +308,11 @@
243
308
  "barq": "./src/splitter.ts",
244
309
  "bun": "./src/splitter.ts"
245
310
  },
311
+ "./static-collection": {
312
+ "types": "./src/static-collection.ts",
313
+ "barq": "./src/static-collection.ts",
314
+ "bun": "./src/static-collection.ts"
315
+ },
246
316
  "./switch": {
247
317
  "types": "./src/switch.tsx",
248
318
  "barq": "./src/switch.tsx",
@@ -263,21 +333,46 @@
263
333
  "barq": "./src/tag.tsx",
264
334
  "bun": "./src/tag.tsx"
265
335
  },
336
+ "./textarea": {
337
+ "types": "./src/textarea.tsx",
338
+ "barq": "./src/textarea.tsx",
339
+ "bun": "./src/textarea.tsx"
340
+ },
266
341
  "./textfield": {
267
342
  "types": "./src/textfield.tsx",
268
343
  "barq": "./src/textfield.tsx",
269
344
  "bun": "./src/textfield.tsx"
270
345
  },
346
+ "./toast": {
347
+ "types": "./src/toast.ts",
348
+ "barq": "./src/toast.ts",
349
+ "bun": "./src/toast.ts"
350
+ },
351
+ "./toast-components": {
352
+ "types": "./src/toast-components.tsx",
353
+ "barq": "./src/toast-components.tsx",
354
+ "bun": "./src/toast-components.tsx"
355
+ },
271
356
  "./toggle": {
272
357
  "types": "./src/toggle.ts",
273
358
  "barq": "./src/toggle.ts",
274
359
  "bun": "./src/toggle.ts"
275
360
  },
361
+ "./toggle-button-group": {
362
+ "types": "./src/toggle-button-group.tsx",
363
+ "barq": "./src/toggle-button-group.tsx",
364
+ "bun": "./src/toggle-button-group.tsx"
365
+ },
276
366
  "./togglegroup": {
277
367
  "types": "./src/togglegroup.ts",
278
368
  "barq": "./src/togglegroup.ts",
279
369
  "bun": "./src/togglegroup.ts"
280
370
  },
371
+ "./tokenfield": {
372
+ "types": "./src/tokenfield.tsx",
373
+ "barq": "./src/tokenfield.tsx",
374
+ "bun": "./src/tokenfield.tsx"
375
+ },
281
376
  "./toolbar": {
282
377
  "types": "./src/toolbar.tsx",
283
378
  "barq": "./src/toolbar.tsx",
@@ -288,6 +383,11 @@
288
383
  "barq": "./src/tooltip.tsx",
289
384
  "bun": "./src/tooltip.tsx"
290
385
  },
386
+ "./tree": {
387
+ "types": "./src/tree.tsx",
388
+ "barq": "./src/tree.tsx",
389
+ "bun": "./src/tree.tsx"
390
+ },
291
391
  "./utils": {
292
392
  "types": "./src/utils.ts",
293
393
  "barq": "./src/utils.ts",
@@ -303,17 +403,7 @@
303
403
  "barq": "./src/virtualizer.tsx",
304
404
  "bun": "./src/virtualizer.tsx"
305
405
  },
306
- "./package.json": "./package.json",
307
- "./navigation": {
308
- "types": "./src/navigation.ts",
309
- "barq": "./src/navigation.ts",
310
- "bun": "./src/navigation.ts"
311
- },
312
- "./toast": {
313
- "types": "./src/toast.ts",
314
- "barq": "./src/toast.ts",
315
- "bun": "./src/toast.ts"
316
- }
406
+ "./package.json": "./package.json"
317
407
  },
318
408
  "publishConfig": {
319
409
  "access": "public",
@@ -325,22 +415,22 @@
325
415
  "test:coverage": "bun test --timeout 10000 --coverage"
326
416
  },
327
417
  "devDependencies": {
328
- "@barqjs/compiler": "0.2.0-next.0",
329
- "@barqjs/core": "0.2.0-next.0",
330
- "@barqjs/primitives": "0.2.0-next.0",
331
- "@barqjs/server": "0.2.0-next.0",
332
- "@barqjs/testing": "0.2.0-next.0",
333
- "@barqjs/vite": "0.2.0-next.0",
334
- "@barqjs/web": "0.2.0-next.0",
335
- "@happy-dom/global-registrator": "^21.0.1",
336
- "@types/bun": "^1.4.3",
418
+ "@barqjs/compiler": "0.2.0-next.1",
419
+ "@barqjs/core": "0.2.0-next.1",
420
+ "@barqjs/primitives": "0.2.0-next.1",
421
+ "@barqjs/server": "0.2.0-next.1",
422
+ "@barqjs/testing": "0.2.0-next.1",
423
+ "@barqjs/vite": "0.2.0-next.1",
424
+ "@barqjs/web": "0.2.0-next.1",
425
+ "@happy-dom/global-registrator": "^21.0.4",
426
+ "@types/bun": "^1.4.4",
337
427
  "typescript": "^7.0.2"
338
428
  },
339
429
  "peerDependencies": {
340
- "@barqjs/core": ">=0.2.0-next.0",
341
- "@barqjs/primitives": ">=0.2.0-next.0",
342
- "@barqjs/server": ">=0.2.0-next.0",
343
- "@barqjs/web": ">=0.2.0-next.0"
430
+ "@barqjs/core": ">=0.2.0-next.1",
431
+ "@barqjs/primitives": ">=0.2.0-next.1",
432
+ "@barqjs/server": ">=0.2.0-next.1",
433
+ "@barqjs/web": ">=0.2.0-next.1"
344
434
  },
345
435
  "peerDependenciesMeta": {},
346
436
  "engines": {