@slotted/react 0.1.0-beta.1 → 0.1.0-beta.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/README.md +4 -0
- package/dist/{action-bar-C7cGnEyJ.js → action-bar-OACchRZw.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{action-sheet-D8Glxl7l.js → action-sheet-C60BWUW8.js} +1 -1
- package/dist/action-sheet.js +1 -1
- package/dist/{app-shell-CXwma4XA.js → app-shell-CmYvnu_7.js} +310 -310
- package/dist/app-shell.js +1 -1
- package/dist/button-Db9f3Bxn.js +99 -0
- package/dist/button.js +2 -2
- package/dist/cascader-D1AhTyBL.js +1097 -0
- package/dist/cascader.js +1 -1
- package/dist/chart-O0ZhkzJe.js +966 -0
- package/dist/chart.js +1 -1
- package/dist/{checkbox-CwUOc-3u.js → checkbox-DfxFHZaU.js} +3 -3
- package/dist/{checkbox-group-BYTjgAcX.js → checkbox-group-9sDgrV5Z.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{color-picker-BlPR4g4H.js → color-picker-CwbWzCKg.js} +4 -4
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-CNZ7Xk5_.js → column-manager-CTtizVhm.js} +6 -6
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-C46GRqAA.js → combobox-BVMI9lg8.js} +296 -292
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-BqRyNR9Y.js → command-palette-DFLbSOiv.js} +1 -1
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-DMiHdggw.js → context-menu-BuST6W94.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/currency-field-DD9A5U3D.js +455 -0
- package/dist/currency-field.js +1 -1
- package/dist/dashboard-grid-CBMP_-JV.js +1043 -0
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-BUgOJuGp.js → data-grid-BKaGMqIm.js} +19 -19
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-2xfDpHVC.js → data-list-oICmxGkA.js} +5 -5
- package/dist/data-list.js +1 -1
- package/dist/{date-field-D_kLLTfL.js → date-field-CYcN6diW.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/date-picker-4X-_2ltN.js +264 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-CNOAtHwU.js +471 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-T1gNdJ7t.js → datetime-field-B8TrmsDK.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/datetime-picker-HDVlUhzy.js +629 -0
- package/dist/datetime-picker.js +1 -1
- package/dist/datetime-range-picker-IqOFJtdW.js +994 -0
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{dialog-Dmy-m_pe.js → dialog-BHYDDj1S.js} +112 -113
- package/dist/dialog.js +1 -1
- package/dist/docs/AGENTS.snippet.md +10 -0
- package/dist/docs/app-shell.json +1 -1
- package/dist/docs/button-group.json +1 -0
- package/dist/docs/button-group.md +1 -1
- package/dist/docs/button.json +45 -11
- package/dist/docs/button.md +10 -6
- package/dist/docs/chart.json +7 -0
- package/dist/docs/chart.md +1 -0
- package/dist/docs/currency-field.json +32 -1
- package/dist/docs/currency-field.md +4 -1
- package/dist/docs/dialog.examples.md +26 -0
- package/dist/docs/dialog.json +14 -2
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/event-calendar.json +7 -0
- package/dist/docs/event-calendar.md +1 -0
- package/dist/docs/guidelines/README.md +27 -0
- package/dist/docs/guidelines/async-feedback.md +108 -0
- package/dist/docs/guidelines/browsing.md +74 -0
- package/dist/docs/guidelines/builders.md +97 -0
- package/dist/docs/guidelines/composition.md +129 -0
- package/dist/docs/guidelines/conversations.md +59 -0
- package/dist/docs/guidelines/errors-and-conflicts.md +71 -0
- package/dist/docs/guidelines/forms.md +192 -0
- package/dist/docs/guidelines/index.md +121 -0
- package/dist/docs/guidelines/layout-alignment.md +95 -0
- package/dist/docs/guidelines/ledgers.md +45 -0
- package/dist/docs/guidelines/list-pages.md +165 -0
- package/dist/docs/guidelines/overviews.md +66 -0
- package/dist/docs/guidelines/own-elements.md +115 -0
- package/dist/docs/guidelines/reading-permissions.md +55 -0
- package/dist/docs/guidelines/record-pages.md +178 -0
- package/dist/docs/guidelines/reports.md +123 -0
- package/dist/docs/guidelines/shell-composition.md +94 -0
- package/dist/docs/guidelines/workspaces.md +46 -0
- package/dist/docs/index.md +12 -0
- package/dist/docs/list.json +26 -1
- package/dist/docs/list.md +4 -1
- package/dist/docs/popover.json +1 -1
- package/dist/docs/progress-indicator.json +1 -2
- package/dist/docs/progress-indicator.md +2 -2
- package/dist/docs/segmented-control.json +29 -1
- package/dist/docs/segmented-control.md +17 -1
- package/dist/docs/side-navigation.json +2 -2
- package/dist/docs/side-navigation.md +19 -4
- package/dist/docs/skills/build-own-element/SKILL.md +90 -0
- package/dist/docs/skills/compose-screen/SKILL.md +76 -0
- package/dist/docs/skills/index.md +9 -0
- package/dist/docs/skills/review-screen/SKILL.md +70 -0
- package/dist/docs/skills/theme-app/SKILL.md +79 -0
- package/dist/docs/skills/waiting-states/SKILL.md +139 -0
- package/dist/docs/split-button.json +1 -0
- package/dist/docs/split-button.md +1 -1
- package/dist/docs/stat-card.json +2 -0
- package/dist/docs/stat-card.md +1 -1
- package/dist/docs/table.examples.md +1 -1
- package/dist/docs/table.json +78 -2
- package/dist/docs/table.md +12 -1
- package/dist/docs/tabs.examples.md +1 -1
- package/dist/docs/tabs.json +2 -5
- package/dist/docs/tabs.md +1 -1
- package/dist/docs/toggle-group.json +14 -3
- package/dist/docs/toggle-group.md +3 -3
- package/dist/docs/toggle.json +12 -3
- package/dist/docs/toggle.md +3 -3
- package/dist/docs/tokens.md +448 -0
- package/dist/docs/top-navigation.examples.md +23 -5
- package/dist/docs/top-navigation.json +2 -2
- package/dist/docs/tour.json +1 -1
- package/dist/drawer-LXM44eso.js +757 -0
- package/dist/drawer.js +1 -1
- package/dist/entity-picker-CPDd73JR.js +1110 -0
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-BFdeGfC-.js → event-calendar-CnF3iIZD.js} +391 -390
- package/dist/event-calendar.js +1 -1
- package/dist/{field-BJh5HI7w.js → field-NJaCxl2h.js} +1 -1
- package/dist/{field-group-BDaspQPh.js → field-group-hAzVa2O9.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-b2Q9BZHf.js → filter-bar-D_xDcAp2.js} +20 -20
- package/dist/filter-bar.js +1 -1
- package/dist/{hover-card-CSDbA6zd.js → hover-card-BJE5dtaQ.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/{icon-button-TnvMhK4o.js → icon-button-CCWkCDMs.js} +26 -24
- package/dist/import-export-center-DpY2DGBZ.js +813 -0
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +85 -84
- package/dist/{list-C1Y8MWp2.js → list-WsQ6ZzCa.js} +16 -12
- package/dist/{list-item-DN_mcouU.js → list-item-DpCwZIrd.js} +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.js +1 -1
- package/dist/{listbox-4WvqR0JF.js → listbox-Dv856z9I.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{loading-overlay-B83XFctM.js → loading-overlay-COfnckse.js} +73 -73
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-CpfDn1LF.js → markdown-CeG8mUbI.js} +2 -2
- package/dist/markdown.js +1 -1
- package/dist/menu-parts-W58pVNUt.js +786 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-CtGavUTO.js → menubar-b2CruimJ.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-CfzsvAeI.js → multi-select-DQ5ds0fX.js} +432 -437
- package/dist/multi-select.js +1 -1
- package/dist/{notification-center-C4pEHJ3h.js → notification-center-Sz54IziY.js} +2 -2
- package/dist/notification-center.js +1 -1
- package/dist/{number-field-J_koud1r.js → number-field-BFIAmv-z.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-Bf8JUiVR.js → otp-input-BNQhuKaT.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/popover-Be7JWbGJ.js +475 -0
- package/dist/popover.js +1 -1
- package/dist/press-selection-DjOllE2B.js +29 -0
- package/dist/press-selection.js +2 -0
- package/dist/{prompt-composer-B7MMcER0.js → prompt-composer-BxpdkTpZ.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-BFpjhDkV.js → radio-group-BaVIP9UH.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-D1EsADFM.js → rating-DYBQBzwB.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-BueW-Lyb.js → saved-views-DlE_--Z9.js} +5 -5
- package/dist/saved-views.js +1 -1
- package/dist/{segmented-control-Cy_5D3Nj.js → segmented-control-DmuOGiu6.js} +28 -24
- package/dist/segmented-control.js +1 -1
- package/dist/{select-UTwKjheK.js → select-DOFqPy26.js} +334 -347
- package/dist/select.js +1 -1
- package/dist/{side-navigation-YUiJRpng.js → side-navigation-CBLtCzuJ.js} +186 -187
- package/dist/side-navigation.js +1 -1
- package/dist/{slider-B432T6nD.js → slider-DTes4HLF.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-DHF3v3PJ.js → split-button-CPgHiy9G.js} +2 -2
- package/dist/split-button.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{switch-4MHwKmkz.js → switch-DQzuIhPX.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-CzBIw9ng.js → table-Cipi2c5X.js} +206 -173
- package/dist/table.js +2 -2
- package/dist/{tags-input-DLdHLWrH.js → tags-input-CcOkm0AW.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-BktZbmzD.js → text-field-DLfIZ0fk.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-JAK2RJl0.js → textarea-CBJBJBi6.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-DCG_VtGO.js → time-field-DrhiCtUl.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-DuT1tf5-.js → time-picker-CRQsMJbQ.js} +102 -102
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-HwBvrrXN.js → time-range-picker-DlZJsj1e.js} +202 -202
- package/dist/time-range-picker.js +1 -1
- package/dist/{toast-wI8BtPY5.js → toast-Bf3e0AgC.js} +157 -157
- package/dist/toast.js +1 -1
- package/dist/toggle-group-7iBR9Rn1.js +142 -0
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-CDQTydDx.js → toolbar-DDZpEftQ.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{tooltip-BggqPDcW.js → tooltip-DbKTPe_i.js} +108 -109
- package/dist/tooltip.js +1 -1
- package/dist/{top-navigation-COQZsNqW.js → top-navigation-e-tWMGNr.js} +255 -256
- package/dist/top-navigation.js +1 -1
- package/dist/{tour-C11DmYTC.js → tour-BTdt716T.js} +180 -180
- package/dist/tour.js +1 -1
- package/dist/{transfer-JA9TWjAw.js → transfer-CqZOTLMP.js} +6 -6
- package/dist/transfer.js +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +1 -1
- package/dist/types/button/button-link.d.ts +1 -1
- package/dist/types/button/button-link.d.ts.map +1 -1
- package/dist/types/button/button-root.d.ts +5 -3
- package/dist/types/button/button-root.d.ts.map +1 -1
- package/dist/types/button/button.constants.d.ts +2 -1
- package/dist/types/button/button.constants.d.ts.map +1 -1
- package/dist/types/button/button.d.ts +1 -1
- package/dist/types/button/button.d.ts.map +1 -1
- package/dist/types/button/button.types.d.ts +9 -2
- package/dist/types/button/button.types.d.ts.map +1 -1
- package/dist/types/button/index.d.ts +1 -1
- package/dist/types/button/index.d.ts.map +1 -1
- package/dist/types/button/toggle-button.d.ts +1 -1
- package/dist/types/button/toggle-button.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/combobox/combobox-collection.d.ts +1 -0
- package/dist/types/combobox/combobox-collection.d.ts.map +1 -1
- package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
- package/dist/types/combobox/combobox.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.d.ts +1 -1
- package/dist/types/currency-field/currency-field.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.types.d.ts +14 -0
- package/dist/types/currency-field/currency-field.types.d.ts.map +1 -1
- package/dist/types/currency-field/index.d.ts +1 -1
- package/dist/types/currency-field/index.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
- package/dist/types/dialog/dialog-demo.d.ts +8 -0
- package/dist/types/dialog/dialog-demo.d.ts.map +1 -1
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/event-calendar/event-calendar.d.ts +1 -1
- package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/types/event-calendar/event-calendar.types.d.ts +6 -0
- package/dist/types/event-calendar/event-calendar.types.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/list/index.d.ts +1 -1
- package/dist/types/list/index.d.ts.map +1 -1
- package/dist/types/list/list-parts.d.ts +1 -1
- package/dist/types/list/list-parts.d.ts.map +1 -1
- package/dist/types/list/list.types.d.ts +12 -0
- package/dist/types/list/list.types.d.ts.map +1 -1
- package/dist/types/menu/menu.types.d.ts +3 -1
- package/dist/types/menu/menu.types.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-collection.d.ts +0 -2
- package/dist/types/multi-select/multi-select-collection.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select.d.ts.map +1 -1
- package/dist/types/press-selection/index.d.ts +3 -0
- package/dist/types/press-selection/index.d.ts.map +1 -0
- package/dist/types/press-selection/press-selection.d.ts +23 -0
- package/dist/types/press-selection/press-selection.d.ts.map +1 -0
- package/dist/types/segmented-control/index.d.ts +1 -1
- package/dist/types/segmented-control/index.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control-defaults.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control.d.ts +1 -1
- package/dist/types/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control.types.d.ts +10 -0
- package/dist/types/segmented-control/segmented-control.types.d.ts.map +1 -1
- package/dist/types/select/select-collection.d.ts +0 -2
- package/dist/types/select/select-collection.d.ts.map +1 -1
- package/dist/types/select/select.d.ts.map +1 -1
- package/dist/types/table/index.d.ts +2 -2
- package/dist/types/table/index.d.ts.map +1 -1
- package/dist/types/table/table-parts.d.ts +8 -2
- package/dist/types/table/table-parts.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +28 -1
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/types/toggle/toggle.types.d.ts +1 -1
- package/dist/types/toggle/toggle.types.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts +6 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts.map +1 -1
- package/dist/{upload-Bq_UiyMr.js → upload-DjnlVR8y.js} +2 -2
- package/dist/upload.js +1 -1
- package/dist/{wizard-B4GrlEqh.js → wizard-BxA08vXt.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +12 -7
- package/dist/button-DakQ-7Tm.js +0 -97
- package/dist/cascader-CARCYdHh.js +0 -1097
- package/dist/chart-BNzfIfQe.js +0 -948
- package/dist/currency-field-B7OZ0hk7.js +0 -436
- package/dist/dashboard-grid-nfhEewA4.js +0 -1005
- package/dist/date-picker-DQ5SIhdA.js +0 -264
- package/dist/date-range-picker-lpB08hK_.js +0 -471
- package/dist/datetime-picker-0F0kDW-8.js +0 -629
- package/dist/datetime-range-picker-ClnEleth.js +0 -994
- package/dist/drawer-Ci3wuCVa.js +0 -758
- package/dist/entity-picker-UGhbVwkC.js +0 -1111
- package/dist/import-export-center-D8xbCLWs.js +0 -813
- package/dist/menu-parts-BQej6eU9.js +0 -787
- package/dist/popover-DE22lSpV.js +0 -476
- package/dist/react-dom-DzrKNxo6.js +0 -273
- package/dist/toggle-group-DQBlI1TV.js +0 -140
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
|
-
import { _ as n, n as r, r as i, t as a } from "./menu-parts-
|
|
2
|
+
import { _ as n, n as r, r as i, t as a } from "./menu-parts-W58pVNUt.js";
|
|
3
3
|
import { n as o, r as s } from "./i18n-DpW8lqJ1.js";
|
|
4
|
-
import { a as c, c as l, n as u, o as d, r as f, s as p, t as m, u as h } from "./drawer-
|
|
4
|
+
import { a as c, c as l, n as u, o as d, r as f, s as p, t as m, u as h } from "./drawer-LXM44eso.js";
|
|
5
5
|
import { n as g } from "./progress-indicator-DwvUSFFs.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { a as _, c as v, f as ee, i as te, l as ne, o as re, p as ie, r as ae, u as oe } from "./popover-
|
|
8
|
-
import { n as se, r as y, t as ce } from "./context-menu-
|
|
9
|
-
import { a as le, t as ue } from "./segmented-control-
|
|
10
|
-
import { createContext as de, createElement as fe, useCallback as b, useContext as pe, useEffect as
|
|
7
|
+
import { a as _, c as v, f as ee, i as te, l as ne, o as re, p as ie, r as ae, u as oe } from "./popover-Be7JWbGJ.js";
|
|
8
|
+
import { n as se, r as y, t as ce } from "./context-menu-BuST6W94.js";
|
|
9
|
+
import { a as le, t as ue } from "./segmented-control-DmuOGiu6.js";
|
|
10
|
+
import { createContext as de, createElement as fe, useCallback as b, useContext as pe, useEffect as me, useId as he, useImperativeHandle as ge, useLayoutEffect as _e, useMemo as x, useRef as S, useState as C } from "react";
|
|
11
11
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
12
12
|
import { eventCalendarMessages as ve } from "@slotted/core/i18n";
|
|
13
13
|
import { COMPACT_BELOW as ye, createWidthGate as be } from "@slotted/core/measure";
|
|
14
14
|
import { getLiveAnnouncer as xe } from "@slotted/core/live-announcer";
|
|
15
15
|
import { addDays as Se, compareDate as Ce, compareDateTime as we, createDateFormat as Te, daysBetween as Ee, isPlainDateTime as D, isSameDate as O, isoWeekNumber as De, nowDateTimeIn as Oe, plainDateTime as ke, secondsOfDay as Ae, timeOfSeconds as je, toISODate as k, todayIn as Me } from "@slotted/core/date";
|
|
16
|
-
import { calendarColor as Ne, contextSlot as Pe, formatHour as Fe, formatOccurrence as Ie, formatTime as
|
|
16
|
+
import { calendarColor as Ne, contextSlot as Pe, formatHour as Fe, formatOccurrence as Ie, formatTime as Le, formatTimeRange as Re, isMultiDay as ze, isWorkingDay as Be, layoutColumn as Ve, layoutRow as He, listDayParts as Ue, listDays as We, moveDate as Ge, movePlacement as Ke, nextAllowedPlacement as qe, occurrenceTimes as Je, occurrenceWhen as Ye, occurrencesIn as Xe, occurrencesOn as Ze, offHoursOn as Qe, offsetChangeOn as $e, overflowByDay as et, placeOccurrence as tt, placementOf as nt, resizePlacement as rt, slotMinutes as it, stepView as at, viewRange as ot, viewTitle as st, withPlacement as ct, zoneLabel as lt } from "@slotted/core/event-calendar";
|
|
17
17
|
//#region src/event-calendar/event-calendar-context.ts
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
let e = pe(
|
|
18
|
+
var ut = de(null);
|
|
19
|
+
function A() {
|
|
20
|
+
let e = pe(ut);
|
|
21
21
|
if (e === null) throw Error("An event calendar part has to be inside EventCalendar.");
|
|
22
22
|
return e;
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/event-calendar/event-calendar-defaults.tsx
|
|
26
|
-
var
|
|
26
|
+
var dt = {
|
|
27
27
|
compact: "list",
|
|
28
28
|
dayHours: [0, 24],
|
|
29
29
|
firstDayOfWeek: void 0,
|
|
@@ -43,29 +43,29 @@ var ut = {
|
|
|
43
43
|
timeZone: void 0,
|
|
44
44
|
weekends: "shown",
|
|
45
45
|
weekNumbers: !1
|
|
46
|
-
},
|
|
47
|
-
function
|
|
48
|
-
return pe(
|
|
46
|
+
}, ft = de(dt);
|
|
47
|
+
function pt() {
|
|
48
|
+
return pe(ft);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
let n = { ...
|
|
50
|
+
function mt({ children: e, ...t }) {
|
|
51
|
+
let n = { ...pt() };
|
|
52
52
|
for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
|
|
53
|
-
return /* @__PURE__ */ T(
|
|
53
|
+
return /* @__PURE__ */ T(ft.Provider, {
|
|
54
54
|
value: n,
|
|
55
55
|
children: e
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/event-calendar/event-calendar-event.tsx
|
|
60
|
-
function
|
|
60
|
+
function ht(e, t, n) {
|
|
61
61
|
if (t.allDay) return e.t("allDay");
|
|
62
62
|
let r = {
|
|
63
63
|
locale: e.locale,
|
|
64
64
|
hourCycle: e.hourCycle
|
|
65
|
-
}, { start: i, end: a } =
|
|
66
|
-
return i !== null && a !== null ?
|
|
65
|
+
}, { start: i, end: a } = Je(t, n);
|
|
66
|
+
return i !== null && a !== null ? Re(i, a, r) : i === null ? a === null ? e.t("allDay") : e.t("until", { time: Le(a, r) }) : e.t("from", { time: Le(i, r) });
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function gt(e, t, n) {
|
|
69
69
|
let r = [
|
|
70
70
|
Ie(t, {
|
|
71
71
|
locale: e.locale,
|
|
@@ -80,11 +80,11 @@ function ht(e, t, n) {
|
|
|
80
80
|
].filter((e) => e !== void 0 && e !== "");
|
|
81
81
|
return `, ${new Intl.ListFormat(e.locale, { type: "unit" }).format(r)}`;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
let p =
|
|
83
|
+
function _t({ clippedEnd: n, clippedStart: r, continuesAfter: i, continuesBefore: a, date: o, inGrid: s, layout: c, occurrence: l, short: u, style: d, withLocation: f }) {
|
|
84
|
+
let p = A(), { event: m } = l, h = l.key, g = p.openKey === h, _ = p.colorOf(m.calendar), v = c === "bar", ee = b((e) => p.registerEvent(h, e), [h, p.registerEvent]), te = c !== "bar" || !l.allDay, ne = c === "lane" || v && !l.allDay ? Le(l.start.time, {
|
|
85
85
|
locale: p.locale,
|
|
86
86
|
hourCycle: p.hourCycle
|
|
87
|
-
}) :
|
|
87
|
+
}) : ht(p, l, o), re = /* @__PURE__ */ E(w, { children: [
|
|
88
88
|
te && !(v && l.allDay) ? /* @__PURE__ */ T("span", {
|
|
89
89
|
"data-part": "event-time",
|
|
90
90
|
children: ne
|
|
@@ -130,7 +130,7 @@ function gt({ clippedEnd: n, clippedStart: r, continuesAfter: i, continuesBefore
|
|
|
130
130
|
ie,
|
|
131
131
|
/* @__PURE__ */ T("span", {
|
|
132
132
|
"data-part": "event-meta",
|
|
133
|
-
children:
|
|
133
|
+
children: gt(p, l, a === !0)
|
|
134
134
|
}),
|
|
135
135
|
c === "bar" && i === !0 ? y("end") : null,
|
|
136
136
|
se ? /* @__PURE__ */ T("span", {
|
|
@@ -159,8 +159,8 @@ function gt({ clippedEnd: n, clippedStart: r, continuesAfter: i, continuesBefore
|
|
|
159
159
|
}
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/event-calendar/event-calendar-list.tsx
|
|
162
|
-
function
|
|
163
|
-
let i =
|
|
162
|
+
function vt({ days: e, empty: t, emptyText: n, occurrences: r }) {
|
|
163
|
+
let i = A(), a = We(r, e), o = `h${Math.min(6, i.headingLevel + 1)}`;
|
|
164
164
|
return a.length === 0 ? /* @__PURE__ */ T("div", {
|
|
165
165
|
"data-part": "list",
|
|
166
166
|
children: /* @__PURE__ */ E("div", {
|
|
@@ -170,7 +170,7 @@ function _t({ days: e, empty: t, emptyText: n, occurrences: r }) {
|
|
|
170
170
|
}) : /* @__PURE__ */ T("div", {
|
|
171
171
|
"data-part": "list",
|
|
172
172
|
children: a.map((e) => {
|
|
173
|
-
let t = k(e.date), n = `${i.id}-list-${t}`, r =
|
|
173
|
+
let t = k(e.date), n = `${i.id}-list-${t}`, r = Ue(e.date, i.locale);
|
|
174
174
|
return /* @__PURE__ */ E("section", {
|
|
175
175
|
"aria-labelledby": n,
|
|
176
176
|
"data-date": t,
|
|
@@ -193,7 +193,7 @@ function _t({ days: e, empty: t, emptyText: n, occurrences: r }) {
|
|
|
193
193
|
] })), /* @__PURE__ */ T("ul", {
|
|
194
194
|
"data-part": "list-events",
|
|
195
195
|
role: "list",
|
|
196
|
-
children: e.occurrences.map((t) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(
|
|
196
|
+
children: e.occurrences.map((t) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(_t, {
|
|
197
197
|
date: e.date,
|
|
198
198
|
inGrid: !1,
|
|
199
199
|
layout: "list",
|
|
@@ -207,18 +207,18 @@ function _t({ days: e, empty: t, emptyText: n, occurrences: r }) {
|
|
|
207
207
|
}
|
|
208
208
|
//#endregion
|
|
209
209
|
//#region src/event-calendar/event-calendar-month.tsx
|
|
210
|
-
function
|
|
210
|
+
function yt(e, t, n) {
|
|
211
211
|
if (e === null || D(e.start) || !n) return !1;
|
|
212
212
|
let { start: r, end: i } = e;
|
|
213
213
|
return Ce(t, r) >= 0 && Ce(t, i) <= 0;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function bt(e, t, n) {
|
|
216
216
|
return new Intl.DateTimeFormat(e.locale, {
|
|
217
217
|
timeZone: "UTC",
|
|
218
218
|
weekday: n
|
|
219
219
|
}).format(new Date(Date.UTC(t.year, t.month - 1, t.day)));
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function j(e, t) {
|
|
222
222
|
return new Intl.DateTimeFormat(e.locale, {
|
|
223
223
|
timeZone: "UTC",
|
|
224
224
|
weekday: "long",
|
|
@@ -226,8 +226,8 @@ function M(e, t) {
|
|
|
226
226
|
day: "numeric"
|
|
227
227
|
}).format(new Date(Date.UTC(t.year, t.month - 1, t.day)));
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
let i =
|
|
229
|
+
function xt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
|
|
230
|
+
let i = A(), a = r[0] ?? [], o = i.pendingSelection ?? i.selection;
|
|
231
231
|
return /* @__PURE__ */ E("table", {
|
|
232
232
|
"aria-labelledby": n,
|
|
233
233
|
"data-part": "month",
|
|
@@ -242,13 +242,13 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
|
|
|
242
242
|
children: i.t("weekNumber")
|
|
243
243
|
})
|
|
244
244
|
}) : null, a.map((e) => /* @__PURE__ */ T("th", {
|
|
245
|
-
abbr:
|
|
245
|
+
abbr: bt(i, e, "long"),
|
|
246
246
|
"data-part": "weekday",
|
|
247
247
|
scope: "col",
|
|
248
|
-
children:
|
|
248
|
+
children: bt(i, e, "short")
|
|
249
249
|
}, k(e)))]
|
|
250
250
|
}) }), /* @__PURE__ */ T("tbody", { children: r.map((n) => {
|
|
251
|
-
let { segments: r } =
|
|
251
|
+
let { segments: r } = He(t, n, {}), a = et(r, n.length, i.maxEvents), s = n[0];
|
|
252
252
|
return /* @__PURE__ */ E("tr", {
|
|
253
253
|
"data-part": "week",
|
|
254
254
|
style: { "--slotted-event-calendar-lanes": i.maxEvents },
|
|
@@ -257,12 +257,12 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
|
|
|
257
257
|
scope: "row",
|
|
258
258
|
children: De(s)
|
|
259
259
|
}) : null, n.map((n, s) => {
|
|
260
|
-
let c = k(n), l = `${i.id}-day-${c}`, u = `${l}-count`, d = r.filter((e) => e.start === s && e.lane < i.maxEvents), f = r.filter((e) => e.start < s && e.start + e.span > s && e.lane < i.maxEvents), p =
|
|
260
|
+
let c = k(n), l = `${i.id}-day-${c}`, u = `${l}-count`, d = r.filter((e) => e.start === s && e.lane < i.maxEvents), f = r.filter((e) => e.start < s && e.start + e.span > s && e.lane < i.maxEvents), p = Ze(t, n).length, m = yt(o, n, !0), h = i.renderDayContent?.(n, { view: "month" }), g = a[s] ?? 0;
|
|
261
261
|
return /* @__PURE__ */ E("td", {
|
|
262
262
|
"aria-labelledby": `${l} ${u}`,
|
|
263
263
|
"aria-selected": i.selectionMode === "range" ? m : void 0,
|
|
264
264
|
"data-date": c,
|
|
265
|
-
"data-non-working":
|
|
265
|
+
"data-non-working": Be(n, i.workingHours) ? void 0 : "",
|
|
266
266
|
"data-outside-month": n.month === e ? void 0 : "",
|
|
267
267
|
"data-part": "day",
|
|
268
268
|
"data-row": "day",
|
|
@@ -274,7 +274,7 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
|
|
|
274
274
|
"data-part": "day-header",
|
|
275
275
|
children: [
|
|
276
276
|
/* @__PURE__ */ T("button", {
|
|
277
|
-
"aria-label":
|
|
277
|
+
"aria-label": j(i, n),
|
|
278
278
|
"aria-haspopup": i.narrow ? "dialog" : void 0,
|
|
279
279
|
"data-part": "day-number",
|
|
280
280
|
id: l,
|
|
@@ -297,8 +297,8 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
|
|
|
297
297
|
"data-part": "day-events",
|
|
298
298
|
children: [
|
|
299
299
|
d.map((e) => {
|
|
300
|
-
let t = e.occurrence.allDay ||
|
|
301
|
-
return /* @__PURE__ */ T(
|
|
300
|
+
let t = e.occurrence.allDay || ze(e.occurrence);
|
|
301
|
+
return /* @__PURE__ */ T(_t, {
|
|
302
302
|
continuesAfter: e.continuesAfter,
|
|
303
303
|
continuesBefore: e.continuesBefore,
|
|
304
304
|
date: n,
|
|
@@ -335,17 +335,17 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
|
|
|
335
335
|
}
|
|
336
336
|
//#endregion
|
|
337
337
|
//#region src/event-calendar/event-calendar-time-grid.tsx
|
|
338
|
-
var
|
|
339
|
-
function
|
|
338
|
+
var St = 64, Ct = 45, wt = 20, M = (e) => Ae(e.time) / 60;
|
|
339
|
+
function Tt(e, t) {
|
|
340
340
|
return {
|
|
341
341
|
direction: e.minutes > 0 ? "forward" : "back",
|
|
342
342
|
hours: Math.abs(e.minutes) / 60,
|
|
343
|
-
at:
|
|
343
|
+
at: Le(e.at, t)
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
let i =
|
|
348
|
-
|
|
346
|
+
function Et({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
347
|
+
let i = A(), [a, o] = i.dayHours, s = S(null), [c, l] = C(null);
|
|
348
|
+
_e(() => {
|
|
349
349
|
let e = s.current?.querySelector("[data-part='column']");
|
|
350
350
|
if (e == null || typeof ResizeObserver > "u") return;
|
|
351
351
|
let t = () => l(e.getBoundingClientRect().width || null);
|
|
@@ -353,9 +353,9 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
353
353
|
let n = new ResizeObserver(t);
|
|
354
354
|
return n.observe(e), () => n.disconnect();
|
|
355
355
|
}, [e.length]);
|
|
356
|
-
let u = c === null ? i.maxColumns : Math.max(1, Math.min(i.maxColumns, Math.floor(c /
|
|
356
|
+
let u = c === null ? i.maxColumns : Math.max(1, Math.min(i.maxColumns, Math.floor(c / St))), d = b((e) => {
|
|
357
357
|
s.current = e, typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
358
|
-
}, [n]), { segments: f, lanes: p } =
|
|
358
|
+
}, [n]), { segments: f, lanes: p } = He(t, e, { allDayOnly: !0 }), m = i.pendingSelection ?? i.selection, h = {
|
|
359
359
|
locale: i.locale,
|
|
360
360
|
hourCycle: i.hourCycle
|
|
361
361
|
}, g = e[0], _ = (e) => O(e, i.date), v = (e) => i.today !== null && O(e, i.today), ee = Array.from({ length: Math.max(0, o - a) }, (e, t) => a + t);
|
|
@@ -376,9 +376,9 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
376
376
|
children: [/* @__PURE__ */ T("div", {
|
|
377
377
|
"data-part": "zone",
|
|
378
378
|
role: "columnheader",
|
|
379
|
-
children:
|
|
379
|
+
children: lt(g, i.timeZone, i.locale)
|
|
380
380
|
}), e.map((e) => {
|
|
381
|
-
let t =
|
|
381
|
+
let t = $e(e, i.timeZone), n = i.renderDayContent?.(e, { view: i.view });
|
|
382
382
|
return /* @__PURE__ */ E("div", {
|
|
383
383
|
"data-date": k(e),
|
|
384
384
|
"data-offset-change": t === null ? void 0 : "",
|
|
@@ -397,7 +397,7 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
397
397
|
}).format(new Date(Date.UTC(e.year, e.month - 1, e.day)))
|
|
398
398
|
}),
|
|
399
399
|
/* @__PURE__ */ T("button", {
|
|
400
|
-
"aria-label":
|
|
400
|
+
"aria-label": j(i, e),
|
|
401
401
|
"data-part": "day-number",
|
|
402
402
|
onClick: (t) => i.drill(e, t.detail === 0 ? "keyboard" : "pointer", t),
|
|
403
403
|
tabIndex: -1,
|
|
@@ -409,10 +409,10 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
409
409
|
children: n
|
|
410
410
|
}),
|
|
411
411
|
t === null ? null : /* @__PURE__ */ T("span", {
|
|
412
|
-
"aria-label": i.t("offsetChange",
|
|
412
|
+
"aria-label": i.t("offsetChange", Tt(t, h)),
|
|
413
413
|
"data-part": "offset-change",
|
|
414
414
|
role: "note",
|
|
415
|
-
children: i.t("offsetChangeShort",
|
|
415
|
+
children: i.t("offsetChangeShort", Tt(t, h))
|
|
416
416
|
})
|
|
417
417
|
]
|
|
418
418
|
}, k(e));
|
|
@@ -426,18 +426,18 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
426
426
|
role: "rowheader",
|
|
427
427
|
children: i.t("allDay")
|
|
428
428
|
}), e.map((e, t) => {
|
|
429
|
-
let n = f.filter((e) => e.start === t), r = f.filter((e) => e.start < t && e.start + e.span > t), a =
|
|
429
|
+
let n = f.filter((e) => e.start === t), r = f.filter((e) => e.start < t && e.start + e.span > t), a = yt(m, e, !0);
|
|
430
430
|
return /* @__PURE__ */ E("div", {
|
|
431
431
|
"aria-selected": i.selectionMode === "range" ? a : void 0,
|
|
432
432
|
"data-date": k(e),
|
|
433
|
-
"data-non-working":
|
|
433
|
+
"data-non-working": Be(e, i.workingHours) ? void 0 : "",
|
|
434
434
|
"data-part": "all-day-cell",
|
|
435
435
|
"data-row": "all-day",
|
|
436
436
|
"data-selected": a ? "" : void 0,
|
|
437
437
|
"data-today": v(e) ? "" : void 0,
|
|
438
438
|
role: "gridcell",
|
|
439
439
|
tabIndex: i.row === "all-day" && _(e) ? 0 : -1,
|
|
440
|
-
children: [n.map((t) => /* @__PURE__ */ T(
|
|
440
|
+
children: [n.map((t) => /* @__PURE__ */ T(_t, {
|
|
441
441
|
continuesAfter: t.continuesAfter,
|
|
442
442
|
continuesBefore: t.continuesBefore,
|
|
443
443
|
date: e,
|
|
@@ -474,22 +474,22 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
474
474
|
children: Fe(e, h)
|
|
475
475
|
}, e))]
|
|
476
476
|
}), e.map((e) => {
|
|
477
|
-
let { items: n, more: r } =
|
|
477
|
+
let { items: n, more: r } = Ve(t, e, {
|
|
478
478
|
startHour: a,
|
|
479
479
|
endHour: o,
|
|
480
480
|
maxColumns: u,
|
|
481
|
-
minLength:
|
|
482
|
-
}), s =
|
|
481
|
+
minLength: wt
|
|
482
|
+
}), s = $e(e, i.timeZone), c = i.now !== null && O(i.now.date, e) ? M(i.now) : null, l = m !== null && D(m.start) && O(m.start.date, e) ? m : null;
|
|
483
483
|
return /* @__PURE__ */ E("div", {
|
|
484
484
|
"data-date": k(e),
|
|
485
|
-
"data-non-working":
|
|
485
|
+
"data-non-working": Be(e, i.workingHours) ? void 0 : "",
|
|
486
486
|
"data-part": "column",
|
|
487
487
|
"data-row": "timed",
|
|
488
488
|
"data-today": v(e) ? "" : void 0,
|
|
489
489
|
role: "gridcell",
|
|
490
490
|
tabIndex: i.row === "timed" && _(e) ? 0 : -1,
|
|
491
491
|
children: [
|
|
492
|
-
|
|
492
|
+
Qe(e, i.workingHours, {
|
|
493
493
|
startHour: a,
|
|
494
494
|
endHour: o
|
|
495
495
|
}).map((e) => /* @__PURE__ */ T("div", {
|
|
@@ -509,12 +509,12 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
509
509
|
"aria-hidden": "true",
|
|
510
510
|
"data-part": "selection",
|
|
511
511
|
style: {
|
|
512
|
-
"--slotted-event-start":
|
|
513
|
-
"--slotted-event-length": (O(l.end.date, e) ?
|
|
512
|
+
"--slotted-event-start": M(l.start) - a * 60,
|
|
513
|
+
"--slotted-event-length": (O(l.end.date, e) ? M(l.end) : 1440) - M(l.start)
|
|
514
514
|
},
|
|
515
|
-
children:
|
|
515
|
+
children: Re(l.start.time, l.end.time, h)
|
|
516
516
|
}),
|
|
517
|
-
n.map((t) => /* @__PURE__ */ T(
|
|
517
|
+
n.map((t) => /* @__PURE__ */ T(_t, {
|
|
518
518
|
clippedEnd: t.clippedEnd,
|
|
519
519
|
clippedStart: t.clippedStart,
|
|
520
520
|
continuesAfter: t.continuesAfter,
|
|
@@ -523,7 +523,7 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
523
523
|
inGrid: !0,
|
|
524
524
|
layout: "block",
|
|
525
525
|
occurrence: t.occurrence,
|
|
526
|
-
short: t.length <
|
|
526
|
+
short: t.length < Ct,
|
|
527
527
|
style: {
|
|
528
528
|
"--slotted-event-start": t.start,
|
|
529
529
|
"--slotted-event-length": t.length,
|
|
@@ -531,7 +531,7 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
531
531
|
"--slotted-event-columns": t.columns,
|
|
532
532
|
"--slotted-event-span": t.span
|
|
533
533
|
},
|
|
534
|
-
withLocation: t.length >=
|
|
534
|
+
withLocation: t.length >= Ct
|
|
535
535
|
}, t.occurrence.key)),
|
|
536
536
|
r.map((t) => /* @__PURE__ */ E("button", {
|
|
537
537
|
"aria-expanded": i.moreDate === k(e),
|
|
@@ -565,13 +565,13 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
|
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
567
|
//#region src/event-calendar/event-calendar.tsx
|
|
568
|
-
var
|
|
568
|
+
var Dt = [
|
|
569
569
|
"month",
|
|
570
570
|
"week",
|
|
571
571
|
"day",
|
|
572
572
|
"list"
|
|
573
|
-
],
|
|
574
|
-
function
|
|
573
|
+
], Ot = "[data-part='day-number'], [data-part='event'], [data-part='more']", kt = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
|
|
574
|
+
function At(e, t, n, r) {
|
|
575
575
|
for (let i of e?.querySelectorAll(`[data-row='${t}'][data-date]`) ?? []) {
|
|
576
576
|
let e = i.getBoundingClientRect();
|
|
577
577
|
if (n >= e.left && n < e.right && (t !== "day" || r >= e.top && r < e.bottom)) {
|
|
@@ -585,17 +585,17 @@ function kt(e, t, n, r) {
|
|
|
585
585
|
}
|
|
586
586
|
return null;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function jt(e, t) {
|
|
589
589
|
return e === null || t === null ? e === t : D(e.start) === D(t.start) ? D(e.start) ? we(e.start, t.start) === 0 && we(e.end, t.end) === 0 : Ce(e.start, t.start) === 0 && Ce(e.end, t.end) === 0 : !1;
|
|
590
590
|
}
|
|
591
|
-
var
|
|
591
|
+
var Mt = (e, t) => Ce(e, t) <= 0 ? {
|
|
592
592
|
start: e,
|
|
593
593
|
end: t
|
|
594
594
|
} : {
|
|
595
595
|
start: t,
|
|
596
596
|
end: e
|
|
597
|
-
},
|
|
598
|
-
function
|
|
597
|
+
}, N = (e, t) => t >= 1440 ? ke(Se(e, 1), je(0)) : ke(e, je(Math.max(0, t) * 60));
|
|
598
|
+
function Nt(e, t, n, r, i, a) {
|
|
599
599
|
if (n(e, t)) return !1;
|
|
600
600
|
let o = !1;
|
|
601
601
|
return a?.(t, {
|
|
@@ -611,7 +611,7 @@ function Mt(e, t, n, r, i, a) {
|
|
|
611
611
|
}
|
|
612
612
|
}), !o;
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function Pt({ when: e }) {
|
|
615
615
|
return /* @__PURE__ */ E(w, { children: [e.day === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("span", {
|
|
616
616
|
"data-part": "detail-day",
|
|
617
617
|
children: [e.day, ","]
|
|
@@ -620,188 +620,189 @@ function Nt({ when: e }) {
|
|
|
620
620
|
children: e.range
|
|
621
621
|
})] });
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function Ft({ handle: e }) {
|
|
624
624
|
return e.current = y(), null;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function It({ element: e }) {
|
|
627
627
|
let t = ie();
|
|
628
|
-
return
|
|
628
|
+
return _e(() => {
|
|
629
629
|
t.setAnchorNode(e);
|
|
630
630
|
}, [e, t.setAnchorNode]), null;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
let
|
|
634
|
-
firstDayOfWeek:
|
|
635
|
-
locale:
|
|
636
|
-
firstDayOfWeek:
|
|
632
|
+
function Lt({ actions: ie, calendars: y = [], className: de, compact: pe, date: Se, dayHours: Ce, defaultDate: we, now: De, defaultOpenEvent: ke, defaultSelection: je, defaultView: Fe, defaultVisibleCalendars: Le, editable: ze = !1, empty: Be, error: Ve, events: He, filter: Ue, firstDayOfWeek: We, fixedWeeks: Je, header: Qe = !0, hourCycle: $e, level: et = 2, listRange: lt, loading: A = !1, loadingDelay: dt, loadingMinDuration: ft, locale: mt, maxColumns: ht, maxEvents: gt, messages: yt, onDateChange: bt, onEventChange: St, canDrop: Ct, onOpenEventChange: wt, onRangeChange: M, onSelectionChange: Tt, onViewChange: Lt, onVisibleCalendarsChange: Rt, openEvent: zt, ref: Bt, render: Vt, renderDayContent: Ht, renderEvent: Ut, renderContextMenu: Wt, renderEventDetail: Gt, scrollTime: Kt, selection: qt, selectionMode: Jt = "none", slotDuration: Yt, style: Xt, timeZone: Zt, view: Qt, views: $t = Dt, visibleCalendars: en, weekends: tn, weekNumbers: nn, workingHours: rn = [], ...an }) {
|
|
633
|
+
let P = pt(), on = he(), sn = `${on}-title`, cn = o(), F = s(ve, yt), I = mt ?? cn, ln = Zt ?? P.timeZone, L = $e ?? P.hourCycle, un = tn ?? P.weekends, dn = Ce ?? P.dayHours, R = it(Yt ?? P.slotDuration), fn = Kt ?? P.scrollTime, pn = Math.max(1, gt ?? P.maxEvents), mn = Math.max(2, ht ?? P.maxColumns), hn = pe ?? P.compact, gn = lt ?? P.listRange, _n = {
|
|
634
|
+
firstDayOfWeek: x(() => Te({
|
|
635
|
+
locale: I,
|
|
636
|
+
firstDayOfWeek: We ?? P.firstDayOfWeek
|
|
637
637
|
}).firstDayOfWeek, [
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
638
|
+
P.firstDayOfWeek,
|
|
639
|
+
We,
|
|
640
|
+
I
|
|
641
641
|
]),
|
|
642
|
-
weekends:
|
|
643
|
-
fixedWeeks:
|
|
644
|
-
listRange:
|
|
645
|
-
}, z = S(null), B = S(null),
|
|
646
|
-
|
|
642
|
+
weekends: un,
|
|
643
|
+
fixedWeeks: Je ?? P.fixedWeeks,
|
|
644
|
+
listRange: gn
|
|
645
|
+
}, z = S(null), B = S(null), vn = S(null), [yn, bn] = C(null), xn = De === void 0;
|
|
646
|
+
me(() => {
|
|
647
|
+
if (!xn) return;
|
|
647
648
|
let e, t = () => {
|
|
648
|
-
|
|
649
|
+
bn(Oe(ln)), e = setTimeout(t, 6e4 - Date.now() % 6e4);
|
|
649
650
|
};
|
|
650
651
|
return t(), () => clearTimeout(e);
|
|
651
|
-
}, [
|
|
652
|
-
let
|
|
653
|
-
let r =
|
|
654
|
-
return r && Se === void 0 &&
|
|
652
|
+
}, [ln, xn]);
|
|
653
|
+
let Sn = De ?? yn, Cn = Sn?.date ?? null, [wn, Tn] = C(() => we ?? Me(ln)), V = Se ?? wn, [En, Dn] = C(Fe ?? $t[0] ?? "month"), H = Qt ?? En, On = x(() => y.map((e) => e.key), [y]), [kn, An] = C(Le ?? null), U = en ?? kn ?? On, [jn, Mn] = C(je ?? null), Nn = qt === void 0 ? jn : qt, [Pn, Fn] = C(ke ?? null), W = zt === void 0 ? Pn : zt, G = b((e, t, n) => {
|
|
654
|
+
let r = Nt(V, e, O, t, n, bt);
|
|
655
|
+
return r && Se === void 0 && Tn(e), r;
|
|
655
656
|
}, [
|
|
656
657
|
V,
|
|
657
658
|
Se,
|
|
658
|
-
|
|
659
|
-
]),
|
|
660
|
-
let r =
|
|
661
|
-
return r &&
|
|
659
|
+
bt
|
|
660
|
+
]), In = b((e, t, n) => {
|
|
661
|
+
let r = Nt(H, e, Object.is, t, n, Lt);
|
|
662
|
+
return r && Qt === void 0 && Dn(e), r;
|
|
662
663
|
}, [
|
|
663
664
|
H,
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
]),
|
|
667
|
-
let r =
|
|
668
|
-
return r &&
|
|
665
|
+
Lt,
|
|
666
|
+
Qt
|
|
667
|
+
]), Ln = b((e, t, n) => {
|
|
668
|
+
let r = Nt(U, e, kt, t, n, Rt);
|
|
669
|
+
return r && en === void 0 && An(e), r;
|
|
669
670
|
}, [
|
|
670
|
-
|
|
671
|
+
Rt,
|
|
671
672
|
U,
|
|
672
|
-
|
|
673
|
-
]),
|
|
674
|
-
let r =
|
|
675
|
-
return r &&
|
|
673
|
+
en
|
|
674
|
+
]), Rn = b((e, t, n) => {
|
|
675
|
+
let r = Nt(Nn, e, jt, t, n, Tt);
|
|
676
|
+
return r && qt === void 0 && Mn(e), r;
|
|
676
677
|
}, [
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
]),
|
|
681
|
-
let r =
|
|
682
|
-
return r &&
|
|
678
|
+
Nn,
|
|
679
|
+
Tt,
|
|
680
|
+
qt
|
|
681
|
+
]), zn = b((e, t, n) => {
|
|
682
|
+
let r = Nt(W, e, Object.is, t, n, wt);
|
|
683
|
+
return r && zt === void 0 && Fn(e), r;
|
|
683
684
|
}, [
|
|
684
685
|
W,
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
]), [
|
|
688
|
-
|
|
686
|
+
wt,
|
|
687
|
+
zt
|
|
688
|
+
]), [Bn, Vn] = C(!1), Hn = S(null), Un = S(null), [Wn, Gn] = C(null);
|
|
689
|
+
me(() => {
|
|
689
690
|
let e = z.current;
|
|
690
691
|
if (e === null) return;
|
|
691
692
|
let t = be(e, {
|
|
692
693
|
at: ye,
|
|
693
|
-
onChange:
|
|
694
|
+
onChange: Vn
|
|
694
695
|
});
|
|
695
|
-
return
|
|
696
|
+
return Vn(t.narrow()), () => t.destroy();
|
|
696
697
|
}, []);
|
|
697
|
-
let
|
|
698
|
-
...
|
|
698
|
+
let Kn = H === "list" || Bn && hn === "list" && (H === "month" || H === "week") ? "list" : "grid", K = Kn === "list" && H !== "list" ? ot("list", V, {
|
|
699
|
+
..._n,
|
|
699
700
|
listRange: H === "month" ? "month" : "week"
|
|
700
|
-
}) :
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
701
|
+
}) : ot(H, V, _n), qn = k(K.start), Jn = k(K.end), Yn = x(() => new Intl.Collator(I), [I]), q = x(() => Xe(He, K.start, K.end, { collator: Yn }).filter((e) => (e.event.calendar === void 0 || !On.includes(e.event.calendar) || U.includes(e.event.calendar)) && (Ue === void 0 || Ue(e))), [
|
|
702
|
+
On,
|
|
703
|
+
Yn,
|
|
704
|
+
He,
|
|
705
|
+
Ue,
|
|
706
|
+
Jn,
|
|
707
|
+
qn,
|
|
707
708
|
U
|
|
708
|
-
]),
|
|
709
|
-
|
|
710
|
-
let e =
|
|
711
|
-
e !== null && (
|
|
709
|
+
]), Xn = b((e) => typeof ze == "function" ? ze(e) : ze, [ze]), [Zn, Qn] = C(null), $n = x(() => Zn === null ? q : ct(q, Zn.key, Zn.placement), [Zn, q]), er = S(null);
|
|
710
|
+
_e(() => {
|
|
711
|
+
let e = er.current;
|
|
712
|
+
e !== null && (er.current = null, z.current?.querySelector(`[data-part='event'][data-key='${CSS.escape(e)}']`)?.focus());
|
|
712
713
|
});
|
|
713
|
-
let
|
|
714
|
+
let tr = b((e, t, n) => ({
|
|
714
715
|
key: e.key,
|
|
715
716
|
event: e.event,
|
|
716
717
|
occurrence: e.start.date,
|
|
717
718
|
recurring: e.recurring,
|
|
718
719
|
kind: n,
|
|
719
|
-
...
|
|
720
|
-
}), []),
|
|
721
|
-
let a = (t) =>
|
|
720
|
+
...tt(t)
|
|
721
|
+
}), []), nr = b((e, t, n) => Ct === void 0 || Ct(tr(e, t, n)), [Ct, tr]), rr = b((e, t, n, r, i) => {
|
|
722
|
+
let a = (t) => tr(e, t, n), o = Nt(a(nt(e)), a(t), (e, t) => JSON.stringify([e.start, e.end]) === JSON.stringify([t.start, t.end]), r, i, St);
|
|
722
723
|
return o && xe().announce(`${e.event.title}, ${Ie({
|
|
723
724
|
...e,
|
|
724
725
|
start: t.start,
|
|
725
726
|
end: t.end
|
|
726
727
|
}, {
|
|
727
|
-
locale:
|
|
728
|
-
hourCycle:
|
|
728
|
+
locale: I,
|
|
729
|
+
hourCycle: L
|
|
729
730
|
})}`), o;
|
|
730
731
|
}, [
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
]),
|
|
736
|
-
locale:
|
|
737
|
-
listRange: H === "list" ?
|
|
738
|
-
}),
|
|
739
|
-
|
|
740
|
-
let e = `${
|
|
741
|
-
|
|
732
|
+
tr,
|
|
733
|
+
St,
|
|
734
|
+
L,
|
|
735
|
+
I
|
|
736
|
+
]), ir = st(H, K, V, {
|
|
737
|
+
locale: I,
|
|
738
|
+
listRange: H === "list" ? gn : void 0
|
|
739
|
+
}), ar = S(null);
|
|
740
|
+
me(() => {
|
|
741
|
+
let e = `${qn}/${Jn}/${H}`;
|
|
742
|
+
ar.current !== e && (ar.current = e, M?.({
|
|
742
743
|
start: K.start,
|
|
743
744
|
end: K.end,
|
|
744
745
|
view: H
|
|
745
746
|
}));
|
|
746
747
|
}, [
|
|
747
748
|
H,
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
749
|
+
M,
|
|
750
|
+
Jn,
|
|
751
|
+
qn
|
|
751
752
|
]);
|
|
752
|
-
let [
|
|
753
|
-
|
|
753
|
+
let [or, sr] = C("timed"), J = S(null);
|
|
754
|
+
_e(() => {
|
|
754
755
|
let e = J.current;
|
|
755
756
|
e !== null && (J.current = null, B.current?.querySelector(`[data-row='${e.row}'][data-date='${e.date}']`)?.focus());
|
|
756
757
|
});
|
|
757
|
-
let
|
|
758
|
-
t === null ?
|
|
759
|
-
}, []), [Y,
|
|
758
|
+
let cr = S(/* @__PURE__ */ new Map()), lr = b((e, t) => {
|
|
759
|
+
t === null ? cr.current.delete(e) : cr.current.set(e, t);
|
|
760
|
+
}, []), [Y, ur] = C(null), [dr, fr] = C(null), X = x(() => W === null ? null : q.find((e) => e.key === W) ?? null, [W, q]), pr = Gt !== void 0, [mr, hr] = C(null), gr = S(null), [Z, Q] = dn, _r = (e, t, n) => {
|
|
760
761
|
let r = e.getBoundingClientRect(), i = (Q - Z) * 60, a = Z * 60 + (t - r.top) / Math.max(1, r.height) * i, o = Math[n](a / R) * R;
|
|
761
762
|
return Math.min(Q * 60, Math.max(Z * 60, o));
|
|
762
|
-
},
|
|
763
|
+
}, vr = b((e) => {
|
|
763
764
|
let t = {
|
|
764
|
-
locale:
|
|
765
|
-
hourCycle:
|
|
765
|
+
locale: I,
|
|
766
|
+
hourCycle: L
|
|
766
767
|
};
|
|
767
|
-
return D(e.start) ? `${
|
|
768
|
-
}, [
|
|
769
|
-
|
|
770
|
-
if (
|
|
768
|
+
return D(e.start) ? `${j({ locale: I }, e.start.date)}, ${Re(e.start.time, e.end.time, t)}` : O(e.start, e.end) ? j({ locale: I }, e.start) : `${j({ locale: I }, e.start)} – ${j({ locale: I }, e.end)}`;
|
|
769
|
+
}, [L, I]), yr = b((e) => xe().announce(F("selected", { text: vr(e) })), [vr, F]);
|
|
770
|
+
me(() => {
|
|
771
|
+
if (mr === null) return;
|
|
771
772
|
let e = (e) => {
|
|
772
|
-
let t =
|
|
773
|
+
let t = gr.current;
|
|
773
774
|
if (t === null) return;
|
|
774
775
|
if (t.kind === "hours") {
|
|
775
|
-
let n =
|
|
776
|
-
|
|
777
|
-
start:
|
|
778
|
-
end:
|
|
776
|
+
let n = _r(t.column, e.clientY, "floor"), r = Math.min(t.anchor, n), i = Math.max(t.anchor, n) + R;
|
|
777
|
+
hr({
|
|
778
|
+
start: N(t.date, r),
|
|
779
|
+
end: N(t.date, Math.min(i, Q * 60))
|
|
779
780
|
});
|
|
780
781
|
return;
|
|
781
782
|
}
|
|
782
|
-
let n =
|
|
783
|
-
n !== null &&
|
|
783
|
+
let n = At(z.current, "day", e.clientX, e.clientY) ?? At(z.current, "all-day", e.clientX, e.clientY);
|
|
784
|
+
n !== null && hr(Mt(t.anchor, n));
|
|
784
785
|
}, t = (e) => {
|
|
785
|
-
let t =
|
|
786
|
-
|
|
786
|
+
let t = mr;
|
|
787
|
+
gr.current = null, hr(null), t !== null && Rn(t, "pointer", e) && yr(t);
|
|
787
788
|
}, n = (e) => {
|
|
788
|
-
e.key === "Escape" && (
|
|
789
|
+
e.key === "Escape" && (gr.current = null, hr(null));
|
|
789
790
|
};
|
|
790
791
|
return document.addEventListener("pointermove", e), document.addEventListener("pointerup", t), document.addEventListener("keydown", n, !0), () => {
|
|
791
792
|
document.removeEventListener("pointermove", e), document.removeEventListener("pointerup", t), document.removeEventListener("keydown", n, !0);
|
|
792
793
|
};
|
|
793
794
|
});
|
|
794
|
-
let
|
|
795
|
+
let br = S(null), xr = S(!1), Sr = (e) => {
|
|
795
796
|
let t = e.target, n = t.closest("[data-part='event'][data-editable]"), r = n?.closest("[data-row]"), i = n?.dataset.key, a = r?.dataset.date;
|
|
796
797
|
if (n == null || r == null) return !1;
|
|
797
798
|
let o = q.find((e) => e.key === i);
|
|
798
799
|
if (o === void 0 || a === void 0) return !1;
|
|
799
800
|
let s = r.dataset.row ?? "", [c, l, u] = a.split("-").map(Number);
|
|
800
|
-
|
|
801
|
+
br.current = {
|
|
801
802
|
occurrence: o,
|
|
802
803
|
kind: t.closest("[data-part='resize-handle']") ? "resize" : "move",
|
|
803
804
|
row: s,
|
|
804
|
-
date:
|
|
805
|
+
date: At(z.current, s, e.clientX, e.clientY) ?? {
|
|
805
806
|
year: c,
|
|
806
807
|
month: l,
|
|
807
808
|
day: u
|
|
@@ -810,31 +811,31 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
810
811
|
x: e.clientX,
|
|
811
812
|
y: e.clientY,
|
|
812
813
|
started: !1,
|
|
813
|
-
placement:
|
|
814
|
+
placement: nt(o),
|
|
814
815
|
invalid: !1
|
|
815
816
|
};
|
|
816
817
|
let d = () => Math.max(1, r.getBoundingClientRect().height / Math.max(1, Q - Z)), f = (e) => {
|
|
817
|
-
let t =
|
|
818
|
+
let t = br.current;
|
|
818
819
|
if (t === null || !t.started && Math.hypot(e.clientX - t.x, e.clientY - t.y) < 4) return;
|
|
819
820
|
t.started = !0;
|
|
820
|
-
let n =
|
|
821
|
+
let n = At(z.current, t.row, e.clientX, e.clientY), r = {
|
|
821
822
|
days: n === null ? 0 : Ee(t.date, n),
|
|
822
823
|
minutes: t.row === "timed" ? Math.round((e.clientY - t.y) / d() * (60 / R)) * R : 0
|
|
823
824
|
};
|
|
824
|
-
t.placement = t.kind === "move" ?
|
|
825
|
+
t.placement = t.kind === "move" ? Ke(nt(t.occurrence), r) : rt(nt(t.occurrence), r, R), t.invalid = !nr(t.occurrence, t.placement, t.kind), Qn({
|
|
825
826
|
key: t.occurrence.key,
|
|
826
827
|
placement: t.placement,
|
|
827
828
|
invalid: t.invalid
|
|
828
829
|
});
|
|
829
830
|
}, p = (e, t) => {
|
|
830
|
-
let n =
|
|
831
|
-
|
|
831
|
+
let n = br.current;
|
|
832
|
+
br.current = null, document.removeEventListener("pointermove", f), document.removeEventListener("pointerup", m), document.removeEventListener("keydown", h, !0), Qn(null), n !== null && n.started && (xr.current = !0, t && !n.invalid && rr(n.occurrence, n.placement, n.kind, "pointer", e));
|
|
832
833
|
}, m = (e) => p(e, !0), h = (e) => {
|
|
833
|
-
e.key === "Escape" &&
|
|
834
|
+
e.key === "Escape" && br.current?.started === !0 && (e.stopPropagation(), p(e, !1));
|
|
834
835
|
};
|
|
835
836
|
return document.addEventListener("pointermove", f), document.addEventListener("pointerup", m), document.addEventListener("keydown", h, !0), !0;
|
|
836
|
-
},
|
|
837
|
-
if (e.button !== 0 ||
|
|
837
|
+
}, Cr = (e) => {
|
|
838
|
+
if (e.button !== 0 || Sr(e) || Jt !== "range") return;
|
|
838
839
|
let t = e.target;
|
|
839
840
|
if (t.closest("button, a, input")) return;
|
|
840
841
|
let n = t.closest("[data-row]"), r = n?.dataset.date;
|
|
@@ -845,29 +846,29 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
845
846
|
day: o
|
|
846
847
|
};
|
|
847
848
|
if (n.dataset.row === "timed") {
|
|
848
|
-
let t =
|
|
849
|
-
|
|
849
|
+
let t = _r(n, e.clientY, "floor");
|
|
850
|
+
gr.current = {
|
|
850
851
|
kind: "hours",
|
|
851
852
|
date: s,
|
|
852
853
|
anchor: t,
|
|
853
854
|
column: n
|
|
854
|
-
},
|
|
855
|
-
start:
|
|
856
|
-
end:
|
|
855
|
+
}, hr({
|
|
856
|
+
start: N(s, t),
|
|
857
|
+
end: N(s, Math.min(t + R, Q * 60))
|
|
857
858
|
});
|
|
858
|
-
} else if (n.dataset.row === "day" || n.dataset.row === "all-day")
|
|
859
|
+
} else if (n.dataset.row === "day" || n.dataset.row === "all-day") gr.current = {
|
|
859
860
|
kind: "days",
|
|
860
861
|
anchor: s
|
|
861
|
-
},
|
|
862
|
+
}, hr({
|
|
862
863
|
start: s,
|
|
863
864
|
end: s
|
|
864
865
|
});
|
|
865
866
|
else return;
|
|
866
867
|
e.preventDefault();
|
|
867
|
-
}, [$,
|
|
868
|
-
|
|
868
|
+
}, [$, wr] = C(null), Tr = S(null), Er = S(null), Dr = (e, t) => {
|
|
869
|
+
Tr.current = null;
|
|
869
870
|
let n = B.current;
|
|
870
|
-
if (
|
|
871
|
+
if (Wt === void 0 || !(e instanceof Element) || n === null || !n.contains(e)) return null;
|
|
871
872
|
let r = e.closest("[data-part='event'][data-key]"), i = r === null ? void 0 : q.find((e) => e.key === r.dataset.key), a;
|
|
872
873
|
if (r !== null && i !== void 0) a = {
|
|
873
874
|
target: {
|
|
@@ -885,9 +886,9 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
885
886
|
month: s,
|
|
886
887
|
day: c
|
|
887
888
|
},
|
|
888
|
-
minute: l && t !== null ?
|
|
889
|
+
minute: l && t !== null ? _r(r, t, "floor") : null,
|
|
889
890
|
timed: l,
|
|
890
|
-
held:
|
|
891
|
+
held: mr ?? Nn,
|
|
891
892
|
slot: R,
|
|
892
893
|
endMinute: Q * 60
|
|
893
894
|
}), d = l && t === null ? r.querySelector("[data-part='selection']") ?? n.querySelector(`[data-part='column-header'][data-date='${i}']`) ?? r : r;
|
|
@@ -899,9 +900,9 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
899
900
|
element: d
|
|
900
901
|
};
|
|
901
902
|
}
|
|
902
|
-
let o =
|
|
903
|
-
return o == null || o === !1 ? null : (
|
|
904
|
-
},
|
|
903
|
+
let o = Wt(a.target);
|
|
904
|
+
return o == null || o === !1 ? null : (Tr.current = a, a);
|
|
905
|
+
}, Or = $ === null ? void 0 : $.target.kind === "event" ? $.target.occurrence.event.title : vr($.target.slot), kr = S(null), Ar = (e, t, n) => {
|
|
905
906
|
if (J.current = {
|
|
906
907
|
date: k(e),
|
|
907
908
|
row: t
|
|
@@ -910,7 +911,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
910
911
|
return;
|
|
911
912
|
}
|
|
912
913
|
G(e, "keyboard", n);
|
|
913
|
-
},
|
|
914
|
+
}, jr = (e) => {
|
|
914
915
|
let t = e.target, n = t.closest("[data-row]");
|
|
915
916
|
if (n === null || !B.current?.contains(n) || n.dataset.row === void 0) return;
|
|
916
917
|
let r = n.dataset.row;
|
|
@@ -931,16 +932,16 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
931
932
|
minutes: 0
|
|
932
933
|
};
|
|
933
934
|
if (c.days === 0 && c.minutes === 0) return;
|
|
934
|
-
let l = e.shiftKey ? "resize" : "move", u =
|
|
935
|
+
let l = e.shiftKey ? "resize" : "move", u = qe(nt(t), c, l, {
|
|
935
936
|
slot: R,
|
|
936
|
-
hours:
|
|
937
|
-
allowed: (e) =>
|
|
937
|
+
hours: dn,
|
|
938
|
+
allowed: (e) => nr(t, e, l)
|
|
938
939
|
});
|
|
939
940
|
if (u === null) {
|
|
940
|
-
xe().announce(
|
|
941
|
+
xe().announce(F("dropInvalid", { title: t.event.title }));
|
|
941
942
|
return;
|
|
942
943
|
}
|
|
943
|
-
|
|
944
|
+
er.current = t.key, rr(t, u, l, "keyboard", e);
|
|
944
945
|
return;
|
|
945
946
|
}
|
|
946
947
|
if (e.key === "Escape" || e.key === "F2") {
|
|
@@ -948,7 +949,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
948
949
|
return;
|
|
949
950
|
}
|
|
950
951
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
951
|
-
let r = [...n.querySelectorAll(
|
|
952
|
+
let r = [...n.querySelectorAll(Ot)], i = r[r.indexOf(t.closest(Ot) ?? t) + (e.key === "ArrowDown" ? 1 : -1)];
|
|
952
953
|
e.preventDefault(), i?.focus();
|
|
953
954
|
}
|
|
954
955
|
return;
|
|
@@ -963,15 +964,15 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
963
964
|
ArrowUp: a ? "up" : void 0,
|
|
964
965
|
ArrowDown: a ? "down" : void 0
|
|
965
966
|
};
|
|
966
|
-
if (r === "timed" && e.shiftKey && (e.key === "ArrowDown" || e.key === "ArrowUp") &&
|
|
967
|
+
if (r === "timed" && e.shiftKey && (e.key === "ArrowDown" || e.key === "ArrowUp") && Jt === "range") {
|
|
967
968
|
e.preventDefault();
|
|
968
|
-
let t =
|
|
969
|
+
let t = Nn;
|
|
969
970
|
if (t === null || !D(t.start) || !O(t.start.date, V)) return;
|
|
970
971
|
let n = Ae(t.start.time) / 60, r = t.end, i = O(r.date, V) ? Ae(r.time) / 60 : 1440, a = Math.min(Q * 60, Math.max(n + R, i + (e.key === "ArrowDown" ? 1 : -1) * R)), o = {
|
|
971
972
|
start: t.start,
|
|
972
|
-
end:
|
|
973
|
+
end: N(V, a)
|
|
973
974
|
};
|
|
974
|
-
|
|
975
|
+
Rn(o, "keyboard", e) && yr(o);
|
|
975
976
|
return;
|
|
976
977
|
}
|
|
977
978
|
if (!a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
@@ -982,7 +983,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
982
983
|
"timed"
|
|
983
984
|
], n = t[t.indexOf(r) + (e.key === "ArrowDown" ? 1 : -1)];
|
|
984
985
|
if (n === void 0) return;
|
|
985
|
-
|
|
986
|
+
sr(n), J.current = {
|
|
986
987
|
date: k(V),
|
|
987
988
|
row: n
|
|
988
989
|
};
|
|
@@ -991,70 +992,70 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
991
992
|
let s = o[e.key];
|
|
992
993
|
if (s !== void 0) {
|
|
993
994
|
e.preventDefault();
|
|
994
|
-
let t =
|
|
995
|
-
if (e.shiftKey &&
|
|
996
|
-
let n =
|
|
997
|
-
|
|
998
|
-
let r =
|
|
999
|
-
|
|
1000
|
-
} else e.shiftKey || (
|
|
1001
|
-
|
|
995
|
+
let t = Ge(H, V, s, _n);
|
|
996
|
+
if (e.shiftKey && Jt === "range" && e.key.startsWith("Arrow") && r !== "timed") {
|
|
997
|
+
let n = kr.current ?? V;
|
|
998
|
+
kr.current = n;
|
|
999
|
+
let r = Mt(n, t);
|
|
1000
|
+
Rn(r, "keyboard", e) && yr(r);
|
|
1001
|
+
} else e.shiftKey || (kr.current = null);
|
|
1002
|
+
Ar(t, r, e);
|
|
1002
1003
|
return;
|
|
1003
1004
|
}
|
|
1004
1005
|
if (e.key === "Enter" || e.key === "F2") {
|
|
1005
|
-
let t = n.querySelector(
|
|
1006
|
+
let t = n.querySelector(Ot);
|
|
1006
1007
|
if (t === null) return;
|
|
1007
1008
|
e.preventDefault(), t.focus();
|
|
1008
1009
|
return;
|
|
1009
1010
|
}
|
|
1010
|
-
if (e.key === " " &&
|
|
1011
|
-
e.preventDefault(),
|
|
1011
|
+
if (e.key === " " && Jt === "range") {
|
|
1012
|
+
e.preventDefault(), kr.current = V;
|
|
1012
1013
|
let t = r === "timed" ? (() => {
|
|
1013
|
-
let e = Math.min(Math.max(Ae(
|
|
1014
|
+
let e = Math.min(Math.max(Ae(fn) / 60, Z * 60), Q * 60 - R);
|
|
1014
1015
|
return {
|
|
1015
|
-
start:
|
|
1016
|
-
end:
|
|
1016
|
+
start: N(V, e),
|
|
1017
|
+
end: N(V, e + R)
|
|
1017
1018
|
};
|
|
1018
1019
|
})() : {
|
|
1019
1020
|
start: V,
|
|
1020
1021
|
end: V
|
|
1021
1022
|
};
|
|
1022
|
-
|
|
1023
|
+
Rn(t, "keyboard", e) && yr(t);
|
|
1023
1024
|
return;
|
|
1024
1025
|
}
|
|
1025
|
-
e.key === "Escape" &&
|
|
1026
|
-
},
|
|
1027
|
-
let t =
|
|
1026
|
+
e.key === "Escape" && Nn !== null && (e.preventDefault(), Rn(null, "escape", e));
|
|
1027
|
+
}, Mr = b((e) => {
|
|
1028
|
+
let t = vn.current, n = t?.querySelector("[data-part='column']");
|
|
1028
1029
|
if (t == null || n == null) return;
|
|
1029
1030
|
let r = n.getBoundingClientRect().height / Math.max(1, Q - Z), i = t.querySelector("[data-part='hour']"), a = i === null ? 0 : parseFloat(getComputedStyle(i).lineHeight) / 2 || 0;
|
|
1030
1031
|
t.scrollTop = Math.max(0, (Ae(e) / 3600 - Z) * r - a);
|
|
1031
1032
|
}, [Q, Z]);
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
}, [H,
|
|
1035
|
-
let
|
|
1036
|
-
|
|
1037
|
-
if (
|
|
1038
|
-
|
|
1033
|
+
_e(() => {
|
|
1034
|
+
Kn === "grid" && (H === "week" || H === "day") && Mr(fn);
|
|
1035
|
+
}, [H, Kn]);
|
|
1036
|
+
let Nr = dt ?? P.loadingDelay, Pr = ft ?? P.loadingMinDuration, [Fr, Ir] = C(A);
|
|
1037
|
+
me(() => {
|
|
1038
|
+
if (A) {
|
|
1039
|
+
Ir(!0);
|
|
1039
1040
|
return;
|
|
1040
1041
|
}
|
|
1041
|
-
let e = setTimeout(() =>
|
|
1042
|
+
let e = setTimeout(() => Ir(!1), Nr + Pr);
|
|
1042
1043
|
return () => clearTimeout(e);
|
|
1043
1044
|
}, [
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1045
|
+
Nr,
|
|
1046
|
+
Pr,
|
|
1047
|
+
A
|
|
1047
1048
|
]);
|
|
1048
|
-
let
|
|
1049
|
-
|
|
1050
|
-
if (!
|
|
1051
|
-
let e = setTimeout(() => xe().announce(
|
|
1049
|
+
let Lr = F("loading");
|
|
1050
|
+
me(() => {
|
|
1051
|
+
if (!A) return;
|
|
1052
|
+
let e = setTimeout(() => xe().announce(Lr), Nr);
|
|
1052
1053
|
return () => clearTimeout(e);
|
|
1053
1054
|
}, [
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
]),
|
|
1055
|
+
Nr,
|
|
1056
|
+
A,
|
|
1057
|
+
Lr
|
|
1058
|
+
]), ge(Bt, () => ({
|
|
1058
1059
|
get element() {
|
|
1059
1060
|
return z.current;
|
|
1060
1061
|
},
|
|
@@ -1064,7 +1065,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
1064
1065
|
focusDate(e) {
|
|
1065
1066
|
if (J.current = {
|
|
1066
1067
|
date: k(e),
|
|
1067
|
-
row: H === "month" ? "day" :
|
|
1068
|
+
row: H === "month" ? "day" : or
|
|
1068
1069
|
}, O(e, V)) {
|
|
1069
1070
|
B.current?.querySelector(`[data-row='${J.current.row}'][data-date='${k(e)}']`)?.focus(), J.current = null;
|
|
1070
1071
|
return;
|
|
@@ -1072,117 +1073,117 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
1072
1073
|
G(e, "programmatic");
|
|
1073
1074
|
},
|
|
1074
1075
|
focusEvent(e) {
|
|
1075
|
-
let t =
|
|
1076
|
+
let t = cr.current.get(e);
|
|
1076
1077
|
return t === void 0 || !t.isConnected ? !1 : (t.focus(), !0);
|
|
1077
1078
|
},
|
|
1078
|
-
scrollToTime:
|
|
1079
|
+
scrollToTime: Mr
|
|
1079
1080
|
}), [
|
|
1080
1081
|
V,
|
|
1081
1082
|
H,
|
|
1082
1083
|
G,
|
|
1083
|
-
|
|
1084
|
-
|
|
1084
|
+
or,
|
|
1085
|
+
Mr
|
|
1085
1086
|
]);
|
|
1086
|
-
let
|
|
1087
|
-
id:
|
|
1088
|
-
t:
|
|
1089
|
-
locale:
|
|
1090
|
-
hourCycle:
|
|
1091
|
-
timeZone:
|
|
1087
|
+
let Rr = {
|
|
1088
|
+
id: on,
|
|
1089
|
+
t: F,
|
|
1090
|
+
locale: I,
|
|
1091
|
+
hourCycle: L,
|
|
1092
|
+
timeZone: ln,
|
|
1092
1093
|
view: H,
|
|
1093
1094
|
date: V,
|
|
1094
|
-
today:
|
|
1095
|
-
now:
|
|
1095
|
+
today: Cn,
|
|
1096
|
+
now: Sn,
|
|
1096
1097
|
calendars: y,
|
|
1097
1098
|
openKey: W,
|
|
1098
|
-
hostsDetail:
|
|
1099
|
-
selection:
|
|
1100
|
-
pendingSelection:
|
|
1101
|
-
selectionMode:
|
|
1102
|
-
narrow:
|
|
1103
|
-
weekNumbers:
|
|
1104
|
-
maxEvents:
|
|
1105
|
-
maxColumns:
|
|
1099
|
+
hostsDetail: pr,
|
|
1100
|
+
selection: Nn,
|
|
1101
|
+
pendingSelection: mr ?? ($?.target.kind === "slot" ? $.target.slot : null),
|
|
1102
|
+
selectionMode: Jt,
|
|
1103
|
+
narrow: Bn,
|
|
1104
|
+
weekNumbers: nn ?? P.weekNumbers,
|
|
1105
|
+
maxEvents: pn,
|
|
1106
|
+
maxColumns: mn,
|
|
1106
1107
|
slotDuration: R,
|
|
1107
|
-
dayHours:
|
|
1108
|
-
workingHours:
|
|
1109
|
-
row: H === "month" ? "timed" :
|
|
1108
|
+
dayHours: dn,
|
|
1109
|
+
workingHours: rn,
|
|
1110
|
+
row: H === "month" ? "timed" : or,
|
|
1110
1111
|
moreDate: Y === null ? null : k(Y.date),
|
|
1111
|
-
headingLevel:
|
|
1112
|
-
renderEvent:
|
|
1113
|
-
canEdit:
|
|
1114
|
-
draggingKey:
|
|
1115
|
-
dropInvalid:
|
|
1112
|
+
headingLevel: et,
|
|
1113
|
+
renderEvent: Ut,
|
|
1114
|
+
canEdit: Xn,
|
|
1115
|
+
draggingKey: Zn?.key ?? null,
|
|
1116
|
+
dropInvalid: Zn?.invalid ?? !1,
|
|
1116
1117
|
contextKey: $?.target.kind === "event" ? $.target.occurrence.key : null,
|
|
1117
|
-
renderDayContent:
|
|
1118
|
+
renderDayContent: Ht,
|
|
1118
1119
|
activate(e, t, n, r) {
|
|
1119
|
-
|
|
1120
|
+
fr(t), ur(null), zn(W === e.key ? null : e.key, n, r);
|
|
1120
1121
|
},
|
|
1121
1122
|
drill(e, t, n) {
|
|
1122
|
-
if (
|
|
1123
|
+
if (Bn && H === "month" && Kn === "grid") {
|
|
1123
1124
|
let t = n.currentTarget;
|
|
1124
|
-
|
|
1125
|
+
ur((n) => n !== null && O(n.date, e) ? null : {
|
|
1125
1126
|
date: e,
|
|
1126
1127
|
element: t
|
|
1127
1128
|
});
|
|
1128
1129
|
return;
|
|
1129
1130
|
}
|
|
1130
|
-
|
|
1131
|
+
In("day", t, n), G(e, t, n);
|
|
1131
1132
|
},
|
|
1132
1133
|
openMore(e, t) {
|
|
1133
|
-
|
|
1134
|
+
ur((n) => n !== null && O(n.date, e) ? null : {
|
|
1134
1135
|
date: e,
|
|
1135
1136
|
element: t
|
|
1136
1137
|
});
|
|
1137
1138
|
},
|
|
1138
|
-
registerEvent:
|
|
1139
|
+
registerEvent: lr,
|
|
1139
1140
|
calendarLabel: (e) => y.find((t) => t.key === e)?.label,
|
|
1140
1141
|
colorOf: (e) => Ne(e, y)
|
|
1141
|
-
},
|
|
1142
|
+
}, zr = fe(`h${et}`, {
|
|
1142
1143
|
"aria-live": "polite",
|
|
1143
1144
|
"data-part": "title",
|
|
1144
|
-
id:
|
|
1145
|
-
},
|
|
1145
|
+
id: sn
|
|
1146
|
+
}, ir), Br = Qe ? /* @__PURE__ */ E("div", {
|
|
1146
1147
|
"data-part": "header",
|
|
1147
1148
|
children: [
|
|
1148
|
-
|
|
1149
|
+
zr,
|
|
1149
1150
|
/* @__PURE__ */ E("div", {
|
|
1150
|
-
"aria-label":
|
|
1151
|
+
"aria-label": F("navigation"),
|
|
1151
1152
|
"data-part": "navigation",
|
|
1152
1153
|
role: "group",
|
|
1153
1154
|
children: [
|
|
1154
1155
|
/* @__PURE__ */ T("button", {
|
|
1155
|
-
"aria-label":
|
|
1156
|
+
"aria-label": F(`previous.${H}`),
|
|
1156
1157
|
"data-part": "previous",
|
|
1157
|
-
onClick: (e) => G(
|
|
1158
|
+
onClick: (e) => G(at(H, V, -1, _n), e.detail === 0 ? "keyboard" : "pointer", e),
|
|
1158
1159
|
type: "button",
|
|
1159
1160
|
children: /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "chevron-right" }) })
|
|
1160
1161
|
}),
|
|
1161
1162
|
/* @__PURE__ */ T("button", {
|
|
1162
1163
|
"data-part": "today",
|
|
1163
|
-
onClick: (e) => G(
|
|
1164
|
+
onClick: (e) => G(Cn ?? Me(ln), e.detail === 0 ? "keyboard" : "pointer", e),
|
|
1164
1165
|
type: "button",
|
|
1165
|
-
children:
|
|
1166
|
+
children: F("today")
|
|
1166
1167
|
}),
|
|
1167
1168
|
/* @__PURE__ */ T("button", {
|
|
1168
|
-
"aria-label":
|
|
1169
|
+
"aria-label": F(`next.${H}`),
|
|
1169
1170
|
"data-part": "next",
|
|
1170
|
-
onClick: (e) => G(
|
|
1171
|
+
onClick: (e) => G(at(H, V, 1, _n), e.detail === 0 ? "keyboard" : "pointer", e),
|
|
1171
1172
|
type: "button",
|
|
1172
1173
|
children: /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "chevron-right" }) })
|
|
1173
1174
|
})
|
|
1174
1175
|
]
|
|
1175
1176
|
}),
|
|
1176
|
-
|
|
1177
|
+
$t.length > 1 ? /* @__PURE__ */ T("div", {
|
|
1177
1178
|
"data-part": "views",
|
|
1178
1179
|
children: /* @__PURE__ */ T(ue, {
|
|
1179
|
-
"aria-label":
|
|
1180
|
+
"aria-label": F("views"),
|
|
1180
1181
|
fullWidth: !0,
|
|
1181
|
-
onValueChange: (e, t) =>
|
|
1182
|
+
onValueChange: (e, t) => In(e, t.reason, t.source),
|
|
1182
1183
|
value: H,
|
|
1183
|
-
children:
|
|
1184
|
+
children: $t.map((e) => /* @__PURE__ */ T(le, {
|
|
1184
1185
|
value: e,
|
|
1185
|
-
children:
|
|
1186
|
+
children: F(`view.${e}`)
|
|
1186
1187
|
}, e))
|
|
1187
1188
|
})
|
|
1188
1189
|
}) : null,
|
|
@@ -1192,14 +1193,14 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
1192
1193
|
type: "button",
|
|
1193
1194
|
children: [
|
|
1194
1195
|
/* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "funnel" }) }),
|
|
1195
|
-
/* @__PURE__ */ T("span", { children:
|
|
1196
|
+
/* @__PURE__ */ T("span", { children: F("calendars") }),
|
|
1196
1197
|
/* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "chevron-down" }) })
|
|
1197
1198
|
]
|
|
1198
1199
|
}) }), /* @__PURE__ */ T(a, { children: y.map((e) => {
|
|
1199
1200
|
let t = Ne(e.key, y);
|
|
1200
1201
|
return /* @__PURE__ */ E(i, {
|
|
1201
1202
|
checked: U.includes(e.key),
|
|
1202
|
-
onCheckedChange: (t, n) =>
|
|
1203
|
+
onCheckedChange: (t, n) => Ln(t ? On.filter((t) => t === e.key || U.includes(t)) : U.filter((t) => t !== e.key), n.reason, n.source),
|
|
1203
1204
|
children: [/* @__PURE__ */ T("svg", {
|
|
1204
1205
|
"aria-hidden": "true",
|
|
1205
1206
|
height: "10",
|
|
@@ -1219,123 +1220,123 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
1219
1220
|
children: ie
|
|
1220
1221
|
})
|
|
1221
1222
|
]
|
|
1222
|
-
}) : null,
|
|
1223
|
+
}) : null, Vr = H === "month" ? "month" : H === "day" ? "day" : "week", Hr = /* @__PURE__ */ E(w, { children: [
|
|
1223
1224
|
/* @__PURE__ */ T("div", {
|
|
1224
1225
|
"data-part": "loader",
|
|
1225
|
-
children:
|
|
1226
|
-
delay:
|
|
1226
|
+
children: Fr ? /* @__PURE__ */ T(g, {
|
|
1227
|
+
delay: Nr,
|
|
1227
1228
|
hideLabel: !0,
|
|
1228
|
-
label:
|
|
1229
|
-
loading:
|
|
1230
|
-
minDuration:
|
|
1231
|
-
onWithdraw: () =>
|
|
1229
|
+
label: F("loading"),
|
|
1230
|
+
loading: A,
|
|
1231
|
+
minDuration: Pr,
|
|
1232
|
+
onWithdraw: () => Ir(!1),
|
|
1232
1233
|
size: "sm"
|
|
1233
1234
|
}) : null
|
|
1234
1235
|
}),
|
|
1235
|
-
|
|
1236
|
+
Ve == null ? null : /* @__PURE__ */ T("div", {
|
|
1236
1237
|
"data-part": "error",
|
|
1237
|
-
children:
|
|
1238
|
+
children: Ve
|
|
1238
1239
|
}),
|
|
1239
|
-
|
|
1240
|
+
Kn === "list" ? /* @__PURE__ */ T(vt, {
|
|
1240
1241
|
days: K.days,
|
|
1241
|
-
empty:
|
|
1242
|
-
emptyText:
|
|
1243
|
-
occurrences:
|
|
1244
|
-
}) : H === "month" ? /* @__PURE__ */ T(
|
|
1242
|
+
empty: Be,
|
|
1243
|
+
emptyText: F(`empty.${Vr}`),
|
|
1244
|
+
occurrences: $n
|
|
1245
|
+
}) : H === "month" ? /* @__PURE__ */ T(xt, {
|
|
1245
1246
|
anchorMonth: V.month,
|
|
1246
|
-
occurrences:
|
|
1247
|
-
titleId:
|
|
1247
|
+
occurrences: $n,
|
|
1248
|
+
titleId: sn,
|
|
1248
1249
|
weeks: K.weeks
|
|
1249
|
-
}) : /* @__PURE__ */ T(
|
|
1250
|
+
}) : /* @__PURE__ */ T(Et, {
|
|
1250
1251
|
days: K.days,
|
|
1251
|
-
occurrences:
|
|
1252
|
-
scrollerRef:
|
|
1253
|
-
titleId:
|
|
1252
|
+
occurrences: $n,
|
|
1253
|
+
scrollerRef: vn,
|
|
1254
|
+
titleId: sn
|
|
1254
1255
|
})
|
|
1255
|
-
] }),
|
|
1256
|
-
"aria-busy":
|
|
1256
|
+
] }), Ur = {
|
|
1257
|
+
"aria-busy": A ? !0 : void 0,
|
|
1257
1258
|
"data-part": "body",
|
|
1258
|
-
onKeyDown:
|
|
1259
|
-
onPointerDown:
|
|
1260
|
-
},
|
|
1261
|
-
...
|
|
1259
|
+
onKeyDown: jr,
|
|
1260
|
+
onPointerDown: Cr
|
|
1261
|
+
}, Wr = Wt === void 0 ? /* @__PURE__ */ T("div", {
|
|
1262
|
+
...Ur,
|
|
1262
1263
|
ref: B,
|
|
1263
|
-
children:
|
|
1264
|
+
children: Hr
|
|
1264
1265
|
}) : /* @__PURE__ */ E(ce, {
|
|
1265
1266
|
onOpenChange: (e, t) => {
|
|
1266
1267
|
if (!e) {
|
|
1267
|
-
|
|
1268
|
+
wr(null);
|
|
1268
1269
|
return;
|
|
1269
1270
|
}
|
|
1270
|
-
let n =
|
|
1271
|
+
let n = Tr.current;
|
|
1271
1272
|
if (n === null) {
|
|
1272
1273
|
t.cancel();
|
|
1273
1274
|
return;
|
|
1274
1275
|
}
|
|
1275
|
-
|
|
1276
|
+
wr(n), t.reason === "keyboard" && Er.current?.setAnchor(n.element);
|
|
1276
1277
|
},
|
|
1277
1278
|
children: [
|
|
1278
|
-
/* @__PURE__ */ T(
|
|
1279
|
+
/* @__PURE__ */ T(Ft, { handle: Er }),
|
|
1279
1280
|
/* @__PURE__ */ T(se, { render: (e) => /* @__PURE__ */ T("div", {
|
|
1280
1281
|
...e,
|
|
1281
|
-
...
|
|
1282
|
+
...Ur,
|
|
1282
1283
|
onContextMenuCapture: (e) => {
|
|
1283
|
-
|
|
1284
|
+
Dr(e.target, e.clientY) === null && e.stopPropagation();
|
|
1284
1285
|
},
|
|
1285
1286
|
onKeyDown: (t) => {
|
|
1286
1287
|
if (t.key === "ContextMenu" || t.key === "F10" && t.shiftKey) {
|
|
1287
|
-
if (
|
|
1288
|
-
} else
|
|
1288
|
+
if (Dr(t.target, null) === null) return;
|
|
1289
|
+
} else jr(t);
|
|
1289
1290
|
e.onKeyDown?.(t);
|
|
1290
1291
|
},
|
|
1291
1292
|
onPointerDown: (t) => {
|
|
1292
|
-
t.pointerType !== "mouse" &&
|
|
1293
|
+
t.pointerType !== "mouse" && Dr(t.target, t.clientY), Cr(t), e.onPointerDown?.(t);
|
|
1293
1294
|
},
|
|
1294
1295
|
ref: (t) => {
|
|
1295
1296
|
B.current = t, e.ref?.(t);
|
|
1296
1297
|
},
|
|
1297
|
-
children:
|
|
1298
|
+
children: Hr
|
|
1298
1299
|
}) }),
|
|
1299
1300
|
/* @__PURE__ */ T(a, {
|
|
1300
|
-
"aria-label":
|
|
1301
|
-
children: $ === null ? null :
|
|
1301
|
+
"aria-label": Or,
|
|
1302
|
+
children: $ === null ? null : Wt($.target)
|
|
1302
1303
|
})
|
|
1303
1304
|
]
|
|
1304
|
-
}),
|
|
1305
|
-
"aria-label":
|
|
1305
|
+
}), Gr = Y === null ? [] : Ze(q, Y.date), Kr = Y === null ? null : j(Rr, Y.date), qr = Y === null ? null : /* @__PURE__ */ T("ul", {
|
|
1306
|
+
"aria-label": F("dayEvents", { day: Kr ?? "" }),
|
|
1306
1307
|
"data-layout": "stacked",
|
|
1307
1308
|
"data-part": "list-events",
|
|
1308
1309
|
role: "list",
|
|
1309
|
-
children:
|
|
1310
|
+
children: Gr.map((e) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(_t, {
|
|
1310
1311
|
date: Y.date,
|
|
1311
1312
|
inGrid: !1,
|
|
1312
1313
|
layout: "list",
|
|
1313
1314
|
occurrence: e,
|
|
1314
1315
|
withLocation: !0
|
|
1315
1316
|
}) }, e.key))
|
|
1316
|
-
}),
|
|
1317
|
-
hourCycle:
|
|
1318
|
-
locale:
|
|
1319
|
-
}) }),
|
|
1320
|
-
|
|
1321
|
-
let
|
|
1322
|
-
container:
|
|
1323
|
-
finalFocus:
|
|
1317
|
+
}), Jr = (W !== null && cr.current.get(W)?.isConnected ? cr.current.get(W) : dr) ?? null, Yr = X === null ? null : /* @__PURE__ */ T(Pt, { when: Ye(X, {
|
|
1318
|
+
hourCycle: L,
|
|
1319
|
+
locale: I
|
|
1320
|
+
}) }), Xr = X === null ? null : Gt?.(X, { close: () => zn(null, "programmatic") });
|
|
1321
|
+
Hn.current = Y?.element ?? null, Un.current = Jr;
|
|
1322
|
+
let Zr = Bn ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(h, {
|
|
1323
|
+
container: Wn,
|
|
1324
|
+
finalFocus: Hn,
|
|
1324
1325
|
onOpenChange: (e) => {
|
|
1325
|
-
e ||
|
|
1326
|
+
e || ur(null);
|
|
1326
1327
|
},
|
|
1327
1328
|
open: Y !== null,
|
|
1328
1329
|
side: "bottom",
|
|
1329
1330
|
children: /* @__PURE__ */ E(d, { children: [
|
|
1330
1331
|
/* @__PURE__ */ T(p, {}),
|
|
1331
|
-
/* @__PURE__ */ E(c, { children: [/* @__PURE__ */ T(l, { children:
|
|
1332
|
-
/* @__PURE__ */ T(m, { children:
|
|
1332
|
+
/* @__PURE__ */ E(c, { children: [/* @__PURE__ */ T(l, { children: Kr }), /* @__PURE__ */ T(u, {})] }),
|
|
1333
|
+
/* @__PURE__ */ T(m, { children: qr })
|
|
1333
1334
|
] })
|
|
1334
|
-
}),
|
|
1335
|
-
container:
|
|
1336
|
-
finalFocus:
|
|
1335
|
+
}), pr ? /* @__PURE__ */ T(h, {
|
|
1336
|
+
container: Wn,
|
|
1337
|
+
finalFocus: Un,
|
|
1337
1338
|
onOpenChange: (e, t) => {
|
|
1338
|
-
e ||
|
|
1339
|
+
e || zn(null, t.reason, t.source);
|
|
1339
1340
|
},
|
|
1340
1341
|
open: X !== null,
|
|
1341
1342
|
side: "bottom",
|
|
@@ -1343,57 +1344,57 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
|
|
|
1343
1344
|
/* @__PURE__ */ T(p, {}),
|
|
1344
1345
|
/* @__PURE__ */ E(c, { children: [
|
|
1345
1346
|
/* @__PURE__ */ T(l, { children: X?.event.title }),
|
|
1346
|
-
/* @__PURE__ */ T(f, { children:
|
|
1347
|
+
/* @__PURE__ */ T(f, { children: Yr }),
|
|
1347
1348
|
/* @__PURE__ */ T(u, {})
|
|
1348
1349
|
] }),
|
|
1349
|
-
/* @__PURE__ */ T(m, { children:
|
|
1350
|
+
/* @__PURE__ */ T(m, { children: Xr })
|
|
1350
1351
|
] })
|
|
1351
1352
|
}) : null] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(ee, {
|
|
1352
1353
|
onOpenChange: (e) => {
|
|
1353
|
-
e ||
|
|
1354
|
+
e || ur(null);
|
|
1354
1355
|
},
|
|
1355
1356
|
open: Y !== null,
|
|
1356
1357
|
portal: !1,
|
|
1357
|
-
children: [/* @__PURE__ */ T(
|
|
1358
|
-
}),
|
|
1359
|
-
finalFocus:
|
|
1358
|
+
children: [/* @__PURE__ */ T(It, { element: Y?.element ?? null }), /* @__PURE__ */ T(ne, { children: /* @__PURE__ */ T(_, { children: Y === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(v, { children: [/* @__PURE__ */ T(oe, { children: Kr }), /* @__PURE__ */ T(te, {})] }), /* @__PURE__ */ T(ae, { children: qr })] }) }) })]
|
|
1359
|
+
}), pr ? /* @__PURE__ */ E(ee, {
|
|
1360
|
+
finalFocus: dr ?? void 0,
|
|
1360
1361
|
onOpenChange: (e, t) => {
|
|
1361
|
-
e ||
|
|
1362
|
+
e || zn(null, t.reason, t.source);
|
|
1362
1363
|
},
|
|
1363
1364
|
open: X !== null,
|
|
1364
1365
|
portal: !1,
|
|
1365
1366
|
size: "lg",
|
|
1366
|
-
children: [/* @__PURE__ */ T(
|
|
1367
|
+
children: [/* @__PURE__ */ T(It, { element: Jr }), /* @__PURE__ */ T(ne, { children: /* @__PURE__ */ T(_, { children: X === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(v, { children: [
|
|
1367
1368
|
/* @__PURE__ */ T(oe, { children: X.event.title }),
|
|
1368
|
-
/* @__PURE__ */ T(re, { children:
|
|
1369
|
+
/* @__PURE__ */ T(re, { children: Yr }),
|
|
1369
1370
|
/* @__PURE__ */ T(te, {})
|
|
1370
|
-
] }), /* @__PURE__ */ T(ae, { children:
|
|
1371
|
-
}) : null] }),
|
|
1372
|
-
...
|
|
1371
|
+
] }), /* @__PURE__ */ T(ae, { children: Xr })] }) }) })]
|
|
1372
|
+
}) : null] }), Qr = {
|
|
1373
|
+
...an,
|
|
1373
1374
|
className: de,
|
|
1374
|
-
"data-layout":
|
|
1375
|
-
"data-loading":
|
|
1375
|
+
"data-layout": Kn,
|
|
1376
|
+
"data-loading": A ? "" : void 0,
|
|
1376
1377
|
"data-part": "root",
|
|
1377
1378
|
"data-slot-duration": String(R),
|
|
1378
1379
|
"data-ui": "event-calendar",
|
|
1379
1380
|
"data-view": H,
|
|
1380
1381
|
onClickCapture: (e) => {
|
|
1381
|
-
|
|
1382
|
+
an.onClickCapture?.(e), xr.current && (xr.current = !1, e.preventDefault(), e.stopPropagation());
|
|
1382
1383
|
},
|
|
1383
1384
|
ref: (e) => {
|
|
1384
|
-
z.current = e, e !==
|
|
1385
|
+
z.current = e, e !== Wn && Gn(e);
|
|
1385
1386
|
},
|
|
1386
|
-
style:
|
|
1387
|
-
children: /* @__PURE__ */ E(
|
|
1388
|
-
value:
|
|
1387
|
+
style: Xt,
|
|
1388
|
+
children: /* @__PURE__ */ E(ut.Provider, {
|
|
1389
|
+
value: Rr,
|
|
1389
1390
|
children: [
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1391
|
+
Br,
|
|
1392
|
+
Wr,
|
|
1393
|
+
Zr
|
|
1393
1394
|
]
|
|
1394
1395
|
})
|
|
1395
1396
|
};
|
|
1396
|
-
return
|
|
1397
|
+
return Vt === void 0 ? /* @__PURE__ */ T("div", { ...Qr }) : Vt(Qr);
|
|
1397
1398
|
}
|
|
1398
1399
|
//#endregion
|
|
1399
|
-
export {
|
|
1400
|
+
export { pt as i, dt as n, mt as r, Lt as t };
|