@molecule/app-contact-display-react 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +130 -0
  2. package/package.json +14 -8
package/README.md ADDED
@@ -0,0 +1,130 @@
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-08-04T01:50:22.597Z
7
+ -->
8
+
9
+ # @molecule/app-contact-display-react
10
+
11
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
12
+ > It is written to be read by coding agents as much as by people, and is generated from this
13
+ > package's source — edit `src/index.ts` JSDoc, not this file.
14
+
15
+ React contact display.
16
+
17
+ Exports `<ContactDisplay>` — avatar + name + role + email/phone/address with card/row/compact layouts.
18
+
19
+ ## Quick Start
20
+
21
+ ```tsx
22
+ import { ContactDisplay } from '@molecule/app-contact-display-react'
23
+
24
+ ;<ContactDisplay
25
+ contact={{
26
+ name: 'Jane Smith',
27
+ email: 'jane@example.com',
28
+ phone: '+1 555 0100',
29
+ role: 'Product Designer',
30
+ company: 'Acme Corp',
31
+ }}
32
+ layout="row"
33
+ onClick={() => openProfile('jane')}
34
+ />
35
+ ```
36
+
37
+ ## Type
38
+
39
+ `feature`
40
+
41
+ ## Installation
42
+
43
+ ```bash
44
+ npm install @molecule/app-contact-display-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
45
+ npm install -D @types/react
46
+ ```
47
+
48
+ ## API
49
+
50
+ ### Interfaces
51
+
52
+ #### `ContactDisplayProps`
53
+
54
+ Props for {@link ContactDisplay}.
55
+
56
+ ```typescript
57
+ interface ContactDisplayProps {
58
+ contact: ContactFields
59
+ /** Layout preset. */
60
+ layout?: 'card' | 'row' | 'compact'
61
+ /** Optional right-side actions. */
62
+ actions?: ReactNode
63
+ /** Click handler on the row. */
64
+ onClick?: () => void
65
+ /** Extra classes. */
66
+ className?: string
67
+ }
68
+ ```
69
+
70
+ #### `ContactFields`
71
+
72
+ Fields describing a contact rendered by ContactDisplay.
73
+
74
+ ```typescript
75
+ interface ContactFields {
76
+ name: string
77
+ email?: string
78
+ phone?: string
79
+ role?: ReactNode
80
+ avatarSrc?: string
81
+ address?: ReactNode
82
+ company?: ReactNode
83
+ }
84
+ ```
85
+
86
+ ### Functions
87
+
88
+ #### `ContactDisplay(props)`
89
+
90
+ Formatted contact display — avatar + name + role + email/phone with
91
+ leading icons + optional address and company. Three layouts for
92
+ different densities.
93
+
94
+ ```typescript
95
+ function ContactDisplay({
96
+ contact,
97
+ layout = 'card',
98
+ actions,
99
+ onClick,
100
+ className,
101
+ }: ContactDisplayProps): JSX.Element
102
+ ```
103
+
104
+ - `props` — Component props (see {@link ContactDisplayProps}).
105
+
106
+ ## Injection Notes
107
+
108
+ ### Requirements
109
+
110
+ Peer dependencies:
111
+
112
+ - `@molecule/app-react` ^1.0.1
113
+ - `@molecule/app-ui` ^1.0.1
114
+ - `@molecule/app-ui-react` ^1.0.1
115
+ - `react` ^18.0.0 || ^19.0.0
116
+
117
+ ### Runtime Dependencies
118
+
119
+ - `@molecule/app-react`
120
+ - `@molecule/app-ui`
121
+ - `@molecule/app-ui-react`
122
+ - `react`
123
+
124
+ `contact` fields are display-only data — `email`/`phone` render as
125
+ `mailto:`/`tel:` links; there is no formatting/validation. The email/phone/
126
+ address markers are text glyphs (✉ ☎ ⌂), not themed SVG icons. `role`,
127
+ `address`, and `company` accept ReactNodes — pass translated strings via
128
+ `t()` where needed. When `onClick` is provided the whole row becomes
129
+ clickable; supply your own keyboard affordance (e.g. wrap in a button/link)
130
+ for accessibility-critical surfaces.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-contact-display-react",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Formatted contact display: name + avatar + email/phone with icons + optional address",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,8 @@
17
17
  }
18
18
  },
19
19
  "files": [
20
- "dist"
20
+ "dist",
21
+ "README.md"
21
22
  ],
22
23
  "keywords": [
23
24
  "molecule",
@@ -25,16 +26,21 @@
25
26
  "react"
26
27
  ],
27
28
  "license": "Apache-2.0",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/molecule-dev/molecule.git",
32
+ "directory": "packages/app/features/contact-display-react"
33
+ },
28
34
  "peerDependencies": {
29
- "@molecule/app-react": "^1.0.0",
30
- "@molecule/app-ui": "^1.0.0",
31
- "@molecule/app-ui-react": "^1.0.0",
35
+ "@molecule/app-react": "^1.0.1",
36
+ "@molecule/app-ui": "^1.0.1",
37
+ "@molecule/app-ui-react": "^1.0.1",
32
38
  "react": "^18.0.0 || ^19.0.0"
33
39
  },
34
40
  "devDependencies": {
35
- "@molecule/app-react": "1.0.0",
36
- "@molecule/app-ui": "1.0.0",
37
- "@molecule/app-ui-react": "1.0.0",
41
+ "@molecule/app-react": "1.0.1",
42
+ "@molecule/app-ui": "1.0.1",
43
+ "@molecule/app-ui-react": "1.0.1",
38
44
  "@types/node": "26.1.2",
39
45
  "@types/react": "19.2.17",
40
46
  "@types/react-dom": "19.2.3",