@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
|
@@ -103,13 +103,15 @@ function formatRangeLabel(range) {
|
|
|
103
103
|
return `${startStr} – ${endStr}`;
|
|
104
104
|
}
|
|
105
105
|
export function DateRangePicker(props) {
|
|
106
|
+
const align = createMemo(() => props.align);
|
|
107
|
+
const value = createMemo(() => props.value);
|
|
106
108
|
const [open, setOpen] = createSignal(false);
|
|
107
|
-
const initialBase =
|
|
109
|
+
const initialBase = new Date(value()?.start ?? Date.now());
|
|
108
110
|
const [viewMonth, setViewMonth] = createSignal(new Date(initialBase.getFullYear(), initialBase.getMonth(), 1));
|
|
109
|
-
const [draftRange, setDraftRange] = createSignal(
|
|
111
|
+
const [draftRange, setDraftRange] = createSignal(value());
|
|
110
112
|
const [awaitingEnd, setAwaitingEnd] = createSignal(false);
|
|
111
113
|
const [hoverDay, setHoverDay] = createSignal(null);
|
|
112
|
-
const [activePreset, setActivePreset] = createSignal(detectPreset(
|
|
114
|
+
const [activePreset, setActivePreset] = createSignal(detectPreset(value()));
|
|
113
115
|
let triggerRef;
|
|
114
116
|
let popoverRef;
|
|
115
117
|
const [popStyle, setPopStyle] = createSignal({
|
|
@@ -126,7 +128,7 @@ export function DateRangePicker(props) {
|
|
|
126
128
|
const viewportWidth = window.innerWidth;
|
|
127
129
|
const viewportHeight = window.innerHeight;
|
|
128
130
|
let left;
|
|
129
|
-
if (
|
|
131
|
+
if (align() === 'end') {
|
|
130
132
|
left = Math.max(margin, rect.right - width);
|
|
131
133
|
}
|
|
132
134
|
else {
|
|
@@ -147,10 +149,10 @@ export function DateRangePicker(props) {
|
|
|
147
149
|
setPopStyle({ top: `${top}px`, left: `${left}px`, width: `${width}px` });
|
|
148
150
|
};
|
|
149
151
|
const openPopover = () => {
|
|
150
|
-
setDraftRange(
|
|
151
|
-
const nextPreset = detectPreset(
|
|
152
|
+
setDraftRange(value());
|
|
153
|
+
const nextPreset = detectPreset(value());
|
|
152
154
|
setActivePreset(nextPreset);
|
|
153
|
-
const base =
|
|
155
|
+
const base = new Date(value()?.start ?? Date.now());
|
|
154
156
|
setViewMonth(new Date(base.getFullYear(), base.getMonth(), 1));
|
|
155
157
|
setAwaitingEnd(false);
|
|
156
158
|
setHoverDay(null);
|
|
@@ -251,8 +253,8 @@ export function DateRangePicker(props) {
|
|
|
251
253
|
setViewMonth((d) => new Date(d.getFullYear(), d.getMonth() + 1, 1));
|
|
252
254
|
};
|
|
253
255
|
const presets = createMemo(buildPresets);
|
|
254
|
-
const labelText = createMemo(() => formatRangeLabel(
|
|
255
|
-
const hasFilter = () =>
|
|
256
|
+
const labelText = createMemo(() => formatRangeLabel(value()));
|
|
257
|
+
const hasFilter = () => value() !== null;
|
|
256
258
|
return (<>
|
|
257
259
|
<div class={styles.triggerGroup}>
|
|
258
260
|
<Button ref={triggerRef} type="button" variant="outline" size="xs" active={hasFilter() || open()} leadingIcon={<VpCalendar class={iconScale.iconXs}/>} class={`${hasFilter() ? styles.triggerWithClear : ''} ${props.triggerClass ?? ''}`} onClick={toggle} title={props.triggerTitle ?? t('Filter by date')} aria-haspopup="dialog" aria-expanded={open() ? 'true' : 'false'}>
|
|
@@ -282,7 +284,7 @@ export function DateRangePicker(props) {
|
|
|
282
284
|
</Button>)}
|
|
283
285
|
</For>
|
|
284
286
|
<div class={styles.presetSpacer}/>
|
|
285
|
-
<Button variant="ghost" size="2xs" onClick={clearFilter} disabled={!
|
|
287
|
+
<Button variant="ghost" size="2xs" onClick={clearFilter} disabled={!value()}>
|
|
286
288
|
{t('Clear filter')}
|
|
287
289
|
</Button>
|
|
288
290
|
</div>
|
|
@@ -5,6 +5,10 @@ import { t } from '../i18n/i18n';
|
|
|
5
5
|
import { pageSizeOptionLabel } from './paginationLabels';
|
|
6
6
|
import styles from './Pagination.module.css.js';
|
|
7
7
|
export function Pagination(props) {
|
|
8
|
+
const pageProp = createMemo(() => props.page);
|
|
9
|
+
const totalPagesProp = createMemo(() => props.totalPages);
|
|
10
|
+
const page = () => pageProp()();
|
|
11
|
+
const totalPages = () => totalPagesProp()();
|
|
8
12
|
const pageSizeOptions = createMemo(() => {
|
|
9
13
|
const unlimitedLabel = t('Unlimited');
|
|
10
14
|
return props.pageSizeOptions.map((option) => ({
|
|
@@ -26,13 +30,13 @@ export function Pagination(props) {
|
|
|
26
30
|
props.onPageSizeChange(Number(value));
|
|
27
31
|
}} searchable={false} ariaLabel={t('Page size')}/>
|
|
28
32
|
</label>
|
|
29
|
-
<Button size="sm" variant="secondary" disabled={
|
|
33
|
+
<Button size="sm" variant="secondary" disabled={page() <= 1} onClick={() => props.onPageChange(Math.max(1, page() - 1))}>
|
|
30
34
|
{t('Previous')}
|
|
31
35
|
</Button>
|
|
32
36
|
<span class={styles.paginationPage}>
|
|
33
|
-
{
|
|
37
|
+
{page()} / {totalPages()}
|
|
34
38
|
</span>
|
|
35
|
-
<Button size="sm" variant="secondary" disabled={
|
|
39
|
+
<Button size="sm" variant="secondary" disabled={page() >= totalPages()} onClick={() => props.onPageChange(Math.min(totalPages(), page() + 1))}>
|
|
36
40
|
{t('Next')}
|
|
37
41
|
</Button>
|
|
38
42
|
</div>
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { createContext, useContext } from 'solid-js';
|
|
2
2
|
import { BugIndicatingError } from '../_internal/base/errors/bugIndicatingError';
|
|
3
|
+
import { ModalDefaultsProvider, useModalDefaults } from '../overlay/modalDefaults';
|
|
3
4
|
const KitHostContext = createContext();
|
|
4
5
|
export function KitHostProvider(props) {
|
|
6
|
+
const inherited = useModalDefaults();
|
|
5
7
|
return (<KitHostContext.Provider value={props.host}>
|
|
6
|
-
{props.
|
|
8
|
+
<ModalDefaultsProvider value={props.modals ?? inherited}>
|
|
9
|
+
{props.children}
|
|
10
|
+
</ModalDefaultsProvider>
|
|
7
11
|
</KitHostContext.Provider>);
|
|
8
12
|
}
|
|
9
13
|
export function useKitHost() {
|
|
@@ -6,16 +6,18 @@ import { getIconSync, isIconSetLoaded, loadIconSet, } from '../_internal/app/ico
|
|
|
6
6
|
import { t } from '../i18n/i18n';
|
|
7
7
|
import { IconPicker } from '../forms/IconPicker';
|
|
8
8
|
export function PageHeaderIcon(props) {
|
|
9
|
+
const interactive = createMemo(() => props.interactive !== false);
|
|
10
|
+
const pageId = createMemo(() => props.pageId);
|
|
9
11
|
const desktopMenu = useDesktopContextMenu();
|
|
10
12
|
const overrides = getHeaderIconOverrides();
|
|
11
13
|
const [pickerScope, setPickerScope] = createSignal(null);
|
|
12
|
-
const pickerOpen = () => pickerScope() ===
|
|
14
|
+
const pickerOpen = () => pickerScope() === pageId();
|
|
13
15
|
const [resolvedOverride, setResolvedOverride] = createSignal(null);
|
|
14
|
-
const overrideEntry = createMemo(() => overrides()[
|
|
16
|
+
const overrideEntry = createMemo(() => overrides()[pageId()] ??
|
|
15
17
|
(props.fallbackPageId ? overrides()[props.fallbackPageId] : null) ??
|
|
16
18
|
null);
|
|
17
19
|
createEffect(() => {
|
|
18
|
-
|
|
20
|
+
pageId();
|
|
19
21
|
setPickerScope(null);
|
|
20
22
|
});
|
|
21
23
|
createEffect(() => {
|
|
@@ -43,11 +45,11 @@ export function PageHeaderIcon(props) {
|
|
|
43
45
|
});
|
|
44
46
|
const ActiveIcon = createMemo(() => resolvedOverride() ?? props.fallbackIcon);
|
|
45
47
|
const handleContextMenu = (event) => {
|
|
46
|
-
if (
|
|
48
|
+
if (!interactive())
|
|
47
49
|
return;
|
|
48
50
|
event.preventDefault();
|
|
49
51
|
event.stopPropagation();
|
|
50
|
-
const scope =
|
|
52
|
+
const scope = pageId();
|
|
51
53
|
if (!isIconSetLoaded()) {
|
|
52
54
|
void loadIconSet();
|
|
53
55
|
}
|
|
@@ -60,15 +62,15 @@ export function PageHeaderIcon(props) {
|
|
|
60
62
|
entries.push({
|
|
61
63
|
label: t('Change icon'),
|
|
62
64
|
onSelect: () => {
|
|
63
|
-
if (
|
|
65
|
+
if (pageId() === scope)
|
|
64
66
|
setPickerScope(scope);
|
|
65
67
|
},
|
|
66
68
|
});
|
|
67
69
|
entries.push({
|
|
68
70
|
label: t('Reset to default icon'),
|
|
69
|
-
disabled: !overrides()[
|
|
71
|
+
disabled: !overrides()[pageId()],
|
|
70
72
|
onSelect: () => {
|
|
71
|
-
if (
|
|
73
|
+
if (pageId() === scope)
|
|
72
74
|
clearHeaderIconOverride(scope);
|
|
73
75
|
},
|
|
74
76
|
});
|
|
@@ -76,7 +78,7 @@ export function PageHeaderIcon(props) {
|
|
|
76
78
|
};
|
|
77
79
|
const handleSelect = (iconName) => {
|
|
78
80
|
const scope = pickerScope();
|
|
79
|
-
if (!scope || scope !==
|
|
81
|
+
if (!scope || scope !== pageId())
|
|
80
82
|
return;
|
|
81
83
|
setHeaderIconOverride(scope, { set: 'tb', name: iconName });
|
|
82
84
|
setPickerScope(null);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { createSignal } from 'solid-js';
|
|
1
|
+
import { createMemo, createSignal } from 'solid-js';
|
|
2
2
|
import { OverlayScrollArea } from '../overlay/OverlayScrollArea';
|
|
3
3
|
import styles from './ResizableSplitPane.module.css.js';
|
|
4
4
|
import { bestEffortFailed } from '../_internal/base/bestEffort';
|
|
5
5
|
import { isKey } from '../_internal/base/keys';
|
|
6
6
|
export function ResizableSplitPane(props) {
|
|
7
|
-
const direction = () => props.direction ?? 'horizontal';
|
|
8
|
-
const min = () => props.minSize ?? 15;
|
|
9
|
-
const max = () => props.maxSize ?? 85;
|
|
7
|
+
const direction = createMemo(() => props.direction ?? 'horizontal');
|
|
8
|
+
const min = createMemo(() => props.minSize ?? 15);
|
|
9
|
+
const max = createMemo(() => props.maxSize ?? 85);
|
|
10
10
|
const [size, setSize] = createSignal(Math.min(max(), Math.max(min(), props.initialSize ?? 50)));
|
|
11
11
|
const [isDragging, setIsDragging] = createSignal(false);
|
|
12
12
|
let containerRef;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { createSignal, onCleanup } from 'solid-js';
|
|
1
|
+
import { createMemo, createSignal, onCleanup } from 'solid-js';
|
|
2
2
|
import { isKey } from '../_internal/base/keys';
|
|
3
3
|
import { createResizeCarry } from './resizeCarry';
|
|
4
4
|
import styles from './ResizeHandle.module.css.js';
|
|
5
5
|
export function ResizeHandle(props) {
|
|
6
|
+
const value = createMemo(() => props.value);
|
|
6
7
|
const [isDragging, setIsDragging] = createSignal(false);
|
|
7
|
-
const orientation = () => props.orientation ?? 'horizontal';
|
|
8
|
+
const orientation = createMemo(() => props.orientation ?? 'horizontal');
|
|
8
9
|
let activeCleanup;
|
|
9
10
|
onCleanup(() => {
|
|
10
11
|
activeCleanup?.();
|
|
@@ -17,7 +18,7 @@ export function ResizeHandle(props) {
|
|
|
17
18
|
let lastX = e.clientX;
|
|
18
19
|
let lastY = e.clientY;
|
|
19
20
|
const { min, max } = props;
|
|
20
|
-
const carry = typeof min === 'number' && typeof max === 'number' &&
|
|
21
|
+
const carry = typeof min === 'number' && typeof max === 'number' && value() !== undefined
|
|
21
22
|
? createResizeCarry({ min, max })
|
|
22
23
|
: null;
|
|
23
24
|
const onPointerMove = (moveEvent) => {
|
|
@@ -27,7 +28,7 @@ export function ResizeHandle(props) {
|
|
|
27
28
|
lastY = moveEvent.clientY;
|
|
28
29
|
const delta = orientation() === 'horizontal' ? deltaX : deltaY;
|
|
29
30
|
if (carry) {
|
|
30
|
-
carry.step(delta, () =>
|
|
31
|
+
carry.step(delta, () => value() ?? 0, (applied) => props.onResize?.(applied));
|
|
31
32
|
}
|
|
32
33
|
else {
|
|
33
34
|
props.onResize?.(delta);
|
|
@@ -77,7 +78,7 @@ export function ResizeHandle(props) {
|
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
|
-
return (<div role="separator" tabindex={0} aria-orientation={orientation()} aria-valuenow={
|
|
81
|
+
return (<div role="separator" tabindex={0} aria-orientation={orientation()} aria-valuenow={value()} aria-valuemin={props.min} aria-valuemax={props.max} aria-label={props.ariaLabel ?? 'Resize separator'} class={`${styles.handle} ${orientation() === 'horizontal' ? styles.horizontal : styles.vertical} ${isDragging() ? styles.dragging : ''} ${props.class ?? ''}`} onPointerDown={handlePointerDown} onDblClick={props.onDoubleClick} onKeyDown={handleKeyDown}>
|
|
81
82
|
<div class={styles.indicator} aria-hidden="true"/>
|
|
82
83
|
</div>);
|
|
83
84
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { For, Show, createSignal } from 'solid-js';
|
|
1
|
+
import { For, Show, createMemo, createSignal } from 'solid-js';
|
|
2
2
|
import { VpChevronDown } from '@vokril/icons';
|
|
3
3
|
import styles from './Accordion.module.css.js';
|
|
4
4
|
import { namedKeyOf } from '../_internal/base/keys';
|
|
5
5
|
export function Accordion(props) {
|
|
6
|
+
const expandedIds = createMemo(() => props.expandedIds);
|
|
7
|
+
const allowMultiple = createMemo(() => Boolean(props.allowMultiple));
|
|
6
8
|
const [internalExpanded, setInternalExpanded] = createSignal(new Set(props.defaultExpandedIds ?? []));
|
|
7
9
|
const isExpanded = (id) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const ids = expandedIds();
|
|
11
|
+
if (ids !== undefined) {
|
|
12
|
+
return ids.includes(id);
|
|
10
13
|
}
|
|
11
14
|
return internalExpanded().has(id);
|
|
12
15
|
};
|
|
@@ -16,9 +19,9 @@ export function Accordion(props) {
|
|
|
16
19
|
if (props.onToggle) {
|
|
17
20
|
props.onToggle(id, nextExpanded);
|
|
18
21
|
}
|
|
19
|
-
if (
|
|
22
|
+
if (expandedIds() === undefined) {
|
|
20
23
|
setInternalExpanded((prev) => {
|
|
21
|
-
const next = new Set(
|
|
24
|
+
const next = new Set(allowMultiple() ? prev : []);
|
|
22
25
|
if (nextExpanded) {
|
|
23
26
|
next.add(id);
|
|
24
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { For, Show, createSignal } from 'solid-js';
|
|
1
|
+
import { For, Show, createMemo, createSignal } from 'solid-js';
|
|
2
2
|
import { createSelectionIndicator } from './createSelectionIndicator';
|
|
3
3
|
import styles from './Tabs.module.css.js';
|
|
4
4
|
import { rovingTabIndex } from './tablistKeyboardNavigation';
|
|
@@ -10,6 +10,9 @@ import { OverlayScrollArea } from '../overlay/OverlayScrollArea';
|
|
|
10
10
|
import { t } from '../i18n/i18n';
|
|
11
11
|
import { isKey } from '../_internal/base/keys';
|
|
12
12
|
export function Tabs(props) {
|
|
13
|
+
const tabs = createMemo(() => props.tabs);
|
|
14
|
+
const reorderable = createMemo(() => Boolean(props.reorderable));
|
|
15
|
+
const closable = createMemo(() => props.closable === true);
|
|
13
16
|
const selectedIndex = () => props.tabs.findIndex((tab) => tab.value === props.value);
|
|
14
17
|
const handleKeyDown = createTablistKeyboardHandler(props.orientation ? { orientation: props.orientation } : undefined);
|
|
15
18
|
let listEl;
|
|
@@ -46,21 +49,21 @@ export function Tabs(props) {
|
|
|
46
49
|
<For each={props.tabs}>
|
|
47
50
|
{(tab, index) => {
|
|
48
51
|
const selected = () => props.value === tab.value;
|
|
49
|
-
const isTabClosable = () => (
|
|
50
|
-
props.onClose !== undefined;
|
|
52
|
+
const isTabClosable = createMemo(() => (closable() || tab.closable === true) &&
|
|
53
|
+
props.onClose !== undefined);
|
|
51
54
|
return (<button type="button" role="tab" title={tab.title} aria-label={tab.ariaLabel ?? tab.title} id={props.idPrefix !== undefined
|
|
52
55
|
? tabId(props.idPrefix, tab.value)
|
|
53
56
|
: undefined} aria-controls={props.idPrefix !== undefined
|
|
54
57
|
? tabPanelId(props.idPrefix, tab.value)
|
|
55
58
|
: undefined} aria-selected={selected()} tabindex={rovingTabIndex(index(), selectedIndex())} class={`${styles.tab} ${selected()
|
|
56
59
|
? `${styles.active} ${tab.activeClass ?? ''}`.trim()
|
|
57
|
-
: ''} ${
|
|
58
|
-
if (!
|
|
60
|
+
: ''} ${reorderable() ? styles.draggableTab : ''} ${dragOverIndex() === index() ? styles.dragOver : ''} ${tab.class ?? ''}`.trim()} disabled={tab.disabled} draggable={reorderable() && !tab.disabled} onPointerDown={tab.onPointerDown} onContextMenu={tab.onContextMenu} {...(tab.dataAttributes ?? {})} onDragStart={(e) => {
|
|
61
|
+
if (!reorderable())
|
|
59
62
|
return;
|
|
60
63
|
e.dataTransfer?.setData('text/plain', String(index()));
|
|
61
64
|
e.dataTransfer?.setData('application/x-vokril-tab', String(index()));
|
|
62
65
|
}} onDragOver={(e) => {
|
|
63
|
-
if (
|
|
66
|
+
if (reorderable()) {
|
|
64
67
|
e.preventDefault();
|
|
65
68
|
setDragOverIndex(index());
|
|
66
69
|
}
|
|
@@ -70,7 +73,7 @@ export function Tabs(props) {
|
|
|
70
73
|
}
|
|
71
74
|
}} onDrop={(e) => {
|
|
72
75
|
setDragOverIndex(null);
|
|
73
|
-
if (!
|
|
76
|
+
if (!reorderable() || !props.onReorder)
|
|
74
77
|
return;
|
|
75
78
|
e.preventDefault();
|
|
76
79
|
const rawIdx = e.dataTransfer?.getData('application/x-vokril-tab') ||
|
|
@@ -78,7 +81,7 @@ export function Tabs(props) {
|
|
|
78
81
|
const fromIdx = Number(rawIdx);
|
|
79
82
|
const toIdx = index();
|
|
80
83
|
if (!Number.isNaN(fromIdx) && fromIdx !== toIdx) {
|
|
81
|
-
const next = [...
|
|
84
|
+
const next = [...tabs()];
|
|
82
85
|
const moved = next.splice(fromIdx, 1)[0];
|
|
83
86
|
if (moved) {
|
|
84
87
|
next.splice(toIdx, 0, moved);
|
|
@@ -19,6 +19,7 @@ import { registerNotificationCommands } from './notificationCommands';
|
|
|
19
19
|
import { appWindowNotificationOverlay, } from './notificationOverlayChannel';
|
|
20
20
|
import { createNotificationOverlaySync } from './notificationOverlaySync';
|
|
21
21
|
import { notificationListFocusStep } from './notificationEntryList';
|
|
22
|
+
import { OVERLAY_APPEARANCE_ATTRIBUTES, overlayAppearanceOf, } from './notificationOverlaySnapshot';
|
|
22
23
|
import { modalBackgroundExemption } from '../overlay/backgroundInert';
|
|
23
24
|
import styles from './NotificationHost.module.css.js';
|
|
24
25
|
import { isKey } from '../_internal/base/keys';
|
|
@@ -164,28 +165,14 @@ export const NotificationHost = (props) => {
|
|
|
164
165
|
onMount(() => {
|
|
165
166
|
const root = hostWindow.document.documentElement;
|
|
166
167
|
const readAppearance = () => {
|
|
167
|
-
const
|
|
168
|
-
const cssVariables = {};
|
|
169
|
-
for (let index = 0; index < computed.length; index++) {
|
|
170
|
-
const key = computed.item(index);
|
|
171
|
-
if (key.startsWith('--'))
|
|
172
|
-
cssVariables[key] = computed.getPropertyValue(key);
|
|
173
|
-
}
|
|
174
|
-
const next = {
|
|
175
|
-
cssVariables,
|
|
176
|
-
fontFamily: computed.fontFamily,
|
|
177
|
-
fontSize: computed.fontSize,
|
|
178
|
-
theme: root.classList.contains('light')
|
|
179
|
-
? 'light'
|
|
180
|
-
: 'dark',
|
|
181
|
-
};
|
|
168
|
+
const next = overlayAppearanceOf(root, hostWindow.getComputedStyle(root));
|
|
182
169
|
setAppearance((previous) => JSON.stringify(previous) === JSON.stringify(next) ? previous : next);
|
|
183
170
|
};
|
|
184
171
|
readAppearance();
|
|
185
172
|
const observer = new hostWindow.MutationObserver(readAppearance);
|
|
186
173
|
observer.observe(root, {
|
|
187
174
|
attributes: true,
|
|
188
|
-
attributeFilter: [
|
|
175
|
+
attributeFilter: [...OVERLAY_APPEARANCE_ATTRIBUTES],
|
|
189
176
|
});
|
|
190
177
|
onCleanup(() => observer.disconnect());
|
|
191
178
|
const unsubscribe = stack.subscribe((next) => {
|
|
@@ -55,6 +55,9 @@ const CUSTOM_ICONS = {
|
|
|
55
55
|
lock: VpLock,
|
|
56
56
|
};
|
|
57
57
|
export const NotificationItem = (props) => {
|
|
58
|
+
const controllerProp = createMemo(() => props.controller);
|
|
59
|
+
const itemProp = createMemo(() => props.item);
|
|
60
|
+
const shellProp = createMemo(() => props.shell);
|
|
58
61
|
const now = useRelativeNow();
|
|
59
62
|
const desktopMenu = useContext(DesktopContextMenuContext);
|
|
60
63
|
const [isExiting, setIsExiting] = createSignal(false);
|
|
@@ -63,32 +66,32 @@ export const NotificationItem = (props) => {
|
|
|
63
66
|
if (exitTimer !== undefined)
|
|
64
67
|
clearTimeout(exitTimer);
|
|
65
68
|
});
|
|
66
|
-
const closable = createMemo(() => !isProgressRunning(
|
|
69
|
+
const closable = createMemo(() => !isProgressRunning(itemProp()));
|
|
67
70
|
const close = () => {
|
|
68
71
|
if (isExiting())
|
|
69
72
|
return;
|
|
70
73
|
if (!closable() || prefersReducedMotion(document)) {
|
|
71
|
-
|
|
74
|
+
controllerProp().close(itemProp().id);
|
|
72
75
|
return;
|
|
73
76
|
}
|
|
74
77
|
setIsExiting(true);
|
|
75
78
|
if (exitTimer !== undefined)
|
|
76
79
|
clearTimeout(exitTimer);
|
|
77
|
-
exitTimer = setTimeout(() =>
|
|
80
|
+
exitTimer = setTimeout(() => controllerProp().close(itemProp().id), 180);
|
|
78
81
|
};
|
|
79
|
-
const setFocus = (focused) =>
|
|
80
|
-
const setHover = (hovered) =>
|
|
81
|
-
const toggleExpanded = () =>
|
|
82
|
+
const setFocus = (focused) => controllerProp().setFocus(itemProp().id, focused);
|
|
83
|
+
const setHover = (hovered) => controllerProp().setHover(itemProp().id, hovered);
|
|
84
|
+
const toggleExpanded = () => controllerProp().toggleExpanded(itemProp().id);
|
|
82
85
|
const severityIcon = createMemo(() => {
|
|
83
|
-
const customName =
|
|
86
|
+
const customName = itemProp().icon;
|
|
84
87
|
if (customName && CUSTOM_ICONS[customName])
|
|
85
88
|
return CUSTOM_ICONS[customName];
|
|
86
|
-
return SEVERITY_ICON[
|
|
89
|
+
return SEVERITY_ICON[itemProp().severity];
|
|
87
90
|
});
|
|
88
|
-
const relativeAgo = createMemo(() => formatRelativeAgo(
|
|
89
|
-
const exactTimestamp = createMemo(() => formatExactTimestamp(
|
|
90
|
-
const isSticky = createMemo(() =>
|
|
91
|
-
const duration = createMemo(() =>
|
|
91
|
+
const relativeAgo = createMemo(() => formatRelativeAgo(itemProp().createdAt, now()));
|
|
92
|
+
const exactTimestamp = createMemo(() => formatExactTimestamp(itemProp().createdAt));
|
|
93
|
+
const isSticky = createMemo(() => controllerProp().isSticky(itemProp()));
|
|
94
|
+
const duration = createMemo(() => controllerProp().duration(itemProp()));
|
|
92
95
|
const hasTimer = createMemo(() => {
|
|
93
96
|
if (isSticky())
|
|
94
97
|
return false;
|
|
@@ -102,11 +105,11 @@ export const NotificationItem = (props) => {
|
|
|
102
105
|
const focused = isFocused();
|
|
103
106
|
if (!hovered && !focused)
|
|
104
107
|
return;
|
|
105
|
-
const item =
|
|
108
|
+
const item = itemProp();
|
|
106
109
|
if (item === undefined)
|
|
107
110
|
return;
|
|
108
111
|
const { id } = item;
|
|
109
|
-
const controller =
|
|
112
|
+
const controller = controllerProp();
|
|
110
113
|
queueMicrotask(() => {
|
|
111
114
|
if (hovered)
|
|
112
115
|
controller.setHover(id, false);
|
|
@@ -117,7 +120,7 @@ export const NotificationItem = (props) => {
|
|
|
117
120
|
const [runCounter, setRunCounter] = createSignal(0);
|
|
118
121
|
const isPaused = createMemo(() => isHovered() ||
|
|
119
122
|
isFocused() ||
|
|
120
|
-
Boolean(
|
|
123
|
+
Boolean(itemProp().hovered || itemProp().focused));
|
|
121
124
|
let wasPaused = false;
|
|
122
125
|
createEffect(() => {
|
|
123
126
|
const paused = isPaused();
|
|
@@ -126,39 +129,39 @@ export const NotificationItem = (props) => {
|
|
|
126
129
|
}
|
|
127
130
|
wasPaused = paused;
|
|
128
131
|
});
|
|
129
|
-
let prevExpanded =
|
|
132
|
+
let prevExpanded = itemProp().expanded;
|
|
130
133
|
createEffect(() => {
|
|
131
|
-
const curExpanded =
|
|
134
|
+
const curExpanded = itemProp().expanded;
|
|
132
135
|
if (curExpanded !== prevExpanded) {
|
|
133
136
|
prevExpanded = curExpanded;
|
|
134
137
|
setRunCounter((c) => c + 1);
|
|
135
138
|
}
|
|
136
139
|
});
|
|
137
|
-
const fuseKey = createMemo(() => hasTimer() ? `${
|
|
138
|
-
const announcement = () =>
|
|
139
|
-
(
|
|
140
|
+
const fuseKey = createMemo(() => hasTimer() ? `${itemProp().id}-${duration()}-${runCounter()}` : null);
|
|
141
|
+
const announcement = () => itemProp().announce ??
|
|
142
|
+
(itemProp().severity === 'error' ? 'assertive' : 'polite');
|
|
140
143
|
createEffect(() => {
|
|
141
144
|
if (props.inCenter)
|
|
142
145
|
return;
|
|
143
|
-
const title =
|
|
144
|
-
const body =
|
|
146
|
+
const title = itemProp().title;
|
|
147
|
+
const body = itemProp().body;
|
|
145
148
|
const text = body ? `${title}: ${body}` : title;
|
|
146
149
|
if (announcement() === 'assertive') {
|
|
147
|
-
|
|
150
|
+
controllerProp().announcer.assertive(text);
|
|
148
151
|
}
|
|
149
152
|
else {
|
|
150
|
-
|
|
153
|
+
controllerProp().announcer.polite(text);
|
|
151
154
|
}
|
|
152
155
|
});
|
|
153
156
|
const bodyHtml = createMemo(() => {
|
|
154
|
-
const body =
|
|
157
|
+
const body = itemProp().body;
|
|
155
158
|
if (!body)
|
|
156
159
|
return '';
|
|
157
|
-
if (
|
|
158
|
-
return renderNotificationMarkdown(body,
|
|
160
|
+
if (itemProp().markdown)
|
|
161
|
+
return renderNotificationMarkdown(body, shellProp() !== null);
|
|
159
162
|
return escapeHtml(body).replace(/\n/g, '<br>');
|
|
160
163
|
});
|
|
161
|
-
const openLink = (url) =>
|
|
164
|
+
const openLink = (url) => controllerProp().openExternal(url);
|
|
162
165
|
const handleBodyClick = (event) => {
|
|
163
166
|
const target = event.target;
|
|
164
167
|
const link = target?.closest('a');
|
|
@@ -170,7 +173,7 @@ export const NotificationItem = (props) => {
|
|
|
170
173
|
openLink(href);
|
|
171
174
|
return;
|
|
172
175
|
}
|
|
173
|
-
const shell =
|
|
176
|
+
const shell = shellProp();
|
|
174
177
|
if (shell === null) {
|
|
175
178
|
event.preventDefault();
|
|
176
179
|
return;
|
|
@@ -178,16 +181,17 @@ export const NotificationItem = (props) => {
|
|
|
178
181
|
const interactive = target?.closest('a, button, [role="button"], input, select, textarea');
|
|
179
182
|
if (interactive)
|
|
180
183
|
return;
|
|
181
|
-
const route =
|
|
184
|
+
const route = itemProp().defaultRoute;
|
|
182
185
|
if (route)
|
|
183
186
|
shell.navigate(route);
|
|
184
187
|
};
|
|
185
188
|
const handleContextMenu = (event) => {
|
|
186
189
|
if (!desktopMenu)
|
|
187
190
|
return;
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
+
const card = itemProp();
|
|
192
|
+
const text = `${card.title}${card.body ? `\n${card.body}` : ''}`.trim();
|
|
193
|
+
const match = card.vendorError
|
|
194
|
+
? controllerProp().resolveVendorError(card.vendorError)
|
|
191
195
|
: null;
|
|
192
196
|
event.preventDefault();
|
|
193
197
|
event.stopPropagation();
|
|
@@ -225,7 +229,7 @@ export const NotificationItem = (props) => {
|
|
|
225
229
|
]);
|
|
226
230
|
};
|
|
227
231
|
const openGearMenu = (event) => {
|
|
228
|
-
const shell =
|
|
232
|
+
const shell = shellProp();
|
|
229
233
|
if (shell === null)
|
|
230
234
|
return;
|
|
231
235
|
if (!desktopMenu)
|
|
@@ -233,16 +237,16 @@ export const NotificationItem = (props) => {
|
|
|
233
237
|
event.preventDefault();
|
|
234
238
|
event.stopPropagation();
|
|
235
239
|
if (desktopMenu.state() &&
|
|
236
|
-
lastGearOpenedFor.get(desktopMenu) ===
|
|
240
|
+
lastGearOpenedFor.get(desktopMenu) === itemProp().id) {
|
|
237
241
|
desktopMenu.close();
|
|
238
242
|
lastGearOpenedFor.set(desktopMenu, null);
|
|
239
243
|
return;
|
|
240
244
|
}
|
|
241
|
-
lastGearOpenedFor.set(desktopMenu,
|
|
245
|
+
lastGearOpenedFor.set(desktopMenu, itemProp().id);
|
|
242
246
|
const gearTrigger = event.currentTarget;
|
|
243
|
-
const source =
|
|
244
|
-
const dontShowKey =
|
|
245
|
-
const remindKey = cardRemindKey(
|
|
247
|
+
const source = itemProp().source;
|
|
248
|
+
const dontShowKey = itemProp().neverShowAgainKey;
|
|
249
|
+
const remindKey = cardRemindKey(itemProp());
|
|
246
250
|
const items = [];
|
|
247
251
|
if (dontShowKey) {
|
|
248
252
|
items.push({
|
|
@@ -293,7 +297,7 @@ export const NotificationItem = (props) => {
|
|
|
293
297
|
onSelect: () => shell.setSourceMuted(source, !muted),
|
|
294
298
|
});
|
|
295
299
|
}
|
|
296
|
-
const secondary =
|
|
300
|
+
const secondary = itemProp().secondaryActions;
|
|
297
301
|
if (secondary && secondary.length > 0) {
|
|
298
302
|
if (items.length > 0)
|
|
299
303
|
items.push({ type: 'separator' });
|
|
@@ -323,9 +327,9 @@ export const NotificationItem = (props) => {
|
|
|
323
327
|
close();
|
|
324
328
|
}
|
|
325
329
|
};
|
|
326
|
-
return (<div class={`${styles.item} card ${isExiting() ? styles.itemExiting : ''}`} id={props.inCenter ? undefined : `notification-card-${
|
|
327
|
-
severity: t(NOTIFICATION_SEVERITY_LABELS[
|
|
328
|
-
title:
|
|
330
|
+
return (<div class={`${styles.item} card ${isExiting() ? styles.itemExiting : ''}`} id={props.inCenter ? undefined : `notification-card-${itemProp().id}`} tabIndex={-1} data-severity={itemProp().severity} data-expanded={itemProp().expanded} data-edge={props.corner === undefined ? undefined : toastCornerEdge(props.corner)} data-has-actions={props.item.actions && props.item.actions.length > 0 ? 'true' : 'false'} data-has-timer={hasTimer() ? 'true' : 'false'} {...(props.inCenter ? notificationEntryMark : { 'aria-live': announcement() })} aria-atomic={props.inCenter ? undefined : 'true'} aria-label={t('{severity}: {title}', {
|
|
331
|
+
severity: t(NOTIFICATION_SEVERITY_LABELS[itemProp().severity]),
|
|
332
|
+
title: itemProp().title,
|
|
329
333
|
})} onMouseEnter={() => {
|
|
330
334
|
setIsHovered(true);
|
|
331
335
|
setHover(true);
|
|
@@ -340,17 +344,17 @@ export const NotificationItem = (props) => {
|
|
|
340
344
|
setFocus(false);
|
|
341
345
|
}} onContextMenu={handleContextMenu}>
|
|
342
346
|
<div class={styles.mainRow}>
|
|
343
|
-
<span class={styles.icon} data-severity={
|
|
347
|
+
<span class={styles.icon} data-severity={itemProp().severity} aria-hidden="true">
|
|
344
348
|
<Dynamic component={severityIcon()} size={16}/>
|
|
345
349
|
</span>
|
|
346
350
|
<div class={`${styles.body} body`}>
|
|
347
351
|
<div class={styles.titleRow}>
|
|
348
|
-
<span class={`${styles.title} title`}>{
|
|
352
|
+
<span class={`${styles.title} title`}>{itemProp().title}</span>
|
|
349
353
|
<HoverTooltip content={exactTimestamp()} delayMs={400}>
|
|
350
354
|
<span class={styles.timestamp}>{relativeAgo()}</span>
|
|
351
355
|
</HoverTooltip>
|
|
352
356
|
</div>
|
|
353
|
-
<Show when={
|
|
357
|
+
<Show when={itemProp().body}>
|
|
354
358
|
<OverlayScrollArea rootClass={styles.subtitleCollapse} viewportClass={styles.subtitleViewport} hideHorizontal>
|
|
355
359
|
<div class={styles.subtitle} tabIndex={-1} onClick={handleBodyClick} onKeyDown={(e) => {
|
|
356
360
|
if (isKey(e, 'Enter'))
|
|
@@ -360,12 +364,12 @@ export const NotificationItem = (props) => {
|
|
|
360
364
|
</Show>
|
|
361
365
|
</div>
|
|
362
366
|
<Panel.Toolbar class={styles.toolbar}>
|
|
363
|
-
<Show when={
|
|
364
|
-
<Button variant="ghost" size="sm" iconOnly aria-label={
|
|
367
|
+
<Show when={itemProp().body}>
|
|
368
|
+
<Button variant="ghost" size="sm" iconOnly aria-label={itemProp().expanded ? t('Collapse') : t('Expand')} title={itemProp().expanded ? t('Collapse') : t('Expand')} onClick={toggleExpanded}>
|
|
365
369
|
<VpChevronDown class={`${iconScale.iconMd} ${styles.chevron}`}/>
|
|
366
370
|
</Button>
|
|
367
371
|
</Show>
|
|
368
|
-
<Show when={
|
|
372
|
+
<Show when={shellProp() !== null}>
|
|
369
373
|
<Button variant="ghost" size="sm" iconOnly aria-label={t('More actions')} title={t('More actions')} onMouseDown={(event) => event.stopPropagation()} onClick={openGearMenu}>
|
|
370
374
|
<VpGear class={iconScale.iconMd}/>
|
|
371
375
|
</Button>
|
|
@@ -396,7 +400,7 @@ export const NotificationItem = (props) => {
|
|
|
396
400
|
<div class={styles.detailsRow}>
|
|
397
401
|
<Show when={props.item.actions && props.item.actions.length > 0}>
|
|
398
402
|
<div class={styles.actions}>
|
|
399
|
-
<For each={
|
|
403
|
+
<For each={itemProp().actions}>
|
|
400
404
|
{(action) => (<Button variant={action.primary ? 'primary' : 'secondary'} size="sm" class={`${action.primary ? 'primary ' : ''}btn`} onClick={() => void runAction(action)}>
|
|
401
405
|
{action.label}
|
|
402
406
|
</Button>)}
|
|
@@ -408,7 +412,7 @@ export const NotificationItem = (props) => {
|
|
|
408
412
|
props.item.source !== 'general' &&
|
|
409
413
|
props.item.source !== 'undefined'}>
|
|
410
414
|
<span class={styles.source}>
|
|
411
|
-
{t('Source: {source}', { source: String(
|
|
415
|
+
{t('Source: {source}', { source: String(itemProp().source) })}
|
|
412
416
|
</span>
|
|
413
417
|
</Show>
|
|
414
418
|
</div>
|
|
@@ -417,11 +421,11 @@ export const NotificationItem = (props) => {
|
|
|
417
421
|
|
|
418
422
|
<Show when={props.item.progress && !props.item.progress.done}>
|
|
419
423
|
<div class={styles.progressRow}>
|
|
420
|
-
<Show when={typeof
|
|
421
|
-
<Progress value={
|
|
424
|
+
<Show when={typeof itemProp().progress?.value === 'number'} fallback={<Progress indeterminate size="2xs" class={styles.progress} ariaLabel={t('Progress')}/>}>
|
|
425
|
+
<Progress value={itemProp().progress?.value ?? 0} max={1} size="2xs" class={styles.progress} ariaLabel={t('Progress')}/>
|
|
422
426
|
</Show>
|
|
423
|
-
<Show when={
|
|
424
|
-
<Button iconOnly variant="ghost" size="sm" class={styles.progressCancel} title={t('Cancel')} aria-label={t('Cancel')} onClick={() =>
|
|
427
|
+
<Show when={itemProp().progress?.onCancel}>
|
|
428
|
+
<Button iconOnly variant="ghost" size="sm" class={styles.progressCancel} title={t('Cancel')} aria-label={t('Cancel')} onClick={() => itemProp().progress?.onCancel?.()}>
|
|
425
429
|
<VpTreeClose />
|
|
426
430
|
</Button>
|
|
427
431
|
</Show>
|