@alfadocs/ui-kit-debug 1.125.1 → 1.125.3

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 (26) hide show
  1. package/dist/_chunks/{contact-profile-card-Jz2aSh7T.js → contact-profile-card-CCgf0Ntt.js} +43 -40
  2. package/dist/_chunks/contact-profile-card-CCgf0Ntt.js.map +1 -0
  3. package/dist/_chunks/{map-view-DRd_GRQf.js → map-view-DkL58SRp.js} +288 -305
  4. package/dist/_chunks/{map-view-DRd_GRQf.js.map → map-view-DkL58SRp.js.map} +1 -1
  5. package/dist/_chunks/{practice-results-CbxBCDaU.js → practice-results-BDnZtbDM.js} +3 -3
  6. package/dist/_chunks/{practice-results-CbxBCDaU.js.map → practice-results-BDnZtbDM.js.map} +1 -1
  7. package/dist/_chunks/{reserved.agent-Dxzmi3GS.js → reserved.agent-BBuWWtYb.js} +2 -2
  8. package/dist/_chunks/{reserved.agent-Dxzmi3GS.js.map → reserved.agent-BBuWWtYb.js.map} +1 -1
  9. package/dist/_chunks/{slot-grid-DEZRB4Yb.js → slot-grid-CfA5zeMv.js} +283 -227
  10. package/dist/_chunks/slot-grid-CfA5zeMv.js.map +1 -0
  11. package/dist/agent-catalog.json +1 -1
  12. package/dist/browser-support.js +1 -1
  13. package/dist/components/booking/index.js +1 -1
  14. package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
  15. package/dist/components/contact-profile-card/index.js +1 -1
  16. package/dist/components/map-view/index.js +1 -1
  17. package/dist/components/map-view/map-view.d.ts.map +1 -1
  18. package/dist/components/practice-results/index.js +1 -1
  19. package/dist/components/slot-grid/index.js +1 -1
  20. package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
  21. package/dist/core.css +1 -1
  22. package/dist/index.js +5 -5
  23. package/dist/tokens.css +1 -1
  24. package/package.json +1 -1
  25. package/dist/_chunks/contact-profile-card-Jz2aSh7T.js.map +0 -1
  26. package/dist/_chunks/slot-grid-DEZRB4Yb.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { jsx as a, jsxs as b, Fragment as J } from "react/jsx-runtime";
2
- import { forwardRef as xe, useId as Se, useState as ke, useCallback as M, useRef as De, useEffect as Ie, useMemo as Ge } from "react";
3
- import { c as g } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Ne } from "react-i18next";
5
- import { B as Q } from "./button-DohK_Ak_.js";
6
- import { I as U } from "./icon-button-S8_weU3g.js";
7
- import { E as Ke } from "./empty-state-DwJ5YNzz.js";
8
- import { S as Y } from "./skeleton-tTWJpvAq.js";
9
- import { u as Me } from "./registry-DvAUVLHh.js";
10
- import { a as ze, f as Ce } from "./format-ql5WTsYT.js";
11
- import { p as Re } from "./parseISO-Dl4T9peU.js";
1
+ import { jsx as r, jsxs as v, Fragment as M } from "react/jsx-runtime";
2
+ import { forwardRef as De, useId as Se, useState as ke, useCallback as z, useRef as Ie, useEffect as Ne, useMemo as Ge } from "react";
3
+ import { c as b } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Ke } from "react-i18next";
5
+ import { B as U } from "./button-DohK_Ak_.js";
6
+ import { I as Y } from "./icon-button-S8_weU3g.js";
7
+ import { E as Me } from "./empty-state-DwJ5YNzz.js";
8
+ import { S as Z } from "./skeleton-tTWJpvAq.js";
9
+ import { u as ze } from "./registry-DvAUVLHh.js";
10
+ import { a as Re, f as Ce } from "./format-ql5WTsYT.js";
11
+ import { p as Te } from "./parseISO-Dl4T9peU.js";
12
12
  const Le = {
13
13
  id: "slot-grid",
14
14
  // pick → `select_slot` + the `selectedSlotId` state slot.
@@ -102,7 +102,7 @@ const Le = {
102
102
  note: "Book the 09:30 slot on 1 September."
103
103
  }
104
104
  ],
105
- invoke: (e, r) => e.selectSlot(r.slotId)
105
+ invoke: (e, a) => e.selectSlot(a.slotId)
106
106
  },
107
107
  next_days: {
108
108
  // View-window paging only — the consumer fetches, nothing is persisted.
@@ -165,7 +165,7 @@ const Le = {
165
165
  note: "Reveal the rest of 1 September so every slot button is clickable."
166
166
  }
167
167
  ],
168
- invoke: (e, r) => e.showMoreDay(r.dayKey)
168
+ invoke: (e, a) => e.showMoreDay(a.dayKey)
169
169
  }
170
170
  },
171
171
  domHooks: {
@@ -185,7 +185,7 @@ const Le = {
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
- }, Be = g(
188
+ }, je = b(
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 Le = {
201
201
  },
202
202
  defaultVariants: { size: "md" }
203
203
  }
204
- ), Ee = g(
204
+ ), Be = b(
205
205
  "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full"
206
- ), Ve = 12, je = g(
206
+ ), Ee = 12, Ve = b(
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 Le = {
225
225
  defaultVariants: { cols: 1 }
226
226
  }
227
227
  );
228
- function Te(e) {
229
- return Math.max(1, Math.min(e, Ve));
228
+ function $e(e) {
229
+ return Math.max(1, Math.min(e, Ee));
230
230
  }
231
- const Z = g(
231
+ const ee = b(
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)]",
@@ -237,7 +237,7 @@ const Z = g(
237
237
  "ds:bg-[var(--card)]",
238
238
  "ds:min-w-0"
239
239
  ].join(" ")
240
- ), Pe = g(
240
+ ), Pe = b(
241
241
  [
242
242
  "ds:font-[var(--font-weight-semibold)]",
243
243
  "ds:text-[var(--foreground)]",
@@ -254,9 +254,9 @@ const Z = g(
254
254
  },
255
255
  defaultVariants: { size: "md" }
256
256
  }
257
- ), ee = g(
257
+ ), te = b(
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
- ), _e = g(
259
+ ), _e = b(
260
260
  [
261
261
  "ds:inline-flex ds:items-center ds:justify-center",
262
262
  "ds:w-full",
@@ -293,31 +293,31 @@ const Z = g(
293
293
  defaultVariants: { size: "md", nowrap: !1 }
294
294
  }
295
295
  );
296
- function y(e) {
297
- return e instanceof Date ? e : Re(e);
296
+ function f(e) {
297
+ return e instanceof Date ? e : Te(e);
298
298
  }
299
- function z(e, r) {
300
- return `${y(e.date).toISOString()}-${r}`;
299
+ function R(e, a) {
300
+ return `${f(e.date).toISOString()}-${a}`;
301
301
  }
302
- function D(e) {
303
- return Ce(y(e.date), "yyyy-MM-dd");
302
+ function N(e) {
303
+ return Ce(f(e.date), "yyyy-MM-dd");
304
304
  }
305
- function at(e, r) {
306
- return ze(y(e), y(r));
305
+ function it(e, a) {
306
+ return Re(f(e), f(a));
307
307
  }
308
- function rt(e) {
309
- for (const r of e) {
310
- const o = r.slots.find((l) => l.available !== !1);
311
- if (o) return { day: r, slot: o };
308
+ function ot(e) {
309
+ for (const a of e) {
310
+ const n = a.slots.find((d) => d.available !== !1);
311
+ if (n) return { day: a, slot: n };
312
312
  }
313
313
  }
314
- function te(e, r, o) {
314
+ function se(e, a, n) {
315
315
  try {
316
- return new Intl.DateTimeFormat(r, {
316
+ return new Intl.DateTimeFormat(a, {
317
317
  weekday: "short",
318
318
  month: "short",
319
319
  day: "numeric",
320
- timeZone: o
320
+ timeZone: n
321
321
  }).format(e);
322
322
  } catch {
323
323
  return new Intl.DateTimeFormat("en", {
@@ -327,36 +327,74 @@ function te(e, r, o) {
327
327
  }).format(e);
328
328
  }
329
329
  }
330
- function se(e, r, o) {
330
+ function Ae(e, a, n) {
331
+ try {
332
+ return new Intl.DateTimeFormat(a, {
333
+ weekday: "short",
334
+ day: "numeric",
335
+ timeZone: n
336
+ }).format(e);
337
+ } catch {
338
+ return new Intl.DateTimeFormat("en", {
339
+ weekday: "short",
340
+ day: "numeric"
341
+ }).format(e);
342
+ }
343
+ }
344
+ function Fe(e, a, n) {
345
+ if (e.length === 0) return null;
346
+ const d = f(e[0].date), c = f(e[e.length - 1].date), h = (i) => new Intl.DateTimeFormat("en", {
347
+ year: "numeric",
348
+ month: "numeric",
349
+ timeZone: n
350
+ }).format(i);
351
+ try {
352
+ if (h(d) === h(c))
353
+ return new Intl.DateTimeFormat(a, {
354
+ month: "long",
355
+ year: "numeric",
356
+ timeZone: n
357
+ }).format(d);
358
+ const i = new Intl.DateTimeFormat(a, {
359
+ month: "short",
360
+ year: "numeric",
361
+ timeZone: n
362
+ });
363
+ return typeof i.formatRange == "function" ? i.formatRange(d, c) : `${i.format(d)} – ${i.format(c)}`;
364
+ } catch {
365
+ return null;
366
+ }
367
+ }
368
+ function ae(e, a, n) {
331
369
  if (e.label !== void 0) return e.label;
332
- const l = y(e.start);
370
+ const d = f(e.start);
333
371
  try {
334
- const p = new Intl.DateTimeFormat(r, {
372
+ const c = new Intl.DateTimeFormat(a, {
335
373
  hour: "numeric",
336
374
  minute: "2-digit",
337
- timeZone: o
375
+ timeZone: n
338
376
  });
339
377
  if (e.end) {
340
- const v = y(e.end);
341
- if (typeof p.formatRange == "function")
378
+ const h = f(e.end);
379
+ if (typeof c.formatRange == "function")
342
380
  try {
343
- return p.formatRange(l, v);
381
+ return c.formatRange(d, h);
344
382
  } catch {
345
383
  }
346
- return `${p.format(l)} – ${p.format(v)}`;
384
+ return `${c.format(d)} – ${c.format(h)}`;
347
385
  }
348
- return p.format(l);
386
+ return c.format(d);
349
387
  } catch {
350
- return l.toISOString();
388
+ return d.toISOString();
351
389
  }
352
390
  }
353
- function $e(e, r, o, l, p) {
391
+ function He(e, a, n, d, c) {
354
392
  if (e.ariaLabel !== void 0) return e.ariaLabel;
355
- const v = se(e, o, l), c = r.label !== void 0 ? r.label : te(y(r.date), o, l);
356
- return p({ time: v, day: c });
393
+ const h = ae(e, n, d), i = a.label !== void 0 ? a.label : se(f(a.date), n, d);
394
+ return c({ time: h, day: i });
357
395
  }
358
- function Ae() {
359
- return /* @__PURE__ */ a(
396
+ function Oe() {
397
+ return /* @__PURE__ */ r(
360
398
  "svg",
361
399
  {
362
400
  "aria-hidden": "true",
@@ -367,12 +405,12 @@ function Ae() {
367
405
  strokeLinecap: "round",
368
406
  strokeLinejoin: "round",
369
407
  className: "ds:size-4",
370
- children: /* @__PURE__ */ a("path", { d: "M15 18l-6-6 6-6" })
408
+ children: /* @__PURE__ */ r("path", { d: "M15 18l-6-6 6-6" })
371
409
  }
372
410
  );
373
411
  }
374
- function He() {
375
- return /* @__PURE__ */ a(
412
+ function qe() {
413
+ return /* @__PURE__ */ r(
376
414
  "svg",
377
415
  {
378
416
  "aria-hidden": "true",
@@ -383,313 +421,331 @@ function He() {
383
421
  strokeLinecap: "round",
384
422
  strokeLinejoin: "round",
385
423
  className: "ds:size-4",
386
- children: /* @__PURE__ */ a("path", { d: "M9 6l6 6-6 6" })
424
+ children: /* @__PURE__ */ r("path", { d: "M9 6l6 6-6 6" })
387
425
  }
388
426
  );
389
427
  }
390
- const Oe = xe(
428
+ const We = De(
391
429
  ({
392
430
  days: e,
393
- state: r = "default",
394
- emptyDescription: o,
395
- compactEmptyDays: l = !1,
396
- dayHeadingLevel: p = 3,
397
- nowrapTimes: v = !1,
398
- size: c = "md",
431
+ state: a = "default",
432
+ emptyDescription: n,
433
+ compactEmptyDays: d = !1,
434
+ dayHeadingLevel: c = 3,
435
+ nowrapTimes: h = !1,
436
+ size: i = "md",
399
437
  selectedSlotId: C,
400
- maxInitialSlotsPerDay: R = 6,
401
- locale: ae,
402
- timeZone: I,
438
+ maxInitialSlotsPerDay: T = 6,
439
+ locale: re,
440
+ timeZone: w,
403
441
  hasPrevious: L = !1,
404
- hasNext: B = !1,
405
- showNextAvailable: re = !1,
406
- ariaLabel: ne,
407
- onSlotSelect: w,
408
- onPreviousDays: E,
409
- onNextDays: V,
410
- onShowMore: x,
411
- onJumpToNextAvailable: ie,
412
- className: oe,
442
+ hasNext: j = !1,
443
+ showNextAvailable: ne = !1,
444
+ ariaLabel: ie,
445
+ onSlotSelect: D,
446
+ onPreviousDays: B,
447
+ onNextDays: E,
448
+ onShowMore: S,
449
+ onJumpToNextAvailable: oe,
450
+ className: de,
413
451
  id: G,
414
- ...de
415
- }, le) => {
416
- const { t: u, i18n: ce } = Ne("ui"), N = ae ?? ce.language ?? "en", ue = Se(), [j, pe] = ke({}), T = r === "loading", P = r === "disabled", f = T || P, me = r === "empty" || e.length === 0 || e.every((s) => s.slots.length === 0), fe = ne ?? u("slotGrid.ariaLabel"), S = M(
452
+ ...le
453
+ }, ce) => {
454
+ const { t: m, i18n: ue } = Ke("ui"), x = re ?? ue.language ?? "en", me = Se(), [V, fe] = ke({}), $ = a === "loading", P = a === "disabled", g = $ || P, pe = a === "empty" || e.length === 0 || e.every((s) => s.slots.length === 0), he = ie ?? m("slotGrid.ariaLabel"), k = z(
417
455
  (s, t) => {
418
- f || s.available !== !1 && (w == null || w(s, t));
456
+ g || s.available !== !1 && (D == null || D(s, t));
419
457
  },
420
- [f, w]
421
- ), _ = M(
458
+ [g, D]
459
+ ), _ = z(
422
460
  (s, t) => {
423
- pe((n) => ({ ...n, [t]: !0 })), x == null || x(s);
424
- },
425
- [x]
426
- ), he = M(
427
- (s, t, n) => {
428
- (s.key === "Enter" || s.key === " ") && (s.preventDefault(), S(t, n));
461
+ fe((o) => ({ ...o, [t]: !0 })), S == null || S(s);
429
462
  },
430
463
  [S]
431
- ), $ = {
464
+ ), ge = z(
465
+ (s, t, o) => {
466
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), k(t, o));
467
+ },
468
+ [k]
469
+ ), A = {
432
470
  days: e,
433
471
  selectedSlotId: C,
434
472
  hasPrevious: L,
435
- hasNext: B,
436
- state: r,
437
- expanded: j,
438
- isInteractionSuppressed: f,
439
- onPreviousDays: E,
440
- onNextDays: V,
441
- handleSlotClick: S,
473
+ hasNext: j,
474
+ state: a,
475
+ expanded: V,
476
+ isInteractionSuppressed: g,
477
+ onPreviousDays: B,
478
+ onNextDays: E,
479
+ handleSlotClick: k,
442
480
  handleShowMore: _
443
- }, d = De($);
444
- Ie(() => {
445
- d.current = $;
481
+ }, u = Ie(A);
482
+ Ne(() => {
483
+ u.current = A;
446
484
  });
447
485
  const ye = Ge(
448
486
  () => ({
449
- getStatus: () => d.current.state,
450
- getSelectedSlotId: () => d.current.selectedSlotId ?? null,
451
- getVisibleDays: () => d.current.days.map(D),
487
+ getStatus: () => u.current.state,
488
+ getSelectedSlotId: () => u.current.selectedSlotId ?? null,
489
+ getVisibleDays: () => u.current.days.map(N),
452
490
  getSlotsByDay: () => {
453
491
  const s = {};
454
- for (const t of d.current.days) {
455
- const n = D(t), i = t.slots.filter((m) => m.available !== !1).map((m) => m.id);
456
- s[n] = s[n] ? [...s[n], ...i] : i;
492
+ for (const t of u.current.days) {
493
+ const o = N(t), l = t.slots.filter((p) => p.available !== !1).map((p) => p.id);
494
+ s[o] = s[o] ? [...s[o], ...l] : l;
457
495
  }
458
496
  return s;
459
497
  },
460
- getExpandedDays: () => d.current.days.filter(
461
- (s, t) => d.current.expanded[z(s, t)] === !0
462
- ).map(D),
463
- getHasPrevious: () => d.current.hasPrevious,
464
- getHasNext: () => d.current.hasNext,
498
+ getExpandedDays: () => u.current.days.filter(
499
+ (s, t) => u.current.expanded[R(s, t)] === !0
500
+ ).map(N),
501
+ getHasPrevious: () => u.current.hasPrevious,
502
+ getHasNext: () => u.current.hasNext,
465
503
  selectSlot: (s) => {
466
- const t = d.current;
504
+ const t = u.current;
467
505
  if (t.isInteractionSuppressed) return !1;
468
- for (const n of t.days) {
469
- const i = n.slots.find((m) => m.id === s);
470
- if (i)
471
- return i.available === !1 ? !1 : (t.handleSlotClick(i, n), !0);
506
+ for (const o of t.days) {
507
+ const l = o.slots.find((p) => p.id === s);
508
+ if (l)
509
+ return l.available === !1 ? !1 : (t.handleSlotClick(l, o), !0);
472
510
  }
473
511
  return !1;
474
512
  },
475
513
  nextDays: () => {
476
- const s = d.current;
514
+ const s = u.current;
477
515
  return !s.hasNext || s.isInteractionSuppressed || !s.onNextDays ? !1 : (s.onNextDays(), !0);
478
516
  },
479
517
  previousDays: () => {
480
- const s = d.current;
518
+ const s = u.current;
481
519
  return !s.hasPrevious || s.isInteractionSuppressed || !s.onPreviousDays ? !1 : (s.onPreviousDays(), !0);
482
520
  },
483
521
  showMoreDay: (s) => {
484
- const t = d.current;
522
+ const t = u.current;
485
523
  if (t.isInteractionSuppressed) return !1;
486
- const n = t.days.findIndex(
487
- (m) => D(m) === s
524
+ const o = t.days.findIndex(
525
+ (p) => N(p) === s
488
526
  );
489
- if (n < 0) return !1;
490
- const i = t.days[n];
491
- return t.handleShowMore(i, z(i, n)), !0;
527
+ if (o < 0) return !1;
528
+ const l = t.days[o];
529
+ return t.handleShowMore(l, R(l, o)), !0;
492
530
  }
493
531
  }),
494
532
  []
495
533
  );
496
- Me(Le, ye, G);
497
- const ge = `h${p}`, A = Te(e.length || 1), H = je({ cols: A });
498
- let k;
499
- if (T)
500
- k = /* @__PURE__ */ a(
534
+ ze(Le, ye, G);
535
+ const ve = `h${c}`, F = Fe(e, x, w), H = $e(e.length || 1), O = Ve({ cols: H });
536
+ let I;
537
+ if ($)
538
+ I = /* @__PURE__ */ r(
501
539
  "div",
502
540
  {
503
- className: H,
541
+ className: O,
504
542
  "data-state": "loading",
505
543
  role: "status",
506
544
  "aria-live": "polite",
507
- "aria-label": u("common.loading"),
508
- children: Array.from({ length: A }, (s, t) => /* @__PURE__ */ b("div", { className: Z(), children: [
509
- /* @__PURE__ */ a(Y, { variant: "text", size: c, width: "60%" }),
510
- /* @__PURE__ */ a("div", { className: ee(), children: Array.from(
511
- { length: Math.min(R, 4) },
512
- (n, i) => /* @__PURE__ */ a(
513
- Y,
545
+ "aria-label": m("common.loading"),
546
+ children: Array.from({ length: H }, (s, t) => /* @__PURE__ */ v("div", { className: ee(), children: [
547
+ /* @__PURE__ */ r(Z, { variant: "text", size: i, width: "60%" }),
548
+ /* @__PURE__ */ r("div", { className: te(), children: Array.from(
549
+ { length: Math.min(T, 4) },
550
+ (o, l) => /* @__PURE__ */ r(
551
+ Z,
514
552
  {
515
553
  variant: "rounded",
516
- size: c,
554
+ size: i,
517
555
  height: "40px"
518
556
  },
519
- `loading-slot-${t}-${i}`
557
+ `loading-slot-${t}-${l}`
520
558
  )
521
559
  ) })
522
560
  ] }, `loading-col-${t}`))
523
561
  }
524
562
  );
525
- else if (me)
526
- k = l ? /* @__PURE__ */ a(
563
+ else if (pe)
564
+ I = d ? /* @__PURE__ */ r(
527
565
  "p",
528
566
  {
529
567
  "data-state": "empty",
530
568
  className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0 ds:text-start",
531
- children: u("slotGrid.noSlots")
569
+ children: m("slotGrid.noSlots")
532
570
  }
533
- ) : /* @__PURE__ */ a("div", { "data-state": "empty", children: /* @__PURE__ */ a(
534
- Ke,
571
+ ) : /* @__PURE__ */ r("div", { "data-state": "empty", children: /* @__PURE__ */ r(
572
+ Me,
535
573
  {
536
574
  variant: "no-results",
537
- title: u("slotGrid.noSlots"),
538
- description: o
575
+ title: m("slotGrid.noSlots"),
576
+ description: n
539
577
  }
540
578
  ) });
541
579
  else {
542
580
  const s = e.some((t) => t.slots.length === 0);
543
- k = /* @__PURE__ */ b(J, { children: [
544
- /* @__PURE__ */ a(
581
+ I = /* @__PURE__ */ v(M, { children: [
582
+ /* @__PURE__ */ r(
545
583
  "div",
546
584
  {
547
- className: H,
585
+ className: O,
548
586
  "data-state": P ? "disabled" : "default",
549
- children: e.map((t, n) => {
550
- const i = z(t, n), m = t.label ?? te(y(t.date), N, I), O = `${ue}-day-${n}-header`, F = j[i] ?? !1 ? t.slots : t.slots.slice(0, R), q = t.slots.length - F.length, W = t.slots.length === 0;
587
+ children: e.map((t, o) => {
588
+ const l = R(t, o), p = t.label ?? se(f(t.date), x, w), q = `${me}-day-${o}-header`, W = V[l] ?? !1 ? t.slots : t.slots.slice(0, T), X = t.slots.length - W.length, J = t.slots.length === 0;
551
589
  return (
552
590
  // Use a plain <div role="group"> rather than <section> — a
553
591
  // <section> with aria-labelledby is a landmark, and nesting many
554
592
  // landmarks inside the outer slot-grid landmark fails axe's
555
593
  // landmark-unique rule.
556
- /* @__PURE__ */ b(
594
+ /* @__PURE__ */ v(
557
595
  "div",
558
596
  {
559
597
  role: "group",
560
- className: Z(),
561
- "aria-labelledby": O,
562
- "data-empty": W || void 0,
598
+ className: ee(),
599
+ "aria-labelledby": q,
600
+ "data-empty": J || void 0,
563
601
  children: [
564
- /* @__PURE__ */ a(
565
- ge,
602
+ /* @__PURE__ */ r(
603
+ ve,
566
604
  {
567
- id: O,
568
- className: Pe({ size: c }),
569
- children: m
605
+ id: q,
606
+ className: Pe({ size: i }),
607
+ children: t.label !== void 0 ? p : /* @__PURE__ */ v(M, { children: [
608
+ /* @__PURE__ */ r("span", { "aria-hidden": "true", children: Ae(
609
+ f(t.date),
610
+ x,
611
+ w
612
+ ) }),
613
+ /* @__PURE__ */ r("span", { className: "ds:sr-only", children: p })
614
+ ] })
570
615
  }
571
616
  ),
572
- W ? /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: l ? /* @__PURE__ */ b(J, { children: [
573
- /* @__PURE__ */ a("span", { "aria-hidden": "true", children: "–" }),
574
- /* @__PURE__ */ a("span", { className: "ds:sr-only", children: u("slotGrid.noSlots") })
575
- ] }) : u("slotGrid.noSlots") }) : null,
576
- /* @__PURE__ */ a("ul", { className: ee(), children: F.map((h) => {
577
- const ve = $e(
578
- h,
617
+ J ? /* @__PURE__ */ r("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: d ? /* @__PURE__ */ v(M, { children: [
618
+ /* @__PURE__ */ r("span", { "aria-hidden": "true", children: "–" }),
619
+ /* @__PURE__ */ r("span", { className: "ds:sr-only", children: m("slotGrid.noSlots") })
620
+ ] }) : m("slotGrid.noSlots") }) : null,
621
+ /* @__PURE__ */ r("ul", { className: te(), children: W.map((y) => {
622
+ const be = He(
623
+ y,
579
624
  t,
580
- N,
581
- I,
582
- ({ time: K, day: we }) => u("slotGrid.slotLabel", { time: K, day: we })
583
- ), be = C === h.id, X = h.available === !1 || f;
584
- return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
625
+ x,
626
+ w,
627
+ ({ time: K, day: xe }) => m("slotGrid.slotLabel", { time: K, day: xe })
628
+ ), we = C === y.id, Q = y.available === !1 || g;
629
+ return /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
585
630
  "button",
586
631
  {
587
632
  type: "button",
588
633
  className: _e({
589
- size: c,
590
- nowrap: v
634
+ size: i,
635
+ nowrap: h
591
636
  }),
592
- "aria-label": ve,
593
- "aria-pressed": be,
594
- disabled: X,
595
- "aria-disabled": X || void 0,
596
- "data-slot-id": h.id,
597
- onClick: () => S(h, t),
598
- onKeyDown: (K) => he(K, h, t),
599
- children: se(h, N, I)
637
+ "aria-label": be,
638
+ "aria-pressed": we,
639
+ disabled: Q,
640
+ "aria-disabled": Q || void 0,
641
+ "data-slot-id": y.id,
642
+ onClick: () => k(y, t),
643
+ onKeyDown: (K) => ge(K, y, t),
644
+ children: ae(y, x, w)
600
645
  }
601
- ) }, h.id);
646
+ ) }, y.id);
602
647
  }) }),
603
- q > 0 ? /* @__PURE__ */ a(
604
- Q,
648
+ X > 0 ? /* @__PURE__ */ r(
649
+ U,
605
650
  {
606
651
  intent: "ghost",
607
- size: c === "lg" ? "md" : "sm",
608
- onClick: () => _(t, i),
609
- disabled: f,
610
- children: u("slotGrid.showMore", { count: q })
652
+ size: i === "lg" ? "md" : "sm",
653
+ onClick: () => _(t, l),
654
+ disabled: g,
655
+ children: m("slotGrid.showMore", { count: X })
611
656
  }
612
657
  ) : null
613
658
  ]
614
659
  },
615
- i
660
+ l
616
661
  )
617
662
  );
618
663
  })
619
664
  }
620
665
  ),
621
- s && o ? /* @__PURE__ */ a(
666
+ s && n ? /* @__PURE__ */ r(
622
667
  "p",
623
668
  {
624
669
  className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0 ds:text-start",
625
670
  "data-slot-grid-hint": "",
626
- children: o
671
+ children: n
627
672
  }
628
673
  ) : null
629
674
  ] });
630
675
  }
631
- return /* @__PURE__ */ b(
676
+ return /* @__PURE__ */ v(
632
677
  "div",
633
678
  {
634
- ref: le,
679
+ ref: ce,
635
680
  id: G,
636
681
  role: "region",
637
- "aria-label": fe,
638
- className: Be({ size: c, className: oe }),
682
+ "aria-label": he,
683
+ className: je({ size: i, className: de }),
639
684
  "data-component": "slot-grid",
640
685
  "data-component-id": G,
641
- "data-state": r,
642
- ...de,
686
+ "data-state": a,
687
+ ...le,
643
688
  children: [
644
- /* @__PURE__ */ b("div", { className: Ee(), children: [
645
- /* @__PURE__ */ a(
646
- U,
689
+ /* @__PURE__ */ v("div", { className: Be(), children: [
690
+ /* @__PURE__ */ r(
691
+ Y,
647
692
  {
648
- icon: /* @__PURE__ */ a(Ae, {}),
649
- "aria-label": u("slotGrid.previousDays"),
693
+ icon: /* @__PURE__ */ r(Oe, {}),
694
+ "aria-label": m("slotGrid.previousDays"),
650
695
  className: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
651
- size: c === "lg" ? "md" : "sm",
696
+ size: i === "lg" ? "md" : "sm",
652
697
  intent: "ghost",
653
698
  flipIconInRtl: !0,
654
- disabled: !L || f,
655
- onClick: E
699
+ disabled: !L || g,
700
+ onClick: B
656
701
  }
657
702
  ),
658
- re ? /* @__PURE__ */ a(
659
- Q,
660
- {
661
- intent: "secondary",
662
- size: c === "lg" ? "md" : "sm",
663
- disabled: f,
664
- onClick: ie,
665
- children: u("slotGrid.nextAvailable")
666
- }
667
- ) : /* @__PURE__ */ a("span", { "aria-hidden": "true" }),
668
- /* @__PURE__ */ a(
669
- U,
703
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:min-w-0 ds:flex-wrap ds:items-center ds:justify-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)]", children: [
704
+ F ? /* @__PURE__ */ r(
705
+ "p",
706
+ {
707
+ className: "type-label ds:m-0 ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:text-center",
708
+ "aria-live": "polite",
709
+ "data-slot-grid-period": "",
710
+ children: F
711
+ }
712
+ ) : null,
713
+ ne ? /* @__PURE__ */ r(
714
+ U,
715
+ {
716
+ intent: "secondary",
717
+ size: i === "lg" ? "md" : "sm",
718
+ disabled: g,
719
+ onClick: oe,
720
+ children: m("slotGrid.nextAvailable")
721
+ }
722
+ ) : null
723
+ ] }),
724
+ /* @__PURE__ */ r(
725
+ Y,
670
726
  {
671
- icon: /* @__PURE__ */ a(He, {}),
672
- "aria-label": u("slotGrid.nextDays"),
727
+ icon: /* @__PURE__ */ r(qe, {}),
728
+ "aria-label": m("slotGrid.nextDays"),
673
729
  className: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
674
- size: c === "lg" ? "md" : "sm",
730
+ size: i === "lg" ? "md" : "sm",
675
731
  intent: "ghost",
676
732
  flipIconInRtl: !0,
677
- disabled: !B || f,
678
- onClick: V
733
+ disabled: !j || g,
734
+ onClick: E
679
735
  }
680
736
  )
681
737
  ] }),
682
- k
738
+ I
683
739
  ]
684
740
  }
685
741
  );
686
742
  }
687
743
  );
688
- Oe.displayName = "SlotGrid";
744
+ We.displayName = "SlotGrid";
689
745
  export {
690
- Oe as S,
691
- rt as f,
692
- at as i,
746
+ We as S,
747
+ ot as f,
748
+ it as i,
693
749
  Le as s
694
750
  };
695
- //# sourceMappingURL=slot-grid-DEZRB4Yb.js.map
751
+ //# sourceMappingURL=slot-grid-CfA5zeMv.js.map