@splunk/react-ui 4.43.0 → 5.0.0-beta.2
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/Accordion.js +87 -109
- package/Animation.js +48 -31
- package/Avatar.d.ts +2 -0
- package/Avatar.js +478 -0
- package/Box.js +8 -8
- package/Breadcrumbs.js +45 -49
- package/Button.js +144 -399
- package/ButtonGroup.js +22 -26
- package/ButtonSimple.js +239 -605
- package/CHANGELOG.md +4 -0
- package/CHANGELOG.v5.mdx +195 -0
- package/Calendar.js +55 -68
- package/Card.js +162 -200
- package/Chip.js +108 -96
- package/Clickable.js +174 -310
- package/Code.js +393 -422
- package/CollapsiblePanel.js +439 -601
- package/Color.js +727 -967
- package/ColumnLayout.js +190 -234
- package/ComboBox.js +147 -135
- package/ControlGroup.js +502 -531
- package/Date.js +315 -416
- package/DefinitionList.js +128 -140
- package/Dropdown.js +201 -358
- package/DualListbox.js +26 -26
- package/File.js +479 -558
- package/FormRows.js +339 -569
- package/Heading.js +53 -99
- package/Image.js +254 -305
- package/JSONTree.js +105 -107
- package/Layer.js +187 -269
- package/{CloseButton.js → Layout.js} +39 -61
- package/Link.js +91 -244
- package/List.js +68 -74
- package/MIGRATION.v5.mdx +428 -0
- package/Markdown.js +439 -385
- package/Menu.js +383 -741
- package/Message.js +150 -322
- package/MessageBar.js +15 -15
- package/Modal.js +444 -587
- package/Monogram.js +1 -1
- package/Multiselect.js +1207 -1256
- package/NonInteractiveCheckbox.js +189 -0
- package/Number.js +495 -604
- package/Paginator.js +294 -406
- package/Paragraph.js +12 -15
- package/Popover.js +582 -744
- package/Progress.js +141 -244
- package/Prose.d.ts +2 -0
- package/Prose.js +213 -0
- package/RadioBar.js +328 -450
- package/RadioList.js +132 -216
- package/Resize.js +351 -402
- package/ResultsMenu.js +255 -358
- package/Scroll.js +159 -238
- package/Search.js +358 -437
- package/Select.js +1097 -1380
- package/SidePanel.js +179 -223
- package/Slider.js +440 -542
- package/SlidingPanels.js +377 -504
- package/SplitButton.js +114 -102
- package/StaticContent.js +58 -74
- package/StepBar.js +193 -258
- package/Switch.js +246 -552
- package/TabBar.js +438 -622
- package/TabLayout.js +197 -251
- package/Table.js +2355 -3673
- package/Text.js +422 -909
- package/TextArea.js +537 -959
- package/Tooltip.js +35 -41
- package/TransitionOpen.js +296 -336
- package/Typography.js +35 -50
- package/WaitSpinner.js +93 -124
- package/package.json +14 -15
- package/stubs-dependencies.d.ts +0 -7
- package/stubs-splunkui.d.ts +6 -1
- package/types/src/Accordion/Accordion.d.ts +5 -1
- package/types/src/Accordion/Panel.d.ts +1 -2
- package/types/src/Accordion/docs/examples/Controlled.d.ts +2 -1
- package/types/src/Accordion/docs/examples/Inset.d.ts +2 -1
- package/types/src/Accordion/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/Anchor/Anchor.d.ts +1 -1
- package/types/src/Anchor/docs/examples/Basic.d.ts +2 -1
- package/types/src/Animation/Animation.d.ts +12 -2
- package/types/src/AnimationToggle/AnimationToggleProvider.d.ts +1 -1
- package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
- package/types/src/AnimationToggle/docs/examples/ReducedMotionComponent.d.ts +2 -1
- package/types/src/AnimationToggle/docs/examples/ReducedMotionHook.d.ts +2 -1
- package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
- package/types/src/AnimationToggle/docs/examples/ToggleHook.d.ts +2 -1
- package/types/src/Avatar/Avatar.d.ts +65 -0
- package/types/src/Avatar/docs/examples/BackgroundColor.d.ts +2 -0
- package/types/src/Avatar/docs/examples/Basic.d.ts +2 -0
- package/types/src/Avatar/docs/examples/Image.d.ts +2 -0
- package/types/src/Avatar/docs/examples/Interactive.d.ts +2 -0
- package/types/src/Avatar/docs/examples/Size.d.ts +2 -0
- package/types/src/Avatar/getInitials.d.ts +9 -0
- package/types/src/Avatar/index.d.ts +2 -0
- package/types/src/Box/Box.d.ts +1 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/types/src/Breadcrumbs/Item.d.ts +1 -1
- package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -1
- package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -1
- package/types/src/Breadcrumbs/docs/examples/CustomizedClick.d.ts +2 -1
- package/types/src/Button/Button.d.ts +19 -34
- package/types/src/Button/docs/examples/Basic.d.ts +2 -1
- package/types/src/Button/docs/examples/Block.d.ts +2 -1
- package/types/src/Button/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Button/docs/examples/Icons.d.ts +2 -1
- package/types/src/Button/docs/examples/Menus.d.ts +2 -1
- package/types/src/Button/docs/examples/To.d.ts +2 -1
- package/types/src/Button/docs/examples/Truncated.d.ts +2 -1
- package/types/src/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/types/src/ButtonGroup/docs/examples/Basic.d.ts +2 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +22 -41
- package/types/src/ButtonSimple/mixin.d.ts +6 -2
- package/types/src/Calendar/Calendar.d.ts +2 -2
- package/types/src/Calendar/DateTable.d.ts +1 -1
- package/types/src/Calendar/Day.d.ts +1 -1
- package/types/src/Calendar/MonthHeader.d.ts +1 -1
- package/types/src/Card/Body.d.ts +1 -1
- package/types/src/Card/Card.d.ts +4 -9
- package/types/src/Card/Footer.d.ts +1 -8
- package/types/src/Card/Header.d.ts +2 -2
- package/types/src/Card/docs/examples/Actions.d.ts +2 -1
- package/types/src/Card/docs/examples/Basic.d.ts +2 -1
- package/types/src/Card/docs/examples/Clickable.d.ts +2 -1
- package/types/src/Card/docs/examples/Full.d.ts +2 -1
- package/types/src/Card/docs/examples/Images.d.ts +2 -1
- package/types/src/Card/docs/examples/Selectable.d.ts +2 -1
- package/types/src/CardLayout/CardLayout.d.ts +1 -1
- package/types/src/CardLayout/docs/examples/Basic.d.ts +2 -1
- package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
- package/types/src/Chip/Chip.d.ts +1 -1
- package/types/src/Chip/docs/examples/Appearance.d.ts +2 -1
- package/types/src/Chip/docs/examples/CustomColors.d.ts +2 -1
- package/types/src/Chip/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Chip/docs/examples/Icon.d.ts +2 -1
- package/types/src/Chip/docs/examples/Removable.d.ts +2 -1
- package/types/src/Chip/docs/examples/RemovableWithNonStringChildren.d.ts +2 -1
- package/types/src/Clickable/Clickable.d.ts +13 -37
- package/types/src/Clickable/NavigationProvider.d.ts +2 -19
- package/types/src/Clickable/docs/examples/Basic.d.ts +2 -1
- package/types/src/Clickable/docs/examples/Disabled.d.ts +3 -0
- package/types/src/Clickable/docs/examples/NavigationProvider.d.ts +2 -1
- package/types/src/Code/Code.d.ts +2 -2
- package/types/src/Code/docs/examples/Default.d.ts +2 -1
- package/types/src/Code/docs/examples/HideIndent.d.ts +2 -1
- package/types/src/Code/docs/examples/Language.d.ts +2 -1
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +31 -70
- package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +2 -2
- package/types/src/CollapsiblePanel/docs/examples/Actions.d.ts +3 -0
- package/types/src/CollapsiblePanel/docs/examples/BasicControlled.d.ts +2 -1
- package/types/src/CollapsiblePanel/docs/examples/BasicUncontrolled.d.ts +2 -1
- package/types/src/CollapsiblePanel/docs/examples/Disabled.d.ts +3 -0
- package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -1
- package/types/src/CollapsiblePanel/docs/examples/MultiUncontrolled.d.ts +2 -1
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -1
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupInset.d.ts +2 -1
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -1
- package/types/src/CollapsiblePanel/docs/examples/Subtle.d.ts +3 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +2 -1
- package/types/src/Color/Color.d.ts +24 -59
- package/types/src/Color/Palette.d.ts +3 -18
- package/types/src/Color/Swatch.d.ts +1 -4
- package/types/src/Color/docs/examples/Controlled.d.ts +2 -1
- package/types/src/Color/docs/examples/CustomizedPalette.d.ts +2 -1
- package/types/src/Color/docs/examples/HideInput.d.ts +2 -1
- package/types/src/Color/docs/examples/Null.d.ts +2 -1
- package/types/src/Color/docs/examples/ThemeVariables.d.ts +2 -1
- package/types/src/Color/docs/examples/Transparent.d.ts +2 -1
- package/types/src/Color/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/ColumnLayout/Column.d.ts +1 -11
- package/types/src/ColumnLayout/ColumnLayout.d.ts +1 -1
- package/types/src/ColumnLayout/Row.d.ts +1 -11
- package/types/src/ColumnLayout/docs/examples/AlignItems.d.ts +2 -1
- package/types/src/ColumnLayout/docs/examples/Basic.d.ts +2 -1
- package/types/src/ColumnLayout/docs/examples/Dividers.d.ts +2 -1
- package/types/src/ColumnLayout/docs/examples/Gutters.d.ts +2 -1
- package/types/src/ComboBox/ComboBox.d.ts +4 -11
- package/types/src/ComboBox/Option.d.ts +2 -2
- package/types/src/ComboBox/docs/examples/Controlled.d.ts +2 -1
- package/types/src/ComboBox/docs/examples/Fetching.d.ts +2 -1
- package/types/src/ComboBox/docs/examples/Headings.d.ts +2 -1
- package/types/src/ComboBox/docs/examples/Label.d.ts +2 -1
- package/types/src/ComboBox/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -1
- package/types/src/ComboBox/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +22 -38
- package/types/src/ControlGroup/ErrorMessageBar.d.ts +18 -0
- package/types/src/ControlGroup/docs/examples/Basic.d.ts +2 -1
- package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
- package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -1
- package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -1
- package/types/src/ControlGroup/docs/examples/HelpWithLinks.d.ts +2 -1
- package/types/src/ControlGroup/docs/examples/LabelLeft.d.ts +3 -0
- package/types/src/ControlGroup/docs/examples/LayoutFill.d.ts +2 -1
- package/types/src/ControlGroup/docs/examples/LayoutFillJoin.d.ts +2 -1
- package/types/src/ControlGroup/docs/examples/LayoutNone.d.ts +2 -1
- package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -1
- package/types/src/Date/Date.d.ts +30 -64
- package/types/src/Date/Icon.d.ts +2 -1
- package/types/src/Date/docs/examples/Basic.d.ts +2 -1
- package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Date/docs/examples/CustomDate.d.ts +2 -1
- package/types/src/Date/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Date/docs/examples/Error.d.ts +2 -1
- package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
- package/types/src/Date/docs/examples/WithoutCalendar.d.ts +2 -1
- package/types/src/DefinitionList/DefinitionList.d.ts +8 -3
- package/types/src/DefinitionList/DefinitionListContext.d.ts +7 -0
- package/types/src/DefinitionList/Description.d.ts +3 -3
- package/types/src/DefinitionList/Term.d.ts +3 -3
- package/types/src/DefinitionList/docs/examples/Basic.d.ts +2 -1
- package/types/src/DefinitionList/docs/examples/Customize.d.ts +2 -1
- package/types/src/DefinitionList/docs/examples/EmptyDescription.d.ts +3 -0
- package/types/src/DefinitionList/docs/examples/WithSeparator.d.ts +3 -0
- package/types/src/Divider/Divider.d.ts +1 -1
- package/types/src/Divider/docs/examples/Basic.d.ts +2 -1
- package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -1
- package/types/src/Divider/docs/examples/Decorative.d.ts +2 -1
- package/types/src/Divider/docs/examples/Vertical.d.ts +2 -1
- package/types/src/Dropdown/Dropdown.d.ts +29 -44
- package/types/src/Dropdown/docs/examples/Basic.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/BasicMenu.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/ControlledDropdown.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/Dialog.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/ScrollContainer.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/ScrollingMenu.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/Submenu.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/TooltipButtonToggle.d.ts +2 -1
- package/types/src/DualListbox/DualListbox.d.ts +1 -1
- package/types/src/DualListbox/Label.d.ts +1 -1
- package/types/src/DualListbox/Listbox.d.ts +1 -1
- package/types/src/DualListbox/Option.d.ts +1 -1
- package/types/src/DualListbox/ScreenReaderWrapper.d.ts +2 -1
- package/types/src/DualListbox/ToolbarButton.d.ts +1 -1
- package/types/src/DualListbox/docs/examples/Basic.d.ts +2 -1
- package/types/src/DualListbox/docs/examples/Controlled.d.ts +2 -1
- package/types/src/DualListbox/docs/examples/Fill.d.ts +2 -1
- package/types/src/EventListener/EventListener.d.ts +1 -1
- package/types/src/File/File.d.ts +26 -33
- package/types/src/File/Icon.d.ts +2 -1
- package/types/src/File/IconCloud.d.ts +2 -1
- package/types/src/File/Item.d.ts +1 -1
- package/types/src/File/PaperClip.d.ts +2 -1
- package/types/src/File/Retry.d.ts +2 -1
- package/types/src/File/Trash.d.ts +2 -1
- package/types/src/File/docs/examples/CustomizedMessages.d.ts +2 -1
- package/types/src/File/docs/examples/Disabled.d.ts +2 -2
- package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
- package/types/src/File/docs/examples/Error.d.ts +2 -1
- package/types/src/File/docs/examples/FullScreen.d.ts +2 -1
- package/types/src/File/docs/examples/Multi.d.ts +2 -2
- package/types/src/File/docs/examples/Progress.d.ts +2 -1
- package/types/src/File/docs/examples/Single.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +20 -14
- package/types/src/FormRows/Row.d.ts +11 -7
- package/types/src/FormRows/SortableList.d.ts +1 -1
- package/types/src/FormRows/docs/examples/Basic.d.ts +1 -1
- package/types/src/FormRows/docs/examples/Header.d.ts +1 -1
- package/types/src/FormRows/docs/examples/Menu.d.ts +1 -1
- package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +1 -1
- package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +2 -1
- package/types/src/Heading/Heading.d.ts +8 -20
- package/types/src/Heading/docs/examples/Basic.d.ts +2 -1
- package/types/src/Heading/docs/examples/Variant.d.ts +2 -1
- package/types/src/Heading/index.d.ts +1 -0
- package/types/src/Image/Image.d.ts +8 -19
- package/types/src/Image/docs/examples/Basic.d.ts +2 -1
- package/types/src/Image/icons/Cross.d.ts +2 -1
- package/types/src/JSONTree/JSONTree.d.ts +6 -10
- package/types/src/JSONTree/JSONTreeItem.d.ts +1 -1
- package/types/src/JSONTree/docs/examples/Basic.d.ts +2 -1
- package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
- package/types/src/JSONTree/docs/examples/ExpandChildrenOnShiftKey.d.ts +2 -1
- package/types/src/JSONTree/renderTreeItems.d.ts +3 -2
- package/types/src/Layer/Layer.d.ts +8 -25
- package/types/src/Layer/LayerStack.d.ts +2 -3
- package/types/src/Layer/docs/examples/Basic.d.ts +2 -1
- package/types/src/Layout/Layout.d.ts +22 -0
- package/types/src/Layout/docs/examples/Basic.d.ts +3 -0
- package/types/src/Layout/index.d.ts +2 -0
- package/types/src/Layout/test/Layout.unit.d.ts +1 -0
- package/types/src/Link/Link.d.ts +9 -22
- package/types/src/Link/docs/examples/Basic.d.ts +2 -1
- package/types/src/Link/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -1
- package/types/src/Link/docs/examples/Standalone.d.ts +3 -0
- package/types/src/Link/icons/External.d.ts +2 -1
- package/types/src/List/Item.d.ts +1 -1
- package/types/src/List/List.d.ts +5 -17
- package/types/src/List/docs/examples/CustomizedList.d.ts +2 -1
- package/types/src/List/docs/examples/OrderedList.d.ts +2 -1
- package/types/src/List/docs/examples/UnorderedList.d.ts +2 -1
- package/types/src/Markdown/Markdown.d.ts +50 -59
- package/types/src/Markdown/docs/examples/Basic.d.ts +2 -1
- package/types/src/Markdown/docs/examples/I18n.d.ts +2 -1
- package/types/src/Markdown/docs/examples/RenderProps.d.ts +2 -1
- package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +2 -8
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +3 -7
- package/types/src/Markdown/renderers/MarkdownCode.d.ts +3 -9
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +5 -9
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +3 -9
- package/types/src/Markdown/renderers/MarkdownImage.d.ts +4 -11
- package/types/src/Markdown/renderers/MarkdownItem.d.ts +4 -8
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +3 -11
- package/types/src/Markdown/renderers/MarkdownList.d.ts +6 -22
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -7
- package/types/src/Markdown/renderers/MarkdownTable.d.ts +40 -0
- package/types/src/Markdown/renderers/index.d.ts +5 -4
- package/types/src/Menu/Divider.d.ts +2 -1
- package/types/src/Menu/Heading.d.ts +3 -3
- package/types/src/Menu/Item.d.ts +14 -47
- package/types/src/Menu/Menu.d.ts +4 -19
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -1
- package/types/src/Menu/docs/examples/Basic.d.ts +2 -1
- package/types/src/Menu/docs/examples/Complex.d.ts +2 -1
- package/types/src/Menu/docs/examples/Descriptions.d.ts +2 -1
- package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -1
- package/types/src/Menu/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Menu/docs/examples/Dividers.d.ts +2 -1
- package/types/src/Menu/docs/examples/Headings.d.ts +2 -1
- package/types/src/Menu/docs/examples/Links.d.ts +2 -1
- package/types/src/Menu/docs/examples/MatchRanges.d.ts +2 -1
- package/types/src/Menu/docs/examples/Selectable.d.ts +2 -1
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -1
- package/types/src/Menu/docs/examples/Truncate.d.ts +2 -1
- package/types/src/Menu/icons/External.d.ts +2 -1
- package/types/src/Message/Message.d.ts +4 -11
- package/types/src/Message/Title.d.ts +1 -1
- package/types/src/Message/docs/examples/Basic.d.ts +2 -1
- package/types/src/Message/docs/examples/Content.d.ts +2 -1
- package/types/src/Message/docs/examples/Fill.d.ts +2 -1
- package/types/src/Message/docs/examples/Removable.d.ts +2 -1
- package/types/src/MessageBar/MessageBar.d.ts +1 -1
- package/types/src/MessageBar/docs/examples/Basic.d.ts +2 -1
- package/types/src/MessageBar/docs/examples/Types.d.ts +2 -1
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -1
- package/types/src/Modal/Body.d.ts +1 -1
- package/types/src/Modal/Footer.d.ts +9 -1
- package/types/src/Modal/Header.d.ts +7 -11
- package/types/src/Modal/Modal.d.ts +26 -32
- package/types/src/Modal/ModalContext.d.ts +2 -0
- package/types/src/Modal/docs/examples/Basic.d.ts +2 -1
- package/types/src/Modal/docs/examples/InitialFocus.d.ts +2 -1
- package/types/src/Modal/docs/examples/TypicalUsage.d.ts +2 -1
- package/types/src/Modal/docs/examples/Undismissable.d.ts +2 -1
- package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
- package/types/src/Monogram/Monogram.d.ts +3 -7
- package/types/src/Monogram/docs/examples/BackgroundAuto.d.ts +2 -1
- package/types/src/Monogram/docs/examples/BackgroundCustom.d.ts +2 -1
- package/types/src/Monogram/docs/examples/Basic.d.ts +2 -1
- package/types/src/Monogram/docs/examples/Interactive.d.ts +2 -1
- package/types/src/Monogram/docs/examples/Size.d.ts +2 -1
- package/types/src/Multiselect/Compact.d.ts +1 -1
- package/types/src/Multiselect/Multiselect.d.ts +2 -2
- package/types/src/Multiselect/Normal.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Compact.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +4 -4
- package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/Icons.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +4 -4
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +21 -0
- package/types/src/NonInteractiveCheckbox/index.d.ts +1 -0
- package/types/src/Number/Number.d.ts +46 -61
- package/types/src/Number/docs/examples/Basic.d.ts +2 -2
- package/types/src/Number/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Number/docs/examples/Error.d.ts +2 -1
- package/types/src/Number/docs/examples/Limits.d.ts +2 -2
- package/types/src/Number/docs/examples/Locale.d.ts +2 -2
- package/types/src/Number/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/Number/utils.d.ts +1 -2
- package/types/src/Paginator/Button.d.ts +4 -8
- package/types/src/Paginator/Compact.d.ts +1 -1
- package/types/src/Paginator/PageControl.d.ts +1 -1
- package/types/src/Paginator/PageSelect.d.ts +1 -1
- package/types/src/Paginator/PageSeparator.d.ts +2 -1
- package/types/src/Paginator/Paginator.d.ts +1 -1
- package/types/src/Paginator/docs/examples/Basic.d.ts +2 -1
- package/types/src/Paginator/docs/examples/Compact.d.ts +2 -1
- package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -1
- package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -1
- package/types/src/Paginator/docs/examples/CustomPages.d.ts +2 -1
- package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -1
- package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -1
- package/types/src/Paragraph/Paragraph.d.ts +3 -1
- package/types/src/Paragraph/docs/examples/Basic.d.ts +2 -1
- package/types/src/Paragraph/index.d.ts +1 -0
- package/types/src/Popover/Popover.d.ts +38 -69
- package/types/src/Popover/PopoverProvider.d.ts +1 -1
- package/types/src/Popover/docs/examples/Basic.d.ts +2 -1
- package/types/src/Popover/getPlacement.d.ts +1 -1
- package/types/src/Progress/Progress.d.ts +3 -4
- package/types/src/Progress/docs/examples/Basic.d.ts +2 -1
- package/types/src/Progress/docs/examples/Type.d.ts +2 -1
- package/types/src/Prose/Prose.d.ts +29 -0
- package/types/src/Prose/docs/examples/Basic.d.ts +3 -0
- package/types/src/Prose/docs/examples/Customize.d.ts +3 -0
- package/types/src/Prose/index.d.ts +2 -0
- package/types/src/Prose/test/Prose.unit.d.ts +1 -0
- package/types/src/RadioBar/Option.d.ts +2 -18
- package/types/src/RadioBar/RadioBar.d.ts +22 -39
- package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
- package/types/src/RadioBar/docs/examples/AdornmentAriaExamples.d.ts +2 -1
- package/types/src/RadioBar/docs/examples/Basic.d.ts +2 -1
- package/types/src/RadioBar/docs/examples/Disabled.d.ts +2 -1
- package/types/src/RadioBar/docs/examples/Error.d.ts +2 -1
- package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -1
- package/types/src/RadioBar/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/RadioList/Option.d.ts +1 -1
- package/types/src/RadioList/RadioList.d.ts +5 -2
- package/types/src/RadioList/docs/examples/Basic.d.ts +2 -1
- package/types/src/RadioList/docs/examples/Disabled.d.ts +2 -1
- package/types/src/RadioList/docs/examples/Error.d.ts +2 -1
- package/types/src/RadioList/docs/examples/Row.d.ts +2 -1
- package/types/src/RadioList/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/Resize/Resize.d.ts +15 -23
- package/types/src/Resize/docs/examples/Appearance.d.ts +2 -1
- package/types/src/Resize/docs/examples/Basic.d.ts +2 -1
- package/types/src/Resize/docs/examples/Percentage.d.ts +2 -1
- package/types/src/Resize/docs/examples/SizingInner.d.ts +2 -1
- package/types/src/Resize/docs/examples/SizingOuter.d.ts +2 -1
- package/types/src/ResultsMenu/ResultsMenu.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScreenReaderContent/ScreenReaderContent.d.ts +1 -1
- package/types/src/ScreenReaderContent/docs/examples/Basic.d.ts +2 -1
- package/types/src/Scroll/Inner.d.ts +1 -1
- package/types/src/Scroll/Scroll.d.ts +37 -27
- package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Scroll/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/ScrollContainerContext/docs/examples/Consumer.d.ts +2 -1
- package/types/src/ScrollContainerContext/docs/examples/Provider.d.ts +2 -1
- package/types/src/Search/Option.d.ts +32 -32
- package/types/src/Search/Search.d.ts +4 -4
- package/types/src/Search/docs/examples/Controlled.d.ts +2 -1
- package/types/src/Search/docs/examples/Loading.d.ts +2 -1
- package/types/src/Search/docs/examples/Options.d.ts +2 -1
- package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -1
- package/types/src/Search/docs/examples/Results.d.ts +2 -1
- package/types/src/Select/Option.d.ts +8 -21
- package/types/src/Select/OptionBase.d.ts +3 -8
- package/types/src/Select/Select.d.ts +62 -22
- package/types/src/Select/SelectAllOption.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +4 -7
- package/types/src/Select/docs/examples/Appearance.d.ts +2 -1
- package/types/src/Select/docs/examples/Basic.d.ts +2 -1
- package/types/src/Select/docs/examples/Children.d.ts +2 -1
- package/types/src/Select/docs/examples/Descriptions.d.ts +2 -1
- package/types/src/Select/docs/examples/Error.d.ts +2 -1
- package/types/src/Select/docs/examples/Fetching.d.ts +2 -1
- package/types/src/Select/docs/examples/Filter.d.ts +2 -1
- package/types/src/Select/docs/examples/Headings.d.ts +2 -1
- package/types/src/Select/docs/examples/Icons.d.ts +2 -1
- package/types/src/Select/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -1
- package/types/src/Select/docs/examples/Prefix.d.ts +2 -1
- package/types/src/Select/docs/examples/Truncate.d.ts +2 -1
- package/types/src/Select/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/SidePanel/SidePanel.d.ts +18 -16
- package/types/src/SidePanel/docs/examples/Basic.d.ts +2 -1
- package/types/src/SidePanel/docs/examples/ChangeSize.d.ts +2 -1
- package/types/src/SidePanel/docs/examples/Composition.d.ts +2 -1
- package/types/src/Slider/Slider.d.ts +32 -46
- package/types/src/Slider/docs/examples/Basic.d.ts +2 -1
- package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
- package/types/src/Slider/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Slider/docs/examples/Error.d.ts +2 -1
- package/types/src/Slider/docs/examples/StepMarks.d.ts +2 -1
- package/types/src/SlidingPanels/Panel.d.ts +23 -20
- package/types/src/SlidingPanels/SlidingPanels.d.ts +18 -25
- package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Modal.d.ts +2 -1
- package/types/src/SplitButton/Item.d.ts +2 -2
- package/types/src/SplitButton/SplitButton.d.ts +1 -1
- package/types/src/SplitButton/docs/examples/Basic.d.ts +2 -1
- package/types/src/SplitButton/docs/examples/Block.d.ts +2 -1
- package/types/src/SplitButton/docs/examples/ChangeLabel.d.ts +2 -1
- package/types/src/SplitButton/docs/examples/Disabled.d.ts +2 -1
- package/types/src/StaticContent/StaticContent.d.ts +1 -8
- package/types/src/StaticContent/docs/examples/Basic.d.ts +2 -1
- package/types/src/StaticContent/docs/examples/FieldValue.d.ts +2 -1
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +2 -3
- package/types/src/StepBar/docs/examples/Basic.d.ts +2 -1
- package/types/src/StepBar/docs/examples/Error.d.ts +2 -1
- package/types/src/StepBar/types.d.ts +2 -0
- package/types/src/Switch/Switch.d.ts +37 -23
- package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
- package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Switch/docs/examples/Error.d.ts +2 -1
- package/types/src/TabBar/Tab.d.ts +37 -44
- package/types/src/TabBar/TabBar.d.ts +21 -22
- package/types/src/TabBar/TabBarContext.d.ts +3 -5
- package/types/src/TabBar/docs/examples/Basic.d.ts +2 -1
- package/types/src/TabBar/docs/examples/Disabled.d.ts +2 -1
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +2 -1
- package/types/src/TabBar/docs/examples/IconsLeft.d.ts +2 -1
- package/types/src/TabBar/docs/examples/Tooltips.d.ts +2 -1
- package/types/src/TabBar/docs/examples/Vertical.d.ts +2 -1
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +2 -1
- package/types/src/TabBar/docs/examples/VerticalIconsLeft.d.ts +2 -1
- package/types/src/TabBar/docs/examples/WithCount.d.ts +2 -1
- package/types/src/TabLayout/Panel.d.ts +6 -1
- package/types/src/TabLayout/TabLayout.d.ts +18 -31
- package/types/src/TabLayout/docs/examples/AutoActivate.d.ts +2 -1
- package/types/src/TabLayout/docs/examples/Controlled.d.ts +2 -1
- package/types/src/TabLayout/docs/examples/Icons.d.ts +2 -1
- package/types/src/TabLayout/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/TabLayout/docs/examples/Vertical.d.ts +2 -1
- package/types/src/TabLayout/docs/examples/VerticalIcons.d.ts +2 -1
- package/types/src/Table/Body.d.ts +6 -13
- package/types/src/Table/Caption.d.ts +1 -1
- package/types/src/Table/Cell.d.ts +40 -18
- package/types/src/Table/ExpandButton.d.ts +9 -3
- package/types/src/Table/Head.d.ts +40 -40
- package/types/src/Table/HeadCell.d.ts +49 -23
- package/types/src/Table/HeadDropdownCell.d.ts +58 -51
- package/types/src/Table/HeadInner.d.ts +1 -3
- package/types/src/Table/HeadTable.d.ts +23 -12
- package/types/src/Table/Row.d.ts +7 -14
- package/types/src/Table/RowDragCell.d.ts +2 -1
- package/types/src/Table/Table.d.ts +13 -19
- package/types/src/Table/Toggle.d.ts +1 -3
- package/types/src/Table/docs/examples/Basic.d.ts +2 -1
- package/types/src/Table/docs/examples/Click.d.ts +2 -1
- package/types/src/Table/docs/examples/ClickRows.d.ts +2 -1
- package/types/src/Table/docs/examples/Complex.d.ts +2 -1
- package/types/src/Table/docs/examples/DockedHeaderScrollbar.d.ts +2 -1
- package/types/src/Table/docs/examples/ExpandableRows.d.ts +2 -1
- package/types/src/Table/docs/examples/ExpandableRowsControlled.d.ts +2 -1
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +2 -1
- package/types/src/Table/docs/examples/FixedHeader.d.ts +2 -1
- package/types/src/Table/docs/examples/HeadDropdownCell.d.ts +2 -1
- package/types/src/Table/docs/examples/ReorderColumns.d.ts +2 -1
- package/types/src/Table/docs/examples/ReorderRows.d.ts +2 -1
- package/types/src/Table/docs/examples/Resizable.d.ts +2 -1
- package/types/src/Table/docs/examples/ResizableFill.d.ts +2 -1
- package/types/src/Table/docs/examples/RowActions.d.ts +2 -1
- package/types/src/Table/docs/examples/Selectable.d.ts +2 -1
- package/types/src/Table/docs/examples/SortableColumns.d.ts +2 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -1
- package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +2 -1
- package/types/src/Text/IconOutlinedHide.d.ts +2 -1
- package/types/src/Text/IconOutlinedView.d.ts +2 -1
- package/types/src/Text/Text.d.ts +62 -112
- package/types/src/Text/docs/examples/Basic.d.ts +2 -1
- package/types/src/Text/docs/examples/CustomizedIcon.d.ts +2 -1
- package/types/src/Text/docs/examples/Dimmed.d.ts +2 -1
- package/types/src/Text/docs/examples/Disabled.d.ts +2 -1
- package/types/src/Text/docs/examples/Error.d.ts +2 -1
- package/types/src/Text/docs/examples/Inline.d.ts +2 -1
- package/types/src/Text/docs/examples/Password.d.ts +2 -1
- package/types/src/Text/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/TextArea/TextArea.d.ts +49 -87
- package/types/src/TextArea/docs/examples/Basic.d.ts +2 -1
- package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -1
- package/types/src/TextArea/docs/examples/Error.d.ts +2 -1
- package/types/src/TextArea/docs/examples/Inline.d.ts +2 -1
- package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -1
- package/types/src/TextArea/syncHeightWithShadow.d.ts +1 -1
- package/types/src/Tooltip/InfoIcon.d.ts +2 -1
- package/types/src/Tooltip/Tooltip.d.ts +9 -3
- package/types/src/Tooltip/docs/examples/Basic.d.ts +2 -1
- package/types/src/Tooltip/docs/examples/ContentRelationship.d.ts +2 -1
- package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Tooltip/docs/examples/CustomDelay.d.ts +2 -1
- package/types/src/Tooltip/docs/examples/CustomProps.d.ts +2 -1
- package/types/src/Tooltip/docs/examples/Toggletip.d.ts +2 -1
- package/types/src/TransitionOpen/TransitionOpen.d.ts +23 -25
- package/types/src/TransitionOpen/docs/examples/ExpandHeight.d.ts +2 -1
- package/types/src/TransitionOpen/docs/examples/ExpandWidth.d.ts +2 -1
- package/types/src/TransitionOpen/docs/examples/None.d.ts +2 -1
- package/types/src/TransitionOpen/docs/examples/SlideFromBottom.d.ts +2 -1
- package/types/src/TransitionOpen/docs/examples/SlideFromLeft.d.ts +2 -1
- package/types/src/TransitionOpen/docs/examples/SlideFromRight.d.ts +2 -1
- package/types/src/TransitionOpen/docs/examples/SlideFromTop.d.ts +2 -1
- package/types/src/Tree/Tree.d.ts +1 -1
- package/types/src/Tree/TreeItem.d.ts +1 -1
- package/types/src/Typography/Typography.d.ts +10 -19
- package/types/src/Typography/docs/examples/Basic.d.ts +2 -1
- package/types/src/WaitSpinner/WaitSpinner.d.ts +2 -3
- package/types/src/WaitSpinner/docs/examples/Basic.d.ts +2 -1
- package/types/src/utils/types.d.ts +1 -0
- package/Concertina.d.ts +0 -2
- package/Concertina.js +0 -963
- package/types/src/Accordion/docs/examples/FixedHeight.d.ts +0 -2
- package/types/src/Accordion/docs/examples/InDropdown.d.ts +0 -2
- package/types/src/Button/docs/examples/Dimmed.d.ts +0 -2
- package/types/src/Button/icons/CaretSmallDown.d.ts +0 -2
- package/types/src/Button/icons/External.d.ts +0 -2
- package/types/src/Clickable/docs/examples/Dimmed.d.ts +0 -2
- package/types/src/CloseButton/CloseButton.d.ts +0 -21
- package/types/src/CloseButton/index.d.ts +0 -1
- package/types/src/CollapsiblePanel/docs/examples/TitleWithActions.d.ts +0 -2
- package/types/src/Concertina/Concertina.d.ts +0 -46
- package/types/src/Concertina/ConcertinaContext.d.ts +0 -8
- package/types/src/Concertina/Heading.d.ts +0 -35
- package/types/src/Concertina/Panel.d.ts +0 -59
- package/types/src/Concertina/docs/examples/Basic.d.ts +0 -2
- package/types/src/Concertina/docs/examples/Disabled.d.ts +0 -9
- package/types/src/Concertina/docs/examples/Status.d.ts +0 -2
- package/types/src/Concertina/index.d.ts +0 -2
- package/types/src/Concertina/types.d.ts +0 -1
- package/types/src/ControlGroup/docs/examples/LabelTop.d.ts +0 -2
- package/types/src/Link/docs/examples/Inline.d.ts +0 -2
- package/types/src/Message/Link.d.ts +0 -37
- package/types/src/Number/IncrementIcon.d.ts +0 -2
- package/types/src/Paginator/icons/ChevronLeft.d.ts +0 -5
- package/types/src/Paginator/icons/ChevronRight.d.ts +0 -5
- package/types/src/RadioList/docs/examples/Composing.d.ts +0 -2
- package/types/src/Select/icons/CaretSmallDown.d.ts +0 -2
- package/types/src/Select/icons/Search.d.ts +0 -2
- package/types/src/Switch/CheckIcon.d.ts +0 -1
- package/types/src/Table/DragHandle.d.ts +0 -12
- package/types/src/Table/icons/HeadExpandRows.d.ts +0 -1
- package/types/src/Text/docs/examples/Multiline.d.ts +0 -2
- package/types/src/Text/docs/examples/Search.d.ts +0 -2
- package/types/src/TextArea/docs/examples/ClearContent.d.ts +0 -2
- package/types/src/TextArea/icons/ClearButton.d.ts +0 -3
- package/types/src/TextArea/icons/SearchIcon.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
3
4
|
/** @public */
|
|
4
5
|
type SwitchClickHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
5
6
|
selected: boolean;
|
|
@@ -19,7 +20,7 @@ interface SwitchPropsBase {
|
|
|
19
20
|
*/
|
|
20
21
|
elementRef?: React.Ref<HTMLDivElement>;
|
|
21
22
|
/**
|
|
22
|
-
* Highlight the field as having an error.
|
|
23
|
+
* Highlight the field as having an error only when appearance is 'checkbox'.
|
|
23
24
|
*/
|
|
24
25
|
error?: boolean;
|
|
25
26
|
/**
|
|
@@ -27,7 +28,9 @@ interface SwitchPropsBase {
|
|
|
27
28
|
* Set a label's for attribute to this id to link the two elements.
|
|
28
29
|
*/
|
|
29
30
|
id?: string;
|
|
30
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Make the control an inline block with variable width.
|
|
33
|
+
*/
|
|
31
34
|
inline?: boolean;
|
|
32
35
|
/**
|
|
33
36
|
* In a couple of cases, the switch is to show state, but is not interactive in itself.
|
|
@@ -56,6 +59,10 @@ interface SwitchPropsBase {
|
|
|
56
59
|
* The customized content presented to screen readers when selected="some".
|
|
57
60
|
*/
|
|
58
61
|
someSelectedLabel?: string;
|
|
62
|
+
/**
|
|
63
|
+
* A React ref which is set to the toggle when the component mounts and null when it unmounts.
|
|
64
|
+
*/
|
|
65
|
+
toggleRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>;
|
|
59
66
|
/**
|
|
60
67
|
* The customized content presented to screen readers when unselected.
|
|
61
68
|
*/
|
|
@@ -66,37 +73,44 @@ interface SwitchPropsBase {
|
|
|
66
73
|
*/
|
|
67
74
|
value?: any;
|
|
68
75
|
}
|
|
69
|
-
declare const defaultProps: Required<Pick<SwitchPropsBase, 'appearance' | 'disabled' | 'error' | 'inline' | 'interactive' | 'selected'>>;
|
|
70
76
|
interface SwitchCheckboxWithSomePropsBase extends SwitchPropsBase {
|
|
71
77
|
appearance?: 'checkbox';
|
|
72
78
|
onClick?: SwitchCheckboxWithSomeClickHandler;
|
|
73
79
|
selected?: boolean | 'some';
|
|
80
|
+
error?: boolean;
|
|
74
81
|
}
|
|
75
82
|
interface SwitchNoSomePropsBase extends SwitchPropsBase {
|
|
76
83
|
onClick?: SwitchClickHandler;
|
|
77
84
|
selected?: boolean;
|
|
85
|
+
error?: never;
|
|
78
86
|
}
|
|
79
|
-
type SwitchProps =
|
|
80
|
-
ref?: React.Ref<Switch>;
|
|
81
|
-
};
|
|
87
|
+
type SwitchProps = ComponentProps<SwitchCheckboxWithSomePropsBase | SwitchNoSomePropsBase, 'div'>;
|
|
82
88
|
/**
|
|
83
89
|
* `Switch` is a basic form control with an on/off state.
|
|
84
90
|
*/
|
|
85
|
-
declare
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
declare function Switch({ appearance, children, disabled, elementRef, error, id, inline, interactive, labelledBy, onClick, required, selected, selectedLabel, someSelectedLabel, toggleRef, unselectedLabel, value, ...otherProps }: SwitchProps): React.JSX.Element;
|
|
92
|
+
declare namespace Switch {
|
|
93
|
+
var propTypes: {
|
|
94
|
+
appearance: PropTypes.Requireable<string>;
|
|
95
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
96
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
97
|
+
elementRef: PropTypes.Requireable<object>;
|
|
98
|
+
error: PropTypes.Requireable<boolean>;
|
|
99
|
+
id: PropTypes.Requireable<string>;
|
|
100
|
+
inline: PropTypes.Requireable<boolean>;
|
|
101
|
+
/** @private */
|
|
102
|
+
interactive: PropTypes.Requireable<boolean>;
|
|
103
|
+
labelledBy: PropTypes.Requireable<string>;
|
|
104
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
105
|
+
/** @private. */
|
|
106
|
+
required: PropTypes.Requireable<boolean>;
|
|
107
|
+
selected: PropTypes.Requireable<string | boolean>;
|
|
108
|
+
selectedLabel: PropTypes.Requireable<string>;
|
|
109
|
+
toggleRef: PropTypes.Requireable<object>;
|
|
110
|
+
someSelectedLabel: PropTypes.Requireable<string>;
|
|
111
|
+
unselectedLabel: PropTypes.Requireable<string>;
|
|
112
|
+
value: PropTypes.Requireable<any>;
|
|
113
|
+
};
|
|
100
114
|
}
|
|
101
115
|
export default Switch;
|
|
102
116
|
export { SwitchClickHandler, SwitchCheckboxWithSomeClickHandler };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import { SwitchClickHandler } from '@splunk/react-ui/Switch';
|
|
3
3
|
declare class Basic extends Component<{}, {
|
|
4
4
|
values: number[];
|
|
5
5
|
}> {
|
|
6
6
|
constructor(props: {});
|
|
7
7
|
handleClick: SwitchClickHandler;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default Basic;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import { SwitchClickHandler } from '@splunk/react-ui/Switch';
|
|
3
3
|
declare class Disabled extends Component<{}, {
|
|
4
4
|
values: number[];
|
|
5
5
|
}> {
|
|
6
6
|
constructor(props: {});
|
|
7
7
|
handleClick: SwitchClickHandler;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default Disabled;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
4
|
-
import TabBarContext from './TabBarContext';
|
|
5
|
-
import { ClassComponentProps } from '../utils/types';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
6
4
|
type TabClickHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
7
|
-
tabId
|
|
8
|
-
tabKey?: number;
|
|
5
|
+
tabId: string;
|
|
9
6
|
}) => void;
|
|
10
7
|
type TabFocusHandler = (event: React.FocusEvent<HTMLButtonElement>, data: {
|
|
11
|
-
tabId
|
|
12
|
-
tabKey?: number;
|
|
8
|
+
tabId: string;
|
|
13
9
|
}) => void;
|
|
14
10
|
interface TabPropsBase {
|
|
15
11
|
/** @private. Is the tab active. */
|
|
@@ -25,7 +21,7 @@ interface TabPropsBase {
|
|
|
25
21
|
/**
|
|
26
22
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
27
23
|
*/
|
|
28
|
-
elementRef?: React.Ref<HTMLButtonElement>;
|
|
24
|
+
elementRef?: React.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
29
25
|
/** See Icon documentation for more information. */
|
|
30
26
|
icon?: React.ReactNode;
|
|
31
27
|
/**
|
|
@@ -38,12 +34,11 @@ interface TabPropsBase {
|
|
|
38
34
|
label?: React.ReactNode;
|
|
39
35
|
/** @private Maximum count number in tab label */
|
|
40
36
|
maxCount?: number;
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
/**
|
|
38
|
+
* A unique `id` for this tab and used by the `TabBar` to keep track of the open tab.
|
|
39
|
+
* If not provided, one will be automatically generated for the tab.
|
|
40
|
+
*/
|
|
44
41
|
tabId?: string;
|
|
45
|
-
/** @private. The internal key of the tab */
|
|
46
|
-
tabKey?: number;
|
|
47
42
|
/** Identifies the URL for a link. If set, Splunk UI applies an <a> tag
|
|
48
43
|
* instead of a <button> tag. */
|
|
49
44
|
to?: string;
|
|
@@ -59,35 +54,33 @@ interface TabPropsBase {
|
|
|
59
54
|
*/
|
|
60
55
|
menu?: React.ReactNode;
|
|
61
56
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
declare const TabWithTheme: React.ForwardRefExoticComponent<Omit<Pick<Pick<TabProps, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "className" | "color" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | keyof TabPropsBase> & Pick<PropTypes.InferProps<React.WeakValidationMap<TabProps>>, "inlist"> & Pick<TabProps, never>, "label" | "menu" | "slot" | "style" | "title" | "children" | "elementRef" | "to" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "disabled" | "icon" | "tooltip" | "tabKey" | "splunkTheme" | "count" | "ariaControls" | "maxCount" | "tabId"> & Partial<Pick<Pick<TabProps, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "className" | "color" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | keyof TabPropsBase> & Pick<PropTypes.InferProps<React.WeakValidationMap<TabProps>>, "inlist"> & Pick<TabProps, never>, "active">> & Partial<Pick<Required<Pick<TabPropsBase, "active">>, never>> & {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
export default TabWithTheme;
|
|
91
|
-
export type { Tab as TabWithoutTheme };
|
|
57
|
+
type TabProps = ComponentProps<TabPropsBase, 'div'>;
|
|
58
|
+
declare const Tab: {
|
|
59
|
+
({ active, ariaControls, count, disabled, elementRef, icon, label, maxCount, tabId: tabIdProp, to, tooltip, menu, ...otherProps }: TabProps): React.JSX.Element;
|
|
60
|
+
propTypes: {
|
|
61
|
+
/** @private. Is the tab active. */
|
|
62
|
+
active: PropTypes.Requireable<boolean>;
|
|
63
|
+
ariaControls: PropTypes.Requireable<string>;
|
|
64
|
+
count: PropTypes.Requireable<number>;
|
|
65
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
66
|
+
elementRef: PropTypes.Requireable<object>;
|
|
67
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
68
|
+
id: PropTypes.Requireable<string>;
|
|
69
|
+
label: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
|
70
|
+
/** @private Maximum count number in tab label */
|
|
71
|
+
maxCount: PropTypes.Requireable<number>;
|
|
72
|
+
tabId: PropTypes.Requireable<string>;
|
|
73
|
+
to: PropTypes.Requireable<string>;
|
|
74
|
+
tooltip: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
75
|
+
/**
|
|
76
|
+
* @private
|
|
77
|
+
* Accepts a Menu component that is rendered for that Tab.
|
|
78
|
+
* Is not compatible with `count`.
|
|
79
|
+
* The `menu` prop is only supported in horizontal layout due to both design constraints as well as keyboard support.
|
|
80
|
+
*/
|
|
81
|
+
menu: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export default Tab;
|
|
92
85
|
export { TabClickHandler, TabFocusHandler };
|
|
93
86
|
export type { TabPropsBase };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import Tab
|
|
3
|
+
import Tab from './Tab';
|
|
4
4
|
import { ComponentProps } from '../utils/types';
|
|
5
5
|
/** @public */
|
|
6
6
|
type TabBarChangeHandler = (event: React.MouseEvent<HTMLButtonElement> | React.FocusEvent<HTMLButtonElement>, data: {
|
|
@@ -11,13 +11,6 @@ interface TabBarPropsBase {
|
|
|
11
11
|
autoActivate?: boolean;
|
|
12
12
|
/** The `tabId` of the `TabBar.Tab` to activate. */
|
|
13
13
|
activeTabId?: string;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated This prop is deprecated and will be removed the next major version.
|
|
16
|
-
*
|
|
17
|
-
* Setting this prop to 'context' creates an appearance without an underline.
|
|
18
|
-
* @includeTheme prisma
|
|
19
|
-
*/
|
|
20
|
-
appearance?: 'navigation' | 'context';
|
|
21
14
|
/**
|
|
22
15
|
* Must be `TabBar.Tab`.
|
|
23
16
|
*/
|
|
@@ -30,13 +23,6 @@ interface TabBarPropsBase {
|
|
|
30
23
|
elementRef?: React.Ref<HTMLDivElement>;
|
|
31
24
|
/** Position of icon in `TabBar.Tab` if it has an icon. Defaults to "left". */
|
|
32
25
|
iconPosition?: 'above' | 'left';
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated This prop is deprecated and will be removed in the next major version.
|
|
35
|
-
* Size of icon in `TabBar.Tab` if it has an icon. Defaults to "inline".
|
|
36
|
-
*
|
|
37
|
-
* Ignored if `iconPosition` is provided.
|
|
38
|
-
*/
|
|
39
|
-
iconSize?: 'inline' | 'small' | 'large';
|
|
40
26
|
/** The layout of tabs. */
|
|
41
27
|
layout?: 'horizontal' | 'vertical';
|
|
42
28
|
/** A callback that receives the event and data (`selectedTabId`). */
|
|
@@ -45,26 +31,39 @@ interface TabBarPropsBase {
|
|
|
45
31
|
tabWidth?: number;
|
|
46
32
|
}
|
|
47
33
|
type TabBarProps = ComponentProps<TabBarPropsBase, 'div'>;
|
|
48
|
-
declare function TabBar({ activeTabId, autoActivate,
|
|
34
|
+
declare function TabBar({ activeTabId, autoActivate, children, disabled, elementRef, iconPosition, layout, onChange, tabWidth, ...otherProps }: TabBarProps): React.JSX.Element;
|
|
49
35
|
declare namespace TabBar {
|
|
50
36
|
var propTypes: {
|
|
51
37
|
autoActivate: PropTypes.Requireable<boolean>;
|
|
52
38
|
activeTabId: PropTypes.Requireable<string>;
|
|
53
|
-
appearance: PropTypes.Requireable<string>;
|
|
54
39
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
55
40
|
/** @private */
|
|
56
41
|
disabled: PropTypes.Requireable<boolean>;
|
|
57
42
|
elementRef: PropTypes.Requireable<object>;
|
|
58
43
|
iconPosition: PropTypes.Requireable<string>;
|
|
59
|
-
iconSize: PropTypes.Requireable<string>;
|
|
60
44
|
layout: PropTypes.Requireable<string>;
|
|
61
45
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
62
46
|
tabWidth: PropTypes.Requireable<number>;
|
|
63
47
|
};
|
|
64
|
-
var Tab: React.ForwardRefExoticComponent<Omit<Pick<Pick<import("./Tab").TabPropsBase & Required<Pick<import("./Tab").TabPropsBase, "active">> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "className" | "color" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | keyof import("./Tab").TabPropsBase> & Pick<PropTypes.InferProps<React.WeakValidationMap<import("./Tab").TabPropsBase & Required<Pick<import("./Tab").TabPropsBase, "active">> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>>>, "inlist"> & Pick<import("./Tab").TabPropsBase & Required<Pick<import("./Tab").TabPropsBase, "active">> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>, never>, "label" | "menu" | "slot" | "style" | "title" | "children" | "elementRef" | "to" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "disabled" | "icon" | "tooltip" | "tabKey" | "splunkTheme" | "count" | "ariaControls" | "maxCount" | "tabId"> & Partial<Pick<Pick<import("./Tab").TabPropsBase & Required<Pick<import("./Tab").TabPropsBase, "active">> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "className" | "color" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | keyof import("./Tab").TabPropsBase> & Pick<PropTypes.InferProps<React.WeakValidationMap<import("./Tab").TabPropsBase & Required<Pick<import("./Tab").TabPropsBase, "active">> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>>>, "inlist"> & Pick<import("./Tab").TabPropsBase & Required<Pick<import("./Tab").TabPropsBase, "active">> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>, never>, "active">> & Partial<Pick<Required<Pick<import("./Tab").TabPropsBase, "active">>, never>> & {
|
|
65
|
-
|
|
66
|
-
|
|
48
|
+
var Tab: {
|
|
49
|
+
({ active, ariaControls, count, disabled, elementRef, icon, label, maxCount, tabId: tabIdProp, to, tooltip, menu, ...otherProps }: import("./Tab").TabPropsBase & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>): React.JSX.Element;
|
|
50
|
+
propTypes: {
|
|
51
|
+
active: PropTypes.Requireable<boolean>;
|
|
52
|
+
ariaControls: PropTypes.Requireable<string>;
|
|
53
|
+
count: PropTypes.Requireable<number>;
|
|
54
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
55
|
+
elementRef: PropTypes.Requireable<object>;
|
|
56
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
57
|
+
id: PropTypes.Requireable<string>;
|
|
58
|
+
label: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
|
59
|
+
maxCount: PropTypes.Requireable<number>;
|
|
60
|
+
tabId: PropTypes.Requireable<string>;
|
|
61
|
+
to: PropTypes.Requireable<string>;
|
|
62
|
+
tooltip: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
63
|
+
menu: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
67
66
|
}
|
|
68
67
|
export default TabBar;
|
|
69
68
|
export { Tab };
|
|
70
|
-
export type { TabBarChangeHandler
|
|
69
|
+
export type { TabBarChangeHandler };
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { DropdownRequestCloseHandler
|
|
2
|
+
import type { DropdownRequestCloseHandler } from '@splunk/react-ui/Dropdown';
|
|
3
3
|
import type { TabClickHandler, TabFocusHandler } from './Tab';
|
|
4
4
|
export interface TabBarContext {
|
|
5
5
|
active?: string;
|
|
6
|
-
appearance?: string;
|
|
7
6
|
disabled?: boolean;
|
|
7
|
+
focusedTabId: string | null;
|
|
8
8
|
iconPosition?: 'above' | 'left';
|
|
9
|
-
iconSize?: 'inline' | 'small' | 'large';
|
|
10
9
|
layout?: 'horizontal' | 'vertical';
|
|
11
10
|
onClick?: TabClickHandler;
|
|
12
11
|
onFocus?: TabFocusHandler;
|
|
13
12
|
width?: number | null;
|
|
14
|
-
onMenuOpen:
|
|
13
|
+
onMenuOpen: (menusTabId: string) => void;
|
|
15
14
|
onMenuClose: DropdownRequestCloseHandler;
|
|
16
15
|
isMenuOpen: boolean;
|
|
17
|
-
focusedTabKey?: number;
|
|
18
16
|
}
|
|
19
17
|
export declare const TabBarContext: import("react").Context<TabBarContext>;
|
|
20
18
|
export default TabBarContext;
|
|
@@ -13,6 +13,10 @@ interface PanelPropsBase {
|
|
|
13
13
|
* @excludeTheme prisma
|
|
14
14
|
*/
|
|
15
15
|
icon?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* By default, adds padding to panel content. If set to false, renders panel content without padding.
|
|
18
|
+
*/
|
|
19
|
+
inset?: boolean;
|
|
16
20
|
/** The text shown in the button. */
|
|
17
21
|
label?: React.ReactNode;
|
|
18
22
|
/** A unique `id` for this panel and used by the `TabLayout` to keep track of the open panel. */
|
|
@@ -26,7 +30,7 @@ interface PanelPropsBase {
|
|
|
26
30
|
}
|
|
27
31
|
type PanelProps = ComponentProps<PanelPropsBase, 'div'>;
|
|
28
32
|
declare function Panel({ children, disabled, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
-
elementRef, panelId, ...otherProps }: PanelProps): JSX.Element;
|
|
33
|
+
elementRef, inset, panelId, ...otherProps }: PanelProps): React.JSX.Element;
|
|
30
34
|
declare namespace Panel {
|
|
31
35
|
var propTypes: {
|
|
32
36
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -34,6 +38,7 @@ declare namespace Panel {
|
|
|
34
38
|
disabled: PropTypes.Requireable<boolean>;
|
|
35
39
|
elementRef: PropTypes.Requireable<object>;
|
|
36
40
|
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
41
|
+
inset: PropTypes.Requireable<boolean>;
|
|
37
42
|
label: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
|
38
43
|
panelId: PropTypes.Validator<string>;
|
|
39
44
|
tooltip: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import Panel from './Panel';
|
|
3
|
-
import {
|
|
4
|
+
import { ComponentProps } from '../utils/types';
|
|
4
5
|
/** @public */
|
|
5
6
|
type TabLayoutChangeHandler = (event: React.MouseEvent<HTMLButtonElement> | React.FocusEvent<HTMLButtonElement>, data: {
|
|
6
7
|
activePanelId?: string;
|
|
@@ -8,19 +9,10 @@ type TabLayoutChangeHandler = (event: React.MouseEvent<HTMLButtonElement> | Reac
|
|
|
8
9
|
interface TabLayoutPropsBase {
|
|
9
10
|
/** If `true`, tabs will trigger the `onChange` callback when they receive focus. */
|
|
10
11
|
autoActivate?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated This prop is deprecated and will be removed the next major version.
|
|
13
|
-
*
|
|
14
|
-
* Setting this prop to 'context' creates an appearance without an underline.
|
|
15
|
-
* @includeTheme prisma
|
|
16
|
-
*/
|
|
17
|
-
appearance?: 'navigation' | 'context';
|
|
18
12
|
/**
|
|
19
13
|
* Must be `TabLayout.Panel`.
|
|
20
14
|
*/
|
|
21
15
|
children?: React.ReactNode;
|
|
22
|
-
/** Inserts number in tab label. */
|
|
23
|
-
count?: number;
|
|
24
16
|
/**
|
|
25
17
|
* Sets the active panel on the initial render. It must match the `panelId` of one of
|
|
26
18
|
* the child `TabLayout.Panel`s. Only use `defaultActivePanelId` when using `TabLayout`
|
|
@@ -33,10 +25,6 @@ interface TabLayoutPropsBase {
|
|
|
33
25
|
elementRef?: React.Ref<HTMLDivElement>;
|
|
34
26
|
/** Position of icon in `TabBar.Tab` if it has an icon. Defaults to "left". */
|
|
35
27
|
iconPosition?: 'above' | 'left';
|
|
36
|
-
/** Size of icon in `TabLayout.Panel` if it has an icon.
|
|
37
|
-
* @excludeTheme prisma
|
|
38
|
-
*/
|
|
39
|
-
iconSize?: 'inline' | 'small' | 'large';
|
|
40
28
|
/**
|
|
41
29
|
* The layout direction for tabs.
|
|
42
30
|
*/
|
|
@@ -53,7 +41,6 @@ interface TabLayoutPropsBase {
|
|
|
53
41
|
*/
|
|
54
42
|
activePanelId?: string;
|
|
55
43
|
}
|
|
56
|
-
declare const defaultProps: Required<Pick<TabLayoutPropsBase, 'appearance' | 'layout'>>;
|
|
57
44
|
interface TabLayoutPropsBaseControlled extends TabLayoutPropsBase {
|
|
58
45
|
defaultActivePanelId?: never;
|
|
59
46
|
onChange: TabLayoutChangeHandler;
|
|
@@ -63,25 +50,25 @@ interface TabLayoutPropsBaseUncontrolled extends TabLayoutPropsBase {
|
|
|
63
50
|
defaultActivePanelId?: string;
|
|
64
51
|
activePanelId?: never;
|
|
65
52
|
}
|
|
66
|
-
type TabLayoutProps =
|
|
67
|
-
interface TabLayoutState {
|
|
68
|
-
activePanelId?: string;
|
|
69
|
-
}
|
|
53
|
+
type TabLayoutProps = ComponentProps<TabLayoutPropsBaseControlled | TabLayoutPropsBaseUncontrolled, 'div'>;
|
|
70
54
|
/**
|
|
71
55
|
* The `TabLayout` is a group of managed `Panels`. Only one panel can be open at a time.
|
|
72
56
|
* `TabLayout` supports both the controlled and uncontrolled patterns.
|
|
73
57
|
*/
|
|
74
|
-
declare
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
58
|
+
declare function TabLayout({ autoActivate, activePanelId: activePanelIdProp, children, defaultActivePanelId, elementRef, iconPosition, layout, onChange, tabWidth, ...otherProps }: TabLayoutProps): React.JSX.Element;
|
|
59
|
+
declare namespace TabLayout {
|
|
60
|
+
var Panel: typeof import("./Panel").default;
|
|
61
|
+
var propTypes: {
|
|
62
|
+
autoActivate: PropTypes.Requireable<boolean>;
|
|
63
|
+
activePanelId: PropTypes.Requireable<string>;
|
|
64
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
65
|
+
defaultActivePanelId: PropTypes.Requireable<string>;
|
|
66
|
+
elementRef: PropTypes.Requireable<object>;
|
|
67
|
+
iconPosition: PropTypes.Requireable<string>;
|
|
68
|
+
layout: PropTypes.Requireable<string>;
|
|
69
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
70
|
+
tabWidth: PropTypes.Requireable<number>;
|
|
71
|
+
};
|
|
85
72
|
}
|
|
86
73
|
export default TabLayout;
|
|
87
74
|
export { Panel, TabLayoutChangeHandler };
|