@vokril/ui-solid 0.31.0 → 0.33.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/CHANGELOG.md +61 -0
- package/README.md +132 -4
- package/dist/AttributeGrid-CNkALmJq.cjs +1 -0
- package/dist/AttributeGrid-DnuTPJ_P.js +320 -0
- package/dist/{Button-4meERfnv.js → Button-CX7mylBT.js} +125 -117
- package/dist/Button-lMUW5P3O.cjs +1 -0
- package/dist/CommandPalette-DAR9VMqY.cjs +2 -0
- package/dist/CommandPalette-DlLcdd4o.js +4029 -0
- package/dist/CopyButton-BVvv5M8g.js +63 -0
- package/dist/CopyButton-Dnd8_2Lj.cjs +1 -0
- package/dist/DateRangePicker-BlJWtJBA.cjs +9 -0
- package/dist/DateRangePicker-CHmUU4PA.js +552 -0
- package/dist/GuidedTour-9rqvNB_m.js +483 -0
- package/dist/GuidedTour-DbXeuTc7.cjs +1 -0
- package/dist/{HostPortal-Ba3MD9CG.js → HostPortal-De65s6CU.js} +1 -1
- package/dist/{HostPortal-CpWsArs6.cjs → HostPortal-Dm4BmY8M.cjs} +1 -1
- package/dist/{IconPicker-D1G8HK92.js → IconPicker-CsYW8CXe.js} +4 -4
- package/dist/IconPicker-D-GU1mD3.cjs +1 -0
- package/dist/Input-C3rEQffK.js +382 -0
- package/dist/Input-CHtvL4_4.cjs +1 -0
- package/dist/Modal-3L6p7Dwt.js +599 -0
- package/dist/Modal-CtrWEnJ7.cjs +1 -0
- package/dist/OverlayScrollArea-Cr0VAApT.cjs +1 -0
- package/dist/OverlayScrollArea-CrrPFLq9.js +180 -0
- package/dist/{PageSkeleton-zNyjLPlk.js → PageSkeleton-BRuqaDzr.js} +372 -371
- package/dist/PageSkeleton-Cz2bckO4.cjs +30 -0
- package/dist/Popover-CLTXG8W0.cjs +1 -0
- package/dist/Popover-DkqGvMNy.js +207 -0
- package/dist/SearchableSelect-C-lV1vSv.cjs +1 -0
- package/dist/SearchableSelect-Du12kcI9.js +328 -0
- package/dist/{StatusBarNotificationBell-ZTEhZFmJ.js → StatusBarNotificationBell-DKDoWK71.js} +4879 -4789
- package/dist/StatusBarNotificationBell-wO16mjon.cjs +50 -0
- package/dist/Stepper-DzI-gtKd.js +586 -0
- package/dist/Stepper-rpu7lpzB.cjs +1 -0
- package/dist/{Textarea-DASNQNoi.cjs → Textarea-D4nYoQ0J.cjs} +1 -1
- package/dist/{Textarea-szHXQahi.js → Textarea-DOzZCc-O.js} +1 -1
- package/dist/TimeSeriesChart-BJqQpeEJ.cjs +1 -0
- package/dist/TimeSeriesChart-DvAhuyVl.js +442 -0
- package/dist/ToggleButton-B-hBpdzk.js +2144 -0
- package/dist/ToggleButton-BMH1A-IX.cjs +1 -0
- package/dist/_internal/app/onboarding/pageTourState.d.cts +0 -2
- package/dist/_internal/app/onboarding/pageTourState.d.ts +0 -2
- package/dist/_internal/app/onboarding/pageTourTypes.d.cts +2 -1
- package/dist/_internal/app/onboarding/pageTourTypes.d.ts +2 -1
- package/dist/_internal/contract/browser/workspace.d.cts +15 -0
- package/dist/_internal/contract/browser/workspace.d.ts +15 -0
- package/dist/_internal/contract/menuDensity.d.cts +8 -0
- package/dist/_internal/contract/menuDensity.d.ts +8 -0
- package/dist/_internal/contract/notification.d.cts +19 -3
- package/dist/_internal/contract/notification.d.ts +19 -3
- package/dist/_internal/platform/settings/settingsTypes.d.cts +2 -2
- package/dist/_internal/platform/settings/settingsTypes.d.ts +2 -2
- package/dist/a11y/index.cjs +1 -1
- package/dist/a11y/index.js +1 -1
- package/dist/appThemeDerivation-Be_oKljl.cjs +1 -0
- package/dist/{server/appThemeDerivation-DBAOkGl7.js → appThemeDerivation-CKoSe4KP.js} +231 -260
- package/dist/base.css +1 -1
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/createDialogShellFocus-DI1rUvYf.js +282 -0
- package/dist/createDialogShellFocus-kzkNSLWS.cjs +1 -0
- package/dist/createResizableSidebar--Ve6DbDu.js +504 -0
- package/dist/createResizableSidebar-DlVAuq5t.cjs +1 -0
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +228 -227
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +4 -4
- package/dist/{focusModality-BISb6-yg.cjs → focusModality-D704CJVN.cjs} +1 -1
- package/dist/{focusModality-FoLPWF-_.js → focusModality-ROUF6YGR.js} +1 -1
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +9 -9
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.d.cts +1 -0
- package/dist/host/index.d.ts +1 -0
- package/dist/host/index.js +38 -39
- package/dist/host/kitHost.d.cts +8 -0
- package/dist/host/kitHost.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +940 -938
- package/dist/kitHost-BMMWpU4w.js +47 -0
- package/dist/kitHost-u0-mKvEK.cjs +1 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/mainRealmDom-BcPuVvcy.cjs +1 -0
- package/dist/mainRealmDom-DydRT2Us.js +54 -0
- package/dist/{server/useSettingsSubscription-DLEk4k4j.js → menuDensity-6x_EqCGb.js} +7 -5
- package/dist/{server/useSettingsSubscription-DKjCwmRd.cjs → menuDensity-Cf74__OQ.cjs} +1 -1
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notificationCatalog-CRERhjp6.js +168 -0
- package/dist/notificationCatalog-DqTkd7M6.cjs +1 -0
- package/dist/notifications/holdWhileShown.d.cts +18 -0
- package/dist/notifications/holdWhileShown.d.ts +18 -0
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/nativeEngine.d.cts +34 -2
- package/dist/notifications/nativeEngine.d.ts +34 -2
- package/dist/notifications/notificationEntryList.d.cts +18 -5
- package/dist/notifications/notificationEntryList.d.ts +18 -5
- package/dist/notifications/notificationOverlaySnapshot.d.cts +35 -6
- package/dist/notifications/notificationOverlaySnapshot.d.ts +35 -6
- package/dist/overlay/Modal.d.cts +17 -3
- package/dist/overlay/Modal.d.ts +17 -3
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.d.cts +2 -1
- package/dist/overlay/index.d.ts +2 -1
- package/dist/overlay/index.js +46 -43
- package/dist/overlay/modalDefaults.d.cts +23 -0
- package/dist/overlay/modalDefaults.d.ts +23 -0
- package/dist/overlay/modalViewport.d.cts +17 -2
- package/dist/overlay/modalViewport.d.ts +17 -2
- package/dist/pageTourState-BuA-GBYO.cjs +5 -0
- package/dist/{server/pageTourState-BcBF8w89.js → pageTourState-DsSKdPOu.js} +160 -169
- package/dist/rowSource-D8gyHbEE.cjs +1 -0
- package/dist/rowSource-_4IuosKj.js +1236 -0
- package/dist/server/AttributeGrid-B9j_c2wM.js +281 -0
- package/dist/server/AttributeGrid-BALCTvOI.cjs +1 -0
- package/dist/server/Button-DHefmmYz.cjs +1 -0
- package/dist/server/Button-ft_8RNJj.js +226 -0
- package/dist/server/CommandPalette-CHdfYtxs.js +3305 -0
- package/dist/server/CommandPalette-D0Prl7by.cjs +1 -0
- package/dist/server/CopyButton-CiYcsQcI.js +64 -0
- package/dist/server/CopyButton-D2q7tQ0m.cjs +1 -0
- package/dist/server/DateRangePicker-C6wZI7No.js +487 -0
- package/dist/server/DateRangePicker-CF70G2yr.cjs +9 -0
- package/dist/server/GuidedTour-BmDAWNfN.cjs +1 -0
- package/dist/server/GuidedTour-DYBhprVK.js +400 -0
- package/dist/server/{HostPortal-C4IrAeWN.js → HostPortal-C4xdfRyM.js} +1 -1
- package/dist/server/{HostPortal-D5ECrJvn.cjs → HostPortal-CwyePpDX.cjs} +1 -1
- package/dist/server/{IconPicker-DDWgB7sm.js → IconPicker--Xso9fUf.js} +5 -5
- package/dist/server/IconPicker-BTI4cNgf.cjs +1 -0
- package/dist/server/Input-UX0Hk53M.cjs +1 -0
- package/dist/server/Input-V9Szcw6w.js +249 -0
- package/dist/server/Modal-CBnNlaTx.cjs +1 -0
- package/dist/server/Modal-D9CjieKK.js +426 -0
- package/dist/server/OverlayScrollArea-DuwGRSMm.cjs +1 -0
- package/dist/server/OverlayScrollArea-h6G3yk6U.js +66 -0
- package/dist/server/{PageSkeleton-DoxlE_bD.js → PageSkeleton-CFs7AdTA.js} +267 -266
- package/dist/server/PageSkeleton-D0KOKLsb.cjs +30 -0
- package/dist/server/Popover-BBDBIpT6.cjs +1 -0
- package/dist/server/Popover-e9JpRh11.js +439 -0
- package/dist/server/SearchableSelect-B2ZFnp6i.js +205 -0
- package/dist/server/SearchableSelect-BBu5cP6P.cjs +1 -0
- package/dist/server/StatusBarNotificationBell-DEp4eEUv.cjs +49 -0
- package/dist/server/{StatusBarNotificationBell-DW2l5O9B.js → StatusBarNotificationBell-kOm2ZNkl.js} +4567 -4477
- package/dist/server/Stepper-C04rOZcI.cjs +1 -0
- package/dist/server/Stepper-CVAOsf3o.js +381 -0
- package/dist/server/{Textarea-Bh5LVrBn.cjs → Textarea-BG6F8taO.cjs} +1 -1
- package/dist/server/{Textarea-DVkfGkP0.js → Textarea-DM4zpgWo.js} +1 -1
- package/dist/server/TimeSeriesChart-kuuqH7we.js +242 -0
- package/dist/server/TimeSeriesChart-tWbSF6fJ.cjs +1 -0
- package/dist/server/ToggleButton-BdqufQ7G.js +1344 -0
- package/dist/server/ToggleButton-Bo24NK3o.cjs +1 -0
- package/dist/server/a11y/index.cjs +1 -1
- package/dist/server/a11y/index.js +1 -1
- package/dist/server/appThemeDerivation-Be_oKljl.cjs +1 -0
- package/dist/{appThemeDerivation-DBAOkGl7.js → server/appThemeDerivation-CKoSe4KP.js} +231 -260
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/createDialogShellFocus-DvoNWpIu.cjs +1 -0
- package/dist/server/createDialogShellFocus-J8wqPlsa.js +370 -0
- package/dist/server/{createResizableSidebar-Dvu7iEk1.js → createResizableSidebar-CIrhLNKW.js} +104 -102
- package/dist/server/createResizableSidebar-DcZ2Cnpf.cjs +1 -0
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +153 -152
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +4 -4
- package/dist/server/{focusModality-nWNVX3JG.js → focusModality-Bu4Kuwm4.js} +1 -1
- package/dist/server/{focusModality-D-nxv8Er.cjs → focusModality-G2i60_7y.cjs} +1 -1
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +9 -9
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +38 -39
- package/dist/server/{index-BEARfm54.js → index-CPUZyKo7.js} +2 -2
- package/dist/server/{index-C6rYfWCJ.cjs → index-CVbkasNJ.cjs} +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +673 -671
- package/dist/server/kitHost-BMMWpU4w.js +47 -0
- package/dist/server/kitHost-u0-mKvEK.cjs +1 -0
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/mainRealmDom-BuGEeM_r.cjs +1 -0
- package/dist/server/{EmptyState-Csydyy_7.js → mainRealmDom-CzckS_ss.js} +12 -8
- package/dist/{useSettingsSubscription-DLEk4k4j.js → server/menuDensity-6x_EqCGb.js} +7 -5
- package/dist/{useSettingsSubscription-DKjCwmRd.cjs → server/menuDensity-Cf74__OQ.cjs} +1 -1
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notificationCatalog-CEDltsJS.cjs +1 -0
- package/dist/server/notificationCatalog-Cl1dH4aJ.js +122 -0
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +3 -3
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +32 -29
- package/dist/server/pageTourState-BuA-GBYO.cjs +5 -0
- package/dist/{pageTourState-BcBF8w89.js → server/pageTourState-DsSKdPOu.js} +160 -169
- package/dist/server/rowSource-BSa7rgYJ.js +1128 -0
- package/dist/server/rowSource-Yw-xtlih.cjs +1 -0
- package/dist/server/settings/index.cjs +1 -1
- package/dist/server/settings/index.js +26 -25
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +29 -28
- package/dist/server/tokens/palette/index.cjs +1 -0
- package/dist/server/tokens/palette/index.js +31 -0
- package/dist/server/tree/index.cjs +1 -1
- package/dist/server/tree/index.js +1 -1
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.js +26 -25
- package/dist/solid/_internal/app/onboarding/PageTourHost.jsx +11 -10
- package/dist/solid/_internal/app/onboarding/pageTourState.js +12 -23
- package/dist/solid/_internal/contract/menuDensity.js +1 -0
- package/dist/solid/_internal/platform/settings/settingsTypes.js +1 -0
- package/dist/solid/charts/TimeSeriesChart.jsx +23 -22
- package/dist/solid/desktop/WindowControls.jsx +6 -3
- package/dist/solid/feedback/Badge.jsx +9 -5
- package/dist/solid/feedback/ErrorBoundary.jsx +18 -14
- package/dist/solid/forms/Button.jsx +15 -9
- package/dist/solid/forms/Checkbox.jsx +5 -4
- package/dist/solid/forms/Combobox.jsx +12 -10
- package/dist/solid/forms/CopyButton.jsx +7 -4
- package/dist/solid/forms/DatePicker.jsx +12 -7
- package/dist/solid/forms/Dropzone.jsx +17 -13
- package/dist/solid/forms/FilePickerButton.jsx +5 -4
- package/dist/solid/forms/HiddenFileInput.jsx +3 -1
- package/dist/solid/forms/InputMessage.jsx +11 -10
- package/dist/solid/forms/MultiSearchableSelect.jsx +8 -7
- package/dist/solid/forms/NumberInput.jsx +25 -19
- package/dist/solid/forms/Picker.jsx +8 -6
- package/dist/solid/forms/PressableSurface.jsx +14 -9
- package/dist/solid/forms/RadioGroup.jsx +4 -3
- package/dist/solid/forms/SearchInput.jsx +4 -3
- package/dist/solid/forms/SearchableSelect.jsx +4 -3
- package/dist/solid/forms/SegmentedControl.jsx +4 -3
- package/dist/solid/forms/TagInput.jsx +22 -16
- package/dist/solid/forms/ToggleButton.jsx +4 -3
- package/dist/solid/forms/date-range-picker/DateRangePicker.jsx +12 -10
- package/dist/solid/grid/Pagination.jsx +7 -3
- package/dist/solid/host/kitHost.jsx +5 -1
- package/dist/solid/layout/PageHeaderIcon.jsx +11 -9
- package/dist/solid/layout/ResizableSplitPane.jsx +4 -4
- package/dist/solid/layout/ResizeHandle.jsx +6 -5
- package/dist/solid/navigation/Accordion.jsx +8 -5
- package/dist/solid/navigation/Tabs.jsx +11 -8
- package/dist/solid/notifications/NotificationHost.jsx +3 -16
- package/dist/solid/notifications/NotificationItem.jsx +59 -55
- package/dist/solid/notifications/NotificationPanel.jsx +16 -8
- package/dist/solid/notifications/NotificationsCenter.jsx +2 -0
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +4 -3
- package/dist/solid/notifications/createNotificationPreviewRuntime.js +2 -0
- package/dist/solid/notifications/holdWhileShown.js +30 -0
- package/dist/solid/notifications/nativeEngine.js +52 -1
- package/dist/solid/notifications/notificationEntryList.js +25 -9
- package/dist/solid/notifications/notificationOverlaySnapshot.js +26 -0
- package/dist/solid/notifications/toast.js +4 -0
- package/dist/solid/overlay/ConfirmDialog.jsx +21 -16
- package/dist/solid/overlay/DangerousActionDialogParts.jsx +5 -3
- package/dist/solid/overlay/Disclosure.jsx +4 -3
- package/dist/solid/overlay/DropdownMenu.jsx +6 -4
- package/dist/solid/overlay/FloatingWindow.jsx +3 -3
- package/dist/solid/overlay/HoverTooltip.jsx +9 -7
- package/dist/solid/overlay/Modal.jsx +44 -35
- package/dist/solid/overlay/OverlayScrollArea.jsx +5 -3
- package/dist/solid/overlay/Tooltip.jsx +5 -4
- package/dist/solid/overlay/command-palette/CommandPalette.jsx +7 -7
- package/dist/solid/overlay/context-menu/DesktopContextMenu.jsx +65 -50
- package/dist/solid/overlay/index.js +2 -1
- package/dist/solid/overlay/menu/MenuParts.jsx +11 -8
- package/dist/solid/overlay/modalDefaults.jsx +10 -0
- package/dist/solid/overlay/modalViewport.js +17 -4
- package/dist/solid/overlay/popover/Popover.jsx +17 -11
- package/dist/solid/overlay/tour/GuidedTour.jsx +18 -14
- package/dist/solid/tokens/palette/index.js +1 -0
- package/dist/solid/tree/TreeRow.jsx +21 -16
- package/dist/solid/tree/TreeSurface.jsx +15 -14
- package/dist/solid/widgets/SettingsField.jsx +11 -10
- package/dist/style.css +3 -2
- package/dist/theme.css +2 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.js +29 -28
- package/dist/tokens/palette/index.cjs +1 -0
- package/dist/tokens/palette/index.d.cts +12 -0
- package/dist/tokens/palette/index.d.ts +12 -0
- package/dist/tokens/palette/index.js +31 -0
- package/dist/tokens/tokens.css +2 -1
- package/dist/tree/TreeRow.d.cts +5 -4
- package/dist/tree/TreeRow.d.ts +5 -4
- package/dist/tree/descriptor.d.cts +13 -3
- package/dist/tree/descriptor.d.ts +13 -3
- package/dist/tree/index.cjs +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/ui.css +1 -1
- package/package.json +25 -1
- package/dist/AttributeGrid-Ch1k9v5j.cjs +0 -1
- package/dist/AttributeGrid-DqFd4gBm.js +0 -320
- package/dist/Button-OyZHrl-t.cjs +0 -1
- package/dist/CommandPalette-CxYZUJtN.cjs +0 -2
- package/dist/CommandPalette-DwOp8y1-.js +0 -4018
- package/dist/CopyButton-16QNPgz6.cjs +0 -1
- package/dist/CopyButton-BVS49lMS.js +0 -63
- package/dist/DateRangePicker-8QvydugY.js +0 -550
- package/dist/DateRangePicker-DI-06xWY.cjs +0 -9
- package/dist/EmptyState-B9TxGJ5v.cjs +0 -1
- package/dist/EmptyState-Dph6HU74.js +0 -50
- package/dist/GuidedTour-DUQwdW8n.cjs +0 -1
- package/dist/GuidedTour-DXMmHn0o.js +0 -483
- package/dist/IconPicker-Q-ZDtNkd.cjs +0 -1
- package/dist/Input-Brp5EDhg.cjs +0 -1
- package/dist/Input-CZi8KEfm.js +0 -374
- package/dist/Modal-CBi7Wd2V.cjs +0 -1
- package/dist/Modal-iyY1HUtr.js +0 -588
- package/dist/OverlayScrollArea-BSlaXG1h.cjs +0 -1
- package/dist/OverlayScrollArea-c8Za77qs.js +0 -180
- package/dist/PageSkeleton-B_-4fz1q.cjs +0 -30
- package/dist/Popover-DVi179wu.js +0 -207
- package/dist/Popover-DXrczbt9.cjs +0 -1
- package/dist/SearchableSelect-DtHbWJhR.js +0 -328
- package/dist/SearchableSelect-yLVqCGFo.cjs +0 -1
- package/dist/StatusBarNotificationBell-DQs5g1K6.cjs +0 -50
- package/dist/Stepper-CyRgzWlR.js +0 -583
- package/dist/Stepper-u2ZsE5oP.cjs +0 -1
- package/dist/TimeSeriesChart-D7lIqolp.js +0 -441
- package/dist/TimeSeriesChart-DGzM9B--.cjs +0 -1
- package/dist/ToggleButton-B22PsCqo.js +0 -2138
- package/dist/ToggleButton-DWslrIBN.cjs +0 -1
- package/dist/appThemeDerivation-BylmT80v.cjs +0 -1
- package/dist/createDialogShellFocus-CQ0VNC2g.cjs +0 -1
- package/dist/createDialogShellFocus-DbiQmLgb.js +0 -282
- package/dist/createResizableSidebar-COlpGQ7H.cjs +0 -1
- package/dist/createResizableSidebar-cmCKTIg_.js +0 -504
- package/dist/kitHost-BfJExE1G.cjs +0 -1
- package/dist/kitHost-CVAEi9sF.js +0 -23
- package/dist/mainRealmDom-B215swW-.js +0 -166
- package/dist/mainRealmDom-BYGSE-fo.cjs +0 -1
- package/dist/pageTourState-CrbEU7QW.cjs +0 -5
- package/dist/rowSource-D__7o4h0.js +0 -1230
- package/dist/rowSource-DiwTu_r8.cjs +0 -1
- package/dist/server/AttributeGrid-Bpjlauuz.js +0 -281
- package/dist/server/AttributeGrid-DNYdKb8J.cjs +0 -1
- package/dist/server/Button-0AXWRw9Q.cjs +0 -1
- package/dist/server/Button-3yNrnn4P.js +0 -220
- package/dist/server/CommandPalette-BuVxnqBG.cjs +0 -1
- package/dist/server/CommandPalette-Dn3NKXPM.js +0 -3291
- package/dist/server/CopyButton-B6xd9Z6j.js +0 -64
- package/dist/server/CopyButton-D8IN6Vnd.cjs +0 -1
- package/dist/server/DateRangePicker-BFzNjaME.cjs +0 -9
- package/dist/server/DateRangePicker-CnYkTgXX.js +0 -484
- package/dist/server/EmptyState-BnAHklc5.cjs +0 -1
- package/dist/server/GuidedTour-BZardPYW.js +0 -400
- package/dist/server/GuidedTour-yhdZk2SU.cjs +0 -1
- package/dist/server/IconPicker-C5lAN9pX.cjs +0 -1
- package/dist/server/Input-AdF-i0O8.js +0 -245
- package/dist/server/Input-XF9Jr0G9.cjs +0 -1
- package/dist/server/Modal-C5dzgcRW.js +0 -420
- package/dist/server/Modal-nAhBS1L9.cjs +0 -1
- package/dist/server/OverlayScrollArea-221dfKyz.js +0 -65
- package/dist/server/OverlayScrollArea-D4e9D9Nd.cjs +0 -1
- package/dist/server/PageSkeleton-DBo7hQq-.cjs +0 -30
- package/dist/server/Popover-C5avmGWz.cjs +0 -1
- package/dist/server/Popover-H3AAYZI0.js +0 -439
- package/dist/server/SearchableSelect-CZrXDKfC.cjs +0 -1
- package/dist/server/SearchableSelect-DMqed5Er.js +0 -205
- package/dist/server/StatusBarNotificationBell-CGcMdT4h.cjs +0 -49
- package/dist/server/Stepper-CpapA_WH.cjs +0 -1
- package/dist/server/Stepper-gGA7JwjV.js +0 -375
- package/dist/server/TimeSeriesChart-BQVXUFoj.cjs +0 -1
- package/dist/server/TimeSeriesChart-PAb95s6x.js +0 -242
- package/dist/server/ToggleButton-CA9T-OsI.cjs +0 -1
- package/dist/server/ToggleButton-CBNKajZa.js +0 -1335
- package/dist/server/appThemeDerivation-BylmT80v.cjs +0 -1
- package/dist/server/createDialogShellFocus-CDaLuPg8.cjs +0 -1
- package/dist/server/createDialogShellFocus-LGDBOVnr.js +0 -369
- package/dist/server/createResizableSidebar-v40ZOb-Q.cjs +0 -1
- package/dist/server/kitHost-BfJExE1G.cjs +0 -1
- package/dist/server/kitHost-CVAEi9sF.js +0 -23
- package/dist/server/mainRealmDom-DPNaDWtw.js +0 -121
- package/dist/server/mainRealmDom-DwZVMPnO.cjs +0 -1
- package/dist/server/pageTourState-CrbEU7QW.cjs +0 -5
- package/dist/server/rowSource-D-wcDmFU.js +0 -1122
- package/dist/server/rowSource-DltiY0o3.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),a=require("solid-js"),m=require("./Button-OyZHrl-t.cjs"),p=require("@vokril/icons"),v=require("./ownerWindow-BCmJFMbR.cjs"),w="vk_copyButton_tokON",B="vk_copied_nm2uQ",d={copyButton:w,copied:B};function h(y){const[e,C]=a.splitProps(y,["text","size","variant","iconOnly","disabled","label","copiedLabel","ariaLabel","class","onCopy"]),[n,c]=a.createSignal(!1);let o;a.onCleanup(()=>{o!==void 0&&clearTimeout(o)});const b=async i=>{var u;if(i.stopPropagation(),e.disabled)return;const f=typeof e.text=="function"?e.text():e.text,l=v.ownerWindow(i.currentTarget);let r=!1;if(l!==null)try{await l.navigator.clipboard.writeText(f),r=!0}catch{r=!1}r&&(c(!0),o!==void 0&&clearTimeout(o),o=setTimeout(()=>c(!1),1800)),(u=e.onCopy)==null||u.call(e,r)},s=()=>e.iconOnly??!1,g=()=>n()?e.copiedLabel??"Copied!":e.label??"Copy";return t.createComponent(m.Button,t.mergeProps(C,{get size(){return e.size??"sm"},get variant(){return e.variant??"ghost"},get iconOnly(){return s()},get disabled(){return e.disabled},onClick:i=>void b(i),get"aria-label"(){return e.ariaLabel??(n()?"Copied to clipboard":"Copy to clipboard")},get leadingIcon(){return t.memo(()=>!!n())()?t.createComponent(p.VpCheck,{"aria-hidden":"true"}):t.createComponent(p.VpCopy,{"aria-hidden":"true"})},get class(){return`${d.copyButton} ${n()?d.copied:""} ${e.class??""}`},get children(){return t.memo(()=>!!s())()?void 0:g()}}))}exports.CopyButton=h;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { createComponent as i, mergeProps as g, memo as p } from "solid-js/web";
|
|
2
|
-
import { splitProps as C, createSignal as v, onCleanup as h } from "solid-js";
|
|
3
|
-
import { B } from "./Button-4meERfnv.js";
|
|
4
|
-
import { VpCheck as k, VpCopy as x } from "@vokril/icons";
|
|
5
|
-
import { o as w } from "./ownerWindow-9mx_LD47.js";
|
|
6
|
-
const O = "vk_copyButton_tokON", T = "vk_copied_nm2uQ", d = {
|
|
7
|
-
copyButton: O,
|
|
8
|
-
copied: T
|
|
9
|
-
};
|
|
10
|
-
function $(u) {
|
|
11
|
-
const [t, m] = C(u, ["text", "size", "variant", "iconOnly", "disabled", "label", "copiedLabel", "ariaLabel", "class", "onCopy"]), [o, a] = v(!1);
|
|
12
|
-
let e;
|
|
13
|
-
h(() => {
|
|
14
|
-
e !== void 0 && clearTimeout(e);
|
|
15
|
-
});
|
|
16
|
-
const f = async (n) => {
|
|
17
|
-
var l;
|
|
18
|
-
if (n.stopPropagation(), t.disabled) return;
|
|
19
|
-
const b = typeof t.text == "function" ? t.text() : t.text, s = w(n.currentTarget);
|
|
20
|
-
let r = !1;
|
|
21
|
-
if (s !== null)
|
|
22
|
-
try {
|
|
23
|
-
await s.navigator.clipboard.writeText(b), r = !0;
|
|
24
|
-
} catch {
|
|
25
|
-
r = !1;
|
|
26
|
-
}
|
|
27
|
-
r && (a(!0), e !== void 0 && clearTimeout(e), e = setTimeout(() => a(!1), 1800)), (l = t.onCopy) == null || l.call(t, r);
|
|
28
|
-
}, c = () => t.iconOnly ?? !1, y = () => o() ? t.copiedLabel ?? "Copied!" : t.label ?? "Copy";
|
|
29
|
-
return i(B, g(m, {
|
|
30
|
-
get size() {
|
|
31
|
-
return t.size ?? "sm";
|
|
32
|
-
},
|
|
33
|
-
get variant() {
|
|
34
|
-
return t.variant ?? "ghost";
|
|
35
|
-
},
|
|
36
|
-
get iconOnly() {
|
|
37
|
-
return c();
|
|
38
|
-
},
|
|
39
|
-
get disabled() {
|
|
40
|
-
return t.disabled;
|
|
41
|
-
},
|
|
42
|
-
onClick: (n) => void f(n),
|
|
43
|
-
get "aria-label"() {
|
|
44
|
-
return t.ariaLabel ?? (o() ? "Copied to clipboard" : "Copy to clipboard");
|
|
45
|
-
},
|
|
46
|
-
get leadingIcon() {
|
|
47
|
-
return p(() => !!o())() ? i(k, {
|
|
48
|
-
"aria-hidden": "true"
|
|
49
|
-
}) : i(x, {
|
|
50
|
-
"aria-hidden": "true"
|
|
51
|
-
});
|
|
52
|
-
},
|
|
53
|
-
get class() {
|
|
54
|
-
return `${d.copyButton} ${o() ? d.copied : ""} ${t.class ?? ""}`;
|
|
55
|
-
},
|
|
56
|
-
get children() {
|
|
57
|
-
return p(() => !!c())() ? void 0 : y();
|
|
58
|
-
}
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
$ as C
|
|
63
|
-
};
|
|
@@ -1,550 +0,0 @@
|
|
|
1
|
-
import { insert as m, createComponent as g, effect as L, className as y, template as N, addEventListener as he, use as me, memo as ye, style as we, setAttribute as fe, delegateEvents as De } from "solid-js/web";
|
|
2
|
-
import { createMemo as $, For as X, createSignal as E, createEffect as _e, onCleanup as ke, Show as B } from "solid-js";
|
|
3
|
-
import { B as z } from "./Button-4meERfnv.js";
|
|
4
|
-
import { VpChevronLeft as be, VpChevronRight as xe, VpCalendar as Me, VpClose as Pe } from "@vokril/icons";
|
|
5
|
-
import { H as Ce } from "./HostPortal-Ba3MD9CG.js";
|
|
6
|
-
import { f as Se } from "./createDialogShellFocus-DbiQmLgb.js";
|
|
7
|
-
import { t as h } from "./i18n-CBlUGOyu.js";
|
|
8
|
-
import { P as Te } from "./Input-CZi8KEfm.js";
|
|
9
|
-
import { i as V } from "./iconScale.module-C3O0bxfp.js";
|
|
10
|
-
function ie() {
|
|
11
|
-
try {
|
|
12
|
-
return new Intl.DateTimeFormat().resolvedOptions().locale;
|
|
13
|
-
} catch {
|
|
14
|
-
return "en-US";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function Z(e, t) {
|
|
18
|
-
return e.toLocaleDateString(ie(), t);
|
|
19
|
-
}
|
|
20
|
-
function Dt(e, t) {
|
|
21
|
-
return e.toLocaleString(ie(), t);
|
|
22
|
-
}
|
|
23
|
-
const Ee = "vk_triggerGroup_hAWij", Le = "vk_triggerWithClear_nLNSo", $e = "vk_triggerLabel_-RkgH", Fe = "vk_triggerClear_6fo1y", He = "vk_popover_AAi4D", Ae = "vk_presets_vG-aY", Ge = "vk_presetSpacer_5AWR5", ze = "vk_calendarPane_leZcA", Ne = "vk_calendar_9Di5h", Oe = "vk_calHeader_wnNqV", We = "vk_calMonth_W97Ui", Ye = "vk_weekdays_Gp5zD", Ie = "vk_weekday_VrZcR", Re = "vk_daysGrid_ZOZfa", Be = "vk_day_hDzcB", Ve = "vk_dayMuted_TRu8N", Ze = "vk_dayToday_AUzc3", Ue = "vk_dayInRange_zlB6k", qe = "vk_dayPreview_ZCgU6", Ke = "vk_dayPreviewEnd_TwdTZ", je = "vk_dayStart_emNj-", Xe = "vk_dayEnd_GXIcL", Je = "vk_daySingle_a7xx2", Qe = "vk_calendarFooter_usxM5", pe = "vk_hint_LPGSe", s = {
|
|
24
|
-
triggerGroup: Ee,
|
|
25
|
-
triggerWithClear: Le,
|
|
26
|
-
triggerLabel: $e,
|
|
27
|
-
triggerClear: Fe,
|
|
28
|
-
popover: He,
|
|
29
|
-
presets: Ae,
|
|
30
|
-
presetSpacer: Ge,
|
|
31
|
-
calendarPane: ze,
|
|
32
|
-
calendar: Ne,
|
|
33
|
-
calHeader: Oe,
|
|
34
|
-
calMonth: We,
|
|
35
|
-
weekdays: Ye,
|
|
36
|
-
weekday: Ie,
|
|
37
|
-
daysGrid: Re,
|
|
38
|
-
day: Be,
|
|
39
|
-
dayMuted: Ve,
|
|
40
|
-
dayToday: Ze,
|
|
41
|
-
dayInRange: Ue,
|
|
42
|
-
dayPreview: qe,
|
|
43
|
-
dayPreviewEnd: Ke,
|
|
44
|
-
dayStart: je,
|
|
45
|
-
dayEnd: Xe,
|
|
46
|
-
daySingle: Je,
|
|
47
|
-
calendarFooter: Qe,
|
|
48
|
-
hint: pe
|
|
49
|
-
};
|
|
50
|
-
function T(e) {
|
|
51
|
-
const t = new Date(e);
|
|
52
|
-
return t.setHours(0, 0, 0, 0), t;
|
|
53
|
-
}
|
|
54
|
-
function F(e) {
|
|
55
|
-
const t = new Date(e);
|
|
56
|
-
return t.setHours(23, 59, 59, 999), t;
|
|
57
|
-
}
|
|
58
|
-
function et(e, t, c) {
|
|
59
|
-
if (!t) {
|
|
60
|
-
const _ = F(new Date(e)).getTime();
|
|
61
|
-
return {
|
|
62
|
-
nextDraft: { start: e, end: _ },
|
|
63
|
-
nextAwaitingEnd: !0,
|
|
64
|
-
committed: null
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
const w = c !== null ? c.start : e, C = Math.min(w, e), k = Math.max(w, e), D = {
|
|
68
|
-
start: C,
|
|
69
|
-
end: F(new Date(k)).getTime()
|
|
70
|
-
};
|
|
71
|
-
return {
|
|
72
|
-
nextDraft: D,
|
|
73
|
-
nextAwaitingEnd: !1,
|
|
74
|
-
committed: D
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
var tt = /* @__PURE__ */ N("<div><div><span></span></div><div></div><div>"), nt = /* @__PURE__ */ N("<span>");
|
|
78
|
-
function at(e) {
|
|
79
|
-
const t = e.getFullYear(), c = e.getMonth(), C = (new Date(t, c, 1).getDay() + 6) % 7, k = [], D = new Date(t, c, 1 - C);
|
|
80
|
-
for (let _ = 0; _ < 42; _++) {
|
|
81
|
-
const l = new Date(D);
|
|
82
|
-
l.setDate(D.getDate() + _), k.push({
|
|
83
|
-
date: l,
|
|
84
|
-
inMonth: l.getMonth() === c,
|
|
85
|
-
timestamp: T(l).getTime()
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
return k;
|
|
89
|
-
}
|
|
90
|
-
function rt() {
|
|
91
|
-
const e = new Date(2024, 0, 1), t = [];
|
|
92
|
-
for (let c = 0; c < 7; c++) {
|
|
93
|
-
const w = new Date(e);
|
|
94
|
-
w.setDate(e.getDate() + c), t.push(Z(w, {
|
|
95
|
-
weekday: "narrow"
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
return t;
|
|
99
|
-
}
|
|
100
|
-
function it(e) {
|
|
101
|
-
const t = $(() => at(e.viewMonth)), c = $(() => rt()), w = T(/* @__PURE__ */ new Date()).getTime(), C = () => Z(e.viewMonth, {
|
|
102
|
-
month: "long",
|
|
103
|
-
year: "numeric"
|
|
104
|
-
}), k = $(() => {
|
|
105
|
-
const l = e.range;
|
|
106
|
-
if (!l) return null;
|
|
107
|
-
if (e.awaitingEnd && e.hoverDay !== null) {
|
|
108
|
-
const d = Math.min(l.start, e.hoverDay), x = Math.max(l.start, e.hoverDay);
|
|
109
|
-
return {
|
|
110
|
-
start: d,
|
|
111
|
-
end: x
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
return l;
|
|
115
|
-
}), D = $(() => e.awaitingEnd && e.hoverDay !== null && !!e.range && e.hoverDay !== e.range.start), _ = (l) => {
|
|
116
|
-
const d = k(), x = !!d && l.timestamp >= d.start && l.timestamp <= d.end, b = D(), M = b && l.timestamp === e.hoverDay, i = !!d && l.timestamp === d.start && !M, o = !!d && l.timestamp === d.end && !M;
|
|
117
|
-
return {
|
|
118
|
-
inRange: x,
|
|
119
|
-
isStart: i,
|
|
120
|
-
isEnd: o,
|
|
121
|
-
isToday: l.timestamp === w,
|
|
122
|
-
isSingle: !!d && d.start === d.end && l.timestamp === d.start && !b,
|
|
123
|
-
isPreview: b && x && !M,
|
|
124
|
-
isPreviewEnd: M
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
return (() => {
|
|
128
|
-
var l = tt(), d = l.firstChild, x = d.firstChild, b = d.nextSibling, M = b.nextSibling;
|
|
129
|
-
return m(d, g(z, {
|
|
130
|
-
variant: "ghost",
|
|
131
|
-
size: "xs",
|
|
132
|
-
iconOnly: !0,
|
|
133
|
-
get onClick() {
|
|
134
|
-
return e.onPrevMonth;
|
|
135
|
-
},
|
|
136
|
-
get title() {
|
|
137
|
-
return h("Previous month");
|
|
138
|
-
},
|
|
139
|
-
get "aria-label"() {
|
|
140
|
-
return h("Previous month");
|
|
141
|
-
},
|
|
142
|
-
get children() {
|
|
143
|
-
return g(be, {
|
|
144
|
-
get class() {
|
|
145
|
-
return V.icon2xs;
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}), x), m(x, C), m(d, g(z, {
|
|
150
|
-
variant: "ghost",
|
|
151
|
-
size: "xs",
|
|
152
|
-
iconOnly: !0,
|
|
153
|
-
get onClick() {
|
|
154
|
-
return e.onNextMonth;
|
|
155
|
-
},
|
|
156
|
-
get title() {
|
|
157
|
-
return h("Next month");
|
|
158
|
-
},
|
|
159
|
-
get "aria-label"() {
|
|
160
|
-
return h("Next month");
|
|
161
|
-
},
|
|
162
|
-
get children() {
|
|
163
|
-
return g(xe, {
|
|
164
|
-
get class() {
|
|
165
|
-
return V.icon2xs;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}), null), m(b, g(X, {
|
|
170
|
-
get each() {
|
|
171
|
-
return c();
|
|
172
|
-
},
|
|
173
|
-
children: (i) => (() => {
|
|
174
|
-
var o = nt();
|
|
175
|
-
return m(o, i), L(() => y(o, s.weekday)), o;
|
|
176
|
-
})()
|
|
177
|
-
})), M.addEventListener("mouseleave", () => e.onHoverDay(null)), m(M, g(X, {
|
|
178
|
-
get each() {
|
|
179
|
-
return t();
|
|
180
|
-
},
|
|
181
|
-
children: (i) => {
|
|
182
|
-
const o = $(() => _(i));
|
|
183
|
-
return (
|
|
184
|
-
// ⚠ STAYS RAW: a calendar day cell — a grid cell, not an action
|
|
185
|
-
// button.
|
|
186
|
-
g(Te, {
|
|
187
|
-
type: "button",
|
|
188
|
-
get class() {
|
|
189
|
-
return `${s.day}
|
|
190
|
-
${i.inMonth ? "" : s.dayMuted}
|
|
191
|
-
${o().inRange ? s.dayInRange : ""}
|
|
192
|
-
${o().isPreview ? s.dayPreview : ""}
|
|
193
|
-
${o().isStart ? s.dayStart : ""}
|
|
194
|
-
${o().isEnd ? s.dayEnd : ""}
|
|
195
|
-
${o().isPreviewEnd ? s.dayPreviewEnd : ""}
|
|
196
|
-
${o().isSingle ? s.daySingle : ""}
|
|
197
|
-
${o().isToday ? s.dayToday : ""}`;
|
|
198
|
-
},
|
|
199
|
-
onClick: () => e.onPickDay(i.timestamp),
|
|
200
|
-
onMouseEnter: () => e.onHoverDay(i.timestamp),
|
|
201
|
-
get children() {
|
|
202
|
-
return i.date.getDate();
|
|
203
|
-
}
|
|
204
|
-
})
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
})), L((i) => {
|
|
208
|
-
var o = s.calendar, v = s.calHeader, O = s.calMonth, W = s.weekdays, H = s.daysGrid;
|
|
209
|
-
return o !== i.e && y(l, i.e = o), v !== i.t && y(d, i.t = v), O !== i.a && y(x, i.a = O), W !== i.o && y(b, i.o = W), H !== i.i && y(M, i.i = H), i;
|
|
210
|
-
}, {
|
|
211
|
-
e: void 0,
|
|
212
|
-
t: void 0,
|
|
213
|
-
a: void 0,
|
|
214
|
-
o: void 0,
|
|
215
|
-
i: void 0
|
|
216
|
-
}), l;
|
|
217
|
-
})();
|
|
218
|
-
}
|
|
219
|
-
function ot(e, t) {
|
|
220
|
-
return e ?? t;
|
|
221
|
-
}
|
|
222
|
-
function st(e, t) {
|
|
223
|
-
return e <= 0 ? -1 : t >= 0 && t < e ? t : 0;
|
|
224
|
-
}
|
|
225
|
-
var K = /* @__PURE__ */ N("<span>"), lt = /* @__PURE__ */ N("<div>"), dt = /* @__PURE__ */ N("<div role=dialog aria-modal=true tabindex=-1><div><div></div></div><div><div>");
|
|
226
|
-
function oe() {
|
|
227
|
-
return [{
|
|
228
|
-
id: "today",
|
|
229
|
-
label: h("Today"),
|
|
230
|
-
build: () => {
|
|
231
|
-
const e = /* @__PURE__ */ new Date();
|
|
232
|
-
return {
|
|
233
|
-
start: T(e).getTime(),
|
|
234
|
-
end: F(e).getTime()
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
}, {
|
|
238
|
-
id: "yesterday",
|
|
239
|
-
label: h("Yesterday"),
|
|
240
|
-
build: () => {
|
|
241
|
-
const e = /* @__PURE__ */ new Date();
|
|
242
|
-
return e.setDate(e.getDate() - 1), {
|
|
243
|
-
start: T(e).getTime(),
|
|
244
|
-
end: F(e).getTime()
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
}, {
|
|
248
|
-
id: "last7",
|
|
249
|
-
label: h("Last 7 days"),
|
|
250
|
-
build: () => {
|
|
251
|
-
const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
252
|
-
return t.setDate(t.getDate() - 6), {
|
|
253
|
-
start: T(t).getTime(),
|
|
254
|
-
end: F(e).getTime()
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
}, {
|
|
258
|
-
id: "last30",
|
|
259
|
-
label: h("Last 30 days"),
|
|
260
|
-
build: () => {
|
|
261
|
-
const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
262
|
-
return t.setDate(t.getDate() - 29), {
|
|
263
|
-
start: T(t).getTime(),
|
|
264
|
-
end: F(e).getTime()
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}, {
|
|
268
|
-
id: "thisMonth",
|
|
269
|
-
label: h("This month"),
|
|
270
|
-
build: () => {
|
|
271
|
-
const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), 1), c = new Date(e.getFullYear(), e.getMonth() + 1, 0);
|
|
272
|
-
return {
|
|
273
|
-
start: T(t).getTime(),
|
|
274
|
-
end: F(c).getTime()
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
}, {
|
|
278
|
-
id: "custom",
|
|
279
|
-
label: h("Custom range"),
|
|
280
|
-
build: () => null
|
|
281
|
-
}];
|
|
282
|
-
}
|
|
283
|
-
function j(e) {
|
|
284
|
-
if (!e) return null;
|
|
285
|
-
for (const t of oe()) {
|
|
286
|
-
if (t.id === "custom") continue;
|
|
287
|
-
const c = t.build();
|
|
288
|
-
if (c && c.start === e.start && c.end === e.end) return t.id;
|
|
289
|
-
}
|
|
290
|
-
return "custom";
|
|
291
|
-
}
|
|
292
|
-
function re(e) {
|
|
293
|
-
if (!e) return h("Filter by date");
|
|
294
|
-
const t = T(new Date(e.start)).getTime() === T(new Date(e.end)).getTime(), c = {
|
|
295
|
-
month: "short",
|
|
296
|
-
day: "numeric"
|
|
297
|
-
}, w = Z(new Date(e.start), c);
|
|
298
|
-
if (t) return w;
|
|
299
|
-
const C = Z(new Date(e.end), c);
|
|
300
|
-
return `${w} – ${C}`;
|
|
301
|
-
}
|
|
302
|
-
function _t(e) {
|
|
303
|
-
const [t, c] = E(!1), w = e.value ? new Date(e.value.start) : /* @__PURE__ */ new Date(), [C, k] = E(new Date(w.getFullYear(), w.getMonth(), 1)), [D, _] = E(e.value), [l, d] = E(!1), [x, b] = E(null), [M, i] = E(j(e.value));
|
|
304
|
-
let o, v;
|
|
305
|
-
const [O, W] = E({
|
|
306
|
-
top: "0px",
|
|
307
|
-
left: "0px"
|
|
308
|
-
}), H = () => {
|
|
309
|
-
if (!o) return;
|
|
310
|
-
const n = o.getBoundingClientRect(), a = 8, u = (v == null ? void 0 : v.offsetWidth) || 480, P = (v == null ? void 0 : v.offsetHeight) || 320, S = window.innerWidth, r = window.innerHeight;
|
|
311
|
-
let f;
|
|
312
|
-
e.align === "end" ? f = Math.max(a, n.right - u) : (f = n.left, f + u + a > S && (f = Math.max(a, S - u - a)));
|
|
313
|
-
const A = r - n.bottom - a, R = n.top - a;
|
|
314
|
-
let G;
|
|
315
|
-
P <= A || A >= R ? G = Math.min(n.bottom + 4, Math.max(a, r - P - a)) : G = Math.max(a, n.top - P - 4), W({
|
|
316
|
-
top: `${G}px`,
|
|
317
|
-
left: `${f}px`,
|
|
318
|
-
width: `${u}px`
|
|
319
|
-
});
|
|
320
|
-
}, se = () => {
|
|
321
|
-
_(e.value);
|
|
322
|
-
const n = j(e.value);
|
|
323
|
-
i(n);
|
|
324
|
-
const a = e.value ? new Date(e.value.start) : /* @__PURE__ */ new Date();
|
|
325
|
-
k(new Date(a.getFullYear(), a.getMonth(), 1)), d(!1), b(null), H(), c(!0), requestAnimationFrame(() => {
|
|
326
|
-
var P;
|
|
327
|
-
H();
|
|
328
|
-
const u = v == null ? void 0 : v.querySelectorAll("button");
|
|
329
|
-
if (u && u.length > 0) {
|
|
330
|
-
const S = ee(), r = n !== null ? S.findIndex((A) => A.id === n) : -1, f = st(S.length, r);
|
|
331
|
-
(P = f >= 0 ? u[f] : u[0]) == null || P.focus();
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
}, U = () => {
|
|
335
|
-
c(!1), b(null);
|
|
336
|
-
}, le = () => t() ? U() : se();
|
|
337
|
-
let Y;
|
|
338
|
-
const J = () => (Y == null ? void 0 : Y.isTopmost()) === !0, Q = (n) => {
|
|
339
|
-
if (!J()) return;
|
|
340
|
-
const a = n.target;
|
|
341
|
-
o && !o.contains(a) && v && !v.contains(a) && U();
|
|
342
|
-
}, q = Se({
|
|
343
|
-
open: t,
|
|
344
|
-
onDismiss: U,
|
|
345
|
-
ownerDocument: () => (v == null ? void 0 : v.ownerDocument) ?? (o == null ? void 0 : o.ownerDocument) ?? globalThis.document
|
|
346
|
-
});
|
|
347
|
-
_e(() => {
|
|
348
|
-
if (!t()) return;
|
|
349
|
-
const n = () => H();
|
|
350
|
-
window.addEventListener("scroll", n, !0), window.addEventListener("resize", n);
|
|
351
|
-
const a = (u) => {
|
|
352
|
-
J() && q.handleKeyDown(u);
|
|
353
|
-
};
|
|
354
|
-
document.addEventListener("mousedown", Q), document.addEventListener("keydown", a), ke(() => {
|
|
355
|
-
window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n), document.removeEventListener("mousedown", Q), document.removeEventListener("keydown", a);
|
|
356
|
-
});
|
|
357
|
-
});
|
|
358
|
-
const de = (n) => {
|
|
359
|
-
const a = et(n, l(), D());
|
|
360
|
-
_(a.nextDraft), d(a.nextAwaitingEnd), i(a.committed !== null ? j(a.committed) : "custom"), a.committed !== null && e.onChange(a.committed);
|
|
361
|
-
}, ce = (n) => {
|
|
362
|
-
if (i(n.id), n.id === "custom") {
|
|
363
|
-
d(!1);
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
const a = n.build();
|
|
367
|
-
if (_(a), d(!1), a) {
|
|
368
|
-
const u = new Date(a.start);
|
|
369
|
-
k(new Date(u.getFullYear(), u.getMonth(), 1));
|
|
370
|
-
}
|
|
371
|
-
e.onChange(a);
|
|
372
|
-
}, p = (n) => {
|
|
373
|
-
n.stopPropagation(), _(null), i(null), d(!1), e.onChange(null);
|
|
374
|
-
}, ue = () => {
|
|
375
|
-
k((n) => new Date(n.getFullYear(), n.getMonth() - 1, 1));
|
|
376
|
-
}, ge = () => {
|
|
377
|
-
k((n) => new Date(n.getFullYear(), n.getMonth() + 1, 1));
|
|
378
|
-
}, ee = $(oe), ve = $(() => re(e.value)), I = () => e.value !== null;
|
|
379
|
-
return [(() => {
|
|
380
|
-
var n = lt();
|
|
381
|
-
return m(n, g(z, {
|
|
382
|
-
ref(a) {
|
|
383
|
-
var u = o;
|
|
384
|
-
typeof u == "function" ? u(a) : o = a;
|
|
385
|
-
},
|
|
386
|
-
type: "button",
|
|
387
|
-
variant: "outline",
|
|
388
|
-
size: "xs",
|
|
389
|
-
get active() {
|
|
390
|
-
return I() || t();
|
|
391
|
-
},
|
|
392
|
-
get leadingIcon() {
|
|
393
|
-
return g(Me, {
|
|
394
|
-
get class() {
|
|
395
|
-
return V.iconXs;
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
},
|
|
399
|
-
get class() {
|
|
400
|
-
return `${I() ? s.triggerWithClear : ""} ${e.triggerClass ?? ""}`;
|
|
401
|
-
},
|
|
402
|
-
onClick: le,
|
|
403
|
-
get title() {
|
|
404
|
-
return e.triggerTitle ?? h("Filter by date");
|
|
405
|
-
},
|
|
406
|
-
"aria-haspopup": "dialog",
|
|
407
|
-
get "aria-expanded"() {
|
|
408
|
-
return t() ? "true" : "false";
|
|
409
|
-
},
|
|
410
|
-
get children() {
|
|
411
|
-
return g(B, {
|
|
412
|
-
get when() {
|
|
413
|
-
return I();
|
|
414
|
-
},
|
|
415
|
-
get children() {
|
|
416
|
-
var a = K();
|
|
417
|
-
return m(a, ve), L(() => y(a, s.triggerLabel)), a;
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
}), null), m(n, g(B, {
|
|
422
|
-
get when() {
|
|
423
|
-
return I();
|
|
424
|
-
},
|
|
425
|
-
get children() {
|
|
426
|
-
return g(z, {
|
|
427
|
-
get class() {
|
|
428
|
-
return s.triggerClear;
|
|
429
|
-
},
|
|
430
|
-
variant: "ghost",
|
|
431
|
-
size: "2xs",
|
|
432
|
-
iconOnly: !0,
|
|
433
|
-
onClick: p,
|
|
434
|
-
get "aria-label"() {
|
|
435
|
-
return h("Clear date filter");
|
|
436
|
-
},
|
|
437
|
-
get title() {
|
|
438
|
-
return h("Clear date filter");
|
|
439
|
-
},
|
|
440
|
-
get children() {
|
|
441
|
-
return g(Pe, {
|
|
442
|
-
get class() {
|
|
443
|
-
return V.icon3xs;
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
}), null), L(() => y(n, s.triggerGroup)), n;
|
|
450
|
-
})(), g(B, {
|
|
451
|
-
get when() {
|
|
452
|
-
return t();
|
|
453
|
-
},
|
|
454
|
-
get children() {
|
|
455
|
-
return g(Ce, {
|
|
456
|
-
type: "popover",
|
|
457
|
-
element: () => v,
|
|
458
|
-
idPrefix: "date-range-picker",
|
|
459
|
-
onLayer: (n) => {
|
|
460
|
-
Y = n;
|
|
461
|
-
},
|
|
462
|
-
get children() {
|
|
463
|
-
var n = dt(), a = n.firstChild, u = a.firstChild, P = a.nextSibling, S = P.firstChild;
|
|
464
|
-
return he(n, "keydown", q.handleKeyDown, !0), me((r) => {
|
|
465
|
-
v = r, q.captureDialog(r);
|
|
466
|
-
}, n), m(a, g(X, {
|
|
467
|
-
get each() {
|
|
468
|
-
return ee();
|
|
469
|
-
},
|
|
470
|
-
children: (r) => g(z, {
|
|
471
|
-
variant: "ghost",
|
|
472
|
-
size: "2xs",
|
|
473
|
-
get active() {
|
|
474
|
-
return M() === r.id;
|
|
475
|
-
},
|
|
476
|
-
onClick: () => ce(r),
|
|
477
|
-
get children() {
|
|
478
|
-
return r.label;
|
|
479
|
-
}
|
|
480
|
-
})
|
|
481
|
-
}), u), m(a, g(z, {
|
|
482
|
-
variant: "ghost",
|
|
483
|
-
size: "2xs",
|
|
484
|
-
onClick: p,
|
|
485
|
-
get disabled() {
|
|
486
|
-
return !e.value;
|
|
487
|
-
},
|
|
488
|
-
get children() {
|
|
489
|
-
return h("Clear filter");
|
|
490
|
-
}
|
|
491
|
-
}), null), m(P, g(it, {
|
|
492
|
-
get viewMonth() {
|
|
493
|
-
return C();
|
|
494
|
-
},
|
|
495
|
-
onPrevMonth: ue,
|
|
496
|
-
onNextMonth: ge,
|
|
497
|
-
get range() {
|
|
498
|
-
return D();
|
|
499
|
-
},
|
|
500
|
-
get hoverDay() {
|
|
501
|
-
return x();
|
|
502
|
-
},
|
|
503
|
-
get awaitingEnd() {
|
|
504
|
-
return l();
|
|
505
|
-
},
|
|
506
|
-
onPickDay: de,
|
|
507
|
-
onHoverDay: b
|
|
508
|
-
}), S), m(S, g(B, {
|
|
509
|
-
get when() {
|
|
510
|
-
return D();
|
|
511
|
-
},
|
|
512
|
-
get fallback() {
|
|
513
|
-
return (() => {
|
|
514
|
-
var r = K();
|
|
515
|
-
return m(r, () => h("Pick a start date")), L(() => y(r, s.hint)), r;
|
|
516
|
-
})();
|
|
517
|
-
},
|
|
518
|
-
get children() {
|
|
519
|
-
var r = K();
|
|
520
|
-
return m(r, (() => {
|
|
521
|
-
var f = ye(() => !!l());
|
|
522
|
-
return () => f() ? h("Pick an end date") : re(D());
|
|
523
|
-
})()), L(() => y(r, s.hint)), r;
|
|
524
|
-
}
|
|
525
|
-
})), L((r) => {
|
|
526
|
-
var f = s.popover, A = O(), R = ot(e.triggerTitle, h("Filter by date")), G = s.presets, te = s.presetSpacer, ne = s.calendarPane, ae = s.calendarFooter;
|
|
527
|
-
return f !== r.e && y(n, r.e = f), r.t = we(n, A, r.t), R !== r.a && fe(n, "aria-label", r.a = R), G !== r.o && y(a, r.o = G), te !== r.i && y(u, r.i = te), ne !== r.n && y(P, r.n = ne), ae !== r.s && y(S, r.s = ae), r;
|
|
528
|
-
}, {
|
|
529
|
-
e: void 0,
|
|
530
|
-
t: void 0,
|
|
531
|
-
a: void 0,
|
|
532
|
-
o: void 0,
|
|
533
|
-
i: void 0,
|
|
534
|
-
n: void 0,
|
|
535
|
-
s: void 0
|
|
536
|
-
}), n;
|
|
537
|
-
}
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
})];
|
|
541
|
-
}
|
|
542
|
-
De(["keydown"]);
|
|
543
|
-
export {
|
|
544
|
-
_t as D,
|
|
545
|
-
ie as a,
|
|
546
|
-
F as e,
|
|
547
|
-
Dt as f,
|
|
548
|
-
et as p,
|
|
549
|
-
T as s
|
|
550
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),g=require("solid-js"),$=require("./Button-OyZHrl-t.cjs"),z=require("@vokril/icons"),le=require("./HostPortal-CpWsArs6.cjs"),de=require("./createDialogShellFocus-CQ0VNC2g.cjs"),h=require("./i18n-D3s-a2a0.cjs"),ue=require("./Input-Brp5EDhg.cjs"),B=require("./iconScale.module-CzmKG1rf.cjs");function Y(){try{return new Intl.DateTimeFormat().resolvedOptions().locale}catch{return"en-US"}}function O(e,n){return e.toLocaleDateString(Y(),n)}function ge(e,n){return e.toLocaleString(Y(),n)}const me="vk_triggerGroup_hAWij",ve="vk_triggerWithClear_nLNSo",he="vk_triggerLabel_-RkgH",ye="vk_triggerClear_6fo1y",we="vk_popover_AAi4D",fe="vk_presets_vG-aY",De="vk_presetSpacer_5AWR5",ke="vk_calendarPane_leZcA",_e="vk_calendar_9Di5h",Ce="vk_calHeader_wnNqV",be="vk_calMonth_W97Ui",Se="vk_weekdays_Gp5zD",Me="vk_weekday_VrZcR",xe="vk_daysGrid_ZOZfa",Pe="vk_day_hDzcB",Te="vk_dayMuted_TRu8N",Ee="vk_dayToday_AUzc3",Le="vk_dayInRange_zlB6k",Fe="vk_dayPreview_ZCgU6",$e="vk_dayPreviewEnd_TwdTZ",Ne="vk_dayStart_emNj-",He="vk_dayEnd_GXIcL",Ae="vk_daySingle_a7xx2",Ge="vk_calendarFooter_usxM5",qe="vk_hint_LPGSe",c={triggerGroup:me,triggerWithClear:ve,triggerLabel:he,triggerClear:ye,popover:we,presets:fe,presetSpacer:De,calendarPane:ke,calendar:_e,calHeader:Ce,calMonth:be,weekdays:Se,weekday:Me,daysGrid:xe,day:Pe,dayMuted:Te,dayToday:Ee,dayInRange:Le,dayPreview:Fe,dayPreviewEnd:$e,dayStart:Ne,dayEnd:He,daySingle:Ae,calendarFooter:Ge,hint:qe};function M(e){const n=new Date(e);return n.setHours(0,0,0,0),n}function T(e){const n=new Date(e);return n.setHours(23,59,59,999),n}function ee(e,n,u){if(!n){const D=T(new Date(e)).getTime();return{nextDraft:{start:e,end:D},nextAwaitingEnd:!0,committed:null}}const y=u!==null?u.start:e,x=Math.min(y,e),k=Math.max(y,e),f={start:x,end:T(new Date(k)).getTime()};return{nextDraft:f,nextAwaitingEnd:!1,committed:f}}var ze=t.template("<div><div><span></span></div><div></div><div>"),Be=t.template("<span>");function Oe(e){const n=e.getFullYear(),u=e.getMonth(),x=(new Date(n,u,1).getDay()+6)%7,k=[],f=new Date(n,u,1-x);for(let D=0;D<42;D++){const l=new Date(f);l.setDate(f.getDate()+D),k.push({date:l,inMonth:l.getMonth()===u,timestamp:M(l).getTime()})}return k}function pe(){const e=new Date(2024,0,1),n=[];for(let u=0;u<7;u++){const y=new Date(e);y.setDate(e.getDate()+u),n.push(O(y,{weekday:"narrow"}))}return n}function Ie(e){const n=g.createMemo(()=>Oe(e.viewMonth)),u=g.createMemo(()=>pe()),y=M(new Date).getTime(),x=()=>O(e.viewMonth,{month:"long",year:"numeric"}),k=g.createMemo(()=>{const l=e.range;if(!l)return null;if(e.awaitingEnd&&e.hoverDay!==null){const d=Math.min(l.start,e.hoverDay),C=Math.max(l.start,e.hoverDay);return{start:d,end:C}}return l}),f=g.createMemo(()=>e.awaitingEnd&&e.hoverDay!==null&&!!e.range&&e.hoverDay!==e.range.start),D=l=>{const d=k(),C=!!d&&l.timestamp>=d.start&&l.timestamp<=d.end,_=f(),b=_&&l.timestamp===e.hoverDay,i=!!d&&l.timestamp===d.start&&!b,s=!!d&&l.timestamp===d.end&&!b;return{inRange:C,isStart:i,isEnd:s,isToday:l.timestamp===y,isSingle:!!d&&d.start===d.end&&l.timestamp===d.start&&!_,isPreview:_&&C&&!b,isPreviewEnd:b}};return(()=>{var l=ze(),d=l.firstChild,C=d.firstChild,_=d.nextSibling,b=_.nextSibling;return t.insert(d,t.createComponent($.Button,{variant:"ghost",size:"xs",iconOnly:!0,get onClick(){return e.onPrevMonth},get title(){return h.t("Previous month")},get"aria-label"(){return h.t("Previous month")},get children(){return t.createComponent(z.VpChevronLeft,{get class(){return B.iconScale.icon2xs}})}}),C),t.insert(C,x),t.insert(d,t.createComponent($.Button,{variant:"ghost",size:"xs",iconOnly:!0,get onClick(){return e.onNextMonth},get title(){return h.t("Next month")},get"aria-label"(){return h.t("Next month")},get children(){return t.createComponent(z.VpChevronRight,{get class(){return B.iconScale.icon2xs}})}}),null),t.insert(_,t.createComponent(g.For,{get each(){return u()},children:i=>(()=>{var s=Be();return t.insert(s,i),t.effect(()=>t.className(s,c.weekday)),s})()})),b.addEventListener("mouseleave",()=>e.onHoverDay(null)),t.insert(b,t.createComponent(g.For,{get each(){return n()},children:i=>{const s=g.createMemo(()=>D(i));return t.createComponent(ue.PressableSurface,{type:"button",get class(){return`${c.day}
|
|
2
|
-
${i.inMonth?"":c.dayMuted}
|
|
3
|
-
${s().inRange?c.dayInRange:""}
|
|
4
|
-
${s().isPreview?c.dayPreview:""}
|
|
5
|
-
${s().isStart?c.dayStart:""}
|
|
6
|
-
${s().isEnd?c.dayEnd:""}
|
|
7
|
-
${s().isPreviewEnd?c.dayPreviewEnd:""}
|
|
8
|
-
${s().isSingle?c.daySingle:""}
|
|
9
|
-
${s().isToday?c.dayToday:""}`},onClick:()=>e.onPickDay(i.timestamp),onMouseEnter:()=>e.onHoverDay(i.timestamp),get children(){return i.date.getDate()}})}})),t.effect(i=>{var s=c.calendar,v=c.calHeader,N=c.calMonth,H=c.weekdays,E=c.daysGrid;return s!==i.e&&t.className(l,i.e=s),v!==i.t&&t.className(d,i.t=v),N!==i.a&&t.className(C,i.a=N),H!==i.o&&t.className(_,i.o=H),E!==i.i&&t.className(b,i.i=E),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()}function Re(e,n){return e??n}function We(e,n){return e<=0?-1:n>=0&&n<e?n:0}var R=t.template("<span>"),Ye=t.template("<div>"),Ve=t.template("<div role=dialog aria-modal=true tabindex=-1><div><div></div></div><div><div>");function te(){return[{id:"today",label:h.t("Today"),build:()=>{const e=new Date;return{start:M(e).getTime(),end:T(e).getTime()}}},{id:"yesterday",label:h.t("Yesterday"),build:()=>{const e=new Date;return e.setDate(e.getDate()-1),{start:M(e).getTime(),end:T(e).getTime()}}},{id:"last7",label:h.t("Last 7 days"),build:()=>{const e=new Date,n=new Date;return n.setDate(n.getDate()-6),{start:M(n).getTime(),end:T(e).getTime()}}},{id:"last30",label:h.t("Last 30 days"),build:()=>{const e=new Date,n=new Date;return n.setDate(n.getDate()-29),{start:M(n).getTime(),end:T(e).getTime()}}},{id:"thisMonth",label:h.t("This month"),build:()=>{const e=new Date,n=new Date(e.getFullYear(),e.getMonth(),1),u=new Date(e.getFullYear(),e.getMonth()+1,0);return{start:M(n).getTime(),end:T(u).getTime()}}},{id:"custom",label:h.t("Custom range"),build:()=>null}]}function W(e){if(!e)return null;for(const n of te()){if(n.id==="custom")continue;const u=n.build();if(u&&u.start===e.start&&u.end===e.end)return n.id}return"custom"}function Q(e){if(!e)return h.t("Filter by date");const n=M(new Date(e.start)).getTime()===M(new Date(e.end)).getTime(),u={month:"short",day:"numeric"},y=O(new Date(e.start),u);if(n)return y;const x=O(new Date(e.end),u);return`${y} – ${x}`}function Ze(e){const[n,u]=g.createSignal(!1),y=e.value?new Date(e.value.start):new Date,[x,k]=g.createSignal(new Date(y.getFullYear(),y.getMonth(),1)),[f,D]=g.createSignal(e.value),[l,d]=g.createSignal(!1),[C,_]=g.createSignal(null),[b,i]=g.createSignal(W(e.value));let s,v;const[N,H]=g.createSignal({top:"0px",left:"0px"}),E=()=>{if(!s)return;const a=s.getBoundingClientRect(),r=8,m=(v==null?void 0:v.offsetWidth)||480,S=(v==null?void 0:v.offsetHeight)||320,P=window.innerWidth,o=window.innerHeight;let w;e.align==="end"?w=Math.max(r,a.right-m):(w=a.left,w+m+r>P&&(w=Math.max(r,P-m-r)));const L=o-a.bottom-r,q=a.top-r;let F;S<=L||L>=q?F=Math.min(a.bottom+4,Math.max(r,o-S-r)):F=Math.max(r,a.top-S-4),H({top:`${F}px`,left:`${w}px`,width:`${m}px`})},ne=()=>{D(e.value);const a=W(e.value);i(a);const r=e.value?new Date(e.value.start):new Date;k(new Date(r.getFullYear(),r.getMonth(),1)),d(!1),_(null),E(),u(!0),requestAnimationFrame(()=>{var S;E();const m=v==null?void 0:v.querySelectorAll("button");if(m&&m.length>0){const P=K(),o=a!==null?P.findIndex(L=>L.id===a):-1,w=We(P.length,o);(S=w>=0?m[w]:m[0])==null||S.focus()}})},p=()=>{u(!1),_(null)},ae=()=>n()?p():ne();let A;const V=()=>(A==null?void 0:A.isTopmost())===!0,Z=a=>{if(!V())return;const r=a.target;s&&!s.contains(r)&&v&&!v.contains(r)&&p()},I=de.createDialogShellFocus({open:n,onDismiss:p,ownerDocument:()=>(v==null?void 0:v.ownerDocument)??(s==null?void 0:s.ownerDocument)??globalThis.document});g.createEffect(()=>{if(!n())return;const a=()=>E();window.addEventListener("scroll",a,!0),window.addEventListener("resize",a);const r=m=>{V()&&I.handleKeyDown(m)};document.addEventListener("mousedown",Z),document.addEventListener("keydown",r),g.onCleanup(()=>{window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a),document.removeEventListener("mousedown",Z),document.removeEventListener("keydown",r)})});const re=a=>{const r=ee(a,l(),f());D(r.nextDraft),d(r.nextAwaitingEnd),i(r.committed!==null?W(r.committed):"custom"),r.committed!==null&&e.onChange(r.committed)},oe=a=>{if(i(a.id),a.id==="custom"){d(!1);return}const r=a.build();if(D(r),d(!1),r){const m=new Date(r.start);k(new Date(m.getFullYear(),m.getMonth(),1))}e.onChange(r)},U=a=>{a.stopPropagation(),D(null),i(null),d(!1),e.onChange(null)},ie=()=>{k(a=>new Date(a.getFullYear(),a.getMonth()-1,1))},se=()=>{k(a=>new Date(a.getFullYear(),a.getMonth()+1,1))},K=g.createMemo(te),ce=g.createMemo(()=>Q(e.value)),G=()=>e.value!==null;return[(()=>{var a=Ye();return t.insert(a,t.createComponent($.Button,{ref(r){var m=s;typeof m=="function"?m(r):s=r},type:"button",variant:"outline",size:"xs",get active(){return G()||n()},get leadingIcon(){return t.createComponent(z.VpCalendar,{get class(){return B.iconScale.iconXs}})},get class(){return`${G()?c.triggerWithClear:""} ${e.triggerClass??""}`},onClick:ae,get title(){return e.triggerTitle??h.t("Filter by date")},"aria-haspopup":"dialog",get"aria-expanded"(){return n()?"true":"false"},get children(){return t.createComponent(g.Show,{get when(){return G()},get children(){var r=R();return t.insert(r,ce),t.effect(()=>t.className(r,c.triggerLabel)),r}})}}),null),t.insert(a,t.createComponent(g.Show,{get when(){return G()},get children(){return t.createComponent($.Button,{get class(){return c.triggerClear},variant:"ghost",size:"2xs",iconOnly:!0,onClick:U,get"aria-label"(){return h.t("Clear date filter")},get title(){return h.t("Clear date filter")},get children(){return t.createComponent(z.VpClose,{get class(){return B.iconScale.icon3xs}})}})}}),null),t.effect(()=>t.className(a,c.triggerGroup)),a})(),t.createComponent(g.Show,{get when(){return n()},get children(){return t.createComponent(le.HostPortal,{type:"popover",element:()=>v,idPrefix:"date-range-picker",onLayer:a=>{A=a},get children(){var a=Ve(),r=a.firstChild,m=r.firstChild,S=r.nextSibling,P=S.firstChild;return t.addEventListener(a,"keydown",I.handleKeyDown,!0),t.use(o=>{v=o,I.captureDialog(o)},a),t.insert(r,t.createComponent(g.For,{get each(){return K()},children:o=>t.createComponent($.Button,{variant:"ghost",size:"2xs",get active(){return b()===o.id},onClick:()=>oe(o),get children(){return o.label}})}),m),t.insert(r,t.createComponent($.Button,{variant:"ghost",size:"2xs",onClick:U,get disabled(){return!e.value},get children(){return h.t("Clear filter")}}),null),t.insert(S,t.createComponent(Ie,{get viewMonth(){return x()},onPrevMonth:ie,onNextMonth:se,get range(){return f()},get hoverDay(){return C()},get awaitingEnd(){return l()},onPickDay:re,onHoverDay:_}),P),t.insert(P,t.createComponent(g.Show,{get when(){return f()},get fallback(){return(()=>{var o=R();return t.insert(o,()=>h.t("Pick a start date")),t.effect(()=>t.className(o,c.hint)),o})()},get children(){var o=R();return t.insert(o,(()=>{var w=t.memo(()=>!!l());return()=>w()?h.t("Pick an end date"):Q(f())})()),t.effect(()=>t.className(o,c.hint)),o}})),t.effect(o=>{var w=c.popover,L=N(),q=Re(e.triggerTitle,h.t("Filter by date")),F=c.presets,j=c.presetSpacer,X=c.calendarPane,J=c.calendarFooter;return w!==o.e&&t.className(a,o.e=w),o.t=t.style(a,L,o.t),q!==o.a&&t.setAttribute(a,"aria-label",o.a=q),F!==o.o&&t.className(r,o.o=F),j!==o.i&&t.className(m,o.i=j),X!==o.n&&t.className(S,o.n=X),J!==o.s&&t.className(P,o.s=J),o},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),a}})}})]}t.delegateEvents(["keydown"]);exports.DateRangePicker=Ze;exports.endOfDay=T;exports.formatDateTime=ge;exports.pickDayState=ee;exports.startOfDay=M;exports.systemFormatLocale=Y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),a=require("solid-js"),s="vk_root_hnB4O",m="vk_sm_rCrHH",_="vk_icon_CC9U3",v="vk_title_aimU- vk_titleSmMargin_PPvAx",h="vk_hint_r7IWi vk_hintSm_DYtn8",u="vk_action_05ZVL",r={root:s,sm:m,icon:_,title:v,hint:h,action:u};var d=t.template("<div aria-hidden=true>"),f=t.template("<p>"),$=t.template("<div>"),k=t.template("<div data-empty-state><p>");function g(n){return(()=>{var i=k(),l=i.firstChild;return t.insert(i,t.createComponent(a.Show,{get when(){return n.icon!=null},get children(){var e=d();return t.insert(e,()=>n.icon),t.effect(()=>t.className(e,r.icon)),e}}),l),t.insert(l,()=>n.title),t.insert(i,t.createComponent(a.Show,{get when(){return n.hint!=null},get children(){var e=f();return t.insert(e,()=>n.hint),t.effect(()=>t.className(e,r.hint)),e}}),null),t.insert(i,t.createComponent(a.Show,{get when(){return n.action!=null},get children(){var e=$();return t.insert(e,()=>n.action),t.effect(()=>t.className(e,r.action)),e}}),null),t.effect(e=>{var c=`${r.root} ${n.size==="sm"?r.sm:""} ${n.class??""}`,o=r.title;return c!==e.e&&t.className(i,e.e=c),o!==e.t&&t.className(l,e.t=o),e},{e:void 0,t:void 0}),i})()}exports.EmptyState=g;
|