@alfadocs/ui-kit 1.4.17 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/_chunks/{booking-CGKof8QU.js → booking-D84O6H2X.js} +553 -546
  2. package/dist/_chunks/{care-plan-card-C83Hb9EE.js → care-plan-card-CehAU7F_.js} +2 -2
  3. package/dist/_chunks/{care-plan-entry-card-CHMPSTCz.js → care-plan-entry-card-ChWRMfMw.js} +2 -2
  4. package/dist/_chunks/{periodontal-chart-brakjj0s.js → periodontal-chart-C0nNQKKK.js} +121 -121
  5. package/dist/_chunks/practice-profile-hero-Bdd0bFqC.js +187 -0
  6. package/dist/_chunks/{practice-results-DWUZRm2x.js → practice-results-CKoLD_x5.js} +220 -206
  7. package/dist/_chunks/tooth-data-DR8Kdnup.js +903 -0
  8. package/dist/_chunks/tooth-finding-palette-vqC-D2Ye.js +708 -0
  9. package/dist/_chunks/tooth-scheme-BPXE1_3N.js +2051 -0
  10. package/dist/agent-catalog.json +497 -56
  11. package/dist/agent-i18n/en.json +29 -11
  12. package/dist/components/booking/booking-types.d.ts +9 -0
  13. package/dist/components/booking/index.js +1 -1
  14. package/dist/components/care-plan-card/index.js +1 -1
  15. package/dist/components/care-plan-entry-card/index.js +1 -1
  16. package/dist/components/index.d.ts +2 -0
  17. package/dist/components/periodontal-chart/index.js +1 -1
  18. package/dist/components/practice-profile-hero/index.d.ts +4 -0
  19. package/dist/components/practice-profile-hero/index.js +6 -0
  20. package/dist/components/practice-profile-hero/practice-profile-hero.agent.d.ts +4 -0
  21. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +60 -0
  22. package/dist/components/practice-results/index.js +1 -1
  23. package/dist/components/practice-results/practice-results.d.ts +15 -1
  24. package/dist/components/tooth-finding-palette/index.d.ts +4 -0
  25. package/dist/components/tooth-finding-palette/index.js +9 -0
  26. package/dist/components/tooth-finding-palette/tooth-finding-palette.agent.d.ts +4 -0
  27. package/dist/components/tooth-finding-palette/tooth-finding-palette.d.ts +89 -0
  28. package/dist/components/tooth-scheme/index.d.ts +2 -2
  29. package/dist/components/tooth-scheme/index.js +57 -30
  30. package/dist/components/tooth-scheme/tooth-data.d.ts +279 -10
  31. package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
  32. package/dist/components/tooth-scheme/tooth-scheme.d.ts +30 -3
  33. package/dist/host-compat.css +1 -4
  34. package/dist/i18n/locales/ar.d.ts +41 -1
  35. package/dist/i18n/locales/ar.js +42 -2
  36. package/dist/i18n/locales/de.d.ts +41 -1
  37. package/dist/i18n/locales/de.js +42 -2
  38. package/dist/i18n/locales/el.d.ts +41 -1
  39. package/dist/i18n/locales/el.js +42 -2
  40. package/dist/i18n/locales/en.d.ts +41 -1
  41. package/dist/i18n/locales/en.js +42 -2
  42. package/dist/i18n/locales/es.d.ts +41 -1
  43. package/dist/i18n/locales/es.js +42 -2
  44. package/dist/i18n/locales/fr.d.ts +41 -1
  45. package/dist/i18n/locales/fr.js +42 -2
  46. package/dist/i18n/locales/hi.d.ts +41 -1
  47. package/dist/i18n/locales/hi.js +42 -2
  48. package/dist/i18n/locales/it.d.ts +41 -1
  49. package/dist/i18n/locales/it.js +42 -2
  50. package/dist/i18n/locales/ja.d.ts +41 -1
  51. package/dist/i18n/locales/ja.js +42 -2
  52. package/dist/i18n/locales/nl.d.ts +41 -1
  53. package/dist/i18n/locales/nl.js +42 -2
  54. package/dist/i18n/locales/pl.d.ts +41 -1
  55. package/dist/i18n/locales/pl.js +42 -2
  56. package/dist/i18n/locales/pt.d.ts +41 -1
  57. package/dist/i18n/locales/pt.js +42 -2
  58. package/dist/i18n/locales/ro.d.ts +41 -1
  59. package/dist/i18n/locales/ro.js +42 -2
  60. package/dist/i18n/locales/ru.d.ts +41 -1
  61. package/dist/i18n/locales/ru.js +42 -2
  62. package/dist/i18n/locales/sq.d.ts +41 -1
  63. package/dist/i18n/locales/sq.js +42 -2
  64. package/dist/i18n/locales/sv.d.ts +41 -1
  65. package/dist/i18n/locales/sv.js +42 -2
  66. package/dist/i18n/locales/tr.d.ts +41 -1
  67. package/dist/i18n/locales/tr.js +42 -2
  68. package/dist/i18n/locales/zh.d.ts +41 -1
  69. package/dist/i18n/locales/zh.js +42 -2
  70. package/dist/index.js +561 -525
  71. package/dist/locales/ar.json +42 -2
  72. package/dist/locales/de.json +42 -2
  73. package/dist/locales/el.json +42 -2
  74. package/dist/locales/en.json +42 -2
  75. package/dist/locales/es.json +42 -2
  76. package/dist/locales/fr.json +42 -2
  77. package/dist/locales/hi.json +42 -2
  78. package/dist/locales/it.json +42 -2
  79. package/dist/locales/ja.json +42 -2
  80. package/dist/locales/nl.json +42 -2
  81. package/dist/locales/pl.json +42 -2
  82. package/dist/locales/pt.json +42 -2
  83. package/dist/locales/ro.json +42 -2
  84. package/dist/locales/ru.json +42 -2
  85. package/dist/locales/sq.json +42 -2
  86. package/dist/locales/sv.json +42 -2
  87. package/dist/locales/tr.json +42 -2
  88. package/dist/locales/zh.json +42 -2
  89. package/dist/tokens.css +1 -1
  90. package/package.json +9 -1
  91. package/dist/_chunks/tooth-data-BwuoKFf4.js +0 -660
  92. package/dist/_chunks/tooth-scheme-s0ipC0-Z.js +0 -1483
@@ -0,0 +1,187 @@
1
+ import { jsxs as s, jsx as e, Fragment as w } from "react/jsx-runtime";
2
+ import { forwardRef as k, useId as C, useMemo as R, useRef as j } from "react";
3
+ import { c as A } from "./index-D2ZczOXr.js";
4
+ import { A as x } from "./avatar-BNQNhoyL.js";
5
+ import { B } from "./badge-sTusUqZD.js";
6
+ import { C as y } from "./card-DPmk26CL.js";
7
+ import { R as z } from "./rating-BYbUowdK.js";
8
+ import { u as I } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
9
+ import { u as K } from "./registry-DvAUVLHh.js";
10
+ const M = {
11
+ id: "practice-profile-hero",
12
+ // Purely observable hero region — no interactive affordances and no
13
+ // imperative actions on the handle (getName / getHasCover are read-only
14
+ // projections).
15
+ capabilities: [],
16
+ state: {
17
+ name: {
18
+ type: "string",
19
+ descriptionKey: "ui.agent.practiceProfileHero.state.name",
20
+ description: "Practice display name currently rendered.",
21
+ read: (r) => r.getName()
22
+ },
23
+ hasCover: {
24
+ type: "boolean",
25
+ descriptionKey: "ui.agent.practiceProfileHero.state.hasCover",
26
+ description: "Whether a cover-image strip is rendered. Structural flag only — never the image URL or any PHI.",
27
+ read: (r) => r.getHasCover()
28
+ }
29
+ },
30
+ actions: {},
31
+ domHooks: {
32
+ root: {
33
+ attr: "data-component",
34
+ value: "practice-profile-hero",
35
+ description: "Marks the PracticeProfileHero root region."
36
+ },
37
+ instanceId: {
38
+ attr: "data-component-id",
39
+ sourceProp: "id",
40
+ description: "Sourced from the id prop."
41
+ }
42
+ }
43
+ }, V = A("ds:w-full ds:text-[color:var(--foreground)]", {
44
+ variants: {
45
+ // Matches the kit's other `surface` props (Booking, ReviewsPanel,
46
+ // OperatorHero). `'elevated'` wraps in `<Card>`.
47
+ surface: {
48
+ flat: "",
49
+ elevated: ""
50
+ }
51
+ },
52
+ defaultVariants: {
53
+ surface: "elevated"
54
+ }
55
+ }), E = k(
56
+ ({
57
+ name: r,
58
+ tagline: c,
59
+ imageUrl: n,
60
+ coverImageUrl: t,
61
+ rating: o,
62
+ badges: d,
63
+ actionSlot: p,
64
+ surface: m = "elevated",
65
+ "aria-label": f,
66
+ id: l,
67
+ className: N,
68
+ ...P
69
+ }, H) => {
70
+ const v = C(), i = !!t, b = R(
71
+ () => ({ getName: () => r, getHasCover: () => i }),
72
+ [r, i]
73
+ );
74
+ K(M, b, l);
75
+ const h = j(null);
76
+ I(() => {
77
+ const a = h.current;
78
+ a && (t ? a.style.setProperty(
79
+ "--practice-profile-hero-cover",
80
+ `url("${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`
81
+ ) : a.style.removeProperty("--practice-profile-hero-cover"));
82
+ }, [t]);
83
+ const u = i ? /* @__PURE__ */ e(
84
+ "div",
85
+ {
86
+ ref: h,
87
+ "aria-hidden": "true",
88
+ "data-slot": "cover",
89
+ className: [
90
+ "ds:h-32 ds:sm:h-40 ds:w-full",
91
+ // Cover image layered over the brand gradient — the gradient is
92
+ // the visible underlay while the image streams in (or 404s). The
93
+ // `none` fallback keeps the declaration valid before the layout
94
+ // effect sets the custom property (SSR / first paint).
95
+ "ds:bg-[image:var(--practice-profile-hero-cover,none),var(--gradient-hero-brand)]",
96
+ "ds:bg-cover ds:bg-center"
97
+ ].join(" ")
98
+ }
99
+ ) : null, g = /* @__PURE__ */ s(
100
+ "div",
101
+ {
102
+ className: [
103
+ // Phones: stacked column, smaller avatar — the practice name,
104
+ // tagline and rating keep the full line width instead of being
105
+ // squeezed beside a 3xl avatar. sm+: classic row layout.
106
+ "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-md)]",
107
+ "ds:sm:flex-row ds:sm:gap-[var(--spacing-lg)]"
108
+ ].join(" "),
109
+ children: [
110
+ /* @__PURE__ */ e("div", { className: "ds:shrink-0 ds:sm:hidden", children: /* @__PURE__ */ e(x, { size: "xl", name: r, src: n, "aria-hidden": "true" }) }),
111
+ /* @__PURE__ */ e("div", { className: "ds:hidden ds:shrink-0 ds:sm:block", children: /* @__PURE__ */ e(x, { size: "3xl", name: r, src: n, "aria-hidden": "true" }) }),
112
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:w-full ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
113
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-md)]", children: [
114
+ /* @__PURE__ */ e(
115
+ "h1",
116
+ {
117
+ id: v,
118
+ className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]",
119
+ children: r
120
+ }
121
+ ),
122
+ p ? /* @__PURE__ */ e("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]", children: p }) : null
123
+ ] }),
124
+ c ? /* @__PURE__ */ e("p", { className: "type-body ds:m-0 ds:text-[color:var(--foreground)]", children: c }) : null,
125
+ o ? (
126
+ // Rating owns the whole line: locale-formatted value, plural-
127
+ // aware review count, and a single role="img" announcement.
128
+ /* @__PURE__ */ e(
129
+ z,
130
+ {
131
+ value: o.value,
132
+ max: 5,
133
+ size: "md",
134
+ reviews: { count: o.count }
135
+ }
136
+ )
137
+ ) : null,
138
+ d && d.length > 0 ? /* @__PURE__ */ e(
139
+ "div",
140
+ {
141
+ role: "list",
142
+ className: "ds:mt-[var(--spacing-2xs)] ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]",
143
+ children: d.map((a) => /* @__PURE__ */ e(
144
+ B,
145
+ {
146
+ variant: a.variant ?? "neutral",
147
+ role: "listitem",
148
+ children: a.label
149
+ },
150
+ a.key
151
+ ))
152
+ }
153
+ ) : null
154
+ ] })
155
+ ]
156
+ }
157
+ );
158
+ return /* @__PURE__ */ e(
159
+ "div",
160
+ {
161
+ ref: H,
162
+ role: "region",
163
+ "aria-label": f,
164
+ "aria-labelledby": f ? void 0 : v,
165
+ "data-component": "practice-profile-hero",
166
+ "data-component-id": l,
167
+ "data-has-cover": i ? "true" : "false",
168
+ id: l,
169
+ className: V({ surface: m, className: N }),
170
+ ...P,
171
+ children: m === "elevated" ? /* @__PURE__ */ s(y, { variant: "elevated", children: [
172
+ u,
173
+ /* @__PURE__ */ e(y.Body, { children: g })
174
+ ] }) : /* @__PURE__ */ s(w, { children: [
175
+ u,
176
+ /* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]", children: g })
177
+ ] })
178
+ }
179
+ );
180
+ }
181
+ );
182
+ E.displayName = "PracticeProfileHero";
183
+ export {
184
+ E as P,
185
+ M as p
186
+ };
187
+ //# sourceMappingURL=practice-profile-hero-Bdd0bFqC.js.map