@ntbjs/react-components 2.0.13 → 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 -120
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -285
- 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
|
@@ -7,137 +7,82 @@ const shouldForwardProp = prop => {
|
|
|
7
7
|
};
|
|
8
8
|
const SummaryCard = styled.div.withConfig({
|
|
9
9
|
shouldForwardProp
|
|
10
|
-
}).attrs(applyDefaultTheme)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
${props => props.view === 'compact' && css`
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
|
|
17
|
-
`}
|
|
18
|
-
width: ${props => props.width ? `${props.width}px` : '100%'};
|
|
19
|
-
${props => props.view === 'compact' ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('white')) : 'background: transparent'};
|
|
20
|
-
|
|
21
|
-
${props => props.$useBorder ? props.theme.themeProp('border', `1px solid ${props.theme.getColor('gray-500')}`, `1px solid ${props.theme.getColor('gray-300')}`) : null}
|
|
22
|
-
`;
|
|
10
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
11
|
+
displayName: "SummaryCardstyled__SummaryCard",
|
|
12
|
+
componentId: "sc-80dyqg-0"
|
|
13
|
+
})(["display:flex;flex-direction:column;border-radius:4px;", " width:", ";", ";", ""], props => props.view === 'compact' && css(["overflow:hidden;box-shadow:0px 3px 6px rgba(0,0,0,0.16);"]), props => props.width ? `${props.width}px` : '100%', props => props.view === 'compact' ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('white')) : 'background: transparent', props => props.$useBorder ? props.theme.themeProp('border', `1px solid ${props.theme.getColor('gray-500')}`, `1px solid ${props.theme.getColor('gray-300')}`) : null);
|
|
23
14
|
const Gutter = styled.div.withConfig({
|
|
24
15
|
shouldForwardProp
|
|
25
|
-
}).attrs(applyDefaultTheme)
|
|
26
|
-
|
|
16
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
17
|
+
displayName: "SummaryCardstyled__Gutter",
|
|
18
|
+
componentId: "sc-80dyqg-1"
|
|
19
|
+
})(["", " padding-bottom:", "px;"], props => {
|
|
27
20
|
if (props.renderAsMargin) {
|
|
28
|
-
return css
|
|
29
|
-
margin-bottom: ${props.$gutter || 8}px;
|
|
30
|
-
`;
|
|
21
|
+
return css(["margin-bottom:", "px;"], props.$gutter || 8);
|
|
31
22
|
} else {
|
|
32
|
-
return css
|
|
33
|
-
padding-bottom: ${props.$gutter || 8}px;
|
|
34
|
-
`;
|
|
23
|
+
return css(["padding-bottom:", "px;"], props.$gutter || 8);
|
|
35
24
|
}
|
|
36
|
-
}
|
|
37
|
-
padding-bottom: ${props => props.$gutter || 8}px;
|
|
38
|
-
`;
|
|
25
|
+
}, props => props.$gutter || 8);
|
|
39
26
|
const Header = styled.div.withConfig({
|
|
40
27
|
shouldForwardProp
|
|
41
|
-
}).attrs(applyDefaultTheme)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
padding: 0 16px;
|
|
46
|
-
`;
|
|
28
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
29
|
+
displayName: "SummaryCardstyled__Header",
|
|
30
|
+
componentId: "sc-80dyqg-2"
|
|
31
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:0 16px;"]);
|
|
47
32
|
const HeaderLeft = styled.div.withConfig({
|
|
48
33
|
shouldForwardProp
|
|
49
|
-
}).attrs(applyDefaultTheme)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
> * {
|
|
55
|
-
margin-right: 4px;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
34
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
35
|
+
displayName: "SummaryCardstyled__HeaderLeft",
|
|
36
|
+
componentId: "sc-80dyqg-3"
|
|
37
|
+
})(["display:flex;align-items:center;justify-content:flex-start;> *{margin-right:4px;}"]);
|
|
58
38
|
const HeaderRight = styled.div.withConfig({
|
|
59
39
|
shouldForwardProp
|
|
60
|
-
}).attrs(applyDefaultTheme)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
> * {
|
|
66
|
-
margin-left: 4px;
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
40
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
41
|
+
displayName: "SummaryCardstyled__HeaderRight",
|
|
42
|
+
componentId: "sc-80dyqg-4"
|
|
43
|
+
})(["display:flex;align-items:center;justify-content:flex-end;> *{margin-left:4px;}"]);
|
|
69
44
|
const Title = styled.span.withConfig({
|
|
70
45
|
shouldForwardProp
|
|
71
|
-
}).attrs(applyDefaultTheme)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
letter-spacing: 0.28px;
|
|
76
|
-
display: -webkit-box;
|
|
77
|
-
-webkit-line-clamp: 1;
|
|
78
|
-
-webkit-box-orient: vertical;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
text-overflow: ellipsis;
|
|
81
|
-
box-sizing: border-box;
|
|
82
|
-
|
|
83
|
-
${props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))};
|
|
84
|
-
`;
|
|
46
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
47
|
+
displayName: "SummaryCardstyled__Title",
|
|
48
|
+
componentId: "sc-80dyqg-5"
|
|
49
|
+
})(["display:inline-block;padding:0 16px;font:normal normal 500 14px/19px Roboto;letter-spacing:0.28px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;", ";"], props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')));
|
|
85
50
|
const Description = styled.span.withConfig({
|
|
86
51
|
shouldForwardProp
|
|
87
|
-
}).attrs(applyDefaultTheme)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
letter-spacing: 0.24px;
|
|
92
|
-
display: -webkit-box;
|
|
93
|
-
-webkit-line-clamp: 3;
|
|
94
|
-
-webkit-box-orient: vertical;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
text-overflow: ellipsis;
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
overflow-wrap: break-word;
|
|
99
|
-
word-break: break-word;
|
|
100
|
-
|
|
101
|
-
${props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))};
|
|
102
|
-
`;
|
|
52
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
53
|
+
displayName: "SummaryCardstyled__Description",
|
|
54
|
+
componentId: "sc-80dyqg-6"
|
|
55
|
+
})(["padding:0 16px;text-align:left;font:normal normal normal 12px/16px Roboto;letter-spacing:0.24px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;overflow-wrap:break-word;word-break:break-word;", ";"], props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')));
|
|
103
56
|
styled.div.withConfig({
|
|
104
57
|
shouldForwardProp
|
|
105
|
-
}).attrs(applyDefaultTheme)
|
|
58
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
59
|
+
displayName: "SummaryCardstyled__Instruction",
|
|
60
|
+
componentId: "sc-80dyqg-7"
|
|
61
|
+
})([""]);
|
|
106
62
|
const Footer = styled.div.withConfig({
|
|
107
63
|
shouldForwardProp
|
|
108
|
-
}).attrs(applyDefaultTheme)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
padding: 0 16px;
|
|
113
|
-
`;
|
|
64
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
65
|
+
displayName: "SummaryCardstyled__Footer",
|
|
66
|
+
componentId: "sc-80dyqg-8"
|
|
67
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:0 16px;"]);
|
|
114
68
|
const FooterLeft = styled.div.withConfig({
|
|
115
69
|
shouldForwardProp
|
|
116
|
-
}).attrs(applyDefaultTheme)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
> * {
|
|
122
|
-
margin-right: 4px;
|
|
123
|
-
}
|
|
124
|
-
`;
|
|
70
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
71
|
+
displayName: "SummaryCardstyled__FooterLeft",
|
|
72
|
+
componentId: "sc-80dyqg-9"
|
|
73
|
+
})(["display:flex;align-items:center;justify-content:flex-start;> *{margin-right:4px;}"]);
|
|
125
74
|
const FooterRight = styled.div.withConfig({
|
|
126
75
|
shouldForwardProp
|
|
127
|
-
}).attrs(applyDefaultTheme)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
> * {
|
|
133
|
-
margin-left: 4px;
|
|
134
|
-
}
|
|
135
|
-
`;
|
|
76
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
77
|
+
displayName: "SummaryCardstyled__FooterRight",
|
|
78
|
+
componentId: "sc-80dyqg-10"
|
|
79
|
+
})(["display:flex;align-items:center;justify-content:flex-end;> *{margin-left:4px;}"]);
|
|
136
80
|
styled(FloatingArrow).withConfig({
|
|
137
81
|
shouldForwardProp
|
|
138
|
-
}).attrs(applyDefaultTheme)
|
|
139
|
-
|
|
140
|
-
|
|
82
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
83
|
+
displayName: "SummaryCardstyled__StyledFloatingArrow",
|
|
84
|
+
componentId: "sc-80dyqg-11"
|
|
85
|
+
})(["", ""], props => props.theme.themeProp('fill', props.theme.getColor('gray-700'), props.theme.getColor('white')));
|
|
141
86
|
|
|
142
87
|
export { Description, Footer, FooterLeft, FooterRight, Gutter, Header, HeaderLeft, HeaderRight, SummaryCard, Title };
|
|
143
88
|
//# sourceMappingURL=SummaryCard.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryCard.styled.js","sources":["../../../src/components/widgets/SummaryCard/SummaryCard.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { FloatingArrow } from '@floating-ui/react';\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const SummaryCard = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n border-radius: 4px;\n ${props =>\n props.view === 'compact' &&\n css`\n overflow: hidden;\n box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);\n `}\n width: ${props => (props.width ? `${props.width}px` : '100%')};\n ${props =>\n props.view === 'compact'\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('white')\n )\n : 'background: transparent'};\n\n ${props =>\n props.$useBorder\n ? props.theme.themeProp(\n 'border',\n `1px solid ${props.theme.getColor('gray-500')}`,\n `1px solid ${props.theme.getColor('gray-300')}`\n )\n : null}\n`;\n\nexport const Gutter = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props => {\n if (props.renderAsMargin) {\n return css`\n margin-bottom: ${props.$gutter || 8}px;\n `;\n } else {\n return css`\n padding-bottom: ${props.$gutter || 8}px;\n `;\n }\n }}\n padding-bottom: ${props => props.$gutter || 8}px;\n`;\n\nexport const Header = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 16px;\n`;\n\nexport const HeaderLeft = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const HeaderRight = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n\n > * {\n margin-left: 4px;\n }\n`;\n\nexport const Title = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: inline-block;\n padding: 0 16px;\n font: normal normal 500 14px/19px Roboto;\n letter-spacing: 0.28px;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n box-sizing: border-box;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n`;\n\nexport const Description = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n padding: 0 16px;\n text-align: left;\n font: normal normal normal 12px/16px Roboto;\n letter-spacing: 0.24px;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n box-sizing: border-box;\n overflow-wrap: break-word;\n word-break: break-word;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n`;\n\nexport const Instruction = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)``;\n\nexport const Footer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 16px;\n`;\n\nexport const FooterLeft = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const FooterRight = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n\n > * {\n margin-left: 4px;\n }\n`;\n\nexport const StyledFloatingArrow = styled(FloatingArrow)\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp('fill', props.theme.getColor('gray-700'), props.theme.getColor('white'))}\n`;\n"],"names":["shouldForwardProp","prop","startsWith","SummaryCard","styled","div","withConfig","attrs","applyDefaultTheme","props","view","css","width","theme","themeProp","getColor","$useBorder","Gutter","renderAsMargin","$gutter","Header","HeaderLeft","HeaderRight","Title","span","Description","Footer","FooterLeft","FooterRight","FloatingArrow"],"mappings":";;;;AAIA,MAAMA,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,WAAW,GAAGC,MAAM,CAACC,GAAG,CAClCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA,EAAIC,EAAAA,KAAK,IACLA,KAAK,CAACC,IAAI,KAAK,SAAS,IACxBC,GAAG,CAAA;AACP;AACA;AACA,IAAK,CAAA,CAAA;AACL,SAAA,EAAWF,KAAK,IAAKA,KAAK,CAACG,KAAK,GAAG,CAAGH,EAAAA,KAAK,CAACG,KAAK,CAAI,EAAA,CAAA,GAAG,MAAO,CAAA;AAC/D,EAAA,EAAIH,KAAK,IACLA,KAAK,CAACC,IAAI,KAAK,SAAS,GACpBD,KAAK,CAACI,KAAK,CAACC,SAAS,CACnB,YAAY,EACZL,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCN,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,OAAO,CAC9B,CAAC,GACD,yBAAyB,CAAA;AACjC;AACA,EAAA,EAAIN,KAAK,IACLA,KAAK,CAACO,UAAU,GACZP,KAAK,CAACI,KAAK,CAACC,SAAS,CACnB,QAAQ,EACR,CAAA,UAAA,EAAaL,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,CAAE,CAAA,EAC/C,aAAaN,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,UA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;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMoB,WAAW,GAAGxB,MAAM,CAACC,GAAG,CAClCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEkCJ,MAAM,CAACyB,aAAa,CAAC,CACrDvB,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,EAAIC,EAAAA,KAAK,IACLA,KAAK,CAACI,KAAK,CAACC,SAAS,CAAC,MAAM,EAAEL,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAAEN,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAA;AAClG;;;;"}
|
|
1
|
+
{"version":3,"file":"SummaryCard.styled.js","sources":["../../../src/components/widgets/SummaryCard/SummaryCard.styled.ts"],"sourcesContent":["/*\n * $-transient-prop pattern: rules in\n * `src/components/layout/SectionSeparator/SectionSeparator.styled.ts`, derivation and\n * measurements in `scripts/TS-MIGRATION-PLAYBOOK.md` §J.\n */\nimport styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { FloatingArrow } from '@floating-ui/react';\n\n/** The card root, i.e. what `SummaryCard.tsx` passes to `<S.SummaryCard>`. */\nexport interface SummaryCardStyleProps {\n /**\n * `view` — `PropTypes.string`. The template tests `=== 'compact'` twice and treats every\n * other value as the grid view. Left as `string` rather than narrowed to\n * `'compact' | 'grid'`: that is what the published propTypes say, and narrowing it here\n * would invent a contract the component does not have (§E.1 rule 2). Note the asymmetry\n * with `AssetGalleryCompactCard`'s `type`, which IS narrowed — there the propTypes\n * really do declare a closed set.\n *\n * NO `$`, AND THAT IS A DEFECT ALREADY IN THE RENDER BASELINE. A string-valued `view`\n * renders on a `<div>`, so `widgets/SummaryCard` records `<div width=\"300\" view=\"grid\">`\n * and its `#compact` variant records `view=\"compact\"`. Renaming it removes that\n * attribute and MOVES the baseline — C10, §E.4.\n */\n view?: string;\n /**\n * `width` — `PropTypes.number`, px, interpolated as `${props.width}px` with a `100%`\n * fallback, so `number` and not `number | string`.\n *\n * NO `$`, AND ALSO ALREADY IN THE BASELINE: `<div width=\"300\" …>` on the same element.\n * `width` is not a member of `HTMLAttributes<HTMLDivElement>` — hence the declaration —\n * but React recognises and renders it. C10, §E.4.\n */\n width?: number;\n /** `useBorder` — `PropTypes.bool`; the component defaults it to `false`, which is not a\n * default HERE (nothing but `theme` is injected by `applyDefaultTheme`), so it stays\n * optional per §J.5. */\n $useBorder?: boolean;\n}\n\n/**\n * `Gutter`, the spacer component. `SummaryCard.tsx` renders it seven times and passes\n * `$gutter` every time.\n */\ninterface SummaryCardGutterStyleProps {\n /** `$gutter` — px, always a literal (`4`, `8` or `16`) at the seven call sites, so\n * `number`. The `|| 8` fallback is unreachable from inside this library. */\n $gutter?: number;\n /**\n * `renderAsMargin` IS READ AND NEVER PASSED — DECLARED, NOT FIXED.\n *\n * None of the seven `<S.Gutter>` sites passes it and nothing else in `src` constructs\n * this component, so the `if` branch below never runs: `margin-bottom` is never emitted\n * and the `else` branch is what always applies. And the `else` branch is REDUNDANT with\n * the unconditional `padding-bottom` on the line after the block, which emits the same\n * declaration a second time — so today the whole conditional contributes nothing at all.\n *\n * Two separate things to fix, neither of them here: wiring up `renderAsMargin` is a\n * feature, and deleting the dead conditional REMOVES a duplicate declaration from the\n * generated CSS and therefore moves the baseline (§J.8). It also has NO `$`, though\n * that part is harmless: React drops an unrecognised camelCase prop whose value is\n * `true`, so it could not reach the DOM even if it were passed.\n */\n renderAsMargin?: boolean;\n}\n\n/*\n * Single-argument, and it stays that way — peer floor `styled-components: >=5.1.0`, and\n * the two majors disagree on the second parameter. §J.4. `prop` needs the annotation\n * because `withConfig` takes this by reference, so it gets no contextual typing.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const SummaryCard = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<SummaryCardStyleProps>(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n border-radius: 4px;\n ${props =>\n props.view === 'compact' &&\n css`\n overflow: hidden;\n box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);\n `}\n width: ${props => (props.width ? `${props.width}px` : '100%')};\n ${props =>\n props.view === 'compact'\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('white')\n )\n : 'background: transparent'};\n\n ${props =>\n props.$useBorder\n ? props.theme.themeProp(\n 'border',\n `1px solid ${props.theme.getColor('gray-500')}`,\n `1px solid ${props.theme.getColor('gray-300')}`\n )\n : null}\n`;\n\nexport const Gutter = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<SummaryCardGutterStyleProps>(applyDefaultTheme)`\n ${props => {\n if (props.renderAsMargin) {\n return css`\n margin-bottom: ${props.$gutter || 8}px;\n `;\n } else {\n return css`\n padding-bottom: ${props.$gutter || 8}px;\n `;\n }\n }}\n padding-bottom: ${props => props.$gutter || 8}px;\n`;\n\nexport const Header = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 16px;\n`;\n\nexport const HeaderLeft = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const HeaderRight = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n\n > * {\n margin-left: 4px;\n }\n`;\n\nexport const Title = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: inline-block;\n padding: 0 16px;\n font: normal normal 500 14px/19px Roboto;\n letter-spacing: 0.28px;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n box-sizing: border-box;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n`;\n\nexport const Description = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n padding: 0 16px;\n text-align: left;\n font: normal normal normal 12px/16px Roboto;\n letter-spacing: 0.24px;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n box-sizing: border-box;\n overflow-wrap: break-word;\n word-break: break-word;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n`;\n\nexport const Instruction = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)``;\n\nexport const Footer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 16px;\n`;\n\nexport const FooterLeft = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const FooterRight = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n\n > * {\n margin-left: 4px;\n }\n`;\n\nexport const StyledFloatingArrow = styled(FloatingArrow)\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp('fill', props.theme.getColor('gray-700'), props.theme.getColor('white'))}\n`;\n"],"names":["shouldForwardProp","prop","startsWith","SummaryCard","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","view","css","width","theme","themeProp","getColor","$useBorder","Gutter","renderAsMargin","$gutter","Header","HeaderLeft","HeaderRight","Title","span","Description","Footer","FooterLeft","FooterRight","FloatingArrow"],"mappings":";;;;AAuEA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,WAAW,GAAGC,MAAM,CAACC,GAAG,CAClCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAAwBC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,gCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,uDAAA,EAAA,SAAA,EAAA,GAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EAI9CC,KAAK,IACLA,KAAK,CAACC,IAAI,KAAK,SAAS,IACxBC,GAAG,CAAA,CAAA,0DAAA,CAAA,CAGF,EACMF,KAAK,IAAKA,KAAK,CAACG,KAAK,GAAG,GAAGH,KAAK,CAACG,KAAK,CAAA,EAAA,CAAI,GAAG,MAAO,EAC3DH,KAAK,IACLA,KAAK,CAACC,IAAI,KAAK,SAAS,GACpBD,KAAK,CAACI,KAAK,CAACC,SAAS,CACnB,YAAY,EACZL,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCN,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,OAAO,CAC9B,CAAC,GACD,yBAAyB,EAE7BN,KAAK,IACLA,KAAK,CAACO,UAAU,GACZP,KAAK,CAACI,KAAK,CAACC,SAAS,CACnB,QAAQ,EACR,aAAaL,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,CAAA,CAAE,EAC/C,CAAA,UAAA,EAAaN,KAAK,CAACI,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,CAAA,CAC/C,CAAC,GACD,IAAI;AAGL,MAAME,MAAM,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
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "NTBs common front-end design utilities and React components.",
|
|
8
8
|
"main": "./build/index.js",
|
|
9
9
|
"module": "./build/index.js",
|
|
10
|
+
"types": "./types/components/index.d.ts",
|
|
10
11
|
"exports": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"./
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"./
|
|
20
|
-
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./types/components/index.d.ts",
|
|
14
|
+
"default": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./inputs": {
|
|
17
|
+
"types": "./types/components/inputs/index.d.ts",
|
|
18
|
+
"default": "./build/inputs/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./inputs/*": {
|
|
21
|
+
"types": "./types/components/inputs/*/index.d.ts",
|
|
22
|
+
"default": "./build/inputs/*/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./data": {
|
|
25
|
+
"types": "./types/components/data/index.d.ts",
|
|
26
|
+
"default": "./build/data/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./data/*": {
|
|
29
|
+
"types": "./types/components/data/*/index.d.ts",
|
|
30
|
+
"default": "./build/data/*/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./layout": {
|
|
33
|
+
"types": "./types/components/layout/index.d.ts",
|
|
34
|
+
"default": "./build/layout/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./layout/*": {
|
|
37
|
+
"types": "./types/components/layout/*/index.d.ts",
|
|
38
|
+
"default": "./build/layout/*/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./widgets": {
|
|
41
|
+
"types": "./types/components/widgets/index.d.ts",
|
|
42
|
+
"default": "./build/widgets/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./widgets/*": {
|
|
45
|
+
"types": "./types/components/widgets/*/index.d.ts",
|
|
46
|
+
"default": "./build/widgets/*/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./widgets/*/*": {
|
|
49
|
+
"types": "./types/components/widgets/*/*/index.d.ts",
|
|
50
|
+
"default": "./build/widgets/*/*/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./ssr": {
|
|
53
|
+
"types": "./types/ssr/index.d.ts",
|
|
54
|
+
"default": "./build/ssr/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./styles/utils/colors-export": {
|
|
57
|
+
"types": "./styles/utils/colors-export.d.ts",
|
|
58
|
+
"default": "./styles/utils/colors-export.js"
|
|
59
|
+
},
|
|
21
60
|
"./styles/*": "./styles/*",
|
|
22
61
|
"./icons/*": "./icons/*",
|
|
23
62
|
"./build/*": "./build/*"
|
|
24
63
|
},
|
|
25
64
|
"files": [
|
|
26
65
|
"build",
|
|
66
|
+
"types",
|
|
27
67
|
"styles",
|
|
28
68
|
"icons"
|
|
29
69
|
],
|
|
30
70
|
"scripts": {
|
|
31
71
|
"build": "cross-env NODE_ENV=production rollup -c",
|
|
32
|
-
"test": "jest",
|
|
72
|
+
"test": "jest --passWithNoTests",
|
|
33
73
|
"test:watch": "jest --watch",
|
|
74
|
+
"typecheck": "tsc -p tsconfig.check.json",
|
|
75
|
+
"types": "tsc -p tsconfig.json",
|
|
76
|
+
"types:emit": "node scripts/emit-types.cjs",
|
|
77
|
+
"prepack": "npm run types:emit",
|
|
34
78
|
"lint": "eslint .",
|
|
35
79
|
"storybook": "storybook dev -p 6006",
|
|
36
80
|
"storybook:export": "storybook build",
|
|
@@ -50,66 +94,63 @@
|
|
|
50
94
|
"npm": ">=10.0.0"
|
|
51
95
|
},
|
|
52
96
|
"peerDependencies": {
|
|
53
|
-
"react": ">=16.
|
|
54
|
-
"react-dom": ">=16.
|
|
55
|
-
"styled-components": ">=5.
|
|
97
|
+
"react": ">=16.14.0",
|
|
98
|
+
"react-dom": ">=16.14.0",
|
|
99
|
+
"styled-components": ">=5.1.0"
|
|
56
100
|
},
|
|
57
101
|
"devDependencies": {
|
|
58
102
|
"@babel/core": "^7.28.5",
|
|
59
103
|
"@babel/eslint-parser": "^7.13.14",
|
|
60
|
-
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
61
|
-
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
|
|
62
104
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
63
105
|
"@babel/preset-env": "^7.28.5",
|
|
64
106
|
"@babel/preset-react": "^7.28.5",
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@rollup/plugin-
|
|
107
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
108
|
+
"@eslint/js": "^9.39.5",
|
|
109
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
110
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
111
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
68
112
|
"@storybook/addon-docs": "^10.1.11",
|
|
69
113
|
"@storybook/addon-links": "^10.1.11",
|
|
70
|
-
"@storybook/
|
|
114
|
+
"@storybook/cli": "^10.1.11",
|
|
71
115
|
"@storybook/react-webpack5": "^10.1.11",
|
|
72
|
-
"@svgr/rollup": "^
|
|
73
|
-
"@svgr/webpack": "^
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
116
|
+
"@svgr/rollup": "^8.1.0",
|
|
117
|
+
"@svgr/webpack": "^8.1.0",
|
|
118
|
+
"@types/prop-types": "^15.7.12",
|
|
119
|
+
"@typescript-eslint/eslint-plugin": "^8.66.0",
|
|
120
|
+
"@typescript-eslint/parser": "^8.66.0",
|
|
76
121
|
"babel-loader": "^8.1.0",
|
|
77
|
-
"babel-plugin-styled-components": "^
|
|
122
|
+
"babel-plugin-styled-components": "^2.3.0",
|
|
78
123
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
79
124
|
"colors": "^1.4.0",
|
|
80
125
|
"cross-env": "^7.0.3",
|
|
81
|
-
"eslint": "^
|
|
82
|
-
"eslint-plugin-react": "^7.
|
|
126
|
+
"eslint": "^9.39.5",
|
|
127
|
+
"eslint-plugin-react": "^7.35.0",
|
|
128
|
+
"globals": "^17.9.0",
|
|
83
129
|
"identity-obj-proxy": "^3.0.0",
|
|
84
130
|
"jest": "^27.0.4",
|
|
85
|
-
"madge": "^8.0.0",
|
|
86
131
|
"postcss": "^8.3.0",
|
|
87
|
-
"prop-types": "^15.7.2",
|
|
88
132
|
"react": "^19.2.4",
|
|
89
133
|
"react-dom": "^19.2.4",
|
|
90
|
-
"rollup": "^
|
|
134
|
+
"rollup": "^4.62.4",
|
|
91
135
|
"rollup-plugin-copy": "^3.3.0",
|
|
92
136
|
"rollup-plugin-delete": "^2.0.0",
|
|
93
|
-
"rollup-plugin-multi-input": "^1.3.1",
|
|
94
137
|
"rollup-plugin-peer-deps-external": "^2.2.0",
|
|
95
138
|
"rollup-plugin-postcss": "^4.0.2",
|
|
96
|
-
"rollup-plugin-scss": "^2.6.1",
|
|
97
139
|
"rollup-plugin-url": "^3.0.1",
|
|
98
140
|
"sass": "^1.97.2",
|
|
99
141
|
"sass-loader": "^10.1.1",
|
|
100
142
|
"storybook": "^10.1.11",
|
|
101
143
|
"styled-components": "^6.1.19",
|
|
144
|
+
"typescript": "6.0.3",
|
|
102
145
|
"url-loader": "^4.1.1"
|
|
103
146
|
},
|
|
104
147
|
"dependencies": {
|
|
105
148
|
"@floating-ui/react": "^0.26.28",
|
|
106
149
|
"@restart/hooks": "^0.6.2",
|
|
107
|
-
"@storybook/cli": "^10.1.11",
|
|
108
|
-
"@tippyjs/react": "^4.2.6",
|
|
109
150
|
"lodash": "^4.17.21",
|
|
110
151
|
"nanoid": "^3.3.8",
|
|
111
152
|
"polished": "^4.1.3",
|
|
112
|
-
"
|
|
153
|
+
"prop-types": "^15.7.2",
|
|
113
154
|
"react-lazy-load-image-component": "^1.5.1",
|
|
114
155
|
"react-select": "^5.10.2",
|
|
115
156
|
"react-select-async-paginate": "^0.7.11",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-written types for colors-export.js.
|
|
3
|
+
*
|
|
4
|
+
* ============================ WHY BY HAND ================================
|
|
5
|
+
* NEVER DERIVE THIS FROM THE .js WITH `keyof typeof`.
|
|
6
|
+
*
|
|
7
|
+
* It works locally, because the library compiles with `allowJs`. It collapses
|
|
8
|
+
* silently in the consumer, which does not: with no `allowJs`, TypeScript cannot
|
|
9
|
+
* read colors-export.js at all, `keyof typeof colors` degrades to
|
|
10
|
+
* `string | number | symbol` WITH NO DIAGNOSTIC, and `colors[name]` inside a
|
|
11
|
+
* template string then emits TS2731 — an error in OUR file, appearing only in
|
|
12
|
+
* THEIR build. A hand-written .d.ts resolves under every `moduleResolution` mode
|
|
13
|
+
* with or without `allowJs`.
|
|
14
|
+
*
|
|
15
|
+
* The cost is that this is a THIRD hand-maintained copy of the palette, beside
|
|
16
|
+
* src/styles/.config.scss and colors-export.js. That is what
|
|
17
|
+
* `npm run verify:palette` (scripts/ts-migration/verify-palette.cjs) is for: it
|
|
18
|
+
* makes drift a build failure rather than a silent `undefined` at runtime. Add a
|
|
19
|
+
* colour to the .js and this union without the other and the gate names it.
|
|
20
|
+
* =========================================================================
|
|
21
|
+
*
|
|
22
|
+
* src/styles stays .js permanently (playbook §A.1) and rollup copies the whole
|
|
23
|
+
* directory verbatim into the published `styles/` and `build/styles/` trees, so
|
|
24
|
+
* this file ships NEXT TO its .js and
|
|
25
|
+
* `@ntbjs/react-components/styles/utils/colors-export` gains types where it
|
|
26
|
+
* previously resolved none. A `.d.ts` is explicitly allowed by
|
|
27
|
+
* scripts/assert-no-published-typescript.cjs for exactly this reason; a `.ts`
|
|
28
|
+
* there would be raw TypeScript in a published package.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Every registered design-token colour name.
|
|
33
|
+
*
|
|
34
|
+
* `theme.getColor` takes this union, so `getColor('emerald-999')` is a compile
|
|
35
|
+
* error instead of a `throw` from inside a styled template at runtime.
|
|
36
|
+
*/
|
|
37
|
+
export type ColorName =
|
|
38
|
+
| 'orange-600'
|
|
39
|
+
| 'orange-500'
|
|
40
|
+
| 'orange-400'
|
|
41
|
+
| 'emerald-600'
|
|
42
|
+
| 'emerald-500'
|
|
43
|
+
| 'emerald-400'
|
|
44
|
+
| 'emerald-300'
|
|
45
|
+
| 'emerald-200'
|
|
46
|
+
| 'gray-900'
|
|
47
|
+
| 'gray-800'
|
|
48
|
+
| 'gray-700'
|
|
49
|
+
| 'gray-600'
|
|
50
|
+
| 'gray-500'
|
|
51
|
+
| 'gray-400'
|
|
52
|
+
| 'gray-300'
|
|
53
|
+
| 'gray-200'
|
|
54
|
+
| 'gray-100'
|
|
55
|
+
| 'gray-50'
|
|
56
|
+
| 'cercise-500'
|
|
57
|
+
| 'cercise-400'
|
|
58
|
+
| 'cercise-300'
|
|
59
|
+
| 'cercise-200'
|
|
60
|
+
| 'cercise-100'
|
|
61
|
+
| 'red-600'
|
|
62
|
+
| 'red-500'
|
|
63
|
+
| 'red-200'
|
|
64
|
+
| 'brown-500'
|
|
65
|
+
| 'signal-yellow-500'
|
|
66
|
+
| 'signal-yellow-400'
|
|
67
|
+
| 'signal-green-500'
|
|
68
|
+
| 'signal-green-400'
|
|
69
|
+
| 'black'
|
|
70
|
+
| 'white';
|
|
71
|
+
|
|
72
|
+
/** The palette itself: every `ColorName` mapped to a `#rrggbb` string. */
|
|
73
|
+
export declare const colors: Record<ColorName, string>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as S from './Alert.styled';
|
|
3
|
+
type AlertOwnProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Type of alert that will be reflected by the background color of it.
|
|
6
|
+
*/
|
|
7
|
+
type?: 'warning' | 'error' | 'info';
|
|
8
|
+
/**
|
|
9
|
+
* Icon that will be displayed on the left of the alert message.
|
|
10
|
+
*/
|
|
11
|
+
icon?: React.ReactElement<any>;
|
|
12
|
+
/**
|
|
13
|
+
* Alignment of the alert message.
|
|
14
|
+
*/
|
|
15
|
+
align?: 'left' | 'center';
|
|
16
|
+
/**
|
|
17
|
+
* Message that will be displayed on the alert.
|
|
18
|
+
*/
|
|
19
|
+
alertMessage?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Font size of the alert message in pixel.
|
|
22
|
+
*/
|
|
23
|
+
fontSize?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Line height of the alert message in pixel.
|
|
26
|
+
*/
|
|
27
|
+
lineHeight?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Number of lines that will be displayed before the message will be truncated and replaced with ellipsis.
|
|
30
|
+
*/
|
|
31
|
+
lineClamp?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The top and bottom padding of the alert in pixel.
|
|
34
|
+
*/
|
|
35
|
+
verticalPadding?: number;
|
|
36
|
+
/**
|
|
37
|
+
* The left and right padding of the alert in pixel.
|
|
38
|
+
*/
|
|
39
|
+
horizontalPadding?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Custom width of the alert in pixel.
|
|
42
|
+
*/
|
|
43
|
+
width?: number;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Alert display warnings or errors.
|
|
47
|
+
*
|
|
48
|
+
* ### Import
|
|
49
|
+
*
|
|
50
|
+
* ``` js
|
|
51
|
+
* import { Alert } from '@ntbjs/react-components/data'
|
|
52
|
+
* // or
|
|
53
|
+
* import Alert from '@ntbjs/react-components/data/Alert'
|
|
54
|
+
* ```
|
|
55
|
+
* ## Props
|
|
56
|
+
* ```
|
|
57
|
+
* Pass one of `warning`, `error` or `info` to the `type` prop to render the right Alert.
|
|
58
|
+
* Pass `align={left}`or `align={center}` to align content.
|
|
59
|
+
* Pass `icon={<svg></svg>}` to display an icon.
|
|
60
|
+
* Pass `alertMessage={'message'} to display the message
|
|
61
|
+
* Pass `fontSize={number}` to set the font size of the message in pixel
|
|
62
|
+
* Pass `lineHeight={number}` to set the line height of the message in pixel
|
|
63
|
+
* Pass `lineClamp={number}` to set the number of lines before the message will be truncated
|
|
64
|
+
* Pass `verticalPadding={number}` to set the top and bottom padding of the alert in pixel
|
|
65
|
+
* Pass `horizontalPadding={number}` to set the left and right padding of the alert in pixel
|
|
66
|
+
* Pass `width={number}` to set the width of the alert in pixel
|
|
67
|
+
* ```
|
|
68
|
+
* ### Warning / Error / Info
|
|
69
|
+
* ```
|
|
70
|
+
* <Alert type={"warning"} />
|
|
71
|
+
* <Alert type={"error"} />
|
|
72
|
+
* <Alert type={"info"} />
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare const Alert: 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.AlertStyleProps>, never>, "ref">, keyof AlertOwnProps> & AlertOwnProps & React.RefAttributes<any>>;
|
|
76
|
+
export default Alert;
|