@alfadocs/ui-kit 1.10.1 → 1.12.4

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 (118) hide show
  1. package/dist/_chunks/{actions-cell-renderer-xfSYiTXQ.js → actions-cell-renderer-BCEjn3-f.js} +2 -2
  2. package/dist/_chunks/{anamnesis-summary-rows-d44s_whc.js → anamnesis-summary-rows-BfhxWPO3.js} +1421 -1418
  3. package/dist/_chunks/appointment-timeline-DCn0Jx55.js +403 -0
  4. package/dist/_chunks/{balance-badge-cell-C_Qz76x7.js → balance-badge-cell-BrlikHfT.js} +317 -290
  5. package/dist/_chunks/booking-CBHKdsZl.js +2906 -0
  6. package/dist/_chunks/{chart-Bkr1Sh4o.js → chart-C6eHTxkO.js} +2 -2
  7. package/dist/_chunks/{contact-profile-card-CE9OJKcl.js → contact-profile-card-BMIBr5s9.js} +104 -125
  8. package/dist/_chunks/{control-room-rail-Cj2iX9h_.js → control-room-rail-iO_BCaq1.js} +2 -2
  9. package/dist/_chunks/{editable-currency-cell-renderer-zLf_bXvL.js → editable-currency-cell-renderer-B7TVZ5ZJ.js} +2 -2
  10. package/dist/_chunks/{face-scheme-BfDi4YkW.js → face-scheme-CZaKm6fG.js} +2 -2
  11. package/dist/_chunks/{file-manager-Df6hyUYg.js → file-manager-Moc7sUFj.js} +3 -3
  12. package/dist/_chunks/format-price-DNqXPa_q.js +61 -0
  13. package/dist/_chunks/{header-settings-CVC_davE.js → header-settings-J-ZCAfir.js} +2 -2
  14. package/dist/_chunks/{icon-button-group-D6SVMteH.js → icon-button-group-VCCod3Hz.js} +154 -145
  15. package/dist/_chunks/{link-cell-renderer-Cp2MSlJl.js → link-cell-renderer-CenJx-_7.js} +197 -181
  16. package/dist/_chunks/{marketplace-app-shell-Chfdia7m.js → marketplace-app-shell-DDQXQ8hX.js} +2 -2
  17. package/dist/_chunks/{notes-panel-e9cJWVRg.js → notes-panel-CymneXtl.js} +93 -91
  18. package/dist/_chunks/{practice-results-BEsAdW-B.js → practice-results-D7ygCj_W.js} +333 -291
  19. package/dist/_chunks/{signature-request-CW30B77U.js → signature-request-DVDTKLjM.js} +2 -2
  20. package/dist/_chunks/{stepper-accordion-BeVMZPuG.js → stepper-accordion-DmVykr5F.js} +91 -88
  21. package/dist/_chunks/{theme-toggle-DuMhQNFS.js → theme-toggle-uEwoKjl3.js} +2 -2
  22. package/dist/_chunks/{tool-rail-CHyUmulN.js → tool-rail-8Scslq3X.js} +2 -2
  23. package/dist/_chunks/{whatsapp-button-Ca9towA4.js → whatsapp-button-CuFIHJzG.js} +27 -19
  24. package/dist/agent-catalog.json +12 -5
  25. package/dist/agent-i18n/en.json +4 -3
  26. package/dist/components/_shared/format-price.d.ts +21 -0
  27. package/dist/components/_shared/index.d.ts +1 -0
  28. package/dist/components/_shared/stepper.d.ts +28 -2
  29. package/dist/components/appointment-card/appointment-card.d.ts +1 -1
  30. package/dist/components/appointment-timeline/appointment-timeline.d.ts +8 -0
  31. package/dist/components/appointment-timeline/index.js +1 -1
  32. package/dist/components/booking/booking-types.d.ts +15 -2
  33. package/dist/components/booking/index.js +1 -1
  34. package/dist/components/chart/index.js +1 -1
  35. package/dist/components/contact-profile-card/index.js +1 -1
  36. package/dist/components/control-room-rail/index.js +1 -1
  37. package/dist/components/data-table/filters/date-range-filter.d.ts +22 -0
  38. package/dist/components/data-table/index.js +3 -3
  39. package/dist/components/face-scheme/index.js +1 -1
  40. package/dist/components/file-manager/index.js +1 -1
  41. package/dist/components/header-settings/index.js +1 -1
  42. package/dist/components/icon-button-group/index.js +1 -1
  43. package/dist/components/notes-panel/index.js +1 -1
  44. package/dist/components/notes-panel/notes-panel.d.ts +6 -0
  45. package/dist/components/patient-table/index.js +1 -1
  46. package/dist/components/practice-results/index.js +1 -1
  47. package/dist/components/practice-results/practice-results.d.ts +18 -0
  48. package/dist/components/stepper-accordion/index.js +1 -1
  49. package/dist/components/theme-toggle/index.js +1 -1
  50. package/dist/components/tool-rail/index.js +1 -1
  51. package/dist/components/tool-rail/tool-rail.d.ts +1 -1
  52. package/dist/components/whatsapp-button/index.js +1 -1
  53. package/dist/host-compat.css +7 -1
  54. package/dist/i18n/locales/ar.d.ts +4 -0
  55. package/dist/i18n/locales/ar.js +5 -1
  56. package/dist/i18n/locales/de.d.ts +5 -1
  57. package/dist/i18n/locales/de.js +6 -2
  58. package/dist/i18n/locales/el.d.ts +4 -0
  59. package/dist/i18n/locales/el.js +5 -1
  60. package/dist/i18n/locales/en.d.ts +4 -0
  61. package/dist/i18n/locales/en.js +5 -1
  62. package/dist/i18n/locales/es.d.ts +5 -1
  63. package/dist/i18n/locales/es.js +6 -2
  64. package/dist/i18n/locales/fr.d.ts +5 -1
  65. package/dist/i18n/locales/fr.js +6 -2
  66. package/dist/i18n/locales/hi.d.ts +4 -0
  67. package/dist/i18n/locales/hi.js +5 -1
  68. package/dist/i18n/locales/it.d.ts +4 -0
  69. package/dist/i18n/locales/it.js +5 -1
  70. package/dist/i18n/locales/ja.d.ts +4 -0
  71. package/dist/i18n/locales/ja.js +5 -1
  72. package/dist/i18n/locales/nl.d.ts +5 -1
  73. package/dist/i18n/locales/nl.js +6 -2
  74. package/dist/i18n/locales/pl.d.ts +4 -0
  75. package/dist/i18n/locales/pl.js +5 -1
  76. package/dist/i18n/locales/pt.d.ts +5 -1
  77. package/dist/i18n/locales/pt.js +6 -2
  78. package/dist/i18n/locales/ro.d.ts +4 -0
  79. package/dist/i18n/locales/ro.js +5 -1
  80. package/dist/i18n/locales/ru.d.ts +4 -0
  81. package/dist/i18n/locales/ru.js +5 -1
  82. package/dist/i18n/locales/sq.d.ts +4 -0
  83. package/dist/i18n/locales/sq.js +5 -1
  84. package/dist/i18n/locales/sv.d.ts +4 -0
  85. package/dist/i18n/locales/sv.js +5 -1
  86. package/dist/i18n/locales/tr.d.ts +4 -0
  87. package/dist/i18n/locales/tr.js +5 -1
  88. package/dist/i18n/locales/zh.d.ts +4 -0
  89. package/dist/i18n/locales/zh.js +5 -1
  90. package/dist/index.js +20 -20
  91. package/dist/locales/ar.json +5 -1
  92. package/dist/locales/de.json +6 -2
  93. package/dist/locales/el.json +5 -1
  94. package/dist/locales/en.json +5 -1
  95. package/dist/locales/es.json +6 -2
  96. package/dist/locales/fr.json +6 -2
  97. package/dist/locales/hi.json +5 -1
  98. package/dist/locales/it.json +5 -1
  99. package/dist/locales/ja.json +5 -1
  100. package/dist/locales/nl.json +6 -2
  101. package/dist/locales/pl.json +5 -1
  102. package/dist/locales/pt.json +6 -2
  103. package/dist/locales/ro.json +5 -1
  104. package/dist/locales/ru.json +5 -1
  105. package/dist/locales/sq.json +5 -1
  106. package/dist/locales/sv.json +5 -1
  107. package/dist/locales/tr.json +5 -1
  108. package/dist/locales/zh.json +5 -1
  109. package/dist/patterns/anamnesis/anamnesis-config.d.ts +18 -7
  110. package/dist/patterns/anamnesis/anamnesis-types.d.ts +8 -0
  111. package/dist/patterns/anamnesis/index.js +1 -1
  112. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  113. package/dist/patterns/signature-request/index.js +1 -1
  114. package/dist/tokens.css +1 -1
  115. package/package.json +1 -1
  116. package/dist/_chunks/appointment-timeline-0mwtpErq.js +0 -388
  117. package/dist/_chunks/booking-DHkKcUIl.js +0 -2713
  118. package/dist/_chunks/languages-CGLX6Qpe.js +0 -19
@@ -0,0 +1,403 @@
1
+ import { jsxs as S, jsx as o, Fragment as ke } from "react/jsx-runtime";
2
+ import { forwardRef as be, useId as Te, useMemo as F, useRef as T, useState as Z, useCallback as x, useImperativeHandle as xe } from "react";
3
+ import { c as De } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as we } from "react-i18next";
5
+ import { A as Re } from "./appointment-card-Dzr3GeVz.js";
6
+ import { B as A } from "./button-nJaPh_HC.js";
7
+ import { B as Ie } from "./button-group-CaxRJsNG.js";
8
+ import { D as Se } from "./date-picker-CepI_oI2.js";
9
+ import { P as je } from "./panel-header-D313n_9-.js";
10
+ import { S as Ce } from "./skeleton-CZbwyJAA.js";
11
+ import { E as He } from "./empty-state-X0sVPfVo.js";
12
+ import { u as O } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
13
+ import { u as Fe } from "./use-prefers-reduced-motion-BMwIQRjB.js";
14
+ import { u as Me } from "./registry-DvAUVLHh.js";
15
+ import { C as Ne } from "./calendar-days-BGWklvE-.js";
16
+ const _e = {
17
+ id: "appointment-timeline",
18
+ // 'pick' backs select_item (non-persisting activation through
19
+ // onOpenAppointment); 'scroll' backs jump_to_today, which re-anchors the
20
+ // scroll viewport (mirrors practice-results' scroll_to_result).
21
+ capabilities: ["scroll", "pick"],
22
+ state: {
23
+ items: {
24
+ type: "Array<{ id: string; state: string }>",
25
+ descriptionKey: "ui.agent.appointmentTimeline.state.items",
26
+ description: "Currently-rendered appointments. Ids + lifecycle state only — never patient identity.",
27
+ read: (n) => n.getItems()
28
+ }
29
+ },
30
+ actions: {
31
+ select_item: {
32
+ safety: "read",
33
+ argsType: "{ id: string }",
34
+ argsSchema: {
35
+ type: "object",
36
+ properties: { id: { type: "string" } },
37
+ required: ["id"]
38
+ },
39
+ idempotent: !0,
40
+ descriptionKey: "ui.agent.appointmentTimeline.actions.selectItem",
41
+ description: "Activate the appointment with the given id.",
42
+ invoke: (n, i) => {
43
+ n.selectItem(i.id);
44
+ }
45
+ },
46
+ jump_to_today: {
47
+ safety: "read",
48
+ idempotent: !0,
49
+ descriptionKey: "ui.agent.appointmentTimeline.actions.jumpToToday",
50
+ description: "Re-anchor the timeline scroll on today's appointments.",
51
+ invoke: (n) => {
52
+ n.jumpToToday();
53
+ }
54
+ }
55
+ },
56
+ domHooks: {
57
+ root: {
58
+ attr: "data-component",
59
+ value: "appointment-timeline",
60
+ description: "Marks the AppointmentTimeline wrapper."
61
+ },
62
+ instanceId: {
63
+ attr: "data-component-id",
64
+ sourceProp: "id",
65
+ description: "Sourced from the id prop. Required to address a specific timeline from the agent."
66
+ },
67
+ item: {
68
+ attr: "data-appointment-id",
69
+ description: "Stable appointment id emitted on each rendered AppointmentCard inside the timeline."
70
+ }
71
+ }
72
+ }, L = 96, ze = De(
73
+ [
74
+ "ds:flex ds:flex-col ds:h-full ds:min-h-0",
75
+ "ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]"
76
+ ].join(" "),
77
+ { variants: { size: { sm: "", md: "" } }, defaultVariants: { size: "sm" } }
78
+ ), Be = [
79
+ "ds:flex-1 ds:min-h-0 ds:overflow-y-auto",
80
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
81
+ "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
82
+ "ds:[--atl-mask-top:black] ds:[--atl-mask-bottom:black]",
83
+ "ds:data-[fade-top=true]:[--atl-mask-top:transparent]",
84
+ "ds:data-[fade-bottom=true]:[--atl-mask-bottom:transparent]",
85
+ "ds:[mask-image:linear-gradient(to_bottom,var(--atl-mask-top)_0,black_var(--atl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--atl-fade-distance,var(--spacing-lg))),var(--atl-mask-bottom)_100%)]",
86
+ "ds:motion-reduce:[mask-image:none]",
87
+ "ds:[.theme-accessible_&]:[mask-image:none]",
88
+ "ds:forced-colors:[mask-image:none]",
89
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
90
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]",
91
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
92
+ ].join(" ");
93
+ function y(n) {
94
+ const i = `${n.getMonth() + 1}`.padStart(2, "0"), l = `${n.getDate()}`.padStart(2, "0");
95
+ return `${n.getFullYear()}-${i}-${l}`;
96
+ }
97
+ function Ke(n) {
98
+ const i = [...n].sort(
99
+ (u, m) => +new Date(u.startIso) - +new Date(m.startIso)
100
+ ), l = /* @__PURE__ */ new Map();
101
+ for (const u of i) {
102
+ const m = new Date(u.startIso), h = y(m);
103
+ let c = l.get(h);
104
+ c || (c = {
105
+ key: h,
106
+ date: new Date(m.getFullYear(), m.getMonth(), m.getDate()),
107
+ items: []
108
+ }, l.set(h, c)), c.items.push(u);
109
+ }
110
+ return [...l.values()];
111
+ }
112
+ const Ae = be(
113
+ ({
114
+ id: n,
115
+ items: i,
116
+ nowIso: l,
117
+ title: u,
118
+ locale: m,
119
+ currency: h,
120
+ size: c = "sm",
121
+ showPatient: M = !1,
122
+ onOpenAppointment: f,
123
+ onLoadEarlier: v,
124
+ onLoadLater: p,
125
+ hasMoreEarlier: k,
126
+ hasMoreLater: N,
127
+ loadingEarlier: j = !1,
128
+ loadingLater: C = !1,
129
+ showFilters: J = !0,
130
+ onJumpToDate: H,
131
+ emptyTitle: ee,
132
+ emptyDescription: te,
133
+ className: se,
134
+ "aria-label": ne,
135
+ ...ie
136
+ }, oe) => {
137
+ const { t: a, i18n: ae } = we(), Y = Te(), P = Fe(), $ = m ?? ae.language, E = u ?? a("appointmentTimeline.title"), r = F(
138
+ () => l ? new Date(l) : /* @__PURE__ */ new Date(),
139
+ [l]
140
+ ), g = F(() => Ke(i), [i]), q = k ?? !!v, G = N ?? !!p, _ = F(() => {
141
+ if (g.length === 0) return;
142
+ const e = y(r), t = g.map((s) => s.key);
143
+ return t.includes(e) ? e : t.find((s) => s >= e) ?? t[t.length - 1];
144
+ }, [g, r]), D = T(null), w = T(/* @__PURE__ */ new Map()), V = T(!1), z = T(void 0), W = T(0), [re, le] = Z(!1), [ce, de] = Z(!1), R = x(() => {
145
+ const e = D.current;
146
+ if (!e) return;
147
+ const { scrollTop: t, scrollHeight: s, clientHeight: d } = e;
148
+ le(t > 1), de(t + d < s - 1);
149
+ }, []), I = x(
150
+ (e, t) => {
151
+ const s = D.current;
152
+ if (!s) return;
153
+ let d = w.current.get(e);
154
+ if (!d) {
155
+ const K = [...w.current.keys()].sort(), X = K.find((ve) => ve >= e) ?? K[K.length - 1];
156
+ d = X ? w.current.get(X) : void 0;
157
+ }
158
+ if (!d) return;
159
+ const he = d.getBoundingClientRect().top - s.getBoundingClientRect().top;
160
+ s.scrollTo({
161
+ top: s.scrollTop + he,
162
+ behavior: t && !P ? "smooth" : "auto"
163
+ });
164
+ },
165
+ [P]
166
+ );
167
+ O(() => {
168
+ var s;
169
+ const e = D.current;
170
+ if (!e) return;
171
+ const t = (s = g[0]) == null ? void 0 : s.key;
172
+ if (!V.current)
173
+ g.length > 0 && _ && (I(_, !1), V.current = !0);
174
+ else if (z.current && t && t < z.current) {
175
+ const d = e.scrollHeight - W.current;
176
+ d > 0 && (e.scrollTop += d);
177
+ }
178
+ z.current = t, W.current = e.scrollHeight, R();
179
+ }, [g, _, I, R]), O(() => {
180
+ const e = D.current;
181
+ if (!e || typeof ResizeObserver > "u") return;
182
+ const t = new ResizeObserver(R);
183
+ return t.observe(e), () => t.disconnect();
184
+ }, [R]);
185
+ const me = x(() => {
186
+ R();
187
+ const e = D.current;
188
+ if (!e) return;
189
+ const { scrollTop: t, scrollHeight: s, clientHeight: d } = e;
190
+ v && q && !j && t <= L && v(), p && G && !C && s - t - d <= L && p();
191
+ }, [
192
+ R,
193
+ v,
194
+ p,
195
+ q,
196
+ G,
197
+ j,
198
+ C
199
+ ]), b = x(
200
+ (e) => {
201
+ const t = y(e), s = w.current.has(t);
202
+ I(t, !0), s || H == null || H(e.toISOString());
203
+ },
204
+ [I, H]
205
+ ), pe = x(() => b(r), [b, r]), ue = x(() => {
206
+ const e = new Date(r), t = (e.getDay() + 6) % 7;
207
+ e.setDate(e.getDate() - t), b(e);
208
+ }, [b, r]), fe = x(() => {
209
+ b(new Date(r.getFullYear(), r.getMonth(), 1));
210
+ }, [b, r]), B = T(i);
211
+ B.current = i;
212
+ const Q = T(null);
213
+ xe(oe, () => Q.current, []);
214
+ const ge = F(
215
+ () => ({
216
+ getItems: () => B.current.map((e) => ({ id: e.id, state: e.state })),
217
+ selectItem: (e) => {
218
+ const t = B.current.find((s) => s.id === e);
219
+ t && (f == null || f(t));
220
+ },
221
+ jumpToToday: () => I(y(r), !0)
222
+ }),
223
+ [f, I, r]
224
+ );
225
+ Me(_e, ge, n);
226
+ const ye = g.length === 0 && !j && !C, U = (e) => /* @__PURE__ */ o(
227
+ "div",
228
+ {
229
+ "aria-hidden": "true",
230
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]",
231
+ children: /* @__PURE__ */ o(Ce, { variant: "rectangular", height: "3.5rem" })
232
+ },
233
+ e
234
+ );
235
+ return /* @__PURE__ */ S(
236
+ "section",
237
+ {
238
+ ref: Q,
239
+ "data-component": "appointment-timeline",
240
+ "data-component-id": n,
241
+ "aria-label": ne ?? E,
242
+ className: ze({ size: c, className: se }),
243
+ ...ie,
244
+ children: [
245
+ /* @__PURE__ */ o(
246
+ je,
247
+ {
248
+ icon: /* @__PURE__ */ o(Ne, {}),
249
+ title: E,
250
+ filters: J ? /* @__PURE__ */ S(ke, { children: [
251
+ /* @__PURE__ */ S(Ie, { label: a("appointmentTimeline.filtersLabel"), children: [
252
+ /* @__PURE__ */ o(A, { intent: "outline", size: "sm", onClick: pe, children: a("appointmentTimeline.today") }),
253
+ /* @__PURE__ */ o(A, { intent: "outline", size: "sm", onClick: ue, children: a("appointmentTimeline.thisWeek") }),
254
+ /* @__PURE__ */ o(A, { intent: "outline", size: "sm", onClick: fe, children: a("appointmentTimeline.thisMonth") })
255
+ ] }),
256
+ /* @__PURE__ */ o("label", { htmlFor: Y, className: "ds:sr-only", children: a("appointmentTimeline.jumpToDate") }),
257
+ /* @__PURE__ */ o(
258
+ Se,
259
+ {
260
+ id: Y,
261
+ size: "sm",
262
+ placeholder: a("appointmentTimeline.jumpToDate"),
263
+ onChange: (e) => {
264
+ e && b(e);
265
+ }
266
+ }
267
+ )
268
+ ] }) : void 0
269
+ }
270
+ ),
271
+ ye ? /* @__PURE__ */ o("div", { className: "ds:flex-1 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ o(
272
+ He,
273
+ {
274
+ variant: "first-use",
275
+ size: "sm",
276
+ title: ee ?? a("appointmentTimeline.empty.title"),
277
+ description: te ?? a("appointmentTimeline.empty.description")
278
+ }
279
+ ) }) : /* @__PURE__ */ S(
280
+ "div",
281
+ {
282
+ ref: D,
283
+ tabIndex: 0,
284
+ onScroll: me,
285
+ "data-fade-top": re ? "true" : void 0,
286
+ "data-fade-bottom": ce ? "true" : void 0,
287
+ className: Be,
288
+ children: [
289
+ j ? U("loading-earlier") : null,
290
+ /* @__PURE__ */ o(
291
+ "ol",
292
+ {
293
+ role: "list",
294
+ className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0",
295
+ children: g.map((e) => /* @__PURE__ */ S(
296
+ "li",
297
+ {
298
+ ref: (t) => {
299
+ t ? w.current.set(e.key, t) : w.current.delete(e.key);
300
+ },
301
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
302
+ children: [
303
+ /* @__PURE__ */ o(
304
+ Ye,
305
+ {
306
+ date: e.date,
307
+ now: r,
308
+ locale: $,
309
+ todayLabel: a("appointmentTimeline.today"),
310
+ tomorrowLabel: a("appointmentTimeline.tomorrow"),
311
+ yesterdayLabel: a("appointmentTimeline.yesterday")
312
+ }
313
+ ),
314
+ /* @__PURE__ */ o(
315
+ "ul",
316
+ {
317
+ role: "list",
318
+ className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
319
+ children: e.items.map((t) => /* @__PURE__ */ o(
320
+ Re,
321
+ {
322
+ item: t,
323
+ size: c,
324
+ surface: "elevated",
325
+ showPatient: M,
326
+ locale: $,
327
+ currency: h,
328
+ onActivate: f,
329
+ "data-appointment-id": t.id
330
+ },
331
+ t.id
332
+ ))
333
+ }
334
+ )
335
+ ]
336
+ },
337
+ e.key
338
+ ))
339
+ }
340
+ ),
341
+ C ? U("loading-later") : null
342
+ ]
343
+ }
344
+ )
345
+ ]
346
+ }
347
+ );
348
+ }
349
+ );
350
+ Ae.displayName = "AppointmentTimeline";
351
+ function Ye({
352
+ date: n,
353
+ now: i,
354
+ locale: l,
355
+ todayLabel: u,
356
+ tomorrowLabel: m,
357
+ yesterdayLabel: h
358
+ }) {
359
+ const c = y(n), M = y(i), f = new Date(i);
360
+ f.setDate(i.getDate() + 1);
361
+ const v = new Date(i);
362
+ v.setDate(i.getDate() - 1);
363
+ const p = c === M;
364
+ let k;
365
+ if (p) k = u;
366
+ else if (c === y(f)) k = m;
367
+ else if (c === y(v)) k = h;
368
+ else {
369
+ const N = n.getFullYear() === i.getFullYear();
370
+ k = new Intl.DateTimeFormat(l, {
371
+ weekday: "short",
372
+ day: "numeric",
373
+ month: "short",
374
+ ...N ? {} : { year: "numeric" }
375
+ }).format(n);
376
+ }
377
+ return /* @__PURE__ */ S(
378
+ "div",
379
+ {
380
+ "data-today": p ? "true" : void 0,
381
+ className: [
382
+ "ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]",
383
+ "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow",
384
+ p ? "ds:text-[color:var(--primary)] ds:font-semibold" : "ds:text-[color:var(--muted-foreground)]"
385
+ ].join(" "),
386
+ children: [
387
+ p ? /* @__PURE__ */ o(
388
+ "span",
389
+ {
390
+ "aria-hidden": "true",
391
+ className: "ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]"
392
+ }
393
+ ) : null,
394
+ k
395
+ ]
396
+ }
397
+ );
398
+ }
399
+ export {
400
+ Ae as A,
401
+ _e as a
402
+ };
403
+ //# sourceMappingURL=appointment-timeline-DCn0Jx55.js.map