@ntbjs/react-components 2.0.14 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/data/Alert/Alert.js +18 -33
- package/build/data/Alert/Alert.js.map +1 -1
- package/build/data/Alert/Alert.styled.js +9 -47
- package/build/data/Alert/Alert.styled.js.map +1 -1
- package/build/data/Badge/Badge.js +36 -61
- package/build/data/Badge/Badge.js.map +1 -1
- package/build/data/Badge/Badge.styled.js +21 -70
- package/build/data/Badge/Badge.styled.js.map +1 -1
- package/build/data/Popover/Popover.js +125 -71
- package/build/data/Popover/Popover.js.map +1 -1
- package/build/data/Popover/Popover.styled.js +10 -140
- package/build/data/Popover/Popover.styled.js.map +1 -1
- package/build/data/SeverityBadge/SeverityBadge.js +13 -22
- package/build/data/SeverityBadge/SeverityBadge.js.map +1 -1
- package/build/data/SeverityBadge/index.js +2 -0
- package/build/data/SeverityBadge/index.js.map +1 -0
- package/build/data/Tab/Tab.js +7 -13
- package/build/data/Tab/Tab.js.map +1 -1
- package/build/data/Tab/Tab.styled.js +4 -7
- package/build/data/Tab/Tab.styled.js.map +1 -1
- package/build/data/Tabs/Tabs.js +30 -32
- package/build/data/Tabs/Tabs.js.map +1 -1
- package/build/data/Tabs/Tabs.styled.js +21 -57
- package/build/data/Tabs/Tabs.styled.js.map +1 -1
- package/build/data/Tooltip/Tooltip.js +102 -33
- package/build/data/Tooltip/Tooltip.js.map +1 -1
- package/build/data/Tooltip/Tooltip.styled.js +9 -22
- package/build/data/Tooltip/Tooltip.styled.js.map +1 -1
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.js +16 -23
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.js.map +1 -1
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +13 -31
- package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js.map +1 -1
- package/build/data/VerificationStatusIcon/index.js +2 -0
- package/build/data/VerificationStatusIcon/index.js.map +1 -0
- package/build/data/_shared/FloatingArrow.styled.js +30 -0
- package/build/data/_shared/FloatingArrow.styled.js.map +1 -0
- package/build/hooks/useEventListner.js.map +1 -1
- package/build/hooks/useFloatingPopover.js +187 -0
- package/build/hooks/useFloatingPopover.js.map +1 -0
- package/build/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/build/hooks/useOnClickOutside.js.map +1 -1
- package/build/hooks/useTooltipAutoShow.js.map +1 -1
- package/build/icons/arrow-back.svg.js +3 -3
- package/build/icons/arrow-back.svg.js.map +1 -1
- package/build/icons/arrow-forward.svg.js +4 -4
- package/build/icons/arrow-forward.svg.js.map +1 -1
- package/build/icons/check-rectangle-filled.svg.js +3 -3
- package/build/icons/check-rectangle-filled.svg.js.map +1 -1
- package/build/icons/close.svg.js +3 -3
- package/build/icons/close.svg.js.map +1 -1
- package/build/icons/edit-note.svg.js +3 -3
- package/build/icons/edit-note.svg.js.map +1 -1
- package/build/icons/expand-more.svg.js +3 -3
- package/build/icons/expand-more.svg.js.map +1 -1
- package/build/icons/headset.svg.js +3 -3
- package/build/icons/headset.svg.js.map +1 -1
- package/build/icons/layers.svg.js +3 -3
- package/build/icons/layers.svg.js.map +1 -1
- package/build/icons/link.svg.js +3 -3
- package/build/icons/link.svg.js.map +1 -1
- package/build/icons/play.svg.js +3 -3
- package/build/icons/play.svg.js.map +1 -1
- package/build/icons/search.svg.js +3 -3
- package/build/icons/search.svg.js.map +1 -1
- package/build/icons/star-filled.svg.js +3 -3
- package/build/icons/star-filled.svg.js.map +1 -1
- package/build/icons/star.svg.js +3 -3
- package/build/icons/star.svg.js.map +1 -1
- package/build/icons/triangle-right.svg.js +3 -3
- package/build/icons/triangle-right.svg.js.map +1 -1
- package/build/icons/verification.svg.js +3 -3
- package/build/icons/verification.svg.js.map +1 -1
- package/build/icons/warning-circle.svg.js +3 -3
- package/build/icons/warning-circle.svg.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.js +11 -22
- package/build/inputs/ActionButton/ActionButton.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.styled.js +5 -54
- package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
- package/build/inputs/Button/Button.js +125 -121
- package/build/inputs/Button/Button.js.map +1 -1
- package/build/inputs/Button/Button.styled.js +42 -260
- package/build/inputs/Button/Button.styled.js.map +1 -1
- package/build/inputs/Checkbox/Checkbox.js +45 -61
- package/build/inputs/Checkbox/Checkbox.js.map +1 -1
- package/build/inputs/Checkbox/Checkbox.styled.js +24 -153
- package/build/inputs/Checkbox/Checkbox.styled.js.map +1 -1
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +106 -111
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js.map +1 -1
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +88 -273
- package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js.map +1 -1
- package/build/inputs/CompactStarRating/CompactStarRating.js +56 -77
- package/build/inputs/CompactStarRating/CompactStarRating.js.map +1 -1
- package/build/inputs/CompactStarRating/CompactStarRating.styled.js +32 -211
- package/build/inputs/CompactStarRating/CompactStarRating.styled.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.js +86 -105
- package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js +55 -258
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +70 -77
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +28 -60
- package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js.map +1 -1
- package/build/inputs/MultiLevelCheckbox/types.js +12 -12
- package/build/inputs/MultiLevelCheckbox/types.js.map +1 -1
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +69 -73
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +44 -87
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.js +69 -79
- package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.styled.js +70 -76
- package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
- package/build/inputs/Radio/Radio.js +20 -33
- package/build/inputs/Radio/Radio.js.map +1 -1
- package/build/inputs/Radio/Radio.styled.js +15 -96
- package/build/inputs/Radio/Radio.styled.js.map +1 -1
- package/build/inputs/Switch/Switch.js +28 -40
- package/build/inputs/Switch/Switch.js.map +1 -1
- package/build/inputs/Switch/Switch.styled.js +24 -94
- package/build/inputs/Switch/Switch.styled.js.map +1 -1
- package/build/inputs/TextArea/TextArea.js +98 -123
- package/build/inputs/TextArea/TextArea.js.map +1 -1
- package/build/inputs/TextArea/TextArea.styled.js +64 -379
- package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
- package/build/inputs/TextInput/TextInput.js +59 -79
- package/build/inputs/TextInput/TextInput.js.map +1 -1
- package/build/inputs/TextInput/TextInput.styled.js +33 -224
- package/build/inputs/TextInput/TextInput.styled.js.map +1 -1
- package/build/layout/InputGroup/InputGroup.js +6 -9
- package/build/layout/InputGroup/InputGroup.js.map +1 -1
- package/build/layout/InputGroup/InputGroup.styled.js +4 -3
- package/build/layout/InputGroup/InputGroup.styled.js.map +1 -1
- package/build/layout/InputGroup/index.js +2 -0
- package/build/layout/InputGroup/index.js.map +1 -0
- package/build/layout/SectionSeparator/SectionSeparator.js +5 -9
- package/build/layout/SectionSeparator/SectionSeparator.js.map +1 -1
- package/build/layout/SectionSeparator/SectionSeparator.styled.js +4 -8
- package/build/layout/SectionSeparator/SectionSeparator.styled.js.map +1 -1
- package/build/styles/utils/colors-export.d.ts +73 -0
- package/build/styles/utils/colors-export.js.map +1 -1
- package/build/utils/dateTime.js.map +1 -1
- package/build/utils/defaultTheme.js +14 -28
- package/build/utils/defaultTheme.js.map +1 -1
- package/build/utils/getElementRef.js +14 -0
- package/build/utils/getElementRef.js.map +1 -0
- package/build/utils/parseTrigger.js +16 -0
- package/build/utils/parseTrigger.js.map +1 -0
- package/build/widgets/AssetAction/AssetAction.js +26 -33
- package/build/widgets/AssetAction/AssetAction.js.map +1 -1
- package/build/widgets/AssetAction/AssetAction.styled.js +20 -34
- package/build/widgets/AssetAction/AssetAction.styled.js.map +1 -1
- package/build/widgets/AssetActionsBase/AssetActionsBase.js +8 -13
- package/build/widgets/AssetActionsBase/AssetActionsBase.js.map +1 -1
- package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js +4 -9
- package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGallery.js +15 -40
- package/build/widgets/AssetGallery/AssetGallery.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +55 -70
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -24
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +146 -122
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -286
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +170 -125
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +135 -364
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +20 -21
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js.map +1 -1
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +20 -71
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenu.js +12 -11
- package/build/widgets/ContextMenu/ContextMenu.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenu.styled.js +4 -4
- package/build/widgets/ContextMenu/ContextMenu.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +17 -25
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -71
- package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +7 -11
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js.map +1 -1
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +4 -11
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js.map +1 -1
- package/build/widgets/InfoCard/InfoCard.js +26 -21
- package/build/widgets/InfoCard/InfoCard.js.map +1 -1
- package/build/widgets/InfoCard/InfoCard.styled.js +36 -84
- package/build/widgets/InfoCard/InfoCard.styled.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js +28 -34
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js +21 -57
- package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js.map +1 -1
- package/build/widgets/InstructionSeverityDisplay/index.js +2 -0
- package/build/widgets/InstructionSeverityDisplay/index.js.map +1 -0
- package/build/widgets/Instructions/Instructions.js +53 -95
- package/build/widgets/Instructions/Instructions.js.map +1 -1
- package/build/widgets/Instructions/Instructions.styled.js +27 -26
- package/build/widgets/Instructions/Instructions.styled.js.map +1 -1
- package/build/widgets/ProgressBar/ProgressBar.js +39 -37
- package/build/widgets/ProgressBar/ProgressBar.js.map +1 -1
- package/build/widgets/ProgressBar/ProgressBar.styled.js +56 -125
- package/build/widgets/ProgressBar/ProgressBar.styled.js.map +1 -1
- package/build/widgets/SummaryCard/SummaryCard.js +55 -64
- package/build/widgets/SummaryCard/SummaryCard.js.map +1 -1
- package/build/widgets/SummaryCard/SummaryCard.styled.js +51 -106
- package/build/widgets/SummaryCard/SummaryCard.styled.js.map +1 -1
- package/package.json +77 -36
- package/styles/utils/colors-export.d.ts +73 -0
- package/types/components/data/Alert/Alert.d.ts +76 -0
- package/types/components/data/Alert/Alert.styled.d.ts +83 -0
- package/types/components/data/Alert/index.d.ts +1 -0
- package/types/components/data/Badge/Badge.d.ts +128 -0
- package/types/components/data/Badge/Badge.styled.d.ts +132 -0
- package/types/components/data/Badge/index.d.ts +1 -0
- package/types/components/data/Popover/Popover.d.ts +205 -0
- package/types/components/data/Popover/Popover.styled.d.ts +15 -0
- package/types/components/data/Popover/index.d.ts +1 -0
- package/types/components/data/SeverityBadge/SeverityBadge.d.ts +72 -0
- package/types/components/data/SeverityBadge/index.d.ts +1 -0
- package/types/components/data/Tab/Tab.d.ts +27 -0
- package/types/components/data/Tab/Tab.styled.d.ts +1 -0
- package/types/components/data/Tab/index.d.ts +1 -0
- package/types/components/data/Tabs/Tabs.d.ts +111 -0
- package/types/components/data/Tabs/Tabs.styled.d.ts +42 -0
- package/types/components/data/Tabs/index.d.ts +1 -0
- package/types/components/data/Tooltip/Tooltip.d.ts +134 -0
- package/types/components/data/Tooltip/Tooltip.styled.d.ts +8 -0
- package/types/components/data/Tooltip/index.d.ts +1 -0
- package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.d.ts +35 -0
- package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.d.ts +46 -0
- package/types/components/data/VerificationStatusIcon/index.d.ts +1 -0
- package/types/components/data/_shared/FloatingArrow.styled.d.ts +129 -0
- package/types/components/data/index.d.ts +8 -0
- package/types/components/index.d.ts +3 -0
- package/types/components/inputs/ActionButton/ActionButton.d.ts +55 -0
- package/types/components/inputs/ActionButton/ActionButton.styled.d.ts +34 -0
- package/types/components/inputs/ActionButton/index.d.ts +1 -0
- package/types/components/inputs/Button/Button.d.ts +82 -0
- package/types/components/inputs/Button/Button.styled.d.ts +102 -0
- package/types/components/inputs/Button/index.d.ts +1 -0
- package/types/components/inputs/Checkbox/Checkbox.d.ts +92 -0
- package/types/components/inputs/Checkbox/Checkbox.styled.d.ts +33 -0
- package/types/components/inputs/Checkbox/index.d.ts +1 -0
- package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.d.ts +242 -0
- package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.d.ts +157 -0
- package/types/components/inputs/CompactAutocompleteSelect/index.d.ts +1 -0
- package/types/components/inputs/CompactStarRating/CompactStarRating.d.ts +96 -0
- package/types/components/inputs/CompactStarRating/CompactStarRating.styled.d.ts +86 -0
- package/types/components/inputs/CompactStarRating/index.d.ts +1 -0
- package/types/components/inputs/CompactTextInput/CompactTextInput.d.ts +116 -0
- package/types/components/inputs/CompactTextInput/CompactTextInput.styled.d.ts +70 -0
- package/types/components/inputs/CompactTextInput/index.d.ts +1 -0
- package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.d.ts +41 -0
- package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.d.ts +21 -0
- package/types/components/inputs/MultiLevelCheckbox/index.d.ts +2 -0
- package/types/components/inputs/MultiLevelCheckbox/types.d.ts +72 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.d.ts +44 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.d.ts +11 -0
- package/types/components/inputs/MultiLevelCheckboxSelect/index.d.ts +1 -0
- package/types/components/inputs/MultiSelect/MultiSelect.d.ts +172 -0
- package/types/components/inputs/MultiSelect/MultiSelect.styled.d.ts +99 -0
- package/types/components/inputs/MultiSelect/index.d.ts +1 -0
- package/types/components/inputs/Radio/Radio.d.ts +65 -0
- package/types/components/inputs/Radio/Radio.styled.d.ts +11 -0
- package/types/components/inputs/Radio/index.d.ts +1 -0
- package/types/components/inputs/Switch/Switch.d.ts +62 -0
- package/types/components/inputs/Switch/Switch.styled.d.ts +20 -0
- package/types/components/inputs/Switch/index.d.ts +1 -0
- package/types/components/inputs/TextArea/TextArea.d.ts +124 -0
- package/types/components/inputs/TextArea/TextArea.styled.d.ts +95 -0
- package/types/components/inputs/TextArea/index.d.ts +1 -0
- package/types/components/inputs/TextInput/TextInput.d.ts +109 -0
- package/types/components/inputs/TextInput/TextInput.styled.d.ts +43 -0
- package/types/components/inputs/TextInput/index.d.ts +1 -0
- package/types/components/inputs/index.d.ts +13 -0
- package/types/components/layout/InputGroup/InputGroup.d.ts +31 -0
- package/types/components/layout/InputGroup/InputGroup.styled.d.ts +1 -0
- package/types/components/layout/InputGroup/index.d.ts +1 -0
- package/types/components/layout/SectionSeparator/SectionSeparator.d.ts +28 -0
- package/types/components/layout/SectionSeparator/SectionSeparator.styled.d.ts +14 -0
- package/types/components/layout/SectionSeparator/index.d.ts +1 -0
- package/types/components/layout/index.d.ts +2 -0
- package/types/components/widgets/AssetAction/AssetAction.d.ts +16 -0
- package/types/components/widgets/AssetAction/AssetAction.styled.d.ts +20 -0
- package/types/components/widgets/AssetAction/index.d.ts +1 -0
- package/types/components/widgets/AssetActionsBase/AssetActionsBase.d.ts +25 -0
- package/types/components/widgets/AssetActionsBase/AssetActionsBase.styled.d.ts +1 -0
- package/types/components/widgets/AssetActionsBase/index.d.ts +1 -0
- package/types/components/widgets/AssetGallery/AssetGallery.d.ts +170 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.d.ts +88 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.d.ts +3 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.d.ts +3 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.d.ts +100 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.d.ts +2 -0
- package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.d.ts +85 -0
- package/types/components/widgets/AssetGallery/asset.types.d.ts +446 -0
- package/types/components/widgets/AssetGallery/index.d.ts +1 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.d.ts +60 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.d.ts +35 -0
- package/types/components/widgets/AssetPreview/AssetPreviewTopBar/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenu.d.ts +134 -0
- package/types/components/widgets/ContextMenu/ContextMenu.styled.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.d.ts +45 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.d.ts +26 -0
- package/types/components/widgets/ContextMenu/ContextMenuItem/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.d.ts +41 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.d.ts +1 -0
- package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/index.d.ts +1 -0
- package/types/components/widgets/ContextMenu/index.d.ts +1 -0
- package/types/components/widgets/InfoCard/InfoCard.d.ts +33 -0
- package/types/components/widgets/InfoCard/InfoCard.styled.d.ts +45 -0
- package/types/components/widgets/InfoCard/index.d.ts +1 -0
- package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.d.ts +46 -0
- package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.d.ts +40 -0
- package/types/components/widgets/InstructionSeverityDisplay/index.d.ts +1 -0
- package/types/components/widgets/Instructions/Instructions.d.ts +156 -0
- package/types/components/widgets/Instructions/Instructions.styled.d.ts +26 -0
- package/types/components/widgets/Instructions/index.d.ts +1 -0
- package/types/components/widgets/ProgressBar/ProgressBar.d.ts +30 -0
- package/types/components/widgets/ProgressBar/ProgressBar.styled.d.ts +78 -0
- package/types/components/widgets/ProgressBar/index.d.ts +1 -0
- package/types/components/widgets/SummaryCard/SummaryCard.d.ts +83 -0
- package/types/components/widgets/SummaryCard/SummaryCard.styled.d.ts +68 -0
- package/types/components/widgets/SummaryCard/index.d.ts +1 -0
- package/types/components/widgets/index.d.ts +11 -0
- package/types/hooks/useElementSize.d.ts +25 -0
- package/types/hooks/useEventListner.d.ts +46 -0
- package/types/hooks/useFloatingPopover.d.ts +242 -0
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +26 -0
- package/types/hooks/useOnClickOutside.d.ts +31 -0
- package/types/hooks/useTooltipAutoShow.d.ts +80 -0
- package/types/icons/index.d.ts +41 -0
- package/types/ssr/index.d.ts +1 -0
- package/types/styles/utils/colors-export.d.ts +73 -0
- package/types/utils/dateTime.d.ts +13 -0
- package/types/utils/defaultTheme.d.ts +174 -0
- package/types/utils/getElementRef.d.ts +21 -0
- package/types/utils/parseTrigger.d.ts +92 -0
- package/build/_virtual/_rollupPluginBabelHelpers.js +0 -12
- package/build/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/build/widgets/AssetGallery/asset.propType.js +0 -56
- package/build/widgets/AssetGallery/asset.propType.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactTextInput.js","sources":["../../../src/components/inputs/CompactTextInput/CompactTextInput.js"],"sourcesContent":["import { isEmpty, isFunction } from 'lodash';\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\nimport React, { useCallback, useState, useEffect } from 'react';\nimport useTooltipAutoShow from '../../../hooks/useTooltipAutoShow';\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport { ReactComponent as LinkIcon } from '../../../icons/link.svg';\nimport { Tooltip, Popover } from '../../data';\nimport * as S from './CompactTextInput.styled';\n\n// const ConditionalWrapper = ({ condition, wrapper, children }) =>\n// condition ? wrapper(children) : children;\n\n/**\n * Compact text inputs let users enter and edit text in the UI in a compact way. They typically appear in forms or displays of metadata.\n *\n * ### Import\n *\n * ``` js\n * import { CompactTextInput } from '@ntbjs/react-components/inputs'\n * // or\n * import CompactTextInput from '@ntbjs/react-components/inputs/CompactTextInput'\n * ```\n */\nconst CompactTextInput = React.forwardRef(function CompactTextInput(\n {\n label,\n inputType,\n name,\n defaultValue,\n value,\n placeholder,\n link,\n linkTarget,\n linkHandler,\n activeLinkHandler,\n autoSelect,\n readOnly,\n disabled,\n edit,\n type,\n descriptionToolTip,\n bold,\n hidden,\n onChange: onChangeProp,\n onFocus: onFocusProp,\n onBlur: onBlurProp,\n loadingIcon,\n successIcon,\n ...props\n },\n forwardedRef\n) {\n const [uniqueId] = useState(nanoid());\n const [currentValue, setCurrentValue] = useState();\n const [autoFocus, setAutoFocus] = useState(false);\n\n const { toolTipDisabled, toolTipVisible, toolTipOnMouseLeave, toolTipContent } =\n useTooltipAutoShow(descriptionToolTip);\n\n useEffect(() => {\n setCurrentValue(value || defaultValue);\n setAutoFocus(false);\n }, [value, defaultValue]);\n\n const onChange = useCallback(\n event => {\n setCurrentValue(event.target.value);\n\n if (!autoFocus) {\n setAutoFocus(true);\n }\n if (isFunction(onChangeProp)) {\n onChangeProp(event);\n }\n },\n [onChangeProp]\n );\n\n const onFocus = useCallback(\n event => {\n if (autoSelect) {\n event.target.select();\n }\n\n if (isFunction(onFocusProp)) {\n onFocusProp(event);\n }\n },\n [autoSelect, readOnly, onFocusProp]\n );\n\n const onBlur = useCallback(\n event => {\n if (isFunction(onBlurProp)) {\n onBlurProp(event);\n }\n },\n [onBlurProp]\n );\n\n const input = () => {\n return (\n <S.Input\n ref={forwardedRef}\n id={uniqueId}\n key={uniqueId}\n autoFocus={autoFocus}\n inputtype={inputType}\n name={name}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value ?? ''}\n $type={type}\n $bold={bold}\n $haslink={!isEmpty(link)}\n onFocus={onFocus}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n };\n\n if (hidden) return null;\n\n return (\n <S.CompactTextInput {...props}>\n {label && (\n <S.Label htmlFor={uniqueId} disabled={disabled}>\n {label}\n <S.SuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n </S.Label>\n )}\n <S.InputContainer $hasLabel={!isEmpty(label)}>\n {!link && (\n <div onMouseLeave={toolTipOnMouseLeave}>\n <Tooltip\n content={toolTipContent}\n key=\"tooltip1\"\n placement=\"bottom-end\"\n trigger={'mouseenter'}\n disabled={toolTipDisabled}\n zIndex={999999}\n visible={toolTipVisible}\n >\n {input()}\n </Tooltip>\n </div>\n )}\n {link && !readOnly && (\n <div>\n <Popover\n arrow={false}\n content={\n <S.LinkPopoverContainer>\n {activeLinkHandler ? (\n <S.StyledLink\n href={link}\n target={linkTarget}\n onClick={e => {\n if (activeLinkHandler) {\n e.preventDefault();\n linkHandler();\n } else null;\n }}\n rel=\"noreferrer\"\n >\n <LinkIcon />\n {currentValue}\n </S.StyledLink>\n ) : (\n <S.StyledLink href={link} target={linkTarget} rel=\"noreferrer\">\n <LinkIcon />\n {currentValue}\n </S.StyledLink>\n )}\n </S.LinkPopoverContainer>\n }\n key=\"tooltip2\"\n placement=\"bottom-start\"\n trigger=\"focusin\"\n zIndex={999999}\n interactive={true}\n >\n {input()}\n </Popover>\n </div>\n )}\n {link && readOnly && (\n <S.ReadOnlyLinkContainer>\n <S.StyledLink\n href={link}\n rel=\"noreferrer\"\n style={{ display: 'inline-block' }}\n target={linkTarget}\n >\n {currentValue}\n </S.StyledLink>\n </S.ReadOnlyLinkContainer>\n )}\n {!readOnly && !disabled && (\n <>\n <S.InputIconContainer $type={type}>\n <EditNoteIcon />\n </S.InputIconContainer>\n {isEmpty(label) && (\n <S.InputSuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.InputSuccessContainer>\n )}\n </>\n )}\n </S.InputContainer>\n </S.CompactTextInput>\n );\n});\n\nCompactTextInput.propTypes = {\n /**\n * The label of the input field - leave `undefined` to hide the label\n */\n label: PropTypes.string,\n /**\n * Displays a light green background to show that an action was successful.\n */\n success: PropTypes.bool,\n /**\n * The input type - eg. `text`, `number`\n */\n inputType: PropTypes.string,\n /**\n * The input name\n */\n name: PropTypes.string,\n /**\n * The default value of the input - creates an uncontrolled input\n */\n defaultValue: PropTypes.string,\n /**\n * The value of the input - creates a controlled input\n */\n value: PropTypes.string,\n /**\n * The placeholder of the input\n */\n placeholder: PropTypes.string,\n /**\n * A URL associated with the input value. Creates a clickable link that accepts full or relative URL\n */\n link: PropTypes.string,\n /**\n * The target for the link. Only applies when the field is in read-only mode\n */\n linkTarget: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n /**\n * Whether the link has a onClick event.\n */\n linkHandler: PropTypes.func,\n /**\n * Whether the handler should preceed the link behavior.\n */\n activeLinkHandler: PropTypes.bool,\n /**\n * Whether to auto select the entire value when the input is focused – does also work when the field is in read-only mode\n */\n autoSelect: PropTypes.bool,\n /**\n * Whether the value is read only\n */\n readOnly: PropTypes.bool,\n /**\n * Whether the value is disabled\n */\n disabled: PropTypes.bool,\n /**\n * Displays a grey background to show that value is editable\n */\n edit: PropTypes.bool,\n /**\n * There is an error present - 'error be prioritized over warnings if both are set to 'true'.\n */\n // error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n /**\n * There is a warning present.\n */\n warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n /**\n * Whether to bold the input content - Slightly increases the font size and font weight of the input value\n */\n bold: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n /**\n * Callback for `onChange`\n */\n onChange: PropTypes.func,\n /**\n * Callback for `onFocus`\n */\n onFocus: PropTypes.func,\n /**\n * Callback for `onBlur`\n */\n onBlur: PropTypes.func,\n /**\n * Define the type based on error, warning, loading and success.\n */\n type: PropTypes.oneOf(['', 'error', 'warning', 'loading', 'success']),\n /**\n * Description ToolTip text.\n */\n descriptionToolTip: PropTypes.string,\n /**\n * Icon element – E.g: `icon={<Spinner />}`\n */\n loadingIcon: PropTypes.element,\n /**\n * Icon element – E.g: `icon={<Check />}`\n */\n successIcon: PropTypes.element\n};\n\nCompactTextInput.defaultProps = {\n inputType: 'text',\n autoSelect: true,\n linkTarget: '_self',\n bold: false,\n readOnly: false,\n descriptionToolTip: '',\n edit: false,\n hidden: false,\n type: '',\n linkHandler: () => {},\n activeLinkHandler: false,\n onChange: () => {}\n};\n\nexport default CompactTextInput;\n"],"names":["CompactTextInput","React","forwardRef","label","inputType","name","defaultValue","value","placeholder","link","linkTarget","linkHandler","activeLinkHandler","autoSelect","readOnly","disabled","edit","type","descriptionToolTip","bold","hidden","onChange","onChangeProp","onFocus","onFocusProp","onBlur","onBlurProp","loadingIcon","successIcon","props","forwardedRef","uniqueId","useState","nanoid","currentValue","setCurrentValue","autoFocus","setAutoFocus","toolTipDisabled","toolTipVisible","toolTipOnMouseLeave","toolTipContent","useTooltipAutoShow","useEffect","useCallback","event","target","isFunction","select","input","createElement","S","ref","id","key","inputtype","$edit","$type","$bold","$haslink","isEmpty","htmlFor","$hasLabel","onMouseLeave","Tooltip","content","placement","trigger","zIndex","visible","Popover","arrow","href","onClick","e","preventDefault","rel","LinkIcon","interactive","style","display","Fragment","EditNoteIcon","propTypes","process","env","NODE_ENV","PropTypes","string","success","bool","oneOf","func","warning","oneOfType","element","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;AAwBMA,MAAAA,gBAAgB,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,gBAAgBA,CACjE;EACEG,KAAK;EACLC,SAAS;EACTC,IAAI;EACJC,YAAY;EACZC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC,UAAU;EACVC,WAAW;EACXC,iBAAiB;EACjBC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,IAAI;EACJC,IAAI;EACJC,kBAAkB;EAClBC,IAAI;EACJC,MAAM;AACNC,EAAAA,QAAQ,EAAEC,YAAY;AACtBC,EAAAA,OAAO,EAAEC,WAAW;AACpBC,EAAAA,MAAM,EAAEC,UAAU;EAClBC,WAAW;EACXC,WAAW;EACX,GAAGC,KAAAA;AACL,CAAC,EACDC,YAAY,EACZ;EACA,MAAM,CAACC,QAAQ,CAAC,GAAGC,QAAQ,CAACC,MAAM,EAAE,CAAC,CAAA;EACrC,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGH,QAAQ,EAAE,CAAA;EAClD,MAAM,CAACI,SAAS,EAAEC,YAAY,CAAC,GAAGL,QAAQ,CAAC,KAAK,CAAC,CAAA;EAEjD,MAAM;IAAEM,eAAe;IAAEC,cAAc;IAAEC,mBAAmB;AAAEC,IAAAA,cAAAA;AAAe,GAAC,GAC5EC,kBAAkB,CAACxB,kBAAkB,CAAC,CAAA;AAExCyB,EAAAA,SAAS,CAAC,MAAM;AACdR,IAAAA,eAAe,CAAC5B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AAChBH,EAAAA,UAAU,EAAE,OAAO;AACnBS,EAAAA,IAAI,EAAE,KAAK;AACXL,EAAAA,QAAQ,EAAE,KAAK;AACfI,EAAAA,kBAAkB,EAAE,EAAE;AACtBF,EAAAA,IAAI,EAAE,KAAK;AACXI,EAAAA,MAAM,EAAE,KAAK;AACbH,EAAAA,IAAI,EAAE,EAAE;AACRN,EAAAA,WAAW,EAAEA,MAAM,EAAE;AACrBC,EAAAA,iBAAiB,EAAE,KAAK;EACxBS,QAAQ,EAAEA,MAAM,EAAC;AACnB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"CompactTextInput.js","sources":["../../../src/components/inputs/CompactTextInput/CompactTextInput.tsx"],"sourcesContent":["import { isEmpty, isFunction } from 'lodash';\nimport { nanoid } from 'nanoid';\nimport React, { useCallback, useState, useEffect } from 'react';\nimport useTooltipAutoShow from '../../../hooks/useTooltipAutoShow';\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport { ReactComponent as LinkIcon } from '../../../icons/link.svg';\nimport { Tooltip, Popover } from '../../data';\nimport * as S from './CompactTextInput.styled';\n\nconst NOOP = () => {};\n\ntype CompactTextInputOwnProps = {\n /**\n * The label of the input field - leave `undefined` to hide the label\n */\n label?: string;\n /**\n * Displays a light green background to show that an action was successful.\n */\n success?: boolean;\n /**\n * The input type - eg. `text`, `number`\n */\n inputType?: string;\n /**\n * The input name\n */\n name?: string;\n /**\n * The default value of the input - creates an uncontrolled input\n */\n defaultValue?: string;\n /**\n * The value of the input - creates a controlled input\n */\n value?: string;\n /**\n * The placeholder of the input\n */\n placeholder?: string;\n /**\n * A URL associated with the input value. Creates a clickable link that accepts full or relative URL\n */\n link?: string;\n /**\n * The target for the link. Only applies when the field is in read-only mode\n */\n linkTarget?: '_self' | '_blank' | '_parent' | '_top';\n /**\n * Whether the link has a onClick event.\n */\n linkHandler?: (...args: any[]) => any;\n /**\n * Whether the handler should preceed the link behavior.\n */\n activeLinkHandler?: boolean;\n /**\n * Whether to auto select the entire value when the input is focused – does also work when the field is in read-only mode\n */\n autoSelect?: boolean;\n /**\n * Whether the value is read only\n */\n readOnly?: boolean;\n /**\n * Whether the value is disabled\n */\n disabled?: boolean;\n /**\n * Displays a grey background to show that value is editable\n */\n edit?: boolean;\n /**\n * There is a warning present.\n */\n warning?: boolean | string;\n /**\n * Whether to bold the input content - Slightly increases the font size and font weight of the input value\n */\n bold?: boolean;\n /**\n * Whether the component is hidden or visible.\n */\n hidden?: boolean;\n /**\n * Callback for `onChange`\n */\n onChange?: (...args: any[]) => any;\n /**\n * Callback for `onFocus`\n */\n onFocus?: (...args: any[]) => any;\n /**\n * Callback for `onBlur`\n */\n onBlur?: (...args: any[]) => any;\n /**\n * Define the type based on error, warning, loading and success.\n */\n type?: '' | 'error' | 'warning' | 'loading' | 'success';\n /**\n * Description ToolTip text.\n */\n descriptionToolTip?: string;\n /**\n * Icon element – E.g: `icon={<Spinner />}`\n */\n loadingIcon?: React.ReactElement<any>;\n /**\n * Icon element – E.g: `icon={<Check />}`\n */\n successIcon?: React.ReactElement<any>;\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.CompactTextInput`, so the published type\n * has to admit that target's props too — a closed type here is worse than `any` for the\n * 125 consumer files. Declared members win over the base (`Omit` by `keyof CompactTextInputOwnProps`);\n * a bare `&` would INTERSECT a colliding member instead of overriding it, which narrows\n * it (measured: `rows?: number | string` & `rows?: number`) or empties it to `never`.\n */\ntype CompactTextInputProps = Omit<\n React.ComponentPropsWithoutRef<typeof S.CompactTextInput>,\n keyof CompactTextInputOwnProps\n> &\n CompactTextInputOwnProps;\n\n// const ConditionalWrapper = ({ condition, wrapper, children }) =>\n// condition ? wrapper(children) : children;\n\n/**\n * Compact text inputs let users enter and edit text in the UI in a compact way. They typically appear in forms or displays of metadata.\n *\n * ### Import\n *\n * ``` js\n * import { CompactTextInput } from '@ntbjs/react-components/inputs'\n * // or\n * import CompactTextInput from '@ntbjs/react-components/inputs/CompactTextInput'\n * ```\n */\nconst CompactTextInput = React.forwardRef<any, CompactTextInputProps>(function CompactTextInput(\n {\n label,\n inputType = 'text',\n name,\n defaultValue,\n value,\n placeholder,\n link,\n linkTarget = '_self',\n linkHandler = NOOP,\n activeLinkHandler = false,\n autoSelect = true,\n readOnly = false,\n disabled,\n edit = false,\n type = '',\n descriptionToolTip = '',\n bold = false,\n hidden = false,\n onChange: onChangeProp = NOOP,\n onFocus: onFocusProp,\n onBlur: onBlurProp,\n loadingIcon,\n successIcon,\n ...props\n },\n forwardedRef\n) {\n const [uniqueId] = useState(nanoid());\n /*\n * NMB-3998: `useState()` with no argument infers `undefined`, so its setter is typed\n * `(prevState: undefined) => undefined` and rejects the string this component actually\n * stores — TS2345. The generic records what is assigned (`value || defaultValue`, both\n * `string`) while KEEPING the initial value `undefined`, so this is type-only: no\n * argument is added and the first render is unchanged. `useState('')` would have been a\n * behavioural change.\n */\n const [currentValue, setCurrentValue] = useState<string | undefined>();\n const [autoFocus, setAutoFocus] = useState(false);\n\n const { toolTipDisabled, toolTipVisible, toolTipOnMouseLeave, toolTipContent } =\n useTooltipAutoShow(descriptionToolTip);\n\n useEffect(() => {\n setCurrentValue(value || defaultValue);\n setAutoFocus(false);\n }, [value, defaultValue]);\n\n const onChange = useCallback(\n event => {\n setCurrentValue(event.target.value);\n\n if (!autoFocus) {\n setAutoFocus(true);\n }\n if (isFunction(onChangeProp)) {\n onChangeProp(event);\n }\n },\n [onChangeProp]\n );\n\n const onFocus = useCallback(\n event => {\n if (autoSelect) {\n event.target.select();\n }\n\n if (isFunction(onFocusProp)) {\n onFocusProp(event);\n }\n },\n [autoSelect, readOnly, onFocusProp]\n );\n\n const onBlur = useCallback(\n event => {\n if (isFunction(onBlurProp)) {\n onBlurProp(event);\n }\n },\n [onBlurProp]\n );\n\n const input = () => {\n return (\n <S.Input\n ref={forwardedRef}\n id={uniqueId}\n key={uniqueId}\n autoFocus={autoFocus}\n $inputType={inputType}\n name={name}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value ?? ''}\n $type={type}\n $bold={bold}\n $haslink={!isEmpty(link)}\n onFocus={onFocus}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n };\n\n if (hidden) return null;\n\n return (\n <S.CompactTextInput {...props}>\n {label && (\n <S.Label htmlFor={uniqueId} $disabled={disabled}>\n {label}\n <S.SuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n </S.Label>\n )}\n <S.InputContainer $hasLabel={!isEmpty(label)}>\n {!link && (\n <div onMouseLeave={toolTipOnMouseLeave}>\n <Tooltip\n content={toolTipContent}\n key=\"tooltip1\"\n placement=\"bottom-end\"\n trigger={'mouseenter'}\n disabled={toolTipDisabled}\n zIndex={999999}\n visible={toolTipVisible}\n >\n {input()}\n </Tooltip>\n </div>\n )}\n {link && !readOnly && (\n <div>\n <Popover\n arrow={false}\n content={\n <S.LinkPopoverContainer>\n {activeLinkHandler ? (\n <S.StyledLink\n href={link}\n target={linkTarget}\n onClick={e => {\n if (activeLinkHandler) {\n e.preventDefault();\n linkHandler();\n } else null;\n }}\n rel=\"noreferrer\"\n >\n <LinkIcon />\n {currentValue}\n </S.StyledLink>\n ) : (\n <S.StyledLink href={link} target={linkTarget} rel=\"noreferrer\">\n <LinkIcon />\n {currentValue}\n </S.StyledLink>\n )}\n </S.LinkPopoverContainer>\n }\n key=\"tooltip2\"\n placement=\"bottom-start\"\n trigger=\"focusin\"\n zIndex={999999}\n interactive={true}\n >\n {input()}\n </Popover>\n </div>\n )}\n {link && readOnly && (\n <S.ReadOnlyLinkContainer>\n <S.StyledLink\n href={link}\n rel=\"noreferrer\"\n style={{ display: 'inline-block' }}\n target={linkTarget}\n >\n {currentValue}\n </S.StyledLink>\n </S.ReadOnlyLinkContainer>\n )}\n {!readOnly && !disabled && (\n <>\n <S.InputIconContainer $type={type}>\n <EditNoteIcon />\n </S.InputIconContainer>\n {isEmpty(label) && (\n <S.InputSuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.InputSuccessContainer>\n )}\n </>\n )}\n </S.InputContainer>\n </S.CompactTextInput>\n );\n});\n\nexport default CompactTextInput;\n"],"names":["NOOP","CompactTextInput","React","forwardRef","label","inputType","name","defaultValue","value","placeholder","link","linkTarget","linkHandler","activeLinkHandler","autoSelect","readOnly","disabled","edit","type","descriptionToolTip","bold","hidden","onChange","onChangeProp","onFocus","onFocusProp","onBlur","onBlurProp","loadingIcon","successIcon","props","forwardedRef","uniqueId","useState","nanoid","currentValue","setCurrentValue","autoFocus","setAutoFocus","toolTipDisabled","toolTipVisible","toolTipOnMouseLeave","toolTipContent","useTooltipAutoShow","useEffect","useCallback","event","target","isFunction","select","input","_jsx","S","ref","id","$inputType","$edit","$type","$bold","$haslink","isEmpty","_jsxs","children","htmlFor","$disabled","$hasLabel","onMouseLeave","Tooltip","content","placement","trigger","zIndex","visible","Popover","arrow","href","onClick","e","preventDefault","rel","LinkIcon","interactive","style","display","_Fragment","EditNoteIcon"],"mappings":";;;;;;;;;;;;;;;;;AASA,MAAMA,IAAI,GAAGA,MAAM,CAAC,CAAC;AAoIrB,MAAMC,gBAAgB,GAAGC,cAAK,CAACC,UAAU,CAA6B,SAASF,gBAAgBA,CAC7F;EACEG,KAAK;AACLC,EAAAA,SAAS,GAAG,MAAM;EAClBC,IAAI;EACJC,YAAY;EACZC,KAAK;EACLC,WAAW;EACXC,IAAI;AACJC,EAAAA,UAAU,GAAG,OAAO;AACpBC,EAAAA,WAAW,GAAGZ,IAAI;AAClBa,EAAAA,iBAAiB,GAAG,KAAK;AACzBC,EAAAA,UAAU,GAAG,IAAI;AACjBC,EAAAA,QAAQ,GAAG,KAAK;EAChBC,QAAQ;AACRC,EAAAA,IAAI,GAAG,KAAK;AACZC,EAAAA,IAAI,GAAG,EAAE;AACTC,EAAAA,kBAAkB,GAAG,EAAE;AACvBC,EAAAA,IAAI,GAAG,KAAK;A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C,IACbyD,IAAA,CAACT,qBAAuB,EAAA;UAAAU,QAAA,EAAA,CACrB5C,IAAI,KAAK,SAAS,IAAIU,WAAW,EACjCV,IAAI,KAAK,SAAS,IAAIW,WAAW;AAAA,SACX,CAC1B;AAAA,OACD,CACH;AAAA,KACe,CAAC;AAAA,GACD,CAAC;AAEzB,CAAC;;;;"}
|
|
@@ -1,179 +1,65 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { applyDefaultTheme } from '../../utils/defaultTheme.js';
|
|
3
3
|
|
|
4
|
-
const linkColor = css
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
&:hover {
|
|
8
|
-
text-decoration: underline;
|
|
9
|
-
}
|
|
10
|
-
`}
|
|
11
|
-
`;
|
|
12
|
-
const commonAnchorTagStyle = css`
|
|
13
|
-
a,
|
|
14
|
-
&& {
|
|
15
|
-
font-size: 0.875rem;
|
|
16
|
-
text-decoration: none;
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
const readOnlyBackground = css`
|
|
20
|
-
${props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'))}
|
|
21
|
-
`;
|
|
4
|
+
const linkColor = css(["", " ", ""], props => props.theme.themeProp('color', '#ACCDC3', props.theme.getColor('emerald-500')), props => !props.disabled && css(["&:hover{text-decoration:underline;}"]));
|
|
5
|
+
const commonAnchorTagStyle = css(["a,&&{font-size:0.875rem;text-decoration:none;}"]);
|
|
6
|
+
const readOnlyBackground = css(["", ""], props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white')));
|
|
22
7
|
const shouldForwardProp = prop => {
|
|
23
8
|
return prop !== 'theme' && !prop.startsWith('$');
|
|
24
9
|
};
|
|
25
10
|
const CompactTextInput = styled.div.withConfig({
|
|
26
11
|
shouldForwardProp
|
|
27
|
-
}).attrs(applyDefaultTheme)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
font-family: ${props => props.theme.primaryFontFamily};
|
|
32
|
-
`;
|
|
12
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
13
|
+
displayName: "CompactTextInputstyled__CompactTextInput",
|
|
14
|
+
componentId: "sc-1v2ckml-0"
|
|
15
|
+
})(["display:flex;align-items:center;height:24px;font-family:", ";"], props => props.theme.primaryFontFamily);
|
|
33
16
|
const Label = styled.label.withConfig({
|
|
34
17
|
shouldForwardProp
|
|
35
|
-
}).attrs(applyDefaultTheme)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
line-height: 1rem;
|
|
40
|
-
justify-content: space-between;
|
|
41
|
-
height: 19px;
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
${props => props.disabled && css`
|
|
45
|
-
opacity: 0.5;
|
|
46
|
-
cursor: not-allowed;
|
|
47
|
-
`}
|
|
48
|
-
`;
|
|
18
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
19
|
+
displayName: "CompactTextInputstyled__Label",
|
|
20
|
+
componentId: "sc-1v2ckml-1"
|
|
21
|
+
})(["", ";flex-basis:33.33%;font-size:0.875rem;line-height:1rem;justify-content:space-between;height:19px;display:flex;align-items:center;", ""], props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700')), props => props.$disabled && css(["opacity:0.5;cursor:not-allowed;"]));
|
|
49
22
|
const InputContainer = styled.div.withConfig({
|
|
50
23
|
shouldForwardProp
|
|
51
|
-
}).attrs(applyDefaultTheme)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
`;
|
|
24
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
25
|
+
displayName: "CompactTextInputstyled__InputContainer",
|
|
26
|
+
componentId: "sc-1v2ckml-2"
|
|
27
|
+
})(["position:relative;height:19px;flex-basis:", ";"], props => props.$hasLabel ? '66.66%' : '100%');
|
|
56
28
|
const SuccessContainer = styled.div.withConfig({
|
|
57
29
|
shouldForwardProp
|
|
58
|
-
}).attrs(applyDefaultTheme)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
transition: opacity 0.5s ease-in-out;
|
|
63
|
-
margin-right: 5px;
|
|
64
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500'))}
|
|
65
|
-
> svg {
|
|
66
|
-
width: 13px;
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
30
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
31
|
+
displayName: "CompactTextInputstyled__SuccessContainer",
|
|
32
|
+
componentId: "sc-1v2ckml-3"
|
|
33
|
+
})(["opacity:1;pointer-events:none;display:flex;transition:opacity 0.5s ease-in-out;margin-right:5px;", " > svg{width:13px;}"], props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500')));
|
|
69
34
|
const InputSuccessContainer = styled.div.withConfig({
|
|
70
35
|
shouldForwardProp
|
|
71
|
-
}).attrs(applyDefaultTheme)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
justify-content: flex-end;
|
|
76
|
-
transition: opacity 0.5s ease-in-out;
|
|
77
|
-
position: relative;
|
|
78
|
-
margin-top: -20px;
|
|
79
|
-
margin-right: 8px;
|
|
80
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500'))}
|
|
81
|
-
> svg {
|
|
82
|
-
width: 13px;
|
|
83
|
-
}
|
|
84
|
-
`;
|
|
36
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
37
|
+
displayName: "CompactTextInputstyled__InputSuccessContainer",
|
|
38
|
+
componentId: "sc-1v2ckml-4"
|
|
39
|
+
})(["opacity:1;pointer-events:none;display:flex;justify-content:flex-end;transition:opacity 0.5s ease-in-out;position:relative;margin-top:-20px;margin-right:8px;", " > svg{width:13px;}"], props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500')));
|
|
85
40
|
const InputIconContainer = styled.div.withConfig({
|
|
86
41
|
shouldForwardProp
|
|
87
|
-
}).attrs(applyDefaultTheme)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
border-bottom-right-radius: 3px;
|
|
92
|
-
padding: 5px 10px 0 0;
|
|
93
|
-
transition: opacity 250ms;
|
|
94
|
-
${props => props.theme.themeProp('background', css`
|
|
95
|
-
linear-gradient(-90deg,
|
|
96
|
-
${props => props.$type === 'error' ? '#901d1d' : props.$type === 'warning' ? '#816600' : props.theme.getColor('gray-700')} 55%,
|
|
97
|
-
transparent)
|
|
98
|
-
`, css`
|
|
99
|
-
linear-gradient(-90deg,
|
|
100
|
-
${props => props.$type === 'error' ? '#f7d5d0' : props.$type === 'warning' ? '#fffebf' : props.theme.getColor('gray-100')} 55%,
|
|
101
|
-
transparent)
|
|
102
|
-
`)};
|
|
103
|
-
|
|
104
|
-
display: flex;
|
|
105
|
-
align-items: center;
|
|
106
|
-
position: absolute;
|
|
107
|
-
right: 0;
|
|
108
|
-
top: 0;
|
|
109
|
-
bottom: 0;
|
|
110
|
-
color: ${props => props.theme.getColor('gray-400')};
|
|
111
|
-
|
|
112
|
-
${props => props.$type === 'warning' && props.theme.themeProp('color', '#C3AF43', '#C3AF43')}
|
|
113
|
-
|
|
114
|
-
${props => props.$type === 'error' && props.theme.themeProp('color', '#CB968F', '#CB968F')}
|
|
115
|
-
|
|
116
|
-
> svg {
|
|
117
|
-
width: 12px;
|
|
118
|
-
transition: opacity 250ms;
|
|
119
|
-
}
|
|
120
|
-
`;
|
|
42
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
43
|
+
displayName: "CompactTextInputstyled__InputIconContainer",
|
|
44
|
+
componentId: "sc-1v2ckml-5"
|
|
45
|
+
})(["opacity:0;pointer-events:none;border-top-right-radius:3px;border-bottom-right-radius:3px;padding:5px 10px 0 0;transition:opacity 250ms;", ";display:flex;align-items:center;position:absolute;right:0;top:0;bottom:0;color:", ";", " ", " > svg{width:12px;transition:opacity 250ms;}"], props => props.theme.themeProp('background', css(["linear-gradient(-90deg,", " 55%,transparent)"], props => props.$type === 'error' ? '#901d1d' : props.$type === 'warning' ? '#816600' : props.theme.getColor('gray-700')), css(["linear-gradient(-90deg,", " 55%,transparent)"], props => props.$type === 'error' ? '#f7d5d0' : props.$type === 'warning' ? '#fffebf' : props.theme.getColor('gray-100'))), props => props.theme.getColor('gray-400'), props => props.$type === 'warning' && props.theme.themeProp('color', '#C3AF43', '#C3AF43'), props => props.$type === 'error' && props.theme.themeProp('color', '#CB968F', '#CB968F'));
|
|
121
46
|
const Input = styled.input.withConfig({
|
|
122
47
|
shouldForwardProp
|
|
123
48
|
}).attrs(props => ({
|
|
124
49
|
...applyDefaultTheme(props),
|
|
125
|
-
type: props
|
|
126
|
-
}))
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
display: block;
|
|
131
|
-
font-size: 0.875rem;
|
|
132
|
-
line-height: 1rem;
|
|
133
|
-
font-family: inherit;
|
|
134
|
-
padding: 1px 10px;
|
|
135
|
-
border-radius: 3px;
|
|
136
|
-
border: 1px solid transparent;
|
|
137
|
-
transition: border-color 350ms, background 350ms;
|
|
138
|
-
|
|
139
|
-
${props => {
|
|
50
|
+
type: props.$inputType || 'text'
|
|
51
|
+
})).withConfig({
|
|
52
|
+
displayName: "CompactTextInputstyled__Input",
|
|
53
|
+
componentId: "sc-1v2ckml-6"
|
|
54
|
+
})(["box-sizing:border-box;height:22px;width:100%;display:block;font-size:0.875rem;line-height:1rem;font-family:inherit;padding:1px 10px;border-radius:3px;border:1px solid transparent;transition:border-color 350ms,background 350ms;", " ", " ", " ", " ", ";&&:not(:hover):not(:focus){", " ", ";", "}&&:hover:not(:focus){", " ", ";", " & + ", "{opacity:1;", "}", " ", "}&&:focus{outline:none;", "}&&::placeholder{color:inherit;opacity:0.6;}&&:hover::placeholder{", "}&&:focus::placeholder{", "}", ""], props => {
|
|
140
55
|
if (props.$type === 'error') {
|
|
141
|
-
return css
|
|
142
|
-
${props.theme.themeProp('background', '#7f1b1b', '#FEE2E2')} !important;
|
|
143
|
-
`;
|
|
56
|
+
return css(["", " !important;"], props.theme.themeProp('background', '#7f1b1b', '#FEE2E2'));
|
|
144
57
|
} else if (props.$type === 'warning') {
|
|
145
|
-
return css
|
|
146
|
-
${props.theme.themeProp('background', '#634E01', '#FFFDE8')} !important;
|
|
147
|
-
`;
|
|
58
|
+
return css(["", " !important;"], props.theme.themeProp('background', '#634E01', '#FFFDE8'));
|
|
148
59
|
} else {
|
|
149
60
|
return props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
150
61
|
}
|
|
151
|
-
}}
|
|
152
|
-
|
|
153
|
-
${props => props.readOnly && css`
|
|
154
|
-
cursor: default;
|
|
155
|
-
`}
|
|
156
|
-
|
|
157
|
-
${props => props.disabled && css`
|
|
158
|
-
opacity: 0.5;
|
|
159
|
-
`}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700'))}
|
|
164
|
-
|
|
165
|
-
${props => props.$haslink && css`
|
|
166
|
-
&&:not(:focus),
|
|
167
|
-
&&:read-only {
|
|
168
|
-
${linkColor}
|
|
169
|
-
}
|
|
170
|
-
&&:read-only {
|
|
171
|
-
cursor: default;
|
|
172
|
-
}
|
|
173
|
-
`};
|
|
174
|
-
|
|
175
|
-
&&:not(:hover):not(:focus) {
|
|
176
|
-
${props => {
|
|
62
|
+
}, props => props.readOnly && css(["cursor:default;"]), props => props.disabled && css(["opacity:0.5;"]), props => props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700')), props => props.$haslink && css(["&&:not(:focus),&&:read-only{", "}&&:read-only{cursor:default;}"], linkColor), props => {
|
|
177
63
|
if (props.$edit) {
|
|
178
64
|
if (props.$type === 'error') {
|
|
179
65
|
return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');
|
|
@@ -183,21 +69,7 @@ const Input = styled.input.withConfig({
|
|
|
183
69
|
return props.theme.themeProp('background', 'rgba(39,39,42, 0.7)', 'rgba(244,244,245, 0.3)');
|
|
184
70
|
}
|
|
185
71
|
}
|
|
186
|
-
}}
|
|
187
|
-
|
|
188
|
-
${props => props.$edit && props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)')};
|
|
189
|
-
|
|
190
|
-
${props => props.$haslink && css`
|
|
191
|
-
&&:not(:focus),
|
|
192
|
-
&&:read-only {
|
|
193
|
-
cursor: default;
|
|
194
|
-
${linkColor}
|
|
195
|
-
}
|
|
196
|
-
`}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
&&:hover:not(:focus) {
|
|
200
|
-
${props => {
|
|
72
|
+
}, props => props.$edit && props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)'), props => props.$haslink && css(["&&:not(:focus),&&:read-only{cursor:default;", "}"], linkColor), props => {
|
|
201
73
|
if (props.readOnly) {
|
|
202
74
|
if (props.$type === 'error') {
|
|
203
75
|
return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');
|
|
@@ -213,40 +85,7 @@ const Input = styled.input.withConfig({
|
|
|
213
85
|
} else {
|
|
214
86
|
return props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'));
|
|
215
87
|
}
|
|
216
|
-
}}
|
|
217
|
-
|
|
218
|
-
${props => props.$edit && props.theme.themeProp('border-color', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'))};
|
|
219
|
-
|
|
220
|
-
${props => props.$haslink && css`
|
|
221
|
-
cursor: pointer;
|
|
222
|
-
&&:read-only {
|
|
223
|
-
background: none !important;
|
|
224
|
-
cursor: default;
|
|
225
|
-
}
|
|
226
|
-
`}
|
|
227
|
-
|
|
228
|
-
& + ${InputIconContainer} {
|
|
229
|
-
opacity: 1;
|
|
230
|
-
${props => props.$type === 'success' && css`
|
|
231
|
-
opacity: 0;
|
|
232
|
-
`}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
${props => props.disabled && css`
|
|
236
|
-
background: none !important;
|
|
237
|
-
cursor: not-allowed;
|
|
238
|
-
`}
|
|
239
|
-
|
|
240
|
-
${props => props.disabled && props.$haslink && css`
|
|
241
|
-
background: none !important;
|
|
242
|
-
cursor: not-allowed !important;
|
|
243
|
-
`}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
&&:focus {
|
|
247
|
-
outline: none;
|
|
248
|
-
|
|
249
|
-
${props => {
|
|
88
|
+
}, props => props.$edit && props.theme.themeProp('border-color', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')), props => props.$haslink && css(["cursor:pointer;&&:read-only{background:none !important;cursor:default;}"]), InputIconContainer, props => props.$type === 'success' && css(["opacity:0;"]), props => props.disabled && css(["background:none !important;cursor:not-allowed;"]), props => props.disabled && props.$haslink && css(["background:none !important;cursor:not-allowed !important;"]), props => {
|
|
250
89
|
if (props.readOnly) {
|
|
251
90
|
if (props.$type === 'error') {
|
|
252
91
|
return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');
|
|
@@ -256,87 +95,45 @@ const Input = styled.input.withConfig({
|
|
|
256
95
|
return readOnlyBackground;
|
|
257
96
|
}
|
|
258
97
|
if (props.$type === 'error') {
|
|
259
|
-
return css
|
|
260
|
-
${props.theme.themeProp('border-color', '#D83018', '#D83018')}
|
|
261
|
-
${props.theme.themeProp('background', 'white', 'white')}
|
|
262
|
-
${props.theme.themeProp('color', 'black', 'black')}
|
|
263
|
-
`;
|
|
98
|
+
return css(["", " ", " ", ""], props.theme.themeProp('border-color', '#D83018', '#D83018'), props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black'));
|
|
264
99
|
} else if (props.$type === 'warning') {
|
|
265
|
-
return css
|
|
266
|
-
${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}
|
|
267
|
-
${props.theme.themeProp('background', 'white', 'white')}
|
|
268
|
-
${props.theme.themeProp('color', 'black', 'black')}
|
|
269
|
-
`;
|
|
100
|
+
return css(["", " ", " ", ""], props.theme.themeProp('border-color', '#F4E21E', '#F4E21E'), props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black'));
|
|
270
101
|
} else {
|
|
271
|
-
return css
|
|
272
|
-
border-color: ${props.theme.getColor('gray-600')};
|
|
273
|
-
${props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'))}
|
|
274
|
-
`;
|
|
275
|
-
}
|
|
276
|
-
}}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
&&::placeholder {
|
|
280
|
-
color: inherit;
|
|
281
|
-
opacity: 0.6;
|
|
102
|
+
return css(["border-color:", ";", ""], props.theme.getColor('gray-600'), props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')));
|
|
282
103
|
}
|
|
283
|
-
|
|
284
|
-
&&:hover::placeholder {
|
|
285
|
-
${props => {
|
|
104
|
+
}, props => {
|
|
286
105
|
if (props.$type === 'warning') {
|
|
287
106
|
return props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700'));
|
|
288
107
|
} else if (props.$type === 'error') {
|
|
289
108
|
return props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700'));
|
|
290
109
|
}
|
|
291
110
|
return '';
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
&&:focus::placeholder {
|
|
296
|
-
${props => {
|
|
111
|
+
}, props => {
|
|
297
112
|
if (props.$type === 'warning') {
|
|
298
113
|
return props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900'));
|
|
299
114
|
} else if (props.$type === 'error') {
|
|
300
115
|
return props.theme.themeProp('color', props.theme.getColor('red-600'), props.theme.getColor('red-600'));
|
|
301
116
|
}
|
|
302
117
|
return '';
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
${props => props.$bold && css`
|
|
307
|
-
font-size: 1rem;
|
|
308
|
-
font-weight: 500;
|
|
309
|
-
line-height: 1.0625;
|
|
310
|
-
padding-top: 3px;
|
|
311
|
-
padding-bottom: 2px;
|
|
312
|
-
`}
|
|
313
|
-
`;
|
|
118
|
+
}, props => props.$bold && css(["font-size:1rem;font-weight:500;line-height:1.0625;padding-top:3px;padding-bottom:2px;"]));
|
|
314
119
|
const LinkPopoverContainer = styled.div.withConfig({
|
|
315
120
|
shouldForwardProp
|
|
316
|
-
}).attrs(applyDefaultTheme)
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
svg {
|
|
322
|
-
width: 18px;
|
|
323
|
-
margin-right: 8px;
|
|
324
|
-
}
|
|
325
|
-
`;
|
|
121
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
122
|
+
displayName: "CompactTextInputstyled__LinkPopoverContainer",
|
|
123
|
+
componentId: "sc-1v2ckml-7"
|
|
124
|
+
})(["", " padding:5px 8px;svg{width:18px;margin-right:8px;}"], commonAnchorTagStyle);
|
|
326
125
|
const StyledLink = styled.a.withConfig({
|
|
327
126
|
shouldForwardProp
|
|
328
|
-
}).attrs(applyDefaultTheme)
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
127
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
128
|
+
displayName: "CompactTextInputstyled__StyledLink",
|
|
129
|
+
componentId: "sc-1v2ckml-8"
|
|
130
|
+
})(["", " ", ""], commonAnchorTagStyle, linkColor);
|
|
332
131
|
const ReadOnlyLinkContainer = styled.div.withConfig({
|
|
333
132
|
shouldForwardProp
|
|
334
|
-
}).attrs(applyDefaultTheme)
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
padding: 0 10px 1px;
|
|
339
|
-
`;
|
|
133
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
134
|
+
displayName: "CompactTextInputstyled__ReadOnlyLinkContainer",
|
|
135
|
+
componentId: "sc-1v2ckml-9"
|
|
136
|
+
})(["", ";border:1px solid transparent;border-radius:3px;padding:0 10px 1px;"], readOnlyBackground);
|
|
340
137
|
|
|
341
138
|
export { CompactTextInput, Input, InputContainer, InputIconContainer, InputSuccessContainer, Label, LinkPopoverContainer, ReadOnlyLinkContainer, StyledLink, SuccessContainer };
|
|
342
139
|
//# sourceMappingURL=CompactTextInput.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactTextInput.styled.js","sources":["../../../src/components/inputs/CompactTextInput/CompactTextInput.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst linkColor = css`\n ${props => props.theme.themeProp('color', '#ACCDC3', props.theme.getColor('emerald-500'))}\n ${props =>\n !props.disabled &&\n css`\n &:hover {\n text-decoration: underline;\n }\n `}\n`;\n\nconst commonAnchorTagStyle = css`\n a,\n && {\n font-size: 0.875rem;\n text-decoration: none;\n }\n`;\n\nconst readOnlyBackground = css`\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n`;\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const CompactTextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n height: 24px;\n font-family: ${props => props.theme.primaryFontFamily};\n`;\n\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n justify-content: space-between;\n height: 19px;\n display: flex;\n align-items: center;\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n cursor: not-allowed;\n `}\n`;\n\nexport const InputContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n height: 19px;\n flex-basis: ${props => (props.$hasLabel ? '66.66%' : '100%')};\n`;\n\nexport const SuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n display: flex;\n transition: opacity 0.5s ease-in-out;\n margin-right: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n > svg {\n width: 13px;\n }\n`;\n\nexport const InputSuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n display: flex;\n justify-content: flex-end;\n transition: opacity 0.5s ease-in-out;\n position: relative;\n margin-top: -20px;\n margin-right: 8px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n > svg {\n width: 13px;\n }\n`;\n\nexport const InputIconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px 10px 0 0;\n transition: opacity 250ms;\n ${props =>\n props.theme.themeProp(\n 'background',\n css`\n linear-gradient(-90deg,\n ${props =>\n props.$type === 'error'\n ? '#901d1d'\n : props.$type === 'warning'\n ? '#816600'\n : props.theme.getColor('gray-700')} 55%,\n transparent)\n `,\n css`\n linear-gradient(-90deg,\n ${props =>\n props.$type === 'error'\n ? '#f7d5d0'\n : props.$type === 'warning'\n ? '#fffebf'\n : props.theme.getColor('gray-100')} 55%,\n transparent)\n `\n )};\n\n display: flex;\n align-items: center;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n color: ${props => props.theme.getColor('gray-400')};\n\n ${props => props.$type === 'warning' && props.theme.themeProp('color', '#C3AF43', '#C3AF43')}\n\n ${props => props.$type === 'error' && props.theme.themeProp('color', '#CB968F', '#CB968F')}\n\n > svg {\n width: 12px;\n transition: opacity 250ms;\n }\n`;\n\n// @ts-ignore - Transient props ($type, $edit, $bold, $haslink) are filtered by shouldForwardProp\nexport const Input = styled.input\n .withConfig({\n shouldForwardProp\n })\n .attrs(props => ({\n ...applyDefaultTheme(props),\n type: props.inputtype || 'text'\n }))`\n box-sizing: border-box;\n height: 22px;\n width: 100%;\n display: block;\n font-size: 0.875rem;\n line-height: 1rem;\n font-family: inherit;\n padding: 1px 10px;\n border-radius: 3px;\n border: 1px solid transparent;\n transition: border-color 350ms, background 350ms;\n\n ${props => {\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('background', '#7f1b1b', '#FEE2E2')} !important;\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('background', '#634E01', '#FFFDE8')} !important;\n `;\n } else {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n );\n }\n }}\n\n ${props =>\n props.readOnly &&\n css`\n cursor: default;\n `}\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n `}\n\n\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n )}\n\n ${props =>\n props.$haslink &&\n css`\n &&:not(:focus),\n &&:read-only {\n ${linkColor}\n }\n &&:read-only {\n cursor: default;\n }\n `};\n\n &&:not(:hover):not(:focus) {\n ${props => {\n if (props.$edit) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n } else {\n return props.theme.themeProp(\n 'background',\n 'rgba(39,39,42, 0.7)',\n 'rgba(244,244,245, 0.3)'\n );\n }\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)')};\n \n ${props =>\n props.$haslink &&\n css`\n &&:not(:focus),\n &&:read-only {\n cursor: default;\n ${linkColor}\n }\n `}\n }\n\n &&:hover:not(:focus) {\n ${props => {\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return readOnlyBackground;\n }\n\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#901d1d', '#F7D5D0');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#806403', '#FFFEBF');\n } else {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n );\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )};\n\n ${props =>\n props.$haslink &&\n css`\n cursor: pointer;\n &&:read-only {\n background: none !important;\n cursor: default;\n }\n `}\n \n & + ${InputIconContainer} {\n opacity: 1;\n ${props =>\n props.$type === 'success' &&\n css`\n opacity: 0;\n `}\n }\n\n ${props =>\n props.disabled &&\n css`\n background: none !important;\n cursor: not-allowed;\n `}\n \n ${props =>\n props.disabled &&\n props.$haslink &&\n css`\n background: none !important;\n cursor: not-allowed !important;\n `}\n }\n\n &&:focus {\n outline: none;\n\n ${props => {\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return readOnlyBackground;\n }\n\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('border-color', '#D83018', '#D83018')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else {\n return css`\n border-color: ${props.theme.getColor('gray-600')};\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n `;\n }\n }}\n }\n\n &&::placeholder {\n color: inherit;\n opacity: 0.6;\n }\n\n &&:hover::placeholder {\n ${props => {\n if (props.$type === 'warning') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n );\n } else if (props.$type === 'error') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n );\n }\n return '';\n }}\n }\n\n &&:focus::placeholder {\n ${props => {\n if (props.$type === 'warning') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-900')\n );\n } else if (props.$type === 'error') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('red-600'),\n props.theme.getColor('red-600')\n );\n }\n return '';\n }}\n }\n\n ${props =>\n props.$bold &&\n css`\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.0625;\n padding-top: 3px;\n padding-bottom: 2px;\n `}\n`;\n\nexport const LinkPopoverContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${commonAnchorTagStyle}\n\n padding: 5px 8px;\n\n svg {\n width: 18px;\n margin-right: 8px;\n }\n`;\n\nexport const StyledLink = styled.a\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${commonAnchorTagStyle}\n ${linkColor}\n`;\n\nexport const ReadOnlyLinkContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${readOnlyBackground};\n border: 1px solid transparent;\n border-radius: 3px;\n padding: 0 10px 1px;\n`;\n"],"names":["linkColor","css","props","theme","themeProp","getColor","disabled","commonAnchorTagStyle","readOnlyBackground","shouldForwardProp","prop","startsWith","CompactTextInput","styled","div","withConfig","attrs","applyDefaultTheme","primaryFontFamily","Label","label","InputContainer","$hasLabel","SuccessContainer","InputSuccessContainer","InputIconContainer","$type","Input","input","type","inputtype","readOnly","$haslink","$edit","$bold","LinkPopoverContainer","StyledLink","a","ReadOnlyLinkContainer"],"mappings":";;;AAGA,MAAMA,SAAS,GAAGC,GAAG,CAAA;AACrB,EAAIC,EAAAA,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,SAAS,CAAC,OAAO,EAAE,SAAS,EAAEF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAA;AAC3F,EAAA,EAAIH,KAAK,IACL,CAACA,KAAK,CAACI,QAAQ,IACfL,GAAG,CAAA;AACP;AACA;AACA;AACA,IAAK,CAAA,CAAA;AACL,CAAC,CAAA;AAED,MAAMM,oBAAoB,GAAGN,GAAG,CAAA;AAChC;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMO,kBAAkB,GAAGP,GAAG,CAAA;AAC9B,EAAIC,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,YAAY,EACZF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,OAAO,CAC9B,CAAC,CAAA;AACL,CAAC,CAAA;AAED,MAAMI,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,GAAG,CACvCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA,eAAA,EAAiBf,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACe,iBAAiB,CAAA;AACvD,EAAC;AAEM,MAAMC,KAAK,GAAGN,MAAM,CAACO,KAAK,CAC9BL,UAAU,CAAC;AACVN,EAAAA,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N,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,EAAA,EAAIV,oBAAoB,CAAA;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAM6B,UAAU,GAAGvB,MAAM,CAACwB,CAAC,CAC/BtB,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,EAAA,EAAIV,oBAAoB,CAAA;AACxB,EAAA,EAAIP,SAAS,CAAA;AACb,EAAC;AAEM,MAAMsC,qBAAqB,GAAGzB,MAAM,CAACC,GAAG,CAC5CC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,EAAA,EAAIT,kBAAkB,CAAA;AACtB;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"CompactTextInput.styled.js","sources":["../../../src/components/inputs/CompactTextInput/CompactTextInput.styled.ts"],"sourcesContent":["/*\n * $-transient-prop pattern: rules in\n * `src/components/layout/SectionSeparator/SectionSeparator.styled.ts`, derivation and\n * measurements in `scripts/TS-MIGRATION-PLAYBOOK.md` §J.\n *\n * THIS FILE IS THE WORKED EXAMPLE FOR EVERYTHING THE SIMPLE CASE DOES NOT SHOW:\n *\n * - an `.attrs(props => …)` CALLBACK that reads a prop (`Input`). The generic MUST be\n * on `.attrs<P>()` here and cannot be on the template call: measured, the\n * template-call slot leaves the callback parameter `FastOmit<…, never>`, so P never\n * reaches it and the error has no fix but a suppression. §J.2.\n * - MODULE-SCOPE `css` helpers shared between components (`linkColor`,\n * `readOnlyBackground`), each its own generic slot. §J.7.\n * - `css` blocks NESTED inside an interpolation's argument list\n * (`InputIconContainer`'s two `themeProp()` arguments), whose own `${props => …}`\n * SHADOWS the outer one, so the outer `.attrs<P>()` does not reach them. §J.7.\n * - a closed 5-member union for `$type` derived from the component's propTypes,\n * rather than the `any` the a7bb76d prototype emits. §J.6.\n * - `Input`'s `inputtype`, one of the two non-`$` keys §J.9 recorded as a deferred DOM\n * leak: now FIXED and transient (`$inputType`). It removed `inputtype=\"text\"` from\n * every rendered `<input>`, so it moved the render baseline on purpose. §J.9 / §E.4.\n * - `Label`'s `disabled`, the other one, FIXED the same way (`$disabled`). It removed\n * an attribute that is not even legal on `<label>`.\n */\nimport styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\n/**\n * `CompactTextInput.tsx`'s `type` prop, from its\n * `PropTypes.oneOf(['', 'error', 'warning', 'loading', 'success'])`, carried across\n * the `shouldForwardProp` boundary as `$type` by both `Input` and\n * `InputIconContainer`.\n *\n * Closed on purpose, not widened to `string`. The templates below branch on this\n * value 20 times; with a closed union a mistyped state name is TS2367 rather than a\n * branch that silently never fires. `''` is a member because the component defaults\n * `type = ''` — this union is the propTypes verbatim, not a tidied version of it.\n */\ntype CompactTextInputType = '' | 'error' | 'warning' | 'loading' | 'success';\n\n/**\n * A module-scope `css` helper is a SEPARATE generic slot: unannotated, its props are\n * `ExecutionContext & object` and `props.disabled` is TS2339 no matter what the\n * hosting component declares.\n *\n * `disabled` is declared here because of `Input`, which is one of this block's two\n * hosts and does receive it. THE OTHER HOST IS `StyledLink`, WHICH DOES NOT — and that\n * IS checked: `{ disabled?: boolean }` is a weak type, assignability to a weak type\n * needs at least one member in common, and `AnchorHTMLAttributes` has no `disabled`.\n * See the note at `StyledLink` for the resulting declaration and why it is not an\n * invented prop.\n *\n * Hosts, for whoever changes this block: Input (twice, inside the `$haslink` blocks)\n * and StyledLink.\n */\nconst linkColor = css<{ disabled?: boolean }>`\n ${props => props.theme.themeProp('color', '#ACCDC3', props.theme.getColor('emerald-500'))}\n ${props =>\n !props.disabled &&\n css`\n &:hover {\n text-decoration: underline;\n }\n `}\n`;\n\n/* No interpolations at all, so no props and no generic. */\nconst commonAnchorTagStyle = css`\n a,\n && {\n font-size: 0.875rem;\n text-decoration: none;\n }\n`;\n\n/*\n * Reads only `props.theme`, which is on `ExecutionContext` via the C6 `DefaultTheme`\n * augmentation — so this one needs NO generic even though it is the same shape as\n * `linkColor`. §J.7.\n */\nconst readOnlyBackground = css`\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n`;\n\n/*\n * Single-argument, and it stays that way — peer floor `styled-components: >=5.1.0`,\n * and the two majors disagree on the second parameter. §J.4. `prop` needs the\n * annotation because `withConfig` takes this by reference, so it gets no contextual\n * typing.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const CompactTextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n height: 24px;\n font-family: ${props => props.theme.primaryFontFamily};\n`;\n\n/*\n * `$disabled` WAS `disabled`, WITH NO `$`, AND THAT WAS A DOM LEAK — now fixed.\n *\n * `disabled` is not a member of `LabelHTMLAttributes`, which is why the read below used\n * to be TS2339 while the identical read in `Input` is not (there it IS a real\n * `InputHTMLAttributes` member and needs no declaration at all — §J.9). That asymmetry\n * was the whole tell: `CompactTextInput.tsx` passed `disabled={disabled}` to this\n * component, `shouldForwardProp` forwards every non-`$` prop, and so `disabled=\"\"`\n * landed on a `<label>`, where it is not valid HTML. It is in three entries of the\n * committed render baseline (`inputs/CompactTextInput#disabled`, and the same leak from\n * the equivalent code in `inputs/Radio#disabled` and `inputs/TextArea#disabled`, which\n * are other files' to fix).\n *\n * §E.4, third case: the fix is the `$` prefix at both ends, which removes the attribute\n * from the rendered HTML. Purely internal — `CompactTextInput`'s own public `disabled`\n * prop is untouched and still drives this.\n */\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ $disabled?: boolean }>(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n justify-content: space-between;\n height: 19px;\n display: flex;\n align-items: center;\n ${props =>\n props.$disabled &&\n css`\n opacity: 0.5;\n cursor: not-allowed;\n `}\n`;\n\nexport const InputContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ $hasLabel?: boolean }>(applyDefaultTheme)`\n position: relative;\n height: 19px;\n flex-basis: ${props => (props.$hasLabel ? '66.66%' : '100%')};\n`;\n\nexport const SuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n display: flex;\n transition: opacity 0.5s ease-in-out;\n margin-right: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n > svg {\n width: 13px;\n }\n`;\n\nexport const InputSuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n display: flex;\n justify-content: flex-end;\n transition: opacity 0.5s ease-in-out;\n position: relative;\n margin-top: -20px;\n margin-right: 8px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n > svg {\n width: 13px;\n }\n`;\n\n/*\n * TWO GENERIC SLOTS IN ONE COMPONENT, and the outer one does not cover the inner ones.\n *\n * The `.attrs<{ $type }>()` below types the template's own interpolations. The two\n * `css`…`` blocks passed as arguments to `themeProp()` each open their OWN\n * `${props => …}`, which shadows the outer `props`, so the outer generic never reaches\n * them — unannotated their props are `ExecutionContext & object` and `props.$type` is\n * TS2339 there regardless of what the component declares. Hence `css<…>` on both.\n * This is C7 rule 3 / §J.7, and it is 4 of this file's 35 errors.\n */\nexport const InputIconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ $type?: CompactTextInputType }>(applyDefaultTheme)`\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px 10px 0 0;\n transition: opacity 250ms;\n ${props =>\n props.theme.themeProp(\n 'background',\n css<{ $type?: CompactTextInputType }>`\n linear-gradient(-90deg,\n ${props =>\n props.$type === 'error'\n ? '#901d1d'\n : props.$type === 'warning'\n ? '#816600'\n : props.theme.getColor('gray-700')} 55%,\n transparent)\n `,\n css<{ $type?: CompactTextInputType }>`\n linear-gradient(-90deg,\n ${props =>\n props.$type === 'error'\n ? '#f7d5d0'\n : props.$type === 'warning'\n ? '#fffebf'\n : props.theme.getColor('gray-100')} 55%,\n transparent)\n `\n )};\n\n display: flex;\n align-items: center;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n color: ${props => props.theme.getColor('gray-400')};\n\n ${props => props.$type === 'warning' && props.theme.themeProp('color', '#C3AF43', '#C3AF43')}\n\n ${props => props.$type === 'error' && props.theme.themeProp('color', '#CB968F', '#CB968F')}\n\n > svg {\n width: 12px;\n transition: opacity 250ms;\n }\n`;\n\n/**\n * Props of `Input`.\n *\n * Every member is transient, so `shouldForwardProp` filters all of them out of the DOM.\n * `$haslink` is lower-case by existing convention at both ends; renaming it would be a\n * two-file change for no type benefit.\n *\n * `$inputType` WAS `inputtype`, WITH NO `$`, AND THAT WAS A DOM LEAK — now fixed.\n * It is a style/behaviour input (the `.attrs()` callback turns it into the real `type`\n * attribute), but without the `$` prefix `shouldForwardProp` forwarded it verbatim too,\n * so `inputtype=\"text\"` was on every rendered `<input>` — visible in seven entries of the\n * recorded render baseline (`inputs/CompactTextInput` and its five variants, plus\n * `layout/InputGroup`). §E.4's third case, and the fix is the `$` prefix.\n *\n * The PUBLIC prop is unaffected: `CompactTextInput.tsx` still takes `inputType` and maps\n * it to this transient prop internally, so no consumer has to react. (Grepped: neither\n * `mb-main-client/src` nor `ntb-dam/client/src` mentions `inputtype` or `inputType` at\n * all, and no stylesheet in `src` selects on `[inputtype]`.)\n *\n * `readOnly` and `disabled` are read by the template too and are deliberately ABSENT\n * from this interface: both are real `InputHTMLAttributes` members, so those reads\n * already typecheck and declaring them would add nothing. §J.9.\n */\ninterface InputStyleProps {\n /** `type` — see `CompactTextInputType`. Branched on 20 times below. */\n $type?: CompactTextInputType;\n /** `edit` — shows the editable-affordance background. */\n $edit?: boolean;\n /** `bold` — larger font-size/weight for the value. */\n $bold?: boolean;\n /** `!isEmpty(link)` — the component derives this, so `boolean`, not `link`'s type. */\n $haslink?: boolean;\n /**\n * `inputType` — the real `<input type>`, defaulted to `'text'` in the callback.\n * `string` because the propTypes say `PropTypes.string` and the value is handed\n * straight to the `type` attribute the callback produces.\n */\n $inputType?: string;\n}\n\n/*\n * THE GENERIC MUST BE ON `.attrs<P>()` HERE. THIS IS THE SITE THAT PROVES IT.\n *\n * `props.$inputType` is read inside the `.attrs()` CALLBACK, and measured (§J.2) the\n * callback parameter is typed `FastOmit<…, keyof P> & P` only when P is supplied to\n * `attrs`; supplying it on the tagged-template call instead leaves the parameter\n * `FastOmit<…, never>`, where no amount of adding members to P will ever fix the read.\n *\n * There was a `@ts-ignore` above this declaration until NMB-3998 C2, which measured as\n * suppressing NOTHING — a directive covers only the following line, that line is\n * `export const Input = styled.input`, and tsc reports no error there. The file's errors\n * started at the callback below and continued through the template: 35 of them at the\n * time this commit was written (102 before the C6 theme augmentation removed the\n * `props.theme` reads). It is not re-added in a legal form either. §E.2 names the\n * styled-generics bucket explicitly as something a suppression must not hide, and the\n * remedy is the line below.\n */\nexport const Input = styled.input\n .withConfig({\n shouldForwardProp\n })\n .attrs<InputStyleProps>(props => ({\n ...applyDefaultTheme(props),\n type: props.$inputType || 'text'\n }))`\n box-sizing: border-box;\n height: 22px;\n width: 100%;\n display: block;\n font-size: 0.875rem;\n line-height: 1rem;\n font-family: inherit;\n padding: 1px 10px;\n border-radius: 3px;\n border: 1px solid transparent;\n transition: border-color 350ms, background 350ms;\n\n ${props => {\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('background', '#7f1b1b', '#FEE2E2')} !important;\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('background', '#634E01', '#FFFDE8')} !important;\n `;\n } else {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n );\n }\n }}\n\n ${props =>\n props.readOnly &&\n css`\n cursor: default;\n `}\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n `}\n\n\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n )}\n\n ${props =>\n props.$haslink &&\n css`\n &&:not(:focus),\n &&:read-only {\n ${linkColor}\n }\n &&:read-only {\n cursor: default;\n }\n `};\n\n &&:not(:hover):not(:focus) {\n ${props => {\n if (props.$edit) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n } else {\n return props.theme.themeProp(\n 'background',\n 'rgba(39,39,42, 0.7)',\n 'rgba(244,244,245, 0.3)'\n );\n }\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)')};\n \n ${props =>\n props.$haslink &&\n css`\n &&:not(:focus),\n &&:read-only {\n cursor: default;\n ${linkColor}\n }\n `}\n }\n\n &&:hover:not(:focus) {\n ${props => {\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return readOnlyBackground;\n }\n\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#901d1d', '#F7D5D0');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#806403', '#FFFEBF');\n } else {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n );\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )};\n\n ${props =>\n props.$haslink &&\n css`\n cursor: pointer;\n &&:read-only {\n background: none !important;\n cursor: default;\n }\n `}\n \n & + ${InputIconContainer} {\n opacity: 1;\n ${props =>\n props.$type === 'success' &&\n css`\n opacity: 0;\n `}\n }\n\n ${props =>\n props.disabled &&\n css`\n background: none !important;\n cursor: not-allowed;\n `}\n \n ${props =>\n props.disabled &&\n props.$haslink &&\n css`\n background: none !important;\n cursor: not-allowed !important;\n `}\n }\n\n &&:focus {\n outline: none;\n\n ${props => {\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return readOnlyBackground;\n }\n\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('border-color', '#D83018', '#D83018')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else {\n return css`\n border-color: ${props.theme.getColor('gray-600')};\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n `;\n }\n }}\n }\n\n &&::placeholder {\n color: inherit;\n opacity: 0.6;\n }\n\n &&:hover::placeholder {\n ${props => {\n if (props.$type === 'warning') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n );\n } else if (props.$type === 'error') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n );\n }\n return '';\n }}\n }\n\n &&:focus::placeholder {\n ${props => {\n if (props.$type === 'warning') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-900')\n );\n } else if (props.$type === 'error') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('red-600'),\n props.theme.getColor('red-600')\n );\n }\n return '';\n }}\n }\n\n ${props =>\n props.$bold &&\n css`\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.0625;\n padding-top: 3px;\n padding-bottom: 2px;\n `}\n`;\n\nexport const LinkPopoverContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${commonAnchorTagStyle}\n\n padding: 5px 8px;\n\n svg {\n width: 18px;\n margin-right: 8px;\n }\n`;\n\n/*\n * `disabled` IS DECLARED HERE BECAUSE `linkColor` READS IT, NOT BECAUSE ANYTHING PASSES\n * IT. Nothing does: `CompactTextInput.tsx` renders `<S.StyledLink href=… target=…\n * rel=…>` in all three places, so `props.disabled` is always `undefined` here and\n * `linkColor`'s `!props.disabled` branch always takes the true arm — the hover\n * underline is unconditional on this component.\n *\n * Without the declaration this is TS2345, and the reason is worth knowing because it\n * contradicts the obvious guess: `{ disabled?: boolean }` is a WEAK TYPE (every member\n * optional), and assignability to a weak type requires AT LEAST ONE MEMBER IN COMMON.\n * `AnchorHTMLAttributes` has no `disabled`, so the overlap is empty and\n * `RuleSet<{ disabled?: boolean }>` is rejected — \"has no properties in common with\n * type '{ disabled?: boolean; }'\". `Input` needs no such declaration because `disabled`\n * is a genuine `InputHTMLAttributes` member.\n *\n * So a shared `css<A>` helper IS checked against every host, and the host has to be\n * able to supply what the helper reads. Playbook §J.7 said the opposite until this\n * file disproved it.\n */\nexport const StyledLink = styled.a\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ disabled?: boolean }>(applyDefaultTheme)`\n ${commonAnchorTagStyle}\n ${linkColor}\n`;\n\nexport const ReadOnlyLinkContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${readOnlyBackground};\n border: 1px solid transparent;\n border-radius: 3px;\n padding: 0 10px 1px;\n`;\n"],"names":["linkColor","css","props","theme","themeProp","getColor","disabled","commonAnchorTagStyle","readOnlyBackground","shouldForwardProp","prop","startsWith","CompactTextInput","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","primaryFontFamily","Label","label","$disabled","InputContainer","$hasLabel","SuccessContainer","InputSuccessContainer","InputIconContainer","$type","Input","input","type","$inputType","readOnly","$haslink","$edit","$bold","LinkPopoverContainer","StyledLink","a","ReadOnlyLinkContainer"],"mappings":";;;AAuDA,MAAMA,SAAS,GAAGC,GAAG,CAAA,CAAA,EAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EACjBC,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,SAAS,CAAC,OAAO,EAAE,SAAS,EAAEF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,aAAa,CAAC,CAAC,EACvFH,KAAK,IACL,CAACA,KAAK,CAACI,QAAQ,IACfL,GAAG,yCAIF,CACJ;AAGD,MAAMM,oBAAoB,GAAGN,GAAG,CAAA,CAAA,gDAAA,CAAA,CAM/B;AAOD,MAAMO,kBAAkB,GAAGP,GAAG,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,EAC1BC,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,YAAY,EACZF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,OAAO,CAC9B,CAAC,CACJ;AAQD,MAAMI,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,GAAG,CACvCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAA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