@alfadocs/ui-kit-debug 1.101.0 → 1.103.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/{agenda-card-bRQ4j6U6.js → agenda-card-B8hV3dZV.js} +2 -2
- package/dist/_chunks/{agenda-card-bRQ4j6U6.js.map → agenda-card-B8hV3dZV.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-CzE3E8GU.js → agenda-tray-Bu46s3dI.js} +2 -2
- package/dist/_chunks/{agenda-tray-CzE3E8GU.js.map → agenda-tray-Bu46s3dI.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-B5mu44g2.js → alia-sidebar-CKkg3gc8.js} +3 -3
- package/dist/_chunks/{alia-sidebar-B5mu44g2.js.map → alia-sidebar-CKkg3gc8.js.map} +1 -1
- package/dist/_chunks/{appointment-card-zPr0brha.js → appointment-card-FKOnH1uJ.js} +2 -2
- package/dist/_chunks/{appointment-card-zPr0brha.js.map → appointment-card-FKOnH1uJ.js.map} +1 -1
- package/dist/_chunks/{appointment-peek-xFTBany4.js → appointment-peek-DWfcpoGy.js} +2 -2
- package/dist/_chunks/{appointment-peek-xFTBany4.js.map → appointment-peek-DWfcpoGy.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-AKkVx9AN.js → appointment-timeline-eOi-y8m3.js} +2 -2
- package/dist/_chunks/{appointment-timeline-AKkVx9AN.js.map → appointment-timeline-eOi-y8m3.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-B8qQBW65.js → appointment-tray-C6oBvsG5.js} +2 -2
- package/dist/_chunks/{appointment-tray-B8qQBW65.js.map → appointment-tray-C6oBvsG5.js.map} +1 -1
- package/dist/_chunks/{avatar-BoqdWsNe.js → avatar-Dp5apm1d.js} +61 -47
- package/dist/_chunks/{avatar-BoqdWsNe.js.map → avatar-Dp5apm1d.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-C-Rz616n.js → balance-badge-cell-DGFm2jfP.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-C-Rz616n.js.map → balance-badge-cell-DGFm2jfP.js.map} +1 -1
- package/dist/_chunks/{calendar-DVe5eArk.js → calendar-_sgjuH3L.js} +2 -2
- package/dist/_chunks/{calendar-DVe5eArk.js.map → calendar-_sgjuH3L.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-CUJMnFL7.js → calendar-appointment-editor-dialog-DL6V6xfj.js} +8 -8
- package/dist/_chunks/{calendar-appointment-editor-dialog-CUJMnFL7.js.map → calendar-appointment-editor-dialog-DL6V6xfj.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-BBh0X7EO.js → care-plan-header-F4l0st2X.js} +2 -2
- package/dist/_chunks/{care-plan-header-BBh0X7EO.js.map → care-plan-header-F4l0st2X.js.map} +1 -1
- package/dist/_chunks/{chat-message-CkBCAcwn.js → chat-message-CfIyXrxA.js} +2 -2
- package/dist/_chunks/{chat-message-CkBCAcwn.js.map → chat-message-CfIyXrxA.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card--juv_ELr.js → clinical-note-card-BVkxGiGl.js} +2 -2
- package/dist/_chunks/{clinical-note-card--juv_ELr.js.map → clinical-note-card-BVkxGiGl.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-CFAhByRk.js → contact-profile-card-LXbmhx48.js} +141 -141
- package/dist/_chunks/contact-profile-card-LXbmhx48.js.map +1 -0
- package/dist/_chunks/{dependent-selector-DRN0P0Kr.js → dependent-selector-D6y4Kjg5.js} +2 -2
- package/dist/_chunks/{dependent-selector-DRN0P0Kr.js.map → dependent-selector-D6y4Kjg5.js.map} +1 -1
- package/dist/_chunks/{entity-summary-B4p8zP1J.js → entity-summary-BKfR4Vws.js} +2 -2
- package/dist/_chunks/{entity-summary-B4p8zP1J.js.map → entity-summary-BKfR4Vws.js.map} +1 -1
- package/dist/_chunks/key-value-pair-Cg7gjL7J.js +287 -0
- package/dist/_chunks/key-value-pair-Cg7gjL7J.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-DKMgD-2v.js → link-cell-renderer-BRek9kz7.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-DKMgD-2v.js.map → link-cell-renderer-BRek9kz7.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-D2qgIuXX.js → marketplace-app-shell-BsctSegT.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-D2qgIuXX.js.map → marketplace-app-shell-BsctSegT.js.map} +1 -1
- package/dist/_chunks/{message-card-BzJEITml.js → message-card-BG3_3nN1.js} +2 -2
- package/dist/_chunks/{message-card-BzJEITml.js.map → message-card-BG3_3nN1.js.map} +1 -1
- package/dist/_chunks/{message-tray-DiPgJbOb.js → message-tray-BjZv0Fsk.js} +2 -2
- package/dist/_chunks/{message-tray-DiPgJbOb.js.map → message-tray-BjZv0Fsk.js.map} +1 -1
- package/dist/_chunks/{notes-panel-BbNLYcdv.js → notes-panel-BjTpaz8d.js} +2 -2
- package/dist/_chunks/{notes-panel-BbNLYcdv.js.map → notes-panel-BjTpaz8d.js.map} +1 -1
- package/dist/_chunks/{operator-hero-BcuPTzS_.js → operator-hero-BELhrv9o.js} +37 -35
- package/dist/_chunks/{operator-hero-BcuPTzS_.js.map → operator-hero-BELhrv9o.js.map} +1 -1
- package/dist/_chunks/{patient-details-DoIOWP6j.js → patient-details-BXM3dRKb.js} +2 -2
- package/dist/_chunks/{patient-details-DoIOWP6j.js.map → patient-details-BXM3dRKb.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-CL04aq8h.js → patient-summary-card-B4Ijw_ig.js} +3 -3
- package/dist/_chunks/{patient-summary-card-CL04aq8h.js.map → patient-summary-card-B4Ijw_ig.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-BbpN8GQg.js → payment-request-card-CrXhB5H-.js} +2 -2
- package/dist/_chunks/{payment-request-card-BbpN8GQg.js.map → payment-request-card-CrXhB5H-.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-Cw-ZsIls.js → periodontal-chart-JmsaYYb7.js} +2 -2
- package/dist/_chunks/{periodontal-chart-Cw-ZsIls.js.map → periodontal-chart-JmsaYYb7.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-CG8mxR62.js → periodontal-chart-card-TxZBO6kb.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CG8mxR62.js.map → periodontal-chart-card-TxZBO6kb.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-B8vykoci.js → practice-profile-hero-BAvGdQmt.js} +24 -20
- package/dist/_chunks/{practice-profile-hero-B8vykoci.js.map → practice-profile-hero-BAvGdQmt.js.map} +1 -1
- package/dist/_chunks/{practice-results-U-5kpnJa.js → practice-results-ChBP9x2r.js} +8 -4
- package/dist/_chunks/practice-results-ChBP9x2r.js.map +1 -0
- package/dist/_chunks/{public-footer-t6gx6sjn.js → public-footer-3Jy1zHSs.js} +248 -204
- package/dist/_chunks/public-footer-3Jy1zHSs.js.map +1 -0
- package/dist/_chunks/{signature-request-CQ0torGq.js → signature-request-DB6kePIm.js} +2 -2
- package/dist/_chunks/{signature-request-CQ0torGq.js.map → signature-request-DB6kePIm.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-BcQE00H1.js → signed-out-frame-Bs_LSPWe.js} +2 -2
- package/dist/_chunks/{signed-out-frame-BcQE00H1.js.map → signed-out-frame-Bs_LSPWe.js.map} +1 -1
- package/dist/_chunks/{specialty-icon-KuovHTxh.js → specialty-icon-BkpExzMh.js} +2 -1
- package/dist/_chunks/{specialty-icon-KuovHTxh.js.map → specialty-icon-BkpExzMh.js.map} +1 -1
- package/dist/_chunks/specialty-list-BzalHR8_.js +100 -0
- package/dist/_chunks/specialty-list-BzalHR8_.js.map +1 -0
- package/dist/_chunks/{timeline-tn5QQJdS.js → timeline-CKUaBZOx.js} +2 -2
- package/dist/_chunks/{timeline-tn5QQJdS.js.map → timeline-CKUaBZOx.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-BbIoPWO6.js → use-appointment-details-read-DawTb1SQ.js} +4 -4
- package/dist/_chunks/{use-appointment-details-read-BbIoPWO6.js.map → use-appointment-details-read-DawTb1SQ.js.map} +1 -1
- package/dist/_chunks/{workflow-map-k-dQkpe7.js → workflow-map-D_pyYK1B.js} +2 -2
- package/dist/_chunks/{workflow-map-k-dQkpe7.js.map → workflow-map-D_pyYK1B.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts +10 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts +9 -0
- package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/key-value-pair/index.d.ts +1 -1
- package/dist/components/key-value-pair/index.d.ts.map +1 -1
- package/dist/components/key-value-pair/index.js +3 -2
- package/dist/components/key-value-pair/key-value-pair.d.ts +20 -0
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/public-footer/index.d.ts +1 -1
- package/dist/components/public-footer/index.d.ts.map +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-footer/public-footer.d.ts +29 -0
- package/dist/components/public-footer/public-footer.d.ts.map +1 -1
- package/dist/components/specialty-icon/index.js +1 -1
- package/dist/components/specialty-icon/specialty-icon.d.ts.map +1 -1
- package/dist/components/specialty-list/index.js +1 -1
- package/dist/components/specialty-list/specialty-list.d.ts.map +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/index.js +865 -864
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/contact-profile-card-CFAhByRk.js.map +0 -1
- package/dist/_chunks/key-value-pair-BoXOtBL1.js +0 -195
- package/dist/_chunks/key-value-pair-BoXOtBL1.js.map +0 -1
- package/dist/_chunks/practice-results-U-5kpnJa.js.map +0 -1
- package/dist/_chunks/public-footer-t6gx6sjn.js.map +0 -1
- package/dist/_chunks/specialty-list-urUQJLk3.js +0 -67
- package/dist/_chunks/specialty-list-urUQJLk3.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { jsxs as d, jsx as e, Fragment as v } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as y } from "react";
|
|
3
3
|
import { c as H } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { A as S } from "./app-frame-DUPEwu4E.js";
|
|
5
|
-
import { P as x } from "./public-footer-
|
|
5
|
+
import { P as x } from "./public-footer-3Jy1zHSs.js";
|
|
6
6
|
import { useTranslation as b } from "react-i18next";
|
|
7
7
|
import { B as u } from "./button-DohK_Ak_.js";
|
|
8
8
|
import { H as N, g as O, f as F, a as z, d as B } from "./header-l_B8MV0g.js";
|
|
@@ -168,4 +168,4 @@ export {
|
|
|
168
168
|
V as S,
|
|
169
169
|
w as a
|
|
170
170
|
};
|
|
171
|
-
//# sourceMappingURL=signed-out-frame-
|
|
171
|
+
//# sourceMappingURL=signed-out-frame-Bs_LSPWe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signed-out-frame-BcQE00H1.js","sources":["../../src/patterns/signed-out-frame/signed-out-header.tsx","../../src/patterns/signed-out-frame/signed-out-frame.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* SignedOutHeader — the app's Header as a visitor sees it before */\n/* sign-in: the brand, the skip link and the way to the other */\n/* signed-out pages. No search, inbox or account menu. */\n/* */\n/* A link shows only when the host gives its address. On the login page */\n/* that is the two ways to register; on a registration page it is the */\n/* way back to the login. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { LogIn, Stethoscope, User } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../../components/button';\nimport {\n Header,\n HeaderBrand,\n HeaderEnd,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { Logo } from '../../components/logo';\nimport { isSafeHref } from '../../components/_shared/safe-href';\n\nexport interface SignedOutHeaderProps {\n /** Where the brand leads. Default `/`. */\n homeHref?: string;\n /** The id of the `<main>` the skip link lands on. Default\n * `main-content`, `AppFrame`'s own default. */\n mainId?: string;\n /**\n * Adds \"Sign in\". For a registration page. A path on the same site, or\n * an address written in full (`https://…`); anything else shows no\n * link. The same rule holds for the two addresses below.\n */\n loginHref?: string;\n /** Adds \"Register as a doctor\". For the login page. */\n registerDoctorHref?: string;\n /** Adds \"Register as a patient\". For the login page. */\n registerPatientHref?: string;\n}\n\n// The header's buttons are the header turned inside out: the bar's ink as\n// the fill, the bar's own colour (`--header-brand-surface`) as the text.\n// Light: white with violet text (4.75:1). Dark: the bar is the page's navy,\n// so the text is navy too; fuchsia on the cream fill would be 2.75:1.\n//\n// Hover tints the fill with the bar. In the light theme that alone would\n// drop the violet text to 4.07:1, so the text deepens with it (4.76:1):\n// `--header-brand-surface-hover` is --primary-hover in light and stays the\n// navy in dark. The buttons carry no `--secondary-border` edge: the fill is\n// already the bar's ink.\n//\n// A small button is 32px tall from `sm` up and drops its wider hit box\n// there. These keep the hit box at every width: the bar is 64px tall, and\n// a tablet is touched as much as a phone.\nconst linksVariants = cva(\n 'ds:items-center ds:gap-[var(--spacing-sm)] ds:[--secondary:var(--header-foreground)] ds:[--secondary-hover:color-mix(in_srgb,var(--header-foreground)_88%,transparent)] ds:[--secondary-border:transparent] ds:[--secondary-foreground:var(--header-brand-surface,var(--primary))] ds:[&_a:hover]:[--secondary-foreground:var(--header-brand-surface-hover,var(--primary-hover))] ds:[&_a]:sm:before:block',\n {\n variants: {\n /** Labelled buttons from `md` up; icons only below it. */\n show: {\n wide: 'ds:hidden ds:md:inline-flex',\n narrow: 'ds:inline-flex ds:md:hidden',\n always: 'ds:inline-flex',\n },\n },\n defaultVariants: { show: 'always' },\n },\n);\n\n/** An address a link may use, or nothing. */\nconst linkTo = (href: string | undefined): string | undefined =>\n href && isSafeHref(href) ? href : undefined;\n\ninterface RegisterLinksProps {\n doctorHref: string | undefined;\n patientHref: string | undefined;\n hideLabel?: boolean;\n}\n\n/** The ways to open an account. Links, not buttons: each goes to its own\n * registration page. */\nfunction RegisterLinks({\n doctorHref,\n patientHref,\n hideLabel = false,\n}: RegisterLinksProps) {\n const { t } = useTranslation('ui');\n return (\n <>\n {doctorHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<Stethoscope />}\n hideLabel={hideLabel}\n >\n <a href={doctorHref} data-action=\"register-doctor\">\n {t('signedOutHeader.registerDoctor')}\n </a>\n </Button>\n )}\n {patientHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<User />}\n hideLabel={hideLabel}\n >\n <a href={patientHref} data-action=\"register-patient\">\n {t('signedOutHeader.registerPatient')}\n </a>\n </Button>\n )}\n </>\n );\n}\n\n/**\n * The signed-out header. `SignedOutFrame` renders it; use it on its own\n * only with a frame of your own.\n */\nexport const SignedOutHeader = forwardRef<HTMLElement, SignedOutHeaderProps>(\n (\n {\n homeHref = '/',\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const loginLink = linkTo(loginHref);\n const doctorLink = linkTo(registerDoctorHref);\n const patientLink = linkTo(registerPatientHref);\n const hasRegister = Boolean(doctorLink || patientLink);\n\n return (\n <Header ref={ref}>\n <HeaderStart>\n <HeaderSkipLink href={`#${mainId}`} />\n <HeaderBrand\n href={linkTo(homeHref) ?? '/'}\n logo={<Logo variant=\"monochrome\" size=\"md\" decorative />}\n aria-label={t('publicHeader.homeLabel')}\n />\n </HeaderStart>\n {(loginLink || hasRegister) && (\n <HeaderEnd>\n {/* One short label: it keeps its text on a phone. */}\n {loginLink && (\n <div className={linksVariants()}>\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<LogIn />}\n >\n <a href={loginLink} data-action=\"login\">\n {t('signedOutHeader.login')}\n </a>\n </Button>\n </div>\n )}\n {/* Two labelled buttons and the brand do not fit a phone, so\n below `md` each folds to its icon and keeps its name for a\n screen reader. */}\n {hasRegister && (\n <>\n <div className={linksVariants({ show: 'wide' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n />\n </div>\n <div className={linksVariants({ show: 'narrow' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n hideLabel\n />\n </div>\n </>\n )}\n </HeaderEnd>\n )}\n </Header>\n );\n },\n);\nSignedOutHeader.displayName = 'SignedOutHeader';\n","/* -------------------------------------------------------------------- */\n/* SignedOutFrame — the app frame as a visitor sees it before sign-in. */\n/* */\n/* The signed-out header on top, no sidebar, the page's content centred */\n/* on the app's canvas, and the minimal footer with the privacy policy */\n/* and the terms. The login, forgot-password and registration pages */\n/* wear it, so they read as one family. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { AppFrame } from '../../components/app-frame';\nimport {\n PublicFooter,\n type LegalUrlOverrides,\n} from '../../components/public-footer';\nimport {\n SignedOutHeader,\n type SignedOutHeaderProps,\n} from './signed-out-header';\n\nexport interface SignedOutFrameProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n SignedOutHeaderProps {\n /** The page: a card such as `LoginForm`, centred in `<main>`. */\n children: ReactNode;\n /** Shows the footer with the privacy policy and the terms. Default\n * true. */\n showFooter?: boolean;\n /**\n * Adds the footer's copyright line: the year, the company's registered\n * name and its VAT number. Default false.\n */\n showCopyright?: boolean;\n /** The site the footer's legal links lead to. Default: the footer's\n * own, `https://www.alfadocs.com`. */\n marketingBaseUrl?: string;\n /** The footer's legal links, per language, where they differ from its\n * defaults. */\n legalUrlOverrides?: LegalUrlOverrides;\n}\n\n// The wrapper is only a marker: the frame inside it is the box. It has\n// no box of its own (`display: contents`), so a `className` that sizes or\n// spaces it does nothing, and a ref to it measures nothing.\nconst signedOutFrameVariants = cva('ds:contents');\n\n/**\n * The signed-out app frame. It is one viewport tall: the header and the\n * footer stay put and the content scrolls between them.\n */\nexport const SignedOutFrame = forwardRef<HTMLDivElement, SignedOutFrameProps>(\n (\n {\n children,\n homeHref,\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n showFooter = true,\n showCopyright = false,\n marketingBaseUrl,\n legalUrlOverrides,\n className,\n ...rest\n },\n ref,\n ) => (\n <div\n ref={ref}\n {...rest}\n data-component=\"signed-out-frame\"\n className={signedOutFrameVariants({ className })}\n >\n {/* `<main>` is a size container, so the content can be exactly as\n tall as the space between the header and the footer (`100cqh`)\n and centre in it, whatever height the footer wraps to on a\n phone. */}\n <AppFrame\n header={\n <SignedOutHeader\n homeHref={homeHref}\n mainId={mainId}\n loginHref={loginHref}\n registerDoctorHref={registerDoctorHref}\n registerPatientHref={registerPatientHref}\n />\n }\n sidebar={null}\n footer={\n showFooter ? (\n <PublicFooter\n variant=\"minimal\"\n showCopyright={showCopyright}\n marketingBaseUrl={marketingBaseUrl}\n legalUrlOverrides={legalUrlOverrides}\n />\n ) : undefined\n }\n mainId={mainId}\n padded={false}\n mainClassName=\"ds:bg-[color:var(--app-shell-background)] ds:[container-type:size]\"\n >\n <div className=\"ds:flex ds:min-h-[100cqh] ds:w-full ds:items-center ds:justify-center ds:p-0 ds:sm:p-[var(--spacing-lg)]\">\n {children}\n </div>\n </AppFrame>\n </div>\n ),\n);\nSignedOutFrame.displayName = 'SignedOutFrame';\n"],"names":["linksVariants","cva","linkTo","href","isSafeHref","RegisterLinks","doctorHref","patientHref","hideLabel","t","useTranslation","jsxs","Fragment","jsx","Button","Stethoscope","User","SignedOutHeader","forwardRef","homeHref","mainId","loginHref","registerDoctorHref","registerPatientHref","ref","loginLink","doctorLink","patientLink","hasRegister","Header","HeaderStart","HeaderSkipLink","HeaderBrand","Logo","HeaderEnd","LogIn","signedOutFrameVariants","SignedOutFrame","children","showFooter","showCopyright","marketingBaseUrl","legalUrlOverrides","className","rest","AppFrame","PublicFooter"],"mappings":";;;;;;;;;;;;;AAyDA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA,MAER,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,E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","../../src/patterns/signed-out-frame/signed-out-frame.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* SignedOutHeader — the app's Header as a visitor sees it before */\n/* sign-in: the brand, the skip link and the way to the other */\n/* signed-out pages. No search, inbox or account menu. */\n/* */\n/* A link shows only when the host gives its address. On the login page */\n/* that is the two ways to register; on a registration page it is the */\n/* way back to the login. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { LogIn, Stethoscope, User } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../../components/button';\nimport {\n Header,\n HeaderBrand,\n HeaderEnd,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { Logo } from '../../components/logo';\nimport { isSafeHref } from '../../components/_shared/safe-href';\n\nexport interface SignedOutHeaderProps {\n /** Where the brand leads. Default `/`. */\n homeHref?: string;\n /** The id of the `<main>` the skip link lands on. Default\n * `main-content`, `AppFrame`'s own default. */\n mainId?: string;\n /**\n * Adds \"Sign in\". For a registration page. A path on the same site, or\n * an address written in full (`https://…`); anything else shows no\n * link. The same rule holds for the two addresses below.\n */\n loginHref?: string;\n /** Adds \"Register as a doctor\". For the login page. */\n registerDoctorHref?: string;\n /** Adds \"Register as a patient\". For the login page. */\n registerPatientHref?: string;\n}\n\n// The header's buttons are the header turned inside out: the bar's ink as\n// the fill, the bar's own colour (`--header-brand-surface`) as the text.\n// Light: white with violet text (4.75:1). Dark: the bar is the page's navy,\n// so the text is navy too; fuchsia on the cream fill would be 2.75:1.\n//\n// Hover tints the fill with the bar. In the light theme that alone would\n// drop the violet text to 4.07:1, so the text deepens with it (4.76:1):\n// `--header-brand-surface-hover` is --primary-hover in light and stays the\n// navy in dark. The buttons carry no `--secondary-border` edge: the fill is\n// already the bar's ink.\n//\n// A small button is 32px tall from `sm` up and drops its wider hit box\n// there. These keep the hit box at every width: the bar is 64px tall, and\n// a tablet is touched as much as a phone.\nconst linksVariants = cva(\n 'ds:items-center ds:gap-[var(--spacing-sm)] ds:[--secondary:var(--header-foreground)] ds:[--secondary-hover:color-mix(in_srgb,var(--header-foreground)_88%,transparent)] ds:[--secondary-border:transparent] ds:[--secondary-foreground:var(--header-brand-surface,var(--primary))] ds:[&_a:hover]:[--secondary-foreground:var(--header-brand-surface-hover,var(--primary-hover))] ds:[&_a]:sm:before:block',\n {\n variants: {\n /** Labelled buttons from `md` up; icons only below it. */\n show: {\n wide: 'ds:hidden ds:md:inline-flex',\n narrow: 'ds:inline-flex ds:md:hidden',\n always: 'ds:inline-flex',\n },\n },\n defaultVariants: { show: 'always' },\n },\n);\n\n/** An address a link may use, or nothing. */\nconst linkTo = (href: string | undefined): string | undefined =>\n href && isSafeHref(href) ? href : undefined;\n\ninterface RegisterLinksProps {\n doctorHref: string | undefined;\n patientHref: string | undefined;\n hideLabel?: boolean;\n}\n\n/** The ways to open an account. Links, not buttons: each goes to its own\n * registration page. */\nfunction RegisterLinks({\n doctorHref,\n patientHref,\n hideLabel = false,\n}: RegisterLinksProps) {\n const { t } = useTranslation('ui');\n return (\n <>\n {doctorHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<Stethoscope />}\n hideLabel={hideLabel}\n >\n <a href={doctorHref} data-action=\"register-doctor\">\n {t('signedOutHeader.registerDoctor')}\n </a>\n </Button>\n )}\n {patientHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<User />}\n hideLabel={hideLabel}\n >\n <a href={patientHref} data-action=\"register-patient\">\n {t('signedOutHeader.registerPatient')}\n </a>\n </Button>\n )}\n </>\n );\n}\n\n/**\n * The signed-out header. `SignedOutFrame` renders it; use it on its own\n * only with a frame of your own.\n */\nexport const SignedOutHeader = forwardRef<HTMLElement, SignedOutHeaderProps>(\n (\n {\n homeHref = '/',\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const loginLink = linkTo(loginHref);\n const doctorLink = linkTo(registerDoctorHref);\n const patientLink = linkTo(registerPatientHref);\n const hasRegister = Boolean(doctorLink || patientLink);\n\n return (\n <Header ref={ref}>\n <HeaderStart>\n <HeaderSkipLink href={`#${mainId}`} />\n <HeaderBrand\n href={linkTo(homeHref) ?? '/'}\n logo={<Logo variant=\"monochrome\" size=\"md\" decorative />}\n aria-label={t('publicHeader.homeLabel')}\n />\n </HeaderStart>\n {(loginLink || hasRegister) && (\n <HeaderEnd>\n {/* One short label: it keeps its text on a phone. */}\n {loginLink && (\n <div className={linksVariants()}>\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<LogIn />}\n >\n <a href={loginLink} data-action=\"login\">\n {t('signedOutHeader.login')}\n </a>\n </Button>\n </div>\n )}\n {/* Two labelled buttons and the brand do not fit a phone, so\n below `md` each folds to its icon and keeps its name for a\n screen reader. */}\n {hasRegister && (\n <>\n <div className={linksVariants({ show: 'wide' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n />\n </div>\n <div className={linksVariants({ show: 'narrow' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n hideLabel\n />\n </div>\n </>\n )}\n </HeaderEnd>\n )}\n </Header>\n );\n },\n);\nSignedOutHeader.displayName = 'SignedOutHeader';\n","/* -------------------------------------------------------------------- */\n/* SignedOutFrame — the app frame as a visitor sees it before sign-in. */\n/* */\n/* The signed-out header on top, no sidebar, the page's content centred */\n/* on the app's canvas, and the minimal footer with the privacy policy */\n/* and the terms. The login, forgot-password and registration pages */\n/* wear it, so they read as one family. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { AppFrame } from '../../components/app-frame';\nimport {\n PublicFooter,\n type LegalUrlOverrides,\n} from '../../components/public-footer';\nimport {\n SignedOutHeader,\n type SignedOutHeaderProps,\n} from './signed-out-header';\n\nexport interface SignedOutFrameProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n SignedOutHeaderProps {\n /** The page: a card such as `LoginForm`, centred in `<main>`. */\n children: ReactNode;\n /** Shows the footer with the privacy policy and the terms. Default\n * true. */\n showFooter?: boolean;\n /**\n * Adds the footer's copyright line: the year, the company's registered\n * name and its VAT number. Default false.\n */\n showCopyright?: boolean;\n /** The site the footer's legal links lead to. Default: the footer's\n * own, `https://www.alfadocs.com`. */\n marketingBaseUrl?: string;\n /** The footer's legal links, per language, where they differ from its\n * defaults. */\n legalUrlOverrides?: LegalUrlOverrides;\n}\n\n// The wrapper is only a marker: the frame inside it is the box. It has\n// no box of its own (`display: contents`), so a `className` that sizes or\n// spaces it does nothing, and a ref to it measures nothing.\nconst signedOutFrameVariants = cva('ds:contents');\n\n/**\n * The signed-out app frame. It is one viewport tall: the header and the\n * footer stay put and the content scrolls between them.\n */\nexport const SignedOutFrame = forwardRef<HTMLDivElement, SignedOutFrameProps>(\n (\n {\n children,\n homeHref,\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n showFooter = true,\n showCopyright = false,\n marketingBaseUrl,\n legalUrlOverrides,\n className,\n ...rest\n },\n ref,\n ) => (\n <div\n ref={ref}\n {...rest}\n data-component=\"signed-out-frame\"\n className={signedOutFrameVariants({ className })}\n >\n {/* `<main>` is a size container, so the content can be exactly as\n tall as the space between the header and the footer (`100cqh`)\n and centre in it, whatever height the footer wraps to on a\n phone. */}\n <AppFrame\n header={\n <SignedOutHeader\n homeHref={homeHref}\n mainId={mainId}\n loginHref={loginHref}\n registerDoctorHref={registerDoctorHref}\n registerPatientHref={registerPatientHref}\n />\n }\n sidebar={null}\n footer={\n showFooter ? (\n <PublicFooter\n variant=\"minimal\"\n showCopyright={showCopyright}\n marketingBaseUrl={marketingBaseUrl}\n legalUrlOverrides={legalUrlOverrides}\n />\n ) : undefined\n }\n mainId={mainId}\n padded={false}\n mainClassName=\"ds:bg-[color:var(--app-shell-background)] ds:[container-type:size]\"\n >\n <div className=\"ds:flex ds:min-h-[100cqh] ds:w-full ds:items-center ds:justify-center ds:p-0 ds:sm:p-[var(--spacing-lg)]\">\n {children}\n </div>\n </AppFrame>\n </div>\n ),\n);\nSignedOutFrame.displayName = 'SignedOutFrame';\n"],"names":["linksVariants","cva","linkTo","href","isSafeHref","RegisterLinks","doctorHref","patientHref","hideLabel","t","useTranslation","jsxs","Fragment","jsx","Button","Stethoscope","User","SignedOutHeader","forwardRef","homeHref","mainId","loginHref","registerDoctorHref","registerPatientHref","ref","loginLink","doctorLink","patientLink","hasRegister","Header","HeaderStart","HeaderSkipLink","HeaderBrand","Logo","HeaderEnd","LogIn","signedOutFrameVariants","SignedOutFrame","children","showFooter","showCopyright","marketingBaseUrl","legalUrlOverrides","className","rest","AppFrame","PublicFooter"],"mappings":";;;;;;;;;;;;;AAyDA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA,MAER,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,EAAE,MAAM,SAAA;AAAA,EAAS;AAEtC,GAGMC,IAAS,CAACC,MACdA,KAAQC,EAAWD,CAAI,IAAIA,IAAO;AAUpC,SAASE,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI;AACjC,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAN,KACC,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAO;AAAA,QACP,QAAO;AAAA,QACP,MAAK;AAAA,QACL,6BAAYC,GAAA,EAAY;AAAA,QACxB,WAAAP;AAAA,QAEA,UAAA,gBAAAK,EAAC,OAAE,MAAMP,GAAY,eAAY,mBAC9B,UAAAG,EAAE,gCAAgC,EAAA,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AAAO,GAAW;AAAA,MAM/C,UAAA,gBAAA9B;AAAA,QAACgC;AAAA,QAAA;AAAA,UACC,QACE,gBAAAhC;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,UAAAE;AAAA,cACA,QAAAC;AAAA,cACA,WAAAC;AAAA,cACA,oBAAAC;AAAA,cACA,qBAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,UAGJ,SAAS;AAAA,UACT,QACEgB,IACE,gBAAA1B;AAAA,YAACiC;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,eAAAN;AAAA,cACA,kBAAAC;AAAA,cACA,mBAAAC;AAAA,YAAA;AAAA,UAAA,IAEA;AAAA,UAEN,QAAAtB;AAAA,UACA,QAAQ;AAAA,UACR,eAAc;AAAA,UAEd,UAAA,gBAAAP,EAAC,OAAA,EAAI,WAAU,4GACZ,UAAAyB,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;AACAD,EAAe,cAAc;"}
|
|
@@ -261,6 +261,7 @@ const R = C(
|
|
|
261
261
|
"svg",
|
|
262
262
|
{
|
|
263
263
|
focusable: "false",
|
|
264
|
+
"data-slot": "ring",
|
|
264
265
|
className: "ds:absolute ds:inset-[calc(var(--border-width-sm)/2)] ds:size-[calc(100%-var(--border-width-sm))] ds:overflow-visible",
|
|
265
266
|
children: [
|
|
266
267
|
/* @__PURE__ */ r("defs", { children: /* @__PURE__ */ a("linearGradient", { id: m, x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
@@ -335,4 +336,4 @@ export {
|
|
|
335
336
|
R as c,
|
|
336
337
|
P as r
|
|
337
338
|
};
|
|
338
|
-
//# sourceMappingURL=specialty-icon-
|
|
339
|
+
//# sourceMappingURL=specialty-icon-BkpExzMh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specialty-icon-KuovHTxh.js","sources":["../../src/components/specialty-icon/glyph-loaders.ts","../../src/components/specialty-icon/specialty-map.ts","../../src/components/specialty-icon/specialty-icon.tsx"],"sourcesContent":["// Generated by scripts/build-specialty-icons.mjs. Do not edit by hand.\n// Glyph artwork: Healthicons, CC0 1.0 Universal (public domain).\n// https://github.com/resolvetosavelives/healthicons\nimport type { SpecialtyGlyph } from './specialty-glyph';\n\n/** One dynamic import per glyph, so a page only downloads what it renders. */\nexport const SPECIALTY_GLYPH_LOADERS = {\n 'acupuncture-1': () => import('./glyphs/acupuncture-1'),\n allergies: () => import('./glyphs/allergies'),\n antibody: () => import('./glyphs/antibody'),\n anus: () => import('./glyphs/anus'),\n 'blood-cells': () => import('./glyphs/blood-cells'),\n 'blood-vessel': () => import('./glyphs/blood-vessel'),\n braces: () => import('./glyphs/braces'),\n breast: () => import('./glyphs/breast'),\n cardiology: () => import('./glyphs/cardiology'),\n 'child-cognition': () => import('./glyphs/child-cognition'),\n 'dental-hygiene': () => import('./glyphs/dental-hygiene'),\n dermatology: () => import('./glyphs/dermatology'),\n diabetes: () => import('./glyphs/diabetes'),\n dna: () => import('./glyphs/dna'),\n doctor: () => import('./glyphs/doctor'),\n 'ears-nose-and-throat': () => import('./glyphs/ears-nose-and-throat'),\n 'eco-care': () => import('./glyphs/eco-care'),\n exercise: () => import('./glyphs/exercise'),\n eyeglasses: () => import('./glyphs/eyeglasses'),\n foot: () => import('./glyphs/foot'),\n fruits: () => import('./glyphs/fruits'),\n 'general-surgery': () => import('./glyphs/general-surgery'),\n geriatrics: () => import('./glyphs/geriatrics'),\n 'group-discussion-meeting': () => import('./glyphs/group-discussion-meeting'),\n gym: () => import('./glyphs/gym'),\n gynecology: () => import('./glyphs/gynecology'),\n head: () => import('./glyphs/head'),\n 'health-cross': () => import('./glyphs/health-cross'),\n 'health-worker': () => import('./glyphs/health-worker'),\n 'heart-organ': () => import('./glyphs/heart-organ'),\n hepatology: () => import('./glyphs/hepatology'),\n justice: () => import('./glyphs/justice'),\n 'liquid-medicine': () => import('./glyphs/liquid-medicine'),\n lungs: () => import('./glyphs/lungs'),\n 'lymph-nodes': () => import('./glyphs/lymph-nodes'),\n maxillofacial: () => import('./glyphs/maxillofacial'),\n 'mental-disorders': () => import('./glyphs/mental-disorders'),\n 'mental-health-therapy': () => import('./glyphs/mental-health-therapy'),\n microscope: () => import('./glyphs/microscope'),\n mouth: () => import('./glyphs/mouth'),\n nephrology: () => import('./glyphs/nephrology'),\n nerve: () => import('./glyphs/nerve'),\n 'neuro-surgery': () => import('./glyphs/neuro-surgery'),\n neurology: () => import('./glyphs/neurology'),\n nurse: () => import('./glyphs/nurse'),\n obstetricsmonia: () => import('./glyphs/obstetricsmonia'),\n odontology: () => import('./glyphs/odontology'),\n 'odontology-implant': () => import('./glyphs/odontology-implant'),\n oncology: () => import('./glyphs/oncology'),\n opthalmology: () => import('./glyphs/opthalmology'),\n orthopaedics: () => import('./glyphs/orthopaedics'),\n orthotics: () => import('./glyphs/orthotics'),\n pain: () => import('./glyphs/pain'),\n 'pediatric-surgery': () => import('./glyphs/pediatric-surgery'),\n pediatrics: () => import('./glyphs/pediatrics'),\n 'physical-therapy': () => import('./glyphs/physical-therapy'),\n poison: () => import('./glyphs/poison'),\n psychology: () => import('./glyphs/psychology'),\n radiology: () => import('./glyphs/radiology'),\n respirology: () => import('./glyphs/respirology'),\n rheumatology: () => import('./glyphs/rheumatology'),\n 'sexual-reproductive-health': () =>\n import('./glyphs/sexual-reproductive-health'),\n 'skin-layers': () => import('./glyphs/skin-layers'),\n sonography: () => import('./glyphs/sonography'),\n 'speech-language-therapist': () =>\n import('./glyphs/speech-language-therapist'),\n spine: () => import('./glyphs/spine'),\n stethoscope: () => import('./glyphs/stethoscope'),\n stitches: () => import('./glyphs/stitches'),\n stomach: () => import('./glyphs/stomach'),\n syringe: () => import('./glyphs/syringe'),\n testicles: () => import('./glyphs/testicles'),\n thyroid: () => import('./glyphs/thyroid'),\n tooth: () => import('./glyphs/tooth'),\n urology: () => import('./glyphs/urology'),\n 'varicose-vein': () => import('./glyphs/varicose-vein'),\n 'vascular-surgery': () => import('./glyphs/vascular-surgery'),\n vegetables: () => import('./glyphs/vegetables'),\n xray: () => import('./glyphs/xray'),\n} satisfies Record<string, () => Promise<{ default: SpecialtyGlyph }>>;\n\nexport type SpecialtyIconId = keyof typeof SPECIALTY_GLYPH_LOADERS;\n\nexport const SPECIALTY_ICON_IDS = Object.keys(\n SPECIALTY_GLYPH_LOADERS,\n) as SpecialtyIconId[];\n","// Generated by scripts/build-specialty-icons.mjs. Do not edit by hand.\n// Glyph artwork: Healthicons, CC0 1.0 Universal (public domain).\n// https://github.com/resolvetosavelives/healthicons\nimport type { SpecialtyIconId } from './glyph-loaders';\n\nexport interface SpecialtyMapEntry {\n icon: SpecialtyIconId;\n /** Not used for layout yet: kept for a grouped list later. */\n group: string;\n}\n\n/** Profession key (the platform's profession seoUrl slug) to icon id. */\nexport const SPECIALTY_MAP: Record<string, SpecialtyMapEntry> = {\n agopuntura: { icon: 'acupuncture-1', group: 'complementaryMedicine' },\n allergologo: { icon: 'allergies', group: 'specialistVisits' },\n andrologo: { icon: 'testicles', group: 'specialistVisits' },\n anestesista: { icon: 'syringe', group: 'specialistVisits' },\n angiologo: { icon: 'blood-vessel', group: 'specialistVisits' },\n biologo: { icon: 'microscope', group: 'diagnostics' },\n cardiochirurgo: { icon: 'heart-organ', group: 'surgery' },\n cardiologo: { icon: 'cardiology', group: 'specialistVisits' },\n chiropratico: { icon: 'spine', group: 'rehabilitation' },\n 'chirurgia-toracica': { icon: 'lungs', group: 'surgery' },\n chirurgo: { icon: 'general-surgery', group: 'surgery' },\n 'chirurgo-generale': { icon: 'general-surgery', group: 'surgery' },\n 'chirurgo-maxillofacciale': { icon: 'maxillofacial', group: 'surgery' },\n 'chirurgo-pediatrico': { icon: 'pediatric-surgery', group: 'surgery' },\n 'chirurgo-plastico': { icon: 'skin-layers', group: 'surgery' },\n 'chirurgo-vascolare': { icon: 'vascular-surgery', group: 'surgery' },\n dentista: { icon: 'tooth', group: 'dentistry' },\n dermatologo: { icon: 'dermatology', group: 'specialistVisits' },\n diabetologo: { icon: 'diabetes', group: 'specialistVisits' },\n dietista: { icon: 'vegetables', group: 'nutrition' },\n dietologo: { icon: 'vegetables', group: 'nutrition' },\n ecografista: { icon: 'sonography', group: 'diagnostics' },\n 'educatore-professionale-socio-sanitario': {\n icon: 'group-discussion-meeting',\n group: 'mentalHealth',\n },\n ematologo: { icon: 'blood-cells', group: 'specialistVisits' },\n endocrinochirurgo: { icon: 'thyroid', group: 'surgery' },\n endocrinologo: { icon: 'thyroid', group: 'specialistVisits' },\n endodontista: { icon: 'tooth', group: 'dentistry' },\n epatologo: { icon: 'hepatology', group: 'specialistVisits' },\n fisiatra: { icon: 'physical-therapy', group: 'rehabilitation' },\n fisioterapista: { icon: 'physical-therapy', group: 'rehabilitation' },\n flebologo: { icon: 'varicose-vein', group: 'specialistVisits' },\n gastroenterologo: { icon: 'stomach', group: 'specialistVisits' },\n genetista: { icon: 'dna', group: 'diagnostics' },\n geriatra: { icon: 'geriatrics', group: 'generalMedicine' },\n ginecologo: { icon: 'gynecology', group: 'womenAndChildren' },\n gnatologo: { icon: 'mouth', group: 'dentistry' },\n igienista: { icon: 'dental-hygiene', group: 'dentistry' },\n 'igienista-dentale': { icon: 'dental-hygiene', group: 'dentistry' },\n immunologo: { icon: 'antibody', group: 'specialistVisits' },\n implantologo: { icon: 'odontology-implant', group: 'dentistry' },\n infermiere: { icon: 'nurse', group: 'generalMedicine' },\n internista: { icon: 'stethoscope', group: 'generalMedicine' },\n kinesiologo: { icon: 'exercise', group: 'rehabilitation' },\n linfologo: { icon: 'lymph-nodes', group: 'specialistVisits' },\n logopedista: { icon: 'speech-language-therapist', group: 'rehabilitation' },\n massofisioterapista: { icon: 'physical-therapy', group: 'rehabilitation' },\n massoterapista: { icon: 'physical-therapy', group: 'rehabilitation' },\n 'medico-chirurgo': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-competente': { icon: 'health-worker', group: 'generalMedicine' },\n 'medico-del-lavoro': { icon: 'health-worker', group: 'generalMedicine' },\n 'medico-dello-sport': { icon: 'gym', group: 'specialistVisits' },\n 'medico-di-base': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-di-famiglia': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-di-medicina-generale': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-estetico': { icon: 'skin-layers', group: 'specialistVisits' },\n 'medico-generico': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-genetista': { icon: 'dna', group: 'diagnostics' },\n 'medico-legale': { icon: 'justice', group: 'generalMedicine' },\n 'medico-omeopata': {\n icon: 'liquid-medicine',\n group: 'complementaryMedicine',\n },\n naturopata: { icon: 'eco-care', group: 'complementaryMedicine' },\n nefrologo: { icon: 'nephrology', group: 'specialistVisits' },\n neurochirurgo: { icon: 'neuro-surgery', group: 'surgery' },\n neurofisiopatologo: { icon: 'nerve', group: 'diagnostics' },\n neurologo: { icon: 'neurology', group: 'specialistVisits' },\n 'neuropsichiatra-infantile': {\n icon: 'child-cognition',\n group: 'womenAndChildren',\n },\n neuropsicologo: { icon: 'psychology', group: 'mentalHealth' },\n neuropsicomotricista: { icon: 'child-cognition', group: 'rehabilitation' },\n 'nutrizione-clinica': { icon: 'fruits', group: 'nutrition' },\n nutrizionista: { icon: 'fruits', group: 'nutrition' },\n oculista: { icon: 'opthalmology', group: 'specialistVisits' },\n odontoiatra: { icon: 'odontology', group: 'dentistry' },\n omeopata: { icon: 'liquid-medicine', group: 'complementaryMedicine' },\n omotossicologo: { icon: 'liquid-medicine', group: 'complementaryMedicine' },\n oncologo: { icon: 'oncology', group: 'specialistVisits' },\n ortodontista: { icon: 'braces', group: 'dentistry' },\n ortopedico: { icon: 'orthopaedics', group: 'specialistVisits' },\n ortottista: { icon: 'eyeglasses', group: 'rehabilitation' },\n osteopata: { icon: 'spine', group: 'rehabilitation' },\n ostetrica: { icon: 'obstetricsmonia', group: 'womenAndChildren' },\n otorino: { icon: 'ears-nose-and-throat', group: 'specialistVisits' },\n otorinolaringoiatra: {\n icon: 'ears-nose-and-throat',\n group: 'specialistVisits',\n },\n parodontologo: { icon: 'tooth', group: 'dentistry' },\n pediatra: { icon: 'pediatrics', group: 'womenAndChildren' },\n pedodontista: { icon: 'tooth', group: 'dentistry' },\n pneumologo: { icon: 'respirology', group: 'specialistVisits' },\n podologo: { icon: 'foot', group: 'rehabilitation' },\n posturologo: { icon: 'spine', group: 'rehabilitation' },\n proctologo: { icon: 'anus', group: 'specialistVisits' },\n protesista: { icon: 'odontology-implant', group: 'dentistry' },\n psichiatra: { icon: 'mental-disorders', group: 'mentalHealth' },\n psicoanalista: { icon: 'psychology', group: 'mentalHealth' },\n psicologo: { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-clinico': { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-del-lavoro': { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-dello-sport': { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-forense': { icon: 'psychology', group: 'mentalHealth' },\n psicomotricista: { icon: 'child-cognition', group: 'rehabilitation' },\n psiconeuroendocrinoimmunologia: {\n icon: 'neurology',\n group: 'complementaryMedicine',\n },\n psicoterapeuta: { icon: 'mental-health-therapy', group: 'mentalHealth' },\n psiiconeurobiologo: { icon: 'neurology', group: 'complementaryMedicine' },\n radiologo: { icon: 'radiology', group: 'diagnostics' },\n reumatologo: { icon: 'rheumatology', group: 'specialistVisits' },\n senologo: { icon: 'breast', group: 'womenAndChildren' },\n sessuologo: { icon: 'sexual-reproductive-health', group: 'mentalHealth' },\n 'tecnico-ortopedico': { icon: 'orthotics', group: 'rehabilitation' },\n 'tecnico-sanitario-di-radiologia-medica': {\n icon: 'xray',\n group: 'diagnostics',\n },\n 'terapista-del-dolore': { icon: 'pain', group: 'specialistVisits' },\n tossicologo: { icon: 'poison', group: 'diagnostics' },\n tricologo: { icon: 'head', group: 'specialistVisits' },\n urologo: { icon: 'urology', group: 'specialistVisits' },\n vulnologo: { icon: 'stitches', group: 'specialistVisits' },\n} as Record<string, SpecialtyMapEntry>;\n\n/** Shown for a key that is not in the map. */\nexport const SPECIALTY_FALLBACK_ICON: SpecialtyIconId = 'health-cross';\n","import {\n forwardRef,\n useEffect,\n useId,\n useReducer,\n type HTMLAttributes,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { SPECIALTY_GLYPH_LOADERS, type SpecialtyIconId } from './glyph-loaders';\nimport { SPECIALTY_FALLBACK_ICON, SPECIALTY_MAP } from './specialty-map';\nimport type { SpecialtyGlyph } from './specialty-glyph';\n\n/* -------------------------------------------------------------------- */\n/* SpecialtyIcon */\n/* */\n/* A medical speciality glyph (Healthicons, CC0) drawn in the brand */\n/* gradient, inside a gradient ring. */\n/* */\n/* The icon is a fixed-size box (a kit token), so nothing moves while a */\n/* glyph loads. Glyphs are separate */\n/* modules, fetched with `import()` the first time an id is rendered and */\n/* kept in a module cache after that. */\n/* -------------------------------------------------------------------- */\n\n/** Slightly heavier line than the artwork, in glyph user units. */\nconst GLYPH_STROKE = 0.45;\n\n// The box is a kit size, never a literal: the ring is `size-8` (32px, the\n// Avatar `sm` size) and the glyph inside it is a medium kit icon\n// (`--icon-size-md`, 20px). The row that holds the icon keeps the 44px touch\n// target. The text colour is the forced-colours fallback (currentColor\n// becomes CanvasText there).\nconst iconVariants = cva(\n 'ds:relative ds:inline-grid ds:size-8 ds:shrink-0 ds:place-items-center ds:text-[color:var(--primary)]',\n);\n\nconst STOP_PRIMARY = 'ds:[stop-color:var(--primary)]';\nconst STOP_ACCENT = 'ds:[stop-color:var(--accent)]';\nconst FORCED_INK =\n 'ds:forced-colors:[fill:currentColor] ds:forced-colors:[stroke:currentColor]';\n\nconst glyphCache = new Map<SpecialtyIconId, SpecialtyGlyph>();\nconst glyphRequests = new Map<SpecialtyIconId, Promise<SpecialtyGlyph>>();\n\nfunction requestGlyph(id: SpecialtyIconId): Promise<SpecialtyGlyph> {\n let request = glyphRequests.get(id);\n if (!request) {\n request = SPECIALTY_GLYPH_LOADERS[id]().then((module) => {\n glyphCache.set(id, module.default);\n return module.default;\n });\n // A failed request is forgotten, so a later render can try again.\n request.catch(() => glyphRequests.delete(id));\n glyphRequests.set(id, request);\n }\n return request;\n}\n\n/** The glyph for an id: `undefined` until its module has loaded. */\nfunction useGlyph(id: SpecialtyIconId): SpecialtyGlyph | undefined {\n const [, update] = useReducer((count: number) => count + 1, 0);\n const cached = glyphCache.get(id);\n useEffect(() => {\n if (glyphCache.has(id)) return;\n let live = true;\n requestGlyph(id).then(\n () => {\n if (live) update();\n },\n () => {\n // The glyph stays blank: the ring (or empty box) is still drawn.\n },\n );\n return () => {\n live = false;\n };\n }, [id]);\n return cached;\n}\n\n/**\n * The icon id for a profession key. A key that is not in the map, or an\n * unknown icon id, gives the health cross.\n */\nexport function resolveSpecialtyIconId(\n specialty?: string,\n icon?: string,\n): SpecialtyIconId {\n if (icon && Object.hasOwn(SPECIALTY_GLYPH_LOADERS, icon)) {\n return icon as SpecialtyIconId;\n }\n if (specialty && Object.hasOwn(SPECIALTY_MAP, specialty)) {\n return SPECIALTY_MAP[specialty].icon;\n }\n return SPECIALTY_FALLBACK_ICON;\n}\n\nexport interface SpecialtyIconProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'aria-hidden'\n> {\n /**\n * Profession key: the platform's profession seoUrl slug, for example\n * `dentista` or `medico-di-base`. A key the kit does not know shows the\n * health cross.\n */\n specialty?: string;\n /** Icon id (for example `tooth`). Wins over `specialty` when both are set. */\n icon?: string;\n}\n\nexport const SpecialtyIcon = forwardRef<HTMLSpanElement, SpecialtyIconProps>(\n ({ specialty, icon, className, ...rest }, ref) => {\n // The id feeds `url(#…)`, so keep to characters that need no escaping.\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, '');\n const ringGradientId = `${uid}-ring`;\n const glyphGradientId = `${uid}-glyph`;\n\n const id = resolveSpecialtyIconId(specialty, icon);\n const glyph = useGlyph(id);\n\n let bounds: [number, number, number, number] | undefined;\n if (glyph) {\n const [x, y, w, h] = glyph.viewBox.split(' ').map(Number);\n bounds = [x, y, w, h];\n }\n const paint = `url(#${glyphGradientId})`;\n\n return (\n <span\n ref={ref}\n aria-hidden=\"true\"\n data-component=\"specialty-icon\"\n data-icon={id}\n className={iconVariants({ className })}\n {...rest}\n >\n {/* The ring fills the box. Its width is a kit border token and does\n not scale with the box (`non-scaling-stroke`); the inset keeps the\n whole stroke inside the box. */}\n <svg\n focusable=\"false\"\n className=\"ds:absolute ds:inset-[calc(var(--border-width-sm)/2)] ds:size-[calc(100%-var(--border-width-sm))] ds:overflow-visible\"\n >\n <defs>\n <linearGradient id={ringGradientId} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n <stop offset=\"0\" className={STOP_PRIMARY} />\n <stop offset=\"1\" className={STOP_ACCENT} />\n </linearGradient>\n </defs>\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r=\"50%\"\n fill=\"none\"\n vectorEffect=\"non-scaling-stroke\"\n stroke={`url(#${ringGradientId})`}\n className=\"ds:[stroke-width:var(--border-width-sm)] ds:forced-colors:[stroke:currentColor]\"\n />\n </svg>\n {glyph && bounds ? (\n <svg\n focusable=\"false\"\n viewBox={glyph.viewBox}\n className=\"ds:relative ds:size-[var(--icon-size-md)]\"\n >\n <defs>\n <linearGradient\n id={glyphGradientId}\n gradientUnits=\"userSpaceOnUse\"\n x1={bounds[0]}\n y1={bounds[1]}\n x2={bounds[0] + bounds[2]}\n y2={bounds[1] + bounds[3]}\n >\n <stop offset=\"0\" className={STOP_PRIMARY} />\n <stop offset=\"1\" className={STOP_ACCENT} />\n </linearGradient>\n </defs>\n {glyph.paths.map((path, index) => (\n <path\n key={index}\n d={path.d}\n fill={paint}\n stroke={paint}\n strokeWidth={GLYPH_STROKE}\n strokeLinejoin=\"round\"\n paintOrder=\"stroke\"\n fillRule={path.evenodd ? 'evenodd' : 'nonzero'}\n clipRule={path.evenodd ? 'evenodd' : 'nonzero'}\n className={FORCED_INK}\n />\n ))}\n </svg>\n ) : null}\n </span>\n );\n },\n);\n\nSpecialtyIcon.displayName = 'SpecialtyIcon';\n"],"names":["SPECIALTY_GLYPH_LOADERS","SPECIALTY_ICON_IDS","SPECIALTY_MAP","SPECIALTY_FALLBACK_ICON","GLYPH_STROKE","iconVariants","cva","STOP_PRIMARY","STOP_ACCENT","FORCED_INK","glyphCache","glyphRequests","requestGlyph","id","request","module","useGlyph","update","useReducer","count","cached","useEffect","live","resolveSpecialtyIconId","specialty","icon","SpecialtyIcon","forwardRef","className","rest","ref","uid","useId","ringGradientId","glyphGradientId","glyph","bounds","x","y","w","h","paint","jsxs","jsx","path","index"],"mappings":";;;AAMO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB,MAAM,OAAO,6BAAwB;AAAA,EACtD,WAAW,MAAM,OAAO,yBAAoB;AAAA,EAC5C,UAAU,MAAM,OAAO,wBAAmB;AAAA,EAC1C,MAAM,MAAM,OAAO,oBAAe;AAAA,EAClC,eAAe,MAAM,OAAO,2BAAsB;AAAA,EAClD,gBAAgB,MAAM,OAAO,4BAAuB;AAAA,EACpD,QAAQ,MAAM,OAAO,sBAAiB;AAAA,EACtC,QAAQ,MAAM,OAAO,sBAAiB;AAAA,EACtC,YAAY,MAAM,OAAO,0BAAqB;AAAA,EAC9C,mBAAmB,MAAM,OAAO,+BAA0B;AAAA,EAC1D,kBAAkB,MAAM,OAAO,8BAAyB;AAAA,EACxD,aAAa,MAAM,OAAO,2BAAsB;AAAA,EAChD,UAAU,MAAM,OAAO,wBAAmB;AAAA,EAC1C,KAAK,MAAM,OAAO,mBAAc;AAAA,EAChC,QAAQ,MAAM,OAAO,sBAAiB;AAAA,EACtC,wBAAwB,MAAM,OAAO,oCAA+B;AAAA,EACpE,YAAY,MAAM,OAAO,wBAAmB;AAAA,EAC5C,UAAU,MAAM,OAAO,wBAAmB;AAAA,EAC1C,YAAY,MAAM,OAAO,0BAAqB;AAAA,EAC9C,MAAM,MAAM,OAAO,oBAAe;AAAA,EAClC,QAAQ,MAAM,OAAO,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A,CAAa;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAAA,GAE7C;AAAA,gBACC2B,EAAM,MAAM,IAAI,CAACS,GAAMC,MACtB,gBAAAF;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBAEC,GAAGC,EAAK;AAAA,oBACR,MAAMH;AAAA,oBACN,QAAQA;AAAA,oBACR,aAAarC;AAAA,oBACb,gBAAe;AAAA,oBACf,YAAW;AAAA,oBACX,UAAUwC,EAAK,UAAU,YAAY;AAAA,oBACrC,UAAUA,EAAK,UAAU,YAAY;AAAA,oBACrC,WAAWnC;AAAA,kBAAA;AAAA,kBATNoC;AAAA,gBAAA,CAWR;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA,IAED;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAnB,EAAc,cAAc;"}
|
|
1
|
+
{"version":3,"file":"specialty-icon-BkpExzMh.js","sources":["../../src/components/specialty-icon/glyph-loaders.ts","../../src/components/specialty-icon/specialty-map.ts","../../src/components/specialty-icon/specialty-icon.tsx"],"sourcesContent":["// Generated by scripts/build-specialty-icons.mjs. Do not edit by hand.\n// Glyph artwork: Healthicons, CC0 1.0 Universal (public domain).\n// https://github.com/resolvetosavelives/healthicons\nimport type { SpecialtyGlyph } from './specialty-glyph';\n\n/** One dynamic import per glyph, so a page only downloads what it renders. */\nexport const SPECIALTY_GLYPH_LOADERS = {\n 'acupuncture-1': () => import('./glyphs/acupuncture-1'),\n allergies: () => import('./glyphs/allergies'),\n antibody: () => import('./glyphs/antibody'),\n anus: () => import('./glyphs/anus'),\n 'blood-cells': () => import('./glyphs/blood-cells'),\n 'blood-vessel': () => import('./glyphs/blood-vessel'),\n braces: () => import('./glyphs/braces'),\n breast: () => import('./glyphs/breast'),\n cardiology: () => import('./glyphs/cardiology'),\n 'child-cognition': () => import('./glyphs/child-cognition'),\n 'dental-hygiene': () => import('./glyphs/dental-hygiene'),\n dermatology: () => import('./glyphs/dermatology'),\n diabetes: () => import('./glyphs/diabetes'),\n dna: () => import('./glyphs/dna'),\n doctor: () => import('./glyphs/doctor'),\n 'ears-nose-and-throat': () => import('./glyphs/ears-nose-and-throat'),\n 'eco-care': () => import('./glyphs/eco-care'),\n exercise: () => import('./glyphs/exercise'),\n eyeglasses: () => import('./glyphs/eyeglasses'),\n foot: () => import('./glyphs/foot'),\n fruits: () => import('./glyphs/fruits'),\n 'general-surgery': () => import('./glyphs/general-surgery'),\n geriatrics: () => import('./glyphs/geriatrics'),\n 'group-discussion-meeting': () => import('./glyphs/group-discussion-meeting'),\n gym: () => import('./glyphs/gym'),\n gynecology: () => import('./glyphs/gynecology'),\n head: () => import('./glyphs/head'),\n 'health-cross': () => import('./glyphs/health-cross'),\n 'health-worker': () => import('./glyphs/health-worker'),\n 'heart-organ': () => import('./glyphs/heart-organ'),\n hepatology: () => import('./glyphs/hepatology'),\n justice: () => import('./glyphs/justice'),\n 'liquid-medicine': () => import('./glyphs/liquid-medicine'),\n lungs: () => import('./glyphs/lungs'),\n 'lymph-nodes': () => import('./glyphs/lymph-nodes'),\n maxillofacial: () => import('./glyphs/maxillofacial'),\n 'mental-disorders': () => import('./glyphs/mental-disorders'),\n 'mental-health-therapy': () => import('./glyphs/mental-health-therapy'),\n microscope: () => import('./glyphs/microscope'),\n mouth: () => import('./glyphs/mouth'),\n nephrology: () => import('./glyphs/nephrology'),\n nerve: () => import('./glyphs/nerve'),\n 'neuro-surgery': () => import('./glyphs/neuro-surgery'),\n neurology: () => import('./glyphs/neurology'),\n nurse: () => import('./glyphs/nurse'),\n obstetricsmonia: () => import('./glyphs/obstetricsmonia'),\n odontology: () => import('./glyphs/odontology'),\n 'odontology-implant': () => import('./glyphs/odontology-implant'),\n oncology: () => import('./glyphs/oncology'),\n opthalmology: () => import('./glyphs/opthalmology'),\n orthopaedics: () => import('./glyphs/orthopaedics'),\n orthotics: () => import('./glyphs/orthotics'),\n pain: () => import('./glyphs/pain'),\n 'pediatric-surgery': () => import('./glyphs/pediatric-surgery'),\n pediatrics: () => import('./glyphs/pediatrics'),\n 'physical-therapy': () => import('./glyphs/physical-therapy'),\n poison: () => import('./glyphs/poison'),\n psychology: () => import('./glyphs/psychology'),\n radiology: () => import('./glyphs/radiology'),\n respirology: () => import('./glyphs/respirology'),\n rheumatology: () => import('./glyphs/rheumatology'),\n 'sexual-reproductive-health': () =>\n import('./glyphs/sexual-reproductive-health'),\n 'skin-layers': () => import('./glyphs/skin-layers'),\n sonography: () => import('./glyphs/sonography'),\n 'speech-language-therapist': () =>\n import('./glyphs/speech-language-therapist'),\n spine: () => import('./glyphs/spine'),\n stethoscope: () => import('./glyphs/stethoscope'),\n stitches: () => import('./glyphs/stitches'),\n stomach: () => import('./glyphs/stomach'),\n syringe: () => import('./glyphs/syringe'),\n testicles: () => import('./glyphs/testicles'),\n thyroid: () => import('./glyphs/thyroid'),\n tooth: () => import('./glyphs/tooth'),\n urology: () => import('./glyphs/urology'),\n 'varicose-vein': () => import('./glyphs/varicose-vein'),\n 'vascular-surgery': () => import('./glyphs/vascular-surgery'),\n vegetables: () => import('./glyphs/vegetables'),\n xray: () => import('./glyphs/xray'),\n} satisfies Record<string, () => Promise<{ default: SpecialtyGlyph }>>;\n\nexport type SpecialtyIconId = keyof typeof SPECIALTY_GLYPH_LOADERS;\n\nexport const SPECIALTY_ICON_IDS = Object.keys(\n SPECIALTY_GLYPH_LOADERS,\n) as SpecialtyIconId[];\n","// Generated by scripts/build-specialty-icons.mjs. Do not edit by hand.\n// Glyph artwork: Healthicons, CC0 1.0 Universal (public domain).\n// https://github.com/resolvetosavelives/healthicons\nimport type { SpecialtyIconId } from './glyph-loaders';\n\nexport interface SpecialtyMapEntry {\n icon: SpecialtyIconId;\n /** Not used for layout yet: kept for a grouped list later. */\n group: string;\n}\n\n/** Profession key (the platform's profession seoUrl slug) to icon id. */\nexport const SPECIALTY_MAP: Record<string, SpecialtyMapEntry> = {\n agopuntura: { icon: 'acupuncture-1', group: 'complementaryMedicine' },\n allergologo: { icon: 'allergies', group: 'specialistVisits' },\n andrologo: { icon: 'testicles', group: 'specialistVisits' },\n anestesista: { icon: 'syringe', group: 'specialistVisits' },\n angiologo: { icon: 'blood-vessel', group: 'specialistVisits' },\n biologo: { icon: 'microscope', group: 'diagnostics' },\n cardiochirurgo: { icon: 'heart-organ', group: 'surgery' },\n cardiologo: { icon: 'cardiology', group: 'specialistVisits' },\n chiropratico: { icon: 'spine', group: 'rehabilitation' },\n 'chirurgia-toracica': { icon: 'lungs', group: 'surgery' },\n chirurgo: { icon: 'general-surgery', group: 'surgery' },\n 'chirurgo-generale': { icon: 'general-surgery', group: 'surgery' },\n 'chirurgo-maxillofacciale': { icon: 'maxillofacial', group: 'surgery' },\n 'chirurgo-pediatrico': { icon: 'pediatric-surgery', group: 'surgery' },\n 'chirurgo-plastico': { icon: 'skin-layers', group: 'surgery' },\n 'chirurgo-vascolare': { icon: 'vascular-surgery', group: 'surgery' },\n dentista: { icon: 'tooth', group: 'dentistry' },\n dermatologo: { icon: 'dermatology', group: 'specialistVisits' },\n diabetologo: { icon: 'diabetes', group: 'specialistVisits' },\n dietista: { icon: 'vegetables', group: 'nutrition' },\n dietologo: { icon: 'vegetables', group: 'nutrition' },\n ecografista: { icon: 'sonography', group: 'diagnostics' },\n 'educatore-professionale-socio-sanitario': {\n icon: 'group-discussion-meeting',\n group: 'mentalHealth',\n },\n ematologo: { icon: 'blood-cells', group: 'specialistVisits' },\n endocrinochirurgo: { icon: 'thyroid', group: 'surgery' },\n endocrinologo: { icon: 'thyroid', group: 'specialistVisits' },\n endodontista: { icon: 'tooth', group: 'dentistry' },\n epatologo: { icon: 'hepatology', group: 'specialistVisits' },\n fisiatra: { icon: 'physical-therapy', group: 'rehabilitation' },\n fisioterapista: { icon: 'physical-therapy', group: 'rehabilitation' },\n flebologo: { icon: 'varicose-vein', group: 'specialistVisits' },\n gastroenterologo: { icon: 'stomach', group: 'specialistVisits' },\n genetista: { icon: 'dna', group: 'diagnostics' },\n geriatra: { icon: 'geriatrics', group: 'generalMedicine' },\n ginecologo: { icon: 'gynecology', group: 'womenAndChildren' },\n gnatologo: { icon: 'mouth', group: 'dentistry' },\n igienista: { icon: 'dental-hygiene', group: 'dentistry' },\n 'igienista-dentale': { icon: 'dental-hygiene', group: 'dentistry' },\n immunologo: { icon: 'antibody', group: 'specialistVisits' },\n implantologo: { icon: 'odontology-implant', group: 'dentistry' },\n infermiere: { icon: 'nurse', group: 'generalMedicine' },\n internista: { icon: 'stethoscope', group: 'generalMedicine' },\n kinesiologo: { icon: 'exercise', group: 'rehabilitation' },\n linfologo: { icon: 'lymph-nodes', group: 'specialistVisits' },\n logopedista: { icon: 'speech-language-therapist', group: 'rehabilitation' },\n massofisioterapista: { icon: 'physical-therapy', group: 'rehabilitation' },\n massoterapista: { icon: 'physical-therapy', group: 'rehabilitation' },\n 'medico-chirurgo': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-competente': { icon: 'health-worker', group: 'generalMedicine' },\n 'medico-del-lavoro': { icon: 'health-worker', group: 'generalMedicine' },\n 'medico-dello-sport': { icon: 'gym', group: 'specialistVisits' },\n 'medico-di-base': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-di-famiglia': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-di-medicina-generale': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-estetico': { icon: 'skin-layers', group: 'specialistVisits' },\n 'medico-generico': { icon: 'doctor', group: 'generalMedicine' },\n 'medico-genetista': { icon: 'dna', group: 'diagnostics' },\n 'medico-legale': { icon: 'justice', group: 'generalMedicine' },\n 'medico-omeopata': {\n icon: 'liquid-medicine',\n group: 'complementaryMedicine',\n },\n naturopata: { icon: 'eco-care', group: 'complementaryMedicine' },\n nefrologo: { icon: 'nephrology', group: 'specialistVisits' },\n neurochirurgo: { icon: 'neuro-surgery', group: 'surgery' },\n neurofisiopatologo: { icon: 'nerve', group: 'diagnostics' },\n neurologo: { icon: 'neurology', group: 'specialistVisits' },\n 'neuropsichiatra-infantile': {\n icon: 'child-cognition',\n group: 'womenAndChildren',\n },\n neuropsicologo: { icon: 'psychology', group: 'mentalHealth' },\n neuropsicomotricista: { icon: 'child-cognition', group: 'rehabilitation' },\n 'nutrizione-clinica': { icon: 'fruits', group: 'nutrition' },\n nutrizionista: { icon: 'fruits', group: 'nutrition' },\n oculista: { icon: 'opthalmology', group: 'specialistVisits' },\n odontoiatra: { icon: 'odontology', group: 'dentistry' },\n omeopata: { icon: 'liquid-medicine', group: 'complementaryMedicine' },\n omotossicologo: { icon: 'liquid-medicine', group: 'complementaryMedicine' },\n oncologo: { icon: 'oncology', group: 'specialistVisits' },\n ortodontista: { icon: 'braces', group: 'dentistry' },\n ortopedico: { icon: 'orthopaedics', group: 'specialistVisits' },\n ortottista: { icon: 'eyeglasses', group: 'rehabilitation' },\n osteopata: { icon: 'spine', group: 'rehabilitation' },\n ostetrica: { icon: 'obstetricsmonia', group: 'womenAndChildren' },\n otorino: { icon: 'ears-nose-and-throat', group: 'specialistVisits' },\n otorinolaringoiatra: {\n icon: 'ears-nose-and-throat',\n group: 'specialistVisits',\n },\n parodontologo: { icon: 'tooth', group: 'dentistry' },\n pediatra: { icon: 'pediatrics', group: 'womenAndChildren' },\n pedodontista: { icon: 'tooth', group: 'dentistry' },\n pneumologo: { icon: 'respirology', group: 'specialistVisits' },\n podologo: { icon: 'foot', group: 'rehabilitation' },\n posturologo: { icon: 'spine', group: 'rehabilitation' },\n proctologo: { icon: 'anus', group: 'specialistVisits' },\n protesista: { icon: 'odontology-implant', group: 'dentistry' },\n psichiatra: { icon: 'mental-disorders', group: 'mentalHealth' },\n psicoanalista: { icon: 'psychology', group: 'mentalHealth' },\n psicologo: { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-clinico': { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-del-lavoro': { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-dello-sport': { icon: 'psychology', group: 'mentalHealth' },\n 'psicologo-forense': { icon: 'psychology', group: 'mentalHealth' },\n psicomotricista: { icon: 'child-cognition', group: 'rehabilitation' },\n psiconeuroendocrinoimmunologia: {\n icon: 'neurology',\n group: 'complementaryMedicine',\n },\n psicoterapeuta: { icon: 'mental-health-therapy', group: 'mentalHealth' },\n psiiconeurobiologo: { icon: 'neurology', group: 'complementaryMedicine' },\n radiologo: { icon: 'radiology', group: 'diagnostics' },\n reumatologo: { icon: 'rheumatology', group: 'specialistVisits' },\n senologo: { icon: 'breast', group: 'womenAndChildren' },\n sessuologo: { icon: 'sexual-reproductive-health', group: 'mentalHealth' },\n 'tecnico-ortopedico': { icon: 'orthotics', group: 'rehabilitation' },\n 'tecnico-sanitario-di-radiologia-medica': {\n icon: 'xray',\n group: 'diagnostics',\n },\n 'terapista-del-dolore': { icon: 'pain', group: 'specialistVisits' },\n tossicologo: { icon: 'poison', group: 'diagnostics' },\n tricologo: { icon: 'head', group: 'specialistVisits' },\n urologo: { icon: 'urology', group: 'specialistVisits' },\n vulnologo: { icon: 'stitches', group: 'specialistVisits' },\n} as Record<string, SpecialtyMapEntry>;\n\n/** Shown for a key that is not in the map. */\nexport const SPECIALTY_FALLBACK_ICON: SpecialtyIconId = 'health-cross';\n","import {\n forwardRef,\n useEffect,\n useId,\n useReducer,\n type HTMLAttributes,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { SPECIALTY_GLYPH_LOADERS, type SpecialtyIconId } from './glyph-loaders';\nimport { SPECIALTY_FALLBACK_ICON, SPECIALTY_MAP } from './specialty-map';\nimport type { SpecialtyGlyph } from './specialty-glyph';\n\n/* -------------------------------------------------------------------- */\n/* SpecialtyIcon */\n/* */\n/* A medical speciality glyph (Healthicons, CC0) drawn in the brand */\n/* gradient, inside a gradient ring. */\n/* */\n/* The icon is a fixed-size box (a kit token), so nothing moves while a */\n/* glyph loads. Glyphs are separate */\n/* modules, fetched with `import()` the first time an id is rendered and */\n/* kept in a module cache after that. */\n/* -------------------------------------------------------------------- */\n\n/** Slightly heavier line than the artwork, in glyph user units. */\nconst GLYPH_STROKE = 0.45;\n\n// The box is a kit size, never a literal: the ring is `size-8` (32px, the\n// Avatar `sm` size) and the glyph inside it is a medium kit icon\n// (`--icon-size-md`, 20px). The row that holds the icon keeps the 44px touch\n// target. The text colour is the forced-colours fallback (currentColor\n// becomes CanvasText there).\nconst iconVariants = cva(\n 'ds:relative ds:inline-grid ds:size-8 ds:shrink-0 ds:place-items-center ds:text-[color:var(--primary)]',\n);\n\nconst STOP_PRIMARY = 'ds:[stop-color:var(--primary)]';\nconst STOP_ACCENT = 'ds:[stop-color:var(--accent)]';\nconst FORCED_INK =\n 'ds:forced-colors:[fill:currentColor] ds:forced-colors:[stroke:currentColor]';\n\nconst glyphCache = new Map<SpecialtyIconId, SpecialtyGlyph>();\nconst glyphRequests = new Map<SpecialtyIconId, Promise<SpecialtyGlyph>>();\n\nfunction requestGlyph(id: SpecialtyIconId): Promise<SpecialtyGlyph> {\n let request = glyphRequests.get(id);\n if (!request) {\n request = SPECIALTY_GLYPH_LOADERS[id]().then((module) => {\n glyphCache.set(id, module.default);\n return module.default;\n });\n // A failed request is forgotten, so a later render can try again.\n request.catch(() => glyphRequests.delete(id));\n glyphRequests.set(id, request);\n }\n return request;\n}\n\n/** The glyph for an id: `undefined` until its module has loaded. */\nfunction useGlyph(id: SpecialtyIconId): SpecialtyGlyph | undefined {\n const [, update] = useReducer((count: number) => count + 1, 0);\n const cached = glyphCache.get(id);\n useEffect(() => {\n if (glyphCache.has(id)) return;\n let live = true;\n requestGlyph(id).then(\n () => {\n if (live) update();\n },\n () => {\n // The glyph stays blank: the ring (or empty box) is still drawn.\n },\n );\n return () => {\n live = false;\n };\n }, [id]);\n return cached;\n}\n\n/**\n * The icon id for a profession key. A key that is not in the map, or an\n * unknown icon id, gives the health cross.\n */\nexport function resolveSpecialtyIconId(\n specialty?: string,\n icon?: string,\n): SpecialtyIconId {\n if (icon && Object.hasOwn(SPECIALTY_GLYPH_LOADERS, icon)) {\n return icon as SpecialtyIconId;\n }\n if (specialty && Object.hasOwn(SPECIALTY_MAP, specialty)) {\n return SPECIALTY_MAP[specialty].icon;\n }\n return SPECIALTY_FALLBACK_ICON;\n}\n\nexport interface SpecialtyIconProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'aria-hidden'\n> {\n /**\n * Profession key: the platform's profession seoUrl slug, for example\n * `dentista` or `medico-di-base`. A key the kit does not know shows the\n * health cross.\n */\n specialty?: string;\n /** Icon id (for example `tooth`). Wins over `specialty` when both are set. */\n icon?: string;\n}\n\nexport const SpecialtyIcon = forwardRef<HTMLSpanElement, SpecialtyIconProps>(\n ({ specialty, icon, className, ...rest }, ref) => {\n // The id feeds `url(#…)`, so keep to characters that need no escaping.\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, '');\n const ringGradientId = `${uid}-ring`;\n const glyphGradientId = `${uid}-glyph`;\n\n const id = resolveSpecialtyIconId(specialty, icon);\n const glyph = useGlyph(id);\n\n let bounds: [number, number, number, number] | undefined;\n if (glyph) {\n const [x, y, w, h] = glyph.viewBox.split(' ').map(Number);\n bounds = [x, y, w, h];\n }\n const paint = `url(#${glyphGradientId})`;\n\n return (\n <span\n ref={ref}\n aria-hidden=\"true\"\n data-component=\"specialty-icon\"\n data-icon={id}\n className={iconVariants({ className })}\n {...rest}\n >\n {/* The ring fills the box. Its width is a kit border token and does\n not scale with the box (`non-scaling-stroke`); the inset keeps the\n whole stroke inside the box. `data-slot=\"ring\"` lets a host that\n draws its own frame (SpecialtyList's chips) hide it. */}\n <svg\n focusable=\"false\"\n data-slot=\"ring\"\n className=\"ds:absolute ds:inset-[calc(var(--border-width-sm)/2)] ds:size-[calc(100%-var(--border-width-sm))] ds:overflow-visible\"\n >\n <defs>\n <linearGradient id={ringGradientId} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n <stop offset=\"0\" className={STOP_PRIMARY} />\n <stop offset=\"1\" className={STOP_ACCENT} />\n </linearGradient>\n </defs>\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r=\"50%\"\n fill=\"none\"\n vectorEffect=\"non-scaling-stroke\"\n stroke={`url(#${ringGradientId})`}\n className=\"ds:[stroke-width:var(--border-width-sm)] ds:forced-colors:[stroke:currentColor]\"\n />\n </svg>\n {glyph && bounds ? (\n <svg\n focusable=\"false\"\n viewBox={glyph.viewBox}\n className=\"ds:relative ds:size-[var(--icon-size-md)]\"\n >\n <defs>\n <linearGradient\n id={glyphGradientId}\n gradientUnits=\"userSpaceOnUse\"\n x1={bounds[0]}\n y1={bounds[1]}\n x2={bounds[0] + bounds[2]}\n y2={bounds[1] + bounds[3]}\n >\n <stop offset=\"0\" className={STOP_PRIMARY} />\n <stop offset=\"1\" className={STOP_ACCENT} />\n </linearGradient>\n </defs>\n {glyph.paths.map((path, index) => (\n <path\n key={index}\n d={path.d}\n fill={paint}\n stroke={paint}\n strokeWidth={GLYPH_STROKE}\n strokeLinejoin=\"round\"\n paintOrder=\"stroke\"\n fillRule={path.evenodd ? 'evenodd' : 'nonzero'}\n clipRule={path.evenodd ? 'evenodd' : 'nonzero'}\n className={FORCED_INK}\n />\n ))}\n </svg>\n ) : null}\n </span>\n );\n },\n);\n\nSpecialtyIcon.displayName = 'SpecialtyIcon';\n"],"names":["SPECIALTY_GLYPH_LOADERS","SPECIALTY_ICON_IDS","SPECIALTY_MAP","SPECIALTY_FALLBACK_ICON","GLYPH_STROKE","iconVariants","cva","STOP_PRIMARY","STOP_ACCENT","FORCED_INK","glyphCache","glyphRequests","requestGlyph","id","request","module","useGlyph","update","useReducer","count","cached","useEffect","live","resolveSpecialtyIconId","specialty","icon","SpecialtyIcon","forwardRef","className","rest","ref","uid","useId","ringGradientId","glyphGradientId","glyph","bounds","x","y","w","h","paint","jsxs","jsx","path","index"],"mappings":";;;AAMO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB,MAAM,OAAO,6BAAwB;AAAA,EACtD,WAAW,MAAM,OAAO,yBAAoB;AAAA,EAC5C,UAAU,MAAM,OAAO,wBAAmB;AAA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c,cAAc;"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsxs as p, jsx as s, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useState as k, useId as y } from "react";
|
|
3
|
+
import { useTranslation as w } from "react-i18next";
|
|
4
|
+
import { B as _ } from "./button-DohK_Ak_.js";
|
|
5
|
+
import { c as S } from "./specialty-icon-BkpExzMh.js";
|
|
6
|
+
const m = [
|
|
7
|
+
"ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
8
|
+
"ds:min-h-[var(--min-target-size)] ds:text-foreground ds:no-underline",
|
|
9
|
+
"ds:rounded-[var(--radius-md)]",
|
|
10
|
+
"ds:md:[min-block-size:var(--accessible-target-floor,0px)] ds:md:gap-[var(--spacing-2xs)] ds:md:rounded-full",
|
|
11
|
+
"ds:md:ps-[var(--spacing-xs)] ds:md:pe-[var(--spacing-md)]",
|
|
12
|
+
// The chip frame needs `mask-composite: exclude` (Chromium 120+). Without
|
|
13
|
+
// it the ring stays and there is no outline, rather than a gradient
|
|
14
|
+
// painted over the label. `--foreground` is only the mask's opaque source.
|
|
15
|
+
"ds:md:supports-[mask-composite:exclude]:[&_[data-slot=ring]]:hidden",
|
|
16
|
+
"ds:md:supports-[mask-composite:exclude]:before:pointer-events-none ds:md:supports-[mask-composite:exclude]:before:absolute",
|
|
17
|
+
'ds:md:supports-[mask-composite:exclude]:before:inset-0 ds:md:supports-[mask-composite:exclude]:before:content-[""]',
|
|
18
|
+
"ds:md:supports-[mask-composite:exclude]:before:rounded-[inherit] ds:md:supports-[mask-composite:exclude]:before:p-[var(--border-width-sm)]",
|
|
19
|
+
"ds:md:supports-[mask-composite:exclude]:before:[background:var(--gradient-wordmark)]",
|
|
20
|
+
"ds:md:supports-[mask-composite:exclude]:before:[mask:linear-gradient(var(--foreground)_0_0)_content-box_exclude,linear-gradient(var(--foreground)_0_0)]",
|
|
21
|
+
"ds:md:forced-colors:before:hidden ds:md:forced-colors:[border:var(--border-width-sm)_solid_CanvasText]",
|
|
22
|
+
"ds:md:forced-colors:[&_[data-slot=ring]]:hidden"
|
|
23
|
+
].join(" "), N = [
|
|
24
|
+
"ds:group",
|
|
25
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
26
|
+
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
27
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
28
|
+
].join(" "), L = [
|
|
29
|
+
"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0",
|
|
30
|
+
"ds:md:flex-row ds:md:flex-wrap ds:md:gap-[var(--spacing-sm)]"
|
|
31
|
+
].join(" ");
|
|
32
|
+
function j({
|
|
33
|
+
item: e,
|
|
34
|
+
hidden: r
|
|
35
|
+
}) {
|
|
36
|
+
const d = /* @__PURE__ */ p(v, { children: [
|
|
37
|
+
/* @__PURE__ */ s(S, { specialty: e.key }),
|
|
38
|
+
/* @__PURE__ */ s(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
dir: "auto",
|
|
42
|
+
className: "type-body ds:min-w-0 ds:underline-offset-4 ds:group-hover:underline ds:group-focus-visible:underline",
|
|
43
|
+
children: e.label
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] });
|
|
47
|
+
return /* @__PURE__ */ s(
|
|
48
|
+
"li",
|
|
49
|
+
{
|
|
50
|
+
hidden: r,
|
|
51
|
+
className: "ds:min-w-0 ds:max-w-full ds:[&[hidden]]:hidden",
|
|
52
|
+
children: e.href ? /* @__PURE__ */ s("a", { href: e.href, className: `${m} ${N}`, children: d }) : /* @__PURE__ */ s("span", { className: m, children: d })
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
const C = b(
|
|
57
|
+
({ items: e, collapsedCount: r = 5, className: d, ...u }, f) => {
|
|
58
|
+
const { t: a } = w("ui"), [n, g] = k(!1), t = y(), i = Math.max(0, r), l = Math.max(0, e.length - i), x = l > 0, h = [
|
|
59
|
+
"ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)] ds:md:gap-[var(--spacing-xs)]",
|
|
60
|
+
d
|
|
61
|
+
].filter(Boolean).join(" ");
|
|
62
|
+
return /* @__PURE__ */ p(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
ref: f,
|
|
66
|
+
"data-component": "specialty-list",
|
|
67
|
+
className: h,
|
|
68
|
+
...u,
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ s("ul", { id: t, className: L, children: e.map((o, c) => /* @__PURE__ */ s(
|
|
71
|
+
j,
|
|
72
|
+
{
|
|
73
|
+
item: o,
|
|
74
|
+
hidden: c >= i && !n ? !0 : void 0
|
|
75
|
+
},
|
|
76
|
+
`${o.key}-${c}`
|
|
77
|
+
)) }),
|
|
78
|
+
x ? /* @__PURE__ */ s(
|
|
79
|
+
_,
|
|
80
|
+
{
|
|
81
|
+
type: "button",
|
|
82
|
+
intent: "link",
|
|
83
|
+
size: "md",
|
|
84
|
+
className: "ds:!ps-0 ds:!pe-0",
|
|
85
|
+
"aria-expanded": n,
|
|
86
|
+
"aria-controls": t,
|
|
87
|
+
onClick: () => g((o) => !o),
|
|
88
|
+
children: n ? a("specialtyList.showLess") : a("specialtyList.showAll", { count: l })
|
|
89
|
+
}
|
|
90
|
+
) : null
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
C.displayName = "SpecialtyList";
|
|
97
|
+
export {
|
|
98
|
+
C as S
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=specialty-list-BzalHR8_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specialty-list-BzalHR8_.js","sources":["../../src/components/specialty-list/specialty-list.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n useState,\n type ComponentPropsWithoutRef,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../button/button';\nimport { SpecialtyIcon } from '../specialty-icon/specialty-icon';\n\n/* -------------------------------------------------------------------- */\n/* SpecialtyList */\n/* */\n/* A practice's specialities. Below `md` one per line: the ring icon, */\n/* then the label. From `md` the items wrap as chips: a gradient outline */\n/* with a clear centre, the glyph without its own ring, the same label. */\n/* */\n/* Every item is always in the DOM. Items after `collapsedCount` carry */\n/* the `hidden` attribute until the toggle opens the list, so crawlers */\n/* read all of them (find-in-page only sees the open ones). Opened chips */\n/* keep flowing in the same list rather than starting a new line. */\n/* -------------------------------------------------------------------- */\n\nexport interface SpecialtyListItem {\n /** Profession key (platform seoUrl slug). Unknown keys get the health cross. */\n key: string;\n /** Display label, already localised by the consumer. */\n label: string;\n /** When set the item is a link; otherwise plain text. */\n href?: string;\n}\n\nexport interface SpecialtyListProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'children'\n> {\n /** The specialities, in display order. */\n items: SpecialtyListItem[];\n /**\n * How many items show before the toggle. Defaults to 5. The rest stay in\n * the DOM, hidden. No toggle is rendered when `items.length` is not above it.\n */\n collapsedCount?: number;\n}\n\n// Below md a row is at least the 44px touch target; the icon inside it is\n// 32px. From md it is a 32px chip, like Button `sm`: WCAG 2.5.8 asks for\n// 24px and the chips sit 8px apart. The accessible themes raise it to their\n// target floor. The outline is a masked ::before in `--border-width-sm`, so\n// the centre stays clear whatever the surface behind it; in forced colours\n// a real border replaces it. The icon's own ring is hidden because the chip\n// is the frame.\nconst ROW_BASE = [\n 'ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:min-h-[var(--min-target-size)] ds:text-foreground ds:no-underline',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:md:[min-block-size:var(--accessible-target-floor,0px)] ds:md:gap-[var(--spacing-2xs)] ds:md:rounded-full',\n 'ds:md:ps-[var(--spacing-xs)] ds:md:pe-[var(--spacing-md)]',\n // The chip frame needs `mask-composite: exclude` (Chromium 120+). Without\n // it the ring stays and there is no outline, rather than a gradient\n // painted over the label. `--foreground` is only the mask's opaque source.\n 'ds:md:supports-[mask-composite:exclude]:[&_[data-slot=ring]]:hidden',\n 'ds:md:supports-[mask-composite:exclude]:before:pointer-events-none ds:md:supports-[mask-composite:exclude]:before:absolute',\n 'ds:md:supports-[mask-composite:exclude]:before:inset-0 ds:md:supports-[mask-composite:exclude]:before:content-[\"\"]',\n 'ds:md:supports-[mask-composite:exclude]:before:rounded-[inherit] ds:md:supports-[mask-composite:exclude]:before:p-[var(--border-width-sm)]',\n 'ds:md:supports-[mask-composite:exclude]:before:[background:var(--gradient-wordmark)]',\n 'ds:md:supports-[mask-composite:exclude]:before:[mask:linear-gradient(var(--foreground)_0_0)_content-box_exclude,linear-gradient(var(--foreground)_0_0)]',\n 'ds:md:forced-colors:before:hidden ds:md:forced-colors:[border:var(--border-width-sm)_solid_CanvasText]',\n 'ds:md:forced-colors:[&_[data-slot=ring]]:hidden',\n].join(' ');\n\n// Only links underline their label on hover and focus.\nconst LINK_EXTRA = [\n 'ds:group',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n].join(' ');\n\nconst LIST_CLASS = [\n 'ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0',\n 'ds:md:flex-row ds:md:flex-wrap ds:md:gap-[var(--spacing-sm)]',\n].join(' ');\n\nfunction SpecialtyItem({\n item,\n hidden,\n}: {\n item: SpecialtyListItem;\n hidden?: boolean;\n}) {\n const content = (\n <>\n <SpecialtyIcon specialty={item.key} />\n <span\n dir=\"auto\"\n className=\"type-body ds:min-w-0 ds:underline-offset-4 ds:group-hover:underline ds:group-focus-visible:underline\"\n >\n {item.label}\n </span>\n </>\n );\n return (\n <li\n hidden={hidden}\n className=\"ds:min-w-0 ds:max-w-full ds:[&[hidden]]:hidden\"\n >\n {item.href ? (\n <a href={item.href} className={`${ROW_BASE} ${LINK_EXTRA}`}>\n {content}\n </a>\n ) : (\n <span className={ROW_BASE}>{content}</span>\n )}\n </li>\n );\n}\n\nexport const SpecialtyList = forwardRef<HTMLDivElement, SpecialtyListProps>(\n ({ items, collapsedCount = 5, className, ...rest }, ref) => {\n const { t } = useTranslation('ui');\n const [expanded, setExpanded] = useState(false);\n const listId = useId();\n\n const shown = Math.max(0, collapsedCount);\n const moreCount = Math.max(0, items.length - shown);\n const hasToggle = moreCount > 0;\n\n const rootClass = [\n 'ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)] ds:md:gap-[var(--spacing-xs)]',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div\n ref={ref}\n data-component=\"specialty-list\"\n className={rootClass}\n {...rest}\n >\n <ul id={listId} className={LIST_CLASS}>\n {items.map((item, index) => (\n <SpecialtyItem\n key={`${item.key}-${index}`}\n item={item}\n hidden={index >= shown && !expanded ? true : undefined}\n />\n ))}\n </ul>\n {hasToggle ? (\n <Button\n type=\"button\"\n intent=\"link\"\n size=\"md\"\n // The kit's inline text-button idiom (EditableDescription): no\n // side padding, so the text lines up with the items above it.\n className=\"ds:!ps-0 ds:!pe-0\"\n aria-expanded={expanded}\n aria-controls={listId}\n onClick={() => setExpanded((open) => !open)}\n >\n {expanded\n ? t('specialtyList.showLess')\n : t('specialtyList.showAll', { count: moreCount })}\n </Button>\n ) : null}\n </div>\n );\n },\n);\n\nSpecialtyList.displayName = 'SpecialtyList';\n"],"names":["ROW_BASE","LINK_EXTRA","LIST_CLASS","SpecialtyItem","item","hidden","content","jsxs","Fragment","jsx","SpecialtyIcon","SpecialtyList","forwardRef","items","collapsedCount","className","rest","ref","t","useTranslation","expanded","setExpanded","useState","listId","useId","shown","moreCount","hasToggle","rootClass","index","Button","open"],"mappings":";;;;;AA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,IAAY,KAAK,IAAI,GAAGb,EAAM,SAASY,CAAK,GAC5CE,IAAYD,IAAY,GAExBE,IAAY;AAAA,MAChB;AAAA,MACAb;AAAA,IAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,WACE,gBAAAR;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAU;AAAA,QACA,kBAAe;AAAA,QACf,WAAWW;AAAA,QACV,GAAGZ;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAP,EAAC,MAAA,EAAG,IAAIc,GAAQ,WAAWrB,GACxB,UAAAW,EAAM,IAAI,CAACT,GAAMyB,MAChB,gBAAApB;AAAA,YAACN;AAAA,YAAA;AAAA,cAEC,MAAAC;AAAA,cACA,QAAQyB,KAASJ,KAAS,CAACL,IAAW,KAAO;AAAA,YAAA;AAAA,YAFxC,GAAGhB,EAAK,GAAG,IAAIyB,CAAK;AAAA,UAAA,CAI5B,GACH;AAAA,UACCF,IACC,gBAAAlB;AAAA,YAACqB;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,QAAO;AAAA,cACP,MAAK;AAAA,cAGL,WAAU;AAAA,cACV,iBAAeV;AAAA,cACf,iBAAeG;AAAA,cACf,SAAS,MAAMF,EAAY,CAACU,MAAS,CAACA,CAAI;AAAA,cAEzC,UAAAX,IACGF,EAAE,wBAAwB,IAC1BA,EAAE,yBAAyB,EAAE,OAAOQ,EAAA,CAAW;AAAA,YAAA;AAAA,UAAA,IAEnD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAf,EAAc,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as m, useMemo as p, useRef as w, useState as V, useCallback as I, useImperativeHandle as O, useContext as v, createContext as C } from "react";
|
|
3
3
|
import { c as b } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as A } from "react-i18next";
|
|
5
|
-
import { A as P } from "./avatar-
|
|
5
|
+
import { A as P } from "./avatar-Dp5apm1d.js";
|
|
6
6
|
import { C as N } from "./card-C85_Ndhb.js";
|
|
7
7
|
import { T as q } from "./timestamp-DPLDWdxA.js";
|
|
8
8
|
import { u as B } from "./registry-DvAUVLHh.js";
|
|
@@ -293,4 +293,4 @@ export {
|
|
|
293
293
|
le as T,
|
|
294
294
|
K as t
|
|
295
295
|
};
|
|
296
|
-
//# sourceMappingURL=timeline-
|
|
296
|
+
//# sourceMappingURL=timeline-CKUaBZOx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-tn5QQJdS.js","sources":["../../src/components/timeline/timeline.agent.ts","../../src/components/timeline/timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — Timeline. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TimelineHandle } from './timeline';\n\nexport const timelineAgent: AgentAdapter<TimelineHandle> = {\n id: 'timeline',\n // `select_event` persists `selectedEvent` state, so this is single-selection\n // (`select_single`), not a transient `pick`. See PRS §26 §4.\n capabilities: ['select_single'],\n state: {\n selectedEvent: {\n type: 'string | null',\n descriptionKey: 'ui.agent.timeline.state.selectedEvent',\n description: 'Opaque event id of the currently-active event, or null.',\n read: (handle) => handle.getSelectedEvent(),\n },\n },\n actions: {\n select_event: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.timeline.actions.selectEvent',\n description: 'Scroll the given event into view and mark it as selected.',\n invoke: (handle, args: { id: string }) => {\n handle.selectEvent(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'timeline',\n description: 'Marks the Timeline root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-event-id',\n description:\n 'Opaque event id emitted on each Timeline.Event when the `eventId` prop is provided.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type LiHTMLAttributes,\n type OlHTMLAttributes,\n type ReactNode,\n type TimeHTMLAttributes,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { TriangleAlert, Check, Circle, Info, X } from 'lucide-react';\nimport { Avatar } from '../avatar';\nimport { Card } from '../card';\nimport { Timestamp } from '../timestamp';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { timelineAgent } from './timeline.agent';\n\n// TODO: optional @tanstack/react-virtual integration for 500+ events\n\n/* ------------------------------------------------------------------ */\n/* Context */\n/* ------------------------------------------------------------------ */\n\ntype EventType = 'info' | 'success' | 'warning' | 'error' | 'neutral';\ntype Layout = 'rail-start' | 'rail-end' | 'alternating';\n\ninterface TimelineContextValue {\n layout: Layout;\n order: 'newest-first' | 'oldest-first';\n}\n\nconst TimelineContext = createContext<TimelineContextValue>({\n layout: 'rail-start',\n order: 'newest-first',\n});\n\ninterface TimelineEventContextValue {\n type: EventType;\n}\n\nconst TimelineEventContext = createContext<TimelineEventContextValue>({\n type: 'neutral',\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — root */\n/* ------------------------------------------------------------------ */\n\nconst timelineVariants = cva('ds:flex ds:flex-col', {\n variants: {\n layout: {\n 'rail-start': 'ds:ps-4',\n 'rail-end': 'ds:pe-4',\n alternating:\n 'ds:grid ds:grid-cols-[1fr_2rem_1fr] ds:gap-x-[var(--spacing-md)]',\n },\n order: {\n 'newest-first': 'ds:flex-col',\n 'oldest-first': 'ds:flex-col-reverse',\n },\n },\n defaultVariants: { layout: 'rail-start', order: 'newest-first' },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — event item */\n/* ------------------------------------------------------------------ */\n\nconst eventVariants = cva(\n 'ds:relative ds:flex ds:gap-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n {\n variants: {\n layout: {\n 'rail-start': [\n 'ds:flex-row',\n // Rail: continuous line from this dot centre to the next dot centre\n 'ds:before:absolute ds:before:[inset-block-start:var(--spacing-md)] ds:before:[inset-block-end:calc(var(--spacing-md)*-1)]',\n 'ds:before:[inline-size:var(--border-width-md)] ds:before:bg-[var(--border)]',\n 'ds:before:[inset-inline-start:calc(var(--spacing-md)_-_var(--border-width-md)/2)]',\n 'ds:last:before:hidden',\n ].join(' '),\n 'rail-end': [\n 'ds:flex-row-reverse',\n 'ds:before:absolute ds:before:[inset-block-start:var(--spacing-md)] ds:before:[inset-block-end:calc(var(--spacing-md)*-1)]',\n 'ds:before:[inline-size:var(--border-width-md)] ds:before:bg-[var(--border)]',\n 'ds:before:[inset-inline-end:calc(var(--spacing-md)_-_var(--border-width-md)/2)]',\n 'ds:last:before:hidden',\n ].join(' '),\n alternating: 'ds:contents',\n },\n },\n defaultVariants: { layout: 'rail-start' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — dot */\n/* ------------------------------------------------------------------ */\n\nconst dotVariants = cva(\n [\n 'ds:relative ds:z-10 ds:flex ds:items-center ds:justify-center',\n 'ds:rounded-[var(--radius-full)] ds:shrink-0',\n 'ds:size-8',\n 'ds:ring-2 ds:ring-[var(--background)]',\n ].join(' '),\n {\n variants: {\n type: {\n info: 'ds:bg-[var(--info)] ds:text-[var(--info-solid-foreground)]',\n success:\n 'ds:bg-[var(--success)] ds:text-[var(--success-solid-foreground)]',\n warning:\n 'ds:bg-[var(--warning)] ds:text-[var(--warning-solid-foreground)]',\n error:\n 'ds:bg-[var(--destructive)] ds:text-[var(--destructive-foreground)]',\n neutral: 'ds:bg-[var(--muted)] ds:text-[var(--muted-foreground)]',\n },\n },\n defaultVariants: { type: 'neutral' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface TimelineProps\n extends\n Omit<OlHTMLAttributes<HTMLOListElement>, 'color'>,\n VariantProps<typeof timelineVariants> {\n layout?: Layout;\n order?: 'newest-first' | 'oldest-first';\n children: ReactNode;\n className?: string;\n}\n\nexport interface TimelineEventProps extends LiHTMLAttributes<HTMLLIElement> {\n type?: EventType;\n /** Opaque event id — when set, the component emits `data-event-id` for agent addressing. */\n eventId?: string;\n children: ReactNode;\n className?: string;\n}\n\n/** Curated imperative handle for agent / external automation. */\nexport interface TimelineHandle {\n getSelectedEvent: () => string | null;\n selectEvent: (id: string) => void;\n}\n\nexport interface TimelineDotProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineContentProps extends HTMLAttributes<HTMLDivElement> {\n title: string;\n description?: ReactNode;\n actor?: { name: string; src?: string };\n children?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineTimestampProps extends TimeHTMLAttributes<HTMLTimeElement> {\n date: Date | string;\n /** Overrides the active language for date and time formatting. */\n locale?: string;\n relative?: boolean;\n format?: Intl.DateTimeFormatOptions;\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Default icons per type */\n/* ------------------------------------------------------------------ */\n\nconst TYPE_ICONS: Record<EventType, ReactNode> = {\n info: <Info size={16} aria-hidden=\"true\" />,\n success: <Check size={16} aria-hidden=\"true\" />,\n warning: <TriangleAlert size={16} aria-hidden=\"true\" />,\n error: <X size={16} aria-hidden=\"true\" />,\n neutral: <Circle size={16} aria-hidden=\"true\" />,\n};\n\n/* ------------------------------------------------------------------ */\n/* Timeline root */\n/* ------------------------------------------------------------------ */\n\nconst TimelineRoot = forwardRef<HTMLOListElement, TimelineProps>(\n (\n {\n layout = 'rail-start',\n order = 'newest-first',\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const ctx = useMemo(() => ({ layout, order }), [layout, order]);\n const olRef = useRef<HTMLOListElement | null>(null);\n const [selectedEvent, setSelectedEvent] = useState<string | null>(null);\n const latestRef = useRef<string | null>(null);\n latestRef.current = selectedEvent;\n\n const selectEvent = useCallback((id: string) => {\n setSelectedEvent(id);\n const target = olRef.current?.querySelector(\n `[data-event-id=\"${id}\"]`,\n ) as HTMLElement | null;\n target?.scrollIntoView({ block: 'center', behavior: 'auto' });\n }, []);\n\n const agentHandle = useMemo<TimelineHandle>(\n () => ({\n getSelectedEvent: () => latestRef.current,\n selectEvent,\n }),\n [selectEvent],\n );\n useImperativeHandle(ref, () => olRef.current as HTMLOListElement, []);\n useAgentRegistration(timelineAgent, agentHandle, props.id);\n\n return (\n <TimelineContext.Provider value={ctx}>\n <ol\n ref={olRef}\n data-component=\"timeline\"\n data-component-id={props.id}\n data-selected-event={selectedEvent ?? undefined}\n className={timelineVariants({ layout, order, className })}\n {...props}\n >\n {children}\n </ol>\n </TimelineContext.Provider>\n );\n },\n);\nTimelineRoot.displayName = 'Timeline';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Event */\n/* ------------------------------------------------------------------ */\n\nconst TimelineEvent = forwardRef<HTMLLIElement, TimelineEventProps>(\n ({ type = 'neutral', eventId, className, children, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n const { t } = useTranslation('ui');\n\n const evtCtx = useMemo(() => ({ type }), [type]);\n\n if (layout === 'alternating') {\n // In alternating layout the <li> uses `contents` so its children\n // participate directly in the parent grid.\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={['ds:contents', className].filter(Boolean).join(' ')}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n }\n\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={eventVariants({ layout, className })}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n },\n);\nTimelineEvent.displayName = 'Timeline.Event';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Dot */\n/* ------------------------------------------------------------------ */\n\nconst TimelineDot = forwardRef<HTMLDivElement, TimelineDotProps>(\n ({ icon, className, ...props }, ref) => {\n const { type } = useContext(TimelineEventContext);\n const { layout } = useContext(TimelineContext);\n\n const dot = (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={dotVariants({ type, className })}\n {...props}\n >\n {icon ?? TYPE_ICONS[type]}\n </div>\n );\n\n if (layout === 'alternating') {\n // In alternating grid: col 2 (centre) for the dot with the rail line\n return (\n <div\n aria-hidden=\"true\"\n className=\"ds:col-start-2 ds:flex ds:flex-col ds:items-center\"\n >\n {/* Rail segment above the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)] ds:first:hidden\" />\n {dot}\n {/* Rail segment below the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)]\" />\n </div>\n );\n }\n\n return dot;\n },\n);\nTimelineDot.displayName = 'Timeline.Dot';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Content */\n/* ------------------------------------------------------------------ */\n\nconst TimelineContent = forwardRef<HTMLDivElement, TimelineContentProps>(\n ({ title, description, actor, children, className, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n\n const inner = (\n <div\n ref={ref}\n className={[\n 'ds:flex-1 ds:min-w-0 ds:pb-[var(--spacing-md)]',\n // Wrap policy: `break-word` (not `anywhere`) preserves word-\n // boundary wrapping for natural-language titles / descriptions;\n // only genuinely unbreakable strings (URLs, hashes) break mid-\n // word when they would otherwise overflow. `anywhere` introduces\n // a soft-wrap opportunity at every character boundary, which\n // chopped Italian / German labels mid-word when an event card\n // sat in a narrow context.\n 'ds:[&_*]:break-normal ds:[&_*]:[overflow-wrap:break-word]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n <Card variant=\"outlined\">\n <Card.Body>\n <p className=\"type-label ds:text-[var(--foreground)]\">{title}</p>\n {description && (\n <div className=\"ds:mt-[var(--spacing-xs)] type-body-sm ds:text-[var(--muted-foreground)]\">\n {description}\n </div>\n )}\n {actor && (\n <div className=\"ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Avatar size=\"xs\" name={actor.name} src={actor.src} />\n <span className=\"type-meta ds:text-[var(--muted-foreground)]\">\n {actor.name}\n </span>\n </div>\n )}\n {children}\n </Card.Body>\n </Card>\n </div>\n );\n\n if (layout === 'alternating') {\n // Alternating: odd events in col 1 (start), even events in col 3 (end).\n // We use CSS nth-child targeting via a wrapper that sets col placement.\n return (\n <div className=\"ds:col-span-1 ds:[li:nth-child(even)_&]:col-start-3 ds:[li:nth-child(odd)_&]:col-start-1\">\n {inner}\n </div>\n );\n }\n\n return inner;\n },\n);\nTimelineContent.displayName = 'Timeline.Content';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Timestamp — thin wrapper over the shared Timestamp */\n/* component. Keeps the existing API (`date`, `relative`, `format`) */\n/* for backward compatibility; adds tabular-nums because timeline */\n/* timestamps sit in a rail gutter and benefit from column-aligned */\n/* digits. */\n/* ------------------------------------------------------------------ */\n\nconst TWENTY_FOUR_HOURS_MS = 24 * 60 * 60 * 1000;\n\nconst TimelineTimestamp = forwardRef<HTMLTimeElement, TimelineTimestampProps>(\n (\n {\n date,\n locale,\n relative = true,\n format = { dateStyle: 'medium', timeStyle: 'short' },\n className,\n ...props\n },\n ref,\n ) => (\n <Timestamp\n ref={ref}\n value={date}\n locale={locale}\n format={relative ? 'relative' : 'absolute'}\n relativeWindow={relative ? TWENTY_FOUR_HOURS_MS : undefined}\n absoluteFormat={format}\n className={[\n 'ds:text-[var(--muted-foreground)]',\n 'ds:[font-variant-numeric:var(--font-feature-tabular)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n ),\n);\nTimelineTimestamp.displayName = 'Timeline.Timestamp';\n\n/* ------------------------------------------------------------------ */\n/* Compound export */\n/* ------------------------------------------------------------------ */\n\nexport const Timeline = Object.assign(TimelineRoot, {\n Event: TimelineEvent,\n Dot: TimelineDot,\n Content: TimelineContent,\n Timestamp: TimelineTimestamp,\n});\n"],"names":["timelineAgent","handle","args","TimelineContext","createContext","TimelineEventContext","timelineVariants","cva","eventVariants","dotVariants","TYPE_ICONS","jsx","Info","Check","TriangleAlert","X","Circle","TimelineRoot","forwardRef","layout","order","className","children","props","ref","ctx","useMemo","olRef","useRef","selectedEvent","setSelectedEvent","useState","latestRef","selectEvent","useCallback","id","target","_a","agentHandle","useImperativeHandle","useAgentRegistration","TimelineEvent","type","eventId","useContext","t","useTranslation","evtCtx","jsxs","TimelineDot","icon","dot","TimelineContent","title","description","actor","inner","Card","Avatar","TWENTY_FOUR_HOURS_MS","TimelineTimestamp","date","locale","relative","format","Timestamp","Timeline"],"mappings":";;;;;;;;;;;;;AAOO,MAAMA,IAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,eAAe;AAAA,EAC9B,OAAO;AAAA,IACL,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS;AAAA,IACP,cAAc;AAAA,MACZ,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,YAAYC,EAAK,EAAE;AAAA,MAC5B;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP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AzC;AAAA,MACA,OAAOqC;AAAA,MACP,QAAAC;AAAA,MACA,QAAQC,IAAW,aAAa;AAAA,MAChC,gBAAgBA,IAAWJ,IAAuB;AAAA,MAClD,gBAAgBK;AAAA,MAChB,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA3C;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AACAqC,EAAkB,cAAc;AAMzB,MAAMM,KAAW,OAAO,OAAOjD,GAAc;AAAA,EAClD,OAAOwB;AAAA,EACP,KAAKQ;AAAA,EACL,SAASG;AAAA,EACT,WAAWQ;AACb,CAAC;"}
|
|
1
|
+
{"version":3,"file":"timeline-CKUaBZOx.js","sources":["../../src/components/timeline/timeline.agent.ts","../../src/components/timeline/timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — Timeline. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TimelineHandle } from './timeline';\n\nexport const timelineAgent: AgentAdapter<TimelineHandle> = {\n id: 'timeline',\n // `select_event` persists `selectedEvent` state, so this is single-selection\n // (`select_single`), not a transient `pick`. See PRS §26 §4.\n capabilities: ['select_single'],\n state: {\n selectedEvent: {\n type: 'string | null',\n descriptionKey: 'ui.agent.timeline.state.selectedEvent',\n description: 'Opaque event id of the currently-active event, or null.',\n read: (handle) => handle.getSelectedEvent(),\n },\n },\n actions: {\n select_event: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.timeline.actions.selectEvent',\n description: 'Scroll the given event into view and mark it as selected.',\n invoke: (handle, args: { id: string }) => {\n handle.selectEvent(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'timeline',\n description: 'Marks the Timeline root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-event-id',\n description:\n 'Opaque event id emitted on each Timeline.Event when the `eventId` prop is provided.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type LiHTMLAttributes,\n type OlHTMLAttributes,\n type ReactNode,\n type TimeHTMLAttributes,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { TriangleAlert, Check, Circle, Info, X } from 'lucide-react';\nimport { Avatar } from '../avatar';\nimport { Card } from '../card';\nimport { Timestamp } from '../timestamp';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { timelineAgent } from './timeline.agent';\n\n// TODO: optional @tanstack/react-virtual integration for 500+ events\n\n/* ------------------------------------------------------------------ */\n/* Context */\n/* ------------------------------------------------------------------ */\n\ntype EventType = 'info' | 'success' | 'warning' | 'error' | 'neutral';\ntype Layout = 'rail-start' | 'rail-end' | 'alternating';\n\ninterface TimelineContextValue {\n layout: Layout;\n order: 'newest-first' | 'oldest-first';\n}\n\nconst TimelineContext = createContext<TimelineContextValue>({\n layout: 'rail-start',\n order: 'newest-first',\n});\n\ninterface TimelineEventContextValue {\n type: EventType;\n}\n\nconst TimelineEventContext = createContext<TimelineEventContextValue>({\n type: 'neutral',\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — root */\n/* ------------------------------------------------------------------ */\n\nconst timelineVariants = cva('ds:flex ds:flex-col', {\n variants: {\n layout: {\n 'rail-start': 'ds:ps-4',\n 'rail-end': 'ds:pe-4',\n alternating:\n 'ds:grid ds:grid-cols-[1fr_2rem_1fr] ds:gap-x-[var(--spacing-md)]',\n },\n order: {\n 'newest-first': 'ds:flex-col',\n 'oldest-first': 'ds:flex-col-reverse',\n },\n },\n defaultVariants: { layout: 'rail-start', order: 'newest-first' },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — event item */\n/* ------------------------------------------------------------------ */\n\nconst eventVariants = cva(\n 'ds:relative ds:flex ds:gap-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n {\n variants: {\n layout: {\n 'rail-start': [\n 'ds:flex-row',\n // Rail: continuous line from this dot centre to the next dot centre\n 'ds:before:absolute ds:before:[inset-block-start:var(--spacing-md)] ds:before:[inset-block-end:calc(var(--spacing-md)*-1)]',\n 'ds:before:[inline-size:var(--border-width-md)] ds:before:bg-[var(--border)]',\n 'ds:before:[inset-inline-start:calc(var(--spacing-md)_-_var(--border-width-md)/2)]',\n 'ds:last:before:hidden',\n ].join(' '),\n 'rail-end': [\n 'ds:flex-row-reverse',\n 'ds:before:absolute ds:before:[inset-block-start:var(--spacing-md)] ds:before:[inset-block-end:calc(var(--spacing-md)*-1)]',\n 'ds:before:[inline-size:var(--border-width-md)] ds:before:bg-[var(--border)]',\n 'ds:before:[inset-inline-end:calc(var(--spacing-md)_-_var(--border-width-md)/2)]',\n 'ds:last:before:hidden',\n ].join(' '),\n alternating: 'ds:contents',\n },\n },\n defaultVariants: { layout: 'rail-start' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — dot */\n/* ------------------------------------------------------------------ */\n\nconst dotVariants = cva(\n [\n 'ds:relative ds:z-10 ds:flex ds:items-center ds:justify-center',\n 'ds:rounded-[var(--radius-full)] ds:shrink-0',\n 'ds:size-8',\n 'ds:ring-2 ds:ring-[var(--background)]',\n ].join(' '),\n {\n variants: {\n type: {\n info: 'ds:bg-[var(--info)] ds:text-[var(--info-solid-foreground)]',\n success:\n 'ds:bg-[var(--success)] ds:text-[var(--success-solid-foreground)]',\n warning:\n 'ds:bg-[var(--warning)] ds:text-[var(--warning-solid-foreground)]',\n error:\n 'ds:bg-[var(--destructive)] ds:text-[var(--destructive-foreground)]',\n neutral: 'ds:bg-[var(--muted)] ds:text-[var(--muted-foreground)]',\n },\n },\n defaultVariants: { type: 'neutral' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface TimelineProps\n extends\n Omit<OlHTMLAttributes<HTMLOListElement>, 'color'>,\n VariantProps<typeof timelineVariants> {\n layout?: Layout;\n order?: 'newest-first' | 'oldest-first';\n children: ReactNode;\n className?: string;\n}\n\nexport interface TimelineEventProps extends LiHTMLAttributes<HTMLLIElement> {\n type?: EventType;\n /** Opaque event id — when set, the component emits `data-event-id` for agent addressing. */\n eventId?: string;\n children: ReactNode;\n className?: string;\n}\n\n/** Curated imperative handle for agent / external automation. */\nexport interface TimelineHandle {\n getSelectedEvent: () => string | null;\n selectEvent: (id: string) => void;\n}\n\nexport interface TimelineDotProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineContentProps extends HTMLAttributes<HTMLDivElement> {\n title: string;\n description?: ReactNode;\n actor?: { name: string; src?: string };\n children?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineTimestampProps extends TimeHTMLAttributes<HTMLTimeElement> {\n date: Date | string;\n /** Overrides the active language for date and time formatting. */\n locale?: string;\n relative?: boolean;\n format?: Intl.DateTimeFormatOptions;\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Default icons per type */\n/* ------------------------------------------------------------------ */\n\nconst TYPE_ICONS: Record<EventType, ReactNode> = {\n info: <Info size={16} aria-hidden=\"true\" />,\n success: <Check size={16} aria-hidden=\"true\" />,\n warning: <TriangleAlert size={16} aria-hidden=\"true\" />,\n error: <X size={16} aria-hidden=\"true\" />,\n neutral: <Circle size={16} aria-hidden=\"true\" />,\n};\n\n/* ------------------------------------------------------------------ */\n/* Timeline root */\n/* ------------------------------------------------------------------ */\n\nconst TimelineRoot = forwardRef<HTMLOListElement, TimelineProps>(\n (\n {\n layout = 'rail-start',\n order = 'newest-first',\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const ctx = useMemo(() => ({ layout, order }), [layout, order]);\n const olRef = useRef<HTMLOListElement | null>(null);\n const [selectedEvent, setSelectedEvent] = useState<string | null>(null);\n const latestRef = useRef<string | null>(null);\n latestRef.current = selectedEvent;\n\n const selectEvent = useCallback((id: string) => {\n setSelectedEvent(id);\n const target = olRef.current?.querySelector(\n `[data-event-id=\"${id}\"]`,\n ) as HTMLElement | null;\n target?.scrollIntoView({ block: 'center', behavior: 'auto' });\n }, []);\n\n const agentHandle = useMemo<TimelineHandle>(\n () => ({\n getSelectedEvent: () => latestRef.current,\n selectEvent,\n }),\n [selectEvent],\n );\n useImperativeHandle(ref, () => olRef.current as HTMLOListElement, []);\n useAgentRegistration(timelineAgent, agentHandle, props.id);\n\n return (\n <TimelineContext.Provider value={ctx}>\n <ol\n ref={olRef}\n data-component=\"timeline\"\n data-component-id={props.id}\n data-selected-event={selectedEvent ?? undefined}\n className={timelineVariants({ layout, order, className })}\n {...props}\n >\n {children}\n </ol>\n </TimelineContext.Provider>\n );\n },\n);\nTimelineRoot.displayName = 'Timeline';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Event */\n/* ------------------------------------------------------------------ */\n\nconst TimelineEvent = forwardRef<HTMLLIElement, TimelineEventProps>(\n ({ type = 'neutral', eventId, className, children, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n const { t } = useTranslation('ui');\n\n const evtCtx = useMemo(() => ({ type }), [type]);\n\n if (layout === 'alternating') {\n // In alternating layout the <li> uses `contents` so its children\n // participate directly in the parent grid.\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={['ds:contents', className].filter(Boolean).join(' ')}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n }\n\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={eventVariants({ layout, className })}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n },\n);\nTimelineEvent.displayName = 'Timeline.Event';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Dot */\n/* ------------------------------------------------------------------ */\n\nconst TimelineDot = forwardRef<HTMLDivElement, TimelineDotProps>(\n ({ icon, className, ...props }, ref) => {\n const { type } = useContext(TimelineEventContext);\n const { layout } = useContext(TimelineContext);\n\n const dot = (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={dotVariants({ type, className })}\n {...props}\n >\n {icon ?? TYPE_ICONS[type]}\n </div>\n );\n\n if (layout === 'alternating') {\n // In alternating grid: col 2 (centre) for the dot with the rail line\n return (\n <div\n aria-hidden=\"true\"\n className=\"ds:col-start-2 ds:flex ds:flex-col ds:items-center\"\n >\n {/* Rail segment above the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)] ds:first:hidden\" />\n {dot}\n {/* Rail segment below the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)]\" />\n </div>\n );\n }\n\n return dot;\n },\n);\nTimelineDot.displayName = 'Timeline.Dot';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Content */\n/* ------------------------------------------------------------------ */\n\nconst TimelineContent = forwardRef<HTMLDivElement, TimelineContentProps>(\n ({ title, description, actor, children, className, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n\n const inner = (\n <div\n ref={ref}\n className={[\n 'ds:flex-1 ds:min-w-0 ds:pb-[var(--spacing-md)]',\n // Wrap policy: `break-word` (not `anywhere`) preserves word-\n // boundary wrapping for natural-language titles / descriptions;\n // only genuinely unbreakable strings (URLs, hashes) break mid-\n // word when they would otherwise overflow. `anywhere` introduces\n // a soft-wrap opportunity at every character boundary, which\n // chopped Italian / German labels mid-word when an event card\n // sat in a narrow context.\n 'ds:[&_*]:break-normal ds:[&_*]:[overflow-wrap:break-word]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n <Card variant=\"outlined\">\n <Card.Body>\n <p className=\"type-label ds:text-[var(--foreground)]\">{title}</p>\n {description && (\n <div className=\"ds:mt-[var(--spacing-xs)] type-body-sm ds:text-[var(--muted-foreground)]\">\n {description}\n </div>\n )}\n {actor && (\n <div className=\"ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Avatar size=\"xs\" name={actor.name} src={actor.src} />\n <span className=\"type-meta ds:text-[var(--muted-foreground)]\">\n {actor.name}\n </span>\n </div>\n )}\n {children}\n </Card.Body>\n </Card>\n </div>\n );\n\n if (layout === 'alternating') {\n // Alternating: odd events in col 1 (start), even events in col 3 (end).\n // We use CSS nth-child targeting via a wrapper that sets col placement.\n return (\n <div className=\"ds:col-span-1 ds:[li:nth-child(even)_&]:col-start-3 ds:[li:nth-child(odd)_&]:col-start-1\">\n {inner}\n </div>\n );\n }\n\n return inner;\n },\n);\nTimelineContent.displayName = 'Timeline.Content';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Timestamp — thin wrapper over the shared Timestamp */\n/* component. Keeps the existing API (`date`, `relative`, `format`) */\n/* for backward compatibility; adds tabular-nums because timeline */\n/* timestamps sit in a rail gutter and benefit from column-aligned */\n/* digits. */\n/* ------------------------------------------------------------------ */\n\nconst TWENTY_FOUR_HOURS_MS = 24 * 60 * 60 * 1000;\n\nconst TimelineTimestamp = forwardRef<HTMLTimeElement, TimelineTimestampProps>(\n (\n {\n date,\n locale,\n relative = true,\n format = { dateStyle: 'medium', timeStyle: 'short' },\n className,\n ...props\n },\n ref,\n ) => (\n <Timestamp\n ref={ref}\n value={date}\n locale={locale}\n format={relative ? 'relative' : 'absolute'}\n relativeWindow={relative ? TWENTY_FOUR_HOURS_MS : undefined}\n absoluteFormat={format}\n className={[\n 'ds:text-[var(--muted-foreground)]',\n 'ds:[font-variant-numeric:var(--font-feature-tabular)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n ),\n);\nTimelineTimestamp.displayName = 'Timeline.Timestamp';\n\n/* ------------------------------------------------------------------ */\n/* Compound export */\n/* ------------------------------------------------------------------ */\n\nexport const Timeline = Object.assign(TimelineRoot, {\n Event: TimelineEvent,\n Dot: TimelineDot,\n Content: TimelineContent,\n Timestamp: TimelineTimestamp,\n});\n"],"names":["timelineAgent","handle","args","TimelineContext","createContext","TimelineEventContext","timelineVariants","cva","eventVariants","dotVariants","TYPE_ICONS","jsx","Info","Check","TriangleAlert","X","Circle","TimelineRoot","forwardRef","layout","order","className","children","props","ref","ctx","useMemo","olRef","useRef","selectedEvent","setSelectedEvent","useState","latestRef","selectEvent","useCallback","id","target","_a","agentHandle","useImperativeHandle","useAgentRegistration","TimelineEvent","type","eventId","useContext","t","useTranslation","evtCtx","jsxs","TimelineDot","icon","dot","TimelineContent","title","description","actor","inner","Card","Avatar","TWENTY_FOUR_HOURS_MS","TimelineTimestamp","date","locale","relative","format","Timestamp","Timeline"],"mappings":";;;;;;;;;;;;;AAOO,MAAMA,IAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,eAAe;AAAA,EAC9B,OAAO;AAAA,IACL,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS;AAAA,IACP,cAAc;AAAA,MACZ,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,YAAYC,EAAK,EAAE;AAAA,MAC5B;AAAA,IAAA;AAAA,EACF;AA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AGE;AAAA,EAAA,GAELC,MAEA,gBAAAb;AAAA,IAACsD;AAAA,IAAA;AAAA,MACC,KAAAzC;AAAA,MACA,OAAOqC;AAAA,MACP,QAAAC;AAAA,MACA,QAAQC,IAAW,aAAa;AAAA,MAChC,gBAAgBA,IAAWJ,IAAuB;AAAA,MAClD,gBAAgBK;AAAA,MAChB,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA3C;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AACAqC,EAAkB,cAAc;AAMzB,MAAMM,KAAW,OAAO,OAAOjD,GAAc;AAAA,EAClD,OAAOwB;AAAA,EACP,KAAKQ;AAAA,EACL,SAASG;AAAA,EACT,WAAWQ;AACb,CAAC;"}
|
|
@@ -16,7 +16,7 @@ import { E as zt } from "./editable-description-KU56SP4P.js";
|
|
|
16
16
|
import { N as Xe } from "./note-timeline-BrjHBQfx.js";
|
|
17
17
|
import { P as Ot } from "./panel-header-CbtlTe85.js";
|
|
18
18
|
import { P as Ge } from "./panel-subview-DCyvn-49.js";
|
|
19
|
-
import { P as _t } from "./patient-summary-card-
|
|
19
|
+
import { P as _t } from "./patient-summary-card-B4Ijw_ig.js";
|
|
20
20
|
import { S as ne } from "./section-card-D1sV4Voz.js";
|
|
21
21
|
import { C as nn, S as ue } from "./skeleton-tTWJpvAq.js";
|
|
22
22
|
import { T as an } from "./text-area-COMVJ1yE.js";
|
|
@@ -26,7 +26,7 @@ import { a as Nt } from "./whatsapp-button-DV9JFmtq.js";
|
|
|
26
26
|
import { a as Ft, W as on } from "./workflow-status-9wb7iWUd.js";
|
|
27
27
|
import { u as ot, a as At, i as rn } from "./appointment-workflow-status-DMjuIK90.js";
|
|
28
28
|
import { E as dn } from "./empty-state-DwJ5YNzz.js";
|
|
29
|
-
import { T as Ae } from "./timeline-
|
|
29
|
+
import { T as Ae } from "./timeline-CKUaBZOx.js";
|
|
30
30
|
import { C as rt } from "./calendar-clock-hbObjfGY.js";
|
|
31
31
|
import { T as $t } from "./trash-2-uumy3fy1.js";
|
|
32
32
|
import { A as Ve } from "./entity-card-fpm-KUKc.js";
|
|
@@ -35,7 +35,7 @@ import { P as me } from "./pencil-B1sKKyuT.js";
|
|
|
35
35
|
import { C as Je } from "./clock-Drd4Wtis.js";
|
|
36
36
|
import { c as Fe } from "./createLucideIcon-DhHxpK9K.js";
|
|
37
37
|
import { A as cn } from "./arrow-right-KsIrLdt0.js";
|
|
38
|
-
import { A as Ze } from "./avatar-
|
|
38
|
+
import { A as Ze } from "./avatar-Dp5apm1d.js";
|
|
39
39
|
import { B as $e } from "./badge-BUk4RjTS.js";
|
|
40
40
|
import { H as dt } from "./heart-pulse-BCppJyN2.js";
|
|
41
41
|
import { G as un } from "./globe-sHBW1JN5.js";
|
|
@@ -2195,4 +2195,4 @@ export {
|
|
|
2195
2195
|
Kn as s,
|
|
2196
2196
|
_s as u
|
|
2197
2197
|
};
|
|
2198
|
-
//# sourceMappingURL=use-appointment-details-read-
|
|
2198
|
+
//# sourceMappingURL=use-appointment-details-read-DawTb1SQ.js.map
|