@alfadocs/ui-kit-debug 1.94.0 → 1.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-IMohuz0D.js → anamnesis-summary-rows-DTZ3per6.js} +2 -2
  2. package/dist/_chunks/{anamnesis-summary-rows-IMohuz0D.js.map → anamnesis-summary-rows-DTZ3per6.js.map} +1 -1
  3. package/dist/_chunks/{calendar-appointment-editor-dialog-CsVWoRcP.js → calendar-appointment-editor-dialog-WDKc3jMA.js} +3 -3
  4. package/dist/_chunks/{calendar-appointment-editor-dialog-CsVWoRcP.js.map → calendar-appointment-editor-dialog-WDKc3jMA.js.map} +1 -1
  5. package/dist/_chunks/chart-pMkQN-qy.js +1550 -0
  6. package/dist/_chunks/chart-pMkQN-qy.js.map +1 -0
  7. package/dist/_chunks/{date-time-picker-n-yrlMJq.js → date-time-picker-cwsWiB4q.js} +2 -2
  8. package/dist/_chunks/{date-time-picker-n-yrlMJq.js.map → date-time-picker-cwsWiB4q.js.map} +1 -1
  9. package/dist/_chunks/{hcg-doubling-K41Wy7LB.js → hcg-doubling-DQe1ptNB.js} +2 -2
  10. package/dist/_chunks/{hcg-doubling-K41Wy7LB.js.map → hcg-doubling-DQe1ptNB.js.map} +1 -1
  11. package/dist/_chunks/{reserved.agent-XU88crNW.js → reserved.agent-BvwjDyne.js} +2 -2
  12. package/dist/_chunks/{reserved.agent-XU88crNW.js.map → reserved.agent-BvwjDyne.js.map} +1 -1
  13. package/dist/_chunks/{slot-grid-B-IAFX3C.js → slot-grid-BhjaLJ0o.js} +229 -214
  14. package/dist/_chunks/{slot-grid-B-IAFX3C.js.map → slot-grid-BhjaLJ0o.js.map} +1 -1
  15. package/dist/_chunks/{task-editor-BZeSBxwU.js → task-editor-Cv7xSakv.js} +2 -2
  16. package/dist/_chunks/{task-editor-BZeSBxwU.js.map → task-editor-Cv7xSakv.js.map} +1 -1
  17. package/dist/_chunks/time-picker-DSt-ns5F.js +914 -0
  18. package/dist/_chunks/time-picker-DSt-ns5F.js.map +1 -0
  19. package/dist/agent-catalog.json +12 -4
  20. package/dist/agent-i18n/en.json +2 -2
  21. package/dist/apexcharts.css +4 -1
  22. package/dist/components/booking/index.js +1 -1
  23. package/dist/components/chart/chart-axis-scale.d.ts +21 -0
  24. package/dist/components/chart/chart-axis-scale.d.ts.map +1 -0
  25. package/dist/components/chart/chart.agent.d.ts.map +1 -1
  26. package/dist/components/chart/chart.d.ts +55 -0
  27. package/dist/components/chart/chart.d.ts.map +1 -1
  28. package/dist/components/chart/index.d.ts +1 -1
  29. package/dist/components/chart/index.d.ts.map +1 -1
  30. package/dist/components/chart/index.js +1 -1
  31. package/dist/components/date-time-picker/index.js +1 -1
  32. package/dist/components/hcg-doubling/index.js +1 -1
  33. package/dist/components/slot-grid/index.js +1 -1
  34. package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
  35. package/dist/components/task-editor/index.js +1 -1
  36. package/dist/components/time-picker/index.js +1 -1
  37. package/dist/components/time-picker/time-picker.d.ts +15 -8
  38. package/dist/components/time-picker/time-picker.d.ts.map +1 -1
  39. package/dist/i18n/locales/ar.d.ts +4 -1
  40. package/dist/i18n/locales/ar.d.ts.map +1 -1
  41. package/dist/i18n/locales/ar.js +6 -3
  42. package/dist/i18n/locales/ar.js.map +1 -1
  43. package/dist/i18n/locales/de.d.ts +5 -2
  44. package/dist/i18n/locales/de.d.ts.map +1 -1
  45. package/dist/i18n/locales/de.js +7 -4
  46. package/dist/i18n/locales/de.js.map +1 -1
  47. package/dist/i18n/locales/el.d.ts +5 -2
  48. package/dist/i18n/locales/el.d.ts.map +1 -1
  49. package/dist/i18n/locales/el.js +7 -4
  50. package/dist/i18n/locales/el.js.map +1 -1
  51. package/dist/i18n/locales/en.d.ts +5 -2
  52. package/dist/i18n/locales/en.d.ts.map +1 -1
  53. package/dist/i18n/locales/en.js +6 -3
  54. package/dist/i18n/locales/en.js.map +1 -1
  55. package/dist/i18n/locales/es.d.ts +5 -2
  56. package/dist/i18n/locales/es.d.ts.map +1 -1
  57. package/dist/i18n/locales/es.js +7 -4
  58. package/dist/i18n/locales/es.js.map +1 -1
  59. package/dist/i18n/locales/fr.d.ts +4 -1
  60. package/dist/i18n/locales/fr.d.ts.map +1 -1
  61. package/dist/i18n/locales/fr.js +6 -3
  62. package/dist/i18n/locales/fr.js.map +1 -1
  63. package/dist/i18n/locales/hi.d.ts +5 -2
  64. package/dist/i18n/locales/hi.d.ts.map +1 -1
  65. package/dist/i18n/locales/hi.js +7 -4
  66. package/dist/i18n/locales/hi.js.map +1 -1
  67. package/dist/i18n/locales/it.d.ts +5 -2
  68. package/dist/i18n/locales/it.d.ts.map +1 -1
  69. package/dist/i18n/locales/it.js +7 -4
  70. package/dist/i18n/locales/it.js.map +1 -1
  71. package/dist/i18n/locales/ja.d.ts +5 -2
  72. package/dist/i18n/locales/ja.d.ts.map +1 -1
  73. package/dist/i18n/locales/ja.js +7 -4
  74. package/dist/i18n/locales/ja.js.map +1 -1
  75. package/dist/i18n/locales/nl.d.ts +5 -2
  76. package/dist/i18n/locales/nl.d.ts.map +1 -1
  77. package/dist/i18n/locales/nl.js +7 -4
  78. package/dist/i18n/locales/nl.js.map +1 -1
  79. package/dist/i18n/locales/pl.d.ts +5 -2
  80. package/dist/i18n/locales/pl.d.ts.map +1 -1
  81. package/dist/i18n/locales/pl.js +7 -4
  82. package/dist/i18n/locales/pl.js.map +1 -1
  83. package/dist/i18n/locales/pt.d.ts +4 -1
  84. package/dist/i18n/locales/pt.d.ts.map +1 -1
  85. package/dist/i18n/locales/pt.js +6 -3
  86. package/dist/i18n/locales/pt.js.map +1 -1
  87. package/dist/i18n/locales/ro.d.ts +5 -2
  88. package/dist/i18n/locales/ro.d.ts.map +1 -1
  89. package/dist/i18n/locales/ro.js +7 -4
  90. package/dist/i18n/locales/ro.js.map +1 -1
  91. package/dist/i18n/locales/ru.d.ts +5 -2
  92. package/dist/i18n/locales/ru.d.ts.map +1 -1
  93. package/dist/i18n/locales/ru.js +7 -4
  94. package/dist/i18n/locales/ru.js.map +1 -1
  95. package/dist/i18n/locales/sq.d.ts +5 -2
  96. package/dist/i18n/locales/sq.d.ts.map +1 -1
  97. package/dist/i18n/locales/sq.js +7 -4
  98. package/dist/i18n/locales/sq.js.map +1 -1
  99. package/dist/i18n/locales/sv.d.ts +5 -2
  100. package/dist/i18n/locales/sv.d.ts.map +1 -1
  101. package/dist/i18n/locales/sv.js +7 -4
  102. package/dist/i18n/locales/sv.js.map +1 -1
  103. package/dist/i18n/locales/tr.d.ts +5 -2
  104. package/dist/i18n/locales/tr.d.ts.map +1 -1
  105. package/dist/i18n/locales/tr.js +7 -4
  106. package/dist/i18n/locales/tr.js.map +1 -1
  107. package/dist/i18n/locales/zh.d.ts +5 -2
  108. package/dist/i18n/locales/zh.d.ts.map +1 -1
  109. package/dist/i18n/locales/zh.js +7 -4
  110. package/dist/i18n/locales/zh.js.map +1 -1
  111. package/dist/index.js +9 -9
  112. package/dist/locales/ar.json +6 -3
  113. package/dist/locales/de.json +7 -4
  114. package/dist/locales/el.json +7 -4
  115. package/dist/locales/en.json +6 -3
  116. package/dist/locales/es.json +7 -4
  117. package/dist/locales/fr.json +6 -3
  118. package/dist/locales/hi.json +7 -4
  119. package/dist/locales/it.json +7 -4
  120. package/dist/locales/ja.json +7 -4
  121. package/dist/locales/nl.json +7 -4
  122. package/dist/locales/pl.json +7 -4
  123. package/dist/locales/pt.json +6 -3
  124. package/dist/locales/ro.json +7 -4
  125. package/dist/locales/ru.json +7 -4
  126. package/dist/locales/sq.json +7 -4
  127. package/dist/locales/sv.json +7 -4
  128. package/dist/locales/tr.json +7 -4
  129. package/dist/locales/zh.json +7 -4
  130. package/dist/patterns/anamnesis/index.js +1 -1
  131. package/dist/patterns/calendar/index.js +1 -1
  132. package/dist/tokens.css +3 -0
  133. package/package.json +1 -1
  134. package/dist/_chunks/chart-D4huJSru.js +0 -1340
  135. package/dist/_chunks/chart-D4huJSru.js.map +0 -1
  136. package/dist/_chunks/time-picker-DVfyAR81.js +0 -871
  137. package/dist/_chunks/time-picker-DVfyAR81.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { jsx as r, jsxs as v, Fragment as he } from "react/jsx-runtime";
2
- import { forwardRef as ye, useId as ge, useState as ve, useCallback as M, useRef as be, useEffect as we, useMemo as xe } from "react";
1
+ import { jsx as r, jsxs as v, Fragment as ye } from "react/jsx-runtime";
2
+ import { forwardRef as ge, useId as ve, useState as be, useCallback as M, useRef as we, useEffect as xe, useMemo as Se } from "react";
3
3
  import { c as g } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Se } from "react-i18next";
5
- import { B as q } from "./button-DohK_Ak_.js";
6
- import { I as W } from "./icon-button-S8_weU3g.js";
7
- import { E as ke } from "./empty-state-DwJ5YNzz.js";
8
- import { S as X } from "./skeleton-tTWJpvAq.js";
9
- import { u as De } from "./registry-DvAUVLHh.js";
10
- import { d as Ie, f as Ge } from "./format--x5jypvH.js";
11
- import { p as Ne } from "./parseISO-DZZ5a-zK.js";
12
- const Ke = {
4
+ import { useTranslation as ke } from "react-i18next";
5
+ import { B as W } from "./button-DohK_Ak_.js";
6
+ import { I as X } from "./icon-button-S8_weU3g.js";
7
+ import { E as De } from "./empty-state-DwJ5YNzz.js";
8
+ import { S as J } from "./skeleton-tTWJpvAq.js";
9
+ import { u as Ie } from "./registry-DvAUVLHh.js";
10
+ import { d as Ge, f as Ne } from "./format--x5jypvH.js";
11
+ import { p as Ke } from "./parseISO-DZZ5a-zK.js";
12
+ const Me = {
13
13
  id: "slot-grid",
14
14
  // pick → `select_slot` + the `selectedSlotId` state slot.
15
15
  // range_navigate → `next_days` / `previous_days` + `hasNext` / `hasPrevious`.
@@ -185,7 +185,7 @@ const Ke = {
185
185
  description: "Per-slot button identifier sourced from each `SlotGridSlot.id` — an availability id, never a patient id. DOM-driving agents activate a slot via native click on the matching button."
186
186
  }
187
187
  }
188
- }, Me = g(
188
+ }, ze = g(
189
189
  [
190
190
  "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
191
191
  "ds:text-[var(--foreground)]",
@@ -201,9 +201,9 @@ const Ke = {
201
201
  },
202
202
  defaultVariants: { size: "md" }
203
203
  }
204
- ), ze = g(
204
+ ), Ce = g(
205
205
  "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full"
206
- ), Ce = 12, Re = g(
206
+ ), Re = 12, Le = g(
207
207
  "ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start",
208
208
  {
209
209
  variants: {
@@ -225,10 +225,10 @@ const Ke = {
225
225
  defaultVariants: { cols: 1 }
226
226
  }
227
227
  );
228
- function Le(e) {
229
- return Math.max(1, Math.min(e, Ce));
228
+ function Ee(e) {
229
+ return Math.max(1, Math.min(e, Re));
230
230
  }
231
- const J = g(
231
+ const Q = g(
232
232
  [
233
233
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
234
234
  "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
@@ -254,9 +254,9 @@ const J = g(
254
254
  },
255
255
  defaultVariants: { size: "md" }
256
256
  }
257
- ), Q = g(
257
+ ), U = g(
258
258
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none"
259
- ), Ee = g(
259
+ ), Ve = g(
260
260
  [
261
261
  "ds:inline-flex ds:items-center ds:justify-center",
262
262
  "ds:w-full",
@@ -290,30 +290,30 @@ const J = g(
290
290
  }
291
291
  );
292
292
  function h(e) {
293
- return e instanceof Date ? e : Ne(e);
293
+ return e instanceof Date ? e : Ke(e);
294
294
  }
295
295
  function z(e, a) {
296
296
  return `${h(e.date).toISOString()}-${a}`;
297
297
  }
298
298
  function k(e) {
299
- return Ge(h(e.date), "yyyy-MM-dd");
299
+ return Ne(h(e.date), "yyyy-MM-dd");
300
300
  }
301
- function Ye(e, a) {
302
- return Ie(h(e), h(a));
301
+ function Ze(e, a) {
302
+ return Ge(h(e), h(a));
303
303
  }
304
- function Ze(e) {
304
+ function et(e) {
305
305
  for (const a of e) {
306
- const o = a.slots.find((i) => i.available !== !1);
307
- if (o) return { day: a, slot: o };
306
+ const d = a.slots.find((i) => i.available !== !1);
307
+ if (d) return { day: a, slot: d };
308
308
  }
309
309
  }
310
- function U(e, a, o) {
310
+ function Y(e, a, d) {
311
311
  try {
312
312
  return new Intl.DateTimeFormat(a, {
313
313
  weekday: "short",
314
314
  month: "short",
315
315
  day: "numeric",
316
- timeZone: o
316
+ timeZone: d
317
317
  }).format(e);
318
318
  } catch {
319
319
  return new Intl.DateTimeFormat("en", {
@@ -323,14 +323,14 @@ function U(e, a, o) {
323
323
  }).format(e);
324
324
  }
325
325
  }
326
- function Y(e, a, o) {
326
+ function Z(e, a, d) {
327
327
  if (e.label !== void 0) return e.label;
328
328
  const i = h(e.start);
329
329
  try {
330
330
  const c = new Intl.DateTimeFormat(a, {
331
331
  hour: "numeric",
332
332
  minute: "2-digit",
333
- timeZone: o
333
+ timeZone: d
334
334
  });
335
335
  if (e.end) {
336
336
  const y = h(e.end);
@@ -346,12 +346,12 @@ function Y(e, a, o) {
346
346
  return i.toISOString();
347
347
  }
348
348
  }
349
- function Ve(e, a, o, i, c) {
349
+ function je(e, a, d, i, c) {
350
350
  if (e.ariaLabel !== void 0) return e.ariaLabel;
351
- const y = Y(e, o, i), D = a.label !== void 0 ? a.label : U(h(a.date), o, i);
351
+ const y = Z(e, d, i), D = a.label !== void 0 ? a.label : Y(h(a.date), d, i);
352
352
  return c({ time: y, day: D });
353
353
  }
354
- function je() {
354
+ function Te() {
355
355
  return /* @__PURE__ */ r(
356
356
  "svg",
357
357
  {
@@ -367,7 +367,7 @@ function je() {
367
367
  }
368
368
  );
369
369
  }
370
- function Te() {
370
+ function Pe() {
371
371
  return /* @__PURE__ */ r(
372
372
  "svg",
373
373
  {
@@ -383,11 +383,11 @@ function Te() {
383
383
  }
384
384
  );
385
385
  }
386
- const Pe = ye(
386
+ const _e = ge(
387
387
  ({
388
388
  days: e,
389
389
  state: a = "default",
390
- emptyDescription: o,
390
+ emptyDescription: d,
391
391
  size: i = "md",
392
392
  selectedSlotId: c,
393
393
  maxInitialSlotsPerDay: y = 6,
@@ -395,30 +395,30 @@ const Pe = ye(
395
395
  timeZone: I,
396
396
  hasPrevious: C = !1,
397
397
  hasNext: R = !1,
398
- showNextAvailable: Z = !1,
399
- ariaLabel: ee,
398
+ showNextAvailable: ee = !1,
399
+ ariaLabel: te,
400
400
  onSlotSelect: b,
401
401
  onPreviousDays: L,
402
- onNextDays: B,
402
+ onNextDays: E,
403
403
  onShowMore: w,
404
- onJumpToNextAvailable: te,
405
- className: se,
404
+ onJumpToNextAvailable: se,
405
+ className: ae,
406
406
  id: G,
407
- ...ae
408
- }, re) => {
409
- const { t: p, i18n: ie } = Se("ui"), N = D ?? ie.language ?? "en", ne = ge(), [E, oe] = ve({}), V = a === "loading", j = a === "disabled", m = V || j, de = a === "empty" || e.length === 0 || e.every((t) => t.slots.length === 0), le = ee ?? p("slotGrid.ariaLabel"), x = M(
410
- (t, s) => {
411
- m || t.available !== !1 && (b == null || b(t, s));
407
+ ...re
408
+ }, ie) => {
409
+ const { t: u, i18n: ne } = ke("ui"), N = D ?? ne.language ?? "en", oe = ve(), [B, de] = be({}), V = a === "loading", j = a === "disabled", p = V || j, le = a === "empty" || e.length === 0 || e.every((s) => s.slots.length === 0), ce = te ?? u("slotGrid.ariaLabel"), x = M(
410
+ (s, t) => {
411
+ p || s.available !== !1 && (b == null || b(s, t));
412
412
  },
413
- [m, b]
413
+ [p, b]
414
414
  ), T = M(
415
- (t, s) => {
416
- oe((n) => ({ ...n, [s]: !0 })), w == null || w(t);
415
+ (s, t) => {
416
+ de((n) => ({ ...n, [t]: !0 })), w == null || w(s);
417
417
  },
418
418
  [w]
419
- ), ce = M(
420
- (t, s, n) => {
421
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), x(s, n));
419
+ ), ue = M(
420
+ (s, t, n) => {
421
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), x(t, n));
422
422
  },
423
423
  [x]
424
424
  ), P = {
@@ -427,213 +427,228 @@ const Pe = ye(
427
427
  hasPrevious: C,
428
428
  hasNext: R,
429
429
  state: a,
430
- expanded: E,
431
- isInteractionSuppressed: m,
430
+ expanded: B,
431
+ isInteractionSuppressed: p,
432
432
  onPreviousDays: L,
433
- onNextDays: B,
433
+ onNextDays: E,
434
434
  handleSlotClick: x,
435
435
  handleShowMore: T
436
- }, d = be(P);
437
- we(() => {
438
- d.current = P;
436
+ }, l = we(P);
437
+ xe(() => {
438
+ l.current = P;
439
439
  });
440
- const ue = xe(
440
+ const me = Se(
441
441
  () => ({
442
- getStatus: () => d.current.state,
443
- getSelectedSlotId: () => d.current.selectedSlotId ?? null,
444
- getVisibleDays: () => d.current.days.map(k),
442
+ getStatus: () => l.current.state,
443
+ getSelectedSlotId: () => l.current.selectedSlotId ?? null,
444
+ getVisibleDays: () => l.current.days.map(k),
445
445
  getSlotsByDay: () => {
446
- const t = {};
447
- for (const s of d.current.days) {
448
- const n = k(s), l = s.slots.filter((u) => u.available !== !1).map((u) => u.id);
449
- t[n] = t[n] ? [...t[n], ...l] : l;
446
+ const s = {};
447
+ for (const t of l.current.days) {
448
+ const n = k(t), o = t.slots.filter((m) => m.available !== !1).map((m) => m.id);
449
+ s[n] = s[n] ? [...s[n], ...o] : o;
450
450
  }
451
- return t;
451
+ return s;
452
452
  },
453
- getExpandedDays: () => d.current.days.filter(
454
- (t, s) => d.current.expanded[z(t, s)] === !0
453
+ getExpandedDays: () => l.current.days.filter(
454
+ (s, t) => l.current.expanded[z(s, t)] === !0
455
455
  ).map(k),
456
- getHasPrevious: () => d.current.hasPrevious,
457
- getHasNext: () => d.current.hasNext,
458
- selectSlot: (t) => {
459
- const s = d.current;
460
- if (s.isInteractionSuppressed) return !1;
461
- for (const n of s.days) {
462
- const l = n.slots.find((u) => u.id === t);
463
- if (l)
464
- return l.available === !1 ? !1 : (s.handleSlotClick(l, n), !0);
456
+ getHasPrevious: () => l.current.hasPrevious,
457
+ getHasNext: () => l.current.hasNext,
458
+ selectSlot: (s) => {
459
+ const t = l.current;
460
+ if (t.isInteractionSuppressed) return !1;
461
+ for (const n of t.days) {
462
+ const o = n.slots.find((m) => m.id === s);
463
+ if (o)
464
+ return o.available === !1 ? !1 : (t.handleSlotClick(o, n), !0);
465
465
  }
466
466
  return !1;
467
467
  },
468
468
  nextDays: () => {
469
- const t = d.current;
470
- return !t.hasNext || t.isInteractionSuppressed || !t.onNextDays ? !1 : (t.onNextDays(), !0);
469
+ const s = l.current;
470
+ return !s.hasNext || s.isInteractionSuppressed || !s.onNextDays ? !1 : (s.onNextDays(), !0);
471
471
  },
472
472
  previousDays: () => {
473
- const t = d.current;
474
- return !t.hasPrevious || t.isInteractionSuppressed || !t.onPreviousDays ? !1 : (t.onPreviousDays(), !0);
473
+ const s = l.current;
474
+ return !s.hasPrevious || s.isInteractionSuppressed || !s.onPreviousDays ? !1 : (s.onPreviousDays(), !0);
475
475
  },
476
- showMoreDay: (t) => {
477
- const s = d.current;
478
- if (s.isInteractionSuppressed) return !1;
479
- const n = s.days.findIndex(
480
- (u) => k(u) === t
476
+ showMoreDay: (s) => {
477
+ const t = l.current;
478
+ if (t.isInteractionSuppressed) return !1;
479
+ const n = t.days.findIndex(
480
+ (m) => k(m) === s
481
481
  );
482
482
  if (n < 0) return !1;
483
- const l = s.days[n];
484
- return s.handleShowMore(l, z(l, n)), !0;
483
+ const o = t.days[n];
484
+ return t.handleShowMore(o, z(o, n)), !0;
485
485
  }
486
486
  }),
487
487
  []
488
488
  );
489
- De(Ke, ue, G);
490
- const _ = Le(e.length || 1), A = Re({ cols: _ });
489
+ Ie(Me, me, G);
490
+ const _ = Ee(e.length || 1), A = Le({ cols: _ });
491
491
  let S;
492
- return V ? S = /* @__PURE__ */ r(
493
- "div",
494
- {
495
- className: A,
496
- "data-state": "loading",
497
- role: "status",
498
- "aria-live": "polite",
499
- "aria-label": p("common.loading"),
500
- children: Array.from({ length: _ }, (t, s) => /* @__PURE__ */ v("div", { className: J(), children: [
501
- /* @__PURE__ */ r(X, { variant: "text", size: i, width: "60%" }),
502
- /* @__PURE__ */ r("div", { className: Q(), children: Array.from(
503
- { length: Math.min(y, 4) },
504
- (n, l) => /* @__PURE__ */ r(
505
- X,
506
- {
507
- variant: "rounded",
508
- size: i,
509
- height: "40px"
510
- },
511
- `loading-slot-${s}-${l}`
512
- )
513
- ) })
514
- ] }, `loading-col-${s}`))
515
- }
516
- ) : de ? S = /* @__PURE__ */ r("div", { "data-state": "empty", children: /* @__PURE__ */ r(
517
- ke,
518
- {
519
- variant: "no-results",
520
- title: p("slotGrid.noSlots"),
521
- description: o
522
- }
523
- ) }) : S = /* @__PURE__ */ r(
524
- "div",
525
- {
526
- className: A,
527
- "data-state": j ? "disabled" : "default",
528
- children: e.map((t, s) => {
529
- const n = z(t, s), l = t.label ?? U(h(t.date), N, I), u = `${ne}-day-${s}-header`, $ = E[n] ?? !1 ? t.slots : t.slots.slice(0, y), H = t.slots.length - $.length, O = t.slots.length === 0;
530
- return (
531
- // Use a plain <div role="group"> rather than <section> — a
532
- // <section> with aria-labelledby is a landmark, and nesting many
533
- // landmarks inside the outer slot-grid landmark fails axe's
534
- // landmark-unique rule.
535
- /* @__PURE__ */ v(
536
- "div",
537
- {
538
- role: "group",
539
- className: J(),
540
- "aria-labelledby": u,
541
- "data-empty": O || void 0,
542
- children: [
543
- /* @__PURE__ */ r("h3", { id: u, className: Be({ size: i }), children: l }),
544
- O ? /* @__PURE__ */ v(he, { children: [
545
- /* @__PURE__ */ r("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: p("slotGrid.noSlots") }),
546
- o ? /* @__PURE__ */ r("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: o }) : null
547
- ] }) : null,
548
- /* @__PURE__ */ r("ul", { className: Q(), children: $.map((f) => {
549
- const pe = Ve(
550
- f,
551
- t,
552
- N,
553
- I,
554
- ({ time: K, day: fe }) => p("slotGrid.slotLabel", { time: K, day: fe })
555
- ), me = c === f.id, F = f.available === !1 || m;
556
- return /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
557
- "button",
558
- {
559
- type: "button",
560
- className: Ee({ size: i }),
561
- "aria-label": pe,
562
- "aria-pressed": me,
563
- disabled: F,
564
- "aria-disabled": F || void 0,
565
- "data-slot-id": f.id,
566
- onClick: () => x(f, t),
567
- onKeyDown: (K) => ce(K, f, t),
568
- children: Y(f, N, I)
569
- }
570
- ) }, f.id);
571
- }) }),
572
- H > 0 ? /* @__PURE__ */ r(
573
- q,
574
- {
575
- intent: "ghost",
576
- size: i === "lg" ? "md" : "sm",
577
- onClick: () => T(t, n),
578
- disabled: m,
579
- children: p("slotGrid.showMore", { count: H })
580
- }
581
- ) : null
582
- ]
583
- },
584
- n
585
- )
586
- );
587
- })
588
- }
589
- ), /* @__PURE__ */ v(
492
+ if (V)
493
+ S = /* @__PURE__ */ r(
494
+ "div",
495
+ {
496
+ className: A,
497
+ "data-state": "loading",
498
+ role: "status",
499
+ "aria-live": "polite",
500
+ "aria-label": u("common.loading"),
501
+ children: Array.from({ length: _ }, (s, t) => /* @__PURE__ */ v("div", { className: Q(), children: [
502
+ /* @__PURE__ */ r(J, { variant: "text", size: i, width: "60%" }),
503
+ /* @__PURE__ */ r("div", { className: U(), children: Array.from(
504
+ { length: Math.min(y, 4) },
505
+ (n, o) => /* @__PURE__ */ r(
506
+ J,
507
+ {
508
+ variant: "rounded",
509
+ size: i,
510
+ height: "40px"
511
+ },
512
+ `loading-slot-${t}-${o}`
513
+ )
514
+ ) })
515
+ ] }, `loading-col-${t}`))
516
+ }
517
+ );
518
+ else if (le)
519
+ S = /* @__PURE__ */ r("div", { "data-state": "empty", children: /* @__PURE__ */ r(
520
+ De,
521
+ {
522
+ variant: "no-results",
523
+ title: u("slotGrid.noSlots"),
524
+ description: d
525
+ }
526
+ ) });
527
+ else {
528
+ const s = e.some((t) => t.slots.length === 0);
529
+ S = /* @__PURE__ */ v(ye, { children: [
530
+ /* @__PURE__ */ r(
531
+ "div",
532
+ {
533
+ className: A,
534
+ "data-state": j ? "disabled" : "default",
535
+ children: e.map((t, n) => {
536
+ const o = z(t, n), m = t.label ?? Y(h(t.date), N, I), $ = `${oe}-day-${n}-header`, H = B[o] ?? !1 ? t.slots : t.slots.slice(0, y), O = t.slots.length - H.length, F = t.slots.length === 0;
537
+ return (
538
+ // Use a plain <div role="group"> rather than <section> — a
539
+ // <section> with aria-labelledby is a landmark, and nesting many
540
+ // landmarks inside the outer slot-grid landmark fails axe's
541
+ // landmark-unique rule.
542
+ /* @__PURE__ */ v(
543
+ "div",
544
+ {
545
+ role: "group",
546
+ className: Q(),
547
+ "aria-labelledby": $,
548
+ "data-empty": F || void 0,
549
+ children: [
550
+ /* @__PURE__ */ r("h3", { id: $, className: Be({ size: i }), children: m }),
551
+ F ? /* @__PURE__ */ r("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: u("slotGrid.noSlots") }) : null,
552
+ /* @__PURE__ */ r("ul", { className: U(), children: H.map((f) => {
553
+ const pe = je(
554
+ f,
555
+ t,
556
+ N,
557
+ I,
558
+ ({ time: K, day: he }) => u("slotGrid.slotLabel", { time: K, day: he })
559
+ ), fe = c === f.id, q = f.available === !1 || p;
560
+ return /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
561
+ "button",
562
+ {
563
+ type: "button",
564
+ className: Ve({ size: i }),
565
+ "aria-label": pe,
566
+ "aria-pressed": fe,
567
+ disabled: q,
568
+ "aria-disabled": q || void 0,
569
+ "data-slot-id": f.id,
570
+ onClick: () => x(f, t),
571
+ onKeyDown: (K) => ue(K, f, t),
572
+ children: Z(f, N, I)
573
+ }
574
+ ) }, f.id);
575
+ }) }),
576
+ O > 0 ? /* @__PURE__ */ r(
577
+ W,
578
+ {
579
+ intent: "ghost",
580
+ size: i === "lg" ? "md" : "sm",
581
+ onClick: () => T(t, o),
582
+ disabled: p,
583
+ children: u("slotGrid.showMore", { count: O })
584
+ }
585
+ ) : null
586
+ ]
587
+ },
588
+ o
589
+ )
590
+ );
591
+ })
592
+ }
593
+ ),
594
+ s && d ? /* @__PURE__ */ r(
595
+ "p",
596
+ {
597
+ className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0 ds:text-start",
598
+ "data-slot-grid-hint": "",
599
+ children: d
600
+ }
601
+ ) : null
602
+ ] });
603
+ }
604
+ return /* @__PURE__ */ v(
590
605
  "div",
591
606
  {
592
- ref: re,
607
+ ref: ie,
593
608
  id: G,
594
609
  role: "region",
595
- "aria-label": le,
596
- className: Me({ size: i, className: se }),
610
+ "aria-label": ce,
611
+ className: ze({ size: i, className: ae }),
597
612
  "data-component": "slot-grid",
598
613
  "data-component-id": G,
599
614
  "data-state": a,
600
- ...ae,
615
+ ...re,
601
616
  children: [
602
- /* @__PURE__ */ v("div", { className: ze(), children: [
617
+ /* @__PURE__ */ v("div", { className: Ce(), children: [
603
618
  /* @__PURE__ */ r(
604
- W,
619
+ X,
605
620
  {
606
- icon: /* @__PURE__ */ r(je, {}),
607
- "aria-label": p("slotGrid.previousDays"),
621
+ icon: /* @__PURE__ */ r(Te, {}),
622
+ "aria-label": u("slotGrid.previousDays"),
608
623
  className: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
609
624
  size: i === "lg" ? "md" : "sm",
610
625
  intent: "ghost",
611
626
  flipIconInRtl: !0,
612
- disabled: !C || m,
627
+ disabled: !C || p,
613
628
  onClick: L
614
629
  }
615
630
  ),
616
- Z ? /* @__PURE__ */ r(
617
- q,
631
+ ee ? /* @__PURE__ */ r(
632
+ W,
618
633
  {
619
634
  intent: "secondary",
620
635
  size: i === "lg" ? "md" : "sm",
621
- disabled: m,
622
- onClick: te,
623
- children: p("slotGrid.nextAvailable")
636
+ disabled: p,
637
+ onClick: se,
638
+ children: u("slotGrid.nextAvailable")
624
639
  }
625
640
  ) : /* @__PURE__ */ r("span", { "aria-hidden": "true" }),
626
641
  /* @__PURE__ */ r(
627
- W,
642
+ X,
628
643
  {
629
- icon: /* @__PURE__ */ r(Te, {}),
630
- "aria-label": p("slotGrid.nextDays"),
644
+ icon: /* @__PURE__ */ r(Pe, {}),
645
+ "aria-label": u("slotGrid.nextDays"),
631
646
  className: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
632
647
  size: i === "lg" ? "md" : "sm",
633
648
  intent: "ghost",
634
649
  flipIconInRtl: !0,
635
- disabled: !R || m,
636
- onClick: B
650
+ disabled: !R || p,
651
+ onClick: E
637
652
  }
638
653
  )
639
654
  ] }),
@@ -643,11 +658,11 @@ const Pe = ye(
643
658
  );
644
659
  }
645
660
  );
646
- Pe.displayName = "SlotGrid";
661
+ _e.displayName = "SlotGrid";
647
662
  export {
648
- Pe as S,
649
- Ze as f,
650
- Ye as i,
651
- Ke as s
663
+ _e as S,
664
+ et as f,
665
+ Ze as i,
666
+ Me as s
652
667
  };
653
- //# sourceMappingURL=slot-grid-B-IAFX3C.js.map
668
+ //# sourceMappingURL=slot-grid-BhjaLJ0o.js.map