datocms-react-ui 3.1.0-next.5 → 3.1.0-next.9
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/README.md +3 -2
- package/dist/DateInput.d.ts +2 -0
- package/dist/DateInput.js +2 -0
- package/dist/DateTimeInput.d.ts +2 -0
- package/dist/DateTimeInput.js +2 -0
- package/dist/DateTimeRangeInput.d.ts +2 -0
- package/dist/DateTimeRangeInput.js +2 -0
- package/dist/FieldTypeAvatar.d.ts +2 -0
- package/dist/FieldTypeAvatar.js +2 -0
- package/dist/FieldTypeName.d.ts +2 -0
- package/dist/FieldTypeName.js +2 -0
- package/dist/FilterBuilder.d.ts +2 -0
- package/dist/FilterBuilder.js +2 -0
- package/dist/LICENSE-lucide.txt +43 -0
- package/dist/RecordRow.d.ts +2 -0
- package/dist/RecordRow.js +2 -0
- package/dist/UploadCard.js +2 -2
- package/dist/UploadPreview.d.ts +2 -2
- package/dist/UploadPreview.js +1 -1
- package/dist/UserRow.d.ts +2 -0
- package/dist/UserRow.js +2 -0
- package/dist/react-ui/src/Canvas.d.ts +7 -1
- package/dist/react-ui/src/Canvas.js +26 -4
- package/dist/react-ui/src/ctxAnswer.js +21 -0
- package/dist/react-ui/src/ctxDateSettings.js +7 -5
- package/dist/react-ui/src/ctxRecordPresentation.js +34 -0
- package/dist/react-ui/src/ctxUploads.js +23 -0
- package/dist/styles.css +669 -63
- package/dist/ui-public/icons/index.js +313 -379
- 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/braces.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/hash.js +47 -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/letter-text.js +28 -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/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/rows-3.js +32 -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/toggle-right.js +32 -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 +76 -5
- package/dist/ui-public/src/Message.d.ts +3 -4
- package/dist/ui-public/src/UiTextKey.d.ts +1 -1
- package/dist/ui-public/src/actions/Actions/ActionTooltip.js +1 -1
- package/dist/ui-public/src/actions/Actions/registry.d.ts +2 -2
- package/dist/ui-public/src/actions/Actions/registry.js +2 -2
- package/dist/ui-public/src/actions/Button.d.ts +16 -11
- package/dist/ui-public/src/actions/Button.js +7 -1
- package/dist/ui-public/src/actions/Dropdown/Menu.d.ts +2 -2
- package/dist/ui-public/src/actions/Dropdown/Option.d.ts +7 -7
- package/dist/ui-public/src/actions/Dropdown/index.d.ts +1 -1
- package/dist/ui-public/src/actions/Dropdown/triggers/ButtonTrigger.d.ts +5 -5
- package/dist/ui-public/src/actions/Dropdown/triggers/DropdownTriggerButton.d.ts +2 -2
- package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.d.ts +6 -6
- package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.js +1 -1
- package/dist/ui-public/src/actions/EditorToolbar/Button.d.ts +1 -1
- package/dist/ui-public/src/actions/MultipleSelectionActionBar.d.ts +1 -1
- package/dist/ui-public/src/actions/SplitButton/Caret.js +2 -2
- package/dist/ui-public/src/actions/SplitButton/Halves.js +1 -1
- package/dist/ui-public/src/actions/SplitButton/index.d.ts +3 -3
- package/dist/ui-public/src/actions/disabledReason.d.ts +4 -4
- package/dist/ui-public/src/actions/disabledReason.js +1 -1
- package/dist/ui-public/src/content/Avatar.d.ts +3 -3
- package/dist/ui-public/src/content/Avatar.js +2 -2
- package/dist/ui-public/src/content/CodeSnippet.d.ts +1 -1
- package/dist/ui-public/src/content/CopyableValue.d.ts +1 -1
- package/dist/ui-public/src/content/EnvironmentPill.d.ts +1 -1
- package/dist/ui-public/src/content/EnvironmentPill.js +1 -1
- package/dist/ui-public/src/content/FieldTypeAvatar.d.ts +22 -0
- package/dist/ui-public/src/content/FieldTypeAvatar.js +35 -0
- package/dist/ui-public/src/content/FieldTypeName.d.ts +19 -0
- package/dist/ui-public/src/content/FieldTypeName.js +25 -0
- package/dist/ui-public/src/content/IconAvatar.d.ts +3 -2
- package/dist/ui-public/src/content/ItemStatus.d.ts +1 -1
- package/dist/ui-public/src/content/Pill.d.ts +1 -1
- package/dist/ui-public/src/content/SmartDate.d.ts +1 -1
- package/dist/ui-public/src/content/UploadPreview/asset.js +200 -0
- package/dist/ui-public/src/content/UploadPreview/audio.js +120 -0
- package/dist/ui-public/src/content/{UploadPreview.d.ts → UploadPreview/box.d.ts} +10 -10
- package/dist/ui-public/src/content/{UploadPreview.js → UploadPreview/box.js} +7 -7
- package/dist/ui-public/src/content/{uploadPreviewFit.d.ts → UploadPreview/fit.d.ts} +2 -2
- package/dist/ui-public/src/content/{uploadPreviewFit.js → UploadPreview/fit.js} +3 -3
- package/dist/ui-public/src/content/UploadPreview/index.d.ts +61 -0
- package/dist/ui-public/src/content/UploadPreview/index.js +36 -0
- package/dist/ui-public/src/content/UploadPreview/presentation.js +63 -0
- package/dist/ui-public/src/content/UploadPreview/thumbhash.js +91 -0
- package/dist/ui-public/src/content/UploadPreview/upload.d.ts +104 -0
- package/dist/ui-public/src/content/UploadPreview/upload.js +112 -0
- package/dist/ui-public/src/content/UploadThreatTriangle.js +1 -1
- package/dist/ui-public/src/content/UsageMeter.d.ts +1 -1
- package/dist/ui-public/src/content/ValidityTriangles.d.ts +1 -1
- package/dist/ui-public/src/content/ValidityTriangles.js +1 -1
- package/dist/ui-public/src/feedback/BlankSlate.d.ts +5 -5
- package/dist/ui-public/src/feedback/Callout.d.ts +5 -5
- package/dist/ui-public/src/feedback/Callout.js +1 -1
- package/dist/ui-public/src/feedback/ProgressBar.d.ts +4 -4
- package/dist/ui-public/src/feedback/Spinner.d.ts +6 -6
- package/dist/ui-public/src/feedback/Spinner.js +1 -1
- package/dist/ui-public/src/form/DateInput.d.ts +13 -0
- package/dist/ui-public/src/form/DateInput.js +16 -0
- package/dist/ui-public/src/form/DateTimeInput/Base.d.ts +89 -0
- package/dist/ui-public/src/form/DateTimeInput/Base.js +330 -0
- package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.d.ts +29 -0
- package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.js +195 -0
- package/dist/ui-public/src/form/DateTimeInput/dateText.js +38 -0
- package/dist/ui-public/src/form/DateTimeInput/index.d.ts +10 -0
- package/dist/ui-public/src/form/DateTimeInput/index.js +18 -0
- package/dist/ui-public/src/form/DateTimeInput/value.js +31 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/Panel.js +167 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/index.d.ts +123 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/index.js +186 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/rangeLabel.js +46 -0
- package/dist/ui-public/src/form/FieldHint.d.ts +2 -2
- package/dist/ui-public/src/form/FieldWrapper.d.ts +9 -9
- package/dist/ui-public/src/form/FieldWrapper.js +3 -3
- package/dist/ui-public/src/form/FilterBuilder/Editor.js +123 -0
- package/dist/ui-public/src/form/FilterBuilder/index.d.ts +9 -0
- package/dist/ui-public/src/form/FilterBuilder/index.js +294 -0
- package/dist/ui-public/src/form/FilterBuilder/types.d.ts +188 -0
- package/dist/ui-public/src/form/FilterBuilder/values.js +86 -0
- package/dist/ui-public/src/form/InputGroup.d.ts +2 -2
- package/dist/ui-public/src/form/InputGroup.js +1 -1
- package/dist/ui-public/src/form/KeyValueList.d.ts +1 -1
- package/dist/ui-public/src/form/Label.d.ts +2 -2
- package/dist/ui-public/src/form/PasswordInput.js +1 -9
- package/dist/ui-public/src/form/RadioGroupInput.d.ts +2 -2
- package/dist/ui-public/src/form/RadioGroupInput.js +1 -1
- package/dist/ui-public/src/form/SelectInput/SelectMenu.d.ts +2 -2
- package/dist/ui-public/src/form/SelectInput/index.d.ts +3 -3
- package/dist/ui-public/src/form/SwitchInput.d.ts +2 -2
- package/dist/ui-public/src/form/SwitchList.d.ts +1 -1
- package/dist/ui-public/src/form/SwitchList.js +1 -1
- package/dist/ui-public/src/form/TableList.d.ts +2 -2
- package/dist/ui-public/src/form/TextareaInput.js +1 -1
- package/dist/ui-public/src/form/inputProps.d.ts +6 -6
- package/dist/ui-public/src/hooks/useAsyncSelectOptions.d.ts +1 -1
- package/dist/ui-public/src/hooks/useSmartRowClick.d.ts +1 -1
- package/dist/ui-public/src/hooks/useSmartRowClick.js +1 -1
- package/dist/ui-public/src/layout/Page/PageGroup.d.ts +2 -2
- package/dist/ui-public/src/layout/Page/PageGroup.js +1 -1
- package/dist/ui-public/src/layout/Pane/FormHeader.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/FormHeader.js +1 -1
- package/dist/ui-public/src/layout/Pane/ListFilter.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/ListPresets.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/PaneHeader.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/index.d.ts +8 -8
- package/dist/ui-public/src/layout/Pane/index.js +17 -8
- package/dist/ui-public/src/layout/SidebarPanel.d.ts +1 -1
- package/dist/ui-public/src/layout/SplitPane/Rail.js +1 -1
- package/dist/ui-public/src/layout/SplitPane/index.d.ts +6 -6
- package/dist/ui-public/src/layout/SplitPane/index.js +16 -2
- package/dist/ui-public/src/layout/Toolbar/AddNewButton.d.ts +2 -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/Help.d.ts +3 -3
- package/dist/ui-public/src/layout/Toolbar/Help.js +2 -2
- package/dist/ui-public/src/layout/Toolbar/Note.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/Note.js +1 -1
- package/dist/ui-public/src/layout/Toolbar/Pagination.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/Pagination.js +1 -1
- package/dist/ui-public/src/layout/Toolbar/PresetsTitle.d.ts +3 -3
- package/dist/ui-public/src/layout/Toolbar/PresetsTitle.js +2 -2
- package/dist/ui-public/src/layout/Toolbar/PrimaryButton.d.ts +3 -3
- package/dist/ui-public/src/layout/Toolbar/Root.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/Root.js +4 -1
- package/dist/ui-public/src/layout/Toolbar/ToolbarTitleTrigger.js +1 -1
- package/dist/ui-public/src/lists/CardList.d.ts +3 -3
- package/dist/ui-public/src/lists/EmptySlot.d.ts +1 -1
- package/dist/ui-public/src/lists/InfoList/User.d.ts +1 -1
- package/dist/ui-public/src/lists/InfoList/Value.d.ts +1 -1
- package/dist/ui-public/src/lists/InfoList/Value.js +1 -1
- package/dist/ui-public/src/lists/InfoList/index.d.ts +3 -3
- package/dist/ui-public/src/lists/InfoList/index.js +1 -1
- package/dist/ui-public/src/lists/MediaCard.d.ts +7 -7
- package/dist/ui-public/src/lists/RecordRow/Image.d.ts +24 -0
- package/dist/ui-public/src/lists/RecordRow/Image.js +22 -0
- package/dist/ui-public/src/lists/RecordRow/List.d.ts +26 -0
- package/dist/ui-public/src/lists/RecordRow/List.js +30 -0
- package/dist/ui-public/src/lists/RecordRow/context.js +31 -0
- package/dist/ui-public/src/lists/RecordRow/index.d.ts +94 -0
- package/dist/ui-public/src/lists/RecordRow/index.js +122 -0
- package/dist/ui-public/src/lists/RecordRow/presentation.js +73 -0
- package/dist/ui-public/src/lists/RecordRow/types.d.ts +58 -0
- package/dist/ui-public/src/lists/RowList.d.ts +5 -5
- package/dist/ui-public/src/lists/SettingsList.d.ts +3 -3
- package/dist/ui-public/src/lists/SettingsList.js +2 -2
- package/dist/ui-public/src/lists/Table/Row.d.ts +5 -5
- package/dist/ui-public/src/lists/Table/Table.d.ts +3 -3
- package/dist/ui-public/src/lists/Table/TreeToggle.d.ts +2 -2
- package/dist/ui-public/src/lists/Table/TreeToggle.js +5 -4
- package/dist/ui-public/src/lists/Table/cells/LinkCell.d.ts +1 -1
- package/dist/ui-public/src/lists/TreeRow/Action.d.ts +1 -1
- package/dist/ui-public/src/lists/TreeRow/Action.js +1 -1
- package/dist/ui-public/src/lists/TreeRow/Link.d.ts +1 -1
- package/dist/ui-public/src/lists/TreeRow/Link.js +1 -1
- package/dist/ui-public/src/lists/UploadCard.d.ts +66 -3
- package/dist/ui-public/src/lists/UploadCard.js +116 -7
- package/dist/ui-public/src/lists/UserRow.d.ts +122 -0
- package/dist/ui-public/src/lists/UserRow.js +104 -0
- package/dist/ui-public/src/lists/dnd/DragHandle.d.ts +2 -2
- package/dist/ui-public/src/lists/dnd/SortableList.d.ts +1 -1
- package/dist/ui-public/src/lists/dnd/dropTargetClassName.d.ts +1 -1
- package/dist/ui-public/src/lists/dnd/tree/SortableTree.d.ts +2 -2
- package/dist/ui-public/src/navigation/Chevron.d.ts +4 -4
- package/dist/ui-public/src/navigation/Chevron.js +1 -1
- package/dist/ui-public/src/navigation/Link.d.ts +5 -5
- package/dist/ui-public/src/navigation/Link.js +1 -1
- package/dist/ui-public/src/navigation/NavList.d.ts +1 -1
- package/dist/ui-public/src/navigation/NavList.js +1 -1
- package/dist/ui-public/src/navigation/NavigationProvider.d.ts +1 -1
- package/dist/ui-public/src/navigation/SegmentedControl.d.ts +2 -2
- package/dist/ui-public/src/navigation/SettingsMenu.d.ts +8 -8
- package/dist/ui-public/src/navigation/SettingsMenu.js +1 -1
- package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNode.d.ts +4 -4
- 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/overlays/FullscreenModal/TitleContext.d.ts +1 -1
- package/dist/ui-public/src/overlays/FullscreenModal/TitleContext.js +1 -1
- package/dist/ui-public/src/overlays/HoverCard/index.js +1 -1
- package/dist/ui-public/src/overlays/NewZIndex.d.ts +1 -1
- package/dist/ui-public/src/overlays/NewZIndex.js +1 -1
- package/dist/ui-public/src/overlays/Popover.d.ts +1 -1
- package/dist/ui-public/src/overlays/PortalWrapper.js +1 -1
- package/dist/ui-public/src/overlays/useModalClose.js +3 -3
- 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.d.ts +8 -9
- package/dist/ui-public/src/patterns/ListDetail/Page.js +12 -9
- package/dist/ui-public/src/patterns/ListDetail/Panel.d.ts +2 -2
- package/dist/ui-public/src/patterns/ListDetail/Panel.js +12 -11
- package/dist/ui-public/src/patterns/ListDetail/Split.d.ts +25 -11
- 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/dist/ui-public/src/patterns/ListFormPage.d.ts +3 -3
- package/dist/ui-public/src/patterns/ListFormPage.js +1 -1
- package/dist/ui-public/src/semantic/Heading.d.ts +1 -1
- package/dist/ui-public/src/semantic/Heading.js +1 -1
- package/dist/ui-public/src/semantic/Image.js +1 -1
- package/dist/ui-public/src/semantic/Nav.d.ts +3 -3
- package/dist/ui-public/src/semantic/Nav.js +3 -3
- package/dist/ui-public/src/semantic/RawButton.d.ts +3 -3
- package/dist/ui-public/src/semantic/RawButton.js +1 -1
- package/dist/ui-public/src/semantic/Search.d.ts +1 -1
- package/dist/ui-public/src/semantic/Search.js +1 -1
- package/dist/ui-public/src/utils/fieldTypes.d.ts +29 -0
- package/dist/ui-public/src/utils/fieldTypes.js +94 -0
- package/dist/ui-public/src/utils/format.d.ts +21 -0
- package/dist/ui-public/src/utils/format.js +20 -0
- package/dist/ui-public/src/utils/formatDate.d.ts +10 -2
- package/dist/ui-public/src/utils/formatDate.js +4 -4
- package/dist/ui-public/src/utils/tickBatcher.js +44 -0
- package/dist/ui-public/src/utils/timezones.js +277 -0
- package/dist/ui-public/src/utils/weekStartForLocale.js +25 -0
- package/dist/utils/fieldTypes.d.ts +1 -0
- package/dist/utils/fieldTypes.js +2 -0
- package/dist/utils/format.d.ts +1 -0
- package/dist/utils/format.js +2 -0
- package/package.json +3 -3
- 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/fieldgroup-boolean.js +0 -18
- package/dist/ui-public/icons/custom/fieldgroup-color.js +0 -18
- package/dist/ui-public/icons/custom/fieldgroup-datetime.js +0 -49
- package/dist/ui-public/icons/custom/fieldgroup-json.js +0 -18
- package/dist/ui-public/icons/custom/fieldgroup-location.js +0 -19
- package/dist/ui-public/icons/custom/fieldgroup-media.js +0 -18
- package/dist/ui-public/icons/custom/fieldgroup-number.js +0 -18
- package/dist/ui-public/icons/custom/fieldgroup-reference.js +0 -18
- package/dist/ui-public/icons/custom/fieldgroup-rich_text.js +0 -18
- package/dist/ui-public/icons/custom/fieldgroup-seo.js +0 -22
- package/dist/ui-public/icons/custom/fieldgroup-structured_text.js +0 -61
- 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
|
@@ -24,9 +24,9 @@ export type SettingsMenuGroupProps = {
|
|
|
24
24
|
};
|
|
25
25
|
/** A group of items, with an optional title */
|
|
26
26
|
declare function Group({ name, children }: SettingsMenuGroupProps): React.JSX.Element;
|
|
27
|
-
/** The item goes to a page of
|
|
27
|
+
/** The item goes to a page of DatoCMS */
|
|
28
28
|
export type SettingsMenuPageItem = {
|
|
29
|
-
/** The page of
|
|
29
|
+
/** The page of DatoCMS, for example "/project-settings/site" */
|
|
30
30
|
to: string;
|
|
31
31
|
/** The item is active only when the URL is exactly `to` */
|
|
32
32
|
exact?: boolean;
|
|
@@ -39,7 +39,7 @@ export type SettingsMenuPageItem = {
|
|
|
39
39
|
onClick?: never;
|
|
40
40
|
newTab?: never;
|
|
41
41
|
};
|
|
42
|
-
/** The item goes to
|
|
42
|
+
/** The item goes to another site */
|
|
43
43
|
export type SettingsMenuLinkItem = {
|
|
44
44
|
/** The address of the page, for example "https://www.datocms.com" */
|
|
45
45
|
href: string;
|
|
@@ -61,7 +61,7 @@ export type SettingsMenuActionItem = {
|
|
|
61
61
|
active?: never;
|
|
62
62
|
href?: never;
|
|
63
63
|
};
|
|
64
|
-
/** Where the item goes: a page of
|
|
64
|
+
/** Where the item goes: a page of DatoCMS, another site, or an action */
|
|
65
65
|
export type SettingsMenuItemDestination = SettingsMenuPageItem | SettingsMenuLinkItem | SettingsMenuActionItem;
|
|
66
66
|
export type SettingsMenuItemProps = SettingsMenuItemDestination & {
|
|
67
67
|
/** An icon before the label */
|
|
@@ -73,14 +73,14 @@ export type SettingsMenuItemProps = SettingsMenuItemDestination & {
|
|
|
73
73
|
};
|
|
74
74
|
/** A section of the settings area */
|
|
75
75
|
declare function Item(props: SettingsMenuItemProps): React.JSX.Element;
|
|
76
|
-
/** The notice opens a page of
|
|
76
|
+
/** The notice opens a page of DatoCMS */
|
|
77
77
|
export type SettingsMenuNoticePageLink = {
|
|
78
|
-
/** The page of
|
|
78
|
+
/** The page of DatoCMS, for example "/project-settings" */
|
|
79
79
|
to: string;
|
|
80
80
|
href?: never;
|
|
81
81
|
newTab?: never;
|
|
82
82
|
};
|
|
83
|
-
/** The notice opens
|
|
83
|
+
/** The notice opens another site */
|
|
84
84
|
export type SettingsMenuNoticeExternalLink = {
|
|
85
85
|
/** The address of the page, for example "https://www.datocms.com" */
|
|
86
86
|
href: string;
|
|
@@ -95,7 +95,7 @@ export type SettingsMenuNoticeProps = (SettingsMenuNoticePageLink | SettingsMenu
|
|
|
95
95
|
children: ReactNode;
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
|
-
* A link for the footer of the menu. All the box is the link,
|
|
98
|
+
* A link for the footer of the menu. All the box is the link, so do not
|
|
99
99
|
* put other links in the text.
|
|
100
100
|
*/
|
|
101
101
|
declare function Notice(props: SettingsMenuNoticeProps): React.JSX.Element;
|
|
@@ -63,7 +63,7 @@ function Item(props) {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* A link for the footer of the menu. All the box is the link,
|
|
66
|
+
* A link for the footer of the menu. All the box is the link, so do not
|
|
67
67
|
* put other links in the text.
|
|
68
68
|
*/
|
|
69
69
|
function Notice(props) {
|
|
@@ -26,7 +26,7 @@ type ClickAction = {
|
|
|
26
26
|
href?: never;
|
|
27
27
|
newTab?: never;
|
|
28
28
|
};
|
|
29
|
-
/** A link to a page of
|
|
29
|
+
/** A link to a page of DatoCMS */
|
|
30
30
|
type LinkAction = {
|
|
31
31
|
/** The page of the node: the path with its query */
|
|
32
32
|
to: string;
|
|
@@ -41,7 +41,7 @@ type LinkAction = {
|
|
|
41
41
|
onClick?: () => void;
|
|
42
42
|
href?: never;
|
|
43
43
|
};
|
|
44
|
-
/** A link to
|
|
44
|
+
/** A link to another site */
|
|
45
45
|
type ExternalLinkAction = {
|
|
46
46
|
href: string;
|
|
47
47
|
/** Opens the page in a new tab */
|
|
@@ -70,7 +70,7 @@ type InTree = {
|
|
|
70
70
|
type OutOfTree = {
|
|
71
71
|
/**
|
|
72
72
|
* The node is next to a tree, but not in it. It keeps the space of the
|
|
73
|
-
* toggle,
|
|
73
|
+
* toggle, so its icon aligns with the icons of the tree.
|
|
74
74
|
* @default false
|
|
75
75
|
*/
|
|
76
76
|
alignWithTree?: boolean;
|
|
@@ -106,7 +106,7 @@ export type SidebarTreeNodeProps = SidebarTreeNodeAction & SidebarTreeNodePlacem
|
|
|
106
106
|
* scrolls the node into view
|
|
107
107
|
*/
|
|
108
108
|
highlighted?: boolean;
|
|
109
|
-
/** Only for the
|
|
109
|
+
/** Only for the position of the node, not for its look */
|
|
110
110
|
className?: string;
|
|
111
111
|
};
|
|
112
112
|
declare function SidebarTreeNode({ label, afterTitle, details, trailing, icon, to, exact, href, newTab, onClick, onDoubleClick, active: isActiveProp, actions, tree, highlighted, alignWithTree, className, }: SidebarTreeNodeProps): React.JSX.Element;
|
|
@@ -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, {
|
|
@@ -4,7 +4,7 @@ export declare const FullscreenModalTitleContext: React.Context<Message | null>;
|
|
|
4
4
|
/**
|
|
5
5
|
* Gives the title of the FullscreenModal around the component, already
|
|
6
6
|
* rendered, or null out of a FullscreenModal. A content that is also a page
|
|
7
|
-
* (a record form, a list) shows it in its toolbar
|
|
7
|
+
* (a record form, a list) shows it in its toolbar instead of the title of
|
|
8
8
|
* the page.
|
|
9
9
|
*/
|
|
10
10
|
export declare function useFullscreenModalTitle(): React.ReactElement | null;
|
|
@@ -6,7 +6,7 @@ var FullscreenModalTitleContext = React.createContext(null);
|
|
|
6
6
|
/**
|
|
7
7
|
* Gives the title of the FullscreenModal around the component, already
|
|
8
8
|
* rendered, or null out of a FullscreenModal. A content that is also a page
|
|
9
|
-
* (a record form, a list) shows it in its toolbar
|
|
9
|
+
* (a record form, a list) shows it in its toolbar instead of the title of
|
|
10
10
|
* the page.
|
|
11
11
|
*/
|
|
12
12
|
function useFullscreenModalTitle() {
|
|
@@ -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,
|
|
@@ -8,7 +8,7 @@ export type NewZIndexProps = {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Gives its content a z-index 10 higher than the one of the parent layer.
|
|
11
|
-
* Every floating layer (dialog, menu, tooltip) wraps its box in it,
|
|
11
|
+
* Every floating layer (dialog, menu, tooltip) wraps its box in it, so a
|
|
12
12
|
* layer always shows over its parent.
|
|
13
13
|
*/
|
|
14
14
|
export default function NewZIndex({ children, forcedValue }: NewZIndexProps): React.JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
var ZIndexContext = React.createContext(10050);
|
|
5
5
|
/**
|
|
6
6
|
* Gives its content a z-index 10 higher than the one of the parent layer.
|
|
7
|
-
* Every floating layer (dialog, menu, tooltip) wraps its box in it,
|
|
7
|
+
* Every floating layer (dialog, menu, tooltip) wraps its box in it, so a
|
|
8
8
|
* layer always shows over its parent.
|
|
9
9
|
*/
|
|
10
10
|
function NewZIndex({ children, forcedValue }) {
|
|
@@ -20,7 +20,7 @@ export type PopoverProps = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Runs when the user presses Escape or clicks out of the popover. A click
|
|
22
22
|
* on the anchor does not run it, because the anchor opens and closes the
|
|
23
|
-
* popover. Without it, the popover stays open until
|
|
23
|
+
* popover. Without it, the popover stays open until you remove it.
|
|
24
24
|
*/
|
|
25
25
|
onClose?: () => void;
|
|
26
26
|
/**
|
|
@@ -5,7 +5,7 @@ var PortalWrapperContext = createContext(null);
|
|
|
5
5
|
/**
|
|
6
6
|
* Gives a wrapper to the content of each Portal below it. A portal renders
|
|
7
7
|
* at the end of the body, out of the elements of the host. The `Canvas` of
|
|
8
|
-
* react-ui writes the color tokens on its element,
|
|
8
|
+
* react-ui writes the color tokens on its element, so its wrapper writes
|
|
9
9
|
* them again around the content of a portal. The apps give no wrapper.
|
|
10
10
|
*/
|
|
11
11
|
function PortalWrapperProvider({ value, children }) {
|
|
@@ -11,9 +11,9 @@ var ModalCloseContext = React.createContext({
|
|
|
11
11
|
var openDialogLayers = [];
|
|
12
12
|
/**
|
|
13
13
|
* Gives a dialog its z-index. A dialog shows over its parent layer and over
|
|
14
|
-
* all the dialogs that are open,
|
|
14
|
+
* all the dialogs that are open, even when it is not inside them in the
|
|
15
15
|
* React tree (for example a dialog that opens from the root of the app).
|
|
16
|
-
*
|
|
16
|
+
* So the last dialog that opens is on top. Its `ActionLayer` gets the
|
|
17
17
|
* keys in the same order.
|
|
18
18
|
*/
|
|
19
19
|
function useDialogLayer() {
|
|
@@ -42,7 +42,7 @@ function closeAction(close) {
|
|
|
42
42
|
* element that matches `initialFocus`, or to the dialog. When the dialog
|
|
43
43
|
* closes, the focus goes back to the element that opened it, or to its
|
|
44
44
|
* nearest ancestor when the element left the page. It also gives
|
|
45
|
-
* the language of that element: the dialog is in a Portal,
|
|
45
|
+
* the language of that element: the dialog is in a Portal, so it does not
|
|
46
46
|
* get the `lang` of the page around the trigger.
|
|
47
47
|
*/
|
|
48
48
|
function useDialogFocus(initialFocus) {
|
|
@@ -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, so 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. So 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
|
}
|
|
@@ -13,15 +13,14 @@ import { type ListDetailSplitDetail } from './Split.js';
|
|
|
13
13
|
export type ListDetailPageState = 'loading' | 'empty' | 'no-results' | 'ready';
|
|
14
14
|
/**
|
|
15
15
|
* The state of a list that the server filters and paginates. `isEmpty` is
|
|
16
|
-
* undefined until the first load ends
|
|
17
|
-
* the cms).
|
|
16
|
+
* undefined until the first load ends.
|
|
18
17
|
*/
|
|
19
18
|
export declare function getPaginatedListState(isEmpty: boolean | undefined, isFiltering: boolean): ListDetailPageState;
|
|
20
19
|
export type ListDetailPageProps = {
|
|
21
|
-
/** The rows open a detail
|
|
20
|
+
/** The rows open a detail on the right (see ListDetail.Split) */
|
|
22
21
|
detail?: ListDetailSplitDetail;
|
|
23
22
|
/**
|
|
24
|
-
* The Pane uses the title as the label of the filter form,
|
|
23
|
+
* The Pane uses the title as the label of the filter form, so it is a
|
|
25
24
|
* TextMessage
|
|
26
25
|
*/
|
|
27
26
|
title: TextMessage;
|
|
@@ -41,8 +40,8 @@ export type ListDetailPageProps = {
|
|
|
41
40
|
/** The list loads in the background. The title bar shows a small spinner. */
|
|
42
41
|
busy?: boolean;
|
|
43
42
|
/**
|
|
44
|
-
* The filter of the list: the result of useFilterToolbar (
|
|
45
|
-
*
|
|
43
|
+
* The filter of the list: the result of useFilterToolbar (see Toolbar) and the
|
|
44
|
+
* filter form. The form shows in a toolbar under the title bar while
|
|
46
45
|
* the filter toolbar is open. A list without a filter does not set it.
|
|
47
46
|
*/
|
|
48
47
|
filter?: {
|
|
@@ -88,9 +87,9 @@ type ListDetailPageContent =
|
|
|
88
87
|
};
|
|
89
88
|
/**
|
|
90
89
|
* The page of a list with a panel for the open row: a title bar with the
|
|
91
|
-
* filter toggle, the filter form, the list and the panel
|
|
90
|
+
* filter toggle, the filter form, the list and the panel on the right. The
|
|
92
91
|
* page gives the data, the filter form, the table and the panel. Put it in
|
|
93
|
-
*
|
|
92
|
+
* your Main.
|
|
94
93
|
*/
|
|
95
94
|
declare function ListDetailPage({ detail, title, help, subtitle, menu, display, busy, filter, controls, button, footer, state, overview, children, }: ListDetailPageProps): React.JSX.Element;
|
|
96
95
|
declare const _default: React.MemoExoticComponent<typeof ListDetailPage>;
|
|
@@ -98,7 +97,7 @@ export default _default;
|
|
|
98
97
|
/**
|
|
99
98
|
* The open row of a ListDetail.Page is in the URL: "<baseUrl>/<id>". The id
|
|
100
99
|
* can have more segments (for example, "invitations/12"). The open and the
|
|
101
|
-
* close keep the query of the URL,
|
|
100
|
+
* close keep the query of the URL, so the list keeps its filter and its
|
|
102
101
|
* page. When a row is open, the open of another row (for example with the
|
|
103
102
|
* arrows) replaces the step in the history: the history does not keep each
|
|
104
103
|
* row. Give `idPattern` (the source of a regular expression for the segment
|
|
@@ -14,8 +14,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
//#region ../ui-public/src/patterns/ListDetail/Page.tsx
|
|
15
15
|
/**
|
|
16
16
|
* The state of a list that the server filters and paginates. `isEmpty` is
|
|
17
|
-
* undefined until the first load ends
|
|
18
|
-
* the cms).
|
|
17
|
+
* undefined until the first load ends.
|
|
19
18
|
*/
|
|
20
19
|
function getPaginatedListState(isEmpty, isFiltering) {
|
|
21
20
|
if (isEmpty === void 0) return "loading";
|
|
@@ -24,19 +23,23 @@ function getPaginatedListState(isEmpty, isFiltering) {
|
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
25
|
* The page of a list with a panel for the open row: a title bar with the
|
|
27
|
-
* filter toggle, the filter form, the list and the panel
|
|
26
|
+
* filter toggle, the filter form, the list and the panel on the right. The
|
|
28
27
|
* page gives the data, the filter form, the table and the panel. Put it in
|
|
29
|
-
*
|
|
28
|
+
* your Main.
|
|
30
29
|
*/
|
|
31
30
|
function ListDetailPage({ detail, title, help, subtitle, menu, display, busy, filter, controls, button, footer, state, overview, children }) {
|
|
32
31
|
const { t, tm, tc } = useTranslation();
|
|
33
32
|
const titleText = tm(title);
|
|
34
33
|
const listState = state === "no-results" ? "ready" : state;
|
|
34
|
+
const content = overview ? {
|
|
35
|
+
state: listState,
|
|
36
|
+
overview: /* @__PURE__ */ jsx(Overview_default, {
|
|
37
|
+
placement: detail?.placement,
|
|
38
|
+
children: overview
|
|
39
|
+
})
|
|
40
|
+
} : { state: listState };
|
|
35
41
|
return /* @__PURE__ */ jsx(ListOrOverview_default, {
|
|
36
|
-
...
|
|
37
|
-
state: listState,
|
|
38
|
-
overview: /* @__PURE__ */ jsx(Overview_default, { children: overview })
|
|
39
|
-
} : { state: listState },
|
|
42
|
+
...content,
|
|
40
43
|
children: /* @__PURE__ */ jsx(Split_default, {
|
|
41
44
|
detail,
|
|
42
45
|
children: /* @__PURE__ */ jsx(Pane_default, {
|
|
@@ -84,7 +87,7 @@ function matchOpenRowId(pathname, baseUrl, idPattern) {
|
|
|
84
87
|
/**
|
|
85
88
|
* The open row of a ListDetail.Page is in the URL: "<baseUrl>/<id>". The id
|
|
86
89
|
* can have more segments (for example, "invitations/12"). The open and the
|
|
87
|
-
* close keep the query of the URL,
|
|
90
|
+
* close keep the query of the URL, so the list keeps its filter and its
|
|
88
91
|
* page. When a row is open, the open of another row (for example with the
|
|
89
92
|
* arrows) replaces the step in the history: the history does not keep each
|
|
90
93
|
* row. Give `idPattern` (the source of a regular expression for the segment
|
|
@@ -37,7 +37,7 @@ type ListDetailPanelState =
|
|
|
37
37
|
toolbarAction?: React.ReactNode;
|
|
38
38
|
/**
|
|
39
39
|
* The element that the panel shows: its name and a line under it (for
|
|
40
|
-
* example the email of a member), with an optional image
|
|
40
|
+
* example the email of a member), with an optional image on the left
|
|
41
41
|
* (for example an avatar). Without it, the page writes its own
|
|
42
42
|
* `ListDetailPanel__entity` block in the children.
|
|
43
43
|
*/
|
|
@@ -56,7 +56,7 @@ export type ListDetailPanelProps = {
|
|
|
56
56
|
*/
|
|
57
57
|
title: TextMessage;
|
|
58
58
|
} & ListDetailPanelState;
|
|
59
|
-
/** The panel
|
|
59
|
+
/** The panel on the right of a ListDetail.Page that shows the open row */
|
|
60
60
|
declare function ListDetailPanel({ title, state, fetching, actions, toolbarAction, entity, children, }: ListDetailPanelProps): React.JSX.Element;
|
|
61
61
|
declare const _default: React.MemoExoticComponent<typeof ListDetailPanel>;
|
|
62
62
|
export default _default;
|
|
@@ -1,16 +1,15 @@
|
|
|
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";
|
|
12
11
|
//#region ../ui-public/src/patterns/ListDetail/Panel.tsx
|
|
13
|
-
/** The panel
|
|
12
|
+
/** The panel on the right of a ListDetail.Page that shows the open row */
|
|
14
13
|
function ListDetailPanel({ title, state = "ready", fetching, actions, toolbarAction, entity, children }) {
|
|
15
14
|
const { t, tm, tc } = useTranslation();
|
|
16
15
|
const closeOverlay = useListDetailOverlayClose();
|
|
@@ -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,21 +19,32 @@ export type ListDetailSplitDetail = {
|
|
|
16
19
|
* only closes the open row.
|
|
17
20
|
*/
|
|
18
21
|
onReopen?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Where the panel goes. "beside": on 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. There is no default: choose the placement for each list.
|
|
29
|
+
*/
|
|
30
|
+
placement: ListDetailPlacement;
|
|
19
31
|
};
|
|
20
32
|
export type ListDetailSplitProps = {
|
|
21
|
-
/** The rows open a detail
|
|
33
|
+
/** The rows open a detail on the right. Without it, the list is alone. */
|
|
22
34
|
detail?: ListDetailSplitDetail;
|
|
23
35
|
/** The list: a Pane */
|
|
24
36
|
children: React.ReactNode;
|
|
25
37
|
};
|
|
26
38
|
/**
|
|
27
|
-
* A list
|
|
28
|
-
* records of a model in
|
|
29
|
-
* a row opens or closes,
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
39
|
+
* A list on the left and the detail of the open row on the right, as the
|
|
40
|
+
* records of a model in DatoCMS. The list keeps its place and its width when
|
|
41
|
+
* a row opens or closes, so the user does not lose the row.
|
|
42
|
+
* With the "beside" placement, the user resizes the list and the detail, and
|
|
43
|
+
* the space on the right of the detail stays empty. When no row is open, the
|
|
44
|
+
* space of the detail shows a blank slate that says to open a row.
|
|
45
|
+
* With the "over" placement, and on a small viewport, the list takes all the
|
|
46
|
+
* width and the open detail goes over it.
|
|
47
|
+
* The widths come from the ListDetailWidthsProvider of the host.
|
|
34
48
|
*/
|
|
35
49
|
declare function ListDetailSplit({ detail, children }: ListDetailSplitProps): React.JSX.Element;
|
|
36
50
|
declare const _default: React.MemoExoticComponent<typeof ListDetailSplit>;
|