@ntbjs/react-components 2.0.14 → 3.0.0-rc.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/README.md +34 -0
- 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 +54 -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 +84 -36
- package/styles/utils/colors-export.d.ts +54 -0
- package/types/components/data/Alert/Alert.d.ts +76 -0
- package/types/components/data/Alert/Alert.styled.d.ts +52 -0
- package/types/components/data/Alert/index.d.ts +1 -0
- package/types/components/data/Badge/Badge.d.ts +120 -0
- package/types/components/data/Badge/Badge.styled.d.ts +33 -0
- package/types/components/data/Badge/index.d.ts +1 -0
- package/types/components/data/Popover/Popover.d.ts +116 -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 +14 -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 +26 -0
- package/types/components/data/Tabs/index.d.ts +1 -0
- package/types/components/data/Tooltip/Tooltip.d.ts +88 -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 +27 -0
- package/types/components/data/VerificationStatusIcon/index.d.ts +1 -0
- package/types/components/data/_shared/FloatingArrow.styled.d.ts +29 -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 +16 -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 +60 -0
- package/types/components/inputs/Button/index.d.ts +1 -0
- package/types/components/inputs/Checkbox/Checkbox.d.ts +83 -0
- package/types/components/inputs/Checkbox/Checkbox.styled.d.ts +29 -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 +104 -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 +34 -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 +42 -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 +13 -0
- package/types/components/inputs/MultiLevelCheckbox/index.d.ts +2 -0
- package/types/components/inputs/MultiLevelCheckbox/types.d.ts +29 -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 +115 -0
- package/types/components/inputs/MultiSelect/MultiSelect.styled.d.ts +34 -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 +16 -0
- package/types/components/inputs/Switch/index.d.ts +1 -0
- package/types/components/inputs/TextArea/TextArea.d.ts +120 -0
- package/types/components/inputs/TextArea/TextArea.styled.d.ts +93 -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 +7 -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 +15 -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 +76 -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 +52 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.d.ts +2 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.d.ts +49 -0
- package/types/components/widgets/AssetGallery/asset.types.d.ts +329 -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 +21 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenu.d.ts +118 -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 +18 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.d.ts +23 -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 +28 -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 +30 -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 +14 -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 +41 -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 +29 -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 +14 -0
- package/types/hooks/useEventListner.d.ts +14 -0
- package/types/hooks/useFloatingPopover.d.ts +161 -0
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/types/hooks/useOnClickOutside.d.ts +13 -0
- package/types/hooks/useTooltipAutoShow.d.ts +31 -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 +54 -0
- package/types/utils/dateTime.d.ts +8 -0
- package/types/utils/defaultTheme.d.ts +95 -0
- package/types/utils/getElementRef.d.ts +2 -0
- package/types/utils/parseTrigger.d.ts +22 -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,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,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared by all three components. Only `VerificationIconWrapper` and `VerificationStatusIcon` read it; on `VerificationStatusColor` it's passed and never read (harmless due to `$`).
|
|
3
|
+
*/
|
|
4
|
+
interface VerificationBackgroundStyleProps {
|
|
5
|
+
/** `background` — `PropTypes.bool`; swaps in the black pill and the light icon colour. */
|
|
6
|
+
$background?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Defect: reads `iconHeight` (never passed); component passes `$iconHeight` which is never read. Icon always 15px, dot scales correctly.
|
|
10
|
+
*/
|
|
11
|
+
export interface VerificationStatusIconStyleProps extends VerificationBackgroundStyleProps {
|
|
12
|
+
/** `iconHeight` — `PropTypes.number`, px. Read, never passed; see the JSDoc above. */
|
|
13
|
+
iconHeight?: number;
|
|
14
|
+
}
|
|
15
|
+
/** Props of `VerificationStatusColor`, the small status dot. */
|
|
16
|
+
interface VerificationStatusColorStyleProps extends VerificationBackgroundStyleProps {
|
|
17
|
+
/** `iconHeight` — `PropTypes.number`, px. This site reads the `$` form, correctly. */
|
|
18
|
+
$iconHeight?: number;
|
|
19
|
+
/**
|
|
20
|
+
* `status` — closed union to catch mistyped names as TS2367 rather than silent branch misfire.
|
|
21
|
+
*/
|
|
22
|
+
$status?: 'verified' | 'pending' | 'rejected' | 'mixed';
|
|
23
|
+
}
|
|
24
|
+
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;
|
|
25
|
+
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;
|
|
26
|
+
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;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './VerificationStatusIcon';
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
export declare const POPOVER_ARROW: {
|
|
12
|
+
readonly width: 26;
|
|
13
|
+
readonly height: 15;
|
|
14
|
+
readonly strokeWidth: 1;
|
|
15
|
+
};
|
|
16
|
+
export declare const TOOLTIP_ARROW: {
|
|
17
|
+
readonly width: 14;
|
|
18
|
+
readonly height: 7;
|
|
19
|
+
readonly strokeWidth: 0;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Props of `SharedFloatingArrow`. data-arrow-surface reaches DOM (rules select on it); theme is declared for .attrs() callback.
|
|
23
|
+
*/
|
|
24
|
+
interface FloatingArrowStyleProps {
|
|
25
|
+
theme?: NtbTheme;
|
|
26
|
+
'data-arrow-surface'?: FloatingArrowSurface;
|
|
27
|
+
}
|
|
28
|
+
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>>;
|
|
29
|
+
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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props of the styled ActionButton. `disabled` is absent: it's a real ButtonHTMLAttributes member.
|
|
3
|
+
*/
|
|
4
|
+
export interface ActionButtonStyleProps {
|
|
5
|
+
/**
|
|
6
|
+
* Width and height `[width, height]` in px. Unguarded array access—needs `?.` when strictNullChecks flips.
|
|
7
|
+
*/
|
|
8
|
+
$actionWidthHeight?: number[];
|
|
9
|
+
/** `backgroundColors` — `PropTypes.arrayOf(PropTypes.string)`, `[dark, light]`. */
|
|
10
|
+
$backgroundColors?: string[];
|
|
11
|
+
/** `active` — `PropTypes.bool`. Locks the hover state. */
|
|
12
|
+
$active?: boolean;
|
|
13
|
+
/** `useShadow` — `PropTypes.bool`. Component defaults it to `false`. */
|
|
14
|
+
$useShadow?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const ActionButton: 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").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, ActionButtonStyleProps>, never>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ActionButton';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as S from './Button.styled';
|
|
3
|
+
type ButtonOwnProps = {
|
|
4
|
+
/**
|
|
5
|
+
* On-click effect for the main button
|
|
6
|
+
*/
|
|
7
|
+
onClickEffect?: (...args: any[]) => any;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the button is a "single action button". For single action buttons,
|
|
10
|
+
* the entire button opens the dropdown menu, not just the arrow.
|
|
11
|
+
*/
|
|
12
|
+
singleAction?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the button must have an active dropdown menu.
|
|
15
|
+
*/
|
|
16
|
+
activeDropdown?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* An array containing nodes of the `ContextMenuItem` component
|
|
19
|
+
*/
|
|
20
|
+
dropdownItems?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the button should be styled as a secondary button
|
|
23
|
+
*/
|
|
24
|
+
secondary?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the button should be styled with borders
|
|
27
|
+
*/
|
|
28
|
+
outlined?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the button should customize the border width
|
|
31
|
+
*/
|
|
32
|
+
border?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the button should be of 100% width
|
|
35
|
+
*/
|
|
36
|
+
block?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Optional icon to be displayed on the left side of the button
|
|
39
|
+
*/
|
|
40
|
+
icon?: React.ReactElement<any>;
|
|
41
|
+
/**
|
|
42
|
+
* Which size variation should be used
|
|
43
|
+
*/
|
|
44
|
+
size?: 'x-small' | 'small' | 'normal' | 'large';
|
|
45
|
+
/**
|
|
46
|
+
* Whether the button should be disabled
|
|
47
|
+
*/
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the button should be initiated in a loading state
|
|
51
|
+
*/
|
|
52
|
+
loading?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Optional custom classnames for the HTML element
|
|
55
|
+
*/
|
|
56
|
+
className?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Main content of the button
|
|
59
|
+
*/
|
|
60
|
+
children: any;
|
|
61
|
+
/**
|
|
62
|
+
* Gap between arrow and text in single action button
|
|
63
|
+
*/
|
|
64
|
+
singleActionGap?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Custom min-width
|
|
67
|
+
*/
|
|
68
|
+
width?: number;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Buttons communicate actions that users can take.
|
|
72
|
+
*
|
|
73
|
+
* ### Import
|
|
74
|
+
*
|
|
75
|
+
* ``` js
|
|
76
|
+
* import { Button } from '@ntbjs/react-components/inputs'
|
|
77
|
+
* // or
|
|
78
|
+
* import Button from '@ntbjs/react-components/inputs/Button'
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare const Button: 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.ButtonStyleProps>, never>, "ref">, keyof ButtonOwnProps> & ButtonOwnProps & React.RefAttributes<any>>;
|
|
82
|
+
export default Button;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type ButtonSize = 'x-small' | 'small' | 'normal' | 'large';
|
|
3
|
+
type DropdownItems = ReactNode;
|
|
4
|
+
export interface ButtonStyleProps {
|
|
5
|
+
$border?: number;
|
|
6
|
+
$secondary?: boolean;
|
|
7
|
+
$outlined?: boolean;
|
|
8
|
+
$dropdownItems?: DropdownItems;
|
|
9
|
+
$block?: boolean;
|
|
10
|
+
size?: ButtonSize;
|
|
11
|
+
$singleaction?: boolean;
|
|
12
|
+
$singleactiongap?: number;
|
|
13
|
+
$width?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const Button: 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").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, ButtonStyleProps>, never>> & string;
|
|
16
|
+
export declare const ButtonContent: 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>>, {
|
|
17
|
+
/** `size` — see `ButtonSize`. Leaks onto this `<div>` too; see there. */
|
|
18
|
+
size?: ButtonSize;
|
|
19
|
+
/** `loadingState` — the component's own state, so `boolean`. */
|
|
20
|
+
$loading?: boolean;
|
|
21
|
+
/** `singleAction` — passed only at the single-action site. */
|
|
22
|
+
$singleaction?: boolean;
|
|
23
|
+
}>, never>> & string;
|
|
24
|
+
export declare const LoadingIndicator: 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>>, {
|
|
25
|
+
$loading?: boolean;
|
|
26
|
+
}>, never>> & string;
|
|
27
|
+
export declare const LoadingIndicatorSvg: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGSVGElement>, import("react").SVGProps<SVGSVGElement>>, never>, never>> & string;
|
|
28
|
+
export declare const LoadingIndicatorSvgCircle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGCircleElement>, import("react").SVGProps<SVGCircleElement>>, never>, never>> & string;
|
|
29
|
+
export declare const ButtonWrapper: 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<HTMLSpanElement>, HTMLSpanElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>, {
|
|
30
|
+
$block?: boolean;
|
|
31
|
+
}>, never>> & string;
|
|
32
|
+
/** The dropdown-state props the three container `<div>`s share. */
|
|
33
|
+
interface DropdownContainerStyleProps {
|
|
34
|
+
/** `activeDropdown` — `PropTypes.bool`, default `false`. */
|
|
35
|
+
$activeDropdown?: boolean;
|
|
36
|
+
/** `dropdownItems` — see `DropdownItems`. */
|
|
37
|
+
$dropdownItems?: DropdownItems;
|
|
38
|
+
}
|
|
39
|
+
export declare const MainButtonWrapper: 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>>, DropdownContainerStyleProps & {
|
|
40
|
+
/** `block` — full-width. */
|
|
41
|
+
$block?: boolean;
|
|
42
|
+
/** `outlined` — suppresses the wrapper background. */
|
|
43
|
+
$outlined?: boolean;
|
|
44
|
+
/** `secondary` — picks the grey background over the emerald one. */
|
|
45
|
+
$secondary?: boolean;
|
|
46
|
+
}>, never>> & string;
|
|
47
|
+
export declare const MainButtonContainer: 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>>, DropdownContainerStyleProps & {
|
|
48
|
+
/** `block` — full-width. */
|
|
49
|
+
$block?: boolean;
|
|
50
|
+
/** DEAD READ, see above. Nothing passes it; `$outlined` is what arrives. */
|
|
51
|
+
outlined?: boolean;
|
|
52
|
+
}>, never>> & string;
|
|
53
|
+
export declare const MainButtonContainerSingle: 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>>, DropdownContainerStyleProps & {
|
|
54
|
+
/** DEAD READ, see above: the single-action layout never applies. */
|
|
55
|
+
$singleaction?: boolean;
|
|
56
|
+
}>, never>> & string;
|
|
57
|
+
export declare const DropdownButtonContainer: 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>>, {
|
|
58
|
+
$singleaction?: boolean;
|
|
59
|
+
}>, never>> & string;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Button';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the checkbox is checked
|
|
5
|
+
*/
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the checkbox should be checked or unchecked by default
|
|
9
|
+
*/
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The checkbox' label
|
|
13
|
+
*/
|
|
14
|
+
label?: string | React.ReactElement<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the checkbox is disabled
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the checkbox is read-only
|
|
21
|
+
*/
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The checkbox' name
|
|
25
|
+
*/
|
|
26
|
+
name?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The checkbox' value
|
|
29
|
+
*/
|
|
30
|
+
value?: string | number;
|
|
31
|
+
/**
|
|
32
|
+
* Description of the checkbox
|
|
33
|
+
*/
|
|
34
|
+
description?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether there's an error. Error message can be passed as a `string` to be displayed below the checkbox.
|
|
37
|
+
*/
|
|
38
|
+
error?: boolean | string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the checkbox is indeterminate. This will display a dash in the checkbox instead of the default checkmark.
|
|
41
|
+
*/
|
|
42
|
+
indeterminate?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Mutes the color of the visual checkbox – Does not mute the label or other parts of the Checkbox
|
|
45
|
+
*/
|
|
46
|
+
muted?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* On-change effect
|
|
49
|
+
*/
|
|
50
|
+
onChange?: (...args: any[]) => any;
|
|
51
|
+
/**
|
|
52
|
+
* On-blur effect
|
|
53
|
+
*/
|
|
54
|
+
onBlur?: (...args: any[]) => any;
|
|
55
|
+
/**
|
|
56
|
+
* Optional class name for the HTML element
|
|
57
|
+
*/
|
|
58
|
+
className?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Optional in-line styling for the HTML element
|
|
61
|
+
*/
|
|
62
|
+
style?: any;
|
|
63
|
+
/**
|
|
64
|
+
* Visual variant. `green` (default) uses emerald fill. `black` uses themed black/white square (24px, rounded), inverted check.
|
|
65
|
+
*/
|
|
66
|
+
variant?: 'green' | 'black';
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Checkboxes allow the user to select one or more items from a set.
|
|
70
|
+
*
|
|
71
|
+
* If you have a single option, avoid using a checkbox and use an on/off switch (`Switch` component) instead.
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
* ### Import
|
|
75
|
+
*
|
|
76
|
+
* ``` js
|
|
77
|
+
* import { Checkbox } from '@ntbjs/react-components/inputs'
|
|
78
|
+
* // or
|
|
79
|
+
* import Checkbox from '@ntbjs/react-components/inputs/Checkbox'
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Props & React.RefAttributes<any>>;
|
|
83
|
+
export default Checkbox;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `variant` — `PropTypes.oneOf(['green', 'black'])`, carried as `$variant` by both
|
|
3
|
+
* `Checkbox` and `CheckboxLabel`. Closed on purpose: both templates compare
|
|
4
|
+
* `=== 'black'`, and with a closed union a mistyped variant name is TS2367 rather
|
|
5
|
+
* than a branch that silently never fires.
|
|
6
|
+
*/
|
|
7
|
+
type CheckboxVariant = 'green' | 'black';
|
|
8
|
+
export declare const Checkbox: 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>>, {
|
|
9
|
+
$variant?: CheckboxVariant;
|
|
10
|
+
}>, never>> & string;
|
|
11
|
+
export declare const CheckIcon: 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;
|
|
12
|
+
export declare const IndeterminateCheckIcon: 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;
|
|
13
|
+
interface CheckboxLabelStyleProps {
|
|
14
|
+
/** `muted` — fades the checkbox box. Leaks to DOM. */
|
|
15
|
+
muted?: boolean;
|
|
16
|
+
/** `readOnly` — leaks to DOM. */
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
/** `disabled` — leaks to DOM. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** `variant` — closed union, properly transient. */
|
|
21
|
+
$variant?: CheckboxVariant;
|
|
22
|
+
}
|
|
23
|
+
export declare const CheckboxLabel: 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").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>>, CheckboxLabelStyleProps>, never>> & string;
|
|
24
|
+
export declare const CheckboxVisualLabel: 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;
|
|
25
|
+
export declare const Description: 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<HTMLParagraphElement>, HTMLParagraphElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, {
|
|
26
|
+
/** `error` — narrowed to `boolean` after `hasError` derivation. */
|
|
27
|
+
$error?: boolean;
|
|
28
|
+
}>, never>> & string;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Checkbox';
|