@protobase/ui 0.116.0 → 0.117.1
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/dist/account/messages.d.ts +2 -2
- package/dist/app/app.js +84 -50
- package/dist/app/bottom-bar-from-meta.d.ts +8 -2
- package/dist/app/bottom-bar-from-meta.js +23 -11
- package/dist/app/change-confirm/messages.d.ts +2 -2
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/comments/messages.d.ts +2 -2
- package/dist/app/confirm-sign-in-messages.d.ts +2 -2
- package/dist/app/create/messages.d.ts +2 -2
- package/dist/app/custom-section.d.ts +1 -1
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/list-cards.d.ts +1 -1
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/embedded-list/messages.d.ts +2 -2
- package/dist/app/export/export-dialog.js +1 -1
- package/dist/app/export/messages.d.ts +2 -2
- package/dist/app/field-messages.d.ts +2 -2
- package/dist/app/field-types/json/messages.d.ts +2 -2
- package/dist/app/field-types/runner-install/messages.d.ts +2 -2
- package/dist/app/field-types/widget-part.d.ts +1 -1
- package/dist/app/field-types/workflow/definition.d.ts +1 -1
- package/dist/app/field-types/workflow/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
- package/dist/app/file-viewers/messages.d.ts +2 -2
- package/dist/app/focus/messages.d.ts +2 -2
- package/dist/app/gallery/gallery-layout.d.ts +2 -2
- package/dist/app/gallery/lightbox.js +1 -1
- package/dist/app/gallery/messages.d.ts +2 -2
- package/dist/app/hand-order/messages.d.ts +2 -2
- package/dist/app/history/messages.d.ts +2 -2
- package/dist/app/import/import-dialog.js +1 -1
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/import/new-table/import-table-dialog.js +1 -1
- package/dist/app/list-edit/messages.d.ts +2 -2
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/list-page.js +1 -1
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/pages/action-inputs/action-inputs-dialog.js +1 -1
- package/dist/app/pages/custom-boundary.d.ts +1 -1
- package/dist/app/pages/custom-chosen.d.ts +1 -1
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/pages/record-actions.js +1 -1
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-mode/shown-layout.d.ts +1 -1
- package/dist/app/record-row/messages.d.ts +2 -2
- package/dist/app/refresh-mark.js +46 -10
- package/dist/app/related-cards/messages.d.ts +2 -2
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/saved/saved-list.d.ts +1 -1
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app/searches/update-search-dialog.js +1 -1
- package/dist/app-shell/account-entry.d.ts +17 -0
- package/dist/app-shell/account-entry.js +40 -0
- package/dist/app-shell/app-shell.d.ts +13 -1
- package/dist/app-shell/app-shell.js +80 -10
- package/dist/app-shell/back-target.d.ts +3 -2
- package/dist/app-shell/back-target.js +4 -3
- package/dist/app-shell/bottom-bar.d.ts +15 -3
- package/dist/app-shell/bottom-bar.js +70 -42
- package/dist/app-shell/brand-bar.d.ts +15 -0
- package/dist/app-shell/brand-bar.js +19 -0
- package/dist/app-shell/brand-status-bar.d.ts +8 -0
- package/dist/app-shell/brand-status-bar.js +27 -0
- package/dist/app-shell/breadcrumb.d.ts +4 -2
- package/dist/app-shell/breadcrumb.js +45 -37
- package/dist/app-shell/drawer.d.ts +2 -1
- package/dist/app-shell/drawer.js +22 -5
- package/dist/app-shell/global-search.d.ts +3 -1
- package/dist/app-shell/global-search.js +4 -4
- package/dist/app-shell/index.js +2 -2
- package/dist/app-shell/leading-slot.d.ts +9 -0
- package/dist/app-shell/leading-slot.js +10 -0
- package/dist/app-shell/logo.js +2 -1
- package/dist/app-shell/menu-page.d.ts +19 -0
- package/dist/app-shell/menu-page.js +29 -0
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/app-shell/more-page.d.ts +45 -0
- package/dist/app-shell/more-page.js +30 -0
- package/dist/app-shell/native-tab-bar.d.ts +47 -0
- package/dist/app-shell/native-tab-bar.js +45 -0
- package/dist/app-shell/page-scroll.d.ts +3 -2
- package/dist/app-shell/page-scroll.js +5 -3
- package/dist/app-shell/profile-menu.d.ts +5 -1
- package/dist/app-shell/profile-menu.js +138 -117
- package/dist/app-shell/sidebar.d.ts +12 -1
- package/dist/app-shell/sidebar.js +20 -10
- package/dist/app-shell/tab-icon.d.ts +7 -0
- package/dist/app-shell/tab-icon.js +38 -0
- package/dist/app-shell/top-bar.d.ts +19 -3
- package/dist/app-shell/top-bar.js +104 -60
- package/dist/app-shell/use-native-bottom-bar.d.ts +16 -0
- package/dist/app-shell/use-native-bottom-bar.js +62 -0
- package/dist/assistant-dock/messages.d.ts +2 -2
- package/dist/auth/messages.d.ts +2 -2
- package/dist/calls/call-guests-panel.js +2 -2
- package/dist/calls/messages.d.ts +2 -2
- package/dist/chat/messages.d.ts +2 -2
- package/dist/data-grid/header-menu.js +33 -28
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/data-grid/row-menu.js +38 -33
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/focus-page/bar-actions.js +1 -1
- package/dist/format/messages.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -4
- package/dist/invitations/messages.d.ts +2 -2
- package/dist/live/messages.d.ts +2 -2
- package/dist/locale/en.js +7 -0
- package/dist/locale/en.json.d.ts +7 -0
- package/dist/locale/messages.d.ts +14 -0
- package/dist/locale/nl.js +7 -0
- package/dist/locale/texts-gate.d.ts +21 -2
- package/dist/locale/texts-gate.js +33 -6
- package/dist/mailbox/messages.d.ts +2 -2
- package/dist/mentions/messages.d.ts +2 -2
- package/dist/mocks/orders.d.ts +1 -1
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/notifications/bell/notification-bell.js +40 -35
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/package.js +1 -1
- package/dist/plugins/before-sign-in.d.ts +1 -1
- package/dist/primitives/avatar.d.ts +1 -1
- package/dist/primitives/avatar.js +2 -1
- package/dist/primitives/drawer-math.d.ts +39 -0
- package/dist/primitives/drawer-math.js +43 -0
- package/dist/primitives/menu-select.js +51 -44
- package/dist/primitives/menu-surface.d.ts +22 -0
- package/dist/primitives/menu-surface.js +29 -0
- package/dist/primitives/messages.d.ts +2 -2
- package/dist/primitives/popover-menu.js +1 -0
- package/dist/primitives/sheet-drag.d.ts +5 -5
- package/dist/primitives/sheet-drag.js +10 -16
- package/dist/primitives/sheet.d.ts +5 -2
- package/dist/primitives/sheet.js +9 -6
- package/dist/primitives/use-drawer-drag.d.ts +34 -0
- package/dist/primitives/use-drawer-drag.js +103 -0
- package/dist/primitives/use-sheet-drag.d.ts +2 -2
- package/dist/primitives/use-sheet-drag.js +10 -9
- package/dist/record-view/action-menu.js +45 -40
- package/dist/record-view/messages.d.ts +2 -2
- package/dist/record-view/use-autosave.d.ts +1 -1
- package/dist/shell/assets/{account-page-9Aq9kvrG.js → account-page-DtK7jKts.js} +2 -2
- package/dist/shell/assets/app-BAQxWF5r.css +2 -0
- package/dist/shell/assets/app-BjX4WRlX.js +34 -0
- package/dist/shell/assets/{assistant-shell-BGtjYwwY.js → assistant-shell-m4yudVE_.js} +2 -2
- package/dist/shell/assets/board-display-DTeV61do.js +2 -0
- package/dist/shell/assets/{calendar-display-DKXi1P_o.js → calendar-display-C9M_BrdC.js} +2 -2
- package/dist/shell/assets/call-rings-TD7_HvNB.js +2 -0
- package/dist/shell/assets/{calls-DR-Ci2ND.js → calls-Bp_BwXBR.js} +2 -2
- package/dist/shell/assets/{circle-alert-C0Jeesr7.js → circle-alert-Z5jvi5Dk.js} +2 -2
- package/dist/shell/assets/composed-page-7cjr_6Rj.js +2 -0
- package/dist/shell/assets/{composer-section-rLoyhseD.js → composer-section-BOic27ni.js} +2 -2
- package/dist/shell/assets/{connect-route-B9xNNieq.js → connect-route-BQKWurfi.js} +2 -2
- package/dist/shell/assets/{copy-field-DkCyHPwg.js → copy-field-J-xjCVww.js} +2 -2
- package/dist/shell/assets/create-route-cKTgbHdL.js +2 -0
- package/dist/shell/assets/{custom-step-container-field-Do5pWJ_q.js → custom-step-container-field-ClXbgsmG.js} +4 -4
- package/dist/shell/assets/embedded-list-CdGDYOeK.js +3 -0
- package/dist/shell/assets/en-CtEQkQWj.js +2 -0
- package/dist/shell/assets/{export-dialog-CovrAwYy.js → export-dialog-DJFPmWjl.js} +2 -2
- package/dist/shell/assets/export-worker-DlWkifnE.js +15 -0
- package/dist/shell/assets/{graph-view-BfRhAOfb.js → graph-view-DdCNEjjp.js} +2 -2
- package/dist/shell/assets/{group-donut-DC8GLnC8.js → group-donut-YHImqCyt.js} +2 -2
- package/dist/shell/assets/{guest-call-page-Dc8M5yz6.js → guest-call-page-DuJmX_uH.js} +3 -3
- package/dist/shell/assets/{html-viewer-DH_s-gLB.js → html-viewer-BXSFoAH-.js} +2 -2
- package/dist/shell/assets/{import-dialog-Ge24RdwQ.js → import-dialog-D1pihaEn.js} +2 -2
- package/dist/shell/assets/import-table-dialog-Dd851s8K.js +2 -0
- package/dist/shell/assets/{index-Bi_Jks-d.js → index-B5AApF7s.js} +1 -1
- package/dist/shell/assets/invitations-page-CVnZFr42.js +2 -0
- package/dist/shell/assets/{layout-grid-DCBxzjaE.js → layout-grid-B4BydwOr.js} +2 -2
- package/dist/shell/assets/{legend-item-BZXnHPzh.js → legend-item-DStfKS-y.js} +2 -2
- package/dist/shell/assets/{lib-vis.gl-react-maplibre-CdxVSk--.js → lib-vis.gl-react-maplibre-1cv426UN.js} +2 -2
- package/dist/shell/assets/list-page-HyJhabYe.js +4 -0
- package/dist/shell/assets/maplibre-v43v0z7e.js +2 -0
- package/dist/shell/assets/{markdown-content-DMl-cVjQ.js → markdown-content-R7RUN0DQ.js} +2 -2
- package/dist/shell/assets/members-page-BIWsatyd.js +2 -0
- package/dist/shell/assets/{messages-D5XhIbDz.js → messages-CPMEQgWR.js} +2 -2
- package/dist/shell/assets/nl-9OWL4NdF.js +2 -0
- package/dist/shell/assets/organization-page-DY5ndg2R.js +2 -0
- package/dist/shell/assets/organizations-page-6HwVXvoa.js +2 -0
- package/dist/shell/assets/parse-worker-NutG5-Js.js +35 -0
- package/dist/shell/assets/{pending-invitation-row-BIO4J3ts.js → pending-invitation-row-Cy5mVb52.js} +2 -2
- package/dist/shell/assets/{period-chart-CoT2IDzy.js → period-chart-dl5O03oa.js} +2 -2
- package/dist/shell/assets/{person-row-DBeHOA2K.js → person-row-CC1Anzap.js} +2 -2
- package/dist/shell/assets/public-form-page-DdR2id-n.js +2 -0
- package/dist/shell/assets/record-lines-D4ajVvtc.js +2 -0
- package/dist/shell/assets/{record-map-BR34Q9uI.js → record-map-IJBljngZ.js} +2 -2
- package/dist/shell/assets/{record-opens-Dbjd4FLe.js → record-opens-Dth-MEBS.js} +2 -2
- package/dist/shell/assets/record-page-DZUqVmk0.js +3 -0
- package/dist/shell/assets/record-preview-wMoagd6i.js +2 -0
- package/dist/shell/assets/{records-map-CXanq-qN.js → records-map-BbgGOE7w.js} +2 -2
- package/dist/shell/assets/render-node-h9cWEbE-.js +3 -0
- package/dist/shell/assets/reorder-button-gdDrG56h.js +2 -0
- package/dist/shell/assets/{run-trace-view-D1DZCrDs.js → run-trace-view-DqRcTHlR.js} +2 -2
- package/dist/shell/assets/{runner-install-field-C2XhrG0M.js → runner-install-field-BhcDC4pg.js} +2 -2
- package/dist/shell/assets/{runtime-update-C5TxLpYf.js → runtime-update-BazQF8nl.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-Dd-bY2Qa.js +1 -0
- package/dist/shell/assets/sheet-source-CA05AnuE.js +3 -0
- package/dist/shell/assets/sign-in-policy-page-7hl0azIr.js +2 -0
- package/dist/shell/assets/start-block-queries-BVzV-uV2.js +2 -0
- package/dist/shell/assets/step-catalog-DGutomuv.js +2 -0
- package/dist/shell/assets/{step-panel-TfW-31Gv.js → step-panel-BuIiRC-g.js} +2 -2
- package/dist/shell/assets/timeline-display-DdkySfMr.js +2 -0
- package/dist/shell/assets/{trash-BjnGkZfx.js → trash-IReijQWL.js} +2 -2
- package/dist/shell/assets/{update-set-BahNKmxv.js → update-set-Ijp4W4Df.js} +2 -2
- package/dist/shell/assets/use-calendar-move-D07CQGsB.js +2 -0
- package/dist/shell/assets/{use-display-rows-DsBBYuKB.js → use-display-rows-BowlA8tv.js} +2 -2
- package/dist/shell/assets/{use-paged-search-DaT4uUhX.js → use-paged-search-BPiYdk9e.js} +2 -2
- package/dist/shell/assets/{use-run-trace-DHk7l8MX.js → use-run-trace-CctJj-s_.js} +2 -2
- package/dist/shell/assets/{use-workflow-page-DPIhXcnb.js → use-workflow-page-G3NuEfi0.js} +2 -2
- package/dist/shell/assets/{use-workflow-types-Bp8iqkBg.js → use-workflow-types-BWS5utgc.js} +2 -2
- package/dist/shell/assets/{vendor-DQHyyBk1.js → vendor-t7Q7QbPu.js} +2 -2
- package/dist/shell/assets/{workflow-canvas-CiGUTx4K.js → workflow-canvas-BHHRCAvI.js} +4 -4
- package/dist/shell/assets/{workflow-field-lqBx3RDj.js → workflow-field-B1MbuDxB.js} +3 -3
- package/dist/shell/assets/{workflow-graph-editor-DgufTFii.js → workflow-graph-editor-C-soTaTw.js} +2 -2
- package/dist/shell/assets/{workflow-run-field-C4BtvPnB.js → workflow-run-field-CuLkIloc.js} +3 -3
- package/dist/shell/assets/workflow-status-field-Co0qx9xC.js +2 -0
- package/dist/shell/assets/workflow-workbench-CSnD-k-9.js +4 -0
- package/dist/shell/index.html +5 -5
- package/dist/shell/protobase.shell.json +3 -3
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/{account-page-9Aq9kvrG.js.map → account-page-DtK7jKts.js.map} +1 -1
- package/dist/shell-source-maps/assets/app-BjX4WRlX.js.map +1 -0
- package/dist/shell-source-maps/assets/{assistant-shell-BGtjYwwY.js.map → assistant-shell-m4yudVE_.js.map} +1 -1
- package/dist/shell-source-maps/assets/{board-display-Ck6nnv4b.js.map → board-display-DTeV61do.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calendar-display-DKXi1P_o.js.map → calendar-display-C9M_BrdC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{call-rings-Bs9dtURX.js.map → call-rings-TD7_HvNB.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calls-DR-Ci2ND.js.map → calls-Bp_BwXBR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{circle-alert-C0Jeesr7.js.map → circle-alert-Z5jvi5Dk.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composed-page-Bdzzzuyj.js.map → composed-page-7cjr_6Rj.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composer-section-rLoyhseD.js.map → composer-section-BOic27ni.js.map} +1 -1
- package/dist/shell-source-maps/assets/{connect-route-B9xNNieq.js.map → connect-route-BQKWurfi.js.map} +1 -1
- package/dist/shell-source-maps/assets/{copy-field-DkCyHPwg.js.map → copy-field-J-xjCVww.js.map} +1 -1
- package/dist/shell-source-maps/assets/{create-route-DBrv5Kqi.js.map → create-route-cKTgbHdL.js.map} +1 -1
- package/dist/shell-source-maps/assets/{custom-step-container-field-Do5pWJ_q.js.map → custom-step-container-field-ClXbgsmG.js.map} +1 -1
- package/dist/shell-source-maps/assets/embedded-list-CdGDYOeK.js.map +1 -0
- package/dist/shell-source-maps/assets/en-CtEQkQWj.js.map +1 -0
- package/dist/shell-source-maps/assets/{export-dialog-CovrAwYy.js.map → export-dialog-DJFPmWjl.js.map} +1 -1
- package/dist/shell-source-maps/assets/export-worker-DlWkifnE.js.map +1 -0
- package/dist/shell-source-maps/assets/{graph-view-BfRhAOfb.js.map → graph-view-DdCNEjjp.js.map} +1 -1
- package/dist/shell-source-maps/assets/{group-donut-DC8GLnC8.js.map → group-donut-YHImqCyt.js.map} +1 -1
- package/dist/shell-source-maps/assets/{guest-call-page-Dc8M5yz6.js.map → guest-call-page-DuJmX_uH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-DH_s-gLB.js.map → html-viewer-BXSFoAH-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-dialog-Ge24RdwQ.js.map → import-dialog-D1pihaEn.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-table-dialog-D1aVXF3R.js.map → import-table-dialog-Dd851s8K.js.map} +1 -1
- package/dist/shell-source-maps/assets/{invitations-page-CFwYUoqb.js.map → invitations-page-CVnZFr42.js.map} +1 -1
- package/dist/shell-source-maps/assets/{layout-grid-DCBxzjaE.js.map → layout-grid-B4BydwOr.js.map} +1 -1
- package/dist/shell-source-maps/assets/{legend-item-BZXnHPzh.js.map → legend-item-DStfKS-y.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-vis.gl-react-maplibre-CdxVSk--.js.map → lib-vis.gl-react-maplibre-1cv426UN.js.map} +1 -1
- package/dist/shell-source-maps/assets/{list-page-DwIEEzTz.js.map → list-page-HyJhabYe.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-C7kZagL3.js.map → maplibre-v43v0z7e.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-DMl-cVjQ.js.map → markdown-content-R7RUN0DQ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{members-page-BfrzLCXo.js.map → members-page-BIWsatyd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{messages-D5XhIbDz.js.map → messages-CPMEQgWR.js.map} +1 -1
- package/dist/shell-source-maps/assets/nl-9OWL4NdF.js.map +1 -0
- package/dist/shell-source-maps/assets/{organization-page-DxA2154P.js.map → organization-page-DY5ndg2R.js.map} +1 -1
- package/dist/shell-source-maps/assets/{organizations-page-Bf4oXbvZ.js.map → organizations-page-6HwVXvoa.js.map} +1 -1
- package/dist/shell-source-maps/assets/parse-worker-NutG5-Js.js.map +1 -0
- package/dist/shell-source-maps/assets/{pending-invitation-row-BIO4J3ts.js.map → pending-invitation-row-Cy5mVb52.js.map} +1 -1
- package/dist/shell-source-maps/assets/{period-chart-CoT2IDzy.js.map → period-chart-dl5O03oa.js.map} +1 -1
- package/dist/shell-source-maps/assets/{person-row-DBeHOA2K.js.map → person-row-CC1Anzap.js.map} +1 -1
- package/dist/shell-source-maps/assets/{public-form-page-Dhinql3j.js.map → public-form-page-DdR2id-n.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-lines-Dmb8bl38.js.map → record-lines-D4ajVvtc.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-BR34Q9uI.js.map → record-map-IJBljngZ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-opens-Dbjd4FLe.js.map → record-opens-Dth-MEBS.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-page-Dnpo_8uE.js.map → record-page-DZUqVmk0.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-preview-CarOT-Gn.js.map → record-preview-wMoagd6i.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-CXanq-qN.js.map → records-map-BbgGOE7w.js.map} +1 -1
- package/dist/shell-source-maps/assets/{render-node-DGYXKoGV.js.map → render-node-h9cWEbE-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{reorder-button-9_dAk_3O.js.map → reorder-button-gdDrG56h.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-D1DZCrDs.js.map → run-trace-view-DqRcTHlR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runner-install-field-C2XhrG0M.js.map → runner-install-field-BhcDC4pg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runtime-update-C5TxLpYf.js.map → runtime-update-BazQF8nl.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sheet-source-DqFYbJpm.js.map → sheet-source-CA05AnuE.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sign-in-policy-page-vjGTg9Do.js.map → sign-in-policy-page-7hl0azIr.js.map} +1 -1
- package/dist/shell-source-maps/assets/{start-block-queries-CmVDv8_F.js.map → start-block-queries-BVzV-uV2.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-catalog-PWiIgJSI.js.map → step-catalog-DGutomuv.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-TfW-31Gv.js.map → step-panel-BuIiRC-g.js.map} +1 -1
- package/dist/shell-source-maps/assets/{timeline-display-eBf3tuig.js.map → timeline-display-DdkySfMr.js.map} +1 -1
- package/dist/shell-source-maps/assets/{trash-BjnGkZfx.js.map → trash-IReijQWL.js.map} +1 -1
- package/dist/shell-source-maps/assets/{update-set-BahNKmxv.js.map → update-set-Ijp4W4Df.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-calendar-move-Bfp2yC0P.js.map → use-calendar-move-D07CQGsB.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-display-rows-DsBBYuKB.js.map → use-display-rows-BowlA8tv.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-paged-search-DaT4uUhX.js.map → use-paged-search-BPiYdk9e.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-run-trace-DHk7l8MX.js.map → use-run-trace-CctJj-s_.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-page-DPIhXcnb.js.map → use-workflow-page-G3NuEfi0.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-types-Bp8iqkBg.js.map → use-workflow-types-BWS5utgc.js.map} +1 -1
- package/dist/shell-source-maps/assets/{vendor-DQHyyBk1.js.map → vendor-t7Q7QbPu.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-CiGUTx4K.js.map → workflow-canvas-BHHRCAvI.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-field-lqBx3RDj.js.map → workflow-field-B1MbuDxB.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-DgufTFii.js.map → workflow-graph-editor-C-soTaTw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-run-field-C4BtvPnB.js.map → workflow-run-field-CuLkIloc.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-status-field-CqDaP0V9.js.map → workflow-status-field-Co0qx9xC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-workbench-CgL6wHPG.js.map → workflow-workbench-CSnD-k-9.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/status/status-dialog.js +1 -1
- package/dist/theme.css +6 -0
- package/dist/users/messages.d.ts +2 -2
- package/package.json +5 -5
- package/dist/shell/assets/app-BnDutf0s.js +0 -34
- package/dist/shell/assets/app-DcrDZ6Fc.css +0 -2
- package/dist/shell/assets/board-display-Ck6nnv4b.js +0 -2
- package/dist/shell/assets/call-rings-Bs9dtURX.js +0 -2
- package/dist/shell/assets/composed-page-Bdzzzuyj.js +0 -2
- package/dist/shell/assets/create-route-DBrv5Kqi.js +0 -2
- package/dist/shell/assets/embedded-list-CPgxhzPw.js +0 -3
- package/dist/shell/assets/en-B0Sx6LpA.js +0 -2
- package/dist/shell/assets/export-worker-DnXy8F95.js +0 -15
- package/dist/shell/assets/import-table-dialog-D1aVXF3R.js +0 -2
- package/dist/shell/assets/invitations-page-CFwYUoqb.js +0 -2
- package/dist/shell/assets/list-page-DwIEEzTz.js +0 -4
- package/dist/shell/assets/maplibre-C7kZagL3.js +0 -2
- package/dist/shell/assets/members-page-BfrzLCXo.js +0 -2
- package/dist/shell/assets/nl-DD4sTnQJ.js +0 -2
- package/dist/shell/assets/organization-page-DxA2154P.js +0 -2
- package/dist/shell/assets/organizations-page-Bf4oXbvZ.js +0 -2
- package/dist/shell/assets/parse-worker-BYXW4dAv.js +0 -35
- package/dist/shell/assets/public-form-page-Dhinql3j.js +0 -2
- package/dist/shell/assets/record-lines-Dmb8bl38.js +0 -2
- package/dist/shell/assets/record-page-Dnpo_8uE.js +0 -3
- package/dist/shell/assets/record-preview-CarOT-Gn.js +0 -2
- package/dist/shell/assets/render-node-DGYXKoGV.js +0 -3
- package/dist/shell/assets/reorder-button-9_dAk_3O.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-HnfzBwws.js +0 -1
- package/dist/shell/assets/sheet-source-DqFYbJpm.js +0 -3
- package/dist/shell/assets/sign-in-policy-page-vjGTg9Do.js +0 -2
- package/dist/shell/assets/start-block-queries-CmVDv8_F.js +0 -2
- package/dist/shell/assets/step-catalog-PWiIgJSI.js +0 -2
- package/dist/shell/assets/timeline-display-eBf3tuig.js +0 -2
- package/dist/shell/assets/use-calendar-move-Bfp2yC0P.js +0 -2
- package/dist/shell/assets/workflow-status-field-CqDaP0V9.js +0 -2
- package/dist/shell/assets/workflow-workbench-CgL6wHPG.js +0 -4
- package/dist/shell-source-maps/assets/app-BnDutf0s.js.map +0 -1
- package/dist/shell-source-maps/assets/embedded-list-CPgxhzPw.js.map +0 -1
- package/dist/shell-source-maps/assets/en-B0Sx6LpA.js.map +0 -1
- package/dist/shell-source-maps/assets/export-worker-DnXy8F95.js.map +0 -1
- package/dist/shell-source-maps/assets/nl-DD4sTnQJ.js.map +0 -1
- package/dist/shell-source-maps/assets/parse-worker-BYXW4dAv.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
2
|
import { RouteLink } from "./route-link.js";
|
|
3
3
|
import { useMenuRight, useMenuTop } from "./menu-edge.js";
|
|
4
|
+
import { MenuSurface } from "./menu-surface.js";
|
|
4
5
|
import { menuKeyTarget } from "./menu-keys.js";
|
|
5
6
|
import { useEffect, useRef, useState } from "react";
|
|
6
7
|
import { Check, ChevronDown } from "lucide-react";
|
|
@@ -24,7 +25,7 @@ const MenuSelect = ({ value, options, onChange, link, label }) => {
|
|
|
24
25
|
if (!open) return;
|
|
25
26
|
items.current[Math.max(chosen, 0)]?.focus();
|
|
26
27
|
const close = (event) => {
|
|
27
|
-
if (event.target instanceof Node && !root.current?.contains(event.target)) setOpen(false);
|
|
28
|
+
if (event.target instanceof Node && !root.current?.contains(event.target) && !menu.current?.contains(event.target)) setOpen(false);
|
|
28
29
|
};
|
|
29
30
|
document.addEventListener("pointerdown", close);
|
|
30
31
|
return () => document.removeEventListener("pointerdown", close);
|
|
@@ -57,50 +58,56 @@ const MenuSelect = ({ value, options, onChange, link, label }) => {
|
|
|
57
58
|
current?.label ?? label,
|
|
58
59
|
/* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5 text-muted-foreground" })
|
|
59
60
|
]
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
80
|
-
option.icon ? /* @__PURE__ */ jsx(option.icon, { className: "size-3.5" }) : /* @__PURE__ */ jsx("span", { className: "size-3.5" }),
|
|
81
|
-
/* @__PURE__ */ jsx("span", {
|
|
82
|
-
className: "flex-1",
|
|
83
|
-
children: option.label
|
|
84
|
-
}),
|
|
85
|
-
option.value === value && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary-text" })
|
|
86
|
-
] });
|
|
87
|
-
return /* @__PURE__ */ jsx("li", {
|
|
88
|
-
role: "none",
|
|
89
|
-
children: link ? /* @__PURE__ */ jsx(RouteLink, {
|
|
90
|
-
...item,
|
|
91
|
-
to: link(option.value),
|
|
92
|
-
onClick: closeToTrigger,
|
|
93
|
-
children: content
|
|
94
|
-
}) : /* @__PURE__ */ jsx("button", {
|
|
95
|
-
...item,
|
|
96
|
-
type: "button",
|
|
97
|
-
onClick: () => {
|
|
98
|
-
closeToTrigger();
|
|
99
|
-
if (option.value !== value) onChange(option.value);
|
|
61
|
+
}), /* @__PURE__ */ jsx(MenuSurface, {
|
|
62
|
+
open,
|
|
63
|
+
title: label,
|
|
64
|
+
onClose: () => setOpen(false),
|
|
65
|
+
inPlaceOnDesktop: true,
|
|
66
|
+
menu: /* @__PURE__ */ jsx("ul", {
|
|
67
|
+
ref: menu,
|
|
68
|
+
role: "menu",
|
|
69
|
+
"aria-label": label,
|
|
70
|
+
onKeyDown,
|
|
71
|
+
style: {
|
|
72
|
+
...right,
|
|
73
|
+
...top
|
|
74
|
+
},
|
|
75
|
+
className: "absolute right-0 top-full z-30 mt-1 w-max min-w-40 rounded-md border bg-background py-1 text-body shadow-pop",
|
|
76
|
+
children: options.map((option, index) => {
|
|
77
|
+
const item = {
|
|
78
|
+
ref: (element) => {
|
|
79
|
+
items.current[index] = element;
|
|
100
80
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
81
|
+
role: "menuitemradio",
|
|
82
|
+
"aria-checked": option.value === value,
|
|
83
|
+
className: cn("flex min-h-9 w-full items-center gap-2 px-3 py-1.5 text-left hover:bg-muted focus:bg-muted focus:outline-none pointer-coarse:min-h-11", option.value === value && "font-medium")
|
|
84
|
+
};
|
|
85
|
+
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
86
|
+
option.icon ? /* @__PURE__ */ jsx(option.icon, { className: "size-3.5" }) : /* @__PURE__ */ jsx("span", { className: "size-3.5" }),
|
|
87
|
+
/* @__PURE__ */ jsx("span", {
|
|
88
|
+
className: "flex-1",
|
|
89
|
+
children: option.label
|
|
90
|
+
}),
|
|
91
|
+
option.value === value && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary-text" })
|
|
92
|
+
] });
|
|
93
|
+
return /* @__PURE__ */ jsx("li", {
|
|
94
|
+
role: "none",
|
|
95
|
+
children: link ? /* @__PURE__ */ jsx(RouteLink, {
|
|
96
|
+
...item,
|
|
97
|
+
to: link(option.value),
|
|
98
|
+
onClick: closeToTrigger,
|
|
99
|
+
children: content
|
|
100
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
101
|
+
...item,
|
|
102
|
+
type: "button",
|
|
103
|
+
onClick: () => {
|
|
104
|
+
closeToTrigger();
|
|
105
|
+
if (option.value !== value) onChange(option.value);
|
|
106
|
+
},
|
|
107
|
+
children: content
|
|
108
|
+
})
|
|
109
|
+
}, option.value);
|
|
110
|
+
})
|
|
104
111
|
})
|
|
105
112
|
})]
|
|
106
113
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
//#region src/primitives/menu-surface.d.ts
|
|
3
|
+
export type MenuSurfaceProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** What the sheet is titled on a phone, as the menu's label. */
|
|
6
|
+
title: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** The menu as it is drawn on a desktop, positioned beside its button: its element keeps its ref, role and handlers. */
|
|
9
|
+
menu: ReactElement<{
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: object;
|
|
12
|
+
}>;
|
|
13
|
+
/** On a desktop, drawn where it stands, for a menu positioned against its own wrapper rather than the viewport. */
|
|
14
|
+
inPlaceOnDesktop?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Where every menu, popover and select list is presented, so they all look and behave alike: on a phone in the sheet
|
|
18
|
+
* that rises from the bottom, on a desktop beside its button. Either way it is drawn at the document's root, with the
|
|
19
|
+
* page's colours, whatever it opens from, such as a brand-coloured bar.
|
|
20
|
+
*/
|
|
21
|
+
export declare const MenuSurface: ({ open, title, onClose, menu, inPlaceOnDesktop }: MenuSurfaceProps) => import("react").JSX.Element | null;
|
|
22
|
+
//#endregion
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useIsDesktop } from "../lib/use-media-query.js";
|
|
2
|
+
import { Sheet } from "./sheet.js";
|
|
3
|
+
import { cloneElement } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { createPortal } from "react-dom";
|
|
6
|
+
//#region src/primitives/menu-surface.tsx
|
|
7
|
+
const sheetMenu = "py-1 text-menu-sheet [&>*]:min-h-12 [&_[role=menuitem]]:min-h-12 [&_svg]:size-5 [&_[role=group]_button]:min-h-10 [&_[role=group]_button]:min-w-10 [&_[role=group]_button]:justify-center";
|
|
8
|
+
/**
|
|
9
|
+
* Where every menu, popover and select list is presented, so they all look and behave alike: on a phone in the sheet
|
|
10
|
+
* that rises from the bottom, on a desktop beside its button. Either way it is drawn at the document's root, with the
|
|
11
|
+
* page's colours, whatever it opens from, such as a brand-coloured bar.
|
|
12
|
+
*/
|
|
13
|
+
const MenuSurface = ({ open, title, onClose, menu, inPlaceOnDesktop }) => {
|
|
14
|
+
const desktop = useIsDesktop();
|
|
15
|
+
if (!open) return null;
|
|
16
|
+
if (desktop) return inPlaceOnDesktop ? menu : createPortal(menu, document.body);
|
|
17
|
+
return /* @__PURE__ */ jsx(Sheet, {
|
|
18
|
+
title,
|
|
19
|
+
open: true,
|
|
20
|
+
onClose,
|
|
21
|
+
inset: "none",
|
|
22
|
+
children: cloneElement(menu, {
|
|
23
|
+
className: sheetMenu,
|
|
24
|
+
style: void 0
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { MenuSurface };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../locale/messages.js";
|
|
2
2
|
//#region src/primitives/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "loading" | "remove" | "
|
|
5
|
-
rich(id: "loading" | "remove" | "
|
|
4
|
+
(id: "loading" | "remove" | "close" | "next" | "previous" | "dragToClose", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "loading" | "remove" | "close" | "next" | "previous" | "dragToClose", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -44,6 +44,7 @@ const usePopoverMenu = () => {
|
|
|
44
44
|
if (event instanceof KeyboardEvent ? event.key === "Escape" : !inside(event.target)) setOpen(false);
|
|
45
45
|
};
|
|
46
46
|
const dismiss = (event) => {
|
|
47
|
+
if (menu.current?.closest("[aria-modal=\"true\"]")) return;
|
|
47
48
|
if (!inside(event.target)) setOpen(false);
|
|
48
49
|
};
|
|
49
50
|
document.addEventListener("mousedown", close);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/primitives/sheet-drag.d.ts
|
|
2
|
-
/** How far a finger moves before a press on the sheet counts as a drag, in pixels. */
|
|
3
|
-
export declare const dragSlop =
|
|
4
|
-
/** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives a
|
|
2
|
+
/** How far a finger moves before a press on the sheet counts as a drag, in pixels: the drawers' own (`drawer-math`). */
|
|
3
|
+
export declare const dragSlop = 10;
|
|
4
|
+
/** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives as a rubber band. */
|
|
5
5
|
export declare const sheetOffset: (dy: number) => number;
|
|
6
6
|
export type DragSample = {
|
|
7
7
|
y: number;
|
|
@@ -10,8 +10,8 @@ export type DragSample = {
|
|
|
10
10
|
/** The finger's speed downwards over the last stretch of a drag, in pixels per millisecond; negative is upwards. */
|
|
11
11
|
export declare const releaseVelocity: (samples: DragSample[]) => number;
|
|
12
12
|
/**
|
|
13
|
-
* Whether a sheet let go `offset` pixels below where it rests, moving at `velocity
|
|
14
|
-
*
|
|
13
|
+
* Whether a sheet let go `offset` pixels below where it rests, moving at `velocity` pixels a millisecond downwards,
|
|
14
|
+
* closes, by the drawers' rule (`endsOpen`): a fast release heads its way, a slow one closes past half its height.
|
|
15
15
|
*/
|
|
16
16
|
export declare const closesOnRelease: (offset: number, height: number, velocity: number) => boolean;
|
|
17
17
|
/**
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
+
import { endsOpen, rubberBand, withinAngle } from "./drawer-math.js";
|
|
1
2
|
//#region src/primitives/sheet-drag.ts
|
|
2
|
-
/** How far a finger moves before a press on the sheet counts as a drag, in pixels. */
|
|
3
|
-
const dragSlop =
|
|
4
|
-
/** How far up the sheet gives when dragged above where it rests, in pixels: it stops there, as if held by a spring. */
|
|
5
|
-
const maxLift = 24;
|
|
6
|
-
/** The share of its height a sheet must be dragged down to close when let go slowly. */
|
|
7
|
-
const closeShare = .3;
|
|
8
|
-
/** How fast a downward fling closes the sheet from wherever it is let go, in pixels per millisecond. */
|
|
9
|
-
const flingSpeed = .5;
|
|
3
|
+
/** How far a finger moves before a press on the sheet counts as a drag, in pixels: the drawers' own (`drawer-math`). */
|
|
4
|
+
const dragSlop = 10;
|
|
10
5
|
/** How far back release speed is read, in milliseconds: the last stretch of the drag, not its whole. */
|
|
11
6
|
const velocityWindow = 100;
|
|
12
|
-
/** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives a
|
|
13
|
-
const sheetOffset = (dy) => dy >= 0 ? dy : -
|
|
7
|
+
/** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives as a rubber band. */
|
|
8
|
+
const sheetOffset = (dy) => dy >= 0 ? dy : -rubberBand(-dy);
|
|
14
9
|
/** The finger's speed downwards over the last stretch of a drag, in pixels per millisecond; negative is upwards. */
|
|
15
10
|
const releaseVelocity = (samples) => {
|
|
16
11
|
const last = samples.at(-1);
|
|
@@ -20,18 +15,17 @@ const releaseVelocity = (samples) => {
|
|
|
20
15
|
return elapsed > 0 ? (last.y - first.y) / elapsed : 0;
|
|
21
16
|
};
|
|
22
17
|
/**
|
|
23
|
-
* Whether a sheet let go `offset` pixels below where it rests, moving at `velocity
|
|
24
|
-
*
|
|
18
|
+
* Whether a sheet let go `offset` pixels below where it rests, moving at `velocity` pixels a millisecond downwards,
|
|
19
|
+
* closes, by the drawers' rule (`endsOpen`): a fast release heads its way, a slow one closes past half its height.
|
|
25
20
|
*/
|
|
26
21
|
const closesOnRelease = (offset, height, velocity) => {
|
|
27
|
-
if (offset <=
|
|
28
|
-
|
|
29
|
-
return offset >= height * closeShare && velocity > -.5 / 2;
|
|
22
|
+
if (offset <= dragSlop) return false;
|
|
23
|
+
return !endsOpen(1 - offset / Math.max(1, height), -velocity * 1e3);
|
|
30
24
|
};
|
|
31
25
|
/**
|
|
32
26
|
* Whether a finger moving `dx`, `dy` in the sheet's scrolling content drags the sheet instead of scrolling: only down,
|
|
33
27
|
* mostly down, and with the content scrolled to its top, so a scroll reaching the top hands over to the drag.
|
|
34
28
|
*/
|
|
35
|
-
const dragsInsteadOfScroll = (scrollTop, dx, dy) => scrollTop <= 0 && dy > 0 && dy
|
|
29
|
+
const dragsInsteadOfScroll = (scrollTop, dx, dy) => scrollTop <= 0 && dy > 0 && withinAngle(dy, dx, .58);
|
|
36
30
|
//#endregion
|
|
37
31
|
export { closesOnRelease, dragSlop, dragsInsteadOfScroll, releaseVelocity, sheetOffset };
|
|
@@ -5,13 +5,16 @@ export type SheetProps = {
|
|
|
5
5
|
open: boolean;
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
children: ReactNode;
|
|
8
|
+
/** The content's side padding: the sheet's own, or `none` for content that has its own, such as a menu's items. */
|
|
9
|
+
inset?: 'sides' | 'none';
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* A panel that rises from the bottom of the screen, for the filter panel and `ResponsiveDialog` on mobile screens. It
|
|
11
13
|
* moves under the finger as a native sheet does (`useSheetDrag`): dragged down by its header or handle, or by its
|
|
12
14
|
* content once that is scrolled to its top, it closes or springs back by how far and how fast it went. It also closes
|
|
13
15
|
* on Escape, the close button, the handle and a press above it. Its content scrolls inside it when taller than the
|
|
14
|
-
* panel, which stops short of the top so the screen behind stays in sight.
|
|
16
|
+
* panel, which stops short of the top so the screen behind stays in sight. It is drawn at the document's root, so it has
|
|
17
|
+
* the page's colours wherever it opens from, such as a brand-coloured bar, and its content ends above the bottom bar.
|
|
15
18
|
*/
|
|
16
|
-
export declare const Sheet: ({ title, open, onClose, children }: SheetProps) => import("react").
|
|
19
|
+
export declare const Sheet: ({ title, open, onClose, children, inset }: SheetProps) => import("react").ReactPortal | null;
|
|
17
20
|
//#endregion
|
package/dist/primitives/sheet.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
1
2
|
import { text } from "./messages.js";
|
|
2
3
|
import { useFocusTrap } from "../lib/use-focus-trap.js";
|
|
3
4
|
import { useSheetDrag } from "./use-sheet-drag.js";
|
|
4
5
|
import { useRef } from "react";
|
|
5
6
|
import { X } from "lucide-react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { createPortal } from "react-dom";
|
|
7
9
|
//#region src/primitives/sheet.tsx
|
|
8
10
|
/**
|
|
9
11
|
* A panel that rises from the bottom of the screen, for the filter panel and `ResponsiveDialog` on mobile screens. It
|
|
10
12
|
* moves under the finger as a native sheet does (`useSheetDrag`): dragged down by its header or handle, or by its
|
|
11
13
|
* content once that is scrolled to its top, it closes or springs back by how far and how fast it went. It also closes
|
|
12
14
|
* on Escape, the close button, the handle and a press above it. Its content scrolls inside it when taller than the
|
|
13
|
-
* panel, which stops short of the top so the screen behind stays in sight.
|
|
15
|
+
* panel, which stops short of the top so the screen behind stays in sight. It is drawn at the document's root, so it has
|
|
16
|
+
* the page's colours wherever it opens from, such as a brand-coloured bar, and its content ends above the bottom bar.
|
|
14
17
|
*/
|
|
15
|
-
const Sheet = ({ title, open, onClose, children }) => {
|
|
18
|
+
const Sheet = ({ title, open, onClose, children, inset = "sides" }) => {
|
|
16
19
|
const panel = useRef(null);
|
|
17
20
|
const backdrop = useRef(null);
|
|
18
21
|
const content = useRef(null);
|
|
@@ -25,7 +28,7 @@ const Sheet = ({ title, open, onClose, children }) => {
|
|
|
25
28
|
});
|
|
26
29
|
useFocusTrap(panel, open, dismiss);
|
|
27
30
|
if (!open) return null;
|
|
28
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
return createPortal(/* @__PURE__ */ jsxs("div", {
|
|
29
32
|
className: "fixed inset-0 z-[80]",
|
|
30
33
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31
34
|
ref: backdrop,
|
|
@@ -40,7 +43,7 @@ const Sheet = ({ title, open, onClose, children }) => {
|
|
|
40
43
|
tabIndex: -1,
|
|
41
44
|
className: "absolute inset-x-0 bottom-0 flex max-h-[85vh] flex-col rounded-t-xl border-t bg-background pl-[var(--pb-safe-left)] pr-[var(--pb-safe-right)] shadow-pop outline-none will-change-transform",
|
|
42
45
|
children: [/* @__PURE__ */ jsxs("header", {
|
|
43
|
-
className: "relative flex shrink-0 touch-none select-none items-center justify-between border-b px-4",
|
|
46
|
+
className: "relative flex shrink-0 touch-none select-none items-center justify-between border-b px-4 pt-4",
|
|
44
47
|
...header,
|
|
45
48
|
children: [
|
|
46
49
|
/* @__PURE__ */ jsx("h2", {
|
|
@@ -64,11 +67,11 @@ const Sheet = ({ title, open, onClose, children }) => {
|
|
|
64
67
|
]
|
|
65
68
|
}), /* @__PURE__ */ jsx("div", {
|
|
66
69
|
ref: content,
|
|
67
|
-
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain
|
|
70
|
+
className: cn("min-h-0 flex-1 overflow-y-auto overscroll-contain pb-[calc(1.5rem+max(var(--pb-safe-bottom),var(--pb-sticky-bottom,0px)))]", inset === "sides" && "px-4"),
|
|
68
71
|
children
|
|
69
72
|
})]
|
|
70
73
|
})]
|
|
71
|
-
});
|
|
74
|
+
}), document.body);
|
|
72
75
|
};
|
|
73
76
|
//#endregion
|
|
74
77
|
export { Sheet };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PointerEvent, RefObject } from "react";
|
|
2
|
+
//#region src/primitives/use-drawer-drag.d.ts
|
|
3
|
+
/** Which way the drawer opens: `x` from the left edge, `y` from the bottom. */
|
|
4
|
+
export type DrawerAxis = 'x' | 'y';
|
|
5
|
+
type Parts = {
|
|
6
|
+
axis: DrawerAxis;
|
|
7
|
+
panel: RefObject<HTMLElement | null>;
|
|
8
|
+
backdrop: RefObject<HTMLElement | null>;
|
|
9
|
+
/** Closes the drawer once a drag has taken it away; the drawer is then off the screen already. */
|
|
10
|
+
onDraggedClosed: () => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A drawer that moves under the finger as the native one does (`drawer-math`), along either axis: a drag on it or on
|
|
14
|
+
* the dim beside it, once past the slop and within its angle, moves it one to one, past open as a rubber band, the dim
|
|
15
|
+
* following; let go, it settles open or closes by where it is and how fast it went, with a critically damped curve.
|
|
16
|
+
* It writes the panel's and the backdrop's styles directly, so a drag draws no React render. Returns the pointer
|
|
17
|
+
* handlers for the panel and for the backdrop.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useDrawerDrag: ({ axis, panel, backdrop, onDraggedClosed }: Parts) => {
|
|
20
|
+
panelHandlers: {
|
|
21
|
+
onPointerDown: (event: PointerEvent) => void;
|
|
22
|
+
onPointerMove: (event: PointerEvent) => void;
|
|
23
|
+
onPointerUp: () => void;
|
|
24
|
+
onPointerCancel: () => void;
|
|
25
|
+
};
|
|
26
|
+
backdropHandlers: {
|
|
27
|
+
onPointerDown: (event: PointerEvent) => void;
|
|
28
|
+
onPointerMove: (event: PointerEvent) => void;
|
|
29
|
+
onPointerUp: () => void;
|
|
30
|
+
onPointerCancel: () => void;
|
|
31
|
+
};
|
|
32
|
+
dragged: () => boolean;
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { backdropAlpha, dragProgress, drawerDim, drawerSettleCurve, endsOpen, startsDrag } from "./drawer-math.js";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
//#region src/primitives/use-drawer-drag.ts
|
|
4
|
+
const reducedMotion = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
5
|
+
const alongOf = (axis, dx, dy) => axis === "x" ? dx : -dy;
|
|
6
|
+
const acrossOf = (axis, dx, dy) => axis === "x" ? dy : dx;
|
|
7
|
+
const velocityOf = (samples) => {
|
|
8
|
+
const last = samples.at(-1);
|
|
9
|
+
if (!last) return 0;
|
|
10
|
+
const first = samples.find((sample) => last.time - sample.time <= 100) ?? last;
|
|
11
|
+
const elapsed = last.time - first.time;
|
|
12
|
+
return elapsed > 0 ? (last.along - first.along) / elapsed * 1e3 : 0;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A drawer that moves under the finger as the native one does (`drawer-math`), along either axis: a drag on it or on
|
|
16
|
+
* the dim beside it, once past the slop and within its angle, moves it one to one, past open as a rubber band, the dim
|
|
17
|
+
* following; let go, it settles open or closes by where it is and how fast it went, with a critically damped curve.
|
|
18
|
+
* It writes the panel's and the backdrop's styles directly, so a drag draws no React render. Returns the pointer
|
|
19
|
+
* handlers for the panel and for the backdrop.
|
|
20
|
+
*/
|
|
21
|
+
const useDrawerDrag = ({ axis, panel, backdrop, onDraggedClosed }) => {
|
|
22
|
+
const drag = useRef(void 0);
|
|
23
|
+
const wasDrag = useRef(false);
|
|
24
|
+
const size = () => {
|
|
25
|
+
const element = panel.current;
|
|
26
|
+
return element ? axis === "x" ? element.offsetWidth : element.offsetHeight : 1;
|
|
27
|
+
};
|
|
28
|
+
const place = (progress, animate) => {
|
|
29
|
+
const element = panel.current;
|
|
30
|
+
if (!element) return;
|
|
31
|
+
const transition = animate && !reducedMotion() ? `350ms ${drawerSettleCurve}` : "none";
|
|
32
|
+
const offset = (progress - 1) * size();
|
|
33
|
+
element.style.transition = transition === "none" ? "none" : `transform ${transition}`;
|
|
34
|
+
element.style.transform = progress === 1 ? "" : axis === "x" ? `translateX(${offset}px)` : `translateY(${-offset}px)`;
|
|
35
|
+
const shade = backdrop.current;
|
|
36
|
+
if (!shade) return;
|
|
37
|
+
shade.style.transition = transition === "none" ? "none" : `opacity ${transition}`;
|
|
38
|
+
shade.style.opacity = String(backdropAlpha(progress) / drawerDim);
|
|
39
|
+
};
|
|
40
|
+
const handlers = (onBackdrop) => ({
|
|
41
|
+
onPointerDown: (event) => {
|
|
42
|
+
if (event.pointerType === "mouse") return;
|
|
43
|
+
wasDrag.current = false;
|
|
44
|
+
drag.current = {
|
|
45
|
+
x: event.clientX,
|
|
46
|
+
y: event.clientY,
|
|
47
|
+
from: 1,
|
|
48
|
+
along: 0,
|
|
49
|
+
dragging: false,
|
|
50
|
+
onBackdrop,
|
|
51
|
+
samples: [],
|
|
52
|
+
ignored: false
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
onPointerMove: (event) => {
|
|
56
|
+
const current = drag.current;
|
|
57
|
+
if (!current || current.ignored) return;
|
|
58
|
+
const dx = event.clientX - current.x;
|
|
59
|
+
const dy = event.clientY - current.y;
|
|
60
|
+
const along = alongOf(axis, dx, dy);
|
|
61
|
+
if (!current.dragging) {
|
|
62
|
+
const across = acrossOf(axis, dx, dy);
|
|
63
|
+
if (Math.hypot(along, across) < 10) return;
|
|
64
|
+
if (!startsDrag(along, across, current.onBackdrop ? 1 : .58)) {
|
|
65
|
+
current.ignored = true;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
current.dragging = true;
|
|
69
|
+
current.x = event.clientX;
|
|
70
|
+
current.y = event.clientY;
|
|
71
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
current.along = along;
|
|
75
|
+
current.samples.push({
|
|
76
|
+
along,
|
|
77
|
+
time: event.timeStamp
|
|
78
|
+
});
|
|
79
|
+
place(dragProgress(current.from, along, size()), false);
|
|
80
|
+
},
|
|
81
|
+
onPointerUp: () => {
|
|
82
|
+
const current = drag.current;
|
|
83
|
+
drag.current = void 0;
|
|
84
|
+
if (!current?.dragging) return;
|
|
85
|
+
wasDrag.current = true;
|
|
86
|
+
const progress = dragProgress(current.from, current.along, size());
|
|
87
|
+
if (endsOpen(Math.min(progress, 1), velocityOf(current.samples))) return place(1, true);
|
|
88
|
+
place(0, true);
|
|
89
|
+
setTimeout(onDraggedClosed, reducedMotion() ? 0 : 350);
|
|
90
|
+
},
|
|
91
|
+
onPointerCancel: () => {
|
|
92
|
+
if (drag.current?.dragging) place(1, true);
|
|
93
|
+
drag.current = void 0;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
panelHandlers: handlers(false),
|
|
98
|
+
backdropHandlers: handlers(true),
|
|
99
|
+
dragged: () => wasDrag.current
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
//#endregion
|
|
103
|
+
export { useDrawerDrag };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PointerEvent, RefObject } from "react";
|
|
2
2
|
//#region src/primitives/use-sheet-drag.d.ts
|
|
3
|
-
/** How long the sheet takes to rise, spring back or slide away, in milliseconds. */
|
|
4
|
-
export declare const sheetMotionMs =
|
|
3
|
+
/** How long the sheet takes to rise, spring back or slide away, in milliseconds: the drawers' settle. */
|
|
4
|
+
export declare const sheetMotionMs = 350;
|
|
5
5
|
type Parts = {
|
|
6
6
|
panel: RefObject<HTMLElement | null>;
|
|
7
7
|
backdrop: RefObject<HTMLElement | null>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { drawerSettleCurve } from "./drawer-math.js";
|
|
2
|
+
import { closesOnRelease, dragSlop, dragsInsteadOfScroll, releaseVelocity, sheetOffset } from "./sheet-drag.js";
|
|
2
3
|
import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
|
|
3
4
|
//#region src/primitives/use-sheet-drag.ts
|
|
4
|
-
/** How long the sheet takes to rise, spring back or slide away, in milliseconds. */
|
|
5
|
-
const sheetMotionMs =
|
|
6
|
-
const ease =
|
|
5
|
+
/** How long the sheet takes to rise, spring back or slide away, in milliseconds: the drawers' settle. */
|
|
6
|
+
const sheetMotionMs = 350;
|
|
7
|
+
const ease = drawerSettleCurve;
|
|
7
8
|
const reducedMotion = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
8
9
|
/**
|
|
9
10
|
* A bottom sheet that moves under the finger as a native one does: it rises when opened, follows a drag down on its
|
|
@@ -21,7 +22,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
|
|
|
21
22
|
const place = useCallback((offset, animate) => {
|
|
22
23
|
const sheet = panel.current;
|
|
23
24
|
if (!sheet) return;
|
|
24
|
-
const transition = animate && !reducedMotion() ?
|
|
25
|
+
const transition = animate && !reducedMotion() ? `${sheetMotionMs}ms ${ease}` : "none";
|
|
25
26
|
sheet.style.transition = transition === "none" ? "none" : `transform ${transition}`;
|
|
26
27
|
sheet.style.transform = offset === 0 ? "" : `translateY(${offset}px)`;
|
|
27
28
|
const shade = backdrop.current;
|
|
@@ -48,7 +49,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
|
|
|
48
49
|
if (!sheet || reducedMotion()) return close.current();
|
|
49
50
|
closing.current = true;
|
|
50
51
|
place(sheet.offsetHeight, true);
|
|
51
|
-
setTimeout(() => close.current(),
|
|
52
|
+
setTimeout(() => close.current(), sheetMotionMs);
|
|
52
53
|
}, [panel, place]);
|
|
53
54
|
const begin = (x, y, time) => {
|
|
54
55
|
drag.current = {
|
|
@@ -96,7 +97,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
|
|
|
96
97
|
if (!current.dragging) {
|
|
97
98
|
const dx = touch.clientX - current.x;
|
|
98
99
|
const dy = touch.clientY - current.y;
|
|
99
|
-
if (Math.abs(dx) <
|
|
100
|
+
if (Math.abs(dx) < dragSlop && Math.abs(dy) < dragSlop) return;
|
|
100
101
|
if (!dragsInsteadOfScroll(area.scrollTop, dx, dy)) {
|
|
101
102
|
current.scrolling = true;
|
|
102
103
|
return;
|
|
@@ -127,7 +128,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
|
|
|
127
128
|
const current = drag.current;
|
|
128
129
|
if (!current || next.pointerId !== event.pointerId) return;
|
|
129
130
|
if (!current.dragging) {
|
|
130
|
-
if (Math.abs(next.clientY - current.y) <
|
|
131
|
+
if (Math.abs(next.clientY - current.y) < dragSlop) return;
|
|
131
132
|
current.dragging = true;
|
|
132
133
|
current.y = next.clientY;
|
|
133
134
|
}
|
|
@@ -136,7 +137,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
|
|
|
136
137
|
const stop = (next) => {
|
|
137
138
|
if (next.pointerId !== event.pointerId) return;
|
|
138
139
|
const current = drag.current;
|
|
139
|
-
if (current && !current.dragging && Math.abs(next.clientY - current.y) >=
|
|
140
|
+
if (current && !current.dragging && Math.abs(next.clientY - current.y) >= dragSlop) {
|
|
140
141
|
current.dragging = true;
|
|
141
142
|
current.samples.push({
|
|
142
143
|
y: next.clientY,
|