@vokril/ui-solid 0.29.0 → 0.32.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 +121 -0
- package/README.md +90 -0
- package/dist/AttributeGrid-CNkALmJq.cjs +1 -0
- package/dist/AttributeGrid-DnuTPJ_P.js +320 -0
- package/dist/Button-CX7mylBT.js +308 -0
- 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-CXGUUhP8.js → HostPortal-De65s6CU.js} +1 -1
- package/dist/HostPortal-Dm4BmY8M.cjs +1 -0
- package/dist/{IconPicker-DYqNi5ud.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-CLnJO6uD.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-CNs_obmZ.cjs +50 -0
- package/dist/{StatusBarNotificationBell-7Izs_msz.js → StatusBarNotificationBell-CgsYrrpj.js} +5205 -4850
- package/dist/Stepper-DzI-gtKd.js +586 -0
- package/dist/Stepper-rpu7lpzB.cjs +1 -0
- package/dist/{Textarea-CeAGf08O.cjs → Textarea-D4nYoQ0J.cjs} +1 -1
- package/dist/{Textarea-B5QqqKnI.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/notification.d.cts +28 -3
- package/dist/_internal/contract/notification.d.ts +28 -3
- package/dist/_internal/contract/notificationCatalog.d.cts +2 -0
- package/dist/_internal/contract/notificationCatalog.d.ts +2 -0
- package/dist/_internal/platform/settings/settingsTypes.d.cts +0 -8
- package/dist/_internal/platform/settings/settingsTypes.d.ts +0 -8
- package/dist/a11y/index.cjs +1 -1
- package/dist/a11y/index.js +1 -1
- package/dist/anchoredLayout-CBjQ1etD.cjs +1 -0
- package/dist/anchoredLayout-E0mqCWxk.js +233 -0
- package/dist/base.css +3 -3
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/context/DesktopContextMenuContext.d.cts +8 -1
- package/dist/context/DesktopContextMenuContext.d.ts +8 -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 +229 -228
- package/dist/dialogFocusRestore-BhxVTSiP.js +10 -0
- package/dist/dialogFocusRestore-DP5b1bDo.cjs +1 -0
- 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/Input.d.cts +20 -0
- package/dist/forms/Input.d.ts +20 -0
- package/dist/forms/InputMessage.d.cts +19 -0
- package/dist/forms/InputMessage.d.ts +19 -0
- 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 +936 -928
- 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/layout/resizeCarry.d.cts +17 -0
- package/dist/layout/resizeCarry.d.ts +17 -0
- package/dist/mainRealmDom-BcPuVvcy.cjs +1 -0
- package/dist/mainRealmDom-DydRT2Us.js +54 -0
- package/dist/nativeTitleHold-A9jUISgQ.js +170 -0
- package/dist/nativeTitleHold-B7Ou-W9b.cjs +1 -0
- 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/NotificationItem.d.cts +9 -0
- package/dist/notifications/NotificationItem.d.ts +9 -0
- package/dist/notifications/NotificationsCenter.d.cts +18 -0
- package/dist/notifications/NotificationsCenter.d.ts +18 -0
- package/dist/notifications/RunningProgressCards.d.cts +3 -0
- package/dist/notifications/RunningProgressCards.d.ts +3 -0
- package/dist/notifications/fireNotification.d.cts +35 -16
- package/dist/notifications/fireNotification.d.ts +35 -16
- 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.d.cts +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +55 -52
- package/dist/notifications/nativeEngine.d.cts +38 -5
- package/dist/notifications/nativeEngine.d.ts +38 -5
- package/dist/notifications/notificationEntryList.d.cts +104 -0
- package/dist/notifications/notificationEntryList.d.ts +104 -0
- package/dist/notifications/notificationService.d.cts +23 -2
- package/dist/notifications/notificationService.d.ts +23 -2
- package/dist/notifications/toast.d.cts +3 -0
- package/dist/notifications/toast.d.ts +3 -0
- package/dist/notifications/toastCorner.d.cts +8 -0
- package/dist/notifications/toastCorner.d.ts +8 -0
- package/dist/notifications/toastFilterPolicy.d.cts +33 -1
- package/dist/notifications/toastFilterPolicy.d.ts +33 -1
- package/dist/overlay/Modal.d.cts +19 -0
- package/dist/overlay/Modal.d.ts +19 -0
- package/dist/overlay/backgroundInert.d.cts +6 -2
- package/dist/overlay/backgroundInert.d.ts +6 -2
- package/dist/overlay/command-palette/CommandPalette.d.cts +12 -0
- package/dist/overlay/command-palette/CommandPalette.d.ts +12 -0
- 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 +80 -75
- package/dist/overlay/modalDefaults.d.cts +23 -0
- package/dist/overlay/modalDefaults.d.ts +23 -0
- package/dist/overlay/modalViewport.d.cts +16 -2
- package/dist/overlay/modalViewport.d.ts +16 -2
- package/dist/overlay/nativeTitleHold.d.cts +24 -0
- package/dist/overlay/nativeTitleHold.d.ts +24 -0
- package/dist/ownerAnimationFrame-DzFcMSmn.js +19 -0
- package/dist/ownerAnimationFrame-T6jf6qYC.cjs +1 -0
- package/dist/pageTourState-BuA-GBYO.cjs +5 -0
- package/dist/{pageTourState-BcBF8w89.js → pageTourState-DsSKdPOu.js} +160 -169
- package/dist/rowSource-BRGZHclZ.js +1231 -0
- package/dist/rowSource-C3zlzAtR.cjs +1 -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-CXGUUhP8.js → HostPortal-C4xdfRyM.js} +1 -1
- package/dist/server/HostPortal-CwyePpDX.cjs +1 -0
- package/dist/server/{IconPicker-B4aXspLw.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-D8Jt3PXI.js → StatusBarNotificationBell-CJJFE4rf.js} +5043 -4698
- package/dist/server/StatusBarNotificationBell-Cxs_bVKX.cjs +49 -0
- package/dist/server/Stepper-C04rOZcI.cjs +1 -0
- package/dist/server/Stepper-CVAOsf3o.js +381 -0
- package/dist/server/{Textarea-BQf2lL59.cjs → Textarea-BG6F8taO.cjs} +1 -1
- package/dist/server/{Textarea-BTH48NET.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/{VpTrash-Dlq8o6Uv.js → VpTrash-CZMWCIpF.js} +84 -70
- package/dist/server/VpTrash-DiczWhwm.cjs +1 -0
- package/dist/server/a11y/index.cjs +1 -1
- package/dist/server/a11y/index.js +1 -1
- 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-BImbKlLe.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 +154 -153
- package/dist/server/dialogFocusRestore-BhxVTSiP.js +10 -0
- package/dist/server/dialogFocusRestore-DP5b1bDo.cjs +1 -0
- 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-UIjsx3oJ.js → index-CPUZyKo7.js} +3604 -3617
- package/dist/server/index-CVbkasNJ.cjs +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +656 -649
- 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/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 +55 -52
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +72 -68
- package/dist/server/pageTourState-BuA-GBYO.cjs +5 -0
- package/dist/server/{pageTourState-BcBF8w89.js → pageTourState-DsSKdPOu.js} +160 -169
- package/dist/server/rowSource-C1F4l0xZ.cjs +1 -0
- package/dist/server/rowSource-CoeHYNsV.js +1123 -0
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +29 -26
- 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/solid/_internal/app/onboarding/PageTourHost.jsx +11 -10
- package/dist/solid/_internal/app/onboarding/pageTourState.js +12 -23
- package/dist/solid/charts/TimeSeriesChart.jsx +23 -22
- package/dist/solid/desktop/WindowControls.jsx +6 -3
- package/dist/solid/feedback/Badge.jsx +12 -19
- package/dist/solid/feedback/ErrorBoundary.jsx +18 -14
- package/dist/solid/forms/Button.jsx +18 -23
- 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/Input.jsx +31 -5
- package/dist/solid/forms/Input.module.css.js +1 -0
- package/dist/solid/forms/InputMessage.jsx +87 -0
- 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 +17 -23
- 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 +15 -4
- package/dist/solid/layout/resizeCarry.js +31 -0
- package/dist/solid/navigation/Accordion.jsx +8 -5
- package/dist/solid/navigation/Tabs.jsx +11 -8
- package/dist/solid/notifications/NotificationHost.jsx +5 -18
- package/dist/solid/notifications/NotificationItem.jsx +62 -58
- package/dist/solid/notifications/NotificationPanel.jsx +27 -9
- package/dist/solid/notifications/NotificationsCenter.jsx +72 -12
- package/dist/solid/notifications/RunningProgressCards.jsx +1 -1
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +12 -6
- package/dist/solid/notifications/catalogAdapter.js +1 -0
- package/dist/solid/notifications/createNotificationPreviewRuntime.js +2 -0
- package/dist/solid/notifications/fireNotification.js +21 -16
- package/dist/solid/notifications/holdWhileShown.js +30 -0
- package/dist/solid/notifications/index.js +1 -0
- package/dist/solid/notifications/nativeEngine.js +52 -1
- package/dist/solid/notifications/notificationEntryList.js +184 -0
- package/dist/solid/notifications/notificationService.js +20 -4
- package/dist/solid/notifications/toast.js +58 -7
- package/dist/solid/notifications/toastCorner.js +3 -0
- package/dist/solid/notifications/toastFilterPolicy.js +12 -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/Drawer.jsx +2 -1
- 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 +81 -34
- package/dist/solid/overlay/OverlayScrollArea.jsx +5 -3
- package/dist/solid/overlay/Tooltip.jsx +5 -4
- package/dist/solid/overlay/command-palette/CommandPalette.jsx +11 -11
- package/dist/solid/overlay/context-menu/DesktopContextMenu.jsx +73 -57
- 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/nativeTitleHold.js +33 -0
- package/dist/solid/overlay/popover/Popover.jsx +17 -11
- package/dist/solid/overlay/tooltipDirective.js +3 -11
- package/dist/solid/overlay/tour/GuidedTour.jsx +18 -14
- package/dist/solid/tokens/index.js +1 -0
- package/dist/solid/tokens/palette/index.js +1 -0
- package/dist/solid/tokens/palette/paletteContract.js +27 -0
- package/dist/solid/tree/TreeRow.jsx +19 -16
- package/dist/solid/tree/TreeSurface.jsx +15 -14
- package/dist/solid/widgets/SettingsField.jsx +11 -10
- package/dist/style.css +4 -3
- package/dist/theme.css +3 -2
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +29 -26
- 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/palette/paletteContract.d.cts +17 -0
- package/dist/tokens/palette/paletteContract.d.ts +17 -0
- package/dist/tokens/tokens.css +3 -2
- 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-CASILa4u.js +0 -320
- package/dist/AttributeGrid-eND8YDby.cjs +0 -1
- package/dist/Button-Bb68ymNP.cjs +0 -1
- package/dist/Button-D-T0tyGF.js +0 -305
- package/dist/CommandPalette-5FQRgPG9.cjs +0 -2
- package/dist/CommandPalette-Cj618AOz.js +0 -4017
- package/dist/CopyButton-B5gS2ft3.cjs +0 -1
- package/dist/CopyButton-g-WSiBDZ.js +0 -63
- package/dist/DateRangePicker-CJD9ADgB.js +0 -550
- package/dist/DateRangePicker-Frc0HVxp.cjs +0 -9
- package/dist/EmptyState-B9TxGJ5v.cjs +0 -1
- package/dist/EmptyState-Dph6HU74.js +0 -50
- package/dist/GuidedTour-B6q7lYhn.cjs +0 -1
- package/dist/GuidedTour-CFCvRJN4.js +0 -483
- package/dist/HostPortal-CgJwxt-f.cjs +0 -1
- package/dist/IconPicker-CIbJb1ei.cjs +0 -1
- package/dist/Input-CZruORyy.cjs +0 -1
- package/dist/Input-DkPhsdfk.js +0 -227
- package/dist/Modal-CY6ePolt.cjs +0 -1
- package/dist/Modal-NzZzHSwb.js +0 -559
- package/dist/OverlayScrollArea-BSlaXG1h.cjs +0 -1
- package/dist/OverlayScrollArea-c8Za77qs.js +0 -180
- package/dist/PageSkeleton-BPbb28-H.cjs +0 -30
- package/dist/Popover-CWrR51eG.cjs +0 -1
- package/dist/Popover-Cttb6NYT.js +0 -206
- package/dist/SearchableSelect-BvCm4enQ.js +0 -327
- package/dist/SearchableSelect-CVqdVMOC.cjs +0 -1
- package/dist/StatusBarNotificationBell-BJiORN4s.cjs +0 -50
- package/dist/Stepper-Ci5JpLbS.cjs +0 -1
- package/dist/Stepper-D9i1Xclm.js +0 -583
- package/dist/TimeSeriesChart-DOwi2lJs.js +0 -441
- package/dist/TimeSeriesChart-huvheefm.cjs +0 -1
- package/dist/ToggleButton-BFWh1_o5.cjs +0 -1
- package/dist/ToggleButton-CFM8P3JY.js +0 -2137
- package/dist/anchoredLayout-Dstwa5OH.cjs +0 -1
- package/dist/anchoredLayout-FC-qv8xm.js +0 -250
- package/dist/createDialogShellFocus-B4piXDU4.js +0 -282
- package/dist/createDialogShellFocus-CJaw9-B9.cjs +0 -1
- package/dist/createResizableSidebar-BDUlX9-G.js +0 -472
- package/dist/createResizableSidebar-BVJBU2kP.cjs +0 -1
- package/dist/dialogFocusRestore--dH59ER2.js +0 -35
- package/dist/dialogFocusRestore-CL-ExfAA.cjs +0 -1
- package/dist/kitHost-BfJExE1G.cjs +0 -1
- package/dist/kitHost-CVAEi9sF.js +0 -23
- package/dist/mainRealmDom-C12lr9lm.js +0 -171
- package/dist/mainRealmDom-S6teqEr4.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-B7sb3btp.cjs +0 -1
- package/dist/server/AttributeGrid-CMi-UtWb.js +0 -281
- package/dist/server/Button-0AXWRw9Q.cjs +0 -1
- package/dist/server/Button-3yNrnn4P.js +0 -220
- package/dist/server/CommandPalette-CozogFlk.js +0 -3265
- package/dist/server/CommandPalette-DQK6N98N.cjs +0 -1
- package/dist/server/CopyButton-B6xd9Z6j.js +0 -64
- package/dist/server/CopyButton-D8IN6Vnd.cjs +0 -1
- package/dist/server/DateRangePicker-C35q8BTw.js +0 -484
- package/dist/server/DateRangePicker-KLZzyuPJ.cjs +0 -9
- package/dist/server/EmptyState-BnAHklc5.cjs +0 -1
- package/dist/server/GuidedTour-DfV0yzqh.cjs +0 -1
- package/dist/server/GuidedTour-DmLbBttx.js +0 -400
- package/dist/server/HostPortal-CgJwxt-f.cjs +0 -1
- package/dist/server/IconPicker-B1soopAp.cjs +0 -1
- package/dist/server/Input-CjvD8w18.cjs +0 -1
- package/dist/server/Input-DaEN2JJd.js +0 -127
- package/dist/server/Modal-BheFQLs1.js +0 -415
- package/dist/server/Modal-BswxV8Pn.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-BsxIKBbl.cjs +0 -1
- package/dist/server/Popover-Cg28aPUZ.js +0 -439
- package/dist/server/SearchableSelect-09ECcDlB.cjs +0 -1
- package/dist/server/SearchableSelect-vjhS4c-H.js +0 -205
- package/dist/server/StatusBarNotificationBell-LJHLMT9F.cjs +0 -49
- package/dist/server/Stepper-DxNrskdq.cjs +0 -1
- package/dist/server/Stepper-n5f9r-ye.js +0 -375
- package/dist/server/TimeSeriesChart-BQVXUFoj.cjs +0 -1
- package/dist/server/TimeSeriesChart-PAb95s6x.js +0 -242
- package/dist/server/ToggleButton-FywO2CCI.js +0 -1335
- package/dist/server/ToggleButton-TE3Xf2yD.cjs +0 -1
- package/dist/server/VpTrash-D49oUUJh.cjs +0 -1
- package/dist/server/createDialogShellFocus-BFo8awdj.js +0 -369
- package/dist/server/createDialogShellFocus-BiBAZOCI.cjs +0 -1
- package/dist/server/createResizableSidebar-GFgZIj-5.cjs +0 -1
- package/dist/server/dialogFocusRestore--dH59ER2.js +0 -35
- package/dist/server/dialogFocusRestore-CL-ExfAA.cjs +0 -1
- package/dist/server/index-2mQPVEDR.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
- package/dist/tooltipCoordinator-BzxEyKhA.js +0 -144
- package/dist/tooltipCoordinator-DslqMlsI.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tooltip } from '../tooltipDirective';
|
|
2
|
-
import { For, Show, createComputed, createEffect, createSignal, createUniqueId, on, onCleanup, onMount, } from 'solid-js';
|
|
2
|
+
import { For, Show, createComputed, createEffect, createMemo, createSignal, createUniqueId, on, onCleanup, onMount, } from 'solid-js';
|
|
3
3
|
import { PressableSurface } from '../../forms/PressableSurface';
|
|
4
4
|
import { Portal } from 'solid-js/web';
|
|
5
5
|
import { VpCheck, VpChevronRight } from '@vokril/icons';
|
|
@@ -17,7 +17,23 @@ const VIEWPORT_PADDING = 8;
|
|
|
17
17
|
function isItem(entry) {
|
|
18
18
|
return entry.type !== 'separator';
|
|
19
19
|
}
|
|
20
|
+
function readRowState(state) {
|
|
21
|
+
return typeof state === 'function' ? state() : state === true;
|
|
22
|
+
}
|
|
20
23
|
function MenuPanel(props) {
|
|
24
|
+
const hostWin = createMemo(() => props.hostWin);
|
|
25
|
+
const items = createMemo(() => props.items);
|
|
26
|
+
const depth = createMemo(() => props.depth);
|
|
27
|
+
const autoFocusFirst = createMemo(() => props.autoFocusFirst);
|
|
28
|
+
const place = createMemo(() => ({
|
|
29
|
+
anchor: props.anchor,
|
|
30
|
+
left: props.left,
|
|
31
|
+
top: props.top,
|
|
32
|
+
right: props.right,
|
|
33
|
+
bottom: props.bottom,
|
|
34
|
+
anchorPosition: props.anchorPosition,
|
|
35
|
+
anchorAlignment: props.anchorAlignment,
|
|
36
|
+
}));
|
|
21
37
|
let panelRef;
|
|
22
38
|
let viewportEl;
|
|
23
39
|
let disposed = false;
|
|
@@ -25,22 +41,23 @@ function MenuPanel(props) {
|
|
|
25
41
|
disposed = true;
|
|
26
42
|
});
|
|
27
43
|
const computeInitialPosition = () => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
const at = place();
|
|
45
|
+
const targetAnchor = at.anchor ??
|
|
46
|
+
(depth() === 0 && at.left !== undefined && at.top !== undefined
|
|
47
|
+
? { left: at.left, top: at.top, width: 0, height: 0 }
|
|
31
48
|
: undefined);
|
|
32
49
|
if (targetAnchor) {
|
|
33
|
-
const winHeight =
|
|
34
|
-
const winWidth =
|
|
50
|
+
const winHeight = hostWin().innerHeight;
|
|
51
|
+
const winWidth = hostWin().innerWidth;
|
|
35
52
|
const spaceBelow = winHeight - (targetAnchor.top + targetAnchor.height) - VIEWPORT_PADDING;
|
|
36
|
-
const estimatedHeight = Math.max(36,
|
|
37
|
-
const preferAbove =
|
|
53
|
+
const estimatedHeight = Math.max(36, items().length * 28 + 12);
|
|
54
|
+
const preferAbove = place().anchorPosition === AnchorPosition.ABOVE ||
|
|
38
55
|
(spaceBelow < estimatedHeight && targetAnchor.top > spaceBelow);
|
|
39
56
|
const initialTop = preferAbove
|
|
40
57
|
? Math.max(VIEWPORT_PADDING, targetAnchor.top - estimatedHeight)
|
|
41
58
|
: targetAnchor.top + targetAnchor.height;
|
|
42
59
|
const estimatedWidth = 200;
|
|
43
|
-
const preferRight =
|
|
60
|
+
const preferRight = place().anchorAlignment === AnchorAlignment.RIGHT ||
|
|
44
61
|
targetAnchor.left + estimatedWidth > winWidth - VIEWPORT_PADDING;
|
|
45
62
|
const initialLeft = preferRight
|
|
46
63
|
? Math.max(VIEWPORT_PADDING, targetAnchor.left + targetAnchor.width - estimatedWidth)
|
|
@@ -55,10 +72,10 @@ function MenuPanel(props) {
|
|
|
55
72
|
};
|
|
56
73
|
}
|
|
57
74
|
return {
|
|
58
|
-
left:
|
|
59
|
-
top:
|
|
60
|
-
right:
|
|
61
|
-
bottom:
|
|
75
|
+
left: place().left,
|
|
76
|
+
top: place().top,
|
|
77
|
+
right: place().right,
|
|
78
|
+
bottom: place().bottom,
|
|
62
79
|
maxHeight: undefined,
|
|
63
80
|
maxWidth: undefined,
|
|
64
81
|
};
|
|
@@ -71,8 +88,8 @@ function MenuPanel(props) {
|
|
|
71
88
|
const hintId = (index) => `ctx-hint-${baseId}-${index}`;
|
|
72
89
|
const itemRefs = [];
|
|
73
90
|
let submenuCloseTimer;
|
|
74
|
-
const hasAnyIcon = () =>
|
|
75
|
-
const hasAnyCheck = () =>
|
|
91
|
+
const hasAnyIcon = () => items().some((entry) => isItem(entry) && entry.icon !== undefined);
|
|
92
|
+
const hasAnyCheck = () => items().some((entry) => isItem(entry) && entry.checked !== undefined);
|
|
76
93
|
const focusItem = (index) => {
|
|
77
94
|
setFocusedIndex(index);
|
|
78
95
|
itemRefs[index]?.focus({ preventScroll: false });
|
|
@@ -91,8 +108,8 @@ function MenuPanel(props) {
|
|
|
91
108
|
parentPanelRect: panelRect,
|
|
92
109
|
triggerRowRect: rowRect,
|
|
93
110
|
submenuItemCount: item.submenu.length,
|
|
94
|
-
viewportWidth:
|
|
95
|
-
viewportHeight:
|
|
111
|
+
viewportWidth: hostWin().innerWidth,
|
|
112
|
+
viewportHeight: hostWin().innerHeight,
|
|
96
113
|
});
|
|
97
114
|
setSubmenuParentIndex(index);
|
|
98
115
|
const next = {
|
|
@@ -123,7 +140,7 @@ function MenuPanel(props) {
|
|
|
123
140
|
const handlePanelKeyDown = (event) => {
|
|
124
141
|
const key = event.key;
|
|
125
142
|
const idx = focusedIndex();
|
|
126
|
-
const entry = idx >= 0 ?
|
|
143
|
+
const entry = idx >= 0 ? items()[idx] : undefined;
|
|
127
144
|
const focusedItem = entry && isItem(entry) ? entry : undefined;
|
|
128
145
|
const focusedHasSubmenu = Boolean(focusedItem?.submenu && focusedItem.submenu.length > 0);
|
|
129
146
|
if (key === 'ArrowRight' && focusedHasSubmenu && focusedItem) {
|
|
@@ -134,14 +151,14 @@ function MenuPanel(props) {
|
|
|
134
151
|
openSubmenuForRow(rowEl, focusedItem, idx, true);
|
|
135
152
|
return;
|
|
136
153
|
}
|
|
137
|
-
if (key === 'ArrowLeft' &&
|
|
154
|
+
if (key === 'ArrowLeft' && depth() > 0) {
|
|
138
155
|
event.preventDefault();
|
|
139
156
|
event.stopPropagation();
|
|
140
157
|
props.onRequestCloseSubmenu?.();
|
|
141
158
|
return;
|
|
142
159
|
}
|
|
143
160
|
if ((key === 'Enter' || key === ' ') && idx >= 0 && itemRefs[idx]) {
|
|
144
|
-
if (panelRef &&
|
|
161
|
+
if (panelRef && hostWin().document.activeElement === panelRef) {
|
|
145
162
|
event.preventDefault();
|
|
146
163
|
event.stopPropagation();
|
|
147
164
|
itemRefs[idx]?.click();
|
|
@@ -152,15 +169,15 @@ function MenuPanel(props) {
|
|
|
152
169
|
return;
|
|
153
170
|
event.preventDefault();
|
|
154
171
|
event.stopPropagation();
|
|
155
|
-
const nextIndex = resolveMenuFocusForKey(
|
|
172
|
+
const nextIndex = resolveMenuFocusForKey(items(), idx, key);
|
|
156
173
|
if (nextIndex >= 0)
|
|
157
174
|
focusItem(nextIndex);
|
|
158
175
|
};
|
|
159
176
|
const applyLayout = () => {
|
|
160
177
|
if (!panelRef)
|
|
161
178
|
return;
|
|
162
|
-
const winWidth =
|
|
163
|
-
const winHeight =
|
|
179
|
+
const winWidth = hostWin().innerWidth;
|
|
180
|
+
const winHeight = hostWin().innerHeight;
|
|
164
181
|
const chromeH = panelRef && viewportEl
|
|
165
182
|
? Math.max(0, panelRef.offsetHeight - viewportEl.offsetHeight)
|
|
166
183
|
: 4;
|
|
@@ -171,9 +188,10 @@ function MenuPanel(props) {
|
|
|
171
188
|
: 4;
|
|
172
189
|
const contentWidth = viewportEl ? viewportEl.scrollWidth + chromeW : 0;
|
|
173
190
|
const measuredWidth = Math.max(panelRef.offsetWidth, panelRef.scrollWidth, contentWidth);
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
191
|
+
const at = place();
|
|
192
|
+
const targetAnchor = at.anchor ??
|
|
193
|
+
(depth() === 0 && at.left !== undefined && at.top !== undefined
|
|
194
|
+
? { left: at.left, top: at.top, width: 0, height: 0 }
|
|
177
195
|
: undefined);
|
|
178
196
|
if (targetAnchor) {
|
|
179
197
|
const view = {
|
|
@@ -188,12 +206,12 @@ function MenuPanel(props) {
|
|
|
188
206
|
};
|
|
189
207
|
const spaceBelow = winHeight - (targetAnchor.top + targetAnchor.height) - VIEWPORT_PADDING;
|
|
190
208
|
const spaceAbove = targetAnchor.top - VIEWPORT_PADDING;
|
|
191
|
-
const preferAbove =
|
|
209
|
+
const preferAbove = place().anchorPosition === AnchorPosition.ABOVE ||
|
|
192
210
|
(spaceBelow < spaceAbove &&
|
|
193
211
|
(spaceBelow < measuredHeight || targetAnchor.top > spaceBelow));
|
|
194
212
|
const result = layout2d(viewport, view, targetAnchor, {
|
|
195
|
-
anchorAlignment:
|
|
196
|
-
anchorPosition:
|
|
213
|
+
anchorAlignment: place().anchorAlignment ?? AnchorAlignment.LEFT,
|
|
214
|
+
anchorPosition: place().anchorPosition ??
|
|
197
215
|
(preferAbove ? AnchorPosition.ABOVE : AnchorPosition.BELOW),
|
|
198
216
|
margin: VIEWPORT_PADDING,
|
|
199
217
|
});
|
|
@@ -232,10 +250,10 @@ function MenuPanel(props) {
|
|
|
232
250
|
setPosition(nextPos);
|
|
233
251
|
return;
|
|
234
252
|
}
|
|
235
|
-
let clampedX =
|
|
236
|
-
let clampedRight =
|
|
237
|
-
let clampedY =
|
|
238
|
-
let clampedBottom =
|
|
253
|
+
let clampedX = place().left;
|
|
254
|
+
let clampedRight = place().right;
|
|
255
|
+
let clampedY = place().top;
|
|
256
|
+
let clampedBottom = place().bottom;
|
|
239
257
|
if (clampedRight !== undefined) {
|
|
240
258
|
clampedRight = Math.max(VIEWPORT_PADDING, Math.min(clampedRight, winWidth - measuredWidth - VIEWPORT_PADDING));
|
|
241
259
|
}
|
|
@@ -287,11 +305,11 @@ function MenuPanel(props) {
|
|
|
287
305
|
queueMicrotask(() => {
|
|
288
306
|
if (disposed)
|
|
289
307
|
return;
|
|
290
|
-
const modality =
|
|
308
|
+
const modality = hostWin().document.documentElement.getAttribute('data-focus-modality');
|
|
291
309
|
const isPointer = modality === 'pointer';
|
|
292
|
-
const shouldAutoFocus =
|
|
310
|
+
const shouldAutoFocus = autoFocusFirst() ?? (!isPointer && depth() === 0);
|
|
293
311
|
if (shouldAutoFocus) {
|
|
294
|
-
const first = firstFocusableMenuIndex(
|
|
312
|
+
const first = firstFocusableMenuIndex(items());
|
|
295
313
|
if (first >= 0) {
|
|
296
314
|
focusItem(first);
|
|
297
315
|
return;
|
|
@@ -300,7 +318,7 @@ function MenuPanel(props) {
|
|
|
300
318
|
panelRef?.focus();
|
|
301
319
|
});
|
|
302
320
|
applyLayout();
|
|
303
|
-
const win =
|
|
321
|
+
const win = hostWin();
|
|
304
322
|
const rafId = win.requestAnimationFrame(() => applyLayout());
|
|
305
323
|
const onReflow = () => applyLayout();
|
|
306
324
|
win.addEventListener('resize', onReflow);
|
|
@@ -324,7 +342,7 @@ function MenuPanel(props) {
|
|
|
324
342
|
clearTimeout(submenuCloseTimer);
|
|
325
343
|
});
|
|
326
344
|
createEffect(() => {
|
|
327
|
-
void
|
|
345
|
+
void items().length;
|
|
328
346
|
setPosition(computeInitialPosition());
|
|
329
347
|
queueMicrotask(() => {
|
|
330
348
|
if (disposed)
|
|
@@ -347,7 +365,7 @@ function MenuPanel(props) {
|
|
|
347
365
|
};
|
|
348
366
|
const handleItemHover = (event, item, index) => {
|
|
349
367
|
cancelSubmenuClose();
|
|
350
|
-
if (item.disabled || !item.submenu || item.submenu.length === 0) {
|
|
368
|
+
if (readRowState(item.disabled) || !item.submenu || item.submenu.length === 0) {
|
|
351
369
|
scheduleSubmenuClose();
|
|
352
370
|
return;
|
|
353
371
|
}
|
|
@@ -365,9 +383,9 @@ function MenuPanel(props) {
|
|
|
365
383
|
parent: props.parentLayer,
|
|
366
384
|
});
|
|
367
385
|
onMount(() => {
|
|
368
|
-
if (
|
|
386
|
+
if (depth() !== 0)
|
|
369
387
|
return;
|
|
370
|
-
const win =
|
|
388
|
+
const win = hostWin();
|
|
371
389
|
const closeOnEscape = (event) => {
|
|
372
390
|
if (!isKey(event, 'Escape') || !layer.isTopmost())
|
|
373
391
|
return;
|
|
@@ -391,8 +409,8 @@ function MenuPanel(props) {
|
|
|
391
409
|
'max-width': position().maxWidth !== undefined
|
|
392
410
|
? `${Math.min(360, position().maxWidth ?? 360)}px`
|
|
393
411
|
: undefined,
|
|
394
|
-
'z-index':
|
|
395
|
-
? `calc(var(--z-context-menu) + ${
|
|
412
|
+
'z-index': depth() > 0
|
|
413
|
+
? `calc(var(--z-context-menu) + ${depth()})`
|
|
396
414
|
: undefined,
|
|
397
415
|
}} onMouseDown={(event) => event.stopPropagation()} onPointerDown={(event) => event.stopPropagation()} onClick={(event) => event.stopPropagation()} onContextMenu={(event) => event.preventDefault()} onKeyDown={handlePanelKeyDown} onMouseEnter={() => {
|
|
398
416
|
cancelSubmenuClose();
|
|
@@ -400,18 +418,16 @@ function MenuPanel(props) {
|
|
|
400
418
|
}} onMouseLeave={() => {
|
|
401
419
|
scheduleSubmenuClose();
|
|
402
420
|
props.onMouseLeavePanel?.();
|
|
403
|
-
}} data-desktop-menu-depth={
|
|
421
|
+
}} data-desktop-menu-depth={depth()}>
|
|
404
422
|
<OverlayScrollArea viewportClass={styles.itemsViewport} viewportRef={(el) => (viewportEl = el)}>
|
|
405
|
-
<For each={
|
|
423
|
+
<For each={items()}>
|
|
406
424
|
{(entry, index) => {
|
|
407
425
|
if (!isItem(entry)) {
|
|
408
426
|
return <div class={styles.separator} role="separator"/>;
|
|
409
427
|
}
|
|
410
428
|
const hasSubmenu = () => Boolean(entry.submenu && entry.submenu.length > 0);
|
|
411
|
-
const checkedValue = () =>
|
|
412
|
-
|
|
413
|
-
return typeof c === 'function' ? c() : Boolean(c);
|
|
414
|
-
};
|
|
429
|
+
const checkedValue = () => readRowState(entry.checked);
|
|
430
|
+
const disabledValue = () => readRowState(entry.disabled);
|
|
415
431
|
const isSubmenuOpen = () => hasSubmenu() && submenuState()?.items === entry.submenu;
|
|
416
432
|
let textEl;
|
|
417
433
|
const label = () => typeof entry.label === 'function' ? entry.label() : entry.label;
|
|
@@ -430,17 +446,17 @@ function MenuPanel(props) {
|
|
|
430
446
|
[styles.itemExpanded ?? '']: isSubmenuOpen(),
|
|
431
447
|
}} role={entry.checkedRole
|
|
432
448
|
? `menuitem${entry.checkedRole}`
|
|
433
|
-
: 'menuitem'} tabIndex={-1} aria-disabled={
|
|
449
|
+
: 'menuitem'} tabIndex={-1} aria-disabled={disabledValue() ? true : undefined} aria-checked={entry.checkedRole ? checkedValue() : undefined} aria-haspopup={hasSubmenu() ? 'menu' : undefined} aria-expanded={hasSubmenu() ? isSubmenuOpen() : undefined} aria-describedby={entry.hint ? hintId(index()) : undefined} onFocus={() => setFocusedIndex(index())} onMouseEnter={(event) => {
|
|
434
450
|
if (panelRef &&
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
panelRef.contains(
|
|
451
|
+
hostWin().document.activeElement &&
|
|
452
|
+
hostWin().document.activeElement !== panelRef &&
|
|
453
|
+
panelRef.contains(hostWin().document.activeElement)) {
|
|
438
454
|
panelRef.focus({ preventScroll: true });
|
|
439
455
|
}
|
|
440
456
|
setFocusedIndex(index());
|
|
441
457
|
handleItemHover(event, entry, index());
|
|
442
458
|
}} onClick={() => {
|
|
443
|
-
if (
|
|
459
|
+
if (disabledValue())
|
|
444
460
|
return;
|
|
445
461
|
if (hasSubmenu()) {
|
|
446
462
|
const rowEl = itemRefs[index()];
|
|
@@ -491,10 +507,10 @@ function MenuPanel(props) {
|
|
|
491
507
|
<Show when={submenuState()}>
|
|
492
508
|
{(submenu) => {
|
|
493
509
|
const posProps = submenu().flipLeft
|
|
494
|
-
? { right:
|
|
510
|
+
? { right: hostWin().innerWidth - submenu().x }
|
|
495
511
|
: { left: submenu().x };
|
|
496
|
-
return (<Portal mount={
|
|
497
|
-
<MenuPanel {...posProps} top={submenu().y} items={submenu().items} depth={
|
|
512
|
+
return (<Portal mount={hostWin().document.body}>
|
|
513
|
+
<MenuPanel {...posProps} top={submenu().y} items={submenu().items} depth={depth() + 1} hostWin={hostWin()} parentLayer={layer} autoFocusFirst={submenu().autoFocus} onRequestClose={props.onRequestClose} onRequestCloseSubmenu={closeSubmenuAndRefocus} onMouseEnterPanel={() => {
|
|
498
514
|
cancelSubmenuClose();
|
|
499
515
|
props.onMouseEnterPanel?.();
|
|
500
516
|
}} onMouseLeavePanel={() => {
|
|
@@ -26,7 +26,8 @@ export * from './ownerAnimationFrame';
|
|
|
26
26
|
export * from './backgroundInert';
|
|
27
27
|
export * from './modalFocusContainment';
|
|
28
28
|
export * from './modalFocusTrap';
|
|
29
|
-
export
|
|
29
|
+
export { modalTitlebarHeight } from './modalViewport';
|
|
30
|
+
export * from './modalDefaults';
|
|
30
31
|
export * from './dialogFocusRestore';
|
|
31
32
|
export * from './dialogFocusScope';
|
|
32
33
|
export * from './dialogShellKeyIntent';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Show, createSignal, createUniqueId, } from 'solid-js';
|
|
1
|
+
import { Show, createMemo, createSignal, createUniqueId, } from 'solid-js';
|
|
2
2
|
import { VpCheck, VpChevronDown } from '@vokril/icons';
|
|
3
3
|
import { PressableSurface } from '../../forms/PressableSurface';
|
|
4
4
|
import { OverlayScrollArea } from '../OverlayScrollArea';
|
|
@@ -26,6 +26,7 @@ export function MenuSection(props) {
|
|
|
26
26
|
</div>);
|
|
27
27
|
}
|
|
28
28
|
export function MenuItem(props) {
|
|
29
|
+
const disabled = createMemo(() => Boolean(props.disabled));
|
|
29
30
|
const hintId = createUniqueId();
|
|
30
31
|
const role = () => props.role ?? (props.checked !== undefined ? 'menuitemcheckbox' : 'menuitem');
|
|
31
32
|
const checkable = () => role() === 'menuitemcheckbox' || role() === 'menuitemradio';
|
|
@@ -73,19 +74,19 @@ export function MenuItem(props) {
|
|
|
73
74
|
</Show>
|
|
74
75
|
</>);
|
|
75
76
|
const stateClasses = () => joinClasses((props.selected || props.pressed) && styles.itemSelected, props.active && styles.itemActive, props.danger && styles.itemDanger);
|
|
76
|
-
const row = (rowClass) => (<PressableSurface as={nestsTrailing() ? 'div' : 'button'} ref={(el) => props.ref?.(el)} id={props.id} role={role()} class={rowClass} disabled={
|
|
77
|
+
const row = (rowClass) => (<PressableSurface as={nestsTrailing() ? 'div' : 'button'} ref={(el) => props.ref?.(el)} id={props.id} role={role()} class={rowClass} disabled={disabled()} aria-checked={checkable() ? props.checked === true : undefined} aria-selected={role() === 'option' ? props.selected === true : undefined} aria-current={(role() === 'menuitem' || role() === 'button') && props.selected === true
|
|
77
78
|
? 'true'
|
|
78
79
|
: undefined} aria-pressed={role() === 'button' && props.pressed !== undefined
|
|
79
80
|
? props.pressed
|
|
80
81
|
: undefined} aria-describedby={props.hint ? hintId : undefined} onClick={(event) => {
|
|
81
|
-
if (
|
|
82
|
+
if (disabled())
|
|
82
83
|
return;
|
|
83
84
|
props.onSelect?.(event);
|
|
84
85
|
}} onContextMenu={(event) => props.onContextMenu?.(event)}>
|
|
85
86
|
{content()}
|
|
86
87
|
</PressableSurface>);
|
|
87
88
|
return (<Show when={hasTrailing() && !nestsTrailing()} fallback={row(joinClasses(styles.item, stateClasses(), props.class))}>
|
|
88
|
-
<div class={joinClasses(styles.item, styles.entry, stateClasses(),
|
|
89
|
+
<div class={joinClasses(styles.item, styles.entry, stateClasses(), disabled() && styles.entryDisabled, props.class)}>
|
|
89
90
|
{row(styles.entryMain ?? '')}
|
|
90
91
|
<span class={styles.trailing}>{props.trailing}</span>
|
|
91
92
|
</div>
|
|
@@ -101,21 +102,23 @@ export function MenuSearch(props) {
|
|
|
101
102
|
return <div class={joinClasses(styles.search, props.class)}>{props.children}</div>;
|
|
102
103
|
}
|
|
103
104
|
export function MenuDisclosure(props) {
|
|
105
|
+
const openProp = createMemo(() => props.open);
|
|
106
|
+
const disabled = createMemo(() => Boolean(props.disabled));
|
|
104
107
|
const toggleId = createUniqueId();
|
|
105
108
|
const bodyId = createUniqueId();
|
|
106
109
|
const [internalOpen, setInternalOpen] = createSignal(props.defaultOpen ?? false);
|
|
107
|
-
const isOpen = () =>
|
|
110
|
+
const isOpen = () => openProp() ?? internalOpen();
|
|
108
111
|
const indented = () => props.icon !== undefined || props.reserveIcon === true;
|
|
109
112
|
const toggle = () => {
|
|
110
|
-
if (
|
|
113
|
+
if (disabled())
|
|
111
114
|
return;
|
|
112
115
|
const next = !isOpen();
|
|
113
|
-
if (
|
|
116
|
+
if (openProp() === undefined)
|
|
114
117
|
setInternalOpen(next);
|
|
115
118
|
props.onToggle?.(next);
|
|
116
119
|
};
|
|
117
120
|
return (<div class={joinClasses(styles.disclosure, props.class)}>
|
|
118
|
-
<PressableSurface id={toggleId} class={styles.item} disabled={
|
|
121
|
+
<PressableSurface id={toggleId} class={styles.item} disabled={disabled()} aria-expanded={isOpen() ? 'true' : 'false'} aria-controls={isOpen() ? bodyId : undefined} onClick={toggle}>
|
|
119
122
|
<Show when={indented()}>
|
|
120
123
|
<span class={styles.icon} aria-hidden="true">
|
|
121
124
|
{props.icon}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from 'solid-js';
|
|
2
|
+
const ModalDefaultsContext = createContext({});
|
|
3
|
+
export function ModalDefaultsProvider(props) {
|
|
4
|
+
return (<ModalDefaultsContext.Provider value={props.value}>
|
|
5
|
+
{props.children}
|
|
6
|
+
</ModalDefaultsContext.Provider>);
|
|
7
|
+
}
|
|
8
|
+
export function useModalDefaults() {
|
|
9
|
+
return useContext(ModalDefaultsContext);
|
|
10
|
+
}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { createElement } from '../_internal/platform/window/mainRealmDom';
|
|
2
|
+
const DEFAULT_TITLEBAR_HEIGHT = '2.875rem';
|
|
3
|
+
export const MODAL_TITLEBAR_PROBE_ATTRIBUTE = 'data-modal-titlebar-probe';
|
|
4
|
+
export function modalTitlebarHeight(doc, within) {
|
|
5
|
+
const probe = createElement('div');
|
|
6
|
+
probe.setAttribute(MODAL_TITLEBAR_PROBE_ATTRIBUTE, '');
|
|
7
|
+
probe.style.cssText =
|
|
8
|
+
'position:absolute;top:0;left:0;width:0;visibility:hidden;pointer-events:none;' +
|
|
9
|
+
`height:var(--modal-maximize-inset, ${DEFAULT_TITLEBAR_HEIGHT})`;
|
|
10
|
+
const host = within?.isConnected ? within : (doc.body ?? doc.documentElement);
|
|
11
|
+
host.append(probe);
|
|
12
|
+
try {
|
|
13
|
+
return probe.getBoundingClientRect().height;
|
|
14
|
+
}
|
|
15
|
+
finally {
|
|
16
|
+
probe.remove();
|
|
17
|
+
}
|
|
5
18
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const HELD_TITLE = 'data-suppressed-title';
|
|
2
|
+
const holds = new WeakMap();
|
|
3
|
+
export function holdNativeTitle(element) {
|
|
4
|
+
const view = element.ownerDocument.defaultView;
|
|
5
|
+
if (view === null || holds.has(element))
|
|
6
|
+
return;
|
|
7
|
+
const title = element.getAttribute('title');
|
|
8
|
+
if (title === null || title === '')
|
|
9
|
+
return;
|
|
10
|
+
element.setAttribute(HELD_TITLE, title);
|
|
11
|
+
element.setAttribute('title', '');
|
|
12
|
+
let wrote = false;
|
|
13
|
+
const observer = new view.MutationObserver(() => {
|
|
14
|
+
wrote = true;
|
|
15
|
+
});
|
|
16
|
+
observer.observe(element, { attributes: true, attributeFilter: ['title'] });
|
|
17
|
+
holds.set(element, {
|
|
18
|
+
ownerWrote: () => wrote || observer.takeRecords().length > 0,
|
|
19
|
+
stop: () => observer.disconnect(),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export function releaseNativeTitle(element) {
|
|
23
|
+
const hold = holds.get(element);
|
|
24
|
+
if (hold === undefined)
|
|
25
|
+
return;
|
|
26
|
+
holds.delete(element);
|
|
27
|
+
const ownerWrote = hold.ownerWrote();
|
|
28
|
+
hold.stop();
|
|
29
|
+
const held = element.getAttribute(HELD_TITLE);
|
|
30
|
+
element.removeAttribute(HELD_TITLE);
|
|
31
|
+
if (!ownerWrote && held !== null)
|
|
32
|
+
element.setAttribute('title', held);
|
|
33
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Show, createEffect, createSignal, onCleanup, } from 'solid-js';
|
|
1
|
+
import { Show, createEffect, createMemo, createSignal, onCleanup, } from 'solid-js';
|
|
2
2
|
import { Portal } from 'solid-js/web';
|
|
3
3
|
import { ownerWindow } from '../ownerWindow';
|
|
4
4
|
import { requestOwnerAnimationFrame } from '../ownerAnimationFrame';
|
|
@@ -9,6 +9,12 @@ import { OverlayScrollArea } from '../OverlayScrollArea';
|
|
|
9
9
|
import styles from './Popover.module.css.js';
|
|
10
10
|
import { isKey } from '../../_internal/base/keys';
|
|
11
11
|
export function Popover(props) {
|
|
12
|
+
const anchorProp = createMemo(() => props.anchor);
|
|
13
|
+
const anchorElement = () => anchorProp()();
|
|
14
|
+
const ownerWindowProp = createMemo(() => props.ownerWindow);
|
|
15
|
+
const placement = createMemo(() => props.placement ?? 'bottom-start');
|
|
16
|
+
const gap = createMemo(() => props.gap ?? 4);
|
|
17
|
+
const roleProp = createMemo(() => props.role);
|
|
12
18
|
const [pos, setPos] = createSignal(null);
|
|
13
19
|
const [panelEl, setPanelEl] = createSignal(null);
|
|
14
20
|
let panelRef;
|
|
@@ -16,8 +22,8 @@ export function Popover(props) {
|
|
|
16
22
|
? props.open()
|
|
17
23
|
: props.open;
|
|
18
24
|
const popoverWindow = () => {
|
|
19
|
-
const anchor =
|
|
20
|
-
return (anchor ? ownerWindow(anchor) : null) ??
|
|
25
|
+
const anchor = anchorElement();
|
|
26
|
+
return (anchor ? ownerWindow(anchor) : null) ?? ownerWindowProp() ?? null;
|
|
21
27
|
};
|
|
22
28
|
const layer = useOverlayRegistration(() => isOpen() && pos() !== null, 'popover', {
|
|
23
29
|
type: 'popover',
|
|
@@ -25,7 +31,7 @@ export function Popover(props) {
|
|
|
25
31
|
document: () => popoverWindow()?.document,
|
|
26
32
|
});
|
|
27
33
|
const reposition = () => {
|
|
28
|
-
const anchor =
|
|
34
|
+
const anchor = anchorElement();
|
|
29
35
|
const win = popoverWindow();
|
|
30
36
|
if (!anchor || win === null)
|
|
31
37
|
return;
|
|
@@ -60,8 +66,8 @@ export function Popover(props) {
|
|
|
60
66
|
: 0,
|
|
61
67
|
viewportWidth: win.innerWidth,
|
|
62
68
|
viewportHeight: win.innerHeight,
|
|
63
|
-
placement:
|
|
64
|
-
gap:
|
|
69
|
+
placement: placement(),
|
|
70
|
+
gap: gap(),
|
|
65
71
|
});
|
|
66
72
|
const current = pos();
|
|
67
73
|
if (current &&
|
|
@@ -81,13 +87,13 @@ export function Popover(props) {
|
|
|
81
87
|
return;
|
|
82
88
|
}
|
|
83
89
|
const win = popoverWindow();
|
|
84
|
-
const anchorNode =
|
|
90
|
+
const anchorNode = anchorElement();
|
|
85
91
|
if (win === null || !anchorNode)
|
|
86
92
|
return;
|
|
87
93
|
reposition();
|
|
88
94
|
const cancelFrame = requestOwnerAnimationFrame(anchorNode, () => {
|
|
89
95
|
reposition();
|
|
90
|
-
const role =
|
|
96
|
+
const role = roleProp();
|
|
91
97
|
if (role === 'menu' || role === 'listbox') {
|
|
92
98
|
const sel = role === 'menu' ? MENU_ITEM_SELECTOR : LISTBOX_OPTION_SELECTOR;
|
|
93
99
|
const panel = panelRef;
|
|
@@ -102,7 +108,7 @@ export function Popover(props) {
|
|
|
102
108
|
const target = e.target;
|
|
103
109
|
if (!target || !layer.isTopmostForPointer())
|
|
104
110
|
return;
|
|
105
|
-
if (panelRef?.contains(target) ||
|
|
111
|
+
if (panelRef?.contains(target) || anchorElement()?.contains(target))
|
|
106
112
|
return;
|
|
107
113
|
if (target instanceof Element &&
|
|
108
114
|
target.closest('[role="listbox"], [role="menu"]'))
|
|
@@ -151,7 +157,7 @@ export function Popover(props) {
|
|
|
151
157
|
<div ref={(el) => {
|
|
152
158
|
panelRef = el;
|
|
153
159
|
setPanelEl(el);
|
|
154
|
-
}} role={
|
|
160
|
+
}} role={roleProp() ?? 'dialog'} aria-label={props.ariaLabel} tabIndex={roleProp() === 'menu' || roleProp() === 'listbox'
|
|
155
161
|
? -1
|
|
156
162
|
: undefined} class={`${styles.popover} ${props.class ?? ''}`} style={{
|
|
157
163
|
left: `${p().x}px`,
|
|
@@ -161,7 +167,7 @@ export function Popover(props) {
|
|
|
161
167
|
? { 'min-width': `${p().w}px` }
|
|
162
168
|
: {}),
|
|
163
169
|
}} onKeyDown={(e) => {
|
|
164
|
-
const role =
|
|
170
|
+
const role = roleProp();
|
|
165
171
|
if ((role !== 'menu' && role !== 'listbox') ||
|
|
166
172
|
!isPopoverNavigationKey(e.key))
|
|
167
173
|
return;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createUniqueId, onCleanup } from 'solid-js';
|
|
2
2
|
import { tooltipCoordinator, } from './tooltipCoordinator';
|
|
3
|
+
import { holdNativeTitle, releaseNativeTitle } from './nativeTitleHold';
|
|
3
4
|
export function tooltip(el, accessor) {
|
|
4
5
|
const id = createUniqueId();
|
|
5
6
|
const getOptions = () => {
|
|
@@ -15,10 +16,7 @@ export function tooltip(el, accessor) {
|
|
|
15
16
|
const opts = getOptions();
|
|
16
17
|
if (!opts || !opts.content)
|
|
17
18
|
return;
|
|
18
|
-
|
|
19
|
-
el.setAttribute('data-suppressed-title', el.getAttribute('title') ?? '');
|
|
20
|
-
el.removeAttribute('title');
|
|
21
|
-
}
|
|
19
|
+
holdNativeTitle(el);
|
|
22
20
|
tooltipCoordinator.showTooltip({
|
|
23
21
|
id,
|
|
24
22
|
target: el,
|
|
@@ -30,13 +28,7 @@ export function tooltip(el, accessor) {
|
|
|
30
28
|
});
|
|
31
29
|
};
|
|
32
30
|
const hide = () => {
|
|
33
|
-
|
|
34
|
-
const original = el.getAttribute('data-suppressed-title');
|
|
35
|
-
if (original) {
|
|
36
|
-
el.setAttribute('title', original);
|
|
37
|
-
}
|
|
38
|
-
el.removeAttribute('data-suppressed-title');
|
|
39
|
-
}
|
|
31
|
+
releaseNativeTitle(el);
|
|
40
32
|
tooltipCoordinator.hideTooltip(el);
|
|
41
33
|
};
|
|
42
34
|
el.addEventListener('pointerenter', show);
|