@molecule/app-medication-row-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 +142 -0
  2. package/package.json +14 -8
package/README.md ADDED
@@ -0,0 +1,142 @@
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:52:07.163Z
7
+ -->
8
+
9
+ # @molecule/app-medication-row-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
+ Medication record row — drug name + dosage/form, instructions, prescriber,
16
+ days-of-supply and refills-remaining readouts, optional pill-color dot and
17
+ right-side actions.
18
+
19
+ Exports `<MedicationRow>`. Props: `name`, `dosage?`, `form?`, `color?` (any
20
+ CSS color — renders a 24px dot), `instructions?`, `prescriber?`,
21
+ `supplyDays?`, `refills?`, `actions?` (Mark taken / Refill / Edit buttons),
22
+ `className?`. Used in medication-reminder, patient-facing health portals,
23
+ pharmacy dashboards.
24
+
25
+ ## Quick Start
26
+
27
+ ```tsx
28
+ import { MedicationRow } from '@molecule/app-medication-row-react'
29
+
30
+ ;<MedicationRow
31
+ name="Lisinopril"
32
+ dosage="10mg"
33
+ form="tablet"
34
+ color="#4ade80"
35
+ instructions="Take with water in the morning"
36
+ prescriber="Dr. Sarah Chen"
37
+ supplyDays={14}
38
+ refills={2}
39
+ />
40
+ ```
41
+
42
+ ## Type
43
+
44
+ `feature`
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ npm install @molecule/app-medication-row-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
50
+ npm install -D @types/react
51
+ ```
52
+
53
+ ## API
54
+
55
+ ### Interfaces
56
+
57
+ #### `MedicationRowProps`
58
+
59
+ Props for {@link MedicationRow}.
60
+
61
+ ```typescript
62
+ interface MedicationRowProps {
63
+ /** Drug name. */
64
+ name: ReactNode
65
+ /** Dosage display ("10mg", "1 tablet"). */
66
+ dosage?: ReactNode
67
+ /** Form (tablet, capsule, liquid, etc.). */
68
+ form?: ReactNode
69
+ /** Optional accent color (typically used to differentiate pill colors). */
70
+ color?: string
71
+ /** Instructions text ("Take with food"). */
72
+ instructions?: ReactNode
73
+ /** Prescriber display. */
74
+ prescriber?: ReactNode
75
+ /** Days of supply remaining. */
76
+ supplyDays?: number
77
+ /** Refills remaining. */
78
+ refills?: number
79
+ /** Right-side actions (Mark taken, Refill, Edit). */
80
+ actions?: ReactNode
81
+ /** Extra classes. */
82
+ className?: string
83
+ }
84
+ ```
85
+
86
+ ### Functions
87
+
88
+ #### `MedicationRow(props)`
89
+
90
+ Medication record row — drug name, dosage/form, instructions,
91
+ prescriber, supply countdown, refills remaining. Used in
92
+ medication-reminder, patient-facing health portals, pharmacy
93
+ dashboards.
94
+
95
+ ```typescript
96
+ function MedicationRow({
97
+ name,
98
+ dosage,
99
+ form,
100
+ color,
101
+ instructions,
102
+ prescriber,
103
+ supplyDays,
104
+ refills,
105
+ actions,
106
+ className,
107
+ }: MedicationRowProps): JSX.Element
108
+ ```
109
+
110
+ - `props` — Component props (see {@link MedicationRowProps}).
111
+
112
+ ## Injection Notes
113
+
114
+ ### Requirements
115
+
116
+ Peer dependencies:
117
+
118
+ - `@molecule/app-react` ^1.0.1
119
+ - `@molecule/app-ui` ^1.0.1
120
+ - `@molecule/app-ui-react` ^1.0.1
121
+ - `react` ^18.0.0 || ^19.0.0
122
+
123
+ ### Runtime Dependencies
124
+
125
+ - `@molecule/app-react`
126
+ - `@molecule/app-ui`
127
+ - `@molecule/app-ui-react`
128
+ - `react`
129
+
130
+ - The "Prescribed by" / "N day supply" / "N refills" labels route through
131
+ `t()` under the `medication.` prefix. The companion
132
+ `@molecule/app-locales-medication-row` bond currently ships only
133
+ `medication.prescribedBy` — `medication.supplyDays` and
134
+ `medication.refills` fall back to English until the bond gains them.
135
+ - Fields you pass are rendered as-is (ReactNode) — format dosage/dates and
136
+ translate free text yourself.
137
+ - No `data-mol-id` prop. Renders inside `<Card>` from `@molecule/app-ui-react`;
138
+ a ClassMap bond must be wired.
139
+
140
+ ## Translations
141
+
142
+ Translation strings are provided by `@molecule/app-locales-medication-row`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-medication-row-react",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Medication row — name, dosage, form, instructions, refills remaining, prescriber",
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/medication-row-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",