@dxos/react-list 0.9.1-main.c7dcc2e112 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-list",
3
- "version": "0.9.1-main.c7dcc2e112",
3
+ "version": "0.10.0",
4
4
  "description": "List primitive components for React.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -31,19 +31,19 @@
31
31
  "@radix-ui/react-primitive": "2.0.2",
32
32
  "@radix-ui/react-slot": "1.1.2",
33
33
  "@radix-ui/react-use-controllable-state": "1.1.0",
34
- "@dxos/react-hooks": "0.9.1-main.c7dcc2e112"
34
+ "@dxos/react-hooks": "0.10.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@radix-ui/react-checkbox": "1.1.4",
38
38
  "@storybook/react-vite": "^10.4.2",
39
- "@types/react": "~19.2.7",
39
+ "@types/react": "~19.2.17",
40
40
  "@types/react-dom": "~19.2.3",
41
- "react": "~19.2.3",
42
- "react-dom": "~19.2.3"
41
+ "react": "~19.2.7",
42
+ "react-dom": "~19.2.7"
43
43
  },
44
44
  "peerDependencies": {
45
- "react": "~19.2.3",
46
- "react-dom": "~19.2.3"
45
+ "react": "~19.2.7",
46
+ "react-dom": "~19.2.7"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -5,7 +5,7 @@
5
5
  // Stories for the elemental `@dxos/react-list` primitive — ARIA + structure
6
6
  // only. These show the default-styling-free behavior of `List` / `ListItem`
7
7
  // in isolation. For the styled, ARIA-correct, keyboard-navigable layer most
8
- // app code reaches for, see `@dxos/react-ui-list`'s `RowList` story.
8
+ // app code reaches for, see `@dxos/react-ui-list`'s `Listbox` story.
9
9
 
10
10
  import { type Decorator, type Meta, type StoryObj } from '@storybook/react-vite';
11
11
  import React, { useState } from 'react';
package/src/List.tsx CHANGED
@@ -14,7 +14,9 @@
14
14
  // Layering:
15
15
  // - `@dxos/react-list` — this package; ARIA + structure only.
16
16
  // - `@dxos/react-ui-list` — adds `dx-*` styling, keyboard nav, and
17
- // opinionated `RowList`/`CardList` containers.
17
+ // opinionated containers (Listbox, OrderedList,
18
+ // Tree, Accordion, Combobox, Picker) plus the
19
+ // reusable navigation/selection/disclosure aspects.
18
20
  // - `@dxos/react-ui-mosaic` — virtualized / draggable / card-board
19
21
  // layouts; composes the above where useful.
20
22
  //
@@ -23,7 +25,7 @@
23
25
  // control over styling and keyboard handling (e.g. a custom Combobox).
24
26
  //
25
27
  // See:
26
- // - `packages/ui/ui-theme/src/css/components/selected.md` for the
28
+ // - `packages/ui/ui-theme/src/css/components/state.md` for the
27
29
  // `aria-selected` ↔ `dx-selected` pairing rules.
28
30
  // - `packages/ui/react-ui-list/AUDIT.md` for why this layering exists.
29
31
  // - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role
@@ -107,6 +109,6 @@ const List = forwardRef<HTMLOListElement, ListProps>((props: ListScopedProps<Lis
107
109
 
108
110
  List.displayName = LIST_NAME;
109
111
 
110
- export { List, createListScope, useListContext, LIST_NAME };
112
+ export { List, LIST_NAME, createListScope, useListContext };
111
113
 
112
- export type { ListProps, ListVariant, ListScopedProps };
114
+ export type { ListProps, ListScopedProps, ListVariant };
package/src/ListItem.tsx CHANGED
@@ -12,8 +12,8 @@ import { useControllableState } from '@radix-ui/react-use-controllable-state';
12
12
  import React, {
13
13
  type ComponentProps,
14
14
  type ComponentPropsWithoutRef,
15
- type Dispatch,
16
15
  type ComponentRef,
16
+ type Dispatch,
17
17
  type ForwardRefExoticComponent,
18
18
  type RefAttributes,
19
19
  type SetStateAction,
@@ -122,7 +122,7 @@ const ListItem = forwardRef<ListItemElement, ListItemProps>(
122
122
  id={id}
123
123
  ref={forwardedRef}
124
124
  aria-labelledby={headingId}
125
- {...(selectable && { role: 'option', 'aria-selected': !!selected })}
125
+ {...(selectable && { 'role': 'option', 'aria-selected': !!selected })}
126
126
  {...(open && { 'aria-expanded': true })}
127
127
  >
128
128
  {children}
@@ -152,19 +152,19 @@ const ListItem = forwardRef<ListItemElement, ListItemProps>(
152
152
  ListItem.displayName = LIST_ITEM_NAME;
153
153
 
154
154
  export {
155
+ LIST_ITEM_NAME,
155
156
  ListItem,
156
- ListItemHeading,
157
157
  ListItemCollapsibleContent,
158
+ ListItemHeading,
158
159
  ListItemOpenTrigger,
159
160
  createListItemScope,
160
161
  useListItemContext,
161
- LIST_ITEM_NAME,
162
162
  };
163
163
 
164
164
  export type {
165
- ListItemProps,
166
- ListItemHeadingProps,
167
165
  ListItemCollapsibleContentProps,
166
+ ListItemHeadingProps,
168
167
  ListItemOpenTriggerProps,
168
+ ListItemProps,
169
169
  ListItemScopedProps,
170
170
  };