@alfadocs/ui-kit-debug 1.49.1 → 1.50.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 (136) hide show
  1. package/dist/_chunks/appointment-peek-Dk11UOVW.js +123 -0
  2. package/dist/_chunks/appointment-peek-Dk11UOVW.js.map +1 -0
  3. package/dist/_chunks/{booking-BF9pVa2n.js → booking-Cdzd8kyY.js} +1515 -1400
  4. package/dist/_chunks/booking-Cdzd8kyY.js.map +1 -0
  5. package/dist/_chunks/calendar-event-card-DplPh1wv.js +600 -0
  6. package/dist/_chunks/calendar-event-card-DplPh1wv.js.map +1 -0
  7. package/dist/_chunks/{calendar-workspace-iwyXajja.js → calendar-workspace-CWRH4x15.js} +3937 -3829
  8. package/dist/_chunks/calendar-workspace-CWRH4x15.js.map +1 -0
  9. package/dist/_chunks/{calendar-Bt44KMNO.js → calendar-zpE9qTM4.js} +437 -399
  10. package/dist/_chunks/calendar-zpE9qTM4.js.map +1 -0
  11. package/dist/agent-catalog.json +2 -2
  12. package/dist/agent-i18n/en.json +1 -1
  13. package/dist/components/appointment-peek/appointment-peek.d.ts +2 -0
  14. package/dist/components/appointment-peek/appointment-peek.d.ts.map +1 -1
  15. package/dist/components/appointment-peek/index.js +1 -1
  16. package/dist/components/booking/booking-types.d.ts +36 -0
  17. package/dist/components/booking/booking-types.d.ts.map +1 -1
  18. package/dist/components/booking/booking.d.ts +1 -1
  19. package/dist/components/booking/booking.d.ts.map +1 -1
  20. package/dist/components/booking/details-form.d.ts +8 -2
  21. package/dist/components/booking/details-form.d.ts.map +1 -1
  22. package/dist/components/booking/index.d.ts +1 -1
  23. package/dist/components/booking/index.d.ts.map +1 -1
  24. package/dist/components/booking/index.js +1 -1
  25. package/dist/components/booking/linkify.d.ts +11 -0
  26. package/dist/components/booking/linkify.d.ts.map +1 -0
  27. package/dist/components/calendar/calendar.d.ts +15 -0
  28. package/dist/components/calendar/calendar.d.ts.map +1 -1
  29. package/dist/components/calendar/index.js +1 -1
  30. package/dist/components/calendar-event-card/calendar-event-card.d.ts +46 -4
  31. package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
  32. package/dist/components/calendar-event-card/index.js +1 -1
  33. package/dist/i18n/locales/ar.d.ts +12 -0
  34. package/dist/i18n/locales/ar.d.ts.map +1 -1
  35. package/dist/i18n/locales/ar.js +12 -0
  36. package/dist/i18n/locales/ar.js.map +1 -1
  37. package/dist/i18n/locales/de.d.ts +12 -0
  38. package/dist/i18n/locales/de.d.ts.map +1 -1
  39. package/dist/i18n/locales/de.js +12 -0
  40. package/dist/i18n/locales/de.js.map +1 -1
  41. package/dist/i18n/locales/el.d.ts +12 -0
  42. package/dist/i18n/locales/el.d.ts.map +1 -1
  43. package/dist/i18n/locales/el.js +12 -0
  44. package/dist/i18n/locales/el.js.map +1 -1
  45. package/dist/i18n/locales/en.d.ts +12 -0
  46. package/dist/i18n/locales/en.d.ts.map +1 -1
  47. package/dist/i18n/locales/en.js +12 -0
  48. package/dist/i18n/locales/en.js.map +1 -1
  49. package/dist/i18n/locales/es.d.ts +12 -0
  50. package/dist/i18n/locales/es.d.ts.map +1 -1
  51. package/dist/i18n/locales/es.js +12 -0
  52. package/dist/i18n/locales/es.js.map +1 -1
  53. package/dist/i18n/locales/fr.d.ts +12 -0
  54. package/dist/i18n/locales/fr.d.ts.map +1 -1
  55. package/dist/i18n/locales/fr.js +12 -0
  56. package/dist/i18n/locales/fr.js.map +1 -1
  57. package/dist/i18n/locales/hi.d.ts +12 -0
  58. package/dist/i18n/locales/hi.d.ts.map +1 -1
  59. package/dist/i18n/locales/hi.js +12 -0
  60. package/dist/i18n/locales/hi.js.map +1 -1
  61. package/dist/i18n/locales/it.d.ts +12 -0
  62. package/dist/i18n/locales/it.d.ts.map +1 -1
  63. package/dist/i18n/locales/it.js +12 -0
  64. package/dist/i18n/locales/it.js.map +1 -1
  65. package/dist/i18n/locales/ja.d.ts +12 -0
  66. package/dist/i18n/locales/ja.d.ts.map +1 -1
  67. package/dist/i18n/locales/ja.js +12 -0
  68. package/dist/i18n/locales/ja.js.map +1 -1
  69. package/dist/i18n/locales/nl.d.ts +12 -0
  70. package/dist/i18n/locales/nl.d.ts.map +1 -1
  71. package/dist/i18n/locales/nl.js +12 -0
  72. package/dist/i18n/locales/nl.js.map +1 -1
  73. package/dist/i18n/locales/pl.d.ts +12 -0
  74. package/dist/i18n/locales/pl.d.ts.map +1 -1
  75. package/dist/i18n/locales/pl.js +12 -0
  76. package/dist/i18n/locales/pl.js.map +1 -1
  77. package/dist/i18n/locales/pt.d.ts +12 -0
  78. package/dist/i18n/locales/pt.d.ts.map +1 -1
  79. package/dist/i18n/locales/pt.js +12 -0
  80. package/dist/i18n/locales/pt.js.map +1 -1
  81. package/dist/i18n/locales/ro.d.ts +12 -0
  82. package/dist/i18n/locales/ro.d.ts.map +1 -1
  83. package/dist/i18n/locales/ro.js +12 -0
  84. package/dist/i18n/locales/ro.js.map +1 -1
  85. package/dist/i18n/locales/ru.d.ts +12 -0
  86. package/dist/i18n/locales/ru.d.ts.map +1 -1
  87. package/dist/i18n/locales/ru.js +12 -0
  88. package/dist/i18n/locales/ru.js.map +1 -1
  89. package/dist/i18n/locales/sq.d.ts +12 -0
  90. package/dist/i18n/locales/sq.d.ts.map +1 -1
  91. package/dist/i18n/locales/sq.js +12 -0
  92. package/dist/i18n/locales/sq.js.map +1 -1
  93. package/dist/i18n/locales/sv.d.ts +12 -0
  94. package/dist/i18n/locales/sv.d.ts.map +1 -1
  95. package/dist/i18n/locales/sv.js +12 -0
  96. package/dist/i18n/locales/sv.js.map +1 -1
  97. package/dist/i18n/locales/tr.d.ts +12 -0
  98. package/dist/i18n/locales/tr.d.ts.map +1 -1
  99. package/dist/i18n/locales/tr.js +12 -0
  100. package/dist/i18n/locales/tr.js.map +1 -1
  101. package/dist/i18n/locales/zh.d.ts +12 -0
  102. package/dist/i18n/locales/zh.d.ts.map +1 -1
  103. package/dist/i18n/locales/zh.js +12 -0
  104. package/dist/i18n/locales/zh.js.map +1 -1
  105. package/dist/index.js +5 -5
  106. package/dist/locales/ar.json +12 -0
  107. package/dist/locales/de.json +12 -0
  108. package/dist/locales/el.json +12 -0
  109. package/dist/locales/en.json +12 -0
  110. package/dist/locales/es.json +12 -0
  111. package/dist/locales/fr.json +12 -0
  112. package/dist/locales/hi.json +12 -0
  113. package/dist/locales/it.json +12 -0
  114. package/dist/locales/ja.json +12 -0
  115. package/dist/locales/nl.json +12 -0
  116. package/dist/locales/pl.json +12 -0
  117. package/dist/locales/pt.json +12 -0
  118. package/dist/locales/ro.json +12 -0
  119. package/dist/locales/ru.json +12 -0
  120. package/dist/locales/sq.json +12 -0
  121. package/dist/locales/sv.json +12 -0
  122. package/dist/locales/tr.json +12 -0
  123. package/dist/locales/zh.json +12 -0
  124. package/dist/patterns/calendar/calendar.model.d.ts +7 -1
  125. package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
  126. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  127. package/dist/patterns/calendar/index.js +1 -1
  128. package/dist/tokens.css +45 -42
  129. package/package.json +1 -1
  130. package/dist/_chunks/appointment-peek-BDiCIBb-.js +0 -115
  131. package/dist/_chunks/appointment-peek-BDiCIBb-.js.map +0 -1
  132. package/dist/_chunks/booking-BF9pVa2n.js.map +0 -1
  133. package/dist/_chunks/calendar-Bt44KMNO.js.map +0 -1
  134. package/dist/_chunks/calendar-event-card-BUbKBPv_.js +0 -403
  135. package/dist/_chunks/calendar-event-card-BUbKBPv_.js.map +0 -1
  136. package/dist/_chunks/calendar-workspace-iwyXajja.js.map +0 -1
@@ -0,0 +1,600 @@
1
+ import { jsx as a, jsxs as p, Fragment as R } from "react/jsx-runtime";
2
+ import { forwardRef as ee } from "react";
3
+ import { useTranslation as ne } from "react-i18next";
4
+ import { c as s } from "./index-D2ZczOXr.js";
5
+ import { U as ae, B as re, T as de } from "./user-x-DYszNtIg.js";
6
+ import { C as se } from "./check-DrFSN__t.js";
7
+ import { S as te } from "./stethoscope-sZXGC43m.js";
8
+ import { C as ie } from "./clock-Drd4Wtis.js";
9
+ import { T as le } from "./triangle-alert-CBnO6nq_.js";
10
+ import { H as ce } from "./heart-pulse-BCppJyN2.js";
11
+ import { E as oe } from "./euro-Dsuz4ixO.js";
12
+ import { G as ve } from "./globe-sHBW1JN5.js";
13
+ import { V as me } from "./video-BheNGvsu.js";
14
+ import { R as he } from "./repeat-CvQa5rZt.js";
15
+ import { C as pe } from "./clipboard-check-BeAGxDVT.js";
16
+ import { E as fe } from "./eye-off-C_4xkbRP.js";
17
+ function ue(t) {
18
+ if (typeof t != "string") return null;
19
+ const d = t.trim();
20
+ if (!d.startsWith("#")) return null;
21
+ const n = d.slice(1);
22
+ let e, i, c;
23
+ if (n.length === 3) {
24
+ if (!/^[0-9a-f]{3}$/i.test(n)) return null;
25
+ e = parseInt(n[0] + n[0], 16), i = parseInt(n[1] + n[1], 16), c = parseInt(n[2] + n[2], 16);
26
+ } else if (n.length === 6) {
27
+ if (!/^[0-9a-f]{6}$/i.test(n)) return null;
28
+ e = parseInt(n.slice(0, 2), 16), i = parseInt(n.slice(2, 4), 16), c = parseInt(n.slice(4, 6), 16);
29
+ } else
30
+ return null;
31
+ return [e / 255, i / 255, c / 255];
32
+ }
33
+ function ge([t, d, n]) {
34
+ const e = (i) => i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
35
+ return 0.2126 * e(t) + 0.7152 * e(d) + 0.0722 * e(n);
36
+ }
37
+ function rn(t, d, n) {
38
+ }
39
+ function we(t) {
40
+ const d = ue(t);
41
+ return d ? ge(d) > 0.1791 ? "on-light" : "on-dark" : null;
42
+ }
43
+ const be = {
44
+ confirmed: de,
45
+ waiting: ie,
46
+ in_care: te,
47
+ done: se,
48
+ cancelled: re,
49
+ absent: ae
50
+ }, xe = "ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-full)] ds:bg-[color:var(--card)] ds:border ds:border-[color:var(--border)] ds:shadow-[var(--shadow-sm)]", ye = "ds:inline-block ds:h-3 ds:w-[6ch] ds:align-middle ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)] ds:animate-[skeleton-pulse_calc(var(--animation-duration)*8)_ease-in-out_infinite] ds:motion-reduce:animate-none ds:forced-colors:bg-[GrayText] ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText] ds:forced-colors:animate-none", ke = {
51
+ success: "ds:text-[color:var(--success-foreground)]",
52
+ info: "ds:text-[color:var(--info-foreground)]",
53
+ warning: "ds:text-[color:var(--warning-foreground)]",
54
+ error: "ds:text-[color:var(--error-foreground)]",
55
+ // Same AA-clearing accent mix Badge's accentSoft uses for its ink.
56
+ accent: "ds:text-[color:color-mix(in_srgb,var(--accent)_40%,var(--foreground))]"
57
+ }, _e = {
58
+ confirmed: "success",
59
+ waiting: "info",
60
+ in_care: "accent",
61
+ done: "success",
62
+ cancelled: "error",
63
+ absent: "warning"
64
+ }, C = {
65
+ confirmed: "calendar.status.confirmed",
66
+ waiting: "calendar.status.waiting",
67
+ in_care: "calendar.status.inCare",
68
+ done: "calendar.status.done",
69
+ cancelled: "calendar.status.cancelled",
70
+ absent: "calendar.status.absent"
71
+ }, Ne = [
72
+ {
73
+ field: "hasUnassignedPatient",
74
+ Icon: le,
75
+ labelKey: "calendarWorkspace.details.indicators.unassignedPatient",
76
+ tone: "warning"
77
+ },
78
+ {
79
+ field: "hasHighlightedAnamnesis",
80
+ Icon: ce,
81
+ labelKey: "calendarWorkspace.details.indicators.anamnesis",
82
+ tone: "accent"
83
+ },
84
+ {
85
+ field: "hasBillableAmount",
86
+ Icon: oe,
87
+ labelKey: "calendarWorkspace.details.indicators.billable",
88
+ tone: "warning"
89
+ },
90
+ {
91
+ field: "isBookedOnline",
92
+ Icon: ve,
93
+ labelKey: "calendarWorkspace.details.indicators.bookedOnline",
94
+ tone: "info"
95
+ },
96
+ {
97
+ field: "isTelehealth",
98
+ Icon: me,
99
+ labelKey: "calendarWorkspace.details.indicators.telehealth",
100
+ tone: "info"
101
+ },
102
+ {
103
+ field: "isRecurring",
104
+ Icon: he,
105
+ labelKey: "calendarWorkspace.details.indicators.recurring",
106
+ tone: "info"
107
+ }
108
+ ], Se = s(
109
+ [
110
+ // FullCalendar supplies the box. The card is the `eventcard` size
111
+ // container: the `ds:eventcard-*` tier variants (declared in
112
+ // src/styles.css) read its width and height to prioritise identity,
113
+ // then treatment, time and markers.
114
+ "calendar-event-card ds:relative ds:block ds:[container-name:eventcard]",
115
+ "ds:w-full",
116
+ "ds:ps-[var(--spacing-2xs)] ds:pe-[var(--spacing-2xs)]",
117
+ "ds:rounded-[var(--radius-sm)]",
118
+ // The type-role alias, so the text (and with it every em tier
119
+ // threshold) grows one step under .theme-accessible.
120
+ "ds:text-[length:var(--type-body-sm-size)]",
121
+ "ds:font-[var(--font-weight-medium)]",
122
+ "ds:leading-tight ds:text-start",
123
+ "ds:overflow-hidden",
124
+ // kept verbatim from the former base (inert on a non-focusable div
125
+ // inside FC; harmless)
126
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
127
+ "ds:focus-visible:outline-[var(--ring)]",
128
+ "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
129
+ // SINGLE PAINTED SURFACE — always present, never conditional. One
130
+ // declaration per paint channel; value chain = "caller custom prop,
131
+ // else token". This structurally eliminates the CVA-vs-override
132
+ // specificity race (the old double-paint bug) — stylesheet order
133
+ // becomes irrelevant.
134
+ "ds:[background-color:var(--calendar-event-bg,var(--primary))]",
135
+ "ds:[color:var(--calendar-event-text,var(--primary-foreground))]",
136
+ "ds:border ds:[border-color:var(--calendar-event-border,transparent)]"
137
+ ].join(" "),
138
+ {
139
+ variants: {
140
+ layout: {
141
+ // Timed grids: FullCalendar supplies a definite block size. A
142
+ // standalone card with no height falls back to two lines.
143
+ grid: [
144
+ "ds:h-full ds:[container-type:size] ds:[min-block-size:0]",
145
+ "ds:[contain-intrinsic-block-size:calc(var(--type-body-sm-size)*var(--calendar-event-line-height)*2)]"
146
+ ].join(" "),
147
+ // Month cells: exactly one line.
148
+ month: [
149
+ "calendar-event-card--month ds:[container-type:size]",
150
+ "ds:[block-size:calc(var(--type-body-sm-size)*var(--calendar-event-line-height)_+_var(--spacing-2xs))]"
151
+ ].join(" "),
152
+ // Lists and timelines size from content: width tiers only.
153
+ flow: [
154
+ "calendar-event-card--flow ds:[container-type:inline-size]",
155
+ "ds:[min-block-size:calc(var(--type-body-sm-size)*var(--calendar-event-line-height))]"
156
+ ].join(" ")
157
+ },
158
+ // Do not add colour classes to this axis — status is icon + aria
159
+ // only; a unit test asserts identical computed background
160
+ // across all six statuses.
161
+ status: {
162
+ none: "",
163
+ confirmed: "",
164
+ waiting: "",
165
+ in_care: "",
166
+ done: "",
167
+ cancelled: "ds:line-through",
168
+ absent: ""
169
+ },
170
+ bookedOnline: {
171
+ // class name kept as a stable inert DOM hook; the stripe paint
172
+ // lives here (moved from fullcalendar-theme.css) so it works in
173
+ // the card's own stories, outside .fc-theme-alfadocs.
174
+ // currentcolor = resolved ink, so stripes stay visible over any
175
+ // picker colour.
176
+ true: "event-booked-online ds:bg-[image:repeating-linear-gradient(45deg,transparent,transparent_4px,color-mix(in_srgb,currentcolor_10%,transparent)_4px,color-mix(in_srgb,currentcolor_10%,transparent)_8px)]",
177
+ false: ""
178
+ },
179
+ // Task treatment: CUSTOM-PROPERTY assignments only — the consuming
180
+ // background-color / color / border-color declarations stay in the
181
+ // base above, so this cannot re-open the CVA-vs-override specificity
182
+ // race, and a caller's inline picker hex (set as the same custom
183
+ // properties via `style`) still wins. `border-dashed` is a
184
+ // border-style declaration — no property collision either.
185
+ kind: {
186
+ // The appointment's COLOUR IDENTITY edge — a thick start border
187
+ // in the event colour, platform-agenda style, so the colour
188
+ // reads even on sliver-height cards. Tasks keep the 1px edge:
189
+ // muted to-dos carry no colour identity.
190
+ appointment: "ds:border-s-4",
191
+ // Draft treatment — an appointment being COMPOSED, not yet saved
192
+ // (the slot a user just picked, mirrored on the grid while the
193
+ // editor is open). Same custom-property-only discipline as
194
+ // `task`: dashed outline over a light primary tint, so the
195
+ // placeholder reads as pending rather than as a booked slot.
196
+ draft: [
197
+ "ds:border-dashed",
198
+ "ds:[--calendar-event-bg:color-mix(in_srgb,var(--primary)_10%,var(--card))]",
199
+ "ds:[--calendar-event-text:var(--foreground)]",
200
+ "ds:[--calendar-event-border:var(--primary)]"
201
+ ].join(" "),
202
+ // Details pending — the block IS a booked appointment, so it
203
+ // keeps the colour-identity edge and assigns no paint of its own.
204
+ // Only the NAME is missing; the bar above stands in for it.
205
+ "pending-details": "ds:border-s-4",
206
+ task: [
207
+ "ds:border-dashed",
208
+ "ds:[--calendar-event-bg:var(--muted)]",
209
+ "ds:[--calendar-event-text:var(--muted-foreground)]",
210
+ "ds:[--calendar-event-border:color-mix(in_srgb,currentcolor_45%,transparent)]"
211
+ ].join(" ")
212
+ },
213
+ // Tinted colour scheme — the chip-family look: the picker colour
214
+ // becomes a SOLID BORDER over a light tint of itself (theme-aware
215
+ // via color-mix with --card), text on the theme's foreground
216
+ // tokens. Custom-property assignments only — the painted
217
+ // declarations stay in the base. The runtime hex arrives as
218
+ // `--calendar-event-accent` (inline). Never combined with the task
219
+ // variant: the component forces `solid` for tasks so exactly one
220
+ // class-level assignment of each property exists per render.
221
+ colorStyle: {
222
+ solid: "",
223
+ tinted: [
224
+ "ds:[--calendar-event-bg:color-mix(in_srgb,var(--calendar-event-accent,var(--primary))_12%,var(--card))]",
225
+ "ds:[--calendar-event-text:var(--foreground)]",
226
+ "ds:[--calendar-event-border:var(--calendar-event-accent,var(--primary))]"
227
+ ].join(" ")
228
+ }
229
+ },
230
+ defaultVariants: {
231
+ layout: "grid",
232
+ status: "none",
233
+ bookedOnline: !1,
234
+ kind: "appointment",
235
+ colorStyle: "solid"
236
+ }
237
+ }
238
+ ), Ie = [
239
+ "event-card-content ds:grid ds:grid-cols-[minmax(0,1fr)_auto] ds:items-start",
240
+ "ds:gap-x-[var(--spacing-2xs)] ds:leading-[var(--calendar-event-line-height)]",
241
+ // Stretch, so a secondary line is as wide as the card and a long word
242
+ // wraps inside it rather than running past the edge.
243
+ "ds:eventcard-narrow:flex ds:eventcard-narrow:flex-col ds:eventcard-narrow:items-stretch",
244
+ // A 15-minute compact tile: the meta size on a tight line.
245
+ "ds:eventcard-tiny:text-[length:var(--type-meta-size)] ds:eventcard-tiny:leading-[var(--calendar-event-compact-line-height)]"
246
+ ].join(" "), ze = [
247
+ "event-card-heading ds:flex ds:items-baseline ds:gap-[var(--spacing-2xs)] ds:min-w-0",
248
+ "ds:eventcard-narrow:w-full",
249
+ "ds:eventcard-narrow-tall:flex-col ds:eventcard-narrow-tall:items-stretch ds:eventcard-narrow-tall:gap-0"
250
+ ].join(" "), Ee = s(
251
+ [
252
+ "event-card-name ds:min-w-0 ds:flex-1 ds:font-[var(--font-weight-semibold)]",
253
+ // Wrap at spaces first; break inside a word only when it cannot fit.
254
+ "ds:wrap-break-word",
255
+ "ds:eventcard-narrow:pe-[var(--spacing-xs)]"
256
+ ].join(" "),
257
+ {
258
+ variants: {
259
+ layout: {
260
+ grid: [
261
+ "ds:line-clamp-1 ds:eventcard-h3:line-clamp-2",
262
+ // Tall slivers: the name runs down the card.
263
+ "ds:eventcard-sliver-tall:block ds:eventcard-sliver-tall:[writing-mode:vertical-rl] ds:eventcard-sliver-tall:[text-orientation:mixed]",
264
+ "ds:eventcard-sliver-tall:whitespace-nowrap ds:eventcard-sliver-tall:text-ellipsis ds:eventcard-sliver-tall:flex-none ds:eventcard-sliver-tall:pe-0",
265
+ "ds:eventcard-sliver-tall:[max-inline-size:calc(100cqmax_-_var(--spacing-md))]",
266
+ "ds:eventcard-sliver-h2:line-clamp-2 ds:eventcard-sliver-h2:pe-0",
267
+ // Too thin for a legible line: colour and the priority marker.
268
+ "ds:eventcard-hairline:hidden"
269
+ ].join(" "),
270
+ month: "ds:line-clamp-1",
271
+ flow: "ds:line-clamp-2"
272
+ },
273
+ // Room for the one-line "marker +N" cluster that sits over the end:
274
+ // sized in em of the card text, like the cluster it clears.
275
+ hiddenMarkers: {
276
+ true: "ds:eventcard-narrow-count:pe-[2.25em]",
277
+ false: ""
278
+ }
279
+ }
280
+ }
281
+ ), je = s("event-card-full-title", {
282
+ variants: {
283
+ hasShortTitle: { true: "ds:eventcard-sliver:hidden", false: "" }
284
+ }
285
+ }), K = "event-card-kind-icon ds:inline ds:size-[1em] ds:me-[var(--spacing-2xs)] ds:align-text-bottom", Ae = s(
286
+ "event-card-time ds:hidden ds:shrink-0 ds:whitespace-nowrap ds:text-[length:var(--type-meta-size)]",
287
+ {
288
+ variants: {
289
+ layout: {
290
+ // Wide cards, and tall cards from 112px, show the time; tall narrow
291
+ // cards put the start under the name.
292
+ grid: "ds:eventcard-w176:inline ds:eventcard-tall:inline ds:eventcard-narrow-tall:block",
293
+ month: "ds:eventcard-w176:inline",
294
+ flow: "ds:eventcard-w176:inline"
295
+ }
296
+ }
297
+ }
298
+ ), Re = s("event-card-start", {
299
+ variants: {
300
+ layout: {
301
+ grid: "ds:eventcard-w256:hidden",
302
+ month: "",
303
+ flow: "ds:eventcard-w256:hidden"
304
+ }
305
+ }
306
+ }), Ce = s("event-card-range", {
307
+ variants: {
308
+ layout: {
309
+ grid: "ds:hidden ds:eventcard-w256:inline",
310
+ month: "ds:hidden",
311
+ flow: "ds:hidden ds:eventcard-w256:inline"
312
+ }
313
+ }
314
+ }), T = "ds:col-span-full ds:overflow-hidden ds:text-[length:var(--type-meta-size)] ds:wrap-break-word", Ke = s(`event-card-suffix ${T}`, {
315
+ variants: {
316
+ layout: {
317
+ grid: [
318
+ "ds:hidden ds:eventcard-h2:line-clamp-1",
319
+ "ds:eventcard-narrow:order-2 ds:eventcard-narrow-h2:hidden ds:eventcard-narrow-h5:line-clamp-1",
320
+ "ds:eventcard-sliver:hidden ds:eventcard-h7-mid:line-clamp-2"
321
+ ].join(" "),
322
+ month: "ds:hidden",
323
+ flow: "ds:line-clamp-1 ds:eventcard-narrow:order-2"
324
+ }
325
+ }
326
+ }), Oe = s(`event-card-context ${T}`, {
327
+ variants: {
328
+ layout: {
329
+ grid: "ds:hidden ds:eventcard-narrow:order-3 ds:eventcard-context:line-clamp-1",
330
+ month: "ds:hidden",
331
+ flow: "ds:hidden"
332
+ }
333
+ }
334
+ }), O = "ds:eventcard-narrow:absolute ds:eventcard-narrow:end-0 ds:eventcard-narrow:[inset-block-end:0] ds:eventcard-narrow:gap-0", Te = s(
335
+ "event-card-markers ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:col-[2] ds:row-[1]",
336
+ {
337
+ variants: {
338
+ layout: {
339
+ grid: [
340
+ O,
341
+ "ds:eventcard-narrow-h2:static ds:eventcard-narrow-h2:gap-[var(--spacing-2xs)] ds:eventcard-narrow-h2:order-1",
342
+ "ds:eventcard-tall:row-auto ds:eventcard-tall:col-span-full"
343
+ ].join(" "),
344
+ month: O,
345
+ // Lists and timelines have no height tiers, so a narrow flow card
346
+ // keeps its markers in the column, between name and treatment,
347
+ // instead of laying them over the treatment line. The row wraps so
348
+ // a slim card's dot never falls off the edge.
349
+ flow: "ds:eventcard-narrow:order-1 ds:eventcard-narrow:flex-wrap"
350
+ }
351
+ }
352
+ }
353
+ ), Le = s(
354
+ `event-card-marker ${xe} ds:size-[1em] ds:[&_svg]:size-[0.75em] ds:eventcard-narrow:size-[0.75em] ds:eventcard-narrow-h2:size-[1em]`,
355
+ {
356
+ variants: {
357
+ rank: {
358
+ first: "ds:inline-flex",
359
+ second: "ds:hidden",
360
+ third: "ds:hidden",
361
+ rest: "ds:hidden"
362
+ },
363
+ layout: { grid: "", month: "", flow: "" }
364
+ },
365
+ compoundVariants: [
366
+ {
367
+ layout: ["grid", "flow"],
368
+ rank: "second",
369
+ class: "ds:eventcard-w256:inline-flex"
370
+ },
371
+ {
372
+ layout: ["grid", "flow"],
373
+ rank: "third",
374
+ class: "ds:eventcard-w352:inline-flex"
375
+ },
376
+ {
377
+ layout: ["grid", "flow"],
378
+ rank: ["second", "third", "rest"],
379
+ class: "ds:eventcard-tall-wide:inline-flex"
380
+ }
381
+ ]
382
+ }
383
+ ), Be = ["first", "second", "third"], Ve = s(
384
+ "event-card-more ds:text-[length:var(--type-meta-size)] ds:whitespace-nowrap",
385
+ {
386
+ variants: {
387
+ capacity: {
388
+ 1: "event-card-more-1",
389
+ 2: "event-card-more-2 ds:hidden",
390
+ 3: "event-card-more-3 ds:hidden"
391
+ },
392
+ layout: { grid: "", month: "", flow: "" }
393
+ },
394
+ compoundVariants: [
395
+ { layout: "month", capacity: 1, class: "ds:inline" },
396
+ {
397
+ layout: "grid",
398
+ capacity: 1,
399
+ class: [
400
+ "ds:inline ds:eventcard-w256:hidden ds:eventcard-narrow:hidden",
401
+ "ds:eventcard-narrow-count:inline ds:eventcard-narrow-h2:inline ds:eventcard-tall-wide:hidden"
402
+ ].join(" ")
403
+ },
404
+ // Flow keeps narrow markers in the column, with room to count from
405
+ // 64px; slimmer flow cards fall back to the dot.
406
+ {
407
+ layout: "flow",
408
+ capacity: 1,
409
+ class: "ds:inline ds:@max-[64px]/eventcard:hidden ds:eventcard-w256:hidden"
410
+ },
411
+ {
412
+ layout: ["grid", "flow"],
413
+ capacity: 2,
414
+ class: "ds:eventcard-w256:inline ds:eventcard-w352:hidden ds:eventcard-tall-wide:hidden"
415
+ },
416
+ {
417
+ layout: ["grid", "flow"],
418
+ capacity: 3,
419
+ class: "ds:eventcard-w352:inline ds:eventcard-tall-wide:hidden"
420
+ }
421
+ ]
422
+ }
423
+ ), We = s(
424
+ "event-card-sliver-cue ds:hidden ds:items-center ds:text-[length:var(--type-meta-size)]",
425
+ {
426
+ variants: {
427
+ layout: {
428
+ grid: "ds:eventcard-narrow:flex ds:eventcard-narrow-count:hidden ds:eventcard-narrow-h2:hidden",
429
+ month: "",
430
+ flow: "ds:@max-[64px]/eventcard:flex"
431
+ }
432
+ }
433
+ }
434
+ ), He = ee(
435
+ ({
436
+ title: t,
437
+ shortTitle: d,
438
+ startText: n,
439
+ layout: e = "grid",
440
+ contextLabel: i,
441
+ suffix: c,
442
+ rangeText: f,
443
+ showTime: L = !0,
444
+ allDay: B = !1,
445
+ status: l,
446
+ backgroundColor: o,
447
+ textColor: h,
448
+ borderColor: w,
449
+ isBookedOnline: S = !1,
450
+ hasUnassignedPatient: V,
451
+ hasHighlightedAnamnesis: W,
452
+ hasBillableAmount: H,
453
+ isTelehealth: M,
454
+ isRecurring: U,
455
+ isTask: u = !1,
456
+ isDraft: b = !1,
457
+ detailsPending: x = !1,
458
+ colorStyle: D = "solid",
459
+ resourceLabel: G,
460
+ privacyMasked: I = !1,
461
+ eventId: $,
462
+ className: F,
463
+ style: z,
464
+ "aria-label": P,
465
+ ...Y
466
+ }, q) => {
467
+ const { t: v } = ne(), m = [
468
+ ...l ? [
469
+ {
470
+ id: "status",
471
+ Icon: be[l],
472
+ label: v(C[l]),
473
+ tone: _e[l]
474
+ }
475
+ ] : [],
476
+ ...Ne.filter(
477
+ ({ field: r }) => !!{
478
+ hasUnassignedPatient: V,
479
+ hasHighlightedAnamnesis: W,
480
+ hasBillableAmount: H,
481
+ isBookedOnline: S,
482
+ isTelehealth: M,
483
+ isRecurring: U
484
+ }[r]
485
+ ).map(({ field: r, Icon: k, labelKey: _, tone: N }) => ({
486
+ id: r,
487
+ Icon: k,
488
+ label: v(_),
489
+ tone: N
490
+ }))
491
+ ], X = l ? v(C[l]) : void 0, J = x ? v("calendar.eventKind.pendingDetails") : b ? v("calendar.eventKind.draft") : u ? v("calendar.eventKind.task") : void 0, Q = P ?? [
492
+ t,
493
+ f,
494
+ c,
495
+ G,
496
+ i,
497
+ X,
498
+ J,
499
+ ...m.filter((r) => r.id !== "status").map((r) => r.label)
500
+ ].filter(Boolean).join(", "), E = x ? "pending-details" : b ? "draft" : u ? "task" : "appointment", g = !u && !b && D === "tinted", y = !g && !h && o ? we(o) : null, j = g ? o ? { "--calendar-event-accent": o } : void 0 : o || h || w ? {
501
+ ...o ? { "--calendar-event-bg": o } : {},
502
+ ...h ? { "--calendar-event-text": h } : y === "on-light" ? { "--calendar-event-text": "var(--event-ink-on-light)" } : y === "on-dark" ? { "--calendar-event-text": "var(--event-ink-on-dark)" } : {},
503
+ ...w ? { "--calendar-event-border": w } : {}
504
+ } : void 0, Z = z || j ? { ...z, ...j } : void 0, A = !!(!I && (d != null && d.trim()) && d !== t);
505
+ return /* @__PURE__ */ a(
506
+ "div",
507
+ {
508
+ ref: q,
509
+ role: "group",
510
+ ...Y,
511
+ className: Se({
512
+ layout: e,
513
+ status: l ?? "none",
514
+ bookedOnline: S,
515
+ kind: E,
516
+ colorStyle: g ? "tinted" : "solid",
517
+ className: F
518
+ }),
519
+ style: Z,
520
+ "aria-label": Q,
521
+ "data-component": "calendar-event-card",
522
+ "data-event-id": $,
523
+ "data-kind": E,
524
+ "data-status": l ?? "none",
525
+ "data-contrast": g ? "tinted" : h ? "custom" : y ?? "default",
526
+ children: /* @__PURE__ */ p("span", { className: Ie, "aria-hidden": "true", children: [
527
+ /* @__PURE__ */ p("span", { className: ze, children: [
528
+ /* @__PURE__ */ a(
529
+ "span",
530
+ {
531
+ className: Ee({
532
+ layout: e,
533
+ hiddenMarkers: m.length > 1
534
+ }),
535
+ children: x ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: ye }) : /* @__PURE__ */ p(R, { children: [
536
+ u ? /* @__PURE__ */ a(pe, { className: K }) : null,
537
+ I ? /* @__PURE__ */ a(fe, { className: K }) : null,
538
+ /* @__PURE__ */ a(
539
+ "span",
540
+ {
541
+ className: je({
542
+ hasShortTitle: A
543
+ }),
544
+ children: t
545
+ }
546
+ ),
547
+ A ? /* @__PURE__ */ a("span", { className: "event-card-short-title ds:hidden ds:eventcard-sliver:inline", children: d }) : null
548
+ ] })
549
+ }
550
+ ),
551
+ L && !B && f ? /* @__PURE__ */ a("span", { className: Ae({ layout: e }), children: n ? /* @__PURE__ */ p(R, { children: [
552
+ /* @__PURE__ */ a("span", { className: Re({ layout: e }), children: n }),
553
+ /* @__PURE__ */ a("span", { className: Ce({ layout: e }), children: f })
554
+ ] }) : f }) : null
555
+ ] }),
556
+ c ? /* @__PURE__ */ a("span", { className: Ke({ layout: e }), children: c }) : null,
557
+ i ? /* @__PURE__ */ a("span", { className: Oe({ layout: e }), children: i }) : null,
558
+ m.length > 0 ? /* @__PURE__ */ p("span", { className: Te({ layout: e }), children: [
559
+ m.map(({ id: r, Icon: k, tone: _ }, N) => /* @__PURE__ */ a(
560
+ "span",
561
+ {
562
+ "data-marker": r,
563
+ "aria-hidden": "true",
564
+ className: Le({
565
+ rank: Be[N] ?? "rest",
566
+ layout: e,
567
+ className: ke[_]
568
+ }),
569
+ children: /* @__PURE__ */ a(k, { "aria-hidden": "true" })
570
+ },
571
+ r
572
+ )),
573
+ [1, 2, 3].map(
574
+ (r) => m.length > r ? /* @__PURE__ */ a(
575
+ "span",
576
+ {
577
+ className: Ve({ capacity: r, layout: e }),
578
+ children: v("calendar.card.more", {
579
+ number: m.length - r
580
+ })
581
+ },
582
+ r
583
+ ) : null
584
+ ),
585
+ m.length > 1 && e !== "month" ? /* @__PURE__ */ a("span", { className: We({ layout: e }), children: "·" }) : null
586
+ ] }) : null
587
+ ] })
588
+ }
589
+ );
590
+ }
591
+ );
592
+ He.displayName = "CalendarEventCard";
593
+ export {
594
+ He as C,
595
+ Ne as E,
596
+ be as S,
597
+ C as a,
598
+ rn as w
599
+ };
600
+ //# sourceMappingURL=calendar-event-card-DplPh1wv.js.map