@alfadocs/ui-kit-debug 0.31.8 → 0.32.1
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-DtGlQde1.js → agenda-card-CFyWSX7Z.js} +2 -2
- package/dist/_chunks/{agenda-card-DtGlQde1.js.map → agenda-card-CFyWSX7Z.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-CXmlwt2K.js → agenda-tray-By_asPN9.js} +2 -2
- package/dist/_chunks/{agenda-tray-CXmlwt2K.js.map → agenda-tray-By_asPN9.js.map} +1 -1
- package/dist/_chunks/{badge-B9Cr6iEB.js → badge-zsf5i5bH.js} +9 -2
- package/dist/_chunks/badge-zsf5i5bH.js.map +1 -0
- package/dist/_chunks/{benefit-card-B86DH-PE.js → benefit-card-_Sc-MGha.js} +18 -8
- package/dist/_chunks/benefit-card-_Sc-MGha.js.map +1 -0
- package/dist/_chunks/{booking-A4o9xI2n.js → booking-h_kBZM6M.js} +24 -26
- package/dist/_chunks/{booking-A4o9xI2n.js.map → booking-h_kBZM6M.js.map} +1 -1
- package/dist/_chunks/{card-CNri9ssR.js → card-DPmk26CL.js} +2 -2
- package/dist/_chunks/{card-CNri9ssR.js.map → card-DPmk26CL.js.map} +1 -1
- package/dist/_chunks/{contact-card-Dos7Tley.js → contact-card-Cf8Ktyt3.js} +2 -2
- package/dist/_chunks/{contact-card-Dos7Tley.js.map → contact-card-Cf8Ktyt3.js.map} +1 -1
- package/dist/_chunks/{practice-profile-card-CfAMeTxQ.js → contact-profile-card-Ce-LIDU8.js} +128 -125
- package/dist/_chunks/contact-profile-card-Ce-LIDU8.js.map +1 -0
- package/dist/_chunks/{editable-currency-cell-renderer-YvTwkFrD.js → editable-currency-cell-renderer-B9VRSV_S.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-YvTwkFrD.js.map → editable-currency-cell-renderer-B9VRSV_S.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-CYE7NSpM.js → key-value-pair-CkQIb9EG.js} +42 -32
- package/dist/_chunks/key-value-pair-CkQIb9EG.js.map +1 -0
- package/dist/_chunks/{map-view-WEWqXzof.js → map-view-knHSNLoe.js} +140 -128
- package/dist/_chunks/{map-view-WEWqXzof.js.map → map-view-knHSNLoe.js.map} +1 -1
- package/dist/_chunks/{operator-hero-BsjE-kJF.js → operator-hero-7LiiP7zi.js} +4 -4
- package/dist/_chunks/operator-hero-7LiiP7zi.js.map +1 -0
- package/dist/_chunks/{patient-search-CSDru7QW.js → patient-search-CBq62kmL.js} +2 -2
- package/dist/_chunks/{patient-search-CSDru7QW.js.map → patient-search-CBq62kmL.js.map} +1 -1
- package/dist/_chunks/{practice-results-CIkAdwRm.js → practice-results-Bw5fJTYF.js} +4 -4
- package/dist/_chunks/practice-results-Bw5fJTYF.js.map +1 -0
- package/dist/_chunks/{reviews-panel-Cjys8G8K.js → reviews-panel-B-18RBSn.js} +39 -36
- package/dist/_chunks/reviews-panel-B-18RBSn.js.map +1 -0
- package/dist/_chunks/{stat-CYEx8sIR.js → stat-EC2Papj7.js} +14 -14
- package/dist/_chunks/stat-EC2Papj7.js.map +1 -0
- package/dist/_chunks/{timeline-BZC7qGdy.js → timeline-DQa5Tyz4.js} +2 -2
- package/dist/_chunks/{timeline-BZC7qGdy.js.map → timeline-DQa5Tyz4.js.map} +1 -1
- package/dist/_chunks/{workflow-map-DfpjDZHK.js → workflow-map-uSiHbOWQ.js} +4 -4
- package/dist/_chunks/{workflow-map-DfpjDZHK.js.map → workflow-map-uSiHbOWQ.js.map} +1 -1
- package/dist/agent-catalog.json +28 -28
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/benefit-card/benefit-card.d.ts.map +1 -1
- package/dist/components/benefit-card/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.agent.d.ts +4 -0
- package/dist/components/contact-profile-card/contact-profile-card.agent.d.ts.map +1 -0
- package/dist/components/{practice-profile-card/practice-profile-card.d.ts → contact-profile-card/contact-profile-card.d.ts} +9 -9
- package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -0
- package/dist/components/contact-profile-card/index.d.ts +4 -0
- package/dist/components/contact-profile-card/index.d.ts.map +1 -0
- package/dist/components/contact-profile-card/index.js +8 -0
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +1 -1
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +1 -1
- package/dist/components/patient-search/index.js +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/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts.map +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -1
- package/dist/i18n/locales/ar.js +2 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -1
- package/dist/i18n/locales/de.js +2 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -1
- package/dist/i18n/locales/el.js +2 -2
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -1
- package/dist/i18n/locales/en.js +2 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -1
- package/dist/i18n/locales/es.js +2 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -1
- package/dist/i18n/locales/fr.js +2 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -1
- package/dist/i18n/locales/hi.js +2 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -1
- package/dist/i18n/locales/it.js +2 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -1
- package/dist/i18n/locales/ja.js +2 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -1
- package/dist/i18n/locales/nl.js +2 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -1
- package/dist/i18n/locales/pl.js +2 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -1
- package/dist/i18n/locales/pt.js +2 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -1
- package/dist/i18n/locales/ro.js +2 -2
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -1
- package/dist/i18n/locales/ru.js +2 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -1
- package/dist/i18n/locales/sq.js +2 -2
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -1
- package/dist/i18n/locales/sv.js +2 -2
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -1
- package/dist/i18n/locales/tr.js +2 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -1
- package/dist/i18n/locales/zh.js +2 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +113 -113
- package/dist/locales/ar.json +1 -1
- package/dist/locales/de.json +1 -1
- package/dist/locales/el.json +1 -1
- package/dist/locales/en.json +1 -1
- package/dist/locales/es.json +1 -1
- package/dist/locales/fr.json +1 -1
- package/dist/locales/hi.json +1 -1
- package/dist/locales/it.json +1 -1
- package/dist/locales/ja.json +1 -1
- package/dist/locales/nl.json +1 -1
- package/dist/locales/pl.json +1 -1
- package/dist/locales/pt.json +1 -1
- package/dist/locales/ro.json +1 -1
- package/dist/locales/ru.json +1 -1
- package/dist/locales/sq.json +1 -1
- package/dist/locales/sv.json +1 -1
- package/dist/locales/tr.json +1 -1
- package/dist/locales/zh.json +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +4 -4
- package/dist/_chunks/badge-B9Cr6iEB.js.map +0 -1
- package/dist/_chunks/benefit-card-B86DH-PE.js.map +0 -1
- package/dist/_chunks/key-value-pair-CYE7NSpM.js.map +0 -1
- package/dist/_chunks/operator-hero-BsjE-kJF.js.map +0 -1
- package/dist/_chunks/practice-profile-card-CfAMeTxQ.js.map +0 -1
- package/dist/_chunks/practice-results-CIkAdwRm.js.map +0 -1
- package/dist/_chunks/reviews-panel-Cjys8G8K.js.map +0 -1
- package/dist/_chunks/stat-CYEx8sIR.js.map +0 -1
- package/dist/components/practice-profile-card/index.d.ts +0 -4
- package/dist/components/practice-profile-card/index.d.ts.map +0 -1
- package/dist/components/practice-profile-card/index.js +0 -8
- package/dist/components/practice-profile-card/practice-profile-card.agent.d.ts +0 -4
- package/dist/components/practice-profile-card/practice-profile-card.agent.d.ts.map +0 -1
- package/dist/components/practice-profile-card/practice-profile-card.d.ts.map +0 -1
- /package/dist/components/{practice-profile-card → contact-profile-card}/index.js.map +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfadocs/ui-kit-debug",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe. (debug build — identical runtime to @alfadocs/ui-kit, ships source maps for symbolication).",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -315,9 +315,9 @@
|
|
|
315
315
|
"types": "./dist/components/patient-search/index.d.ts",
|
|
316
316
|
"import": "./dist/components/patient-search/index.js"
|
|
317
317
|
},
|
|
318
|
-
"./
|
|
319
|
-
"types": "./dist/components/
|
|
320
|
-
"import": "./dist/components/
|
|
318
|
+
"./contact-profile-card": {
|
|
319
|
+
"types": "./dist/components/contact-profile-card/index.d.ts",
|
|
320
|
+
"import": "./dist/components/contact-profile-card/index.js"
|
|
321
321
|
},
|
|
322
322
|
"./practice-results": {
|
|
323
323
|
"types": "./dist/components/practice-results/index.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"badge-B9Cr6iEB.js","sources":["../../src/components/badge/badge.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Tooltip } from '../tooltip';\n\n/* ------------------------------------------------------------------ */\n/* CVA — badge root */\n/* ------------------------------------------------------------------ */\n\nconst badgeVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-1',\n // Typography comes from the eyebrow role: Medium 500 + uppercase + expanded tracking.\n // CVA size variants below override just `--type-eyebrow-size` so weight/transform/\n // tracking/line-height stay role-owned — same chip-family pattern as Tag.\n 'type-eyebrow',\n 'ds:whitespace-nowrap',\n 'ds:focus-visible:outline-none',\n 'ds:focus-visible:ring-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:ring-[color:var(--ring)]',\n 'ds:focus-visible:ring-offset-[length:var(--focus-ring-offset)]',\n ].join(' '),\n {\n variants: {\n variant: {\n neutral: 'ds:bg-muted/20 ds:text-muted-foreground',\n info: 'ds:bg-info/15 ds:text-[var(--info-foreground)]',\n success: 'ds:bg-success/15 ds:text-[var(--success-foreground)]',\n warning: 'ds:bg-warning/15 ds:text-[var(--warning-foreground)]',\n error: 'ds:bg-destructive/15 ds:text-[var(--error-foreground)]',\n // Solid-fill brand variants — no border, foreground paired with the\n // semantic token. Use for trust-signal chips in hero contexts where\n // a tonal `info` / `neutral` would blend into the brand backdrop.\n brand: 'ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]',\n accent: 'ds:bg-[var(--accent)] ds:text-[var(--accent-foreground)]',\n },\n size: {\n sm: 'ds:h-4 ds:ps-1 ds:pe-1 ds:[--type-eyebrow-size:var(--font-size-2xs)]',\n md: 'ds:h-5 ds:ps-1.5 ds:pe-1.5 ds:[--type-eyebrow-size:var(--font-size-2xs)]',\n lg: 'ds:h-6 ds:ps-2 ds:pe-2 ds:[--type-eyebrow-size:var(--font-size-xs)]',\n },\n shape: {\n pill: 'ds:rounded-[var(--radius-full)]',\n rectangular: 'ds:rounded-[var(--radius-sm)]',\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'md',\n shape: 'pill',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — leading dot */\n/* ------------------------------------------------------------------ */\n\nconst dotVariants = cva(\n 'ds:text-[length:var(--font-size-dot)] ds:leading-none ds:shrink-0',\n {\n variants: {\n variant: {\n neutral: 'ds:text-muted-foreground',\n info: 'ds:text-info',\n success: 'ds:text-success',\n warning: 'ds:text-warning',\n error: 'ds:text-destructive',\n // Solid-fill variants: dot draws in the paired foreground tone so\n // it stays visible against the saturated primary/accent fill.\n brand: 'ds:text-[var(--primary-foreground)]',\n accent: 'ds:text-[var(--accent-foreground)]',\n },\n },\n defaultVariants: { variant: 'neutral' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — leading icon wrapper */\n/* ------------------------------------------------------------------ */\n\nconst iconWrapperVariants = cva('ds:shrink-0 ds:[&>svg]:block', {\n variants: {\n size: {\n // Icons shrink with the compact Badge scale: sm badge is 16 px tall, so\n // a 10 px glyph leaves room for the 1 px internal padding.\n sm: 'ds:[&>svg]:size-2.5',\n md: 'ds:[&>svg]:size-3',\n lg: 'ds:[&>svg]:size-3.5',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\n/* ------------------------------------------------------------------ */\n/* BadgeProps */\n/* ------------------------------------------------------------------ */\n\nexport interface BadgeProps\n extends\n React.HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof badgeVariants> {\n /** Leading icon — renders before the label */\n leading?: ReactNode;\n /** Show a leading dot indicator (● shape) for colour-blind accessibility */\n withDot?: boolean;\n /** Truncate long text with ellipsis + tooltip showing full text */\n truncate?: boolean;\n /** For icon-only badges — provides the accessible name */\n 'aria-label'?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Badge */\n/* ------------------------------------------------------------------ */\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (\n {\n variant = 'neutral',\n size = 'md',\n shape = 'pill',\n leading,\n withDot = false,\n truncate = false,\n className,\n children,\n 'aria-label': ariaLabel,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n const isIconOnly = !children && !!ariaLabel;\n const isCount = typeof children === 'number';\n\n const badge = (\n <span\n ref={ref}\n className={badgeVariants({ variant, size, shape, className })}\n data-component=\"badge\"\n role={isIconOnly ? 'img' : undefined}\n aria-label={isIconOnly ? ariaLabel : undefined}\n {...props}\n >\n {withDot && (\n <span aria-hidden=\"true\" className={dotVariants({ variant })}>\n ●\n </span>\n )}\n {leading && (\n <span aria-hidden=\"true\" className={iconWrapperVariants({ size })}>\n {leading}\n </span>\n )}\n {!isIconOnly &&\n (isCount ? (\n <>\n <span aria-hidden=\"true\">{children}</span>\n <span className=\"ds:sr-only\">\n {t('badge.notifications', { count: children })}\n </span>\n </>\n ) : truncate ? (\n <span className=\"ds:max-w-[var(--badge-truncate-max-width)] ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap\">\n {children}\n </span>\n ) : (\n children\n ))}\n </span>\n );\n\n if (truncate && typeof children === 'string') {\n return <Tooltip label={children}>{badge}</Tooltip>;\n }\n\n return badge;\n },\n);\n\nBadge.displayName = 'Badge';\n"],"names":["badgeVariants","cva","dotVariants","iconWrapperVariants","Badge","forwardRef","variant","size","shape","leading","withDot","truncate","className","children","ariaLabel","props","ref","t","useTranslation","isIconOnly","isCount","badge","jsxs","jsx","Fragment","Tooltip"],"mappings":";;;;;AASA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,IACE;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA;AAAA;AAAA;AAAA,QAIP,OAAO;AAAA,QACP,QAAQ;AAAA,MAAA;AAAA,MAEV,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,aAAa;AAAA,MAAA;AAAA,IACf;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ,GAMMC,IAAcD;AAAA,EAClB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA;AAAA;AAAA,QAGP,OAAO;AAAA,QACP,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,EAAE,SAAS,UAAA;AAAA,EAAU;AAE1C,GAMME,IAAsBF,EAAI,gCAAgC;AAAA,EAC9D,UAAU;AAAA,IACR,MAAM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AuB,EAAE,OAAOJ,EAAA,CAAU,EAAA,CAC/C;AAAA,UAAA,GACF,IACEF,IACF,gBAAAY,EAAC,UAAK,WAAU,uGACb,UAAAV,GACH,IAEAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAKR,WAAIF,KAAY,OAAOE,KAAa,WAC3B,gBAAAU,EAACE,GAAA,EAAQ,OAAOZ,GAAW,UAAAQ,GAAM,IAGnCA;AAAA,EACT;AACF;AAEAjB,EAAM,cAAc;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"benefit-card-B86DH-PE.js","sources":["../../src/components/benefit-card/benefit-card.tsx"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* BenefitCard — marketing-surface card for \"benefit row\" / \"how it */\n/* works\" / \"why choose us\" sections. */\n/* */\n/* Visually distinguished from <Card> by: */\n/* 1. A 4px accent strip across the top (logical block-start). */\n/* 2. A tinted icon chip inside the body using `color-mix(in srgb, */\n/* var(--accent-token) 12%, var(--background))`. */\n/* 3. An optional zero-padded step chip (\"01\", \"02\", ...) in the */\n/* top-end corner. */\n/* 4. A hover lift (translateY -2px + --shadow-hover), gated through */\n/* `--animation-duration` so the accessible theme freezes it. */\n/* */\n/* Compound API: */\n/* <BenefitCard.Row columns={3}> */\n/* <BenefitCard step={1} icon={…} title=\"…\">…</BenefitCard> */\n/* ... */\n/* </BenefitCard.Row> */\n/* */\n/* `accent=\"auto\"` rotates through the brand palette by row index */\n/* (violet → purple → magenta → blue → green → red, then wraps). */\n/* Outside a Row, `auto` falls back to `primary`. */\n/* ------------------------------------------------------------------ */\n\nimport {\n Children,\n createContext,\n forwardRef,\n useContext,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\n\n/* ------------------------------------------------------------------ */\n/* Accent wheel — used by `accent=\"auto\"` inside a Row. */\n/* ------------------------------------------------------------------ */\n\nconst ACCENT_WHEEL = [\n 'violet',\n 'purple',\n 'magenta',\n 'blue',\n 'green',\n 'red',\n] as const;\n\ntype WheelAccent = (typeof ACCENT_WHEEL)[number];\ntype SemanticAccent = 'primary' | 'accent' | 'info' | 'success' | 'warning';\ntype ResolvedAccent = SemanticAccent | WheelAccent;\ntype AccentProp = SemanticAccent | WheelAccent | 'auto';\n\n/* ------------------------------------------------------------------ */\n/* Row context */\n/* ------------------------------------------------------------------ */\n\ninterface RowContextValue {\n index: number;\n}\n\nconst RowContext = createContext<RowContextValue | null>(null);\n\n/* ------------------------------------------------------------------ */\n/* CVA — Row grid */\n/* ------------------------------------------------------------------ */\n\nconst rowVariants = cva('ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-lg)]', {\n variants: {\n columns: {\n 1: 'ds:md:grid-cols-1',\n 2: 'ds:md:grid-cols-2',\n 3: 'ds:md:grid-cols-3',\n 4: 'ds:md:grid-cols-4',\n },\n },\n defaultVariants: { columns: 3 },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — BenefitCard root */\n/* */\n/* The top 4px accent strip uses `border-block-start` (logical) so it */\n/* sits at the inline-start-block-start corner regardless of writing */\n/* direction. Border colour is set per-accent in the `accent` variant. */\n/* ------------------------------------------------------------------ */\n\n// Card chrome — no per-accent variant; the gradient top strip is rendered\n// as a separate sibling element so it can use a linear-gradient. The\n// hover shadow's tint comes from `hoverShadowVariants` on the same root.\nconst cardVariants = cva(\n [\n 'ds:relative ds:rounded-[var(--radius-lg)] ds:overflow-hidden',\n 'ds:flex ds:flex-col ds:h-full',\n 'ds:bg-[var(--card)] ds:text-[var(--card-foreground)]',\n // Hover lift — the transform is gated through `motion-safe:` so users\n // with `prefers-reduced-motion: reduce` see only the shadow change.\n // `--animation-duration` is pinned to 0ms in the accessible theme,\n // which collapses the transition without dropping the rule entirely.\n 'ds:transition-[transform,box-shadow] ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:motion-safe:hover:-translate-y-1',\n ].join(' '),\n {\n variants: {\n variant: {\n // The accessible theme demands a visible boundary at ≥3:1 — shadow\n // alone doesn't clear that against the light page wash. Always\n // emit a `--card-border` outline; light/dark themes use the\n // soft 14% / 32% values (subtle but present) while accessible\n // bumps to 50% black / 50% white for the strict-AA edge weight.\n //\n // 0.31.5: accessible theme also bumps border-width 1px → 2px —\n // matches Card.elevated and PublicFooter compact. The thicker\n // line reads as a deliberate boundary rather than a hairline.\n elevated:\n 'ds:shadow-[var(--shadow-card)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n outlined:\n 'ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n },\n },\n defaultVariants: { variant: 'elevated' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Gradient top strip — Treatment B (Vivid). */\n/* */\n/* The strip is an absolutely-positioned `<span>` so its background can */\n/* be a `linear-gradient`. For brand-wheel accents (violet → purple → */\n/* magenta → blue → green → red) the gradient pairs with the next */\n/* wheel token. For semantic accents the gradient is a solid pair */\n/* (start=end) — same visual weight, less colour drama. */\n/* ------------------------------------------------------------------ */\n\nconst topStripVariants = cva(\n 'ds:absolute ds:inset-inline-0 ds:top-0 ds:h-[4px] ds:pointer-events-none',\n {\n variants: {\n accent: {\n primary:\n 'ds:bg-linear-to-r ds:from-[var(--primary)] ds:to-[var(--accent)]',\n accent:\n 'ds:bg-linear-to-r ds:from-[var(--accent)] ds:to-[var(--primary)]',\n info: 'ds:bg-linear-to-r ds:from-[var(--info)] ds:to-[var(--info)]',\n success:\n 'ds:bg-linear-to-r ds:from-[var(--success)] ds:to-[var(--success)]',\n warning:\n 'ds:bg-linear-to-r ds:from-[var(--warning)] ds:to-[var(--warning)]',\n violet:\n 'ds:bg-linear-to-r ds:from-[var(--color-violet-500)] ds:to-[var(--color-purple-500)]',\n purple:\n 'ds:bg-linear-to-r ds:from-[var(--color-purple-500)] ds:to-[var(--color-magenta-500)]',\n magenta:\n 'ds:bg-linear-to-r ds:from-[var(--color-magenta-500)] ds:to-[var(--color-violet-500)]',\n blue: 'ds:bg-linear-to-r ds:from-[var(--color-blue-500)] ds:to-[var(--color-green-500)]',\n green:\n 'ds:bg-linear-to-r ds:from-[var(--color-green-500)] ds:to-[var(--color-red-500)]',\n red: 'ds:bg-linear-to-r ds:from-[var(--color-red-500)] ds:to-[var(--color-blue-500)]',\n },\n },\n defaultVariants: { accent: 'primary' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Hover shadow — coloured halo on hover, tinted by accent. */\n/* ------------------------------------------------------------------ */\n\nconst hoverShadowVariants = cva('', {\n variants: {\n accent: {\n primary:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--primary)_18%,transparent)]',\n accent:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--accent)_18%,transparent)]',\n info: 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--info)_18%,transparent)]',\n success:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--success)_18%,transparent)]',\n warning:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--warning)_18%,transparent)]',\n violet:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--color-violet-500)_18%,transparent)]',\n purple:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--color-purple-500)_18%,transparent)]',\n magenta:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--color-magenta-500)_18%,transparent)]',\n blue: 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--color-blue-500)_18%,transparent)]',\n green:\n 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--color-green-500)_18%,transparent)]',\n red: 'ds:hover:shadow-[0_20px_40px_color-mix(in_srgb,var(--color-red-500)_18%,transparent)]',\n },\n },\n defaultVariants: { accent: 'primary' },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — icon chip */\n/* */\n/* The chip background uses `color-mix(in srgb, <token> 12%, */\n/* var(--background))` so it stays legible across themes. The Tailwind */\n/* JIT requires underscores in arbitrary-value classes wherever */\n/* whitespace would otherwise terminate the class. */\n/* ------------------------------------------------------------------ */\n\n// Icon chip — gradient tint (Treatment B). The chip pairs the resolved\n// accent with the \"next\" wheel/semantic token so the bg reads as a soft\n// diagonal blend instead of a flat tint, picking up the energy of the\n// gradient top strip. An inset highlight (`inset 0 1px 0` half-white)\n// adds a subtle glass edge.\nconst iconChipVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:size-14 ds:rounded-[var(--radius-md)] ds:shrink-0',\n 'ds:[&>svg]:size-7',\n 'ds:shadow-[inset_0_1px_0_color-mix(in_srgb,var(--foreground)_40%,transparent)]',\n ].join(' '),\n {\n variants: {\n accent: {\n primary:\n 'ds:text-[color:var(--primary)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--primary)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--accent)_8%,var(--background))]',\n accent:\n 'ds:text-[color:var(--accent)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--accent)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--primary)_8%,var(--background))]',\n info: 'ds:text-[color:var(--info)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--info)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--info)_8%,var(--background))]',\n success:\n 'ds:text-[color:var(--success)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--success)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--success)_8%,var(--background))]',\n warning:\n 'ds:text-[color:var(--warning)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--warning)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--warning)_8%,var(--background))]',\n violet:\n 'ds:text-[color:var(--color-violet-500)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--color-violet-500)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--color-purple-500)_8%,var(--background))]',\n purple:\n 'ds:text-[color:var(--color-purple-500)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--color-purple-500)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--color-magenta-500)_8%,var(--background))]',\n magenta:\n 'ds:text-[color:var(--color-magenta-500)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--color-magenta-500)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--color-violet-500)_8%,var(--background))]',\n blue: 'ds:text-[color:var(--color-blue-500)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--color-blue-500)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--color-green-500)_8%,var(--background))]',\n green:\n 'ds:text-[color:var(--color-green-500)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--color-green-500)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--color-red-500)_8%,var(--background))]',\n red: 'ds:text-[color:var(--color-red-500)] ds:bg-linear-to-br ds:from-[color-mix(in_srgb,var(--color-red-500)_22%,var(--background))] ds:to-[color-mix(in_srgb,var(--color-blue-500)_8%,var(--background))]',\n },\n },\n defaultVariants: { accent: 'primary' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Step chip — brand-tinted with a thin matching border. */\n/* ------------------------------------------------------------------ */\n\n// Text colour uses the -700 ramp step rather than -500 so the chip's\n// small `01` label clears WCAG AA (≥4.5:1) against its 12 %-tinted bg.\n// The brand -500 fails on the tinted surface (~4.07:1). For the\n// semantic accents we pin to the same brand-700 the kit resolves them\n// to (primary→violet-700, accent→magenta-700, etc.) so each variant\n// reads AA in light theme. In dark theme the tint surface darkens so\n// the ramp-700 text turns dark-on-dark and fails AA — we branch via\n// `[.theme-dark_&]:` to swap to the -200 ramp step (light text on the\n// dark tint), restoring comfortable contrast across both modes.\nconst stepChipVariants = cva(\n [\n 'type-eyebrow',\n 'ds:rounded-[var(--radius-full)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n // Accessible theme: the per-variant `30% primary` border is too\n // washed out for the ≥3:1 non-text contrast bar. Swap to\n // currentColor (which resolves to the brand-700 / -200 text colour\n // of the variant — same hue, fully opaque). Descendant selector\n // outweighs the per-variant declaration via specificity.\n 'ds:[.theme-accessible_&]:[border-color:currentColor]',\n ].join(' '),\n {\n variants: {\n accent: {\n primary:\n 'ds:text-[color:var(--color-violet-700)] ds:[.theme-dark_&]:text-[color:var(--color-violet-200)] ds:bg-[color-mix(in_srgb,var(--primary)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--primary)_30%,transparent)]',\n accent:\n 'ds:text-[color:var(--color-magenta-700)] ds:[.theme-dark_&]:text-[color:var(--color-magenta-200)] ds:bg-[color-mix(in_srgb,var(--accent)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--accent)_30%,transparent)]',\n info: 'ds:text-[color:var(--color-blue-700)] ds:[.theme-dark_&]:text-[color:var(--color-blue-200)] ds:bg-[color-mix(in_srgb,var(--info)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--info)_30%,transparent)]',\n success:\n 'ds:text-[color:var(--color-green-700)] ds:[.theme-dark_&]:text-[color:var(--color-green-200)] ds:bg-[color-mix(in_srgb,var(--success)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--success)_30%,transparent)]',\n warning:\n 'ds:text-[color:var(--color-red-700)] ds:[.theme-dark_&]:text-[color:var(--color-red-200)] ds:bg-[color-mix(in_srgb,var(--warning)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--warning)_30%,transparent)]',\n violet:\n 'ds:text-[color:var(--color-violet-700)] ds:[.theme-dark_&]:text-[color:var(--color-violet-200)] ds:bg-[color-mix(in_srgb,var(--color-violet-500)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--color-violet-500)_30%,transparent)]',\n purple:\n 'ds:text-[color:var(--color-purple-700)] ds:[.theme-dark_&]:text-[color:var(--color-purple-200)] ds:bg-[color-mix(in_srgb,var(--color-purple-500)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--color-purple-500)_30%,transparent)]',\n magenta:\n 'ds:text-[color:var(--color-magenta-700)] ds:[.theme-dark_&]:text-[color:var(--color-magenta-200)] ds:bg-[color-mix(in_srgb,var(--color-magenta-500)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--color-magenta-500)_30%,transparent)]',\n blue: 'ds:text-[color:var(--color-blue-700)] ds:[.theme-dark_&]:text-[color:var(--color-blue-200)] ds:bg-[color-mix(in_srgb,var(--color-blue-500)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--color-blue-500)_30%,transparent)]',\n green:\n 'ds:text-[color:var(--color-green-700)] ds:[.theme-dark_&]:text-[color:var(--color-green-200)] ds:bg-[color-mix(in_srgb,var(--color-green-500)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--color-green-500)_30%,transparent)]',\n red: 'ds:text-[color:var(--color-red-700)] ds:[.theme-dark_&]:text-[color:var(--color-red-200)] ds:bg-[color-mix(in_srgb,var(--color-red-500)_12%,var(--background))] ds:[border:1px_solid_color-mix(in_srgb,var(--color-red-500)_30%,transparent)]',\n },\n },\n defaultVariants: { accent: 'primary' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface BenefitCardProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title'\n> {\n /** Step number; rendered as a zero-padded chip (\"01\", \"02\", …). Omit to hide. */\n step?: number;\n /** Icon node — usually an `<svg>` 24-32px. Rendered inside a tinted square chip. */\n icon?: ReactNode;\n /** Card heading. Always rendered inside an `<h3>` — pass only inline / phrasing content. */\n title: ReactNode;\n /** Optional CTA — usually a `<Button intent=\"link\">` or kit `<Link>`. Rendered at the block-end. */\n cta?: ReactNode;\n /** Surface treatment. */\n variant?: 'elevated' | 'outlined';\n /**\n * Accent colour. `auto` (default inside a `<BenefitCard.Row>`) rotates through the brand\n * palette by row index: violet → purple → magenta → blue → green → red, then wraps.\n * Outside a Row, `auto` falls back to `primary`.\n */\n accent?: AccentProp;\n /** Body content (description / list / inline copy). */\n children?: ReactNode;\n}\n\nexport interface BenefitCardRowProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children'\n> {\n /** Number of columns at md+; defaults to 3. Collapses to 1 at < md. */\n columns?: 1 | 2 | 3 | 4;\n children?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Accent resolution */\n/* ------------------------------------------------------------------ */\n\nfunction resolveAccent(\n accent: AccentProp,\n rowCtx: RowContextValue | null,\n): ResolvedAccent {\n if (accent !== 'auto') return accent;\n if (rowCtx) return ACCENT_WHEEL[rowCtx.index % ACCENT_WHEEL.length];\n return 'primary';\n}\n\n/* ------------------------------------------------------------------ */\n/* Row */\n/* */\n/* Wraps every child in a `RowContext.Provider` so the child can look */\n/* up its index and pick a wheel colour when `accent=\"auto\"`. */\n/* ------------------------------------------------------------------ */\n\nconst BenefitCardRow = forwardRef<HTMLDivElement, BenefitCardRowProps>(\n ({ columns = 3, children, className, ...rest }, ref) => {\n const items = Children.toArray(children);\n return (\n <div\n ref={ref}\n data-component=\"benefit-card-row\"\n className={rowVariants({ columns, className })}\n {...rest}\n >\n {items.map((child, index) => (\n <RowContext.Provider key={index} value={{ index }}>\n {child}\n </RowContext.Provider>\n ))}\n </div>\n );\n },\n);\nBenefitCardRow.displayName = 'BenefitCard.Row';\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nconst BenefitCardRoot = forwardRef<HTMLElement, BenefitCardProps>(\n (\n {\n step,\n icon,\n title,\n cta,\n variant = 'elevated',\n accent = 'auto',\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const rowCtx = useContext(RowContext);\n const resolved = resolveAccent(accent, rowCtx);\n const hasStep = typeof step === 'number';\n\n return (\n <article\n ref={ref}\n data-component=\"benefit-card\"\n data-accent={resolved}\n className={[\n cardVariants({ variant }),\n hoverShadowVariants({ accent: resolved }),\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {/* Gradient top strip — Treatment B visual signature. Sits above\n the card body via absolute positioning. */}\n <span\n aria-hidden=\"true\"\n data-part=\"accent-strip\"\n className={topStripVariants({ accent: resolved })}\n />\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-lg)] ds:flex-1\">\n {(icon || hasStep) && (\n <div className=\"ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)]\">\n {icon ? (\n <span\n aria-hidden=\"true\"\n className={iconChipVariants({ accent: resolved })}\n >\n {icon}\n </span>\n ) : (\n <span aria-hidden=\"true\" />\n )}\n {hasStep ? (\n <span\n aria-hidden=\"true\"\n data-part=\"step\"\n className={stepChipVariants({ accent: resolved })}\n >\n {String(step).padStart(2, '0')}\n </span>\n ) : null}\n </div>\n )}\n <h3 className=\"type-title-card ds:text-[var(--foreground)]\">\n {title}\n </h3>\n {children ? (\n <div className=\"type-body ds:text-[var(--muted-foreground)] ds:flex-1\">\n {children}\n </div>\n ) : null}\n {cta ? <div className=\"ds:mt-[var(--spacing-xs)]\">{cta}</div> : null}\n </div>\n </article>\n );\n },\n);\nBenefitCardRoot.displayName = 'BenefitCard';\n\n/* ------------------------------------------------------------------ */\n/* Compound export */\n/* ------------------------------------------------------------------ */\n\nexport const BenefitCard = Object.assign(BenefitCardRoot, {\n Row: BenefitCardRow,\n});\n"],"names":["ACCENT_WHEEL","RowContext","createContext","rowVariants","cva","cardVariants","topStripVariants","hoverShadowVariants","iconChipVariants","stepChipVariants","resolveAccent","accent","rowCtx","BenefitCardRow","forwardRef","columns","children","className","rest","ref","items","Children","jsx","child","index","BenefitCardRoot","step","icon","title","cta","variant","useContext","resolved","hasStep","jsxs","BenefitCard"],"mappings":";;;AAsCA,MAAMA,IAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAeMC,IAAaC,EAAsC,IAAI,G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Wd,EAAiB,EAAE,QAAQwB,GAAU;AAAA,kBAE/C,UAAAL;AAAA,gBAAA;AAAA,cAAA,IAGH,gBAAAL,EAAC,QAAA,EAAK,eAAY,OAAA,CAAO;AAAA,cAE1BW,IACC,gBAAAX;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,eAAY;AAAA,kBACZ,aAAU;AAAA,kBACV,WAAWb,EAAiB,EAAE,QAAQuB,GAAU;AAAA,kBAE/C,UAAA,OAAON,CAAI,EAAE,SAAS,GAAG,GAAG;AAAA,gBAAA;AAAA,cAAA,IAE7B;AAAA,YAAA,GACN;AAAA,YAEF,gBAAAJ,EAAC,MAAA,EAAG,WAAU,+CACX,UAAAM,GACH;AAAA,YACCZ,IACC,gBAAAM,EAAC,OAAA,EAAI,WAAU,yDACZ,UAAAN,GACH,IACE;AAAA,YACHa,IAAM,gBAAAP,EAAC,OAAA,EAAI,WAAU,6BAA6B,aAAI,IAAS;AAAA,UAAA,EAAA,CAClE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAG,EAAgB,cAAc;AAMvB,MAAMU,IAAc,OAAO,OAAOV,GAAiB;AAAA,EACxD,KAAKZ;AACP,CAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-value-pair-CYE7NSpM.js","sources":["../../src/components/key-value-pair/key-value-pair.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, type HTMLAttributes } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Copy, Check } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\n\n/* ------------------------------------------------------------------ */\n/* CVA — root wrapper */\n/* */\n/* The layout variants below describe the LOGICAL flow of label/value. */\n/* When an `icon` prop is supplied, the root flips to `flex-row` and */\n/* renders the icon at the leading edge regardless of the chosen */\n/* layout — the layout then governs the inner label/value stack. Cap- */\n/* height alignment is handled by `items-start` + a small `mt` offset */\n/* on the icon wrapper so a wrapping value doesn't push the icon */\n/* downward. */\n/* ------------------------------------------------------------------ */\n\nconst keyValuePairVariants = cva('ds:flex', {\n variants: {\n layout: {\n horizontal: 'ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]',\n vertical: 'ds:flex-col ds:gap-[var(--spacing-xs)]',\n },\n /** Internal — flips the root to a horizontal flex when an icon\n is present so the icon can sit at the leading edge of both\n horizontal and vertical inner stacks. `items-start` keeps the\n icon anchored to the label row even when the value wraps. */\n hasIcon: {\n true: 'ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)]',\n false: '',\n },\n },\n defaultVariants: {\n layout: 'horizontal',\n hasIcon: false,\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePairProps */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValuePairProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<VariantProps<typeof keyValuePairVariants>, 'hasIcon'> {\n /** The label (term) */\n label: string;\n /** The value — accepts plain text, Badge, Tag, monospace code, any ReactNode */\n value: React.ReactNode;\n /** Layout direction */\n layout?: 'horizontal' | 'vertical';\n /** Render value in monospace font */\n mono?: boolean;\n /** Show a copy-to-clipboard IconButton beside the value */\n copyable?: boolean;\n /** The text to copy — defaults to `value` if value is a string */\n copyText?: string;\n /**\n * Optional decorative icon rendered at the leading edge of the pair.\n * Pass a `lucide-react` icon (or any single React element) for\n * visual consistency. The wrapper applies `aria-hidden=\"true\"` and\n * paints the icon with `var(--key-value-pair-icon-color)` (defaults\n * to `--muted-foreground`); consumers can recolour the slot via\n * that token without forking the component.\n *\n * Cap-height alignment with the label is automatic — the wrapper\n * uses `mt-0.5` so the glyph rides the label row, not the\n * geometric centre of a wrapping value.\n *\n * Type is `ReactElement` (not the broader `ReactNode`) so the\n * intent is clear at the call site: this slot is for a single\n * SVG/icon, not arbitrary fragments, strings, or numbers.\n */\n icon?: React.ReactElement | null;\n}\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePair */\n/* ------------------------------------------------------------------ */\n\nexport const KeyValuePair = forwardRef<HTMLDivElement, KeyValuePairProps>(\n (\n {\n label,\n value,\n layout = 'horizontal',\n mono = false,\n copyable = false,\n copyText,\n icon,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const [copied, setCopied] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n const textToCopy =\n copyText ?? (typeof value === 'string' ? value : undefined);\n\n const handleCopy = useCallback(async () => {\n if (!textToCopy) {\n if (import.meta.env.DEV) {\n console.warn(\n 'KeyValuePair: copyable is true but no copyText was provided and value is not a string. Copy no-op.',\n );\n }\n return;\n }\n\n try {\n await navigator.clipboard.writeText(textToCopy);\n setCopied(true);\n setAnnouncement(t('keyValuePair.copied'));\n setTimeout(() => {\n setCopied(false);\n setAnnouncement('');\n }, 2000);\n } catch {\n setAnnouncement(t('keyValuePair.notAvailable'));\n setTimeout(() => setAnnouncement(''), 3000);\n }\n }, [textToCopy, t]);\n\n const valueClasses = [\n 'type-body ds:text-foreground ds:min-w-0 ds:shrink ds:[unicode-bidi:isolate]',\n mono ? 'ds:font-[family-name:var(--font-mono)]' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const hasIcon = icon !== undefined && icon !== null;\n\n // Inner stack — the label/value/copy block. Used only when an\n // icon is present (the root flips to a horizontal `icon + stack`\n // flex). For the horizontal layout we use `items-start` here so a\n // wrapping value doesn't push the label visually down to the row\n // centre — without `items-start`, the icon (anchored at row top\n // via the root's `items-start`) would no longer align with the\n // label's cap-height. For the vertical layout `items-start` is\n // implicit via `flex-col`.\n const innerStackClass =\n layout === 'horizontal'\n ? 'ds:flex ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)] ds:min-w-0 ds:flex-1'\n : 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1';\n\n const stack = (\n <>\n <span className=\"type-label ds:text-muted-foreground ds:shrink-0\">\n {label}\n <span className=\"ds:sr-only\">: </span>\n </span>\n <span className={valueClasses}>{value}</span>\n {copyable && (\n <IconButton\n icon={copied ? <Check /> : <Copy />}\n size=\"sm\"\n aria-label={t('keyValuePair.copy', { label })}\n onClick={handleCopy}\n intent=\"ghost\"\n className={\n layout === 'horizontal'\n ? 'ds:ms-auto ds:shrink-0'\n : 'ds:self-start'\n }\n />\n )}\n </>\n );\n\n return (\n <div\n ref={ref}\n className={keyValuePairVariants({ layout, hasIcon, className })}\n data-component=\"key-value-pair\"\n {...props}\n >\n {hasIcon ? (\n <>\n {/* Decorative icon wrapper. `aria-hidden` so SR users only\n hear \"<label>: <value>\" — the icon is brand polish,\n not semantic content. `mt-0.5` mirrors Alert's left-\n icon offset so the glyph aligns with the label's cap-\n height instead of the geometric centre of the row\n (which would drift downward if the value wraps). */}\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:shrink-0 ds:mt-0.5 ds:text-[color:var(--key-value-pair-icon-color)] ds:[&_svg]:size-4\"\n >\n {icon}\n </span>\n <div className={innerStackClass}>{stack}</div>\n </>\n ) : (\n stack\n )}\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </span>\n </div>\n );\n },\n);\n\nKeyValuePair.displayName = 'KeyValuePair';\n\n/* ------------------------------------------------------------------ */\n/* KeyValueList — subgrid alignment for a column of KVP rows */\n/* */\n/* When several `<KeyValuePair>` rows live in the same card (practice */\n/* profile, settings panel, contact card, etc.), the per-row flex */\n/* layout means each row's label column has a different width. The */\n/* values end up zigzagged. Wrapping in `<KeyValueList>` puts all rows */\n/* into a single 3-column CSS subgrid (icon | label | value), so */\n/* labels share a column across rows and values start at the same */\n/* inline-start edge. */\n/* */\n/* Standalone `<KeyValuePair>` instances outside a `<KeyValueList>` */\n/* keep their existing per-row flex layout — no behaviour change for */\n/* consumers that didn't opt in. */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValueListProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Gap between rows. Maps to spacing tokens — defaults to `md`.\n * Smaller gaps suit dense settings panels; larger gaps suit\n * profile cards.\n */\n rowGap?: 'sm' | 'md' | 'lg';\n}\n\nconst rowGapClassMap: Record<\n NonNullable<KeyValueListProps['rowGap']>,\n string\n> = {\n sm: 'ds:gap-y-[var(--spacing-sm)]',\n md: 'ds:gap-y-[var(--spacing-md)]',\n lg: 'ds:gap-y-[var(--spacing-lg)]',\n};\n\nexport const KeyValueList = forwardRef<HTMLDivElement, KeyValueListProps>(\n ({ children, className, rowGap = 'md', ...props }, ref) => {\n // Three-column subgrid: icon | label | value.\n // - col 1: `auto` — width of the widest icon (or 0 if no rows have icons)\n // - col 2: `auto` — width of the widest label, shared across all rows\n // - col 3: `minmax(0, 1fr)` — value flexes; `minmax` prevents the\n // value from forcing the grid wider than its container when the\n // value contains a long unbroken string (e.g. an email or URL).\n //\n // Each child `<KeyValuePair>` (which renders as a `<div>` with a\n // `data-component=\"key-value-pair\"` marker) is promoted into a\n // subgrid row by the CSS below — the cell boundaries align across\n // every direct child.\n //\n // We render as `<div>` (not `<dl>`): axe enforces \"dl can only\n // contain dt/dd\" and the inner KVP renders as a `<div>`. The KVP's\n // own SR markup (label + `<span class=\"sr-only\">: </span>` + value)\n // already conveys term-value semantics — wrapping in a `<dl>`\n // doesn't add anything the screen reader doesn't already get.\n return (\n <div\n ref={ref}\n data-component=\"key-value-list\"\n className={[\n 'ds:grid ds:grid-cols-[auto_auto_minmax(0,1fr)]',\n 'ds:gap-x-[var(--spacing-md)]',\n rowGapClassMap[rowGap],\n // Each direct `data-component=\"key-value-pair\"` child becomes\n // a subgrid row spanning all three columns. The KVP's own\n // flex layout still works inside the cell (icon shrinks-0,\n // label shrinks-0, value flexes) — subgrid just aligns the\n // boundaries between siblings.\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid-cols-subgrid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:col-span-3',\n 'ds:[&>[data-component=\"key-value-pair\"]]:items-baseline',\n // Reset the per-row flex gap so the subgrid columns own the\n // spacing. Without this the KVP's intra-row `gap-sm` would\n // double the parent's `gap-x-md`.\n 'ds:[&>[data-component=\"key-value-pair\"]]:gap-0',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nKeyValueList.displayName = 'KeyValueList';\n"],"names":["keyValuePairVariants","cva","KeyValuePair","forwardRef","label","value","layout","mono","copyable","copyText","icon","className","props","ref","t","useTranslation","copied","setCopied","useState","announcement","setAnnouncement","textToCopy","handleCopy","useCallback","valueClasses","hasIcon","innerStackClass","stack","jsxs","Fragment","jsx","IconButton","Check","Copy","rowGapClassMap","KeyValueList","children","rowGap"],"mappings":";;;;;;;AAkBA,MAAMA,IAAuBC,EAAI,WAAW;AAAA,EAC1C,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,UAAU;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMZ,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,QAAQ;AAAA,IACR,SAAS;AAAA,EAAA;AAEb,CAAC,GA6CYC,IAAeC;AAAA,EAC1B,CACE;AAAA,IACE,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,MAAAC,IAAO;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAcC,CAAe,IAAIF,EAAS,EAAE,GAE7CG,IACJZ,MAAa,OAAOJ,KAAU,WAAWA,IAAQ,SAE7CiB,IAAaC,EAAY,YAAY;AACzC,UAAKF;AASL,YAAI;AACF,gBAAM,UAAU,UAAU,U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,gBAAAG,EAAAC,GAAA,EAOE,UAAA;AAAA,YAAA,gBAAAC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBAET,UAAApB;AAAA,cAAA;AAAA,YAAA;AAAA,8BAEF,OAAA,EAAI,WAAWgB,GAAkB,UAAAC,GAAM;AAAA,UAAA,EAAA,CAC1C,IAEAA;AAAA,UAEF,gBAAAG,EAAC,UAAK,MAAK,UAAS,aAAU,UAAS,WAAU,cAC9C,UAAAX,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAjB,EAAa,cAAc;AA2B3B,MAAMgC,IAGF;AAAA,EACF,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAehC;AAAA,EAC1B,CAAC,EAAE,UAAAiC,GAAU,WAAAzB,GAAW,QAAA0B,IAAS,MAAM,GAAGzB,EAAA,GAASC,MAmB/C,gBAAAiB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAjB;AAAA,MACA,kBAAe;AAAA,MACf,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACAqB,EAAeG,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMrB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA,QAIA;AAAA,QACA1B;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAwB;AAAA,IAAA;AAAA,EAAA;AAIT;AAEAD,EAAa,cAAc;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operator-hero-BsjE-kJF.js","sources":["../../src/components/operator-hero/operator-hero.agent.ts","../../src/components/operator-hero/operator-hero.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { OperatorHeroHandle } from './operator-hero';\n\nexport const operatorHeroAgent: AgentAdapter<OperatorHeroHandle> = {\n id: 'operator-hero',\n capabilities: ['view_change'],\n state: {\n name: {\n type: 'string',\n descriptionKey: 'ui.agent.operatorHero.state.name',\n description: 'Operator display name currently rendered.',\n read: (handle) => handle.getName(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'operator-hero',\n description: 'Marks the OperatorHero root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar/avatar';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { Rating } from '../rating/rating';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { operatorHeroAgent } from './operator-hero.agent';\n\n/* -------------------------------------------------------------------- */\n/* OperatorHero */\n/* */\n/* The operator-page counterpart to the consumer-side `<PracticeHero>` */\n/* / `<PracticeProfileHero>` pattern. Differences from the practice */\n/* hero (per the spec): */\n/* */\n/* - Avatar instead of a full hero image background */\n/* - Ratings + reviews summary rendered inline */\n/* - Slightly shorter vertically — no cover strip, denser padding */\n/* */\n/* Use case: individual operator profile page (`/dentista/<slug>/ */\n/* operatori/<name>`), pair with `<PracticeProfileCard>` below to fill */\n/* in the operator's contact + profession info. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n // Density toggle. Default `comfortable` matches the practice hero's\n // visual weight minus the cover strip. `compact` is for embedded\n // surfaces (booking aside, ROI Dashboard practice panel) where the\n // hero needs to fit in <12rem vertical.\n density: {\n comfortable: '',\n compact: '',\n },\n // Matches the kit's other `surface` props (Booking, ReviewsPanel,\n // PracticeProfileCard). `'elevated'` wraps in `<Card>`.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: {\n density: 'comfortable',\n surface: 'elevated',\n },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface OperatorHeroBadge {\n /** Display key — i18n is up to the consumer. */\n key: string;\n /** Display label. */\n label: string;\n /** Badge variant — falls back to `neutral`. */\n variant?: 'neutral' | 'info' | 'success' | 'warning' | 'error';\n}\n\nexport interface OperatorHeroRating {\n /** Mean rating, 0–5. */\n value: number;\n /** Total number of reviews. */\n count: number;\n}\n\nexport interface OperatorHeroHandle {\n getName: () => string;\n}\n\nexport interface OperatorHeroProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children'\n> {\n /** Operator's display name. Rendered as the H1 heading. */\n name: string;\n /** Specialty / tagline subtitle (e.g. \"Dermatologa · 12 anni di esperienza\"). */\n tagline?: string;\n /**\n * Optional photo / avatar URL. The kit always renders an `<Avatar>` —\n * when `imageUrl` is missing the avatar falls back to initials.\n */\n imageUrl?: string;\n /** Rating summary — when present, renders a Rating + numeric breakdown line. */\n rating?: OperatorHeroRating;\n /**\n * Optional badge row beneath the rating. Use sparingly — 1–3 chips\n * suit the hero's density; longer lists belong in `<PracticeProfileCard>`.\n */\n badges?: OperatorHeroBadge[];\n\n /* ----- Slots ----- */\n\n /**\n * Rendered at the inline-end of the heading row (right side on LTR).\n * Use for a \"Book with this operator\" `<Button>` or a \"Back to\n * practice\" link.\n */\n actionSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `comfortable` (default) — matches the practice hero's visual\n * weight minus the cover strip. `compact` halves the vertical\n * padding for embedded surfaces.\n */\n density?: 'comfortable' | 'compact';\n /**\n * `elevated` (default) wraps in `<Card variant=\"elevated\">`. `flat`\n * drops the Card — use inside another card / sheet.\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n 'aria-label'?: string;\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const OperatorHero = forwardRef<HTMLDivElement, OperatorHeroProps>(\n (\n {\n name,\n tagline,\n imageUrl,\n rating,\n badges,\n actionSlot,\n density = 'comfortable',\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const headingId = useId();\n const resolvedAriaLabel = ariaLabel ?? t('operatorHero.regionLabel');\n\n useAgentRegistration(operatorHeroAgent, { getName: () => name }, id);\n\n const ratingLabel = rating\n ? t('operatorHero.ratingLabel', {\n value: rating.value.toFixed(1),\n count: rating.count,\n })\n : undefined;\n\n // Padding scales with density. Comfortable matches the practice\n // hero's `pt-xl pb-md` minus the cover strip; compact halves it.\n const bodyPaddingClass =\n density === 'comfortable'\n ? 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]'\n : 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]';\n\n // Avatar size keys off density. Comfortable = 2xl (~72px) to read\n // as the page hero. Compact = xl (~56px) for embedded use.\n const avatarSize = density === 'comfortable' ? '2xl' : 'xl';\n\n // Heading scale tracks density too. Comfortable uses the kit's\n // page-title token; compact drops to title-card so the operator\n // name doesn't dominate an embedded surface.\n const headingClass =\n density === 'comfortable' ? 'type-title-page' : 'type-title-card';\n\n const inner = (\n <div\n className={[\n 'ds:flex ds:items-start ds:gap-[var(--spacing-lg)]',\n bodyPaddingClass,\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n ].join(' ')}\n >\n <Avatar\n size={avatarSize}\n name={name}\n src={imageUrl}\n className=\"ds:shrink-0\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap\">\n <h1\n id={headingId}\n className={`${headingClass} ds:m-0 ds:text-[color:var(--foreground)]`}\n >\n {name}\n </h1>\n {actionSlot ? (\n <div className=\"ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actionSlot}\n </div>\n ) : null}\n </div>\n {tagline ? (\n <p className=\"type-body ds:m-0 ds:text-[color:var(--foreground)]\">\n {tagline}\n </p>\n ) : null}\n {rating ? (\n <div\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\"\n aria-label={ratingLabel}\n >\n <Rating\n value={rating.value}\n max={5}\n size={density === 'comfortable' ? 'md' : 'sm'}\n />\n <span className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {rating.value.toFixed(1)} · {rating.count}\n </span>\n </div>\n ) : null}\n {badges && badges.length > 0 ? (\n <div\n role=\"list\"\n className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)] ds:mt-[var(--spacing-2xs)]\"\n >\n {badges.map((badge) => (\n <Badge\n key={badge.key}\n variant={badge.variant ?? 'neutral'}\n role=\"listitem\"\n >\n {badge.label}\n </Badge>\n ))}\n </div>\n ) : null}\n </div>\n </div>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"operator-hero\"\n data-component-id={id}\n data-density={density}\n id={id}\n className={rootVariants({ surface, density, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">{inner}</Card>\n ) : (\n inner\n )}\n </div>\n );\n },\n);\n\nOperatorHero.displayName = 'OperatorHero';\n\nexport type OperatorHeroDensity = NonNullable<\n VariantProps<typeof rootVariants>['density']\n>;\n"],"names":["operatorHeroAgent","handle","rootVariants","cva","OperatorHero","forwardRef","name","tagline","imageUrl","rating","badges","actionSlot","density","surface","ariaLabel","id","className","rest","ref","t","useTranslation","headingId","useId","resolvedAriaLabel","useAgentRegistration","ratingLabel","bodyPaddingClass","avatarSize","headingClass","inner","jsxs","jsx","Avatar","Rating","badge","Badge","Card"],"mappings":";;;;;;;;;AAGO,MAAMA,IAA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AAA,oBAAArB,EAAO,MAAM,QAAQ,CAAC;AAAA,oBAAE;AAAA,oBAAIA,EAAO;AAAA,kBAAA,EAAA,CACtC;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA,IAEA;AAAA,YACHC,KAAUA,EAAO,SAAS,IACzB,gBAAAqB;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,WAAU;AAAA,gBAET,UAAArB,EAAO,IAAI,CAACwB,MACX,gBAAAH;AAAA,kBAACI;AAAA,kBAAA;AAAA,oBAEC,SAASD,EAAM,WAAW;AAAA,oBAC1B,MAAK;AAAA,oBAEJ,UAAAA,EAAM;AAAA,kBAAA;AAAA,kBAJFA,EAAM;AAAA,gBAAA,CAMd;AAAA,cAAA;AAAA,YAAA,IAED;AAAA,UAAA,EAAA,CACN;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAIJ,WACE,gBAAAH;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAb;AAAA,QACA,MAAK;AAAA,QACL,cAAYK;AAAA,QACZ,mBAAiBF;AAAA,QACjB,kBAAe;AAAA,QACf,qBAAmBN;AAAA,QACnB,gBAAcH;AAAA,QACd,IAAAG;AAAA,QACA,WAAWb,EAAa,EAAE,SAAAW,GAAS,SAAAD,GAAS,WAAAI,GAAW;AAAA,QACtD,GAAGC;AAAA,QAEH,gBAAY,aACX,gBAAAc,EAACK,KAAK,SAAQ,YAAY,aAAM,IAEhCP;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAzB,EAAa,cAAc;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"practice-profile-card-CfAMeTxQ.js","sources":["../../node_modules/lucide-react/dist/esm/icons/banknote.js","../../node_modules/lucide-react/dist/esm/icons/phone.js","../../src/components/practice-profile-card/practice-profile-card.agent.ts","../../src/components/practice-profile-card/practice-profile-card.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"20\", height: \"12\", x: \"2\", y: \"6\", rx: \"2\", key: \"9lu3g6\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"2\", key: \"1c9p78\" }],\n [\"path\", { d: \"M6 12h.01M18 12h.01\", key: \"113zkx\" }]\n];\nconst Banknote = createLucideIcon(\"banknote\", __iconNode);\n\nexport { __iconNode, Banknote as default };\n//# sourceMappingURL=banknote.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384\",\n key: \"9njp5v\"\n }\n ]\n];\nconst Phone = createLucideIcon(\"phone\", __iconNode);\n\nexport { __iconNode, Phone as default };\n//# sourceMappingURL=phone.js.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { PracticeProfileCardHandle } from './practice-profile-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — PracticeProfileCard */\n/* */\n/* Read-only adapter. Surfaces the rendered profession field so an */\n/* agent / MCP runtime can resolve \"what kind of practice is this?\" */\n/* without re-parsing the DOM. No actions yet — the card is a passive */\n/* presentation surface; navigation lives on the consumer's page. */\n/* -------------------------------------------------------------------- */\n\nexport const practiceProfileCardAgent: AgentAdapter<PracticeProfileCardHandle> =\n {\n id: 'practice-profile-card',\n capabilities: ['view_change'],\n state: {\n profession: {\n type: 'string',\n descriptionKey: 'ui.agent.practiceProfileCard.state.profession',\n description:\n 'Profession string the card is currently rendering — undefined when the consumer omitted it.',\n read: (handle) => handle.getProfession(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'practice-profile-card',\n description: 'Marks the PracticeProfileCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n };\n","import {\n forwardRef,\n useId,\n useMemo,\n type ComponentPropsWithoutRef,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Banknote,\n ExternalLink,\n Globe,\n Heart,\n Languages as LanguagesIcon,\n Mail,\n MapPin,\n MessageCircle,\n Phone,\n ShieldCheck,\n Stethoscope,\n type LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { practiceProfileCardAgent } from './practice-profile-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* PracticeProfileCard */\n/* */\n/* Replaces the bespoke \"Profilo\" / \"Practice info\" cards that every */\n/* AlfaDocs surface composes by hand (booking-website PracticeInfoCard, */\n/* alfascribe operator pages, builders docs example, …). Composes Card */\n/* + KeyValueList + KeyValuePair so the labels share a column (no */\n/* zigzag values) and every row uses the same lucide icon family. */\n/* */\n/* The component is intentionally opinionated: every field is optional, */\n/* but the ORDER, ICONS, and LABELS are owned by the kit. Consumers */\n/* pass the data; the kit owns the visual + i18n. */\n/* */\n/* All visible text flows through `useTranslation('ui')` against the */\n/* `practiceProfileCard.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n // Matches the kit's other `surface` props (Booking, ReviewsPanel).\n // The card itself renders `<Card variant=\"elevated\">` so the\n // `surface=\"flat\"` opt-out is rare — most consumers want the\n // boundary.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface PracticeProfileCardAddress {\n /** Display text — already formatted by the consumer (street, postcode, city). */\n line: string;\n /** Optional lat/lng — drives the static-map link + the embedded thumbnail. */\n lat?: number;\n lng?: number;\n}\n\nexport interface PracticeProfileCardHandle {\n /** Resolved consumer-supplied data — useful for agent introspection. */\n getProfession: () => string | undefined;\n}\n\nexport interface PracticeProfileCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children' | 'children'\n> {\n /**\n * Override the localised \"Profilo\" / \"Profile\" heading. Most\n * consumers leave this unset.\n */\n heading?: string;\n /**\n * Free-text intro paragraph rendered above the data rows (e.g.\n * the practice's `bookingDescription` field). When omitted, the\n * card jumps straight into the data rows.\n */\n description?: string;\n\n /* ----- Identity rows ----- */\n\n /** Street + postcode + city, with optional lat/lng for the map link. */\n address?: PracticeProfileCardAddress;\n /** Phone number, displayed as-is. Compiled into a `tel:` link. */\n phone?: string;\n /**\n * WhatsApp number — digits only (no `+`, no spaces). Compiled into\n * a `https://wa.me/<number>` link with an optional pre-filled message.\n */\n whatsappNumber?: string;\n /** Optional pre-filled WhatsApp message. Consumer-localised. */\n whatsappMessage?: string;\n /** Public-facing email. Compiled into a `mailto:` link. */\n email?: string;\n /** Practice website (already an absolute URL with protocol). */\n website?: string;\n\n /* ----- Embedded map thumbnail ----- */\n\n /**\n * Google Maps Static API key. When provided alongside `address.lat`\n * and `address.lng`, renders a static-map thumbnail at the top of\n * the card — a single one-shot `<img>` fetch, no JS SDK boot, no\n * consent gate needed (the same pattern PracticeResults uses).\n *\n * Without it (or without coords), the card renders info rows only —\n * the address row's \"Open in Google Maps\" link is still emitted as\n * a real `<a>` so the spatial cue isn't lost.\n *\n * Additive — existing consumers that don't pass this prop see the\n * same render as before.\n */\n googleMapsApiKey?: string;\n /**\n * Zoom level for the embedded map thumbnail. Default `14` —\n * neighbourhood-level, shows the pin in context. Ignored when the\n * thumbnail isn't rendered.\n */\n mapZoom?: number;\n\n /* ----- Profile metadata ----- */\n\n /**\n * ISO 639-1 language codes the practice speaks. Rendered as\n * `<Badge variant=\"neutral\">` chips. Each code is auto-resolved\n * into the active locale's native language name via the kit's\n * built-in `languages.<iso>` i18n bundle (18 ISO codes × 18\n * locales). For example `languages={['it', 'en']}` with\n * `i18n.language === 'it'` renders \"Italiano\" + \"Inglese\".\n *\n * Unknown / unbundled codes fall back to the uppercase ISO code\n * (`'xyz'` → `'XYZ'`). To override a specific label — regional\n * dialect, brand-voice variant, codes the kit doesn't ship — pass\n * `languageLabels`.\n */\n languages?: string[];\n /**\n * Override map from ISO code → display label, applied on top of\n * the kit's i18n auto-resolution. Only set when you need a\n * consumer-specific label for a code — the typical case is\n * regional dialect / brand-voice variants / non-ISO codes.\n *\n * Resolution order: `languageLabels[code]` > `t('languages.<code>')`\n * > `code.toUpperCase()`.\n */\n languageLabels?: Record<string, string>;\n /**\n * Insurance / convention strings (consumer-supplied, free text).\n * Rendered as `<Badge variant=\"info\">` chips.\n */\n insurances?: string[];\n /**\n * First-visit price in the smallest currency unit (cents / centesimi).\n * Formatted via `Intl.NumberFormat`. Omit when the consumer doesn't\n * want to show the price.\n */\n firstVisitPriceCents?: number;\n /** ISO-4217 currency code for the price formatter. Defaults to `EUR`. */\n currencyCode?: string;\n /** Profession line — single value or already-joined comma list. */\n profession?: string;\n /** Show the \"expert for anxious patients\" row when true. */\n specializedInFearPatients?: boolean;\n\n /* ----- Telemetry hooks ----- */\n\n /**\n * Fires when the patient clicks the phone link. The kit emits a\n * `track('practice_profile_card_phone_click')` event before\n * invoking this — gate consumer-side analytics on the same event\n * to avoid duplicate fires.\n */\n onPhoneClick?: () => void;\n /** Fires when the patient clicks the WhatsApp link. */\n onWhatsAppClick?: () => void;\n /** Fires when the patient clicks the static-map link. */\n onMapClick?: () => void;\n /** Fires when the patient clicks the email mailto link. */\n onEmailClick?: () => void;\n\n /* ----- Slots ----- */\n\n /**\n * Rendered above the heading — e.g. a `<Avatar>` for the operator\n * variant, or a coloured chip strip. Optional.\n */\n headerSlot?: ReactNode;\n /**\n * Rendered at the end of the card body, below the rows. Use for\n * a \"Book now\" `<Button>` or a \"View full profile\" link.\n */\n footerSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps the card in `<Card variant=\"elevated\">`\n * for a defined surface — what most consumers want when the card\n * stands alone on a page. `'flat'` drops the Card chrome so the\n * content sits naked — use when an outer card / sheet already\n * provides the boundary (e.g. embedded inside a `<Sheet>` or a\n * parent `<Card.Body>`).\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\n/** Strip everything except digits + leading `+` for `tel:` URLs. */\nfunction normalisePhone(raw: string): string {\n return raw.replace(/[^\\d+]/g, '');\n}\n\n/** Build the WhatsApp `wa.me` URL. Number must already be digits-only. */\nfunction buildWhatsAppHref(number: string, message?: string): string {\n const base = `https://wa.me/${number}`;\n if (!message) return base;\n return `${base}?text=${encodeURIComponent(message)}`;\n}\n\n/** Google Maps search query — works without an API key. */\nfunction buildMapHref(address: PracticeProfileCardAddress): string {\n const q = encodeURIComponent(address.line);\n return `https://www.google.com/maps/search/?api=1&query=${q}`;\n}\n\n/** Format price (cents → currency string) using the consumer's locale. */\nfunction formatPrice(cents: number, currency: string, locale: string): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n } catch {\n // Locale or currency code rejected — fall back to a plain decimal.\n return (cents / 100).toFixed(2);\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* MapThumbStrip — embedded Google Static Maps image */\n/* */\n/* Full-width strip rendered at the top of the card when the consumer */\n/* supplies both `address.lat`/`lng` and `googleMapsApiKey`. Same */\n/* one-shot `<img>` strategy as PracticeResults' StaticMapThumb (no JS */\n/* SDK boot → no consent gate needed), but full-card-width instead of */\n/* a 12rem aside. */\n/* -------------------------------------------------------------------- */\n\ninterface MapThumbStripProps {\n apiKey: string;\n center: { lat: number; lng: number };\n zoom: number;\n altText: string;\n}\n\n/**\n * Resolve the kit's `--map-marker-color` token to a six-character hex\n * string (no leading `#`) for Google Static Maps' `markers=color:` URL\n * parameter, which requires a literal hex value at fetch time.\n *\n * SSR-safe: when `document` is undefined we fall back to the kit's\n * brand violet. Same helper as PracticeResults — keep in sync if you\n * touch one.\n */\nfunction getStaticMapMarkerHex(): string {\n if (typeof document === 'undefined') return '4945a3';\n const raw = getComputedStyle(document.documentElement)\n .getPropertyValue('--map-marker-color')\n .trim();\n const match = /^#?([0-9a-fA-F]{6})$/.exec(raw);\n return match ? match[1] : '4945a3';\n}\n\nfunction MapThumbStrip({ apiKey, center, zoom, altText }: MapThumbStripProps) {\n // 640×192 keeps the asset under Google's 1MP free tier at scale=2\n // (1280×384 actual) and matches the strip's 12rem height at a\n // ~3.33:1 aspect ratio. Marker colour resolves from the kit's\n // `--map-marker-color` token at runtime so the value still lives\n // in `src/tokens/**` per the closed-palette constraint.\n const markerHex = getStaticMapMarkerHex();\n const src =\n `https://maps.googleapis.com/maps/api/staticmap` +\n `?center=${center.lat},${center.lng}` +\n `&zoom=${zoom}` +\n `&size=640x192&scale=2` +\n `&markers=color:0x${markerHex}%7C${center.lat},${center.lng}` +\n `&key=${encodeURIComponent(apiKey)}`;\n return (\n <img\n src={src}\n alt={altText}\n loading=\"lazy\"\n decoding=\"async\"\n width={640}\n height={192}\n className=\"ds:block ds:inline-size-full ds:block-size-[12rem] ds:[object-fit:cover] ds:rounded-[var(--radius-md)]\"\n />\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const PracticeProfileCard = forwardRef<\n HTMLDivElement,\n PracticeProfileCardProps\n>(\n (\n {\n heading,\n description,\n address,\n phone,\n whatsappNumber,\n whatsappMessage,\n email,\n website,\n languages,\n languageLabels,\n insurances,\n firstVisitPriceCents,\n currencyCode = 'EUR',\n profession,\n specializedInFearPatients,\n googleMapsApiKey,\n mapZoom = 14,\n onPhoneClick,\n onWhatsAppClick,\n onMapClick,\n onEmailClick,\n headerSlot,\n footerSlot,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const locale = i18n.language ?? 'en';\n\n const resolvedHeading = heading ?? t('practiceProfileCard.heading');\n const resolvedAriaLabel = ariaLabel ?? resolvedHeading;\n\n const formattedPrice = useMemo(() => {\n if (firstVisitPriceCents == null) return undefined;\n return formatPrice(firstVisitPriceCents, currencyCode, locale);\n }, [firstVisitPriceCents, currencyCode, locale]);\n\n // Compose the rows in display order. Each `row` carries the icon +\n // localised label + the rendered value. Skipping a field is just\n // omitting the row — `KeyValueList` collapses the subgrid cleanly.\n const rows: Array<{\n key: string;\n icon: ReactElement;\n label: string;\n value: ReactNode;\n }> = [];\n\n if (address) {\n rows.push({\n key: 'address',\n icon: <MapPin aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.address'),\n value: (\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span>{address.line}</span>\n {address.lat != null && address.lng != null ? (\n <Link\n href={buildMapHref(address)}\n external\n intent=\"default\"\n onClick={onMapClick}\n >\n {t('practiceProfileCard.openInGoogleMaps')}\n </Link>\n ) : null}\n </span>\n ),\n });\n }\n\n if (phone) {\n rows.push({\n key: 'phone',\n icon: <Phone aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.phone'),\n value: (\n <Link\n href={`tel:${normalisePhone(phone)}`}\n intent=\"default\"\n onClick={onPhoneClick}\n >\n {phone}\n </Link>\n ),\n });\n }\n\n if (whatsappNumber) {\n rows.push({\n key: 'whatsapp',\n icon: <MessageCircle aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.whatsapp'),\n value: (\n <Link\n href={buildWhatsAppHref(whatsappNumber, whatsappMessage)}\n external\n intent=\"default\"\n onClick={onWhatsAppClick}\n >\n {whatsappNumber}\n </Link>\n ),\n });\n }\n\n if (email) {\n rows.push({\n key: 'email',\n icon: <Mail aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.email'),\n value: (\n <Link\n href={`mailto:${email}`}\n intent=\"default\"\n onClick={onEmailClick}\n >\n {email}\n </Link>\n ),\n });\n }\n\n if (website) {\n rows.push({\n key: 'website',\n icon: <Globe aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.website'),\n value: (\n <Link href={website} external intent=\"default\">\n {website}\n </Link>\n ),\n });\n }\n\n if (languages && languages.length > 0) {\n // Resolution order, highest to lowest:\n // 1. consumer `languageLabels` override — for regional dialects,\n // brand-voice variants, or codes the kit doesn't ship.\n // 2. kit i18n bundle (`languages.<iso>`) — auto-resolves the 18\n // ISO codes the kit ships into the active locale's native\n // language name. Retires consumer-side ISO→label plumbing.\n // 3. uppercase fallback for unknown codes that the consumer\n // didn't override.\n const resolveLabel = (code: string): string => {\n if (languageLabels?.[code]) return languageLabels[code];\n const key = `languages.${code}`;\n if (i18n.exists(key)) return t(key);\n return code.toUpperCase();\n };\n rows.push({\n key: 'languages',\n icon: <LanguagesIcon aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.languages'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {languages.map((code) => (\n <Badge key={code} variant=\"neutral\">\n {resolveLabel(code)}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (insurances && insurances.length > 0) {\n rows.push({\n key: 'insurances',\n icon: <ShieldCheck aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.insurances'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {insurances.map((ins) => (\n <Badge key={ins} variant=\"info\">\n {ins}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (formattedPrice) {\n rows.push({\n key: 'firstVisitPrice',\n icon: <Banknote aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.firstVisitPrice'),\n value: formattedPrice,\n });\n }\n\n if (specializedInFearPatients) {\n rows.push({\n key: 'expertForAnxiousPatients',\n icon: <Heart aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.expertForAnxiousPatients'),\n value: t('practiceProfileCard.value.yesShort'),\n });\n }\n\n if (profession) {\n rows.push({\n key: 'profession',\n icon: <Stethoscope aria-hidden=\"true\" />,\n label: t('practiceProfileCard.label.profession'),\n value: profession,\n });\n }\n\n // Imperative handle for agent integrations.\n useAgentRegistration(\n practiceProfileCardAgent,\n { getProfession: () => profession },\n id,\n );\n\n const body = (\n <>\n {description ? (\n <p className=\"type-body-sm ds:m-0 ds:whitespace-pre-line\">\n {description}\n </p>\n ) : null}\n {rows.length > 0 ? (\n <KeyValueList rowGap=\"md\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n ) : null}\n {footerSlot}\n </>\n );\n\n // Embedded static-map thumbnail. Renders only when the consumer\n // supplies BOTH a usable lat/lng pair AND a `googleMapsApiKey`.\n // The d.ts-promised behaviour; without a key the strip is silently\n // omitted and the address row's \"Open in Google Maps\" link still\n // emits as the spatial-cue fallback.\n const showMapThumb =\n !!googleMapsApiKey &&\n address?.lat !== undefined &&\n address?.lng !== undefined;\n const mapThumb = showMapThumb ? (\n <MapThumbStrip\n apiKey={googleMapsApiKey!}\n center={{ lat: address!.lat!, lng: address!.lng! }}\n zoom={mapZoom}\n altText={t('practiceProfileCard.map.alt', {\n address: address!.line,\n defaultValue: 'Map showing {{address}}',\n })}\n />\n ) : null;\n\n // `surface=\"flat\"` skips the Card wrapper — the consumer is\n // already inside a Card / Sheet and doesn't want a double border.\n const inner = (\n <>\n {mapThumb}\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {headerSlot}\n <h2\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {resolvedHeading}\n </h2>\n </div>\n {body}\n </>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"practice-profile-card\"\n data-component-id={id}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </Card.Body>\n </Card>\n ) : (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nPracticeProfileCard.displayName = 'PracticeProfileCard';\n\n// Helper export so consumers can mirror the kit's row order if they\n// need to compose a partial alternative (rare).\nexport const PRACTICE_PROFILE_CARD_ROW_KEYS = [\n 'address',\n 'phone',\n 'whatsapp',\n 'email',\n 'website',\n 'languages',\n 'insurances',\n 'firstVisitPrice',\n 'expertForAnxiousPatients',\n 'profession',\n] as const;\n\n// Defensive icon export so consumers can render the same glyph\n// outside the card if they need it for consistency.\nexport const PRACTICE_PROFILE_CARD_ROW_ICONS: Record<\n (typeof PRACTICE_PROFILE_CARD_ROW_KEYS)[number],\n LucideIcon\n> = {\n address: MapPin,\n phone: Phone,\n whatsapp: MessageCircle,\n email: Mail,\n website: Globe,\n languages: LanguagesIcon,\n insurances: ShieldCheck,\n firstVisitPrice: Banknote,\n expertForAnxiousPatients: Heart,\n profession: Stethoscope,\n};\n\n// Re-exports of the rootVariants type for downstream typing.\nexport type PracticeProfileCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n\n// ExternalLink is exported by lucide-react and used elsewhere in the\n// kit; re-exporting here so consumers don't have to add it as a\n// peer-dep import for icon parity in their own UIs.\nexport { ExternalLink };\n"],"names":["__iconNode","Banknote","createLucideIcon","Phone","practiceProfileCardAgent","handle","rootVariants","cva","normalisePhone","raw","buildWhatsAppHref","number","message","base","buildMapHref","address","formatPrice","cents","currency","locale","getStaticMapMarkerHex","match","MapThumbStrip","apiKey","center","zoom","altText","markerHex","src","jsx","PracticeProfileCard","forwardRef","heading","description","phone","whatsappNumber","whatsappMessage","email","website","languages","languageLabels","insurances","firstVisitPriceCents","currencyCode","profession","specializedInFearPatients","googleMapsApiKey","mapZoom","onPhoneClick","onWhatsAppClick","onMapClick","onEmailClick","headerSlot","footerSlot","surface","ariaLabel","id","className","rest","ref","t","i18n","useTranslation","headingId","useId","resolvedHeading","resolvedAriaLabel","formattedPrice","useMemo","rows","MapPin","jsxs","Link","MessageCircle","Mail","Globe","resolveLabel","code","key","LanguagesIcon","Badge","ShieldCheck","ins","Heart","Stethoscope","useAgentRegistration","body","Fragment","KeyValueList","row","KeyValuePair","mapThumb","inner","Card","PRACTICE_PROFILE_CARD_ROW_KEYS","PRACTICE_PROFILE_CARD_ROW_ICONS"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9E,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,uBAAuB,KAAK,SAAQ,CAAE;AACtD,GACMC,IAAWC,EAAiB,YAAYF,EAAU;ACdxD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB;AAAA,IACE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