@dxos/react-ui-card 0.16.0 → 0.17.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-ui-card",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Shared card-composition primitives (Row, CardTile, Avatar).",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -37,33 +37,33 @@
37
37
  "src"
38
38
  ],
39
39
  "dependencies": {
40
- "date-fns": "^3.6.0",
41
- "@dxos/echo": "0.16.0",
42
- "@dxos/echo-react": "0.16.0",
43
- "@dxos/keys": "0.16.0",
44
- "@dxos/lit-ui": "0.16.0",
45
- "@dxos/react-ui": "0.16.0",
46
- "@dxos/react-ui-mosaic": "0.16.0",
47
- "@dxos/types": "0.16.0",
48
- "@dxos/ui-theme": "0.16.0",
49
- "@dxos/ui-types": "0.16.0",
50
- "@dxos/util": "0.16.0"
40
+ "@dxos/echo": "0.17.0",
41
+ "@dxos/echo-react": "0.17.0",
42
+ "@dxos/keys": "0.17.0",
43
+ "@dxos/lit-ui": "0.17.0",
44
+ "@dxos/react-ui": "0.17.0",
45
+ "@dxos/react-ui-mosaic": "0.17.0",
46
+ "@dxos/types": "0.17.0",
47
+ "@dxos/ui-theme": "0.17.0",
48
+ "@dxos/ui-types": "0.17.0",
49
+ "@dxos/util": "0.17.0",
50
+ "date-fns": "^3.6.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@storybook/react-vite": "^10.6.0",
54
54
  "@testing-library/react": "^16.3.2",
55
- "@types/react": "~19.2.17",
56
- "@types/react-dom": "~19.2.3",
55
+ "@types/react": "~19.3.0",
56
+ "@types/react-dom": "~19.3.0",
57
57
  "effect": "4.0.4",
58
- "react": "~19.2.7",
59
- "react-dom": "~19.2.7",
58
+ "react": "~19.3.1",
59
+ "react-dom": "~19.3.1",
60
60
  "vite": "^8.3.4"
61
61
  },
62
62
  "peerDependencies": {
63
- "react": "~19.2.7",
64
- "react-dom": "~19.2.7",
65
- "@dxos/react-ui": "^0.16.0",
66
- "@dxos/ui-theme": "^0.16.0"
63
+ "@dxos/react-ui": "^0.17.0",
64
+ "@dxos/ui-theme": "^0.17.0",
65
+ "react": "~19.3.1",
66
+ "react-dom": "~19.3.1"
67
67
  },
68
68
  "publishConfig": {
69
69
  "access": "public"
@@ -21,7 +21,7 @@ import { Row } from '../Row/index.ts';
21
21
 
22
22
  type CardTileRootProps = Util.ThemedClassName<
23
23
  PropsWithChildren<
24
- Pick<MosaicTileProps<unknown>, 'data' | 'location' | 'current'> & {
24
+ Pick<MosaicTileProps<unknown>, 'data' | 'location' | 'current' | 'binding'> & {
25
25
  'id': string;
26
26
  'onCurrentChange': () => void;
27
27
  'onClick'?: (event: MouseEvent) => void;
@@ -39,7 +39,7 @@ type CardTileRootProps = Util.ThemedClassName<
39
39
  */
40
40
  const CardTileRoot = forwardRef<HTMLDivElement, CardTileRootProps>(
41
41
  (
42
- { id, data, location, current, onCurrentChange, onClick, classNames, children, 'data-testid': testId },
42
+ { id, data, location, current, binding, onCurrentChange, onClick, classNames, children, 'data-testid': testId },
43
43
  forwardedRef,
44
44
  ) => (
45
45
  <Mosaic.Tile
@@ -47,9 +47,11 @@ const CardTileRoot = forwardRef<HTMLDivElement, CardTileRootProps>(
47
47
  id={id}
48
48
  data={data}
49
49
  location={location}
50
+ binding={binding}
50
51
  classNames={classNames ?? 'dx-hover dx-current dx-selected p-1 rounded-md'}
51
52
  >
52
- <Focus.Item asChild current={current} onCurrentChange={onCurrentChange}>
53
+ {/* Selected here too: the item would otherwise override the tile's `aria-selected` with its own unset one. */}
54
+ <Focus.Item asChild current={current} selected={binding?.['aria-selected']} onCurrentChange={onCurrentChange}>
53
55
  <Card.Root grid border={false} onClick={onClick} ref={forwardedRef} data-testid={testId} data-focus-click=''>
54
56
  {children}
55
57
  </Card.Root>