@alfadocs/ui-kit 1.3.13 → 1.4.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.
- package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
- package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
- package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-BA631X4t.js} +2209 -2144
- package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
- package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
- package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
- package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
- package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
- package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
- package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
- package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
- package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
- package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
- package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
- package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
- package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
- package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
- package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
- package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
- package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
- package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
- package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
- package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
- package/dist/_chunks/format-4HNwNGrN.js +1315 -0
- package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
- package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
- package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
- package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
- package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
- package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
- package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
- package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
- package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
- package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
- package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
- package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
- package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
- package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
- package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
- package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
- package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
- package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
- package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
- package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
- package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
- package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
- package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
- package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
- package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
- package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
- package/dist/_chunks/progress-CK8otcQ-.js +343 -0
- package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
- package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
- package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
- package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
- package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
- package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
- package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
- package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
- package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
- package/dist/_chunks/subDays-CAUv47M1.js +8 -0
- package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
- package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
- package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
- package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
- package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
- package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
- package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
- package/dist/agent-catalog.json +6426 -3382
- package/dist/agent-i18n/en.json +234 -15
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +14 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
- package/dist/components/cycle-calculator/index.d.ts +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
- package/dist/components/fetal-weight/index.d.ts +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
- package/dist/components/gestational-age-calculator/index.d.ts +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
- package/dist/components/hcg-doubling/index.d.ts +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +13 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts +9 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +22 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +2 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-form/index.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +32 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.d.ts +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
- package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
- package/dist/components/pregnancy-weight-gain/index.js +6 -5
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress.d.ts +13 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/slot-grid/index.d.ts +2 -1
- package/dist/components/slot-grid/index.js +5 -4
- package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
- package/dist/components/slot-grid/slot-grid.d.ts +34 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +10 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +13 -0
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/index.js +630 -627
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
- package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
- package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
- package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
- package/dist/patterns/anamnesis/index.d.ts +3 -2
- package/dist/patterns/anamnesis/index.js +7 -6
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
- package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
- package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
- package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
- package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
- package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
- package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
- package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
- package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
- package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
- package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
- package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
- package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
- package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
- package/dist/_chunks/progress-DA413-zn.js +0 -299
- package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
- package/dist/_chunks/subDays-BcNi04uf.js +0 -8
- package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
|
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as ce, useId as le, useMemo as M, useRef as R, useState as x, useEffect as V, useCallback as l, useImperativeHandle as ue } from "react";
|
|
3
3
|
import { c as i } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as me } from "react-i18next";
|
|
5
|
-
import { P as ge } from "./pdf-viewer-
|
|
5
|
+
import { P as ge } from "./pdf-viewer-DUIsV9s5.js";
|
|
6
6
|
import { S as pe } from "./signature-capture-D6ut9_IR.js";
|
|
7
7
|
import { u as fe } from "./registry-DvAUVLHh.js";
|
|
8
8
|
import { C as Z } from "./circle-check-BN6rz4NV.js";
|
|
@@ -367,4 +367,4 @@ export {
|
|
|
367
367
|
je as S,
|
|
368
368
|
ve as s
|
|
369
369
|
};
|
|
370
|
-
//# sourceMappingURL=sign-document-
|
|
370
|
+
//# sourceMappingURL=sign-document-jF4fZDJ5.js.map
|
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import { jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ye, useId as he, useState as me, useCallback as M, useRef as ge, useEffect as ve, useMemo as be } from "react";
|
|
3
|
+
import { c as m } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as we } from "react-i18next";
|
|
5
|
+
import { B as F } from "./button-CPGiR_bH.js";
|
|
6
|
+
import { I as q } from "./icon-button-C_kbcd7I.js";
|
|
7
|
+
import { E as xe } from "./empty-state-CrLsi0XI.js";
|
|
8
|
+
import { S as W } from "./skeleton-CZbwyJAA.js";
|
|
9
|
+
import { u as Se } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { b as ke, f as De } from "./format-4HNwNGrN.js";
|
|
11
|
+
import { p as Ie } from "./parseISO-fOGpHKXm.js";
|
|
12
|
+
const Ge = {
|
|
13
|
+
id: "slot-grid",
|
|
14
|
+
// pick → `select_slot` + the `selectedSlotId` state slot.
|
|
15
|
+
// range_navigate → `next_days` / `previous_days` + `hasNext` / `hasPrevious`.
|
|
16
|
+
// expand → `show_more_day` + the `expandedDays` state slot.
|
|
17
|
+
//
|
|
18
|
+
// Host-delegated, deliberately WITHOUT an action: the optional
|
|
19
|
+
// "Next available" CTA (`showNextAvailable` + `onJumpToNextAvailable`)
|
|
20
|
+
// stays a native click on the toolbar button. It is a consumer-owned
|
|
21
|
+
// jump to a window the grid has not been given, so the agent reaches it
|
|
22
|
+
// through the DOM, or by reading `slotsByDay` and paging with
|
|
23
|
+
// `next_days` until availability appears.
|
|
24
|
+
capabilities: ["pick", "range_navigate", "expand"],
|
|
25
|
+
state: {
|
|
26
|
+
status: {
|
|
27
|
+
type: "'default' | 'loading' | 'disabled' | 'empty'",
|
|
28
|
+
descriptionKey: "ui.agent.slotGrid.state.status",
|
|
29
|
+
description: 'Visual state of the grid. Read this before concluding "no availability" — `loading` means the window has not resolved yet.',
|
|
30
|
+
read: (e) => e.getStatus()
|
|
31
|
+
},
|
|
32
|
+
selectedSlotId: {
|
|
33
|
+
type: "string | null",
|
|
34
|
+
descriptionKey: "ui.agent.slotGrid.state.selectedSlotId",
|
|
35
|
+
description: "Id of the slot the consumer has committed as selected, or null. Reflects the controlled `selectedSlotId` prop, not an internal choice.",
|
|
36
|
+
read: (e) => e.getSelectedSlotId()
|
|
37
|
+
},
|
|
38
|
+
visibleDays: {
|
|
39
|
+
type: "string[]",
|
|
40
|
+
descriptionKey: "ui.agent.slotGrid.state.visibleDays",
|
|
41
|
+
description: "Calendar days currently rendered as columns, as `yyyy-MM-dd` keys in display order.",
|
|
42
|
+
read: (e) => e.getVisibleDays()
|
|
43
|
+
},
|
|
44
|
+
slotsByDay: {
|
|
45
|
+
type: "Record<string, string[]>",
|
|
46
|
+
descriptionKey: "ui.agent.slotGrid.state.slotsByDay",
|
|
47
|
+
description: 'Map of day key (`yyyy-MM-dd`) to the ids of that day’s bookable slots. Ids only — never slot or patient objects. Includes slots still collapsed behind "Show more".',
|
|
48
|
+
read: (e) => e.getSlotsByDay()
|
|
49
|
+
},
|
|
50
|
+
expandedDays: {
|
|
51
|
+
type: "string[]",
|
|
52
|
+
descriptionKey: "ui.agent.slotGrid.state.expandedDays",
|
|
53
|
+
description: 'Day keys whose "Show more" control has been used, so every slot for that day is rendered.',
|
|
54
|
+
read: (e) => e.getExpandedDays()
|
|
55
|
+
},
|
|
56
|
+
hasPrevious: {
|
|
57
|
+
type: "boolean",
|
|
58
|
+
descriptionKey: "ui.agent.slotGrid.state.hasPrevious",
|
|
59
|
+
description: 'True when an earlier window of days exists — the "previous days" arrow is offered.',
|
|
60
|
+
read: (e) => e.getHasPrevious()
|
|
61
|
+
},
|
|
62
|
+
hasNext: {
|
|
63
|
+
type: "boolean",
|
|
64
|
+
descriptionKey: "ui.agent.slotGrid.state.hasNext",
|
|
65
|
+
description: 'True when a later window of days exists — the "next days" arrow is offered.',
|
|
66
|
+
read: (e) => e.getHasNext()
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
actions: {
|
|
70
|
+
select_slot: {
|
|
71
|
+
// Fires the consumer's `onSlotSelect`, exactly as a click on the slot
|
|
72
|
+
// button does. Persistent in the consumer's booking draft, and
|
|
73
|
+
// reversible by selecting another slot — `write`, not `phi`: a slot is
|
|
74
|
+
// availability, not patient data.
|
|
75
|
+
safety: "write",
|
|
76
|
+
argsType: "{ slotId: string }",
|
|
77
|
+
argsSchema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
slotId: {
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "Id of the slot to select. Must be one of the ids returned by the `slotsByDay` state slot."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
required: ["slotId"]
|
|
86
|
+
},
|
|
87
|
+
idempotent: !0,
|
|
88
|
+
returns: "boolean",
|
|
89
|
+
returnsSchema: {
|
|
90
|
+
type: "boolean",
|
|
91
|
+
description: "True when the selection callback fired."
|
|
92
|
+
},
|
|
93
|
+
errors: [
|
|
94
|
+
"Returns false when no slot with that id is in the visible window — page with next_days / previous_days first.",
|
|
95
|
+
"Returns false when the slot is unavailable, or the grid is loading or disabled."
|
|
96
|
+
],
|
|
97
|
+
descriptionKey: "ui.agent.slotGrid.actions.selectSlot",
|
|
98
|
+
description: "Select an available slot by id. Emits the same selection the user would by clicking the slot button.",
|
|
99
|
+
examples: [
|
|
100
|
+
{
|
|
101
|
+
args: { slotId: "avail-2026-09-01-0930" },
|
|
102
|
+
note: "Book the 09:30 slot on 1 September."
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
invoke: (e, a) => e.selectSlot(a.slotId)
|
|
106
|
+
},
|
|
107
|
+
next_days: {
|
|
108
|
+
// View-window paging only — the consumer fetches, nothing is persisted.
|
|
109
|
+
safety: "read",
|
|
110
|
+
returns: "boolean",
|
|
111
|
+
returnsSchema: {
|
|
112
|
+
type: "boolean",
|
|
113
|
+
description: "True when the paging callback fired."
|
|
114
|
+
},
|
|
115
|
+
errors: [
|
|
116
|
+
"Returns false when `hasNext` is false, or the grid is loading or disabled."
|
|
117
|
+
],
|
|
118
|
+
descriptionKey: "ui.agent.slotGrid.actions.nextDays",
|
|
119
|
+
description: 'Page the visible window forward to the next group of days, as the "next days" arrow does.',
|
|
120
|
+
invoke: (e) => e.nextDays()
|
|
121
|
+
},
|
|
122
|
+
previous_days: {
|
|
123
|
+
safety: "read",
|
|
124
|
+
returns: "boolean",
|
|
125
|
+
returnsSchema: {
|
|
126
|
+
type: "boolean",
|
|
127
|
+
description: "True when the paging callback fired."
|
|
128
|
+
},
|
|
129
|
+
errors: [
|
|
130
|
+
"Returns false when `hasPrevious` is false, or the grid is loading or disabled."
|
|
131
|
+
],
|
|
132
|
+
descriptionKey: "ui.agent.slotGrid.actions.previousDays",
|
|
133
|
+
description: 'Page the visible window back to the previous group of days, as the "previous days" arrow does.',
|
|
134
|
+
invoke: (e) => e.previousDays()
|
|
135
|
+
},
|
|
136
|
+
show_more_day: {
|
|
137
|
+
// Reveals slots the grid already holds — ephemeral disclosure state.
|
|
138
|
+
safety: "read",
|
|
139
|
+
argsType: "{ dayKey: string }",
|
|
140
|
+
argsSchema: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: {
|
|
143
|
+
dayKey: {
|
|
144
|
+
type: "string",
|
|
145
|
+
pattern: "^\\d{4}-\\d{2}-\\d{2}$",
|
|
146
|
+
description: "Day to expand, as a `yyyy-MM-dd` key from the `visibleDays` state slot."
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
required: ["dayKey"]
|
|
150
|
+
},
|
|
151
|
+
idempotent: !0,
|
|
152
|
+
returns: "boolean",
|
|
153
|
+
returnsSchema: {
|
|
154
|
+
type: "boolean",
|
|
155
|
+
description: "True when the day was expanded."
|
|
156
|
+
},
|
|
157
|
+
errors: [
|
|
158
|
+
"Returns false when the day key is not one of the visible columns, or the grid is loading or disabled."
|
|
159
|
+
],
|
|
160
|
+
descriptionKey: "ui.agent.slotGrid.actions.showMoreDay",
|
|
161
|
+
description: 'Render every slot for one day, as the day’s "Show more" button does. Only affects what is on screen — `slotsByDay` already lists collapsed slots.',
|
|
162
|
+
examples: [
|
|
163
|
+
{
|
|
164
|
+
args: { dayKey: "2026-09-01" },
|
|
165
|
+
note: "Reveal the rest of 1 September so every slot button is clickable."
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
invoke: (e, a) => e.showMoreDay(a.dayKey)
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
domHooks: {
|
|
172
|
+
root: {
|
|
173
|
+
attr: "data-component",
|
|
174
|
+
value: "slot-grid",
|
|
175
|
+
description: "Marks the SlotGrid region. Emits `data-state` reflecting the public `state` prop (default / loading / disabled / empty)."
|
|
176
|
+
},
|
|
177
|
+
instanceId: {
|
|
178
|
+
attr: "data-component-id",
|
|
179
|
+
sourceProp: "id",
|
|
180
|
+
description: "Sourced from the `id` prop. Also the registry key — without an `id` the instance does not register, so the handle-driven actions are unreachable and only the DOM channel works."
|
|
181
|
+
},
|
|
182
|
+
item: {
|
|
183
|
+
attr: "data-slot-id",
|
|
184
|
+
sourceProp: "days[].slots[].id",
|
|
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
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}, Ke = m(
|
|
189
|
+
[
|
|
190
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
191
|
+
"ds:text-[var(--foreground)]",
|
|
192
|
+
"ds:w-full"
|
|
193
|
+
].join(" "),
|
|
194
|
+
{
|
|
195
|
+
variants: {
|
|
196
|
+
size: {
|
|
197
|
+
sm: "ds:text-[length:var(--font-size-sm)]",
|
|
198
|
+
md: "ds:text-[length:var(--font-size-base)]",
|
|
199
|
+
lg: "ds:text-[length:var(--font-size-lg)]"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
defaultVariants: { size: "md" }
|
|
203
|
+
}
|
|
204
|
+
), Me = m(
|
|
205
|
+
"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full"
|
|
206
|
+
), Ne = 12, Ce = m(
|
|
207
|
+
"ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start",
|
|
208
|
+
{
|
|
209
|
+
variants: {
|
|
210
|
+
cols: {
|
|
211
|
+
1: "ds:grid-cols-1",
|
|
212
|
+
2: "ds:grid-cols-2",
|
|
213
|
+
3: "ds:grid-cols-3",
|
|
214
|
+
4: "ds:grid-cols-4",
|
|
215
|
+
5: "ds:grid-cols-5",
|
|
216
|
+
6: "ds:grid-cols-6",
|
|
217
|
+
7: "ds:grid-cols-7",
|
|
218
|
+
8: "ds:grid-cols-8",
|
|
219
|
+
9: "ds:grid-cols-9",
|
|
220
|
+
10: "ds:grid-cols-10",
|
|
221
|
+
11: "ds:grid-cols-11",
|
|
222
|
+
12: "ds:grid-cols-12"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
defaultVariants: { cols: 1 }
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
function Re(e) {
|
|
229
|
+
return Math.max(1, Math.min(e, Ne));
|
|
230
|
+
}
|
|
231
|
+
const X = m(
|
|
232
|
+
[
|
|
233
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
234
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
235
|
+
"ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
|
|
236
|
+
"ds:rounded-[var(--radius-md)]",
|
|
237
|
+
"ds:bg-[var(--card)]",
|
|
238
|
+
"ds:min-w-0"
|
|
239
|
+
].join(" ")
|
|
240
|
+
), Le = m(
|
|
241
|
+
[
|
|
242
|
+
"ds:font-[var(--font-weight-semibold)]",
|
|
243
|
+
"ds:text-[var(--foreground)]",
|
|
244
|
+
"ds:text-start",
|
|
245
|
+
"ds:truncate"
|
|
246
|
+
].join(" "),
|
|
247
|
+
{
|
|
248
|
+
variants: {
|
|
249
|
+
size: {
|
|
250
|
+
sm: "ds:text-[length:var(--font-size-xs)]",
|
|
251
|
+
md: "ds:text-[length:var(--font-size-sm)]",
|
|
252
|
+
lg: "ds:text-[length:var(--font-size-base)]"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
defaultVariants: { size: "md" }
|
|
256
|
+
}
|
|
257
|
+
), J = m(
|
|
258
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none"
|
|
259
|
+
), ze = m(
|
|
260
|
+
[
|
|
261
|
+
"ds:inline-flex ds:items-center ds:justify-center",
|
|
262
|
+
"ds:w-full",
|
|
263
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
264
|
+
"ds:font-[var(--font-weight-medium)]",
|
|
265
|
+
"ds:bg-[var(--secondary)]",
|
|
266
|
+
"ds:shadow-[var(--shadow-sm)]",
|
|
267
|
+
"ds:text-[var(--foreground)]",
|
|
268
|
+
"ds:transition-[background-color,color,box-shadow]",
|
|
269
|
+
"ds:duration-[var(--animation-duration)]",
|
|
270
|
+
"ds:motion-reduce:transition-none",
|
|
271
|
+
"ds:focus-visible:outline-[var(--focus-ring-width)]",
|
|
272
|
+
"ds:focus-visible:outline-solid",
|
|
273
|
+
"ds:focus-visible:outline-[var(--ring)]",
|
|
274
|
+
"ds:focus-visible:outline-offset-[var(--focus-ring-offset)]",
|
|
275
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
276
|
+
"ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none",
|
|
277
|
+
"ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none",
|
|
278
|
+
"ds:hover:enabled:shadow-[var(--shadow-md)]",
|
|
279
|
+
"ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]"
|
|
280
|
+
].join(" "),
|
|
281
|
+
{
|
|
282
|
+
variants: {
|
|
283
|
+
size: {
|
|
284
|
+
sm: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8",
|
|
285
|
+
md: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10",
|
|
286
|
+
lg: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
defaultVariants: { size: "md" }
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
function h(e) {
|
|
293
|
+
return e instanceof Date ? e : Ie(e);
|
|
294
|
+
}
|
|
295
|
+
function N(e, a) {
|
|
296
|
+
return `${h(e.date).toISOString()}-${a}`;
|
|
297
|
+
}
|
|
298
|
+
function D(e) {
|
|
299
|
+
return De(h(e.date), "yyyy-MM-dd");
|
|
300
|
+
}
|
|
301
|
+
function Qe(e, a) {
|
|
302
|
+
return ke(h(e), h(a));
|
|
303
|
+
}
|
|
304
|
+
function Ue(e) {
|
|
305
|
+
for (const a of e) {
|
|
306
|
+
const o = a.slots.find((l) => l.available !== !1);
|
|
307
|
+
if (o) return { day: a, slot: o };
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function Q(e, a, o) {
|
|
311
|
+
try {
|
|
312
|
+
return new Intl.DateTimeFormat(a, {
|
|
313
|
+
weekday: "short",
|
|
314
|
+
month: "short",
|
|
315
|
+
day: "numeric",
|
|
316
|
+
timeZone: o
|
|
317
|
+
}).format(e);
|
|
318
|
+
} catch {
|
|
319
|
+
return new Intl.DateTimeFormat("en", {
|
|
320
|
+
weekday: "short",
|
|
321
|
+
month: "short",
|
|
322
|
+
day: "numeric"
|
|
323
|
+
}).format(e);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
function U(e, a, o) {
|
|
327
|
+
if (e.label !== void 0) return e.label;
|
|
328
|
+
const l = h(e.start);
|
|
329
|
+
try {
|
|
330
|
+
const c = new Intl.DateTimeFormat(a, {
|
|
331
|
+
hour: "numeric",
|
|
332
|
+
minute: "2-digit",
|
|
333
|
+
timeZone: o
|
|
334
|
+
});
|
|
335
|
+
if (e.end) {
|
|
336
|
+
const g = h(e.end);
|
|
337
|
+
if (typeof c.formatRange == "function")
|
|
338
|
+
try {
|
|
339
|
+
return c.formatRange(l, g);
|
|
340
|
+
} catch {
|
|
341
|
+
}
|
|
342
|
+
return `${c.format(l)} – ${c.format(g)}`;
|
|
343
|
+
}
|
|
344
|
+
return c.format(l);
|
|
345
|
+
} catch {
|
|
346
|
+
return l.toISOString();
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
function Be(e, a, o, l, c) {
|
|
350
|
+
if (e.ariaLabel !== void 0) return e.ariaLabel;
|
|
351
|
+
const g = U(e, o, l), v = a.label !== void 0 ? a.label : Q(h(a.date), o, l);
|
|
352
|
+
return c({ time: g, day: v });
|
|
353
|
+
}
|
|
354
|
+
function Ee() {
|
|
355
|
+
return /* @__PURE__ */ r(
|
|
356
|
+
"svg",
|
|
357
|
+
{
|
|
358
|
+
"aria-hidden": "true",
|
|
359
|
+
viewBox: "0 0 24 24",
|
|
360
|
+
fill: "none",
|
|
361
|
+
stroke: "currentColor",
|
|
362
|
+
strokeWidth: "2",
|
|
363
|
+
strokeLinecap: "round",
|
|
364
|
+
strokeLinejoin: "round",
|
|
365
|
+
className: "ds:size-4",
|
|
366
|
+
children: /* @__PURE__ */ r("path", { d: "M15 18l-6-6 6-6" })
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
function Ve() {
|
|
371
|
+
return /* @__PURE__ */ r(
|
|
372
|
+
"svg",
|
|
373
|
+
{
|
|
374
|
+
"aria-hidden": "true",
|
|
375
|
+
viewBox: "0 0 24 24",
|
|
376
|
+
fill: "none",
|
|
377
|
+
stroke: "currentColor",
|
|
378
|
+
strokeWidth: "2",
|
|
379
|
+
strokeLinecap: "round",
|
|
380
|
+
strokeLinejoin: "round",
|
|
381
|
+
className: "ds:size-4",
|
|
382
|
+
children: /* @__PURE__ */ r("path", { d: "M9 6l6 6-6 6" })
|
|
383
|
+
}
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
const je = ye(
|
|
387
|
+
({
|
|
388
|
+
days: e,
|
|
389
|
+
state: a = "default",
|
|
390
|
+
size: o = "md",
|
|
391
|
+
selectedSlotId: l,
|
|
392
|
+
maxInitialSlotsPerDay: c = 6,
|
|
393
|
+
locale: g,
|
|
394
|
+
timeZone: v,
|
|
395
|
+
hasPrevious: C = !1,
|
|
396
|
+
hasNext: R = !1,
|
|
397
|
+
showNextAvailable: Y = !1,
|
|
398
|
+
ariaLabel: Z,
|
|
399
|
+
onSlotSelect: b,
|
|
400
|
+
onPreviousDays: L,
|
|
401
|
+
onNextDays: z,
|
|
402
|
+
onShowMore: w,
|
|
403
|
+
onJumpToNextAvailable: ee,
|
|
404
|
+
className: te,
|
|
405
|
+
id: I,
|
|
406
|
+
...se
|
|
407
|
+
}, ae) => {
|
|
408
|
+
const { t: p, i18n: re } = we(), G = g ?? re.language ?? "en", oe = he(), [B, ie] = me({}), E = a === "loading", V = a === "disabled", f = E || V, ne = a === "empty" || e.length === 0 || e.every((t) => t.slots.length === 0), de = Z ?? p("slotGrid.ariaLabel"), x = M(
|
|
409
|
+
(t, s) => {
|
|
410
|
+
f || t.available !== !1 && (b == null || b(t, s));
|
|
411
|
+
},
|
|
412
|
+
[f, b]
|
|
413
|
+
), j = M(
|
|
414
|
+
(t, s) => {
|
|
415
|
+
ie((i) => ({ ...i, [s]: !0 })), w == null || w(t);
|
|
416
|
+
},
|
|
417
|
+
[w]
|
|
418
|
+
), le = M(
|
|
419
|
+
(t, s, i) => {
|
|
420
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), x(s, i));
|
|
421
|
+
},
|
|
422
|
+
[x]
|
|
423
|
+
), T = {
|
|
424
|
+
days: e,
|
|
425
|
+
selectedSlotId: l,
|
|
426
|
+
hasPrevious: C,
|
|
427
|
+
hasNext: R,
|
|
428
|
+
state: a,
|
|
429
|
+
expanded: B,
|
|
430
|
+
isInteractionSuppressed: f,
|
|
431
|
+
onPreviousDays: L,
|
|
432
|
+
onNextDays: z,
|
|
433
|
+
handleSlotClick: x,
|
|
434
|
+
handleShowMore: j
|
|
435
|
+
}, n = ge(T);
|
|
436
|
+
ve(() => {
|
|
437
|
+
n.current = T;
|
|
438
|
+
});
|
|
439
|
+
const ce = be(
|
|
440
|
+
() => ({
|
|
441
|
+
getStatus: () => n.current.state,
|
|
442
|
+
getSelectedSlotId: () => n.current.selectedSlotId ?? null,
|
|
443
|
+
getVisibleDays: () => n.current.days.map(D),
|
|
444
|
+
getSlotsByDay: () => {
|
|
445
|
+
const t = {};
|
|
446
|
+
for (const s of n.current.days) {
|
|
447
|
+
const i = D(s), d = s.slots.filter((u) => u.available !== !1).map((u) => u.id);
|
|
448
|
+
t[i] = t[i] ? [...t[i], ...d] : d;
|
|
449
|
+
}
|
|
450
|
+
return t;
|
|
451
|
+
},
|
|
452
|
+
getExpandedDays: () => n.current.days.filter(
|
|
453
|
+
(t, s) => n.current.expanded[N(t, s)] === !0
|
|
454
|
+
).map(D),
|
|
455
|
+
getHasPrevious: () => n.current.hasPrevious,
|
|
456
|
+
getHasNext: () => n.current.hasNext,
|
|
457
|
+
selectSlot: (t) => {
|
|
458
|
+
const s = n.current;
|
|
459
|
+
if (s.isInteractionSuppressed) return !1;
|
|
460
|
+
for (const i of s.days) {
|
|
461
|
+
const d = i.slots.find((u) => u.id === t);
|
|
462
|
+
if (d)
|
|
463
|
+
return d.available === !1 ? !1 : (s.handleSlotClick(d, i), !0);
|
|
464
|
+
}
|
|
465
|
+
return !1;
|
|
466
|
+
},
|
|
467
|
+
nextDays: () => {
|
|
468
|
+
const t = n.current;
|
|
469
|
+
return !t.hasNext || t.isInteractionSuppressed || !t.onNextDays ? !1 : (t.onNextDays(), !0);
|
|
470
|
+
},
|
|
471
|
+
previousDays: () => {
|
|
472
|
+
const t = n.current;
|
|
473
|
+
return !t.hasPrevious || t.isInteractionSuppressed || !t.onPreviousDays ? !1 : (t.onPreviousDays(), !0);
|
|
474
|
+
},
|
|
475
|
+
showMoreDay: (t) => {
|
|
476
|
+
const s = n.current;
|
|
477
|
+
if (s.isInteractionSuppressed) return !1;
|
|
478
|
+
const i = s.days.findIndex(
|
|
479
|
+
(u) => D(u) === t
|
|
480
|
+
);
|
|
481
|
+
if (i < 0) return !1;
|
|
482
|
+
const d = s.days[i];
|
|
483
|
+
return s.handleShowMore(d, N(d, i)), !0;
|
|
484
|
+
}
|
|
485
|
+
}),
|
|
486
|
+
[]
|
|
487
|
+
);
|
|
488
|
+
Se(Ge, ce, I);
|
|
489
|
+
const P = Re(e.length || 1), _ = Ce({ cols: P });
|
|
490
|
+
let S;
|
|
491
|
+
return E ? S = /* @__PURE__ */ r(
|
|
492
|
+
"div",
|
|
493
|
+
{
|
|
494
|
+
className: _,
|
|
495
|
+
"data-state": "loading",
|
|
496
|
+
role: "status",
|
|
497
|
+
"aria-live": "polite",
|
|
498
|
+
"aria-label": p("common.loading"),
|
|
499
|
+
children: Array.from({ length: P }, (t, s) => /* @__PURE__ */ k("div", { className: X(), children: [
|
|
500
|
+
/* @__PURE__ */ r(W, { variant: "text", size: o, width: "60%" }),
|
|
501
|
+
/* @__PURE__ */ r("div", { className: J(), children: Array.from(
|
|
502
|
+
{ length: Math.min(c, 4) },
|
|
503
|
+
(i, d) => /* @__PURE__ */ r(
|
|
504
|
+
W,
|
|
505
|
+
{
|
|
506
|
+
variant: "rounded",
|
|
507
|
+
size: o,
|
|
508
|
+
height: "40px"
|
|
509
|
+
},
|
|
510
|
+
`loading-slot-${s}-${d}`
|
|
511
|
+
)
|
|
512
|
+
) })
|
|
513
|
+
] }, `loading-col-${s}`))
|
|
514
|
+
}
|
|
515
|
+
) : ne ? S = /* @__PURE__ */ r("div", { "data-state": "empty", children: /* @__PURE__ */ r(xe, { variant: "no-results", title: p("slotGrid.noSlots") }) }) : S = /* @__PURE__ */ r(
|
|
516
|
+
"div",
|
|
517
|
+
{
|
|
518
|
+
className: _,
|
|
519
|
+
"data-state": V ? "disabled" : "default",
|
|
520
|
+
children: e.map((t, s) => {
|
|
521
|
+
const i = N(t, s), d = t.label ?? Q(h(t.date), G, v), u = `${oe}-day-${s}-header`, A = B[i] ?? !1 ? t.slots : t.slots.slice(0, c), $ = t.slots.length - A.length, H = t.slots.length === 0;
|
|
522
|
+
return (
|
|
523
|
+
// Use a plain <div role="group"> rather than <section> — a
|
|
524
|
+
// <section> with aria-labelledby is a landmark, and nesting many
|
|
525
|
+
// landmarks inside the outer slot-grid landmark fails axe's
|
|
526
|
+
// landmark-unique rule.
|
|
527
|
+
/* @__PURE__ */ k(
|
|
528
|
+
"div",
|
|
529
|
+
{
|
|
530
|
+
role: "group",
|
|
531
|
+
className: X(),
|
|
532
|
+
"aria-labelledby": u,
|
|
533
|
+
"data-empty": H || void 0,
|
|
534
|
+
children: [
|
|
535
|
+
/* @__PURE__ */ r("h3", { id: u, className: Le({ size: o }), children: d }),
|
|
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((y) => {
|
|
538
|
+
const ue = Be(
|
|
539
|
+
y,
|
|
540
|
+
t,
|
|
541
|
+
G,
|
|
542
|
+
v,
|
|
543
|
+
({ time: K, day: fe }) => p("slotGrid.slotLabel", { time: K, day: fe })
|
|
544
|
+
), pe = l === y.id, O = y.available === !1 || f;
|
|
545
|
+
return /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
546
|
+
"button",
|
|
547
|
+
{
|
|
548
|
+
type: "button",
|
|
549
|
+
className: ze({ size: o }),
|
|
550
|
+
"aria-label": ue,
|
|
551
|
+
"aria-pressed": pe,
|
|
552
|
+
disabled: O,
|
|
553
|
+
"aria-disabled": O || void 0,
|
|
554
|
+
"data-slot-id": y.id,
|
|
555
|
+
onClick: () => x(y, t),
|
|
556
|
+
onKeyDown: (K) => le(K, y, t),
|
|
557
|
+
children: U(y, G, v)
|
|
558
|
+
}
|
|
559
|
+
) }, y.id);
|
|
560
|
+
}) }),
|
|
561
|
+
$ > 0 ? /* @__PURE__ */ r(
|
|
562
|
+
F,
|
|
563
|
+
{
|
|
564
|
+
intent: "ghost",
|
|
565
|
+
size: o === "lg" ? "md" : "sm",
|
|
566
|
+
onClick: () => j(t, i),
|
|
567
|
+
disabled: f,
|
|
568
|
+
children: p("slotGrid.showMore", { count: $ })
|
|
569
|
+
}
|
|
570
|
+
) : null
|
|
571
|
+
]
|
|
572
|
+
},
|
|
573
|
+
i
|
|
574
|
+
)
|
|
575
|
+
);
|
|
576
|
+
})
|
|
577
|
+
}
|
|
578
|
+
), /* @__PURE__ */ k(
|
|
579
|
+
"div",
|
|
580
|
+
{
|
|
581
|
+
ref: ae,
|
|
582
|
+
id: I,
|
|
583
|
+
role: "region",
|
|
584
|
+
"aria-label": de,
|
|
585
|
+
className: Ke({ size: o, className: te }),
|
|
586
|
+
"data-component": "slot-grid",
|
|
587
|
+
"data-component-id": I,
|
|
588
|
+
"data-state": a,
|
|
589
|
+
...se,
|
|
590
|
+
children: [
|
|
591
|
+
/* @__PURE__ */ k("div", { className: Me(), children: [
|
|
592
|
+
/* @__PURE__ */ r(
|
|
593
|
+
q,
|
|
594
|
+
{
|
|
595
|
+
icon: /* @__PURE__ */ r(Ee, {}),
|
|
596
|
+
"aria-label": p("slotGrid.previousDays"),
|
|
597
|
+
size: o === "lg" ? "md" : "sm",
|
|
598
|
+
intent: "ghost",
|
|
599
|
+
flipIconInRtl: !0,
|
|
600
|
+
disabled: !C || f,
|
|
601
|
+
onClick: L
|
|
602
|
+
}
|
|
603
|
+
),
|
|
604
|
+
Y ? /* @__PURE__ */ r(
|
|
605
|
+
F,
|
|
606
|
+
{
|
|
607
|
+
intent: "secondary",
|
|
608
|
+
size: o === "lg" ? "md" : "sm",
|
|
609
|
+
disabled: f,
|
|
610
|
+
onClick: ee,
|
|
611
|
+
children: p("slotGrid.nextAvailable")
|
|
612
|
+
}
|
|
613
|
+
) : /* @__PURE__ */ r("span", { "aria-hidden": "true" }),
|
|
614
|
+
/* @__PURE__ */ r(
|
|
615
|
+
q,
|
|
616
|
+
{
|
|
617
|
+
icon: /* @__PURE__ */ r(Ve, {}),
|
|
618
|
+
"aria-label": p("slotGrid.nextDays"),
|
|
619
|
+
size: o === "lg" ? "md" : "sm",
|
|
620
|
+
intent: "ghost",
|
|
621
|
+
flipIconInRtl: !0,
|
|
622
|
+
disabled: !R || f,
|
|
623
|
+
onClick: z
|
|
624
|
+
}
|
|
625
|
+
)
|
|
626
|
+
] }),
|
|
627
|
+
S
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
);
|
|
633
|
+
je.displayName = "SlotGrid";
|
|
634
|
+
export {
|
|
635
|
+
je as S,
|
|
636
|
+
Ue as f,
|
|
637
|
+
Qe as i,
|
|
638
|
+
Ge as s
|
|
639
|
+
};
|
|
640
|
+
//# sourceMappingURL=slot-grid-DNiUcXy2.js.map
|