@mieweb/ui 0.11.0-dev.17 → 0.11.0-dev.19
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/agent/README.md +182 -9
- package/agent/agents/mieweb-ui-design.agent.md +77 -0
- package/agent/agents/mieweb-ui-install.agent.md +78 -0
- package/agent/agents/mieweb-ui-styling.agent.md +83 -0
- package/agent/init-agent.mjs +139 -6
- package/agent/mieweb-ui.instructions.md +18 -0
- package/agent/skills/mieweb-ui-brands/SKILL.md +51 -0
- package/agent/skills/mieweb-ui-catalog/SKILL.md +336 -0
- package/agent/skills/mieweb-ui-catalog/selection-guidance.md +709 -0
- package/agent/skills/mieweb-ui-icons/SKILL.md +53 -0
- package/agent/skills/mieweb-ui-tailwind4/SKILL.md +126 -0
- package/agent/skills/mieweb-ui-tokens/SKILL.md +236 -0
- package/dist/styles.css +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mieweb-ui-brands
|
|
3
|
+
description: Brand theming for @mieweb/ui — available brands, switching brands at build or runtime, the dark-mode model, and the step-by-step procedure for creating a new brand. USE WHEN applying a brand to an app, switching themes, debugging brand colors not applying, or adding a brand for a new product.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @mieweb/ui brands
|
|
7
|
+
|
|
8
|
+
A brand is a set of `--mieweb-*` CSS variable overrides. Components never change per brand — they read tokens via the Tailwind preset (see the `mieweb-ui-tokens` skill for every token). Brand names, logos, and assets are trademarks of Medical Informatics Engineering — see `BRAND_GUIDELINES.md`; they are not covered by the code license.
|
|
9
|
+
|
|
10
|
+
## Available brands
|
|
11
|
+
|
|
12
|
+
`bluehive`, `ccme`, `default`, `enterprise-health`, `mieweb`, `ozwell`, `waggleline`, `webchart` — each has a `BrandConfig` in `src/brands/<name>.ts`, and all except `default` ship a committed CSS file exported as `@mieweb/ui/brands/<name>.css`.
|
|
13
|
+
|
|
14
|
+
## Applying a brand
|
|
15
|
+
|
|
16
|
+
**Static (most apps)** — import the brand CSS once:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import '@mieweb/ui/styles.css'; // or init.css — REQUIRED, see pitfall below
|
|
20
|
+
import '@mieweb/ui/brands/bluehive.css';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Tailwind 4 consumers: keep both imports plain (unlayered), in that order. Do **not** wrap only the brand CSS in `layer(theme)` — the base stylesheet's `:root` defaults are unlayered, and unlayered declarations beat layered ones, so a layered brand's overrides would silently lose and the brand would not apply.
|
|
24
|
+
|
|
25
|
+
**Runtime switching** — generate CSS from a brand config and inject it:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { brands, generateBrandCSS } from '@mieweb/ui/brands';
|
|
29
|
+
|
|
30
|
+
const config = await brands['waggleline']();
|
|
31
|
+
styleEl.textContent = generateBrandCSS(config);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`createBrandPreset(config)` / `generateTailwindTheme(config)` exist for build-time Tailwind integration of a single brand.
|
|
35
|
+
|
|
36
|
+
## Dark mode
|
|
37
|
+
|
|
38
|
+
Each brand CSS defines light-mode semantic tokens on `:root` and dark-mode overrides under `[data-theme='dark'], .dark`. Toggling dark mode = adding/removing the `.dark` class or `data-theme="dark"` attribute on an ancestor (usually `<html>`). Components already carry their `dark:` variants; never write brand- or mode-specific component code.
|
|
39
|
+
|
|
40
|
+
## Pitfall: brand CSS alone is not a theme
|
|
41
|
+
|
|
42
|
+
Brand CSS files emit only the **primary scale + semantic tokens**. The other scales (`neutral`, `secondary`, `destructive`, …) get their defaults from the library's base stylesheet. If an app imports a brand CSS **without** `@mieweb/ui/styles.css` (or `init.css`), those scales resolve to nothing and classes like `dark:bg-neutral-900` render transparent. Always load the base stylesheet first.
|
|
43
|
+
|
|
44
|
+
## Creating a new brand
|
|
45
|
+
|
|
46
|
+
1. **Config** — add `src/brands/<name>.ts` exporting a `BrandConfig` (`name`, `displayName`, `colors`, `typography`, `borderRadius`, `boxShadow`). Only the `primary` `ColorScale` (50–950) and `light`/`dark` `SemanticColors` are required in `colors`; `secondary`/`neutral`/`destructive`/`success`/`warning`/`info` scales and `accent` are optional and fall back to library defaults. Follow an existing brand (e.g. `src/brands/waggleline.ts`) including its header comment documenting the brand palette.
|
|
47
|
+
2. **CSS** — generate and commit `src/brands/<name>.css` from the config: `generateBrandCSS(config)` produces the `:root` + dark-mode blocks. Keep the usage header comment the other brand CSS files carry. `pnpm build`'s `copy:brand-css` step copies it to `dist/brands/` automatically.
|
|
48
|
+
3. **Register** — in `src/brands/index.ts`: add the named export and an entry in the lazy `brands` map. Storybook keeps its own registry in `.storybook/preview.tsx`: add the brand to its `brands` map and to the brand toolbar `items` — unknown keys silently fall back to BlueHive, so skipping this makes step 6 impossible.
|
|
49
|
+
4. **Exports** — add a `"./brands/<name>.css"` entry to `package.json` `exports` (next to the existing brand CSS entries).
|
|
50
|
+
5. **Logos/assets** — only with brand-owner approval; they live under `src/brands/logos/`.
|
|
51
|
+
6. **Verify** — switch Storybook to the new brand and check primary actions, semantic states, and dark mode; run `pnpm typecheck && pnpm lint`.
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mieweb-ui-catalog
|
|
3
|
+
description: Component inventory and selection guidance for the @mieweb/ui design system. USE WHEN choosing a component ("which component for X?", "Card or Panel?", "which table?"), checking whether a component exists, finding the import entry point, or linking to its docs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- GENERATED by scripts/build-agent-skills.mjs — do not edit by hand. Regenerate with `pnpm agent:skills`. -->
|
|
7
|
+
|
|
8
|
+
# @mieweb/ui component catalog
|
|
9
|
+
|
|
10
|
+
266 cataloged components. Full docs: https://ui.mieweb.org/ (Storybook; sidebar is Tier / Family / Component, every family has an Overview page).
|
|
11
|
+
|
|
12
|
+
For per-component "Which one?" comparison tables, read [selection-guidance.md](./selection-guidance.md) in this skill and jump to the family's section.
|
|
13
|
+
|
|
14
|
+
**Selection ground rules** (from the installed `mieweb-ui.instructions.md` — they always apply):
|
|
15
|
+
|
|
16
|
+
1. Tables and data grids start with **DataVis NITRO**; `Table` only for a few static rows. `AGGrid` is deprecated.
|
|
17
|
+
2. Two or more adjacent buttons, or one with a long/unpredictable label → `ButtonGroup`.
|
|
18
|
+
3. Use an existing component before writing your own — raw HTML that duplicates a component is a violation.
|
|
19
|
+
4. Use composition slots and variant/size props, not custom markup or className hacks.
|
|
20
|
+
|
|
21
|
+
## Entry points
|
|
22
|
+
|
|
23
|
+
| Entry | Use for |
|
|
24
|
+
| ----- | ------- |
|
|
25
|
+
| `@mieweb/ui` | General-purpose components — the default when the inventory shows no entry annotation |
|
|
26
|
+
| `@mieweb/ui/datavis` | DataVis NITRO grid + graph — the default for all tables (deps bundled) |
|
|
27
|
+
| `@mieweb/ui/esheet` | eSheet form-field adapters |
|
|
28
|
+
| `@mieweb/ui/kerebron` | RichEditor / CodeEditor (keeps Kerebron WASM optional) |
|
|
29
|
+
| `@mieweb/ui/hooks` | Shared React hooks |
|
|
30
|
+
| `@mieweb/ui/utils` | Utility functions |
|
|
31
|
+
| `@mieweb/ui/tailwind-preset` | Tailwind preset (design tokens) |
|
|
32
|
+
| `@mieweb/ui/brands` | Brand CSS + presets (bluehive, mieweb, webchart, …) |
|
|
33
|
+
| `@mieweb/ui/templates` | Landing-page sections + LandingPage renderer (Server Component safe) |
|
|
34
|
+
| `@mieweb/ui/deck` | Full-screen slide decks from JSON slides (client-only) |
|
|
35
|
+
| `@mieweb/ui/maps` | Leaflet maps (PointMap; peer: leaflet) |
|
|
36
|
+
| `@mieweb/ui/globe` | Globe showcase (peers: react-globe.gl, three) |
|
|
37
|
+
| `@mieweb/ui/org-chart` | OrgChart (peers: @xyflow/react, elkjs) |
|
|
38
|
+
| `@mieweb/ui/motion` | MotionProvider (keeps the motion dependency optional) |
|
|
39
|
+
| `@mieweb/ui/q` | Q editor (peer: @mieweb/q) |
|
|
40
|
+
| `@mieweb/ui/components/SuperChat` | SuperChat, SuperChatInbox, SuperChatConversations — not exported from the root; plugins at `/components/SuperChat/plugins` |
|
|
41
|
+
| `@mieweb/ui/components/<Name>` | Any single component, when the inventory annotates it with a `/components/…` entry |
|
|
42
|
+
| `@mieweb/ui/ag-grid` | **Deprecated** — never in new code; use `/datavis` |
|
|
43
|
+
|
|
44
|
+
## Inventory
|
|
45
|
+
|
|
46
|
+
Components by tier and family. Annotations: maturity when not stable, and the import entry when it is not the root (e.g. _(`/datavis`)_).
|
|
47
|
+
|
|
48
|
+
### Foundations
|
|
49
|
+
|
|
50
|
+
- Colors, Icons, Motion _(experimental, `/motion`)_, Text, ThemeProvider, VisuallyHidden
|
|
51
|
+
|
|
52
|
+
### Inputs
|
|
53
|
+
|
|
54
|
+
- **Actions:** Button, ButtonGroup, CopyButton, QuickAction, RowActionToolbar, Toggle
|
|
55
|
+
- **Choice inputs:** Autocomplete, Checkbox, CountryCodeDropdown, CountryDropdown, Dropdown, PillSelect, Radio, Select, Slider, Switch
|
|
56
|
+
- **Composite forms:** AdditionalFields, CSVColumnMapper, ESheet Builder _(`/esheet`)_, ESheet Renderer _(`/esheet`)_, LanguageSelector, LogoUploader _(experimental)_, PermissionsEditor, SliderCalculator _(experimental)_, UserPicker _(experimental)_
|
|
57
|
+
- **Date & time:** BusinessHours, BusinessHoursEditor, DateInput, DateRangePicker, ScheduleCalendar, SchedulePicker
|
|
58
|
+
- **Text inputs:** Address, AddressForm, InlineEdit _(experimental)_, Input, Label, PhoneInput, PhoneInputGroup, TagEditor _(experimental)_, Textarea, WebsiteInput
|
|
59
|
+
|
|
60
|
+
### Components
|
|
61
|
+
|
|
62
|
+
- **Data display:** Avatar, Badge, CalendarHeatmap _(experimental)_, ClampedText, CountBadge, FilterSummaryBar, FreshnessBadge, Timeline, YChart _(experimental)_, YearTimeline _(experimental)_
|
|
63
|
+
- **Feedback:** Alert, AlertDialog, CollabStatus, ConnectionStatus, ErrorPage, NotificationCenter, Toast
|
|
64
|
+
- **Grids:** DataVis NITRO _(`/datavis`)_, DataVis NITRO Demos, DataVis NITRO Graph _(`/datavis`)_, Pagination, Sparkline, Table
|
|
65
|
+
- **Layout:** Accordion, AppHeader, Card, Collapsible, PageHeader, ProductVersion, ScrollArea, Separator, SiteFooter, SiteHeader
|
|
66
|
+
- **Loading:** LoadingPage, Progress, Skeleton, Spinner
|
|
67
|
+
- **Navigation:** Breadcrumb, CommandPalette, MegaMenu _(experimental)_, OnboardingWizard, ReadingProgressBar, SectionSpyNav, StepIndicator, TableOfContents, Tabs
|
|
68
|
+
- **Overlays:** CookieConsent, DockablePanel, FloatingWindow, GlossaryTooltip, KeyboardShortcutsOverlay, Modal, Sheet, Sidebar, SourceTip, Tooltip
|
|
69
|
+
- **Record details:** AvatarGroup _(experimental)_, CompletenessMeter _(experimental)_, PhiMask _(experimental)_, PropertyList _(experimental)_, Rating _(experimental)_, RecordHeader _(experimental)_, ReviewCard _(experimental)_
|
|
70
|
+
- **Showcase:** Globe _(experimental, `/globe`)_, OrbitRing _(experimental)_, RadialExplorer _(experimental)_
|
|
71
|
+
|
|
72
|
+
### Modules
|
|
73
|
+
|
|
74
|
+
- **Chat:** AIChat, AIChat (Voice), AIMessage, ChatComposer _(beta)_, ComposerModelSelector, MCPToolCall, Messaging, OzwellChat, ReconciliationPanel
|
|
75
|
+
- **Dashboards:** CustomizableDashboard, Dashboard (Demo) _(experimental)_, Dashboard Widgets (Demo) _(experimental)_, DashboardCustomizePanel, DashboardWidget, QuickLinksCard, ReportDashboard
|
|
76
|
+
- **Editors:** EmailEditor _(experimental)_, Markdown, Q _(`/q`)_, RichEditor _(`/kerebron`)_, RichTextEditor
|
|
77
|
+
- **Files:** DocumentScanner, DropzoneOverlay, FileManager
|
|
78
|
+
- **Media:** AudioPlayer, AudioRecorder, DictationButton _(experimental)_, MediaEditor, MediaEditor Live Demo, MediaFeed _(experimental, `/components/MediaFeed`)_, MediaPlayer, RecordButton, TranscriptView, VideoCard _(experimental)_
|
|
79
|
+
- **Presentations:** Deck _(experimental, `/deck`)_, PointMap _(experimental, `/maps`)_
|
|
80
|
+
- **Records:** ActionPlan _(experimental)_, ActivityFeed _(experimental)_, AssociationList _(experimental)_, FieldHistory _(experimental)_, OrgChart _(experimental, `/org-chart`)_, RecordLayout _(experimental)_
|
|
81
|
+
- **SuperChat:** Conversations (List) _(`/components/SuperChat`)_, Inbox _(`/components/SuperChat`)_, SuperChat (Panel) _(`/components/SuperChat`)_
|
|
82
|
+
- **Views:** BoardView _(alpha)_, CalendarView _(alpha)_, GanttView _(alpha)_, ListView _(alpha)_, ViewSet _(alpha)_, ViewSwitcher _(alpha)_
|
|
83
|
+
- **Voice:** Hands-Free Chat, Hey Ozwell Demo, Hey Ozwell Selector _(experimental)_, Speaker Verify _(experimental)_, Visit Scribe, Voice Manager, Voice Setup, Wake Word
|
|
84
|
+
|
|
85
|
+
### Templates
|
|
86
|
+
|
|
87
|
+
- **Content:** ComparisonSection _(experimental, `/templates`)_, FaqSection _(experimental, `/templates`)_, FeatureGridSection _(experimental, `/templates`)_, ProcessStepsSection _(experimental, `/templates`)_, ResourceCardsSection _(experimental, `/templates`)_, SplitContentSection _(experimental, `/templates`)_, VideoSection _(experimental, `/templates`)_
|
|
88
|
+
- **Conversion:** CtaSection _(experimental, `/templates`)_, HeroSection _(experimental, `/templates`)_, LeadFormSection _(experimental, `/templates`)_, PricingSection _(experimental, `/templates`)_
|
|
89
|
+
- **Pages:** LandingPage _(experimental, `/templates`)_
|
|
90
|
+
- **Reports:** BenchmarkTableSection _(experimental, `/templates`)_, LinkGroupsSection _(experimental, `/templates`)_, MetricListSection _(experimental, `/templates`)_, MetricStatusBadge _(experimental, `/templates`)_, PdfEmbedSection _(experimental, `/templates`)_, RankedListSection _(experimental, `/templates`)_, ReportByline _(experimental, `/templates`)_, ReportLegend _(experimental, `/templates`)_, ReportMethodology _(experimental, `/templates`)_, TileCartogramSection _(experimental, `/templates`)_
|
|
91
|
+
- **Social proof:** LogoCloudSection _(experimental, `/templates`)_, StatsSection _(experimental, `/templates`)_, TestimonialSection _(experimental, `/templates`)_
|
|
92
|
+
|
|
93
|
+
### Healthcare
|
|
94
|
+
|
|
95
|
+
- **Clinical lists:** AllergyList, AllergyListField (eSheet) _(`/esheet`)_, CodeLookup, ConditionEditor, MedicationList, MedicationListField (eSheet) _(`/esheet`)_, PresentingProblems, ProblemList
|
|
96
|
+
- **Encounter & orders:** Assessment, CaseManagementHeader, HealthSurveillance, OrderEditor, PatientHeader, WebChartReportViewer
|
|
97
|
+
|
|
98
|
+
### BlueHive
|
|
99
|
+
|
|
100
|
+
- **Billing:** CreateInvoiceModal, InvoiceList, InvoicePaymentPage, InvoiceView, PaymentHistoryTable, PaymentMethod, PendingClaimsTable, StripeBadge
|
|
101
|
+
- **Employers:** EmployeeForm, EmployeeProfile, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView
|
|
102
|
+
- **Operations:** HelpSupportPanel, InventoryManager, ResultsEntryForm
|
|
103
|
+
- **Orders:** Order Inbox (Demo) _(experimental)_, OrderCard, OrderConfirmationWizard, OrderList, OrderLookupForm, OrderSidebar
|
|
104
|
+
- **Providers:** ClaimProviderForm, ProviderCard, ProviderDetailHeader, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, ProviderUsersTable
|
|
105
|
+
- **Services:** RecurringServiceCard, ServiceAccordion, ServiceBadge, ServiceCard, ServiceGeneralSettings, ServiceGrid, ServicePicker, ServicePricingManager, ServiceShippingSettings, SetupServiceModal
|
|
106
|
+
- **Users & integrations:** AddContactModal, AuthDialog, BookingDialog, CheckrIntegration, CreateReferralModal, EditUserRoleModal, HRISProviderSelector, InviteUserModal, RejectionModal, SSOConfigForm
|
|
107
|
+
|
|
108
|
+
### Deprecated
|
|
109
|
+
|
|
110
|
+
- AGGrid _(deprecated, `/ag-grid`)_, AGGrid Enhanced _(deprecated, `/ag-grid`)_
|
|
111
|
+
|
|
112
|
+
## Family policies
|
|
113
|
+
|
|
114
|
+
The one-line rule that governs each family. When a task touches a family, read its full "Which one?" table in [selection-guidance.md](./selection-guidance.md).
|
|
115
|
+
|
|
116
|
+
**Actions** (Inputs):
|
|
117
|
+
|
|
118
|
+
> **Two or more buttons, or one button with a long, translated or user-supplied label, always go
|
|
119
|
+
> in a `ButtonGroup`.** Its default `orientation="auto"` stacks before any label truncates.
|
|
120
|
+
|
|
121
|
+
**Chat** (Modules):
|
|
122
|
+
|
|
123
|
+
> **Who is talking, and what do the messages contain?** One user and one assistant, messages
|
|
124
|
+
> may carry tool calls / thinking / code blocks → `AIChat` (or the Ozwell-branded shell around it,
|
|
125
|
+
> `OzwellChat`). Several humans and/or several agents in one thread, Markdown with plugins, a
|
|
126
|
+
> conversation list → [SuperChat](https://ui.mieweb.org/?path=/docs/modules-superchat-overview--docs). Humans messaging
|
|
127
|
+
> humans with delivery status, read receipts and attachments → the `Messaging` primitives. Talking
|
|
128
|
+
> instead of typing → [Voice](https://ui.mieweb.org/?path=/docs/modules-voice-overview--docs). Reviewing AI-proposed
|
|
129
|
+
> field changes rather than chatting → `AIReconciliationPanel`.
|
|
130
|
+
|
|
131
|
+
**Choice inputs** (Inputs):
|
|
132
|
+
|
|
133
|
+
> **Is the user picking a value, or running an action?** A value the form will save → `Select`
|
|
134
|
+
> (or `Radio` when all options fit on screen, `Checkbox` when several may be on). An action or
|
|
135
|
+
> menu → `Dropdown`. A value found by typing into a large or remote list → `Autocomplete`. A
|
|
136
|
+
> setting that applies the instant it flips → `Switch`; a pressed toolbar button →
|
|
137
|
+
> [Toggle](https://ui.mieweb.org/?path=/docs/actions-toggle--docs). A one-of-N view switch in a toolbar → `PillSelect`.
|
|
138
|
+
|
|
139
|
+
**Clinical lists** (Healthcare):
|
|
140
|
+
|
|
141
|
+
> **Whose list is it, and what scope?** The **chart** owns problems, medications and allergies
|
|
142
|
+
> as durable records; an **encounter** only references them. Chart-scope problems →
|
|
143
|
+
> `ProblemList`; this visit's relevance → `PresentingProblems`; the write side of a problem →
|
|
144
|
+
> `ConditionEditor`. Medications to reconcile → `MedicationList` (start with
|
|
145
|
+
> `MedicationReconciliation`); allergies with an explicit NKA → `AllergyList` (start with
|
|
146
|
+
> `AllergyManager`). Every coded pick goes through `CodeLookup`, dependency-injected. The two
|
|
147
|
+
> `…Field (eSheet)` entries are the same lists as eSheet form questions.
|
|
148
|
+
|
|
149
|
+
**Composite forms** (Inputs):
|
|
150
|
+
|
|
151
|
+
> **These are whole form sections and tools assembled from the primitives — the host still owns
|
|
152
|
+
> submission and persistence.** Every component here is controlled (`value` + `onChange`, or a
|
|
153
|
+
> ref you read), has no `name`, and never talks to a server. Pick by _who defines the fields and
|
|
154
|
+
> when_: an author designing a reusable template → `ESheet Builder`; someone filling that template
|
|
155
|
+
> → `ESheet Renderer`; the end user inventing a few extra key/value pairs → `AdditionalFields`;
|
|
156
|
+
> matching a spreadsheet's columns to fields you already have → `CSVColumnMapper`; assigning a
|
|
157
|
+
> user's capabilities → `PermissionsEditor`; switching the UI language → `LanguageSelector`.
|
|
158
|
+
|
|
159
|
+
**Content** (Templates):
|
|
160
|
+
|
|
161
|
+
> **The body of a marketing page.** What the product does, how it works, how it compares, what
|
|
162
|
+
> people ask, and where to read more — each as a heading plus plain-data items.
|
|
163
|
+
|
|
164
|
+
**Conversion** (Templates):
|
|
165
|
+
|
|
166
|
+
> **Where a marketing page asks for something.** The hero makes the first ask, the call-to-action
|
|
167
|
+
> band makes the last, and the lead form converts without leaving the page. All three render real
|
|
168
|
+
> anchors or a real `<form>` — no client state.
|
|
169
|
+
|
|
170
|
+
**Dashboards** (Modules):
|
|
171
|
+
|
|
172
|
+
> **Widget or container?** The tile is `DashboardWidget` (a `Card` with a fixed title bar and
|
|
173
|
+
> four body shapes). The thing that arranges tiles is `CustomizableDashboard` (user-draggable,
|
|
174
|
+
> hide/show, persisted) — or plain CSS grid when the layout is fixed by design.
|
|
175
|
+
> `ReportDashboard` is a finished analytics _page_, not a container. `QuickLinksCard` is a
|
|
176
|
+
> titled list of shortcuts; `DashboardCustomizePanel` is the show/hide sheet, exported
|
|
177
|
+
> standalone. The two **(Demo)** entries are Storybook-only compositions to copy from, not
|
|
178
|
+
> exports.
|
|
179
|
+
|
|
180
|
+
**Data display** (Components):
|
|
181
|
+
|
|
182
|
+
> **Who decides what the chip means?** If the host already knows the state ("Active", "Draft")
|
|
183
|
+
> → `Badge`. If the number is a count the user can click into → `CountBadge`. If the colour
|
|
184
|
+
> should follow how old a date is → `FreshnessBadge`. A person → `Avatar`; long prose →
|
|
185
|
+
> `ClampedText`; a process or its history → `Timeline`; the "N of M records" line above a
|
|
186
|
+
> filtered grid → `FilterSummaryBar`. `YChart` is a Storybook-only demo and is not exported.
|
|
187
|
+
|
|
188
|
+
**Date & time** (Inputs):
|
|
189
|
+
|
|
190
|
+
> **Dates go through `DateInput` (one date) or `DateRangePicker` (start/end) — never a raw
|
|
191
|
+
> `<input type="date">`.** Keep dates as Luxon `DateTime` with an explicit IANA zone in
|
|
192
|
+
> application code and ISO-8601 on the wire; the components below hand you strings or local
|
|
193
|
+
> `Date`s, so convert at the boundary. Picking from _available_ slots is `SchedulePicker`;
|
|
194
|
+
> showing booked appointments is `ScheduleCalendar`; recurring weekly hours are `BusinessHours`
|
|
195
|
+
> (show) and `BusinessHoursEditor` (edit).
|
|
196
|
+
|
|
197
|
+
**Editors** (Modules):
|
|
198
|
+
|
|
199
|
+
> **What is the stored format, and who edits it?** Markdown that people write (and maybe
|
|
200
|
+
> co-write) → `RichEditor`. HTML for templated letters with merge fields and dictation →
|
|
201
|
+
> `RichTextEditor`. An **email** laid out from blocks and compiled to MJML → `EmailEditor`.
|
|
202
|
+
> Markdown that is only **read** → `MarkdownRenderer`. A structured agent
|
|
203
|
+
> configuration with a YAML/JSON pane → `Q`. Plain text → [Textarea](https://ui.mieweb.org/?path=/docs/text-inputs-textarea--docs)
|
|
204
|
+
> (Text inputs).
|
|
205
|
+
|
|
206
|
+
**Encounter & orders** (Healthcare):
|
|
207
|
+
|
|
208
|
+
> **What does the page lead with, and what data does it get?** Today's conclusions and the
|
|
209
|
+
> orders placed for each problem → `Assessment` (plain props: concerns, items, orders). One
|
|
210
|
+
> order in full → `OrderEditor` (morphs by type). What is _due_ from surveillance programs
|
|
211
|
+
> and quality measures → `HealthSurveillance` (`PatientHistory` + `programs.json`). The banner
|
|
212
|
+
> at the top of a **patient** page → `PatientHeader`; of a **case** page → `CaseManagementHeader`.
|
|
213
|
+
> Canned reports from a WebChart-style backend → `WebChartReportViewer`. None of them talks to a
|
|
214
|
+
> server — every backend contract is props in, callbacks out.
|
|
215
|
+
|
|
216
|
+
**Feedback** (Components):
|
|
217
|
+
|
|
218
|
+
> **Use `Toast` for what the user just did, `Alert` for what they need to keep seeing, and
|
|
219
|
+
> `AlertDialog` for what they must decide.** `Toast` (polite live region), `Alert`
|
|
220
|
+
> (`role="alert"`, announces on mount) and `ConnectionStatus` (assertive) announce themselves —
|
|
221
|
+
> never wrap them in extra live regions, and avoid mounting several announcing components at once.
|
|
222
|
+
|
|
223
|
+
**Files** (Modules):
|
|
224
|
+
|
|
225
|
+
> **Same task — get a file from the user — three shapes.** A drag target over content you
|
|
226
|
+
> already render, invisible until a drag starts → `DropzoneOverlay` + `useDropzone`. A standing
|
|
227
|
+
> "files on this record" card with a table, storage meter and per-row actions → `FileManager`.
|
|
228
|
+
> One document that must be validated, previewed, possibly photographed, and sent to an
|
|
229
|
+
> extraction endpoint → `DocumentScanner`.
|
|
230
|
+
|
|
231
|
+
**Grids** (Components):
|
|
232
|
+
|
|
233
|
+
> **Tables and data grids start with DataVis NITRO.** Use `Table` only for a few static rows the
|
|
234
|
+
> user will not sort, filter, page or export. Never hand-roll grid features on a plain table;
|
|
235
|
+
> `AGGrid` is deprecated.
|
|
236
|
+
|
|
237
|
+
**Layout** (Components):
|
|
238
|
+
|
|
239
|
+
> **What are you framing?** A block of related content → `Card`. Content that hides behind a
|
|
240
|
+
> heading → `Accordion` (a styled stack) or `Collapsible` (one headless toggle). A region that
|
|
241
|
+
> must scroll inside a fixed box → `ScrollArea`. A rule between things → `Separator`. The bar
|
|
242
|
+
> across the top → `AppHeader` for the signed-in app, `SiteHeader` for the public site,
|
|
243
|
+
> `PageHeader` for the title block _inside_ a page. The bottom of a public page → `SiteFooter`
|
|
244
|
+
> (or `SimpleFooter`), with `ProductVersion` for the deployed version line.
|
|
245
|
+
|
|
246
|
+
**Loading** (Components):
|
|
247
|
+
|
|
248
|
+
> **Known shape → `Skeleton`. Unknown shape, short wait → `Spinner`. Measurable → `Progress`.
|
|
249
|
+
> Whole route → `LoadingPage`.** Skeletons are hidden from screen readers, so announce loading
|
|
250
|
+
> elsewhere when you use them.
|
|
251
|
+
|
|
252
|
+
**Media** (Modules):
|
|
253
|
+
|
|
254
|
+
> **Is the user recording, playing, or reading along?** Capturing a take → `AudioRecorder`
|
|
255
|
+
> (a panel with review) or `RecordButton` (one button that hands off a `Blob`). Playing a clip
|
|
256
|
+
> → `AudioPlayer` (styled, audio-only, seconds) or `MediaPlayer` (native `<audio>`/`<video>`,
|
|
257
|
+
> milliseconds). Reading along → `TranscriptView` (read-only, click-to-seek). Editing the
|
|
258
|
+
> words of a recording → `MediaEditor`, which already contains a `MediaPlayer`. The
|
|
259
|
+
> **MediaEditor Live Demo** is a Storybook page, not a component.
|
|
260
|
+
|
|
261
|
+
**Navigation** (Components):
|
|
262
|
+
|
|
263
|
+
> **Where is the user going?** Between peer views of one page → `Tabs`. Up a hierarchy →
|
|
264
|
+
> `Breadcrumb`. Between sections of the page they are on → `TableOfContents` (sidebar
|
|
265
|
+
> outline) or `SectionSpyNav` (sticky band), with `ReadingProgressBar` for how far they've
|
|
266
|
+
> read. Through an ordered flow → `StepIndicator` (just the rail) or `OnboardingWizard` (the
|
|
267
|
+
> whole takeover). Anywhere, by typing → `CommandPalette`. Between routes with a persistent
|
|
268
|
+
> rail → [Sidebar](https://ui.mieweb.org/?path=/docs/overlays-sidebar--docs) (Overlays).
|
|
269
|
+
|
|
270
|
+
**Overlays** (Components):
|
|
271
|
+
|
|
272
|
+
> **Does the user have to deal with it now?** Yes → `Modal` (or `AlertDialog` for a decision).
|
|
273
|
+
> Beside the page → `Sheet`. Set it aside and come back → `DockablePanel`. Move it around →
|
|
274
|
+
> `FloatingWindow`. Just a hint → one of the three tips.
|
|
275
|
+
|
|
276
|
+
**Pages** (Templates):
|
|
277
|
+
|
|
278
|
+
> **A marketing page is data.** `LandingPage` renders an array of `blocks` — each a section's
|
|
279
|
+
> props tagged with a `type` — so an industry hub, a service page or a campaign page is a content
|
|
280
|
+
> file, not a component. Everything in the Templates tier is plain data in, static HTML out, and
|
|
281
|
+
> safe to render from a React Server Component via `@mieweb/ui/templates`.
|
|
282
|
+
|
|
283
|
+
**Presentations** (Modules):
|
|
284
|
+
|
|
285
|
+
> **One idea per screen, read in order, shared as a link.** Board updates, growth reviews and
|
|
286
|
+
> talks published as pages. Both live on optional entries so their weight stays out of apps
|
|
287
|
+
> that don't present.
|
|
288
|
+
|
|
289
|
+
**Record details** (Components):
|
|
290
|
+
|
|
291
|
+
> **The pieces that describe one record** — a contact, company, clinic, patient or deal.
|
|
292
|
+
> `RecordHeader` names it, `PropertyList` lists its fields, and the rest add the details a
|
|
293
|
+
> record page keeps needing: who's here, what's hidden, how complete it is, how it's rated.
|
|
294
|
+
|
|
295
|
+
**Records** (Modules):
|
|
296
|
+
|
|
297
|
+
> **The collections around one record, and the frame that holds them.** `RecordLayout` places
|
|
298
|
+
> the header, fields and tabs; the modules fill the tabs and side columns with what happened
|
|
299
|
+
> (`ActivityFeed`), what changed (`FieldHistory`), what's related (`AssociationList`), what's
|
|
300
|
+
> next (`ActionPlan`) and who's who (`OrgChart`). Each renders data you pass in and reports
|
|
301
|
+
> changes through callbacks — none of them fetches.
|
|
302
|
+
|
|
303
|
+
**Reports** (Templates):
|
|
304
|
+
|
|
305
|
+
> **Published data a reader can check.** A report is only as credible as its provenance: label
|
|
306
|
+
> every figure live, modeled or maturing, cite its source, and say who wrote it. These sections
|
|
307
|
+
> are `LandingPage` blocks, so a report is a content file — see the `benchmark-report` preset.
|
|
308
|
+
|
|
309
|
+
**Showcase** (Components):
|
|
310
|
+
|
|
311
|
+
> **Hero and front-door set pieces.** These components exist to make a first
|
|
312
|
+
> impression — a global footprint, an orbiting ecosystem, an explorable product
|
|
313
|
+
> ring. They are self-running, motion-driven and decorative by design: if the
|
|
314
|
+
> visitor must _read, compare or navigate_ the content, reach for Data display,
|
|
315
|
+
> Navigation or a plain layout instead.
|
|
316
|
+
|
|
317
|
+
**Social proof** (Templates):
|
|
318
|
+
|
|
319
|
+
> **Evidence that other people chose this.** Numbers, names and quotes — each a claim the page has
|
|
320
|
+
> to stand behind, so cite figures and only publish quotes and logos you have permission to use.
|
|
321
|
+
|
|
322
|
+
**Text inputs** (Inputs):
|
|
323
|
+
|
|
324
|
+
> **What is the value?** Free text on one line → `Input`; several lines → `Textarea`. A phone
|
|
325
|
+
> number → `PhoneInput` (or `PhoneInputGroup` for a typed list); a URL → `WebsiteInput` (or
|
|
326
|
+
> `WebsiteInputGroup`) — never a raw `type="tel"` / `type="url"`. A postal address → `AddressForm`
|
|
327
|
+
> to edit, `Address` to show. Every field gets an associated label: the `label` prop where the
|
|
328
|
+
> component has one, `Label` + `htmlFor` where it does not.
|
|
329
|
+
|
|
330
|
+
**Views** (Modules):
|
|
331
|
+
|
|
332
|
+
> **One set of accessors, every view.** A page that shows a collection of things describes
|
|
333
|
+
> that collection once — `getId`, `getTitle`, `getStatus`, `getStart`, `getEnd`, `getGroup` —
|
|
334
|
+
> and every view in this family reads through it. Switching from a list to a board to a Gantt
|
|
335
|
+
> is a prop, not another component to build. The views are **headless**: they never fetch,
|
|
336
|
+
> subscribe, or navigate. Data arrives as `items`; changes leave through `on*` callbacks.
|