@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,6 +1,7 @@
|
|
|
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
|
+
import { holdNativeTitle, releaseNativeTitle } from '../overlay/nativeTitleHold';
|
|
4
5
|
import styles from './Button.module.css.js';
|
|
5
6
|
const VARIANT_CLASS = {
|
|
6
7
|
primary: styles.variantPrimary,
|
|
@@ -223,6 +224,12 @@ export function Button(props) {
|
|
|
223
224
|
}
|
|
224
225
|
return local.title;
|
|
225
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());
|
|
226
233
|
const [contentText, setContentText] = createSignal('');
|
|
227
234
|
createEffect(() => {
|
|
228
235
|
void local.children;
|
|
@@ -240,44 +247,32 @@ export function Button(props) {
|
|
|
240
247
|
}
|
|
241
248
|
if (namedByContent())
|
|
242
249
|
return undefined;
|
|
243
|
-
return
|
|
250
|
+
return tooltip().content;
|
|
244
251
|
};
|
|
245
252
|
const effectiveAriaDescription = () => {
|
|
246
253
|
if (local['aria-description'] !== undefined)
|
|
247
254
|
return local['aria-description'];
|
|
248
255
|
if (local['aria-label'] !== undefined || !namedByContent())
|
|
249
256
|
return undefined;
|
|
250
|
-
const tip =
|
|
257
|
+
const tip = tooltip().content;
|
|
251
258
|
return tip && tip !== contentText() ? tip : undefined;
|
|
252
259
|
};
|
|
253
260
|
const showTooltip = () => {
|
|
254
|
-
const
|
|
255
|
-
if (!
|
|
261
|
+
const { content, shortcut, placement } = tooltip();
|
|
262
|
+
if (!content || !buttonRef)
|
|
256
263
|
return;
|
|
257
|
-
|
|
258
|
-
buttonRef.setAttribute('data-suppressed-title', buttonRef.getAttribute('title') ?? '');
|
|
259
|
-
buttonRef.removeAttribute('title');
|
|
260
|
-
}
|
|
264
|
+
holdNativeTitle(buttonRef);
|
|
261
265
|
tooltipCoordinator.showTooltip({
|
|
262
266
|
id: tooltipId,
|
|
263
267
|
target: buttonRef,
|
|
264
|
-
content
|
|
265
|
-
shortcut
|
|
266
|
-
placement
|
|
268
|
+
content,
|
|
269
|
+
shortcut,
|
|
270
|
+
placement,
|
|
267
271
|
});
|
|
268
272
|
};
|
|
269
|
-
const restoreNativeTitle = () => {
|
|
270
|
-
if (buttonRef && buttonRef.hasAttribute('data-suppressed-title')) {
|
|
271
|
-
const original = buttonRef.getAttribute('data-suppressed-title');
|
|
272
|
-
if (original) {
|
|
273
|
-
buttonRef.setAttribute('title', original);
|
|
274
|
-
}
|
|
275
|
-
buttonRef.removeAttribute('data-suppressed-title');
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
273
|
const hideTooltip = () => {
|
|
279
|
-
restoreNativeTitle();
|
|
280
274
|
if (buttonRef) {
|
|
275
|
+
releaseNativeTitle(buttonRef);
|
|
281
276
|
tooltipCoordinator.hideTooltip(buttonRef);
|
|
282
277
|
}
|
|
283
278
|
};
|
|
@@ -332,7 +327,7 @@ export function Button(props) {
|
|
|
332
327
|
local.onFocusOut(e);
|
|
333
328
|
}
|
|
334
329
|
}} onClick={(e) => {
|
|
335
|
-
if (
|
|
330
|
+
if (dropsClick()) {
|
|
336
331
|
e.preventDefault();
|
|
337
332
|
return;
|
|
338
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>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { splitProps } from 'solid-js';
|
|
1
|
+
import { createMemo, splitProps } from 'solid-js';
|
|
2
2
|
import { Button } from './Button';
|
|
3
3
|
import { HiddenFileInput } from './HiddenFileInput';
|
|
4
4
|
export function FilePickerButton(props) {
|
|
5
|
+
const disabled = createMemo(() => Boolean(props.disabled));
|
|
5
6
|
const [local, buttonProps] = splitProps(props, [
|
|
6
7
|
'accept',
|
|
7
8
|
'multiple',
|
|
@@ -15,14 +16,14 @@ export function FilePickerButton(props) {
|
|
|
15
16
|
]);
|
|
16
17
|
let pickerHandle;
|
|
17
18
|
const handleClick = (e) => {
|
|
18
|
-
if (
|
|
19
|
+
if (disabled())
|
|
19
20
|
return;
|
|
20
21
|
local.onClick?.(e);
|
|
21
22
|
pickerHandle?.open();
|
|
22
23
|
};
|
|
23
24
|
return (<>
|
|
24
|
-
<Button {...buttonProps} disabled={
|
|
25
|
-
<HiddenFileInput accept={local.accept} multiple={local.multiple} directory={local.directory} disabled={
|
|
25
|
+
<Button {...buttonProps} disabled={disabled()} onClick={handleClick}/>
|
|
26
|
+
<HiddenFileInput accept={local.accept} multiple={local.multiple} directory={local.directory} disabled={disabled()} onFiles={local.onFiles} onFile={local.onFile} resetOnPick={local.resetOnPick} ref={(h) => {
|
|
26
27
|
pickerHandle = h;
|
|
27
28
|
local.handleRef?.(h);
|
|
28
29
|
}}/>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { createMemo } from 'solid-js';
|
|
1
2
|
import styles from './HiddenFileInput.module.css.js';
|
|
2
3
|
export function HiddenFileInput(props) {
|
|
4
|
+
const resetOnPick = createMemo(() => props.resetOnPick !== false);
|
|
3
5
|
let inputEl;
|
|
4
6
|
const handleChange = (e) => {
|
|
5
7
|
const files = e.currentTarget.files;
|
|
@@ -14,7 +16,7 @@ export function HiddenFileInput(props) {
|
|
|
14
16
|
void props.onFile(first);
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
|
-
if (
|
|
19
|
+
if (resetOnPick() && inputEl) {
|
|
18
20
|
inputEl.value = '';
|
|
19
21
|
}
|
|
20
22
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { splitProps } from 'solid-js';
|
|
1
|
+
import { Show, createSignal, createUniqueId, splitProps, } from 'solid-js';
|
|
2
2
|
import { nativeControlLabelledBy, useFormFieldAria } from './formFieldContext';
|
|
3
|
+
import { InputMessageView } from './InputMessage';
|
|
3
4
|
import styles from './Input.module.css.js';
|
|
4
5
|
export const Input = (props) => {
|
|
5
6
|
const [own, rest] = splitProps(props, [
|
|
@@ -7,10 +8,22 @@ export const Input = (props) => {
|
|
|
7
8
|
'mono',
|
|
8
9
|
'borderless',
|
|
9
10
|
'class',
|
|
11
|
+
'message',
|
|
12
|
+
'ref',
|
|
10
13
|
]);
|
|
14
|
+
const [inputEl, setInputEl] = createSignal();
|
|
15
|
+
const messageId = createUniqueId();
|
|
16
|
+
const message = () => own.message !== undefined && own.message.text !== '' ? own.message : undefined;
|
|
11
17
|
const fieldAria = useFormFieldAria();
|
|
12
|
-
const describedBy = () =>
|
|
13
|
-
|
|
18
|
+
const describedBy = () => {
|
|
19
|
+
const ids = [
|
|
20
|
+
rest['aria-describedby'] ?? fieldAria?.describedBy(),
|
|
21
|
+
message() !== undefined ? messageId : undefined,
|
|
22
|
+
].filter((id) => id !== undefined && id !== '');
|
|
23
|
+
return ids.length > 0 ? ids.join(' ') : undefined;
|
|
24
|
+
};
|
|
25
|
+
const ariaInvalid = () => rest['aria-invalid'] ??
|
|
26
|
+
(message()?.tone === 'error' || fieldAria?.hasError?.() ? 'true' : undefined);
|
|
14
27
|
const ariaRequired = () => rest['aria-required'] ?? (fieldAria?.required ? 'true' : undefined);
|
|
15
28
|
const sizeClass = () => {
|
|
16
29
|
if (own.size === 'sm')
|
|
@@ -28,8 +41,21 @@ export const Input = (props) => {
|
|
|
28
41
|
]
|
|
29
42
|
.filter(Boolean)
|
|
30
43
|
.join(' ');
|
|
31
|
-
return (
|
|
44
|
+
return (<>
|
|
45
|
+
<input class={className()} {...rest} ref={(element) => {
|
|
46
|
+
setInputEl(element);
|
|
47
|
+
const forwarded = own.ref;
|
|
48
|
+
if (typeof forwarded === 'function') {
|
|
49
|
+
forwarded(element);
|
|
50
|
+
}
|
|
51
|
+
}} aria-labelledby={nativeControlLabelledBy(fieldAria, {
|
|
32
52
|
ariaLabel: rest['aria-label'],
|
|
33
53
|
ariaLabelledBy: rest['aria-labelledby'],
|
|
34
|
-
})} aria-describedby={describedBy()} aria-invalid={ariaInvalid()} aria-required={ariaRequired()}/>
|
|
54
|
+
})} aria-describedby={describedBy()} aria-invalid={ariaInvalid()} aria-required={ariaRequired()} data-message-tone={message()?.tone}/>
|
|
55
|
+
<Show when={inputEl()}>
|
|
56
|
+
{(input) => (<Show when={message()}>
|
|
57
|
+
{(shown) => (<InputMessageView id={messageId} message={shown()} input={input()}/>)}
|
|
58
|
+
</Show>)}
|
|
59
|
+
</Show>
|
|
60
|
+
</>);
|
|
35
61
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Class map of src/forms/Input.module.css (library build; styles ship in style.css).
|
|
2
2
|
export default {
|
|
3
3
|
"input": "vk_input_eLMd0 vk_inputChrome_VIaGv",
|
|
4
|
+
"message": "vk_message_EfGru",
|
|
4
5
|
"sizeSm": "vk_sizeSm_xI-Y5",
|
|
5
6
|
"sizeLg": "vk_sizeLg_QXUwr",
|
|
6
7
|
"mono": "vk_mono_oJb--",
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Show, batch, createEffect, createMemo, createSignal, on, onCleanup, onMount, } from 'solid-js';
|
|
2
|
+
import { useKitHost } from '../host/kitHost';
|
|
3
|
+
import { OverlayPortal } from '../overlay/OverlayPortal';
|
|
4
|
+
import { AnchorAlignment, AnchorPosition, layout2d, } from '../overlay/anchoredLayout';
|
|
5
|
+
import { t } from '../i18n/i18n';
|
|
6
|
+
import styles from './Input.module.css.js';
|
|
7
|
+
const TONE_WORD = {
|
|
8
|
+
error: 'Error',
|
|
9
|
+
warning: 'Warning',
|
|
10
|
+
info: 'Info',
|
|
11
|
+
};
|
|
12
|
+
export function InputMessageView(props) {
|
|
13
|
+
const input = createMemo(() => props.input);
|
|
14
|
+
const { announcer } = useKitHost();
|
|
15
|
+
const [home, setHome] = createSignal();
|
|
16
|
+
const [focused, setFocused] = createSignal(false);
|
|
17
|
+
let messageEl;
|
|
18
|
+
const onFocus = () => {
|
|
19
|
+
batch(() => {
|
|
20
|
+
setHome(input().ownerDocument);
|
|
21
|
+
setFocused(true);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const onBlur = () => {
|
|
25
|
+
setFocused(false);
|
|
26
|
+
};
|
|
27
|
+
input().addEventListener('focus', onFocus);
|
|
28
|
+
input().addEventListener('blur', onBlur);
|
|
29
|
+
onCleanup(() => {
|
|
30
|
+
input().removeEventListener('focus', onFocus);
|
|
31
|
+
input().removeEventListener('blur', onBlur);
|
|
32
|
+
});
|
|
33
|
+
onMount(() => {
|
|
34
|
+
const doc = input().ownerDocument;
|
|
35
|
+
batch(() => {
|
|
36
|
+
setHome(doc);
|
|
37
|
+
setFocused(doc.activeElement === input());
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const tone = createMemo(() => props.message.tone);
|
|
41
|
+
const text = createMemo(() => props.message.text);
|
|
42
|
+
createEffect(on([tone, text], ([currentTone, currentText]) => {
|
|
43
|
+
if (!focused())
|
|
44
|
+
return;
|
|
45
|
+
announcer.announce(t('{severity}: {title}', {
|
|
46
|
+
severity: t(TONE_WORD[currentTone]),
|
|
47
|
+
title: currentText,
|
|
48
|
+
}), currentTone === 'error' ? 'assertive' : 'polite');
|
|
49
|
+
}));
|
|
50
|
+
const layout = () => {
|
|
51
|
+
const view = input().ownerDocument.defaultView;
|
|
52
|
+
if (!messageEl || !view)
|
|
53
|
+
return;
|
|
54
|
+
const anchor = input().getBoundingClientRect();
|
|
55
|
+
messageEl.style.width = `${anchor.width}px`;
|
|
56
|
+
const result = layout2d({ top: 0, left: 0, width: view.innerWidth, height: view.innerHeight }, { width: anchor.width, height: messageEl.offsetHeight }, { top: anchor.top, left: anchor.left, width: anchor.width, height: anchor.height }, { anchorAlignment: AnchorAlignment.RIGHT, anchorPosition: AnchorPosition.BELOW });
|
|
57
|
+
messageEl.style.top = `${result.top}px`;
|
|
58
|
+
messageEl.style.left = `${result.left}px`;
|
|
59
|
+
};
|
|
60
|
+
createEffect(() => {
|
|
61
|
+
const view = home()?.defaultView;
|
|
62
|
+
if (!focused() || !view)
|
|
63
|
+
return;
|
|
64
|
+
text();
|
|
65
|
+
layout();
|
|
66
|
+
const relayout = () => layout();
|
|
67
|
+
view.addEventListener('resize', relayout);
|
|
68
|
+
view.addEventListener('scroll', relayout, true);
|
|
69
|
+
const Observer = view.ResizeObserver;
|
|
70
|
+
const observer = Observer ? new Observer(relayout) : undefined;
|
|
71
|
+
observer?.observe(input());
|
|
72
|
+
if (messageEl)
|
|
73
|
+
observer?.observe(messageEl);
|
|
74
|
+
onCleanup(() => {
|
|
75
|
+
view.removeEventListener('resize', relayout);
|
|
76
|
+
view.removeEventListener('scroll', relayout, true);
|
|
77
|
+
observer?.disconnect();
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
return (<Show when={home()} keyed>
|
|
81
|
+
{(doc) => (<OverlayPortal type="floating" idPrefix="input-message" mount={doc.body} open={focused} element={() => messageEl}>
|
|
82
|
+
<div ref={messageEl} id={props.id} class={styles.message} data-tone={tone()} hidden={!focused()}>
|
|
83
|
+
{text()}
|
|
84
|
+
</div>
|
|
85
|
+
</OverlayPortal>)}
|
|
86
|
+
</Show>);
|
|
87
|
+
}
|
|
@@ -30,6 +30,7 @@ const normalizeOption = (opt) => typeof opt === 'string'
|
|
|
30
30
|
disabled: opt.disabled ?? false,
|
|
31
31
|
};
|
|
32
32
|
export function MultiSearchableSelect(props) {
|
|
33
|
+
const disabled = createMemo(() => Boolean(props.disabled));
|
|
33
34
|
const [open, setOpen] = createSignal(false);
|
|
34
35
|
const [search, setSearch] = createSignal('');
|
|
35
36
|
const [highlightedIndex, setHighlightedIndex] = createSignal(-1);
|
|
@@ -94,7 +95,7 @@ export function MultiSearchableSelect(props) {
|
|
|
94
95
|
});
|
|
95
96
|
};
|
|
96
97
|
const openDropdown = () => {
|
|
97
|
-
if (
|
|
98
|
+
if (disabled())
|
|
98
99
|
return;
|
|
99
100
|
props.onOpen?.();
|
|
100
101
|
setSearch('');
|
|
@@ -143,7 +144,7 @@ export function MultiSearchableSelect(props) {
|
|
|
143
144
|
const options = filteredOptions();
|
|
144
145
|
const index = highlightedIndex();
|
|
145
146
|
const opt = index >= 0 ? options[index] : undefined;
|
|
146
|
-
if (opt && !opt.disabled && !
|
|
147
|
+
if (opt && !opt.disabled && !disabled()) {
|
|
147
148
|
props.onToggle(opt.value);
|
|
148
149
|
}
|
|
149
150
|
};
|
|
@@ -193,7 +194,7 @@ export function MultiSearchableSelect(props) {
|
|
|
193
194
|
}
|
|
194
195
|
};
|
|
195
196
|
return (<>
|
|
196
|
-
<button ref={triggerRef} type="button" id={props.id} class={`${styles.trigger} ${TRIGGER_SIZE_CLASS[size()] ?? ''} ${open() ? styles.triggerOpen : ''} ${props.class ?? ''}`} disabled={
|
|
197
|
+
<button ref={triggerRef} type="button" id={props.id} class={`${styles.trigger} ${TRIGGER_SIZE_CLASS[size()] ?? ''} ${open() ? styles.triggerOpen : ''} ${props.class ?? ''}`} disabled={disabled()} aria-label={props.ariaLabel} aria-labelledby={props.ariaLabel === undefined
|
|
197
198
|
? (props.ariaLabelledBy ?? fieldAria?.labelId)
|
|
198
199
|
: undefined} aria-describedby={fieldAria?.describedBy()} aria-haspopup="listbox" aria-expanded={open()} onClick={toggleDropdown}>
|
|
199
200
|
<span class={`${styles.triggerText} ${selectedSet().size === 0 ? styles.triggerPlaceholder : ''}`}>
|
|
@@ -217,15 +218,15 @@ export function MultiSearchableSelect(props) {
|
|
|
217
218
|
<VpSearch class={styles.searchIcon} aria-hidden="true"/>
|
|
218
219
|
<input ref={searchInputRef} type="search" class={styles.searchInput} role="combobox" aria-controls={listboxId} aria-expanded={open()} aria-activedescendant={highlightedIndex() >= 0
|
|
219
220
|
? optionId(highlightedIndex())
|
|
220
|
-
: undefined} placeholder={props.searchPlaceholder ?? t('Search...')} value={search()} onInput={(e) => setSearch(e.currentTarget.value)} onKeyDown={handleDropdownKeyDown} disabled={
|
|
221
|
+
: undefined} placeholder={props.searchPlaceholder ?? t('Search...')} value={search()} onInput={(e) => setSearch(e.currentTarget.value)} onKeyDown={handleDropdownKeyDown} disabled={disabled()} aria-label={props.searchPlaceholder ?? t('Search...')}/>
|
|
221
222
|
</div>
|
|
222
223
|
|
|
223
224
|
<div class={styles.actionsRow}>
|
|
224
225
|
<div class={styles.actionButtons}>
|
|
225
|
-
<Button size="sm" variant="ghost" class={styles.actionBtn} onClick={handleSelectAll} disabled={
|
|
226
|
+
<Button size="sm" variant="ghost" class={styles.actionBtn} onClick={handleSelectAll} disabled={disabled() || filteredOptions().length === 0}>
|
|
226
227
|
{t('Select All')}
|
|
227
228
|
</Button>
|
|
228
|
-
<Button size="sm" variant="ghost" class={styles.actionBtn} onClick={handleClear} disabled={
|
|
229
|
+
<Button size="sm" variant="ghost" class={styles.actionBtn} onClick={handleClear} disabled={disabled() || selectedSet().size === 0}>
|
|
229
230
|
{t('Clear')}
|
|
230
231
|
</Button>
|
|
231
232
|
</div>
|
|
@@ -249,7 +250,7 @@ export function MultiSearchableSelect(props) {
|
|
|
249
250
|
const checked = () => isChecked(opt.value);
|
|
250
251
|
return (<button type="button" id={optionId(index())} ref={(el) => {
|
|
251
252
|
optionRefs[index()] = el ?? null;
|
|
252
|
-
}} role="option" aria-selected={checked() ? 'true' : 'false'} aria-label={opt.label} data-object-name={opt.value} disabled={opt.disabled ||
|
|
253
|
+
}} role="option" aria-selected={checked() ? 'true' : 'false'} aria-label={opt.label} data-object-name={opt.value} disabled={opt.disabled || disabled()} class={`${styles.option} ${checked() ? styles.optionActive : ''} ${index() === highlightedIndex() ? styles.optionHighlighted : ''}`} onClick={() => props.onToggle(opt.value)} onMouseEnter={() => setHighlightedIndex(index())}>
|
|
253
254
|
<span class={`${styles.checkbox} ${checked() ? styles.checkboxChecked : ''}`} aria-hidden="true">
|
|
254
255
|
<Show when={checked()}>
|
|
255
256
|
<VpCheck class={styles.checkIcon}/>
|