@medixdeck/ui 0.1.26 → 0.1.27
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 +36 -78
- package/dist/index.cjs +62 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +26 -8
- package/dist/index.js +9796 -12698
- 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
|
|
@@ -66,14 +78,15 @@ export function App() {
|
|
|
66
78
|
| Healthcare | `DoctorCard`, `VitalBadge`, `AppointmentCard` |
|
|
67
79
|
| Chakra re-exports | `Box`, `Flex`, `Grid`, `Stack`, `Text`, `Heading`, `Link`, `Image`, `Icon`, `Center`, `Wrap`, `WrapItem`, others in `lib/index.ts` |
|
|
68
80
|
|
|
69
|
-
##
|
|
81
|
+
## Styling and server rendering
|
|
70
82
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
83
|
+
Wrap your application in `MedixProvider` once to enable shared tokens, fonts,
|
|
84
|
+
theme preferences, and toast notifications. Use semantic tokens such as
|
|
85
|
+
`bg.surface`, `text.heading`, and `border` when styling with Chakra props.
|
|
86
|
+
|
|
87
|
+
In Next.js App Router, place interactive components inside a `"use client"`
|
|
88
|
+
boundary. Theme-dependent labels should wait for `useThemeMode().mounted` as in
|
|
89
|
+
the quick start. The rich text editor initializes after hydration.
|
|
77
90
|
|
|
78
91
|
## Theme hooks
|
|
79
92
|
|
|
@@ -153,20 +166,14 @@ function Page() {
|
|
|
153
166
|
|
|
154
167
|
### Toast Notifications
|
|
155
168
|
|
|
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.
|
|
169
|
+
`MedixProvider` includes the toast host. Use the `toast` helper to trigger
|
|
170
|
+
notifications from components inside your application.
|
|
159
171
|
|
|
160
172
|
```tsx
|
|
161
|
-
import {
|
|
173
|
+
import { toast } from '@medixdeck/ui';
|
|
162
174
|
|
|
163
|
-
function
|
|
164
|
-
return (
|
|
165
|
-
<>
|
|
166
|
-
<Toaster />
|
|
167
|
-
<button onClick={() => toast.success('Changes saved successfully!')}>Save</button>
|
|
168
|
-
</>
|
|
169
|
-
);
|
|
175
|
+
function SaveButton() {
|
|
176
|
+
return <button onClick={() => toast.success('Changes saved successfully!')}>Save</button>;
|
|
170
177
|
}
|
|
171
178
|
```
|
|
172
179
|
|
|
@@ -180,6 +187,7 @@ The `toast` utility exposes `success`, `error`, `info`, and `warning` shorthand
|
|
|
180
187
|
<ServerErrorPage
|
|
181
188
|
errorMessage="TypeError: Cannot read properties of undefined (reading 'id')"
|
|
182
189
|
onAction={() => reset()}
|
|
190
|
+
colorScheme="purple" // "blue" | "purple", default "blue" — buttons (and the 404 watermark) follow the scheme; the 500 error icon stays red
|
|
183
191
|
/>
|
|
184
192
|
```
|
|
185
193
|
|
|
@@ -187,7 +195,8 @@ The `toast` utility exposes `success`, `error`, `info`, and `warning` shorthand
|
|
|
187
195
|
|
|
188
196
|
### Accordion with HTML/Markdown
|
|
189
197
|
|
|
190
|
-
The `Accordion` supports
|
|
198
|
+
The `Accordion` supports rich text answers through `answerType`: use `"HTML"` for
|
|
199
|
+
sanitized HTML or `"MD"` for Markdown.
|
|
191
200
|
|
|
192
201
|
```tsx
|
|
193
202
|
<Accordion
|
|
@@ -654,63 +663,12 @@ export function DesignTokensPage() {
|
|
|
654
663
|
|
|
655
664
|
`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
665
|
|
|
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
|
-
```
|
|
666
|
+
## Contributing
|
|
671
667
|
|
|
672
|
-
|
|
668
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for local setup, development, testing, and contribution guidelines.
|
|
673
669
|
|
|
674
|
-
|
|
675
|
-
npm run dev
|
|
676
|
-
npm run build
|
|
677
|
-
npm run test
|
|
678
|
-
npm run pack:check
|
|
679
|
-
```
|
|
670
|
+
See [CHANGELOG.md](./CHANGELOG.md) for release notes. Report bugs and request features through [GitHub Issues](https://github.com/medixdeck/medixdeck-ui/issues).
|
|
680
671
|
|
|
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
|
-
```
|
|
672
|
+
## License
|
|
673
|
+
|
|
674
|
+
MIT © MedixDeck Team. See [LICENSE](./LICENSE).
|