@alfadocs/ui-kit 1.49.2 → 1.50.1
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/appointment-peek-Dk11UOVW.js +123 -0
- package/dist/_chunks/{calendar-Bt44KMNO.js → calendar-E6Yu4lzC.js} +437 -396
- package/dist/_chunks/calendar-event-card-DyFSIehr.js +603 -0
- package/dist/_chunks/calendar-workspace-DjbGFjg1.js +10584 -0
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/appointment-peek/appointment-peek.d.ts +2 -0
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts +21 -0
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +52 -4
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +12 -0
- package/dist/i18n/locales/ar.js +12 -0
- package/dist/i18n/locales/de.d.ts +12 -0
- package/dist/i18n/locales/de.js +12 -0
- package/dist/i18n/locales/el.d.ts +12 -0
- package/dist/i18n/locales/el.js +12 -0
- package/dist/i18n/locales/en.d.ts +12 -0
- package/dist/i18n/locales/en.js +12 -0
- package/dist/i18n/locales/es.d.ts +12 -0
- package/dist/i18n/locales/es.js +12 -0
- package/dist/i18n/locales/fr.d.ts +12 -0
- package/dist/i18n/locales/fr.js +12 -0
- package/dist/i18n/locales/hi.d.ts +12 -0
- package/dist/i18n/locales/hi.js +12 -0
- package/dist/i18n/locales/it.d.ts +12 -0
- package/dist/i18n/locales/it.js +12 -0
- package/dist/i18n/locales/ja.d.ts +12 -0
- package/dist/i18n/locales/ja.js +12 -0
- package/dist/i18n/locales/nl.d.ts +12 -0
- package/dist/i18n/locales/nl.js +12 -0
- package/dist/i18n/locales/pl.d.ts +12 -0
- package/dist/i18n/locales/pl.js +12 -0
- package/dist/i18n/locales/pt.d.ts +12 -0
- package/dist/i18n/locales/pt.js +12 -0
- package/dist/i18n/locales/ro.d.ts +12 -0
- package/dist/i18n/locales/ro.js +12 -0
- package/dist/i18n/locales/ru.d.ts +12 -0
- package/dist/i18n/locales/ru.js +12 -0
- package/dist/i18n/locales/sq.d.ts +12 -0
- package/dist/i18n/locales/sq.js +12 -0
- package/dist/i18n/locales/sv.d.ts +12 -0
- package/dist/i18n/locales/sv.js +12 -0
- package/dist/i18n/locales/tr.d.ts +12 -0
- package/dist/i18n/locales/tr.js +12 -0
- package/dist/i18n/locales/zh.d.ts +12 -0
- package/dist/i18n/locales/zh.js +12 -0
- package/dist/index.js +4 -4
- package/dist/locales/ar.json +12 -0
- package/dist/locales/de.json +12 -0
- package/dist/locales/el.json +12 -0
- package/dist/locales/en.json +12 -0
- package/dist/locales/es.json +12 -0
- package/dist/locales/fr.json +12 -0
- package/dist/locales/hi.json +12 -0
- package/dist/locales/it.json +12 -0
- package/dist/locales/ja.json +12 -0
- package/dist/locales/nl.json +12 -0
- package/dist/locales/pl.json +12 -0
- package/dist/locales/pt.json +12 -0
- package/dist/locales/ro.json +12 -0
- package/dist/locales/ru.json +12 -0
- package/dist/locales/sq.json +12 -0
- package/dist/locales/sv.json +12 -0
- package/dist/locales/tr.json +12 -0
- package/dist/locales/zh.json +12 -0
- package/dist/patterns/calendar/calendar.model.d.ts +7 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/tokens.css +45 -42
- package/package.json +1 -1
- package/dist/_chunks/appointment-peek-BDiCIBb-.js +0 -115
- package/dist/_chunks/calendar-event-card-BUbKBPv_.js +0 -403
- package/dist/_chunks/calendar-workspace-iwyXajja.js +0 -10469
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
import { jsx as a, jsxs as p, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ne } from "react";
|
|
3
|
+
import { useTranslation as ae } from "react-i18next";
|
|
4
|
+
import { c as s } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { U as re, B as de, T as se } from "./user-x-DYszNtIg.js";
|
|
6
|
+
import { C as te } from "./check-DrFSN__t.js";
|
|
7
|
+
import { S as ie } from "./stethoscope-sZXGC43m.js";
|
|
8
|
+
import { C as le } from "./clock-Drd4Wtis.js";
|
|
9
|
+
import { T as ce } from "./triangle-alert-CBnO6nq_.js";
|
|
10
|
+
import { H as oe } from "./heart-pulse-BCppJyN2.js";
|
|
11
|
+
import { E as ve } from "./euro-Dsuz4ixO.js";
|
|
12
|
+
import { G as me } from "./globe-sHBW1JN5.js";
|
|
13
|
+
import { V as he } from "./video-BheNGvsu.js";
|
|
14
|
+
import { R as pe } from "./repeat-CvQa5rZt.js";
|
|
15
|
+
import { C as fe } from "./clipboard-check-BeAGxDVT.js";
|
|
16
|
+
import { E as ue } from "./eye-off-C_4xkbRP.js";
|
|
17
|
+
function ge(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, l;
|
|
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), l = 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), l = parseInt(n.slice(4, 6), 16);
|
|
29
|
+
} else
|
|
30
|
+
return null;
|
|
31
|
+
return [e / 255, i / 255, l / 255];
|
|
32
|
+
}
|
|
33
|
+
function we([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 dn(t, d, n) {
|
|
38
|
+
}
|
|
39
|
+
function be(t) {
|
|
40
|
+
const d = ge(t);
|
|
41
|
+
return d ? we(d) > 0.1791 ? "on-light" : "on-dark" : null;
|
|
42
|
+
}
|
|
43
|
+
const xe = {
|
|
44
|
+
confirmed: se,
|
|
45
|
+
waiting: le,
|
|
46
|
+
in_care: ie,
|
|
47
|
+
done: te,
|
|
48
|
+
cancelled: de,
|
|
49
|
+
absent: re
|
|
50
|
+
}, ye = "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)]", ke = "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", _e = {
|
|
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
|
+
}, Se = {
|
|
58
|
+
confirmed: "success",
|
|
59
|
+
waiting: "info",
|
|
60
|
+
in_care: "accent",
|
|
61
|
+
done: "success",
|
|
62
|
+
cancelled: "error",
|
|
63
|
+
absent: "warning"
|
|
64
|
+
}, K = {
|
|
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: ce,
|
|
75
|
+
labelKey: "calendarWorkspace.details.indicators.unassignedPatient",
|
|
76
|
+
tone: "warning"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
field: "hasHighlightedAnamnesis",
|
|
80
|
+
Icon: oe,
|
|
81
|
+
labelKey: "calendarWorkspace.details.indicators.anamnesis",
|
|
82
|
+
tone: "accent"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
field: "hasBillableAmount",
|
|
86
|
+
Icon: ve,
|
|
87
|
+
labelKey: "calendarWorkspace.details.indicators.billable",
|
|
88
|
+
tone: "warning"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
field: "isBookedOnline",
|
|
92
|
+
Icon: me,
|
|
93
|
+
labelKey: "calendarWorkspace.details.indicators.bookedOnline",
|
|
94
|
+
tone: "info"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
field: "isTelehealth",
|
|
98
|
+
Icon: he,
|
|
99
|
+
labelKey: "calendarWorkspace.details.indicators.telehealth",
|
|
100
|
+
tone: "info"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
field: "isRecurring",
|
|
104
|
+
Icon: pe,
|
|
105
|
+
labelKey: "calendarWorkspace.details.indicators.recurring",
|
|
106
|
+
tone: "info"
|
|
107
|
+
}
|
|
108
|
+
], Ie = 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
|
+
), ze = [
|
|
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(" "), Ee = [
|
|
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(" "), je = 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
|
+
), Ae = s("event-card-full-title", {
|
|
282
|
+
variants: {
|
|
283
|
+
hasShortTitle: { true: "ds:eventcard-sliver:hidden", false: "" }
|
|
284
|
+
}
|
|
285
|
+
}), O = "event-card-kind-icon ds:inline ds:size-[1em] ds:me-[var(--spacing-2xs)] ds:align-text-bottom", Re = 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
|
+
), Ce = 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
|
+
}), Ke = 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
|
+
}), L = "ds:col-span-full ds:overflow-hidden ds:text-[length:var(--type-meta-size)] ds:wrap-break-word", Oe = s(`event-card-suffix ${L}`, {
|
|
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
|
+
}), Te = s(`event-card-context ${L}`, {
|
|
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
|
+
}), T = "ds:eventcard-narrow:absolute ds:eventcard-narrow:end-0 ds:eventcard-narrow:[inset-block-end:0] ds:eventcard-narrow:gap-0", Le = 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
|
+
T,
|
|
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: T,
|
|
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
|
+
), Be = s(
|
|
354
|
+
`event-card-marker ${ye} 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
|
+
), Ve = ["first", "second", "third"], We = 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
|
+
), He = 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
|
+
), Me = ne(
|
|
435
|
+
({
|
|
436
|
+
title: t,
|
|
437
|
+
shortTitle: d,
|
|
438
|
+
startText: n,
|
|
439
|
+
layout: e = "grid",
|
|
440
|
+
contextLabel: i,
|
|
441
|
+
contextName: l,
|
|
442
|
+
suffix: w,
|
|
443
|
+
rangeText: f,
|
|
444
|
+
showTime: B = !0,
|
|
445
|
+
allDay: V = !1,
|
|
446
|
+
status: c,
|
|
447
|
+
backgroundColor: o,
|
|
448
|
+
textColor: h,
|
|
449
|
+
borderColor: b,
|
|
450
|
+
isBookedOnline: I = !1,
|
|
451
|
+
hasUnassignedPatient: W,
|
|
452
|
+
hasHighlightedAnamnesis: H,
|
|
453
|
+
hasBillableAmount: M,
|
|
454
|
+
isTelehealth: U,
|
|
455
|
+
isRecurring: D,
|
|
456
|
+
isTask: u = !1,
|
|
457
|
+
isDraft: x = !1,
|
|
458
|
+
detailsPending: y = !1,
|
|
459
|
+
colorStyle: G = "solid",
|
|
460
|
+
resourceLabel: $,
|
|
461
|
+
privacyMasked: z = !1,
|
|
462
|
+
eventId: F,
|
|
463
|
+
className: P,
|
|
464
|
+
style: E,
|
|
465
|
+
"aria-label": Y,
|
|
466
|
+
...q
|
|
467
|
+
}, X) => {
|
|
468
|
+
const { t: v } = ae(), m = [
|
|
469
|
+
...c ? [
|
|
470
|
+
{
|
|
471
|
+
id: "status",
|
|
472
|
+
Icon: xe[c],
|
|
473
|
+
label: v(K[c]),
|
|
474
|
+
tone: Se[c]
|
|
475
|
+
}
|
|
476
|
+
] : [],
|
|
477
|
+
...Ne.filter(
|
|
478
|
+
({ field: r }) => !!{
|
|
479
|
+
hasUnassignedPatient: W,
|
|
480
|
+
hasHighlightedAnamnesis: H,
|
|
481
|
+
hasBillableAmount: M,
|
|
482
|
+
isBookedOnline: I,
|
|
483
|
+
isTelehealth: U,
|
|
484
|
+
isRecurring: D
|
|
485
|
+
}[r]
|
|
486
|
+
).map(({ field: r, Icon: _, labelKey: S, tone: N }) => ({
|
|
487
|
+
id: r,
|
|
488
|
+
Icon: _,
|
|
489
|
+
label: v(S),
|
|
490
|
+
tone: N
|
|
491
|
+
}))
|
|
492
|
+
], J = c ? v(K[c]) : void 0, Q = y ? v("calendar.eventKind.pendingDetails") : x ? v("calendar.eventKind.draft") : u ? v("calendar.eventKind.task") : void 0, Z = Y ?? [
|
|
493
|
+
t,
|
|
494
|
+
f,
|
|
495
|
+
w,
|
|
496
|
+
$,
|
|
497
|
+
// A blank name falls back to the visible label rather than
|
|
498
|
+
// silencing the context altogether.
|
|
499
|
+
l != null && l.trim() ? l : i,
|
|
500
|
+
J,
|
|
501
|
+
Q,
|
|
502
|
+
...m.filter((r) => r.id !== "status").map((r) => r.label)
|
|
503
|
+
].filter(Boolean).join(", "), j = y ? "pending-details" : x ? "draft" : u ? "task" : "appointment", g = !u && !x && G === "tinted", k = !g && !h && o ? be(o) : null, A = g ? o ? { "--calendar-event-accent": o } : void 0 : o || h || b ? {
|
|
504
|
+
...o ? { "--calendar-event-bg": o } : {},
|
|
505
|
+
...h ? { "--calendar-event-text": h } : k === "on-light" ? { "--calendar-event-text": "var(--event-ink-on-light)" } : k === "on-dark" ? { "--calendar-event-text": "var(--event-ink-on-dark)" } : {},
|
|
506
|
+
...b ? { "--calendar-event-border": b } : {}
|
|
507
|
+
} : void 0, ee = E || A ? { ...E, ...A } : void 0, R = !!(!z && (d != null && d.trim()) && d !== t);
|
|
508
|
+
return /* @__PURE__ */ a(
|
|
509
|
+
"div",
|
|
510
|
+
{
|
|
511
|
+
ref: X,
|
|
512
|
+
role: "group",
|
|
513
|
+
...q,
|
|
514
|
+
className: Ie({
|
|
515
|
+
layout: e,
|
|
516
|
+
status: c ?? "none",
|
|
517
|
+
bookedOnline: I,
|
|
518
|
+
kind: j,
|
|
519
|
+
colorStyle: g ? "tinted" : "solid",
|
|
520
|
+
className: P
|
|
521
|
+
}),
|
|
522
|
+
style: ee,
|
|
523
|
+
"aria-label": Z,
|
|
524
|
+
"data-component": "calendar-event-card",
|
|
525
|
+
"data-event-id": F,
|
|
526
|
+
"data-kind": j,
|
|
527
|
+
"data-status": c ?? "none",
|
|
528
|
+
"data-contrast": g ? "tinted" : h ? "custom" : k ?? "default",
|
|
529
|
+
children: /* @__PURE__ */ p("span", { className: ze, "aria-hidden": "true", children: [
|
|
530
|
+
/* @__PURE__ */ p("span", { className: Ee, children: [
|
|
531
|
+
/* @__PURE__ */ a(
|
|
532
|
+
"span",
|
|
533
|
+
{
|
|
534
|
+
className: je({
|
|
535
|
+
layout: e,
|
|
536
|
+
hiddenMarkers: m.length > 1
|
|
537
|
+
}),
|
|
538
|
+
children: y ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: ke }) : /* @__PURE__ */ p(C, { children: [
|
|
539
|
+
u ? /* @__PURE__ */ a(fe, { className: O }) : null,
|
|
540
|
+
z ? /* @__PURE__ */ a(ue, { className: O }) : null,
|
|
541
|
+
/* @__PURE__ */ a(
|
|
542
|
+
"span",
|
|
543
|
+
{
|
|
544
|
+
className: Ae({
|
|
545
|
+
hasShortTitle: R
|
|
546
|
+
}),
|
|
547
|
+
children: t
|
|
548
|
+
}
|
|
549
|
+
),
|
|
550
|
+
R ? /* @__PURE__ */ a("span", { className: "event-card-short-title ds:hidden ds:eventcard-sliver:inline", children: d }) : null
|
|
551
|
+
] })
|
|
552
|
+
}
|
|
553
|
+
),
|
|
554
|
+
B && !V && f ? /* @__PURE__ */ a("span", { className: Re({ layout: e }), children: n ? /* @__PURE__ */ p(C, { children: [
|
|
555
|
+
/* @__PURE__ */ a("span", { className: Ce({ layout: e }), children: n }),
|
|
556
|
+
/* @__PURE__ */ a("span", { className: Ke({ layout: e }), children: f })
|
|
557
|
+
] }) : f }) : null
|
|
558
|
+
] }),
|
|
559
|
+
w ? /* @__PURE__ */ a("span", { className: Oe({ layout: e }), children: w }) : null,
|
|
560
|
+
i ? /* @__PURE__ */ a("span", { className: Te({ layout: e }), children: i }) : null,
|
|
561
|
+
m.length > 0 ? /* @__PURE__ */ p("span", { className: Le({ layout: e }), children: [
|
|
562
|
+
m.map(({ id: r, Icon: _, tone: S }, N) => /* @__PURE__ */ a(
|
|
563
|
+
"span",
|
|
564
|
+
{
|
|
565
|
+
"data-marker": r,
|
|
566
|
+
"aria-hidden": "true",
|
|
567
|
+
className: Be({
|
|
568
|
+
rank: Ve[N] ?? "rest",
|
|
569
|
+
layout: e,
|
|
570
|
+
className: _e[S]
|
|
571
|
+
}),
|
|
572
|
+
children: /* @__PURE__ */ a(_, { "aria-hidden": "true" })
|
|
573
|
+
},
|
|
574
|
+
r
|
|
575
|
+
)),
|
|
576
|
+
[1, 2, 3].map(
|
|
577
|
+
(r) => m.length > r ? /* @__PURE__ */ a(
|
|
578
|
+
"span",
|
|
579
|
+
{
|
|
580
|
+
className: We({ capacity: r, layout: e }),
|
|
581
|
+
children: v("calendar.card.more", {
|
|
582
|
+
number: m.length - r
|
|
583
|
+
})
|
|
584
|
+
},
|
|
585
|
+
r
|
|
586
|
+
) : null
|
|
587
|
+
),
|
|
588
|
+
m.length > 1 && e !== "month" ? /* @__PURE__ */ a("span", { className: He({ layout: e }), children: "·" }) : null
|
|
589
|
+
] }) : null
|
|
590
|
+
] })
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
Me.displayName = "CalendarEventCard";
|
|
596
|
+
export {
|
|
597
|
+
Me as C,
|
|
598
|
+
Ne as E,
|
|
599
|
+
xe as S,
|
|
600
|
+
K as a,
|
|
601
|
+
dn as w
|
|
602
|
+
};
|
|
603
|
+
//# sourceMappingURL=calendar-event-card-DyFSIehr.js.map
|