@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
|
@@ -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.
|
|
1
|
+
{"version":3,"file":"SummaryCard.styled.js","sources":["../../../src/components/widgets/SummaryCard/SummaryCard.styled.ts"],"sourcesContent":["// $-prefixed props are transient and never reach the DOM.\nimport styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { FloatingArrow } from '@floating-ui/react';\n\n/** Card root props; what `SummaryCard.tsx` passes to `<S.SummaryCard>`. */\nexport interface SummaryCardStyleProps {\n /** `view` as string (not narrowed to 'compact'|'grid'); NO `$` to preserve existing DOM baseline. */\n view?: string;\n /** `width` as number (px); NO `$` to preserve existing DOM baseline. */\n width?: number;\n /** `useBorder` — optional here even though component defaults to false. */\n $useBorder?: boolean;\n}\n\n/** Gutter spacer component; rendered seven times by `SummaryCard.tsx`. */\ninterface SummaryCardGutterStyleProps {\n /** `$gutter` — always a literal (4, 8, or 16) at the call sites; number. */\n $gutter?: number;\n /** `renderAsMargin` — read but never passed; conditional here is dead code. */\n renderAsMargin?: boolean;\n}\n\n// Single-argument (styled-components 5 compat); prop needs annotation because withConfig takes by reference.\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":"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"}
|
package/package.json
CHANGED
|
@@ -1,36 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntbjs/react-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-rc.2",
|
|
4
4
|
"publishConfig": {
|
|
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",
|
|
78
|
+
"verify:visual:baseline": "node scripts/visual-gate/ensure-storybook.cjs && playwright test --update-snapshots",
|
|
79
|
+
"verify:visual:compare": "node scripts/visual-gate/compare.cjs",
|
|
34
80
|
"lint": "eslint .",
|
|
35
81
|
"storybook": "storybook dev -p 6006",
|
|
36
82
|
"storybook:export": "storybook build",
|
|
@@ -50,66 +96,68 @@
|
|
|
50
96
|
"npm": ">=10.0.0"
|
|
51
97
|
},
|
|
52
98
|
"peerDependencies": {
|
|
53
|
-
"react": ">=16.
|
|
54
|
-
"react-dom": ">=16.
|
|
55
|
-
"styled-components": ">=5.
|
|
99
|
+
"react": ">=16.14.0",
|
|
100
|
+
"react-dom": ">=16.14.0",
|
|
101
|
+
"styled-components": ">=5.1.0"
|
|
56
102
|
},
|
|
57
103
|
"devDependencies": {
|
|
58
104
|
"@babel/core": "^7.28.5",
|
|
59
105
|
"@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
106
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
63
107
|
"@babel/preset-env": "^7.28.5",
|
|
64
108
|
"@babel/preset-react": "^7.28.5",
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
109
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
110
|
+
"@eslint/js": "^9.39.5",
|
|
111
|
+
"@playwright/test": "^1.62.1",
|
|
112
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
113
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
114
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
68
115
|
"@storybook/addon-docs": "^10.1.11",
|
|
69
116
|
"@storybook/addon-links": "^10.1.11",
|
|
70
|
-
"@storybook/
|
|
117
|
+
"@storybook/cli": "^10.1.11",
|
|
71
118
|
"@storybook/react-webpack5": "^10.1.11",
|
|
72
|
-
"@svgr/rollup": "^
|
|
73
|
-
"@svgr/webpack": "^
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
119
|
+
"@svgr/rollup": "^8.1.0",
|
|
120
|
+
"@svgr/webpack": "^8.1.0",
|
|
121
|
+
"@types/prop-types": "^15.7.12",
|
|
122
|
+
"@typescript-eslint/eslint-plugin": "^8.66.0",
|
|
123
|
+
"@typescript-eslint/parser": "^8.66.0",
|
|
76
124
|
"babel-loader": "^8.1.0",
|
|
77
|
-
"babel-plugin-styled-components": "^
|
|
125
|
+
"babel-plugin-styled-components": "^2.3.0",
|
|
78
126
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
79
127
|
"colors": "^1.4.0",
|
|
80
128
|
"cross-env": "^7.0.3",
|
|
81
|
-
"
|
|
82
|
-
"eslint
|
|
129
|
+
"esbuild": "^0.27.7",
|
|
130
|
+
"eslint": "^9.39.5",
|
|
131
|
+
"eslint-plugin-react": "^7.35.0",
|
|
132
|
+
"globals": "^17.9.0",
|
|
83
133
|
"identity-obj-proxy": "^3.0.0",
|
|
84
134
|
"jest": "^27.0.4",
|
|
85
|
-
"
|
|
135
|
+
"jsdom": "^16.7.0",
|
|
86
136
|
"postcss": "^8.3.0",
|
|
87
|
-
"prop-types": "^15.7.2",
|
|
88
137
|
"react": "^19.2.4",
|
|
89
138
|
"react-dom": "^19.2.4",
|
|
90
|
-
"rollup": "^
|
|
139
|
+
"rollup": "^4.62.4",
|
|
91
140
|
"rollup-plugin-copy": "^3.3.0",
|
|
92
141
|
"rollup-plugin-delete": "^2.0.0",
|
|
93
|
-
"rollup-plugin-multi-input": "^1.3.1",
|
|
94
142
|
"rollup-plugin-peer-deps-external": "^2.2.0",
|
|
95
143
|
"rollup-plugin-postcss": "^4.0.2",
|
|
96
|
-
"rollup-plugin-scss": "^2.6.1",
|
|
97
144
|
"rollup-plugin-url": "^3.0.1",
|
|
98
145
|
"sass": "^1.97.2",
|
|
99
146
|
"sass-loader": "^10.1.1",
|
|
100
147
|
"storybook": "^10.1.11",
|
|
101
148
|
"styled-components": "^6.1.19",
|
|
149
|
+
"ts-migrate-plugins": "0.1.35",
|
|
150
|
+
"ts-migrate-server": "0.1.33",
|
|
151
|
+
"typescript": "6.0.3",
|
|
102
152
|
"url-loader": "^4.1.1"
|
|
103
153
|
},
|
|
104
154
|
"dependencies": {
|
|
105
155
|
"@floating-ui/react": "^0.26.28",
|
|
106
156
|
"@restart/hooks": "^0.6.2",
|
|
107
|
-
"@storybook/cli": "^10.1.11",
|
|
108
|
-
"@tippyjs/react": "^4.2.6",
|
|
109
157
|
"lodash": "^4.17.21",
|
|
110
158
|
"nanoid": "^3.3.8",
|
|
111
159
|
"polished": "^4.1.3",
|
|
112
|
-
"
|
|
160
|
+
"prop-types": "^15.7.2",
|
|
113
161
|
"react-lazy-load-image-component": "^1.5.1",
|
|
114
162
|
"react-select": "^5.10.2",
|
|
115
163
|
"react-select-async-paginate": "^0.7.11",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-written types for colors-export.js.
|
|
3
|
+
*
|
|
4
|
+
* Do not derive this from the .js with `keyof typeof`: it works here because the library
|
|
5
|
+
* compiles with `allowJs`, but a consumer without it degrades the key to
|
|
6
|
+
* `string | number | symbol` silently and then emits TS2731 in their build, not ours.
|
|
7
|
+
* The cost is a third hand-maintained copy of the palette beside .config.scss and
|
|
8
|
+
* colors-export.js, so drift is caught by a build gate rather than at runtime.
|
|
9
|
+
* It must stay a `.d.ts` — a `.ts` would ship raw TypeScript in the published package.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Every registered design-token colour name.
|
|
14
|
+
*
|
|
15
|
+
* `theme.getColor` takes this union, so `getColor('emerald-999')` is a compile
|
|
16
|
+
* error instead of a `throw` from inside a styled template at runtime.
|
|
17
|
+
*/
|
|
18
|
+
export type ColorName =
|
|
19
|
+
| 'orange-600'
|
|
20
|
+
| 'orange-500'
|
|
21
|
+
| 'orange-400'
|
|
22
|
+
| 'emerald-600'
|
|
23
|
+
| 'emerald-500'
|
|
24
|
+
| 'emerald-400'
|
|
25
|
+
| 'emerald-300'
|
|
26
|
+
| 'emerald-200'
|
|
27
|
+
| 'gray-900'
|
|
28
|
+
| 'gray-800'
|
|
29
|
+
| 'gray-700'
|
|
30
|
+
| 'gray-600'
|
|
31
|
+
| 'gray-500'
|
|
32
|
+
| 'gray-400'
|
|
33
|
+
| 'gray-300'
|
|
34
|
+
| 'gray-200'
|
|
35
|
+
| 'gray-100'
|
|
36
|
+
| 'gray-50'
|
|
37
|
+
| 'cercise-500'
|
|
38
|
+
| 'cercise-400'
|
|
39
|
+
| 'cercise-300'
|
|
40
|
+
| 'cercise-200'
|
|
41
|
+
| 'cercise-100'
|
|
42
|
+
| 'red-600'
|
|
43
|
+
| 'red-500'
|
|
44
|
+
| 'red-200'
|
|
45
|
+
| 'brown-500'
|
|
46
|
+
| 'signal-yellow-500'
|
|
47
|
+
| 'signal-yellow-400'
|
|
48
|
+
| 'signal-green-500'
|
|
49
|
+
| 'signal-green-400'
|
|
50
|
+
| 'black'
|
|
51
|
+
| 'white';
|
|
52
|
+
|
|
53
|
+
/** The palette itself: every `ColorName` mapped to a `#rrggbb` string. */
|
|
54
|
+
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;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props of the `Alert` root, i.e. what `Alert.tsx` passes to `S.Alert`. Value types come
|
|
3
|
+
* from that file's propTypes; all optional.
|
|
4
|
+
*/
|
|
5
|
+
export interface AlertStyleProps {
|
|
6
|
+
/** `isWarning` — derived in the component from `type === 'warning'`, so `boolean`. */
|
|
7
|
+
$warning?: boolean;
|
|
8
|
+
/** `isError` — derived from `type === 'error'`. */
|
|
9
|
+
$error?: boolean;
|
|
10
|
+
/** `isInfo` — derived; the component initialises it `true`. */
|
|
11
|
+
$info?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* `verticalPadding` — `PropTypes.number`, px. `number` and not `number | string`: the
|
|
14
|
+
* template interpolates `${…}px`, so a string would already emit `padding: 17pxpx`.
|
|
15
|
+
*/
|
|
16
|
+
$verticalPadding?: number;
|
|
17
|
+
/** `horizontalPadding` — `PropTypes.number`, px, interpolated the same way. */
|
|
18
|
+
$horizontalPadding?: number;
|
|
19
|
+
/**
|
|
20
|
+
* `alertMessage` — `PropTypes.string`. Component passes it; nothing reads it. Harmless; `$` filters it.
|
|
21
|
+
*/
|
|
22
|
+
$alertMessage?: string;
|
|
23
|
+
/**
|
|
24
|
+
* `align` — `PropTypes.oneOf(['left', 'center'])`. Defect: component passes `$align`; template reads plain `align` instead. No-op; every Alert is left-aligned.
|
|
25
|
+
*/
|
|
26
|
+
$align?: 'left' | 'center';
|
|
27
|
+
/**
|
|
28
|
+
* `width` — `PropTypes.number`, px. Defect: no `$` means it leaks to DOM as invalid `width="480"` attribute.
|
|
29
|
+
*/
|
|
30
|
+
width?: number;
|
|
31
|
+
/**
|
|
32
|
+
* `align` in its non-`$` form — read but never passed; comparison always false.
|
|
33
|
+
*/
|
|
34
|
+
align?: 'left' | 'center';
|
|
35
|
+
}
|
|
36
|
+
/** Props of `AlertRender`, i.e. what `Alert.tsx` passes to `S.AlertRender`. */
|
|
37
|
+
interface AlertRenderStyleProps {
|
|
38
|
+
/** `lineHeight` — `PropTypes.number`, px, interpolated as `${…}px`. */
|
|
39
|
+
$lineHeight?: number;
|
|
40
|
+
/**
|
|
41
|
+
* `lineClamp` — `PropTypes.number`, the `-webkit-line-clamp` count. The component
|
|
42
|
+
* defaults it to `0`, which is falsy, so the clamp block is opt-in.
|
|
43
|
+
*/
|
|
44
|
+
$lineClamp?: number;
|
|
45
|
+
/**
|
|
46
|
+
* `fontSize` — `PropTypes.number`, px. Defect: no `$` means it leaks to DOM as `font-size="12"` attribute.
|
|
47
|
+
*/
|
|
48
|
+
fontSize?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare const Alert: 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>>, AlertStyleProps>, never>> & string;
|
|
51
|
+
export declare const AlertRender: 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>>, AlertRenderStyleProps>, never>> & string;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Alert';
|