@alfadocs/ui-kit-debug 0.17.3 → 0.18.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/dist/_chunks/{carousel.agent-Xuw9LPZN.js → carousel.agent-CQPFfppK.js} +533 -513
- package/dist/_chunks/{carousel.agent-Xuw9LPZN.js.map → carousel.agent-CQPFfppK.js.map} +1 -1
- package/dist/_chunks/{patient-shell-BOOaWZA9.js → patient-shell-Dr64lBp_.js} +2 -2
- package/dist/_chunks/{patient-shell-BOOaWZA9.js.map → patient-shell-Dr64lBp_.js.map} +1 -1
- package/dist/_chunks/theme-root-BOO73p5t.js +26 -0
- package/dist/_chunks/theme-root-BOO73p5t.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/theme-root/index.js +1 -1
- package/dist/components/theme-root/theme-root.d.ts +11 -0
- package/dist/components/theme-root/theme-root.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/theme-root-CSKD5ZRm.js +0 -25
- package/dist/_chunks/theme-root-CSKD5ZRm.js.map +0 -1
|
@@ -7,7 +7,7 @@ import { D as n } from "./dropdown-menu-DZxwF23X.js";
|
|
|
7
7
|
import { H as L, g as A, f as H, e as x, a as C, c as M, d as B } from "./header-DqmKROIY.js";
|
|
8
8
|
import { L as N } from "./logo-_Z-jLq80.js";
|
|
9
9
|
import { S as T, a as _, h as O, j as P, k as W, i as j } from "./sidebar-BqzlRBvC.js";
|
|
10
|
-
import { T as z } from "./theme-root-
|
|
10
|
+
import { T as z } from "./theme-root-BOO73p5t.js";
|
|
11
11
|
import { a as R } from "./tooltip-DHik5yRI.js";
|
|
12
12
|
import { u as D } from "./use-theme-B1cwAXJR.js";
|
|
13
13
|
import { c as h } from "./createLucideIcon-CrFbzy84.js";
|
|
@@ -185,4 +185,4 @@ V.displayName = "PatientShell";
|
|
|
185
185
|
export {
|
|
186
186
|
V as P
|
|
187
187
|
};
|
|
188
|
-
//# sourceMappingURL=patient-shell-
|
|
188
|
+
//# sourceMappingURL=patient-shell-Dr64lBp_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient-shell-BOOaWZA9.js","sources":["../../node_modules/lucide-react/dist/esm/icons/maximize-2.js","../../node_modules/lucide-react/dist/esm/icons/settings.js","../../src/patterns/patient-shell/patient-shell.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 3h6v6\", key: \"1q9fwt\" }],\n [\"path\", { d: \"m21 3-7 7\", key: \"1l2asr\" }],\n [\"path\", { d: \"m3 21 7-7\", key: \"tjx5ai\" }],\n [\"path\", { d: \"M9 21H3v-6\", key: \"wtvkvv\" }]\n];\nconst Maximize2 = createLucideIcon(\"maximize-2\", __iconNode);\n\nexport { __iconNode, Maximize2 as default };\n//# sourceMappingURL=maximize-2.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\",\n key: \"1i5ecw\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n];\nconst Settings = createLucideIcon(\"settings\", __iconNode);\n\nexport { __iconNode, Settings as default };\n//# sourceMappingURL=settings.js.map\n","/**\n * Patient Shell — the chrome for AlfaDocs's patient-facing users\n * (patients managing their own appointments and records).\n *\n * Deliberately flatter than the clinician `AppFrame` composition: no\n * command palette, no favourites, no practice/chain affordances, no\n * Leo, no privacy lock. Mirrors the legacy `_header.html.twig`\n * `app.user.type == 'patient'` branch and the `knp_menu_render('pcp')`\n * flat nav menu.\n *\n * Unlike most patterns in this folder, PatientShell exports a runtime\n * component because the consuming patient-portal app mounts it in\n * production — the exports are surfaced via `src/patterns/index.ts`\n * and included in the library bundle.\n */\nimport { forwardRef, useState, type ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { LogOut, Maximize2, Settings as SettingsIcon } from 'lucide-react';\n\nimport { AppFrame } from '../../components/app-frame';\nimport { IconButton } from '../../components/button';\nimport { DropdownMenu } from '../../components/dropdown-menu';\nimport {\n Header,\n HeaderBrand,\n HeaderCenter,\n HeaderEnd,\n HeaderMenuButton,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { Logo } from '../../components/logo';\nimport {\n Sidebar,\n SidebarBody,\n SidebarItem,\n SidebarItemBadge,\n SidebarItemIcon,\n SidebarItemLabel,\n type SidebarMode,\n} from '../../components/sidebar';\nimport { ThemeRoot } from '../../components/theme-root';\nimport { TooltipProvider } from '../../components/tooltip';\nimport { useTheme } from '../../hooks/use-theme';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* ------------------------------------------------------------------ */\n\nexport interface PatientNavItem {\n id: string;\n /** Pre-translated label — patients' nav labels are emitted already\n * translated by the consuming app's backend (legacy `knp_menu`). */\n label: string;\n href: string;\n /** Optional leading icon. Pass a lucide-react or equivalent element. */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the item as the current page (`aria-current='page'`). */\n isActive?: boolean;\n}\n\nexport interface PatientShellProps {\n /** Patient's display name. Used as the avatar fallback by consumers\n * that read the name through a slot; not rendered inside this shell\n * today because the legacy patient chrome carries no profile pill. */\n userName: string;\n /** Optional avatar URL. Reserved for future profile-pill surfaces;\n * no visible effect today. */\n userAvatarSrc?: string;\n /** Flat nav items rendered in the sidebar, in order. */\n menuItems: PatientNavItem[];\n /** URL the \"Logout\" action navigates to — typically `/logout`. */\n logoutHref: string;\n /** Fires when the user toggles fullscreen from the settings menu. */\n onToggleFullscreen?: () => void;\n /** Optional brand logo. Defaults to\n * `<Logo variant=\"monochrome\" size=\"md\" decorative />`. */\n brandLogo?: ReactNode;\n /** Link target for the brand — typically the patient dashboard. */\n brandHref?: string;\n /** Override the accessible name of the `<main>` landmark. */\n mainAriaLabel?: string;\n /**\n * Force the sidebar into a specific mode. Consuming apps typically\n * flip to `'overlay'` on narrow viewports and leave this undefined\n * elsewhere (the sidebar then defaults to `'expanded'`).\n */\n sidebarState?: SidebarMode;\n /** Children render inside the main content region. */\n children: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Internals */\n/* ------------------------------------------------------------------ */\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\n/**\n * Guard against `javascript:` and other non-navigation schemes before\n * handing the URL to `window.location.assign`. A consuming app that lets\n * attacker-controlled input reach `logoutHref` would otherwise execute\n * script. Allow only relative paths, hash fragments, and `http(s)` URLs.\n */\nfunction isSafeLogoutHref(href: string): boolean {\n if (href.startsWith('/') || href.startsWith('#') || href.startsWith('?')) {\n return true;\n }\n try {\n const url = new URL(href, window.location.origin);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nfunction SettingsMenu({\n logoutHref,\n onToggleFullscreen,\n}: {\n logoutHref: string;\n onToggleFullscreen?: () => void;\n}) {\n const { t } = useTranslation();\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton\n icon={<SettingsIcon aria-hidden=\"true\" />}\n aria-label={t('patientShell.settings.triggerAria')}\n tooltip={t('patientShell.settings.triggerAria')}\n data-testid=\"patient-shell-settings-trigger\"\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">\n <DropdownMenu.Item\n startIcon={<Maximize2 aria-hidden=\"true\" />}\n onSelect={onToggleFullscreen}\n data-testid=\"patient-shell-fullscreen\"\n >\n {t('patientShell.settings.fullscreen')}\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n startIcon={<LogOut aria-hidden=\"true\" />}\n onSelect={() => {\n if (typeof window === 'undefined') return;\n if (!isSafeLogoutHref(logoutHref)) return;\n window.location.assign(logoutHref);\n }}\n data-testid=\"patient-shell-logout\"\n >\n {t('patientShell.settings.logout')}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n\nfunction PatientSidebarNav({ menuItems }: { menuItems: PatientNavItem[] }) {\n return (\n <SidebarBody>\n {menuItems.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n return (\n <SidebarItem\n key={item.id}\n href={item.href}\n aria-label={item.label}\n isActive={item.isActive}\n >\n {item.icon ? <SidebarItemIcon>{item.icon}</SidebarItemIcon> : null}\n <SidebarItemLabel>{item.label}</SidebarItemLabel>\n {badge !== undefined ? (\n <SidebarItemBadge>{formatBadgeCount(badge)}</SidebarItemBadge>\n ) : null}\n </SidebarItem>\n );\n })}\n </SidebarBody>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nexport const PatientShell = forwardRef<HTMLDivElement, PatientShellProps>(\n (\n {\n menuItems,\n logoutHref,\n onToggleFullscreen,\n brandLogo,\n brandHref = '/',\n mainAriaLabel,\n sidebarState,\n children,\n // `userName` and `userAvatarSrc` are declared on the public API\n // for forward-compatibility (future profile-pill work) — they are\n // intentionally unused today because the legacy patient chrome\n // carries no profile pill.\n userName: _userName,\n userAvatarSrc: _userAvatarSrc,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const { resolvedTheme } = useTheme();\n const themeBase = resolvedTheme.startsWith('dark') ? 'dark' : 'light';\n const themeAccessible = resolvedTheme.endsWith('-accessible');\n\n // Narrow-viewport overlay: `HeaderMenuButton` only renders below the\n // `md` breakpoint, and toggling opens the Sidebar's overlay Dialog.\n const [sidebarOpen, setSidebarOpen] = useState(false);\n\n const resolvedLogo = brandLogo ?? (\n <Logo variant=\"monochrome\" size=\"md\" decorative />\n );\n\n return (\n <ThemeRoot\n ref={ref}\n theme={themeBase}\n accessible={themeAccessible}\n className=\"ds:contents\"\n >\n <TooltipProvider>\n <AppFrame\n mainAriaLabel={mainAriaLabel}\n header={\n <Header>\n <HeaderStart>\n <HeaderSkipLink href=\"#main-content\" />\n <HeaderMenuButton onMenuOpen={() => setSidebarOpen(true)} />\n <HeaderBrand\n logo={resolvedLogo}\n href={brandHref}\n aria-label={t('patientShell.brand.homeAria')}\n />\n </HeaderStart>\n <HeaderCenter />\n <HeaderEnd>\n <SettingsMenu\n logoutHref={logoutHref}\n onToggleFullscreen={onToggleFullscreen}\n />\n </HeaderEnd>\n </Header>\n }\n sidebar={\n <Sidebar\n {...(sidebarState !== undefined\n ? { state: sidebarState }\n : { defaultState: 'expanded' as const })}\n open={sidebarOpen}\n onOpenChange={setSidebarOpen}\n aria-label={t('patientShell.sidebar.panelLabel')}\n data-testid=\"patient-shell-sidebar\"\n >\n <PatientSidebarNav menuItems={menuItems} />\n </Sidebar>\n }\n >\n {children}\n </AppFrame>\n </TooltipProvider>\n </ThemeRoot>\n );\n },\n);\n\nPatientShell.displayName = 'PatientShell';\n"],"names":["__iconNode","Maximize2","createLucideIcon","Settings","formatBadgeCount","count","isSafeLogoutHref","href","url","SettingsMenu","logoutHref","onToggleFullscreen","t","useTranslation","jsxs","DropdownMenu","jsx","IconButton","SettingsIcon","LogOut","PatientSidebarNav","menuItems","SidebarBody","item","badge","SidebarItem","SidebarItemIcon","SidebarItemLabel","SidebarItemBadge","PatientShell","forwardRef","brandLogo","brandHref","mainAriaLabel","sidebarState","children","_userName","_userAvatarSrc","ref","resolvedTheme","useTheme","themeBase","themeAccessible","sidebarOpen","setSidebarOpen","useState","ThemeRoot","TooltipProvider","AppFrame","Header","HeaderStart","HeaderSkipLink","HeaderMenuButton","HeaderBrand","Logo","HeaderCenter","HeaderEnd","Sidebar"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAC7C,GACMC,IAAYC,EAAiB,cAAcF,CAAU;ACf3D;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,SAAQ,CAAE;AAC1D,GACMG,IAAWD,EAAiB,YAAYF,CAAU;AC+ExD,SAASI,EAAiBC,GAAuB;AAC/C,SAAOA,IAAQ,KAAK,QAAQ,OAAOA,CAAK;AAC1C;AAQA,SAASC,EAAiBC,GAAuB;AAC/C,MAAIA,EAAK,WAAW,GAAG,KAAKA,EAAK,WAAW,GAAG,KAAKA,EAAK,WAAW,GAAG;AACrE,WAAO;AAET,MAAI;AACF,UAAMC,IAAM,IAAI,IAAID,GAAM,OAAO,SAAS,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/B;AAAA,UAACgC;AAAA,UAAA;AAAA,YACC,eAAAf;AAAA,YACA,0BACGgB,GAAA,EACC,UAAA;AAAA,cAAA,gBAAAnC,EAACoC,GAAA,EACC,UAAA;AAAA,gBAAA,gBAAAlC,EAACmC,GAAA,EAAe,MAAK,gBAAA,CAAgB;AAAA,kCACpCC,GAAA,EAAiB,YAAY,MAAMR,EAAe,EAAI,GAAG;AAAA,gBAC1D,gBAAA5B;AAAA,kBAACqC;AAAA,kBAAA;AAAA,oBACC,MApBKtB,KACnB,gBAAAf,EAACsC,GAAA,EAAK,SAAQ,cAAa,MAAK,MAAK,YAAU,GAAA,CAAC;AAAA,oBAoBlC,MAAMtB;AAAA,oBACN,cAAYpB,EAAE,6BAA6B;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAC7C,GACF;AAAA,gCACC2C,GAAA,EAAa;AAAA,gCACbC,GAAA,EACC,UAAA,gBAAAxC;AAAA,gBAACP;AAAA,gBAAA;AAAA,kBACC,YAAAC;AAAA,kBACA,oBAAAC;AAAA,gBAAA;AAAA,cAAA,EACF,CACF;AAAA,YAAA,GACF;AAAA,YAEF,SACE,gBAAAK;AAAA,cAACyC;AAAA,cAAA;AAAA,gBACE,GAAIvB,MAAiB,SAClB,EAAE,OAAOA,MACT,EAAE,cAAc,WAAA;AAAA,gBACpB,MAAMS;AAAA,gBACN,cAAcC;AAAA,gBACd,cAAYhC,EAAE,iCAAiC;AAAA,gBAC/C,eAAY;AAAA,gBAEZ,UAAA,gBAAAI,EAACI,KAAkB,WAAAC,EAAA,CAAsB;AAAA,cAAA;AAAA,YAAA;AAAA,YAI5C,UAAAc;AAAA,UAAA;AAAA,QAAA,EACH,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAN,EAAa,cAAc;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"patient-shell-Dr64lBp_.js","sources":["../../node_modules/lucide-react/dist/esm/icons/maximize-2.js","../../node_modules/lucide-react/dist/esm/icons/settings.js","../../src/patterns/patient-shell/patient-shell.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 3h6v6\", key: \"1q9fwt\" }],\n [\"path\", { d: \"m21 3-7 7\", key: \"1l2asr\" }],\n [\"path\", { d: \"m3 21 7-7\", key: \"tjx5ai\" }],\n [\"path\", { d: \"M9 21H3v-6\", key: \"wtvkvv\" }]\n];\nconst Maximize2 = createLucideIcon(\"maximize-2\", __iconNode);\n\nexport { __iconNode, Maximize2 as default };\n//# sourceMappingURL=maximize-2.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\",\n key: \"1i5ecw\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n];\nconst Settings = createLucideIcon(\"settings\", __iconNode);\n\nexport { __iconNode, Settings as default };\n//# sourceMappingURL=settings.js.map\n","/**\n * Patient Shell — the chrome for AlfaDocs's patient-facing users\n * (patients managing their own appointments and records).\n *\n * Deliberately flatter than the clinician `AppFrame` composition: no\n * command palette, no favourites, no practice/chain affordances, no\n * Leo, no privacy lock. Mirrors the legacy `_header.html.twig`\n * `app.user.type == 'patient'` branch and the `knp_menu_render('pcp')`\n * flat nav menu.\n *\n * Unlike most patterns in this folder, PatientShell exports a runtime\n * component because the consuming patient-portal app mounts it in\n * production — the exports are surfaced via `src/patterns/index.ts`\n * and included in the library bundle.\n */\nimport { forwardRef, useState, type ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { LogOut, Maximize2, Settings as SettingsIcon } from 'lucide-react';\n\nimport { AppFrame } from '../../components/app-frame';\nimport { IconButton } from '../../components/button';\nimport { DropdownMenu } from '../../components/dropdown-menu';\nimport {\n Header,\n HeaderBrand,\n HeaderCenter,\n HeaderEnd,\n HeaderMenuButton,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { Logo } from '../../components/logo';\nimport {\n Sidebar,\n SidebarBody,\n SidebarItem,\n SidebarItemBadge,\n SidebarItemIcon,\n SidebarItemLabel,\n type SidebarMode,\n} from '../../components/sidebar';\nimport { ThemeRoot } from '../../components/theme-root';\nimport { TooltipProvider } from '../../components/tooltip';\nimport { useTheme } from '../../hooks/use-theme';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* ------------------------------------------------------------------ */\n\nexport interface PatientNavItem {\n id: string;\n /** Pre-translated label — patients' nav labels are emitted already\n * translated by the consuming app's backend (legacy `knp_menu`). */\n label: string;\n href: string;\n /** Optional leading icon. Pass a lucide-react or equivalent element. */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the item as the current page (`aria-current='page'`). */\n isActive?: boolean;\n}\n\nexport interface PatientShellProps {\n /** Patient's display name. Used as the avatar fallback by consumers\n * that read the name through a slot; not rendered inside this shell\n * today because the legacy patient chrome carries no profile pill. */\n userName: string;\n /** Optional avatar URL. Reserved for future profile-pill surfaces;\n * no visible effect today. */\n userAvatarSrc?: string;\n /** Flat nav items rendered in the sidebar, in order. */\n menuItems: PatientNavItem[];\n /** URL the \"Logout\" action navigates to — typically `/logout`. */\n logoutHref: string;\n /** Fires when the user toggles fullscreen from the settings menu. */\n onToggleFullscreen?: () => void;\n /** Optional brand logo. Defaults to\n * `<Logo variant=\"monochrome\" size=\"md\" decorative />`. */\n brandLogo?: ReactNode;\n /** Link target for the brand — typically the patient dashboard. */\n brandHref?: string;\n /** Override the accessible name of the `<main>` landmark. */\n mainAriaLabel?: string;\n /**\n * Force the sidebar into a specific mode. Consuming apps typically\n * flip to `'overlay'` on narrow viewports and leave this undefined\n * elsewhere (the sidebar then defaults to `'expanded'`).\n */\n sidebarState?: SidebarMode;\n /** Children render inside the main content region. */\n children: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Internals */\n/* ------------------------------------------------------------------ */\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\n/**\n * Guard against `javascript:` and other non-navigation schemes before\n * handing the URL to `window.location.assign`. A consuming app that lets\n * attacker-controlled input reach `logoutHref` would otherwise execute\n * script. Allow only relative paths, hash fragments, and `http(s)` URLs.\n */\nfunction isSafeLogoutHref(href: string): boolean {\n if (href.startsWith('/') || href.startsWith('#') || href.startsWith('?')) {\n return true;\n }\n try {\n const url = new URL(href, window.location.origin);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nfunction SettingsMenu({\n logoutHref,\n onToggleFullscreen,\n}: {\n logoutHref: string;\n onToggleFullscreen?: () => void;\n}) {\n const { t } = useTranslation();\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton\n icon={<SettingsIcon aria-hidden=\"true\" />}\n aria-label={t('patientShell.settings.triggerAria')}\n tooltip={t('patientShell.settings.triggerAria')}\n data-testid=\"patient-shell-settings-trigger\"\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">\n <DropdownMenu.Item\n startIcon={<Maximize2 aria-hidden=\"true\" />}\n onSelect={onToggleFullscreen}\n data-testid=\"patient-shell-fullscreen\"\n >\n {t('patientShell.settings.fullscreen')}\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n startIcon={<LogOut aria-hidden=\"true\" />}\n onSelect={() => {\n if (typeof window === 'undefined') return;\n if (!isSafeLogoutHref(logoutHref)) return;\n window.location.assign(logoutHref);\n }}\n data-testid=\"patient-shell-logout\"\n >\n {t('patientShell.settings.logout')}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n\nfunction PatientSidebarNav({ menuItems }: { menuItems: PatientNavItem[] }) {\n return (\n <SidebarBody>\n {menuItems.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n return (\n <SidebarItem\n key={item.id}\n href={item.href}\n aria-label={item.label}\n isActive={item.isActive}\n >\n {item.icon ? <SidebarItemIcon>{item.icon}</SidebarItemIcon> : null}\n <SidebarItemLabel>{item.label}</SidebarItemLabel>\n {badge !== undefined ? (\n <SidebarItemBadge>{formatBadgeCount(badge)}</SidebarItemBadge>\n ) : null}\n </SidebarItem>\n );\n })}\n </SidebarBody>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nexport const PatientShell = forwardRef<HTMLDivElement, PatientShellProps>(\n (\n {\n menuItems,\n logoutHref,\n onToggleFullscreen,\n brandLogo,\n brandHref = '/',\n mainAriaLabel,\n sidebarState,\n children,\n // `userName` and `userAvatarSrc` are declared on the public API\n // for forward-compatibility (future profile-pill work) — they are\n // intentionally unused today because the legacy patient chrome\n // carries no profile pill.\n userName: _userName,\n userAvatarSrc: _userAvatarSrc,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const { resolvedTheme } = useTheme();\n const themeBase = resolvedTheme.startsWith('dark') ? 'dark' : 'light';\n const themeAccessible = resolvedTheme.endsWith('-accessible');\n\n // Narrow-viewport overlay: `HeaderMenuButton` only renders below the\n // `md` breakpoint, and toggling opens the Sidebar's overlay Dialog.\n const [sidebarOpen, setSidebarOpen] = useState(false);\n\n const resolvedLogo = brandLogo ?? (\n <Logo variant=\"monochrome\" size=\"md\" decorative />\n );\n\n return (\n <ThemeRoot\n ref={ref}\n theme={themeBase}\n accessible={themeAccessible}\n className=\"ds:contents\"\n >\n <TooltipProvider>\n <AppFrame\n mainAriaLabel={mainAriaLabel}\n header={\n <Header>\n <HeaderStart>\n <HeaderSkipLink href=\"#main-content\" />\n <HeaderMenuButton onMenuOpen={() => setSidebarOpen(true)} />\n <HeaderBrand\n logo={resolvedLogo}\n href={brandHref}\n aria-label={t('patientShell.brand.homeAria')}\n />\n </HeaderStart>\n <HeaderCenter />\n <HeaderEnd>\n <SettingsMenu\n logoutHref={logoutHref}\n onToggleFullscreen={onToggleFullscreen}\n />\n </HeaderEnd>\n </Header>\n }\n sidebar={\n <Sidebar\n {...(sidebarState !== undefined\n ? { state: sidebarState }\n : { defaultState: 'expanded' as const })}\n open={sidebarOpen}\n onOpenChange={setSidebarOpen}\n aria-label={t('patientShell.sidebar.panelLabel')}\n data-testid=\"patient-shell-sidebar\"\n >\n <PatientSidebarNav menuItems={menuItems} />\n </Sidebar>\n }\n >\n {children}\n </AppFrame>\n </TooltipProvider>\n </ThemeRoot>\n );\n },\n);\n\nPatientShell.displayName = 'PatientShell';\n"],"names":["__iconNode","Maximize2","createLucideIcon","Settings","formatBadgeCount","count","isSafeLogoutHref","href","url","SettingsMenu","logoutHref","onToggleFullscreen","t","useTranslation","jsxs","DropdownMenu","jsx","IconButton","SettingsIcon","LogOut","PatientSidebarNav","menuItems","SidebarBody","item","badge","SidebarItem","SidebarItemIcon","SidebarItemLabel","SidebarItemBadge","PatientShell","forwardRef","brandLogo","brandHref","mainAriaLabel","sidebarState","children","_userName","_userAvatarSrc","ref","resolvedTheme","useTheme","themeBase","themeAccessible","sidebarOpen","setSidebarOpen","useState","ThemeRoot","TooltipProvider","AppFrame","Header","HeaderStart","HeaderSkipLink","HeaderMenuButton","HeaderBrand","Logo","HeaderCenter","Header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ACC,MApBKtB,KACnB,gBAAAf,EAACsC,GAAA,EAAK,SAAQ,cAAa,MAAK,MAAK,YAAU,GAAA,CAAC;AAAA,oBAoBlC,MAAMtB;AAAA,oBACN,cAAYpB,EAAE,6BAA6B;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAC7C,GACF;AAAA,gCACC2C,GAAA,EAAa;AAAA,gCACbC,GAAA,EACC,UAAA,gBAAAxC;AAAA,gBAACP;AAAA,gBAAA;AAAA,kBACC,YAAAC;AAAA,kBACA,oBAAAC;AAAA,gBAAA;AAAA,cAAA,EACF,CACF;AAAA,YAAA,GACF;AAAA,YAEF,SACE,gBAAAK;AAAA,cAACyC;AAAA,cAAA;AAAA,gBACE,GAAIvB,MAAiB,SAClB,EAAE,OAAOA,MACT,EAAE,cAAc,WAAA;AAAA,gBACpB,MAAMS;AAAA,gBACN,cAAcC;AAAA,gBACd,cAAYhC,EAAE,iCAAiC;AAAA,gBAC/C,eAAY;AAAA,gBAEZ,UAAA,gBAAAI,EAACI,KAAkB,WAAAC,EAAA,CAAsB;AAAA,cAAA;AAAA,YAAA;AAAA,YAI5C,UAAAc;AAAA,UAAA;AAAA,QAAA,EACH,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAN,EAAa,cAAc;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { Slot as f } from "@radix-ui/react-slot";
|
|
4
|
+
function h(t, s, m, o) {
|
|
5
|
+
const e = [t === "dark" ? "theme-dark" : "theme-light"];
|
|
6
|
+
return s && e.push("theme-accessible"), m && e.push("ds:contents"), o && e.push(o), e.join(" ");
|
|
7
|
+
}
|
|
8
|
+
const l = c(
|
|
9
|
+
({
|
|
10
|
+
theme: t = "light",
|
|
11
|
+
accessible: s = !1,
|
|
12
|
+
transparent: m = !0,
|
|
13
|
+
asChild: o = !1,
|
|
14
|
+
className: e,
|
|
15
|
+
children: r,
|
|
16
|
+
...a
|
|
17
|
+
}, i) => {
|
|
18
|
+
const n = h(t, s, m, e);
|
|
19
|
+
return /* @__PURE__ */ p(o ? f : "div", { ref: i, className: n, "data-component": "theme-root", ...a, children: r });
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
l.displayName = "ThemeRoot";
|
|
23
|
+
export {
|
|
24
|
+
l as T
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=theme-root-BOO73p5t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-root-BOO73p5t.js","sources":["../../src/components/theme-root/theme-root.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* ThemeRoot — declarative wrapper that activates a DS theme. */\n/* */\n/* DS themes are composed from two orthogonal axes (see 04-theming.mdx): */\n/* base: `theme-light` | `theme-dark` */\n/* modifier: `theme-accessible` (AAA contrast, larger target size, */\n/* 0ms animations, 18px base font) */\n/* */\n/* `<ThemeRoot>` owns the class combination so consuming apps don't */\n/* hand-assemble it (and get it wrong under `accessible + dark`, where */\n/* the selector is `.theme-dark.theme-accessible`, not a separate class).*/\n/* */\n/* Rendered as a `<div>` by default. Pass `asChild` to merge the theme */\n/* classes onto a caller-supplied element via Radix `<Slot>` — preserves */\n/* the child's props and correctly forwards refs. Used when the theme */\n/* root is <html> or <body> in a server-rendered layout. */\n/* */\n/* Layout transparency: as of 0.18.0 the wrapper defaults to */\n/* `display: contents` so it doesn't become a containing block for */\n/* descendants using `position: sticky` / `position: fixed`. CSS */\n/* variables (the only thing the wrapper exists to apply) cascade */\n/* through `display: contents` unchanged. Pass `transparent={false}` to */\n/* restore the pre-0.18.0 layout-box behaviour — only needed if you */\n/* rely on the wrapper as a positioning anchor or for */\n/* ::before/::after decorations. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, type HTMLAttributes } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type ThemeBase = 'light' | 'dark';\n\nexport interface ThemeRootProps extends HTMLAttributes<HTMLDivElement> {\n /** Which colour-scheme base to activate. Default: `light`. */\n theme?: ThemeBase;\n /** Layer the AAA `theme-accessible` modifier on top of the base. */\n accessible?: boolean;\n /**\n * Whether the wrapper should be transparent to layout (`display:\n * contents`). Defaults to `true` so the wrapper does not become a\n * containing block for sticky / fixed descendants. Set `false` to\n * render a real layout box (the pre-0.18.0 behaviour).\n *\n * Note: when `asChild` is set, the consumer's element receives this\n * class. If the consumer's element relies on its own layout box,\n * pass `transparent={false}`.\n */\n transparent?: boolean;\n /**\n * When true, merges the theme classes onto the single child element\n * instead of rendering a wrapping `<div>`. Useful when the theme root\n * is `<html>` or `<body>` in an app shell. Refs forward to the child.\n */\n asChild?: boolean;\n}\n\nfunction composeClassName(\n theme: ThemeBase,\n accessible: boolean,\n transparent: boolean,\n extra?: string,\n): string {\n const parts = [theme === 'dark' ? 'theme-dark' : 'theme-light'];\n if (accessible) parts.push('theme-accessible');\n // `display: contents` suppresses only the wrapper's own box —\n // descendants (and CSS variables, focus rings, hover handlers) all\n // continue to work. Tailwind's `contents` utility is the canonical\n // way to apply it; we ship the kit's `ds:` prefix variant.\n if (transparent) parts.push('ds:contents');\n if (extra) parts.push(extra);\n return parts.join(' ');\n}\n\nexport const ThemeRoot = forwardRef<HTMLDivElement, ThemeRootProps>(\n (\n {\n theme = 'light',\n accessible = false,\n transparent = true,\n asChild = false,\n className,\n children,\n ...rest\n },\n ref,\n ) => {\n const merged = composeClassName(theme, accessible, transparent, className);\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp ref={ref} className={merged} data-component=\"theme-root\" {...rest}>\n {children}\n </Comp>\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n"],"names":["composeClassName","theme","accessible","transparent","extra","parts","ThemeRoot","forwardRef","asChild","className","children","rest","ref","merged","jsx","Slot"],"mappings":";;;AAwDA,SAASA,EACPC,GACAC,GACAC,GACAC,GACQ;AACR,QAAMC,IAAQ,CAACJ,MAAU,SAAS,eAAe,aAAa;AAC9D,SAAIC,KAAYG,EAAM,KAAK,kBAAkB,GAKzCF,KAAaE,EAAM,KAAK,aAAa,GACrCD,KAAOC,EAAM,KAAKD,CAAK,GACpBC,EAAM,KAAK,GAAG;AACvB;AAEO,MAAMC,IAAYC;AAAA,EACvB,CACE;AAAA,IACE,OAAAN,IAAQ;AAAA,IACR,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,SAAAK,IAAU;AAAA,IACV,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAASb,EAAiBC,GAAOC,GAAYC,GAAaM,CAAS;AAEzE,WACE,gBAAAK,EAFWN,IAAUO,IAAO,SAEtB,KAAAH,GAAU,WAAWC,GAAQ,kBAAe,cAAc,GAAGF,GAChE,UAAAD,EAAA,CACH;AAAA,EAEJ;AACF;AACAJ,EAAU,cAAc;"}
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/carousel.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAaL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAWlE,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,8CAA8C;IAC9C,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,yBAAyB;IACzB,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,kDAAkD;IAClD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,aACf,SACE,IAAI,CAAC,wBAAwB,CAAC,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wB,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,EACrD,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iFAAiF;IACjF,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,yEAAyE;IACzE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC;IACjC,sEAAsE;IACtE,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACxE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IAC1E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAMD,QAAA,MAAM,YAAY;;8EAYjB,CAAC;AA8mBF,eAAO,MAAM,QAAQ;;;;CAInB,CAAC"}
|
|
@@ -5,6 +5,17 @@ export interface ThemeRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
5
5
|
theme?: ThemeBase;
|
|
6
6
|
/** Layer the AAA `theme-accessible` modifier on top of the base. */
|
|
7
7
|
accessible?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the wrapper should be transparent to layout (`display:
|
|
10
|
+
* contents`). Defaults to `true` so the wrapper does not become a
|
|
11
|
+
* containing block for sticky / fixed descendants. Set `false` to
|
|
12
|
+
* render a real layout box (the pre-0.18.0 behaviour).
|
|
13
|
+
*
|
|
14
|
+
* Note: when `asChild` is set, the consumer's element receives this
|
|
15
|
+
* class. If the consumer's element relies on its own layout box,
|
|
16
|
+
* pass `transparent={false}`.
|
|
17
|
+
*/
|
|
18
|
+
transparent?: boolean;
|
|
8
19
|
/**
|
|
9
20
|
* When true, merges the theme classes onto the single child element
|
|
10
21
|
* instead of rendering a wrapping `<div>`. Useful when the theme root
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-root.d.ts","sourceRoot":"","sources":["../../../src/components/theme-root/theme-root.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-root.d.ts","sourceRoot":"","sources":["../../../src/components/theme-root/theme-root.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGxD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAmBD,eAAO,MAAM,SAAS,2GAqBrB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ import { A as Ie, g as Re, n as ke } from "./_chunks/avatar-I10iCDs8.js";
|
|
|
43
43
|
import { B as Ee } from "./_chunks/badge-cLYVGlMh.js";
|
|
44
44
|
import { B as Ne } from "./_chunks/benefit-card-DXmrAyfn.js";
|
|
45
45
|
import { C as Be } from "./_chunks/card-CWzuTLYE.js";
|
|
46
|
-
import { C as we, c as Ve } from "./_chunks/carousel.agent-
|
|
46
|
+
import { C as we, c as Ve } from "./_chunks/carousel.agent-CQPFfppK.js";
|
|
47
47
|
import { C as ve } from "./_chunks/contact-card-DTQUMetD.js";
|
|
48
48
|
import { A as Oe, B as _e, C as Ge, a as We, D as Ue, b as Ke, L as Ye, S as je, T as ze, c as qe, d as Qe, e as Je, U as Xe, f as Ze, u as $e } from "./_chunks/balance-cell-renderer-DJB6WDPe.js";
|
|
49
49
|
import { D as er } from "./_chunks/description-list-y7Hk51KI.js";
|
|
@@ -107,7 +107,7 @@ import { C as Zs, a as $s, b as an, c as en } from "./_chunks/collapsible-hHiyZp
|
|
|
107
107
|
import { H as on, P as tn, a as sn, R as nn, r as pn, u as mn } from "./_chunks/resizable-COV-cnth.js";
|
|
108
108
|
import { S as fn, a as dn, b as cn, c as gn, d as xn, e as un } from "./_chunks/scroll-area-DEDU-lp-.js";
|
|
109
109
|
import { S as Sn } from "./_chunks/separator-CYU_bGFn.js";
|
|
110
|
-
import { T as Tn } from "./_chunks/theme-root-
|
|
110
|
+
import { T as Tn } from "./_chunks/theme-root-BOO73p5t.js";
|
|
111
111
|
import { V as Pn } from "./_chunks/visually-hidden-BHxEUGyT.js";
|
|
112
112
|
import { C as In, c as Rn, a as kn } from "./_chunks/chart-BLvFl169.js";
|
|
113
113
|
import { A as En, a as Fn } from "./_chunks/ai-prompt-input-B-w5Rx3V.js";
|
|
@@ -133,7 +133,7 @@ import { T as Xi } from "./_chunks/transaction-chip-z9ENE50O.js";
|
|
|
133
133
|
import { W as $i } from "./_chunks/whatsapp-button-Bj5FIhpC.js";
|
|
134
134
|
import { C as ep, W as rp, a as op, b as tp, c as sp, i as np, l as ip, m as pp, r as mp, w as lp, d as fp, e as dp, f as cp } from "./_chunks/workflow-map-BeKe23uw.js";
|
|
135
135
|
import { L as xp, a as up, b as Ap, c as Sp } from "./_chunks/leo-sidebar-DIsiTju3.js";
|
|
136
|
-
import { P as Tp } from "./_chunks/patient-shell-
|
|
136
|
+
import { P as Tp } from "./_chunks/patient-shell-Dr64lBp_.js";
|
|
137
137
|
import { Root as Pp } from "@radix-ui/react-aspect-ratio";
|
|
138
138
|
export {
|
|
139
139
|
p as ACCESSIBILITY_STORAGE_KEY,
|