@molecule/app-medication-row-react 4.0.1 → 4.0.2
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/README.md +7 -7
- package/dist/MedicationRow.d.ts +1 -1
- package/dist/MedicationRow.d.ts.map +1 -1
- package/dist/MedicationRow.js +7 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-24T08:59:10.136Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-medication-row-react
|
|
@@ -95,14 +95,14 @@ dashboards.
|
|
|
95
95
|
```typescript
|
|
96
96
|
function MedicationRow({
|
|
97
97
|
name,
|
|
98
|
-
dosage,
|
|
99
|
-
form,
|
|
98
|
+
dosage: dosageProp,
|
|
99
|
+
form: formProp,
|
|
100
100
|
color,
|
|
101
|
-
instructions,
|
|
102
|
-
prescriber,
|
|
101
|
+
instructions: instructionsProp,
|
|
102
|
+
prescriber: prescriberProp,
|
|
103
103
|
supplyDays,
|
|
104
104
|
refills,
|
|
105
|
-
actions,
|
|
105
|
+
actions: actionsProp,
|
|
106
106
|
className,
|
|
107
107
|
}: MedicationRowProps): JSX.Element
|
|
108
108
|
```
|
|
@@ -115,7 +115,7 @@ function MedicationRow({
|
|
|
115
115
|
|
|
116
116
|
Peer dependencies:
|
|
117
117
|
|
|
118
|
-
- `@molecule/app-react` ^4.
|
|
118
|
+
- `@molecule/app-react` ^4.13.0
|
|
119
119
|
- `@molecule/app-ui` ^1.0.1
|
|
120
120
|
- `@molecule/app-ui-react` ^4.0.0
|
|
121
121
|
- `react` ^18.0.0 || ^19.0.0
|
package/dist/MedicationRow.d.ts
CHANGED
|
@@ -29,5 +29,5 @@ export interface MedicationRowProps {
|
|
|
29
29
|
* dashboards.
|
|
30
30
|
* @param props - Component props (see {@link MedicationRowProps}).
|
|
31
31
|
*/
|
|
32
|
-
export declare function MedicationRow({ name, dosage, form, color, instructions, prescriber, supplyDays, refills, actions, className, }: MedicationRowProps): JSX.Element;
|
|
32
|
+
export declare function MedicationRow({ name, dosage: dosageProp, form: formProp, color, instructions: instructionsProp, prescriber: prescriberProp, supplyDays, refills, actions: actionsProp, className, }: MedicationRowProps): JSX.Element;
|
|
33
33
|
//# sourceMappingURL=MedicationRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MedicationRow.d.ts","sourceRoot":"","sources":["../src/MedicationRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"MedicationRow.d.ts","sourceRoot":"","sources":["../src/MedicationRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAO3C,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,iBAAiB;IACjB,IAAI,EAAE,SAAS,CAAA;IACf,2CAA2C;IAC3C,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qDAAqD;IACrD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,YAAY,EAAE,gBAAgB,EAC9B,UAAU,EAAE,cAAc,EAC1B,UAAU,EACV,OAAO,EACP,OAAO,EAAE,WAAW,EACpB,SAAS,GACV,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAsDlC"}
|
package/dist/MedicationRow.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from '@molecule/app-react';
|
|
3
|
+
import { slot } from '@molecule/app-react/render';
|
|
3
4
|
import { getClassMap } from '@molecule/app-ui';
|
|
4
5
|
import { Card } from '@molecule/app-ui-react';
|
|
5
6
|
/**
|
|
@@ -9,7 +10,12 @@ import { Card } from '@molecule/app-ui-react';
|
|
|
9
10
|
* dashboards.
|
|
10
11
|
* @param props - Component props (see {@link MedicationRowProps}).
|
|
11
12
|
*/
|
|
12
|
-
export function MedicationRow({ name, dosage, form, color, instructions, prescriber, supplyDays, refills, actions, className, }) {
|
|
13
|
+
export function MedicationRow({ name, dosage: dosageProp, form: formProp, color, instructions: instructionsProp, prescriber: prescriberProp, supplyDays, refills, actions: actionsProp, className, }) {
|
|
14
|
+
const dosage = slot(dosageProp);
|
|
15
|
+
const form = slot(formProp);
|
|
16
|
+
const instructions = slot(instructionsProp);
|
|
17
|
+
const prescriber = slot(prescriberProp);
|
|
18
|
+
const actions = slot(actionsProp);
|
|
13
19
|
const cm = getClassMap();
|
|
14
20
|
const { t } = useTranslation();
|
|
15
21
|
return (_jsx(Card, { className: className, children: _jsxs("div", { className: cm.flex({ align: 'start', gap: 'md' }), children: [color && (_jsx("span", { "aria-hidden": true, className: cm.cn(cm.shrink0, cm.roundedFull), style: { width: 24, height: 24, background: color } })), _jsxs("div", { className: cm.cn(cm.flex1, cm.stack(1)), children: [_jsxs("header", { className: cm.flex({ align: 'baseline', gap: 'sm', wrap: 'wrap' }), children: [_jsx("h3", { className: cm.cn(cm.textSize('base'), cm.fontWeight('bold')), children: name }), dosage && (_jsx("span", { className: cm.cn(cm.textSize('sm'), cm.fontWeight('medium')), children: dosage })), form && _jsx("span", { className: cm.textSize('xs'), children: form })] }), instructions && _jsx("p", { className: cm.textSize('sm'), children: instructions }), _jsxs("div", { className: cm.flex({ align: 'center', gap: 'sm', wrap: 'wrap' }), children: [prescriber && (_jsxs("span", { className: cm.textSize('xs'), children: [t('medication.prescribedBy', {}, { defaultValue: 'Prescribed by' }), " ", prescriber] })), supplyDays !== undefined && (_jsxs("span", { className: cm.cn(cm.textSize('xs'), cm.fontWeight('semibold')), children: ["\u00B7", ' ', t('medication.supplyDays', { days: supplyDays }, { defaultValue: '{{days}} day supply' })] })), refills !== undefined && (_jsxs("span", { className: cm.textSize('xs'), children: ["\u00B7 ", t('medication.refills', { refills }, { defaultValue: '{{refills}} refills' })] }))] })] }), actions && _jsx("div", { className: cm.shrink0, children: actions })] }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-medication-row-react",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Medication row — name, dosage, form, instructions, refills remaining, prescriber",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-medication-row-react",
|
|
6
6
|
"type": "module",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"directory": "packages/app/features/medication-row-react"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@molecule/app-react": "^4.
|
|
36
|
+
"@molecule/app-react": "^4.13.0",
|
|
37
37
|
"@molecule/app-ui": "^1.0.1",
|
|
38
38
|
"@molecule/app-ui-react": "^4.0.0",
|
|
39
39
|
"react": "^18.0.0 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@molecule/app-react": "4.
|
|
43
|
-
"@molecule/app-ui": "1.
|
|
44
|
-
"@molecule/app-ui-react": "4.
|
|
42
|
+
"@molecule/app-react": "4.13.0",
|
|
43
|
+
"@molecule/app-ui": "1.5.0",
|
|
44
|
+
"@molecule/app-ui-react": "4.3.2",
|
|
45
45
|
"@types/node": "26.6.5",
|
|
46
46
|
"@types/react": "19.3.0",
|
|
47
47
|
"@types/react-dom": "19.3.0",
|