@dxos/react-ui 0.3.11-main.c95bc86 → 0.3.11-main.cb8120f

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.
@@ -1 +1 @@
1
- {"version":3,"file":"List.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAOpB,OAAO,KAA4C,MAAM,OAAO,CAAC;AAIjE,OAAO,EAAkB,KAAK,SAAS,EAAwB,MAAM,QAAQ,CAAC;;;;;;;;;;;AAG9E,wBAKE;AAuBF,eAAO,MAAM,oBAAoB;;;;;CAgChC,CAAC;AAgCF,eAAO,MAAM,kBAAkB;;;;;CA8C9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;CA+BvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;CAgC7B,CAAC"}
1
+ {"version":3,"file":"List.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAOpB,OAAO,KAA4C,MAAM,OAAO,CAAC;AAIjE,OAAO,EAAkB,KAAK,SAAS,EAAwB,MAAM,QAAQ,CAAC;;;;;;;;;;;AAG9E,wBAKE;AAuBF,eAAO,MAAM,oBAAoB;;;;;CAgChC,CAAC;AAgCF,eAAO,MAAM,kBAAkB;;;;;CA8C9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;CA+BvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;CAqC7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui",
3
- "version": "0.3.11-main.c95bc86",
3
+ "version": "0.3.11-main.cb8120f",
4
4
  "description": "Low-level React components for DXOS, applying a theme to a core group of primitives",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -40,10 +40,10 @@
40
40
  "jdenticon": "^3.2.0",
41
41
  "keyborg": "^2.0.0",
42
42
  "react-i18next": "^11.18.6",
43
- "@dxos/react-hooks": "0.3.11-main.c95bc86",
44
- "@dxos/react-input": "0.3.11-main.c95bc86",
45
- "@dxos/react-list": "0.3.11-main.c95bc86",
46
- "@dxos/react-ui-types": "0.3.11-main.c95bc86"
43
+ "@dxos/react-input": "0.3.11-main.cb8120f",
44
+ "@dxos/react-list": "0.3.11-main.cb8120f",
45
+ "@dxos/react-hooks": "0.3.11-main.cb8120f",
46
+ "@dxos/react-ui-types": "0.3.11-main.cb8120f"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@dnd-kit/core": "^6.0.5",
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^18.2.0",
58
58
  "vite": "^5.0.12",
59
59
  "vite-plugin-turbosnap": "^1.0.2",
60
- "@dxos/react-ui-theme": "0.3.11-main.c95bc86"
60
+ "@dxos/react-ui-theme": "0.3.11-main.cb8120f"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@phosphor-icons/react": "^2.0.5",
@@ -200,9 +200,13 @@ export const SelectableListbox = {
200
200
  })),
201
201
  );
202
202
 
203
- // TODO(burdon): Handle up/down.
204
- const handleKeyUp = (event: any) => {
205
- console.log(event);
203
+ const handleKeyUp = (event: any, id: string) => {
204
+ switch (event.key) {
205
+ case ' ':
206
+ case 'Enter': {
207
+ setSelectedId(id);
208
+ }
209
+ }
206
210
  };
207
211
 
208
212
  return (
@@ -210,10 +214,11 @@ export const SelectableListbox = {
210
214
  {items.map(({ id, text }) => (
211
215
  <ListItem.Root
212
216
  key={id}
217
+ tabIndex={0}
213
218
  selected={selectedId === id}
214
- classNames={mx('items-center', ghostHover, selectedId === id && ghostSelected)}
219
+ classNames={mx('items-center', ghostHover, ghostSelected)}
215
220
  onClick={() => setSelectedId(id)}
216
- onKeyUp={handleKeyUp}
221
+ onKeyUp={(event) => handleKeyUp(event, id)}
217
222
  >
218
223
  <ListItem.Heading classNames='grow'>{text}</ListItem.Heading>
219
224
  </ListItem.Root>