@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,249 +1,58 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { applyDefaultTheme } from '../../utils/defaultTheme.js';
|
|
3
3
|
|
|
4
|
-
const activeLabel = css
|
|
5
|
-
font-size: 0.75rem;
|
|
6
|
-
padding: 0 3px;
|
|
7
|
-
top: -7px;
|
|
8
|
-
letter-spacing: 0.03em;
|
|
9
|
-
left: 8px !important;
|
|
10
|
-
opacity: 1 !important;
|
|
11
|
-
`;
|
|
4
|
+
const activeLabel = css(["font-size:0.75rem;padding:0 3px;top:-7px;letter-spacing:0.03em;left:8px !important;opacity:1 !important;"]);
|
|
12
5
|
const shouldForwardProp = prop => {
|
|
13
6
|
return prop !== 'theme' && !prop.startsWith('$');
|
|
14
7
|
};
|
|
15
8
|
const Adornment = styled.div.withConfig({
|
|
16
9
|
shouldForwardProp
|
|
17
|
-
}).attrs(applyDefaultTheme)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
line-height: initial;
|
|
22
|
-
padding: 13px 10px;
|
|
23
|
-
|
|
24
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'))}
|
|
25
|
-
${props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'))}
|
|
26
|
-
border: 1px solid;
|
|
27
|
-
${props => props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'))}
|
|
28
|
-
border-radius: 3px;
|
|
29
|
-
${props => props.$isPrefix ? css`
|
|
30
|
-
padding-right: 10px;
|
|
31
|
-
border-right: 0;
|
|
32
|
-
border-top-right-radius: 0;
|
|
33
|
-
border-bottom-right-radius: 0;
|
|
34
|
-
` : css`
|
|
35
|
-
padding-left: 0;
|
|
36
|
-
margin-left: -3px;
|
|
37
|
-
border-left: 0;
|
|
38
|
-
border-top-left-radius: 0;
|
|
39
|
-
border-bottom-left-radius: 0;
|
|
40
|
-
`}
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
appearance: none;
|
|
43
|
-
transition: border-color 350ms;
|
|
44
|
-
height: 2.75rem;
|
|
45
|
-
|
|
46
|
-
${props => props.$warning && css`
|
|
47
|
-
border-color: ${props.theme.getColor('orange-500')} !important;
|
|
48
|
-
`}
|
|
49
|
-
${props => props.$error && css`
|
|
50
|
-
border-color: ${props.theme.getColor('red-500')} !important;
|
|
51
|
-
`}
|
|
52
|
-
`;
|
|
10
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
11
|
+
displayName: "TextInputstyled__Adornment",
|
|
12
|
+
componentId: "sc-11se2z5-0"
|
|
13
|
+
})(["flex-shrink:0;font-family:inherit;font-size:0.875rem;line-height:initial;padding:13px 10px;", " ", " border:1px solid;", " border-radius:3px;", " box-sizing:border-box;appearance:none;transition:border-color 350ms;height:2.75rem;", " ", ""], props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500')), props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white')), props => props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400')), props => props.$isPrefix ? css(["padding-right:10px;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;"]) : css(["padding-left:0;margin-left:-3px;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;"]), props => props.$warning && css(["border-color:", " !important;"], props.theme.getColor('orange-500')), props => props.$error && css(["border-color:", " !important;"], props.theme.getColor('red-500')));
|
|
53
14
|
const TextInputWrapper = styled.div.withConfig({
|
|
54
15
|
shouldForwardProp
|
|
55
|
-
}).attrs(applyDefaultTheme)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
&:focus-within {
|
|
60
|
-
${Adornment} {
|
|
61
|
-
outline: none;
|
|
62
|
-
${props => props.theme.themeProp('border-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-600'), 1)}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
16
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
17
|
+
displayName: "TextInputstyled__TextInputWrapper",
|
|
18
|
+
componentId: "sc-11se2z5-1"
|
|
19
|
+
})(["display:flex;align-content:center;&:focus-within{", "{outline:none;", "}}"], Adornment, props => props.theme.themeProp('border-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-600'), 1));
|
|
66
20
|
const InputIconContainer = styled.div.withConfig({
|
|
67
21
|
shouldForwardProp
|
|
68
|
-
}).attrs(applyDefaultTheme)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
border-bottom-right-radius: 3px;
|
|
73
|
-
padding-right: 4px;
|
|
74
|
-
padding-left: 30px;
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
position: absolute;
|
|
78
|
-
right: 0;
|
|
79
|
-
top: 0;
|
|
80
|
-
bottom: 0;
|
|
81
|
-
color: ${props => props.theme.getColor('gray-400')};
|
|
82
|
-
|
|
83
|
-
${props => props.$warning && props.theme.themeProp('color', '#C3AF43', '#C3AF43')}
|
|
84
|
-
|
|
85
|
-
${props => props.$error && props.theme.themeProp('color', '#CB968F', '#CB968F')}
|
|
86
|
-
|
|
87
|
-
> svg {
|
|
88
|
-
width: 12px;
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
22
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
23
|
+
displayName: "TextInputstyled__InputIconContainer",
|
|
24
|
+
componentId: "sc-11se2z5-2"
|
|
25
|
+
})(["opacity:0;pointer-events:none;border-top-right-radius:3px;border-bottom-right-radius:3px;padding-right:4px;padding-left:30px;display:flex;align-items:center;position:absolute;right:0;top:0;bottom:0;color:", ";", " ", " > svg{width:12px;}"], props => props.theme.getColor('gray-400'), props => props.$warning && props.theme.themeProp('color', '#C3AF43', '#C3AF43'), props => props.$error && props.theme.themeProp('color', '#CB968F', '#CB968F'));
|
|
91
26
|
const TextInputField = styled.input.withConfig({
|
|
92
27
|
shouldForwardProp
|
|
93
|
-
}).attrs(applyDefaultTheme)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
font-size: 0.875rem;
|
|
98
|
-
line-height: 1;
|
|
99
|
-
padding: 13px 10px;
|
|
100
|
-
border-radius: 3px;
|
|
101
|
-
box-sizing: border-box;
|
|
102
|
-
appearance: none;
|
|
103
|
-
transition: border-color 350ms;
|
|
104
|
-
height: 2.75rem !important;
|
|
105
|
-
margin-bottom: 0;
|
|
106
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))}
|
|
107
|
-
${props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'))}
|
|
108
|
-
border: 1px solid;
|
|
109
|
-
${props => props.$noBorder || props.readOnly ? 'border-color: transparent !important' : props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'))};
|
|
110
|
-
|
|
111
|
-
${props => props.readOnly && css`
|
|
112
|
-
user-select: text;
|
|
113
|
-
cursor: default;
|
|
114
|
-
`}
|
|
115
|
-
|
|
116
|
-
${props => props.$warning && css`
|
|
117
|
-
border-color: ${props.theme.getColor('orange-500')} !important;
|
|
118
|
-
`}
|
|
119
|
-
${props => props.$error && css`
|
|
120
|
-
border-color: ${props.theme.getColor('red-500')} !important;
|
|
121
|
-
`}
|
|
122
|
-
${props => props.$hasIcon && css`
|
|
123
|
-
padding-left: 35px;
|
|
124
|
-
`}
|
|
125
|
-
|
|
126
|
-
&::placeholder {
|
|
127
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'), 1)}
|
|
128
|
-
|
|
129
|
-
${props => props.theme.themeProp('opacity', 0.6, 0.5, 1)}
|
|
130
|
-
}
|
|
131
|
-
&:focus {
|
|
132
|
-
outline: none !important;
|
|
133
|
-
box-shadow: none !important;
|
|
134
|
-
${props => props.theme.themeProp('border-color', props.theme.getColor('gray-400'), props.theme.getColor('gray-600'))}
|
|
135
|
-
${props => props.readOnly && css`
|
|
136
|
-
outline: none;
|
|
137
|
-
`}
|
|
138
|
-
}
|
|
139
|
-
&&:hover:not(:focus) {
|
|
140
|
-
${props => props.$noBorder ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-200')) : props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'))};
|
|
141
|
-
transition: background 350ms;
|
|
142
|
-
& + ${InputIconContainer} {
|
|
143
|
-
opacity: 1;
|
|
144
|
-
transition: opacity 350ms;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
`;
|
|
28
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
29
|
+
displayName: "TextInputstyled__TextInputField",
|
|
30
|
+
componentId: "sc-11se2z5-3"
|
|
31
|
+
})(["display:block;width:100%;font-family:inherit;font-size:0.875rem;line-height:1;padding:13px 10px;border-radius:3px;box-sizing:border-box;appearance:none;transition:border-color 350ms;height:2.75rem !important;margin-bottom:0;", " ", " border:1px solid;", ";", " ", " ", " ", " &::placeholder{", " ", "}&:focus{outline:none !important;box-shadow:none !important;", " ", "}&&:hover:not(:focus){", ";transition:background 350ms;& + ", "{opacity:1;transition:opacity 350ms;}}"], props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')), props => props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white')), props => props.$noBorder || props.readOnly ? 'border-color: transparent !important' : props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400')), props => props.readOnly && css(["user-select:text;cursor:default;"]), props => props.$warning && css(["border-color:", " !important;"], props.theme.getColor('orange-500')), props => props.$error && css(["border-color:", " !important;"], props.theme.getColor('red-500')), props => props.$hasIcon && css(["padding-left:35px;"]), props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'), 1), props => props.theme.themeProp('opacity', 0.6, 0.5, 1), props => props.theme.themeProp('border-color', props.theme.getColor('gray-400'), props.theme.getColor('gray-600')), props => props.readOnly && css(["outline:none;"]), props => props.$noBorder ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-200')) : props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')), InputIconContainer);
|
|
150
32
|
const TextInputLabel = styled.label.withConfig({
|
|
151
33
|
shouldForwardProp
|
|
152
|
-
}).attrs(applyDefaultTheme)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
line-height: 1.2;
|
|
157
|
-
font-size: 0.875rem;
|
|
158
|
-
transition: all 150ms;
|
|
159
|
-
|
|
160
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'))}
|
|
161
|
-
|
|
162
|
-
${props => props.theme.themeProp('opacity', 0.6, 0.5)}
|
|
163
|
-
|
|
164
|
-
${props => props.theme.themeProp('background', `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`, `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`)}
|
|
165
|
-
|
|
166
|
-
${props => (props.$hasPlaceholder || props.$hasAdornments) && css`
|
|
167
|
-
${activeLabel};
|
|
168
|
-
`}
|
|
169
|
-
|
|
170
|
-
${props => props.$hasIcon && css`
|
|
171
|
-
left: 35px;
|
|
172
|
-
`}
|
|
173
|
-
`;
|
|
34
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
35
|
+
displayName: "TextInputstyled__TextInputLabel",
|
|
36
|
+
componentId: "sc-11se2z5-4"
|
|
37
|
+
})(["position:absolute;top:15px;left:11px;line-height:1.2;font-size:0.875rem;transition:all 150ms;", " ", " ", " ", " ", ""], props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600')), props => props.theme.themeProp('opacity', 0.6, 0.5), props => props.theme.themeProp('background', `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`, `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`), props => (props.$hasPlaceholder || props.$hasAdornments) && css(["", ";"], activeLabel), props => props.$hasIcon && css(["left:35px;"]));
|
|
174
38
|
const TextInputFieldIcon = styled.div.withConfig({
|
|
175
39
|
shouldForwardProp
|
|
176
|
-
}).attrs(applyDefaultTheme)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
height: 2.625rem;
|
|
181
|
-
display: flex;
|
|
182
|
-
padding: 0 10px;
|
|
183
|
-
|
|
184
|
-
svg {
|
|
185
|
-
width: 15px;
|
|
186
|
-
opacity: 0.6;
|
|
187
|
-
transition: opacity 250ms;
|
|
188
|
-
}
|
|
189
|
-
`;
|
|
40
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
41
|
+
displayName: "TextInputstyled__TextInputFieldIcon",
|
|
42
|
+
componentId: "sc-11se2z5-5"
|
|
43
|
+
})(["position:absolute;top:0;left:0;height:2.625rem;display:flex;padding:0 10px;svg{width:15px;opacity:0.6;transition:opacity 250ms;}"]);
|
|
190
44
|
const TextInput = styled.div.withConfig({
|
|
191
45
|
shouldForwardProp
|
|
192
|
-
}).attrs(applyDefaultTheme)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
user-select: none;
|
|
197
|
-
opacity: 0.5;
|
|
198
|
-
cursor: not-allowed;
|
|
199
|
-
> * {
|
|
200
|
-
pointer-events: none;
|
|
201
|
-
}
|
|
202
|
-
`}
|
|
203
|
-
|
|
204
|
-
&:focus-within {
|
|
205
|
-
${TextInputLabel} {
|
|
206
|
-
${activeLabel};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
${TextInputFieldIcon} {
|
|
210
|
-
svg {
|
|
211
|
-
opacity: 1;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {
|
|
217
|
-
${activeLabel};
|
|
218
|
-
${props => props.$error && props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))}
|
|
219
|
-
|
|
220
|
-
${props => props.$error && css`
|
|
221
|
-
color: ${props.theme.getColor('red-500')};
|
|
222
|
-
`}
|
|
223
|
-
${props => props.$warning && css`
|
|
224
|
-
color: ${props.theme.getColor('orange-500')};
|
|
225
|
-
`}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
`;
|
|
46
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
47
|
+
displayName: "TextInputstyled__TextInput",
|
|
48
|
+
componentId: "sc-11se2z5-6"
|
|
49
|
+
})(["position:relative;", " &:focus-within{", "{", ";}", "{svg{opacity:1;}}}", ":not(:placeholder-shown) + ", "{", ";", " ", " ", "}}"], props => props.disabled && css(["user-select:none;opacity:0.5;cursor:not-allowed;> *{pointer-events:none;}"]), TextInputLabel, activeLabel, TextInputFieldIcon, TextInputField, TextInputLabel, activeLabel, props => props.$error && props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500')), props => props.$error && css(["color:", ";"], props.theme.getColor('red-500')), props => props.$warning && css(["color:", ";"], props.theme.getColor('orange-500')));
|
|
229
50
|
const Description = styled.p.withConfig({
|
|
230
51
|
shouldForwardProp
|
|
231
|
-
}).attrs(applyDefaultTheme)
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
line-height: 1.333;
|
|
236
|
-
|
|
237
|
-
${props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'))};
|
|
238
|
-
|
|
239
|
-
${props => props.$error && css`
|
|
240
|
-
${props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))}
|
|
241
|
-
`}
|
|
242
|
-
|
|
243
|
-
${props => props.$warning && css`
|
|
244
|
-
${props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('orange-500'))}
|
|
245
|
-
`}
|
|
246
|
-
`;
|
|
52
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
53
|
+
displayName: "TextInputstyled__Description",
|
|
54
|
+
componentId: "sc-11se2z5-7"
|
|
55
|
+
})(["margin:8px 0 0 0;padding:0 0.6875rem;font-size:0.75rem;line-height:1.333;", ";", " ", ""], props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500')), props => props.$error && css(["", ""], props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))), props => props.$warning && css(["", ""], props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('orange-500'))));
|
|
247
56
|
|
|
248
57
|
export { Adornment, Description, InputIconContainer, TextInput, TextInputField, TextInputFieldIcon, TextInputLabel, TextInputWrapper };
|
|
249
58
|
//# sourceMappingURL=TextInput.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.styled.js","sources":["../../../src/components/inputs/TextInput/TextInput.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst activeLabel = css`\n font-size: 0.75rem;\n padding: 0 3px;\n top: -7px;\n letter-spacing: 0.03em;\n left: 8px !important;\n opacity: 1 !important;\n`;\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const Adornment = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n flex-shrink: 0;\n font-family: inherit;\n font-size: 0.875rem;\n line-height: initial;\n padding: 13px 10px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )}\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n border: 1px solid;\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )}\n border-radius: 3px;\n ${props =>\n props.$isPrefix\n ? css`\n padding-right: 10px;\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n `\n : css`\n padding-left: 0;\n margin-left: -3px;\n border-left: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n `}\n box-sizing: border-box;\n appearance: none;\n transition: border-color 350ms;\n height: 2.75rem;\n\n ${props =>\n props.$warning &&\n css`\n border-color: ${props.theme.getColor('orange-500')} !important;\n `}\n ${props =>\n props.$error &&\n css`\n border-color: ${props.theme.getColor('red-500')} !important;\n `}\n`;\n\nexport const TextInputWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-content: center;\n\n &:focus-within {\n ${Adornment} {\n outline: none;\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('gray-600'),\n 1\n )}\n }\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-right: 4px;\n padding-left: 30px;\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.$warning && props.theme.themeProp('color', '#C3AF43', '#C3AF43')}\n\n ${props => props.$error && props.theme.themeProp('color', '#CB968F', '#CB968F')}\n\n > svg {\n width: 12px;\n }\n`;\n\nexport const TextInputField = styled.input\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: block;\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n line-height: 1;\n padding: 13px 10px;\n border-radius: 3px;\n box-sizing: border-box;\n appearance: none;\n transition: border-color 350ms;\n height: 2.75rem !important;\n margin-bottom: 0;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n border: 1px solid;\n ${props =>\n props.$noBorder || props.readOnly\n ? 'border-color: transparent !important'\n : props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )};\n\n ${props =>\n props.readOnly &&\n css`\n user-select: text;\n cursor: default;\n `}\n\n ${props =>\n props.$warning &&\n css`\n border-color: ${props.theme.getColor('orange-500')} !important;\n `}\n ${props =>\n props.$error &&\n css`\n border-color: ${props.theme.getColor('red-500')} !important;\n `}\n ${props =>\n props.$hasIcon &&\n css`\n padding-left: 35px;\n `}\n\n &::placeholder {\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600'),\n 1\n )}\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5, 1)}\n }\n &:focus {\n outline: none !important;\n box-shadow: none !important;\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-600')\n )}\n ${props =>\n props.readOnly &&\n css`\n outline: none;\n `}\n }\n &&:hover:not(:focus) {\n ${props =>\n props.$noBorder\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-200')\n )\n : props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )};\n transition: background 350ms;\n & + ${InputIconContainer} {\n opacity: 1;\n transition: opacity 350ms;\n }\n }\n\n\n`;\n\nexport const TextInputLabel = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 15px;\n left: 11px;\n line-height: 1.2;\n font-size: 0.875rem;\n transition: all 150ms;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )}\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n ${props =>\n props.theme.themeProp(\n 'background',\n `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`,\n `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`\n )}\n\n ${props =>\n (props.$hasPlaceholder || props.$hasAdornments) &&\n css`\n ${activeLabel};\n `}\n\n ${props =>\n props.$hasIcon &&\n css`\n left: 35px;\n `}\n`;\n\nexport const TextInputFieldIcon = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 0;\n left: 0;\n height: 2.625rem;\n display: flex;\n padding: 0 10px;\n\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n }\n`;\n\nexport const TextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n\n ${props =>\n props.disabled &&\n css`\n user-select: none;\n opacity: 0.5;\n cursor: not-allowed;\n > * {\n pointer-events: none;\n }\n `}\n\n &:focus-within {\n ${TextInputLabel} {\n ${activeLabel};\n }\n\n ${TextInputFieldIcon} {\n svg {\n opacity: 1;\n }\n }\n }\n\n ${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {\n ${activeLabel};\n ${props =>\n props.$error &&\n props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n\n ${props =>\n props.$error &&\n css`\n color: ${props.theme.getColor('red-500')};\n `}\n ${props =>\n props.$warning &&\n css`\n color: ${props.theme.getColor('orange-500')};\n `} \n } \n}\n`;\n\nexport const Description = styled.p\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n margin: 8px 0 0 0;\n padding: 0 0.6875rem;\n font-size: 0.75rem;\n line-height: 1.333;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n\n ${props =>\n props.$error &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `}\n\n ${props =>\n props.$warning &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `}\n`;\n"],"names":["activeLabel","css","shouldForwardProp","prop","startsWith","Adornment","styled","div","withConfig","attrs","applyDefaultTheme","props","theme","themeProp","getColor","$isPrefix","$warning","$error","TextInputWrapper","InputIconContainer","TextInputField","input","$noBorder","readOnly","$hasIcon","TextInputLabel","label","$hasPlaceholder","$hasAdornments","TextInputFieldIcon","TextInput","disabled","Description","p"],"mappings":";;;AAGA,MAAMA,WAAW,GAAGC,GAAG,CAAA;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,SAAS,GAAGC,MAAM,CAACC,GAAG,CAChCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,EAAIC,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL,EAAIH,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,CA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AAG,CAAA;AACP,MAAQU,EAAAA,KAAK,CAACC,KAAK,CAACC,SAAS,CACrB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,SAAS,CAAC,EAC/BH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,YAAY,CACnC,CAAC,CAAA;AACP,IAAK,CAAA,CAAA;AACL;;;;"}
|
|
1
|
+
{"version":3,"file":"TextInput.styled.js","sources":["../../../src/components/inputs/TextInput/TextInput.styled.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\n/*\n * A module-scope `css` helper with NO INTERPOLATIONS AT ALL, so it has no props and\n * takes no generic — and, unlike `CompactTextInput`'s `linkColor`, it is not subject to\n * the weak-type rule either: `RuleSet<object>` has nothing to overlap with, so it drops\n * into all three of its hosts (`TextInputLabel` and, twice, `TextInput`) unchanged.\n * §J.7, last paragraph.\n */\nconst activeLabel = css`\n font-size: 0.75rem;\n padding: 0 3px;\n top: -7px;\n letter-spacing: 0.03em;\n left: 8px !important;\n opacity: 1 !important;\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. Rules in\n * `layout/SectionSeparator/SectionSeparator.styled.ts`, derivation in\n * `scripts/TS-MIGRATION-PLAYBOOK.md` §J.4. `prop` needs the annotation because\n * `withConfig` takes this by reference, so it gets no contextual typing.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\n/**\n * The validation pair that five of this file's seven styled components carry.\n *\n * `boolean` for both, and NOT the `bool | string` that `error`'s and `warning`'s own\n * propTypes allow: `TextInput.tsx` derives `hasError` / `hasWarning`\n * (`isBoolean(x) ? x : !isEmpty(x)`) and passes those, keeping the message text for\n * `Description`'s children. §J.6, rule 2 — the JSX site says which value arrives.\n */\nexport interface ValidationStyleProps {\n /** `hasError` — red border / red message. */\n $error?: boolean;\n /** `hasWarning` — orange border / orange message. */\n $warning?: boolean;\n}\n\n/*\n * `Adornment` IS ALSO PASSED `htmlFor`, AND THAT IS A DEFECT — recorded here, not fixed\n * here, and not declared because this template never reads it.\n *\n * `TextInput.tsx` renders the PREFIX adornment as\n * `<S.Adornment htmlFor={`text-input-${uniqueId}`} …>` (the suffix one, 50 lines below,\n * has no `htmlFor`) — but this is a `styled.div`, `htmlFor` has no `$`, and\n * `shouldForwardProp` forwards it, so React emits `for=\"text-input-…\"` ON A `<div>`.\n * That attribute is meaningless outside `<label>`/`<output>` and it is in the recorded\n * render baseline. The click-to-focus this was reaching for is already implemented by\n * the `onClick` handler next to it. The fix — make it a `styled.label`, or drop the\n * prop — changes the rendered DOM either way, so it belongs to C10 with its baseline\n * re-record. §E.4 third case.\n */\nexport const Adornment = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<\n ValidationStyleProps & {\n /**\n * `true` on the prefix adornment and `false` on the suffix one — the JSX passes\n * both literals explicitly, so this is `boolean` and the `else` arm is live.\n */\n $isPrefix?: boolean;\n }\n >(applyDefaultTheme)`\n flex-shrink: 0;\n font-family: inherit;\n font-size: 0.875rem;\n line-height: initial;\n padding: 13px 10px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )}\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n border: 1px solid;\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )}\n border-radius: 3px;\n ${props =>\n props.$isPrefix\n ? css`\n padding-right: 10px;\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n `\n : css`\n padding-left: 0;\n margin-left: -3px;\n border-left: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n `}\n box-sizing: border-box;\n appearance: none;\n transition: border-color 350ms;\n height: 2.75rem;\n\n ${props =>\n props.$warning &&\n css`\n border-color: ${props.theme.getColor('orange-500')} !important;\n `}\n ${props =>\n props.$error &&\n css`\n border-color: ${props.theme.getColor('red-500')} !important;\n `}\n`;\n\nexport const TextInputWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-content: center;\n\n &:focus-within {\n ${Adornment} {\n outline: none;\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('gray-600'),\n 1\n )}\n }\n }\n`;\n\nexport const InputIconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<ValidationStyleProps>(applyDefaultTheme)`\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n padding-right: 4px;\n padding-left: 30px;\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.$warning && props.theme.themeProp('color', '#C3AF43', '#C3AF43')}\n\n ${props => props.$error && props.theme.themeProp('color', '#CB968F', '#CB968F')}\n\n > svg {\n width: 12px;\n }\n`;\n\n/*\n * `readOnly` is read three times below and is deliberately NOT declared: on a\n * `styled.input` it is a genuine `InputHTMLAttributes` member, so the reads already\n * typecheck and the attribute belongs on the element. §J.9, first row — the case that\n * costs nothing. (On `Radio`'s and `Switch`'s roots the same name IS a defect, because\n * those are a `<label>` and a `<div>`.)\n */\nexport const TextInputField = styled.input\n .withConfig({\n shouldForwardProp\n })\n .attrs<\n ValidationStyleProps & {\n /** `noBorder` — `PropTypes.bool`, component default `false`. */\n $noBorder?: boolean;\n /** `Boolean(icon)` — derived, so `boolean` and not `icon`'s element type. */\n $hasIcon?: boolean;\n }\n >(applyDefaultTheme)`\n display: block;\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n line-height: 1;\n padding: 13px 10px;\n border-radius: 3px;\n box-sizing: border-box;\n appearance: none;\n transition: border-color 350ms;\n height: 2.75rem !important;\n margin-bottom: 0;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n border: 1px solid;\n ${props =>\n props.$noBorder || props.readOnly\n ? 'border-color: transparent !important'\n : props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )};\n\n ${props =>\n props.readOnly &&\n css`\n user-select: text;\n cursor: default;\n `}\n\n ${props =>\n props.$warning &&\n css`\n border-color: ${props.theme.getColor('orange-500')} !important;\n `}\n ${props =>\n props.$error &&\n css`\n border-color: ${props.theme.getColor('red-500')} !important;\n `}\n ${props =>\n props.$hasIcon &&\n css`\n padding-left: 35px;\n `}\n\n &::placeholder {\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600'),\n 1\n )}\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5, 1)}\n }\n &:focus {\n outline: none !important;\n box-shadow: none !important;\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-600')\n )}\n ${props =>\n props.readOnly &&\n css`\n outline: none;\n `}\n }\n &&:hover:not(:focus) {\n ${props =>\n props.$noBorder\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-200')\n )\n : props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )};\n transition: background 350ms;\n & + ${InputIconContainer} {\n opacity: 1;\n transition: opacity 350ms;\n }\n }\n\n\n`;\n\n/*\n * `TextInput.tsx` ALSO passes `$error` here and this template never reads it — a dead\n * pass, so it is NOT declared (rule 2: declare only what is read). It is harmless\n * rather than a DOM leak, because the `$` keeps it out of the DOM; the error colouring\n * of this label is done by the parent's\n * `${TextInputField}:not(:placeholder-shown) + ${TextInputLabel}` block instead. Fix\n * (type-only, but out of this bucket's scope): stop passing it.\n */\nexport const TextInputLabel = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs<{\n /** `Boolean(placeholder)` — floats the label out of the field. */\n $hasPlaceholder?: boolean;\n /** `Boolean(prefix || suffix)` — same effect, for the adornment case. */\n $hasAdornments?: boolean;\n /** `Boolean(icon)` — shifts the label right of the icon. */\n $hasIcon?: boolean;\n }>(applyDefaultTheme)`\n position: absolute;\n top: 15px;\n left: 11px;\n line-height: 1.2;\n font-size: 0.875rem;\n transition: all 150ms;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )}\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n ${props =>\n props.theme.themeProp(\n 'background',\n `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`,\n `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`\n )}\n\n ${props =>\n (props.$hasPlaceholder || props.$hasAdornments) &&\n css`\n ${activeLabel};\n `}\n\n ${props =>\n props.$hasIcon &&\n css`\n left: 35px;\n `}\n`;\n\nexport const TextInputFieldIcon = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 0;\n left: 0;\n height: 2.625rem;\n display: flex;\n padding: 0 10px;\n\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n }\n`;\n\n/*\n * `disabled` HAS NO `$`, AND THAT IS A DEFECT — declared here, not fixed here.\n *\n * `TextInput.tsx` renders `<S.TextInput $error=… disabled={disabled} $warning=… …>` on a\n * `styled.div`; `disabled` is not a member of `HTMLAttributes<HTMLDivElement>`, which is\n * why the read below was TS2339, and `shouldForwardProp` forwards every non-`$` prop, so\n * `disabled=\"\"` is on the rendered wrapper `<div>` today and is in the recorded render\n * baseline. The fix is to rename it `$disabled` at both ends; that removes a DOM\n * attribute, so it belongs to C10 with its baseline re-record and must not ride along in\n * a type-only commit. §E.4 third case, §J.9.\n */\nexport const TextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<\n ValidationStyleProps & {\n /** `disabled` — `PropTypes.bool`. Leaks to the DOM; see above. */\n disabled?: boolean;\n }\n >(applyDefaultTheme)`\n position: relative;\n\n ${props =>\n props.disabled &&\n css`\n user-select: none;\n opacity: 0.5;\n cursor: not-allowed;\n > * {\n pointer-events: none;\n }\n `}\n\n &:focus-within {\n ${TextInputLabel} {\n ${activeLabel};\n }\n\n ${TextInputFieldIcon} {\n svg {\n opacity: 1;\n }\n }\n }\n\n ${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {\n ${activeLabel};\n ${props =>\n props.$error &&\n props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n\n ${props =>\n props.$error &&\n css`\n color: ${props.theme.getColor('red-500')};\n `}\n ${props =>\n props.$warning &&\n css`\n color: ${props.theme.getColor('orange-500')};\n `} \n } \n}\n`;\n\nexport const Description = styled.p\n .withConfig({\n shouldForwardProp\n })\n .attrs<ValidationStyleProps>(applyDefaultTheme)`\n margin: 8px 0 0 0;\n padding: 0 0.6875rem;\n font-size: 0.75rem;\n line-height: 1.333;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n\n ${props =>\n props.$error &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `}\n\n ${props =>\n props.$warning &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `}\n`;\n"],"names":["activeLabel","css","shouldForwardProp","prop","startsWith","Adornment","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","theme","themeProp","getColor","$isPrefix","$warning","$error","TextInputWrapper","InputIconContainer","TextInputField","input","$noBorder","readOnly","$hasIcon","TextInputLabel","label","$hasPlaceholder","$hasAdornments","TextInputFieldIcon","TextInput","disabled","Description","p"],"mappings":";;;AAUA,MAAMA,WAAW,GAAGC,GAAG,CAAA,CAAA,0GAAA,CAAA,CAOtB;AASD,MAAMC,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AA+BM,MAAMC,SAAS,GAAGC,MAAM,CAACC,GAAG,CAChCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAQJC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,4BAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,6FAAA,EAAA,GAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,sFAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EAOlBC,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,EACDH,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,EAEDH,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,cAAc,EACdF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,EAEDH,KAAK,IACLA,KAAK,CAACI,SAAS,GACXhB,GAAG,CAAA,CAAA,2FAAA,CAAA,CAAA,GAMHA,GAAG,CAAA,CAAA,qG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AA,CAAA,2EAAA,EAAA,GAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EAM7CC,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,EAEDH,KAAK,IACLA,KAAK,CAACM,MAAM,IACZlB,GAAG,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,EACCY,KAAK,CAACC,KAAK,CAACC,SAAS,CACrB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,SAAS,CAAC,EAC/BH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,SAAS,CAChC,CAAC,CACF,EAEDH,KAAK,IACLA,KAAK,CAACK,QAAQ,IACdjB,GAAG,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,EACCY,KAAK,CAACC,KAAK,CAACC,SAAS,CACrB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,SAAS,CAAC,EAC/BH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,YAAY,CACnC,CAAC,CACF;;;;"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import React__default from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
2
|
import { InputGroup as InputGroup$1 } from './InputGroup.styled.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
4
|
|
|
6
5
|
const InputGroup = React__default.forwardRef(function InputGroup({
|
|
7
6
|
children,
|
|
8
7
|
...props
|
|
9
8
|
}, forwardedRef) {
|
|
10
|
-
return
|
|
11
|
-
ref: forwardedRef
|
|
12
|
-
|
|
9
|
+
return jsx(InputGroup$1, {
|
|
10
|
+
ref: forwardedRef,
|
|
11
|
+
...props,
|
|
12
|
+
children: children
|
|
13
|
+
});
|
|
13
14
|
});
|
|
14
|
-
InputGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
15
|
-
children: PropTypes.node
|
|
16
|
-
} : {};
|
|
17
|
-
InputGroup.defaultProps = {};
|
|
18
15
|
|
|
19
16
|
export { InputGroup as default };
|
|
20
17
|
//# sourceMappingURL=InputGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.js","sources":["../../../src/components/layout/InputGroup/InputGroup.
|
|
1
|
+
{"version":3,"file":"InputGroup.js","sources":["../../../src/components/layout/InputGroup/InputGroup.tsx"],"sourcesContent":["import React from 'react';\nimport * as S from './InputGroup.styled';\n\ntype InputGroupOwnProps = {\n /**\n * An array of inputs – e.g. `<CompactTextInput>`\n */\n children?: React.ReactNode;\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.InputGroup`, 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 InputGroupOwnProps`);\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 Props = Omit<React.ComponentPropsWithoutRef<typeof S.InputGroup>, keyof InputGroupOwnProps> &\n InputGroupOwnProps;\n\n/**\n * Wrapper component to visually group related inputs by adding space above/below the group.\n *\n * ### Import\n *\n * ``` js\n * import { InputGroup } from '@ntbjs/react-components/layout'\n * // or\n * import InputGroup from '@ntbjs/react-components/layout/InputGroup'\n * ```\n *\n * ### Usage example\n * Pass an array of input elements to the `InputGroup` as its children:\n *\n * ``` js\nconst item1 = <CompactTextInput label=\"Size\" type=\"text\" value=\"4369 x 2913 px\" />;\nconst item2 = <CompactTextInput label=\"Resolution\" type=\"text\" value=\"300 dpi 37.0 x 24.7 cm px\" />;\nconst item3 = <CompactTextInput label=\"File size\" type=\"text\" value=\"7.22 MB\" />;\n\nconst inputGroup = <InputGroup>{[item1, item2, item3, item4]}</InputGroup>;\n * ```\n */\nconst InputGroup = React.forwardRef<any, Props>(function InputGroup(\n { children, ...props },\n forwardedRef\n) {\n return (\n <S.InputGroup ref={forwardedRef} {...props}>\n {children}\n </S.InputGroup>\n );\n});\n\nexport default InputGroup;\n"],"names":["InputGroup","React","forwardRef","children","props","forwardedRef","_jsx","S","ref"],"mappings":";;;;AA0CA,MAAMA,UAAU,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,UAAUA,CACjE;EAAEG,QAAQ;EAAE,GAAGC;AAAM,CAAC,EACtBC,YAAY,EACZ;AACA,EAAA,OACEC,GAAA,CAACC,YAAY,EAAA;AAACC,IAAAA,GAAG,EAAEH,YAAa;AAAA,IAAA,GAAKD,KAAK;AAAAD,IAAAA,QAAA,EACvCA;AAAQ,GACG,CAAC;AAEnB,CAAC;;;;"}
|
|
@@ -6,9 +6,10 @@ const shouldForwardProp = prop => {
|
|
|
6
6
|
};
|
|
7
7
|
const InputGroup = styled.div.withConfig({
|
|
8
8
|
shouldForwardProp
|
|
9
|
-
}).attrs(applyDefaultTheme)
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
10
|
+
displayName: "InputGroupstyled__InputGroup",
|
|
11
|
+
componentId: "sc-pf7v2r-0"
|
|
12
|
+
})(["margin:8px 0;"]);
|
|
12
13
|
|
|
13
14
|
export { InputGroup };
|
|
14
15
|
//# sourceMappingURL=InputGroup.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.styled.js","sources":["../../../src/components/layout/InputGroup/InputGroup.styled.
|
|
1
|
+
{"version":3,"file":"InputGroup.styled.js","sources":["../../../src/components/layout/InputGroup/InputGroup.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 * NO GENERIC HERE, AND THAT IS THE CORRECT OUTCOME, NOT AN OMISSION. The single template\n * below is one static declaration with no interpolation at all, and `InputGroup.tsx`\n * passes nothing but `children` and a `{...props}` spread. Rule 2: declare only what the\n * component actually passes. This file entered the styled-generics bucket at 0 errors and\n * the only change it needs is the `shouldForwardProp` parameter annotation.\n */\nimport styled from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\n/*\n * Single-argument, and it stays that way — peer floor `styled-components: >=5.1.0`, and\n * the two majors disagree on the second parameter. §J.4. `prop` needs the annotation\n * because `withConfig` takes this by reference, so it gets no contextual typing and\n * `prop.startsWith` would otherwise go unchecked.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const InputGroup = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n margin: 8px 0;\n`;\n"],"names":["shouldForwardProp","prop","startsWith","InputGroup","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId"],"mappings":";;;AAoBA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,UAAU,GAAGC,MAAM,CAACC,GAAG,CACjCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,8BAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,eAAA,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import React__default from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
2
|
import { SectionSeparator as SectionSeparator$1 } from './SectionSeparator.styled.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
4
|
|
|
6
5
|
const SectionSeparator = React__default.forwardRef(function SectionSeparator({
|
|
7
6
|
vertical = false,
|
|
8
7
|
margin = 0,
|
|
9
8
|
...props
|
|
10
9
|
}, forwardedRef) {
|
|
11
|
-
return
|
|
10
|
+
return jsx(SectionSeparator$1, {
|
|
12
11
|
$vertical: vertical,
|
|
13
12
|
$margin: margin,
|
|
14
|
-
ref: forwardedRef
|
|
15
|
-
|
|
13
|
+
ref: forwardedRef,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
16
|
});
|
|
17
|
-
SectionSeparator.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
18
|
-
vertical: PropTypes.bool,
|
|
19
|
-
margin: PropTypes.number
|
|
20
|
-
} : {};
|
|
21
17
|
|
|
22
18
|
export { SectionSeparator as default };
|
|
23
19
|
//# sourceMappingURL=SectionSeparator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionSeparator.js","sources":["../../../src/components/layout/SectionSeparator/SectionSeparator.
|
|
1
|
+
{"version":3,"file":"SectionSeparator.js","sources":["../../../src/components/layout/SectionSeparator/SectionSeparator.tsx"],"sourcesContent":["import React from 'react';\nimport * as S from './SectionSeparator.styled';\n\ntype SectionSeparatorOwnProps = {\n /**\n * Whether the section separator should be displayed vertically.\n */\n vertical?: boolean;\n /**\n * Padding in pixels to apply to the separator.\n */\n margin?: number;\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.SectionSeparator`, 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 SectionSeparatorOwnProps`);\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 Props = Omit<\n React.ComponentPropsWithoutRef<typeof S.SectionSeparator>,\n keyof SectionSeparatorOwnProps\n> &\n SectionSeparatorOwnProps;\n\n/**\n * Section separators are used to separate sections in the UI.\n * It will fill 100% of the width or height of its parent container by default.\n *\n *\n * ### Import\n *\n * ``` js\n * import { SectionSeparator } from '@ntbjs/react-components/layout'\n * // or\n * import SectionSeparator from '@ntbjs/react-components/layout/SectionSeparator'\n * ```\n *\n */\nconst SectionSeparator = React.forwardRef<any, Props>(function SectionSeparator(\n { vertical = false, margin = 0, ...props },\n forwardedRef\n) {\n return <S.SectionSeparator $vertical={vertical} $margin={margin} ref={forwardedRef} {...props} />;\n});\n\nexport default SectionSeparator;\n"],"names":["SectionSeparator","React","forwardRef","vertical","margin","props","forwardedRef","_jsx","S","$vertical","$margin","ref"],"mappings":";;;;AAyCA,MAAMA,gBAAgB,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,gBAAgBA,CAC7E;AAAEG,EAAAA,QAAQ,GAAG,KAAK;AAAEC,EAAAA,MAAM,GAAG,CAAC;EAAE,GAAGC;AAAM,CAAC,EAC1CC,YAAY,EACZ;AACA,EAAA,OAAOC,GAAA,CAACC,kBAAkB,EAAA;AAACC,IAAAA,SAAS,EAAEN,QAAS;AAACO,IAAAA,OAAO,EAAEN,MAAO;AAACO,IAAAA,GAAG,EAAEL,YAAa;IAAA,GAAKD;AAAK,GAAG,CAAC;AACnG,CAAC;;;;"}
|
|
@@ -6,14 +6,10 @@ const shouldForwardProp = prop => {
|
|
|
6
6
|
};
|
|
7
7
|
const SectionSeparator = styled.div.withConfig({
|
|
8
8
|
shouldForwardProp
|
|
9
|
-
}).attrs(applyDefaultTheme)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
${props => props.$vertical ? `margin-left: ${props.$margin}px; margin-right: ${props.$margin}px;` : `margin-top: ${props.$margin}px; margin-bottom: ${props.$margin}px;`}
|
|
14
|
-
|
|
15
|
-
${props => props.theme.themeProp('background-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-200'))}
|
|
16
|
-
`;
|
|
9
|
+
}).attrs(applyDefaultTheme).withConfig({
|
|
10
|
+
displayName: "SectionSeparatorstyled__SectionSeparator",
|
|
11
|
+
componentId: "sc-i4fg49-0"
|
|
12
|
+
})(["height:", ";width:", ";", " ", ""], props => props.$vertical ? '100%' : '1px', props => props.$vertical ? '1px' : '100%', props => props.$vertical ? `margin-left: ${props.$margin}px; margin-right: ${props.$margin}px;` : `margin-top: ${props.$margin}px; margin-bottom: ${props.$margin}px;`, props => props.theme.themeProp('background-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-200')));
|
|
17
13
|
|
|
18
14
|
export { SectionSeparator };
|
|
19
15
|
//# sourceMappingURL=SectionSeparator.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionSeparator.styled.js","sources":["../../../src/components/layout/SectionSeparator/SectionSeparator.styled.
|
|
1
|
+
{"version":3,"file":"SectionSeparator.styled.js","sources":["../../../src/components/layout/SectionSeparator/SectionSeparator.styled.ts"],"sourcesContent":["/**\n * ===========================================================================\n * THE `$`-TRANSIENT-PROP PATTERN — REFERENCE IMPLEMENTATION\n *\n * This is the smallest of the 36 `*.styled.ts` files that has transient props,\n * which is why the rules live here: they and the smallest instance of them fit\n * on one screen. Full derivation, measurements and the two illegal forms are in\n * `scripts/TS-MIGRATION-PLAYBOOK.md` §J. The other two worked examples are\n * `widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.ts`\n * (chain shapes) and `inputs/CompactTextInput/CompactTextInput.styled.ts`\n * (`.attrs()` callbacks, nested `css` blocks, closed unions).\n *\n * 1. WHERE THE GENERIC GOES.\n * chain has `.attrs()` → `.attrs<Props>(applyDefaultTheme)`\n * chain has no `.attrs()` → on the tagged-template call:\n * styled.img.withConfig({…})<Props>`…`\n * NEVER `styled.div<Props>.withConfig({…})` — TS1477, an instantiation\n * expression cannot be followed by a property access. NEVER\n * `withConfig<Props>({…})` — TS2558, `withConfig` is not generic in v6\n * (only `attrs` and the template call are).\n *\n * When there IS an `.attrs()` this is not a preference: a generic on the\n * template call does not reach the `.attrs()` CALLBACK's parameter, so a\n * prop read in there has no fix other than a suppression. §J.2.\n *\n * 2. DECLARE ONLY WHAT THE COMPONENT ACTUALLY PASSES. Here `SectionSeparator.tsx`\n * passes exactly `$vertical` and `$margin`. A key the template reads but the\n * component never passes is a dead branch, not a prop — playbook §E.4.\n *\n * 3. EVERY TRANSIENT PROP IS OPTIONAL. `required` is not a stricter version of\n * this, it is broken: `<X />`, `<X {...props} />` and `styled(X)` all become\n * TS2769. It is also untrue — nothing supplies a default, because\n * `applyDefaultTheme` contributes only `theme`. §J.5.\n *\n * 4. VALUE TYPES COME FROM `propTypes`, NOT FROM `any`. `vertical: PropTypes.bool`\n * → `boolean`; `margin: PropTypes.number` → `number`. Closed unions elsewhere\n * turn a mistyped state string into TS2367 instead of a branch that never\n * fires. §J.6.\n *\n * 5. THIS CANNOT CHANGE RENDERED CSS. `shouldForwardProp` filters on the runtime\n * `$` prefix and the annotations erase to nothing under Babel. `npm run verify`\n * must stay green with `scripts/r19-harness/baseline.json` and all 592 PNGs\n * byte-unchanged. If the render gate moves, a prop's DOM forwarding changed:\n * investigate per §F.2, never re-record. §J.8.\n * ===========================================================================\n */\nimport styled from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\n/**\n * Props of the styled root, i.e. `SectionSeparator.tsx`'s `vertical` / `margin`\n * carried across the `shouldForwardProp` boundary.\n */\nexport interface SectionSeparatorStyleProps {\n /** `vertical` — swaps which axis gets the 1px hairline and which gets 100%. */\n $vertical?: boolean;\n /**\n * `margin` — px, interpolated as `${props.$margin}px`, so `number` and not\n * `number | string`: a string here would already render `margin-top: 8pxpx`.\n */\n $margin?: number;\n}\n\n/*\n * SINGLE-ARGUMENT, AND IT STAYS THAT WAY. `package.json#peerDependencies` allows\n * `styled-components: >=5.1.0`, and the second parameter differs between majors\n * (v6 `elementToBeCreated`, v5.1 `defaultValidatorFn`). A one-parameter function\n * is assignable to both, so this form is the only one correct on both — do not\n * annotate it as v6's `ShouldForwardProp<'web'>` and do not read a 2nd argument.\n *\n * `prop` needs the annotation because `withConfig` receives this BY REFERENCE and\n * so gives it no contextual typing; without it, `prop.startsWith` is unchecked.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const SectionSeparator = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<SectionSeparatorStyleProps>(applyDefaultTheme)`\n height: ${props => (props.$vertical ? '100%' : '1px')};\n width: ${props => (props.$vertical ? '1px' : '100%')};\n\n ${props =>\n props.$vertical\n ? `margin-left: ${props.$margin}px; margin-right: ${props.$margin}px;`\n : `margin-top: ${props.$margin}px; margin-bottom: ${props.$margin}px;`}\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-200')\n )}\n`;\n"],"names":["shouldForwardProp","prop","startsWith","SectionSeparator","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","$vertical","$margin","theme","themeProp","getColor"],"mappings":";;;AAyEA,MAAMA,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,CAA6BC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,0CAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,SAAA,EAAA,SAAA,EAAA,GAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EAC3CC,KAAK,IAAKA,KAAK,CAACC,SAAS,GAAG,MAAM,GAAG,KAAM,EAC5CD,KAAK,IAAKA,KAAK,CAACC,SAAS,GAAG,KAAK,GAAG,MAAO,EAElDD,KAAK,IACLA,KAAK,CAACC,SAAS,GACX,CAAA,aAAA,EAAgBD,KAAK,CAACE,OAAO,CAAA,kBAAA,EAAqBF,KAAK,CAACE,OAAO,KAAK,GACpE,CAAA,YAAA,EAAeF,KAAK,CAACE,OAAO,CAAA,mBAAA,EAAsBF,KAAK,CAACE,OAAO,CAAA,GAAA,CAAK,EAExEF,KAAK,IACLA,KAAK,CAACG,KAAK,CAACC,SAAS,CACnB,kBAAkB,EAClBJ,KAAK,CAACG,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCL,KAAK,CAACG,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC;;;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-written types for colors-export.js.
|
|
3
|
+
*
|
|
4
|
+
* ============================ WHY BY HAND ================================
|
|
5
|
+
* NEVER DERIVE THIS FROM THE .js WITH `keyof typeof`.
|
|
6
|
+
*
|
|
7
|
+
* It works locally, because the library compiles with `allowJs`. It collapses
|
|
8
|
+
* silently in the consumer, which does not: with no `allowJs`, TypeScript cannot
|
|
9
|
+
* read colors-export.js at all, `keyof typeof colors` degrades to
|
|
10
|
+
* `string | number | symbol` WITH NO DIAGNOSTIC, and `colors[name]` inside a
|
|
11
|
+
* template string then emits TS2731 — an error in OUR file, appearing only in
|
|
12
|
+
* THEIR build. A hand-written .d.ts resolves under every `moduleResolution` mode
|
|
13
|
+
* with or without `allowJs`.
|
|
14
|
+
*
|
|
15
|
+
* The cost is that this is a THIRD hand-maintained copy of the palette, beside
|
|
16
|
+
* src/styles/.config.scss and colors-export.js. That is what
|
|
17
|
+
* `npm run verify:palette` (scripts/ts-migration/verify-palette.cjs) is for: it
|
|
18
|
+
* makes drift a build failure rather than a silent `undefined` at runtime. Add a
|
|
19
|
+
* colour to the .js and this union without the other and the gate names it.
|
|
20
|
+
* =========================================================================
|
|
21
|
+
*
|
|
22
|
+
* src/styles stays .js permanently (playbook §A.1) and rollup copies the whole
|
|
23
|
+
* directory verbatim into the published `styles/` and `build/styles/` trees, so
|
|
24
|
+
* this file ships NEXT TO its .js and
|
|
25
|
+
* `@ntbjs/react-components/styles/utils/colors-export` gains types where it
|
|
26
|
+
* previously resolved none. A `.d.ts` is explicitly allowed by
|
|
27
|
+
* scripts/assert-no-published-typescript.cjs for exactly this reason; a `.ts`
|
|
28
|
+
* there would be raw TypeScript in a published package.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Every registered design-token colour name.
|
|
33
|
+
*
|
|
34
|
+
* `theme.getColor` takes this union, so `getColor('emerald-999')` is a compile
|
|
35
|
+
* error instead of a `throw` from inside a styled template at runtime.
|
|
36
|
+
*/
|
|
37
|
+
export type ColorName =
|
|
38
|
+
| 'orange-600'
|
|
39
|
+
| 'orange-500'
|
|
40
|
+
| 'orange-400'
|
|
41
|
+
| 'emerald-600'
|
|
42
|
+
| 'emerald-500'
|
|
43
|
+
| 'emerald-400'
|
|
44
|
+
| 'emerald-300'
|
|
45
|
+
| 'emerald-200'
|
|
46
|
+
| 'gray-900'
|
|
47
|
+
| 'gray-800'
|
|
48
|
+
| 'gray-700'
|
|
49
|
+
| 'gray-600'
|
|
50
|
+
| 'gray-500'
|
|
51
|
+
| 'gray-400'
|
|
52
|
+
| 'gray-300'
|
|
53
|
+
| 'gray-200'
|
|
54
|
+
| 'gray-100'
|
|
55
|
+
| 'gray-50'
|
|
56
|
+
| 'cercise-500'
|
|
57
|
+
| 'cercise-400'
|
|
58
|
+
| 'cercise-300'
|
|
59
|
+
| 'cercise-200'
|
|
60
|
+
| 'cercise-100'
|
|
61
|
+
| 'red-600'
|
|
62
|
+
| 'red-500'
|
|
63
|
+
| 'red-200'
|
|
64
|
+
| 'brown-500'
|
|
65
|
+
| 'signal-yellow-500'
|
|
66
|
+
| 'signal-yellow-400'
|
|
67
|
+
| 'signal-green-500'
|
|
68
|
+
| 'signal-green-400'
|
|
69
|
+
| 'black'
|
|
70
|
+
| 'white';
|
|
71
|
+
|
|
72
|
+
/** The palette itself: every `ColorName` mapped to a `#rrggbb` string. */
|
|
73
|
+
export declare const colors: Record<ColorName, string>;
|