@eka-care/medassist-widget 0.1.103-dev.0 → 0.1.103-dev.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.
@@ -1,70 +1,70 @@
1
- import { c as w, d as m, A as R, y as $, u as e, i as f, C as X, T as A, q, _ as ce, j as de, k as me, l as he, m as pe, n as fe, o as ue, S as Y, p as xe, I as ge, r as ye, B as v, s as be, t as ve } from "./medassist-widget.js";
2
- import { C as we } from "./medassist-widget-check-BaHLRs-2.js";
3
- import { M as Z } from "./medassist-widget-map-pin-Bx-5lPdC.js";
4
- import { C as ke, a as Ne } from "./medassist-widget-chevron-right-CKYbGWbY.js";
5
- const Ce = [
1
+ import { c as k, d as m, A as R, y as S, u as e, i as f, C as X, T as A, q, _ as de, j as me, k as he, l as pe, m as fe, n as ue, o as xe, S as Z, p as ge, I as ye, r as be, B as w, s as ve, t as we } from "./medassist-widget.js";
2
+ import { C as ke } from "./medassist-widget-check-BaHLRs-2.js";
3
+ import { M as D } from "./medassist-widget-map-pin-Bx-5lPdC.js";
4
+ import { C as Ne, a as Ce } from "./medassist-widget-chevron-right-CKYbGWbY.js";
5
+ const _e = [
6
6
  ["path", { d: "M5 12h14", key: "1ays0h" }],
7
7
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
8
- ], D = w("arrow-right", Ce);
9
- const _e = [
8
+ ], ee = k("arrow-right", _e);
9
+ const $e = [
10
10
  ["path", { d: "M8 2v4", key: "1cmpym" }],
11
11
  ["path", { d: "M16 2v4", key: "4m81vk" }],
12
12
  ["path", { d: "M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8", key: "3spt84" }],
13
13
  ["path", { d: "M3 10h18", key: "8toen8" }],
14
14
  ["path", { d: "m17 22 5-5", key: "1k6ppv" }],
15
15
  ["path", { d: "m17 17 5 5", key: "p7ous7" }]
16
- ], $e = w("calendar-x-2", _e);
17
- const Se = [
16
+ ], Se = k("calendar-x-2", $e);
17
+ const Me = [
18
18
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
19
19
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
20
- ], Me = w("clock", Se);
21
- const Be = [
20
+ ], Be = k("clock", Me);
21
+ const Ae = [
22
22
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
23
23
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
24
24
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
25
- ], Ae = w("ellipsis", Be);
26
- const He = [
25
+ ], He = k("ellipsis", Ae);
26
+ const je = [
27
27
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
28
28
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
29
29
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
30
- ], je = w("external-link", He);
31
- const Le = [
30
+ ], Le = k("external-link", je);
31
+ const Ie = [
32
32
  ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
33
33
  ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
34
34
  ["path", { d: "M2 5h12", key: "or177f" }],
35
35
  ["path", { d: "M7 2h1", key: "1t2jsx" }],
36
36
  ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
37
37
  ["path", { d: "M14 18h6", key: "1m8k6r" }]
38
- ], Ie = w("languages", Le);
39
- const ze = [
38
+ ], ze = k("languages", Ie);
39
+ const Ee = [
40
40
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
41
41
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
42
- ], Ee = w("search", ze);
43
- function Oe({
44
- value: i,
42
+ ], Oe = k("search", Ee);
43
+ function Ve({
44
+ value: s,
45
45
  onValueChange: a,
46
46
  placeholder: h = "Select an option",
47
47
  className: p,
48
48
  triggerClassName: H,
49
- contentClassName: S,
49
+ contentClassName: M,
50
50
  disabled: c = !1,
51
- options: k = [],
51
+ options: N = [],
52
52
  size: F = "default",
53
53
  icon: j
54
54
  }) {
55
- const [u, N] = m(!1), l = R(null), b = R(null), d = k.find((o) => o.value === i);
56
- $(() => {
55
+ const [u, C] = m(!1), l = R(null), b = R(null), d = N.find((o) => o.value === s);
56
+ S(() => {
57
57
  const o = (g) => {
58
- u && g.key === "Escape" && (N(!1), b.current?.focus());
58
+ u && g.key === "Escape" && (C(!1), b.current?.focus());
59
59
  };
60
60
  return document.addEventListener("keydown", o), () => {
61
61
  document.removeEventListener("keydown", o);
62
62
  };
63
63
  }, [u]);
64
- const C = (o) => {
65
- a?.(o), N(!1), b.current?.focus();
64
+ const _ = (o) => {
65
+ a?.(o), C(!1), b.current?.focus();
66
66
  }, x = () => {
67
- c || N(!u);
67
+ c || C(!u);
68
68
  };
69
69
  return /* @__PURE__ */ e("div", { className: f("relative w-full", p), children: [
70
70
  /* @__PURE__ */ e(
@@ -111,15 +111,15 @@ function Oe({
111
111
  ref: l,
112
112
  className: f(
113
113
  "bg-surface text-foreground animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 relative z-50 max-h-[136px] min-w-[8rem] w-full overflow-x-hidden overflow-y-auto overscroll-contain rounded-md shadow-md mt-1",
114
- S
114
+ M
115
115
  ),
116
116
  role: "listbox",
117
- children: /* @__PURE__ */ e("div", { className: "p-1", children: k.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-muted-foreground text-center", children: "No options available" }) : k.map((o) => {
118
- const g = o.value === i;
117
+ children: /* @__PURE__ */ e("div", { className: "p-1", children: N.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-muted-foreground text-center", children: "No options available" }) : N.map((o) => {
118
+ const g = o.value === s;
119
119
  return /* @__PURE__ */ e(
120
120
  "div",
121
121
  {
122
- onClick: () => C(o.value),
122
+ onClick: () => _(o.value),
123
123
  className: f(
124
124
  "relative flex w-full cursor-pointer items-center gap-1 rounded-sm py-2.5 px-3 text-sm outline-none select-none transition-colors duration-150",
125
125
  "hover:bg-accent hover:text-accent-foreground",
@@ -131,12 +131,12 @@ function Oe({
131
131
  role: "option",
132
132
  "aria-selected": g,
133
133
  tabIndex: c ? -1 : 0,
134
- onKeyDown: (_) => {
135
- (_.key === "Enter" || _.key === " ") && (_.preventDefault(), c || C(o.value));
134
+ onKeyDown: ($) => {
135
+ ($.key === "Enter" || $.key === " ") && ($.preventDefault(), c || _(o.value));
136
136
  },
137
137
  children: [
138
138
  /* @__PURE__ */ e("span", { className: "flex-1 text-left min-w-0 break-words line-clamp-2", children: o.label }),
139
- g && /* @__PURE__ */ e("span", { className: "absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none", children: /* @__PURE__ */ e(we, { className: "size-4 text-foreground" }) })
139
+ g && /* @__PURE__ */ e("span", { className: "absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none", children: /* @__PURE__ */ e(ke, { className: "size-4 text-foreground" }) })
140
140
  ]
141
141
  },
142
142
  o.value
@@ -146,120 +146,120 @@ function Oe({
146
146
  )
147
147
  ] });
148
148
  }
149
- function ee({ date: i }) {
149
+ function te({ date: s }) {
150
150
  return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center gap-3 pt-5 pb-4", children: [
151
- /* @__PURE__ */ e("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-black-100 dark:bg-white-100", children: /* @__PURE__ */ e($e, { className: "h-7 w-7 text-text-secondary", "aria-hidden": !0 }) }),
152
- /* @__PURE__ */ e("p", { className: "text-sm font-medium text-text-secondary text-center", children: `No slots available ${i && `on ${i}` || ""}` })
151
+ /* @__PURE__ */ e("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-black-100 dark:bg-white-100", children: /* @__PURE__ */ e(Se, { className: "h-7 w-7 text-text-secondary", "aria-hidden": !0 }) }),
152
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-text-secondary text-center", children: `No slots available ${s && `on ${s}` || ""}` })
153
153
  ] });
154
154
  }
155
- function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H = !0 }) {
156
- const S = A(() => {
155
+ function Pe({ doctor: s, doctorDetails: a, onSelect: h, disabled: p, isActive: H = !0 }) {
156
+ const M = A(() => {
157
157
  if (a?.hospitals?.[0]?.hospital_id)
158
158
  return a?.hospitals?.[0]?.hospital_id;
159
- }, [a?.hospitals]), [c, k] = m(S), [F, j] = m(!1), [u, N] = m(!1), [l, b] = m(null), [d, C] = m(null), [x, o] = m(0), [g, _] = m(!1), [L, J] = m(!1), [M, Q] = m(!1), [I, U] = m(!1), [P, te] = m(!1), [B, K] = m(null), G = R(!1), z = R(null);
160
- $(() => {
161
- k(S);
162
- }, [S]), $(() => {
163
- const t = i?.preferred_date;
159
+ }, [a?.hospitals]), [c, N] = m(M), [F, j] = m(!1), [u, C] = m(!1), [l, b] = m(null), [d, _] = m(null), [x, o] = m(0), [g, $] = m(!1), [L, J] = m(!1), [B, Q] = m(!1), [I, U] = m(!1), [P, ae] = m(!1), [v, K] = m(null), G = R(!1), z = R(null);
160
+ S(() => {
161
+ N(M);
162
+ }, [M]), S(() => {
163
+ const t = s?.preferred_date;
164
164
  t && b(t);
165
- }, [i]);
166
- const n = i.availability ?? [], ae = q(async () => {
167
- if (!M && (J(!0), !n.length && h && a)) {
165
+ }, [s]);
166
+ const n = s.availability ?? [], re = q(async () => {
167
+ if (!B && (J(!0), !n.length && h && a)) {
168
168
  Q(!0);
169
169
  try {
170
- await h({ ...i, hospital_id: c });
170
+ await h({ ...s, hospital_id: c });
171
171
  } finally {
172
172
  Q(!1);
173
173
  }
174
174
  }
175
- }, [L, M, h, a, n.length, c]), re = q(
175
+ }, [L, B, h, a, n.length, c]), ne = q(
176
176
  (t) => {
177
- a && (k(t), b(null), C(null), o(0), G.current = !1, h?.({ ...i, hospital_id: t }));
177
+ a && (N(t), b(null), _(null), o(0), G.current = !1, h?.({ ...s, hospital_id: t }));
178
178
  },
179
- [i, h, a]
179
+ [s, h, a]
180
180
  );
181
- $(() => {
181
+ S(() => {
182
182
  H || J(!1);
183
- }, [H]), $(() => {
183
+ }, [H]), S(() => {
184
184
  if (!L || !n.length || G.current) return;
185
185
  G.current = !0;
186
- const t = i.preferred_date || n[0]?.date;
187
- t && (b((s) => s ?? t), n.find((s) => s.date === t)?.slots?.length || h?.({ ...i, hospital_id: c, preferred_date: t }));
188
- }, [n, L]), $(() => {
189
- if (!B) return;
190
- const t = n.findIndex((s) => s.date === B);
186
+ const t = s.preferred_date || n[0]?.date;
187
+ t && (b((i) => i ?? t), n.find((i) => i.date === t)?.slots?.length || h?.({ ...s, hospital_id: c, preferred_date: t }));
188
+ }, [n, L]), S(() => {
189
+ if (!v) return;
190
+ const t = n.findIndex((i) => i.date === v);
191
191
  if (t === -1) return;
192
192
  const r = Math.max(0, n.length - 3);
193
193
  o(Math.min(t, r)), K(null);
194
- }, [n, B]);
194
+ }, [n, v]);
195
195
  const E = A(
196
196
  () => n.find((t) => t.date === l)?.slots ?? [],
197
197
  [n, l]
198
198
  );
199
- ce(() => {
199
+ de(() => {
200
200
  const t = z.current;
201
201
  t && (t.scrollTop = 0, U(t.scrollHeight > t.clientHeight + 2));
202
202
  }, [l, E.length]);
203
- const ne = q(() => {
203
+ const ie = q(() => {
204
204
  const t = z.current;
205
205
  t && U(t.scrollTop + t.clientHeight < t.scrollHeight - 4);
206
- }, []), ie = () => {
206
+ }, []), se = () => {
207
207
  z.current?.scrollBy({ top: 120, behavior: "smooth" });
208
- }, se = A(() => {
208
+ }, le = A(() => {
209
209
  if (!n.length) return [];
210
210
  const t = Math.min(x + 3, n.length);
211
211
  return n.slice(x, t).map((r) => {
212
212
  if (r.date)
213
- return { ...r, ...de(r.date) };
213
+ return { ...r, ...me(r.date) };
214
214
  });
215
- }, [n, x]), le = x > 0, O = q(
215
+ }, [n, x]), oe = x > 0, O = q(
216
216
  async (t) => {
217
- b(t), C(null), _(!1);
218
- const r = n.find((s) => s.date === t);
217
+ b(t), _(null), $(!1);
218
+ const r = n.find((i) => i.date === t);
219
219
  if (!(r?.slots?.length || Array.isArray(r?.slots) && r?.slots.length === 0)) {
220
220
  j(!0);
221
221
  try {
222
- await h?.({ ...i, hospital_id: c, preferred_date: t });
222
+ await h?.({ ...s, hospital_id: c, preferred_date: t });
223
223
  } catch {
224
224
  } finally {
225
225
  j(!1);
226
226
  }
227
227
  }
228
228
  },
229
- [i, c, h, n]
230
- ), y = A(() => n.find((r) => r.date === l)?.cta ?? i.cta, [n, l, i.cta]), V = A(() => p || u || !y?.text && !l, [p, y, l, u]), W = async () => {
229
+ [s, c, h, n]
230
+ ), y = A(() => n.find((r) => r.date === l)?.cta ?? s.cta, [n, l, s.cta]), V = A(() => p || u || !y?.text && !l, [p, y, l, u]), W = async () => {
231
231
  if (!u)
232
232
  try {
233
- N(!0);
234
- const t = y?.text, r = !!t, s = l && d ? ` on ${l} at ${d}.` : "";
233
+ C(!0);
234
+ const t = y?.text, r = !!t, i = l && d ? ` on ${l} at ${d}.` : "";
235
235
  await h?.(
236
- { ...i, hospital_id: c, preferred_date: l ?? void 0, preferred_slot_time: d ?? void 0 },
237
- `${t || `I want to book an appointment with Dr. ${a?.name}`}${s}`,
236
+ { ...s, hospital_id: c, preferred_date: l ?? void 0, preferred_slot_time: d ?? void 0 },
237
+ `${t || `I want to book an appointment with Dr. ${a?.name}`}${i}`,
238
238
  y?.tool_result,
239
239
  !r
240
240
  ), K(l);
241
241
  } catch {
242
242
  } finally {
243
- N(!1);
243
+ C(!1);
244
244
  }
245
- }, oe = () => {
245
+ }, ce = () => {
246
246
  if (g) return;
247
247
  const t = y?.text, r = !!t;
248
248
  if (!r && !l) return;
249
- _(!0);
250
- const s = l && d ? ` on ${l} at ${d}.` : "";
249
+ $(!0);
250
+ const i = l && d ? ` on ${l} at ${d}.` : "";
251
251
  h?.(
252
- { ...i, hospital_id: c, preferred_date: l ?? void 0, preferred_slot_time: d ?? void 0 },
253
- `${t || `I want to book an appointment with Dr. ${a?.name}`}${s}`,
252
+ { ...s, hospital_id: c, preferred_date: l ?? void 0, preferred_slot_time: d ?? void 0 },
253
+ `${t || `I want to book an appointment with Dr. ${a?.name}`}${i}`,
254
254
  y?.tool_result,
255
255
  !r
256
256
  );
257
257
  };
258
- return a ? /* @__PURE__ */ e(ve, { className: "max-w-md h-full rounded-xl border border-black-200 dark:border-white-200 shadow-none p-0 bg-elicitationBg overflow-hidden", children: [
259
- /* @__PURE__ */ e(me, { className: "flex flex-row items-center gap-3 bg-primary/[20%] rounded-t-xl p-2 border-b border-border-subtle overflow-hidden", children: [
260
- /* @__PURE__ */ e(he, { className: "h-12 w-12 ring-2 ring-primary/20 flex-shrink-0", children: [
261
- a.profile_pic && /* @__PURE__ */ e(pe, { src: a.profile_pic, alt: `${a.name} profile photo`, crossOrigin: "anonymous" }),
262
- /* @__PURE__ */ e(fe, { className: "bg-secondary text-primary", children: ue(a.name) })
258
+ return a ? /* @__PURE__ */ e(we, { className: "max-w-md h-full rounded-xl border border-black-200 dark:border-white-200 shadow-none p-0 bg-elicitationBg overflow-hidden", children: [
259
+ /* @__PURE__ */ e(he, { className: "flex flex-row items-center gap-3 bg-primary/[20%] rounded-t-xl p-2 border-b border-border-subtle overflow-hidden", children: [
260
+ /* @__PURE__ */ e(pe, { className: "h-12 w-12 ring-2 ring-primary/20 flex-shrink-0", children: [
261
+ a.profile_pic && /* @__PURE__ */ e(fe, { src: a.profile_pic, alt: `${a.name} profile photo`, crossOrigin: "anonymous" }),
262
+ /* @__PURE__ */ e(ue, { className: "bg-secondary text-primary", children: xe(a.name) })
263
263
  ] }),
264
264
  /* @__PURE__ */ e("div", { className: "min-w-0", children: [
265
265
  /* @__PURE__ */ e("h3", { className: "font-bold text-slate-900 leading-tight", style: { fontSize: "0.95rem" }, children: [
@@ -272,7 +272,7 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
272
272
  rel: "noreferrer",
273
273
  "aria-label": "View profile",
274
274
  className: "inline-block align-middle ml-2 text-primary hover:text-primary/70 transition-colors",
275
- children: /* @__PURE__ */ e(je, { className: "h-3.5 w-3.5 inline", "aria-hidden": !0 })
275
+ children: /* @__PURE__ */ e(Le, { className: "h-3.5 w-3.5 inline", "aria-hidden": !0 })
276
276
  }
277
277
  )
278
278
  ] }),
@@ -283,7 +283,7 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
283
283
  title: `${a.specialty}${a.experience ? ` • ${a.experience}` : ""}`,
284
284
  children: [
285
285
  a.specialty,
286
- a.experience && /* @__PURE__ */ e(Y, { children: [
286
+ a.experience && /* @__PURE__ */ e(Z, { children: [
287
287
  " • ",
288
288
  a.experience
289
289
  ] })
@@ -292,33 +292,33 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
292
292
  )
293
293
  ] })
294
294
  ] }),
295
- /* @__PURE__ */ e(xe, { className: "px-3 py-2", children: [
295
+ /* @__PURE__ */ e(ge, { className: "px-3 py-2", children: [
296
296
  /* @__PURE__ */ e("div", { className: "grid gap-1 pb-2 border-b border-border-subtle", children: [
297
297
  a.timings && /* @__PURE__ */ e("div", { className: "flex items-start gap-2 min-w-0", children: [
298
- /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5 text-primary mt-0.5 flex-shrink-0", "aria-hidden": !0 }),
298
+ /* @__PURE__ */ e(Be, { className: "h-3.5 w-3.5 text-primary mt-0.5 flex-shrink-0", "aria-hidden": !0 }),
299
299
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: a.timings })
300
300
  ] }),
301
301
  a.languages && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 min-w-0", children: [
302
- /* @__PURE__ */ e(Ie, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
302
+ /* @__PURE__ */ e(ze, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
303
303
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: a.languages })
304
304
  ] }),
305
305
  a.hospitals?.length > 1 && c ? /* @__PURE__ */ e(
306
- Oe,
306
+ Ve,
307
307
  {
308
308
  options: a.hospitals.map((t) => ({ value: t.hospital_id, label: t.name || "" })),
309
309
  placeholder: "Select Hospital",
310
310
  disabled: p,
311
- onValueChange: re,
311
+ onValueChange: ne,
312
312
  value: c,
313
313
  triggerClassName: "h-8 text-xs px-3 rounded-lg border-border text-primary font-medium",
314
- icon: /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 })
314
+ icon: /* @__PURE__ */ e(D, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 })
315
315
  }
316
316
  ) : /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5 min-w-0", children: [
317
- /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
317
+ /* @__PURE__ */ e(D, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
318
318
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: a.hospitals?.[0]?.name || "" })
319
319
  ] }),
320
320
  a.info && /* @__PURE__ */ e("div", { className: "flex items-start gap-2 min-w-0", children: [
321
- /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
321
+ /* @__PURE__ */ e(ye, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
322
322
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: [
323
323
  /* @__PURE__ */ e(
324
324
  "div",
@@ -327,18 +327,18 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
327
327
  "text-text-secondary text-xs leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words overflow-hidden",
328
328
  !P && "line-clamp-1"
329
329
  ),
330
- children: /* @__PURE__ */ e(ye, { children: a.info })
330
+ children: /* @__PURE__ */ e(be, { children: a.info })
331
331
  }
332
332
  ),
333
333
  /* @__PURE__ */ e(
334
334
  "button",
335
335
  {
336
336
  type: "button",
337
- onClick: () => te((t) => !t),
337
+ onClick: () => ae((t) => !t),
338
338
  "aria-expanded": P,
339
339
  className: "mt-0.5 flex items-center gap-1 text-[11px] font-semibold text-primary hover:text-primary/80 transition-colors",
340
340
  children: [
341
- /* @__PURE__ */ e(Ae, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
341
+ /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
342
342
  P ? "View less" : "View more"
343
343
  ]
344
344
  }
@@ -346,10 +346,10 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
346
346
  ] })
347
347
  ] })
348
348
  ] }),
349
- L ? M ? /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "Loading..." }) : n.length > 0 ? /* @__PURE__ */ e("div", { className: "pt-3", children: [
349
+ L ? B ? /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "Loading..." }) : n.length > 0 ? /* @__PURE__ */ e("div", { className: "pt-3", children: [
350
350
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
351
351
  /* @__PURE__ */ e(
352
- v,
352
+ w,
353
353
  {
354
354
  type: "button",
355
355
  variant: "outline",
@@ -360,26 +360,26 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
360
360
  const r = n[t]?.date;
361
361
  r && O(r);
362
362
  },
363
- disabled: p || !le,
363
+ disabled: p || !oe,
364
364
  "aria-label": "Previous 3 days",
365
365
  className: "h-8 w-8 flex-shrink-0 rounded-md border-primary/20 bg-surface text-primary hover:bg-surface-secondary disabled:opacity-50",
366
- children: /* @__PURE__ */ e(ke, { className: "h-4 w-4" })
366
+ children: /* @__PURE__ */ e(Ne, { className: "h-4 w-4" })
367
367
  }
368
368
  ),
369
- /* @__PURE__ */ e("div", { className: "flex-1 grid grid-cols-3 gap-1 min-w-0", children: se.map((t, r) => {
369
+ /* @__PURE__ */ e("div", { className: "flex-1 grid grid-cols-3 gap-1 min-w-0", children: le.map((t, r) => {
370
370
  if (!t || !t.date) return null;
371
- const s = l === t.date, T = (t?.slots || []).length > 0;
371
+ const i = l === t.date, T = (t?.slots || []).length > 0;
372
372
  return /* @__PURE__ */ e(
373
- v,
373
+ w,
374
374
  {
375
375
  type: "button",
376
376
  variant: "outline",
377
377
  onClick: () => t.date && O(t.date),
378
378
  disabled: p,
379
- "aria-current": s ? "date" : void 0,
379
+ "aria-current": i ? "date" : void 0,
380
380
  className: f(
381
381
  "flex flex-col items-center justify-center h-12 rounded-lg border-2 p-2 gap-0.5 min-w-0 transition-all",
382
- s ? "border-primary border-2 ring-2 ring-primary/20 bg-primary/[20%] shadow-sm hover:text-accent-foreground" : T ? "border-primary/30 bg-elicitationBg hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/40" : "border-border bg-elicitationBg opacity-60 hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/30"
382
+ i ? "border-primary border-2 ring-2 ring-primary/20 bg-primary/[20%] shadow-sm hover:text-accent-foreground" : T ? "border-primary/30 bg-elicitationBg hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/40" : "border-border bg-elicitationBg opacity-60 hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/30"
383
383
  ),
384
384
  children: [
385
385
  /* @__PURE__ */ e("span", { className: f("text-[10px] tracking-wide w-full text-center font-medium"), children: t.weekday }),
@@ -390,17 +390,17 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
390
390
  );
391
391
  }) }),
392
392
  /* @__PURE__ */ e(
393
- v,
393
+ w,
394
394
  {
395
395
  type: "button",
396
396
  variant: "outline",
397
397
  size: "icon",
398
398
  onClick: () => {
399
399
  if (x + 3 >= n.length) {
400
- const s = n[n.length - 1]?.date;
401
- if (s) {
402
- const T = be(s, 1);
403
- K(T), O(T);
400
+ const i = n[n.length - 1]?.date, T = v && (!i || v > i) ? v : i;
401
+ if (T) {
402
+ const Y = ve(T, 1);
403
+ K(Y), O(Y);
404
404
  }
405
405
  return;
406
406
  }
@@ -412,7 +412,7 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
412
412
  disabled: p,
413
413
  "aria-label": "Next 3 days",
414
414
  className: "h-8 w-8 flex-shrink-0 rounded-md border-primary/20 bg-surface text-primary hover:bg-surface-secondary disabled:opacity-50",
415
- children: /* @__PURE__ */ e(Ne, { className: "h-4 w-4" })
415
+ children: /* @__PURE__ */ e(Ce, { className: "h-4 w-4" })
416
416
  }
417
417
  )
418
418
  ] }),
@@ -421,23 +421,23 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
421
421
  "div",
422
422
  {
423
423
  ref: z,
424
- onScroll: ne,
424
+ onScroll: ie,
425
425
  className: "grid grid-cols-3 gap-2 overflow-y-auto overscroll-contain",
426
426
  style: { maxHeight: "108px" },
427
427
  children: E.map((t, r) => {
428
428
  if (!t) return null;
429
- const s = d === t;
429
+ const i = d === t;
430
430
  return /* @__PURE__ */ e(
431
- v,
431
+ w,
432
432
  {
433
433
  type: "button",
434
434
  variant: "outline",
435
- onClick: () => C(t),
436
- "aria-pressed": s,
435
+ onClick: () => _(t),
436
+ "aria-pressed": i,
437
437
  disabled: p,
438
438
  className: f(
439
439
  "h-9 rounded-lg px-2 text-xs font-medium transition-all",
440
- s ? "border-primary bg-primary/20 text-primary shadow-sm hover:bg-primary/10" : "border-border bg-elicitationBg text-text-primary hover:bg-primary/10 hover:border-primary/30"
440
+ i ? "border-primary bg-primary/20 text-primary shadow-sm hover:bg-primary/10" : "border-border bg-elicitationBg text-text-primary hover:bg-primary/10 hover:border-primary/30"
441
441
  ),
442
442
  children: /* @__PURE__ */ e("span", { children: t })
443
443
  },
@@ -450,7 +450,7 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
450
450
  "button",
451
451
  {
452
452
  type: "button",
453
- onClick: ie,
453
+ onClick: se,
454
454
  className: "pointer-events-auto flex items-center gap-1 text-xs font-semibold text-primary hover:text-primary/80 transition-colors",
455
455
  children: [
456
456
  /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
@@ -458,22 +458,22 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
458
458
  ]
459
459
  }
460
460
  ) })
461
- ] }) : F ? /* @__PURE__ */ e("p", { className: "text-sm text-text-secondary px-1", children: "Fetching slots..." }) : /* @__PURE__ */ e(ee, { date: B }) }),
461
+ ] }) : F ? /* @__PURE__ */ e("p", { className: "text-sm text-text-secondary px-1", children: "Fetching slots..." }) : /* @__PURE__ */ e(te, { date: v }) }),
462
462
  E?.length ? /* @__PURE__ */ e(
463
- v,
463
+ w,
464
464
  {
465
465
  type: "button",
466
- onClick: oe,
466
+ onClick: ce,
467
467
  disabled: g || p || !d,
468
468
  "aria-disabled": g || p || !d,
469
469
  className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${I ? "" : " mt-2"}`,
470
470
  children: [
471
471
  y?.title || "Book appointment",
472
- /* @__PURE__ */ e(D, { className: "h-4 w-4", "aria-hidden": !0 })
472
+ /* @__PURE__ */ e(ee, { className: "h-4 w-4", "aria-hidden": !0 })
473
473
  ]
474
474
  }
475
475
  ) : /* @__PURE__ */ e(
476
- v,
476
+ w,
477
477
  {
478
478
  type: "button",
479
479
  onClick: W,
@@ -482,14 +482,14 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
482
482
  className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${I ? "" : " mt-2"}`,
483
483
  children: [
484
484
  y?.title || "Book appointment",
485
- /* @__PURE__ */ e(D, { className: "h-4 w-4", "aria-hidden": !0 })
485
+ /* @__PURE__ */ e(ee, { className: "h-4 w-4", "aria-hidden": !0 })
486
486
  ]
487
487
  }
488
488
  )
489
- ] }) : /* @__PURE__ */ e(Y, { children: [
490
- /* @__PURE__ */ e(ee, { date: B }),
489
+ ] }) : /* @__PURE__ */ e(Z, { children: [
490
+ /* @__PURE__ */ e(te, { date: v }),
491
491
  /* @__PURE__ */ e(
492
- v,
492
+ w,
493
493
  {
494
494
  type: "button",
495
495
  onClick: W,
@@ -498,20 +498,20 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
498
498
  className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${I ? "" : " mt-2"}`,
499
499
  children: [
500
500
  y?.title || "Book appointment",
501
- /* @__PURE__ */ e(Ee, { className: "h-4 w-4", "aria-hidden": !0 })
501
+ /* @__PURE__ */ e(Oe, { className: "h-4 w-4", "aria-hidden": !0 })
502
502
  ]
503
503
  }
504
504
  )
505
505
  ] }) : /* @__PURE__ */ e("div", { className: "pt-3", children: /* @__PURE__ */ e(
506
- v,
506
+ w,
507
507
  {
508
508
  type: "button",
509
509
  variant: "outline",
510
- onClick: ae,
511
- disabled: p || M,
510
+ onClick: re,
511
+ disabled: p || B,
512
512
  className: "w-full h-8 gap-1.5 text-xs border-primary/40 text-primary hover:bg-primary/10 disabled:opacity-60 font-medium rounded-lg",
513
513
  children: [
514
- M ? "Loading..." : "Show available slots",
514
+ B ? "Loading..." : "Show available slots",
515
515
  /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
516
516
  ]
517
517
  }
@@ -520,5 +520,5 @@ function Fe({ doctor: i, doctorDetails: a, onSelect: h, disabled: p, isActive: H
520
520
  ] }) : null;
521
521
  }
522
522
  export {
523
- Fe as DoctorCard
523
+ Pe as DoctorCard
524
524
  };
@@ -12182,7 +12182,7 @@ const sm = $e(
12182
12182
  ), am = $e(
12183
12183
  () => import("./medassist-widget-FocusCarousel-BsLIZftX.js").then((e) => ({ default: e.FocusCarousel }))
12184
12184
  ), lm = $e(
12185
- () => import("./medassist-widget-DoctorCard-DPTTWCx3.js").then((e) => ({ default: e.DoctorCard }))
12185
+ () => import("./medassist-widget-DoctorCard-mWAGl3MK.js").then((e) => ({ default: e.DoctorCard }))
12186
12186
  ), cm = $e(
12187
12187
  () => import("./medassist-widget-CardList-ERXsOZEA.js").then((e) => ({ default: e.CardList }))
12188
12188
  ), dm = $e(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eka-care/medassist-widget",
3
3
  "description": "MedAssist Widget react application",
4
- "version": "0.1.103-dev.0",
4
+ "version": "0.1.103-dev.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"