@dxos/lit-ui 0.8.4-main.3f58842 → 0.8.4-main.5ea62a8

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/lit-ui",
3
- "version": "0.8.4-main.3f58842",
3
+ "version": "0.8.4-main.5ea62a8",
4
4
  "description": "Web Components for DXOS using Lit",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,11 +10,13 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/src/index.d.ts",
14
15
  "browser": "./dist/src/index.js",
15
16
  "node": "./dist/src/index.js"
16
17
  },
17
18
  "./react": {
19
+ "source": "./src/react.ts",
18
20
  "types": "./dist/src/react.d.ts",
19
21
  "browser": "./dist/src/react.js",
20
22
  "node": "./dist/src/react.js"
@@ -39,11 +41,11 @@
39
41
  "dependencies": {
40
42
  "@lit/react": "^1.0.5",
41
43
  "lit": "^3.2.0",
42
- "@dxos/react-hooks": "0.8.4-main.3f58842",
43
- "@dxos/util": "0.8.4-main.3f58842"
44
+ "@dxos/react-hooks": "0.8.4-main.5ea62a8",
45
+ "@dxos/util": "0.8.4-main.5ea62a8"
44
46
  },
45
47
  "devDependencies": {
46
- "@dxos/test-utils": "0.8.4-main.3f58842"
48
+ "@dxos/test-utils": "0.8.4-main.5ea62a8"
47
49
  },
48
50
  "publishConfig": {
49
51
  "access": "public"
@@ -74,5 +74,11 @@ dx-avatar {
74
74
  @apply hidden;
75
75
  }
76
76
  }
77
+
78
+ &[data-state-loading-status="error"] {
79
+ .dx-avatar__image {
80
+ @apply hidden;
81
+ }
82
+ }
77
83
  }
78
84
 
@@ -2,8 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { html, svg, LitElement } from 'lit';
6
- import { customElement, state, property } from 'lit/decorators.js';
5
+ import { LitElement, html, svg } from 'lit';
6
+ import { customElement, property, state } from 'lit/decorators.js';
7
7
  import { styleMap } from 'lit/directives/style-map.js';
8
8
 
9
9
  import { makeId } from '@dxos/react-hooks';
@@ -116,7 +116,7 @@ export class DxAvatar extends LitElement {
116
116
  const bg = this.hue
117
117
  ? this.hueVariant === 'surface'
118
118
  ? `var(--dx-${this.hue}Surface)`
119
- : `var(--dx-${this.hue}Fill)`
119
+ : `var(--dx-${this.hue === 'neutral' ? 'inputSurface' : `${this.hue}Fill`})`
120
120
  : 'var(--surface-bg)';
121
121
  const fg =
122
122
  this.hue && this.hueVariant === 'surface' ? `var(--dx-${this.hue}SurfaceText)` : 'var(--dx-accentSurfaceText)';
@@ -195,6 +195,7 @@ export class DxAvatar extends LitElement {
195
195
  width="100%"
196
196
  height="100%"
197
197
  preserveAspectRatio="xMidYMid slice"
198
+ class="dx-avatar__image"
198
199
  href=${this.imgSrc}
199
200
  mask=${`url(#${this.maskId})`}
200
201
  crossorigin=${this.imgCrossOrigin}
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { svg, LitElement } from 'lit';
5
+ import { LitElement, svg } from 'lit';
6
6
  import { customElement, property } from 'lit/decorators.js';
7
7
 
8
8
  import { type Size } from '../defs';
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { html, LitElement } from 'lit';
5
+ import { LitElement, html } from 'lit';
6
6
  import { customElement, property } from 'lit/decorators.js';
7
7
 
8
8
  import { makeId } from '@dxos/react-hooks';
package/src/react.ts CHANGED
@@ -2,16 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { createComponent, type EventName } from '@lit/react';
5
+ import { type EventName, createComponent } from '@lit/react';
6
6
  import React, { type ComponentPropsWithRef } from 'react';
7
7
 
8
8
  import {
9
+ type DxRefTagActivate,
10
+ type DxTagPickerItemClick,
9
11
  DxAvatar as NaturalDxAvatar,
10
12
  DxRefTag as NaturalDxRefTag,
11
- DxIcon as NaturalIcon,
12
- type DxRefTagActivate,
13
13
  DxTagPickerItem as NaturalDxTagPickerItem,
14
- type DxTagPickerItemClick,
14
+ DxIcon as NaturalIcon,
15
15
  } from './index';
16
16
 
17
17
  export const DxRefTag = createComponent({