@ntbjs/react-components 2.0.14 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/data/Alert/Alert.js +18 -33
- package/build/data/Alert/Alert.js.map +1 -1
- package/build/data/Alert/Alert.styled.js +9 -47
- package/build/data/Alert/Alert.styled.js.map +1 -1
- package/build/data/Badge/Badge.js +36 -61
- package/build/data/Badge/Badge.js.map +1 -1
- package/build/data/Badge/Badge.styled.js +21 -70
- package/build/data/Badge/Badge.styled.js.map +1 -1
- package/build/data/Popover/Popover.js +125 -71
- package/build/data/Popover/Popover.js.map +1 -1
- package/build/data/Popover/Popover.styled.js +10 -140
- package/build/data/Popover/Popover.styled.js.map +1 -1
- package/build/data/SeverityBadge/SeverityBadge.js +13 -22
- package/build/data/SeverityBadge/SeverityBadge.js.map +1 -1
- package/build/data/SeverityBadge/index.js +2 -0
- package/build/data/SeverityBadge/index.js.map +1 -0
- package/build/data/Tab/Tab.js +7 -13
- package/build/data/Tab/Tab.js.map +1 -1
- package/build/data/Tab/Tab.styled.js +4 -7
- package/build/data/Tab/Tab.styled.js.map +1 -1
- package/build/data/Tabs/Tabs.js +30 -32
- package/build/data/Tabs/Tabs.js.map +1 -1
- package/build/data/Tabs/Tabs.styled.js +21 -57
- package/build/data/Tabs/Tabs.styled.js.map +1 -1
- package/build/data/Tooltip/Tooltip.js +102 -33
- package/build/data/Tooltip/Tooltip.js.map +1 -1
- package/build/data/Tooltip/Tooltip.styled.js +9 -22
- package/build/data/Tooltip/Tooltip.styled.js.map +1 -1
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.js +16 -23
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.js.map +1 -1
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +13 -31
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js.map +1 -1
- package/build/data/VerificationStatusIcon/index.js +2 -0
- package/build/data/VerificationStatusIcon/index.js.map +1 -0
- package/build/data/_shared/FloatingArrow.styled.js +30 -0
- package/build/data/_shared/FloatingArrow.styled.js.map +1 -0
- package/build/hooks/useEventListner.js.map +1 -1
- package/build/hooks/useFloatingPopover.js +187 -0
- package/build/hooks/useFloatingPopover.js.map +1 -0
- package/build/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/build/hooks/useOnClickOutside.js.map +1 -1
- package/build/hooks/useTooltipAutoShow.js.map +1 -1
- package/build/icons/arrow-back.svg.js +3 -3
- package/build/icons/arrow-back.svg.js.map +1 -1
- package/build/icons/arrow-forward.svg.js +4 -4
- package/build/icons/arrow-forward.svg.js.map +1 -1
- package/build/icons/check-rectangle-filled.svg.js +3 -3
- package/build/icons/check-rectangle-filled.svg.js.map +1 -1
- package/build/icons/close.svg.js +3 -3
- package/build/icons/close.svg.js.map +1 -1
- package/build/icons/edit-note.svg.js +3 -3
- package/build/icons/edit-note.svg.js.map +1 -1
- package/build/icons/expand-more.svg.js +3 -3
- package/build/icons/expand-more.svg.js.map +1 -1
- package/build/icons/headset.svg.js +3 -3
- package/build/icons/headset.svg.js.map +1 -1
- package/build/icons/layers.svg.js +3 -3
- package/build/icons/layers.svg.js.map +1 -1
- package/build/icons/link.svg.js +3 -3
- package/build/icons/link.svg.js.map +1 -1
- package/build/icons/play.svg.js +3 -3
- package/build/icons/play.svg.js.map +1 -1
- package/build/icons/search.svg.js +3 -3
- package/build/icons/search.svg.js.map +1 -1
- package/build/icons/star-filled.svg.js +3 -3
- package/build/icons/star-filled.svg.js.map +1 -1
- package/build/icons/star.svg.js +3 -3
- package/build/icons/star.svg.js.map +1 -1
- package/build/icons/triangle-right.svg.js +3 -3
- package/build/icons/triangle-right.svg.js.map +1 -1
- package/build/icons/verification.svg.js +3 -3
- package/build/icons/verification.svg.js.map +1 -1
- package/build/icons/warning-circle.svg.js +3 -3
- package/build/icons/warning-circle.svg.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.js +11 -22
- package/build/inputs/ActionButton/ActionButton.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.styled.js +5 -54
- package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
- package/build/inputs/Button/Button.js +125 -121
- package/build/inputs/Button/Button.js.map +1 -1
- package/build/inputs/Button/Button.styled.js +42 -260
- package/build/inputs/Button/Button.styled.js.map +1 -1
- package/build/inputs/Checkbox/Checkbox.js +45 -61
- package/build/inputs/Checkbox/Checkbox.js.map +1 -1
- package/build/inputs/Checkbox/Checkbox.styled.js +24 -153
- package/build/inputs/Checkbox/Checkbox.styled.js.map +1 -1
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +106 -111
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js.map +1 -1
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +88 -273
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js.map +1 -1
- package/build/inputs/CompactStarRating/CompactStarRating.js +56 -77
- package/build/inputs/CompactStarRating/CompactStarRating.js.map +1 -1
- package/build/inputs/CompactStarRating/CompactStarRating.styled.js +32 -211
- package/build/inputs/CompactStarRating/CompactStarRating.styled.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.js +86 -105
- package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js +55 -258
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +70 -77
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +28 -60
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/types.js +12 -12
- package/build/inputs/MultiLevelCheckbox/types.js.map +1 -1
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +69 -73
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +44 -87
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.js +69 -79
- package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.styled.js +70 -76
- package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
- package/build/inputs/Radio/Radio.js +20 -33
- package/build/inputs/Radio/Radio.js.map +1 -1
- package/build/inputs/Radio/Radio.styled.js +15 -96
- package/build/inputs/Radio/Radio.styled.js.map +1 -1
- package/build/inputs/Switch/Switch.js +28 -40
- package/build/inputs/Switch/Switch.js.map +1 -1
- package/build/inputs/Switch/Switch.styled.js +24 -94
- package/build/inputs/Switch/Switch.styled.js.map +1 -1
- package/build/inputs/TextArea/TextArea.js +98 -123
- package/build/inputs/TextArea/TextArea.js.map +1 -1
- package/build/inputs/TextArea/TextArea.styled.js +64 -379
- package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
- package/build/inputs/TextInput/TextInput.js +59 -79
- package/build/inputs/TextInput/TextInput.js.map +1 -1
- package/build/inputs/TextInput/TextInput.styled.js +33 -224
- package/build/inputs/TextInput/TextInput.styled.js.map +1 -1
- package/build/layout/InputGroup/InputGroup.js +6 -9
- package/build/layout/InputGroup/InputGroup.js.map +1 -1
- package/build/layout/InputGroup/InputGroup.styled.js +4 -3
- package/build/layout/InputGroup/InputGroup.styled.js.map +1 -1
- package/build/layout/InputGroup/index.js +2 -0
- package/build/layout/InputGroup/index.js.map +1 -0
- package/build/layout/SectionSeparator/SectionSeparator.js +5 -9
- package/build/layout/SectionSeparator/SectionSeparator.js.map +1 -1
- package/build/layout/SectionSeparator/SectionSeparator.styled.js +4 -8
- package/build/layout/SectionSeparator/SectionSeparator.styled.js.map +1 -1
- package/build/styles/utils/colors-export.d.ts +73 -0
- package/build/styles/utils/colors-export.js.map +1 -1
- package/build/utils/dateTime.js.map +1 -1
- package/build/utils/defaultTheme.js +14 -28
- package/build/utils/defaultTheme.js.map +1 -1
- package/build/utils/getElementRef.js +14 -0
- package/build/utils/getElementRef.js.map +1 -0
- package/build/utils/parseTrigger.js +16 -0
- package/build/utils/parseTrigger.js.map +1 -0
- package/build/widgets/AssetAction/AssetAction.js +26 -33
- package/build/widgets/AssetAction/AssetAction.js.map +1 -1
- package/build/widgets/AssetAction/AssetAction.styled.js +20 -34
- package/build/widgets/AssetAction/AssetAction.styled.js.map +1 -1
- package/build/widgets/AssetActionsBase/AssetActionsBase.js +8 -13
- package/build/widgets/AssetActionsBase/AssetActionsBase.js.map +1 -1
- package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js +4 -9
- package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGallery.js +15 -40
- package/build/widgets/AssetGallery/AssetGallery.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +55 -70
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -24
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +146 -122
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -286
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +170 -125
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +135 -364
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +20 -21
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js.map +1 -1
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +20 -71
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenu.js +12 -11
- package/build/widgets/ContextMenu/ContextMenu.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenu.styled.js +4 -4
- package/build/widgets/ContextMenu/ContextMenu.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +17 -25
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -71
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +7 -11
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +4 -11
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js.map +1 -1
- package/build/widgets/InfoCard/InfoCard.js +26 -21
- package/build/widgets/InfoCard/InfoCard.js.map +1 -1
- package/build/widgets/InfoCard/InfoCard.styled.js +36 -84
- package/build/widgets/InfoCard/InfoCard.styled.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js +28 -34
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js +21 -57
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/index.js +2 -0
- package/build/widgets/InstructionSeverityDisplay/index.js.map +1 -0
- package/build/widgets/Instructions/Instructions.js +53 -95
- package/build/widgets/Instructions/Instructions.js.map +1 -1
- package/build/widgets/Instructions/Instructions.styled.js +27 -26
- package/build/widgets/Instructions/Instructions.styled.js.map +1 -1
- package/build/widgets/ProgressBar/ProgressBar.js +39 -37
- package/build/widgets/ProgressBar/ProgressBar.js.map +1 -1
- package/build/widgets/ProgressBar/ProgressBar.styled.js +56 -125
- package/build/widgets/ProgressBar/ProgressBar.styled.js.map +1 -1
- package/build/widgets/SummaryCard/SummaryCard.js +55 -64
- package/build/widgets/SummaryCard/SummaryCard.js.map +1 -1
- package/build/widgets/SummaryCard/SummaryCard.styled.js +51 -106
- package/build/widgets/SummaryCard/SummaryCard.styled.js.map +1 -1
- package/package.json +77 -36
- package/styles/utils/colors-export.d.ts +73 -0
- package/types/components/data/Alert/Alert.d.ts +76 -0
- package/types/components/data/Alert/Alert.styled.d.ts +83 -0
- package/types/components/data/Alert/index.d.ts +1 -0
- package/types/components/data/Badge/Badge.d.ts +128 -0
- package/types/components/data/Badge/Badge.styled.d.ts +132 -0
- package/types/components/data/Badge/index.d.ts +1 -0
- package/types/components/data/Popover/Popover.d.ts +205 -0
- package/types/components/data/Popover/Popover.styled.d.ts +15 -0
- package/types/components/data/Popover/index.d.ts +1 -0
- package/types/components/data/SeverityBadge/SeverityBadge.d.ts +72 -0
- package/types/components/data/SeverityBadge/index.d.ts +1 -0
- package/types/components/data/Tab/Tab.d.ts +27 -0
- package/types/components/data/Tab/Tab.styled.d.ts +1 -0
- package/types/components/data/Tab/index.d.ts +1 -0
- package/types/components/data/Tabs/Tabs.d.ts +111 -0
- package/types/components/data/Tabs/Tabs.styled.d.ts +42 -0
- package/types/components/data/Tabs/index.d.ts +1 -0
- package/types/components/data/Tooltip/Tooltip.d.ts +134 -0
- package/types/components/data/Tooltip/Tooltip.styled.d.ts +8 -0
- package/types/components/data/Tooltip/index.d.ts +1 -0
- package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.d.ts +35 -0
- package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.d.ts +46 -0
- package/types/components/data/VerificationStatusIcon/index.d.ts +1 -0
- package/types/components/data/_shared/FloatingArrow.styled.d.ts +129 -0
- package/types/components/data/index.d.ts +8 -0
- package/types/components/index.d.ts +3 -0
- package/types/components/inputs/ActionButton/ActionButton.d.ts +55 -0
- package/types/components/inputs/ActionButton/ActionButton.styled.d.ts +34 -0
- package/types/components/inputs/ActionButton/index.d.ts +1 -0
- package/types/components/inputs/Button/Button.d.ts +82 -0
- package/types/components/inputs/Button/Button.styled.d.ts +102 -0
- package/types/components/inputs/Button/index.d.ts +1 -0
- package/types/components/inputs/Checkbox/Checkbox.d.ts +92 -0
- package/types/components/inputs/Checkbox/Checkbox.styled.d.ts +33 -0
- package/types/components/inputs/Checkbox/index.d.ts +1 -0
- package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.d.ts +242 -0
- package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.d.ts +157 -0
- package/types/components/inputs/CompactAutocompleteSelect/index.d.ts +1 -0
- package/types/components/inputs/CompactStarRating/CompactStarRating.d.ts +96 -0
- package/types/components/inputs/CompactStarRating/CompactStarRating.styled.d.ts +86 -0
- package/types/components/inputs/CompactStarRating/index.d.ts +1 -0
- package/types/components/inputs/CompactTextInput/CompactTextInput.d.ts +116 -0
- package/types/components/inputs/CompactTextInput/CompactTextInput.styled.d.ts +70 -0
- package/types/components/inputs/CompactTextInput/index.d.ts +1 -0
- package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.d.ts +41 -0
- package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.d.ts +21 -0
- package/types/components/inputs/MultiLevelCheckbox/index.d.ts +2 -0
- package/types/components/inputs/MultiLevelCheckbox/types.d.ts +72 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.d.ts +44 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.d.ts +11 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/index.d.ts +1 -0
- package/types/components/inputs/MultiSelect/MultiSelect.d.ts +172 -0
- package/types/components/inputs/MultiSelect/MultiSelect.styled.d.ts +99 -0
- package/types/components/inputs/MultiSelect/index.d.ts +1 -0
- package/types/components/inputs/Radio/Radio.d.ts +65 -0
- package/types/components/inputs/Radio/Radio.styled.d.ts +11 -0
- package/types/components/inputs/Radio/index.d.ts +1 -0
- package/types/components/inputs/Switch/Switch.d.ts +62 -0
- package/types/components/inputs/Switch/Switch.styled.d.ts +20 -0
- package/types/components/inputs/Switch/index.d.ts +1 -0
- package/types/components/inputs/TextArea/TextArea.d.ts +124 -0
- package/types/components/inputs/TextArea/TextArea.styled.d.ts +95 -0
- package/types/components/inputs/TextArea/index.d.ts +1 -0
- package/types/components/inputs/TextInput/TextInput.d.ts +109 -0
- package/types/components/inputs/TextInput/TextInput.styled.d.ts +43 -0
- package/types/components/inputs/TextInput/index.d.ts +1 -0
- package/types/components/inputs/index.d.ts +13 -0
- package/types/components/layout/InputGroup/InputGroup.d.ts +31 -0
- package/types/components/layout/InputGroup/InputGroup.styled.d.ts +1 -0
- package/types/components/layout/InputGroup/index.d.ts +1 -0
- package/types/components/layout/SectionSeparator/SectionSeparator.d.ts +28 -0
- package/types/components/layout/SectionSeparator/SectionSeparator.styled.d.ts +14 -0
- package/types/components/layout/SectionSeparator/index.d.ts +1 -0
- package/types/components/layout/index.d.ts +2 -0
- package/types/components/widgets/AssetAction/AssetAction.d.ts +16 -0
- package/types/components/widgets/AssetAction/AssetAction.styled.d.ts +20 -0
- package/types/components/widgets/AssetAction/index.d.ts +1 -0
- package/types/components/widgets/AssetActionsBase/AssetActionsBase.d.ts +25 -0
- package/types/components/widgets/AssetActionsBase/AssetActionsBase.styled.d.ts +1 -0
- package/types/components/widgets/AssetActionsBase/index.d.ts +1 -0
- package/types/components/widgets/AssetGallery/AssetGallery.d.ts +170 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.d.ts +88 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.d.ts +3 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.d.ts +3 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.d.ts +100 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.d.ts +2 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.d.ts +85 -0
- package/types/components/widgets/AssetGallery/asset.types.d.ts +446 -0
- package/types/components/widgets/AssetGallery/index.d.ts +1 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.d.ts +60 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.d.ts +35 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenu.d.ts +134 -0
- package/types/components/widgets/ContextMenu/ContextMenu.styled.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.d.ts +45 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.d.ts +26 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.d.ts +41 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/index.d.ts +1 -0
- package/types/components/widgets/InfoCard/InfoCard.d.ts +33 -0
- package/types/components/widgets/InfoCard/InfoCard.styled.d.ts +45 -0
- package/types/components/widgets/InfoCard/index.d.ts +1 -0
- package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.d.ts +46 -0
- package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.d.ts +40 -0
- package/types/components/widgets/InstructionSeverityDisplay/index.d.ts +1 -0
- package/types/components/widgets/Instructions/Instructions.d.ts +156 -0
- package/types/components/widgets/Instructions/Instructions.styled.d.ts +26 -0
- package/types/components/widgets/Instructions/index.d.ts +1 -0
- package/types/components/widgets/ProgressBar/ProgressBar.d.ts +30 -0
- package/types/components/widgets/ProgressBar/ProgressBar.styled.d.ts +78 -0
- package/types/components/widgets/ProgressBar/index.d.ts +1 -0
- package/types/components/widgets/SummaryCard/SummaryCard.d.ts +83 -0
- package/types/components/widgets/SummaryCard/SummaryCard.styled.d.ts +68 -0
- package/types/components/widgets/SummaryCard/index.d.ts +1 -0
- package/types/components/widgets/index.d.ts +11 -0
- package/types/hooks/useElementSize.d.ts +25 -0
- package/types/hooks/useEventListner.d.ts +46 -0
- package/types/hooks/useFloatingPopover.d.ts +242 -0
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +26 -0
- package/types/hooks/useOnClickOutside.d.ts +31 -0
- package/types/hooks/useTooltipAutoShow.d.ts +80 -0
- package/types/icons/index.d.ts +41 -0
- package/types/ssr/index.d.ts +1 -0
- package/types/styles/utils/colors-export.d.ts +73 -0
- package/types/utils/dateTime.d.ts +13 -0
- package/types/utils/defaultTheme.d.ts +174 -0
- package/types/utils/getElementRef.d.ts +21 -0
- package/types/utils/parseTrigger.d.ts +92 -0
- package/build/_virtual/_rollupPluginBabelHelpers.js +0 -12
- package/build/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/build/widgets/AssetGallery/asset.propType.js +0 -56
- package/build/widgets/AssetGallery/asset.propType.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type TabOwnProps = {
|
|
3
|
+
children?: any;
|
|
4
|
+
hidden?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The tab's clickable header, conventionally a `Badge`:
|
|
7
|
+
* `<Tab trigger={<Badge>Tab title</Badge>}>`.
|
|
8
|
+
*
|
|
9
|
+
* NOT DECLARED BY THE OLD propTypes AND NOT READ BY THIS COMPONENT — which is why
|
|
10
|
+
* neither the codemod nor the widening pass could produce it, and why it is
|
|
11
|
+
* hand-written here. `Tab` is a data carrier: `Tabs.tsx` walks its children with
|
|
12
|
+
* `child.type === Tab` and lifts `child.props?.trigger` out, then renders it inside
|
|
13
|
+
* `S.TabHeader`. The `<Tab>` element itself is never mounted, so `trigger` never
|
|
14
|
+
* reaches the DOM and there is no attribute leak to fix.
|
|
15
|
+
*
|
|
16
|
+
* `ReactElement`, not `ReactNode`: `Tabs.handleTabClick` reads
|
|
17
|
+
* `tab.trigger.props.children` to build the `triggerText` it passes to `onTabClick`.
|
|
18
|
+
* A string trigger would compile under `ReactNode` and silently produce an empty
|
|
19
|
+
* `triggerText`. All 44 call sites in `src` pass a `<Badge>`.
|
|
20
|
+
*/
|
|
21
|
+
trigger?: React.ReactElement<any>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* This is a component to help you get started with development.
|
|
25
|
+
*/
|
|
26
|
+
declare const Tab: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, never>, never>, "ref">, keyof TabOwnProps> & TabOwnProps & React.RefAttributes<any>>;
|
|
27
|
+
export default Tab;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Tab: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, never>, never>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tab';
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as S from './Tabs.styled';
|
|
3
|
+
type TabsOwnProps = {
|
|
4
|
+
children?: any[] | any;
|
|
5
|
+
/**
|
|
6
|
+
* Whether `Tabs` component has a background color
|
|
7
|
+
*/
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether `tabs` will have a predefined min-height.
|
|
11
|
+
*/
|
|
12
|
+
defaultMinHeight?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Custom padding.
|
|
15
|
+
*/
|
|
16
|
+
customPadding?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Callback for clicked tab
|
|
19
|
+
*/
|
|
20
|
+
onTabClick?: (...args: any[]) => any;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Tabs that let you group content
|
|
24
|
+
*
|
|
25
|
+
* ### Import
|
|
26
|
+
*
|
|
27
|
+
* ``` js
|
|
28
|
+
* import { Tabs, Tab } from '@ntbjs/react-components/data'
|
|
29
|
+
* // or
|
|
30
|
+
* import Tabs from '@ntbjs/react-components/data/Tabs'
|
|
31
|
+
* import Tab from '@ntbjs/react-components/data/Tab'
|
|
32
|
+
* ```
|
|
33
|
+
* ### Tab - Tabs - Badge
|
|
34
|
+
* `Tab`, `Tabs` and `Badge` must be used in order to implement the component.
|
|
35
|
+
* ```
|
|
36
|
+
* <Tabs>
|
|
37
|
+
* <Tab trigger={<Badge>Tab title</Badge>}>
|
|
38
|
+
* Tab content
|
|
39
|
+
* </Tab>
|
|
40
|
+
* </Tabs>
|
|
41
|
+
* ```
|
|
42
|
+
* ## Wrapping
|
|
43
|
+
* Content (data displayed inside the `Tab`) is wrapped by `Tab`:
|
|
44
|
+
* ```
|
|
45
|
+
* <Tab>
|
|
46
|
+
* Tab content
|
|
47
|
+
* </Tab>
|
|
48
|
+
* ```
|
|
49
|
+
* ### Badge
|
|
50
|
+
* The tab title is wrapped by `Badge` (which is passed as the trigger prop inside `Tab`):
|
|
51
|
+
*
|
|
52
|
+
*Props that can be passed inside the `Badge` component are: `badgeContent`, `active`, `error`, `warning` (check out the `Badge` component documentation for props options).
|
|
53
|
+
* ```
|
|
54
|
+
* <Tab trigger={<Badge>Tab title</Badge>}>
|
|
55
|
+
* Tab content
|
|
56
|
+
* </Tab>
|
|
57
|
+
* ```
|
|
58
|
+
* All tabs are wrapped by `Tabs`:
|
|
59
|
+
* ```
|
|
60
|
+
* <Tabs>
|
|
61
|
+
* <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
|
|
62
|
+
* <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
|
|
63
|
+
* <Tab trigger={<Badge>Tab title 3</Badge>}>Tab content 3</Tab>
|
|
64
|
+
* <Tab trigger={<Badge>Tab title 4</Badge>}>Tab content 4</Tab>
|
|
65
|
+
* <Tab trigger={<Badge>Tab title 5</Badge>}>Tab content 5</Tab>
|
|
66
|
+
* </Tabs>
|
|
67
|
+
* ```
|
|
68
|
+
* ## Props
|
|
69
|
+
* A `backgroundColor` prop can be passed as a string to set the `Tabs` component background color.
|
|
70
|
+
* ```
|
|
71
|
+
* <Tabs backgroundColor={'#bfe0d5'}>
|
|
72
|
+
* <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
|
|
73
|
+
* <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
|
|
74
|
+
* </Tabs>
|
|
75
|
+
* ```
|
|
76
|
+
* ### hidden
|
|
77
|
+
* A single Tab can be hidden by using the `hidden={true||false}` prop (this is useful when the tab has empty content):
|
|
78
|
+
* ```
|
|
79
|
+
* <Tabs>
|
|
80
|
+
* <Tab hidden={true} trigger={<Badge>Tab title 1</Badge>}></Tab>
|
|
81
|
+
* <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
|
|
82
|
+
* <Tab hidden={true} trigger={<Badge>Tab title 3</Badge>}></Tab>
|
|
83
|
+
* <Tab trigger={<Badge>Tab title 4</Badge>}>Tab content 4</Tab>
|
|
84
|
+
* <Tab hidden={true} trigger={<Badge>Tab title 5</Badge>}></Tab>
|
|
85
|
+
* </Tabs>
|
|
86
|
+
* ```
|
|
87
|
+
* ### Default minHeight
|
|
88
|
+
* A `defaultMinHeight` prop can be passed to the Tabs component to set a predefined min-height.
|
|
89
|
+
*
|
|
90
|
+
* Pass `defaultMinHeight={'value px'}` on the `Tabs` component to use this feature.
|
|
91
|
+
* ```
|
|
92
|
+
* <Tabs defaultMinHeight={'500px'}>
|
|
93
|
+
* <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
|
|
94
|
+
* <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
|
|
95
|
+
* </Tabs>
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* ### Custom padding
|
|
99
|
+
* A `customPadding` prop can be passed to the Tabs component to set a custom padding on the tabs. The custom padding is applied the the Tabs options,
|
|
100
|
+
* not to the content within the Tabs.
|
|
101
|
+
*
|
|
102
|
+
* Pass `customPadding={'value px'}` on the `Tabs` component to use this feature.
|
|
103
|
+
* ```
|
|
104
|
+
* <Tabs customPadding={'40px'}>
|
|
105
|
+
* <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
|
|
106
|
+
* <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
|
|
107
|
+
* </Tabs>
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, S.TabsStyleProps>, never>, "ref">, keyof TabsOwnProps> & TabsOwnProps & React.RefAttributes<any>>;
|
|
111
|
+
export default Tabs;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Props of the `Tabs` root, i.e. what `Tabs.tsx` passes to `S.Tabs`. */
|
|
2
|
+
export interface TabsStyleProps {
|
|
3
|
+
/** `backgroundColor` — `PropTypes.string`, a CSS colour, interpolated raw. */
|
|
4
|
+
$backgroundColor?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Shared by `TabHeaders` and `TabHeaderBorder`, the two components `Tabs.tsx` hands
|
|
8
|
+
* `custompadding` to. One interface rather than two because the key, the value and the
|
|
9
|
+
* defect are the same at both sites; a change here is a change to both, which is the
|
|
10
|
+
* point of naming them together.
|
|
11
|
+
*
|
|
12
|
+
* DEFECT, DECLARED NOT FIXED: `custompadding` HAS NO `$`, so `shouldForwardProp` forwards
|
|
13
|
+
* it and it lands on the rendered `<ul>` and `<div>`. This is not inferred — it is in
|
|
14
|
+
* `scripts/r19-harness/baseline.json` as `<ul custompadding="40px" …>`. The fix is to
|
|
15
|
+
* rename it `$customPadding` at both ends, which REMOVES a DOM attribute and so belongs to
|
|
16
|
+
* C10 with its baseline re-record. §E.4's third case.
|
|
17
|
+
*
|
|
18
|
+
* `number | string`, not the `PropTypes.string` the propTypes claim: `Tabs.tsx` DEFAULTS
|
|
19
|
+
* `customPadding` to the NUMBER `0`, and that default is what reaches these templates in
|
|
20
|
+
* the common case. It is falsy, so the `!props.custompadding` arm wins and the padding
|
|
21
|
+
* shorthand is emitted as `padding: 0` / `margin: -2px 0` — correct by accident. A
|
|
22
|
+
* caller-supplied number would emit a unitless `padding: 0 8`, which is why the union is
|
|
23
|
+
* worth stating rather than tidying away.
|
|
24
|
+
*/
|
|
25
|
+
interface TabPaddingStyleProps {
|
|
26
|
+
/** `customPadding` — see the interface JSDoc; both the leak and the union are there. */
|
|
27
|
+
custompadding?: number | string;
|
|
28
|
+
}
|
|
29
|
+
/** Props of `TabHeader`, one `<li>` per tab. */
|
|
30
|
+
interface TabHeaderStyleProps {
|
|
31
|
+
/**
|
|
32
|
+
* `tab.key === activeTab`, derived in the component, so genuinely `boolean`. Read both
|
|
33
|
+
* in the `$active &&` block and inside the two `themeProp()` callbacks below.
|
|
34
|
+
*/
|
|
35
|
+
$active?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const Tabs: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, TabsStyleProps>, never>> & string;
|
|
38
|
+
export declare const TabHeaders: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>>, TabPaddingStyleProps>, never>> & string;
|
|
39
|
+
export declare const TabHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>>, TabHeaderStyleProps>, never>> & string;
|
|
40
|
+
export declare const TabContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
|
|
41
|
+
export declare const TabHeaderBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, TabPaddingStyleProps>, never>> & string;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tabs';
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PopoverPlacement, PopperOffset } from '../../../hooks/useFloatingPopover';
|
|
3
|
+
/**
|
|
4
|
+
* tippy's `appendTo`. `'parent'` and an implicit-parent case are real tippy behaviours, not
|
|
5
|
+
* inventions — measured in `tippy.js/dist/tippy.cjs.js`:
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* if (instance.props.interactive && appendTo === TIPPY_DEFAULT_APPEND_TO || appendTo === 'parent') {
|
|
9
|
+
* parentNode = node.parentNode;
|
|
10
|
+
* } else {
|
|
11
|
+
* parentNode = invokeWithArgsOrReturn(appendTo, [node]);
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ⚠️ THIS IS A CORRECTION TO PLAN §A3, WHICH RESOLVED C4 ON HALF THE EVIDENCE. §A3 quotes
|
|
16
|
+
* `TIPPY_DEFAULT_APPEND_TO = () => document.body` and concludes that portalling by default
|
|
17
|
+
* is behaviour-preserving. The line above is the other half: when `interactive` is true AND
|
|
18
|
+
* `appendTo` is left at its default, tippy does NOT use that default — it renders INLINE,
|
|
19
|
+
* into the reference's parent. So "portal by default" is behaviour-preserving only for
|
|
20
|
+
* non-interactive instances. It is safe for `Tooltip`, whose `interactive` defaults to
|
|
21
|
+
* `false` and which no consumer passes it to (measured across both apps), and it is a rule
|
|
22
|
+
* `Popover` will have to honour, since `Popover` does have interactive call sites.
|
|
23
|
+
*/
|
|
24
|
+
export type TooltipAppendTo = 'parent' | Element | ((reference: Element) => Element);
|
|
25
|
+
type TooltipOwnProps = {
|
|
26
|
+
/**
|
|
27
|
+
* The content of the `Tooltip`.
|
|
28
|
+
*
|
|
29
|
+
* **NB!** If the content is a `string`, it should be wrapped in a tag, e.g.
|
|
30
|
+
* `<span>{content}</span>`. The requirement outlived its original cause — it was a
|
|
31
|
+
* `@tippyjs/react` quirk — but it is kept because consumers have written to it.
|
|
32
|
+
*/
|
|
33
|
+
content: string | React.ReactElement<any>;
|
|
34
|
+
/**
|
|
35
|
+
* Determines if the tooltip has interactive content inside of it, so that it can be
|
|
36
|
+
* hovered over and clicked inside without hiding.
|
|
37
|
+
*/
|
|
38
|
+
interactive?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The preferred placement of the tooltip. Note that the flip middleware can change this
|
|
41
|
+
* to the opposite placement if it has more space.
|
|
42
|
+
*/
|
|
43
|
+
placement?: PopoverPlacement;
|
|
44
|
+
/**
|
|
45
|
+
* Duration in ms of the transition animation.
|
|
46
|
+
*/
|
|
47
|
+
duration?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Determines the events that cause the tooltip to show. Multiple event names are separated
|
|
50
|
+
* by spaces.
|
|
51
|
+
*
|
|
52
|
+
* *Example events:*
|
|
53
|
+
*
|
|
54
|
+
* `trigger: 'click'`
|
|
55
|
+
*
|
|
56
|
+
* `trigger: 'focusin'`
|
|
57
|
+
*
|
|
58
|
+
* `trigger: 'mouseenter click'`
|
|
59
|
+
*
|
|
60
|
+
* `trigger: 'mouseenter'`
|
|
61
|
+
*
|
|
62
|
+
* Omitting it means `'mouseenter focus'`, and `''` means no triggers at all — both are
|
|
63
|
+
* relied on by consumer code. See `parseTrigger`.
|
|
64
|
+
*
|
|
65
|
+
* --
|
|
66
|
+
*/
|
|
67
|
+
trigger?: 'mouseenter' | 'mouseenter focus' | 'click' | 'focusin' | 'mouseenter click' | '';
|
|
68
|
+
/**
|
|
69
|
+
* Determines if the tooltip is visible without trigger.
|
|
70
|
+
*
|
|
71
|
+
* Passing a boolean — **including `false`** — switches the tooltip to CONTROLLED mode and
|
|
72
|
+
* its own triggers stop firing. `undefined` leaves it uncontrolled. `useTooltipAutoShow`
|
|
73
|
+
* depends on that distinction and its `toolTipVisible` is `true | undefined` for exactly
|
|
74
|
+
* this reason.
|
|
75
|
+
*/
|
|
76
|
+
visible?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Whether the arrow is rendered. Defaults to `true`, which is tippy's default and was
|
|
79
|
+
* therefore already the behaviour; 6 consumer call sites pass `false`.
|
|
80
|
+
*/
|
|
81
|
+
arrow?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* `z-index` of the positioned element. Defaults to 9999, tippy's default. 30 consumer call
|
|
84
|
+
* sites pass this, which is why it is declared here even though it was never in the old
|
|
85
|
+
* prop type — it used to typecheck only because the published `Props` widened to
|
|
86
|
+
* `TippyProps`, and that widening disappears with tippy.
|
|
87
|
+
*/
|
|
88
|
+
zIndex?: number;
|
|
89
|
+
/**
|
|
90
|
+
* A disabled tooltip can never open, even under a controlled `visible={true}` — tippy's
|
|
91
|
+
* semantics, and what `useTooltipAutoShow`'s `toolTipDisabled` relies on.
|
|
92
|
+
*/
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* `[skidding, distance]`, Popper's convention, where `distance` is the gap between the
|
|
96
|
+
* reference and the tooltip BOX. Defaults to tippy's `[0, 10]`.
|
|
97
|
+
*/
|
|
98
|
+
offset?: PopperOffset;
|
|
99
|
+
/**
|
|
100
|
+
* Cap on the box's width, in px. Defaults to 350 — tippy's default, and applied to every
|
|
101
|
+
* tooltip today, so it decides where text wraps.
|
|
102
|
+
*/
|
|
103
|
+
maxWidth?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Where the tooltip is rendered. Defaults to `document.body`. See `TooltipAppendTo`.
|
|
106
|
+
*/
|
|
107
|
+
appendTo?: TooltipAppendTo;
|
|
108
|
+
/** Fired when a press lands outside both the reference and the tooltip. */
|
|
109
|
+
onClickOutside?: (event?: Event) => void;
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated Accepted and IGNORED. This was a Popper `modifiers` array; Floating UI has
|
|
112
|
+
* middleware instead and the two are not translatable prop-for-prop. Kept so that no
|
|
113
|
+
* existing call site throws — plan C6.
|
|
114
|
+
*/
|
|
115
|
+
modifiers?: unknown;
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated Accepted and IGNORED, for the same reason as `modifiers`.
|
|
118
|
+
*/
|
|
119
|
+
popperOptions?: unknown;
|
|
120
|
+
children?: React.ReactNode;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Tooltips display informative text when users hover over, focus on, or tap an element.
|
|
124
|
+
*
|
|
125
|
+
* ### Import
|
|
126
|
+
*
|
|
127
|
+
* ``` js
|
|
128
|
+
* import { Tooltip } from '@ntbjs/react-components/data'
|
|
129
|
+
* // or
|
|
130
|
+
* import Tooltip from '@ntbjs/react-components/data/Tooltip'
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
declare const Tooltip: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>, "ref">, keyof TooltipOwnProps> & TooltipOwnProps & React.RefAttributes<any>>;
|
|
134
|
+
export default Tooltip;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tooltip box — what `.tippy-box` was.
|
|
3
|
+
*
|
|
4
|
+
* `Tooltip.tsx` puts the transition styles and the `max-width` on this element inline and
|
|
5
|
+
* the POSITION on its parent, matching the split tippy used (animated box inside a
|
|
6
|
+
* Popper-positioned root) and the one the three existing Floating UI sites use.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Tooltip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tooltip';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as S from './VerificationStatusIcon.styled';
|
|
3
|
+
type VerificationStatusIconOwnProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Status of the verification
|
|
6
|
+
*/
|
|
7
|
+
status: 'verified' | 'pending' | 'rejected' | 'mixed';
|
|
8
|
+
/**
|
|
9
|
+
* Custom height of the icon
|
|
10
|
+
*/
|
|
11
|
+
iconHeight?: number;
|
|
12
|
+
/**
|
|
13
|
+
* If Icon has background
|
|
14
|
+
*/
|
|
15
|
+
background?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A compact icon showing verification status with color coding.
|
|
19
|
+
*
|
|
20
|
+
* ### Import
|
|
21
|
+
*
|
|
22
|
+
* ``` js
|
|
23
|
+
* import { VerificationStatusIcon } from '@ntbjs/react-components/data'
|
|
24
|
+
* // or
|
|
25
|
+
* import VerificationStatusIcon from '@ntbjs/react-components/data/VerificationStatusIcon'
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ### Props
|
|
29
|
+
* ```
|
|
30
|
+
* Pass one of "verified", "pending" or "rejected" to `status` to display the correct verification status.
|
|
31
|
+
* Pass `iconHeight={15}` to set the height of the icon in pixel
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare const VerificationStatusIcon: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, S.VerificationStatusIconStyleProps>, never>, "ref">, keyof VerificationStatusIconOwnProps> & VerificationStatusIconOwnProps & React.RefAttributes<any>>;
|
|
35
|
+
export default VerificationStatusIcon;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared by all three components: `VerificationStatusIcon.tsx` passes `$background` to
|
|
3
|
+
* every one of them. Only `VerificationIconWrapper` and `VerificationStatusIcon` read it;
|
|
4
|
+
* on `VerificationStatusColor` it is passed and never read, which is harmless because the
|
|
5
|
+
* `$` means `shouldForwardProp` filters it before both the CSS and the DOM.
|
|
6
|
+
*/
|
|
7
|
+
interface VerificationBackgroundStyleProps {
|
|
8
|
+
/** `background` — `PropTypes.bool`; swaps in the black pill and the light icon colour. */
|
|
9
|
+
$background?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Props of the `VerificationStatusIcon` element.
|
|
13
|
+
*
|
|
14
|
+
* DEFECT, DECLARED NOT FIXED: `iconHeight` in its non-`$` form is what the `svg` rule
|
|
15
|
+
* below reads, and NOTHING PASSES IT — `VerificationStatusIcon.tsx` passes `$iconHeight`,
|
|
16
|
+
* which this component never reads. So the `?? 15` fallback is unconditional and the icon
|
|
17
|
+
* is 15px tall no matter what a caller asks for, WHILE `VerificationStatusColor` does read
|
|
18
|
+
* `$iconHeight` and scales correctly. Pass `iconHeight={30}` today and the status dot grows
|
|
19
|
+
* but the icon it sits on does not.
|
|
20
|
+
*
|
|
21
|
+
* The fix is to repoint the read to `props.$iconHeight`, which ACTIVATES A BRANCH THAT HAS
|
|
22
|
+
* NEVER FIRED and changes the emitted height for every non-default `iconHeight`. §J.8 puts
|
|
23
|
+
* that in C10 with its baseline re-record.
|
|
24
|
+
*/
|
|
25
|
+
export interface VerificationStatusIconStyleProps extends VerificationBackgroundStyleProps {
|
|
26
|
+
/** `iconHeight` — `PropTypes.number`, px. Read, never passed; see the JSDoc above. */
|
|
27
|
+
iconHeight?: number;
|
|
28
|
+
}
|
|
29
|
+
/** Props of `VerificationStatusColor`, the small status dot. */
|
|
30
|
+
interface VerificationStatusColorStyleProps extends VerificationBackgroundStyleProps {
|
|
31
|
+
/** `iconHeight` — `PropTypes.number`, px. This site reads the `$` form, correctly. */
|
|
32
|
+
$iconHeight?: number;
|
|
33
|
+
/**
|
|
34
|
+
* `status` — `PropTypes.oneOf(['verified', 'pending', 'rejected', 'mixed'])`, and
|
|
35
|
+
* `.isRequired` on the component but still OPTIONAL here per §J.5.
|
|
36
|
+
*
|
|
37
|
+
* Closed on purpose rather than widened to `string`: the block below compares this value
|
|
38
|
+
* four times, and with a closed union a mistyped status name is TS2367 instead of a
|
|
39
|
+
* branch that silently never fires. §J.6.
|
|
40
|
+
*/
|
|
41
|
+
$status?: 'verified' | 'pending' | 'rejected' | 'mixed';
|
|
42
|
+
}
|
|
43
|
+
export declare const VerificationIconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, VerificationBackgroundStyleProps>, never>> & string;
|
|
44
|
+
export declare const VerificationStatusIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, VerificationStatusIconStyleProps>, never>> & string;
|
|
45
|
+
export declare const VerificationStatusColor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, VerificationStatusColorStyleProps>, never>> & string;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './VerificationStatusIcon';
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { NtbTheme } from '../../../utils/defaultTheme';
|
|
2
|
+
/**
|
|
3
|
+
* Which surface the arrow is pointing away from, i.e. which fill/border pair it uses.
|
|
4
|
+
*
|
|
5
|
+
* - `popover` — the `Popover` box and the summary-card overlay: `gray-700` on dark,
|
|
6
|
+
* `white` on light, with a 1px border that continues the box's own.
|
|
7
|
+
* - `tooltip` — the `Tooltip` box: `gray-700` in BOTH themes and no border, because
|
|
8
|
+
* `Tooltip.styled.ts` sets `background: gray-700` unconditionally and has no border.
|
|
9
|
+
*/
|
|
10
|
+
export type FloatingArrowSurface = 'popover' | 'tooltip';
|
|
11
|
+
/**
|
|
12
|
+
* THE ARROW'S GEOMETRY, PER SURFACE — and the numbers are derived, not chosen.
|
|
13
|
+
*
|
|
14
|
+
* `height` is how far the arrow protrudes from the floating element, because
|
|
15
|
+
* `FloatingArrow` positions its `<svg>` at `[side]: '100%'`. It is therefore the term
|
|
16
|
+
* `useFloatingPopover` adds to the main-axis offset, which is why the popover height is
|
|
17
|
+
* IMPORTED from there rather than written twice: the offset maths and the rendered
|
|
18
|
+
* triangle must be the same number or the arrow sits at the wrong gap.
|
|
19
|
+
*
|
|
20
|
+
* `popover` — from `Popover.styled.ts`'s override, `border-width: 15px 13px 0`: a triangle
|
|
21
|
+
* 15px tall on a 13+13 = **26px** base. The full derivation, including why the `+15` in
|
|
22
|
+
* `Popover.tsx` was never a fudge, is on `DEFAULT_ARROW_HEIGHT`.
|
|
23
|
+
*
|
|
24
|
+
* `tooltip` — `Tooltip.styled.ts` never overrode the geometry, so the numbers come from
|
|
25
|
+
* `tippy.js/dist/tippy.css`, and they are the **VISIBLE** triangle rather than the declared
|
|
26
|
+
* one. THE ONE PIXEL THE FIRST DRAFT OF THIS COMMENT CALLED UNAVOIDABLE IS NOT: it
|
|
27
|
+
* disappears once the hidden part of tippy's triangle is subtracted instead of being
|
|
28
|
+
* carried. The measurement, from the four rules that describe a top-placed tooltip arrow:
|
|
29
|
+
*
|
|
30
|
+
* .tippy-arrow { width: 16px; height: 16px }
|
|
31
|
+
* .tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0 }
|
|
32
|
+
* .tippy-box[data-placement^=top] > .tippy-arrow:before {
|
|
33
|
+
* bottom: -7px; border-width: 8px 8px 0 }
|
|
34
|
+
*
|
|
35
|
+
* 1. The 16x16 arrow box sits with its bottom edge ON the box's bottom edge.
|
|
36
|
+
* 2. The `:before` border-triangle is 8px tall on a 16px base, positioned `bottom: -7px`,
|
|
37
|
+
* so its apex is 7px OUTSIDE the box and its 16px-wide base is 1px INSIDE it.
|
|
38
|
+
* 3. Therefore only 7 of the 8px are ever visible, and at the box edge — 1px down from a
|
|
39
|
+
* 16px base on an 8px triangle — the triangle has already narrowed to
|
|
40
|
+
* 16 x (1 - 1/8) = **14px**.
|
|
41
|
+
* 4. So the triangle a user sees is **14px wide at the box edge and 7px tall**, which is
|
|
42
|
+
* `FloatingArrow`'s own default geometry, and `FloatingArrow` overlapping nothing is
|
|
43
|
+
* exactly right: there is nothing to overlap. The 1px tippy hides is the same
|
|
44
|
+
* `gray-700` as the box behind it (this surface has no border), so it was never
|
|
45
|
+
* contributing a pixel.
|
|
46
|
+
*
|
|
47
|
+
* The offset that goes with it is tippy's own default `[0, 10]` passed straight through,
|
|
48
|
+
* with `arrowHeight: 0` handed to `useFloatingPopover` — see the block comment at
|
|
49
|
+
* `TOOLTIP_OFFSET` in `Tooltip.tsx`, which is where the reason that `Tooltip` does NOT add
|
|
50
|
+
* the arrow height while `Popover` does is written down. Box 10px out, tip 3px out, in both
|
|
51
|
+
* implementations.
|
|
52
|
+
*
|
|
53
|
+
* `strokeWidth` is `FloatingArrow`'s border width in px. `0` means the outline `<path>` is
|
|
54
|
+
* not rendered at all, which is why the `tooltip` surface needs no `stroke` rule.
|
|
55
|
+
*/
|
|
56
|
+
export declare const POPOVER_ARROW: {
|
|
57
|
+
readonly width: 26;
|
|
58
|
+
readonly height: 15;
|
|
59
|
+
readonly strokeWidth: 1;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* See `POPOVER_ARROW` — same derivation, from tippy's unmodified default geometry, reduced
|
|
63
|
+
* to the part of it that is visible. 14x7 and not 16x8; the numbers coincide with
|
|
64
|
+
* `FloatingArrow`'s own defaults, which is a result rather than a shortcut and is why they
|
|
65
|
+
* are written out anyway.
|
|
66
|
+
*/
|
|
67
|
+
export declare const TOOLTIP_ARROW: {
|
|
68
|
+
readonly width: 14;
|
|
69
|
+
readonly height: 7;
|
|
70
|
+
readonly strokeWidth: 0;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Props of `SharedFloatingArrow`, i.e. what this file's `.attrs()` callback reads and what
|
|
74
|
+
* a call site may set. Both optional per §J.5 — every wrapper spreads `{...props}` onto its
|
|
75
|
+
* styled root, and a required transient prop manufactures TS2769 there.
|
|
76
|
+
*/
|
|
77
|
+
interface FloatingArrowStyleProps {
|
|
78
|
+
/**
|
|
79
|
+
* styled-components' theme. Declared for the same reason `Popover.styled.ts` declares
|
|
80
|
+
* it — this is `styled(ThirdPartyComponent)`, so the outer props are
|
|
81
|
+
* `FloatingArrowProps extends React.ComponentPropsWithRef<'svg'>` and nothing in there
|
|
82
|
+
* is `theme`. `.attrs(applyDefaultTheme)` fills it in for the interpolations below.
|
|
83
|
+
*/
|
|
84
|
+
theme?: NtbTheme;
|
|
85
|
+
/**
|
|
86
|
+
* Which colour pair to use. NOT `$`-prefixed on purpose: it has to REACH THE DOM,
|
|
87
|
+
* because the rules below select on it. `shouldForwardProp` forwards it precisely
|
|
88
|
+
* because it does not start with `$`.
|
|
89
|
+
*
|
|
90
|
+
* Hyphenated, so a call site could pass it without this declaration — TypeScript does
|
|
91
|
+
* not excess-property-check JSX attribute names that are not valid identifiers. It is
|
|
92
|
+
* declared anyway because the `.attrs()` callback READS it, and a read does need the
|
|
93
|
+
* declaration.
|
|
94
|
+
*/
|
|
95
|
+
'data-arrow-surface'?: FloatingArrowSurface;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The themed arrow. Render it inside the floating element with `context`, `ref` and the
|
|
99
|
+
* geometry from `POPOVER_ARROW` / `TOOLTIP_ARROW`:
|
|
100
|
+
*
|
|
101
|
+
* ```tsx
|
|
102
|
+
* <S.SharedFloatingArrow ref={arrowRef} context={context} {...POPOVER_ARROW} />
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* `ref` IS REQUIRED BY `FloatingArrow` ITSELF — it warns in development without one and
|
|
106
|
+
* the `arrow()` middleware has nothing to measure. `useFloatingPopover` returns the
|
|
107
|
+
* matching `arrowRef`.
|
|
108
|
+
*
|
|
109
|
+
* ================== THE THREE-PATH STRUCTURE, WHICH THE CSS DEPENDS ON ==================
|
|
110
|
+
*
|
|
111
|
+
* `FloatingArrow` renders, in order (measured in
|
|
112
|
+
* `@floating-ui/react/dist/floating-ui.react.esm.js`):
|
|
113
|
+
*
|
|
114
|
+
* 1. an OUTLINE `<path>`, ONLY when `strokeWidth > 0`, with `fill="none"` and
|
|
115
|
+
* `stroke-width: strokeWidth * 2 + 1`;
|
|
116
|
+
* 2. the FILL `<path>`, whose `stroke` attribute it sets to the value of the `fill`
|
|
117
|
+
* PROP — its way of covering the inner half of (1)'s stroke so a `strokeWidth: 1`
|
|
118
|
+
* renders as a 1px border rather than 1.5px;
|
|
119
|
+
* 3. a `<clipPath>`, which is not a `<path>`.
|
|
120
|
+
*
|
|
121
|
+
* We colour by CSS rather than by the `fill`/`stroke` PROPS because the theme is chosen by
|
|
122
|
+
* a `body` class at runtime and a prop would have to be computed in JS, which cannot see
|
|
123
|
+
* which class is set. That leaves (2)'s `stroke` attribute unset, so the rules below set it
|
|
124
|
+
* explicitly — `& > path:last-of-type`, which is (2) whether or not (1) is present.
|
|
125
|
+
* Without that rule (2) would INHERIT the CSS `stroke` and the border would read ~1.5px
|
|
126
|
+
* instead of the 1px it replaces.
|
|
127
|
+
*/
|
|
128
|
+
export declare const SharedFloatingArrow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<Omit<import("@floating-ui/react").FloatingArrowProps, "ref"> & import("react").RefAttributes<SVGSVGElement>, Omit<import("@floating-ui/react").FloatingArrowProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>, FloatingArrowStyleProps>, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("@floating-ui/react").FloatingArrowProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>, keyof import("react").Component<any, {}, any>>;
|
|
129
|
+
export default SharedFloatingArrow;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Alert } from './Alert';
|
|
2
|
+
export { default as Badge } from './Badge';
|
|
3
|
+
export { default as Popover } from './Popover';
|
|
4
|
+
export { default as SeverityBadge } from './SeverityBadge';
|
|
5
|
+
export { default as Tab } from './Tab';
|
|
6
|
+
export { default as Tabs } from './Tabs';
|
|
7
|
+
export { default as Tooltip } from './Tooltip';
|
|
8
|
+
export { default as VerificationStatusIcon } from './VerificationStatusIcon';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as S from './ActionButton.styled';
|
|
3
|
+
type ActionButtonOwnProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Icon element – e.g: `icon={<SvgAddCircle />}`
|
|
6
|
+
*/
|
|
7
|
+
icon: React.ReactElement<any>;
|
|
8
|
+
/**
|
|
9
|
+
* Disable the action button
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Locks the hover state of the `ActionButton` – this prop only affects the visual appearance of the
|
|
14
|
+
* `ActionButton`
|
|
15
|
+
*/
|
|
16
|
+
active?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* On-click effect for the action button
|
|
19
|
+
*/
|
|
20
|
+
onClick?: (...args: any[]) => any;
|
|
21
|
+
/**
|
|
22
|
+
* Color of the button background as an array of [darkThemeColor, lightThemeColor]
|
|
23
|
+
*/
|
|
24
|
+
backgroundColors?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Width and Height of the Action Button [50, 50]
|
|
27
|
+
*/
|
|
28
|
+
actionWidthHeight?: any[];
|
|
29
|
+
/**
|
|
30
|
+
*Use shadow for the action button
|
|
31
|
+
*/
|
|
32
|
+
useShadow?: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* An action button.
|
|
36
|
+
*
|
|
37
|
+
* ### Import
|
|
38
|
+
*
|
|
39
|
+
* ``` js
|
|
40
|
+
* import { ActionButton } from '@ntbjs/react-components/inputs'
|
|
41
|
+
* // or
|
|
42
|
+
* import ActionButton from '@ntbjs/react-components/inputs/ActionButton'
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* ### Props
|
|
46
|
+
* ```
|
|
47
|
+
* Pass `icon={<svg></svg>}` to display an icon.
|
|
48
|
+
* Pass `disabled={true}` to disable the button.
|
|
49
|
+
* Pass `active={true}` to lock the hover state of the button.
|
|
50
|
+
* Pass `onClick={() => {}}` to add an on-click effect.
|
|
51
|
+
* Pass `backgroundColors={[#ffffff, #000000]}` to set the background color of the button
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare const ActionButton: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, S.ActionButtonStyleProps>, never>, "ref">, keyof ActionButtonOwnProps> & ActionButtonOwnProps & React.RefAttributes<any>>;
|
|
55
|
+
export default ActionButton;
|