@epam/ai-dial-ui-kit 0.14.0-dev.5 → 0.14.0-dev.51
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 +34 -4
- package/dist/CHANGELOG.md +20 -4
- package/dist/DateCellRenderer-BVM-Q8yx.cjs +63 -0
- package/dist/DateCellRenderer-C9SdzDU4.cjs +1 -0
- package/dist/IconButton-DWqoaBWf.cjs +1 -0
- package/dist/JsonEditor-BlaSMX26.cjs +1 -0
- package/dist/MarkdownEditor-5kljDPcm.cjs +1 -0
- package/dist/MarkdownEditor-C0_gU7Fi.cjs +1 -0
- package/dist/MarkdownEditorContainer-BqTGQArV.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 +64 -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 +43 -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 +42 -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 +1130 -182
- package/dist/{JsonEditor-DrC6i27F.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-B1eG0EeX.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 +139 -0
- package/dist/migration-guides/0.14.0/tag-single-size.md +121 -0
- package/dist/migration-guides/README.md +2 -0
- 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/Slider/Slider.d.ts +70 -0
- package/dist/src/components/New/Tag/Tag.d.ts +17 -10
- package/dist/src/components/New/Tag/constants.d.ts +23 -0
- 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 +30 -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-dP4yDdgN.cjs +0 -1
- package/dist/MarkdownEditor-BeNDQecT.js +0 -75
- package/dist/MarkdownEditor-CO-k9xZo.js +0 -35
- package/dist/MarkdownEditor-CSgVi6EZ.cjs +0 -1
- package/dist/MarkdownEditor-fskBDR5e.cjs +0 -1
- package/dist/dial-ui-kit.cjs.js +0 -1
- package/dist/dial-ui-kit.es.js +0 -220
- package/dist/index-DmEajFx0.cjs +0 -71
- package/dist/index-jMP1W9V6.js +0 -66826
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TooltipPlacement } from '../../../types/tooltip';
|
|
3
|
+
export interface InteractiveTooltipProps {
|
|
4
|
+
/**
|
|
5
|
+
* The panel's content. Left fully open-ended — unlike a plain tooltip's
|
|
6
|
+
* text, this can be any markup, including its own buttons and links.
|
|
7
|
+
*/
|
|
8
|
+
content: ReactNode;
|
|
9
|
+
/** Side of the trigger the panel is placed on. */
|
|
10
|
+
placement?: TooltipPlacement;
|
|
11
|
+
/** The element the panel is anchored to and opened from. */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** Render `children` as the trigger instead of wrapping it in a `<span>`. */
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
/** Suppress the panel while keeping the trigger rendered. */
|
|
16
|
+
hideTooltip?: boolean;
|
|
17
|
+
/** Whether the panel starts open (uncontrolled only). */
|
|
18
|
+
initialOpen?: boolean;
|
|
19
|
+
/** Controlled open state; disables the hover and focus triggers. */
|
|
20
|
+
open?: boolean;
|
|
21
|
+
/** Callback fired when the open state should change. */
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
/** Additional CSS classes for the trigger element. */
|
|
24
|
+
triggerClassName?: string;
|
|
25
|
+
/** Additional CSS classes for the panel. */
|
|
26
|
+
contentClassName?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A hover panel that, unlike {@link Tooltip}, can hold its own interactive
|
|
30
|
+
* content.
|
|
31
|
+
* aliases: HoverCard|InfoPopover
|
|
32
|
+
* Design system 2.0
|
|
33
|
+
*
|
|
34
|
+
* Opens next to the trigger on hover or focus, the way a tooltip does, but
|
|
35
|
+
* stays open while the pointer moves into the panel so its content — links,
|
|
36
|
+
* buttons, anything — can be hovered and clicked. It carries no `role`, since
|
|
37
|
+
* ARIA's `tooltip` role forbids focusable content and this is meant to hold
|
|
38
|
+
* some; a panel with meaningfully interactive content should still be
|
|
39
|
+
* reachable without a mouse (Tab from the trigger reaches it), but a purely
|
|
40
|
+
* decorative one is fine to leave out of the tab order entirely.
|
|
41
|
+
*
|
|
42
|
+
* Renders nothing on a mobile screen, where there is no hover to reveal it —
|
|
43
|
+
* so, as with {@link Tooltip}, a control must never depend on this panel alone
|
|
44
|
+
* to be understood or operated.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <InteractiveTooltip
|
|
49
|
+
* placement={TooltipPlacement.Right}
|
|
50
|
+
* content={
|
|
51
|
+
* <>
|
|
52
|
+
* <p>Lets the model write and execute Python in an isolated sandbox.</p>
|
|
53
|
+
* <Button variant={ButtonVariant.Primary} appearance={ButtonAppearance.Link}>
|
|
54
|
+
* View details
|
|
55
|
+
* </Button>
|
|
56
|
+
* </>
|
|
57
|
+
* }
|
|
58
|
+
* >
|
|
59
|
+
* <MenuItem label="code-interpreter" />
|
|
60
|
+
* </InteractiveTooltip>
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param content - The panel's content
|
|
64
|
+
* @param children - The element that triggers the panel
|
|
65
|
+
* @param [asChild=false] - Use the child as the trigger instead of wrapping it in a `<span>`
|
|
66
|
+
* @param [hideTooltip=false] - Suppress the panel while keeping the trigger rendered
|
|
67
|
+
* @param [triggerClassName] - Additional CSS classes for the trigger element
|
|
68
|
+
* @param [contentClassName] - Additional CSS classes for the panel
|
|
69
|
+
* @param [placement=TooltipPlacement.Right] - Side of the trigger the panel is placed on
|
|
70
|
+
* @param [initialOpen=false] - Whether the panel starts open (uncontrolled only)
|
|
71
|
+
* @param [open] - Controlled open state; disables the hover and focus triggers
|
|
72
|
+
* @param [onOpenChange] - Callback fired when the open state should change
|
|
73
|
+
*/
|
|
74
|
+
export declare const InteractiveTooltip: FC<InteractiveTooltipProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive tooltip layout and styling constants.
|
|
3
|
+
* Design system 2.0
|
|
4
|
+
*/
|
|
5
|
+
/** Space left between the panel and the trigger, in px. */
|
|
6
|
+
export declare const INTERACTIVE_TOOLTIP_GAP = 8;
|
|
7
|
+
/**
|
|
8
|
+
* Delay before an on-hover interactive tooltip opens, in ms. Long enough that
|
|
9
|
+
* a pointer crossing the trigger on its way somewhere else does not flash it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const INTERACTIVE_TOOLTIP_HOVER_OPEN_DELAY = 400;
|
|
12
|
+
/**
|
|
13
|
+
* The panel sits above the surface it is anchored to — a dropdown or select
|
|
14
|
+
* overlay, both `z-[53]` — since it can be opened from a row inside one of
|
|
15
|
+
* them.
|
|
16
|
+
*
|
|
17
|
+
* By style this is a neutral floating panel rather than the coloured
|
|
18
|
+
* `Notification` banner: it shares the raised-card shape a dropdown or the
|
|
19
|
+
* calendar use (`shadow-md`, `rounded-xl`), on the base `bg-layer-0` surface
|
|
20
|
+
* rather than their raised one — the panel is opened over content, not
|
|
21
|
+
* stacked inside another panel. `contentClassName` can still replace it with
|
|
22
|
+
* any other background: `twMerge` resolves the conflicting `bg-*` utility.
|
|
23
|
+
* Padding and width are the panel's own, sized for a block of copy and
|
|
24
|
+
* controls rather than a menu row.
|
|
25
|
+
*/
|
|
26
|
+
export declare const interactiveTooltipClassName = "z-[54] max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md";
|
|
@@ -10,6 +10,10 @@ export interface MarkdownEditorProps {
|
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
/** Initial edit/live/preview mode; the toolbar lets the user switch it afterwards. */
|
|
12
12
|
defaultPreview?: PreviewType;
|
|
13
|
+
/** `id` of the underlying textarea, so a visible `<label htmlFor>` can name it. */
|
|
14
|
+
id?: string;
|
|
15
|
+
/** Accessible name for the underlying textarea. Use it only where no visible label exists to pair with `id`. */
|
|
16
|
+
ariaLabel?: string;
|
|
13
17
|
}
|
|
14
18
|
/**
|
|
15
19
|
* The 2.0 Markdown editor: a formatting toolbar (bold/italic/strikethrough,
|
|
@@ -29,5 +33,7 @@ export interface MarkdownEditorProps {
|
|
|
29
33
|
* @param [className] - Additional CSS classes for the container
|
|
30
34
|
* @param [placeholder] - Placeholder text shown when the editor is empty
|
|
31
35
|
* @param [defaultPreview='edit'] - Initial edit/live/preview mode
|
|
36
|
+
* @param [id] - `id` of the underlying textarea, for a visible `<label htmlFor>`
|
|
37
|
+
* @param [ariaLabel] - Accessible name for the underlying textarea
|
|
32
38
|
*/
|
|
33
39
|
export declare const MarkdownEditor: FC<MarkdownEditorProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared leaf module for the 2.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 LazyMarkdownEditor: () => Promise<typeof import("./MarkdownEditor")>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, FC, ReactNode, Ref } from 'react';
|
|
2
|
+
import { MenuItemMark } from '../../../types/menu-item';
|
|
3
|
+
export interface MenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/** Ref to the row button — a submenu trigger anchors its panel to it. */
|
|
5
|
+
ref?: Ref<HTMLButtonElement>;
|
|
6
|
+
/** The row's text. */
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
/** Icon rendered before the label. */
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
/** Secondary text rendered after the label, at the row's trailing edge. */
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
/** How a chosen row is marked. */
|
|
13
|
+
mark?: MenuItemMark;
|
|
14
|
+
/** Whether this row is the chosen one; drives whatever `mark` selects. */
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
/** Paints the row in the error colour — a destructive action. */
|
|
17
|
+
danger?: boolean;
|
|
18
|
+
/** Node pinned to the row's trailing edge, e.g. a submenu caret. */
|
|
19
|
+
trailing?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* A control of its own at the trailing edge — a favourite toggle, a delete
|
|
22
|
+
* button. It is rendered as a **sibling** of the row, not inside it: a
|
|
23
|
+
* button nested in a button is invalid, and it would swallow the row's
|
|
24
|
+
* click and land inside its accessible name.
|
|
25
|
+
*/
|
|
26
|
+
rightControl?: ReactNode;
|
|
27
|
+
/** Truncates the label with a tooltip that only appears once it is clipped. */
|
|
28
|
+
ellipsisLabel?: boolean;
|
|
29
|
+
/** Additional classes for the label element. */
|
|
30
|
+
labelClassName?: string;
|
|
31
|
+
/** Replaces the icon + label content while keeping the row and `trailing`. */
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* One row of a floating overlay — a dropdown menu item or a select option.
|
|
36
|
+
* Design system 2.0
|
|
37
|
+
*
|
|
38
|
+
* Owns the Menu-item states the design defines, so the dropdown and the select
|
|
39
|
+
* cannot drift apart: rest, hover, focus and disable, plus the three ways a
|
|
40
|
+
* chosen row is marked (`MenuItemMark`). The row itself is the control — the
|
|
41
|
+
* checkbox box and the check icon are decorative, since the state already rides
|
|
42
|
+
* on the `aria-checked`/`aria-selected` the caller sets alongside `role`.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <MenuItem role="menuitem" label="Rename" icon={<IconPencil />} />
|
|
47
|
+
*
|
|
48
|
+
* // Single choice, marked with a trailing check
|
|
49
|
+
* <MenuItem role="option" aria-selected label="English" mark={MenuItemMark.Check} selected />
|
|
50
|
+
*
|
|
51
|
+
* // Current item of a navigation menu
|
|
52
|
+
* <MenuItem role="menuitem" aria-current label="Settings" mark={MenuItemMark.Highlight} selected />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @param [label] - The row's text
|
|
56
|
+
* @param [icon] - Icon rendered before the label
|
|
57
|
+
* @param [description] - Secondary text at the row's trailing edge
|
|
58
|
+
* @param [mark=MenuItemMark.None] - How a chosen row is marked
|
|
59
|
+
* @param [selected=false] - Whether this row is the chosen one
|
|
60
|
+
* @param [danger=false] - Paints the row in the error colour
|
|
61
|
+
* @param [trailing] - Node pinned to the trailing edge, e.g. a submenu caret
|
|
62
|
+
* @param [rightControl] - A control of its own at the trailing edge, rendered beside the row
|
|
63
|
+
* @param [ellipsisLabel=false] - Truncate the label with a tooltip once clipped
|
|
64
|
+
* @param [labelClassName] - Additional classes for the label element
|
|
65
|
+
* @param [children] - Replaces the icon + label content
|
|
66
|
+
* @param [className] - Additional classes for the row
|
|
67
|
+
*/
|
|
68
|
+
export declare const MenuItem: FC<MenuItemProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface NoDataContentProps {
|
|
3
|
+
/** Headline of the empty state. */
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
/** Optional secondary line under the title. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** Illustration above the title. Defaults to the empty-state document mark. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Announces the empty state to assistive tech as it appears. Turn it on where
|
|
11
|
+
* the content replaces a list the user has just filtered or searched.
|
|
12
|
+
*/
|
|
13
|
+
live?: boolean;
|
|
14
|
+
/** Additional CSS classes for the container. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Additional CSS classes for the title. */
|
|
17
|
+
titleClassName?: string;
|
|
18
|
+
/** Additional CSS classes for the description. */
|
|
19
|
+
descriptionClassName?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Message shown in place of a list, table or grid that has nothing to show.
|
|
23
|
+
* aliases: EmptyState|NoResults|ZeroState
|
|
24
|
+
* Design system 2.0
|
|
25
|
+
*
|
|
26
|
+
* Fills its container and centres an illustration, a headline and an optional
|
|
27
|
+
* secondary line. The icon is decorative, so it is hidden from assistive tech
|
|
28
|
+
* and the text carries the message on its own.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <NoDataContent
|
|
33
|
+
* title="No results found"
|
|
34
|
+
* description="Try a different search term."
|
|
35
|
+
* />
|
|
36
|
+
*
|
|
37
|
+
* <NoDataContent title="Nothing here yet" icon={<IconInbox size={60} />} live />
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param title - Headline of the empty state.
|
|
41
|
+
* @param [description] - Optional secondary line under the title.
|
|
42
|
+
* @param [icon] - Illustration above the title. Defaults to the empty-state document mark.
|
|
43
|
+
* @param [live=false] - Announce the empty state to assistive tech as it appears.
|
|
44
|
+
* @param [className] - Additional CSS classes for the container.
|
|
45
|
+
* @param [titleClassName] - Additional CSS classes for the title.
|
|
46
|
+
* @param [descriptionClassName] - Additional CSS classes for the description.
|
|
47
|
+
*/
|
|
48
|
+
export declare const NoDataContent: FC<NoDataContentProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ResizableContainerProps } from './ResizableContainer';
|
|
3
|
+
export interface ConditionalResizableContainerProps extends ResizableContainerProps {
|
|
4
|
+
/** Whether resizing is enabled. Defaults to `true`. */
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Renders its children inside a {@link ResizableContainer} only while `enabled`.
|
|
9
|
+
* aliases: OptionalResize|ConditionalPanel
|
|
10
|
+
* Design system 2.0
|
|
11
|
+
*
|
|
12
|
+
* When `enabled` is false the children are rendered on their own, with no
|
|
13
|
+
* wrapper element and no resize behaviour — useful for a panel that is only
|
|
14
|
+
* resizable while it is expanded. Every other prop is passed straight through;
|
|
15
|
+
* see {@link ResizableContainer} for controlled and uncontrolled sizing, sides
|
|
16
|
+
* and callbacks.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <ConditionalResizableContainer
|
|
21
|
+
* enabled={isExpanded}
|
|
22
|
+
* minWidth={180}
|
|
23
|
+
* maxWidth={520}
|
|
24
|
+
* defaultWidth={260}
|
|
25
|
+
* >
|
|
26
|
+
* <Sidebar />
|
|
27
|
+
* </ConditionalResizableContainer>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @param [enabled=true] - Whether resizing is enabled.
|
|
31
|
+
* @param children - Content to render inside the container.
|
|
32
|
+
* @see ResizableContainer
|
|
33
|
+
*/
|
|
34
|
+
export declare const ConditionalResizableContainer: FC<ConditionalResizableContainerProps>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ResizableContainerSide } from '../../../types/resizable-container';
|
|
3
|
+
export interface ResizableContainerProps {
|
|
4
|
+
/** Content placed inside the container. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Minimum allowed width in px. */
|
|
7
|
+
minWidth: number;
|
|
8
|
+
/** Maximum allowed width in px. */
|
|
9
|
+
maxWidth: number;
|
|
10
|
+
/** Controlled width in px. When provided, the component becomes controlled. */
|
|
11
|
+
width?: number;
|
|
12
|
+
/** Initial width when uncontrolled. Defaults to `minWidth`. */
|
|
13
|
+
defaultWidth?: number;
|
|
14
|
+
/** Fired when a resize ends, and once per arrow key press. */
|
|
15
|
+
onResizeStop?: (width: number) => void;
|
|
16
|
+
/** Fired continuously while dragging, with the current width. */
|
|
17
|
+
onResize?: (width: number) => void;
|
|
18
|
+
/** Edge carrying the resize handle. Defaults to `ResizableContainerSide.Right`. */
|
|
19
|
+
side?: ResizableContainerSide;
|
|
20
|
+
/** Width change per arrow key press. Defaults to `16`. */
|
|
21
|
+
keyboardStep?: number;
|
|
22
|
+
/** Accessible name of the handle. Defaults to `'Resize panel'`. */
|
|
23
|
+
ariaLabel?: string;
|
|
24
|
+
/** Additional CSS classes for the inner content wrapper. */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Additional CSS classes for the resize handle. */
|
|
27
|
+
resizeHandlerClassName?: string;
|
|
28
|
+
/** Custom node rendered inside the handle, in place of the default chevron. */
|
|
29
|
+
resizeHandler?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A panel the user can widen or narrow by dragging its edge.
|
|
33
|
+
* aliases: ResizePanel|SizableContainer|Splitter
|
|
34
|
+
* Design system 2.0
|
|
35
|
+
*
|
|
36
|
+
* Works as a controlled component when `width` is provided, otherwise it keeps
|
|
37
|
+
* its own width from `defaultWidth`. The handle — an accent line with a chevron
|
|
38
|
+
* pointing away from the panel — appears on hover and while dragging, and stays
|
|
39
|
+
* within `minWidth`–`maxWidth` in both modes.
|
|
40
|
+
*
|
|
41
|
+
* The handle is a focusable `separator`, so the panel resizes with the arrow
|
|
42
|
+
* keys — `Home` and `End` jump to the bounds — and each press reports through
|
|
43
|
+
* `onResize` and `onResizeStop`. Unlike the 1.0 container this one draws no
|
|
44
|
+
* dividers between its children; pass `divide-y divide-tertiary` through
|
|
45
|
+
* `className` if you want them.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <ResizableContainer minWidth={180} maxWidth={520} defaultWidth={260}>
|
|
50
|
+
* <Sidebar />
|
|
51
|
+
* </ResizableContainer>
|
|
52
|
+
*
|
|
53
|
+
* <ResizableContainer
|
|
54
|
+
* minWidth={180}
|
|
55
|
+
* maxWidth={520}
|
|
56
|
+
* width={sidebarWidth}
|
|
57
|
+
* onResizeStop={setSidebarWidth}
|
|
58
|
+
* >
|
|
59
|
+
* <Sidebar />
|
|
60
|
+
* </ResizableContainer>
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param children - Content placed inside the container.
|
|
64
|
+
* @param minWidth - Minimum allowed width in px.
|
|
65
|
+
* @param maxWidth - Maximum allowed width in px.
|
|
66
|
+
* @param [width] - Controlled width. If omitted the container is uncontrolled.
|
|
67
|
+
* @param [defaultWidth] - Initial width when uncontrolled. Defaults to `minWidth`.
|
|
68
|
+
* @param [onResizeStop] - Fired when a resize ends, and once per arrow key press.
|
|
69
|
+
* @param [onResize] - Fired continuously while dragging.
|
|
70
|
+
* @param [side=ResizableContainerSide.Right] - Edge carrying the resize handle.
|
|
71
|
+
* @param [keyboardStep=16] - Width change per arrow key press.
|
|
72
|
+
* @param [ariaLabel='Resize panel'] - Accessible name of the handle.
|
|
73
|
+
* @param [className] - Additional CSS classes for the inner content wrapper.
|
|
74
|
+
* @param [resizeHandlerClassName] - Additional CSS classes for the resize handle.
|
|
75
|
+
* @param [resizeHandler] - Custom node rendered inside the handle, replacing the default chevron.
|
|
76
|
+
*/
|
|
77
|
+
export declare const ResizableContainer: FC<ResizableContainerProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ResizableContainerSide } from '../../../../types/resizable-container';
|
|
3
|
+
interface ResizeHandleProps {
|
|
4
|
+
side: ResizableContainerSide;
|
|
5
|
+
isResizing: boolean;
|
|
6
|
+
width: number;
|
|
7
|
+
minWidth: number;
|
|
8
|
+
maxWidth: number;
|
|
9
|
+
step: number;
|
|
10
|
+
ariaLabel: string;
|
|
11
|
+
onWidthChange: (nextWidth: number) => void;
|
|
12
|
+
customHandler?: ReactNode;
|
|
13
|
+
handlerClassName?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The draggable edge of {@link ResizableContainer}. It is a focusable
|
|
17
|
+
* `separator` — the window-splitter pattern — so the panel can be resized with
|
|
18
|
+
* the arrow keys as well as the pointer.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ResizeHandle: FC<ResizeHandleProps>;
|
|
21
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Keys that move the selection inside the group. */
|
|
2
2
|
export declare const NAVIGATION_KEYS: string[];
|
|
3
3
|
/** The sunken track the segments sit in. */
|
|
4
|
-
export declare const containerClassName = "inline-flex w-fit items-center gap-1 rounded-full bg-layer-sunken p-
|
|
5
|
-
export declare const segmentClassName = "flex h-8 min-w-8
|
|
4
|
+
export declare const containerClassName = "inline-flex w-fit items-center gap-1 rounded-full border border-tertiary bg-layer-sunken p-[3px]";
|
|
5
|
+
export declare const segmentClassName = "flex h-8 min-w-8 grow shrink-0 basis-auto items-center justify-center gap-2 whitespace-nowrap rounded-full px-4 dial-small-text transition-colors duration-200 outline-offset-0 focus-visible:outline focus-visible:outline-focus";
|
|
6
6
|
/** Selected lifts off the track on a raised surface and keeps the accent at rest. */
|
|
7
7
|
export declare const segmentSelectedClassName = "bg-layer-raised text-accent shadow-xs";
|
|
8
8
|
export declare const segmentUnselectedClassName = "bg-transparent text-secondary";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, MouseEvent, ReactNode, Ref } from 'react';
|
|
2
2
|
import { LabelProps } from '../Label/Label';
|
|
3
3
|
import { SelectOption } from '../../../models/select';
|
|
4
|
+
import { MenuItemMark } from '../../../types/menu-item';
|
|
4
5
|
import { ElementSize } from '../../../types/size';
|
|
5
6
|
export interface SelectProps {
|
|
6
7
|
options: SelectOption[];
|
|
@@ -21,6 +22,13 @@ export interface SelectProps {
|
|
|
21
22
|
searchPlaceholder?: string;
|
|
22
23
|
selectAll?: boolean;
|
|
23
24
|
selectAllLabel?: string;
|
|
25
|
+
/**
|
|
26
|
+
* How the chosen option is marked in single mode. The design tints the row
|
|
27
|
+
* (`Tint`, the default); `Check` puts a trailing check on it instead, the
|
|
28
|
+
* way a menu marks its rows, and `Highlight` adds the navigation menu's
|
|
29
|
+
* accent label. Multiple mode always uses the checkbox row.
|
|
30
|
+
*/
|
|
31
|
+
selectedOptionMark?: MenuItemMark.Tint | MenuItemMark.Check | MenuItemMark.Highlight;
|
|
24
32
|
emptyStateTitle?: string;
|
|
25
33
|
emptyStateDescription?: string;
|
|
26
34
|
emptyStateIcon?: ReactNode;
|
|
@@ -46,14 +54,17 @@ export interface SelectProps {
|
|
|
46
54
|
* aliases: OptionPicker|ChoiceSelector
|
|
47
55
|
* Design system 2.0
|
|
48
56
|
*
|
|
57
|
+
* A list of **values to choose from**, opened from the field. It is not the
|
|
58
|
+
* control for showing actions or navigation options — that is {@link Dropdown}.
|
|
59
|
+
*
|
|
49
60
|
* The field is an {@link Input}, so it carries the 2.0 field styling, sizes,
|
|
50
61
|
* label, caption and error states, and it exposes the control as a `combobox`
|
|
51
62
|
* whose popup is the option list.
|
|
52
63
|
*
|
|
53
64
|
* Single mode:
|
|
54
65
|
* - The field shows the selected option's leading icon + label.
|
|
55
|
-
* - In the list, the selected option is
|
|
56
|
-
*
|
|
66
|
+
* - In the list, the selected option is tinted; `selectedOptionMark` swaps that
|
|
67
|
+
* for a trailing check or the navigation highlight.
|
|
57
68
|
*
|
|
58
69
|
* Multiple mode uses checkboxes (including Select All with indeterminate state) and
|
|
59
70
|
* renders the selection as removable tags inside the field.
|
|
@@ -87,6 +98,7 @@ export interface SelectProps {
|
|
|
87
98
|
* @param [searchPlaceholder] - Placeholder for the overlay search input.
|
|
88
99
|
* @param [selectAll=false] - Show a "Select All" checkbox in multiple mode.
|
|
89
100
|
* @param [selectAllLabel="Select all"] - Label for the "Select All" checkbox.
|
|
101
|
+
* @param [selectedOptionMark=MenuItemMark.Tint] - How the chosen option is marked in single mode.
|
|
90
102
|
* @param [emptyStateTitle="No options available"] - Title text when there are no options.
|
|
91
103
|
* @param [emptyStateDescription] - Description text when there are no options.
|
|
92
104
|
* @param [emptyStateIcon] - Icon to display when there are no options.
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { SelectOption } from '../../../models/select';
|
|
3
|
+
import { MenuItemMark } from '../../../types/menu-item';
|
|
3
4
|
export interface SelectSubMenuItemProps {
|
|
4
5
|
opt: SelectOption;
|
|
5
6
|
selectedValues: string[];
|
|
7
|
+
/** How a chosen child row is marked. */
|
|
8
|
+
mark?: MenuItemMark.Tint | MenuItemMark.Check | MenuItemMark.Checkbox | MenuItemMark.Highlight;
|
|
6
9
|
onSelect: (value: string) => void;
|
|
7
10
|
}
|
|
8
11
|
export declare const SelectSubMenuItem: FC<SelectSubMenuItemProps>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const selectOverlayBaseClassName: string;
|
|
2
|
+
/**
|
|
3
|
+
* A row of the option list. The options themselves are {@link MenuItem}s; this
|
|
4
|
+
* is what the list's own non-option rows — Select All — align to.
|
|
5
|
+
*/
|
|
2
6
|
export declare const selectOptionBaseClassName: string;
|
|
3
|
-
export declare const selectOptionSelectedClassName = "bg-control-accent-alpha";
|
|
4
7
|
/**
|
|
5
8
|
* Holds the option list to the width of the field.
|
|
6
9
|
*
|
|
@@ -12,8 +15,14 @@ export declare const selectOptionSelectedClassName = "bg-control-accent-alpha";
|
|
|
12
15
|
* default this component relies on).
|
|
13
16
|
*/
|
|
14
17
|
export declare const selectListWidthClassName = "!max-w-[var(--reference-width)]";
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The options themselves scroll, at the design's maximum list length of
|
|
20
|
+
* 344px — not the panel around them, so the search row and Select All stay
|
|
21
|
+
* put while the list moves under them. The panel keeps its own cap on the
|
|
22
|
+
* available viewport height, which takes over on a screen too short for this
|
|
23
|
+
* one.
|
|
24
|
+
*/
|
|
25
|
+
export declare const selectOptionsScrollClassName = "max-h-[344px] overflow-y-auto";
|
|
17
26
|
export declare const selectSubMenuGap = 4;
|
|
18
27
|
export declare const selectSubMenuClassName: string;
|
|
19
28
|
/** Marks an option that opens a nested list. Matches the dropdown's caret. */
|
|
@@ -27,6 +36,4 @@ export declare const selectFieldIconClassName = "text-secondary transition-trans
|
|
|
27
36
|
export declare const selectSearchThreshold = 8;
|
|
28
37
|
export declare const selectSearchIcon: import("react/jsx-runtime").JSX.Element;
|
|
29
38
|
export declare const selectCloseIcon: import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
/** Marks the selected option in single mode, alongside its tinted row. */
|
|
31
|
-
export declare const selectOptionCheckIcon: import("react/jsx-runtime").JSX.Element;
|
|
32
39
|
export declare const selectEmptyStateIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { FC, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { LabelProps } from '../Label/Label';
|
|
3
|
+
type NativeInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue' | 'onChange' | 'size'>;
|
|
4
|
+
export interface SliderProps extends NativeInputProps {
|
|
5
|
+
value: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
labelProps?: LabelProps;
|
|
11
|
+
/** 2-element or 3-element label tuple rendered below the track */
|
|
12
|
+
labels?: [string, string] | [string, string, string];
|
|
13
|
+
/** Custom formatter for the displayed value; defaults to fixed-decimal based on step */
|
|
14
|
+
formatValue?: (value: number) => string;
|
|
15
|
+
/** Renders the current value at the end of the label row */
|
|
16
|
+
showValue?: boolean;
|
|
17
|
+
caption?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
onChange?: (value: number) => void;
|
|
20
|
+
containerClassName?: string;
|
|
21
|
+
/** Additional classes for the unfilled track */
|
|
22
|
+
trackClassName?: string;
|
|
23
|
+
/** Additional classes for the filled portion of the track */
|
|
24
|
+
fillClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A range slider from the 2.0 design system.
|
|
28
|
+
* aliases: RangeInput|TemperatureSlider|RangeSlider
|
|
29
|
+
* Design system 2.0
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Slider
|
|
34
|
+
* id="temperature"
|
|
35
|
+
* labelProps={{ label: 'Temperature' }}
|
|
36
|
+
* value={temperature}
|
|
37
|
+
* labels={['Precise', 'Neutral', 'Creative']}
|
|
38
|
+
* onChange={setTemperature}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* Built on a native `<input type="range">`, so the browser owns the drag, the
|
|
43
|
+
* arrow / Home / End steps, touch and the writing direction. Only the thumb is
|
|
44
|
+
* restyled; the track and its fill are separate elements so the fill can be
|
|
45
|
+
* driven from `value`. Thumb states live in `slider.scss`, because a
|
|
46
|
+
* pseudo-element cannot be reached by a utility class.
|
|
47
|
+
*
|
|
48
|
+
* The interactive row is 24px tall and spans the full width, so the pointer
|
|
49
|
+
* target meets WCAG 2.5.8 (Minimum) but not the 44px of 2.5.5 (Enhanced) — see
|
|
50
|
+
* the exception table in the README.
|
|
51
|
+
*
|
|
52
|
+
* @param value - Current slider value
|
|
53
|
+
* @param [min=0] - Minimum value
|
|
54
|
+
* @param [max=1] - Maximum value
|
|
55
|
+
* @param [step=0.1] - Step increment
|
|
56
|
+
* @param [disabled=false] - Whether the slider is disabled
|
|
57
|
+
* @param [labelProps] - Props of the {@link Label} rendered above the track
|
|
58
|
+
* @param [labels] - 2 or 3 strings rendered below the track (start, [middle,] end)
|
|
59
|
+
* @param [formatValue] - Custom formatter for the displayed value; also becomes the announced `aria-valuetext`
|
|
60
|
+
* @param [showValue=false] - Renders the current value at the end of the label row
|
|
61
|
+
* @param [caption] - Helper text rendered below the track, and described by the slider
|
|
62
|
+
* @param [error] - Error message rendered below the track; replaces the caption
|
|
63
|
+
* @param [onChange] - Callback fired with the new value
|
|
64
|
+
* @param [containerClassName] - Additional classes for the outer container
|
|
65
|
+
* @param [trackClassName] - Additional classes for the unfilled track
|
|
66
|
+
* @param [fillClassName] - Additional classes for the filled portion of the track
|
|
67
|
+
* @param [className] - Additional classes for the underlying range input
|
|
68
|
+
*/
|
|
69
|
+
export declare const Slider: FC<SliderProps>;
|
|
70
|
+
export {};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
import { ElementSize } from '../../../types/size';
|
|
3
2
|
import { TagAppearance } from '../../../types/tag';
|
|
4
3
|
type NativeTagProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'>;
|
|
5
4
|
export interface TagProps extends NativeTagProps {
|
|
6
5
|
label: string;
|
|
7
6
|
icon?: ReactNode;
|
|
8
|
-
size?: ElementSize;
|
|
9
7
|
appearance?: TagAppearance;
|
|
10
8
|
selected?: boolean;
|
|
11
9
|
disabled?: boolean;
|
|
@@ -18,6 +16,10 @@ export interface TagProps extends NativeTagProps {
|
|
|
18
16
|
* aliases: Chip|Pill
|
|
19
17
|
* Design system 2.0
|
|
20
18
|
*
|
|
19
|
+
* The tag has one height — the 32px pill of the 2.0 design. There is no `size`
|
|
20
|
+
* prop: a tag sizes itself, and a caller that needs a different height is
|
|
21
|
+
* usually reaching for a button.
|
|
22
|
+
*
|
|
21
23
|
* The label truncates rather than wrapping, and carries a native `title` so the
|
|
22
24
|
* full text stays reachable when it does.
|
|
23
25
|
*
|
|
@@ -26,10 +28,16 @@ export interface TagProps extends NativeTagProps {
|
|
|
26
28
|
* the caller: a clickable tag that is also closable gives a screen reader two
|
|
27
29
|
* actions with no way to tell which one it landed on.
|
|
28
30
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* No tag draws a rim; the two appearances are told apart by their fill.
|
|
32
|
+
* `TagAppearance.Selectable` is the filter chip of the 2.0 design: no fill
|
|
33
|
+
* at all until it is selected, one hover tint shared by both states, a semibold
|
|
34
|
+
* label once selected, and the state carried on `aria-pressed` rather than by
|
|
35
|
+
* the tint alone. Give it an `onClick` — a selectable tag that cannot be
|
|
36
|
+
* activated is a colour and nothing else.
|
|
37
|
+
*
|
|
38
|
+
* Selecting one therefore changes its width by the difference between the
|
|
39
|
+
* regular and semibold label. In a wrapping filter row that is what the design
|
|
40
|
+
* asks for; if a fixed width matters, give the chip one.
|
|
33
41
|
*
|
|
34
42
|
* @example
|
|
35
43
|
* ```tsx
|
|
@@ -46,11 +54,10 @@ export interface TagProps extends NativeTagProps {
|
|
|
46
54
|
*
|
|
47
55
|
* @param label - Text content displayed inside the tag.
|
|
48
56
|
* @param [icon] - Icon rendered before the label.
|
|
49
|
-
* @param [
|
|
50
|
-
*
|
|
51
|
-
* is the borderless filter chip that tints when selected.
|
|
57
|
+
* @param [appearance=TagAppearance.Outlined] - `outlined` is the filled chip on the raised
|
|
58
|
+
* layer; `selectable` is the unfilled filter chip that tints and turns semibold when selected.
|
|
52
59
|
* @param [selected=false] - Applies the accent-tinted selected styling.
|
|
53
|
-
* @param [disabled=false] -
|
|
60
|
+
* @param [disabled=false] - Stops the tag responding: no click handling, no remove control. The design defines no disabled tag, so the colours stay put.
|
|
54
61
|
* @param [closable=false] - Renders the remove button. Needs `onRemove` to appear.
|
|
55
62
|
* @param [removeLabel] - Accessible name of the remove button; defaults to `Remove <label>`.
|
|
56
63
|
* @param [onRemove] - Called when the remove button is clicked. The click does not bubble to `onClick`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TagAppearance } from '../../../types/tag';
|
|
2
|
+
/**
|
|
3
|
+
* Geometry and layout shared by every tag. No transition: the design animates
|
|
4
|
+
* the hover and selected steps instantly (0ms), so the fill switches on the
|
|
5
|
+
* same frame as the pointer.
|
|
6
|
+
*/
|
|
7
|
+
export declare const tagBaseClassName = "inline-flex h-[32px] max-w-full items-center gap-1 rounded-full px-3";
|
|
8
|
+
/**
|
|
9
|
+
* Fill and text colour per appearance and selection. No tag draws a rim: the
|
|
10
|
+
* two appearances are told apart by their fill — `outlined` sits on the raised
|
|
11
|
+
* layer, `selectable` on nothing until it is selected, where it also steps its
|
|
12
|
+
* label up from secondary to primary.
|
|
13
|
+
*/
|
|
14
|
+
export declare const tagStateClassNames: Record<TagAppearance, Record<'default' | 'selected', string>>;
|
|
15
|
+
/** Cursor and focus ring of a tag that can be activated. */
|
|
16
|
+
export declare const tagInteractiveClassName = "cursor-pointer outline-offset-0 focus-visible:outline focus-visible:outline-focus";
|
|
17
|
+
/**
|
|
18
|
+
* Hover and active step of a clickable tag — one accent tint for every
|
|
19
|
+
* appearance and both selections, as the 2.0 overlay rows do. A selected tag
|
|
20
|
+
* must not read as hovered at rest, and the label is left alone, so an
|
|
21
|
+
* unselected one never darkens into looking selected.
|
|
22
|
+
*/
|
|
23
|
+
export declare const tagHoverClassName = "hover:bg-control-accent-alpha-hover active:bg-control-accent-alpha-active";
|