datocms-react-ui 3.1.0-next.4 → 3.1.0-next.6
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/LICENSE-lucide.txt +43 -0
- package/dist/styles.css +382 -176
- package/dist/ui-public/icons/custom/dato_symbol.js +22 -0
- package/dist/ui-public/icons/index.js +296 -367
- package/dist/ui-public/icons/lucide/app-window.js +33 -0
- package/dist/ui-public/icons/lucide/arrow-big-down.js +22 -0
- package/dist/ui-public/icons/lucide/arrow-down-a-z.js +28 -0
- package/dist/ui-public/icons/lucide/arrow-down-from-line.js +26 -0
- package/dist/ui-public/icons/lucide/arrow-down.js +22 -0
- package/dist/ui-public/icons/lucide/arrow-left.js +22 -0
- package/dist/ui-public/icons/lucide/arrow-right-left.js +27 -0
- package/dist/ui-public/icons/lucide/arrow-right.js +22 -0
- package/dist/ui-public/icons/lucide/arrow-up-down.js +27 -0
- package/dist/ui-public/icons/lucide/arrow-up-from-line.js +26 -0
- package/dist/ui-public/icons/lucide/arrow-up.js +22 -0
- package/dist/ui-public/icons/lucide/ban.js +26 -0
- package/dist/ui-public/icons/lucide/book.js +22 -0
- package/dist/ui-public/icons/lucide/bookmark.js +22 -0
- package/dist/ui-public/icons/lucide/calendar.js +33 -0
- package/dist/ui-public/icons/{regular → lucide}/check.js +9 -3
- package/dist/ui-public/icons/{regular → lucide}/chevron-down.js +9 -3
- package/dist/ui-public/icons/{regular → lucide}/chevron-left.js +9 -3
- package/dist/ui-public/icons/{regular → lucide}/chevron-right.js +9 -3
- package/dist/ui-public/icons/lucide/chevrons-down.js +22 -0
- package/dist/ui-public/icons/lucide/chevrons-left.js +22 -0
- package/dist/ui-public/icons/lucide/chevrons-right.js +22 -0
- package/dist/ui-public/icons/lucide/circle-arrow-up.js +30 -0
- package/dist/ui-public/icons/lucide/circle-check.js +26 -0
- package/dist/ui-public/icons/lucide/circle-dot.js +30 -0
- package/dist/ui-public/icons/lucide/circle-exclamation-point.js +40 -0
- package/dist/ui-public/icons/lucide/circle-question-mark.js +30 -0
- package/dist/ui-public/icons/lucide/clock.js +26 -0
- package/dist/ui-public/icons/lucide/code.js +22 -0
- package/dist/ui-public/icons/lucide/command.js +22 -0
- package/dist/ui-public/icons/lucide/copy-plus.js +44 -0
- package/dist/ui-public/icons/lucide/copy.js +29 -0
- package/dist/ui-public/icons/lucide/corner-left-up.js +22 -0
- package/dist/ui-public/icons/lucide/database.js +31 -0
- package/dist/ui-public/icons/lucide/download.js +26 -0
- package/dist/ui-public/icons/lucide/earth.js +31 -0
- package/dist/ui-public/icons/lucide/ellipsis-vertical.js +38 -0
- package/dist/ui-public/icons/lucide/ellipsis.js +38 -0
- package/dist/ui-public/icons/lucide/external-link.js +26 -0
- package/dist/ui-public/icons/lucide/eye-off.js +27 -0
- package/dist/ui-public/icons/lucide/eye.js +26 -0
- package/dist/ui-public/icons/lucide/file-code.js +27 -0
- package/dist/ui-public/icons/lucide/file-output.js +27 -0
- package/dist/ui-public/icons/lucide/flask-conical.js +26 -0
- package/dist/ui-public/icons/lucide/fold-vertical.js +31 -0
- package/dist/ui-public/icons/lucide/folder-open.js +22 -0
- package/dist/ui-public/icons/lucide/folder-plus.js +26 -0
- package/dist/ui-public/icons/lucide/folder.js +22 -0
- package/dist/ui-public/icons/lucide/folders.js +22 -0
- package/dist/ui-public/icons/lucide/funnel.js +22 -0
- package/dist/ui-public/icons/lucide/gift.js +33 -0
- package/dist/ui-public/icons/lucide/git-branch.js +34 -0
- package/dist/ui-public/icons/lucide/git-fork.js +40 -0
- package/dist/ui-public/icons/lucide/globe.js +30 -0
- package/dist/ui-public/icons/lucide/grip-vertical.js +53 -0
- package/dist/ui-public/icons/lucide/hand.js +27 -0
- package/dist/ui-public/icons/lucide/hard-hat.js +33 -0
- package/dist/ui-public/icons/lucide/heading-1.js +27 -0
- package/dist/ui-public/icons/lucide/heading-2.js +27 -0
- package/dist/ui-public/icons/lucide/heading-3.js +28 -0
- package/dist/ui-public/icons/lucide/heading-4.js +28 -0
- package/dist/ui-public/icons/lucide/heading-5.js +28 -0
- package/dist/ui-public/icons/lucide/heading-6.js +32 -0
- package/dist/ui-public/icons/lucide/highlighter.js +22 -0
- package/dist/ui-public/icons/lucide/hourglass.js +27 -0
- package/dist/ui-public/icons/lucide/house.js +22 -0
- package/dist/ui-public/icons/lucide/image.js +37 -0
- package/dist/ui-public/icons/lucide/images.js +38 -0
- package/dist/ui-public/icons/lucide/info.js +30 -0
- package/dist/ui-public/icons/lucide/italic.js +41 -0
- package/dist/ui-public/icons/lucide/keyboard.js +38 -0
- package/dist/ui-public/icons/lucide/languages.js +29 -0
- package/dist/ui-public/icons/lucide/layers.js +26 -0
- package/dist/ui-public/icons/lucide/layout-grid.js +51 -0
- package/dist/ui-public/icons/lucide/letter-b.js +22 -0
- package/dist/ui-public/icons/lucide/life-buoy.js +37 -0
- package/dist/ui-public/icons/lucide/link.js +22 -0
- package/dist/ui-public/icons/lucide/list-indent-decrease.js +27 -0
- package/dist/ui-public/icons/lucide/list-indent-increase.js +27 -0
- package/dist/ui-public/icons/lucide/list-ordered.js +29 -0
- package/dist/ui-public/icons/lucide/list-tree.js +28 -0
- package/dist/ui-public/icons/lucide/list.js +29 -0
- package/dist/ui-public/icons/lucide/log-out.js +26 -0
- package/dist/ui-public/icons/lucide/mail.js +28 -0
- package/dist/ui-public/icons/lucide/map-pin.js +26 -0
- package/dist/ui-public/icons/lucide/map-pinned.js +30 -0
- package/dist/ui-public/icons/lucide/maximize.js +27 -0
- package/dist/ui-public/icons/lucide/menu.js +26 -0
- package/dist/ui-public/icons/lucide/messages-square.js +22 -0
- package/dist/ui-public/icons/lucide/minimize.js +27 -0
- package/dist/ui-public/icons/lucide/minus.js +22 -0
- package/dist/ui-public/icons/lucide/notepad-text.js +36 -0
- package/dist/ui-public/icons/lucide/octagon-exclamation-point.js +26 -0
- package/dist/ui-public/icons/lucide/palette.js +48 -0
- package/dist/ui-public/icons/lucide/panel-left.js +28 -0
- package/dist/ui-public/icons/lucide/panel-right.js +28 -0
- package/dist/ui-public/icons/lucide/pause.js +34 -0
- package/dist/ui-public/icons/lucide/pen.js +22 -0
- package/dist/ui-public/icons/lucide/pilcrow.js +26 -0
- package/dist/ui-public/icons/lucide/pipette.js +26 -0
- package/dist/ui-public/icons/lucide/play.js +22 -0
- package/dist/ui-public/icons/lucide/plus.js +22 -0
- package/dist/ui-public/icons/lucide/quote.js +22 -0
- package/dist/ui-public/icons/lucide/receipt.js +26 -0
- package/dist/ui-public/icons/lucide/redo-2.js +22 -0
- package/dist/ui-public/icons/lucide/refresh-cw.js +27 -0
- package/dist/ui-public/icons/lucide/rotate-ccw-clock.js +26 -0
- package/dist/ui-public/icons/lucide/rotate-ccw.js +22 -0
- package/dist/ui-public/icons/lucide/search.js +26 -0
- package/dist/ui-public/icons/lucide/send.js +22 -0
- package/dist/ui-public/icons/lucide/settings-2.js +35 -0
- package/dist/ui-public/icons/lucide/settings.js +26 -0
- package/dist/ui-public/icons/lucide/sliders-horizontal.js +32 -0
- package/dist/ui-public/icons/lucide/smartphone.js +29 -0
- package/dist/ui-public/icons/lucide/square-arrow-left.js +32 -0
- package/dist/ui-public/icons/lucide/square-arrow-up-right.js +32 -0
- package/dist/ui-public/icons/lucide/square-code.js +32 -0
- package/dist/ui-public/icons/lucide/square-dashed.js +35 -0
- package/dist/ui-public/icons/lucide/square-pen.js +22 -0
- package/dist/ui-public/icons/lucide/square-plus.js +32 -0
- package/dist/ui-public/icons/lucide/square-terminal.js +33 -0
- package/dist/ui-public/icons/lucide/store.js +26 -0
- package/dist/ui-public/icons/lucide/strikethrough.js +31 -0
- package/dist/ui-public/icons/lucide/table.js +33 -0
- package/dist/ui-public/icons/lucide/tag.js +27 -0
- package/dist/ui-public/icons/lucide/text-align-center.js +26 -0
- package/dist/ui-public/icons/lucide/text-align-end.js +26 -0
- package/dist/ui-public/icons/lucide/text-align-justify.js +26 -0
- package/dist/ui-public/icons/lucide/text-align-start.js +26 -0
- package/dist/ui-public/icons/lucide/toolbox.js +28 -0
- package/dist/ui-public/icons/lucide/trash.js +28 -0
- package/dist/ui-public/icons/lucide/triangle-exclamation-point.js +26 -0
- package/dist/ui-public/icons/lucide/underline.js +27 -0
- package/dist/ui-public/icons/lucide/undo-2.js +22 -0
- package/dist/ui-public/icons/lucide/unfold-vertical.js +31 -0
- package/dist/ui-public/icons/lucide/user-lock.js +37 -0
- package/dist/ui-public/icons/lucide/user-minus.js +35 -0
- package/dist/ui-public/icons/lucide/user-round-arrow-left.js +31 -0
- package/dist/ui-public/icons/lucide/user.js +26 -0
- package/dist/ui-public/icons/lucide/x.js +22 -0
- package/dist/ui-public/locales/en.js +2 -0
- package/dist/ui-public/src/UiTextKey.d.ts +1 -1
- package/dist/ui-public/src/actions/Button.d.ts +10 -2
- package/dist/ui-public/src/actions/Button.js +7 -1
- package/dist/ui-public/src/actions/Dropdown/Menu.js +2 -1
- package/dist/ui-public/src/actions/Dropdown/MenuContent.d.ts +2 -1
- package/dist/ui-public/src/actions/Dropdown/MenuContent.js +13 -3
- package/dist/ui-public/src/actions/Dropdown/Submenu.js +5 -2
- package/dist/ui-public/src/actions/disabledReason.js +1 -1
- package/dist/ui-public/src/content/UploadThreatTriangle.js +1 -1
- package/dist/ui-public/src/content/ValidityTriangles.js +1 -1
- package/dist/ui-public/src/form/PasswordInput.js +1 -9
- package/dist/ui-public/src/form/SwitchInput.js +4 -2
- package/dist/ui-public/src/layout/Pagination.d.ts +6 -1
- package/dist/ui-public/src/layout/Pagination.js +4 -2
- package/dist/ui-public/src/layout/Toolbar/FilterToggle.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/FilterToggle.js +12 -4
- package/dist/ui-public/src/layout/Toolbar/Pagination.d.ts +4 -1
- package/dist/ui-public/src/layout/Toolbar/Pagination.js +30 -26
- package/dist/ui-public/src/lists/CardList.js +4 -1
- package/dist/ui-public/src/lists/SettingsList.d.ts +4 -3
- package/dist/ui-public/src/navigation/SegmentedControl.js +4 -1
- package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNodeActions.d.ts +3 -0
- package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNodeActions.js +2 -1
- package/dist/ui-public/src/navigation/Tabs.js +23 -1
- package/dist/ui-public/src/overlays/HoverCard/index.js +1 -1
- package/dist/ui-public/src/patterns/ListDetail/FloatingDetail.js +71 -0
- package/dist/ui-public/src/patterns/ListDetail/Overview.js +2 -2
- package/dist/ui-public/src/patterns/ListDetail/Page.js +8 -4
- package/dist/ui-public/src/patterns/ListDetail/Panel.js +11 -10
- package/dist/ui-public/src/patterns/ListDetail/Split.d.ts +23 -8
- package/dist/ui-public/src/patterns/ListDetail/Split.js +99 -115
- package/dist/ui-public/src/patterns/ListDetail/index.d.ts +4 -3
- package/dist/ui-public/src/patterns/ListDetail/useDetailWidthDrag.js +43 -0
- package/package.json +2 -2
- package/dist/ui-public/icons/brands/gitlab.js +0 -15
- package/dist/ui-public/icons/brands/markdown.js +0 -15
- package/dist/ui-public/icons/custom/color_d_icon.js +0 -20
- package/dist/ui-public/icons/custom/language.js +0 -16
- package/dist/ui-public/icons/custom/masonry.js +0 -21
- package/dist/ui-public/icons/light/eye-slash.js +0 -16
- package/dist/ui-public/icons/light/eye.js +0 -16
- package/dist/ui-public/icons/regular/align-left.js +0 -15
- package/dist/ui-public/icons/regular/arrow-down-a-z.js +0 -16
- package/dist/ui-public/icons/regular/arrow-down-from-line.js +0 -16
- package/dist/ui-public/icons/regular/arrow-down-to-line.js +0 -15
- package/dist/ui-public/icons/regular/arrow-down.js +0 -16
- package/dist/ui-public/icons/regular/arrow-left.js +0 -16
- package/dist/ui-public/icons/regular/arrow-right-arrow-left.js +0 -16
- package/dist/ui-public/icons/regular/arrow-right-from-bracket.js +0 -16
- package/dist/ui-public/icons/regular/arrow-right.js +0 -16
- package/dist/ui-public/icons/regular/arrow-rotate-left.js +0 -15
- package/dist/ui-public/icons/regular/arrow-rotate-right.js +0 -16
- package/dist/ui-public/icons/regular/arrow-turn-up.js +0 -16
- package/dist/ui-public/icons/regular/arrow-up-arrow-down.js +0 -16
- package/dist/ui-public/icons/regular/arrow-up-from-line.js +0 -16
- package/dist/ui-public/icons/regular/arrow-up-right-from-square.js +0 -16
- package/dist/ui-public/icons/regular/arrow-up-to-line.js +0 -15
- package/dist/ui-public/icons/regular/arrow-up.js +0 -16
- package/dist/ui-public/icons/regular/arrows-from-line.js +0 -16
- package/dist/ui-public/icons/regular/arrows-rotate.js +0 -16
- package/dist/ui-public/icons/regular/arrows-to-line.js +0 -16
- package/dist/ui-public/icons/regular/arrows-turn-to-dots.js +0 -15
- package/dist/ui-public/icons/regular/badge-check.js +0 -15
- package/dist/ui-public/icons/regular/ballot-check.js +0 -15
- package/dist/ui-public/icons/regular/ban.js +0 -16
- package/dist/ui-public/icons/regular/bars.js +0 -16
- package/dist/ui-public/icons/regular/bold.js +0 -15
- package/dist/ui-public/icons/regular/bolt.js +0 -15
- package/dist/ui-public/icons/regular/book.js +0 -16
- package/dist/ui-public/icons/regular/bookmark.js +0 -16
- package/dist/ui-public/icons/regular/brackets-curly.js +0 -15
- package/dist/ui-public/icons/regular/browser.js +0 -16
- package/dist/ui-public/icons/regular/calendar-clock.js +0 -15
- package/dist/ui-public/icons/regular/calendar.js +0 -16
- package/dist/ui-public/icons/regular/chart-area.js +0 -15
- package/dist/ui-public/icons/regular/chevrons-down.js +0 -16
- package/dist/ui-public/icons/regular/chevrons-left.js +0 -16
- package/dist/ui-public/icons/regular/chevrons-right.js +0 -16
- package/dist/ui-public/icons/regular/circle-arrow-up.js +0 -16
- package/dist/ui-public/icons/regular/circle-check.js +0 -16
- package/dist/ui-public/icons/regular/circle-dot.js +0 -16
- package/dist/ui-public/icons/regular/circle-exclamation.js +0 -16
- package/dist/ui-public/icons/regular/circle-info.js +0 -16
- package/dist/ui-public/icons/regular/circle-question.js +0 -16
- package/dist/ui-public/icons/regular/clapperboard-play.js +0 -15
- package/dist/ui-public/icons/regular/clipboard.js +0 -15
- package/dist/ui-public/icons/regular/clock-rotate-left.js +0 -16
- package/dist/ui-public/icons/regular/clock.js +0 -16
- package/dist/ui-public/icons/regular/clone.js +0 -16
- package/dist/ui-public/icons/regular/cloud-arrow-down.js +0 -15
- package/dist/ui-public/icons/regular/code-branch.js +0 -16
- package/dist/ui-public/icons/regular/code-fork.js +0 -16
- package/dist/ui-public/icons/regular/command.js +0 -16
- package/dist/ui-public/icons/regular/comments.js +0 -16
- package/dist/ui-public/icons/regular/copy.js +0 -16
- package/dist/ui-public/icons/regular/cube.js +0 -15
- package/dist/ui-public/icons/regular/cubes.js +0 -15
- package/dist/ui-public/icons/regular/dash.js +0 -16
- package/dist/ui-public/icons/regular/database.js +0 -16
- package/dist/ui-public/icons/regular/diamond.js +0 -15
- package/dist/ui-public/icons/regular/down.js +0 -16
- package/dist/ui-public/icons/regular/download.js +0 -16
- package/dist/ui-public/icons/regular/earth-europe.js +0 -16
- package/dist/ui-public/icons/regular/ellipsis-vertical.js +0 -16
- package/dist/ui-public/icons/regular/ellipsis.js +0 -16
- package/dist/ui-public/icons/regular/envelope.js +0 -16
- package/dist/ui-public/icons/regular/expand.js +0 -16
- package/dist/ui-public/icons/regular/eye-dropper.js +0 -16
- package/dist/ui-public/icons/regular/eye.js +0 -16
- package/dist/ui-public/icons/regular/file-export.js +0 -16
- package/dist/ui-public/icons/regular/file-lines.js +0 -15
- package/dist/ui-public/icons/regular/file-shield.js +0 -15
- package/dist/ui-public/icons/regular/file.js +0 -15
- package/dist/ui-public/icons/regular/filter.js +0 -16
- package/dist/ui-public/icons/regular/fire-flame-curved.js +0 -15
- package/dist/ui-public/icons/regular/flask-gear.js +0 -16
- package/dist/ui-public/icons/regular/flask.js +0 -16
- package/dist/ui-public/icons/regular/folder-gear.js +0 -15
- package/dist/ui-public/icons/regular/folder-magnifying-glass.js +0 -15
- package/dist/ui-public/icons/regular/folder-open.js +0 -16
- package/dist/ui-public/icons/regular/folder-plus.js +0 -16
- package/dist/ui-public/icons/regular/folder.js +0 -16
- package/dist/ui-public/icons/regular/folders.js +0 -16
- package/dist/ui-public/icons/regular/gear.js +0 -16
- package/dist/ui-public/icons/regular/gift.js +0 -16
- package/dist/ui-public/icons/regular/globe.js +0 -16
- package/dist/ui-public/icons/regular/grid-2.js +0 -16
- package/dist/ui-public/icons/regular/grip-dots-vertical.js +0 -16
- package/dist/ui-public/icons/regular/hand.js +0 -16
- package/dist/ui-public/icons/regular/hourglass-clock.js +0 -16
- package/dist/ui-public/icons/regular/house.js +0 -16
- package/dist/ui-public/icons/regular/images.js +0 -16
- package/dist/ui-public/icons/regular/input-numeric.js +0 -15
- package/dist/ui-public/icons/regular/input-text.js +0 -15
- package/dist/ui-public/icons/regular/keyboard.js +0 -16
- package/dist/ui-public/icons/regular/layer-group.js +0 -16
- package/dist/ui-public/icons/regular/life-ring.js +0 -16
- package/dist/ui-public/icons/regular/link-simple.js +0 -15
- package/dist/ui-public/icons/regular/link.js +0 -16
- package/dist/ui-public/icons/regular/list-tree.js +0 -16
- package/dist/ui-public/icons/regular/list.js +0 -16
- package/dist/ui-public/icons/regular/magnifying-glass-chart.js +0 -15
- package/dist/ui-public/icons/regular/magnifying-glass.js +0 -16
- package/dist/ui-public/icons/regular/map-location-dot.js +0 -16
- package/dist/ui-public/icons/regular/memo.js +0 -16
- package/dist/ui-public/icons/regular/mobile-screen-button.js +0 -16
- package/dist/ui-public/icons/regular/octagon-exclamation.js +0 -16
- package/dist/ui-public/icons/regular/palette.js +0 -16
- package/dist/ui-public/icons/regular/paper-plane.js +0 -16
- package/dist/ui-public/icons/regular/paragraph.js +0 -15
- package/dist/ui-public/icons/regular/paste.js +0 -15
- package/dist/ui-public/icons/regular/pause.js +0 -16
- package/dist/ui-public/icons/regular/pen-paintbrush.js +0 -15
- package/dist/ui-public/icons/regular/pen-to-square.js +0 -16
- package/dist/ui-public/icons/regular/pen.js +0 -16
- package/dist/ui-public/icons/regular/people-arrows.js +0 -16
- package/dist/ui-public/icons/regular/photo-film.js +0 -15
- package/dist/ui-public/icons/regular/play.js +0 -16
- package/dist/ui-public/icons/regular/puzzle-piece.js +0 -15
- package/dist/ui-public/icons/regular/receipt.js +0 -16
- package/dist/ui-public/icons/regular/rectangle-barcode.js +0 -15
- package/dist/ui-public/icons/regular/rectangle-list.js +0 -15
- package/dist/ui-public/icons/regular/right-left.js +0 -15
- package/dist/ui-public/icons/regular/rotate-left.js +0 -16
- package/dist/ui-public/icons/regular/shield.js +0 -15
- package/dist/ui-public/icons/regular/sidebar-flip.js +0 -16
- package/dist/ui-public/icons/regular/sidebar.js +0 -16
- package/dist/ui-public/icons/regular/sliders.js +0 -16
- package/dist/ui-public/icons/regular/sparkles.js +0 -15
- package/dist/ui-public/icons/regular/square-caret-down.js +0 -15
- package/dist/ui-public/icons/regular/square-check.js +0 -15
- package/dist/ui-public/icons/regular/square-dashed.js +0 -15
- package/dist/ui-public/icons/regular/square-left.js +0 -16
- package/dist/ui-public/icons/regular/square-terminal.js +0 -16
- package/dist/ui-public/icons/regular/square-up-right.js +0 -16
- package/dist/ui-public/icons/regular/store.js +0 -16
- package/dist/ui-public/icons/regular/swap-arrows.js +0 -15
- package/dist/ui-public/icons/regular/table.js +0 -16
- package/dist/ui-public/icons/regular/tag.js +0 -16
- package/dist/ui-public/icons/regular/toggle-on.js +0 -15
- package/dist/ui-public/icons/regular/toolbox.js +0 -16
- package/dist/ui-public/icons/regular/trash-undo.js +0 -15
- package/dist/ui-public/icons/regular/trash.js +0 -16
- package/dist/ui-public/icons/regular/triangle-exclamation.js +0 -16
- package/dist/ui-public/icons/regular/turn-up.js +0 -16
- package/dist/ui-public/icons/regular/user-group.js +0 -15
- package/dist/ui-public/icons/regular/user-helmet-safety.js +0 -16
- package/dist/ui-public/icons/regular/user-lock.js +0 -16
- package/dist/ui-public/icons/regular/user-minus.js +0 -16
- package/dist/ui-public/icons/regular/user-tie.js +0 -15
- package/dist/ui-public/icons/regular/user.js +0 -16
- package/dist/ui-public/icons/regular/users.js +0 -15
- package/dist/ui-public/icons/regular/video.js +0 -15
- package/dist/ui-public/icons/regular/webhook.js +0 -15
- package/dist/ui-public/icons/regular/wrench.js +0 -15
- package/dist/ui-public/icons/regular/xmark.js +0 -16
- package/dist/ui-public/icons/solid/align-center.js +0 -16
- package/dist/ui-public/icons/solid/align-justify.js +0 -16
- package/dist/ui-public/icons/solid/align-left.js +0 -16
- package/dist/ui-public/icons/solid/align-right.js +0 -16
- package/dist/ui-public/icons/solid/arrow-rotate-left.js +0 -16
- package/dist/ui-public/icons/solid/arrow-rotate-right.js +0 -16
- package/dist/ui-public/icons/solid/bold.js +0 -16
- package/dist/ui-public/icons/solid/circle-exclamation.js +0 -16
- package/dist/ui-public/icons/solid/closed-captioning.js +0 -15
- package/dist/ui-public/icons/solid/code.js +0 -16
- package/dist/ui-public/icons/solid/compress.js +0 -16
- package/dist/ui-public/icons/solid/download.js +0 -15
- package/dist/ui-public/icons/solid/expand.js +0 -16
- package/dist/ui-public/icons/solid/file-arrow-down.js +0 -15
- package/dist/ui-public/icons/solid/file-code.js +0 -16
- package/dist/ui-public/icons/solid/grid-2.js +0 -16
- package/dist/ui-public/icons/solid/h1.js +0 -16
- package/dist/ui-public/icons/solid/h2.js +0 -16
- package/dist/ui-public/icons/solid/h3.js +0 -16
- package/dist/ui-public/icons/solid/h4.js +0 -16
- package/dist/ui-public/icons/solid/h5.js +0 -16
- package/dist/ui-public/icons/solid/h6.js +0 -16
- package/dist/ui-public/icons/solid/highlighter.js +0 -16
- package/dist/ui-public/icons/solid/horizontal-rule.js +0 -16
- package/dist/ui-public/icons/solid/image.js +0 -16
- package/dist/ui-public/icons/solid/indent.js +0 -16
- package/dist/ui-public/icons/solid/italic.js +0 -16
- package/dist/ui-public/icons/solid/link.js +0 -16
- package/dist/ui-public/icons/solid/list-ol.js +0 -16
- package/dist/ui-public/icons/solid/list-ul.js +0 -16
- package/dist/ui-public/icons/solid/location-dot.js +0 -16
- package/dist/ui-public/icons/solid/music.js +0 -15
- package/dist/ui-public/icons/solid/outdent.js +0 -16
- package/dist/ui-public/icons/solid/paragraph.js +0 -16
- package/dist/ui-public/icons/solid/plus.js +0 -16
- package/dist/ui-public/icons/solid/quote-right.js +0 -16
- package/dist/ui-public/icons/solid/rectangle-code.js +0 -16
- package/dist/ui-public/icons/solid/square-plus.js +0 -16
- package/dist/ui-public/icons/solid/strikethrough.js +0 -16
- package/dist/ui-public/icons/solid/subtitles.js +0 -15
- package/dist/ui-public/icons/solid/table.js +0 -16
- package/dist/ui-public/icons/solid/triangle-exclamation.js +0 -16
- package/dist/ui-public/icons/solid/underline.js +0 -16
|
@@ -107,7 +107,10 @@ var Item = React.forwardRef(function Item({ className, row, body, expandable, ..
|
|
|
107
107
|
className: "CardList__summary",
|
|
108
108
|
children: row.summary
|
|
109
109
|
}),
|
|
110
|
-
row.trailing,
|
|
110
|
+
row.trailing && /* @__PURE__ */ jsx("div", {
|
|
111
|
+
className: "CardList__trailing",
|
|
112
|
+
children: row.trailing
|
|
113
|
+
}),
|
|
111
114
|
/* @__PURE__ */ jsx("div", {
|
|
112
115
|
className: "CardList__actions",
|
|
113
116
|
children: row.actions
|
|
@@ -12,9 +12,10 @@ export type SettingsListRowProps = {
|
|
|
12
12
|
/** One short sentence about the setting or about the result of the action */
|
|
13
13
|
description?: Message;
|
|
14
14
|
/**
|
|
15
|
-
* The current value. A long value gets an ellipsis
|
|
16
|
-
*
|
|
17
|
-
* (for example "Log out
|
|
15
|
+
* The current value. A long value gets an ellipsis (in a narrow list, it
|
|
16
|
+
* goes on more lines), and a value on more lines (an address) has each
|
|
17
|
+
* line at the right. An action without a value (for example "Log out
|
|
18
|
+
* everywhere") has no value.
|
|
18
19
|
*/
|
|
19
20
|
value?: ReactNode;
|
|
20
21
|
/**
|
|
@@ -48,7 +48,10 @@ function SegmentedControl({ options, iconOnly, value, onChange, ariaLabel, ariaL
|
|
|
48
48
|
}
|
|
49
49
|
return /* @__PURE__ */ jsxs(RawButton, {
|
|
50
50
|
...buttonProps,
|
|
51
|
-
children: [option.icon,
|
|
51
|
+
children: [option.icon, /* @__PURE__ */ jsx("span", {
|
|
52
|
+
className: "SegmentedControl__label",
|
|
53
|
+
children: tc(option.label)
|
|
54
|
+
})]
|
|
52
55
|
}, option.value);
|
|
53
56
|
})
|
|
54
57
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Message } from '../../Message.js';
|
|
3
|
+
import { SvgIcon } from '../../utils/types.js';
|
|
3
4
|
export type SidebarTreeNodeActionsProps = {
|
|
4
5
|
/** The page of the "edit" option: the path with its query */
|
|
5
6
|
editTo: string;
|
|
@@ -20,6 +21,8 @@ export type SidebarTreeNodeActionsProps = {
|
|
|
20
21
|
label: Message;
|
|
21
22
|
/** Runs when the user picks the option */
|
|
22
23
|
onAdd: () => void;
|
|
24
|
+
/** The icon of the option. The default is the "add" icon. */
|
|
25
|
+
icon?: SvgIcon;
|
|
23
26
|
};
|
|
24
27
|
};
|
|
25
28
|
/**
|
|
@@ -11,6 +11,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
function SidebarTreeNodeActions({ editTo, editLabel, deleteLabel, onDelete, onReorder, add }) {
|
|
12
12
|
const { t, tc } = useTranslation();
|
|
13
13
|
const { navigate } = useNavigation();
|
|
14
|
+
const AddIcon = add?.icon ?? Generic.AddIcon;
|
|
14
15
|
return /* @__PURE__ */ jsx(Dropdown, {
|
|
15
16
|
triggerComponent: Dropdown.IconTrigger,
|
|
16
17
|
icon: Generic.ActionToggleIcon,
|
|
@@ -22,7 +23,7 @@ function SidebarTreeNodeActions({ editTo, editLabel, deleteLabel, onDelete, onRe
|
|
|
22
23
|
e.preventDefault();
|
|
23
24
|
add.onAdd();
|
|
24
25
|
},
|
|
25
|
-
icon: /* @__PURE__ */ jsx(
|
|
26
|
+
icon: /* @__PURE__ */ jsx(AddIcon, {}),
|
|
26
27
|
children: /* @__PURE__ */ jsx("span", { children: tc(add.label) })
|
|
27
28
|
}),
|
|
28
29
|
/* @__PURE__ */ jsx(Dropdown.Option, {
|
|
@@ -6,7 +6,7 @@ import { useAutoincrementIntegerId } from "../hooks/useAutoincrementIntegerId.js
|
|
|
6
6
|
import { useRovingKeyDown } from "../hooks/useRovingKeyDown.js";
|
|
7
7
|
import Root from "../layout/Toolbar/Root.js";
|
|
8
8
|
import Nav from "../semantic/Nav.js";
|
|
9
|
-
import React, { useCallback } from "react";
|
|
9
|
+
import React, { useCallback, useEffect, useRef } from "react";
|
|
10
10
|
import classNames from "classnames";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region ../ui-public/src/navigation/Tabs.tsx
|
|
@@ -24,6 +24,24 @@ function useTabIds() {
|
|
|
24
24
|
}
|
|
25
25
|
var TAB_SELECTOR = "[role=\"tab\"]";
|
|
26
26
|
/**
|
|
27
|
+
* Scrolls the row of tabs until the active tab is fully visible. It scrolls
|
|
28
|
+
* only the row: scrollIntoView also scrolls the page, and a row of tabs
|
|
29
|
+
* under the fold must not move the page when it mounts.
|
|
30
|
+
*/
|
|
31
|
+
function useScrollIntoTabRow(active) {
|
|
32
|
+
const ref = useRef(null);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const tab = ref.current;
|
|
35
|
+
const row = tab?.closest(".Toolbar__tabs");
|
|
36
|
+
if (!active || !tab || !row) return;
|
|
37
|
+
const rowRect = row.getBoundingClientRect();
|
|
38
|
+
const tabRect = tab.getBoundingClientRect();
|
|
39
|
+
if (tabRect.left < rowRect.left) row.scrollBy({ left: tabRect.left - rowRect.left });
|
|
40
|
+
else if (tabRect.right > rowRect.right) row.scrollBy({ left: tabRect.right - rowRect.right });
|
|
41
|
+
}, [active]);
|
|
42
|
+
return ref;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
27
45
|
* The WAI-ARIA tablist. The parent keeps the active tab in its state. The
|
|
28
46
|
* arrow keys, Home and End move the focus and select the tab (automatic
|
|
29
47
|
* activation). It is Toolbar.Tabs.
|
|
@@ -42,7 +60,9 @@ var TabList = React.memo(function TabList({ ariaLabel, children }) {
|
|
|
42
60
|
/** A tab of a Toolbar.Tabs. It is Toolbar.Tab. */
|
|
43
61
|
var TabButton = React.memo(function TabButton({ id, panelId, label, active, invalid, onPick }) {
|
|
44
62
|
const { tc } = useTranslation();
|
|
63
|
+
const ref = useScrollIntoTabRow(active);
|
|
45
64
|
return /* @__PURE__ */ jsx(RawButton, {
|
|
65
|
+
ref,
|
|
46
66
|
id,
|
|
47
67
|
tab: {
|
|
48
68
|
selected: active,
|
|
@@ -65,7 +85,9 @@ var TabLink = React.memo(function TabLink({ to, label, active, invalid, replace
|
|
|
65
85
|
const { tc } = useTranslation();
|
|
66
86
|
const { location } = useNavigation();
|
|
67
87
|
const isActive = active ?? (location ? isActivePath(location.pathname, to) : false);
|
|
88
|
+
const ref = useScrollIntoTabRow(isActive);
|
|
68
89
|
return /* @__PURE__ */ jsx(Link, {
|
|
90
|
+
ref,
|
|
69
91
|
to,
|
|
70
92
|
replace,
|
|
71
93
|
active: isActive,
|
|
@@ -44,7 +44,7 @@ function HoverCard({ children, content, placement = "top", offset = { mainAxis:
|
|
|
44
44
|
useFocus(context, { enabled }),
|
|
45
45
|
useDismiss(context, { enabled })
|
|
46
46
|
]);
|
|
47
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [cloneTrigger(children, refs.setReference, getReferenceProps), isOpen && enabled && /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(NewZIndex, { children: (zIndex) => /* @__PURE__ */ jsx(HoverCardSurface, {
|
|
47
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [cloneTrigger(children, refs.setReference, getReferenceProps, { "data-open": isOpen && enabled ? "" : void 0 }), isOpen && enabled && /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(NewZIndex, { children: (zIndex) => /* @__PURE__ */ jsx(HoverCardSurface, {
|
|
48
48
|
ref: refs.setFloating,
|
|
49
49
|
style: {
|
|
50
50
|
...floatingStyles,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import SplitView_default from "../../layout/SplitView/SplitView.js";
|
|
2
|
+
import { useDetailWidthDrag } from "./useDetailWidthDrag.js";
|
|
3
|
+
import React, { createContext, useContext, useEffect, useRef } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region ../ui-public/src/patterns/ListDetail/FloatingDetail.tsx
|
|
6
|
+
var SASH_STYLE = {
|
|
7
|
+
left: -5,
|
|
8
|
+
width: 10,
|
|
9
|
+
zIndex: 2
|
|
10
|
+
};
|
|
11
|
+
var MIN_VISIBLE_LIST_WIDTH = 360;
|
|
12
|
+
var OverlayCloseContext = createContext(void 0);
|
|
13
|
+
function useListDetailOverlayClose() {
|
|
14
|
+
return useContext(OverlayCloseContext);
|
|
15
|
+
}
|
|
16
|
+
var INTERACTIVE_SELECTOR = "a, button, input, select, textarea, label, [tabindex]:not([tabindex=\"-1\"]), [role=\"button\"], [role=\"option\"], [role=\"menuitem\"]";
|
|
17
|
+
/**
|
|
18
|
+
* Closes the detail on a click in the list area that is not on an
|
|
19
|
+
* interactive element. A click in a portal (a menu, a dialog) is out of the
|
|
20
|
+
* area, thus it does not close the detail.
|
|
21
|
+
*/
|
|
22
|
+
function useCloseOnEmptyClick(area, detail, onClose) {
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const areaElement = area.current;
|
|
25
|
+
if (!areaElement) return void 0;
|
|
26
|
+
function handleClick(event) {
|
|
27
|
+
const target = event.target;
|
|
28
|
+
if (!(target instanceof Element)) return;
|
|
29
|
+
if (detail.current?.contains(target)) return;
|
|
30
|
+
if (target.closest(INTERACTIVE_SELECTOR)) return;
|
|
31
|
+
onClose();
|
|
32
|
+
}
|
|
33
|
+
areaElement.addEventListener("click", handleClick);
|
|
34
|
+
return () => areaElement.removeEventListener("click", handleClick);
|
|
35
|
+
}, [
|
|
36
|
+
area,
|
|
37
|
+
detail,
|
|
38
|
+
onClose
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The detail over the list, at its right. The list keeps all the width and
|
|
43
|
+
* stays usable: a click on another row changes the detail. Thus there is
|
|
44
|
+
* no backdrop and no focus trap. A click on an empty part of the list closes
|
|
45
|
+
* the detail.
|
|
46
|
+
*/
|
|
47
|
+
function ListDetailFloatingDetail({ panel, onClose, resizable, containerWidth, container }) {
|
|
48
|
+
const detailRef = useRef(null);
|
|
49
|
+
useCloseOnEmptyClick(container, detailRef, onClose);
|
|
50
|
+
const { width, sashHandlers } = useDetailWidthDrag({
|
|
51
|
+
sashSide: "left",
|
|
52
|
+
maxWidth: containerWidth === void 0 ? void 0 : Math.max(360, containerWidth - MIN_VISIBLE_LIST_WIDTH)
|
|
53
|
+
});
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
ref: detailRef,
|
|
56
|
+
className: "ListDetailSplit__detail",
|
|
57
|
+
style: resizable ? { width } : void 0,
|
|
58
|
+
children: [resizable && /* @__PURE__ */ jsx(SplitView_default.Sash, {
|
|
59
|
+
split: "vertical",
|
|
60
|
+
allowResize: true,
|
|
61
|
+
style: SASH_STYLE,
|
|
62
|
+
...sashHandlers
|
|
63
|
+
}), /* @__PURE__ */ jsx(OverlayCloseContext.Provider, {
|
|
64
|
+
value: onClose,
|
|
65
|
+
children: panel
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
var FloatingDetail_default = React.memo(ListDetailFloatingDetail);
|
|
70
|
+
//#endregion
|
|
71
|
+
export { FloatingDetail_default as default, useListDetailOverlayClose };
|
|
@@ -3,11 +3,11 @@ import { getListDetailMaxWidth } from "./Split.js";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../ui-public/src/patterns/ListDetail/Overview.tsx
|
|
6
|
-
function ListDetailOverview({ children }) {
|
|
6
|
+
function ListDetailOverview({ children, placement }) {
|
|
7
7
|
const { listWidth, detailWidth } = useListDetailWidths();
|
|
8
8
|
return /* @__PURE__ */ jsx("div", {
|
|
9
9
|
className: "ListDetailOverview",
|
|
10
|
-
style: { maxWidth: getListDetailMaxWidth(listWidth, detailWidth) },
|
|
10
|
+
style: placement === "over" ? void 0 : { maxWidth: getListDetailMaxWidth(listWidth, detailWidth) },
|
|
11
11
|
children
|
|
12
12
|
});
|
|
13
13
|
}
|
|
@@ -32,11 +32,15 @@ function ListDetailPage({ detail, title, help, subtitle, menu, display, busy, fi
|
|
|
32
32
|
const { t, tm, tc } = useTranslation();
|
|
33
33
|
const titleText = tm(title);
|
|
34
34
|
const listState = state === "no-results" ? "ready" : state;
|
|
35
|
+
const content = overview ? {
|
|
36
|
+
state: listState,
|
|
37
|
+
overview: /* @__PURE__ */ jsx(Overview_default, {
|
|
38
|
+
placement: detail?.placement,
|
|
39
|
+
children: overview
|
|
40
|
+
})
|
|
41
|
+
} : { state: listState };
|
|
35
42
|
return /* @__PURE__ */ jsx(ListOrOverview_default, {
|
|
36
|
-
...
|
|
37
|
-
state: listState,
|
|
38
|
-
overview: /* @__PURE__ */ jsx(Overview_default, { children: overview })
|
|
39
|
-
} : { state: listState },
|
|
43
|
+
...content,
|
|
40
44
|
children: /* @__PURE__ */ jsx(Split_default, {
|
|
41
45
|
detail,
|
|
42
46
|
children: /* @__PURE__ */ jsx(Pane_default, {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Status } from "../../../icons/index.js";
|
|
1
|
+
import { Generic, Status } from "../../../icons/index.js";
|
|
2
2
|
import { useTranslation } from "../../i18n.js";
|
|
3
|
-
import "../../layout/SplitPane/toggle.js";
|
|
4
|
-
import "../../layout/SplitPane/index.js";
|
|
5
3
|
import Toolbar from "../../layout/Toolbar/index.js";
|
|
6
4
|
import BlankSlate_default from "../../feedback/BlankSlate.js";
|
|
7
5
|
import Pane_default from "../../layout/Pane/index.js";
|
|
8
|
-
import { useListDetailOverlayClose } from "./
|
|
6
|
+
import { useListDetailOverlayClose } from "./FloatingDetail.js";
|
|
7
|
+
import "./Split.js";
|
|
9
8
|
import Aside from "../../semantic/Aside.js";
|
|
10
9
|
import React from "react";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -19,11 +18,6 @@ function ListDetailPanel({ title, state = "ready", fetching, actions, toolbarAct
|
|
|
19
18
|
children: /* @__PURE__ */ jsx(Pane_default, {
|
|
20
19
|
className: "ListDetailPanel",
|
|
21
20
|
header: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
22
|
-
closeOverlay && /* @__PURE__ */ jsx(Toolbar.GoBack, {
|
|
23
|
-
onClick: closeOverlay,
|
|
24
|
-
ariaLabel: { id: "admin.listDetail.panel.close" },
|
|
25
|
-
action: "sidebar.toggleRight"
|
|
26
|
-
}),
|
|
27
21
|
/* @__PURE__ */ jsx(Toolbar.Title, {
|
|
28
22
|
level: 2,
|
|
29
23
|
children: tc(title)
|
|
@@ -34,7 +28,14 @@ function ListDetailPanel({ title, state = "ready", fetching, actions, toolbarAct
|
|
|
34
28
|
children: actions
|
|
35
29
|
}),
|
|
36
30
|
/* @__PURE__ */ jsx(Toolbar.Space, {}),
|
|
37
|
-
toolbarAction
|
|
31
|
+
toolbarAction,
|
|
32
|
+
closeOverlay && /* @__PURE__ */ jsx(Toolbar.Button, {
|
|
33
|
+
iconOnly: true,
|
|
34
|
+
icon: Generic.CloseIcon,
|
|
35
|
+
label: { id: "admin.listDetail.panel.close" },
|
|
36
|
+
tooltip: { action: "listDetail.close" },
|
|
37
|
+
onClick: closeOverlay
|
|
38
|
+
})
|
|
38
39
|
] }),
|
|
39
40
|
children: /* @__PURE__ */ jsxs("div", {
|
|
40
41
|
className: "ListDetailPanel__body",
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare const CLOSE_DETAIL_ACTION_ID = "listDetail.close";
|
|
2
3
|
export declare function getListDetailMaxWidth(listWidth: number | undefined, detailWidth: number | undefined): number;
|
|
3
4
|
export declare function useIsListDetailOpen(): boolean;
|
|
4
|
-
|
|
5
|
+
/** Where the panel of the open row goes */
|
|
6
|
+
export type ListDetailPlacement = 'beside' | 'over';
|
|
5
7
|
/** The detail of the open row */
|
|
6
8
|
export type ListDetailSplitDetail = {
|
|
7
9
|
/** The panel of the open row (a ListDetail.Panel). Without it, no row is open. */
|
|
8
10
|
panel?: React.ReactNode;
|
|
9
11
|
/**
|
|
10
|
-
* Closes the open row. Escape,
|
|
11
|
-
*
|
|
12
|
+
* Closes the open row. Escape, `]` and, when the panel goes over the
|
|
13
|
+
* list, the close button of the panel and a click on an empty part of the
|
|
14
|
+
* list run it.
|
|
12
15
|
*/
|
|
13
16
|
onClose: () => void;
|
|
14
17
|
/**
|
|
@@ -16,6 +19,16 @@ export type ListDetailSplitDetail = {
|
|
|
16
19
|
* only closes the open row.
|
|
17
20
|
*/
|
|
18
21
|
onReopen?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Where the panel goes. "beside": at the right of the list, and the list
|
|
24
|
+
* keeps a part of the width for the panel. Use it for a table with few,
|
|
25
|
+
* narrow columns. "over": the list takes all the width, and the open
|
|
26
|
+
* panel goes over the right part of the list. Use it for a table that
|
|
27
|
+
* needs the width. Below 1100px of window width, the panel always goes
|
|
28
|
+
* over the list.
|
|
29
|
+
* @default "beside"
|
|
30
|
+
*/
|
|
31
|
+
placement?: ListDetailPlacement;
|
|
19
32
|
};
|
|
20
33
|
export type ListDetailSplitProps = {
|
|
21
34
|
/** The rows open a detail at the right. Without it, the list is alone. */
|
|
@@ -25,11 +38,13 @@ export type ListDetailSplitProps = {
|
|
|
25
38
|
};
|
|
26
39
|
/**
|
|
27
40
|
* A list at the left and the detail of the open row at the right, as the
|
|
28
|
-
* records of a model in
|
|
29
|
-
* a row opens or closes, thus the user does not lose the row.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
41
|
+
* records of a model in DatoCMS. The list keeps its place and its width when
|
|
42
|
+
* a row opens or closes, thus the user does not lose the row.
|
|
43
|
+
* With the "beside" placement, the user resizes the list and the detail, and
|
|
44
|
+
* the space at the right of the detail stays empty. When no row is open, the
|
|
45
|
+
* place of the detail shows a blank slate that tells the user to open a row.
|
|
46
|
+
* With the "over" placement, and on a small viewport, the list takes all the
|
|
47
|
+
* width and the open detail goes over it.
|
|
33
48
|
* The widths come from the ListDetailWidthsProvider of the app.
|
|
34
49
|
*/
|
|
35
50
|
declare function ListDetailSplit({ detail, children }: ListDetailSplitProps): React.JSX.Element;
|
|
@@ -1,176 +1,160 @@
|
|
|
1
|
-
import { Misc
|
|
1
|
+
import { Misc } from "../../../icons/index.js";
|
|
2
2
|
import { useRegisterActions } from "../../actions/Actions/registry.js";
|
|
3
3
|
import { useMediaQuery } from "../../hooks/useMediaQuery.js";
|
|
4
4
|
import { CollectionRegionProvider } from "../../layout/Pane/PaneRegion.js";
|
|
5
|
-
import { useSashActionReveal } from "../../layout/SplitView/SashActionButton.js";
|
|
6
5
|
import SplitView_default from "../../layout/SplitView/SplitView.js";
|
|
7
6
|
import { TOGGLE_RIGHT_SIDEBAR_ACTION_ID } from "../../layout/SplitPane/toggle.js";
|
|
8
7
|
import SplitPane from "../../layout/SplitPane/index.js";
|
|
8
|
+
import BlankSlate_default from "../../feedback/BlankSlate.js";
|
|
9
9
|
import { useListDetailWidths } from "./Widths.js";
|
|
10
|
+
import { useDetailWidthDrag } from "./useDetailWidthDrag.js";
|
|
11
|
+
import FloatingDetail_default from "./FloatingDetail.js";
|
|
10
12
|
import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
11
13
|
import classNames from "classnames";
|
|
12
14
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
15
|
//#region ../ui-public/src/patterns/ListDetail/Split.tsx
|
|
14
16
|
var MIN_LIST_WIDTH = 360;
|
|
15
|
-
var DEFAULT_DETAIL_WIDTH = 500;
|
|
16
17
|
var MAX_FIRST_LIST_WIDTH = 1100;
|
|
17
|
-
var MIN_DETAIL_WIDTH = 360;
|
|
18
18
|
var DETAIL_SASH_STYLE = {
|
|
19
19
|
left: "auto",
|
|
20
20
|
right: -5,
|
|
21
21
|
width: 10,
|
|
22
22
|
zIndex: 2
|
|
23
23
|
};
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
left: -5,
|
|
27
|
-
width: 10,
|
|
28
|
-
zIndex: 2
|
|
29
|
-
};
|
|
24
|
+
var CLOSE_DETAIL_ACTION_ID = "listDetail.close";
|
|
25
|
+
var NARROW_VIEWPORT_MEDIA_QUERY = "(max-width: 1100px)";
|
|
30
26
|
var noop = () => {};
|
|
27
|
+
var EMPTY_DETAIL_TITLE = { id: "admin.listDetail.panel.empty.title" };
|
|
28
|
+
var EMPTY_DETAIL_DESCRIPTION = { id: "admin.listDetail.panel.empty.description" };
|
|
31
29
|
var DetailOpenContext = createContext(false);
|
|
32
|
-
var OverlayCloseContext = createContext(void 0);
|
|
33
30
|
function getListDetailMaxWidth(listWidth, detailWidth) {
|
|
34
|
-
return (listWidth ?? MAX_FIRST_LIST_WIDTH) + (detailWidth ??
|
|
31
|
+
return (listWidth ?? MAX_FIRST_LIST_WIDTH) + (detailWidth ?? 500);
|
|
35
32
|
}
|
|
36
33
|
function useIsListDetailOpen() {
|
|
37
34
|
return useContext(DetailOpenContext);
|
|
38
35
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* a row opens or closes, thus the user does not lose the row. When no row is
|
|
46
|
-
* open, there is no detail: the space at the right of the list stays empty.
|
|
47
|
-
* The user resizes the list and the detail; the space at the right of the
|
|
48
|
-
* detail stays empty. On a small viewport, the detail goes over the list.
|
|
49
|
-
* The widths come from the ListDetailWidthsProvider of the app.
|
|
50
|
-
*/
|
|
51
|
-
function ListDetailSplit({ detail, children }) {
|
|
52
|
-
const panel = detail?.panel;
|
|
53
|
-
const onCloseDetail = detail?.onClose ?? noop;
|
|
54
|
-
const { listWidth, onListWidthChange, detailWidth: storedDetailWidth, onDetailWidthChange } = useListDetailWidths();
|
|
55
|
-
const { matches: isOverlay } = useMediaQuery(OVERLAY_MEDIA_QUERY);
|
|
56
|
-
const isOpen = Boolean(panel);
|
|
57
|
-
const [container, setContainer] = useState(null);
|
|
58
|
-
const containerRef = useRef(null);
|
|
59
|
-
const setContainerElement = useCallback((element) => {
|
|
60
|
-
containerRef.current = element;
|
|
61
|
-
setContainer(element);
|
|
36
|
+
function useElementWidth() {
|
|
37
|
+
const [element, setElement] = useState(null);
|
|
38
|
+
const ref = useRef(null);
|
|
39
|
+
const setRef = useCallback((node) => {
|
|
40
|
+
ref.current = node;
|
|
41
|
+
setElement(node);
|
|
62
42
|
}, []);
|
|
63
|
-
const [
|
|
43
|
+
const [width, setWidth] = useState();
|
|
64
44
|
useEffect(() => {
|
|
65
|
-
if (!
|
|
45
|
+
if (!element) return void 0;
|
|
66
46
|
const observer = new ResizeObserver(() => {
|
|
67
|
-
|
|
47
|
+
setWidth(element.offsetWidth);
|
|
68
48
|
});
|
|
69
|
-
observer.observe(
|
|
49
|
+
observer.observe(element);
|
|
70
50
|
return () => observer.disconnect();
|
|
71
|
-
}, [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
dragStart.current = {
|
|
80
|
-
x,
|
|
81
|
-
width: detailWidth,
|
|
82
|
-
last: void 0
|
|
83
|
-
};
|
|
84
|
-
}, [detailWidth]);
|
|
85
|
-
const handleDetailDragMove = useCallback((x) => {
|
|
86
|
-
const { x: startX, width } = dragStart.current;
|
|
87
|
-
const newWidth = Math.max(MIN_DETAIL_WIDTH, width + x - startX);
|
|
88
|
-
dragStart.current.last = newWidth;
|
|
89
|
-
setDragDetailWidth(newWidth);
|
|
90
|
-
}, []);
|
|
91
|
-
const handleDetailDragEnd = useCallback(() => {
|
|
92
|
-
const { last } = dragStart.current;
|
|
93
|
-
if (last !== void 0) onDetailWidthChange(last);
|
|
94
|
-
setDragDetailWidth(void 0);
|
|
95
|
-
}, [onDetailWidthChange]);
|
|
96
|
-
const maxListWidth = containerWidth === void 0 ? void 0 : Math.max(MIN_LIST_WIDTH, containerWidth - MIN_DETAIL_WIDTH);
|
|
97
|
-
const firstListWidth = containerWidth === void 0 ? MAX_FIRST_LIST_WIDTH : Math.max(MIN_LIST_WIDTH, Math.min(MAX_FIRST_LIST_WIDTH, containerWidth - DEFAULT_DETAIL_WIDTH));
|
|
98
|
-
const size = Math.min(listWidth ?? firstListWidth, maxListWidth ?? Number.POSITIVE_INFINITY);
|
|
99
|
-
const hideButton = useSashActionReveal(isOpen && isOverlay);
|
|
51
|
+
}, [element]);
|
|
52
|
+
return {
|
|
53
|
+
ref,
|
|
54
|
+
setRef,
|
|
55
|
+
width
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function useDetailActions(isOpen, onClose, onReopen) {
|
|
100
59
|
useRegisterActions([{
|
|
101
|
-
id:
|
|
60
|
+
id: CLOSE_DETAIL_ACTION_ID,
|
|
102
61
|
name: { id: "admin.listDetail.panel.close" },
|
|
103
62
|
shortcut: { key: "escape" },
|
|
104
63
|
palette: "hidden",
|
|
105
64
|
applicable: () => isOpen,
|
|
106
|
-
run:
|
|
65
|
+
run: onClose
|
|
107
66
|
}, {
|
|
108
67
|
id: TOGGLE_RIGHT_SIDEBAR_ACTION_ID,
|
|
109
68
|
name: { id: "sidebar.toggleRight" },
|
|
110
69
|
icon: Misc.SidebarFlipIcon,
|
|
111
70
|
shortcut: { key: "]" },
|
|
112
|
-
applicable: () => isOpen || Boolean(
|
|
113
|
-
run: () => isOpen ?
|
|
71
|
+
applicable: () => isOpen || Boolean(onReopen),
|
|
72
|
+
run: () => isOpen ? onClose() : onReopen?.()
|
|
114
73
|
}]);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A list at the left and the detail of the open row at the right, as the
|
|
77
|
+
* records of a model in DatoCMS. The list keeps its place and its width when
|
|
78
|
+
* a row opens or closes, thus the user does not lose the row.
|
|
79
|
+
* With the "beside" placement, the user resizes the list and the detail, and
|
|
80
|
+
* the space at the right of the detail stays empty. When no row is open, the
|
|
81
|
+
* place of the detail shows a blank slate that tells the user to open a row.
|
|
82
|
+
* With the "over" placement, and on a small viewport, the list takes all the
|
|
83
|
+
* width and the open detail goes over it.
|
|
84
|
+
* The widths come from the ListDetailWidthsProvider of the app.
|
|
85
|
+
*/
|
|
86
|
+
function ListDetailSplit({ detail, children }) {
|
|
87
|
+
const panel = detail?.panel;
|
|
88
|
+
const onCloseDetail = detail?.onClose ?? noop;
|
|
89
|
+
const isOpen = Boolean(panel);
|
|
90
|
+
const { matches: isNarrowViewport } = useMediaQuery(NARROW_VIEWPORT_MEDIA_QUERY);
|
|
91
|
+
const placement = isNarrowViewport ? "over" : detail?.placement ?? "beside";
|
|
92
|
+
const container = useElementWidth();
|
|
93
|
+
useDetailActions(isOpen, onCloseDetail, detail?.onReopen);
|
|
115
94
|
const list = /* @__PURE__ */ jsx(DetailOpenContext.Provider, {
|
|
116
95
|
value: isOpen,
|
|
117
96
|
children: /* @__PURE__ */ jsx(CollectionRegionProvider, {
|
|
118
|
-
value:
|
|
97
|
+
value: container.ref,
|
|
119
98
|
children
|
|
120
99
|
})
|
|
121
100
|
});
|
|
122
101
|
return /* @__PURE__ */ jsx("div", {
|
|
123
|
-
ref:
|
|
102
|
+
ref: container.setRef,
|
|
124
103
|
className: classNames("ListDetailSplit", {
|
|
125
104
|
"ListDetailSplit--open": isOpen,
|
|
126
|
-
"ListDetailSplit--
|
|
105
|
+
"ListDetailSplit--over": placement === "over"
|
|
127
106
|
}),
|
|
128
|
-
children:
|
|
107
|
+
children: placement === "over" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
129
108
|
className: "ListDetailSplit__list",
|
|
130
109
|
children: list
|
|
131
|
-
}), isOpen && /* @__PURE__ */
|
|
110
|
+
}), isOpen && /* @__PURE__ */ jsx(FloatingDetail_default, {
|
|
111
|
+
panel,
|
|
112
|
+
onClose: onCloseDetail,
|
|
113
|
+
resizable: !isNarrowViewport,
|
|
114
|
+
containerWidth: container.width,
|
|
115
|
+
container: container.ref
|
|
116
|
+
})] }) : /* @__PURE__ */ jsx(BesideSplit, {
|
|
117
|
+
containerWidth: container.width,
|
|
118
|
+
detail,
|
|
119
|
+
list
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function BesideSplit({ containerWidth, detail, list }) {
|
|
124
|
+
const panel = detail?.panel;
|
|
125
|
+
const { listWidth, onListWidthChange } = useListDetailWidths();
|
|
126
|
+
const { width: detailWidth, sashHandlers } = useDetailWidthDrag({ sashSide: "right" });
|
|
127
|
+
const maxListWidth = containerWidth === void 0 ? void 0 : Math.max(MIN_LIST_WIDTH, containerWidth - 360);
|
|
128
|
+
const firstListWidth = containerWidth === void 0 ? MAX_FIRST_LIST_WIDTH : Math.max(MIN_LIST_WIDTH, Math.min(MAX_FIRST_LIST_WIDTH, containerWidth - 500));
|
|
129
|
+
const size = Math.min(listWidth ?? firstListWidth, maxListWidth ?? Number.POSITIVE_INFINITY);
|
|
130
|
+
return /* @__PURE__ */ jsxs(SplitPane, {
|
|
131
|
+
primaryPane: "right",
|
|
132
|
+
size,
|
|
133
|
+
minSize: MIN_LIST_WIDTH,
|
|
134
|
+
maxSize: maxListWidth,
|
|
135
|
+
onDragFinished: onListWidthChange,
|
|
136
|
+
children: [list, panel ? /* @__PURE__ */ jsxs("div", {
|
|
132
137
|
className: "ListDetailSplit__detail",
|
|
133
|
-
|
|
138
|
+
style: { width: detailWidth },
|
|
134
139
|
children: [/* @__PURE__ */ jsx(SplitView_default.Sash, {
|
|
135
140
|
split: "vertical",
|
|
136
|
-
allowResize:
|
|
137
|
-
style:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
children: panel
|
|
152
|
-
})]
|
|
153
|
-
})] }) : /* @__PURE__ */ jsxs(SplitPane, {
|
|
154
|
-
primaryPane: "right",
|
|
155
|
-
size,
|
|
156
|
-
minSize: MIN_LIST_WIDTH,
|
|
157
|
-
maxSize: maxListWidth,
|
|
158
|
-
onDragFinished: onListWidthChange,
|
|
159
|
-
children: [list, isOpen ? /* @__PURE__ */ jsxs("div", {
|
|
160
|
-
className: "ListDetailSplit__detail",
|
|
161
|
-
style: { width: detailWidth },
|
|
162
|
-
children: [/* @__PURE__ */ jsx(SplitView_default.Sash, {
|
|
163
|
-
split: "vertical",
|
|
164
|
-
allowResize: true,
|
|
165
|
-
style: DETAIL_SASH_STYLE,
|
|
166
|
-
onMouseDown: handleDetailDragStart,
|
|
167
|
-
onMouseMove: handleDetailDragMove,
|
|
168
|
-
onMouseUp: handleDetailDragEnd
|
|
169
|
-
}), panel]
|
|
170
|
-
}) : null]
|
|
171
|
-
})
|
|
141
|
+
allowResize: true,
|
|
142
|
+
style: DETAIL_SASH_STYLE,
|
|
143
|
+
...sashHandlers
|
|
144
|
+
}), panel]
|
|
145
|
+
}) : detail ? /* @__PURE__ */ jsx("div", {
|
|
146
|
+
className: "ListDetailSplit__detail ListDetailSplit__detail--empty",
|
|
147
|
+
style: { width: detailWidth },
|
|
148
|
+
children: /* @__PURE__ */ jsx(BlankSlate_default, {
|
|
149
|
+
placement: "area",
|
|
150
|
+
small: true,
|
|
151
|
+
icon: /* @__PURE__ */ jsx(Misc.SquareDashedIcon, {}),
|
|
152
|
+
title: EMPTY_DETAIL_TITLE,
|
|
153
|
+
description: EMPTY_DETAIL_DESCRIPTION
|
|
154
|
+
})
|
|
155
|
+
}) : null]
|
|
172
156
|
});
|
|
173
157
|
}
|
|
174
158
|
var Split_default = React.memo(ListDetailSplit);
|
|
175
159
|
//#endregion
|
|
176
|
-
export { Split_default as default, getListDetailMaxWidth, useIsListDetailOpen
|
|
160
|
+
export { CLOSE_DETAIL_ACTION_ID, Split_default as default, getListDetailMaxWidth, useIsListDetailOpen };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { getPaginatedListState, type ListDetailPageState, useOpenRowRoute, useReopenLastRow } from './Page.js';
|
|
2
|
-
import { getListDetailMaxWidth, useIsListDetailOpen } from './Split.js';
|
|
2
|
+
import { getListDetailMaxWidth, type ListDetailPlacement, useIsListDetailOpen } from './Split.js';
|
|
3
3
|
import { ListDetailWidthsProvider } from './Widths.js';
|
|
4
4
|
export declare const ListDetail: {
|
|
5
5
|
Page: import("react").MemoExoticComponent<({ detail, title, help, subtitle, menu, display, busy, filter, controls, button, footer, state, overview, children, }: import("./Page.js").ListDetailPageProps) => import("react").JSX.Element>;
|
|
6
6
|
Split: import("react").MemoExoticComponent<({ detail, children }: import("./Split.js").ListDetailSplitProps) => import("react").JSX.Element>;
|
|
7
7
|
Panel: import("react").MemoExoticComponent<({ title, state, fetching, actions, toolbarAction, entity, children, }: import("./Panel.js").ListDetailPanelProps) => import("react").JSX.Element>;
|
|
8
|
-
Overview: import("react").MemoExoticComponent<({ children }: {
|
|
8
|
+
Overview: import("react").MemoExoticComponent<({ children, placement }: {
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
+
placement?: ListDetailPlacement;
|
|
10
11
|
}) => import("react").JSX.Element>;
|
|
11
12
|
};
|
|
12
|
-
export { getListDetailMaxWidth, getPaginatedListState, type ListDetailPageState, ListDetailWidthsProvider, useIsListDetailOpen, useOpenRowRoute, useReopenLastRow, };
|
|
13
|
+
export { getListDetailMaxWidth, getPaginatedListState, type ListDetailPageState, type ListDetailPlacement, ListDetailWidthsProvider, useIsListDetailOpen, useOpenRowRoute, useReopenLastRow, };
|