@ntbjs/react-components 2.0.14 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/build/data/Alert/Alert.js +18 -33
- package/build/data/Alert/Alert.js.map +1 -1
- package/build/data/Alert/Alert.styled.js +9 -47
- package/build/data/Alert/Alert.styled.js.map +1 -1
- package/build/data/Badge/Badge.js +36 -61
- package/build/data/Badge/Badge.js.map +1 -1
- package/build/data/Badge/Badge.styled.js +21 -70
- package/build/data/Badge/Badge.styled.js.map +1 -1
- package/build/data/Popover/Popover.js +125 -71
- package/build/data/Popover/Popover.js.map +1 -1
- package/build/data/Popover/Popover.styled.js +10 -140
- package/build/data/Popover/Popover.styled.js.map +1 -1
- package/build/data/SeverityBadge/SeverityBadge.js +13 -22
- package/build/data/SeverityBadge/SeverityBadge.js.map +1 -1
- package/build/data/SeverityBadge/index.js +2 -0
- package/build/data/SeverityBadge/index.js.map +1 -0
- package/build/data/Tab/Tab.js +7 -13
- package/build/data/Tab/Tab.js.map +1 -1
- package/build/data/Tab/Tab.styled.js +4 -7
- package/build/data/Tab/Tab.styled.js.map +1 -1
- package/build/data/Tabs/Tabs.js +30 -32
- package/build/data/Tabs/Tabs.js.map +1 -1
- package/build/data/Tabs/Tabs.styled.js +21 -57
- package/build/data/Tabs/Tabs.styled.js.map +1 -1
- package/build/data/Tooltip/Tooltip.js +102 -33
- package/build/data/Tooltip/Tooltip.js.map +1 -1
- package/build/data/Tooltip/Tooltip.styled.js +9 -22
- package/build/data/Tooltip/Tooltip.styled.js.map +1 -1
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.js +16 -23
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.js.map +1 -1
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +13 -31
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js.map +1 -1
- package/build/data/VerificationStatusIcon/index.js +2 -0
- package/build/data/VerificationStatusIcon/index.js.map +1 -0
- package/build/data/_shared/FloatingArrow.styled.js +30 -0
- package/build/data/_shared/FloatingArrow.styled.js.map +1 -0
- package/build/hooks/useEventListner.js.map +1 -1
- package/build/hooks/useFloatingPopover.js +187 -0
- package/build/hooks/useFloatingPopover.js.map +1 -0
- package/build/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/build/hooks/useOnClickOutside.js.map +1 -1
- package/build/hooks/useTooltipAutoShow.js.map +1 -1
- package/build/icons/arrow-back.svg.js +3 -3
- package/build/icons/arrow-back.svg.js.map +1 -1
- package/build/icons/arrow-forward.svg.js +4 -4
- package/build/icons/arrow-forward.svg.js.map +1 -1
- package/build/icons/check-rectangle-filled.svg.js +3 -3
- package/build/icons/check-rectangle-filled.svg.js.map +1 -1
- package/build/icons/close.svg.js +3 -3
- package/build/icons/close.svg.js.map +1 -1
- package/build/icons/edit-note.svg.js +3 -3
- package/build/icons/edit-note.svg.js.map +1 -1
- package/build/icons/expand-more.svg.js +3 -3
- package/build/icons/expand-more.svg.js.map +1 -1
- package/build/icons/headset.svg.js +3 -3
- package/build/icons/headset.svg.js.map +1 -1
- package/build/icons/layers.svg.js +3 -3
- package/build/icons/layers.svg.js.map +1 -1
- package/build/icons/link.svg.js +3 -3
- package/build/icons/link.svg.js.map +1 -1
- package/build/icons/play.svg.js +3 -3
- package/build/icons/play.svg.js.map +1 -1
- package/build/icons/search.svg.js +3 -3
- package/build/icons/search.svg.js.map +1 -1
- package/build/icons/star-filled.svg.js +3 -3
- package/build/icons/star-filled.svg.js.map +1 -1
- package/build/icons/star.svg.js +3 -3
- package/build/icons/star.svg.js.map +1 -1
- package/build/icons/triangle-right.svg.js +3 -3
- package/build/icons/triangle-right.svg.js.map +1 -1
- package/build/icons/verification.svg.js +3 -3
- package/build/icons/verification.svg.js.map +1 -1
- package/build/icons/warning-circle.svg.js +3 -3
- package/build/icons/warning-circle.svg.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.js +11 -22
- package/build/inputs/ActionButton/ActionButton.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.styled.js +5 -54
- package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
- package/build/inputs/Button/Button.js +125 -121
- package/build/inputs/Button/Button.js.map +1 -1
- package/build/inputs/Button/Button.styled.js +42 -260
- package/build/inputs/Button/Button.styled.js.map +1 -1
- package/build/inputs/Checkbox/Checkbox.js +45 -61
- package/build/inputs/Checkbox/Checkbox.js.map +1 -1
- package/build/inputs/Checkbox/Checkbox.styled.js +24 -153
- package/build/inputs/Checkbox/Checkbox.styled.js.map +1 -1
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +106 -111
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js.map +1 -1
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +88 -273
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js.map +1 -1
- package/build/inputs/CompactStarRating/CompactStarRating.js +56 -77
- package/build/inputs/CompactStarRating/CompactStarRating.js.map +1 -1
- package/build/inputs/CompactStarRating/CompactStarRating.styled.js +32 -211
- package/build/inputs/CompactStarRating/CompactStarRating.styled.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.js +86 -105
- package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js +55 -258
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +70 -77
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +28 -60
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/types.js +12 -12
- package/build/inputs/MultiLevelCheckbox/types.js.map +1 -1
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +69 -73
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +44 -87
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.js +69 -79
- package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.styled.js +70 -76
- package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
- package/build/inputs/Radio/Radio.js +20 -33
- package/build/inputs/Radio/Radio.js.map +1 -1
- package/build/inputs/Radio/Radio.styled.js +15 -96
- package/build/inputs/Radio/Radio.styled.js.map +1 -1
- package/build/inputs/Switch/Switch.js +28 -40
- package/build/inputs/Switch/Switch.js.map +1 -1
- package/build/inputs/Switch/Switch.styled.js +24 -94
- package/build/inputs/Switch/Switch.styled.js.map +1 -1
- package/build/inputs/TextArea/TextArea.js +98 -123
- package/build/inputs/TextArea/TextArea.js.map +1 -1
- package/build/inputs/TextArea/TextArea.styled.js +64 -379
- package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
- package/build/inputs/TextInput/TextInput.js +59 -79
- package/build/inputs/TextInput/TextInput.js.map +1 -1
- package/build/inputs/TextInput/TextInput.styled.js +33 -224
- package/build/inputs/TextInput/TextInput.styled.js.map +1 -1
- package/build/layout/InputGroup/InputGroup.js +6 -9
- package/build/layout/InputGroup/InputGroup.js.map +1 -1
- package/build/layout/InputGroup/InputGroup.styled.js +4 -3
- package/build/layout/InputGroup/InputGroup.styled.js.map +1 -1
- package/build/layout/InputGroup/index.js +2 -0
- package/build/layout/InputGroup/index.js.map +1 -0
- package/build/layout/SectionSeparator/SectionSeparator.js +5 -9
- package/build/layout/SectionSeparator/SectionSeparator.js.map +1 -1
- package/build/layout/SectionSeparator/SectionSeparator.styled.js +4 -8
- package/build/layout/SectionSeparator/SectionSeparator.styled.js.map +1 -1
- package/build/styles/utils/colors-export.d.ts +54 -0
- package/build/styles/utils/colors-export.js.map +1 -1
- package/build/utils/dateTime.js.map +1 -1
- package/build/utils/defaultTheme.js +14 -28
- package/build/utils/defaultTheme.js.map +1 -1
- package/build/utils/getElementRef.js +14 -0
- package/build/utils/getElementRef.js.map +1 -0
- package/build/utils/parseTrigger.js +16 -0
- package/build/utils/parseTrigger.js.map +1 -0
- package/build/widgets/AssetAction/AssetAction.js +26 -33
- package/build/widgets/AssetAction/AssetAction.js.map +1 -1
- package/build/widgets/AssetAction/AssetAction.styled.js +20 -34
- package/build/widgets/AssetAction/AssetAction.styled.js.map +1 -1
- package/build/widgets/AssetActionsBase/AssetActionsBase.js +8 -13
- package/build/widgets/AssetActionsBase/AssetActionsBase.js.map +1 -1
- package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js +4 -9
- package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGallery.js +15 -40
- package/build/widgets/AssetGallery/AssetGallery.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +55 -70
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -24
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +146 -122
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -286
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +170 -125
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +135 -364
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +20 -21
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js.map +1 -1
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +20 -71
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenu.js +12 -11
- package/build/widgets/ContextMenu/ContextMenu.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenu.styled.js +4 -4
- package/build/widgets/ContextMenu/ContextMenu.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +17 -25
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -71
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +7 -11
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +4 -11
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js.map +1 -1
- package/build/widgets/InfoCard/InfoCard.js +26 -21
- package/build/widgets/InfoCard/InfoCard.js.map +1 -1
- package/build/widgets/InfoCard/InfoCard.styled.js +36 -84
- package/build/widgets/InfoCard/InfoCard.styled.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js +28 -34
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js +21 -57
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/index.js +2 -0
- package/build/widgets/InstructionSeverityDisplay/index.js.map +1 -0
- package/build/widgets/Instructions/Instructions.js +53 -95
- package/build/widgets/Instructions/Instructions.js.map +1 -1
- package/build/widgets/Instructions/Instructions.styled.js +27 -26
- package/build/widgets/Instructions/Instructions.styled.js.map +1 -1
- package/build/widgets/ProgressBar/ProgressBar.js +39 -37
- package/build/widgets/ProgressBar/ProgressBar.js.map +1 -1
- package/build/widgets/ProgressBar/ProgressBar.styled.js +56 -125
- package/build/widgets/ProgressBar/ProgressBar.styled.js.map +1 -1
- package/build/widgets/SummaryCard/SummaryCard.js +55 -64
- package/build/widgets/SummaryCard/SummaryCard.js.map +1 -1
- package/build/widgets/SummaryCard/SummaryCard.styled.js +51 -106
- package/build/widgets/SummaryCard/SummaryCard.styled.js.map +1 -1
- package/package.json +84 -36
- package/styles/utils/colors-export.d.ts +54 -0
- package/types/components/data/Alert/Alert.d.ts +76 -0
- package/types/components/data/Alert/Alert.styled.d.ts +52 -0
- package/types/components/data/Alert/index.d.ts +1 -0
- package/types/components/data/Badge/Badge.d.ts +120 -0
- package/types/components/data/Badge/Badge.styled.d.ts +33 -0
- package/types/components/data/Badge/index.d.ts +1 -0
- package/types/components/data/Popover/Popover.d.ts +116 -0
- package/types/components/data/Popover/Popover.styled.d.ts +15 -0
- package/types/components/data/Popover/index.d.ts +1 -0
- package/types/components/data/SeverityBadge/SeverityBadge.d.ts +72 -0
- package/types/components/data/SeverityBadge/index.d.ts +1 -0
- package/types/components/data/Tab/Tab.d.ts +14 -0
- package/types/components/data/Tab/Tab.styled.d.ts +1 -0
- package/types/components/data/Tab/index.d.ts +1 -0
- package/types/components/data/Tabs/Tabs.d.ts +111 -0
- package/types/components/data/Tabs/Tabs.styled.d.ts +26 -0
- package/types/components/data/Tabs/index.d.ts +1 -0
- package/types/components/data/Tooltip/Tooltip.d.ts +88 -0
- package/types/components/data/Tooltip/Tooltip.styled.d.ts +8 -0
- package/types/components/data/Tooltip/index.d.ts +1 -0
- package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.d.ts +35 -0
- package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.d.ts +27 -0
- package/types/components/data/VerificationStatusIcon/index.d.ts +1 -0
- package/types/components/data/_shared/FloatingArrow.styled.d.ts +29 -0
- package/types/components/data/index.d.ts +8 -0
- package/types/components/index.d.ts +3 -0
- package/types/components/inputs/ActionButton/ActionButton.d.ts +55 -0
- package/types/components/inputs/ActionButton/ActionButton.styled.d.ts +16 -0
- package/types/components/inputs/ActionButton/index.d.ts +1 -0
- package/types/components/inputs/Button/Button.d.ts +82 -0
- package/types/components/inputs/Button/Button.styled.d.ts +60 -0
- package/types/components/inputs/Button/index.d.ts +1 -0
- package/types/components/inputs/Checkbox/Checkbox.d.ts +83 -0
- package/types/components/inputs/Checkbox/Checkbox.styled.d.ts +29 -0
- package/types/components/inputs/Checkbox/index.d.ts +1 -0
- package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.d.ts +242 -0
- package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.d.ts +104 -0
- package/types/components/inputs/CompactAutocompleteSelect/index.d.ts +1 -0
- package/types/components/inputs/CompactStarRating/CompactStarRating.d.ts +96 -0
- package/types/components/inputs/CompactStarRating/CompactStarRating.styled.d.ts +34 -0
- package/types/components/inputs/CompactStarRating/index.d.ts +1 -0
- package/types/components/inputs/CompactTextInput/CompactTextInput.d.ts +116 -0
- package/types/components/inputs/CompactTextInput/CompactTextInput.styled.d.ts +42 -0
- package/types/components/inputs/CompactTextInput/index.d.ts +1 -0
- package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.d.ts +41 -0
- package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.d.ts +13 -0
- package/types/components/inputs/MultiLevelCheckbox/index.d.ts +2 -0
- package/types/components/inputs/MultiLevelCheckbox/types.d.ts +29 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.d.ts +44 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.d.ts +11 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/index.d.ts +1 -0
- package/types/components/inputs/MultiSelect/MultiSelect.d.ts +115 -0
- package/types/components/inputs/MultiSelect/MultiSelect.styled.d.ts +34 -0
- package/types/components/inputs/MultiSelect/index.d.ts +1 -0
- package/types/components/inputs/Radio/Radio.d.ts +65 -0
- package/types/components/inputs/Radio/Radio.styled.d.ts +11 -0
- package/types/components/inputs/Radio/index.d.ts +1 -0
- package/types/components/inputs/Switch/Switch.d.ts +62 -0
- package/types/components/inputs/Switch/Switch.styled.d.ts +16 -0
- package/types/components/inputs/Switch/index.d.ts +1 -0
- package/types/components/inputs/TextArea/TextArea.d.ts +120 -0
- package/types/components/inputs/TextArea/TextArea.styled.d.ts +93 -0
- package/types/components/inputs/TextArea/index.d.ts +1 -0
- package/types/components/inputs/TextInput/TextInput.d.ts +109 -0
- package/types/components/inputs/TextInput/TextInput.styled.d.ts +43 -0
- package/types/components/inputs/TextInput/index.d.ts +1 -0
- package/types/components/inputs/index.d.ts +13 -0
- package/types/components/layout/InputGroup/InputGroup.d.ts +31 -0
- package/types/components/layout/InputGroup/InputGroup.styled.d.ts +1 -0
- package/types/components/layout/InputGroup/index.d.ts +1 -0
- package/types/components/layout/SectionSeparator/SectionSeparator.d.ts +28 -0
- package/types/components/layout/SectionSeparator/SectionSeparator.styled.d.ts +7 -0
- package/types/components/layout/SectionSeparator/index.d.ts +1 -0
- package/types/components/layout/index.d.ts +2 -0
- package/types/components/widgets/AssetAction/AssetAction.d.ts +16 -0
- package/types/components/widgets/AssetAction/AssetAction.styled.d.ts +15 -0
- package/types/components/widgets/AssetAction/index.d.ts +1 -0
- package/types/components/widgets/AssetActionsBase/AssetActionsBase.d.ts +25 -0
- package/types/components/widgets/AssetActionsBase/AssetActionsBase.styled.d.ts +1 -0
- package/types/components/widgets/AssetActionsBase/index.d.ts +1 -0
- package/types/components/widgets/AssetGallery/AssetGallery.d.ts +170 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.d.ts +76 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.d.ts +3 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.d.ts +3 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.d.ts +52 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.d.ts +2 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.d.ts +49 -0
- package/types/components/widgets/AssetGallery/asset.types.d.ts +329 -0
- package/types/components/widgets/AssetGallery/index.d.ts +1 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.d.ts +60 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.d.ts +21 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenu.d.ts +118 -0
- package/types/components/widgets/ContextMenu/ContextMenu.styled.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.d.ts +45 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.d.ts +18 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.d.ts +23 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/index.d.ts +1 -0
- package/types/components/widgets/InfoCard/InfoCard.d.ts +33 -0
- package/types/components/widgets/InfoCard/InfoCard.styled.d.ts +28 -0
- package/types/components/widgets/InfoCard/index.d.ts +1 -0
- package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.d.ts +46 -0
- package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.d.ts +30 -0
- package/types/components/widgets/InstructionSeverityDisplay/index.d.ts +1 -0
- package/types/components/widgets/Instructions/Instructions.d.ts +156 -0
- package/types/components/widgets/Instructions/Instructions.styled.d.ts +14 -0
- package/types/components/widgets/Instructions/index.d.ts +1 -0
- package/types/components/widgets/ProgressBar/ProgressBar.d.ts +30 -0
- package/types/components/widgets/ProgressBar/ProgressBar.styled.d.ts +41 -0
- package/types/components/widgets/ProgressBar/index.d.ts +1 -0
- package/types/components/widgets/SummaryCard/SummaryCard.d.ts +83 -0
- package/types/components/widgets/SummaryCard/SummaryCard.styled.d.ts +29 -0
- package/types/components/widgets/SummaryCard/index.d.ts +1 -0
- package/types/components/widgets/index.d.ts +11 -0
- package/types/hooks/useElementSize.d.ts +14 -0
- package/types/hooks/useEventListner.d.ts +14 -0
- package/types/hooks/useFloatingPopover.d.ts +161 -0
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/types/hooks/useOnClickOutside.d.ts +13 -0
- package/types/hooks/useTooltipAutoShow.d.ts +31 -0
- package/types/icons/index.d.ts +41 -0
- package/types/ssr/index.d.ts +1 -0
- package/types/styles/utils/colors-export.d.ts +54 -0
- package/types/utils/dateTime.d.ts +8 -0
- package/types/utils/defaultTheme.d.ts +95 -0
- package/types/utils/getElementRef.d.ts +2 -0
- package/types/utils/parseTrigger.d.ts +22 -0
- package/build/_virtual/_rollupPluginBabelHelpers.js +0 -12
- package/build/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/build/widgets/AssetGallery/asset.propType.js +0 -56
- package/build/widgets/AssetGallery/asset.propType.js.map +0 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { useInteractions, useTransitionStyles } from '@floating-ui/react';
|
|
2
|
+
import type { Middleware, OpenChangeReason, Placement, UseClickProps, UseDismissProps, UseFloatingReturn, UseFocusProps, UseHoverProps, UseTransitionStylesProps } from '@floating-ui/react';
|
|
3
|
+
export declare const DEFAULT_ARROW_HEIGHT = 15;
|
|
4
|
+
export type PopoverPlacement = Placement | AutoPlacement;
|
|
5
|
+
export type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';
|
|
6
|
+
export type PopperOffset = readonly [skidding: number, distance: number];
|
|
7
|
+
/** What `useFloatingPopover` accepts. Every member is optional. */
|
|
8
|
+
export interface UseFloatingPopoverOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Preferred placement, in the shared Popper/Floating UI vocabulary. `auto`,
|
|
11
|
+
* `auto-start` and `auto-end` swap `flip()` for `autoPlacement()`.
|
|
12
|
+
*
|
|
13
|
+
* @default 'bottom'
|
|
14
|
+
*/
|
|
15
|
+
placement?: PopoverPlacement;
|
|
16
|
+
/**
|
|
17
|
+
* Controlled open state — our `visible` prop. `undefined` (the default) means
|
|
18
|
+
* UNCONTROLLED: the hook owns the state and the parsed `trigger` drives it. Any
|
|
19
|
+
* boolean, INCLUDING `false`, means controlled and turns the trigger Hooks off;
|
|
20
|
+
* see rule 1 in the file header.
|
|
21
|
+
*/
|
|
22
|
+
open?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Called on every open-state change, controlled or not, with Floating UI's
|
|
25
|
+
* `reason`. `reason === 'outside-press'` is what `Popover`'s `onClickOutside`
|
|
26
|
+
* prop maps onto.
|
|
27
|
+
*/
|
|
28
|
+
onOpenChange?: (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
|
|
29
|
+
/**
|
|
30
|
+
* tippy's `trigger` space-string, e.g. `'click focus'`, `'mouseenter'`, `''`.
|
|
31
|
+
* `undefined` means tippy's default (`'mouseenter focus'`) and `''` means no
|
|
32
|
+
* triggers at all — `parseTrigger` owns both rules and documents where `''` is
|
|
33
|
+
* used in the consumers.
|
|
34
|
+
*/
|
|
35
|
+
trigger?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* `[skidding, distance]` where distance is the arrow-tip gap (see `DEFAULT_ARROW_HEIGHT`).
|
|
38
|
+
* Skidding maps to Floating UI's `crossAxis` (no sign flip for `-end` placements).
|
|
39
|
+
* @default [0, 0]
|
|
40
|
+
*/
|
|
41
|
+
offset?: PopperOffset;
|
|
42
|
+
/**
|
|
43
|
+
* Whether an arrow is rendered. The hook does not render it — it only adds the
|
|
44
|
+
* `arrow()` middleware, exposes `arrowRef`, and adds `arrowHeight` to the
|
|
45
|
+
* main-axis offset.
|
|
46
|
+
*
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
arrow?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Height in px of the arrow the caller renders, i.e. how far it protrudes from
|
|
52
|
+
* the floating element. Only read when `arrow` is `true`.
|
|
53
|
+
*
|
|
54
|
+
* @default DEFAULT_ARROW_HEIGHT (15 — the popover arrow; see its derivation)
|
|
55
|
+
*/
|
|
56
|
+
arrowHeight?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Pointer can travel from reference to floating element without closing.
|
|
59
|
+
* Also determines `pointerEvents` in the return value.
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
interactive?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* tippy's `disabled`: can never open. Forces the resolved open state to `false`
|
|
65
|
+
* and disables every interaction Hook (rule 2 in the file header).
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Transition duration in ms — our `duration` prop, fed to
|
|
72
|
+
* `useTransitionStyles`. tippy's own default is the asymmetric `[300, 250]`;
|
|
73
|
+
* both our components default it to `350`, so there is no default here and the
|
|
74
|
+
* caller states it.
|
|
75
|
+
*/
|
|
76
|
+
duration?: UseTransitionStylesProps['duration'];
|
|
77
|
+
/**
|
|
78
|
+
* Overrides for the transition. `initial` defaults to a placement-aware
|
|
79
|
+
* reproduction of tippy's `animation="shift-away-subtle"`, which both
|
|
80
|
+
* components hardcode.
|
|
81
|
+
*/
|
|
82
|
+
transition?: Omit<UseTransitionStylesProps, 'duration'>;
|
|
83
|
+
/**
|
|
84
|
+
* `useDismiss` overrides. Defaults match tippy: `outsidePress: true`,
|
|
85
|
+
* `referencePress: false`, `escapeKey: false`. `enabled` is `!disabled`.
|
|
86
|
+
*/
|
|
87
|
+
dismiss?: Omit<UseDismissProps, 'enabled'>;
|
|
88
|
+
/** `useHover` overrides, e.g. `restMs`. `enabled` and `handleClose` are owned here. */
|
|
89
|
+
hover?: Omit<UseHoverProps, 'enabled' | 'handleClose'>;
|
|
90
|
+
/** `useClick` overrides. `enabled` is owned here. */
|
|
91
|
+
click?: Omit<UseClickProps, 'enabled'>;
|
|
92
|
+
/**
|
|
93
|
+
* `useFocus` overrides. `visibleOnly` defaults to `false` (not Floating UI's `true`)
|
|
94
|
+
* to match tippy's plain focusin listener without :focus-visible test.
|
|
95
|
+
*/
|
|
96
|
+
focus?: Omit<UseFocusProps, 'enabled'>;
|
|
97
|
+
/**
|
|
98
|
+
* Cap floating element height to available space. Opt-in; only Popover uses it.
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
constrainHeight?: boolean;
|
|
102
|
+
/** `padding` for the height cap. @default 10, from the modifier it replaces */
|
|
103
|
+
maxHeightPadding?: number;
|
|
104
|
+
/** `padding` for `flip()` / `shift()`. @default 5 */
|
|
105
|
+
collisionPadding?: number;
|
|
106
|
+
/**
|
|
107
|
+
* `FloatingTree` node id, for nested context-menu submenus. Passed straight to
|
|
108
|
+
* `useFloating`; unused until the `contextMenuSublevel` work (plan C5).
|
|
109
|
+
*/
|
|
110
|
+
nodeId?: string;
|
|
111
|
+
/** Extra middleware, appended last. */
|
|
112
|
+
middleware?: Middleware[];
|
|
113
|
+
}
|
|
114
|
+
/** What `useFloatingPopover` returns. */
|
|
115
|
+
export interface UseFloatingPopoverReturn {
|
|
116
|
+
/** `refs.setReference` / `refs.setFloating`, straight from `useFloating`. */
|
|
117
|
+
refs: UseFloatingReturn['refs'];
|
|
118
|
+
/** Absolute-position styles for the floating element. */
|
|
119
|
+
floatingStyles: UseFloatingReturn['floatingStyles'];
|
|
120
|
+
/** The Floating UI context — needed by `FloatingArrow`, `FloatingPortal`, `FloatingTree`. */
|
|
121
|
+
context: UseFloatingReturn['context'];
|
|
122
|
+
/** Spread onto the reference element. */
|
|
123
|
+
getReferenceProps: ReturnType<typeof useInteractions>['getReferenceProps'];
|
|
124
|
+
/** Spread onto the floating element. */
|
|
125
|
+
getFloatingProps: ReturnType<typeof useInteractions>['getFloatingProps'];
|
|
126
|
+
/** `true` while the element should be in the DOM, including during the close transition. */
|
|
127
|
+
isMounted: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* The transition styles for the current phase. Named `transitionStyles` and not
|
|
130
|
+
* `styles` so a call site cannot confuse it with `floatingStyles` — the two are
|
|
131
|
+
* applied to different elements (position on the outer, transition on the
|
|
132
|
+
* inner) in all three existing implementations.
|
|
133
|
+
*/
|
|
134
|
+
transitionStyles: ReturnType<typeof useTransitionStyles>['styles'];
|
|
135
|
+
/** Attach to the rendered arrow. Already wired into the `arrow()` middleware. */
|
|
136
|
+
arrowRef: React.MutableRefObject<SVGSVGElement | null>;
|
|
137
|
+
/** The resolved open state, after `disabled` and controlled/uncontrolled resolution. */
|
|
138
|
+
isOpen: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Imperative open/close, honouring controlled mode by reporting through
|
|
141
|
+
* `onOpenChange`. This is what replaces the `_tippy.hide()` + `[data-tippy-root]`
|
|
142
|
+
* DOM sweep in `Popover.tsx`'s `handleContextMenuItemClick`.
|
|
143
|
+
*/
|
|
144
|
+
setOpen: (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
|
|
145
|
+
/** The placement actually used after `flip()` / `autoPlacement()` resolved it. */
|
|
146
|
+
placement: Placement;
|
|
147
|
+
/**
|
|
148
|
+
* `'none'` when `interactive` is `false`, otherwise `undefined`. tippy sets
|
|
149
|
+
* `pointer-events: none` on the popper root of a non-interactive instance; the
|
|
150
|
+
* hook reports the value rather than applying it, because which element carries
|
|
151
|
+
* it differs per call site.
|
|
152
|
+
*/
|
|
153
|
+
pointerEvents: 'none' | undefined;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Positions and drives one floating element.
|
|
157
|
+
*
|
|
158
|
+
* @param options see `UseFloatingPopoverOptions`; every member is optional
|
|
159
|
+
*/
|
|
160
|
+
export declare function useFloatingPopover(options?: UseFloatingPopoverOptions): UseFloatingPopoverReturn;
|
|
161
|
+
export default useFloatingPopover;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DomEventMap } from './useEventListner';
|
|
2
|
+
import type { RefObject } from 'react';
|
|
3
|
+
export type OutsideClickEventName = 'mousedown' | 'mouseup' | 'click';
|
|
4
|
+
export type OutsideClickEvent = DomEventMap[OutsideClickEventName];
|
|
5
|
+
/**
|
|
6
|
+
* Fires handler on pointer events outside ref (and its descendants).
|
|
7
|
+
* Ref is nullable — the runtime contract checks ref?.current.
|
|
8
|
+
*
|
|
9
|
+
* @param ref the "inside" element; clicks on it or descendants are ignored
|
|
10
|
+
* @param handler called only for outside clicks
|
|
11
|
+
* @param mouseEvent event to listen for; defaults to `'mousedown'` (before focus moves)
|
|
12
|
+
*/
|
|
13
|
+
export declare function useOnClickOutside<T extends Node = HTMLElement>(ref: RefObject<T | null> | null | undefined, handler: (event: OutsideClickEvent) => void, mouseEvent?: OutsideClickEventName): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `useTooltipAutoShow` returns. Spread straight onto a `Tooltip` by
|
|
3
|
+
* `TextArea` and `CompactTextInput`.
|
|
4
|
+
*/
|
|
5
|
+
export interface TooltipAutoShow {
|
|
6
|
+
/** Clears the forced-visible state. Wire to the trigger's `onMouseLeave`. */
|
|
7
|
+
toolTipOnMouseLeave: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* The last non-empty content. Sticky on purpose, so the tooltip can animate
|
|
10
|
+
* out with its text intact instead of emptying mid-transition.
|
|
11
|
+
*/
|
|
12
|
+
toolTipContent: string;
|
|
13
|
+
/** `true` while there is no content, which suppresses the tooltip entirely. */
|
|
14
|
+
toolTipDisabled: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* `true | undefined`, never `false`. Any boolean (including `false`) switches
|
|
17
|
+
* to controlled mode and disables hover triggering. `undefined` means uncontrolled;
|
|
18
|
+
* `true` means force-visible. This contract is checked by `useFloatingPopover`
|
|
19
|
+
* with `typeof open === 'boolean'`.
|
|
20
|
+
*/
|
|
21
|
+
toolTipVisible: true | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Tracks tooltip content and forces visibility when content transitions from
|
|
25
|
+
* empty → non-empty, then defaults to trigger prop.
|
|
26
|
+
*
|
|
27
|
+
* @param content the tooltip text. `string`, not `ReactNode`, because both call sites
|
|
28
|
+
* use it with an empty-string default.
|
|
29
|
+
*/
|
|
30
|
+
declare function useTooltipAutoShow(content?: string): TooltipAutoShow;
|
|
31
|
+
export default useTooltipAutoShow;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactComponent as AddIcon } from './add.svg';
|
|
2
|
+
import { ReactComponent as AddCircleIcon } from './add-circle.svg';
|
|
3
|
+
import { ReactComponent as AlbumIcon } from './album.svg';
|
|
4
|
+
import { ReactComponent as ArrowBackIcon } from './arrow-back.svg';
|
|
5
|
+
import { ReactComponent as ArrowDropDownIcon } from './arrow-drop-down.svg';
|
|
6
|
+
import { ReactComponent as ArrowForwardIcon } from './arrow-forward.svg';
|
|
7
|
+
import { ReactComponent as AudioIcon } from './audio.svg';
|
|
8
|
+
import { ReactComponent as BellIcon } from './bell.svg';
|
|
9
|
+
import { ReactComponent as CheckCircleIcon } from './check-circle-filled.svg';
|
|
10
|
+
import { ReactComponent as CheckRectangleIcon } from './check-rectangle-filled.svg';
|
|
11
|
+
import { ReactComponent as CloseIcon } from './close.svg';
|
|
12
|
+
import { ReactComponent as CorporateIcon } from './corporate.svg';
|
|
13
|
+
import { ReactComponent as DeleteContextMenuIcon } from './delete-context-menu.svg';
|
|
14
|
+
import { ReactComponent as DeleteIcon } from './delete.svg';
|
|
15
|
+
import { ReactComponent as DesignServicesIcon } from './design-services.svg';
|
|
16
|
+
import { ReactComponent as DownloadIcon } from './download.svg';
|
|
17
|
+
import { ReactComponent as EditNoteIcon } from './edit-note.svg';
|
|
18
|
+
import { ReactComponent as EditIcon } from './edit.svg';
|
|
19
|
+
import { ReactComponent as ExpandMoreIcon } from './expand-more.svg';
|
|
20
|
+
import { ReactComponent as FileIcon } from './file.svg';
|
|
21
|
+
import { ReactComponent as FtpIcon } from './ftp.svg';
|
|
22
|
+
import { ReactComponent as GearIcon } from './gear.svg';
|
|
23
|
+
import { ReactComponent as HeadsetIcon } from './headset.svg';
|
|
24
|
+
import { ReactComponent as LayersIcon } from './layers.svg';
|
|
25
|
+
import { ReactComponent as LibraryAddIcon } from './library-add.svg';
|
|
26
|
+
import { ReactComponent as LinkIcon } from './link.svg';
|
|
27
|
+
import { ReactComponent as PdfIcon } from './pdf.svg';
|
|
28
|
+
import { ReactComponent as PlayIcon } from './play.svg';
|
|
29
|
+
import { ReactComponent as RemoveCircleIcon } from './remove-circle.svg';
|
|
30
|
+
import { ReactComponent as SearchIcon } from './search.svg';
|
|
31
|
+
import { ReactComponent as ShareIcon } from './share.svg';
|
|
32
|
+
import { ReactComponent as ShoppingCartAddIcon } from './shopping_cart_add.svg';
|
|
33
|
+
import { ReactComponent as StarFilledIcon } from './star-filled.svg';
|
|
34
|
+
import { ReactComponent as StarIcon } from './star.svg';
|
|
35
|
+
import { ReactComponent as TriangleRightIcon } from './triangle-right.svg';
|
|
36
|
+
import { ReactComponent as VerificationIcon } from './verification.svg';
|
|
37
|
+
import { ReactComponent as WarningCircleIcon } from './warning-circle.svg';
|
|
38
|
+
import { ReactComponent as WarningTriangleIcon } from './warning-triangle.svg';
|
|
39
|
+
import { ReactComponent as InfoRedIcon } from './info-red.svg';
|
|
40
|
+
import { ReactComponent as InfoYellowIcon } from './info-yellow.svg';
|
|
41
|
+
export { AddIcon, AddCircleIcon, AlbumIcon, ArrowBackIcon, ArrowDropDownIcon, ArrowForwardIcon, AudioIcon, BellIcon, CheckCircleIcon, CheckRectangleIcon, CloseIcon, CorporateIcon, DeleteContextMenuIcon, DeleteIcon, DesignServicesIcon, DownloadIcon, EditNoteIcon, EditIcon, ExpandMoreIcon, FileIcon, FtpIcon, GearIcon, HeadsetIcon, LayersIcon, LibraryAddIcon, LinkIcon, PdfIcon, PlayIcon, RemoveCircleIcon, SearchIcon, ShareIcon, ShoppingCartAddIcon, StarFilledIcon, StarIcon, TriangleRightIcon, VerificationIcon, WarningCircleIcon, WarningTriangleIcon, InfoRedIcon, InfoYellowIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ServerStyleSheet } from "styled-components";
|
|
@@ -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,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert time given in miliseconds to a string representation of hours, minutes and seconds
|
|
3
|
+
* in the format HH:MM:SS
|
|
4
|
+
*
|
|
5
|
+
* Hours are omitted for durations under an hour (result is MM:SS).
|
|
6
|
+
* @param ms duration in milliseconds as number (not string, to avoid NaN)
|
|
7
|
+
*/
|
|
8
|
+
export declare const convertMsToHMS: (ms: number) => string;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { ColorName } from '../styles/utils/colors-export';
|
|
2
|
+
import type { Interpolation, RuleSet } from 'styled-components';
|
|
3
|
+
export type { ColorName };
|
|
4
|
+
export type GetColor = (name: ColorName) => string;
|
|
5
|
+
export type ThemePropValue = Interpolation<object>;
|
|
6
|
+
/**
|
|
7
|
+
* Emits three declarations: body.dark-theme, body.light-theme, and
|
|
8
|
+
* neither-class with prefers-color-scheme fallback, so one property can
|
|
9
|
+
* differ between themes.
|
|
10
|
+
*
|
|
11
|
+
* Two unenforceable conventions that cause visual bugs: (1) Don't call inside
|
|
12
|
+
* `&::after` / `&::before` — generated selector can't address pseudo-elements;
|
|
13
|
+
* write rules explicitly instead. (2) Use static `&[data-x='state']` selectors,
|
|
14
|
+
* not dynamic `${props => css\`\`}` — dynamic rules share componentId, so
|
|
15
|
+
* instances collide.
|
|
16
|
+
*
|
|
17
|
+
* @param property CSS property (e.g. color, background, --custom-prop)
|
|
18
|
+
* @param darkMode value for body.dark-theme
|
|
19
|
+
* @param lightMode value for body.light-theme (also fallback when no class)
|
|
20
|
+
* @param specificity how many `&` to repeat in selector; a number (prevents
|
|
21
|
+
* passing '!important' by mistake)
|
|
22
|
+
*/
|
|
23
|
+
export type ThemeProp = (property: string, darkMode: ThemePropValue, lightMode: ThemePropValue, specificity?: number) => RuleSet<object>;
|
|
24
|
+
export interface ThemeSpacing {
|
|
25
|
+
baseUnit: number;
|
|
26
|
+
controlHeight: number;
|
|
27
|
+
menuGutter: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ThemeColors {
|
|
30
|
+
primary: string;
|
|
31
|
+
primary75: string;
|
|
32
|
+
primary50: string;
|
|
33
|
+
primary25: string;
|
|
34
|
+
danger: string;
|
|
35
|
+
neutral0: string;
|
|
36
|
+
neutral5: string;
|
|
37
|
+
neutral10: string;
|
|
38
|
+
neutral20: string;
|
|
39
|
+
neutral30: string;
|
|
40
|
+
neutral40: string;
|
|
41
|
+
neutral50: string;
|
|
42
|
+
neutral60: string;
|
|
43
|
+
neutral70: string;
|
|
44
|
+
neutral80: string;
|
|
45
|
+
neutral90: string;
|
|
46
|
+
}
|
|
47
|
+
export interface NtbTheme {
|
|
48
|
+
getColor: GetColor;
|
|
49
|
+
primaryFontFamily: string;
|
|
50
|
+
secondaryFontFamily: string;
|
|
51
|
+
themeProp: ThemeProp;
|
|
52
|
+
spacing: ThemeSpacing;
|
|
53
|
+
colors: ThemeColors;
|
|
54
|
+
}
|
|
55
|
+
export type PartialNtbTheme = Partial<NtbTheme>;
|
|
56
|
+
export interface ThemedProps {
|
|
57
|
+
theme?: PartialNtbTheme;
|
|
58
|
+
}
|
|
59
|
+
export declare const defaultTheme: {
|
|
60
|
+
getColor: (name: ColorName) => string;
|
|
61
|
+
primaryFontFamily: string;
|
|
62
|
+
secondaryFontFamily: string;
|
|
63
|
+
themeProp: typeof themeProp;
|
|
64
|
+
spacing: {
|
|
65
|
+
baseUnit: number;
|
|
66
|
+
controlHeight: number;
|
|
67
|
+
menuGutter: number;
|
|
68
|
+
};
|
|
69
|
+
colors: {
|
|
70
|
+
primary: string;
|
|
71
|
+
primary75: string;
|
|
72
|
+
primary50: string;
|
|
73
|
+
primary25: string;
|
|
74
|
+
danger: string;
|
|
75
|
+
neutral0: string;
|
|
76
|
+
neutral5: string;
|
|
77
|
+
neutral10: string;
|
|
78
|
+
neutral20: string;
|
|
79
|
+
neutral30: string;
|
|
80
|
+
neutral40: string;
|
|
81
|
+
neutral50: string;
|
|
82
|
+
neutral60: string;
|
|
83
|
+
neutral70: string;
|
|
84
|
+
neutral80: string;
|
|
85
|
+
neutral90: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
declare function themeProp(property: string, darkMode: ThemePropValue, lightMode: ThemePropValue, specificity?: number): RuleSet<object>;
|
|
89
|
+
export declare function applyDefaultTheme({ theme, ...props }: ThemedProps): {
|
|
90
|
+
theme: NtbTheme;
|
|
91
|
+
};
|
|
92
|
+
declare module 'styled-components' {
|
|
93
|
+
interface DefaultTheme extends NtbTheme {
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ParsedTrigger {
|
|
2
|
+
/** `click` token present → `useClick`. */
|
|
3
|
+
click: boolean;
|
|
4
|
+
/** `mouseenter` token present → `useHover`. */
|
|
5
|
+
hover: boolean;
|
|
6
|
+
/** `focus` or `focusin` token present → `useFocus`. */
|
|
7
|
+
focus: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TIPPY_DEFAULT_TRIGGER = "mouseenter focus";
|
|
10
|
+
/**
|
|
11
|
+
* Parses a tippy trigger string into Floating UI Hook flags.
|
|
12
|
+
*
|
|
13
|
+
* Three inputs are easy to get wrong: `undefined`/`null` → tippy default (hover+focus,
|
|
14
|
+
* NOT "no triggers"); `''` → no triggers (used in sales overlays to conditionally
|
|
15
|
+
* suppress tooltips); filter(Boolean) is load-bearing (empty string splits to ['']
|
|
16
|
+
* which would otherwise be treated as an unrecognised token). Controlled mode is
|
|
17
|
+
* NOT handled here — useFloatingPopover gates the Hooks based on visible.
|
|
18
|
+
*
|
|
19
|
+
* @param trigger tippy's trigger prop; `undefined`/`null` → 'mouseenter focus';
|
|
20
|
+
* `''` → all flags false
|
|
21
|
+
*/
|
|
22
|
+
export declare function parseTrigger(trigger?: string | null): ParsedTrigger;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
3
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
-
var t = arguments[e];
|
|
5
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
6
|
-
}
|
|
7
|
-
return n;
|
|
8
|
-
}, _extends.apply(null, arguments);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { _extends as extends };
|
|
12
|
-
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
|
|
3
|
-
const assetShape = {
|
|
4
|
-
key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
5
|
-
previewUrl: PropTypes.string,
|
|
6
|
-
title: PropTypes.string,
|
|
7
|
-
note: PropTypes.shape({
|
|
8
|
-
icon: PropTypes.element,
|
|
9
|
-
message: PropTypes.string
|
|
10
|
-
}),
|
|
11
|
-
width: PropTypes.number,
|
|
12
|
-
height: PropTypes.number,
|
|
13
|
-
fileType: PropTypes.oneOf(['image', 'video', 'pdf', 'file', 'audio']).isRequired,
|
|
14
|
-
fileTypeIconPosition: PropTypes.oneOf(['top-left', 'top-right']),
|
|
15
|
-
group: PropTypes.string,
|
|
16
|
-
actions: PropTypes.arrayOf(PropTypes.shape({
|
|
17
|
-
title: PropTypes.string.isRequired,
|
|
18
|
-
icon: PropTypes.element.isRequired,
|
|
19
|
-
onClick: PropTypes.func.isRequired,
|
|
20
|
-
className: PropTypes.shape,
|
|
21
|
-
component: PropTypes.func
|
|
22
|
-
})),
|
|
23
|
-
statusIcon: PropTypes.element,
|
|
24
|
-
overlay: PropTypes.element,
|
|
25
|
-
completed: PropTypes.bool,
|
|
26
|
-
hasError: PropTypes.bool,
|
|
27
|
-
disabled: PropTypes.bool,
|
|
28
|
-
onClick: PropTypes.func,
|
|
29
|
-
onContextMenu: PropTypes.func,
|
|
30
|
-
onMouseEnter: PropTypes.func,
|
|
31
|
-
instructionSeverity: PropTypes.oneOf([1, 2, 3, 4, 5]),
|
|
32
|
-
summary: PropTypes.shape({
|
|
33
|
-
title: PropTypes.string,
|
|
34
|
-
description: PropTypes.string,
|
|
35
|
-
instructions: PropTypes.string,
|
|
36
|
-
instructionSeverity: PropTypes.oneOf([1, 2, 3, 4, 5]),
|
|
37
|
-
headerLeft: PropTypes.node,
|
|
38
|
-
headerRight: PropTypes.node,
|
|
39
|
-
footerLeft: PropTypes.node,
|
|
40
|
-
footerRight: PropTypes.node
|
|
41
|
-
})
|
|
42
|
-
};
|
|
43
|
-
const assetShapeWithLayout = {
|
|
44
|
-
...assetShape,
|
|
45
|
-
layout: PropTypes.shape({
|
|
46
|
-
width: PropTypes.number.isRequired,
|
|
47
|
-
height: PropTypes.number.isRequired,
|
|
48
|
-
translateX: PropTypes.number.isRequired,
|
|
49
|
-
translateY: PropTypes.number.isRequired,
|
|
50
|
-
type: PropTypes.oneOf(['groupLabel', 'asset']).isRequired,
|
|
51
|
-
hasHeightAndWidth: PropTypes.bool
|
|
52
|
-
}).isRequired
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export { assetShape, assetShapeWithLayout };
|
|
56
|
-
//# sourceMappingURL=asset.propType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset.propType.js","sources":["../../../src/components/widgets/AssetGallery/asset.propType.js"],"sourcesContent":["import PropTypes from 'prop-types';\n\nexport const assetShape = {\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n previewUrl: PropTypes.string,\n title: PropTypes.string,\n note: PropTypes.shape({\n icon: PropTypes.element,\n message: PropTypes.string\n }),\n width: PropTypes.number,\n height: PropTypes.number,\n fileType: PropTypes.oneOf(['image', 'video', 'pdf', 'file', 'audio']).isRequired,\n fileTypeIconPosition: PropTypes.oneOf(['top-left', 'top-right']),\n group: PropTypes.string,\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n icon: PropTypes.element.isRequired,\n onClick: PropTypes.func.isRequired,\n className: PropTypes.shape,\n component: PropTypes.func\n })\n ),\n statusIcon: PropTypes.element,\n overlay: PropTypes.element,\n completed: PropTypes.bool,\n hasError: PropTypes.bool,\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n onContextMenu: PropTypes.func,\n onMouseEnter: PropTypes.func,\n instructionSeverity: PropTypes.oneOf([1, 2, 3, 4, 5]),\n summary: PropTypes.shape({\n title: PropTypes.string,\n description: PropTypes.string,\n instructions: PropTypes.string,\n instructionSeverity: PropTypes.oneOf([1, 2, 3, 4, 5]),\n headerLeft: PropTypes.node,\n headerRight: PropTypes.node,\n footerLeft: PropTypes.node,\n footerRight: PropTypes.node\n })\n};\n\nexport const assetShapeWithLayout = {\n ...assetShape,\n layout: PropTypes.shape({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n translateX: PropTypes.number.isRequired,\n translateY: PropTypes.number.isRequired,\n type: PropTypes.oneOf(['groupLabel', 'asset']).isRequired,\n hasHeightAndWidth: PropTypes.bool\n }).isRequired\n};\n"],"names":["assetShape","key","PropTypes","oneOfType","string","number","isRequired","previewUrl","title","note","shape","icon","element","message","width","height","fileType","oneOf","fileTypeIconPosition","group","actions","arrayOf","onClick","func","className","component","statusIcon","overlay","completed","bool","hasError","disabled","onContextMenu","onMouseEnter","instructionSeverity","summary","description","instructions","headerLeft","node","headerRight","footerLeft","footerRight","assetShapeWithLayout","layout","translateX","translateY","type","hasHeightAndWidth"],"mappings":"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"}
|