@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.
- package/dist/_chunks/{contact-profile-card-Jz2aSh7T.js → contact-profile-card-CCgf0Ntt.js} +43 -40
- package/dist/_chunks/contact-profile-card-CCgf0Ntt.js.map +1 -0
- package/dist/_chunks/{map-view-DRd_GRQf.js → map-view-DkL58SRp.js} +288 -305
- package/dist/_chunks/{map-view-DRd_GRQf.js.map → map-view-DkL58SRp.js.map} +1 -1
- package/dist/_chunks/{practice-results-CbxBCDaU.js → practice-results-BDnZtbDM.js} +3 -3
- package/dist/_chunks/{practice-results-CbxBCDaU.js.map → practice-results-BDnZtbDM.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-Dxzmi3GS.js → reserved.agent-BBuWWtYb.js} +2 -2
- package/dist/_chunks/{reserved.agent-Dxzmi3GS.js.map → reserved.agent-BBuWWtYb.js.map} +1 -1
- package/dist/_chunks/{slot-grid-DEZRB4Yb.js → slot-grid-CfA5zeMv.js} +283 -227
- package/dist/_chunks/slot-grid-CfA5zeMv.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/index.js +5 -5
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/contact-profile-card-Jz2aSh7T.js.map +0 -1
- package/dist/_chunks/slot-grid-DEZRB4Yb.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { B as
|
|
6
|
-
import { I as
|
|
7
|
-
import { E as
|
|
8
|
-
import { S as
|
|
9
|
-
import { u as
|
|
10
|
-
import { a as
|
|
11
|
-
import { p as
|
|
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,
|
|
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,
|
|
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
|
-
},
|
|
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
|
-
),
|
|
204
|
+
), Be = b(
|
|
205
205
|
"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full"
|
|
206
|
-
),
|
|
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
|
|
229
|
-
return Math.max(1, Math.min(e,
|
|
228
|
+
function $e(e) {
|
|
229
|
+
return Math.max(1, Math.min(e, Ee));
|
|
230
230
|
}
|
|
231
|
-
const
|
|
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 =
|
|
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
|
-
),
|
|
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 =
|
|
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
|
|
297
|
-
return e instanceof Date ? e :
|
|
296
|
+
function f(e) {
|
|
297
|
+
return e instanceof Date ? e : Te(e);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
return `${
|
|
299
|
+
function R(e, a) {
|
|
300
|
+
return `${f(e.date).toISOString()}-${a}`;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
return Ce(
|
|
302
|
+
function N(e) {
|
|
303
|
+
return Ce(f(e.date), "yyyy-MM-dd");
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return
|
|
305
|
+
function it(e, a) {
|
|
306
|
+
return Re(f(e), f(a));
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
for (const
|
|
310
|
-
const
|
|
311
|
-
if (
|
|
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
|
|
314
|
+
function se(e, a, n) {
|
|
315
315
|
try {
|
|
316
|
-
return new Intl.DateTimeFormat(
|
|
316
|
+
return new Intl.DateTimeFormat(a, {
|
|
317
317
|
weekday: "short",
|
|
318
318
|
month: "short",
|
|
319
319
|
day: "numeric",
|
|
320
|
-
timeZone:
|
|
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
|
|
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
|
|
370
|
+
const d = f(e.start);
|
|
333
371
|
try {
|
|
334
|
-
const
|
|
372
|
+
const c = new Intl.DateTimeFormat(a, {
|
|
335
373
|
hour: "numeric",
|
|
336
374
|
minute: "2-digit",
|
|
337
|
-
timeZone:
|
|
375
|
+
timeZone: n
|
|
338
376
|
});
|
|
339
377
|
if (e.end) {
|
|
340
|
-
const
|
|
341
|
-
if (typeof
|
|
378
|
+
const h = f(e.end);
|
|
379
|
+
if (typeof c.formatRange == "function")
|
|
342
380
|
try {
|
|
343
|
-
return
|
|
381
|
+
return c.formatRange(d, h);
|
|
344
382
|
} catch {
|
|
345
383
|
}
|
|
346
|
-
return `${
|
|
384
|
+
return `${c.format(d)} – ${c.format(h)}`;
|
|
347
385
|
}
|
|
348
|
-
return
|
|
386
|
+
return c.format(d);
|
|
349
387
|
} catch {
|
|
350
|
-
return
|
|
388
|
+
return d.toISOString();
|
|
351
389
|
}
|
|
352
390
|
}
|
|
353
|
-
function
|
|
391
|
+
function He(e, a, n, d, c) {
|
|
354
392
|
if (e.ariaLabel !== void 0) return e.ariaLabel;
|
|
355
|
-
const
|
|
356
|
-
return
|
|
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
|
|
359
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
408
|
+
children: /* @__PURE__ */ r("path", { d: "M15 18l-6-6 6-6" })
|
|
371
409
|
}
|
|
372
410
|
);
|
|
373
411
|
}
|
|
374
|
-
function
|
|
375
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
424
|
+
children: /* @__PURE__ */ r("path", { d: "M9 6l6 6-6 6" })
|
|
387
425
|
}
|
|
388
426
|
);
|
|
389
427
|
}
|
|
390
|
-
const
|
|
428
|
+
const We = De(
|
|
391
429
|
({
|
|
392
430
|
days: e,
|
|
393
|
-
state:
|
|
394
|
-
emptyDescription:
|
|
395
|
-
compactEmptyDays:
|
|
396
|
-
dayHeadingLevel:
|
|
397
|
-
nowrapTimes:
|
|
398
|
-
size:
|
|
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:
|
|
401
|
-
locale:
|
|
402
|
-
timeZone:
|
|
438
|
+
maxInitialSlotsPerDay: T = 6,
|
|
439
|
+
locale: re,
|
|
440
|
+
timeZone: w,
|
|
403
441
|
hasPrevious: L = !1,
|
|
404
|
-
hasNext:
|
|
405
|
-
showNextAvailable:
|
|
406
|
-
ariaLabel:
|
|
407
|
-
onSlotSelect:
|
|
408
|
-
onPreviousDays:
|
|
409
|
-
onNextDays:
|
|
410
|
-
onShowMore:
|
|
411
|
-
onJumpToNextAvailable:
|
|
412
|
-
className:
|
|
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
|
-
...
|
|
415
|
-
},
|
|
416
|
-
const { t:
|
|
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
|
-
|
|
456
|
+
g || s.available !== !1 && (D == null || D(s, t));
|
|
419
457
|
},
|
|
420
|
-
[
|
|
421
|
-
), _ =
|
|
458
|
+
[g, D]
|
|
459
|
+
), _ = z(
|
|
422
460
|
(s, t) => {
|
|
423
|
-
|
|
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:
|
|
436
|
-
state:
|
|
437
|
-
expanded:
|
|
438
|
-
isInteractionSuppressed:
|
|
439
|
-
onPreviousDays:
|
|
440
|
-
onNextDays:
|
|
441
|
-
handleSlotClick:
|
|
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
|
-
},
|
|
444
|
-
|
|
445
|
-
|
|
481
|
+
}, u = Ie(A);
|
|
482
|
+
Ne(() => {
|
|
483
|
+
u.current = A;
|
|
446
484
|
});
|
|
447
485
|
const ye = Ge(
|
|
448
486
|
() => ({
|
|
449
|
-
getStatus: () =>
|
|
450
|
-
getSelectedSlotId: () =>
|
|
451
|
-
getVisibleDays: () =>
|
|
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
|
|
455
|
-
const
|
|
456
|
-
s[
|
|
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: () =>
|
|
461
|
-
(s, t) =>
|
|
462
|
-
).map(
|
|
463
|
-
getHasPrevious: () =>
|
|
464
|
-
getHasNext: () =>
|
|
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 =
|
|
504
|
+
const t = u.current;
|
|
467
505
|
if (t.isInteractionSuppressed) return !1;
|
|
468
|
-
for (const
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
return
|
|
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 =
|
|
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 =
|
|
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 =
|
|
522
|
+
const t = u.current;
|
|
485
523
|
if (t.isInteractionSuppressed) return !1;
|
|
486
|
-
const
|
|
487
|
-
(
|
|
524
|
+
const o = t.days.findIndex(
|
|
525
|
+
(p) => N(p) === s
|
|
488
526
|
);
|
|
489
|
-
if (
|
|
490
|
-
const
|
|
491
|
-
return t.handleShowMore(
|
|
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
|
-
|
|
497
|
-
const
|
|
498
|
-
let
|
|
499
|
-
if (
|
|
500
|
-
|
|
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:
|
|
541
|
+
className: O,
|
|
504
542
|
"data-state": "loading",
|
|
505
543
|
role: "status",
|
|
506
544
|
"aria-live": "polite",
|
|
507
|
-
"aria-label":
|
|
508
|
-
children: Array.from({ length:
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
{ length: Math.min(
|
|
512
|
-
(
|
|
513
|
-
|
|
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:
|
|
554
|
+
size: i,
|
|
517
555
|
height: "40px"
|
|
518
556
|
},
|
|
519
|
-
`loading-slot-${t}-${
|
|
557
|
+
`loading-slot-${t}-${l}`
|
|
520
558
|
)
|
|
521
559
|
) })
|
|
522
560
|
] }, `loading-col-${t}`))
|
|
523
561
|
}
|
|
524
562
|
);
|
|
525
|
-
else if (
|
|
526
|
-
|
|
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:
|
|
569
|
+
children: m("slotGrid.noSlots")
|
|
532
570
|
}
|
|
533
|
-
) : /* @__PURE__ */
|
|
534
|
-
|
|
571
|
+
) : /* @__PURE__ */ r("div", { "data-state": "empty", children: /* @__PURE__ */ r(
|
|
572
|
+
Me,
|
|
535
573
|
{
|
|
536
574
|
variant: "no-results",
|
|
537
|
-
title:
|
|
538
|
-
description:
|
|
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
|
-
|
|
544
|
-
/* @__PURE__ */
|
|
581
|
+
I = /* @__PURE__ */ v(M, { children: [
|
|
582
|
+
/* @__PURE__ */ r(
|
|
545
583
|
"div",
|
|
546
584
|
{
|
|
547
|
-
className:
|
|
585
|
+
className: O,
|
|
548
586
|
"data-state": P ? "disabled" : "default",
|
|
549
|
-
children: e.map((t,
|
|
550
|
-
const
|
|
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__ */
|
|
594
|
+
/* @__PURE__ */ v(
|
|
557
595
|
"div",
|
|
558
596
|
{
|
|
559
597
|
role: "group",
|
|
560
|
-
className:
|
|
561
|
-
"aria-labelledby":
|
|
562
|
-
"data-empty":
|
|
598
|
+
className: ee(),
|
|
599
|
+
"aria-labelledby": q,
|
|
600
|
+
"data-empty": J || void 0,
|
|
563
601
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
|
|
602
|
+
/* @__PURE__ */ r(
|
|
603
|
+
ve,
|
|
566
604
|
{
|
|
567
|
-
id:
|
|
568
|
-
className: Pe({ size:
|
|
569
|
-
children:
|
|
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
|
-
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
] }) :
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
const
|
|
578
|
-
|
|
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
|
-
|
|
581
|
-
|
|
582
|
-
({ time: K, day:
|
|
583
|
-
),
|
|
584
|
-
return /* @__PURE__ */
|
|
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:
|
|
590
|
-
nowrap:
|
|
634
|
+
size: i,
|
|
635
|
+
nowrap: h
|
|
591
636
|
}),
|
|
592
|
-
"aria-label":
|
|
593
|
-
"aria-pressed":
|
|
594
|
-
disabled:
|
|
595
|
-
"aria-disabled":
|
|
596
|
-
"data-slot-id":
|
|
597
|
-
onClick: () =>
|
|
598
|
-
onKeyDown: (K) =>
|
|
599
|
-
children:
|
|
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
|
-
) },
|
|
646
|
+
) }, y.id);
|
|
602
647
|
}) }),
|
|
603
|
-
|
|
604
|
-
|
|
648
|
+
X > 0 ? /* @__PURE__ */ r(
|
|
649
|
+
U,
|
|
605
650
|
{
|
|
606
651
|
intent: "ghost",
|
|
607
|
-
size:
|
|
608
|
-
onClick: () => _(t,
|
|
609
|
-
disabled:
|
|
610
|
-
children:
|
|
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
|
-
|
|
660
|
+
l
|
|
616
661
|
)
|
|
617
662
|
);
|
|
618
663
|
})
|
|
619
664
|
}
|
|
620
665
|
),
|
|
621
|
-
s &&
|
|
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:
|
|
671
|
+
children: n
|
|
627
672
|
}
|
|
628
673
|
) : null
|
|
629
674
|
] });
|
|
630
675
|
}
|
|
631
|
-
return /* @__PURE__ */
|
|
676
|
+
return /* @__PURE__ */ v(
|
|
632
677
|
"div",
|
|
633
678
|
{
|
|
634
|
-
ref:
|
|
679
|
+
ref: ce,
|
|
635
680
|
id: G,
|
|
636
681
|
role: "region",
|
|
637
|
-
"aria-label":
|
|
638
|
-
className:
|
|
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":
|
|
642
|
-
...
|
|
686
|
+
"data-state": a,
|
|
687
|
+
...le,
|
|
643
688
|
children: [
|
|
644
|
-
/* @__PURE__ */
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
|
|
689
|
+
/* @__PURE__ */ v("div", { className: Be(), children: [
|
|
690
|
+
/* @__PURE__ */ r(
|
|
691
|
+
Y,
|
|
647
692
|
{
|
|
648
|
-
icon: /* @__PURE__ */
|
|
649
|
-
"aria-label":
|
|
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:
|
|
696
|
+
size: i === "lg" ? "md" : "sm",
|
|
652
697
|
intent: "ghost",
|
|
653
698
|
flipIconInRtl: !0,
|
|
654
|
-
disabled: !L ||
|
|
655
|
-
onClick:
|
|
699
|
+
disabled: !L || g,
|
|
700
|
+
onClick: B
|
|
656
701
|
}
|
|
657
702
|
),
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
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__ */
|
|
672
|
-
"aria-label":
|
|
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:
|
|
730
|
+
size: i === "lg" ? "md" : "sm",
|
|
675
731
|
intent: "ghost",
|
|
676
732
|
flipIconInRtl: !0,
|
|
677
|
-
disabled: !
|
|
678
|
-
onClick:
|
|
733
|
+
disabled: !j || g,
|
|
734
|
+
onClick: E
|
|
679
735
|
}
|
|
680
736
|
)
|
|
681
737
|
] }),
|
|
682
|
-
|
|
738
|
+
I
|
|
683
739
|
]
|
|
684
740
|
}
|
|
685
741
|
);
|
|
686
742
|
}
|
|
687
743
|
);
|
|
688
|
-
|
|
744
|
+
We.displayName = "SlotGrid";
|
|
689
745
|
export {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
746
|
+
We as S,
|
|
747
|
+
ot as f,
|
|
748
|
+
it as i,
|
|
693
749
|
Le as s
|
|
694
750
|
};
|
|
695
|
-
//# sourceMappingURL=slot-grid-
|
|
751
|
+
//# sourceMappingURL=slot-grid-CfA5zeMv.js.map
|