@alfadocs/ui-kit 1.49.2 → 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.
- package/dist/_chunks/appointment-peek-Dk11UOVW.js +123 -0
- package/dist/_chunks/calendar-event-card-DplPh1wv.js +600 -0
- package/dist/_chunks/{calendar-workspace-iwyXajja.js → calendar-workspace-CWRH4x15.js} +3937 -3829
- package/dist/_chunks/{calendar-Bt44KMNO.js → calendar-zpE9qTM4.js} +437 -399
- 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 +15 -0
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +46 -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/package.json
CHANGED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as C, isValidElement as P } from "react";
|
|
3
|
-
import { c as D } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as V } from "react-i18next";
|
|
5
|
-
import { A as y } from "./avatar-BVvjKNTp.js";
|
|
6
|
-
import { D as l } from "./description-list-1A2DEbE6.js";
|
|
7
|
-
import { H as z } from "./hover-card-BplP5SzQ.js";
|
|
8
|
-
import { a as E } from "./workflow-status-ClHfz4Kr.js";
|
|
9
|
-
import { C as H } from "./clock-Drd4Wtis.js";
|
|
10
|
-
import { V as I } from "./video-BheNGvsu.js";
|
|
11
|
-
import { A as S } from "./armchair-BaLDW6Hz.js";
|
|
12
|
-
import { E as j } from "./eye-off-C_4xkbRP.js";
|
|
13
|
-
import { a as L } from "./entity-card-D1Yrh9wf.js";
|
|
14
|
-
const R = D(
|
|
15
|
-
"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]"
|
|
16
|
-
), T = C(
|
|
17
|
-
({
|
|
18
|
-
name: t,
|
|
19
|
-
avatarSrc: v,
|
|
20
|
-
time: h,
|
|
21
|
-
location: m,
|
|
22
|
-
telehealth: u = !1,
|
|
23
|
-
status: s,
|
|
24
|
-
statusLabel: x,
|
|
25
|
-
details: c,
|
|
26
|
-
flags: d,
|
|
27
|
-
privacy: r = !1,
|
|
28
|
-
className: k,
|
|
29
|
-
...N
|
|
30
|
-
}, g) => {
|
|
31
|
-
const { t: o } = V(), i = s ? L(s) : null, p = i == null ? void 0 : i.Icon, w = u ? I : S, f = !r, A = [
|
|
32
|
-
{ icon: /* @__PURE__ */ e(H, {}), label: o("appointmentPeek.time"), value: h },
|
|
33
|
-
...m ? [
|
|
34
|
-
{
|
|
35
|
-
icon: /* @__PURE__ */ e(w, {}),
|
|
36
|
-
label: o("appointmentPeek.location"),
|
|
37
|
-
value: m
|
|
38
|
-
}
|
|
39
|
-
] : [],
|
|
40
|
-
...f && c ? c.map((a) => ({
|
|
41
|
-
icon: P(a.icon) ? a.icon : null,
|
|
42
|
-
label: a.label,
|
|
43
|
-
value: a.value
|
|
44
|
-
})) : []
|
|
45
|
-
];
|
|
46
|
-
return /* @__PURE__ */ n(
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
ref: g,
|
|
50
|
-
"data-component": "appointment-peek",
|
|
51
|
-
"data-status": s,
|
|
52
|
-
className: R({ className: k }),
|
|
53
|
-
...N,
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ n("div", { className: "ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
56
|
-
r ? null : /* @__PURE__ */ e(
|
|
57
|
-
y,
|
|
58
|
-
{
|
|
59
|
-
size: "sm",
|
|
60
|
-
name: t,
|
|
61
|
-
src: v,
|
|
62
|
-
"aria-hidden": "true",
|
|
63
|
-
className: "ds:shrink-0"
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ n("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
67
|
-
/* @__PURE__ */ e(z.Heading, { className: "ds:min-w-0", children: r ? /* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
j,
|
|
70
|
-
{
|
|
71
|
-
"aria-hidden": "true",
|
|
72
|
-
className: "ds:size-4 ds:shrink-0"
|
|
73
|
-
}
|
|
74
|
-
),
|
|
75
|
-
o("appointmentPeek.hiddenName")
|
|
76
|
-
] }) : t }),
|
|
77
|
-
f && d ? /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: d }) : null
|
|
78
|
-
] })
|
|
79
|
-
] }),
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
l,
|
|
82
|
-
{
|
|
83
|
-
layout: "inline",
|
|
84
|
-
density: "compact",
|
|
85
|
-
divider: "none",
|
|
86
|
-
className: "ds:[--description-list-icon-color:var(--accent)]",
|
|
87
|
-
children: A.map((a, b) => /* @__PURE__ */ n(l.Row, { icon: a.icon, children: [
|
|
88
|
-
/* @__PURE__ */ e(l.Term, { children: a.label }),
|
|
89
|
-
/* @__PURE__ */ e(l.Detail, { children: a.value })
|
|
90
|
-
] }, b))
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
s && i && p ? /* @__PURE__ */ e("div", { "data-slot": "workflow", children: /* @__PURE__ */ e(
|
|
94
|
-
E,
|
|
95
|
-
{
|
|
96
|
-
size: "sm",
|
|
97
|
-
value: s,
|
|
98
|
-
option: {
|
|
99
|
-
value: s,
|
|
100
|
-
label: x ?? o(`appointmentCard.state.${s}`),
|
|
101
|
-
icon: /* @__PURE__ */ e(p, { "aria-hidden": "true" }),
|
|
102
|
-
tone: i.tone
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
) }) : null
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
T.displayName = "AppointmentPeek";
|
|
112
|
-
export {
|
|
113
|
-
T as A
|
|
114
|
-
};
|
|
115
|
-
//# sourceMappingURL=appointment-peek-BDiCIBb-.js.map
|
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as T } from "react";
|
|
3
|
-
import { useTranslation as W } from "react-i18next";
|
|
4
|
-
import { c as X } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { C as Y } from "./clipboard-check-BeAGxDVT.js";
|
|
6
|
-
import { E as C } from "./eye-off-C_4xkbRP.js";
|
|
7
|
-
import { U as q, B as F, T as J } from "./user-x-DYszNtIg.js";
|
|
8
|
-
import { C as M } from "./check-DrFSN__t.js";
|
|
9
|
-
import { S as Q } from "./stethoscope-sZXGC43m.js";
|
|
10
|
-
import { C as Z } from "./clock-Drd4Wtis.js";
|
|
11
|
-
import { G as P } from "./globe-sHBW1JN5.js";
|
|
12
|
-
import { T as ee } from "./triangle-alert-CBnO6nq_.js";
|
|
13
|
-
import { H as ne } from "./heart-pulse-BCppJyN2.js";
|
|
14
|
-
import { E as ae } from "./euro-Dsuz4ixO.js";
|
|
15
|
-
import { V as re } from "./video-BheNGvsu.js";
|
|
16
|
-
import { R as se } from "./repeat-CvQa5rZt.js";
|
|
17
|
-
function de(a) {
|
|
18
|
-
if (typeof a != "string") return null;
|
|
19
|
-
const r = a.trim();
|
|
20
|
-
if (!r.startsWith("#")) return null;
|
|
21
|
-
const n = r.slice(1);
|
|
22
|
-
let d, t, s;
|
|
23
|
-
if (n.length === 3) {
|
|
24
|
-
if (!/^[0-9a-f]{3}$/i.test(n)) return null;
|
|
25
|
-
d = parseInt(n[0] + n[0], 16), t = parseInt(n[1] + n[1], 16), s = parseInt(n[2] + n[2], 16);
|
|
26
|
-
} else if (n.length === 6) {
|
|
27
|
-
if (!/^[0-9a-f]{6}$/i.test(n)) return null;
|
|
28
|
-
d = parseInt(n.slice(0, 2), 16), t = parseInt(n.slice(2, 4), 16), s = parseInt(n.slice(4, 6), 16);
|
|
29
|
-
} else
|
|
30
|
-
return null;
|
|
31
|
-
return [d / 255, t / 255, s / 255];
|
|
32
|
-
}
|
|
33
|
-
function te([a, r, n]) {
|
|
34
|
-
const d = (t) => t <= 0.03928 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
35
|
-
return 0.2126 * d(a) + 0.7152 * d(r) + 0.0722 * d(n);
|
|
36
|
-
}
|
|
37
|
-
function Ce(a, r, n) {
|
|
38
|
-
}
|
|
39
|
-
function ie(a) {
|
|
40
|
-
const r = de(a);
|
|
41
|
-
return r ? te(r) > 0.1791 ? "on-light" : "on-dark" : null;
|
|
42
|
-
}
|
|
43
|
-
const oe = {
|
|
44
|
-
confirmed: J,
|
|
45
|
-
waiting: Z,
|
|
46
|
-
in_care: Q,
|
|
47
|
-
done: M,
|
|
48
|
-
cancelled: F,
|
|
49
|
-
absent: q
|
|
50
|
-
}, o = "ds:inline-flex ds:size-4.5 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)]", le = "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", c = {
|
|
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
|
-
}, ce = {
|
|
58
|
-
confirmed: "success",
|
|
59
|
-
waiting: "info",
|
|
60
|
-
in_care: "accent",
|
|
61
|
-
done: "success",
|
|
62
|
-
cancelled: "error",
|
|
63
|
-
absent: "warning"
|
|
64
|
-
}, me = {
|
|
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
|
-
}, ue = X(
|
|
72
|
-
[
|
|
73
|
-
// Block root; the appointment content is a wrap-capable flex row
|
|
74
|
-
// (inline-flowing text cell beside the icon column — structurally
|
|
75
|
-
// overlap-safe). Tight padding and line-height so sliver-height
|
|
76
|
-
// harnesses show a full text line.
|
|
77
|
-
//
|
|
78
|
-
// `@container/eventcard` makes the card's own inline size the query
|
|
79
|
-
// basis for the indicator column below. FullCalendar sizes the
|
|
80
|
-
// harness by lane count, so a dense day splits a column into
|
|
81
|
-
// 30-40px slivers with no media query anywhere near that width —
|
|
82
|
-
// only a container query can see it. Safe here: the root is a
|
|
83
|
-
// BLOCK, never a flex parent, so `container-type` cannot collapse a
|
|
84
|
-
// flex child (see rich-text-editor/editor-toolbar.tsx for the same
|
|
85
|
-
// precaution).
|
|
86
|
-
"ds:relative ds:block ds:@container/eventcard",
|
|
87
|
-
"ds:w-full ds:h-full",
|
|
88
|
-
"ds:ps-[var(--spacing-2xs)] ds:pe-[var(--spacing-2xs)]",
|
|
89
|
-
"ds:rounded-[var(--radius-sm)]",
|
|
90
|
-
"ds:text-[length:var(--font-size-sm)]",
|
|
91
|
-
"ds:font-[var(--font-weight-medium)]",
|
|
92
|
-
"ds:leading-tight ds:text-start",
|
|
93
|
-
"ds:overflow-hidden",
|
|
94
|
-
// kept verbatim from the former base (inert on a non-focusable div
|
|
95
|
-
// inside FC; harmless)
|
|
96
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
97
|
-
"ds:focus-visible:outline-[var(--ring)]",
|
|
98
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
99
|
-
// SINGLE PAINTED SURFACE — always present, never conditional. One
|
|
100
|
-
// declaration per paint channel; value chain = "caller custom prop,
|
|
101
|
-
// else token". This structurally eliminates the CVA-vs-override
|
|
102
|
-
// specificity race (the old double-paint bug) — stylesheet order
|
|
103
|
-
// becomes irrelevant.
|
|
104
|
-
"ds:[background-color:var(--calendar-event-bg,var(--primary))]",
|
|
105
|
-
"ds:[color:var(--calendar-event-text,var(--primary-foreground))]",
|
|
106
|
-
"ds:border ds:[border-color:var(--calendar-event-border,transparent)]"
|
|
107
|
-
].join(" "),
|
|
108
|
-
{
|
|
109
|
-
variants: {
|
|
110
|
-
// Do not add colour classes to this axis — status is icon + aria
|
|
111
|
-
// only; a unit test asserts identical computed background
|
|
112
|
-
// across all six statuses.
|
|
113
|
-
status: {
|
|
114
|
-
none: "",
|
|
115
|
-
confirmed: "",
|
|
116
|
-
waiting: "",
|
|
117
|
-
in_care: "",
|
|
118
|
-
done: "",
|
|
119
|
-
cancelled: "ds:line-through",
|
|
120
|
-
absent: ""
|
|
121
|
-
},
|
|
122
|
-
bookedOnline: {
|
|
123
|
-
// class name kept as a stable inert DOM hook; the stripe paint
|
|
124
|
-
// lives here (moved from fullcalendar-theme.css) so it works in
|
|
125
|
-
// the card's own stories, outside .fc-theme-alfadocs.
|
|
126
|
-
// currentcolor = resolved ink, so stripes stay visible over any
|
|
127
|
-
// picker colour.
|
|
128
|
-
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)]",
|
|
129
|
-
false: ""
|
|
130
|
-
},
|
|
131
|
-
// Task treatment: CUSTOM-PROPERTY assignments only — the consuming
|
|
132
|
-
// background-color / color / border-color declarations stay in the
|
|
133
|
-
// base above, so this cannot re-open the CVA-vs-override specificity
|
|
134
|
-
// race, and a caller's inline picker hex (set as the same custom
|
|
135
|
-
// properties via `style`) still wins. `border-dashed` is a
|
|
136
|
-
// border-style declaration — no property collision either.
|
|
137
|
-
kind: {
|
|
138
|
-
// The appointment's COLOUR IDENTITY edge — a thick start border
|
|
139
|
-
// in the event colour, platform-agenda style, so the colour
|
|
140
|
-
// reads even on sliver-height cards. Tasks keep the 1px edge:
|
|
141
|
-
// muted to-dos carry no colour identity.
|
|
142
|
-
appointment: "ds:border-s-4",
|
|
143
|
-
// Draft treatment — an appointment being COMPOSED, not yet saved
|
|
144
|
-
// (the slot a user just picked, mirrored on the grid while the
|
|
145
|
-
// editor is open). Same custom-property-only discipline as
|
|
146
|
-
// `task`: dashed outline over a light primary tint, so the
|
|
147
|
-
// placeholder reads as pending rather than as a booked slot.
|
|
148
|
-
draft: [
|
|
149
|
-
"ds:border-dashed",
|
|
150
|
-
"ds:[--calendar-event-bg:color-mix(in_srgb,var(--primary)_10%,var(--card))]",
|
|
151
|
-
"ds:[--calendar-event-text:var(--foreground)]",
|
|
152
|
-
"ds:[--calendar-event-border:var(--primary)]"
|
|
153
|
-
].join(" "),
|
|
154
|
-
// Details pending — the block IS a booked appointment, so it
|
|
155
|
-
// keeps the colour-identity edge and assigns no paint of its own.
|
|
156
|
-
// Only the NAME is missing; the bar above stands in for it.
|
|
157
|
-
"pending-details": "ds:border-s-4",
|
|
158
|
-
task: [
|
|
159
|
-
"ds:border-dashed",
|
|
160
|
-
"ds:[--calendar-event-bg:var(--muted)]",
|
|
161
|
-
"ds:[--calendar-event-text:var(--muted-foreground)]",
|
|
162
|
-
"ds:[--calendar-event-border:color-mix(in_srgb,currentcolor_45%,transparent)]"
|
|
163
|
-
].join(" ")
|
|
164
|
-
},
|
|
165
|
-
// Tinted colour scheme — the chip-family look: the picker colour
|
|
166
|
-
// becomes a SOLID BORDER over a light tint of itself (theme-aware
|
|
167
|
-
// via color-mix with --card), text on the theme's foreground
|
|
168
|
-
// tokens. Custom-property assignments only — the painted
|
|
169
|
-
// declarations stay in the base. The runtime hex arrives as
|
|
170
|
-
// `--calendar-event-accent` (inline). Never combined with the task
|
|
171
|
-
// variant: the component forces `solid` for tasks so exactly one
|
|
172
|
-
// class-level assignment of each property exists per render.
|
|
173
|
-
colorStyle: {
|
|
174
|
-
solid: "",
|
|
175
|
-
tinted: [
|
|
176
|
-
"ds:[--calendar-event-bg:color-mix(in_srgb,var(--calendar-event-accent,var(--primary))_12%,var(--card))]",
|
|
177
|
-
"ds:[--calendar-event-text:var(--foreground)]",
|
|
178
|
-
"ds:[--calendar-event-border:var(--calendar-event-accent,var(--primary))]"
|
|
179
|
-
].join(" ")
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
defaultVariants: {
|
|
183
|
-
status: "none",
|
|
184
|
-
bookedOnline: !1,
|
|
185
|
-
kind: "appointment",
|
|
186
|
-
colorStyle: "solid"
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
), fe = T(
|
|
190
|
-
({
|
|
191
|
-
title: a,
|
|
192
|
-
suffix: r,
|
|
193
|
-
rangeText: n,
|
|
194
|
-
showTime: d = !0,
|
|
195
|
-
allDay: t = !1,
|
|
196
|
-
status: s,
|
|
197
|
-
backgroundColor: l,
|
|
198
|
-
textColor: u,
|
|
199
|
-
borderColor: h,
|
|
200
|
-
isBookedOnline: g = !1,
|
|
201
|
-
hasUnassignedPatient: N,
|
|
202
|
-
hasHighlightedAnamnesis: w,
|
|
203
|
-
hasBillableAmount: S,
|
|
204
|
-
isTelehealth: k,
|
|
205
|
-
isRecurring: z,
|
|
206
|
-
isTask: m = !1,
|
|
207
|
-
isDraft: b = !1,
|
|
208
|
-
detailsPending: f = !1,
|
|
209
|
-
colorStyle: B = "solid",
|
|
210
|
-
resourceLabel: L,
|
|
211
|
-
privacyMasked: I = !1,
|
|
212
|
-
eventId: j,
|
|
213
|
-
className: A,
|
|
214
|
-
style: $,
|
|
215
|
-
"aria-label": O,
|
|
216
|
-
...R
|
|
217
|
-
}, U) => {
|
|
218
|
-
const { t: v } = W(), x = s ? oe[s] : null, G = !!x || !!g || !!N || !!w || !!S || !!k || !!z, H = s ? v(me[s]) : void 0, K = f ? v("calendar.eventKind.pendingDetails") : b ? v("calendar.eventKind.draft") : m ? v("calendar.eventKind.task") : void 0, V = O ?? [a, n, L, H, K].filter(Boolean).join(", "), y = f ? "pending-details" : b ? "draft" : m ? "task" : "appointment", p = !m && !b && B === "tinted", _ = !p && !u && l ? ie(l) : null, E = p ? l ? { "--calendar-event-accent": l } : void 0 : l || u || h ? {
|
|
219
|
-
...l ? { "--calendar-event-bg": l } : {},
|
|
220
|
-
...u ? { "--calendar-event-text": u } : _ === "on-light" ? { "--calendar-event-text": "var(--event-ink-on-light)" } : _ === "on-dark" ? { "--calendar-event-text": "var(--event-ink-on-dark)" } : {},
|
|
221
|
-
...h ? { "--calendar-event-border": h } : {}
|
|
222
|
-
} : void 0, D = $ || E ? { ...$, ...E } : void 0;
|
|
223
|
-
return /* @__PURE__ */ i(
|
|
224
|
-
"div",
|
|
225
|
-
{
|
|
226
|
-
ref: U,
|
|
227
|
-
...R,
|
|
228
|
-
className: ue({
|
|
229
|
-
status: s ?? "none",
|
|
230
|
-
bookedOnline: g,
|
|
231
|
-
kind: y,
|
|
232
|
-
colorStyle: p ? "tinted" : "solid",
|
|
233
|
-
className: A
|
|
234
|
-
}),
|
|
235
|
-
style: D,
|
|
236
|
-
"aria-label": V,
|
|
237
|
-
"data-component": "calendar-event-card",
|
|
238
|
-
"data-event-id": j,
|
|
239
|
-
"data-kind": y,
|
|
240
|
-
"data-status": s ?? "none",
|
|
241
|
-
"data-contrast": p ? "tinted" : u ? "custom" : _ ?? "default",
|
|
242
|
-
children: [
|
|
243
|
-
m && !f ? (
|
|
244
|
-
/* Task cards lead with ONE line — glyph + title inline. A task is
|
|
245
|
-
typically a 30-min block whose visible height fits a single
|
|
246
|
-
line; the appointment layout below would spend that line on the
|
|
247
|
-
indicator row and clip the title entirely. Tasks carry none of
|
|
248
|
-
the appointment flags, so the row loses nothing. */
|
|
249
|
-
/* @__PURE__ */ i("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
250
|
-
/* @__PURE__ */ e(
|
|
251
|
-
"span",
|
|
252
|
-
{
|
|
253
|
-
"aria-hidden": "true",
|
|
254
|
-
className: `${o} ds:text-[color:var(--muted-foreground)]`,
|
|
255
|
-
children: /* @__PURE__ */ e(Y, { size: 11, "aria-hidden": "true" })
|
|
256
|
-
}
|
|
257
|
-
),
|
|
258
|
-
d && !t && n ? /* @__PURE__ */ e("span", { className: "ds:whitespace-nowrap ds:text-[length:var(--font-size-xs)]", children: n }) : null,
|
|
259
|
-
/* @__PURE__ */ e("span", { className: "ds:[min-inline-size:0] ds:font-[var(--font-weight-semibold)] ds:truncate ds:text-start", children: I ? /* @__PURE__ */ i("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
260
|
-
/* @__PURE__ */ e(C, { size: 12, "aria-hidden": "true" }),
|
|
261
|
-
a
|
|
262
|
-
] }) : a })
|
|
263
|
-
] })
|
|
264
|
-
) : (
|
|
265
|
-
/* Platform-density layout with STRUCTURAL overlap-safety: the
|
|
266
|
-
first row is a flex pair — an inline-flowing text cell (time,
|
|
267
|
-
then the semibold name; wraps when taller cards allow) beside
|
|
268
|
-
a fixed icon column. Flex cells cannot paint over each other,
|
|
269
|
-
unlike a float (inline text paints ABOVE floats, which
|
|
270
|
-
produced glyphs-through-icons in sliver-width columns). A
|
|
271
|
-
one-line sliver still reads "09:15 Name" plus icons. */
|
|
272
|
-
/* @__PURE__ */ i("span", { className: "ds:flex ds:h-full ds:items-stretch ds:gap-[var(--spacing-2xs)]", children: [
|
|
273
|
-
/* @__PURE__ */ i("span", { className: "ds:min-w-[var(--spacing-2xl)] ds:flex-1 ds:overflow-hidden ds:break-normal", children: [
|
|
274
|
-
/* @__PURE__ */ i("span", { className: "ds:flex ds:min-w-0 ds:items-baseline ds:gap-[var(--spacing-2xs)]", children: [
|
|
275
|
-
d && !t && n ? (
|
|
276
|
-
// No opacity here — composing 70% over saturated bgs drops
|
|
277
|
-
// effective contrast below WCAG AA. The smaller
|
|
278
|
-
// font-size-xs vs the title's font-weight-semibold provides
|
|
279
|
-
// sufficient visual hierarchy.
|
|
280
|
-
/* @__PURE__ */ e(
|
|
281
|
-
"span",
|
|
282
|
-
{
|
|
283
|
-
className: "ds:max-w-[55%] ds:shrink-0 ds:truncate ds:whitespace-nowrap ds:text-[length:var(--font-size-xs)]",
|
|
284
|
-
title: n,
|
|
285
|
-
children: n
|
|
286
|
-
}
|
|
287
|
-
)
|
|
288
|
-
) : null,
|
|
289
|
-
/* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:flex-1 ds:truncate ds:font-[var(--font-weight-semibold)]", children: f ? (
|
|
290
|
-
/* No name yet — and nothing invented in its place. */
|
|
291
|
-
/* @__PURE__ */ e("span", { "aria-hidden": "true", className: le })
|
|
292
|
-
) : I ? (
|
|
293
|
-
/* The eye + mask get their own start padding so the
|
|
294
|
-
redaction doesn't crowd the time. */
|
|
295
|
-
/* @__PURE__ */ i("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:ps-[var(--spacing-2xs)] ds:align-middle", children: [
|
|
296
|
-
/* @__PURE__ */ e(C, { size: 12, "aria-hidden": "true" }),
|
|
297
|
-
a
|
|
298
|
-
] })
|
|
299
|
-
) : a })
|
|
300
|
-
] }),
|
|
301
|
-
r ? (
|
|
302
|
-
/* Second line inside the text cell — beside the plate,
|
|
303
|
-
never beneath it. */
|
|
304
|
-
/* @__PURE__ */ e("span", { className: "ds:block ds:truncate ds:text-[length:var(--font-size-xs)]", children: r })
|
|
305
|
-
) : null
|
|
306
|
-
] }),
|
|
307
|
-
/* @__PURE__ */ i(
|
|
308
|
-
"span",
|
|
309
|
-
{
|
|
310
|
-
className: G ? (
|
|
311
|
-
/* Vertically CENTRED indicator column — each disc is
|
|
312
|
-
its own card-surface circle, so no plate and no
|
|
313
|
-
colour-on-colour.
|
|
314
|
-
|
|
315
|
-
Hidden below 128px of CARD width: three discs are
|
|
316
|
-
58px, so on a 34px overlap sliver the shrink-0
|
|
317
|
-
column outran the whole card and the time and name
|
|
318
|
-
were laid out at zero. Decoration must not outrank
|
|
319
|
-
the only content, and nothing is lost — every disc
|
|
320
|
-
is aria-hidden and its meaning already sits in the
|
|
321
|
-
composed aria-label, which a sliver card still
|
|
322
|
-
carries in full. */
|
|
323
|
-
"ds:hidden ds:@[128px]/eventcard:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-2xs)] ds:self-center"
|
|
324
|
-
) : "ds:hidden",
|
|
325
|
-
children: [
|
|
326
|
-
x && s ? /* @__PURE__ */ e(
|
|
327
|
-
"span",
|
|
328
|
-
{
|
|
329
|
-
"aria-hidden": "true",
|
|
330
|
-
className: `${o} ${c[ce[s]]}`,
|
|
331
|
-
children: /* @__PURE__ */ e(x, { size: 11, "aria-hidden": "true" })
|
|
332
|
-
}
|
|
333
|
-
) : null,
|
|
334
|
-
g ? /* @__PURE__ */ e(
|
|
335
|
-
"span",
|
|
336
|
-
{
|
|
337
|
-
"aria-hidden": "true",
|
|
338
|
-
className: `${o} ${c.info}`,
|
|
339
|
-
children: /* @__PURE__ */ e(P, { size: 11, "aria-hidden": "true" })
|
|
340
|
-
}
|
|
341
|
-
) : null,
|
|
342
|
-
N ? /* @__PURE__ */ e(
|
|
343
|
-
"span",
|
|
344
|
-
{
|
|
345
|
-
"aria-hidden": "true",
|
|
346
|
-
className: `${o} ${c.warning}`,
|
|
347
|
-
children: /* @__PURE__ */ e(ee, { size: 11, "aria-hidden": "true" })
|
|
348
|
-
}
|
|
349
|
-
) : null,
|
|
350
|
-
w ? /* @__PURE__ */ e(
|
|
351
|
-
"span",
|
|
352
|
-
{
|
|
353
|
-
"aria-hidden": "true",
|
|
354
|
-
className: `${o} ${c.accent}`,
|
|
355
|
-
children: /* @__PURE__ */ e(ne, { size: 11, "aria-hidden": "true" })
|
|
356
|
-
}
|
|
357
|
-
) : null,
|
|
358
|
-
S ? /* @__PURE__ */ e(
|
|
359
|
-
"span",
|
|
360
|
-
{
|
|
361
|
-
"aria-hidden": "true",
|
|
362
|
-
className: `${o} ${c.warning}`,
|
|
363
|
-
children: /* @__PURE__ */ e(ae, { size: 11, "aria-hidden": "true" })
|
|
364
|
-
}
|
|
365
|
-
) : null,
|
|
366
|
-
k ? /* @__PURE__ */ e(
|
|
367
|
-
"span",
|
|
368
|
-
{
|
|
369
|
-
"aria-hidden": "true",
|
|
370
|
-
className: `${o} ${c.info}`,
|
|
371
|
-
children: /* @__PURE__ */ e(re, { size: 11, "aria-hidden": "true" })
|
|
372
|
-
}
|
|
373
|
-
) : null,
|
|
374
|
-
z ? /* @__PURE__ */ e(
|
|
375
|
-
"span",
|
|
376
|
-
{
|
|
377
|
-
"aria-hidden": "true",
|
|
378
|
-
className: `${o} ${c.info}`,
|
|
379
|
-
children: /* @__PURE__ */ e(se, { size: 11, "aria-hidden": "true" })
|
|
380
|
-
}
|
|
381
|
-
) : null
|
|
382
|
-
]
|
|
383
|
-
}
|
|
384
|
-
)
|
|
385
|
-
] })
|
|
386
|
-
),
|
|
387
|
-
m && d && !t && n ? /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-xs)]", children: n }) : null,
|
|
388
|
-
m && r ? (
|
|
389
|
-
/* Task cards keep the below-row suffix (their branch has no
|
|
390
|
-
text cell / plate split). */
|
|
391
|
-
/* @__PURE__ */ e("span", { className: "ds:block ds:truncate ds:text-[length:var(--font-size-xs)]", children: r })
|
|
392
|
-
) : null
|
|
393
|
-
]
|
|
394
|
-
}
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
);
|
|
398
|
-
fe.displayName = "CalendarEventCard";
|
|
399
|
-
export {
|
|
400
|
-
fe as C,
|
|
401
|
-
Ce as w
|
|
402
|
-
};
|
|
403
|
-
//# sourceMappingURL=calendar-event-card-BUbKBPv_.js.map
|