@j2-health/design-system 0.1.0

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 (112) hide show
  1. package/README.md +113 -0
  2. package/dist/favicon.png +0 -0
  3. package/dist/index.cjs +3624 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.ts +43 -0
  6. package/dist/index.js +3606 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/lib.d.ts +2 -0
  9. package/dist/src/AppConfigProvider.d.ts +4 -0
  10. package/dist/src/appTheme.d.ts +2 -0
  11. package/dist/src/components/alert/Alert.d.ts +11 -0
  12. package/dist/src/components/alert/index.d.ts +1 -0
  13. package/dist/src/components/barchart/BarChart.d.ts +30 -0
  14. package/dist/src/components/barchart/index.d.ts +2 -0
  15. package/dist/src/components/breadcrumb/Breadcrumb.d.ts +14 -0
  16. package/dist/src/components/breadcrumb/index.d.ts +1 -0
  17. package/dist/src/components/bulkActionBar/BulkActionBar.d.ts +38 -0
  18. package/dist/src/components/bulkActionBar/index.d.ts +1 -0
  19. package/dist/src/components/button/Button.d.ts +4 -0
  20. package/dist/src/components/button/index.d.ts +1 -0
  21. package/dist/src/components/card/Card.d.ts +19 -0
  22. package/dist/src/components/card/index.d.ts +1 -0
  23. package/dist/src/components/checkbox/Checkbox.d.ts +7 -0
  24. package/dist/src/components/checkbox/index.d.ts +1 -0
  25. package/dist/src/components/checkboxTree/CheckboxTree.d.ts +27 -0
  26. package/dist/src/components/checkboxTree/TreeNode.d.ts +13 -0
  27. package/dist/src/components/checkboxTree/index.d.ts +1 -0
  28. package/dist/src/components/checkboxTree/utils.d.ts +9 -0
  29. package/dist/src/components/collapse/Collapse.d.ts +9 -0
  30. package/dist/src/components/collapse/index.d.ts +1 -0
  31. package/dist/src/components/drawer/Drawer.d.ts +9 -0
  32. package/dist/src/components/drawer/index.d.ts +1 -0
  33. package/dist/src/components/dropdown/Dropdown.d.ts +17 -0
  34. package/dist/src/components/dropdown/index.d.ts +1 -0
  35. package/dist/src/components/filterform/FilterGroup.d.ts +16 -0
  36. package/dist/src/components/filterform/FilterInput.d.ts +14 -0
  37. package/dist/src/components/filterform/FiltersForm.d.ts +10 -0
  38. package/dist/src/components/filterform/filterHelpers.d.ts +11 -0
  39. package/dist/src/components/filterform/index.d.ts +2 -0
  40. package/dist/src/components/filterform/types.d.ts +52 -0
  41. package/dist/src/components/filterform/useFilterField.d.ts +43 -0
  42. package/dist/src/components/filterform/useFiltersForm.d.ts +59 -0
  43. package/dist/src/components/form/Form.d.ts +7 -0
  44. package/dist/src/components/form/index.d.ts +1 -0
  45. package/dist/src/components/icons/index.d.ts +1 -0
  46. package/dist/src/components/input/AntdInput.d.ts +322 -0
  47. package/dist/src/components/input/AntdSearchInput.d.ts +327 -0
  48. package/dist/src/components/input/Input.d.ts +4 -0
  49. package/dist/src/components/input/index.d.ts +3 -0
  50. package/dist/src/components/inputnumber/InputNumber.d.ts +9 -0
  51. package/dist/src/components/inputnumber/index.d.ts +1 -0
  52. package/dist/src/components/legacyNavMenu/LegacyNavMenu.d.ts +27 -0
  53. package/dist/src/components/legacyNavMenu/UserProfile.d.ts +9 -0
  54. package/dist/src/components/legacyNavMenu/index.d.ts +4 -0
  55. package/dist/src/components/listpopover/ListPopover.d.ts +17 -0
  56. package/dist/src/components/listpopover/index.d.ts +1 -0
  57. package/dist/src/components/menu/Menu.d.ts +7 -0
  58. package/dist/src/components/menu/index.d.ts +2 -0
  59. package/dist/src/components/message/index.d.ts +2 -0
  60. package/dist/src/components/message/useMessage.d.ts +7 -0
  61. package/dist/src/components/modal/Modal.d.ts +6 -0
  62. package/dist/src/components/modal/index.d.ts +2 -0
  63. package/dist/src/components/navMenu/NavMenu.d.ts +14 -0
  64. package/dist/src/components/navMenu/index.d.ts +1 -0
  65. package/dist/src/components/notification/index.d.ts +2 -0
  66. package/dist/src/components/notification/useNotification.d.ts +10 -0
  67. package/dist/src/components/notificationModal/NotificationModal.d.ts +11 -0
  68. package/dist/src/components/notificationModal/index.d.ts +2 -0
  69. package/dist/src/components/pagination/Pagination.d.ts +18 -0
  70. package/dist/src/components/pagination/index.d.ts +1 -0
  71. package/dist/src/components/popover/Popover.d.ts +10 -0
  72. package/dist/src/components/popover/index.d.ts +1 -0
  73. package/dist/src/components/progress/Progress.d.ts +3 -0
  74. package/dist/src/components/progress/index.d.ts +1 -0
  75. package/dist/src/components/radio/Radio.d.ts +10 -0
  76. package/dist/src/components/radio/index.d.ts +1 -0
  77. package/dist/src/components/rate/Rate.d.ts +3 -0
  78. package/dist/src/components/rate/index.d.ts +1 -0
  79. package/dist/src/components/select/AntdSelect.d.ts +5 -0
  80. package/dist/src/components/select/Select.d.ts +7 -0
  81. package/dist/src/components/select/SummarizedSelect.d.ts +44 -0
  82. package/dist/src/components/select/index.d.ts +4 -0
  83. package/dist/src/components/skeleton/Skeleton.d.ts +11 -0
  84. package/dist/src/components/skeleton/index.d.ts +1 -0
  85. package/dist/src/components/spinner/Spinner.d.ts +6 -0
  86. package/dist/src/components/spinner/index.d.ts +1 -0
  87. package/dist/src/components/steps/Steps.d.ts +10 -0
  88. package/dist/src/components/steps/index.d.ts +2 -0
  89. package/dist/src/components/steps/useSteps.d.ts +17 -0
  90. package/dist/src/components/switch/Switch.d.ts +11 -0
  91. package/dist/src/components/switch/index.d.ts +1 -0
  92. package/dist/src/components/table/Table.d.ts +24 -0
  93. package/dist/src/components/table/index.d.ts +1 -0
  94. package/dist/src/components/tabs/Tabs.d.ts +3 -0
  95. package/dist/src/components/tabs/index.d.ts +1 -0
  96. package/dist/src/components/tag/Tag.d.ts +20 -0
  97. package/dist/src/components/tag/index.d.ts +1 -0
  98. package/dist/src/components/tooltip/Tooltip.d.ts +4 -0
  99. package/dist/src/components/tooltip/index.d.ts +1 -0
  100. package/dist/src/components/vennDiagram/VennDiagram.d.ts +9 -0
  101. package/dist/src/components/vennDiagram/index.d.ts +1 -0
  102. package/dist/src/index.d.ts +11 -0
  103. package/dist/src/vite-env.d.ts +1 -0
  104. package/dist/style.css +1254 -0
  105. package/dist/tailwind.cjs +170 -0
  106. package/dist/tailwind.cjs.map +1 -0
  107. package/dist/tailwind.config.d.ts +305 -0
  108. package/dist/tailwind.js +170 -0
  109. package/dist/tailwind.js.map +1 -0
  110. package/dist/vite.svg +1 -0
  111. package/package.json +125 -0
  112. package/src/stylesheets/index.css +327 -0
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # Design System
2
+
3
+ > ⚠️ **This repository is public, and holds UI components only.** No business
4
+ > logic, no customer data, and no details of the private applications that
5
+ > consume it — a component may accept domain data as props, but must not know
6
+ > what that data means. Everything committed here is permanently world-readable,
7
+ > including git history, so a mistake cannot be undone by deleting the file
8
+ > later. See [CLAUDE.md](CLAUDE.md) for the full rules.
9
+
10
+ ## Contributing
11
+
12
+ ### Installation
13
+
14
+ Make sure to install our pre-commit hooks. They are also verified by CI, but if
15
+ you want to be notified early of linting or type errors, you have to install
16
+ `pre-commit` and run its install step. To do this, run the following:
17
+
18
+ ```bash
19
+ $ PIP_REQUIRE_VIRTUALENV=false pip install pre-commit
20
+ $ pre-commit install
21
+ ```
22
+
23
+ ### Usage
24
+
25
+ #### Storybook
26
+
27
+ In order to run the storybook, make sure to install node modules with
28
+ `npm install`, and run the following command:
29
+
30
+ ```bash
31
+ $ npm start
32
+ ```
33
+
34
+ #### In-app
35
+
36
+ There are two ways to consume the design system in a React application.
37
+
38
+ ##### As an npm package (preferred)
39
+
40
+ The library is published to npm as `@j2-health/design-system`:
41
+
42
+ ```bash
43
+ $ npm install @j2-health/design-system
44
+ ```
45
+
46
+ The package ships a prebuilt bundle plus type declarations, and expects the
47
+ consuming app to provide the peer dependencies listed in `package.json`
48
+ (react, antd, formik, highcharts, tailwindcss, ...).
49
+
50
+ Wire it up in three places:
51
+
52
+ 1. **Components** — import from the package root:
53
+
54
+ ```tsx
55
+ import { Button, AppConfigProvider } from '@j2-health/design-system'
56
+ ```
57
+
58
+ 2. **Styles** — import the compiled component styles once (e.g. in your app
59
+ entry), and pull the base stylesheet (design tokens, `@tailwind`
60
+ directives, base element styles) into your own CSS pipeline:
61
+
62
+ ```tsx
63
+ // app entry
64
+ import '@j2-health/design-system/style.css'
65
+ ```
66
+
67
+ ```css
68
+ /* your root stylesheet — processed by YOUR Tailwind/PostCSS build */
69
+ @import '@j2-health/design-system/stylesheets/index.css';
70
+ ```
71
+
72
+ 3. **Tailwind** — use the preset and scan the package's compiled output so
73
+ utility classes used inside components are generated by your build:
74
+
75
+ ```ts
76
+ // tailwind.config.ts
77
+ import { tailwindPreset } from '@j2-health/design-system/tailwind'
78
+
79
+ export default {
80
+ presets: [tailwindPreset],
81
+ content: [
82
+ './src/**/*.tsx',
83
+ './node_modules/@j2-health/design-system/dist/**/*.{js,cjs,css}',
84
+ ],
85
+ }
86
+ ```
87
+
88
+ ##### As a git submodule (legacy)
89
+
90
+ Include this repo as a git submodule and compile its raw TypeScript source with
91
+ your own toolchain (vite alias + tsconfig paths + tailwind content globs
92
+ pointing into the submodule). The npm entry point for this mode is `index.ts`
93
+ at the repo root; submodule consumers should alias `design-system` to that file
94
+ explicitly, since the package.json `exports` map points at `dist/`, which only
95
+ exists in the published package.
96
+
97
+ ### Publishing to npm
98
+
99
+ The package is published publicly (the source is public anyway). Publishing is
100
+ tag-driven via
101
+ [.github/workflows/publish-workflow.yml](.github/workflows/publish-workflow.yml)
102
+ and requires the `NPM_TOKEN` repository secret (an npm automation token with
103
+ publish rights on the `@j2-health` org).
104
+
105
+ To release a new version from `main`:
106
+
107
+ ```bash
108
+ $ npm version minor # or patch / major — bumps package.json and creates the vX.Y.Z tag
109
+ $ git push origin main --follow-tags
110
+ ```
111
+
112
+ The workflow verifies the tag matches `package.json`, runs lint and tests,
113
+ builds the library, and publishes.
Binary file