hisd3-ui-kit 4.3.0 → 4.4.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.
package/README.md CHANGED
@@ -120,6 +120,7 @@ const menuItems = [
120
120
  | `HISD3HeaderActions` | Spacing wrapper for the top-right controls; `divided` inserts a rule before the last child. |
121
121
  | `HISD3NotificationButton` | Soft-grey circular button with a solid bell glyph and a count pill on its top-right edge; tints to the primary color while its panel is open. Pass `icon` to swap the glyph. Props: `items` (`{ id, title, description, time, unread, avatarSrc, icon, onClick }`), `count` (defaults to the unread tally), `loading`, `size` (default 40), `icon`, `onMarkAllRead`, `onSeeAll`, `emptyText`. |
122
122
  | `HISD3AvatarMenu` | Circular avatar button with a small chevron badge (Facebook-style); clicking it opens a menu with the signed-in identity plus Settings and Logout (confirm dialog by default). Falls back to initials on a grey circle when there is no photo. Props: `account`, `avatarSrc`, `settingsUrl` / `onSettings`, `onLogout`, `confirmLogout`, `extraItems`, `shape` (`circle` \| `square`), `size` (default 40), `hideChevron`. |
123
+ | `HISD3LoginPage` | Split-screen sign-in: a brand panel in the app's primary colour plus a floating form card. Per-app: `appName` (the module name shown on the card), `tagline`, `logoSrc`, `title`/`subtitle`, `panelTitle`/`panelSubtitle`, `panelImage`, `variant` (`"soft"` default, or `"square"`), `side` (`"right"` default, or `"left"`). Form: `onSubmit({ identifier, password, remember })`, `loading`, `error`, `onForgotPassword`, `hideRemember`, the label/placeholder props, and `footer`. The HISD3 watermark on the panel is fixed, so every module still reads as one system. |
123
124
  | `UserMenu` | The sidebar-footer account card, on its own. |
124
125
 
125
126
  Theme utilities: `createHisd3Theme`, `hisd3AntdTheme` (red default),
@@ -163,6 +164,43 @@ Inside styled-components or CSS you can rely on antd's variables:
163
164
  `--hisd3-popup-radius`, `--hisd3-bell-stretch` (how wide the bell glyph is drawn, default `1.12`), `--hisd3-edge-trigger-bg` / `--hisd3-edge-trigger-color` (the sidebar collapse chevron, primary-filled by default), so you can retune them per app without forking the
164
165
  components.
165
166
 
167
+ ## Sign-in page
168
+
169
+ Every module renders the same component and differs only by name, logo and
170
+ primary colour:
171
+
172
+ ```tsx
173
+ <HISD3Provider primary="brandBlue">
174
+ <HISD3LoginPage
175
+ appName="Backoffice"
176
+ tagline="Hospital Information System"
177
+ // panel copy defaults to a hospital-system line; override per module:
178
+ panelTitle="Every charge, every folio, in one ledger."
179
+ panelSubtitle="Receivables, cashiering and accounts — reconciled daily."
180
+ loading={submitting}
181
+ error={errorMessage}
182
+ onForgotPassword={() => router.push("/forgot-password")}
183
+ onSubmit={async ({ identifier, password, remember }) => login(identifier, password, remember)}
184
+ footer={<>Need an account? <b>Contact your administrator</b></>}
185
+ />
186
+ </HISD3Provider>
187
+ ```
188
+
189
+ Responsive by default: the split layout holds down to 1024px, below which the
190
+ brand panel drops and the card centres on a tinted background; under 560px it
191
+ switches to a phone layout: a branded hero carrying the logo, module name and
192
+ panel copy, with a white sheet rising over it that holds the form and runs to
193
+ the bottom of the screen. Inputs are 16px there so iOS Safari does not zoom on
194
+ focus.
195
+
196
+ The panel copy (`panelTitle` / `panelSubtitle`) defaults to
197
+ "One system for every part of your hospital." with a supporting line; pass your
198
+ own for a module-specific message, or `panelSubtitle={null}` for headline only.
199
+ `logoSrc` swaps the card logo for a module mark; leave it off and the HISD3
200
+ logo is used. `HISD3_LOGO_SRC` is exported if you need the mark elsewhere.
201
+ `primary` accepts the brand presets `"brand"` (the logo's gear, `#E5533B`) and
202
+ `"brandBlue"` (its cloud, `#1B6FE0`), any other preset, or a hex value.
203
+
166
204
  ## Migrating
167
205
 
168
206
  ### from 3.x