@alfadocs/ui-kit-debug 1.125.1 → 1.125.3

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.
Files changed (26) hide show
  1. package/dist/_chunks/{contact-profile-card-Jz2aSh7T.js → contact-profile-card-CCgf0Ntt.js} +43 -40
  2. package/dist/_chunks/contact-profile-card-CCgf0Ntt.js.map +1 -0
  3. package/dist/_chunks/{map-view-DRd_GRQf.js → map-view-DkL58SRp.js} +288 -305
  4. package/dist/_chunks/{map-view-DRd_GRQf.js.map → map-view-DkL58SRp.js.map} +1 -1
  5. package/dist/_chunks/{practice-results-CbxBCDaU.js → practice-results-BDnZtbDM.js} +3 -3
  6. package/dist/_chunks/{practice-results-CbxBCDaU.js.map → practice-results-BDnZtbDM.js.map} +1 -1
  7. package/dist/_chunks/{reserved.agent-Dxzmi3GS.js → reserved.agent-BBuWWtYb.js} +2 -2
  8. package/dist/_chunks/{reserved.agent-Dxzmi3GS.js.map → reserved.agent-BBuWWtYb.js.map} +1 -1
  9. package/dist/_chunks/{slot-grid-DEZRB4Yb.js → slot-grid-CfA5zeMv.js} +283 -227
  10. package/dist/_chunks/slot-grid-CfA5zeMv.js.map +1 -0
  11. package/dist/agent-catalog.json +1 -1
  12. package/dist/browser-support.js +1 -1
  13. package/dist/components/booking/index.js +1 -1
  14. package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
  15. package/dist/components/contact-profile-card/index.js +1 -1
  16. package/dist/components/map-view/index.js +1 -1
  17. package/dist/components/map-view/map-view.d.ts.map +1 -1
  18. package/dist/components/practice-results/index.js +1 -1
  19. package/dist/components/slot-grid/index.js +1 -1
  20. package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
  21. package/dist/core.css +1 -1
  22. package/dist/index.js +5 -5
  23. package/dist/tokens.css +1 -1
  24. package/package.json +1 -1
  25. package/dist/_chunks/contact-profile-card-Jz2aSh7T.js.map +0 -1
  26. package/dist/_chunks/slot-grid-DEZRB4Yb.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit-debug",
3
- "version": "1.125.1",
3
+ "version": "1.125.3",
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",
@@ -1 +0,0 @@
1
- {"version":3,"file":"contact-profile-card-Jz2aSh7T.js","sources":["../../node_modules/lucide-react/dist/esm/icons/banknote.mjs","../../src/components/contact-profile-card/contact-profile-card.agent.ts","../../src/components/contact-profile-card/contact-profile-card.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.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.mjs';\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.mjs.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { ContactProfileCardHandle } from './contact-profile-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — ContactProfileCard */\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 contactProfileCardAgent: AgentAdapter<ContactProfileCardHandle> = {\n id: 'contact-profile-card',\n // Passive presentation surface — only exposes the rendered profession for\n // introspection. No interactive capability is backed by the handle.\n capabilities: [],\n state: {\n profession: {\n type: 'string',\n descriptionKey: 'ui.agent.contactProfileCard.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 specialtyKeys: {\n type: 'string[]',\n descriptionKey: 'ui.agent.contactProfileCard.state.specialtyKeys',\n description:\n 'Profession keys of the specialities the card is rendering, in display order. Empty when the consumer passed none.',\n read: (handle) => handle.getSpecialtyKeys(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'contact-profile-card',\n description: 'Marks the ContactProfileCard 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 {\n KeyValueList,\n KeyValuePair,\n SemanticKeyValueGroup,\n} from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport {\n SpecialtyList,\n type SpecialtyListItem,\n} from '../specialty-list/specialty-list';\nimport { formatPriceOrFree } from '../_shared/format-price';\nimport { formatPhoneForDisplay } from '../_shared/format-phone';\nimport type { CountryCode } from 'libphonenumber-js/min';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { contactProfileCardAgent } from './contact-profile-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* ContactProfileCard */\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/* `contactProfileCard.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\n// Override the KVP icon colour at the card root so every inner row's\n// leading glyph paints with `--accent` (brand magenta/violet) instead\n// of the default `--muted-foreground`. The ContactProfileCard is a\n// marketing surface — muted icons read as disabled against the\n// otherwise saturated card chrome. Scoped via CSS custom property so\n// only this card's icons shift; standalone KVPs elsewhere keep\n// `--muted-foreground`.\nconst rootVariants = cva(\n 'ds:w-full ds:text-[color:var(--foreground)] ds:[--key-value-pair-icon-color:var(--accent)]',\n {\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/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface ContactProfileCardAddress {\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 ContactProfileCardHandle {\n /** Resolved consumer-supplied data — useful for agent introspection. */\n getProfession: () => string | undefined;\n /** Profession keys of the rendered specialities, empty when there are none. */\n getSpecialtyKeys: () => string[];\n}\n\nexport interface ContactProfileCardProps 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 * Language of the practice's own text (the description and the address\n * line), as a BCP 47 tag such as `\"it\"`. Written as `lang` on that text so\n * a screen reader on a page in another language pronounces it correctly.\n * Leave it out and no `lang` is written. The kit's own labels keep the\n * page language.\n */\n contentLang?: string;\n\n /* ----- Identity rows ----- */\n\n /** Street + postcode + city, with optional lat/lng for the map link. */\n address?: ContactProfileCardAddress;\n /**\n * Phone number. Shown in international format (`+39 070 123 4567`); a number that cannot be read is\n * shown as given. The `tel:` link uses the value as given.\n */\n phone?: string;\n /**\n * Country of the practice (ISO 3166-1 alpha-2, for example `\"IT\"`). Used\n * to read a `phone` written without a country code, such as\n * `0701234567`. A number that starts with `+` ignores it.\n */\n phoneCountry?: CountryCode;\n /**\n * WhatsApp number — digits only, starting with the country code (no `+`,\n * no spaces). Compiled into a `https://wa.me/<number>` link with an\n * optional pre-filled message. Shown in international format\n * (`+39 331 234 5678`).\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 /**\n * Practice website. An address without a scheme (`www.example.it`) is\n * linked over `https://`; anything but a web address shows as text.\n */\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`; `0` renders the translated word\n * \"Free\". Omit when the consumer doesn't 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 /**\n * The practice's specialities, each with its medical glyph. When present\n * and not empty they replace the `profession` row with a vertical row\n * (\"Profession\" above, a `SpecialtyList` below): a long list needs the full\n * card width, not the value column. When absent or empty the `profession`\n * string row renders as before.\n */\n specialties?: SpecialtyListItem[];\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 * Render an arbitrary map widget at the top of the card chrome —\n * replaces the built-in static `<img>` thumbnail that\n * `googleMapsApiKey` would otherwise produce. Use this when you\n * want an interactive map inside the card boundary instead of a\n * fixed image:\n *\n * <ContactProfileCard\n * mapSlot={\n * <PracticeMap practice={practice} googleMapsApiKey={key} />\n * }\n * …\n * />\n *\n * When both `mapSlot` and `googleMapsApiKey` are provided, the slot\n * wins (explicit > implicit). When neither is provided, no map area\n * renders. The slot is unstyled — pass through any container chrome\n * the consumer wants (e.g. a fixed height wrapper). The kit\n * positions it where the static thumbnail would have lived.\n */\n mapSlot?: ReactNode;\n /**\n * @default false\n * Render the facts (address, phone, languages and the other rows) as a\n * real definition list: a `<dl>` with one `<dt>` label and one `<dd>`\n * value per row, so crawlers and screen readers pair every label with its\n * value. Same look as the default; only the elements change. Turn it on\n * for public pages that search engines index, such as the practice page.\n */\n factsAsDefinitionList?: boolean;\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/**\n * The website as a link address, or undefined when it is not a web\n * address. Practices often save `www.example.it`, which a link would\n * resolve against the current page, and the field is practice-written,\n * so a `javascript:` value must never become a link.\n */\nfunction websiteHref(website: string): string | undefined {\n const value = website.trim();\n const href = /^[a-z][a-z0-9+.-]*:/i.test(value) ? value : `https://${value}`;\n try {\n const { protocol } = new URL(href);\n return protocol === 'http:' || protocol === 'https:' ? href : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** Google Maps search query — works without an API key. */\nfunction buildMapHref(address: ContactProfileCardAddress): string {\n const q = encodeURIComponent(address.line);\n return `https://www.google.com/maps/search/?api=1&query=${q}`;\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:w-full ds:h-[12rem] ds:[object-fit:cover] ds:rounded-[var(--radius-md)]\"\n />\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const ContactProfileCard = forwardRef<\n HTMLDivElement,\n ContactProfileCardProps\n>(\n (\n {\n heading,\n description,\n contentLang,\n address,\n phone,\n phoneCountry,\n whatsappNumber,\n whatsappMessage,\n email,\n website,\n languages,\n languageLabels,\n insurances,\n firstVisitPriceCents,\n currencyCode = 'EUR',\n profession,\n specialties,\n specializedInFearPatients,\n googleMapsApiKey,\n mapZoom = 14,\n onPhoneClick,\n onWhatsAppClick,\n onMapClick,\n onEmailClick,\n headerSlot,\n footerSlot,\n mapSlot,\n factsAsDefinitionList = false,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const headingId = useId();\n const locale = i18n.language ?? 'en';\n\n const resolvedHeading = heading ?? t('contactProfileCard.heading');\n const resolvedAriaLabel = ariaLabel ?? resolvedHeading;\n\n const formattedPrice = useMemo(() => {\n if (firstVisitPriceCents == null) return undefined;\n // 0 is a free first visit: the chip reads \"Free\", not \"€0.00\".\n return formatPriceOrFree(\n firstVisitPriceCents,\n currencyCode,\n locale,\n t('common.freeOfCharge'),\n );\n }, [firstVisitPriceCents, currencyCode, locale, t]);\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('contactProfileCard.label.address'),\n value: (\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span lang={contentLang} dir=\"auto\">\n {address.line}\n </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('contactProfileCard.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('contactProfileCard.label.phone'),\n value: (\n <Link\n href={`tel:${normalisePhone(phone)}`}\n intent=\"default\"\n onClick={onPhoneClick}\n >\n <bdi dir=\"ltr\">\n {formatPhoneForDisplay(phone, { defaultCountry: phoneCountry })}\n </bdi>\n </Link>\n ),\n });\n }\n\n if (whatsappNumber) {\n rows.push({\n key: 'whatsapp',\n icon: <MessageCircle aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.whatsapp'),\n value: (\n <Link\n href={buildWhatsAppHref(whatsappNumber, whatsappMessage)}\n external\n intent=\"default\"\n onClick={onWhatsAppClick}\n >\n <bdi dir=\"ltr\">\n {formatPhoneForDisplay(whatsappNumber, {\n digitsAreInternational: true,\n })}\n </bdi>\n </Link>\n ),\n });\n }\n\n if (email) {\n rows.push({\n key: 'email',\n icon: <Mail aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.email'),\n value: (\n <Link\n href={`mailto:${email}`}\n intent=\"default\"\n onClick={onEmailClick}\n >\n <bdi dir=\"ltr\">{email}</bdi>\n </Link>\n ),\n });\n }\n\n if (website) {\n const href = websiteHref(website);\n rows.push({\n key: 'website',\n icon: <Globe aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.website'),\n value: href ? (\n <Link href={href} external intent=\"default\">\n <bdi dir=\"ltr\">{website}</bdi>\n </Link>\n ) : (\n <bdi dir=\"ltr\">{website}</bdi>\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('contactProfileCard.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('contactProfileCard.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 // The one figure on this card a patient compares between\n // practices, so it gets a chip. The chip starts in the value\n // column with every other row's value (the subgrid aligns them),\n // not pinned to the row's end, where it read as out of line.\n // `accentSoft`, not `brand`. The languages and insurance rows on\n // this card are tonal chips (`neutral` and `info`), so a solid\n // `brand` fill would read as a different class of object rather\n // than the same family. `accentSoft` is the same tonal recipe in\n // the most distinct hue on the card, so the price still leads.\n // `lg` because `md` sets the label at the smallest step of the\n // ramp, and `.theme-accessible` cannot lift it — the one figure\n // patients compare should not be the smallest text on the card.\n rows.push({\n key: 'firstVisitPrice',\n icon: <Banknote aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.firstVisitPrice'),\n value: (\n <Badge variant=\"accentSoft\" size=\"lg\">\n {formattedPrice}\n </Badge>\n ),\n });\n }\n\n if (specializedInFearPatients) {\n rows.push({\n key: 'expertForAnxiousPatients',\n icon: <Heart aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.expertForAnxiousPatients'),\n value: t('contactProfileCard.value.yesShort'),\n });\n }\n\n const specialtyItems =\n specialties && specialties.length > 0 ? specialties : undefined;\n\n if (profession && !specialtyItems) {\n rows.push({\n key: 'profession',\n icon: <Stethoscope aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.profession'),\n value: profession,\n });\n }\n\n // Imperative handle for agent integrations.\n useAgentRegistration(\n contactProfileCardAgent,\n {\n getProfession: () => profession,\n getSpecialtyKeys: () => (specialtyItems ?? []).map((item) => item.key),\n },\n id,\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('contactProfileCard.map.alt', {\n address: address!.line,\n defaultValue: 'Map showing {{address}}',\n })}\n />\n ) : null;\n\n // Map area: explicit consumer slot wins over the implicit\n // googleMapsApiKey-driven static thumbnail. 0.33.4 introduces the\n // slot so consumers can embed an interactive <MapView> /\n // <PracticeMap> wrapper inside the card chrome instead of the\n // fixed static <img>. When neither is set the area renders as\n // nothing. 0.33.6 moves the area from above the heading to below\n // the data rows — the map reads as the spatial closer (\"here it\n // is on the map\") rather than a stylised hero, and any CTA in\n // footerSlot still lands at the very bottom.\n const mapArea = mapSlot ?? mapThumb;\n\n const body = (\n <>\n {description ? (\n <p\n lang={contentLang}\n dir=\"auto\"\n className=\"type-body-sm ds:m-0 ds:whitespace-pre-line\"\n >\n {description}\n </p>\n ) : null}\n {rows.length > 0 ? (\n <KeyValueList rowGap=\"md\" semantic={factsAsDefinitionList}>\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 {specialtyItems\n ? (() => {\n // Outside the KeyValueList on purpose: its rows are promoted to a\n // three-column subgrid, which a stacked label-above-value row does\n // not fit. The icon gap is the list's column gap (`gap-x-md`), so\n // this label and its list line up with the labels above. In\n // definition-list mode it is still a dt/dd pair, in its own dl.\n const specialtyPair = (\n <KeyValuePair\n layout=\"vertical\"\n className=\"ds:!gap-x-[var(--spacing-md)]\"\n icon={<Stethoscope aria-hidden=\"true\" />}\n label={t('contactProfileCard.label.profession')}\n value={<SpecialtyList items={specialtyItems} />}\n />\n );\n return factsAsDefinitionList ? (\n <SemanticKeyValueGroup>{specialtyPair}</SemanticKeyValueGroup>\n ) : (\n specialtyPair\n );\n })()\n : null}\n {mapArea}\n {footerSlot}\n </>\n );\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 <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=\"contact-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\nContactProfileCard.displayName = 'ContactProfileCard';\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 CONTACT_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 CONTACT_PROFILE_CARD_ROW_ICONS: Record<\n (typeof CONTACT_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 ContactProfileCardSurface = 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","contactProfileCardAgent","handle","rootVariants","cva","normalisePhone","raw","buildWhatsAppHref","number","message","base","websiteHref","website","value","href","protocol","buildMapHref","address","getStaticMapMarkerHex","match","MapThumbStrip","apiKey","center","zoom","altText","markerHex","src","jsx","ContactProfileCard","forwardRef","heading","description","contentLang","phone","phoneCountry","whatsappNumber","whatsappMessage","email","languages","languageLabels","insurances","firstVisitPriceCents","currencyCode","profession","specialties","specializedInFearPatients","googleMapsApiKey","mapZoom","onPhoneClick","onWhatsAppClick","onMapClick","onEmailClick","headerSlot","footerSlot","mapSlot","factsAsDefinitionList","surface","ariaLabel","id","className","rest","ref","t","i18n","useTranslation","headingId","useId","locale","resolvedHeading","resolvedAriaLabel","formattedPrice","useMemo","formatPriceOrFree","rows","MapPin","jsxs","Link","Phone","formatPhoneForDisplay","MessageCircle","Mail","Globe","resolveLabel","code","key","LanguagesIcon","Badge","ShieldCheck","ins","Heart","specialtyItems","Stethoscope","useAgentRegistration","item","mapThumb","mapArea","body","Fragment","KeyValueList","row","KeyValuePair","specialtyPair","SpecialtyList","SemanticKeyValueGroup","inner","Card","CONTACT_PROFILE_CARD_ROW_KEYS","CONTACT_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,GAAiB,YAAYF,EAAU,GCF3CG,KAAkE;AAAA,EAC7E,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,M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AAA,MACH,GACF;AAAA,MACC4B;AAAA,IAAA,GACH;AAGF,WACE,gBAAArE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAkC;AAAA,QACA,MAAK;AAAA,QACL,cAAYQ;AAAA,QACZ,mBAAiBJ;AAAA,QACjB,kBAAe;AAAA,QACf,qBAAmBP;AAAA,QACnB,IAAAA;AAAA,QACA,WAAWvD,GAAa,EAAE,SAAAqD,GAAS,WAAAG,IAAW;AAAA,QAC7C,GAAGC;AAAA,QAEH,gBAAY,aACX,gBAAAjC,EAAC8E,KAAK,SAAQ,YACZ,4BAACA,EAAK,MAAL,EAAU,WAAU,kDAClB,aACH,EAAA,CACF,sBAEC,OAAA,EAAI,WAAU,kDACZ,UAAAD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA5E,GAAmB,cAAc;AAI1B,MAAM8E,KAAgC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAIaC,KAGT;AAAA,EACF,SAASjC;AAAA,EACT,OAAOG;AAAA,EACP,UAAUE;AAAA,EACV,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,WAAWI;AAAAA,EACX,YAAYE;AAAA,EACZ,iBAAiBxF;AAAA,EACjB,0BAA0B0F;AAAA,EAC1B,YAAYE;AACd;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot-grid-DEZRB4Yb.js","sources":["../../src/components/slot-grid/slot-grid.agent.ts","../../src/components/slot-grid/slot-grid.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — SlotGrid. */\n/* */\n/* Multi-day time-slot picker. Selection stays fully CONTROLLED by the */\n/* consumer (`selectedSlotId` + `onSlotSelect`) — the adapter never */\n/* stores a choice, it reports the committed prop and fires the same */\n/* callback a native click would (the `combobox.set_value` contract). */\n/* */\n/* Two channels reach the same component: */\n/* • the registry — `SlotGridHandle` resolved by (`slot-grid`, id), */\n/* which is the ONLY channel the MCP bridge has (PRS §26 §8.1); */\n/* • the DOM — `data-slot-id` on every rendered slot button, for */\n/* DOM-driving tools (browser extension / computer use) that never */\n/* touch the registry. */\n/* */\n/* PHI (§6.1 / §7): a slot id is an AVAILABILITY identifier and a day */\n/* key is a calendar date. SlotGrid is never handed a patient — its */\n/* inputs are `{ id, start, end?, available?, label? }` plus */\n/* `Intl`-formatted time strings — so no state slot can leak PHI. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { SlotGridHandle } from './slot-grid';\n\nexport const slotGridAgent: AgentAdapter<SlotGridHandle> = {\n id: 'slot-grid',\n // pick → `select_slot` + the `selectedSlotId` state slot.\n // range_navigate → `next_days` / `previous_days` + `hasNext` / `hasPrevious`.\n // expand → `show_more_day` + the `expandedDays` state slot.\n //\n // Host-delegated, deliberately WITHOUT an action: the optional\n // \"Next available\" CTA (`showNextAvailable` + `onJumpToNextAvailable`)\n // stays a native click on the toolbar button. It is a consumer-owned\n // jump to a window the grid has not been given, so the agent reaches it\n // through the DOM, or by reading `slotsByDay` and paging with\n // `next_days` until availability appears.\n capabilities: ['pick', 'range_navigate', 'expand'],\n state: {\n status: {\n type: \"'default' | 'loading' | 'disabled' | 'empty'\",\n descriptionKey: 'ui.agent.slotGrid.state.status',\n description:\n 'Visual state of the grid. Read this before concluding \"no availability\" — `loading` means the window has not resolved yet.',\n read: (handle) => handle.getStatus(),\n },\n selectedSlotId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.slotGrid.state.selectedSlotId',\n description:\n 'Id of the slot the consumer has committed as selected, or null. Reflects the controlled `selectedSlotId` prop, not an internal choice.',\n read: (handle) => handle.getSelectedSlotId(),\n },\n visibleDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.visibleDays',\n description:\n 'Calendar days currently rendered as columns, as `yyyy-MM-dd` keys in display order.',\n read: (handle) => handle.getVisibleDays(),\n },\n slotsByDay: {\n type: 'Record<string, string[]>',\n descriptionKey: 'ui.agent.slotGrid.state.slotsByDay',\n description:\n 'Map of day key (`yyyy-MM-dd`) to the ids of that day’s bookable slots. Ids only — never slot or patient objects. Includes slots still collapsed behind \"Show more\".',\n read: (handle) => handle.getSlotsByDay(),\n },\n expandedDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.expandedDays',\n description:\n 'Day keys whose \"Show more\" control has been used, so every slot for that day is rendered.',\n read: (handle) => handle.getExpandedDays(),\n },\n hasPrevious: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasPrevious',\n description:\n 'True when an earlier window of days exists — the \"previous days\" arrow is offered.',\n read: (handle) => handle.getHasPrevious(),\n },\n hasNext: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasNext',\n description:\n 'True when a later window of days exists — the \"next days\" arrow is offered.',\n read: (handle) => handle.getHasNext(),\n },\n },\n actions: {\n select_slot: {\n // Fires the consumer's `onSlotSelect`, exactly as a click on the slot\n // button does. Persistent in the consumer's booking draft, and\n // reversible by selecting another slot — `write`, not `phi`: a slot is\n // availability, not patient data.\n safety: 'write',\n argsType: '{ slotId: string }',\n argsSchema: {\n type: 'object',\n properties: {\n slotId: {\n type: 'string',\n description:\n 'Id of the slot to select. Must be one of the ids returned by the `slotsByDay` state slot.',\n },\n },\n required: ['slotId'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the selection callback fired.',\n },\n errors: [\n 'Returns false when no slot with that id is in the visible window — page with next_days / previous_days first.',\n 'Returns false when the slot is unavailable, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.selectSlot',\n description:\n 'Select an available slot by id. Emits the same selection the user would by clicking the slot button.',\n examples: [\n {\n args: { slotId: 'avail-2026-09-01-0930' },\n note: 'Book the 09:30 slot on 1 September.',\n },\n ],\n invoke: (handle, args: { slotId: string }) =>\n handle.selectSlot(args.slotId),\n },\n next_days: {\n // View-window paging only — the consumer fetches, nothing is persisted.\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasNext` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.nextDays',\n description:\n 'Page the visible window forward to the next group of days, as the \"next days\" arrow does.',\n invoke: (handle) => handle.nextDays(),\n },\n previous_days: {\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasPrevious` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.previousDays',\n description:\n 'Page the visible window back to the previous group of days, as the \"previous days\" arrow does.',\n invoke: (handle) => handle.previousDays(),\n },\n show_more_day: {\n // Reveals slots the grid already holds — ephemeral disclosure state.\n safety: 'read',\n argsType: '{ dayKey: string }',\n argsSchema: {\n type: 'object',\n properties: {\n dayKey: {\n type: 'string',\n pattern: '^\\\\d{4}-\\\\d{2}-\\\\d{2}$',\n description:\n 'Day to expand, as a `yyyy-MM-dd` key from the `visibleDays` state slot.',\n },\n },\n required: ['dayKey'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the day was expanded.',\n },\n errors: [\n 'Returns false when the day key is not one of the visible columns, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.showMoreDay',\n description:\n 'Render every slot for one day, as the day’s \"Show more\" button does. Only affects what is on screen — `slotsByDay` already lists collapsed slots.',\n examples: [\n {\n args: { dayKey: '2026-09-01' },\n note: 'Reveal the rest of 1 September so every slot button is clickable.',\n },\n ],\n invoke: (handle, args: { dayKey: string }) =>\n handle.showMoreDay(args.dayKey),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'slot-grid',\n description:\n 'Marks the SlotGrid region. Emits `data-state` reflecting the public `state` prop (default / loading / disabled / empty).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the `id` prop. Also the registry key — without an `id` the instance does not register, so the handle-driven actions are unreachable and only the DOM channel works.',\n },\n item: {\n attr: 'data-slot-id',\n sourceProp: 'days[].slots[].id',\n description:\n 'Per-slot button identifier sourced from each `SlotGridSlot.id` — an availability id, never a patient id. DOM-driving agents activate a slot via native click on the matching button.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* SlotGrid — multi-day time-slot picker for patient booking. */\n/* */\n/* Renders N day columns side-by-side. Each column shows a day header */\n/* (formatted via `Intl.DateTimeFormat(locale)`) plus a vertical list */\n/* of slot buttons. Long days collapse to `maxInitialSlotsPerDay` and */\n/* reveal the rest via a \"Show more\" button (progressive disclosure). */\n/* */\n/* Navigation arrows (`onPreviousDays` / `onNextDays`) let the consumer */\n/* page the window of days; the optional \"Next available\" CTA jumps to */\n/* the first day with an open slot. */\n/* */\n/* Purely presentational — no business logic, no data fetching. Date */\n/* comparisons use `date-fns` (never moment.js) and the rendered labels */\n/* come exclusively from `Intl.DateTimeFormat` or the `ui.slotGrid` */\n/* namespace via `useTranslation('ui')`. */\n/* */\n/* Agent surface: `ref` is the outer <div>; a separate `SlotGridHandle` */\n/* (built with `useMemo`, registered via `useAgentRegistration`) gives */\n/* the MCP bridge a read-only view of the visible days + available slot */\n/* ids and the four interactions the UI itself offers. See */\n/* `slot-grid.agent.ts` and PRS §26. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { format, isSameDay, parseISO } from 'date-fns';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { useAgentRegistration } from '../../agent';\nimport { slotGridAgent } from './slot-grid.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type SlotGridState = 'default' | 'loading' | 'disabled' | 'empty';\n\nexport type SlotGridSize = 'sm' | 'md' | 'lg';\n\nexport interface SlotGridSlot {\n /** Stable identity — used by consumers to resolve selection. */\n id: string;\n /** Slot start — ISO string or `Date`. Rendered via `Intl.DateTimeFormat`. */\n start: string | Date;\n /** Optional slot end — if omitted only the start time is announced. */\n end?: string | Date;\n /** Defaults to `true`. Unavailable slots render disabled and are not focusable. */\n available?: boolean;\n /** Override the default `Intl`-formatted time label. */\n label?: string;\n /** Override the accessible name of the slot button. */\n ariaLabel?: string;\n}\n\nexport interface SlotGridDay {\n /** The calendar day the column represents. */\n date: string | Date;\n /** Slots for this day, in chronological order. Empty array ⇒ empty day. */\n slots: SlotGridSlot[];\n /** Override the default `Intl`-formatted day header. */\n label?: string;\n}\n\nexport interface SlotGridProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'onSelect'>,\n VariantProps<typeof slotGridVariants> {\n /** Days to render, one column per entry. */\n days: SlotGridDay[];\n /** Visual / interactive state. Defaults to `'default'`. */\n state?: SlotGridState;\n /** Localised guidance below the empty title, for an empty day or range. */\n emptyDescription?: string;\n /**\n * Show a day with no times as a dash instead of the \"No times available\"\n * sentence, for narrow columns. The sentence stays in the reading order for\n * assistive technology. A range with no times at all shows the sentence as\n * one short line instead of the empty-state illustration. Defaults to\n * `false`.\n */\n compactEmptyDays?: boolean;\n /**\n * Heading level of each day's header (`h3` by default). Set it one level\n * below the heading of the surface the grid sits in.\n */\n dayHeadingLevel?: 3 | 4 | 5 | 6;\n /**\n * Keep each time on one line, for narrow columns. A label wider than its\n * button is cut with an ellipsis; the accessible name is unchanged.\n * Defaults to `false`.\n */\n nowrapTimes?: boolean;\n /** Density of the slot buttons and day headers. Defaults to `'md'`. */\n size?: SlotGridSize;\n /** Id of the currently selected slot (controlled). */\n selectedSlotId?: string;\n /**\n * Initial number of slots to render per day before the \"Show more\"\n * progressive-disclosure control collapses the rest. Defaults to `6`.\n */\n maxInitialSlotsPerDay?: number;\n /**\n * BCP-47 locale tag for `Intl.DateTimeFormat`. Defaults to the active\n * i18next language.\n */\n locale?: string;\n /** IANA time zone for `Intl.DateTimeFormat`. Optional. */\n timeZone?: string;\n /** Whether the \"previous days\" navigation arrow should be enabled. */\n hasPrevious?: boolean;\n /** Whether the \"next days\" navigation arrow should be enabled. */\n hasNext?: boolean;\n /**\n * When `true`, renders the \"Next available\" CTA at the end of the\n * toolbar. Only emits a callback — the consumer owns the navigation.\n */\n showNextAvailable?: boolean;\n /** Accessible label for the outer grid region. */\n ariaLabel?: string;\n /** Fires when the user selects an available slot. */\n onSlotSelect?: (slot: SlotGridSlot, day: SlotGridDay) => void;\n /** Fires when the user clicks the \"previous days\" arrow. */\n onPreviousDays?: () => void;\n /** Fires when the user clicks the \"next days\" arrow. */\n onNextDays?: () => void;\n /** Fires when the user clicks a day's \"Show more\" button. */\n onShowMore?: (day: SlotGridDay) => void;\n /** Fires when the user clicks the \"Next available\" CTA. */\n onJumpToNextAvailable?: () => void;\n}\n\n/**\n * Imperative handle the agent adapter (`slot-grid.agent.ts`) reads and drives.\n *\n * It is NOT the `ref` — `ref` stays the outer `HTMLDivElement` so existing\n * consumers are unaffected. The handle is built with `useMemo` and handed to\n * `useAgentRegistration`, the same shape Autocomplete uses.\n *\n * Every getter returns identifiers and structural state only — availability\n * slot ids, calendar day keys, booleans. Never patient data (PRS §26 §7).\n */\nexport interface SlotGridHandle {\n /** Current visual / interactive state (`default` / `loading` / `disabled` / `empty`). */\n getStatus: () => SlotGridState;\n /** Controlled `selectedSlotId` prop, or `null` when nothing is selected. */\n getSelectedSlotId: () => string | null;\n /** Day keys (`yyyy-MM-dd`) of the currently-rendered columns, in order. */\n getVisibleDays: () => string[];\n /** Day key → ids of that day's AVAILABLE slots (collapsed ones included). */\n getSlotsByDay: () => Record<string, string[]>;\n /** Day keys whose \"Show more\" control has been used. */\n getExpandedDays: () => string[];\n /** Mirrors the `hasPrevious` prop — whether an earlier window exists. */\n getHasPrevious: () => boolean;\n /** Mirrors the `hasNext` prop — whether a later window exists. */\n getHasNext: () => boolean;\n /** Select an available slot by id. Returns `false` when it cannot be selected. */\n selectSlot: (slotId: string) => boolean;\n /** Page the window forward. Returns `false` when the arrow would be disabled. */\n nextDays: () => boolean;\n /** Page the window back. Returns `false` when the arrow would be disabled. */\n previousDays: () => boolean;\n /** Reveal a day's collapsed slots. Returns `false` when the day is not visible. */\n showMoreDay: (dayKey: string) => boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst slotGridVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:w-full',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst toolbarVariants = cva(\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full',\n);\n\n/**\n * Column-count is dynamic (1–12), so it is declared as a full CVA variant —\n * this keeps every `grid-cols-N` string statically visible to Tailwind's\n * JIT and keeps the variant table inside CVA rather than hand-rolled.\n */\nconst COLS_MAX = 12;\n\nconst columnsVariants = cva(\n 'ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start',\n {\n variants: {\n cols: {\n 1: 'ds:grid-cols-1',\n 2: 'ds:grid-cols-2',\n 3: 'ds:grid-cols-3',\n 4: 'ds:grid-cols-4',\n 5: 'ds:grid-cols-5',\n 6: 'ds:grid-cols-6',\n 7: 'ds:grid-cols-7',\n 8: 'ds:grid-cols-8',\n 9: 'ds:grid-cols-9',\n 10: 'ds:grid-cols-10',\n 11: 'ds:grid-cols-11',\n 12: 'ds:grid-cols-12',\n },\n },\n defaultVariants: { cols: 1 },\n },\n);\n\ntype ColumnsCount = NonNullable<VariantProps<typeof columnsVariants>['cols']>;\n\nfunction clampCols(count: number): ColumnsCount {\n return Math.max(1, Math.min(count, COLS_MAX)) as ColumnsCount;\n}\n\nconst columnVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:bg-[var(--card)]',\n 'ds:min-w-0',\n ].join(' '),\n);\n\nconst dayHeaderVariants = cva(\n [\n 'ds:font-[var(--font-weight-semibold)]',\n 'ds:text-[var(--foreground)]',\n 'ds:text-start',\n 'ds:truncate',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-xs)]',\n md: 'ds:text-[length:var(--font-size-sm)]',\n lg: 'ds:text-[length:var(--font-size-base)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst slotListVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none',\n);\n\nconst slotButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:w-full',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:font-[var(--font-weight-medium)]',\n 'ds:bg-[var(--secondary)]',\n 'ds:shadow-[var(--shadow-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:transition-[background-color,color,box-shadow]',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[var(--focus-ring-offset)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none',\n 'ds:hover:enabled:shadow-[var(--shadow-md)]',\n 'ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]',\n ].join(' '),\n {\n variants: {\n nowrap: {\n true: 'ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap',\n false: '',\n },\n size: {\n sm: 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8',\n md: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10',\n lg: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12',\n },\n },\n defaultVariants: { size: 'md', nowrap: false },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction toDate(value: string | Date): Date {\n return value instanceof Date ? value : parseISO(value);\n}\n\n/**\n * Internal identity for one rendered column. The index guards against a\n * consumer passing the same calendar date twice.\n */\nfunction columnKey(day: SlotGridDay, index: number): string {\n return `${toDate(day.date).toISOString()}-${index}`;\n}\n\n/**\n * Agent-facing key for one column — the local calendar date as `yyyy-MM-dd`.\n * Structural, locale-independent, and carries no patient data.\n */\nfunction dayKeyOf(day: SlotGridDay): string {\n return format(toDate(day.date), 'yyyy-MM-dd');\n}\n\n/** Is `a` the same calendar day as `b`? Uses `date-fns`, locale-agnostic. */\nexport function isSameDate(a: string | Date, b: string | Date): boolean {\n return isSameDay(toDate(a), toDate(b));\n}\n\n/** Find the first day in a list that has at least one available slot. */\nexport function findFirstAvailable(\n days: SlotGridDay[],\n): { day: SlotGridDay; slot: SlotGridSlot } | undefined {\n for (const day of days) {\n const slot = day.slots.find((s) => s.available !== false);\n if (slot) return { day, slot };\n }\n return undefined;\n}\n\nfunction formatDayHeader(\n date: Date,\n locale: string,\n timeZone?: string,\n): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n }).format(date);\n } catch {\n return new Intl.DateTimeFormat('en', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n}\n\nfunction formatSlotTime(\n slot: SlotGridSlot,\n locale: string,\n timeZone?: string,\n): string {\n if (slot.label !== undefined) return slot.label;\n const start = toDate(slot.start);\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n });\n if (slot.end) {\n const end = toDate(slot.end);\n if (typeof fmt.formatRange === 'function') {\n try {\n return fmt.formatRange(start, end);\n } catch {\n /* fall through */\n }\n }\n return `${fmt.format(start)} – ${fmt.format(end)}`;\n }\n return fmt.format(start);\n } catch {\n return start.toISOString();\n }\n}\n\nfunction formatSlotAriaLabel(\n slot: SlotGridSlot,\n day: SlotGridDay,\n locale: string,\n timeZone: string | undefined,\n template: (opts: { time: string; day: string }) => string,\n): string {\n if (slot.ariaLabel !== undefined) return slot.ariaLabel;\n const time = formatSlotTime(slot, locale, timeZone);\n const dayLabel =\n day.label !== undefined\n ? day.label\n : formatDayHeader(toDate(day.date), locale, timeZone);\n return template({ time, day: dayLabel });\n}\n\n/* ------------------------------------------------------------------ */\n/* Glyphs — logical-direction arrows */\n/* ------------------------------------------------------------------ */\n\nfunction ChevronStartIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M15 18l-6-6 6-6\" />\n </svg>\n );\n}\n\nfunction ChevronEndIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const SlotGrid = forwardRef<HTMLDivElement, SlotGridProps>(\n (\n {\n days,\n state = 'default',\n emptyDescription,\n compactEmptyDays = false,\n dayHeadingLevel = 3,\n nowrapTimes = false,\n size = 'md',\n selectedSlotId,\n maxInitialSlotsPerDay = 6,\n locale: localeProp,\n timeZone,\n hasPrevious = false,\n hasNext = false,\n showNextAvailable = false,\n ariaLabel,\n onSlotSelect,\n onPreviousDays,\n onNextDays,\n onShowMore,\n onJumpToNextAvailable,\n className,\n id,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const locale = localeProp ?? i18n.language ?? 'en';\n const idBase = useId();\n\n const [expanded, setExpanded] = useState<Record<string, boolean>>({});\n\n const isLoading = state === 'loading';\n const isDisabled = state === 'disabled';\n const isInteractionSuppressed = isLoading || isDisabled;\n const isEmpty =\n state === 'empty' ||\n days.length === 0 ||\n days.every((day) => day.slots.length === 0);\n\n const resolvedAriaLabel = ariaLabel ?? t('slotGrid.ariaLabel');\n\n const handleSlotClick = useCallback(\n (slot: SlotGridSlot, day: SlotGridDay) => {\n if (isInteractionSuppressed) return;\n if (slot.available === false) return;\n onSlotSelect?.(slot, day);\n },\n [isInteractionSuppressed, onSlotSelect],\n );\n\n const handleShowMore = useCallback(\n (day: SlotGridDay, key: string) => {\n setExpanded((prev) => ({ ...prev, [key]: true }));\n onShowMore?.(day);\n },\n [onShowMore],\n );\n\n const handleSlotKeyDown = useCallback(\n (\n event: KeyboardEvent<HTMLButtonElement>,\n slot: SlotGridSlot,\n day: SlotGridDay,\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleSlotClick(slot, day);\n }\n },\n [handleSlotClick],\n );\n\n /* ---- Agent handle ---------------------------------------------- */\n /* `ref` stays the outer <div> (unchanged for consumers). The agent */\n /* handle is a separate, memo-stable object — the Autocomplete shape. */\n /* A snapshot ref mirrors props + internal state so the handle reads */\n /* fresh values without re-registering on every render. */\n\n const snapshot = {\n days,\n selectedSlotId,\n hasPrevious,\n hasNext,\n state,\n expanded,\n isInteractionSuppressed,\n onPreviousDays,\n onNextDays,\n handleSlotClick,\n handleShowMore,\n };\n const latest = useRef(snapshot);\n useEffect(() => {\n latest.current = snapshot;\n });\n\n const agentHandle = useMemo<SlotGridHandle>(\n () => ({\n getStatus: () => latest.current.state,\n getSelectedSlotId: () => latest.current.selectedSlotId ?? null,\n getVisibleDays: () => latest.current.days.map(dayKeyOf),\n getSlotsByDay: () => {\n // Ids only — never the slot objects (PRS §26 §7 / auditor A9).\n const byDay: Record<string, string[]> = {};\n for (const day of latest.current.days) {\n const key = dayKeyOf(day);\n const ids = day.slots\n .filter((slot) => slot.available !== false)\n .map((slot) => slot.id);\n byDay[key] = byDay[key] ? [...byDay[key], ...ids] : ids;\n }\n return byDay;\n },\n getExpandedDays: () =>\n latest.current.days\n .filter(\n (day, index) =>\n latest.current.expanded[columnKey(day, index)] === true,\n )\n .map(dayKeyOf),\n getHasPrevious: () => latest.current.hasPrevious,\n getHasNext: () => latest.current.hasNext,\n selectSlot: (slotId) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n for (const day of current.days) {\n const slot = day.slots.find((candidate) => candidate.id === slotId);\n if (!slot) continue;\n if (slot.available === false) return false;\n // Same code path as a native click on the slot button.\n current.handleSlotClick(slot, day);\n return true;\n }\n return false;\n },\n nextDays: () => {\n const current = latest.current;\n if (!current.hasNext || current.isInteractionSuppressed) return false;\n if (!current.onNextDays) return false;\n current.onNextDays();\n return true;\n },\n previousDays: () => {\n const current = latest.current;\n if (!current.hasPrevious || current.isInteractionSuppressed) {\n return false;\n }\n if (!current.onPreviousDays) return false;\n current.onPreviousDays();\n return true;\n },\n showMoreDay: (dayKey) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n const index = current.days.findIndex(\n (day) => dayKeyOf(day) === dayKey,\n );\n if (index < 0) return false;\n const day = current.days[index];\n current.handleShowMore(day, columnKey(day, index));\n return true;\n },\n }),\n [],\n );\n\n useAgentRegistration(slotGridAgent, agentHandle, id);\n\n const DayHeading = `h${dayHeadingLevel}` as 'h3' | 'h4' | 'h5' | 'h6';\n const columnCount = clampCols(days.length || 1);\n const columnsClass = columnsVariants({ cols: columnCount });\n\n /* ---- Rendered content ------------------------------------------ */\n\n let body: ReactNode;\n if (isLoading) {\n body = (\n <div\n className={columnsClass}\n data-state=\"loading\"\n role=\"status\"\n aria-live=\"polite\"\n aria-label={t('common.loading')}\n >\n {Array.from({ length: columnCount }, (_, colIdx) => (\n <div key={`loading-col-${colIdx}`} className={columnVariants()}>\n <Skeleton variant=\"text\" size={size} width=\"60%\" />\n <div className={slotListVariants()}>\n {Array.from(\n { length: Math.min(maxInitialSlotsPerDay, 4) },\n (_, rowIdx) => (\n <Skeleton\n key={`loading-slot-${colIdx}-${rowIdx}`}\n variant=\"rounded\"\n size={size}\n height=\"40px\"\n />\n ),\n )}\n </div>\n </div>\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = compactEmptyDays ? (\n <p\n data-state=\"empty\"\n className=\"type-body-sm ds:text-[var(--muted-foreground)] ds:m-0 ds:text-start\"\n >\n {t('slotGrid.noSlots')}\n </p>\n ) : (\n <div data-state=\"empty\">\n <EmptyState\n variant=\"no-results\"\n title={t('slotGrid.noSlots')}\n description={emptyDescription}\n />\n </div>\n );\n } else {\n const hasEmptyDay = days.some((day) => day.slots.length === 0);\n body = (\n <>\n <div\n className={columnsClass}\n data-state={isDisabled ? 'disabled' : 'default'}\n >\n {days.map((day, dayIdx) => {\n const dayKey = columnKey(day, dayIdx);\n const headerLabel =\n day.label ??\n formatDayHeader(toDate(day.date), locale, timeZone);\n const headerId = `${idBase}-day-${dayIdx}-header`;\n const isExpanded = expanded[dayKey] ?? false;\n const visibleSlots = isExpanded\n ? day.slots\n : day.slots.slice(0, maxInitialSlotsPerDay);\n const hiddenCount = day.slots.length - visibleSlots.length;\n\n const isDayEmpty = day.slots.length === 0;\n\n return (\n // Use a plain <div role=\"group\"> rather than <section> — a\n // <section> with aria-labelledby is a landmark, and nesting many\n // landmarks inside the outer slot-grid landmark fails axe's\n // landmark-unique rule.\n <div\n key={dayKey}\n role=\"group\"\n className={columnVariants()}\n aria-labelledby={headerId}\n data-empty={isDayEmpty || undefined}\n >\n <DayHeading\n id={headerId}\n className={dayHeaderVariants({ size })}\n >\n {headerLabel}\n </DayHeading>\n {isDayEmpty ? (\n <p className=\"type-body-sm ds:text-[var(--muted-foreground)] ds:m-0\">\n {compactEmptyDays ? (\n <>\n <span aria-hidden=\"true\">–</span>\n <span className=\"ds:sr-only\">\n {t('slotGrid.noSlots')}\n </span>\n </>\n ) : (\n t('slotGrid.noSlots')\n )}\n </p>\n ) : null}\n <ul className={slotListVariants()}>\n {visibleSlots.map((slot) => {\n const ariaLabelSlot = formatSlotAriaLabel(\n slot,\n day,\n locale,\n timeZone,\n ({ time, day: dayLabel }) =>\n t('slotGrid.slotLabel', { time, day: dayLabel }),\n );\n const isSelected = selectedSlotId === slot.id;\n const isSlotDisabled =\n slot.available === false || isInteractionSuppressed;\n return (\n <li key={slot.id}>\n <button\n type=\"button\"\n className={slotButtonVariants({\n size,\n nowrap: nowrapTimes,\n })}\n aria-label={ariaLabelSlot}\n aria-pressed={isSelected}\n disabled={isSlotDisabled}\n aria-disabled={isSlotDisabled || undefined}\n data-slot-id={slot.id}\n onClick={() => handleSlotClick(slot, day)}\n onKeyDown={(event) =>\n handleSlotKeyDown(event, slot, day)\n }\n >\n {formatSlotTime(slot, locale, timeZone)}\n </button>\n </li>\n );\n })}\n </ul>\n {hiddenCount > 0 ? (\n <Button\n intent=\"ghost\"\n size={size === 'lg' ? 'md' : 'sm'}\n onClick={() => handleShowMore(day, dayKey)}\n disabled={isInteractionSuppressed}\n >\n {t('slotGrid.showMore', { count: hiddenCount })}\n </Button>\n ) : null}\n </div>\n );\n })}\n </div>\n {/* One hint for every empty day, plain text after the day groups. */}\n {hasEmptyDay && emptyDescription ? (\n <p\n className=\"type-body-sm ds:text-[var(--muted-foreground)] ds:m-0 ds:text-start\"\n data-slot-grid-hint=\"\"\n >\n {emptyDescription}\n </p>\n ) : null}\n </>\n );\n }\n\n return (\n <div\n ref={ref}\n id={id}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n className={slotGridVariants({ size, className })}\n data-component=\"slot-grid\"\n data-component-id={id}\n data-state={state}\n {...rest}\n >\n <div className={toolbarVariants()}>\n <IconButton\n icon={<ChevronStartIcon />}\n aria-label={t('slotGrid.previousDays')}\n className=\"ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]\"\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasPrevious || isInteractionSuppressed}\n onClick={onPreviousDays}\n />\n {showNextAvailable ? (\n <Button\n intent=\"secondary\"\n size={size === 'lg' ? 'md' : 'sm'}\n disabled={isInteractionSuppressed}\n onClick={onJumpToNextAvailable}\n >\n {t('slotGrid.nextAvailable')}\n </Button>\n ) : (\n <span aria-hidden=\"true\" />\n )}\n <IconButton\n icon={<ChevronEndIcon />}\n aria-label={t('slotGrid.nextDays')}\n className=\"ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]\"\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasNext || isInteractionSuppressed}\n onClick={onNextDays}\n />\n </div>\n\n {body}\n </div>\n );\n },\n);\n\nSlotGrid.displayName = 'SlotGrid';\n"],"names":["slotGridAgent","handle","args","slotGridVariants","cva","toolbarVariants","COLS_MAX","columnsVariants","clampCols","count","columnVariants","dayHeaderVariants","slotListVariants","slotButtonVariants","toDate","value","parseISO","columnKey","day","index","dayKeyOf","format","isSameDate","a","b","isSameDay","findFirstAvailable","days","slot","s","formatDayHeader","date","locale","timeZone","formatSlotTime","start","fmt","end","formatSlotAriaLabel","template","time","dayLabel","ChevronStartIcon","jsx","ChevronEndIcon","SlotGrid","forwardRef","state","emptyDescription","compactEmptyDays","dayHeadingLevel","nowrapTimes","size","selectedSlotId","maxInitialSlotsPerDay","localeProp","hasPrevious","hasNext","showNextAvailable","ariaLabel","onSlotSelect","onPreviousDays","onNextDays","onShowMore","onJumpToNextAvailable","className","id","rest","ref","t","i18n","useTranslation","idBase","useId","expanded","setExpanded","useState","isLoading","isDisabled","isInteractionSuppressed","isEmpty","resolvedAriaLabel","handleSlotClick","useCallback","handleShowMore","key","prev","handleSlotKeyDown","event","snapshot","latest","useRef","useEffect","agentHandle","useMemo","byDay","ids","slotId","current","candidate","dayKey","useAgentRegistration","DayHeading","columnCount","columnsClass","body","_","colIdx","jsxs","Skeleton","rowIdx","EmptyState","hasEmptyDay","Fragment","dayIdx","headerLabel","headerId","visibleSlots","hiddenCount","isDayEmpty","ariaLabelSlot","isSelected","isSlotDisabled","Button","IconButton"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWJ,cAAc,CAAC,QAAQ,kBAAkB,QAAQ;AAAA,EACjD,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,kBAAA;AAAA,IAAkB;AAAA,IAE7C,aA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