@epam/ai-dial-ui-kit 0.14.0-dev.9 → 0.15.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -3
- package/dist/CHANGELOG.md +17 -2
- package/dist/DateCellRenderer-BVM-Q8yx.cjs +63 -0
- package/dist/DateCellRenderer-ssp7eaZY.cjs +1 -0
- package/dist/IconButton-DWqoaBWf.cjs +1 -0
- package/dist/JsonEditor-qv1Z0dLX.cjs +1 -0
- package/dist/MarkdownEditor-DHn2pYOJ.cjs +1 -0
- package/dist/MarkdownEditor-jQ8nDJfx.cjs +1 -0
- package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +1 -0
- package/dist/Switch-CUKClcEz.cjs +1 -0
- package/dist/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +31 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.js +7 -0
- package/dist/assets/icons/add-child.svg.js +5 -0
- package/dist/assets/icons/add-sibling.svg.js +5 -0
- package/dist/assets/icons/copy-to.svg.js +5 -0
- package/dist/assets/icons/file/c.svg.js +5 -0
- package/dist/assets/icons/file/cpp.svg.js +5 -0
- package/dist/assets/icons/file/cs.svg.js +5 -0
- package/dist/assets/icons/file/ini.svg.js +5 -0
- package/dist/assets/icons/file/json.svg.js +5 -0
- package/dist/assets/icons/file/md.svg.js +5 -0
- package/dist/assets/icons/file/py.svg.js +5 -0
- package/dist/assets/icons/loader.svg.js +5 -0
- package/dist/assets/icons/move-to.svg.js +5 -0
- package/dist/assets/icons/no-data.svg.js +5 -0
- package/dist/assets/icons/open-popup.svg.js +5 -0
- package/dist/assets/icons/unshare.svg.js +5 -0
- package/dist/components/Accordion/Accordion.js +70 -0
- package/dist/components/Analytics/Bar/Bar.js +80 -0
- package/dist/components/Analytics/Bar/utils.js +24 -0
- package/dist/components/Analytics/BarGroup/BarGroup.js +142 -0
- package/dist/components/Analytics/Card/Card.js +87 -0
- package/dist/components/Analytics/ErrorTag/ErrorTag.js +19 -0
- package/dist/components/Analytics/Histogram/Histogram.js +200 -0
- package/dist/components/Analytics/Histogram/utils.js +45 -0
- package/dist/components/AutocompleteInput/AutocompleteInputValue.js +21 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +126 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +83 -0
- package/dist/components/Breadcrumb/constants.js +20 -0
- package/dist/components/Button/Button.js +53 -0
- package/dist/components/Button/ButtonWrappers.js +40 -0
- package/dist/components/Button/constants.js +29 -0
- package/dist/components/Button/utils.js +11 -0
- package/dist/components/ButtonDropdown/ButtonDropdown.js +33 -0
- package/dist/components/ButtonDropdown/constants.js +8 -0
- package/dist/components/CaptionText/CaptionText.js +27 -0
- package/dist/components/Checkbox/Checkbox.js +64 -0
- package/dist/components/Checkbox/constants.js +4 -0
- package/dist/components/CloseButton/CloseButton.js +27 -0
- package/dist/components/CollapsibleSidebar/CollapsibleSidebar.js +84 -0
- package/dist/components/ConfirmationPopup/ConfirmationPopup.js +75 -0
- package/dist/components/ConfirmationPopup/constants.js +32 -0
- package/dist/components/DraggableItem/DraggableItem.js +61 -0
- package/dist/components/DraggableItem/constants.js +6 -0
- package/dist/components/Dropdown/Dropdown.js +293 -0
- package/dist/components/Dropdown/DropdownSubMenuItem.js +121 -0
- package/dist/components/Dropdown/constants.js +24 -0
- package/dist/components/DropdownIcon/DropdownIcon.js +92 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +75 -0
- package/dist/components/EllipsisTooltip/constants.js +4 -0
- package/dist/components/FabButton/FabButton.js +35 -0
- package/dist/components/FileIcon/FileIcon.js +37 -0
- package/dist/components/FileIcon/constants.js +60 -0
- package/dist/components/FileManager/FileManager.js +887 -0
- package/dist/components/FileManager/FileManagerContext.js +5 -0
- package/dist/components/FileManager/FileManagerProvider.js +770 -0
- package/dist/components/FileManager/FileManagerTooltip.js +92 -0
- package/dist/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.js +293 -0
- package/dist/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.js +201 -0
- package/dist/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.js +52 -0
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.js +103 -0
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/constants.js +5 -0
- package/dist/components/FileManager/components/FileManagerDeleteConfirmationPopup/FileManagerDeleteConfirmationPopup.js +56 -0
- package/dist/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.js +69 -0
- package/dist/components/FileManager/components/FileManagerItemName/FileManagerItemName.js +100 -0
- package/dist/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.js +93 -0
- package/dist/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.js +165 -0
- package/dist/components/FileManager/components/FileManagerNavigationPanel/constants.js +6 -0
- package/dist/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.js +120 -0
- package/dist/components/FileManager/components/FileMetadataPopup/FileMetadataPopup.js +119 -0
- package/dist/components/FileManager/components/FileMetadataPopup/constants.js +9 -0
- package/dist/components/FileManager/components/FoldersTree/FoldersTree.js +180 -0
- package/dist/components/FileManager/components/FoldersTree/constants.js +9 -0
- package/dist/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.js +51 -0
- package/dist/components/FileManager/constants.js +28 -0
- package/dist/components/FileManager/errors.js +10 -0
- package/dist/components/FileManager/hooks/use-bulk-actions.js +143 -0
- package/dist/components/FileManager/hooks/use-collapse-tree.js +22 -0
- package/dist/components/FileManager/hooks/use-conflict-resolution.js +158 -0
- package/dist/components/FileManager/hooks/use-current-path.js +29 -0
- package/dist/components/FileManager/hooks/use-file-clipboard.js +154 -0
- package/dist/components/FileManager/hooks/use-file-delete.js +39 -0
- package/dist/components/FileManager/hooks/use-file-download.js +16 -0
- package/dist/components/FileManager/hooks/use-file-manager-columns.js +106 -0
- package/dist/components/FileManager/hooks/use-file-manager-context.js +13 -0
- package/dist/components/FileManager/hooks/use-file-manager-tabs.js +23 -0
- package/dist/components/FileManager/hooks/use-file-metadata.js +20 -0
- package/dist/components/FileManager/hooks/use-file-search.js +90 -0
- package/dist/components/FileManager/hooks/use-file-upload.js +338 -0
- package/dist/components/FileManager/hooks/use-folder-creation.js +151 -0
- package/dist/components/FileManager/hooks/use-grid-actions-column.js +65 -0
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +188 -0
- package/dist/components/FileManager/hooks/use-item-renaming.js +124 -0
- package/dist/components/FileManager/hooks/use-new-actions.js +67 -0
- package/dist/components/FileManager/hooks/use-paths-selection.js +28 -0
- package/dist/components/FileManager/hooks/use-show-hidden-files.js +20 -0
- package/dist/components/FileManager/hooks/use-tree-additional-buttons.js +39 -0
- package/dist/components/FileManager/hooks/use-trigger-view-create-folder.js +42 -0
- package/dist/components/FileManager/hooks/use-trigger-view-rename.js +25 -0
- package/dist/components/FileManager/utils.js +129 -0
- package/dist/components/FileName/FileName.js +68 -0
- package/dist/components/FolderName/FolderName.js +57 -0
- package/dist/components/FormItem/FormItem.js +90 -0
- package/dist/components/FormItem/constants.js +9 -0
- package/dist/components/FormPopup/FormPopup.js +59 -0
- package/dist/components/FormPopup/constants.js +6 -0
- package/dist/components/Grid/Grid.js +333 -0
- package/dist/components/Grid/constants.js +33 -0
- package/dist/components/Grid/renderers/DateCellRenderer.js +27 -0
- package/dist/components/Grid/renderers/constants.js +25 -0
- package/dist/components/Icon/Icon.js +6 -0
- package/dist/components/IconButton/IconButton.js +40 -0
- package/dist/components/IconButton/IconButtonWrappers.js +48 -0
- package/dist/components/InfoButton/InfoButton.js +32 -0
- package/dist/components/InfoButton/constants.js +4 -0
- package/dist/components/Input/Button/InputButton.js +37 -0
- package/dist/components/Input/Button/constants.js +4 -0
- package/dist/components/Input/Input.js +120 -0
- package/dist/components/Input/utils.js +37 -0
- package/dist/components/InputPopup/InputPopup.js +174 -0
- package/dist/components/JsonEditor/JsonEditor.js +65 -0
- package/dist/components/JsonEditor/lazy.js +4 -0
- package/dist/components/Label/Label.js +27 -0
- package/dist/components/LabelledText/LabelledText.js +37 -0
- package/dist/components/LoadFileArea/EmptyFileArea.js +130 -0
- package/dist/components/LoadFileArea/FilledDropZone.js +80 -0
- package/dist/components/LoadFileArea/FilledInput.js +29 -0
- package/dist/components/LoadFileArea/LoadFileArea.js +70 -0
- package/dist/components/LoadFileArea/LoadFileAreaField.js +128 -0
- package/dist/components/Loader/Loader.js +40 -0
- package/dist/components/Loader/constants.js +5 -0
- package/dist/components/MarkdownEditor/MarkdownEditor.js +37 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +80 -0
- package/dist/components/MarkdownEditor/lazy.js +4 -0
- package/dist/components/New/Accordion/Accordion.js +103 -0
- package/dist/components/New/Button/Button.js +76 -0
- package/dist/components/New/Button/ButtonWrappers.js +44 -0
- package/dist/components/New/Button/constants.js +27 -0
- package/dist/components/New/Button/utils.js +11 -0
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +28 -0
- package/dist/components/New/ButtonDropdown/constants.js +17 -0
- package/dist/components/New/Calendar/Calendar.js +343 -0
- package/dist/components/New/Calendar/constants.js +57 -0
- package/dist/components/New/Calendar/utils.js +77 -0
- package/dist/components/New/CaptionText/CaptionText.js +27 -0
- package/dist/components/New/CardShell/CardShell.js +22 -0
- package/dist/components/New/Checkbox/Checkbox.js +92 -0
- package/dist/components/New/Checkbox/CheckboxBox.js +34 -0
- package/dist/components/New/Checkbox/constants.js +8 -0
- package/dist/components/New/CloseButton/CloseButton.js +33 -0
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +108 -0
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +78 -0
- package/dist/components/New/ConfirmationPopup/constants.js +27 -0
- package/dist/components/New/Dropdown/Dropdown.js +316 -0
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +105 -0
- package/dist/components/New/Dropdown/constants.js +28 -0
- package/dist/components/New/Dropdown/item-mark.js +6 -0
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +45 -0
- package/dist/components/New/EllipsisTooltip/use-truncation.js +18 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +135 -0
- package/dist/components/New/FolderPath/FolderPath.js +64 -0
- package/dist/components/New/Grid/Grid.js +301 -0
- package/dist/components/New/Grid/components/SelectionCell.js +50 -0
- package/dist/components/New/Grid/components/SelectionHeader.js +46 -0
- package/dist/components/New/Grid/constants.js +44 -0
- package/dist/components/New/Grid/renderers/DateCellRenderer.js +27 -0
- package/dist/components/New/Grid/renderers/constants.js +25 -0
- package/dist/components/New/Highlight/Highlight.js +50 -0
- package/dist/components/New/IconButton/IconButton.js +46 -0
- package/dist/components/New/IconButton/IconButtonWrappers.js +40 -0
- package/dist/components/New/InfoButton/InfoButton.js +39 -0
- package/dist/components/New/InlineSelect/InlineSelect.js +96 -0
- package/dist/components/New/Input/Button/InputButton.js +38 -0
- package/dist/components/New/Input/Button/constants.js +4 -0
- package/dist/components/New/Input/Input.js +169 -0
- package/dist/components/New/Input/utils.js +37 -0
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +104 -0
- package/dist/components/New/InteractiveTooltip/constants.js +6 -0
- package/dist/components/New/Label/Label.js +42 -0
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +41 -0
- package/dist/components/New/MarkdownEditor/constants.js +64 -0
- package/dist/components/New/MarkdownEditor/lazy.js +4 -0
- package/dist/components/New/MenuItem/MenuItem.js +108 -0
- package/dist/components/New/MenuItem/constants.js +16 -0
- package/dist/components/New/NoDataContent/NoDataContent.js +54 -0
- package/dist/components/New/Notification/Notification.js +67 -0
- package/dist/components/New/Notification/NotificationWrapper.js +61 -0
- package/dist/components/New/Notification/constants.js +32 -0
- package/dist/components/New/NumberInput/NumberInput.js +41 -0
- package/dist/components/New/PasswordInput/PasswordInput.js +54 -0
- package/dist/components/New/Popup/Popup.js +164 -0
- package/dist/components/New/Popup/constants.js +17 -0
- package/dist/components/New/Radio/Radio.js +100 -0
- package/dist/components/New/RadioGroup/RadioGroup.js +81 -0
- package/dist/components/New/RadioGroup/constants.js +11 -0
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +138 -0
- package/dist/components/New/RadioGroupPopupField/constants.js +11 -0
- package/dist/components/New/ResizableContainer/ConditionalResizableContainer.js +6 -0
- package/dist/components/New/ResizableContainer/ResizableContainer.js +106 -0
- package/dist/components/New/ResizableContainer/components/ResizeHandle.js +85 -0
- package/dist/components/New/Search/Search.js +74 -0
- package/dist/components/New/SegmentedControl/SegmentedControl.js +92 -0
- package/dist/components/New/SegmentedControl/constants.js +19 -0
- package/dist/components/New/Select/MultiSelectTags.js +23 -0
- package/dist/components/New/Select/Select.js +379 -0
- package/dist/components/New/Select/SelectSubMenuItem.js +103 -0
- package/dist/components/New/Select/constants.js +50 -0
- package/dist/components/New/Slider/Slider.js +112 -0
- package/dist/components/New/Switch/Switch.js +95 -0
- package/dist/components/New/Tabs/Tabs.js +95 -0
- package/dist/components/New/Tag/Tag.js +76 -0
- package/dist/components/New/Tag/constants.js +17 -0
- package/dist/components/New/TagInput/TagInput.js +197 -0
- package/dist/components/New/TagInput/utils.js +21 -0
- package/dist/components/New/Textarea/Textarea.js +55 -0
- package/dist/components/New/ThemeScope/ThemeScope.js +14 -0
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +54 -0
- package/dist/components/New/Tooltip/Tooltip.js +19 -0
- package/dist/components/New/Tooltip/TooltipContainer.js +12 -0
- package/dist/components/New/Tooltip/TooltipContent.js +45 -0
- package/dist/components/New/Tooltip/TooltipContext.js +67 -0
- package/dist/components/New/Tooltip/TooltipTrigger.js +45 -0
- package/dist/components/New/Tooltip/constants.js +8 -0
- package/dist/components/New/constants/icon.js +4 -0
- package/dist/components/New/constants/overlay.js +27 -0
- package/dist/components/NoDataContent/NoDataContent.js +45 -0
- package/dist/components/Notification/Notification.js +67 -0
- package/dist/components/Notification/constants.js +24 -0
- package/dist/components/NumberInput/NumberInput.js +41 -0
- package/dist/components/Pagination/Pagination.js +80 -0
- package/dist/components/Pagination/utils.js +10 -0
- package/dist/components/PasswordInput/Icons/HideIcon.js +16 -0
- package/dist/components/PasswordInput/Icons/ShowIcon.js +16 -0
- package/dist/components/PasswordInput/PasswordInput.js +21 -0
- package/dist/components/Popup/Popup.js +110 -0
- package/dist/components/Popup/constants.js +12 -0
- package/dist/components/ProgressBar/ProgressBar.js +58 -0
- package/dist/components/RadioButton/RadioButton.js +103 -0
- package/dist/components/RadioGroup/RadioGroup.js +92 -0
- package/dist/components/RadioGroup/constants.js +10 -0
- package/dist/components/RadioGroupPopupField/RadioGroupPopupField.js +101 -0
- package/dist/components/RemoveButton/RemoveButton.js +30 -0
- package/dist/components/ResizableContainer/ConditionalResizableContainer.js +6 -0
- package/dist/components/ResizableContainer/ResizableContainer.js +79 -0
- package/dist/components/ResizableContainer/components/ResizeHandle.js +20 -0
- package/dist/components/ResizableContainer/components/ResizeIcon.js +11 -0
- package/dist/components/SchemaRenderer/SchemaRenderer.js +150 -0
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +41 -0
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +74 -0
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +118 -0
- package/dist/components/SchemaRenderer/components/SchemaField.js +78 -0
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +114 -0
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +184 -0
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +192 -0
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +161 -0
- package/dist/components/SchemaRenderer/components/SchemaSection.js +81 -0
- package/dist/components/SchemaRenderer/context.js +12 -0
- package/dist/components/SchemaRenderer/types.js +27 -0
- package/dist/components/SchemaRenderer/utils.js +258 -0
- package/dist/components/Search/Search.js +63 -0
- package/dist/components/Search/constants.js +27 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +87 -0
- package/dist/components/SegmentedControl/constants.js +8 -0
- package/dist/components/Select/MultiSelectTags.js +23 -0
- package/dist/components/Select/Select.js +435 -0
- package/dist/components/Select/SelectSubMenuItem.js +90 -0
- package/dist/components/Select/constants.js +15 -0
- package/dist/components/SelectField/SelectField.js +66 -0
- package/dist/components/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/Skeleton/Skeleton.js +90 -0
- package/dist/components/Skeleton/utils.js +16 -0
- package/dist/components/Slider/Slider.js +158 -0
- package/dist/components/Spinner/Spinner.js +30 -0
- package/dist/components/Steps/Step.js +34 -0
- package/dist/components/Steps/Steps.js +27 -0
- package/dist/components/Steps/utils.js +42 -0
- package/dist/components/Switch/Switch.js +70 -0
- package/dist/components/Tab/Tab.js +65 -0
- package/dist/components/Tabs/Tabs.js +213 -0
- package/dist/components/Tabs/constants.js +4 -0
- package/dist/components/Tag/Tag.js +37 -0
- package/dist/components/TagInput/TagInput.js +179 -0
- package/dist/components/Textarea/Textarea.js +43 -0
- package/dist/components/Tooltip/Tooltip.js +30 -0
- package/dist/components/Tooltip/TooltipContainer.js +12 -0
- package/dist/components/Tooltip/TooltipContent.js +40 -0
- package/dist/components/Tooltip/TooltipContext.js +66 -0
- package/dist/components/Tooltip/TooltipTrigger.js +33 -0
- package/dist/components-manifest.json +1009 -161
- package/dist/{JsonEditor-CwnP07GH.js → constants/editor.js} +5 -63
- package/dist/constants/file-grid-columns.js +176 -0
- package/dist/constants/icon.js +10 -0
- package/dist/constants/validation.js +11 -0
- package/dist/dial-ui-kit.cjs +2 -0
- package/dist/dial-ui-kit.js +416 -0
- package/dist/editors.cjs +1 -0
- package/dist/editors.js +12 -0
- package/dist/file-manager.cjs +1 -0
- package/dist/file-manager.js +22 -0
- package/dist/grid.cjs +1 -0
- package/dist/grid.js +30 -0
- package/dist/hooks/use-editable-item.js +94 -0
- package/dist/hooks/use-flexible-actions.js +72 -0
- package/dist/hooks/use-has-hover.js +17 -0
- package/dist/hooks/use-is-mobile-screen.js +12 -0
- package/dist/hooks/use-is-tablet-screen.js +12 -0
- package/dist/hooks/use-screen-type.js +14 -0
- package/dist/hooks/use-width-breakpoint.js +15 -0
- package/dist/icon-CrGVkVpG.cjs +1 -0
- package/dist/icon-DhjrDQ8I.cjs +1 -0
- package/dist/index.css +2 -2
- package/dist/lazy-tfN4sKhq.cjs +1 -0
- package/dist/merge-classes-Dipy1Ih1.cjs +1 -0
- package/dist/migration-guides/0.14.0/button-tooltip-2-0.md +1 -1
- package/dist/migration-guides/0.14.0/shadow-token-per-step-rename.md +64 -29
- package/dist/migration-guides/README.md +1 -1
- package/dist/models/file.js +6 -0
- package/dist/models/selection-mode.js +4 -0
- package/dist/models/step.js +4 -0
- package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +39 -0
- package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +17 -0
- package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +16 -0
- package/dist/node_modules/@react-dnd/asap/dist/asap.js +9 -0
- package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +62 -0
- package/dist/node_modules/@react-dnd/invariant/dist/index.js +22 -0
- package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +25 -0
- package/dist/node_modules/ag-grid-community/dist/package/main.esm.js +39799 -0
- package/dist/node_modules/ag-grid-react/dist/package/index.esm.js +1989 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +70 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +54 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +18 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +42 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +17 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +13 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +12 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +9 -0
- package/dist/node_modules/dnd-core/dist/actions/registry.js +43 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +41 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +115 -0
- package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +96 -0
- package/dist/node_modules/dnd-core/dist/contracts.js +21 -0
- package/dist/node_modules/dnd-core/dist/createDragDropManager.js +19 -0
- package/dist/node_modules/dnd-core/dist/interfaces.js +7 -0
- package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +30 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +50 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +78 -0
- package/dist/node_modules/dnd-core/dist/reducers/index.js +42 -0
- package/dist/node_modules/dnd-core/dist/reducers/refCount.js +16 -0
- package/dist/node_modules/dnd-core/dist/reducers/stateId.js +6 -0
- package/dist/node_modules/dnd-core/dist/utils/coords.js +26 -0
- package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +12 -0
- package/dist/node_modules/dnd-core/dist/utils/equality.js +17 -0
- package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +7 -0
- package/dist/node_modules/dnd-core/dist/utils/js_utils.js +36 -0
- package/dist/node_modules/dnd-core/dist/utils/matchesType.js +8 -0
- package/dist/node_modules/fast-deep-equal/index.js +31 -0
- package/dist/node_modules/mime-db/db.json.js +2527 -0
- package/dist/node_modules/mime-db/index.js +8 -0
- package/dist/node_modules/mime-types/index.js +70 -0
- package/dist/node_modules/mime-types/mimeScore.js +38 -0
- package/dist/node_modules/re-resizable/lib/index.js +424 -0
- package/dist/node_modules/re-resizable/lib/resizer.js +49 -0
- package/dist/node_modules/react-dnd/dist/core/DndContext.js +7 -0
- package/dist/node_modules/react-dnd/dist/core/DndProvider.js +66 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +11 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +25 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +20 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +19 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +15 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +13 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +10 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +12 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +13 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +16 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +18 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +18 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +15 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +5 -0
- package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +20 -0
- package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +10 -0
- package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +88 -0
- package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +59 -0
- package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +87 -0
- package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +57 -0
- package/dist/node_modules/react-dnd/dist/internals/isRef.js +9 -0
- package/dist/node_modules/react-dnd/dist/internals/registration.js +18 -0
- package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +46 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +10 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +22 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +274 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +59 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +43 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +10 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +24 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +48 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +7 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +70 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +22 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/index.js +7 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +22 -0
- package/dist/node_modules/redux/es/redux.js +158 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2924 -0
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +9 -2
- package/dist/src/components/FileManager/FileManager.d.ts +2 -1
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +2 -0
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +4 -2
- package/dist/src/components/FileManager/utils.d.ts +11 -0
- package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +1 -4
- package/dist/src/components/Grid/renderers/utils.d.ts +1 -2
- package/dist/src/components/JsonEditor/lazy.d.ts +14 -0
- package/dist/src/components/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/components/New/CollapsibleSidebar/CollapsibleSidebar.d.ts +82 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +20 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +5 -4
- package/dist/src/components/New/Dropdown/item-mark.d.ts +15 -0
- package/dist/src/components/New/EllipsisTooltip/EllipsisTooltip.d.ts +1 -1
- package/dist/src/components/New/EllipsisTooltip/use-truncation.d.ts +5 -0
- package/dist/src/components/New/Grid/Grid.d.ts +124 -0
- package/dist/src/components/New/Grid/components/SelectionCell.d.ts +21 -0
- package/dist/src/components/New/Grid/components/SelectionHeader.d.ts +14 -0
- package/dist/src/components/New/Grid/constants.d.ts +61 -0
- package/dist/src/components/New/Grid/renderers/DateCellRenderer.d.ts +48 -0
- package/dist/src/components/New/Grid/renderers/constants.d.ts +5 -0
- package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +74 -0
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +26 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +6 -0
- package/dist/src/components/New/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/components/New/MenuItem/MenuItem.d.ts +68 -0
- package/dist/src/components/New/MenuItem/constants.d.ts +5 -0
- package/dist/src/components/New/NoDataContent/NoDataContent.d.ts +48 -0
- package/dist/src/components/New/ResizableContainer/ConditionalResizableContainer.d.ts +34 -0
- package/dist/src/components/New/ResizableContainer/ResizableContainer.d.ts +77 -0
- package/dist/src/components/New/ResizableContainer/components/ResizeHandle.d.ts +21 -0
- package/dist/src/components/New/SegmentedControl/constants.d.ts +2 -2
- package/dist/src/components/New/Select/Select.d.ts +14 -2
- package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +3 -0
- package/dist/src/components/New/Select/constants.d.ts +12 -5
- package/dist/src/components/New/Textarea/Textarea.d.ts +8 -2
- package/dist/src/components/New/ThemeScope/ThemeScope.d.ts +46 -0
- package/dist/src/components/New/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/New/Tooltip/TooltipContent.d.ts +4 -3
- package/dist/src/components/New/Tooltip/constants.d.ts +10 -1
- package/dist/src/components/New/constants/icon.d.ts +22 -0
- package/dist/src/components/New/constants/overlay.d.ts +7 -0
- package/dist/src/components/Tooltip/TooltipContent.d.ts +4 -0
- package/dist/src/hooks/use-has-hover.d.ts +20 -0
- package/dist/src/index.d.ts +28 -4
- package/dist/src/models/dropdown.d.ts +40 -1
- package/dist/src/models/select.d.ts +30 -0
- package/dist/src/subpaths/editors.d.ts +22 -0
- package/dist/src/subpaths/file-manager.d.ts +21 -0
- package/dist/src/subpaths/grid.d.ts +25 -0
- package/dist/src/types/menu-item.d.ts +21 -0
- package/dist/src/utils/__tests__/element-size-observer.spec.d.ts +1 -0
- package/dist/src/utils/__tests__/pointer.spec.d.ts +1 -0
- package/dist/src/utils/element-size-observer.d.ts +26 -0
- package/dist/src/utils/grid-comparators.d.ts +4 -0
- package/dist/src/utils/grid-date.d.ts +7 -0
- package/dist/src/utils/grid-registration.d.ts +16 -0
- package/dist/src/utils/grid-registration.spec.d.ts +1 -0
- package/dist/src/utils/pointer.d.ts +29 -0
- package/dist/src/utils/sub-menu-floating.d.ts +1 -0
- package/dist/types/analytics.js +4 -0
- package/dist/types/button.js +5 -0
- package/dist/types/calendar.js +4 -0
- package/dist/types/caption.js +4 -0
- package/dist/types/confirmation-popup.js +4 -0
- package/dist/types/dropdown.js +6 -0
- package/dist/types/editor.js +4 -0
- package/dist/types/file-manager.js +12 -0
- package/dist/types/flexible-actions.js +4 -0
- package/dist/types/form-item.js +4 -0
- package/dist/types/item.js +4 -0
- package/dist/types/menu-item.js +4 -0
- package/dist/types/notification.js +5 -0
- package/dist/types/popup.js +4 -0
- package/dist/types/radio-group.js +4 -0
- package/dist/types/resizable-container.js +4 -0
- package/dist/types/screen.js +4 -0
- package/dist/types/select.js +5 -0
- package/dist/types/size.js +4 -0
- package/dist/types/skeleton.js +6 -0
- package/dist/types/tab.js +6 -0
- package/dist/types/tag.js +4 -0
- package/dist/types/tooltip.js +4 -0
- package/dist/use-file-manager-tabs-DjdR_mYM.cjs +3 -0
- package/dist/utils/accessible-name.js +6 -0
- package/dist/utils/debounce.js +9 -0
- package/dist/utils/element-size-observer.js +24 -0
- package/dist/utils/file-accept.js +16 -0
- package/dist/utils/flat-to-hierarchy-convertor.js +86 -0
- package/dist/utils/grid-comparators.js +17 -0
- package/dist/utils/grid-date.js +20 -0
- package/dist/utils/grid-registration.js +8 -0
- package/dist/utils/merge-classes.js +8 -0
- package/dist/utils/mobile.js +11 -0
- package/dist/utils/path.js +4 -0
- package/dist/utils/pointer.js +5 -0
- package/dist/utils/sub-menu-floating.js +85 -0
- package/package.json +37 -12
- package/dist/JsonEditor-D3v6vYDX.cjs +0 -1
- package/dist/MarkdownEditor-CfaHfp2e.js +0 -75
- package/dist/MarkdownEditor-D9M8LvKZ.cjs +0 -1
- package/dist/MarkdownEditor-HO5rwRn7.cjs +0 -1
- package/dist/MarkdownEditor-K1ldlz5M.js +0 -35
- package/dist/dial-ui-kit.cjs.js +0 -1
- package/dist/dial-ui-kit.es.js +0 -221
- package/dist/index-DD0A-MXM.cjs +0 -71
- package/dist/index-Dg0iEirR.js +0 -66908
|
@@ -51,7 +51,14 @@ export interface DialAnalyticsBarGroupProps {
|
|
|
51
51
|
barTitleClassName?: string;
|
|
52
52
|
/** Additional CSS classes for each bar's value label. */
|
|
53
53
|
barValueClassName?: string;
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Additional CSS classes for each bar's outer container (e.g. for custom hover
|
|
56
|
+
* effects). In compare mode these classes apply to the shared container around
|
|
57
|
+
* both bars (one continuous block), and the entry wrapper is a Tailwind
|
|
58
|
+
* `group` — use `group-hover:` (not `hover:`) for pair hover. When `onBarClick`
|
|
59
|
+
* is set, that container also gets a default accent fill on group hover and
|
|
60
|
+
* `:focus-visible`.
|
|
61
|
+
*/
|
|
55
62
|
barClassName?: string;
|
|
56
63
|
/** Map of bar key to tooltip content. When provided, hovering each bar shows its description. */
|
|
57
64
|
barDescriptions?: Record<string, ReactNode>;
|
|
@@ -89,7 +96,7 @@ export interface DialAnalyticsBarGroupProps {
|
|
|
89
96
|
* @param [inline] - Renders every bar on a single row (50% title, 50% bar + value).
|
|
90
97
|
* @param [barTitleClassName] - Additional CSS classes for each bar's title label.
|
|
91
98
|
* @param [barValueClassName] - Additional CSS classes for each bar's value label.
|
|
92
|
-
* @param [barClassName] - Additional CSS classes for each bar's outer container.
|
|
99
|
+
* @param [barClassName] - Additional CSS classes for each bar's outer container. In compare mode they apply to the shared pair container (one continuous block); the entry is a Tailwind `group` — use `group-hover:` for pair hover; when `onBarClick` is set that container also gets a default accent fill on hover and `:focus-visible`.
|
|
93
100
|
* @param [barDescriptions] - Map of bar key to tooltip content. Hovering each bar shows its description.
|
|
94
101
|
* @param [className] - Additional CSS classes for the accordion container.
|
|
95
102
|
*/
|
|
@@ -17,7 +17,7 @@ import { DialFileManagerToolbarProps } from './components/FileManagerToolbar/Dia
|
|
|
17
17
|
import { DialFoldersTreeProps } from './components/FoldersTree/FoldersTree';
|
|
18
18
|
type GridRow = FileManagerGridRow;
|
|
19
19
|
export type DialFileManagerConflictResolutionPopupOptions = Omit<ConflictResolutionPopupProps, 'open' | 'onClose' | 'onReplace' | 'onDuplicate' | 'conflictingFiles'>;
|
|
20
|
-
export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel' | 'header' | 'onCreateFolder' | 'onCreateFolderValidate' | 'folderCreationValidationMessages' | 'disabledPathTooltip' | 'emptyStateTitle' | 'emptyStateDescription'> & {
|
|
20
|
+
export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel' | 'header' | 'onCreateFolder' | 'onCreateFolderValidate' | 'folderCreationValidationMessages' | 'disabledPathTooltip' | 'emptyStateTitle' | 'emptyStateDescription' | 'excludedPaths'> & {
|
|
21
21
|
getCopyHeader?: (itemsCount: number, itemName?: string) => string;
|
|
22
22
|
getMoveHeader?: (itemsCount: number, itemName?: string) => string;
|
|
23
23
|
processDestinationFolderPath?: (path: string) => string;
|
|
@@ -270,6 +270,7 @@ export interface DialFileManagerProps {
|
|
|
270
270
|
* @param [gridOptions] - Options forwarded to `DialGrid`; supports `columnDefs` override and `filterable` flag and date locale/options
|
|
271
271
|
* @param [bulkActionsToolbarOptions] - Options for the bulk actions toolbar shown when items are selected
|
|
272
272
|
* @param [deleteConfirmationOptions] - Options for the delete confirmation popup
|
|
273
|
+
* @param [destinationFolderPopupOptions.excludedPaths] - Paths to hide from the Copy/Move destination popup only (e.g. a root folder that shouldn't be a valid destination); the main tree/grid are unaffected
|
|
273
274
|
*
|
|
274
275
|
* @param [compactViewWidthBreakpoint=DEFAULT_COMPACT_VIEW_WIDTH_BREAKPOINT] - Width (px) below which the component switches to compact view.
|
|
275
276
|
*
|
|
@@ -21,6 +21,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
|
|
|
21
21
|
alertProps?: DialNotificationProps;
|
|
22
22
|
onFolderPopupPathChange?: (newPath?: string) => void;
|
|
23
23
|
processDestinationFolderPath?: (path: string) => string;
|
|
24
|
+
excludedPaths?: string[];
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* DestinationFolderPopup
|
|
@@ -65,6 +66,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
|
|
|
65
66
|
* @param [disabledPathTooltip="Unavailable for the original path. Please select another folder"] - Tooltip text when destination is disabled
|
|
66
67
|
* @param [collapsedFileTree=false] - Whether the file tree should be initially collapsed
|
|
67
68
|
* @param [processDestinationFolderPath] - Optional function to process the destination folder path before setting it
|
|
69
|
+
* @param [excludedPaths] - Paths to hide from this popup's tree and grid (e.g. a root folder that shouldn't be a valid destination). Matching items and their subtree are excluded.
|
|
68
70
|
*
|
|
69
71
|
* @returns A React component for the destination folder selection popup
|
|
70
72
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DragEvent } from 'react';
|
|
1
|
+
import { ChangeEvent, DragEvent } from 'react';
|
|
2
2
|
import { DialFile } from '../../../models/file';
|
|
3
3
|
import { DialFileAcceptType, DialUploadFileItem } from '../../../models/file-manager';
|
|
4
4
|
import { FileConflictDecision } from '../components/ConflictResolutionPopup/ConflictResolutionPopup';
|
|
@@ -47,9 +47,11 @@ export declare const useFileUpload: ({ onUploadFiles, onValidateUpload, maxFileS
|
|
|
47
47
|
handleDrop: (e: DragEvent, destinationFolder: string, existingFiles: DialFile[]) => Promise<void>;
|
|
48
48
|
clearError: () => void;
|
|
49
49
|
handleUpload: (files: DialUploadFileItem[], destinationFolder: string, existingFiles: DialFile[]) => Promise<boolean>;
|
|
50
|
-
openFileDialog: (destinationFolder: string, existingFiles: DialFile[]) =>
|
|
50
|
+
openFileDialog: (destinationFolder: string, existingFiles: DialFile[]) => boolean;
|
|
51
51
|
openArchiveDialog: (destinationFolder: string, existingFiles: DialFile[]) => void;
|
|
52
52
|
fileInputRef: import('react').RefObject<HTMLInputElement | null>;
|
|
53
|
+
fileInputAccept: string | undefined;
|
|
54
|
+
handleFileInputChange: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
53
55
|
uploadConflictingFiles: DialFile[];
|
|
54
56
|
uploadConflictResolutionOpen: boolean;
|
|
55
57
|
hasActiveUploadConflictRef: import('react').RefObject<boolean>;
|
|
@@ -7,6 +7,17 @@ export declare const findFolderForPath: (root: DialFile[] | undefined, path?: st
|
|
|
7
7
|
export declare const normalizeToLowerCase: (input?: string) => string;
|
|
8
8
|
export declare const normalizeExtensionWithoutDot: (input?: string) => string;
|
|
9
9
|
export declare const collectAllDescendants: (folder?: DialFile) => DialFile[];
|
|
10
|
+
/**
|
|
11
|
+
* Removes items (and their entire subtree) whose path matches one of the
|
|
12
|
+
* excluded paths, at any nesting depth. Used to hide specific folders (e.g.
|
|
13
|
+
* a root folder) from the Move/Copy destination popup without affecting the
|
|
14
|
+
* main file manager view.
|
|
15
|
+
*
|
|
16
|
+
* @param nodes - Hierarchical items to filter
|
|
17
|
+
* @param excludedPaths - Paths to exclude; pass `undefined`/empty to no-op
|
|
18
|
+
* @returns A new array with matching nodes (and their descendants) removed
|
|
19
|
+
*/
|
|
20
|
+
export declare const excludePathsFromTree: (nodes: DialFile[] | undefined, excludedPaths?: string[]) => DialFile[];
|
|
10
21
|
export declare const isHiddenDotFile: (node: DialFile) => boolean;
|
|
11
22
|
/**
|
|
12
23
|
* Formats bytes into a short, human-readable string.
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const baseColumnComparator: (a: string | number | undefined, b: string | number | undefined, _nodeA?: IRowNode, _nodeB?: IRowNode, isInverted?: boolean) => number;
|
|
3
|
-
export declare const omitUndefined: <T extends object>(value: T | undefined) => T;
|
|
4
|
-
export declare const checkColDefsChanges: (cols: ColDef[], initialCols: ColDef[]) => boolean;
|
|
1
|
+
export { baseColumnComparator, checkColDefsChanges, omitUndefined, } from '../../../utils/grid-comparators';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function convertToDate(input?: DateValue | null): Date | null;
|
|
1
|
+
export { convertToDate } from '../../../utils/grid-date';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared leaf module for the JSON editor's lazy loader. Both `src/index.ts`
|
|
3
|
+
* (root) and `src/subpaths/editors.ts` (`./editors`) re-export this same
|
|
4
|
+
* binding instead of each declaring their own copy of the loader function -
|
|
5
|
+
* see `src/index.ts`'s comment above its own re-export for why the previous
|
|
6
|
+
* per-entry duplication existed, and why it was replaced by this shared
|
|
7
|
+
* module (an emitted-topology defect, not just source-level duplication:
|
|
8
|
+
* a loader function's body containing its own `import()` call, when
|
|
9
|
+
* duplicated verbatim into more than one entry's own emitted chunk, can pull
|
|
10
|
+
* an unrelated dynamically-imported feature into the initial graph in some
|
|
11
|
+
* Vite/Rolldown versions - see `openspec/changes/isolate-heavy-feature-modules`
|
|
12
|
+
* Section 9's `diagnosis-baseline.txt` for the measured reproduction).
|
|
13
|
+
*/
|
|
14
|
+
export declare const LazyDialJsonEditor: () => Promise<typeof import("./JsonEditor")>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared leaf module for the 1.0 Markdown editor's lazy loader. Both
|
|
3
|
+
* `src/index.ts` (root) and `src/subpaths/editors.ts` (`./editors`)
|
|
4
|
+
* re-export this same binding instead of each declaring their own copy -
|
|
5
|
+
* see `src/components/JsonEditor/lazy.ts`'s comment for why.
|
|
6
|
+
*/
|
|
7
|
+
export declare const LazyDialMarkdownEditor: () => Promise<typeof import("./MarkdownEditor")>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { FC, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export interface CollapsibleSidebarProps {
|
|
3
|
+
/** Content shown while the sidebar is expanded. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Name of the panel, rendered as vertical text while collapsed. */
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
/** Width in px while expanded. Defaults to `280`. */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** Width in px while collapsed. Defaults to `48`. */
|
|
10
|
+
collapsedWidth?: number;
|
|
11
|
+
/** Controlled open state. When provided, the component becomes controlled. */
|
|
12
|
+
isOpened?: boolean;
|
|
13
|
+
/** Initial open state when uncontrolled. Defaults to `true`. */
|
|
14
|
+
defaultOpened?: boolean;
|
|
15
|
+
/** Fired when the toggle is clicked. Receives the next open state. */
|
|
16
|
+
onToggle?: (nextOpened: boolean, e: MouseEvent<HTMLButtonElement>) => void;
|
|
17
|
+
/** Extra controls rendered in the footer next to the toggle, expanded only. */
|
|
18
|
+
additionalButtons?: ReactNode;
|
|
19
|
+
/** Accessible name of the sidebar region. Defaults to `'Sidebar'`. */
|
|
20
|
+
ariaLabel?: string;
|
|
21
|
+
/** Name and tooltip of the toggle while expanded. Defaults to `'Collapse sidebar'`. */
|
|
22
|
+
collapseLabel?: string;
|
|
23
|
+
/** Name and tooltip of the toggle while collapsed. Defaults to `'Expand sidebar'`. */
|
|
24
|
+
expandLabel?: string;
|
|
25
|
+
/** Additional CSS classes for the outer container. */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Additional CSS classes for the vertical title. */
|
|
28
|
+
titleClassName?: string;
|
|
29
|
+
/** Additional CSS classes for the content region. */
|
|
30
|
+
contentClassName?: string;
|
|
31
|
+
/** Additional CSS classes for the footer holding the toggle. */
|
|
32
|
+
footerClassName?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A side panel that collapses to a narrow rail carrying its title vertically.
|
|
36
|
+
* aliases: ToggleSidebar|CollapsiblePanel|SidePanel
|
|
37
|
+
* Design system 2.0
|
|
38
|
+
*
|
|
39
|
+
* Works as a controlled component when `isOpened` is provided, otherwise it keeps
|
|
40
|
+
* its own state from `defaultOpened`. The width is derived from the open state, so
|
|
41
|
+
* changing `width` on an open sidebar takes effect immediately.
|
|
42
|
+
*
|
|
43
|
+
* The panel is an `aside` named by `ariaLabel`, and the toggle is a real
|
|
44
|
+
* `aria-expanded` control pointing at the content region. Content stays mounted
|
|
45
|
+
* while collapsed — hidden with `display: none` — so scroll position and any
|
|
46
|
+
* form state inside it survive a collapse.
|
|
47
|
+
*
|
|
48
|
+
* The container paints no background and no radius: it is meant to sit on the
|
|
49
|
+
* surface it belongs to. Pass `className` for either.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <CollapsibleSidebar title="Filters" width={320}>
|
|
54
|
+
* <FilterForm />
|
|
55
|
+
* </CollapsibleSidebar>
|
|
56
|
+
*
|
|
57
|
+
* <CollapsibleSidebar
|
|
58
|
+
* title="Filters"
|
|
59
|
+
* isOpened={opened}
|
|
60
|
+
* onToggle={setOpened}
|
|
61
|
+
* >
|
|
62
|
+
* <FilterForm />
|
|
63
|
+
* </CollapsibleSidebar>
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @param children - Content shown while the sidebar is expanded.
|
|
67
|
+
* @param title - Name of the panel, rendered as vertical text while collapsed.
|
|
68
|
+
* @param [width=280] - Width in px while expanded.
|
|
69
|
+
* @param [collapsedWidth=48] - Width in px while collapsed.
|
|
70
|
+
* @param [isOpened] - Controlled open state.
|
|
71
|
+
* @param [defaultOpened=true] - Initial open state when uncontrolled.
|
|
72
|
+
* @param [onToggle] - Fired when the toggle is clicked. Receives the next open state.
|
|
73
|
+
* @param [additionalButtons] - Extra footer controls, rendered while expanded.
|
|
74
|
+
* @param [ariaLabel='Sidebar'] - Accessible name of the sidebar region.
|
|
75
|
+
* @param [collapseLabel='Collapse sidebar'] - Name and tooltip of the toggle while expanded.
|
|
76
|
+
* @param [expandLabel='Expand sidebar'] - Name and tooltip of the toggle while collapsed.
|
|
77
|
+
* @param [className] - Additional CSS classes for the outer container.
|
|
78
|
+
* @param [titleClassName] - Additional CSS classes for the vertical title.
|
|
79
|
+
* @param [contentClassName] - Additional CSS classes for the content region.
|
|
80
|
+
* @param [footerClassName] - Additional CSS classes for the footer.
|
|
81
|
+
*/
|
|
82
|
+
export declare const CollapsibleSidebar: FC<CollapsibleSidebarProps>;
|
|
@@ -30,6 +30,15 @@ export interface DropdownProps {
|
|
|
30
30
|
anchorToMouse?: boolean;
|
|
31
31
|
matchReferenceWidth?: boolean;
|
|
32
32
|
maxDropdownHeight?: number | null;
|
|
33
|
+
/**
|
|
34
|
+
* Initial focus inside the overlay on open, forwarded to
|
|
35
|
+
* `FloatingFocusManager`'s `initialFocus`. `0` focuses the first tabbable
|
|
36
|
+
* element (menu behavior); `-1` leaves focus where it is (typeahead
|
|
37
|
+
* behavior, e.g. a `/`-command menu opened from a textarea). When omitted,
|
|
38
|
+
* defaults to menu behavior for click/context opens and to `-1` for hover
|
|
39
|
+
* opens, matching the pre-existing behavior.
|
|
40
|
+
*/
|
|
41
|
+
initialFocus?: 0 | -1 | RefObject<HTMLElement | null>;
|
|
33
42
|
}
|
|
34
43
|
/**
|
|
35
44
|
*
|
|
@@ -37,10 +46,20 @@ export interface DropdownProps {
|
|
|
37
46
|
* aliases: ContextMenu|PopupMenu
|
|
38
47
|
* Design system 2.0
|
|
39
48
|
*
|
|
49
|
+
* A menu of **actions or navigation options**, opened from a trigger. It is not
|
|
50
|
+
* the control for picking a value out of a list — a country, a sort order, a
|
|
51
|
+
* filter — which is what {@link Select} is for.
|
|
52
|
+
*
|
|
40
53
|
* Supports click/hover/contextMenu triggers, controlled/uncontrolled open, and an optional
|
|
41
54
|
* close button inside the overlay. Placement is taken directly from Floating UI; when
|
|
42
55
|
* `placement` is **undefined** (default), automatic placement is handled by `autoPlacement`.
|
|
43
56
|
*
|
|
57
|
+
* A chosen row is marked through the item's `mark`: the design draws a menu's
|
|
58
|
+
* single-select and multiselect the same way, with a check at the trailing edge
|
|
59
|
+
* (`MenuItemMark.Check`). Pair it with `selectable` for a multiselect row, which
|
|
60
|
+
* keeps the menu open across toggles. `MenuItemMark.Highlight` is the current
|
|
61
|
+
* item of a navigation menu.
|
|
62
|
+
*
|
|
44
63
|
* @example
|
|
45
64
|
* ```tsx
|
|
46
65
|
* // Simple items menu
|
|
@@ -83,5 +102,6 @@ export interface DropdownProps {
|
|
|
83
102
|
* @param [anchorToMouse=false] - Whether to anchor the dropdown to the mouse position
|
|
84
103
|
* @param [matchReferenceWidth=true] - Whether to match the reference element's width
|
|
85
104
|
* @param [maxDropdownHeight] - Maximum height of the dropdown menu; when omitted, no limit is applied
|
|
105
|
+
* @param [initialFocus] - Initial focus target inside the overlay on open, forwarded to `FloatingFocusManager`; when omitted, matches pre-existing behavior
|
|
86
106
|
*/
|
|
87
107
|
export declare const Dropdown: FC<DropdownProps>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export declare const dropdownBaseClassName: string;
|
|
2
2
|
export declare const dropdownListBaseClassName: string;
|
|
3
3
|
export declare const dropdownSubMenuClassName: string;
|
|
4
|
+
/**
|
|
5
|
+
* The row's own styling lives in {@link MenuItem}, which renders every item of
|
|
6
|
+
* the menu. This alias is what a fully custom overlay row can lean on to match
|
|
7
|
+
* them.
|
|
8
|
+
*/
|
|
4
9
|
export declare const dropdownItemBaseClassName: string;
|
|
5
|
-
/** Tint marking a checked multiselect row. */
|
|
6
|
-
export declare const dropdownItemSelectedClassName = "bg-control-accent-alpha";
|
|
7
|
-
export declare const dropdownItemDisabledClassName: string;
|
|
8
|
-
export declare const dropdownItemDangerClassName = "text-error";
|
|
9
10
|
export declare const dropdownDividerClassName = "my-1 border-t border-tertiary";
|
|
10
11
|
export declare const dropdownGap = 4;
|
|
11
12
|
export declare const submenuCaretIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DropdownItem } from '../../../models/dropdown';
|
|
2
|
+
import { MenuItemMark } from '../../../types/menu-item';
|
|
3
|
+
/**
|
|
4
|
+
* How a chosen row is marked. `mark` wins when it is given; otherwise the
|
|
5
|
+
* legacy `selectable` flag still means the multiselect checkbox row.
|
|
6
|
+
*/
|
|
7
|
+
export declare const resolveItemMark: (item: DropdownItem) => MenuItemMark;
|
|
8
|
+
/**
|
|
9
|
+
* Role the row announces. A `selectable` row toggles and so is a checkbox item
|
|
10
|
+
* whatever it is marked with — the design draws a menu's multiselect exactly
|
|
11
|
+
* like its single-select, with a check. A row that only *marks* a single choice
|
|
12
|
+
* is a radio item; an unmarked row and the navigation highlight are plain
|
|
13
|
+
* items, the highlight carrying `aria-current` instead.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getItemRole: (item: DropdownItem) => string;
|
|
@@ -22,7 +22,7 @@ export interface EllipsisTooltipProps extends TooltipContainerOptions {
|
|
|
22
22
|
*
|
|
23
23
|
* a11y: while truncated, the full string is exposed as the element's
|
|
24
24
|
* `aria-label`, so a screen reader reads the whole label even though the
|
|
25
|
-
* tooltip itself renders nothing on
|
|
25
|
+
* tooltip itself renders nothing on a touch-only device.
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* ```tsx
|
|
@@ -8,6 +8,11 @@ import { ReactNode } from 'react';
|
|
|
8
8
|
* window resize, and — since a parent can resize without the window doing so —
|
|
9
9
|
* whenever the element's own box changes size.
|
|
10
10
|
*
|
|
11
|
+
* All of that goes through the shared observer in
|
|
12
|
+
* `@/utils/element-size-observer`, so a screen full of truncating labels costs
|
|
13
|
+
* one `ResizeObserver`, one resize listener and one animation frame in total
|
|
14
|
+
* rather than a set per label.
|
|
15
|
+
*
|
|
11
16
|
* @param text - The rendered content; a change to it re-measures
|
|
12
17
|
* @returns `ref` to attach to the truncating element, whether it `isTruncated`,
|
|
13
18
|
* its `textContent` (the full string even when `text` is a node), and
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ColDef, GridApi, GridOptions } from 'ag-grid-community';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { DropdownItem } from '../../../models/dropdown';
|
|
4
|
+
import { GridSelectionMode } from '../../../models/selection-mode';
|
|
5
|
+
/** Column id of the selection column this component prepends itself. */
|
|
6
|
+
export declare const GRID_SELECTION_COLUMN_ID = "dial-kit-grid-selection";
|
|
7
|
+
export interface GridProps<T extends object = Record<string, unknown>> {
|
|
8
|
+
/** Column definitions, in ag-Grid `ColDef` format. */
|
|
9
|
+
columnDefs?: ColDef<T>[];
|
|
10
|
+
/** Rows to display. */
|
|
11
|
+
rowData?: T[];
|
|
12
|
+
/** Extra ag-Grid options, merged over the defaults. */
|
|
13
|
+
additionalGridOptions?: GridOptions<T>;
|
|
14
|
+
/** Items of the row context menu. Omit it to render no context menu at all. */
|
|
15
|
+
getContextMenuItems?: (row: T) => DropdownItem[];
|
|
16
|
+
/** Additional CSS classes for the grid container. */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Accessible name of the grid region. Defaults to `'Data grid'`. */
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
/** Whether custom cell renderers are wrapped with context-menu support. */
|
|
21
|
+
wrapCustomCellRenderers?: boolean | ((col: ColDef<T>) => boolean);
|
|
22
|
+
/** Rows that cannot be selected. Ids must match what `getRowId` returns. */
|
|
23
|
+
disabledRowIds?: Set<string>;
|
|
24
|
+
/** Controlled selection: ids of the selected rows. */
|
|
25
|
+
selectedRowIds?: Set<string>;
|
|
26
|
+
/** Fired when the grid API becomes available. */
|
|
27
|
+
onGridApiChange?: (api: GridApi<T>) => void;
|
|
28
|
+
/** Fired when the selection changes, with the selected ids and rows. */
|
|
29
|
+
onSelectionChange?: (selectedRowIds: Set<string>, selectedRows: T[]) => void;
|
|
30
|
+
/** Extracts the unique id of a row. Defaults to its `id` field. */
|
|
31
|
+
getRowId?: (row: T) => string;
|
|
32
|
+
/** Tints odd rows. Defaults to `false`. */
|
|
33
|
+
alternateOddRowColors?: boolean;
|
|
34
|
+
/** Placeholder of the column filter inputs. */
|
|
35
|
+
filterPlaceholder?: string;
|
|
36
|
+
/** Illustration of the empty state. */
|
|
37
|
+
emptyStateIcon?: ReactNode;
|
|
38
|
+
/** Headline of the empty state. */
|
|
39
|
+
emptyStateTitle?: string;
|
|
40
|
+
/** Secondary line of the empty state. */
|
|
41
|
+
emptyStateDescription?: string;
|
|
42
|
+
/** Shows the loading overlay. Defaults to `false`. */
|
|
43
|
+
loading?: boolean;
|
|
44
|
+
/** Draws a border around the grid. Defaults to `true`. */
|
|
45
|
+
wrapperBorder?: boolean;
|
|
46
|
+
/** Hides the vertical borders between header cells. Defaults to `false`. */
|
|
47
|
+
withoutHeaderBorders?: boolean;
|
|
48
|
+
/** Renders a selection column of checkboxes or radios. */
|
|
49
|
+
selectionMode?: GridSelectionMode;
|
|
50
|
+
/** Keeps the context menu on a row that cannot be selected. */
|
|
51
|
+
allowDisabledContextMenu?: boolean;
|
|
52
|
+
/** Accessible name of a row's selection control. Defaults to `'Select row'`. */
|
|
53
|
+
selectRowLabel?: (row: T) => string;
|
|
54
|
+
/** Accessible name of the select-all control. Defaults to `'Select all rows'`. */
|
|
55
|
+
selectAllLabel?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A data grid built on ag-Grid, wired to the 2.0 tokens and controls.
|
|
59
|
+
* aliases: DataTable|TableGrid|DataGrid
|
|
60
|
+
* Design system 2.0
|
|
61
|
+
*
|
|
62
|
+
* Comes preconfigured with case-insensitive sorting, floating column filters,
|
|
63
|
+
* columns sized to the available width, a row context menu, truncation
|
|
64
|
+
* tooltips, and an empty state.
|
|
65
|
+
*
|
|
66
|
+
* The selection column renders the 2.0 `Checkbox` and `Radio` instead of
|
|
67
|
+
* ag-Grid's own inputs, so selection looks and behaves like every other control
|
|
68
|
+
* in the kit and the select-all reaches the `mixed` state when the selection is
|
|
69
|
+
* partial. The column stays faded out until the row is hovered, something is
|
|
70
|
+
* selected, or the keyboard reaches it.
|
|
71
|
+
*
|
|
72
|
+
* Selection works controlled or uncontrolled: pass `selectedRowIds` to own it,
|
|
73
|
+
* or read `onSelectionChange` and let the grid keep its own. A `sort` declared
|
|
74
|
+
* on a column is honoured — 1.0 stripped it on startup.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* interface Product { id: string; name: string; price: number }
|
|
79
|
+
*
|
|
80
|
+
* const columns: ColDef<Product>[] = [
|
|
81
|
+
* { field: 'name', headerName: 'Product', flex: 1 },
|
|
82
|
+
* { field: 'price', headerName: 'Price', width: 120 },
|
|
83
|
+
* ];
|
|
84
|
+
*
|
|
85
|
+
* <Grid<Product> columnDefs={columns} rowData={products} />
|
|
86
|
+
*
|
|
87
|
+
* // With selection and a context menu
|
|
88
|
+
* <Grid<Product>
|
|
89
|
+
* columnDefs={columns}
|
|
90
|
+
* rowData={products}
|
|
91
|
+
* selectionMode={GridSelectionMode.MULTIPLE}
|
|
92
|
+
* selectedRowIds={selectedIds}
|
|
93
|
+
* onSelectionChange={(ids) => setSelectedIds(ids)}
|
|
94
|
+
* selectRowLabel={(row) => `Select ${row.name}`}
|
|
95
|
+
* getContextMenuItems={(row) => [{ key: 'edit', label: 'Edit' }]}
|
|
96
|
+
* />
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @param [columnDefs] - Column definitions, in ag-Grid `ColDef` format.
|
|
100
|
+
* @param [rowData] - Rows to display.
|
|
101
|
+
* @param [additionalGridOptions] - Extra ag-Grid options, merged over the defaults.
|
|
102
|
+
* @param [getContextMenuItems] - Items of the row context menu. Omit for no menu.
|
|
103
|
+
* @param [className] - Additional CSS classes for the grid container.
|
|
104
|
+
* @param [ariaLabel='Data grid'] - Accessible name of the grid region.
|
|
105
|
+
* @param [wrapCustomCellRenderers=true] - Whether custom renderers get context-menu support.
|
|
106
|
+
* @param [disabledRowIds] - Rows that cannot be selected.
|
|
107
|
+
* @param [selectedRowIds] - Controlled selection: ids of the selected rows.
|
|
108
|
+
* @param [onGridApiChange] - Fired when the grid API becomes available.
|
|
109
|
+
* @param [onSelectionChange] - Fired when the selection changes.
|
|
110
|
+
* @param [getRowId] - Extracts the unique id of a row. Defaults to its `id` field.
|
|
111
|
+
* @param [alternateOddRowColors=false] - Tints odd rows.
|
|
112
|
+
* @param [filterPlaceholder='Enter value'] - Placeholder of the column filter inputs.
|
|
113
|
+
* @param [emptyStateIcon] - Illustration of the empty state.
|
|
114
|
+
* @param [emptyStateTitle='No results found'] - Headline of the empty state.
|
|
115
|
+
* @param [emptyStateDescription] - Secondary line of the empty state.
|
|
116
|
+
* @param [loading=false] - Shows the loading overlay.
|
|
117
|
+
* @param [wrapperBorder=true] - Draws a border around the grid.
|
|
118
|
+
* @param [withoutHeaderBorders=false] - Hides the vertical borders between header cells.
|
|
119
|
+
* @param [selectionMode] - Renders a selection column of checkboxes or radios.
|
|
120
|
+
* @param [allowDisabledContextMenu=false] - Keeps the context menu on a non-selectable row.
|
|
121
|
+
* @param [selectRowLabel] - Accessible name of a row's selection control.
|
|
122
|
+
* @param [selectAllLabel='Select all rows'] - Accessible name of the select-all control.
|
|
123
|
+
*/
|
|
124
|
+
export declare const Grid: <T extends object>({ columnDefs, rowData, additionalGridOptions, getContextMenuItems, className, ariaLabel, wrapCustomCellRenderers, disabledRowIds, selectedRowIds, onSelectionChange, onGridApiChange, getRowId, alternateOddRowColors, filterPlaceholder, emptyStateIcon, emptyStateTitle, emptyStateDescription, loading, wrapperBorder, withoutHeaderBorders, allowDisabledContextMenu, selectionMode, selectRowLabel, selectAllLabel, }: GridProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ICellRendererParams } from 'ag-grid-community';
|
|
2
|
+
import { GridSelectionMode } from '../../../../models/selection-mode';
|
|
3
|
+
export interface SelectionCellProps<T> {
|
|
4
|
+
params: ICellRendererParams<T>;
|
|
5
|
+
mode: GridSelectionMode;
|
|
6
|
+
/** Accessible name of the control; a row-specific name is far more useful. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Shared radio group name, so single mode behaves as one group. */
|
|
9
|
+
radioName: string;
|
|
10
|
+
rowId: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The 2.0 {@link Checkbox} or {@link Radio} rendered in the selection column,
|
|
15
|
+
* in place of ag-Grid's own checkbox.
|
|
16
|
+
*
|
|
17
|
+
* The row node is the source of truth: the control subscribes to its
|
|
18
|
+
* `rowSelected` event, so a selection made anywhere — another cell, the header,
|
|
19
|
+
* or the `selectedRowIds` prop — is reflected here without refreshing the cell.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SelectionCell: <T>({ params, mode, label, radioName, rowId, disabled, }: SelectionCellProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IHeaderParams } from 'ag-grid-community';
|
|
2
|
+
export interface SelectionHeaderProps<T> extends IHeaderParams<T> {
|
|
3
|
+
/** Accessible name of the select-all control. */
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Select-all {@link Checkbox} for the selection column, in place of ag-Grid's
|
|
8
|
+
* own header checkbox.
|
|
9
|
+
*
|
|
10
|
+
* It derives its state from the grid rather than from a prop: partly selected
|
|
11
|
+
* rows put it in the `mixed` state, and disabled rows are excluded from the
|
|
12
|
+
* count so a grid whose selectable rows are all selected still reads as full.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SelectionHeader: <T>({ api, label, }: SelectionHeaderProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Root class of the 2.0 grid; every rule in `styles/grid.scss` sits under it. */
|
|
2
|
+
export declare const GRID_ROOT_CLASS = "dial-kit-grid";
|
|
3
|
+
/** Present only while a selection column is rendered. Drives its reveal. */
|
|
4
|
+
export declare const GRID_WITH_SELECTION_CLASS = "dial-kit-grid-with-selection";
|
|
5
|
+
export declare const GRID_WITHOUT_HEADER_BORDERS_CLASS = "dial-kit-grid-without-header-borders";
|
|
6
|
+
/** Cell of the selection column: faded out until the row is hovered. */
|
|
7
|
+
export declare const GRID_ROW_SELECT_CLASS = "dial-kit-grid-row-select";
|
|
8
|
+
/** Header of the selection column: faded out until the header is hovered. */
|
|
9
|
+
export declare const GRID_HEADER_SELECT_CLASS = "dial-kit-grid-header-select";
|
|
10
|
+
/**
|
|
11
|
+
* Pins the whole selection column visible — on touch, or once something is
|
|
12
|
+
* selected. It sits on the container rather than on the column definition:
|
|
13
|
+
* ag-Grid rebuilds every cell when a column definition changes, which would
|
|
14
|
+
* pull the DOM out from under the click that caused the selection.
|
|
15
|
+
*/
|
|
16
|
+
export declare const GRID_SELECTION_VISIBLE_CLASS = "dial-kit-grid-selection-visible";
|
|
17
|
+
/** Right-aligns a column. Applied by the consumer through `cellClass`. */
|
|
18
|
+
export declare const GRID_ALIGN_RIGHT_CLASS = "dial-kit-grid-align-right";
|
|
19
|
+
/** Height of both a body row and the header row. */
|
|
20
|
+
export declare const ROW_HEIGHT = 40;
|
|
21
|
+
/**
|
|
22
|
+
* ag-Grid theme parameters, resolved from the 2.0 colour tokens with the same
|
|
23
|
+
* literal fallbacks the Tailwind config carries, so a consumer that defines no
|
|
24
|
+
* CSS variables still gets the intended palette.
|
|
25
|
+
*
|
|
26
|
+
* Hover sits one step up the accent-alpha ramp from the selected tint, so a
|
|
27
|
+
* hovered selected row still reads as hovered — the same relationship the 2.0
|
|
28
|
+
* dropdown and select rows use.
|
|
29
|
+
*/
|
|
30
|
+
export declare const GRID_THEME_PARAMS: {
|
|
31
|
+
accentColor: string;
|
|
32
|
+
backgroundColor: string;
|
|
33
|
+
oddRowBackgroundColor: string;
|
|
34
|
+
selectedRowBackgroundColor: string;
|
|
35
|
+
rowHoverColor: string;
|
|
36
|
+
borderColor: string;
|
|
37
|
+
rowBorder: string;
|
|
38
|
+
headerRowBorder: string;
|
|
39
|
+
headerColumnBorder: string;
|
|
40
|
+
chromeBackgroundColor: string;
|
|
41
|
+
foregroundColor: string;
|
|
42
|
+
headerTextColor: string;
|
|
43
|
+
browserColorScheme: string;
|
|
44
|
+
headerFontSize: number;
|
|
45
|
+
headerFontWeight: number;
|
|
46
|
+
fontSize: number;
|
|
47
|
+
fontFamily: string;
|
|
48
|
+
spacing: number;
|
|
49
|
+
borderRadius: number;
|
|
50
|
+
wrapperBorderRadius: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Sources reported with a selection change. `checkboxSelected` marks the ones
|
|
54
|
+
* the user made in the selection column, the other two mark selections the
|
|
55
|
+
* component applied itself while syncing to `selectedRowIds` or new row data.
|
|
56
|
+
*/
|
|
57
|
+
export declare enum SelectionEventSourceType {
|
|
58
|
+
API = "api",
|
|
59
|
+
ROW_DATA_CHANGED = "rowDataChanged",
|
|
60
|
+
CHECKBOX_SELECTED = "checkboxSelected"
|
|
61
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ICellRendererParams } from 'ag-grid-community';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { DateValue } from '../../../../utils/grid-date';
|
|
4
|
+
export type { DateValue };
|
|
5
|
+
export interface DateCellRendererProps extends Partial<ICellRendererParams<Record<string, unknown>, DateValue>> {
|
|
6
|
+
/** The date to render. A pure integer string is read as epoch milliseconds. */
|
|
7
|
+
value?: DateValue | null;
|
|
8
|
+
/** Locale used for formatting. Defaults to `'en-US'`. */
|
|
9
|
+
locale?: string;
|
|
10
|
+
/** `Intl.DateTimeFormat` options. */
|
|
11
|
+
options?: Intl.DateTimeFormatOptions;
|
|
12
|
+
/** Rendered when the value carries no usable date. */
|
|
13
|
+
emptyPlaceholder?: string;
|
|
14
|
+
/** Additional CSS classes for the cell. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Suppresses the truncation tooltip. */
|
|
17
|
+
hideTooltip?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Date cell for the 2.0 {@link Grid}, usable as an ag-Grid `cellRenderer`.
|
|
21
|
+
* aliases: DateCell|TimestampCell
|
|
22
|
+
* Design system 2.0
|
|
23
|
+
*
|
|
24
|
+
* Formats the value with `Intl.DateTimeFormat` and wraps it in a
|
|
25
|
+
* {@link EllipsisTooltip}, so the full string is only offered when the column is
|
|
26
|
+
* too narrow to show it. A valid date is rendered inside a `<time datetime>`,
|
|
27
|
+
* which gives assistive tech and crawlers the machine-readable value next to
|
|
28
|
+
* the localised one.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // As a column renderer
|
|
33
|
+
* { field: 'createdAt', cellRenderer: DateCellRenderer,
|
|
34
|
+
* cellRendererParams: { options: { timeZone: 'UTC' } } }
|
|
35
|
+
*
|
|
36
|
+
* // Directly
|
|
37
|
+
* <DateCellRenderer value="2025-07-20T00:00:00Z" options={{ timeZone: 'UTC' }} />
|
|
38
|
+
* <DateCellRenderer value={1752969600000} /> // epoch milliseconds
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @param [value] - The date to render.
|
|
42
|
+
* @param [locale='en-US'] - Locale used for formatting.
|
|
43
|
+
* @param [options] - `Intl.DateTimeFormat` options, e.g. `timeZone`.
|
|
44
|
+
* @param [emptyPlaceholder] - Rendered when the value carries no usable date.
|
|
45
|
+
* @param [className] - Additional CSS classes for the cell.
|
|
46
|
+
* @param [hideTooltip=false] - Suppresses the truncation tooltip.
|
|
47
|
+
*/
|
|
48
|
+
export declare const DateCellRenderer: FC<DateCellRendererProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ColDef } from 'ag-grid-community';
|
|
2
|
+
export declare const DEFAULT_LOCALE = "en-US";
|
|
3
|
+
export declare const DEFAULT_DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions;
|
|
4
|
+
/** Fixed, unsortable and unfilterable: the column holds a control, not data. */
|
|
5
|
+
export declare const SELECTION_COL_DEF: ColDef;
|