@alfadocs/ui-kit 1.33.0 → 1.35.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-card-Bh_CIlc6.js +431 -0
- package/dist/_chunks/appointment-timeline-De-Wqdkw.js +449 -0
- package/dist/_chunks/{appointment-tray-DCk8gHod.js → appointment-tray-4I9wTAi4.js} +2 -2
- package/dist/_chunks/{calendar-workspace-BX-zDyVR.js → calendar-workspace-UywR5gUl.js} +7 -7
- package/dist/_chunks/{care-plan-card-CZW476Kg.js → care-plan-card-DHVhBcvs.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-BMUYagEw.js → care-plan-entry-card-Dx6IdTcR.js} +2 -2
- package/dist/_chunks/{care-plan-header-B5CBE0zu.js → care-plan-header-UTX5ZD74.js} +2 -2
- package/dist/_chunks/{clinical-note-card-D2WTV2CO.js → clinical-note-card-CTRzmqvv.js} +83 -81
- package/dist/_chunks/{contact-profile-card-BZqi8Hck.js → contact-profile-card-DSI9uumA.js} +17 -16
- package/dist/_chunks/{control-room-rail-iO_BCaq1.js → control-room-rail-5MbhjsxN.js} +2 -2
- package/dist/_chunks/{entity-card-DmrgYSEX.js → entity-card-9_62gY7l.js} +4 -4
- package/dist/_chunks/format-price-BkMEbeW3.js +47 -0
- package/dist/_chunks/{format-price-DNqXPa_q.js → languages-CZqBaPwI.js} +8 -38
- package/dist/_chunks/money.agent-Dw55UxUA.js +116 -0
- package/dist/_chunks/notes-panel-BjLt-kiP.js +469 -0
- package/dist/_chunks/{operator-hero-D7-iiFQ9.js → operator-hero-aG_qyn6g.js} +2 -2
- package/dist/_chunks/{payment-request-card-lmKLwsDs.js → payment-request-card-DvEsWEkC.js} +2 -2
- package/dist/_chunks/{practice-results-DjEzPgAK.js → practice-results-kayDEorM.js} +15 -14
- package/dist/_chunks/{rich-text-editor-CQ7yZdG3.js → rich-text-editor-CCI-Y3DN.js} +3 -5
- package/dist/_chunks/{task-card-BUgK6yZT.js → task-card-BalrLkSz.js} +41 -40
- package/dist/_chunks/{task-tray-CYG6rj2s.js → task-tray-COo-RlDv.js} +2 -2
- package/dist/_chunks/tasks-panel-DLKpSNoE.js +844 -0
- package/dist/_chunks/tool-rail-ONaV-Nzz.js +588 -0
- package/dist/_chunks/use-check-animation--I3cS00X.js +28 -0
- package/dist/_chunks/use-list-reflow-Cw43nxw5.js +100 -0
- package/dist/agent-catalog.json +15 -1
- package/dist/components/_shared/format-price.d.ts +15 -0
- package/dist/components/appointment-card/appointment-card.d.ts +36 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +6 -0
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +8 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +7 -7
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/money/index.d.ts +4 -0
- package/dist/components/money/index.js +6 -0
- package/dist/components/money/money.agent.d.ts +3 -0
- package/dist/components/money/money.d.ts +38 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +16 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +11 -3
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tasks-panel/tasks-panel.d.ts +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +43 -37
- package/dist/hooks/use-check-animation.d.ts +53 -0
- package/dist/hooks/use-exit-transition.d.ts +48 -0
- package/dist/hooks/use-list-reflow.d.ts +47 -0
- package/dist/host-compat.css +8 -2
- package/dist/i18n/locales/ar.d.ts +10 -0
- package/dist/i18n/locales/ar.js +12 -2
- package/dist/i18n/locales/de.d.ts +10 -0
- package/dist/i18n/locales/de.js +12 -2
- package/dist/i18n/locales/el.d.ts +10 -0
- package/dist/i18n/locales/el.js +12 -2
- package/dist/i18n/locales/en.d.ts +10 -0
- package/dist/i18n/locales/en.js +12 -2
- package/dist/i18n/locales/es.d.ts +10 -0
- package/dist/i18n/locales/es.js +12 -2
- package/dist/i18n/locales/fr.d.ts +10 -0
- package/dist/i18n/locales/fr.js +12 -2
- package/dist/i18n/locales/hi.d.ts +10 -0
- package/dist/i18n/locales/hi.js +12 -2
- package/dist/i18n/locales/it.d.ts +13 -3
- package/dist/i18n/locales/it.js +14 -4
- package/dist/i18n/locales/ja.d.ts +10 -0
- package/dist/i18n/locales/ja.js +12 -2
- package/dist/i18n/locales/nl.d.ts +10 -0
- package/dist/i18n/locales/nl.js +12 -2
- package/dist/i18n/locales/pl.d.ts +10 -0
- package/dist/i18n/locales/pl.js +12 -2
- package/dist/i18n/locales/pt.d.ts +10 -0
- package/dist/i18n/locales/pt.js +12 -2
- package/dist/i18n/locales/ro.d.ts +10 -0
- package/dist/i18n/locales/ro.js +12 -2
- package/dist/i18n/locales/ru.d.ts +10 -0
- package/dist/i18n/locales/ru.js +12 -2
- package/dist/i18n/locales/sq.d.ts +10 -0
- package/dist/i18n/locales/sq.js +12 -2
- package/dist/i18n/locales/sv.d.ts +10 -0
- package/dist/i18n/locales/sv.js +12 -2
- package/dist/i18n/locales/tr.d.ts +10 -0
- package/dist/i18n/locales/tr.js +12 -2
- package/dist/i18n/locales/zh.d.ts +10 -0
- package/dist/i18n/locales/zh.js +12 -2
- package/dist/index.js +919 -916
- package/dist/locales/ar.json +12 -2
- package/dist/locales/de.json +12 -2
- package/dist/locales/el.json +12 -2
- package/dist/locales/en.json +12 -2
- package/dist/locales/es.json +12 -2
- package/dist/locales/fr.json +12 -2
- package/dist/locales/hi.json +12 -2
- package/dist/locales/it.json +14 -4
- package/dist/locales/ja.json +12 -2
- package/dist/locales/nl.json +12 -2
- package/dist/locales/pl.json +12 -2
- package/dist/locales/pt.json +12 -2
- package/dist/locales/ro.json +12 -2
- package/dist/locales/ru.json +12 -2
- package/dist/locales/sq.json +12 -2
- package/dist/locales/sv.json +12 -2
- package/dist/locales/tr.json +12 -2
- package/dist/locales/zh.json +12 -2
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/tokens.css +2 -1
- package/package.json +5 -1
- package/dist/_chunks/appointment-card-D-oj_ugh.js +0 -296
- package/dist/_chunks/appointment-timeline-CymGHyIP.js +0 -403
- package/dist/_chunks/notes-panel-C4G-mhZ9.js +0 -380
- package/dist/_chunks/tasks-panel-DQuaVvl5.js +0 -757
- package/dist/_chunks/tool-rail-8Scslq3X.js +0 -524
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as oa } from "react";
|
|
3
|
+
import { c as ta } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as da } from "react-i18next";
|
|
5
|
+
import { A as K } from "./avatar-CkDeQOSI.js";
|
|
6
|
+
import { B as t } from "./badge-sTusUqZD.js";
|
|
7
|
+
import { T as ia } from "./tag-3wgkwwDB.js";
|
|
8
|
+
import { T as la } from "./timestamp-BV2lC-wV.js";
|
|
9
|
+
import { T as Y } from "./transaction-chip-DJCstquX.js";
|
|
10
|
+
import { i as ca } from "./is-safe-url-DkETxeHz.js";
|
|
11
|
+
import { V as pa } from "./video-BheNGvsu.js";
|
|
12
|
+
import { M as ua } from "./map-pin-BaY37-Km.js";
|
|
13
|
+
import { a as ma, b as ga, c as fa } from "./entity-card-9_62gY7l.js";
|
|
14
|
+
import { c as f } from "./createLucideIcon-DhHxpK9K.js";
|
|
15
|
+
import { S as W } from "./star-Bf9L2Uot.js";
|
|
16
|
+
import { A as ha } from "./armchair-BaLDW6Hz.js";
|
|
17
|
+
import { G as va } from "./globe-sHBW1JN5.js";
|
|
18
|
+
import { R as ba } from "./repeat-CvQa5rZt.js";
|
|
19
|
+
import { C as ya } from "./chevron-right-I9AeSxH2.js";
|
|
20
|
+
/**
|
|
21
|
+
* @license lucide-react v1.22.0 - ISC
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the ISC license.
|
|
24
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/
|
|
26
|
+
const xa = [
|
|
27
|
+
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
28
|
+
[
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
|
|
32
|
+
key: "116196"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
["path", { d: "M9 14h6", key: "159ibu" }],
|
|
36
|
+
["path", { d: "M12 17v-6", key: "1y8rbf" }]
|
|
37
|
+
], ka = f("clipboard-plus", xa);
|
|
38
|
+
/**
|
|
39
|
+
* @license lucide-react v1.22.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
const Na = [
|
|
45
|
+
[
|
|
46
|
+
"path",
|
|
47
|
+
{
|
|
48
|
+
d: "M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",
|
|
49
|
+
key: "ukzhwg"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
["path", { d: "M14.487 7.858A1 1 0 0 1 14 7V2", key: "1klhew" }],
|
|
53
|
+
[
|
|
54
|
+
"path",
|
|
55
|
+
{
|
|
56
|
+
d: "M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",
|
|
57
|
+
key: "rxaxab"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
["path", { d: "M8 18h1", key: "13wk12" }]
|
|
61
|
+
], Ca = f("file-pen-line", Na);
|
|
62
|
+
/**
|
|
63
|
+
* @license lucide-react v1.22.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/
|
|
68
|
+
const wa = [
|
|
69
|
+
[
|
|
70
|
+
"path",
|
|
71
|
+
{
|
|
72
|
+
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
73
|
+
key: "18887p"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
["path", { d: "M7 11h10", key: "1twpyw" }],
|
|
77
|
+
["path", { d: "M7 15h6", key: "d9of3u" }],
|
|
78
|
+
["path", { d: "M7 7h8", key: "af5zfr" }]
|
|
79
|
+
], za = f("message-square-text", wa);
|
|
80
|
+
/**
|
|
81
|
+
* @license lucide-react v1.22.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/
|
|
86
|
+
const Ta = [
|
|
87
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
88
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
89
|
+
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
90
|
+
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
91
|
+
], Ma = f("user-x", Ta), Va = {
|
|
92
|
+
"var(--color-violet-500)": "ds:bg-[var(--color-violet-500)]",
|
|
93
|
+
"var(--color-purple-500)": "ds:bg-[var(--color-purple-500)]",
|
|
94
|
+
"var(--color-magenta-500)": "ds:bg-[var(--color-magenta-500)]",
|
|
95
|
+
"var(--color-blue-500)": "ds:bg-[var(--color-blue-500)]",
|
|
96
|
+
"var(--color-green-500)": "ds:bg-[var(--color-green-500)]",
|
|
97
|
+
"var(--color-red-500)": "ds:bg-[var(--color-red-500)]",
|
|
98
|
+
"var(--color-yellow-500)": "ds:bg-[var(--color-yellow-500)]",
|
|
99
|
+
"var(--color-indigo-500)": "ds:bg-[var(--color-indigo-500)]",
|
|
100
|
+
"var(--color-orange-500)": "ds:bg-[var(--color-orange-500)]",
|
|
101
|
+
"var(--color-fuchsia-500)": "ds:bg-[var(--color-fuchsia-500)]",
|
|
102
|
+
"var(--color-grey-700)": "ds:bg-[var(--color-grey-700)]"
|
|
103
|
+
};
|
|
104
|
+
function Ra(a) {
|
|
105
|
+
return Va[fa(a)] ?? "ds:bg-[var(--color-grey-700)]";
|
|
106
|
+
}
|
|
107
|
+
function _a(a) {
|
|
108
|
+
if (!a) return;
|
|
109
|
+
const d = new Date(a);
|
|
110
|
+
if (Number.isNaN(d.getTime())) return;
|
|
111
|
+
const p = /* @__PURE__ */ new Date();
|
|
112
|
+
let o = p.getFullYear() - d.getFullYear();
|
|
113
|
+
const u = p.getMonth() - d.getMonth();
|
|
114
|
+
return (u < 0 || u === 0 && p.getDate() < d.getDate()) && o--, o < 0 || o > 130 ? void 0 : o;
|
|
115
|
+
}
|
|
116
|
+
const Da = ta(
|
|
117
|
+
[
|
|
118
|
+
"ds:relative ds:flex ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
119
|
+
"ds:rounded-[var(--radius-md)]",
|
|
120
|
+
"ds:text-start ds:group",
|
|
121
|
+
"ds:bg-[var(--card)] ds:text-[color:var(--card-foreground)]",
|
|
122
|
+
"ds:transition-[colors,border-color,box-shadow] ds:duration-[var(--animation-duration)]",
|
|
123
|
+
"ds:motion-reduce:transition-none",
|
|
124
|
+
"ds:forced-colors:border ds:forced-colors:border-[CanvasText]"
|
|
125
|
+
].join(" "),
|
|
126
|
+
{
|
|
127
|
+
variants: {
|
|
128
|
+
size: {
|
|
129
|
+
sm: "ds:p-[var(--spacing-sm)]",
|
|
130
|
+
md: "ds:p-[var(--spacing-md)]"
|
|
131
|
+
},
|
|
132
|
+
interactive: {
|
|
133
|
+
true: "ds:hover:bg-[color:var(--muted)]/40 ds:cursor-pointer",
|
|
134
|
+
false: ""
|
|
135
|
+
},
|
|
136
|
+
surface: {
|
|
137
|
+
// `flat` (default) is the chrome-less row used inside a bordered
|
|
138
|
+
// AppointmentTray. `elevated` gives each row its own card chrome
|
|
139
|
+
// (border + shadow) for use directly on a rail, e.g. AppointmentTimeline.
|
|
140
|
+
// Uses `--shadow-sm` (a row lift), not `--shadow-card`/`--shadow-lg`:
|
|
141
|
+
// the rail's `overflow-y:auto` scroll region clips `overflow-x` at a
|
|
142
|
+
// narrow gutter, so a wide 30px-blur shadow gets a hard-edged clip.
|
|
143
|
+
flat: "",
|
|
144
|
+
elevated: "ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2 ds:shadow-[var(--shadow-sm)]"
|
|
145
|
+
},
|
|
146
|
+
selected: {
|
|
147
|
+
// The row the host has marked as the active/selected appointment —
|
|
148
|
+
// matches the `current` note's info-tinted accent: a solid
|
|
149
|
+
// inline-start bar plus a soft info wash, so the eye keeps its
|
|
150
|
+
// place in the list after a click.
|
|
151
|
+
true: "ds:border-s-2 ds:border-s-[color:var(--info)] ds:bg-[color:var(--info)]/10",
|
|
152
|
+
false: ""
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
defaultVariants: {
|
|
156
|
+
size: "sm",
|
|
157
|
+
interactive: !1,
|
|
158
|
+
surface: "flat",
|
|
159
|
+
selected: !1
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
), X = [
|
|
163
|
+
// Interactive elements need a box to remain keyboard-focusable in browsers.
|
|
164
|
+
"ds:inline-flex ds:min-w-0",
|
|
165
|
+
"ds:focus-visible:outline-none",
|
|
166
|
+
"ds:after:content-[''] ds:after:absolute ds:after:inset-0 ds:after:rounded-[var(--radius-md)]",
|
|
167
|
+
"ds:after:pointer-events-auto",
|
|
168
|
+
"ds:focus-visible:after:outline-[length:var(--focus-ring-width)]",
|
|
169
|
+
"ds:focus-visible:after:outline-solid",
|
|
170
|
+
"ds:focus-visible:after:outline-[color:var(--ring)]",
|
|
171
|
+
"ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]",
|
|
172
|
+
"ds:forced-colors:focus-visible:after:outline-[CanvasText]"
|
|
173
|
+
].join(" "), Sa = {
|
|
174
|
+
inPractice: ua,
|
|
175
|
+
telehealth: pa
|
|
176
|
+
}, Aa = oa(
|
|
177
|
+
({
|
|
178
|
+
item: a,
|
|
179
|
+
size: d = "sm",
|
|
180
|
+
surface: p = "flat",
|
|
181
|
+
locale: o,
|
|
182
|
+
currency: u = "EUR",
|
|
183
|
+
showPatient: i = !0,
|
|
184
|
+
onActivate: l,
|
|
185
|
+
selected: N = !1,
|
|
186
|
+
className: J,
|
|
187
|
+
...Q
|
|
188
|
+
}, Z) => {
|
|
189
|
+
var R, _, D, S, A, L, I, P, U, $, O, j, q, B, E, F, H, G;
|
|
190
|
+
const { t: s } = da(), m = !!l, aa = !!a.url && ca(a.url), h = ((R = a.patient) == null ? void 0 : R.name) ?? s("appointmentCard.noPatient"), c = (_ = a.operator) == null ? void 0 : _.name, v = s(`appointmentCard.state.${a.state}`), C = _a((D = a.patient) == null ? void 0 : D.dobIso), ea = ((S = a.flags) == null ? void 0 : S.noPatientAssigned) || !a.patient, b = d === "md" ? "md" : "sm", sa = Sa[a.type], w = i ? h : c ?? s("appointmentCard.appointment"), z = i ? s("appointmentCard.itemLabel", {
|
|
191
|
+
patient: h,
|
|
192
|
+
state: v
|
|
193
|
+
}) : s("appointmentCard.itemLabelGeneric", { title: w, state: v }), y = /* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate type-title-item ds:text-[color:var(--foreground)]", children: [
|
|
194
|
+
w,
|
|
195
|
+
i && C !== void 0 ? /* @__PURE__ */ r("span", { className: "ds:ms-[var(--spacing-2xs)] ds:font-normal ds:text-[color:var(--muted-foreground)]", children: [
|
|
196
|
+
"· ",
|
|
197
|
+
C
|
|
198
|
+
] }) : null
|
|
199
|
+
] });
|
|
200
|
+
let g;
|
|
201
|
+
m && aa ? g = /* @__PURE__ */ e(
|
|
202
|
+
"a",
|
|
203
|
+
{
|
|
204
|
+
href: a.url,
|
|
205
|
+
"aria-label": z,
|
|
206
|
+
className: X,
|
|
207
|
+
onClick: (n) => {
|
|
208
|
+
n.defaultPrevented || n.metaKey || n.ctrlKey || n.shiftKey || l == null || l(a);
|
|
209
|
+
},
|
|
210
|
+
children: y
|
|
211
|
+
}
|
|
212
|
+
) : m ? g = /* @__PURE__ */ e(
|
|
213
|
+
"button",
|
|
214
|
+
{
|
|
215
|
+
type: "button",
|
|
216
|
+
"aria-label": z,
|
|
217
|
+
className: X + " ds:bg-transparent ds:border-0 ds:p-0 ds:text-start",
|
|
218
|
+
onClick: () => l == null ? void 0 : l(a),
|
|
219
|
+
children: y
|
|
220
|
+
}
|
|
221
|
+
) : g = y;
|
|
222
|
+
const T = (a.treatments ?? []).map((n, ra) => {
|
|
223
|
+
const na = n.elements && n.elements.length > 0 ? s("appointmentCard.treatmentWithElements", {
|
|
224
|
+
care: n.careName,
|
|
225
|
+
elements: n.elements.join(", ")
|
|
226
|
+
}) : n.careName;
|
|
227
|
+
return /* @__PURE__ */ e(
|
|
228
|
+
ia,
|
|
229
|
+
{
|
|
230
|
+
label: na,
|
|
231
|
+
variant: "neutral",
|
|
232
|
+
fill: "outline",
|
|
233
|
+
size: "sm",
|
|
234
|
+
maxInlineSize: "12rem"
|
|
235
|
+
},
|
|
236
|
+
`${n.careName}-${ra}`
|
|
237
|
+
);
|
|
238
|
+
}), x = (A = a.bookingReason) == null ? void 0 : A.advanceAmountCents, M = typeof x == "number" && x > 0, k = (L = a.money) == null ? void 0 : L.unpaidAmountCents, V = typeof k == "number" && k > 0;
|
|
239
|
+
return /* @__PURE__ */ r(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
ref: Z,
|
|
243
|
+
role: "listitem",
|
|
244
|
+
"data-component": "appointment-card",
|
|
245
|
+
"data-component-id": a.id,
|
|
246
|
+
"data-state": a.state,
|
|
247
|
+
"data-type": a.type,
|
|
248
|
+
"aria-current": N ? "true" : void 0,
|
|
249
|
+
className: Da({
|
|
250
|
+
size: d,
|
|
251
|
+
interactive: m,
|
|
252
|
+
surface: p,
|
|
253
|
+
selected: N,
|
|
254
|
+
className: J
|
|
255
|
+
}),
|
|
256
|
+
...Q,
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ r("span", { className: "ds:flex ds:min-w-20 ds:shrink-0 ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
|
|
259
|
+
/* @__PURE__ */ r("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap ds:text-[color:var(--muted-foreground)]", children: [
|
|
260
|
+
/* @__PURE__ */ e(sa, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
|
|
261
|
+
/* @__PURE__ */ e("span", { className: "ds:sr-only", children: s(`appointmentCard.type.${a.type}`) }),
|
|
262
|
+
/* @__PURE__ */ e(
|
|
263
|
+
la,
|
|
264
|
+
{
|
|
265
|
+
value: a.startIso,
|
|
266
|
+
format: "absolute",
|
|
267
|
+
shape: "bare",
|
|
268
|
+
locale: o,
|
|
269
|
+
absoluteFormat: { hour: "numeric", minute: "2-digit" },
|
|
270
|
+
className: "type-body-sm ds:font-medium ds:text-[color:var(--foreground)] ds:tabular-nums"
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ e("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: s("appointmentCard.duration", { count: a.durationMin }) })
|
|
275
|
+
] }),
|
|
276
|
+
c ? /* @__PURE__ */ r("span", { className: "ds:relative ds:shrink-0", children: [
|
|
277
|
+
/* @__PURE__ */ e(
|
|
278
|
+
K,
|
|
279
|
+
{
|
|
280
|
+
name: c,
|
|
281
|
+
color: ma((I = a.operator) == null ? void 0 : I.colorId),
|
|
282
|
+
size: b,
|
|
283
|
+
"aria-hidden": "true",
|
|
284
|
+
role: "presentation",
|
|
285
|
+
"aria-label": void 0
|
|
286
|
+
}
|
|
287
|
+
),
|
|
288
|
+
/* @__PURE__ */ e(
|
|
289
|
+
"span",
|
|
290
|
+
{
|
|
291
|
+
"aria-hidden": "true",
|
|
292
|
+
className: "ds:absolute ds:bottom-0 ds:end-0 ds:size-2.5 ds:rounded-[var(--radius-full)] ds:border ds:border-[color:var(--card)] " + Ra((P = a.operator) == null ? void 0 : P.colorId)
|
|
293
|
+
}
|
|
294
|
+
)
|
|
295
|
+
] }) : null,
|
|
296
|
+
/* @__PURE__ */ r("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
297
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
298
|
+
/* @__PURE__ */ r("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
299
|
+
i && ((U = a.patient) != null && U.avatarUrl) ? /* @__PURE__ */ e(
|
|
300
|
+
K,
|
|
301
|
+
{
|
|
302
|
+
name: h,
|
|
303
|
+
src: a.patient.avatarUrl,
|
|
304
|
+
size: b,
|
|
305
|
+
className: "ds:shrink-0",
|
|
306
|
+
"aria-hidden": "true",
|
|
307
|
+
role: "presentation",
|
|
308
|
+
"aria-label": void 0
|
|
309
|
+
}
|
|
310
|
+
) : null,
|
|
311
|
+
i && ea ? /* @__PURE__ */ e(
|
|
312
|
+
"span",
|
|
313
|
+
{
|
|
314
|
+
className: `ds:shrink-0 ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-full)] ds:bg-[color:var(--muted)] ds:text-[color:var(--muted-foreground)] ${b === "md" ? "ds:size-10" : "ds:size-8"}`,
|
|
315
|
+
children: /* @__PURE__ */ e(Ma, { "aria-hidden": "true", className: "ds:size-4" })
|
|
316
|
+
}
|
|
317
|
+
) : null,
|
|
318
|
+
g
|
|
319
|
+
] }),
|
|
320
|
+
/* @__PURE__ */ e(
|
|
321
|
+
t,
|
|
322
|
+
{
|
|
323
|
+
variant: ga(a.state),
|
|
324
|
+
size: "sm",
|
|
325
|
+
withDot: !0,
|
|
326
|
+
className: "ds:shrink-0",
|
|
327
|
+
children: v
|
|
328
|
+
}
|
|
329
|
+
)
|
|
330
|
+
] }),
|
|
331
|
+
i && c || ($ = a.bookingReason) != null && $.specialty || a.firstVisit === "yes" || a.firstVisit === "unknown" || a.bookingNote ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)] type-eyebrow ds:text-[color:var(--muted-foreground)]", children: [
|
|
332
|
+
i && c ? /* @__PURE__ */ e("span", { children: c }) : null,
|
|
333
|
+
(O = a.bookingReason) != null && O.specialty ? /* @__PURE__ */ e("span", { children: a.bookingReason.specialty }) : null,
|
|
334
|
+
a.firstVisit === "yes" ? /* @__PURE__ */ r("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
335
|
+
/* @__PURE__ */ e(W, { "aria-hidden": "true", className: "ds:size-3 ds:shrink-0" }),
|
|
336
|
+
s("appointmentCard.firstVisit")
|
|
337
|
+
] }) : null,
|
|
338
|
+
a.firstVisit === "unknown" ? /* @__PURE__ */ r("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
339
|
+
/* @__PURE__ */ e(W, { "aria-hidden": "true", className: "ds:size-3 ds:shrink-0" }),
|
|
340
|
+
s("appointmentCard.firstVisitUnknown")
|
|
341
|
+
] }) : null,
|
|
342
|
+
a.bookingNote ? /* @__PURE__ */ r(
|
|
343
|
+
"span",
|
|
344
|
+
{
|
|
345
|
+
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
346
|
+
title: s("appointmentCard.hasBookingNote"),
|
|
347
|
+
children: [
|
|
348
|
+
/* @__PURE__ */ e(
|
|
349
|
+
za,
|
|
350
|
+
{
|
|
351
|
+
"aria-hidden": "true",
|
|
352
|
+
className: "ds:size-3 ds:shrink-0"
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
s("appointmentCard.hasBookingNote")
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
) : null
|
|
359
|
+
] }) : null,
|
|
360
|
+
(j = a.bookingReason) != null && j.description ? /* @__PURE__ */ e("span", { className: "type-body-sm ds:text-[color:var(--foreground)] ds:truncate", children: a.bookingReason.description }) : null,
|
|
361
|
+
T.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: T }) : null,
|
|
362
|
+
a.carePlan || a.chair || (q = a.flags) != null && q.bookedOnline || (B = a.flags) != null && B.highlightedAnamnesis || (E = a.flags) != null && E.billable || a.recurring || a.signing || M || V ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
363
|
+
a.carePlan ? /* @__PURE__ */ e(
|
|
364
|
+
t,
|
|
365
|
+
{
|
|
366
|
+
variant: "accentSoft",
|
|
367
|
+
size: "sm",
|
|
368
|
+
leading: /* @__PURE__ */ e(ka, {}),
|
|
369
|
+
children: s("appointmentCard.carePlan", {
|
|
370
|
+
number: a.carePlan.number
|
|
371
|
+
})
|
|
372
|
+
}
|
|
373
|
+
) : null,
|
|
374
|
+
a.chair ? /* @__PURE__ */ e(t, { variant: "neutral", size: "sm", leading: /* @__PURE__ */ e(ha, {}), children: s("appointmentCard.chair", { chair: a.chair }) }) : null,
|
|
375
|
+
(F = a.flags) != null && F.bookedOnline ? /* @__PURE__ */ e(t, { variant: "info", size: "sm", leading: /* @__PURE__ */ e(va, {}), children: s("appointmentCard.flag.bookedOnline") }) : null,
|
|
376
|
+
(H = a.flags) != null && H.highlightedAnamnesis ? /* @__PURE__ */ e(t, { variant: "warning", size: "sm", withDot: !0, children: s("appointmentCard.flag.highlightedAnamnesis") }) : null,
|
|
377
|
+
a.recurring ? /* @__PURE__ */ e(t, { variant: "neutral", size: "sm", leading: /* @__PURE__ */ e(ba, {}), children: s("appointmentCard.recurring") }) : null,
|
|
378
|
+
a.signing ? /* @__PURE__ */ e(
|
|
379
|
+
t,
|
|
380
|
+
{
|
|
381
|
+
variant: a.signing.toComplete >= a.signing.required ? "success" : "warning",
|
|
382
|
+
size: "sm",
|
|
383
|
+
leading: /* @__PURE__ */ e(Ca, {}),
|
|
384
|
+
children: s("appointmentCard.signing", {
|
|
385
|
+
complete: a.signing.toComplete,
|
|
386
|
+
required: a.signing.required
|
|
387
|
+
})
|
|
388
|
+
}
|
|
389
|
+
) : null,
|
|
390
|
+
(G = a.flags) != null && G.billable ? /* @__PURE__ */ e(t, { variant: "success", size: "sm", withDot: !0, children: s("appointmentCard.flag.billable") }) : null,
|
|
391
|
+
M ? /* @__PURE__ */ e(
|
|
392
|
+
Y,
|
|
393
|
+
{
|
|
394
|
+
state: "to-invoice",
|
|
395
|
+
amount: x / 100,
|
|
396
|
+
currency: u,
|
|
397
|
+
locale: o,
|
|
398
|
+
size: "sm",
|
|
399
|
+
showLabel: !0
|
|
400
|
+
}
|
|
401
|
+
) : null,
|
|
402
|
+
V ? /* @__PURE__ */ e(
|
|
403
|
+
Y,
|
|
404
|
+
{
|
|
405
|
+
state: "debt",
|
|
406
|
+
amount: k / 100,
|
|
407
|
+
currency: u,
|
|
408
|
+
locale: o,
|
|
409
|
+
size: "sm",
|
|
410
|
+
showLabel: !0
|
|
411
|
+
}
|
|
412
|
+
) : null
|
|
413
|
+
] }) : null
|
|
414
|
+
] }),
|
|
415
|
+
m ? /* @__PURE__ */ e(
|
|
416
|
+
ya,
|
|
417
|
+
{
|
|
418
|
+
"aria-hidden": "true",
|
|
419
|
+
className: "ds:size-4 ds:shrink-0 ds:self-center ds:text-[color:var(--muted-foreground)] ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:rtl:rotate-180"
|
|
420
|
+
}
|
|
421
|
+
) : null
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
);
|
|
427
|
+
Aa.displayName = "AppointmentCard";
|
|
428
|
+
export {
|
|
429
|
+
Aa as A
|
|
430
|
+
};
|
|
431
|
+
//# sourceMappingURL=appointment-card-Bh_CIlc6.js.map
|