@alfadocs/ui-kit-debug 0.31.4 → 0.31.6
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-UJA6Arbs.js → agenda-card-DtGlQde1.js} +2 -2
- package/dist/_chunks/{agenda-card-UJA6Arbs.js.map → agenda-card-DtGlQde1.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-1fAxNOMz.js → agenda-tray-CXmlwt2K.js} +2 -2
- package/dist/_chunks/{agenda-tray-1fAxNOMz.js.map → agenda-tray-CXmlwt2K.js.map} +1 -1
- package/dist/_chunks/{badge-CptERaHx.js → badge-B9Cr6iEB.js} +30 -21
- package/dist/_chunks/badge-B9Cr6iEB.js.map +1 -0
- package/dist/_chunks/{benefit-card-CLPNpiQE.js → benefit-card-B86DH-PE.js} +14 -10
- package/dist/_chunks/benefit-card-B86DH-PE.js.map +1 -0
- package/dist/_chunks/{card-DKTMLVrw.js → card-CNri9ssR.js} +43 -37
- package/dist/_chunks/card-CNri9ssR.js.map +1 -0
- package/dist/_chunks/{contact-card-DYbp--s-.js → contact-card-Dos7Tley.js} +2 -2
- package/dist/_chunks/{contact-card-DYbp--s-.js.map → contact-card-Dos7Tley.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-BpicmolK.js → editable-currency-cell-renderer-YvTwkFrD.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-BpicmolK.js.map → editable-currency-cell-renderer-YvTwkFrD.js.map} +1 -1
- package/dist/_chunks/key-value-pair-CYE7NSpM.js +134 -0
- package/dist/_chunks/key-value-pair-CYE7NSpM.js.map +1 -0
- package/dist/_chunks/message-circle-C23eicgb.js +20 -0
- package/dist/_chunks/message-circle-C23eicgb.js.map +1 -0
- package/dist/_chunks/operator-hero-BsjE-kJF.js +171 -0
- package/dist/_chunks/operator-hero-BsjE-kJF.js.map +1 -0
- package/dist/_chunks/{patient-search-hFiYbqcl.js → patient-search-CSDru7QW.js} +2 -2
- package/dist/_chunks/{patient-search-hFiYbqcl.js.map → patient-search-CSDru7QW.js.map} +1 -1
- package/dist/_chunks/practice-profile-card-C2_2ZH_G.js +297 -0
- package/dist/_chunks/practice-profile-card-C2_2ZH_G.js.map +1 -0
- package/dist/_chunks/{practice-results-dOlljaAK.js → practice-results-VqbCUO1b.js} +225 -269
- package/dist/_chunks/practice-results-VqbCUO1b.js.map +1 -0
- package/dist/_chunks/{reviews-panel-yanuBZs-.js → reviews-panel-Cjys8G8K.js} +2 -2
- package/dist/_chunks/{reviews-panel-yanuBZs-.js.map → reviews-panel-Cjys8G8K.js.map} +1 -1
- package/dist/_chunks/shield-check-BhHyReu8.js +52 -0
- package/dist/_chunks/shield-check-BhHyReu8.js.map +1 -0
- package/dist/_chunks/{timeline-D0Wo7v_o.js → timeline-BZC7qGdy.js} +2 -2
- package/dist/_chunks/{timeline-D0Wo7v_o.js.map → timeline-BZC7qGdy.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BSvQS3be.js → workflow-map-DfpjDZHK.js} +93 -107
- package/dist/_chunks/workflow-map-DfpjDZHK.js.map +1 -0
- package/dist/agent-catalog.json +55 -1
- 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 +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/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/data-table/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/key-value-pair/index.d.ts +2 -2
- package/dist/components/key-value-pair/index.d.ts.map +1 -1
- package/dist/components/key-value-pair/index.js +3 -2
- package/dist/components/key-value-pair/key-value-pair.d.ts +10 -0
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/operator-hero/index.d.ts +4 -0
- package/dist/components/operator-hero/index.d.ts.map +1 -0
- package/dist/components/operator-hero/index.js +6 -0
- package/dist/components/operator-hero/index.js.map +1 -0
- package/dist/components/operator-hero/operator-hero.agent.d.ts +4 -0
- package/dist/components/operator-hero/operator-hero.agent.d.ts.map +1 -0
- package/dist/components/operator-hero/operator-hero.d.ts +64 -0
- package/dist/components/operator-hero/operator-hero.d.ts.map +1 -0
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/practice-profile-card/index.d.ts +4 -0
- package/dist/components/practice-profile-card/index.d.ts.map +1 -0
- package/dist/components/practice-profile-card/index.js +8 -0
- package/dist/components/practice-profile-card/index.js.map +1 -0
- package/dist/components/practice-profile-card/practice-profile-card.agent.d.ts +4 -0
- package/dist/components/practice-profile-card/practice-profile-card.agent.d.ts.map +1 -0
- package/dist/components/practice-profile-card/practice-profile-card.d.ts +115 -0
- package/dist/components/practice-profile-card/practice-profile-card.d.ts.map +1 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/reviews-panel/index.js +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 +23 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +23 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +23 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +23 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +23 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +23 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +23 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +23 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +23 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +23 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +23 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +23 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +23 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +23 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +23 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +23 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +23 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +23 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +23 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +23 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +23 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +23 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +23 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +23 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +23 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +23 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +23 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +23 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +23 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +23 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +23 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +23 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +23 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +23 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +23 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +23 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +400 -391
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +23 -0
- package/dist/locales/de.json +23 -0
- package/dist/locales/el.json +23 -0
- package/dist/locales/en.json +23 -0
- package/dist/locales/es.json +23 -0
- package/dist/locales/fr.json +23 -0
- package/dist/locales/hi.json +23 -0
- package/dist/locales/it.json +23 -0
- package/dist/locales/ja.json +23 -0
- package/dist/locales/nl.json +23 -0
- package/dist/locales/pl.json +23 -0
- package/dist/locales/pt.json +23 -0
- package/dist/locales/ro.json +23 -0
- package/dist/locales/ru.json +23 -0
- package/dist/locales/sq.json +23 -0
- package/dist/locales/sv.json +23 -0
- package/dist/locales/tr.json +23 -0
- package/dist/locales/zh.json +23 -0
- package/dist/tokens.css +1 -1
- package/package.json +9 -1
- package/dist/_chunks/badge-CptERaHx.js.map +0 -1
- package/dist/_chunks/benefit-card-CLPNpiQE.js.map +0 -1
- package/dist/_chunks/card-DKTMLVrw.js.map +0 -1
- package/dist/_chunks/key-value-pair-C8DaR3Xs.js +0 -98
- package/dist/_chunks/key-value-pair-C8DaR3Xs.js.map +0 -1
- package/dist/_chunks/practice-results-dOlljaAK.js.map +0 -1
- package/dist/_chunks/workflow-map-BSvQS3be.js.map +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, useState as y, useCallback as z } from "react";
|
|
3
|
+
import { c as P } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as I } from "react-i18next";
|
|
5
|
+
import { I as K } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { C as T } from "./check-DPdL_Sm7.js";
|
|
7
|
+
import { C as j } from "./copy-B00HK7tj.js";
|
|
8
|
+
const B = P("ds:flex", {
|
|
9
|
+
variants: {
|
|
10
|
+
layout: {
|
|
11
|
+
horizontal: "ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
12
|
+
vertical: "ds:flex-col ds:gap-[var(--spacing-xs)]"
|
|
13
|
+
},
|
|
14
|
+
/** Internal — flips the root to a horizontal flex when an icon
|
|
15
|
+
is present so the icon can sit at the leading edge of both
|
|
16
|
+
horizontal and vertical inner stacks. `items-start` keeps the
|
|
17
|
+
icon anchored to the label row even when the value wraps. */
|
|
18
|
+
hasIcon: {
|
|
19
|
+
true: "ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
20
|
+
false: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
layout: "horizontal",
|
|
25
|
+
hasIcon: !1
|
|
26
|
+
}
|
|
27
|
+
}), _ = g(
|
|
28
|
+
({
|
|
29
|
+
label: t,
|
|
30
|
+
value: s,
|
|
31
|
+
layout: e = "horizontal",
|
|
32
|
+
mono: r = !1,
|
|
33
|
+
copyable: l = !1,
|
|
34
|
+
copyText: v,
|
|
35
|
+
icon: d,
|
|
36
|
+
className: h,
|
|
37
|
+
...x
|
|
38
|
+
}, k) => {
|
|
39
|
+
const { t: o } = I(), [C, p] = y(!1), [N, n] = y(""), c = v ?? (typeof s == "string" ? s : void 0), w = z(async () => {
|
|
40
|
+
if (c)
|
|
41
|
+
try {
|
|
42
|
+
await navigator.clipboard.writeText(c), p(!0), n(o("keyValuePair.copied")), setTimeout(() => {
|
|
43
|
+
p(!1), n("");
|
|
44
|
+
}, 2e3);
|
|
45
|
+
} catch {
|
|
46
|
+
n(o("keyValuePair.notAvailable")), setTimeout(() => n(""), 3e3);
|
|
47
|
+
}
|
|
48
|
+
}, [c, o]), V = [
|
|
49
|
+
"type-body ds:text-foreground ds:min-w-0 ds:shrink ds:[unicode-bidi:isolate]",
|
|
50
|
+
r ? "ds:font-[family-name:var(--font-mono)]" : ""
|
|
51
|
+
].filter(Boolean).join(" "), m = d != null, b = e === "horizontal" ? "ds:flex ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)] ds:min-w-0 ds:flex-1" : "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1", u = /* @__PURE__ */ i(f, { children: [
|
|
52
|
+
/* @__PURE__ */ i("span", { className: "type-label ds:text-muted-foreground ds:shrink-0", children: [
|
|
53
|
+
t,
|
|
54
|
+
/* @__PURE__ */ a("span", { className: "ds:sr-only", children: ": " })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ a("span", { className: V, children: s }),
|
|
57
|
+
l && /* @__PURE__ */ a(
|
|
58
|
+
K,
|
|
59
|
+
{
|
|
60
|
+
icon: C ? /* @__PURE__ */ a(T, {}) : /* @__PURE__ */ a(j, {}),
|
|
61
|
+
size: "sm",
|
|
62
|
+
"aria-label": o("keyValuePair.copy", { label: t }),
|
|
63
|
+
onClick: w,
|
|
64
|
+
intent: "ghost",
|
|
65
|
+
className: e === "horizontal" ? "ds:ms-auto ds:shrink-0" : "ds:self-start"
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] });
|
|
69
|
+
return /* @__PURE__ */ i(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
ref: k,
|
|
73
|
+
className: B({ layout: e, hasIcon: m, className: h }),
|
|
74
|
+
"data-component": "key-value-pair",
|
|
75
|
+
...x,
|
|
76
|
+
children: [
|
|
77
|
+
m ? /* @__PURE__ */ i(f, { children: [
|
|
78
|
+
/* @__PURE__ */ a(
|
|
79
|
+
"span",
|
|
80
|
+
{
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
className: "ds:inline-flex ds:shrink-0 ds:mt-0.5 ds:text-[color:var(--key-value-pair-icon-color)] ds:[&_svg]:size-4",
|
|
83
|
+
children: d
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ a("div", { className: b, children: u })
|
|
87
|
+
] }) : u,
|
|
88
|
+
/* @__PURE__ */ a("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: N })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
_.displayName = "KeyValuePair";
|
|
95
|
+
const A = {
|
|
96
|
+
sm: "ds:gap-y-[var(--spacing-sm)]",
|
|
97
|
+
md: "ds:gap-y-[var(--spacing-md)]",
|
|
98
|
+
lg: "ds:gap-y-[var(--spacing-lg)]"
|
|
99
|
+
}, L = g(
|
|
100
|
+
({ children: t, className: s, rowGap: e = "md", ...r }, l) => /* @__PURE__ */ a(
|
|
101
|
+
"div",
|
|
102
|
+
{
|
|
103
|
+
ref: l,
|
|
104
|
+
"data-component": "key-value-list",
|
|
105
|
+
className: [
|
|
106
|
+
"ds:grid ds:grid-cols-[auto_auto_minmax(0,1fr)]",
|
|
107
|
+
"ds:gap-x-[var(--spacing-md)]",
|
|
108
|
+
A[e],
|
|
109
|
+
// Each direct `data-component="key-value-pair"` child becomes
|
|
110
|
+
// a subgrid row spanning all three columns. The KVP's own
|
|
111
|
+
// flex layout still works inside the cell (icon shrinks-0,
|
|
112
|
+
// label shrinks-0, value flexes) — subgrid just aligns the
|
|
113
|
+
// boundaries between siblings.
|
|
114
|
+
'ds:[&>[data-component="key-value-pair"]]:grid',
|
|
115
|
+
'ds:[&>[data-component="key-value-pair"]]:grid-cols-subgrid',
|
|
116
|
+
'ds:[&>[data-component="key-value-pair"]]:col-span-3',
|
|
117
|
+
'ds:[&>[data-component="key-value-pair"]]:items-baseline',
|
|
118
|
+
// Reset the per-row flex gap so the subgrid columns own the
|
|
119
|
+
// spacing. Without this the KVP's intra-row `gap-sm` would
|
|
120
|
+
// double the parent's `gap-x-md`.
|
|
121
|
+
'ds:[&>[data-component="key-value-pair"]]:gap-0',
|
|
122
|
+
s
|
|
123
|
+
].filter(Boolean).join(" "),
|
|
124
|
+
...r,
|
|
125
|
+
children: t
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
);
|
|
129
|
+
L.displayName = "KeyValueList";
|
|
130
|
+
export {
|
|
131
|
+
L as K,
|
|
132
|
+
_ as a
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=key-value-pair-CYE7NSpM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,UAAUA,CAAU,GAC9CJ,EAAU,EAAI,GACdG,EAAgBN,EAAE,qBAAqB,CAAC,GACxC,WAAW,MAAM;AACf,YAAAG,EAAU,EAAK,GACfG,EAAgB,EAAE;AAAA,UACpB,GAAG,GAAI;AAAA,QACT,QAAQ;AACN,UAAAA,EAAgBN,EAAE,2BAA2B,CAAC,GAC9C,WAAW,MAAM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,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;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { c as e } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const c = [
|
|
9
|
+
[
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
13
|
+
key: "1sd12s"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
], a = e("message-circle", c);
|
|
17
|
+
export {
|
|
18
|
+
a as M
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=message-circle-C23eicgb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-circle-C23eicgb.js","sources":["../../node_modules/lucide-react/dist/esm/icons/message-circle.js"],"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 [\n \"path\",\n {\n d: \"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\",\n key: \"1sd12s\"\n }\n ]\n];\nconst MessageCircle = createLucideIcon(\"message-circle\", __iconNode);\n\nexport { __iconNode, MessageCircle as default };\n//# sourceMappingURL=message-circle.js.map\n"],"names":["__iconNode","MessageCircle","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AACA,GACMC,IAAgBC,EAAiB,kBAAkBF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k, useId as A } from "react";
|
|
3
|
+
import { c as O } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as C } from "react-i18next";
|
|
5
|
+
import { A as L } from "./avatar-BNQNhoyL.js";
|
|
6
|
+
import { B as R } from "./badge-B9Cr6iEB.js";
|
|
7
|
+
import { C as j } from "./card-CNri9ssR.js";
|
|
8
|
+
import { R as z } from "./rating-BRD7O74e.js";
|
|
9
|
+
import { u as I } from "./registry-nPAVE19X.js";
|
|
10
|
+
const B = {
|
|
11
|
+
id: "operator-hero",
|
|
12
|
+
capabilities: ["view_change"],
|
|
13
|
+
state: {
|
|
14
|
+
name: {
|
|
15
|
+
type: "string",
|
|
16
|
+
descriptionKey: "ui.agent.operatorHero.state.name",
|
|
17
|
+
description: "Operator display name currently rendered.",
|
|
18
|
+
read: (s) => s.getName()
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
actions: {},
|
|
22
|
+
domHooks: {
|
|
23
|
+
root: {
|
|
24
|
+
attr: "data-component",
|
|
25
|
+
value: "operator-hero",
|
|
26
|
+
description: "Marks the OperatorHero root region."
|
|
27
|
+
},
|
|
28
|
+
instanceId: {
|
|
29
|
+
attr: "data-component-id",
|
|
30
|
+
sourceProp: "id",
|
|
31
|
+
description: "Sourced from the id prop."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, F = O("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
35
|
+
variants: {
|
|
36
|
+
// Density toggle. Default `comfortable` matches the practice hero's
|
|
37
|
+
// visual weight minus the cover strip. `compact` is for embedded
|
|
38
|
+
// surfaces (booking aside, ROI Dashboard practice panel) where the
|
|
39
|
+
// hero needs to fit in <12rem vertical.
|
|
40
|
+
density: {
|
|
41
|
+
comfortable: "",
|
|
42
|
+
compact: ""
|
|
43
|
+
},
|
|
44
|
+
// Matches the kit's other `surface` props (Booking, ReviewsPanel,
|
|
45
|
+
// PracticeProfileCard). `'elevated'` wraps in `<Card>`.
|
|
46
|
+
surface: {
|
|
47
|
+
flat: "",
|
|
48
|
+
elevated: ""
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
density: "comfortable",
|
|
53
|
+
surface: "elevated"
|
|
54
|
+
}
|
|
55
|
+
}), P = k(
|
|
56
|
+
({
|
|
57
|
+
name: s,
|
|
58
|
+
tagline: i,
|
|
59
|
+
imageUrl: f,
|
|
60
|
+
rating: a,
|
|
61
|
+
badges: t,
|
|
62
|
+
actionSlot: n,
|
|
63
|
+
density: r = "comfortable",
|
|
64
|
+
surface: c = "elevated",
|
|
65
|
+
"aria-label": g,
|
|
66
|
+
id: d,
|
|
67
|
+
className: u,
|
|
68
|
+
...x
|
|
69
|
+
}, h) => {
|
|
70
|
+
const { t: p } = C(), m = A(), b = g ?? p("operatorHero.regionLabel");
|
|
71
|
+
I(B, { getName: () => s }, d);
|
|
72
|
+
const N = a ? p("operatorHero.ratingLabel", {
|
|
73
|
+
value: a.value.toFixed(1),
|
|
74
|
+
count: a.count
|
|
75
|
+
}) : void 0, y = r === "comfortable" ? "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]" : "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", H = r === "comfortable" ? "2xl" : "xl", w = r === "comfortable" ? "type-title-page" : "type-title-card", v = /* @__PURE__ */ o(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: [
|
|
79
|
+
"ds:flex ds:items-start ds:gap-[var(--spacing-lg)]",
|
|
80
|
+
y,
|
|
81
|
+
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
|
|
82
|
+
].join(" "),
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ e(
|
|
85
|
+
L,
|
|
86
|
+
{
|
|
87
|
+
size: H,
|
|
88
|
+
name: s,
|
|
89
|
+
src: f,
|
|
90
|
+
className: "ds:shrink-0"
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ o("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
94
|
+
/* @__PURE__ */ o("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap", children: [
|
|
95
|
+
/* @__PURE__ */ e(
|
|
96
|
+
"h1",
|
|
97
|
+
{
|
|
98
|
+
id: m,
|
|
99
|
+
className: `${w} ds:m-0 ds:text-[color:var(--foreground)]`,
|
|
100
|
+
children: s
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
n ? /* @__PURE__ */ e("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]", children: n }) : null
|
|
104
|
+
] }),
|
|
105
|
+
i ? /* @__PURE__ */ e("p", { className: "type-body ds:m-0 ds:text-[color:var(--foreground)]", children: i }) : null,
|
|
106
|
+
a ? /* @__PURE__ */ o(
|
|
107
|
+
"div",
|
|
108
|
+
{
|
|
109
|
+
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
110
|
+
"aria-label": N,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ e(
|
|
113
|
+
z,
|
|
114
|
+
{
|
|
115
|
+
value: a.value,
|
|
116
|
+
max: 5,
|
|
117
|
+
size: r === "comfortable" ? "md" : "sm"
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ o("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: [
|
|
121
|
+
a.value.toFixed(1),
|
|
122
|
+
" · ",
|
|
123
|
+
a.count
|
|
124
|
+
] })
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
) : null,
|
|
128
|
+
t && t.length > 0 ? /* @__PURE__ */ e(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
role: "list",
|
|
132
|
+
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)] ds:mt-[var(--spacing-2xs)]",
|
|
133
|
+
children: t.map((l) => /* @__PURE__ */ e(
|
|
134
|
+
R,
|
|
135
|
+
{
|
|
136
|
+
variant: l.variant ?? "neutral",
|
|
137
|
+
role: "listitem",
|
|
138
|
+
children: l.label
|
|
139
|
+
},
|
|
140
|
+
l.key
|
|
141
|
+
))
|
|
142
|
+
}
|
|
143
|
+
) : null
|
|
144
|
+
] })
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
return /* @__PURE__ */ e(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
ref: h,
|
|
152
|
+
role: "region",
|
|
153
|
+
"aria-label": b,
|
|
154
|
+
"aria-labelledby": m,
|
|
155
|
+
"data-component": "operator-hero",
|
|
156
|
+
"data-component-id": d,
|
|
157
|
+
"data-density": r,
|
|
158
|
+
id: d,
|
|
159
|
+
className: F({ surface: c, density: r, className: u }),
|
|
160
|
+
...x,
|
|
161
|
+
children: c === "elevated" ? /* @__PURE__ */ e(j, { variant: "elevated", children: v }) : v
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
P.displayName = "OperatorHero";
|
|
167
|
+
export {
|
|
168
|
+
P as O,
|
|
169
|
+
B as o
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=operator-hero-BsjE-kJF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,IAAsD;AAAA,EACjE,IAAI;AAAA,EACJ,cAAc,CAAC,aAAa;AAAA,EAC5B,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,QAAA;AAAA,IAAQ;AAAA,EACnC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EAC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A,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;"}
|
|
@@ -4,7 +4,7 @@ import { c as T } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as j } from "react-i18next";
|
|
5
5
|
import { A as se } from "./autocomplete-DIgdhCGJ.js";
|
|
6
6
|
import { B as ue } from "./button-DD_0Xdmr.js";
|
|
7
|
-
import { C as M } from "./card-
|
|
7
|
+
import { C as M } from "./card-CNri9ssR.js";
|
|
8
8
|
import { S as fe } from "./slider-BHWzXdjt.js";
|
|
9
9
|
import { A as Z } from "./alert-ywPR59NE.js";
|
|
10
10
|
import { D as F } from "./dropdown-menu-BC5ZdOMo.js";
|
|
@@ -1155,4 +1155,4 @@ export {
|
|
|
1155
1155
|
Oe as P,
|
|
1156
1156
|
ye as p
|
|
1157
1157
|
};
|
|
1158
|
-
//# sourceMappingURL=patient-search-
|
|
1158
|
+
//# sourceMappingURL=patient-search-CSDru7QW.js.map
|