@alfadocs/ui-kit-debug 1.90.1 → 1.90.2
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/address-autocomplete-DR4Xn23Z.js +519 -0
- package/dist/_chunks/address-autocomplete-DR4Xn23Z.js.map +1 -0
- package/dist/_chunks/{address-fields-CfnXK8RT.js → address-fields-qxQkGwPf.js} +5 -5
- package/dist/_chunks/{address-fields-CfnXK8RT.js.map → address-fields-qxQkGwPf.js.map} +1 -1
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js → ai-permission-notice-VNh3W57L.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js.map → ai-permission-notice-VNh3W57L.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js → anamnesis-summary-rows-EKPfVCmh.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js.map → anamnesis-summary-rows-EKPfVCmh.js.map} +1 -1
- package/dist/_chunks/autocomplete-BXMcNoa3.js +562 -0
- package/dist/_chunks/autocomplete-BXMcNoa3.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js → balance-badge-cell-D9VhFp0L.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js.map → balance-badge-cell-D9VhFp0L.js.map} +1 -1
- package/dist/_chunks/{booking-C0FoW8Yx.js → booking-CcE_oviI.js} +1896 -1859
- package/dist/_chunks/booking-CcE_oviI.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js → calendar-appointment-editor-dialog-CiAGAX2t.js} +7 -7
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js.map → calendar-appointment-editor-dialog-CiAGAX2t.js.map} +1 -1
- package/dist/_chunks/{checkbox-BjDv-r3o.js → checkbox-a7Sh-dXb.js} +32 -31
- package/dist/_chunks/checkbox-a7Sh-dXb.js.map +1 -0
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js → checkbox-group-eGdv9fZc.js} +2 -2
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js.map → checkbox-group-eGdv9fZc.js.map} +1 -1
- package/dist/_chunks/{city-input-CJVGswxp.js → city-input-CA59CjnV.js} +2 -2
- package/dist/_chunks/{city-input-CJVGswxp.js.map → city-input-CA59CjnV.js.map} +1 -1
- package/dist/_chunks/{combobox-CDPm_n0p.js → combobox-D-gpgEDy.js} +314 -294
- package/dist/_chunks/combobox-D-gpgEDy.js.map +1 -0
- package/dist/_chunks/{country-select-DQ8q7ypA.js → country-select-BfmX9y5i.js} +2 -2
- package/dist/_chunks/{country-select-DQ8q7ypA.js.map → country-select-BfmX9y5i.js.map} +1 -1
- package/dist/_chunks/{data-table-B_IcS0Ke.js → data-table-CqQgoNsU.js} +2 -2
- package/dist/_chunks/{data-table-B_IcS0Ke.js.map → data-table-CqQgoNsU.js.map} +1 -1
- package/dist/_chunks/{face-scheme-BgJGFDTa.js → face-scheme-BKSE98bo.js} +2 -2
- package/dist/_chunks/{face-scheme-BgJGFDTa.js.map → face-scheme-BKSE98bo.js.map} +1 -1
- package/dist/_chunks/{file-manager-C9YOT-Dn.js → file-manager-BnI1ZWZu.js} +2 -2
- package/dist/_chunks/{file-manager-C9YOT-Dn.js.map → file-manager-BnI1ZWZu.js.map} +1 -1
- package/dist/_chunks/{header-settings-BVhjndtV.js → header-settings-BeA2fnol.js} +24 -23
- package/dist/_chunks/header-settings-BeA2fnol.js.map +1 -0
- package/dist/_chunks/{heatmap-HTz3Jvzy.js → heatmap-fCxwNz2o.js} +2 -2
- package/dist/_chunks/{heatmap-HTz3Jvzy.js.map → heatmap-fCxwNz2o.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js → link-cell-renderer-CnCgudvq.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js.map → link-cell-renderer-CnCgudvq.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js → login-dev-card-BZBR58mu.js} +2 -2
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js.map → login-dev-card-BZBR58mu.js.map} +1 -1
- package/dist/_chunks/{map-view-Bvi06RVh.js → map-view-UrNgxBy3.js} +260 -237
- package/dist/_chunks/map-view-UrNgxBy3.js.map +1 -0
- package/dist/_chunks/{index.modern-BeRXQVdc.js → maps-core-gate-DkNqGkm3.js} +360 -319
- package/dist/_chunks/maps-core-gate-DkNqGkm3.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js → marketplace-app-shell-CmZx0Oam.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js.map → marketplace-app-shell-CmZx0Oam.js.map} +1 -1
- package/dist/_chunks/{notes-panel-CZO1qsD-.js → notes-panel-Dywo6R55.js} +2 -2
- package/dist/_chunks/{notes-panel-CZO1qsD-.js.map → notes-panel-Dywo6R55.js.map} +1 -1
- package/dist/_chunks/{patient-details-D0P5eog5.js → patient-details-BUr7Oemx.js} +2 -2
- package/dist/_chunks/{patient-details-D0P5eog5.js.map → patient-details-BUr7Oemx.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-R73dZJY6.js → patient-field-row-bJk8Q_qr.js} +5 -5
- package/dist/_chunks/{patient-field-row-R73dZJY6.js.map → patient-field-row-bJk8Q_qr.js.map} +1 -1
- package/dist/_chunks/patient-search-Ca9j5cWb.js +1306 -0
- package/dist/_chunks/patient-search-Ca9j5cWb.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js → patient-summary-card-CCQZ8X37.js} +2 -2
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js.map → patient-summary-card-CCQZ8X37.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js → periodontal-diagnosis-DD3hrg9X.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js.map → periodontal-diagnosis-DD3hrg9X.js.map} +1 -1
- package/dist/_chunks/{permission-matrix-BoQjENGV.js → permission-matrix-BJ6sg3Zp.js} +3 -3
- package/dist/_chunks/{permission-matrix-BoQjENGV.js.map → permission-matrix-BJ6sg3Zp.js.map} +1 -1
- package/dist/_chunks/{practice-results-B61krlwu.js → practice-results-DQuOfqej.js} +2 -2
- package/dist/_chunks/{practice-results-B61krlwu.js.map → practice-results-DQuOfqej.js.map} +1 -1
- package/dist/_chunks/{province-select-CPdTwEob.js → province-select-D64whw0m.js} +2 -2
- package/dist/_chunks/{province-select-CPdTwEob.js.map → province-select-D64whw0m.js.map} +1 -1
- package/dist/_chunks/{registration-form-DmP3YUfp.js → registration-form-CRm6DaB9.js} +2 -2
- package/dist/_chunks/{registration-form-DmP3YUfp.js.map → registration-form-CRm6DaB9.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-UzQQLb-z.js → reviews-panel-B7InBORU.js} +42 -41
- package/dist/_chunks/reviews-panel-B7InBORU.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js → rich-text-editor-BfEu57dk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js.map → rich-text-editor-BfEu57dk.js.map} +1 -1
- package/dist/_chunks/{slot-grid-Bb13H9Rl.js → slot-grid-DrwynKeN.js} +91 -89
- package/dist/_chunks/{slot-grid-Bb13H9Rl.js.map → slot-grid-DrwynKeN.js.map} +1 -1
- package/dist/_chunks/{task-editor-BOETWbjU.js → task-editor-CI1SKUNc.js} +2 -2
- package/dist/_chunks/{task-editor-BOETWbjU.js.map → task-editor-CI1SKUNc.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js → use-appointment-details-read-BytPq3Ux.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js.map → use-appointment-details-read-BytPq3Ux.js.map} +1 -1
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js → voice-control-panel-BP0otrID.js} +2 -2
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js.map → voice-control-panel-BP0otrID.js.map} +1 -1
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js → workflow-webhook-action-B_nBJ_ht.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js.map → workflow-webhook-action-B_nBJ_ht.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/_shared/maps-core-gate.d.ts +18 -0
- package/dist/components/_shared/maps-core-gate.d.ts.map +1 -0
- package/dist/components/address-autocomplete/address-autocomplete.d.ts.map +1 -1
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.agent.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +2 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/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/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-search/patient-search.d.ts.map +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/components/rich-text-editor/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/components/task-editor/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/host-compat.css +1 -10
- package/dist/index.js +37 -37
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js +0 -498
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js.map +0 -1
- package/dist/_chunks/autocomplete-CnB1mHGc.js +0 -539
- package/dist/_chunks/autocomplete-CnB1mHGc.js.map +0 -1
- package/dist/_chunks/booking-C0FoW8Yx.js.map +0 -1
- package/dist/_chunks/checkbox-BjDv-r3o.js.map +0 -1
- package/dist/_chunks/combobox-CDPm_n0p.js.map +0 -1
- package/dist/_chunks/header-settings-BVhjndtV.js.map +0 -1
- package/dist/_chunks/index.modern-BeRXQVdc.js.map +0 -1
- package/dist/_chunks/map-view-Bvi06RVh.js.map +0 -1
- package/dist/_chunks/patient-search-CCOUZABE.js +0 -1196
- package/dist/_chunks/patient-search-CCOUZABE.js.map +0 -1
- package/dist/_chunks/reviews-panel-UzQQLb-z.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
2
|
+
import { forwardRef as me, useId as he, useState as ye, useCallback as K, useRef as ge, useEffect as ve, useMemo as be } from "react";
|
|
3
|
+
import { c as y } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as we } from "react-i18next";
|
|
5
5
|
import { B as F } from "./button-DohK_Ak_.js";
|
|
6
6
|
import { I as q } from "./icon-button-S8_weU3g.js";
|
|
@@ -185,7 +185,7 @@ const Ge = {
|
|
|
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
|
+
}, Ne = y(
|
|
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 Ge = {
|
|
|
201
201
|
},
|
|
202
202
|
defaultVariants: { size: "md" }
|
|
203
203
|
}
|
|
204
|
-
),
|
|
204
|
+
), Ke = y(
|
|
205
205
|
"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full"
|
|
206
|
-
),
|
|
206
|
+
), Me = 12, ze = y(
|
|
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 Ge = {
|
|
|
225
225
|
defaultVariants: { cols: 1 }
|
|
226
226
|
}
|
|
227
227
|
);
|
|
228
|
-
function
|
|
229
|
-
return Math.max(1, Math.min(e,
|
|
228
|
+
function Ce(e) {
|
|
229
|
+
return Math.max(1, Math.min(e, Me));
|
|
230
230
|
}
|
|
231
|
-
const X =
|
|
231
|
+
const X = y(
|
|
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 X = m(
|
|
|
237
237
|
"ds:bg-[var(--card)]",
|
|
238
238
|
"ds:min-w-0"
|
|
239
239
|
].join(" ")
|
|
240
|
-
),
|
|
240
|
+
), Re = y(
|
|
241
241
|
[
|
|
242
242
|
"ds:font-[var(--font-weight-semibold)]",
|
|
243
243
|
"ds:text-[var(--foreground)]",
|
|
@@ -254,9 +254,9 @@ const X = m(
|
|
|
254
254
|
},
|
|
255
255
|
defaultVariants: { size: "md" }
|
|
256
256
|
}
|
|
257
|
-
), J =
|
|
257
|
+
), J = y(
|
|
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
|
-
),
|
|
259
|
+
), Le = y(
|
|
260
260
|
[
|
|
261
261
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
262
262
|
"ds:w-full",
|
|
@@ -292,7 +292,7 @@ const X = m(
|
|
|
292
292
|
function h(e) {
|
|
293
293
|
return e instanceof Date ? e : Ie(e);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function M(e, a) {
|
|
296
296
|
return `${h(e.date).toISOString()}-${a}`;
|
|
297
297
|
}
|
|
298
298
|
function D(e) {
|
|
@@ -303,17 +303,17 @@ function Qe(e, a) {
|
|
|
303
303
|
}
|
|
304
304
|
function Ue(e) {
|
|
305
305
|
for (const a of e) {
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
306
|
+
const i = a.slots.find((l) => l.available !== !1);
|
|
307
|
+
if (i) return { day: a, slot: i };
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
function Q(e, a,
|
|
310
|
+
function Q(e, a, i) {
|
|
311
311
|
try {
|
|
312
312
|
return new Intl.DateTimeFormat(a, {
|
|
313
313
|
weekday: "short",
|
|
314
314
|
month: "short",
|
|
315
315
|
day: "numeric",
|
|
316
|
-
timeZone:
|
|
316
|
+
timeZone: i
|
|
317
317
|
}).format(e);
|
|
318
318
|
} catch {
|
|
319
319
|
return new Intl.DateTimeFormat("en", {
|
|
@@ -323,14 +323,14 @@ function Q(e, a, o) {
|
|
|
323
323
|
}).format(e);
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
function U(e, a,
|
|
326
|
+
function U(e, a, i) {
|
|
327
327
|
if (e.label !== void 0) return e.label;
|
|
328
328
|
const l = 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:
|
|
333
|
+
timeZone: i
|
|
334
334
|
});
|
|
335
335
|
if (e.end) {
|
|
336
336
|
const g = h(e.end);
|
|
@@ -346,9 +346,9 @@ function U(e, a, o) {
|
|
|
346
346
|
return l.toISOString();
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
function Be(e, a,
|
|
349
|
+
function Be(e, a, i, l, c) {
|
|
350
350
|
if (e.ariaLabel !== void 0) return e.ariaLabel;
|
|
351
|
-
const g = U(e,
|
|
351
|
+
const g = U(e, i, l), v = a.label !== void 0 ? a.label : Q(h(a.date), i, l);
|
|
352
352
|
return c({ time: g, day: v });
|
|
353
353
|
}
|
|
354
354
|
function Ee() {
|
|
@@ -383,110 +383,110 @@ function Ve() {
|
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
385
|
}
|
|
386
|
-
const je =
|
|
386
|
+
const je = me(
|
|
387
387
|
({
|
|
388
388
|
days: e,
|
|
389
389
|
state: a = "default",
|
|
390
|
-
size:
|
|
390
|
+
size: i = "md",
|
|
391
391
|
selectedSlotId: l,
|
|
392
392
|
maxInitialSlotsPerDay: c = 6,
|
|
393
393
|
locale: g,
|
|
394
394
|
timeZone: v,
|
|
395
|
-
hasPrevious:
|
|
396
|
-
hasNext:
|
|
395
|
+
hasPrevious: z = !1,
|
|
396
|
+
hasNext: C = !1,
|
|
397
397
|
showNextAvailable: Y = !1,
|
|
398
398
|
ariaLabel: Z,
|
|
399
399
|
onSlotSelect: b,
|
|
400
|
-
onPreviousDays:
|
|
401
|
-
onNextDays:
|
|
400
|
+
onPreviousDays: R,
|
|
401
|
+
onNextDays: L,
|
|
402
402
|
onShowMore: w,
|
|
403
403
|
onJumpToNextAvailable: ee,
|
|
404
404
|
className: te,
|
|
405
405
|
id: I,
|
|
406
406
|
...se
|
|
407
407
|
}, ae) => {
|
|
408
|
-
const { t: p, i18n: re } = we("ui"), G = g ?? re.language ?? "en",
|
|
408
|
+
const { t: p, i18n: re } = we("ui"), G = g ?? re.language ?? "en", ie = he(), [B, ne] = ye({}), E = a === "loading", V = a === "disabled", f = E || V, oe = a === "empty" || e.length === 0 || e.every((t) => t.slots.length === 0), de = Z ?? p("slotGrid.ariaLabel"), x = K(
|
|
409
409
|
(t, s) => {
|
|
410
410
|
f || t.available !== !1 && (b == null || b(t, s));
|
|
411
411
|
},
|
|
412
412
|
[f, b]
|
|
413
|
-
), j =
|
|
413
|
+
), j = K(
|
|
414
414
|
(t, s) => {
|
|
415
|
-
|
|
415
|
+
ne((n) => ({ ...n, [s]: !0 })), w == null || w(t);
|
|
416
416
|
},
|
|
417
417
|
[w]
|
|
418
|
-
), le =
|
|
419
|
-
(t, s,
|
|
420
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), x(s,
|
|
418
|
+
), le = K(
|
|
419
|
+
(t, s, n) => {
|
|
420
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), x(s, n));
|
|
421
421
|
},
|
|
422
422
|
[x]
|
|
423
423
|
), T = {
|
|
424
424
|
days: e,
|
|
425
425
|
selectedSlotId: l,
|
|
426
|
-
hasPrevious:
|
|
427
|
-
hasNext:
|
|
426
|
+
hasPrevious: z,
|
|
427
|
+
hasNext: C,
|
|
428
428
|
state: a,
|
|
429
429
|
expanded: B,
|
|
430
430
|
isInteractionSuppressed: f,
|
|
431
|
-
onPreviousDays:
|
|
432
|
-
onNextDays:
|
|
431
|
+
onPreviousDays: R,
|
|
432
|
+
onNextDays: L,
|
|
433
433
|
handleSlotClick: x,
|
|
434
434
|
handleShowMore: j
|
|
435
|
-
},
|
|
435
|
+
}, o = ge(T);
|
|
436
436
|
ve(() => {
|
|
437
|
-
|
|
437
|
+
o.current = T;
|
|
438
438
|
});
|
|
439
439
|
const ce = be(
|
|
440
440
|
() => ({
|
|
441
|
-
getStatus: () =>
|
|
442
|
-
getSelectedSlotId: () =>
|
|
443
|
-
getVisibleDays: () =>
|
|
441
|
+
getStatus: () => o.current.state,
|
|
442
|
+
getSelectedSlotId: () => o.current.selectedSlotId ?? null,
|
|
443
|
+
getVisibleDays: () => o.current.days.map(D),
|
|
444
444
|
getSlotsByDay: () => {
|
|
445
445
|
const t = {};
|
|
446
|
-
for (const s of
|
|
447
|
-
const
|
|
448
|
-
t[
|
|
446
|
+
for (const s of o.current.days) {
|
|
447
|
+
const n = D(s), d = s.slots.filter((u) => u.available !== !1).map((u) => u.id);
|
|
448
|
+
t[n] = t[n] ? [...t[n], ...d] : d;
|
|
449
449
|
}
|
|
450
450
|
return t;
|
|
451
451
|
},
|
|
452
|
-
getExpandedDays: () =>
|
|
453
|
-
(t, s) =>
|
|
452
|
+
getExpandedDays: () => o.current.days.filter(
|
|
453
|
+
(t, s) => o.current.expanded[M(t, s)] === !0
|
|
454
454
|
).map(D),
|
|
455
|
-
getHasPrevious: () =>
|
|
456
|
-
getHasNext: () =>
|
|
455
|
+
getHasPrevious: () => o.current.hasPrevious,
|
|
456
|
+
getHasNext: () => o.current.hasNext,
|
|
457
457
|
selectSlot: (t) => {
|
|
458
|
-
const s =
|
|
458
|
+
const s = o.current;
|
|
459
459
|
if (s.isInteractionSuppressed) return !1;
|
|
460
|
-
for (const
|
|
461
|
-
const d =
|
|
460
|
+
for (const n of s.days) {
|
|
461
|
+
const d = n.slots.find((u) => u.id === t);
|
|
462
462
|
if (d)
|
|
463
|
-
return d.available === !1 ? !1 : (s.handleSlotClick(d,
|
|
463
|
+
return d.available === !1 ? !1 : (s.handleSlotClick(d, n), !0);
|
|
464
464
|
}
|
|
465
465
|
return !1;
|
|
466
466
|
},
|
|
467
467
|
nextDays: () => {
|
|
468
|
-
const t =
|
|
468
|
+
const t = o.current;
|
|
469
469
|
return !t.hasNext || t.isInteractionSuppressed || !t.onNextDays ? !1 : (t.onNextDays(), !0);
|
|
470
470
|
},
|
|
471
471
|
previousDays: () => {
|
|
472
|
-
const t =
|
|
472
|
+
const t = o.current;
|
|
473
473
|
return !t.hasPrevious || t.isInteractionSuppressed || !t.onPreviousDays ? !1 : (t.onPreviousDays(), !0);
|
|
474
474
|
},
|
|
475
475
|
showMoreDay: (t) => {
|
|
476
|
-
const s =
|
|
476
|
+
const s = o.current;
|
|
477
477
|
if (s.isInteractionSuppressed) return !1;
|
|
478
|
-
const
|
|
478
|
+
const n = s.days.findIndex(
|
|
479
479
|
(u) => D(u) === t
|
|
480
480
|
);
|
|
481
|
-
if (
|
|
482
|
-
const d = s.days[
|
|
483
|
-
return s.handleShowMore(d,
|
|
481
|
+
if (n < 0) return !1;
|
|
482
|
+
const d = s.days[n];
|
|
483
|
+
return s.handleShowMore(d, M(d, n)), !0;
|
|
484
484
|
}
|
|
485
485
|
}),
|
|
486
486
|
[]
|
|
487
487
|
);
|
|
488
488
|
Se(Ge, ce, I);
|
|
489
|
-
const P =
|
|
489
|
+
const P = Ce(e.length || 1), _ = ze({ cols: P });
|
|
490
490
|
let S;
|
|
491
491
|
return E ? S = /* @__PURE__ */ r(
|
|
492
492
|
"div",
|
|
@@ -497,14 +497,14 @@ const je = ye(
|
|
|
497
497
|
"aria-live": "polite",
|
|
498
498
|
"aria-label": p("common.loading"),
|
|
499
499
|
children: Array.from({ length: P }, (t, s) => /* @__PURE__ */ k("div", { className: X(), children: [
|
|
500
|
-
/* @__PURE__ */ r(W, { variant: "text", size:
|
|
500
|
+
/* @__PURE__ */ r(W, { variant: "text", size: i, width: "60%" }),
|
|
501
501
|
/* @__PURE__ */ r("div", { className: J(), children: Array.from(
|
|
502
502
|
{ length: Math.min(c, 4) },
|
|
503
|
-
(
|
|
503
|
+
(n, d) => /* @__PURE__ */ r(
|
|
504
504
|
W,
|
|
505
505
|
{
|
|
506
506
|
variant: "rounded",
|
|
507
|
-
size:
|
|
507
|
+
size: i,
|
|
508
508
|
height: "40px"
|
|
509
509
|
},
|
|
510
510
|
`loading-slot-${s}-${d}`
|
|
@@ -512,13 +512,13 @@ const je = ye(
|
|
|
512
512
|
) })
|
|
513
513
|
] }, `loading-col-${s}`))
|
|
514
514
|
}
|
|
515
|
-
) :
|
|
515
|
+
) : oe ? S = /* @__PURE__ */ r("div", { "data-state": "empty", children: /* @__PURE__ */ r(xe, { variant: "no-results", title: p("slotGrid.noSlots") }) }) : S = /* @__PURE__ */ r(
|
|
516
516
|
"div",
|
|
517
517
|
{
|
|
518
518
|
className: _,
|
|
519
519
|
"data-state": V ? "disabled" : "default",
|
|
520
520
|
children: e.map((t, s) => {
|
|
521
|
-
const
|
|
521
|
+
const n = M(t, s), d = t.label ?? Q(h(t.date), G, v), u = `${ie}-day-${s}-header`, A = B[n] ?? !1 ? t.slots : t.slots.slice(0, c), $ = t.slots.length - A.length, H = t.slots.length === 0;
|
|
522
522
|
return (
|
|
523
523
|
// Use a plain <div role="group"> rather than <section> — a
|
|
524
524
|
// <section> with aria-labelledby is a landmark, and nesting many
|
|
@@ -532,45 +532,45 @@ const je = ye(
|
|
|
532
532
|
"aria-labelledby": u,
|
|
533
533
|
"data-empty": H || void 0,
|
|
534
534
|
children: [
|
|
535
|
-
/* @__PURE__ */ r("h3", { id: u, className:
|
|
535
|
+
/* @__PURE__ */ r("h3", { id: u, className: Re({ size: i }), children: d }),
|
|
536
536
|
H ? /* @__PURE__ */ r("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: p("slotGrid.noSlots") }) : null,
|
|
537
|
-
/* @__PURE__ */ r("ul", { className: J(), children: A.map((
|
|
537
|
+
/* @__PURE__ */ r("ul", { className: J(), children: A.map((m) => {
|
|
538
538
|
const ue = Be(
|
|
539
|
-
|
|
539
|
+
m,
|
|
540
540
|
t,
|
|
541
541
|
G,
|
|
542
542
|
v,
|
|
543
|
-
({ time:
|
|
544
|
-
), pe = l ===
|
|
543
|
+
({ time: N, day: fe }) => p("slotGrid.slotLabel", { time: N, day: fe })
|
|
544
|
+
), pe = l === m.id, O = m.available === !1 || f;
|
|
545
545
|
return /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
546
546
|
"button",
|
|
547
547
|
{
|
|
548
548
|
type: "button",
|
|
549
|
-
className:
|
|
549
|
+
className: Le({ size: i }),
|
|
550
550
|
"aria-label": ue,
|
|
551
551
|
"aria-pressed": pe,
|
|
552
552
|
disabled: O,
|
|
553
553
|
"aria-disabled": O || void 0,
|
|
554
|
-
"data-slot-id":
|
|
555
|
-
onClick: () => x(
|
|
556
|
-
onKeyDown: (
|
|
557
|
-
children: U(
|
|
554
|
+
"data-slot-id": m.id,
|
|
555
|
+
onClick: () => x(m, t),
|
|
556
|
+
onKeyDown: (N) => le(N, m, t),
|
|
557
|
+
children: U(m, G, v)
|
|
558
558
|
}
|
|
559
|
-
) },
|
|
559
|
+
) }, m.id);
|
|
560
560
|
}) }),
|
|
561
561
|
$ > 0 ? /* @__PURE__ */ r(
|
|
562
562
|
F,
|
|
563
563
|
{
|
|
564
564
|
intent: "ghost",
|
|
565
|
-
size:
|
|
566
|
-
onClick: () => j(t,
|
|
565
|
+
size: i === "lg" ? "md" : "sm",
|
|
566
|
+
onClick: () => j(t, n),
|
|
567
567
|
disabled: f,
|
|
568
568
|
children: p("slotGrid.showMore", { count: $ })
|
|
569
569
|
}
|
|
570
570
|
) : null
|
|
571
571
|
]
|
|
572
572
|
},
|
|
573
|
-
|
|
573
|
+
n
|
|
574
574
|
)
|
|
575
575
|
);
|
|
576
576
|
})
|
|
@@ -582,30 +582,31 @@ const je = ye(
|
|
|
582
582
|
id: I,
|
|
583
583
|
role: "region",
|
|
584
584
|
"aria-label": de,
|
|
585
|
-
className:
|
|
585
|
+
className: Ne({ size: i, className: te }),
|
|
586
586
|
"data-component": "slot-grid",
|
|
587
587
|
"data-component-id": I,
|
|
588
588
|
"data-state": a,
|
|
589
589
|
...se,
|
|
590
590
|
children: [
|
|
591
|
-
/* @__PURE__ */ k("div", { className:
|
|
591
|
+
/* @__PURE__ */ k("div", { className: Ke(), children: [
|
|
592
592
|
/* @__PURE__ */ r(
|
|
593
593
|
q,
|
|
594
594
|
{
|
|
595
595
|
icon: /* @__PURE__ */ r(Ee, {}),
|
|
596
596
|
"aria-label": p("slotGrid.previousDays"),
|
|
597
|
-
|
|
597
|
+
className: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
|
|
598
|
+
size: i === "lg" ? "md" : "sm",
|
|
598
599
|
intent: "ghost",
|
|
599
600
|
flipIconInRtl: !0,
|
|
600
|
-
disabled: !
|
|
601
|
-
onClick:
|
|
601
|
+
disabled: !z || f,
|
|
602
|
+
onClick: R
|
|
602
603
|
}
|
|
603
604
|
),
|
|
604
605
|
Y ? /* @__PURE__ */ r(
|
|
605
606
|
F,
|
|
606
607
|
{
|
|
607
608
|
intent: "secondary",
|
|
608
|
-
size:
|
|
609
|
+
size: i === "lg" ? "md" : "sm",
|
|
609
610
|
disabled: f,
|
|
610
611
|
onClick: ee,
|
|
611
612
|
children: p("slotGrid.nextAvailable")
|
|
@@ -616,11 +617,12 @@ const je = ye(
|
|
|
616
617
|
{
|
|
617
618
|
icon: /* @__PURE__ */ r(Ve, {}),
|
|
618
619
|
"aria-label": p("slotGrid.nextDays"),
|
|
619
|
-
|
|
620
|
+
className: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
|
|
621
|
+
size: i === "lg" ? "md" : "sm",
|
|
620
622
|
intent: "ghost",
|
|
621
623
|
flipIconInRtl: !0,
|
|
622
|
-
disabled: !
|
|
623
|
-
onClick:
|
|
624
|
+
disabled: !C || f,
|
|
625
|
+
onClick: L
|
|
624
626
|
}
|
|
625
627
|
)
|
|
626
628
|
] }),
|
|
@@ -637,4 +639,4 @@ export {
|
|
|
637
639
|
Qe as i,
|
|
638
640
|
Ge as s
|
|
639
641
|
};
|
|
640
|
-
//# sourceMappingURL=slot-grid-
|
|
642
|
+
//# sourceMappingURL=slot-grid-DrwynKeN.js.map
|