@medixdeck/ui 0.1.26 → 0.1.28
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/LICENSE +21 -21
- package/README.md +44 -78
- package/dist/index.cjs +65 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +369 -62
- package/dist/index.js +11032 -13260
- package/dist/index.js.map +1 -1
- package/package.json +28 -23
- package/third-party/DOMPurify-LICENSE +202 -0
- package/third-party/NOTICE +4 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 MedixDeck
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MedixDeck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# @medixdeck/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React components and design tokens for MedixDeck applications, built with
|
|
4
|
+
TypeScript and Chakra UI v3. Includes forms, navigation, dashboards, feedback,
|
|
5
|
+
healthcare components, and light/dark themes.
|
|
4
6
|
|
|
7
|
+
[](https://www.npmjs.com/package/@medixdeck/ui)
|
|
5
8
|
[](https://www.typescriptlang.org/)
|
|
6
9
|
[](https://chakra-ui.com/)
|
|
7
10
|
[](./LICENSE)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- Typed component props and named exports.
|
|
15
|
+
- Shared blue/purple palettes and semantic design tokens.
|
|
16
|
+
- Responsive navigation, dashboard layouts, and healthcare components.
|
|
17
|
+
- Light, dark, and system color modes.
|
|
18
|
+
- Server rendering support, with ESM, CommonJS, and TypeScript declarations.
|
|
10
19
|
|
|
11
20
|
## Install
|
|
12
21
|
|
|
@@ -18,6 +27,9 @@ npm install @medixdeck/ui @chakra-ui/react react react-dom
|
|
|
18
27
|
npm install @tiptap/react @tiptap/pm @tiptap/starter-kit @tiptap/extension-link @tiptap/extension-underline @tiptap/extension-text-align @tiptap/extension-placeholder
|
|
19
28
|
```
|
|
20
29
|
|
|
30
|
+
Requires React and React DOM 18 or newer, Chakra UI 3 or newer, and Node.js
|
|
31
|
+
20.19 or newer for server rendering. Keep React and React DOM on matching versions.
|
|
32
|
+
|
|
21
33
|
## Quick start
|
|
22
34
|
|
|
23
35
|
```tsx
|
|
@@ -52,6 +64,14 @@ export function App() {
|
|
|
52
64
|
}
|
|
53
65
|
```
|
|
54
66
|
|
|
67
|
+
## PWA installation
|
|
68
|
+
|
|
69
|
+
Use `<PWAInstallPrompt appName="MedixDeck" delaySeconds={30} />` in consuming apps.
|
|
70
|
+
Omit `forceVisible` and `forceIOS`: these options are for Storybook previews only.
|
|
71
|
+
Native installation is offered after the browser emits `beforeinstallprompt`;
|
|
72
|
+
iOS displays manual installation instructions. Banner and native-dialog dismissals
|
|
73
|
+
share the configurable `cooldownDays` period (14 days by default).
|
|
74
|
+
|
|
55
75
|
## Public API index
|
|
56
76
|
|
|
57
77
|
| Area | Exports |
|
|
@@ -66,14 +86,15 @@ export function App() {
|
|
|
66
86
|
| Healthcare | `DoctorCard`, `VitalBadge`, `AppointmentCard` |
|
|
67
87
|
| Chakra re-exports | `Box`, `Flex`, `Grid`, `Stack`, `Text`, `Heading`, `Link`, `Image`, `Icon`, `Center`, `Wrap`, `WrapItem`, others in `lib/index.ts` |
|
|
68
88
|
|
|
69
|
-
##
|
|
89
|
+
## Styling and server rendering
|
|
70
90
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
91
|
+
Wrap your application in `MedixProvider` once to enable shared tokens, fonts,
|
|
92
|
+
theme preferences, and toast notifications. Use semantic tokens such as
|
|
93
|
+
`bg.surface`, `text.heading`, and `border` when styling with Chakra props.
|
|
94
|
+
|
|
95
|
+
In Next.js App Router, place interactive components inside a `"use client"`
|
|
96
|
+
boundary. Theme-dependent labels should wait for `useThemeMode().mounted` as in
|
|
97
|
+
the quick start. The rich text editor initializes after hydration.
|
|
77
98
|
|
|
78
99
|
## Theme hooks
|
|
79
100
|
|
|
@@ -153,20 +174,14 @@ function Page() {
|
|
|
153
174
|
|
|
154
175
|
### Toast Notifications
|
|
155
176
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
To use it, render the `<Toaster />` at the root of your application, and then use the `toast` helper to trigger notifications from anywhere.
|
|
177
|
+
`MedixProvider` includes the toast host. Use the `toast` helper to trigger
|
|
178
|
+
notifications from components inside your application.
|
|
159
179
|
|
|
160
180
|
```tsx
|
|
161
|
-
import {
|
|
181
|
+
import { toast } from '@medixdeck/ui';
|
|
162
182
|
|
|
163
|
-
function
|
|
164
|
-
return (
|
|
165
|
-
<>
|
|
166
|
-
<Toaster />
|
|
167
|
-
<button onClick={() => toast.success('Changes saved successfully!')}>Save</button>
|
|
168
|
-
</>
|
|
169
|
-
);
|
|
183
|
+
function SaveButton() {
|
|
184
|
+
return <button onClick={() => toast.success('Changes saved successfully!')}>Save</button>;
|
|
170
185
|
}
|
|
171
186
|
```
|
|
172
187
|
|
|
@@ -180,6 +195,7 @@ The `toast` utility exposes `success`, `error`, `info`, and `warning` shorthand
|
|
|
180
195
|
<ServerErrorPage
|
|
181
196
|
errorMessage="TypeError: Cannot read properties of undefined (reading 'id')"
|
|
182
197
|
onAction={() => reset()}
|
|
198
|
+
colorScheme="purple" // "blue" | "purple", default "blue" — buttons (and the 404 watermark) follow the scheme; the 500 error icon stays red
|
|
183
199
|
/>
|
|
184
200
|
```
|
|
185
201
|
|
|
@@ -187,7 +203,8 @@ The `toast` utility exposes `success`, `error`, `info`, and `warning` shorthand
|
|
|
187
203
|
|
|
188
204
|
### Accordion with HTML/Markdown
|
|
189
205
|
|
|
190
|
-
The `Accordion` supports
|
|
206
|
+
The `Accordion` supports rich text answers through `answerType`: use `"HTML"` for
|
|
207
|
+
sanitized HTML or `"MD"` for Markdown.
|
|
191
208
|
|
|
192
209
|
```tsx
|
|
193
210
|
<Accordion
|
|
@@ -654,63 +671,12 @@ export function DesignTokensPage() {
|
|
|
654
671
|
|
|
655
672
|
`ThemeColorPalette` renders the semantic design tokens side by side for light and dark mode, then lists the raw brand, status, and neutral scales that power the theme.
|
|
656
673
|
|
|
657
|
-
##
|
|
658
|
-
|
|
659
|
-
```txt
|
|
660
|
-
lib\ library source and npm entrypoint
|
|
661
|
-
src\ local showcase app only
|
|
662
|
-
.github\workflows\publish.yml npm publish workflow
|
|
663
|
-
AGENTS.md full multi-agent repo guide
|
|
664
|
-
COPILOT.md concise AI contributor guide
|
|
665
|
-
.github\copilot-instructions.md GitHub Copilot repo instructions
|
|
666
|
-
CONTRIBUTING.md contributor workflow
|
|
667
|
-
CHANGELOG.md release history
|
|
668
|
-
LICENSE package license
|
|
669
|
-
package.json npm metadata and scripts
|
|
670
|
-
```
|
|
674
|
+
## Contributing
|
|
671
675
|
|
|
672
|
-
|
|
676
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for local setup, development, testing, and contribution guidelines.
|
|
673
677
|
|
|
674
|
-
|
|
675
|
-
npm run dev
|
|
676
|
-
npm run build
|
|
677
|
-
npm run test
|
|
678
|
-
npm run pack:check
|
|
679
|
-
```
|
|
678
|
+
See [CHANGELOG.md](./CHANGELOG.md) for release notes. Report bugs and request features through [GitHub Issues](https://github.com/medixdeck/medixdeck-ui/issues).
|
|
680
679
|
|
|
681
|
-
##
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
- Public API changes must stay in sync across `lib\index.ts`, `README.md`, `src\App.tsx`, Storybook stories, and `CHANGELOG.md`.
|
|
685
|
-
- The GitHub Actions workflow installs dependencies, runs build and test checks, performs `npm pack --dry-run`, and then publishes to npm.
|
|
686
|
-
|
|
687
|
-
## Project structure
|
|
688
|
-
|
|
689
|
-
```txt
|
|
690
|
-
medixdeck-ui\
|
|
691
|
-
├── lib\
|
|
692
|
-
│ ├── index.ts
|
|
693
|
-
│ ├── theme\
|
|
694
|
-
│ └── components\
|
|
695
|
-
│ ├── provider\
|
|
696
|
-
│ ├── primitive\
|
|
697
|
-
│ ├── form\
|
|
698
|
-
│ ├── layout\
|
|
699
|
-
│ ├── navigation\
|
|
700
|
-
│ ├── feedback\
|
|
701
|
-
│ ├── data\
|
|
702
|
-
│ └── healthcare\
|
|
703
|
-
├── src\
|
|
704
|
-
├── .github\
|
|
705
|
-
│ ├── copilot-instructions.md
|
|
706
|
-
│ └── workflows\publish.yml
|
|
707
|
-
├── AGENTS.md
|
|
708
|
-
├── COPILOT.md
|
|
709
|
-
├── CONTRIBUTING.md
|
|
710
|
-
├── CHANGELOG.md
|
|
711
|
-
├── LICENSE
|
|
712
|
-
├── package.json
|
|
713
|
-
├── vite.config.ts
|
|
714
|
-
├── vitest.config.ts
|
|
715
|
-
└── tsconfig.build.json
|
|
716
|
-
```
|
|
680
|
+
## License
|
|
681
|
+
|
|
682
|
+
MIT © MedixDeck Team. See [LICENSE](./LICENSE).
|