@nysds/nys-avatar 1.15.0 → 1.16.0-alpha4

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.
@@ -6,7 +6,7 @@ import { ifDefined as y } from "lit/directives/if-defined.js";
6
6
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
7
7
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
8
8
  *
9
- * Avatar Component
9
+ * Avatar Component v1.16.0-alpha4
10
10
  * Part of the New York State Design System
11
11
  * Repository: https://github.com/its-hcd/nysds
12
12
  * License: MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/nys-avatar",
3
- "version": "1.15.0",
3
+ "version": "1.16.0-alpha4",
4
4
  "description": "The Avatar component from the NYS Design System.",
5
5
  "module": "dist/nys-avatar.js",
6
6
  "exports": {
@@ -15,14 +15,14 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "dev": "tsc --emitDeclarationOnly && vite",
18
- "build": "tsc --emitDeclarationOnly && vite build",
18
+ "build": "vite build",
19
19
  "test": "vite build && wtr",
20
20
  "build:watch": "tsc --emitDeclarationOnly && vite build --watch",
21
21
  "test:watch": "vite build && wtr --watch",
22
22
  "lit-analyze": "lit-analyzer '**/*.ts'"
23
23
  },
24
24
  "dependencies": {
25
- "@nysds/nys-icon": "^1.15.0"
25
+ "@nysds/nys-icon": "^1.16.0-alpha4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "lit": "^3.3.1",
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./nys-avatar";
@@ -1,62 +0,0 @@
1
- import { LitElement } from "lit";
2
- /**
3
- * Displays a user representation as image, initials, or icon with automatic fallback chain.
4
- *
5
- * Priority: `image` > `initials` > `icon` > default icon. Set `color` to customize background;
6
- * foreground auto-adjusts for contrast. Use `interactive` for clickable avatars (e.g., profile menus).
7
- *
8
- * @summary User avatar with image, initials, or icon fallback and contrast-aware colors.
9
- * @element nys-avatar
10
- *
11
- * @slot - Custom icon content. Overrides default icon when no image or initials.
12
- *
13
- * @example Image avatar
14
- * ```html
15
- * <nys-avatar image="/path/to/photo.jpg" ariaLabel="Jane Smith"></nys-avatar>
16
- * ```
17
- *
18
- * @example Initials avatar with custom color
19
- * ```html
20
- * <nys-avatar initials="JS" color="var(--nys-color-theme)" ariaLabel="Jane Smith"></nys-avatar>
21
- * ```
22
- */
23
- export declare class NysAvatar extends LitElement {
24
- static styles: import("lit").CSSResult;
25
- /** Unique identifier. Auto-generated if not provided. */
26
- id: string;
27
- /** Accessible label for screen readers. Required when no image `alt` is available. */
28
- ariaLabel: string;
29
- /** Image URL. Takes priority over initials and icon. */
30
- image: string;
31
- /** 1-2 character initials. Used when no image is provided. */
32
- initials: string;
33
- /** Custom icon name. Falls back to `account_circle` if not set. */
34
- icon: string;
35
- /** Background color. Foreground auto-adjusts for contrast. Accepts CSS values or variables. */
36
- color: string;
37
- /** Makes avatar clickable with button role and focus ring. */
38
- interactive: boolean;
39
- /** Prevents interaction when `interactive` is true. */
40
- disabled: boolean;
41
- /** Enables lazy loading for the image. */
42
- lazy: boolean;
43
- private _slotHasContent;
44
- /**
45
- * Lifecycle methods
46
- * --------------------------------------------------------------------------
47
- */
48
- connectedCallback(): void;
49
- private _handleSlotChange;
50
- /**
51
- * Functions
52
- * --------------------------------------------------------------------------
53
- */
54
- /**
55
- * Computes the appropriate foreground color (icon or initials)
56
- * based on the avatar's background color for sufficient contrast.
57
- *
58
- * @returns CSS color string for foreground
59
- */
60
- private getContrastForeground;
61
- render(): import("lit-html").TemplateResult<1>;
62
- }
@@ -1 +0,0 @@
1
- export {};