@epam/ai-dial-ui-kit 0.16.0-dev.7 → 0.16.0-dev.70
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 +27 -12
- package/dist/CHANGELOG.md +119 -0
- package/dist/{DateCellRenderer-CbInykpW.cjs → DateCellRenderer-VFKHZI-J.cjs} +32 -32
- package/dist/MarkdownEditor-5Jq0NTTP.cjs +1 -0
- package/dist/_virtual/_commonjsHelpers.js +3 -28
- package/dist/_virtual/index.js +5 -3
- package/dist/components/New/Analytics/Bar/Bar.js +104 -0
- package/dist/components/New/Analytics/BarGroup/BarGroup.js +143 -0
- package/dist/components/New/Analytics/Card/Card.js +107 -0
- package/dist/components/New/Analytics/Histogram/Histogram.js +212 -0
- package/dist/components/New/Avatar/Avatar.js +17 -16
- package/dist/components/New/BottomSheet/BottomSheet.js +52 -51
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +65 -61
- package/dist/components/New/Breadcrumbs/constants.js +40 -21
- package/dist/components/New/Calendar/Calendar.js +338 -225
- package/dist/components/New/Calendar/TimePickerPanel.js +87 -0
- package/dist/components/New/Calendar/constants.js +26 -24
- package/dist/components/New/CaptionText/CaptionText.js +31 -26
- package/dist/components/New/Checkbox/Checkbox.js +23 -21
- package/dist/components/New/Checkbox/CheckboxBox.js +25 -18
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +49 -44
- package/dist/components/New/Dropdown/Dropdown.js +350 -261
- package/dist/components/New/Dropdown/constants.js +20 -17
- package/dist/components/New/Dropdown/search.js +37 -0
- package/dist/components/New/EntityIdentity/EntityIdentity.js +62 -60
- package/dist/components/New/ErrorBoundary/ErrorBoundary.js +67 -0
- package/dist/components/New/FileName/FileName.js +38 -37
- package/dist/components/New/FolderPath/FolderPath.js +151 -46
- package/dist/components/New/FormSection/FormSection.js +87 -0
- package/dist/components/New/Grid/Grid.js +234 -202
- package/dist/components/New/Grid/components/GridEmptyState.js +13 -0
- package/dist/components/New/Grid/components/SelectionCell.js +35 -33
- package/dist/components/New/Grid/constants.js +9 -8
- package/dist/components/New/Input/Input.js +121 -107
- package/dist/components/New/LabelledText/LabelledText.js +43 -0
- package/dist/components/New/LiveRegion/LiveRegion.js +33 -0
- package/dist/components/New/LoginScreen/LoginScreen.js +98 -0
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +40 -28
- package/dist/components/New/NoDataContent/NoDataContent.js +22 -27
- package/dist/components/New/NoDataContent/NoDataIllustration.js +53 -0
- package/dist/components/New/Notification/Notification.js +51 -39
- package/dist/components/New/Notification/constants.js +26 -17
- package/dist/components/New/PasswordInput/PasswordInput.js +33 -32
- package/dist/components/New/Popup/constants.js +1 -1
- package/dist/components/New/Radio/Radio.js +19 -17
- package/dist/components/New/ResizeHandle/ResizeHandle.js +147 -0
- package/dist/components/New/SchemaRenderer/components/SchemaField.js +45 -44
- package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +41 -38
- package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +45 -39
- package/dist/components/New/Select/Select.js +217 -211
- package/dist/components/New/Select/constants.js +29 -38
- package/dist/components/New/SelectedEntityCard/SelectedEntityCard.js +86 -0
- package/dist/components/New/StateScreen/StateScreen.js +63 -0
- package/dist/components/New/Steps/Steps.js +86 -0
- package/dist/components/New/Switch/Switch.js +19 -17
- package/dist/components/New/Tabs/Tabs.js +91 -58
- package/dist/components/New/Tag/Tag.js +34 -34
- package/dist/components/New/Tag/constants.js +13 -4
- package/dist/components/New/Textarea/Textarea.js +37 -33
- package/dist/components/New/ToggleChip/ToggleChip.js +54 -0
- package/dist/components/New/ToggleChip/constants.js +11 -0
- package/dist/components/New/TransferQueue/TransferQueue.js +66 -71
- package/dist/components/New/TransferQueue/TransferQueueHeader.js +30 -38
- package/dist/components/New/TransferQueue/TransferQueueRow.js +106 -49
- package/dist/components/ProgressBar/ProgressBar.js +43 -38
- package/dist/components/Spinner/Spinner.js +16 -11
- package/dist/components-manifest.json +3870 -6420
- package/dist/constants/public-class-names.js +36 -7
- package/dist/dial-ui-kit.cjs +4 -2
- package/dist/dial-ui-kit.js +391 -467
- package/dist/editors.cjs +1 -1
- package/dist/editors.js +4 -10
- package/dist/grid.cjs +1 -1
- package/dist/grid.js +22 -29
- package/dist/{merge-classes-BEJXjzkx.cjs → icon-4D9xu6E_.cjs} +1 -1
- package/dist/index.css +1 -1
- package/dist/migration-guides/0.16.0/caption-text-no-alert-role.md +90 -0
- package/dist/migration-guides/0.16.0/grid-empty-state-pattern.md +100 -0
- package/dist/migration-guides/0.16.0/legacy-analytics-and-steps-removal.md +54 -0
- package/dist/migration-guides/0.16.0/legacy-file-manager-removal.md +91 -0
- package/dist/migration-guides/0.16.0/unused-legacy-components-removal.md +128 -0
- package/dist/migration-guides/README.md +5 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +1 -1
- package/dist/node_modules/react-dnd/dist/internals/registration.js +5 -13
- package/dist/src/components/{Analytics → New/Analytics}/Bar/Bar.d.ts +6 -6
- package/dist/src/components/{Analytics → New/Analytics}/Bar/utils.d.ts +1 -1
- package/dist/src/components/{Analytics → New/Analytics}/BarGroup/BarGroup.d.ts +7 -7
- package/dist/src/components/{Analytics → New/Analytics}/Card/Card.d.ts +14 -8
- package/dist/src/components/{Analytics → New/Analytics}/Histogram/Histogram.d.ts +5 -5
- package/dist/src/components/{Analytics → New/Analytics}/Histogram/utils.d.ts +1 -1
- package/dist/src/components/New/Analytics/index.d.ts +11 -0
- package/dist/src/components/New/Avatar/Avatar.d.ts +3 -0
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +8 -5
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +17 -10
- package/dist/src/components/New/Calendar/Calendar.d.ts +49 -3
- package/dist/src/components/New/Calendar/TimePickerPanel.d.ts +15 -0
- package/dist/src/components/New/Calendar/constants.d.ts +2 -0
- package/dist/src/components/New/CaptionText/CaptionText.d.ts +24 -2
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +95 -1
- package/dist/src/components/New/Dropdown/constants.d.ts +6 -0
- package/dist/src/components/New/Dropdown/search.d.ts +9 -0
- package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +6 -2
- package/dist/src/components/New/ErrorBoundary/ErrorBoundary.d.ts +78 -0
- package/dist/src/components/New/FileName/FileName.d.ts +11 -0
- package/dist/src/components/New/FolderPath/FolderPath.d.ts +16 -8
- package/dist/src/components/New/FormSection/FormSection.d.ts +63 -0
- package/dist/src/components/New/Grid/Grid.d.ts +49 -8
- package/dist/src/components/New/Grid/components/GridEmptyState.d.ts +21 -0
- package/dist/src/components/New/Grid/components/SelectionCell.d.ts +4 -1
- package/dist/src/components/New/Grid/constants.d.ts +2 -0
- package/dist/src/components/New/LabelledText/LabelledText.d.ts +48 -0
- package/dist/src/components/New/LiveRegion/LiveRegion.d.ts +58 -0
- package/dist/src/components/New/LoginScreen/LoginScreen.d.ts +63 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +6 -0
- package/dist/src/components/New/MarkdownEditor/lazy.d.ts +8 -2
- package/dist/src/components/New/NoDataContent/NoDataContent.d.ts +24 -8
- package/dist/src/components/New/NoDataContent/NoDataIllustration.d.ts +7 -0
- package/dist/src/components/New/Notification/Notification.d.ts +24 -2
- package/dist/src/components/New/Notification/constants.d.ts +11 -0
- package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +6 -0
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/ResizeHandle/ResizeHandle.d.ts +68 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +1 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +2 -0
- package/dist/src/components/New/SchemaRenderer/types.d.ts +3 -1
- package/dist/src/components/New/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/src/components/New/Select/Select.d.ts +8 -0
- package/dist/src/components/New/Select/constants.d.ts +0 -1
- package/dist/src/components/New/SelectedEntityCard/SelectedEntityCard.d.ts +67 -0
- package/dist/src/components/New/StateScreen/StateScreen.d.ts +55 -0
- package/dist/src/components/New/Steps/Steps.d.ts +55 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +17 -1
- package/dist/src/components/New/Tag/Tag.d.ts +9 -5
- package/dist/src/components/New/Tag/constants.d.ts +12 -4
- package/dist/src/components/New/ToggleChip/ToggleChip.d.ts +70 -0
- package/dist/src/components/New/ToggleChip/constants.d.ts +12 -0
- package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +9 -5
- package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +1 -3
- package/dist/src/components/New/constants/icon.d.ts +2 -2
- package/dist/src/components/ProgressBar/ProgressBar.d.ts +23 -3
- package/dist/src/components/Spinner/Spinner.d.ts +27 -1
- package/dist/src/constants/public-class-names.d.ts +36 -7
- package/dist/src/index.d.ts +41 -83
- package/dist/src/models/step.d.ts +2 -0
- package/dist/src/subpaths/editors.d.ts +9 -15
- package/dist/src/subpaths/grid.d.ts +3 -9
- package/dist/src/types/breadcrumbs.d.ts +6 -0
- package/dist/src/types/dropdown.d.ts +16 -0
- package/dist/src/types/editor.d.ts +0 -6
- package/dist/src/types/form-section.d.ts +9 -0
- package/dist/src/types/grid.d.ts +10 -0
- package/dist/src/types/live-region.d.ts +17 -0
- package/dist/src/types/notification.d.ts +11 -0
- package/dist/src/types/progress-bar.d.ts +13 -0
- package/dist/src/types/tab.d.ts +5 -0
- package/dist/src/types/tag.d.ts +3 -1
- package/dist/src/utils/grid-registration.d.ts +6 -8
- package/dist/types/breadcrumbs.js +1 -1
- package/dist/types/dropdown.js +5 -4
- package/dist/types/form-section.js +4 -0
- package/dist/types/grid.js +3 -2
- package/dist/types/live-region.js +5 -0
- package/dist/types/notification.js +3 -2
- package/dist/types/progress-bar.js +4 -0
- package/dist/types/tab.js +5 -4
- package/dist/types/tag.js +2 -2
- package/dist/utils/merge-classes.js +39 -7
- package/package.json +10 -20
- package/dist/DateCellRenderer-BZvKj3rU.cjs +0 -1
- package/dist/IconButton-B1Hx0Y3y.cjs +0 -1
- package/dist/JsonEditor-Bxui5wJH.cjs +0 -1
- package/dist/MarkdownEditor-BKtFs714.cjs +0 -1
- package/dist/MarkdownEditor-Bapd1ycU.cjs +0 -1
- package/dist/MarkdownEditorContainer-DLPODjar.cjs +0 -1
- package/dist/Switch-DAaAOaIu.cjs +0 -1
- package/dist/_virtual/___vite-browser-external.js +0 -6
- package/dist/_virtual/__vite-browser-external.js +0 -4
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/index3.js +0 -7
- package/dist/assets/icons/add-child.svg.js +0 -5
- package/dist/assets/icons/add-sibling.svg.js +0 -5
- package/dist/assets/icons/copy-to.svg.js +0 -5
- package/dist/assets/icons/file/c.svg.js +0 -5
- package/dist/assets/icons/file/cpp.svg.js +0 -5
- package/dist/assets/icons/file/cs.svg.js +0 -5
- package/dist/assets/icons/file/ini.svg.js +0 -5
- package/dist/assets/icons/file/json.svg.js +0 -5
- package/dist/assets/icons/file/md.svg.js +0 -5
- package/dist/assets/icons/file/py.svg.js +0 -5
- package/dist/assets/icons/move-to.svg.js +0 -5
- package/dist/assets/icons/no-data.svg.js +0 -5
- package/dist/assets/icons/open-popup.svg.js +0 -5
- package/dist/assets/icons/unshare.svg.js +0 -5
- package/dist/components/Analytics/Bar/Bar.js +0 -80
- package/dist/components/Analytics/BarGroup/BarGroup.js +0 -142
- package/dist/components/Analytics/Card/Card.js +0 -87
- package/dist/components/Analytics/ErrorTag/ErrorTag.js +0 -19
- package/dist/components/Analytics/Histogram/Histogram.js +0 -200
- package/dist/components/AutocompleteInput/AutocompleteInputValue.js +0 -21
- package/dist/components/ButtonDropdown/ButtonDropdown.js +0 -33
- package/dist/components/ButtonDropdown/constants.js +0 -8
- package/dist/components/Checkbox/Checkbox.js +0 -64
- package/dist/components/Checkbox/constants.js +0 -4
- package/dist/components/CollapsibleSidebar/CollapsibleSidebar.js +0 -84
- package/dist/components/ConfirmationPopup/ConfirmationPopup.js +0 -75
- package/dist/components/ConfirmationPopup/constants.js +0 -32
- package/dist/components/DraggableItem/DraggableItem.js +0 -61
- package/dist/components/DraggableItem/constants.js +0 -6
- package/dist/components/DropdownIcon/DropdownIcon.js +0 -103
- package/dist/components/FileIcon/FileIcon.js +0 -37
- package/dist/components/FileIcon/constants.js +0 -60
- package/dist/components/FileManager/FileManager.js +0 -888
- package/dist/components/FileManager/FileManagerContext.js +0 -5
- package/dist/components/FileManager/FileManagerProvider.js +0 -772
- package/dist/components/FileManager/FileManagerTooltip.js +0 -92
- package/dist/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.js +0 -293
- package/dist/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.js +0 -201
- package/dist/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.js +0 -52
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.js +0 -103
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/constants.js +0 -5
- package/dist/components/FileManager/components/FileManagerDeleteConfirmationPopup/FileManagerDeleteConfirmationPopup.js +0 -56
- package/dist/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.js +0 -69
- package/dist/components/FileManager/components/FileManagerItemName/FileManagerItemName.js +0 -100
- package/dist/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.js +0 -93
- package/dist/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.js +0 -165
- package/dist/components/FileManager/components/FileManagerNavigationPanel/constants.js +0 -6
- package/dist/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.js +0 -120
- package/dist/components/FileManager/components/FileMetadataPopup/FileMetadataPopup.js +0 -119
- package/dist/components/FileManager/components/FileMetadataPopup/constants.js +0 -9
- package/dist/components/FileManager/components/FoldersTree/FoldersTree.js +0 -180
- package/dist/components/FileManager/components/FoldersTree/constants.js +0 -9
- package/dist/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.js +0 -51
- package/dist/components/FileManager/constants.js +0 -28
- package/dist/components/FileManager/errors.js +0 -10
- package/dist/components/FileManager/hooks/use-bulk-actions.js +0 -143
- package/dist/components/FileManager/hooks/use-collapse-tree.js +0 -22
- package/dist/components/FileManager/hooks/use-conflict-resolution.js +0 -158
- package/dist/components/FileManager/hooks/use-current-path.js +0 -29
- package/dist/components/FileManager/hooks/use-file-clipboard.js +0 -154
- package/dist/components/FileManager/hooks/use-file-delete.js +0 -39
- package/dist/components/FileManager/hooks/use-file-download.js +0 -16
- package/dist/components/FileManager/hooks/use-file-manager-columns.js +0 -106
- package/dist/components/FileManager/hooks/use-file-manager-context.js +0 -13
- package/dist/components/FileManager/hooks/use-file-manager-tabs.js +0 -23
- package/dist/components/FileManager/hooks/use-file-metadata.js +0 -20
- package/dist/components/FileManager/hooks/use-file-search.js +0 -90
- package/dist/components/FileManager/hooks/use-file-upload.js +0 -338
- package/dist/components/FileManager/hooks/use-folder-creation.js +0 -151
- package/dist/components/FileManager/hooks/use-grid-actions-column.js +0 -65
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +0 -188
- package/dist/components/FileManager/hooks/use-item-renaming.js +0 -124
- package/dist/components/FileManager/hooks/use-new-actions.js +0 -67
- package/dist/components/FileManager/hooks/use-paths-selection.js +0 -28
- package/dist/components/FileManager/hooks/use-show-hidden-files.js +0 -20
- package/dist/components/FileManager/hooks/use-tree-additional-buttons.js +0 -39
- package/dist/components/FileManager/hooks/use-trigger-view-create-folder.js +0 -42
- package/dist/components/FileManager/hooks/use-trigger-view-rename.js +0 -25
- package/dist/components/FileManager/utils.js +0 -129
- package/dist/components/FileName/FileName.js +0 -68
- package/dist/components/FolderName/FolderName.js +0 -57
- package/dist/components/FormItem/FormItem.js +0 -90
- package/dist/components/FormItem/constants.js +0 -9
- package/dist/components/FormPopup/FormPopup.js +0 -59
- package/dist/components/FormPopup/constants.js +0 -6
- package/dist/components/Grid/Grid.js +0 -333
- package/dist/components/Grid/constants.js +0 -33
- package/dist/components/Grid/renderers/DateCellRenderer.js +0 -27
- package/dist/components/Grid/renderers/constants.js +0 -25
- package/dist/components/InputPopup/InputPopup.js +0 -174
- package/dist/components/JsonEditor/JsonEditor.js +0 -65
- package/dist/components/JsonEditor/lazy.js +0 -4
- package/dist/components/MarkdownEditor/MarkdownEditor.js +0 -39
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +0 -82
- package/dist/components/MarkdownEditor/lazy.js +0 -4
- package/dist/components/Notification/Notification.js +0 -67
- package/dist/components/Notification/constants.js +0 -24
- package/dist/components/NumberInput/NumberInput.js +0 -41
- package/dist/components/Pagination/Pagination.js +0 -80
- package/dist/components/Pagination/utils.js +0 -10
- package/dist/components/PasswordInput/Icons/HideIcon.js +0 -16
- package/dist/components/PasswordInput/Icons/ShowIcon.js +0 -16
- package/dist/components/PasswordInput/PasswordInput.js +0 -21
- package/dist/components/Popup/Popup.js +0 -110
- package/dist/components/Popup/constants.js +0 -12
- package/dist/components/RadioButton/RadioButton.js +0 -103
- package/dist/components/RadioGroup/RadioGroup.js +0 -92
- package/dist/components/RadioGroup/constants.js +0 -10
- package/dist/components/RadioGroupPopupField/RadioGroupPopupField.js +0 -101
- package/dist/components/ResizableContainer/ConditionalResizableContainer.js +0 -6
- package/dist/components/ResizableContainer/ResizableContainer.js +0 -79
- package/dist/components/ResizableContainer/components/ResizeHandle.js +0 -20
- package/dist/components/ResizableContainer/components/ResizeIcon.js +0 -11
- package/dist/components/SchemaRenderer/SchemaRenderer.js +0 -151
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +0 -56
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +0 -74
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +0 -118
- package/dist/components/SchemaRenderer/components/SchemaField.js +0 -78
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +0 -114
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +0 -272
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +0 -36
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +0 -192
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +0 -161
- package/dist/components/SchemaRenderer/components/SchemaSection.js +0 -81
- package/dist/components/SchemaRenderer/context.js +0 -12
- package/dist/components/Search/Search.js +0 -63
- package/dist/components/Search/constants.js +0 -27
- package/dist/components/SegmentedControl/SegmentedControl.js +0 -87
- package/dist/components/SegmentedControl/constants.js +0 -8
- package/dist/components/Select/MultiSelectTags.js +0 -23
- package/dist/components/Select/Select.js +0 -435
- package/dist/components/Select/SelectSubMenuItem.js +0 -90
- package/dist/components/Select/constants.js +0 -15
- package/dist/components/SelectField/SelectField.js +0 -66
- package/dist/components/SharedEntityIndicator/SharedEntityIndicator.js +0 -34
- package/dist/components/Slider/Slider.js +0 -158
- package/dist/components/Steps/Step.js +0 -34
- package/dist/components/Steps/Steps.js +0 -27
- package/dist/components/Steps/utils.js +0 -42
- package/dist/components/Switch/Switch.js +0 -70
- package/dist/components/TagInput/TagInput.js +0 -179
- package/dist/components/Textarea/Textarea.js +0 -43
- package/dist/constants/editor.js +0 -52
- package/dist/constants/file-grid-columns.js +0 -176
- package/dist/file-manager.cjs +0 -1
- package/dist/file-manager.js +0 -22
- package/dist/hooks/use-flexible-actions.js +0 -72
- package/dist/hooks/use-width-breakpoint.js +0 -15
- package/dist/icon-CrGVkVpG.cjs +0 -1
- package/dist/icon-DhjrDQ8I.cjs +0 -1
- package/dist/lazy-_W6FYhKg.cjs +0 -1
- package/dist/node_modules/mime-db/db.json.js +0 -2527
- package/dist/node_modules/mime-db/index.js +0 -8
- package/dist/node_modules/mime-types/index.js +0 -70
- package/dist/node_modules/mime-types/mimeScore.js +0 -38
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +0 -25
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +0 -21
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +0 -20
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +0 -19
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +0 -22
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +0 -15
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +0 -13
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +0 -23
- package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +0 -88
- package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +0 -87
- package/dist/src/__mocks__/monaco-editor.d.ts +0 -13
- package/dist/src/components/Analytics/Bar/utils.spec.d.ts +0 -1
- package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +0 -22
- package/dist/src/components/Analytics/Histogram/utils.spec.d.ts +0 -1
- package/dist/src/components/Analytics/index.d.ts +0 -13
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +0 -34
- package/dist/src/components/Button/ButtonWrappers.test.d.ts +0 -1
- package/dist/src/components/Button/__tests__/utils.spec.d.ts +0 -1
- package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +0 -24
- package/dist/src/components/ButtonDropdown/constants.d.ts +0 -2
- package/dist/src/components/Checkbox/Checkbox.d.ts +0 -36
- package/dist/src/components/Checkbox/constants.d.ts +0 -1
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +0 -46
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +0 -55
- package/dist/src/components/ConfirmationPopup/constants.d.ts +0 -18
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +0 -33
- package/dist/src/components/DraggableItem/constants.d.ts +0 -3
- package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +0 -38
- package/dist/src/components/FileIcon/FileIcon.d.ts +0 -33
- package/dist/src/components/FileIcon/constants.d.ts +0 -9
- package/dist/src/components/FileManager/FileManager.d.ts +0 -326
- package/dist/src/components/FileManager/FileManagerContext.d.ts +0 -181
- package/dist/src/components/FileManager/FileManagerProvider.d.ts +0 -21
- package/dist/src/components/FileManager/FileManagerTooltip.d.ts +0 -12
- package/dist/src/components/FileManager/__mocks__/files.d.ts +0 -3
- package/dist/src/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.d.ts +0 -90
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +0 -73
- package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.d.ts +0 -63
- package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.test.d.ts +0 -1
- package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.d.ts +0 -56
- package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/constants.d.ts +0 -3
- package/dist/src/components/FileManager/components/FileManagerDeleteConfirmationPopup/FileManagerDeleteConfirmationPopup.d.ts +0 -26
- package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +0 -51
- package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts +0 -57
- package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +0 -71
- package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +0 -64
- package/dist/src/components/FileManager/components/FileManagerNavigationPanel/constants.d.ts +0 -3
- package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +0 -76
- package/dist/src/components/FileManager/components/FileMetadataPopup/FileMetadataPopup.d.ts +0 -50
- package/dist/src/components/FileManager/components/FileMetadataPopup/constants.d.ts +0 -6
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +0 -135
- package/dist/src/components/FileManager/components/FoldersTree/constants.d.ts +0 -6
- package/dist/src/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.d.ts +0 -13
- package/dist/src/components/FileManager/constants.d.ts +0 -21
- package/dist/src/components/FileManager/errors.d.ts +0 -6
- package/dist/src/components/FileManager/hooks/__tests__/use-conflict-resolution.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/__tests__/use-current-path.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/__tests__/use-file-clipboard.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/__tests__/use-file-delete.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/__tests__/use-file-download.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/__tests__/use-file-upload.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/__tests__/use-show-hidden-files.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/__tests__/use-trigger-view-rename.spec.d.ts +0 -1
- package/dist/src/components/FileManager/hooks/use-bulk-actions.d.ts +0 -30
- package/dist/src/components/FileManager/hooks/use-collapse-tree.d.ts +0 -9
- package/dist/src/components/FileManager/hooks/use-conflict-resolution.d.ts +0 -27
- package/dist/src/components/FileManager/hooks/use-current-path.d.ts +0 -13
- package/dist/src/components/FileManager/hooks/use-file-clipboard.d.ts +0 -37
- package/dist/src/components/FileManager/hooks/use-file-delete.d.ts +0 -13
- package/dist/src/components/FileManager/hooks/use-file-download.d.ts +0 -9
- package/dist/src/components/FileManager/hooks/use-file-manager-columns.d.ts +0 -43
- package/dist/src/components/FileManager/hooks/use-file-manager-context.d.ts +0 -7
- package/dist/src/components/FileManager/hooks/use-file-manager-tabs.d.ts +0 -10
- package/dist/src/components/FileManager/hooks/use-file-metadata.d.ts +0 -10
- package/dist/src/components/FileManager/hooks/use-file-search.d.ts +0 -23
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +0 -64
- package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +0 -30
- package/dist/src/components/FileManager/hooks/use-grid-actions-column.d.ts +0 -15
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +0 -44
- package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +0 -22
- package/dist/src/components/FileManager/hooks/use-new-actions.d.ts +0 -23
- package/dist/src/components/FileManager/hooks/use-paths-selection.d.ts +0 -13
- package/dist/src/components/FileManager/hooks/use-show-hidden-files.d.ts +0 -9
- package/dist/src/components/FileManager/hooks/use-tree-additional-buttons.d.ts +0 -22
- package/dist/src/components/FileManager/hooks/use-trigger-view-create-folder.d.ts +0 -26
- package/dist/src/components/FileManager/hooks/use-trigger-view-rename.d.ts +0 -20
- package/dist/src/components/FileManager/utils.d.ts +0 -69
- package/dist/src/components/FileManager/utils.spec.d.ts +0 -1
- package/dist/src/components/FileName/FileName.d.ts +0 -49
- package/dist/src/components/FolderName/FolderName.d.ts +0 -37
- package/dist/src/components/FormItem/FormItem.d.ts +0 -66
- package/dist/src/components/FormItem/constants.d.ts +0 -3
- package/dist/src/components/FormPopup/FormPopup.d.ts +0 -46
- package/dist/src/components/FormPopup/constants.d.ts +0 -3
- package/dist/src/components/Grid/Grid.d.ts +0 -120
- package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +0 -1
- package/dist/src/components/Grid/comparators/base-column-comparator.spec.d.ts +0 -1
- package/dist/src/components/Grid/constants.d.ts +0 -28
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +0 -34
- package/dist/src/components/Grid/renderers/constants.d.ts +0 -7
- package/dist/src/components/Grid/renderers/utils.d.ts +0 -1
- package/dist/src/components/Grid/renderers/utils.spec.d.ts +0 -1
- package/dist/src/components/InputPopup/InputPopup.d.ts +0 -61
- package/dist/src/components/JsonEditor/JsonEditor.d.ts +0 -25
- package/dist/src/components/JsonEditor/lazy.d.ts +0 -14
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +0 -38
- package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +0 -51
- package/dist/src/components/MarkdownEditor/lazy.d.ts +0 -7
- package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +0 -1
- package/dist/src/components/New/Button/__tests__/utils.spec.d.ts +0 -1
- package/dist/src/components/New/Calendar/utils.spec.d.ts +0 -1
- package/dist/src/components/New/Slider/utils.spec.d.ts +0 -1
- package/dist/src/components/New/TagInput/utils.spec.d.ts +0 -1
- package/dist/src/components/Notification/Notification.d.ts +0 -58
- package/dist/src/components/Notification/constants.d.ts +0 -8
- package/dist/src/components/NumberInput/NumberInput.d.ts +0 -34
- package/dist/src/components/Pagination/Pagination.d.ts +0 -11
- package/dist/src/components/Pagination/tests/utils.spec.d.ts +0 -1
- package/dist/src/components/Pagination/utils.d.ts +0 -9
- package/dist/src/components/PasswordInput/Icons/HideIcon.d.ts +0 -16
- package/dist/src/components/PasswordInput/Icons/ShowIcon.d.ts +0 -16
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +0 -26
- package/dist/src/components/Popup/Popup.d.ts +0 -64
- package/dist/src/components/Popup/constants.d.ts +0 -5
- package/dist/src/components/RadioButton/RadioButton.d.ts +0 -54
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +0 -66
- package/dist/src/components/RadioGroup/constants.d.ts +0 -5
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +0 -74
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +0 -35
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +0 -72
- package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +0 -10
- package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +0 -8
- package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +0 -30
- package/dist/src/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.d.ts +0 -20
- package/dist/src/components/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaArrayEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaField.d.ts +0 -29
- package/dist/src/components/SchemaRenderer/components/SchemaFieldContent.d.ts +0 -25
- package/dist/src/components/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +0 -33
- package/dist/src/components/SchemaRenderer/components/SchemaObjectEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaOneOfEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaPrimitiveField.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaSection.d.ts +0 -33
- package/dist/src/components/SchemaRenderer/context.d.ts +0 -19
- package/dist/src/components/SchemaRenderer/tests/utils.spec.d.ts +0 -1
- package/dist/src/components/SchemaRenderer/types.d.ts +0 -62
- package/dist/src/components/SchemaRenderer/utils.d.ts +0 -1
- package/dist/src/components/Search/Search.d.ts +0 -35
- package/dist/src/components/Search/constants.d.ts +0 -8
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +0 -40
- package/dist/src/components/SegmentedControl/constants.d.ts +0 -5
- package/dist/src/components/Select/MultiSelectTags.d.ts +0 -8
- package/dist/src/components/Select/Select.d.ts +0 -100
- package/dist/src/components/Select/SelectSubMenuItem.d.ts +0 -8
- package/dist/src/components/Select/constants.d.ts +0 -9
- package/dist/src/components/SelectField/SelectField.d.ts +0 -42
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +0 -31
- package/dist/src/components/Slider/Slider.d.ts +0 -57
- package/dist/src/components/Steps/Step.d.ts +0 -9
- package/dist/src/components/Steps/Steps.d.ts +0 -26
- package/dist/src/components/Steps/tests/Steps.test.d.ts +0 -1
- package/dist/src/components/Steps/tests/utils.spec.d.ts +0 -1
- package/dist/src/components/Steps/utils.d.ts +0 -3
- package/dist/src/components/Switch/Switch.d.ts +0 -34
- package/dist/src/components/TagInput/TagInput.d.ts +0 -52
- package/dist/src/components/Textarea/Textarea.d.ts +0 -39
- package/dist/src/constants/editor.d.ts +0 -2
- package/dist/src/constants/file-grid-columns.d.ts +0 -4
- package/dist/src/constants/storybook/form-item.d.ts +0 -3
- package/dist/src/models/file-manager.d.ts +0 -19
- package/dist/src/models/segmented-control.d.ts +0 -7
- package/dist/src/subpaths/file-manager.d.ts +0 -21
- package/dist/src/types/file-manager.d.ts +0 -59
- package/dist/src/types/form-item.d.ts +0 -31
- package/dist/src/types/select.d.ts +0 -8
- package/dist/src/utils/__tests__/accessible-name.spec.d.ts +0 -1
- package/dist/src/utils/__tests__/avatar.spec.d.ts +0 -1
- package/dist/src/utils/__tests__/element-size-observer.spec.d.ts +0 -1
- package/dist/src/utils/__tests__/file-accept.spec.d.ts +0 -1
- package/dist/src/utils/__tests__/merge-classes.spec.d.ts +0 -1
- package/dist/src/utils/__tests__/path.spec.d.ts +0 -1
- package/dist/src/utils/__tests__/pointer.spec.d.ts +0 -1
- package/dist/src/utils/__tests__/timezone.spec.d.ts +0 -1
- package/dist/src/utils/grid-registration.spec.d.ts +0 -1
- package/dist/types/file-manager.js +0 -12
- package/dist/types/form-item.js +0 -4
- package/dist/types/select.js +0 -5
- package/dist/use-file-manager-tabs-aymbCxrD.cjs +0 -3
- package/dist/utils/path.js +0 -4
- /package/dist/components/{Analytics → New/Analytics}/Bar/utils.js +0 -0
- /package/dist/components/{Analytics → New/Analytics}/Histogram/utils.js +0 -0
|
@@ -28,8 +28,9 @@ export interface BreadcrumbsProps {
|
|
|
28
28
|
*/
|
|
29
29
|
maxVisibleItems?: number;
|
|
30
30
|
/**
|
|
31
|
-
* The trail's type scale: `dial-small-text` by default,
|
|
32
|
-
* for a trail that doubles as the page
|
|
31
|
+
* The trail's type scale: `dial-small-text` by default, `dial-tiny-text` for
|
|
32
|
+
* a dense header, or `dial-h2-text` for a trail that doubles as the page
|
|
33
|
+
* heading.
|
|
33
34
|
*/
|
|
34
35
|
size?: BreadcrumbsSize;
|
|
35
36
|
/** Node drawn between two segments. Defaults to a right chevron, mirrored in RTL. */
|
|
@@ -64,8 +65,10 @@ export interface BreadcrumbsProps {
|
|
|
64
65
|
* trail is announced as a list of links rather than a string of chevrons.
|
|
65
66
|
*
|
|
66
67
|
* The trail is drawn at `dial-small-text` by default; `size` switches it to
|
|
67
|
-
* `dial-
|
|
68
|
-
*
|
|
68
|
+
* `dial-tiny-text` for a dense header — a trail that never clips, so a focus
|
|
69
|
+
* ring stays whole, and caps no segment, so its current page takes the free
|
|
70
|
+
* width — or to `dial-h2-text` for a trail that doubles as the page heading,
|
|
71
|
+
* where the token's own semibold weight applies to every segment.
|
|
69
72
|
*
|
|
70
73
|
* Labels are the caller's to translate; the two accessible names default to
|
|
71
74
|
* English and take an override.
|
|
@@ -84,7 +87,7 @@ export interface BreadcrumbsProps {
|
|
|
84
87
|
*
|
|
85
88
|
* @param items - The trail, outermost first; the last entry is the current page
|
|
86
89
|
* @param [maxVisibleItems=4] - Segments drawn before the middle collapses behind an ellipsis menu
|
|
87
|
-
* @param [size=BreadcrumbsSize.Small] - The trail's type scale: `dial-small-text` or `dial-h2-text`
|
|
90
|
+
* @param [size=BreadcrumbsSize.Small] - The trail's type scale: `dial-small-text`, `dial-tiny-text` or `dial-h2-text`
|
|
88
91
|
* @param [separator] - Node drawn between two segments; defaults to a right chevron
|
|
89
92
|
* @param [ariaLabel='Breadcrumb'] - Accessible name for the `<nav>`
|
|
90
93
|
* @param [overflowAriaLabel='Show hidden path segments'] - Accessible name for the ellipsis button
|
|
@@ -3,9 +3,10 @@ import { BreadcrumbsSize } from '../../../types/breadcrumbs';
|
|
|
3
3
|
/**
|
|
4
4
|
* The `<nav>`. It clips rather than wraps: a breadcrumb that reflows onto a
|
|
5
5
|
* second line moves the content below it, so the trail truncates its segments
|
|
6
|
-
* instead (see `segmentWidthClassName`).
|
|
6
|
+
* instead (see `segmentWidthClassName`). The tiny trail does not clip at all,
|
|
7
|
+
* so a segment's focus ring stays whole; its segments truncate on their own.
|
|
7
8
|
*/
|
|
8
|
-
export declare const navClassName
|
|
9
|
+
export declare const navClassName: Record<BreadcrumbsSize, string>;
|
|
9
10
|
/** The `<ol>` holding the segments and their separators. */
|
|
10
11
|
export declare const listClassName = "flex min-w-0 flex-nowrap items-center gap-2 whitespace-nowrap";
|
|
11
12
|
/** One `<li>`: the segment and the separator that follows it. */
|
|
@@ -21,20 +22,25 @@ export declare const sizeClassName: Record<BreadcrumbsSize, string>;
|
|
|
21
22
|
* variant that does not exist.
|
|
22
23
|
*/
|
|
23
24
|
export declare const currentSizeClassName: Record<BreadcrumbsSize, string>;
|
|
25
|
+
type SegmentPosition = 'first' | 'middle' | 'last';
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* what is left, since it names where the user actually is.
|
|
27
|
+
* The tiny trail caps nothing, so a trail that fits is never truncated. Its
|
|
28
|
+
* middle segments shrink a thousand times faster than the current page, down
|
|
29
|
+
* to a letter and their chevron; only then does the current page give way.
|
|
29
30
|
*/
|
|
30
|
-
export declare const segmentWidthClassName: Record<
|
|
31
|
+
export declare const segmentWidthClassName: Record<BreadcrumbsSize, Record<SegmentPosition, string>>;
|
|
32
|
+
/**
|
|
33
|
+
* The focus ring's shape, shared by the segments and the ellipsis button. The
|
|
34
|
+
* tiny trail draws the design's 1px offset around a 4px radius.
|
|
35
|
+
*/
|
|
36
|
+
export declare const focusRingClassName: Record<BreadcrumbsSize, string>;
|
|
31
37
|
/** The box that draws a segment, around its icon and its label. */
|
|
32
|
-
export declare const segmentClassName = "flex min-w-0 flex-1 items-center gap-1
|
|
38
|
+
export declare const segmentClassName = "flex min-w-0 flex-1 items-center gap-1 transition-colors";
|
|
33
39
|
/**
|
|
34
40
|
* A segment the user can follow. Secondary until hovered, then accent — the
|
|
35
41
|
* same pairing the kit's other inline links use.
|
|
36
42
|
*/
|
|
37
|
-
export declare const linkSegmentClassName = "text-secondary hover:text-accent focus-visible:outline focus-visible:outline-
|
|
43
|
+
export declare const linkSegmentClassName = "text-secondary hover:text-accent focus-visible:outline focus-visible:outline-focus";
|
|
38
44
|
/**
|
|
39
45
|
* The last segment: where the user is. Semibold and primary, and never a
|
|
40
46
|
* link — a control that navigates to the page it is on has nothing to do.
|
|
@@ -49,7 +55,7 @@ export declare const separatorClassName = "inline-flex flex-none items-center le
|
|
|
49
55
|
* glyph to the 24×24 of WCAG 2.5.8; the enhanced 44×44 target would overhang
|
|
50
56
|
* the segments on either side of it (see the README exception table).
|
|
51
57
|
*/
|
|
52
|
-
export declare const overflowButtonClassName = "dial-kit-minimum-target flex shrink-0 items-center
|
|
58
|
+
export declare const overflowButtonClassName = "dial-kit-minimum-target flex shrink-0 items-center text-secondary transition-colors hover:text-accent focus-visible:outline focus-visible:outline-focus";
|
|
53
59
|
/**
|
|
54
60
|
* Smallest trail the collapse can produce: the root, the ellipsis and the
|
|
55
61
|
* current page. Below that there is nothing left to hide behind the ellipsis.
|
|
@@ -58,3 +64,4 @@ export declare const MIN_VISIBLE_ITEMS = 3;
|
|
|
58
64
|
/** Segments shown before the trail collapses. */
|
|
59
65
|
export declare const DEFAULT_MAX_VISIBLE_ITEMS = 4;
|
|
60
66
|
export declare const defaultSeparator: ReactNode;
|
|
67
|
+
export {};
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import { FC, FocusEventHandler } from 'react';
|
|
1
|
+
import { FC, FocusEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { LabelProps } from '../Label/Label';
|
|
3
3
|
import { CalendarMode } from '../../../types/calendar';
|
|
4
4
|
export type CalendarValue = Date | string | null;
|
|
5
|
+
/** Props handed to {@link CalendarProps.renderTimeField}. */
|
|
6
|
+
export interface CalendarTimeFieldRenderProps {
|
|
7
|
+
/** Current time of day as `"HH:mm"`, or an empty string when no date is selected yet. */
|
|
8
|
+
value: string;
|
|
9
|
+
/** Call with a complete `"HH:mm"` string; the Calendar merges it into its `Date` value. */
|
|
10
|
+
onChange: (time: string) => void;
|
|
11
|
+
/** Forward to the field's input so the Calendar's `onBlur` keeps firing. */
|
|
12
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
invalid: boolean;
|
|
15
|
+
/** Accessible name for the field. */
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
/** Viewer's timezone hint when `showTimezone` is set, otherwise `null`. */
|
|
18
|
+
timezoneLabel: string | null;
|
|
19
|
+
}
|
|
5
20
|
export interface CalendarProps {
|
|
6
21
|
mode?: CalendarMode;
|
|
7
22
|
value?: CalendarValue;
|
|
@@ -15,6 +30,12 @@ export interface CalendarProps {
|
|
|
15
30
|
placeholder?: string;
|
|
16
31
|
disabled?: boolean;
|
|
17
32
|
invalid?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Ids of elements describing the field — typically an error rendered next
|
|
35
|
+
* to it. Lands on the focusable control: the masked input in `time` mode,
|
|
36
|
+
* the popover trigger otherwise.
|
|
37
|
+
*/
|
|
38
|
+
ariaDescribedBy?: string;
|
|
18
39
|
id?: string;
|
|
19
40
|
className?: string;
|
|
20
41
|
minDate?: Date;
|
|
@@ -24,10 +45,31 @@ export interface CalendarProps {
|
|
|
24
45
|
fieldClassName?: string;
|
|
25
46
|
/**
|
|
26
47
|
* Shows the viewer's timezone (e.g. `(GMT+01:00) Europe/Berlin`, computed
|
|
27
|
-
* by `getTimezoneLabel`) at the trailing edge of the
|
|
48
|
+
* by `getTimezoneLabel`) at the trailing edge of the time fields — the
|
|
49
|
+
* `time` mode field and the `datetime` popover footer's field — naming
|
|
28
50
|
* the zone the entered time-of-day refers to.
|
|
29
51
|
*/
|
|
30
52
|
showTimezone?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* `time` mode only: shows a clock button at the field's trailing edge that
|
|
55
|
+
* opens an hour/minute list popover. The field stays typeable either way.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
showTimePicker?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* `datetime` mode only: replaces the time field in the popover footer with
|
|
61
|
+
* a custom control, e.g. one that opens its own hour/minute picker. The
|
|
62
|
+
* default is the built-in typeable `HH:mm` field. The Calendar keeps owning
|
|
63
|
+
* the `Date` value — the control only reads and writes the `"HH:mm"` part.
|
|
64
|
+
*/
|
|
65
|
+
renderTimeField?: (props: CalendarTimeFieldRenderProps) => ReactNode;
|
|
66
|
+
/**
|
|
67
|
+
* `time` mode only: classes merged onto the clock button after its
|
|
68
|
+
* defaults, so a conflicting utility such as `size-6` overrides the default
|
|
69
|
+
* `size-8`. Pairs with `fieldClassName` to fit the field and button into a
|
|
70
|
+
* denser layout, e.g. a custom `renderTimeField` control.
|
|
71
|
+
*/
|
|
72
|
+
pickerButtonClassName?: string;
|
|
31
73
|
}
|
|
32
74
|
/**
|
|
33
75
|
* A date/time picker supporting four selection modes.
|
|
@@ -57,12 +99,16 @@ export interface CalendarProps {
|
|
|
57
99
|
* @param [placeholder] - Placeholder shown when there is no value; defaults to a mode-appropriate string ("Select date", "Select date and time", "--:--" or "Select day")
|
|
58
100
|
* @param [disabled=false] - Disables the control
|
|
59
101
|
* @param [invalid=false] - Applies error styling
|
|
102
|
+
* @param [ariaDescribedBy] - Ids of elements describing the field (e.g. its error), set on the focusable control
|
|
60
103
|
* @param [id] - id applied to the control, linked to the label
|
|
61
104
|
* @param [className] - Additional CSS classes applied to the outer container
|
|
62
105
|
* @param [minDate] - Earliest selectable date (date/datetime modes)
|
|
63
106
|
* @param [maxDate] - Latest selectable date (date/datetime modes)
|
|
64
107
|
* @param [locale="en-GB"] - BCP 47 locale tag used to localize month/weekday names and date formatting
|
|
65
108
|
* @param [fieldClassName] - Additional classes merged onto the trigger field, overriding conflicting defaults
|
|
66
|
-
* @param [showTimezone=false] - Shows the viewer's timezone (e.g. `(GMT+01:00) Europe/Berlin`) at the trailing edge of the `time`
|
|
109
|
+
* @param [showTimezone=false] - Shows the viewer's timezone (e.g. `(GMT+01:00) Europe/Berlin`) at the trailing edge of the time fields (`time` mode and the `datetime` popover footer)
|
|
110
|
+
* @param [showTimePicker=true] - `time` mode only: shows a clock button that opens an hour/minute list popover next to the typeable field
|
|
111
|
+
* @param [pickerButtonClassName] - `time` mode only: classes merged onto the clock button after its defaults, so a conflicting utility overrides them
|
|
112
|
+
* @param [renderTimeField] - `datetime` mode only: renders a custom control in place of the popover footer's time field; receives the `"HH:mm"` value, `onChange`, `onBlur`, `disabled`, `invalid`, `ariaLabel` and `timezoneLabel`
|
|
67
113
|
*/
|
|
68
114
|
export declare const Calendar: FC<CalendarProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface TimePickerPanelProps {
|
|
3
|
+
/** Current `"HH:mm"` value, or an empty/partial string when nothing is picked yet. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Fired with a complete `"HH:mm"` value; `done` is true once the minutes were chosen. */
|
|
6
|
+
onSelect: (next: string, done: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Two-column hour/minute list shown in the `time` mode popover. Picking an
|
|
10
|
+
* hour keeps the current minutes (or `00`); picking minutes keeps the current
|
|
11
|
+
* hour (or `00`) and signals completion so the popover can close.
|
|
12
|
+
* @param value - current `"HH:mm"` value
|
|
13
|
+
* @param onSelect - fired with the next complete value and whether to close
|
|
14
|
+
*/
|
|
15
|
+
export declare const TimePickerPanel: FC<TimePickerPanelProps>;
|
|
@@ -5,6 +5,8 @@ export declare const calendarFieldBaseClassName = "flex w-full items-center just
|
|
|
5
5
|
export declare const calendarFieldDisabledClassName = "!cursor-not-allowed !border-transparent bg-layer-sunken text-control-disable-primary hover:!border-transparent";
|
|
6
6
|
export declare const calendarFieldInvalidClassName = "!border-error";
|
|
7
7
|
export declare const calendarPopoverClassName = "z-floating flex w-[248px] flex-col gap-4 rounded-lg bg-layer-raised px-2 py-4 shadow-md";
|
|
8
|
+
export declare const timePickerPopoverClassName = "z-floating rounded-lg bg-layer-raised p-2 shadow-md";
|
|
9
|
+
export declare const timePickerButtonClassName = "absolute end-2 top-1/2 flex size-8 -translate-y-1/2 items-center justify-center rounded-lg text-secondary hover:bg-control-accent-alpha-hover hover:text-primary focus:outline-hidden focus-visible:outline focus-visible:outline-focus disabled:cursor-not-allowed disabled:text-control-disable-primary disabled:hover:bg-transparent";
|
|
8
10
|
export declare const calendarDayButtonBaseClassName = "flex size-10 items-center justify-center rounded-full dial-small-text text-primary hover:bg-control-accent-alpha-hover hover:text-primary focus:outline-hidden focus-visible:outline focus-visible:outline-focus";
|
|
9
11
|
export declare const calendarDaySelectedClassName = "bg-control-accent text-control-permanent";
|
|
10
12
|
export declare const calendarDayTodayClassName = "text-accent dial-small-semi-text";
|
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
2
|
import { CaptionType } from '../../../types/caption';
|
|
3
|
+
import { LiveRegionPoliteness } from '../../../types/live-region';
|
|
3
4
|
export interface CaptionTextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
5
|
text?: string;
|
|
5
6
|
variant?: CaptionType;
|
|
7
|
+
/**
|
|
8
|
+
* Announce the text through a `LiveRegion` of this politeness. The region is
|
|
9
|
+
* rendered even while `text` is empty, so the first message is heard. Without
|
|
10
|
+
* it the caption has no live-region role and renders nothing for empty text.
|
|
11
|
+
*/
|
|
12
|
+
announce?: LiveRegionPoliteness;
|
|
6
13
|
}
|
|
7
14
|
/**
|
|
8
15
|
* A component for displaying caption text with consistent styling
|
|
9
16
|
* aliases: HelperText|ValidationText
|
|
10
17
|
* Design system 2.0
|
|
11
18
|
*
|
|
19
|
+
* It carries no live-region role by default: a field caption or error is
|
|
20
|
+
* described, not announced. Give it an `id` and point the control's
|
|
21
|
+
* `aria-describedby` at it (the 2.0 form controls do this for their own
|
|
22
|
+
* `caption` / `error`).
|
|
23
|
+
*
|
|
24
|
+
* For a message that must also be heard when it appears — a failed submit, an
|
|
25
|
+
* async error — pass `announce`. The caption is then rendered inside an
|
|
26
|
+
* always-mounted `LiveRegion` (`dial-kit-live-region`), present even while
|
|
27
|
+
* `text` is empty; `id`, `className` and the other props stay on the text
|
|
28
|
+
* element, so `aria-describedby` still resolves to the text itself.
|
|
29
|
+
*
|
|
12
30
|
* @example
|
|
13
31
|
* ```tsx
|
|
14
|
-
* <
|
|
32
|
+
* <input aria-describedby="name-error" aria-invalid />
|
|
33
|
+
* <CaptionText id="name-error" text="This field is required" variant={CaptionType.Error} />
|
|
34
|
+
*
|
|
35
|
+
* <ErrorText text={submitError} announce={LiveRegionPoliteness.Assertive} />
|
|
15
36
|
* ```
|
|
16
37
|
*
|
|
17
|
-
* @param [text] - The text to display. If undefined or empty, nothing is rendered
|
|
38
|
+
* @param [text] - The text to display. If undefined or empty, nothing is rendered unless `announce` is set
|
|
18
39
|
* @param [variant] - The variant of the caption text, e.g., error or description.
|
|
40
|
+
* @param [announce] - Wrap the text in an always-mounted `LiveRegion` of this politeness.
|
|
19
41
|
*/
|
|
20
42
|
export declare const CaptionText: FC<CaptionTextProps>;
|
|
21
43
|
export declare const ErrorText: FC<Omit<CaptionTextProps, 'variant'>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Placement } from '@floating-ui/react';
|
|
2
2
|
import { CSSProperties, FC, MouseEvent, ReactNode, RefObject } from 'react';
|
|
3
|
-
import { DropdownTrigger } from '../../../types/dropdown';
|
|
3
|
+
import { DropdownTrigger, DropdownOverlayRole } from '../../../types/dropdown';
|
|
4
4
|
import { DropdownItem } from '../../../models/dropdown';
|
|
5
|
+
import { DropdownItemFilter } from './search';
|
|
5
6
|
export interface DropdownProps {
|
|
6
7
|
children: ReactNode;
|
|
7
8
|
items?: DropdownItem[];
|
|
@@ -46,6 +47,61 @@ export interface DropdownProps {
|
|
|
46
47
|
* opens, matching the pre-existing behavior.
|
|
47
48
|
*/
|
|
48
49
|
initialFocus?: 0 | -1 | RefObject<HTMLElement | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Whether closing the overlay moves focus back to the trigger: on Escape, a
|
|
52
|
+
* chosen item, the close button or a controlled `open` flip. Focus that has
|
|
53
|
+
* already left the overlay is left where it went — an outside press on
|
|
54
|
+
* another control, or an item whose action focuses something else (e.g. a
|
|
55
|
+
* rename field). Defaults to `true`.
|
|
56
|
+
*/
|
|
57
|
+
returnFocus?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Role of the floating overlay, and with it the trigger's `aria-haspopup`.
|
|
60
|
+
* Applies to `renderOverlay` content only: the `items` list is always a
|
|
61
|
+
* menu. Arrow-key movement between options runs for `Menu` only; a `Dialog`
|
|
62
|
+
* or `None` overlay owns its keys. Defaults to `DropdownOverlayRole.Menu`.
|
|
63
|
+
*/
|
|
64
|
+
overlayRole?: DropdownOverlayRole;
|
|
65
|
+
/**
|
|
66
|
+
* Accessible name of the overlay. Ignored with `DropdownOverlayRole.None`,
|
|
67
|
+
* whose role-less wrapper cannot be named. With neither this nor
|
|
68
|
+
* `overlayAriaLabelledBy`, a menu or a dialog is named by its trigger.
|
|
69
|
+
*/
|
|
70
|
+
overlayAriaLabel?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Id of the element that names the overlay, typically a heading inside
|
|
73
|
+
* `renderOverlay`. Wins over `overlayAriaLabel`. Ignored with
|
|
74
|
+
* `DropdownOverlayRole.None`.
|
|
75
|
+
*/
|
|
76
|
+
overlayAriaLabelledBy?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Puts a search field above `items` that narrows them as the user types and
|
|
79
|
+
* highlights the match in each remaining label. The query is cleared when
|
|
80
|
+
* the menu closes.
|
|
81
|
+
*/
|
|
82
|
+
searchable?: boolean;
|
|
83
|
+
/** Controlled query of the search field; when omitted, the dropdown keeps its own. */
|
|
84
|
+
searchValue?: string;
|
|
85
|
+
/** Fired with every edit of the search field, and with `''` when the menu closes. */
|
|
86
|
+
onSearchChange?: (value: string) => void;
|
|
87
|
+
/** Placeholder and accessible name of the search field. */
|
|
88
|
+
searchPlaceholder?: string;
|
|
89
|
+
/** Accessible name of the search field's clear button. */
|
|
90
|
+
searchClearLabel?: string;
|
|
91
|
+
/** Text shown, and announced, when the query leaves no items. */
|
|
92
|
+
noResultsLabel?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Decides whether an item matches the query, which arrives trimmed and
|
|
95
|
+
* lower-cased. Defaults to a substring match on a string `label`. A submenu
|
|
96
|
+
* whose own row matches keeps all its children; otherwise it keeps only the
|
|
97
|
+
* matching ones, and disappears when none do.
|
|
98
|
+
*/
|
|
99
|
+
filterItem?: DropdownItemFilter;
|
|
100
|
+
/**
|
|
101
|
+
* Number of rows the item list shows before it scrolls. The cap applies to
|
|
102
|
+
* the list alone, so a search field or header stays in view above it.
|
|
103
|
+
*/
|
|
104
|
+
maxVisibleItems?: number;
|
|
49
105
|
}
|
|
50
106
|
/**
|
|
51
107
|
*
|
|
@@ -67,6 +123,14 @@ export interface DropdownProps {
|
|
|
67
123
|
* keeps the menu open across toggles. `MenuItemMark.Highlight` is the current
|
|
68
124
|
* item of a navigation menu.
|
|
69
125
|
*
|
|
126
|
+
* The overlay is a `menu` by default. A `renderOverlay` panel that is not a
|
|
127
|
+
* menu — a popover of free-form content — sets `overlayRole` to
|
|
128
|
+
* `DropdownOverlayRole.Dialog` (named by `overlayAriaLabel`,
|
|
129
|
+
* `overlayAriaLabelledBy` or, failing both, by the trigger), or to
|
|
130
|
+
* `DropdownOverlayRole.None` when its content carries its own role; the
|
|
131
|
+
* trigger's `aria-haspopup` follows the choice. Closing the overlay, Escape
|
|
132
|
+
* included, returns focus to the trigger unless `returnFocus` is `false`.
|
|
133
|
+
*
|
|
70
134
|
* @example
|
|
71
135
|
* ```tsx
|
|
72
136
|
* // Simple items menu
|
|
@@ -83,6 +147,24 @@ export interface DropdownProps {
|
|
|
83
147
|
* <Dropdown closable renderOverlay={() => <div className="p-3">Custom content</div>}>
|
|
84
148
|
* <button type="button" className="px-3 py-2 rounded border">Custom</button>
|
|
85
149
|
* </Dropdown>
|
|
150
|
+
*
|
|
151
|
+
* // A panel that is not a menu: role="dialog", trigger aria-haspopup="dialog"
|
|
152
|
+
* <Dropdown
|
|
153
|
+
* overlayRole={DropdownOverlayRole.Dialog}
|
|
154
|
+
* overlayAriaLabelledBy="limits-title"
|
|
155
|
+
* renderOverlay={() => (
|
|
156
|
+
* <div className="p-3">
|
|
157
|
+
* <h2 id="limits-title">Usage limits</h2>
|
|
158
|
+
* </div>
|
|
159
|
+
* )}
|
|
160
|
+
* >
|
|
161
|
+
* <button type="button" className="px-3 py-2 rounded border">Limits</button>
|
|
162
|
+
* </Dropdown>
|
|
163
|
+
*
|
|
164
|
+
* // Searchable menu, seven rows tall before it scrolls
|
|
165
|
+
* <Dropdown searchable maxVisibleItems={7} items={items}>
|
|
166
|
+
* <button type="button" className="px-3 py-2 rounded border">Create</button>
|
|
167
|
+
* </Dropdown>
|
|
86
168
|
* ```
|
|
87
169
|
*
|
|
88
170
|
* @param children - Trigger element(s) to anchor and open the menu
|
|
@@ -111,5 +193,17 @@ export interface DropdownProps {
|
|
|
111
193
|
* @param [matchReferenceWidth=true] - Whether to match the reference element's width
|
|
112
194
|
* @param [maxDropdownHeight] - Maximum height of the dropdown menu; when omitted, no limit is applied
|
|
113
195
|
* @param [initialFocus] - Initial focus target inside the overlay on open, forwarded to `FloatingFocusManager`; when omitted, matches pre-existing behavior
|
|
196
|
+
* @param [returnFocus=true] - Whether closing the overlay (Escape included) returns focus to the trigger
|
|
197
|
+
* @param [overlayRole=DropdownOverlayRole.Menu] - Role of a `renderOverlay` overlay, and the trigger's matching `aria-haspopup`; the `items` list is always a menu
|
|
198
|
+
* @param [overlayAriaLabel] - Accessible name of the overlay; ignored with `DropdownOverlayRole.None`
|
|
199
|
+
* @param [overlayAriaLabelledBy] - Id of the element naming the overlay; wins over `overlayAriaLabel`, ignored with `DropdownOverlayRole.None`
|
|
200
|
+
* @param [searchable=false] - Show a search field above `items` that filters them and highlights the match
|
|
201
|
+
* @param [searchValue] - Controlled query of the search field
|
|
202
|
+
* @param [onSearchChange] - Fired with every edit of the search field, and with `''` when the menu closes
|
|
203
|
+
* @param [searchPlaceholder="Search"] - Placeholder and accessible name of the search field
|
|
204
|
+
* @param [searchClearLabel="Clear search"] - Accessible name of the search field's clear button
|
|
205
|
+
* @param [noResultsLabel="No results found"] - Text shown and announced when the query leaves no items
|
|
206
|
+
* @param [filterItem] - Item matcher; defaults to a case-insensitive substring match on a string `label`
|
|
207
|
+
* @param [maxVisibleItems] - Rows the item list shows before it scrolls
|
|
114
208
|
*/
|
|
115
209
|
export declare const Dropdown: FC<DropdownProps>;
|
|
@@ -11,5 +11,11 @@ export declare const dropdownItemListClassName: string;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const dropdownItemBaseClassName: string;
|
|
13
13
|
export declare const dropdownDividerClassName = "my-1 border-t border-tertiary";
|
|
14
|
+
/** The search row of a `searchable` dropdown: pinned above the item list, which scrolls on its own. */
|
|
15
|
+
export declare const dropdownSearchClassName = "shrink-0 px-1 pt-1";
|
|
16
|
+
/** The no-results line of a `searchable` dropdown, styled as a `PlainText` row. */
|
|
17
|
+
export declare const dropdownNoResultsClassName = "px-3 py-2 text-secondary dial-caption-text";
|
|
18
|
+
/** Height of the item list that shows exactly `rows` rows before it scrolls. */
|
|
19
|
+
export declare const getDropdownListHeight: (rows: number) => number;
|
|
14
20
|
export declare const dropdownGap = 4;
|
|
15
21
|
export declare const submenuCaretIcon: import('react/jsx-runtime').JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownItem } from '../../../models/dropdown';
|
|
2
|
+
/** Decides whether an item matches a non-empty, trimmed, lower-cased query. */
|
|
3
|
+
export type DropdownItemFilter = (item: DropdownItem, query: string) => boolean;
|
|
4
|
+
/** Case-insensitive substring match on a string `label`; an item with a non-string label never matches. */
|
|
5
|
+
export declare const matchDropdownItemLabel: DropdownItemFilter;
|
|
6
|
+
/** Returns `items` narrowed to the rows matching `query`; an empty query returns `items` unchanged. */
|
|
7
|
+
export declare const filterDropdownItems: (items: DropdownItem[], query: string, isMatch?: DropdownItemFilter) => DropdownItem[];
|
|
8
|
+
/** Returns `items` with every string row label, submenus included, rendered through a single-line `Highlight` of `query`. */
|
|
9
|
+
export declare const highlightDropdownItems: (items: DropdownItem[], query: string) => DropdownItem[];
|
|
@@ -26,6 +26,8 @@ export interface EntityIdentityProps {
|
|
|
26
26
|
item: EntityIdentityItem;
|
|
27
27
|
/** User-visible strings; pass translated ones in a localised app. */
|
|
28
28
|
labels?: EntityIdentityLabels;
|
|
29
|
+
/** Whether to show the type label above the name. */
|
|
30
|
+
showType?: boolean;
|
|
29
31
|
/** Whether to show `item.version` next to the name. */
|
|
30
32
|
showVersion?: boolean;
|
|
31
33
|
/** Whether to show the featured chip when `item.isFeatured` is true. */
|
|
@@ -61,8 +63,9 @@ export interface EntityIdentityProps {
|
|
|
61
63
|
*
|
|
62
64
|
* The type label is plain uppercase text coloured by `item.type`. The icon is
|
|
63
65
|
* a square `Avatar`, so a missing or broken image falls back to the initials of
|
|
64
|
-
* the name. The
|
|
65
|
-
*
|
|
66
|
+
* the name. The image sits on the `bg-entity-icon` plate, so a dark theme can
|
|
67
|
+
* keep a dark, transparent logo legible. The icon is decorative: the name next
|
|
68
|
+
* to it already names the entity.
|
|
66
69
|
*
|
|
67
70
|
* @example
|
|
68
71
|
* ```tsx
|
|
@@ -74,6 +77,7 @@ export interface EntityIdentityProps {
|
|
|
74
77
|
*
|
|
75
78
|
* @param item - The entity to display
|
|
76
79
|
* @param [labels] - User-visible strings
|
|
80
|
+
* @param [showType=true] - Whether to show the type label
|
|
77
81
|
* @param [showVersion=true] - Whether to show the version
|
|
78
82
|
* @param [hasFeaturedTag=true] - Whether to show the featured chip for a featured entity
|
|
79
83
|
* @param [iconSize=48] - Icon size in px
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ErrorInfo, FC, ReactNode } from 'react';
|
|
2
|
+
export interface ErrorBoundaryProps {
|
|
3
|
+
/** The subtree to guard. */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** Headline of the fallback screen (its `h1`); also what is announced on a crash. */
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
/** Optional line under the title saying what happened or what to do. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** Text of the recovery button. */
|
|
10
|
+
actionLabel: string;
|
|
11
|
+
/**
|
|
12
|
+
* Called when the recovery button is activated, before the boundary renders
|
|
13
|
+
* its children again. Omit it to reload the page instead — the right
|
|
14
|
+
* recovery for an app-level boundary, where state may be corrupt.
|
|
15
|
+
*/
|
|
16
|
+
onReset?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Values that clear the error when any of them changes, compared with
|
|
19
|
+
* `Object.is` — typically the current route path, so navigating away from a
|
|
20
|
+
* crashed page recovers.
|
|
21
|
+
*/
|
|
22
|
+
resetKeys?: readonly unknown[];
|
|
23
|
+
/** Called once per caught error, for logging or reporting. */
|
|
24
|
+
onError?: (error: unknown, info: ErrorInfo) => void;
|
|
25
|
+
/** Glyph in the fallback badge. Defaults to a warning triangle; `null` drops the badge. */
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
/** Additional CSS classes for the fallback `StateScreen`. */
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Catches a render error in its subtree and replaces the subtree with a
|
|
32
|
+
* full-container error screen that has one way out.
|
|
33
|
+
* aliases: ErrorFallback|CrashScreen|ErrorPage|SomethingWentWrong|RootErrorBoundary
|
|
34
|
+
* Design system 2.0
|
|
35
|
+
*
|
|
36
|
+
* The fallback is a `StateScreen` with a warning badge and a `PrimaryButton`
|
|
37
|
+
* that takes focus, since the control the user was on is gone. The crash is
|
|
38
|
+
* announced through an assertive `LiveRegion` that is mounted with the
|
|
39
|
+
* boundary, before any error: a region mounted together with its message is
|
|
40
|
+
* often not read.
|
|
41
|
+
*
|
|
42
|
+
* The button calls `onReset` and renders the children again, or reloads the
|
|
43
|
+
* page when `onReset` is omitted. `resetKeys` clears the error without a click.
|
|
44
|
+
* Like every React error boundary, it does not catch errors in event handlers,
|
|
45
|
+
* async code or the boundary itself. All text comes from props.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <ErrorBoundary
|
|
50
|
+
* title={t('error.title')}
|
|
51
|
+
* description={t('error.description')}
|
|
52
|
+
* actionLabel={t('error.reload')}
|
|
53
|
+
* onError={(error) => logger.error(error)}
|
|
54
|
+
* >
|
|
55
|
+
* <App />
|
|
56
|
+
* </ErrorBoundary>
|
|
57
|
+
*
|
|
58
|
+
* <ErrorBoundary
|
|
59
|
+
* title={t('error.title')}
|
|
60
|
+
* actionLabel={t('error.tryAgain')}
|
|
61
|
+
* onReset={() => {}}
|
|
62
|
+
* resetKeys={[pathname]}
|
|
63
|
+
* >
|
|
64
|
+
* <SettingsPage />
|
|
65
|
+
* </ErrorBoundary>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param [children] - The subtree to guard.
|
|
69
|
+
* @param title - Headline of the fallback; also the announcement.
|
|
70
|
+
* @param [description] - Optional line under the title.
|
|
71
|
+
* @param actionLabel - Text of the recovery button.
|
|
72
|
+
* @param [onReset] - Recovery handler; the page reloads without one.
|
|
73
|
+
* @param [resetKeys] - Values that clear the error when one of them changes.
|
|
74
|
+
* @param [onError] - Called once per caught error.
|
|
75
|
+
* @param [icon] - Glyph in the fallback badge; `null` drops it.
|
|
76
|
+
* @param [className] - Additional CSS classes for the fallback screen.
|
|
77
|
+
*/
|
|
78
|
+
export declare const ErrorBoundary: FC<ErrorBoundaryProps>;
|
|
@@ -8,6 +8,12 @@ export interface FileNameProps {
|
|
|
8
8
|
type?: DialItemType;
|
|
9
9
|
/** Extension to pick the icon by, overriding the one in `name`. */
|
|
10
10
|
fileExtension?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Replaces the type icon (and the shared badge drawn on it), e.g. to mark a
|
|
13
|
+
* special folder. Its wrapper is `aria-hidden`; the name stays the item's
|
|
14
|
+
* accessible name. The `loading` spinner still takes the icon's place.
|
|
15
|
+
*/
|
|
16
|
+
icon?: ReactNode;
|
|
11
17
|
/** Draws the shared badge on the icon. */
|
|
12
18
|
shared?: boolean;
|
|
13
19
|
/** Replaces the icon with a spinner, which announces itself as a status. */
|
|
@@ -45,6 +51,10 @@ export interface FileNameProps {
|
|
|
45
51
|
* the shared state, which only the badge shows, is announced by a
|
|
46
52
|
* visually-hidden `sharedLabel` after the name instead.
|
|
47
53
|
*
|
|
54
|
+
* Pass `icon` to draw your own in place of the type icon. The shared badge is
|
|
55
|
+
* part of the type icon, so it is not drawn then; the visually-hidden
|
|
56
|
+
* `sharedLabel` still announces the state.
|
|
57
|
+
*
|
|
48
58
|
* While `loading` the icon is swapped for a `Spinner`, which is left in the
|
|
49
59
|
* accessibility tree so the busy state is announced.
|
|
50
60
|
*
|
|
@@ -62,6 +72,7 @@ export interface FileNameProps {
|
|
|
62
72
|
* @param name - Full item name, with or without an extension
|
|
63
73
|
* @param [type=DialItemType.File] - Whether the item is a file or a folder
|
|
64
74
|
* @param [fileExtension] - Extension overriding the one in `name`
|
|
75
|
+
* @param [icon] - Replaces the type icon; the `loading` spinner still takes its place
|
|
65
76
|
* @param [shared=false] - Draws the shared badge on the icon
|
|
66
77
|
* @param [loading=false] - Replaces the icon with a spinner
|
|
67
78
|
* @param [loadingLabel='Loading'] - Accessible name of the spinner
|
|
@@ -7,12 +7,20 @@ export interface FolderPathProps {
|
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* A read-only, non-clickable folder/location path
|
|
10
|
+
* A read-only, non-clickable folder/location path styled like `DialBreadcrumb`.
|
|
11
11
|
* aliases: FolderBreadcrumb|LocationPath
|
|
12
12
|
* Design system 2.0
|
|
13
13
|
*
|
|
14
14
|
* Every segment is disabled (no navigation); the first segment gets a leading
|
|
15
|
-
* folder icon and the last segment is styled as the current/leaf item.
|
|
15
|
+
* folder icon and the last segment is styled as the current/leaf item. A path
|
|
16
|
+
* of more than three segments collapses its middle into a non-interactive `…`
|
|
17
|
+
* that shows the full path (`Shared > Team > Sub > Reports`) in a tooltip on
|
|
18
|
+
* hover; the hidden segments stay in the accessible text.
|
|
19
|
+
*
|
|
20
|
+
* When the path is too wide, the leaf keeps its width longest: the folder
|
|
21
|
+
* before it truncates first, down to about one character, and if the leaf
|
|
22
|
+
* still does not fit, that folder joins the `…` as well. Only then does the
|
|
23
|
+
* leaf truncate.
|
|
16
24
|
*
|
|
17
25
|
* @example
|
|
18
26
|
* ```tsx
|
|
@@ -22,11 +30,11 @@ export interface FolderPathProps {
|
|
|
22
30
|
* @param segments - Path segments to display, outermost first
|
|
23
31
|
* @param [labelClassName='dial-small-text'] - Additional CSS classes applied to non-leaf segments
|
|
24
32
|
* @param [leafClassName='dial-small-semi-text'] - Additional CSS classes applied to the last (leaf) segment
|
|
25
|
-
* @param [className] - Additional CSS classes applied to the
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @param [ariaLabel='Folder path'] - Accessible name for the
|
|
29
|
-
*
|
|
30
|
-
*
|
|
33
|
+
* @param [className] - Additional CSS classes applied to the `<nav>` element.
|
|
34
|
+
* The nav clips on overflow, so this must not shrink it to content width
|
|
35
|
+
* (e.g. never `w-auto`).
|
|
36
|
+
* @param [ariaLabel='Folder path'] - Accessible name for the `<nav>`. A path
|
|
37
|
+
* has no navigable items, so it is not named "Breadcrumb"; override it when a
|
|
38
|
+
* page shows more than one.
|
|
31
39
|
*/
|
|
32
40
|
export declare const FolderPath: FC<FolderPathProps>;
|