uhc-portal-components-react 0.2.32 → 0.2.35

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.35 - 2026-11-02
4
+
5
+ - Let a portal send its compact official mark to the product website while the
6
+ adjacent product name continues to return to the current portal home.
7
+ - Preserve the existing single-link brand header when no separate mark
8
+ destination is configured.
9
+
10
+ ## 0.2.34 - 2026-11-02
11
+
12
+ - Define one shared responsive display-title and section-title scale for the
13
+ existing Small, Medium and Large portal density preferences.
14
+ - Reserve product-specific typography changes for explicit
15
+ `.custom-theme-<brand>` overrides instead of independent portal scales.
16
+
17
+ ## 0.2.33 - 2026-10-27
18
+
19
+ - Let trusted hosts provide the exact available SOSChain card areas so an
20
+ unavailable capability is omitted rather than moved into `More`.
21
+ - Make the package test and build gates portable to Windows and Node 26.
22
+
3
23
  ## 0.2.32 - 2026-10-23
4
24
 
5
25
  - Export the product-neutral subject communication composer so Emergency,
package/README.md CHANGED
@@ -36,12 +36,26 @@ light/dark-surface files and intrinsic dimensions; the shell preserves those
36
36
  proportions and never synthesizes a text monogram. Components do not import
37
37
  Firebase, Next.js or any product SDK runtime.
38
38
 
39
+ The package also owns the default typography density contract used by every
40
+ portal. `data-density="small|medium|large"` controls the shared root size and
41
+ the semantic `--uhcp-display-title-size` and `--uhcp-section-title-size`
42
+ tokens. Product CSS should consume those tokens rather than define another
43
+ S/M/L scale. A genuine brand exception must be explicit and scoped:
44
+
45
+ ```css
46
+ .custom-theme-example {
47
+ --uhcp-display-title-size: clamp(2.75rem, 4vw, 4rem);
48
+ --uhcp-section-title-size: clamp(2rem, 3vw, 3rem);
49
+ }
50
+ ```
51
+
39
52
  ```tsx
40
53
  const brand = {
41
54
  family: 'professional',
42
55
  productName: 'Example Professional',
43
56
  organizationName: 'Example Organization',
44
57
  homeHref: '/es',
58
+ markHref: 'https://example.org',
45
59
  mark: {
46
60
  lightSurface: { src: '/logos/product.svg', alt: 'Product', width: 100, height: 100 },
47
61
  darkSurface: { src: '/logos/product.svg', alt: 'Product', width: 100, height: 100 },
@@ -1 +1 @@
1
- {"version":3,"file":"PortalHeader.d.ts","sourceRoot":"","sources":["../src/PortalHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAEpB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAA;AAOvB,OAAO,EAGL,KAAK,gCAAgC,EACtC,MAAM,2BAA2B,CAAA;AAElC,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,KAAK,EAAE,WAAW,CAAA;IAClB,IAAI,EAAE,eAAe,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACjD,eAAe,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,WAAW,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACzC,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,gCAAgC,CAAA;CAClD,CAAC,CAAA;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,iBAAiB,EACjB,YAAY,EACZ,eAAoB,EACpB,eAAe,EACf,cAAm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AChB,SAAS,EACT,aAAa,EACb,gBAA+B,EAC/B,cAAc,GACf,EAAE,iBAAiB,+BAgMnB"}
@@ -66,7 +66,7 @@ export function PortalHeader({ brand, copy, accountIdentifier, languageHref, lan
66
66
  localStorage.setItem(themeKey, value);
67
67
  onThemeChange?.(value);
68
68
  }
69
- return (_jsxs("header", { className: "uhcp-header", style: brand.variables, children: [_jsxs("a", { className: "uhcp-brand", href: brand.homeHref, "aria-label": copy.home, children: [brand.mark ? (_jsx(PortalBrandArtwork, { artwork: brand.mark, className: "uhcp-brand-mark" })) : null, _jsxs("span", { children: [_jsx("strong", { children: brand.productName }), _jsx("small", { className: accountIdentifier ? 'uhcp-brand-account' : undefined, children: accountIdentifier || brand.organizationName })] })] }), currentSubject
69
+ return (_jsxs("header", { className: "uhcp-header", style: brand.variables, children: [brand.mark && brand.markHref ? (_jsxs("div", { className: "uhcp-brand", children: [_jsx("a", { className: "uhcp-brand-mark-link", href: brand.markHref, "aria-label": brand.productName, children: _jsx(PortalBrandArtwork, { artwork: brand.mark, className: "uhcp-brand-mark" }) }), _jsx("a", { className: "uhcp-brand-copy", href: brand.homeHref, "aria-label": copy.home, children: _jsxs("span", { children: [_jsx("strong", { children: brand.productName }), _jsx("small", { className: accountIdentifier ? 'uhcp-brand-account' : undefined, children: accountIdentifier || brand.organizationName })] }) })] })) : (_jsxs("a", { className: "uhcp-brand", href: brand.homeHref, "aria-label": copy.home, children: [brand.mark ? (_jsx(PortalBrandArtwork, { artwork: brand.mark, className: "uhcp-brand-mark" })) : null, _jsxs("span", { children: [_jsx("strong", { children: brand.productName }), _jsx("small", { className: accountIdentifier ? 'uhcp-brand-account' : undefined, children: accountIdentifier || brand.organizationName })] })] })), currentSubject
70
70
  ? _jsx(PortalCurrentSubjectControl, { ...currentSubject })
71
71
  : _jsx(PortalCurrentSubjectSlot, {}), _jsxs("div", { className: "uhcp-account-menu", ref: ref, children: [_jsx("button", { type: "button", className: "uhcp-trigger", onClick: () => setOpen((value) => !value), "aria-label": copy.accountAndPreferences, "aria-expanded": open, children: _jsx(PersonIcon, {}) }), open && (_jsxs("section", { className: "uhcp-menu", "aria-label": copy.accountAndPreferences, children: [_jsxs("div", { className: "uhcp-account-state", children: [_jsx("strong", { children: copy.accountAndPreferences }), _jsx("small", { children: accountIdentifier || copy.notSignedIn })] }), accountOptions.length > 0 && (_jsx("div", { className: "uhcp-account-options", children: accountOptions.map((option) => (_jsxs("button", { type: "button", disabled: option.disabled, "aria-pressed": Boolean(option.selected), onClick: () => {
72
72
  onSelectAccount?.(option.id);
@@ -99,6 +99,8 @@ export type SoschainWorkspaceProps = Readonly<{
99
99
  overviewContent?: ReactNode;
100
100
  /** Areas kept visible; remaining areas move into the accessible More menu. */
101
101
  primaryAreas?: readonly SoschainWorkspaceArea[];
102
+ /** Host-authorized areas. Omitted areas are not rendered or linked. */
103
+ availableAreas?: readonly SoschainWorkspaceArea[];
102
104
  moreLabel?: string;
103
105
  /** Raw provider identifiers are hidden by SOSChain portals by default. */
104
106
  showCardIdentifier?: boolean;
@@ -112,5 +114,5 @@ export type SoschainWorkspaceProps = Readonly<{
112
114
  * communications. This presentational component never derives authority from
113
115
  * a selected role, card, tab or browser-controlled value.
114
116
  */
115
- export declare function SoschainWorkspace({ copy, cards, selectedCard, activeArea, areaHrefs, places, products, communications, communicationsContent, healthSummary, clinicalReadOnly, careJourney, emergencyData, canManageAssociations, addPlaceHref, addProductHref, importCardHref, overviewContent, primaryAreas, moreLabel, showCardIdentifier, onSelectCard, }: SoschainWorkspaceProps): import("react").JSX.Element;
117
+ export declare function SoschainWorkspace({ copy, cards, selectedCard, activeArea, areaHrefs, places, products, communications, communicationsContent, healthSummary, clinicalReadOnly, careJourney, emergencyData, canManageAssociations, addPlaceHref, addProductHref, importCardHref, overviewContent, primaryAreas, availableAreas, moreLabel, showCardIdentifier, onSelectCard, }: SoschainWorkspaceProps): import("react").JSX.Element;
116
118
  //# sourceMappingURL=SoschainWorkspace.d.ts.map
@@ -1 +1 @@
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B,EAAE,CAAA;IAC/C,uEAAuE;IACvE,cAAc,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAA;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,mFAAmF;IACnF,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C,CAAC,CAAA;AAqBF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,gBAAuB,EACvB,WAAgB,EAChB,aAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAiD,EACjD,SAAkB,EAClB,kBAAyB,EACzB,YAAY,GACb,EAAE,sBAAsB,+BAqJxB"}
@@ -21,37 +21,40 @@ function AssociationList({ items, empty }) {
21
21
  * communications. This presentational component never derives authority from
22
22
  * a selected role, card, tab or browser-controlled value.
23
23
  */
24
- export function SoschainWorkspace({ copy, cards, selectedCard, activeArea, areaHrefs, places, products, communications, communicationsContent, healthSummary, clinicalReadOnly = true, careJourney = [], emergencyData = [], canManageAssociations, addPlaceHref, addProductHref, importCardHref, overviewContent, primaryAreas, moreLabel = 'More', showCardIdentifier = true, onSelectCard, }) {
24
+ export function SoschainWorkspace({ copy, cards, selectedCard, activeArea, areaHrefs, places, products, communications, communicationsContent, healthSummary, clinicalReadOnly = true, careJourney = [], emergencyData = [], canManageAssociations, addPlaceHref, addProductHref, importCardHref, overviewContent, primaryAreas, availableAreas = SOSCHAIN_SUBJECT_WORKSPACE_AREAS, moreLabel = 'More', showCardIdentifier = true, onSelectCard, }) {
25
25
  if (!selectedCard) {
26
26
  return (_jsxs("section", { className: "uhcp-sos-wrap", "aria-labelledby": "sos-card-picker-title", children: [_jsxs("header", { className: "uhcp-sos-heading", children: [_jsx("span", { children: copy.workspaceEyebrow }), _jsx("h1", { id: "sos-card-picker-title", children: copy.cardsTitle }), _jsx("p", { children: copy.cardsDescription }), importCardHref && copy.importCard ? _jsxs("a", { href: importCardHref, children: [copy.importCard, " \u2192"] }) : null] }), cards.length === 0 ? (_jsxs("div", { className: "uhcp-sos-empty-panel", children: [_jsx("h2", { children: copy.noCardTitle }), _jsx("p", { children: copy.noCardBody })] })) : (_jsx("ul", { className: "uhcp-sos-card-grid", children: cards.map((card) => (_jsx("li", { children: onSelectCard ? _jsxs("button", { type: "button", onClick: () => onSelectCard(card.identifier), children: [_jsx("span", { children: card.kindLabel }), _jsx("strong", { children: card.displayName }), showCardIdentifier ? _jsx("small", { children: card.identifier }) : null, _jsxs("b", { children: [copy.openCard, " \u2192"] })] }) : _jsxs("a", { href: card.openHref, children: [_jsx("span", { children: card.kindLabel }), _jsx("strong", { children: card.displayName }), showCardIdentifier ? _jsx("small", { children: card.identifier }) : null, _jsxs("b", { children: [copy.openCard, " \u2192"] })] }) }, card.identifier))) }))] }));
27
27
  }
28
- const title = activeArea === 'places'
28
+ const resolvedActiveArea = availableAreas.includes(activeArea) ? activeArea : availableAreas[0] ?? 'overview';
29
+ const visiblePrimaryAreas = (primaryAreas ?? availableAreas).filter(area => availableAreas.includes(area));
30
+ const secondaryAreas = availableAreas.filter(area => !visiblePrimaryAreas.includes(area));
31
+ const title = resolvedActiveArea === 'places'
29
32
  ? copy.placesTitle
30
- : activeArea === 'products'
33
+ : resolvedActiveArea === 'products'
31
34
  ? copy.productsTitle
32
- : activeArea === 'communications'
35
+ : resolvedActiveArea === 'communications'
33
36
  ? copy.communicationsTitle
34
- : activeArea === 'health-summary'
37
+ : resolvedActiveArea === 'health-summary'
35
38
  ? copy.healthSummaryTitle
36
- : activeArea === 'care-journey'
39
+ : resolvedActiveArea === 'care-journey'
37
40
  ? copy.careJourneyTitle
38
- : activeArea === 'emergency-data'
41
+ : resolvedActiveArea === 'emergency-data'
39
42
  ? copy.emergencyDataTitle
40
43
  : copy.overviewTitle;
41
- const body = activeArea === 'places'
44
+ const body = resolvedActiveArea === 'places'
42
45
  ? copy.placesBody
43
- : activeArea === 'products'
46
+ : resolvedActiveArea === 'products'
44
47
  ? copy.productsBody
45
- : activeArea === 'communications'
48
+ : resolvedActiveArea === 'communications'
46
49
  ? copy.communicationsBody
47
- : activeArea === 'health-summary'
50
+ : resolvedActiveArea === 'health-summary'
48
51
  ? copy.healthSummaryBody
49
- : activeArea === 'care-journey'
52
+ : resolvedActiveArea === 'care-journey'
50
53
  ? copy.careJourneyBody
51
- : activeArea === 'emergency-data'
54
+ : resolvedActiveArea === 'emergency-data'
52
55
  ? copy.emergencyDataBody
53
56
  : copy.overviewBody;
54
- const clinicalAreaIsReadOnly = activeArea === 'care-journey' || (activeArea === 'health-summary' && clinicalReadOnly);
55
- const associationAreaIsReadOnly = !canManageAssociations && (activeArea === 'overview' || activeArea === 'places' || activeArea === 'products');
56
- return (_jsxs("section", { className: "uhcp-sos-wrap", children: [_jsxs("header", { className: "uhcp-sos-heading", children: [_jsx("span", { children: copy.selectedCard }), _jsx("h1", { children: selectedCard.displayName }), _jsxs("p", { children: [selectedCard.kindLabel, showCardIdentifier ? ` · ${selectedCard.identifier}` : ''] })] }), _jsxs("nav", { className: "uhcp-sos-tabs", "aria-label": copy.workspaceEyebrow, children: [(primaryAreas ?? SOSCHAIN_SUBJECT_WORKSPACE_AREAS).map((area) => (_jsx("a", { href: areaHrefs[area], "aria-current": activeArea === area ? 'page' : undefined, children: copy.areas[area] }, area))), primaryAreas ? _jsxs("details", { className: "uhcp-sos-more", children: [_jsx("summary", { children: moreLabel }), _jsx("div", { children: SOSCHAIN_SUBJECT_WORKSPACE_AREAS.filter((area) => !primaryAreas.includes(area)).map((area) => (_jsx("a", { href: areaHrefs[area], "aria-current": activeArea === area ? 'page' : undefined, children: copy.areas[area] }, area))) })] }) : null] }), _jsxs("div", { className: "uhcp-sos-panel", children: [_jsxs("header", { children: [_jsxs("div", { children: [_jsx("h2", { children: title }), _jsx("p", { children: body })] }), (clinicalAreaIsReadOnly || associationAreaIsReadOnly) && (_jsx("span", { className: "uhcp-sos-readonly", children: copy.readOnly })), canManageAssociations && activeArea === 'places' && addPlaceHref && _jsx("a", { href: addPlaceHref, children: copy.addPlace }), canManageAssociations && activeArea === 'products' && addProductHref && _jsx("a", { href: addProductHref, children: copy.addProduct })] }), activeArea === 'overview' && (overviewContent ?? (_jsxs("div", { className: "uhcp-sos-overview-grid", children: [_jsxs("article", { children: [_jsx("strong", { children: places.length }), _jsx("span", { children: copy.areas.places })] }), _jsxs("article", { children: [_jsx("strong", { children: products.length }), _jsx("span", { children: copy.areas.products })] }), _jsxs("article", { children: [_jsx("strong", { children: communications.length }), _jsx("span", { children: copy.areas.communications })] }), _jsxs("article", { children: [_jsx("strong", { children: careJourney.length }), _jsx("span", { children: copy.areas['care-journey'] })] })] }))), activeArea === 'health-summary' && (healthSummary ?? _jsx("p", { className: "uhcp-sos-empty", children: copy.emptyHealthSummary })), activeArea === 'care-journey' && (careJourney.length === 0 ? _jsx("p", { className: "uhcp-sos-empty", children: copy.emptyCareJourney }) : (_jsx("ol", { className: "uhcp-sos-timeline uhcp-sos-care-journey", children: careJourney.map((encounter) => (_jsxs("li", { children: [_jsxs("div", { children: [_jsx("span", { children: encounter.statusLabel }), _jsx("time", { dateTime: encounter.periodStart, children: encounter.periodStart })] }), _jsx("strong", { children: encounter.serviceLabel }), encounter.detail ? _jsx("p", { children: encounter.detail }) : null, encounter.locationLabel || encounter.periodEnd ? _jsx("small", { children: [encounter.locationLabel, encounter.periodEnd].filter(Boolean).join(' · ') }) : null] }, encounter.identifier))) }))), activeArea === 'emergency-data' && _jsx(ProtectedIndexEmergencyData, { copy: copy.emergencyData, items: emergencyData }), activeArea === 'places' && _jsx(AssociationList, { items: places, empty: copy.emptyPlaces }), activeArea === 'products' && _jsx(AssociationList, { items: products, empty: copy.emptyProducts }), activeArea === 'communications' && (communicationsContent ?? (communications.length === 0 ? _jsx("p", { className: "uhcp-sos-empty", children: copy.emptyCommunications }) : (_jsx("ol", { className: "uhcp-sos-timeline", children: communications.map((message) => (_jsxs("li", { children: [_jsxs("div", { children: [_jsx("span", { children: message.categoryLabel }), _jsx("time", { children: message.occurredAt })] }), _jsx("strong", { children: message.subject }), _jsx("p", { children: message.body }), _jsxs("small", { children: [message.sender, message.placeLabel ? ` · ${message.placeLabel}` : ''] })] }, message.identifier))) }))))] })] }));
57
+ const clinicalAreaIsReadOnly = resolvedActiveArea === 'care-journey' || (resolvedActiveArea === 'health-summary' && clinicalReadOnly);
58
+ const associationAreaIsReadOnly = !canManageAssociations && (resolvedActiveArea === 'overview' || resolvedActiveArea === 'places' || resolvedActiveArea === 'products');
59
+ return (_jsxs("section", { className: "uhcp-sos-wrap", children: [_jsxs("header", { className: "uhcp-sos-heading", children: [_jsx("span", { children: copy.selectedCard }), _jsx("h1", { children: selectedCard.displayName }), _jsxs("p", { children: [selectedCard.kindLabel, showCardIdentifier ? ` · ${selectedCard.identifier}` : ''] })] }), _jsxs("nav", { className: "uhcp-sos-tabs", "aria-label": copy.workspaceEyebrow, children: [visiblePrimaryAreas.map((area) => (_jsx("a", { href: areaHrefs[area], "aria-current": resolvedActiveArea === area ? 'page' : undefined, children: copy.areas[area] }, area))), secondaryAreas.length ? _jsxs("details", { className: "uhcp-sos-more", children: [_jsx("summary", { children: moreLabel }), _jsx("div", { children: secondaryAreas.map((area) => (_jsx("a", { href: areaHrefs[area], "aria-current": resolvedActiveArea === area ? 'page' : undefined, children: copy.areas[area] }, area))) })] }) : null] }), _jsxs("div", { className: "uhcp-sos-panel", children: [_jsxs("header", { children: [_jsxs("div", { children: [_jsx("h2", { children: title }), _jsx("p", { children: body })] }), (clinicalAreaIsReadOnly || associationAreaIsReadOnly) && (_jsx("span", { className: "uhcp-sos-readonly", children: copy.readOnly })), canManageAssociations && resolvedActiveArea === 'places' && addPlaceHref && _jsx("a", { href: addPlaceHref, children: copy.addPlace }), canManageAssociations && resolvedActiveArea === 'products' && addProductHref && _jsx("a", { href: addProductHref, children: copy.addProduct })] }), resolvedActiveArea === 'overview' && (overviewContent ?? (_jsxs("div", { className: "uhcp-sos-overview-grid", children: [availableAreas.includes('places') ? _jsxs("article", { children: [_jsx("strong", { children: places.length }), _jsx("span", { children: copy.areas.places })] }) : null, availableAreas.includes('products') ? _jsxs("article", { children: [_jsx("strong", { children: products.length }), _jsx("span", { children: copy.areas.products })] }) : null, availableAreas.includes('communications') ? _jsxs("article", { children: [_jsx("strong", { children: communications.length }), _jsx("span", { children: copy.areas.communications })] }) : null, availableAreas.includes('care-journey') ? _jsxs("article", { children: [_jsx("strong", { children: careJourney.length }), _jsx("span", { children: copy.areas['care-journey'] })] }) : null] }))), resolvedActiveArea === 'health-summary' && (healthSummary ?? _jsx("p", { className: "uhcp-sos-empty", children: copy.emptyHealthSummary })), resolvedActiveArea === 'care-journey' && (careJourney.length === 0 ? _jsx("p", { className: "uhcp-sos-empty", children: copy.emptyCareJourney }) : (_jsx("ol", { className: "uhcp-sos-timeline uhcp-sos-care-journey", children: careJourney.map((encounter) => (_jsxs("li", { children: [_jsxs("div", { children: [_jsx("span", { children: encounter.statusLabel }), _jsx("time", { dateTime: encounter.periodStart, children: encounter.periodStart })] }), _jsx("strong", { children: encounter.serviceLabel }), encounter.detail ? _jsx("p", { children: encounter.detail }) : null, encounter.locationLabel || encounter.periodEnd ? _jsx("small", { children: [encounter.locationLabel, encounter.periodEnd].filter(Boolean).join(' · ') }) : null] }, encounter.identifier))) }))), resolvedActiveArea === 'emergency-data' && _jsx(ProtectedIndexEmergencyData, { copy: copy.emergencyData, items: emergencyData }), resolvedActiveArea === 'places' && _jsx(AssociationList, { items: places, empty: copy.emptyPlaces }), resolvedActiveArea === 'products' && _jsx(AssociationList, { items: products, empty: copy.emptyProducts }), resolvedActiveArea === 'communications' && (communicationsContent ?? (communications.length === 0 ? _jsx("p", { className: "uhcp-sos-empty", children: copy.emptyCommunications }) : (_jsx("ol", { className: "uhcp-sos-timeline", children: communications.map((message) => (_jsxs("li", { children: [_jsxs("div", { children: [_jsx("span", { children: message.categoryLabel }), _jsx("time", { children: message.occurredAt })] }), _jsx("strong", { children: message.subject }), _jsx("p", { children: message.body }), _jsxs("small", { children: [message.sender, message.placeLabel ? ` · ${message.placeLabel}` : ''] })] }, message.identifier))) }))))] })] }));
57
60
  }
@@ -25,6 +25,8 @@ export type PortalBrand = Readonly<{
25
25
  productName: string;
26
26
  organizationName: string;
27
27
  homeHref: string;
28
+ /** Optional destination for the compact mark when it differs from the portal home. */
29
+ markHref?: string;
28
30
  /** Compact official mark for navigation chrome. */
29
31
  mark?: PortalBrandArtworkSet;
30
32
  /** Optional official hero artwork; the compact mark is used when omitted. */
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,eAAO,MAAM,iBAAiB,uCAAwC,CAAA;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,eAAO,MAAM,cAAc,sCAAuC,CAAA;AAClE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,WAAW,EAAE,gBAAgB,CAAA;IAC7B,YAAY,EAAE,gBAAgB,CAAA;CAC/B,CAAC,CAAA;AAEF,MAAM,MAAM,WA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C,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAChE,CAAC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,GAAG,QAAQ,CAAC;IACrE,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC,CAAA"}
package/dist/styles.css CHANGED
@@ -19,10 +19,25 @@
19
19
  --uhcp-unlock-end: hsl(21 86% 48%);
20
20
  --uhcp-unlock-text: #fff;
21
21
  --uhcp-alternative: color-mix(in srgb, var(--uhcp-attention) 22%, var(--uhcp-panel));
22
+ --uhcp-display-title-size: clamp(3rem, 4vw, 4rem);
23
+ --uhcp-section-title-size: clamp(2.25rem, 3vw, 3rem);
24
+ }
25
+ /* Brand overrides belong under an explicit .custom-theme-<brand> selector. */
26
+ html[data-density='small'] {
27
+ --uhcp-display-title-size: clamp(2.5rem, 3.3vw, 3.25rem);
28
+ --uhcp-section-title-size: clamp(2rem, 2.5vw, 2.5rem);
29
+ font-size: 15px;
30
+ }
31
+ html[data-density='medium'] {
32
+ --uhcp-display-title-size: clamp(3rem, 4vw, 4rem);
33
+ --uhcp-section-title-size: clamp(2.25rem, 3vw, 3rem);
34
+ font-size: 16px;
35
+ }
36
+ html[data-density='large'] {
37
+ --uhcp-display-title-size: clamp(3rem, 4.6vw, 4rem);
38
+ --uhcp-section-title-size: clamp(2.25rem, 3.6vw, 3rem);
39
+ font-size: 18px;
22
40
  }
23
- html[data-density='small'] { font-size: 15px; }
24
- html[data-density='medium'] { font-size: 16px; }
25
- html[data-density='large'] { font-size: 18px; }
26
41
  html[data-theme='dark'] {
27
42
  --uhcp-surface: hsl(218 46% 9%);
28
43
  --uhcp-surface-muted: hsl(218 37% 13%);
@@ -50,7 +65,9 @@ html[data-theme='dark'] {
50
65
  z-index: 40;
51
66
  }
52
67
  .uhcp-brand { align-items: center; color: var(--uhcp-text); display: flex; gap: .75rem; text-decoration: none; }
53
- .uhcp-brand > span:last-child { display: grid; line-height: 1.15; }
68
+ .uhcp-brand > span:last-child, .uhcp-brand-copy > span { display: grid; line-height: 1.15; }
69
+ .uhcp-brand-copy, .uhcp-brand-mark-link { color: inherit; text-decoration: none; }
70
+ .uhcp-brand-mark-link { display: inline-flex; flex: 0 0 auto; }
54
71
  .uhcp-brand small { color: var(--uhcp-muted); max-width: min(22rem, 42vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
55
72
  .uhcp-brand-mark {
56
73
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uhc-portal-components-react",
3
- "version": "0.2.32",
3
+ "version": "0.2.35",
4
4
  "description": "Brand-neutral React portal screens, account preferences and protected-profile UI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -19,10 +19,10 @@
19
19
  "./styles.css": "./dist/styles.css"
20
20
  },
21
21
  "scripts": {
22
- "clean": "rm -rf dist",
23
- "build": "npm run clean && tsc && cp src/styles.css dist/styles.css",
22
+ "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
23
+ "build": "npm run clean && tsc && node -e \"require('node:fs').copyFileSync('src/styles.css','dist/styles.css')\"",
24
24
  "typecheck": "tsc --noEmit",
25
- "test": "vitest run --maxWorkers=1",
25
+ "test": "node scripts/run-vitest.mjs",
26
26
  "check": "npm run typecheck && npm test && npm run build",
27
27
  "prepack": "npm run check"
28
28
  },