@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
|
@@ -29,6 +29,7 @@ const defaultZoneFormat = new Intl.DateTimeFormat(undefined, {
|
|
|
29
29
|
timeZoneName: 'short',
|
|
30
30
|
});
|
|
31
31
|
export function TimeSeriesChart(props) {
|
|
32
|
+
const timeWindow = createMemo(() => props.window);
|
|
32
33
|
let svg;
|
|
33
34
|
let pointerId = null;
|
|
34
35
|
let dragAnchor = null;
|
|
@@ -37,23 +38,23 @@ export function TimeSeriesChart(props) {
|
|
|
37
38
|
const [size, setSize] = createSignal({ width: 640, height: 180 });
|
|
38
39
|
const [cursor, setCursor] = createSignal(null);
|
|
39
40
|
const [draftInterval, setDraftInterval] = createSignal(null);
|
|
40
|
-
const validWindow = () => Number.isFinite(
|
|
41
|
-
Number.isFinite(
|
|
42
|
-
|
|
41
|
+
const validWindow = () => Number.isFinite(timeWindow().from) &&
|
|
42
|
+
Number.isFinite(timeWindow().to) &&
|
|
43
|
+
timeWindow().from < timeWindow().to;
|
|
43
44
|
const measured = createMemo(() => props.series.map((series) => {
|
|
44
45
|
const distinct = new Map();
|
|
45
46
|
if (validWindow())
|
|
46
47
|
for (const point of series.points) {
|
|
47
48
|
if (Number.isFinite(point.timestamp) &&
|
|
48
|
-
point.timestamp >=
|
|
49
|
-
point.timestamp <=
|
|
49
|
+
point.timestamp >= timeWindow().from &&
|
|
50
|
+
point.timestamp <= timeWindow().to)
|
|
50
51
|
distinct.set(point.timestamp, point);
|
|
51
52
|
}
|
|
52
53
|
const points = [...distinct.values()].sort((left, right) => left.timestamp - right.timestamp);
|
|
53
54
|
return {
|
|
54
55
|
...series,
|
|
55
56
|
points,
|
|
56
|
-
segments: seriesSegments(points,
|
|
57
|
+
segments: seriesSegments(points, timeWindow(), props.maxGapMs ?? 90_000),
|
|
57
58
|
};
|
|
58
59
|
}));
|
|
59
60
|
const pointValues = createMemo(() => new Map(measured().map((series) => [
|
|
@@ -71,7 +72,7 @@ export function TimeSeriesChart(props) {
|
|
|
71
72
|
bottom: Math.max(9, size().height - 25),
|
|
72
73
|
}));
|
|
73
74
|
const x = (timestamp) => plot().left +
|
|
74
|
-
((timestamp -
|
|
75
|
+
((timestamp - timeWindow().from) / (timeWindow().to - timeWindow().from)) *
|
|
75
76
|
(plot().right - plot().left);
|
|
76
77
|
const y = (value) => {
|
|
77
78
|
const scale = Math.max(Math.abs(domain().min), Math.abs(domain().max));
|
|
@@ -81,14 +82,14 @@ export function TimeSeriesChart(props) {
|
|
|
81
82
|
};
|
|
82
83
|
const formattedValue = (value) => props.formatValue?.(value) ?? defaultValueFormat.format(value);
|
|
83
84
|
const formattedTime = (timestamp, detail = false) => props.formatTime?.(timestamp) ??
|
|
84
|
-
(
|
|
85
|
+
(timeWindow().to - timeWindow().from > 6 * 60 * 60 * 1000
|
|
85
86
|
? dayTimeFormat
|
|
86
87
|
: detail
|
|
87
88
|
? detailTimeFormat
|
|
88
89
|
: defaultTimeFormat).format(timestamp);
|
|
89
90
|
const selected = () => {
|
|
90
91
|
const interval = draftInterval() ?? props.selectedInterval;
|
|
91
|
-
return interval ? clampInterval(interval,
|
|
92
|
+
return interval ? clampInterval(interval, timeWindow()) : null;
|
|
92
93
|
};
|
|
93
94
|
const nearest = (timestamp) => {
|
|
94
95
|
const times = timestamps();
|
|
@@ -136,10 +137,10 @@ export function TimeSeriesChart(props) {
|
|
|
136
137
|
const pointerTimestamp = (clientX) => {
|
|
137
138
|
const rect = svg?.getBoundingClientRect();
|
|
138
139
|
if (!rect || rect.width === 0)
|
|
139
|
-
return
|
|
140
|
+
return timeWindow().from;
|
|
140
141
|
const svgX = ((clientX - rect.left) / rect.width) * size().width;
|
|
141
142
|
const ratio = Math.max(0, Math.min(1, (svgX - plot().left) / (plot().right - plot().left)));
|
|
142
|
-
return
|
|
143
|
+
return timeWindow().from + ratio * (timeWindow().to - timeWindow().from);
|
|
143
144
|
};
|
|
144
145
|
const finishDrag = (event, cancel = false) => {
|
|
145
146
|
if (pointerId !== event.pointerId)
|
|
@@ -148,8 +149,8 @@ export function TimeSeriesChart(props) {
|
|
|
148
149
|
const interval = clampInterval({
|
|
149
150
|
from: dragAnchor,
|
|
150
151
|
to: pointerTimestamp(event.clientX),
|
|
151
|
-
},
|
|
152
|
-
const threshold = (
|
|
152
|
+
}, timeWindow());
|
|
153
|
+
const threshold = (timeWindow().to - timeWindow().from) *
|
|
153
154
|
(4 / Math.max(1, plot().right - plot().left));
|
|
154
155
|
if (interval && interval.to - interval.from >= threshold) {
|
|
155
156
|
props.onSelectInterval(interval);
|
|
@@ -191,7 +192,7 @@ export function TimeSeriesChart(props) {
|
|
|
191
192
|
return;
|
|
192
193
|
if (event.shiftKey && props.onSelectInterval && current !== undefined) {
|
|
193
194
|
keyboardAnchor ??= current;
|
|
194
|
-
props.onSelectInterval(clampInterval({ from: keyboardAnchor, to: next },
|
|
195
|
+
props.onSelectInterval(clampInterval({ from: keyboardAnchor, to: next }, timeWindow()));
|
|
195
196
|
}
|
|
196
197
|
else {
|
|
197
198
|
keyboardAnchor = null;
|
|
@@ -267,8 +268,8 @@ export function TimeSeriesChart(props) {
|
|
|
267
268
|
</For>
|
|
268
269
|
<For each={size().width < 420 ? [0, 1] : [0, 0.5, 1]}>
|
|
269
270
|
{(ratio) => {
|
|
270
|
-
const timestamp = () =>
|
|
271
|
-
ratio * (
|
|
271
|
+
const timestamp = () => timeWindow().from +
|
|
272
|
+
ratio * (timeWindow().to - timeWindow().from);
|
|
272
273
|
return (<text aria-hidden="true" class={styles.axisLabel} x={x(timestamp())} y={size().height - 6} text-anchor={ratio === 0 ? 'start' : ratio === 1 ? 'end' : 'middle'}>
|
|
273
274
|
{formattedTime(timestamp())}
|
|
274
275
|
</text>);
|
|
@@ -289,21 +290,21 @@ export function TimeSeriesChart(props) {
|
|
|
289
290
|
</For>)}
|
|
290
291
|
</For>
|
|
291
292
|
<Show when={cursorTimestamp() !== null}>
|
|
292
|
-
<line class={styles.cursor} x1={x(cursorTimestamp() ??
|
|
293
|
+
<line class={styles.cursor} x1={x(cursorTimestamp() ?? timeWindow().from)} x2={x(cursorTimestamp() ?? timeWindow().from)} y1={plot().top} y2={plot().bottom}/>
|
|
293
294
|
</Show>
|
|
294
295
|
</svg>
|
|
295
296
|
<Show when={cursorTimestamp() !== null}>
|
|
296
297
|
<div class={styles.tooltip} role="status" aria-live="off">
|
|
297
298
|
<strong>
|
|
298
|
-
{formattedTime(cursorTimestamp() ??
|
|
299
|
+
{formattedTime(cursorTimestamp() ?? timeWindow().to, true)}
|
|
299
300
|
</strong>
|
|
300
301
|
<For each={props.series}>
|
|
301
302
|
{(series) => (<span>
|
|
302
303
|
{series.label}:{' '}
|
|
303
|
-
{valueAt(series, cursorTimestamp() ??
|
|
304
|
+
{valueAt(series, cursorTimestamp() ?? timeWindow().to) ===
|
|
304
305
|
null
|
|
305
306
|
? '—'
|
|
306
|
-
: formattedValue(valueAt(series, cursorTimestamp() ??
|
|
307
|
+
: formattedValue(valueAt(series, cursorTimestamp() ?? timeWindow().to) ?? 0)}{' '}
|
|
307
308
|
{props.unit}
|
|
308
309
|
</span>)}
|
|
309
310
|
</For>
|
|
@@ -315,8 +316,8 @@ export function TimeSeriesChart(props) {
|
|
|
315
316
|
{timestamps().length < 2
|
|
316
317
|
? (props.labels?.warmup ?? 'Waiting for the next sample')
|
|
317
318
|
: (props.labels?.coverage ?? 'Recorded')}
|
|
318
|
-
: {formattedTime(timestamps()[0] ??
|
|
319
|
-
{formattedTime(timestamps().at(-1) ??
|
|
319
|
+
: {formattedTime(timestamps()[0] ?? timeWindow().from, true)} –{' '}
|
|
320
|
+
{formattedTime(timestamps().at(-1) ?? timeWindow().to, true)}
|
|
320
321
|
</span>
|
|
321
322
|
<Show when={props.selectedInterval && props.onSelectInterval}>
|
|
322
323
|
<Button variant="ghost" size="2xs" onClick={() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSignal, onMount, onCleanup, Show } from 'solid-js';
|
|
1
|
+
import { createMemo, createSignal, onMount, onCleanup, Show } from 'solid-js';
|
|
2
2
|
import { PressableSurface } from '../forms/PressableSurface';
|
|
3
3
|
import { useHostWindow } from '../_internal/app/windows/window/HostWindowContext';
|
|
4
4
|
import { t } from '../i18n/i18n';
|
|
@@ -12,12 +12,14 @@ function guessPlatform(win) {
|
|
|
12
12
|
return 'linux';
|
|
13
13
|
}
|
|
14
14
|
export function WindowControls(props = {}) {
|
|
15
|
+
const isMaximizedQuery = createMemo(() => props.isMaximized);
|
|
16
|
+
const beforeClose = createMemo(() => props.beforeClose);
|
|
15
17
|
const host = useHostWindow();
|
|
16
18
|
const [maximized, setMaximized] = createSignal(false);
|
|
17
19
|
const platform = props.platform ?? guessPlatform(host.window);
|
|
18
20
|
const isMac = platform === 'darwin';
|
|
19
21
|
const syncMaximized = async () => {
|
|
20
|
-
setMaximized((await
|
|
22
|
+
setMaximized((await isMaximizedQuery()?.()) ?? false);
|
|
21
23
|
};
|
|
22
24
|
onMount(() => {
|
|
23
25
|
void syncMaximized();
|
|
@@ -32,7 +34,8 @@ export function WindowControls(props = {}) {
|
|
|
32
34
|
await syncMaximized();
|
|
33
35
|
};
|
|
34
36
|
const handleClose = () => {
|
|
35
|
-
|
|
37
|
+
const guard = beforeClose();
|
|
38
|
+
if (guard && !guard())
|
|
36
39
|
return;
|
|
37
40
|
void props.onClose?.();
|
|
38
41
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Show, createUniqueId, onCleanup, } from 'solid-js';
|
|
1
|
+
import { Show, createMemo, createUniqueId, onCleanup, } from 'solid-js';
|
|
2
2
|
import { tooltipCoordinator, } from '../overlay/tooltipCoordinator';
|
|
3
3
|
import { holdNativeTitle, releaseNativeTitle } from '../overlay/nativeTitleHold';
|
|
4
4
|
import styles from './Badge.module.css.js';
|
|
@@ -25,16 +25,20 @@ export function Badge(props) {
|
|
|
25
25
|
}
|
|
26
26
|
return props.title;
|
|
27
27
|
};
|
|
28
|
+
const tooltip = createMemo(() => ({
|
|
29
|
+
content: effectiveTooltip(),
|
|
30
|
+
placement: props.tooltipPlacement,
|
|
31
|
+
}));
|
|
28
32
|
const showTooltip = () => {
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
33
|
+
const { content, placement } = tooltip();
|
|
34
|
+
if (!content || !badgeRef)
|
|
31
35
|
return;
|
|
32
36
|
holdNativeTitle(badgeRef);
|
|
33
37
|
tooltipCoordinator.showTooltip({
|
|
34
38
|
id: tooltipId,
|
|
35
39
|
target: badgeRef,
|
|
36
|
-
content
|
|
37
|
-
placement
|
|
40
|
+
content,
|
|
41
|
+
placement,
|
|
38
42
|
});
|
|
39
43
|
};
|
|
40
44
|
const hideTooltip = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from '../_internal/platform/window/mainRealmDom';
|
|
2
|
-
import { ErrorBoundary, onMount, createSignal } from 'solid-js';
|
|
2
|
+
import { ErrorBoundary, createMemo, onMount, createSignal } from 'solid-js';
|
|
3
3
|
import { Button } from '../forms/Button';
|
|
4
4
|
import { t } from '../i18n/i18n';
|
|
5
5
|
import { toErrorMessage } from '../_internal/base/errorMessage';
|
|
@@ -59,6 +59,10 @@ function FallbackBoundaryHost(props) {
|
|
|
59
59
|
return props.children;
|
|
60
60
|
}
|
|
61
61
|
function DefaultErrorFallback(props) {
|
|
62
|
+
const caught = createMemo(() => props.error);
|
|
63
|
+
const label = createMemo(() => props.label);
|
|
64
|
+
const reset = createMemo(() => props.reset);
|
|
65
|
+
const retryCount = createMemo(() => props.retryCount);
|
|
62
66
|
const host = useKitHost();
|
|
63
67
|
const log = host.log.withTag(LOG_TAG);
|
|
64
68
|
const [copied, setCopied] = createSignal(false);
|
|
@@ -66,37 +70,37 @@ function DefaultErrorFallback(props) {
|
|
|
66
70
|
addBreadcrumb({
|
|
67
71
|
category: 'ui',
|
|
68
72
|
level: 'error',
|
|
69
|
-
message: `ErrorBoundary [${
|
|
70
|
-
data:
|
|
73
|
+
message: `ErrorBoundary [${label() ?? 'anonymous'}] caught error: ${toErrorMessage(caught(), 'Unknown')}`,
|
|
74
|
+
data: label() ? { label: label() } : undefined,
|
|
71
75
|
});
|
|
72
|
-
errorHandler.onUnexpectedError(
|
|
76
|
+
errorHandler.onUnexpectedError(caught(), {
|
|
73
77
|
source: 'ErrorBoundary',
|
|
74
|
-
label:
|
|
78
|
+
label: label(),
|
|
75
79
|
});
|
|
76
|
-
log.error(`Render error contained by boundary${
|
|
80
|
+
log.error(`Render error contained by boundary${label() ? ` (${label()})` : ''}`, caught());
|
|
77
81
|
});
|
|
78
82
|
const retry = () => {
|
|
79
83
|
const onRetry = props.onRetry;
|
|
80
84
|
if (onRetry === undefined) {
|
|
81
|
-
|
|
85
|
+
reset()();
|
|
82
86
|
return;
|
|
83
87
|
}
|
|
84
88
|
void Promise.resolve()
|
|
85
89
|
.then(onRetry)
|
|
86
|
-
.then(() =>
|
|
90
|
+
.then(() => reset()())
|
|
87
91
|
.catch((error) => {
|
|
88
92
|
log.error('Error-boundary retry failed', error);
|
|
89
93
|
errorHandler.onUnexpectedError(error, {
|
|
90
94
|
source: 'ErrorBoundary.retry',
|
|
91
|
-
label:
|
|
95
|
+
label: label(),
|
|
92
96
|
});
|
|
93
97
|
});
|
|
94
98
|
};
|
|
95
99
|
const copyDiagnostic = async () => {
|
|
96
100
|
try {
|
|
97
|
-
const report = generateDiagnosticReport(
|
|
101
|
+
const report = generateDiagnosticReport(caught(), {
|
|
98
102
|
appName: host.appName,
|
|
99
|
-
context: { label:
|
|
103
|
+
context: { label: label(), retryCount: retryCount() },
|
|
100
104
|
});
|
|
101
105
|
const ok = await copyToClipboard(report);
|
|
102
106
|
if (ok) {
|
|
@@ -118,12 +122,12 @@ function DefaultErrorFallback(props) {
|
|
|
118
122
|
};
|
|
119
123
|
return (<div class={styles.fallback} role="alert">
|
|
120
124
|
<span class={styles.title}>
|
|
121
|
-
{
|
|
125
|
+
{retryCount() >= 2
|
|
122
126
|
? t('Persistent error encountered.')
|
|
123
127
|
: t('Something went wrong.')}
|
|
124
128
|
</span>
|
|
125
129
|
<span class={styles.detail}>
|
|
126
|
-
{host.errorPresenter.text(
|
|
130
|
+
{host.errorPresenter.text(caught(), t('Unknown error'))}
|
|
127
131
|
</span>
|
|
128
132
|
<div class={styles.actions}>
|
|
129
133
|
<Button size="sm" variant="secondary" onClick={retry}>
|
|
@@ -132,7 +136,7 @@ function DefaultErrorFallback(props) {
|
|
|
132
136
|
<Button size="sm" variant="secondary" onClick={() => void copyDiagnostic()}>
|
|
133
137
|
{copied() ? t('Copied!') : t('Copy Diagnostic Report')}
|
|
134
138
|
</Button>
|
|
135
|
-
{
|
|
139
|
+
{retryCount() >= 2 && (<Button size="sm" variant="secondary" onClick={reloadWindow}>
|
|
136
140
|
{t('Reload Window')}
|
|
137
141
|
</Button>)}
|
|
138
142
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Show, createEffect, createSignal, createUniqueId, onCleanup, splitProps, } from 'solid-js';
|
|
1
|
+
import { Show, createEffect, createMemo, createSignal, createUniqueId, onCleanup, splitProps, } from 'solid-js';
|
|
2
2
|
import { Spinner } from '../feedback/Spinner';
|
|
3
3
|
import { tooltipCoordinator, } from '../overlay/tooltipCoordinator';
|
|
4
4
|
import { holdNativeTitle, releaseNativeTitle } from '../overlay/nativeTitleHold';
|
|
@@ -224,6 +224,12 @@ export function Button(props) {
|
|
|
224
224
|
}
|
|
225
225
|
return local.title;
|
|
226
226
|
};
|
|
227
|
+
const tooltip = createMemo(() => ({
|
|
228
|
+
content: effectiveTooltip(),
|
|
229
|
+
shortcut: local.tooltipShortcut,
|
|
230
|
+
placement: local.tooltipPlacement,
|
|
231
|
+
}));
|
|
232
|
+
const dropsClick = createMemo(() => Boolean(local.disabled) || isBusy());
|
|
227
233
|
const [contentText, setContentText] = createSignal('');
|
|
228
234
|
createEffect(() => {
|
|
229
235
|
void local.children;
|
|
@@ -241,27 +247,27 @@ export function Button(props) {
|
|
|
241
247
|
}
|
|
242
248
|
if (namedByContent())
|
|
243
249
|
return undefined;
|
|
244
|
-
return
|
|
250
|
+
return tooltip().content;
|
|
245
251
|
};
|
|
246
252
|
const effectiveAriaDescription = () => {
|
|
247
253
|
if (local['aria-description'] !== undefined)
|
|
248
254
|
return local['aria-description'];
|
|
249
255
|
if (local['aria-label'] !== undefined || !namedByContent())
|
|
250
256
|
return undefined;
|
|
251
|
-
const tip =
|
|
257
|
+
const tip = tooltip().content;
|
|
252
258
|
return tip && tip !== contentText() ? tip : undefined;
|
|
253
259
|
};
|
|
254
260
|
const showTooltip = () => {
|
|
255
|
-
const
|
|
256
|
-
if (!
|
|
261
|
+
const { content, shortcut, placement } = tooltip();
|
|
262
|
+
if (!content || !buttonRef)
|
|
257
263
|
return;
|
|
258
264
|
holdNativeTitle(buttonRef);
|
|
259
265
|
tooltipCoordinator.showTooltip({
|
|
260
266
|
id: tooltipId,
|
|
261
267
|
target: buttonRef,
|
|
262
|
-
content
|
|
263
|
-
shortcut
|
|
264
|
-
placement
|
|
268
|
+
content,
|
|
269
|
+
shortcut,
|
|
270
|
+
placement,
|
|
265
271
|
});
|
|
266
272
|
};
|
|
267
273
|
const hideTooltip = () => {
|
|
@@ -321,7 +327,7 @@ export function Button(props) {
|
|
|
321
327
|
local.onFocusOut(e);
|
|
322
328
|
}
|
|
323
329
|
}} onClick={(e) => {
|
|
324
|
-
if (
|
|
330
|
+
if (dropsClick()) {
|
|
325
331
|
e.preventDefault();
|
|
326
332
|
return;
|
|
327
333
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { nativeControlLabelledBy, useFormFieldAria } from './formFieldContext';
|
|
2
|
-
import { Show, createRenderEffect } from 'solid-js';
|
|
2
|
+
import { Show, createMemo, createRenderEffect } from 'solid-js';
|
|
3
3
|
import styles from './Checkbox.module.css.js';
|
|
4
4
|
import { buildSelectionItemClass } from './selectionControlClass';
|
|
5
5
|
export function Checkbox(props) {
|
|
6
|
+
const indeterminate = createMemo(() => Boolean(props.indeterminate));
|
|
6
7
|
const fieldAria = useFormFieldAria();
|
|
7
|
-
return (<label class={buildSelectionItemClass(styles.root, styles.checked, styles.disabled, props.checked ||
|
|
8
|
+
return (<label class={buildSelectionItemClass(styles.root, styles.checked, styles.disabled, props.checked || indeterminate(), Boolean(props.disabled), props.class)}>
|
|
8
9
|
<span class={styles.control}>
|
|
9
10
|
<input type="checkbox" id={props.id} class={`${styles.input} ${props.inputClass ?? ''}`} checked={props.checked} ref={(input) => createRenderEffect(() => {
|
|
10
|
-
input.indeterminate =
|
|
11
|
+
input.indeterminate = indeterminate();
|
|
11
12
|
})} disabled={props.disabled} aria-describedby={fieldAria?.describedBy()} aria-label={props.ariaLabel} aria-labelledby={nativeControlLabelledBy(fieldAria, {
|
|
12
13
|
ariaLabel: props.ariaLabel,
|
|
13
14
|
ariaLabelledBy: props.ariaLabelledBy,
|
|
14
15
|
})} onChange={(event) => {
|
|
15
16
|
const input = event.currentTarget;
|
|
16
17
|
props.onChange(input.checked);
|
|
17
|
-
input.indeterminate =
|
|
18
|
+
input.indeterminate = indeterminate();
|
|
18
19
|
}}/>
|
|
19
20
|
<span class={`${styles.box} ${props.boxClass ?? ''}`} aria-hidden="true">
|
|
20
21
|
<span class={styles.indicator}/>
|
|
@@ -25,9 +25,11 @@ function normalizeOption(opt) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export function Combobox(props) {
|
|
28
|
+
const disabled = createMemo(() => Boolean(props.disabled));
|
|
29
|
+
const value = createMemo(() => props.value);
|
|
28
30
|
const fieldAria = useFormFieldAria();
|
|
29
31
|
const [open, setOpen] = createSignal(false);
|
|
30
|
-
const [inputValue, setInputValue] = createSignal(
|
|
32
|
+
const [inputValue, setInputValue] = createSignal(value());
|
|
31
33
|
const [rawHighlightedIndex, setRawHighlightedIndex] = createSignal(-1);
|
|
32
34
|
const [isTyping, setIsTyping] = createSignal(false);
|
|
33
35
|
let wrapperRef;
|
|
@@ -44,15 +46,15 @@ export function Combobox(props) {
|
|
|
44
46
|
});
|
|
45
47
|
createEffect(() => {
|
|
46
48
|
if (!isTyping()) {
|
|
47
|
-
setInputValue(
|
|
49
|
+
setInputValue(value());
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
52
|
const normalizedOptions = createMemo(() => props.options.map(normalizeOption));
|
|
51
53
|
const isOptionSelected = (opt) => {
|
|
52
54
|
if (props.isSelected) {
|
|
53
|
-
return props.isSelected(opt.value,
|
|
55
|
+
return props.isSelected(opt.value, value());
|
|
54
56
|
}
|
|
55
|
-
return opt.value ===
|
|
57
|
+
return opt.value === value();
|
|
56
58
|
};
|
|
57
59
|
const filteredOptions = createMemo(() => {
|
|
58
60
|
if (props.filterOptions === false || !isTyping()) {
|
|
@@ -90,7 +92,7 @@ export function Combobox(props) {
|
|
|
90
92
|
});
|
|
91
93
|
};
|
|
92
94
|
const openDropdown = () => {
|
|
93
|
-
if (
|
|
95
|
+
if (disabled())
|
|
94
96
|
return;
|
|
95
97
|
updatePosition();
|
|
96
98
|
setOpen(true);
|
|
@@ -155,10 +157,10 @@ export function Combobox(props) {
|
|
|
155
157
|
const handleBlur = () => {
|
|
156
158
|
setIsTyping(false);
|
|
157
159
|
props.onBlur?.();
|
|
158
|
-
setInputValue(
|
|
160
|
+
setInputValue(value());
|
|
159
161
|
};
|
|
160
162
|
const handleKeyDown = (e) => {
|
|
161
|
-
if (
|
|
163
|
+
if (disabled())
|
|
162
164
|
return;
|
|
163
165
|
if (isOneOf(LISTBOX_NAVIGATION_KEYS, e.key)) {
|
|
164
166
|
e.preventDefault();
|
|
@@ -215,15 +217,15 @@ export function Combobox(props) {
|
|
|
215
217
|
return styles.inputLg ?? '';
|
|
216
218
|
return '';
|
|
217
219
|
};
|
|
218
|
-
return (<div ref={wrapperRef} class={`${styles.wrapper} ${sizeClass()} ${
|
|
219
|
-
<input ref={inputRef} type="text" id={props.id} class={`${styles.input} ${inputSizeClass()} ${props.mono ? styles.inputMono : ''}`} role="combobox" aria-autocomplete="list" aria-expanded={open()} aria-controls={listboxId} aria-activedescendant={highlightedIndex() >= 0 ? optionId(highlightedIndex()) : undefined} aria-label={props.ariaLabel} aria-describedby={fieldAria?.describedBy()} disabled={
|
|
220
|
+
return (<div ref={wrapperRef} class={`${styles.wrapper} ${sizeClass()} ${disabled() ? styles.disabled : ''} ${props.class ?? ''}`}>
|
|
221
|
+
<input ref={inputRef} type="text" id={props.id} class={`${styles.input} ${inputSizeClass()} ${props.mono ? styles.inputMono : ''}`} role="combobox" aria-autocomplete="list" aria-expanded={open()} aria-controls={listboxId} aria-activedescendant={highlightedIndex() >= 0 ? optionId(highlightedIndex()) : undefined} aria-label={props.ariaLabel} aria-describedby={fieldAria?.describedBy()} disabled={disabled()} placeholder={props.placeholder} value={inputValue()} onInput={handleInput} onClick={() => {
|
|
220
222
|
if (!open())
|
|
221
223
|
openDropdown();
|
|
222
224
|
}} onBlur={handleBlur} onKeyDown={handleKeyDown}/>
|
|
223
225
|
|
|
224
226
|
<button type="button" class={styles.toggleBtn} tabIndex={-1} aria-label={props.ariaLabel
|
|
225
227
|
? `${props.ariaLabel} suggestions`
|
|
226
|
-
: 'Toggle suggestions'} disabled={
|
|
228
|
+
: 'Toggle suggestions'} disabled={disabled()} onClick={toggleDropdown}>
|
|
227
229
|
<VpChevronDown class={`${styles.chevron} ${open() ? styles.chevronOpen : ''}`} aria-hidden="true"/>
|
|
228
230
|
</button>
|
|
229
231
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { createSignal, onCleanup, splitProps } from 'solid-js';
|
|
1
|
+
import { createMemo, createSignal, onCleanup, splitProps } from 'solid-js';
|
|
2
2
|
import { Button } from './Button';
|
|
3
3
|
import { VpCheck, VpCopy } from '@vokril/icons';
|
|
4
4
|
import { ownerWindow } from '../overlay/ownerWindow';
|
|
5
5
|
import styles from './CopyButton.module.css.js';
|
|
6
6
|
export function CopyButton(props) {
|
|
7
|
+
const disabled = createMemo(() => Boolean(props.disabled));
|
|
8
|
+
const text = createMemo(() => props.text);
|
|
7
9
|
const [local, rest] = splitProps(props, [
|
|
8
10
|
'text',
|
|
9
11
|
'size',
|
|
@@ -25,9 +27,10 @@ export function CopyButton(props) {
|
|
|
25
27
|
});
|
|
26
28
|
const handleCopy = async (e) => {
|
|
27
29
|
e.stopPropagation();
|
|
28
|
-
if (
|
|
30
|
+
if (disabled())
|
|
29
31
|
return;
|
|
30
|
-
const
|
|
32
|
+
const source = text();
|
|
33
|
+
const content = typeof source === 'function' ? source() : source;
|
|
31
34
|
const win = ownerWindow(e.currentTarget);
|
|
32
35
|
let ok = false;
|
|
33
36
|
if (win !== null) {
|
|
@@ -53,7 +56,7 @@ export function CopyButton(props) {
|
|
|
53
56
|
return local.copiedLabel ?? 'Copied!';
|
|
54
57
|
return local.label ?? 'Copy';
|
|
55
58
|
};
|
|
56
|
-
return (<Button {...rest} size={local.size ?? 'sm'} variant={local.variant ?? 'ghost'} iconOnly={isIconOnly()} disabled={
|
|
59
|
+
return (<Button {...rest} size={local.size ?? 'sm'} variant={local.variant ?? 'ghost'} iconOnly={isIconOnly()} disabled={disabled()} onClick={(e) => void handleCopy(e)} aria-label={local.ariaLabel ??
|
|
57
60
|
(copied() ? 'Copied to clipboard' : 'Copy to clipboard')} leadingIcon={copied() ? (<VpCheck aria-hidden="true"/>) : (<VpCopy aria-hidden="true"/>)} class={`${styles.copyButton} ${copied() ? styles.copied : ''} ${local.class ?? ''}`}>
|
|
58
61
|
{isIconOnly() ? undefined : label()}
|
|
59
62
|
</Button>);
|
|
@@ -22,6 +22,9 @@ function parseIso(val) {
|
|
|
22
22
|
}
|
|
23
23
|
const WEEKDAY_NAMES = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
24
24
|
export function DatePicker(props) {
|
|
25
|
+
const minDate = createMemo(() => props.minDate);
|
|
26
|
+
const maxDate = createMemo(() => props.maxDate);
|
|
27
|
+
const includeTime = createMemo(() => Boolean(props.includeTime));
|
|
25
28
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
26
29
|
let triggerRef;
|
|
27
30
|
const parsedDate = createMemo(() => parseIso(props.value));
|
|
@@ -52,9 +55,11 @@ export function DatePicker(props) {
|
|
|
52
55
|
return d.toLocaleString('default', { month: 'long', year: 'numeric' });
|
|
53
56
|
});
|
|
54
57
|
const isDayDisabled = (dateStr) => {
|
|
55
|
-
|
|
58
|
+
const min = minDate();
|
|
59
|
+
const max = maxDate();
|
|
60
|
+
if (min && dateStr < min)
|
|
56
61
|
return true;
|
|
57
|
-
if (
|
|
62
|
+
if (max && dateStr > max)
|
|
58
63
|
return true;
|
|
59
64
|
return false;
|
|
60
65
|
};
|
|
@@ -127,7 +132,7 @@ export function DatePicker(props) {
|
|
|
127
132
|
}
|
|
128
133
|
};
|
|
129
134
|
const emitDate = (baseDateStr) => {
|
|
130
|
-
if (
|
|
135
|
+
if (includeTime()) {
|
|
131
136
|
const h = Number.parseInt(hours(), 10) || 0;
|
|
132
137
|
const m = Number.parseInt(minutes(), 10) || 0;
|
|
133
138
|
props.onChange?.(`${baseDateStr}T${padZero(h)}:${padZero(m)}:00`);
|
|
@@ -140,7 +145,7 @@ export function DatePicker(props) {
|
|
|
140
145
|
if (isDayDisabled(dateStr))
|
|
141
146
|
return;
|
|
142
147
|
emitDate(dateStr);
|
|
143
|
-
if (!
|
|
148
|
+
if (!includeTime()) {
|
|
144
149
|
setIsOpen(false);
|
|
145
150
|
}
|
|
146
151
|
};
|
|
@@ -151,13 +156,13 @@ export function DatePicker(props) {
|
|
|
151
156
|
return;
|
|
152
157
|
setViewYear(d.getFullYear());
|
|
153
158
|
setViewMonth(d.getMonth());
|
|
154
|
-
if (
|
|
159
|
+
if (includeTime()) {
|
|
155
160
|
props.onChange?.(formatIsoDateTime(d));
|
|
156
161
|
}
|
|
157
162
|
else {
|
|
158
163
|
props.onChange?.(isoDateStr);
|
|
159
164
|
}
|
|
160
|
-
if (!
|
|
165
|
+
if (!includeTime()) {
|
|
161
166
|
setIsOpen(false);
|
|
162
167
|
}
|
|
163
168
|
};
|
|
@@ -225,7 +230,7 @@ export function DatePicker(props) {
|
|
|
225
230
|
</For>
|
|
226
231
|
</div>
|
|
227
232
|
|
|
228
|
-
<Show when={
|
|
233
|
+
<Show when={includeTime()}>
|
|
229
234
|
<div class={styles.timeSection}>
|
|
230
235
|
<span class={styles.timeLabel}>{t('Time (HH:MM)')}</span>
|
|
231
236
|
<div class={styles.timeInputs}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { For, Show, createSignal } from 'solid-js';
|
|
1
|
+
import { For, Show, createMemo, createSignal } from 'solid-js';
|
|
2
2
|
import { VpClose, VpFile, VpUpload } from '@vokril/icons';
|
|
3
3
|
import { t } from '../i18n/i18n';
|
|
4
4
|
import styles from './Dropzone.module.css.js';
|
|
@@ -29,18 +29,22 @@ export function isFileAccepted(file, accept) {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
export function Dropzone(props) {
|
|
32
|
+
const accept = createMemo(() => props.accept);
|
|
33
|
+
const maxSize = createMemo(() => props.maxSize);
|
|
34
|
+
const multiple = createMemo(() => props.multiple);
|
|
35
|
+
const disabled = createMemo(() => Boolean(props.disabled));
|
|
32
36
|
const [isDragOver, setIsDragOver] = createSignal(false);
|
|
33
37
|
let fileInputRef;
|
|
34
38
|
let dragCounter = 0;
|
|
35
39
|
const processFiles = (rawFiles) => {
|
|
36
40
|
let filtered = rawFiles;
|
|
37
|
-
if (
|
|
38
|
-
filtered = filtered.filter((f) => isFileAccepted(f,
|
|
41
|
+
if (accept()) {
|
|
42
|
+
filtered = filtered.filter((f) => isFileAccepted(f, accept()));
|
|
39
43
|
}
|
|
40
|
-
if (
|
|
41
|
-
filtered = filtered.filter((f) => f.size <=
|
|
44
|
+
if (maxSize() !== undefined) {
|
|
45
|
+
filtered = filtered.filter((f) => f.size <= maxSize());
|
|
42
46
|
}
|
|
43
|
-
if (
|
|
47
|
+
if (multiple() === false && filtered.length > 1) {
|
|
44
48
|
const first = filtered[0];
|
|
45
49
|
filtered = first ? [first] : [];
|
|
46
50
|
}
|
|
@@ -51,7 +55,7 @@ export function Dropzone(props) {
|
|
|
51
55
|
const handleDragEnter = (e) => {
|
|
52
56
|
e.preventDefault();
|
|
53
57
|
e.stopPropagation();
|
|
54
|
-
if (
|
|
58
|
+
if (disabled())
|
|
55
59
|
return;
|
|
56
60
|
dragCounter++;
|
|
57
61
|
setIsDragOver(true);
|
|
@@ -59,7 +63,7 @@ export function Dropzone(props) {
|
|
|
59
63
|
const handleDragOver = (e) => {
|
|
60
64
|
e.preventDefault();
|
|
61
65
|
e.stopPropagation();
|
|
62
|
-
if (
|
|
66
|
+
if (disabled())
|
|
63
67
|
return;
|
|
64
68
|
setIsDragOver(true);
|
|
65
69
|
};
|
|
@@ -77,7 +81,7 @@ export function Dropzone(props) {
|
|
|
77
81
|
e.stopPropagation();
|
|
78
82
|
dragCounter = 0;
|
|
79
83
|
setIsDragOver(false);
|
|
80
|
-
if (
|
|
84
|
+
if (disabled())
|
|
81
85
|
return;
|
|
82
86
|
const droppedFiles = e.dataTransfer?.files;
|
|
83
87
|
if (droppedFiles && droppedFiles.length > 0) {
|
|
@@ -92,12 +96,12 @@ export function Dropzone(props) {
|
|
|
92
96
|
}
|
|
93
97
|
};
|
|
94
98
|
const handleTriggerClick = () => {
|
|
95
|
-
if (!
|
|
99
|
+
if (!disabled()) {
|
|
96
100
|
fileInputRef?.click();
|
|
97
101
|
}
|
|
98
102
|
};
|
|
99
103
|
const handleKeyDown = (e) => {
|
|
100
|
-
if (
|
|
104
|
+
if (disabled())
|
|
101
105
|
return;
|
|
102
106
|
if (isKey(e, 'Enter') || e.key === ' ') {
|
|
103
107
|
e.preventDefault();
|
|
@@ -107,9 +111,9 @@ export function Dropzone(props) {
|
|
|
107
111
|
return (<div class={`${styles.wrapper} ${props.class ?? ''}`}>
|
|
108
112
|
<input ref={(el) => {
|
|
109
113
|
fileInputRef = el;
|
|
110
|
-
}} type="file" class={styles.hiddenInput} accept={
|
|
114
|
+
}} type="file" class={styles.hiddenInput} accept={accept()} multiple={multiple() ?? true} disabled={disabled()} onChange={handleFileInputChange}/>
|
|
111
115
|
|
|
112
|
-
<div role="button" tabindex={
|
|
116
|
+
<div role="button" tabindex={disabled() ? -1 : 0} aria-disabled={disabled()} aria-label={props.title ?? t('Upload files by dropping or clicking')} class={`${styles.dropArea} ${isDragOver() ? styles.dragActive : ''} ${disabled() ? styles.disabled : ''}`} onDragEnter={handleDragEnter} onDragOver={handleDragOver} onDragLeave={handleDragLeave} onDrop={handleDrop} onClick={handleTriggerClick} onKeyDown={handleKeyDown}>
|
|
113
117
|
<div class={styles.iconCircle}>
|
|
114
118
|
<VpUpload aria-hidden="true" class={styles.uploadIcon}/>
|
|
115
119
|
</div>
|