@procore/core-react 12.25.2 → 12.26.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/.jest/ckeditorMock.js +67 -0
- package/.jest/esToolkitMock.js +23 -0
- package/.jest/example.test.js +5 -0
- package/.jest/fileMock.js +1 -0
- package/.jest/public/avatar.png +0 -0
- package/.jest/setupTests.js +31 -0
- package/.jest/snapshotResolver.js +47 -0
- package/.jest/styleMock.js +1 -0
- package/.jest/styledV6PropsMock.js +23 -0
- package/.jest/svgTransform.js +10 -0
- package/.jest/testShims.js +22 -0
- package/.jest/translationMock.js +3 -0
- package/.jest/videoMock.js +1 -0
- package/CHANGELOG.md +17 -0
- package/README.md +49 -3
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/AvatarStack/mocks/getAvatarMocks.d.ts +25 -0
- package/dist/AvatarStack/mocks/getAvatarMocks.js +305 -0
- package/dist/AvatarStack/mocks/getAvatarMocks.js.map +1 -0
- package/dist/AvatarStack/mocks/images.d.ts +2 -0
- package/dist/AvatarStack/mocks/images.js +13 -0
- package/dist/AvatarStack/mocks/images.js.map +1 -0
- package/dist/AvatarStack/mocks/img/1.png +0 -0
- package/dist/AvatarStack/mocks/img/2.png +0 -0
- package/dist/AvatarStack/mocks/img/3.png +0 -0
- package/dist/AvatarStack/mocks/img/4.png +0 -0
- package/dist/AvatarStack/mocks/img/5.png +0 -0
- package/dist/AvatarStack/mocks/logo/1.png +0 -0
- package/dist/AvatarStack/mocks/logo/2.png +0 -0
- package/dist/AvatarStack/mocks/logo/3.png +0 -0
- package/dist/AvatarStack/mocks/logo/4.png +0 -0
- package/dist/AvatarStack/mocks/logo/5.png +0 -0
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.d.ts +19 -0
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.js +159 -0
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.js.map +1 -0
- package/dist/{TextEditor/TextEditor.styles.js → DeprecatedTextEditor/DeprecatedTextEditor.styles.js} +1 -1
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.styles.js.map +1 -0
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.types.d.ts +72 -0
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.types.js +2 -0
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.types.js.map +1 -0
- package/dist/DeprecatedTextEditor/index.d.ts +2 -0
- package/dist/DeprecatedTextEditor/index.js +3 -0
- package/dist/DeprecatedTextEditor/index.js.map +1 -0
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.d.ts +12 -0
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.js +45 -0
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.js.map +1 -0
- package/dist/{TextEditorOutput/TextEditorOutput.styles.js → DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.styles.js} +2 -2
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.styles.js.map +1 -0
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.types.d.ts +16 -0
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.types.js +2 -0
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.types.js.map +1 -0
- package/dist/DeprecatedTextEditorOutput/index.d.ts +2 -0
- package/dist/DeprecatedTextEditorOutput/index.js +2 -0
- package/dist/DeprecatedTextEditorOutput/index.js.map +1 -0
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/EmptyState/assets/default.stories.png +0 -0
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileList/storybook/fileListMockData.d.ts +5 -0
- package/dist/FileList/storybook/fileListMockData.js +34 -0
- package/dist/FileList/storybook/fileListMockData.js.map +1 -0
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +1 -30
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/GroupSelect/mocks/groupSelectMockData.d.ts +18 -0
- package/dist/GroupSelect/mocks/groupSelectMockData.js +122 -0
- package/dist/GroupSelect/mocks/groupSelectMockData.js.map +1 -0
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +15 -15
- package/dist/Modal/Modal.styles.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextTextEditor/EditorError.d.ts +2 -0
- package/dist/NextTextEditor/EditorError.js +9 -0
- package/dist/NextTextEditor/EditorError.js.map +1 -0
- package/dist/NextTextEditor/NextTextEditor.d.ts +3 -0
- package/dist/NextTextEditor/NextTextEditor.js +156 -0
- package/dist/NextTextEditor/NextTextEditor.js.map +1 -0
- package/dist/NextTextEditor/NextTextEditor.styles.d.ts +5 -0
- package/dist/NextTextEditor/NextTextEditor.styles.js +22 -0
- package/dist/NextTextEditor/NextTextEditor.styles.js.map +1 -0
- package/dist/NextTextEditor/NextTextEditor.types.d.ts +111 -0
- package/dist/NextTextEditor/NextTextEditor.types.js +2 -0
- package/dist/NextTextEditor/NextTextEditor.types.js.map +1 -0
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.types.d.ts +5 -0
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.types.js +2 -0
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.types.js.map +1 -0
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.utils.d.ts +3 -0
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.utils.js +153 -0
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.utils.js.map +1 -0
- package/dist/NextTextEditor/StickyToolbar/index.d.ts +4 -0
- package/dist/NextTextEditor/StickyToolbar/index.js +3 -0
- package/dist/NextTextEditor/StickyToolbar/index.js.map +1 -0
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.d.ts +2 -0
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.js +49 -0
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.js.map +1 -0
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.types.d.ts +12 -0
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.types.js +2 -0
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.types.js.map +1 -0
- package/dist/NextTextEditor/index.d.ts +2 -0
- package/dist/NextTextEditor/index.js +3 -0
- package/dist/NextTextEditor/index.js.map +1 -0
- package/dist/NextTextEditor/license_key.d.ts +2 -0
- package/dist/NextTextEditor/license_key.js +3 -0
- package/dist/NextTextEditor/license_key.js.map +1 -0
- package/dist/NextTextEditor/plugins/CutPlugin/CutCommand.d.ts +5 -0
- package/dist/NextTextEditor/plugins/CutPlugin/CutCommand.js +99 -0
- package/dist/NextTextEditor/plugins/CutPlugin/CutCommand.js.map +1 -0
- package/dist/NextTextEditor/plugins/CutPlugin/CutPlugin.d.ts +5 -0
- package/dist/NextTextEditor/plugins/CutPlugin/CutPlugin.js +56 -0
- package/dist/NextTextEditor/plugins/CutPlugin/CutPlugin.js.map +1 -0
- package/dist/NextTextEditor/plugins/CutPlugin/index.d.ts +1 -0
- package/dist/NextTextEditor/plugins/CutPlugin/index.js +2 -0
- package/dist/NextTextEditor/plugins/CutPlugin/index.js.map +1 -0
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.d.ts +5 -0
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js +40 -0
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +1 -0
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/index.d.ts +1 -0
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/index.js +2 -0
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +1 -0
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/index.d.ts +15 -0
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/index.js +65 -0
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/index.js.map +1 -0
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/legacyTinyMceAdapter.d.ts +13 -0
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/legacyTinyMceAdapter.js +80 -0
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/legacyTinyMceAdapter.js.map +1 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.d.ts +5 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js +86 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map +1 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.d.ts +5 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js +56 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +1 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/index.d.ts +1 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/index.js +2 -0
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/index.js.map +1 -0
- package/dist/NextTextEditor/plugins/PastePlugin/PasteCommand.d.ts +5 -0
- package/dist/NextTextEditor/plugins/PastePlugin/PasteCommand.js +149 -0
- package/dist/NextTextEditor/plugins/PastePlugin/PasteCommand.js.map +1 -0
- package/dist/NextTextEditor/plugins/PastePlugin/PastePlugin.d.ts +5 -0
- package/dist/NextTextEditor/plugins/PastePlugin/PastePlugin.js +56 -0
- package/dist/NextTextEditor/plugins/PastePlugin/PastePlugin.js.map +1 -0
- package/dist/NextTextEditor/plugins/PastePlugin/index.d.ts +1 -0
- package/dist/NextTextEditor/plugins/PastePlugin/index.js +2 -0
- package/dist/NextTextEditor/plugins/PastePlugin/index.js.map +1 -0
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.d.ts +6 -0
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js +87 -0
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +1 -0
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/index.d.ts +1 -0
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/index.js +2 -0
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/index.js.map +1 -0
- package/dist/NextTextEditor/textEditorTheming/icons.d.ts +23 -0
- package/dist/NextTextEditor/textEditorTheming/icons.js +24 -0
- package/dist/NextTextEditor/textEditorTheming/icons.js.map +1 -0
- package/dist/NextTextEditor/textEditorTheming/index.d.ts +1 -0
- package/dist/NextTextEditor/textEditorTheming/index.js +2 -0
- package/dist/NextTextEditor/textEditorTheming/index.js.map +1 -0
- package/dist/NextTextEditor/textEditorTheming/textEditorTheming.styles.d.ts +2 -0
- package/dist/NextTextEditor/textEditorTheming/textEditorTheming.styles.js +10 -0
- package/dist/NextTextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -0
- package/dist/NextTextEditor/useCKEditorCss.d.ts +3 -0
- package/dist/NextTextEditor/useCKEditorCss.js +36 -0
- package/dist/NextTextEditor/useCKEditorCss.js.map +1 -0
- package/dist/NextTextEditor/useTabAsNavigation.d.ts +11 -0
- package/dist/NextTextEditor/useTabAsNavigation.js +29 -0
- package/dist/NextTextEditor/useTabAsNavigation.js.map +1 -0
- package/dist/NextTextEditor/utils/config.d.ts +3 -0
- package/dist/NextTextEditor/utils/config.js +179 -0
- package/dist/NextTextEditor/utils/config.js.map +1 -0
- package/dist/NextTextEditor/utils/index.d.ts +2 -0
- package/dist/NextTextEditor/utils/index.js +3 -0
- package/dist/NextTextEditor/utils/index.js.map +1 -0
- package/dist/NextTextEditor/utils/locale.d.ts +3 -0
- package/dist/NextTextEditor/utils/locale.js +102 -0
- package/dist/NextTextEditor/utils/locale.js.map +1 -0
- package/dist/NextTextEditor/utils/plugins.d.ts +7 -0
- package/dist/NextTextEditor/utils/plugins.js +184 -0
- package/dist/NextTextEditor/utils/plugins.js.map +1 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.d.ts +9 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.js +29 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.js.map +1 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.styles.d.ts +2 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.styles.js +6 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.styles.js.map +1 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.types.d.ts +9 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.types.js +2 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.types.js.map +1 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.utils.d.ts +2 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.utils.js +59 -0
- package/dist/NextTextEditorOutput/NextTextEditorOutput.utils.js.map +1 -0
- package/dist/NextTextEditorOutput/index.d.ts +2 -0
- package/dist/NextTextEditorOutput/index.js +2 -0
- package/dist/NextTextEditorOutput/index.js.map +1 -0
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +13 -13
- package/dist/Panel/Panel.styles.js.map +1 -1
- package/dist/Pill/Pill.styles.js +3 -3
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.js +5 -7
- package/dist/Spinner/Spinner.js.map +1 -1
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +10 -10
- package/dist/SplitViewCard/SplitViewCard.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +7 -7
- package/dist/Tearsheet/Tearsheet.styles.js.map +1 -1
- package/dist/Tearsheet/storybook/PageLayoutDemo.d.ts +4 -0
- package/dist/Tearsheet/storybook/PageLayoutDemo.js +164 -0
- package/dist/Tearsheet/storybook/PageLayoutDemo.js.map +1 -0
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.d.ts +2 -19
- package/dist/TextEditor/TextEditor.js +11 -169
- package/dist/TextEditor/TextEditor.js.map +1 -1
- package/dist/TextEditor/TextEditor.types.d.ts +19 -86
- package/dist/TextEditor/TextEditor.types.js.map +1 -1
- package/dist/TextEditor/TextEditorDocs.types.d.ts +65 -0
- package/dist/TextEditor/TextEditorDocs.types.js +2 -0
- package/dist/TextEditor/TextEditorDocs.types.js.map +1 -0
- package/dist/TextEditor/TextEditorProvider.d.ts +4 -0
- package/dist/TextEditor/TextEditorProvider.js +17 -0
- package/dist/TextEditor/TextEditorProvider.js.map +1 -0
- package/dist/TextEditor/TextEditorProvider.types.d.ts +14 -0
- package/dist/TextEditor/TextEditorProvider.types.js +2 -0
- package/dist/TextEditor/TextEditorProvider.types.js.map +1 -0
- package/dist/TextEditor/index.d.ts +4 -2
- package/dist/TextEditor/index.js +2 -1
- package/dist/TextEditor/index.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.d.ts +6 -8
- package/dist/TextEditorOutput/TextEditorOutput.js +17 -34
- package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.types.d.ts +16 -13
- package/dist/TextEditorOutput/TextEditorOutput.types.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutputDocs.types.d.ts +21 -0
- package/dist/TextEditorOutput/TextEditorOutputDocs.types.js +2 -0
- package/dist/TextEditorOutput/TextEditorOutputDocs.types.js.map +1 -0
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/mocks/images/thumb_104x104_1.png +0 -0
- package/dist/Thumbnail/mocks/images/thumb_104x104_2.png +0 -0
- package/dist/Thumbnail/mocks/images/thumb_104x104_3.png +0 -0
- package/dist/Thumbnail/mocks/images/thumb_104x104_4.png +0 -0
- package/dist/Thumbnail/mocks/images/thumb_40x40_1.png +0 -0
- package/dist/Thumbnail/mocks/images/thumb_40x40_2.png +0 -0
- package/dist/Thumbnail/mocks/images/thumb_40x40_3.png +0 -0
- package/dist/Thumbnail/mocks/images/thumb_40x40_4.png +0 -0
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TierSelectionTieredSelect.js +3 -1
- package/dist/TieredSelect/TierSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/TieredSelect.types.d.ts +4 -0
- package/dist/TieredSelect/TieredSelect.types.js.map +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Tile/mocks/dog.jpeg +0 -0
- package/dist/Tile/mocks/iframe.d.ts +5 -0
- package/dist/Tile/mocks/iframe.js +15 -0
- package/dist/Tile/mocks/iframe.js.map +1 -0
- package/dist/Tile/mocks/svg.d.ts +3 -0
- package/dist/Tile/mocks/svg.js +830 -0
- package/dist/Tile/mocks/svg.js.map +1 -0
- package/dist/Tile/mocks/video.mp4 +0 -0
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Title/mocks/thumb_40x40_1.png +0 -0
- package/dist/Title/mocks/visual_placeholder_40x40.svg +9 -0
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Tree/mocks/treeMockData.d.ts +8 -0
- package/dist/Tree/mocks/treeMockData.js +44 -0
- package/dist/Tree/mocks/treeMockData.js.map +1 -0
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_storyHelpers_/components/Deprecation.d.ts +3 -0
- package/dist/_storyHelpers_/components/Deprecation.js +10 -0
- package/dist/_storyHelpers_/components/Deprecation.js.map +1 -0
- package/dist/_storyHelpers_/components/Deprecation.styles.d.ts +4 -0
- package/dist/_storyHelpers_/components/Deprecation.styles.js +7 -0
- package/dist/_storyHelpers_/components/Deprecation.styles.js.map +1 -0
- package/dist/_storyHelpers_/components/Deprecation.types.d.ts +9 -0
- package/dist/_storyHelpers_/components/Deprecation.types.js +2 -0
- package/dist/_storyHelpers_/components/Deprecation.types.js.map +1 -0
- package/dist/_storyHelpers_/components/FullLayout.d.ts +6 -0
- package/dist/_storyHelpers_/components/FullLayout.js +15 -0
- package/dist/_storyHelpers_/components/FullLayout.js.map +1 -0
- package/dist/_storyHelpers_/components/StoryGrid.d.ts +7 -0
- package/dist/_storyHelpers_/components/StoryGrid.js +40 -0
- package/dist/_storyHelpers_/components/StoryGrid.js.map +1 -0
- package/dist/_storyHelpers_/components/WithNavigationLayout.d.ts +2 -0
- package/dist/_storyHelpers_/components/WithNavigationLayout.js +47 -0
- package/dist/_storyHelpers_/components/WithNavigationLayout.js.map +1 -0
- package/dist/_storyHelpers_/constants.d.ts +35 -0
- package/dist/_storyHelpers_/constants.js +168 -0
- package/dist/_storyHelpers_/constants.js.map +1 -0
- package/dist/_storyHelpers_/decorators/fullLayoutDecorator.d.ts +3 -0
- package/dist/_storyHelpers_/decorators/fullLayoutDecorator.js +8 -0
- package/dist/_storyHelpers_/decorators/fullLayoutDecorator.js.map +1 -0
- package/dist/_storyHelpers_/effects/useWaitForElement.d.ts +1 -0
- package/dist/_storyHelpers_/effects/useWaitForElement.js +24 -0
- package/dist/_storyHelpers_/effects/useWaitForElement.js.map +1 -0
- package/dist/_storyHelpers_/mocks/dropzoneMockData.d.ts +13 -0
- package/dist/_storyHelpers_/mocks/dropzoneMockData.js +39 -0
- package/dist/_storyHelpers_/mocks/dropzoneMockData.js.map +1 -0
- package/dist/_storyHelpers_/mocks/pillSelectMockData.d.ts +6 -0
- package/dist/_storyHelpers_/mocks/pillSelectMockData.js +22 -0
- package/dist/_storyHelpers_/mocks/pillSelectMockData.js.map +1 -0
- package/dist/_storyHelpers_/mocks/selectMockData.d.ts +11 -0
- package/dist/_storyHelpers_/mocks/selectMockData.js +36 -0
- package/dist/_storyHelpers_/mocks/selectMockData.js.map +1 -0
- package/dist/_storyHelpers_/mocks/tableMockData.d.ts +4 -0
- package/dist/_storyHelpers_/mocks/tableMockData.js +38 -0
- package/dist/_storyHelpers_/mocks/tableMockData.js.map +1 -0
- package/dist/_storyHelpers_/mocks/tieredSelect.d.ts +77 -0
- package/dist/_storyHelpers_/mocks/tieredSelect.js +277 -0
- package/dist/_storyHelpers_/mocks/tieredSelect.js.map +1 -0
- package/dist/_styles/mixins.d.ts +4 -0
- package/dist/_styles/mixins.js +7 -0
- package/dist/_styles/mixins.js.map +1 -1
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +13 -13
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +929 -773
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +1 -1
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +32 -32
- package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +30 -30
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +60 -60
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
- package/dist/_typedoc/Table/Table.types.json +101 -101
- package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +1 -100
- package/dist/_typedoc/TextEditor/TextEditorDocs.types.json +98 -0
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +28 -0
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +6 -42
- package/dist/_typedoc/TextEditorOutput/TextEditorOutputDocs.types.json +38 -0
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +8 -8
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +6 -6
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/dist/_utils/propsTypedoc.d.ts +3 -0
- package/dist/_utils/propsTypedoc.js +3 -0
- package/dist/_utils/propsTypedoc.js.map +1 -1
- package/jestConfig.js +52 -0
- package/package.json +26 -11
- package/.eslintignore +0 -4
- package/.eslintrc.cjs +0 -54
- package/__mocks__/@react-aria/utils.js +0 -10
- package/babel.config.js +0 -40
- package/dist/TextEditor/TextEditor.styles.js.map +0 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +0 -1
- package/tsconfig.json +0 -24
- package/tsconfig.prod.json +0 -11
- package/tsconfig.test.json +0 -4
- /package/dist/{TextEditor/TextEditor.styles.d.ts → DeprecatedTextEditor/DeprecatedTextEditor.styles.d.ts} +0 -0
- /package/dist/{TextEditorOutput/TextEditorOutput.styles.d.ts → DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.styles.d.ts} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** @file CKEditor5 mock for Jest tests */
|
|
2
|
+
|
|
3
|
+
const React = require('react')
|
|
4
|
+
|
|
5
|
+
class MockCommand {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.editor = null
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class MockPlugin {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.pluginName = this.constructor.name
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const MockCKEditor = React.forwardRef((props, ref) => {
|
|
18
|
+
return React.createElement('div', {
|
|
19
|
+
'data-testid': 'ckeditor',
|
|
20
|
+
ref,
|
|
21
|
+
...props,
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
MockCKEditor.displayName = 'CKEditor'
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
CKEditor: MockCKEditor,
|
|
29
|
+
Command: MockCommand,
|
|
30
|
+
Plugin: class extends MockPlugin {},
|
|
31
|
+
Bold: class extends MockPlugin {},
|
|
32
|
+
Italic: class extends MockPlugin {},
|
|
33
|
+
Underline: class extends MockPlugin {},
|
|
34
|
+
Link: class extends MockPlugin {},
|
|
35
|
+
List: class extends MockPlugin {},
|
|
36
|
+
Table: class extends MockPlugin {},
|
|
37
|
+
Strikethrough: class extends MockPlugin {},
|
|
38
|
+
Code: class extends MockPlugin {},
|
|
39
|
+
Subscript: class extends MockPlugin {},
|
|
40
|
+
Superscript: class extends MockPlugin {},
|
|
41
|
+
Highlight: class extends MockPlugin {},
|
|
42
|
+
BlockQuote: class extends MockPlugin {},
|
|
43
|
+
Heading: class extends MockPlugin {},
|
|
44
|
+
Image: class extends MockPlugin {},
|
|
45
|
+
MediaEmbed: class extends MockPlugin {},
|
|
46
|
+
HorizontalLine: class extends MockPlugin {},
|
|
47
|
+
PageBreak: class extends MockPlugin {},
|
|
48
|
+
Alignment: class extends MockPlugin {},
|
|
49
|
+
Font: class extends MockPlugin {},
|
|
50
|
+
Indent: class extends MockPlugin {},
|
|
51
|
+
RemoveFormat: class extends MockPlugin {},
|
|
52
|
+
SpecialCharacters: class extends MockPlugin {},
|
|
53
|
+
WordCount: class extends MockPlugin {},
|
|
54
|
+
FindAndReplace: class extends MockPlugin {},
|
|
55
|
+
SourceEditing: class extends MockPlugin {},
|
|
56
|
+
RestrictedEditing: class extends MockPlugin {},
|
|
57
|
+
Style: class extends MockPlugin {},
|
|
58
|
+
ShowBlocks: class extends MockPlugin {},
|
|
59
|
+
CodeBlock: class extends MockPlugin {},
|
|
60
|
+
AutoFormat: class extends MockPlugin {},
|
|
61
|
+
Autolink: class extends MockPlugin {},
|
|
62
|
+
Autosave: class extends MockPlugin {},
|
|
63
|
+
Bookmark: class extends MockPlugin {},
|
|
64
|
+
Emoji: class extends MockPlugin {},
|
|
65
|
+
Fullscreen: class extends MockPlugin {},
|
|
66
|
+
Language: class extends MockPlugin {},
|
|
67
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @file es-toolkit mock */
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
isEqual: (a, b) => a === b,
|
|
5
|
+
cloneDeep: (obj) => JSON.parse(JSON.stringify(obj)),
|
|
6
|
+
merge: (target, ...sources) => Object.assign(target, ...sources),
|
|
7
|
+
debounce: (func, wait) => func,
|
|
8
|
+
throttle: (func, wait) => func,
|
|
9
|
+
isEmpty: (value) => {
|
|
10
|
+
if (value == null) return true
|
|
11
|
+
if (Array.isArray(value) || typeof value === 'string')
|
|
12
|
+
return value.length === 0
|
|
13
|
+
if (typeof value === 'object') return Object.keys(value).length === 0
|
|
14
|
+
return false
|
|
15
|
+
},
|
|
16
|
+
isObject: (value) => value !== null && typeof value === 'object',
|
|
17
|
+
isArray: Array.isArray,
|
|
18
|
+
isString: (value) => typeof value === 'string',
|
|
19
|
+
isNumber: (value) => typeof value === 'number',
|
|
20
|
+
isFunction: (value) => typeof value === 'function',
|
|
21
|
+
noop: () => {},
|
|
22
|
+
identity: (value) => value,
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = 'test-file-stub'
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/'
|
|
2
|
+
import '@testing-library/jest-dom/extend-expect'
|
|
3
|
+
import * as TestingLibrary from '@testing-library/react'
|
|
4
|
+
import 'jest-styled-components'
|
|
5
|
+
import { setStyleSheetSerializerOptions } from 'jest-styled-components/serializer'
|
|
6
|
+
|
|
7
|
+
setStyleSheetSerializerOptions({
|
|
8
|
+
addStyles: false,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
TestingLibrary.configure({
|
|
12
|
+
testIdAttribute: 'data-qa',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
window.scrollTo = (x, y) => {
|
|
16
|
+
document.documentElement.scrollTop = y
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Date.now = jest.fn(() => 1667848889001)
|
|
20
|
+
|
|
21
|
+
// Debug unknown props on DOM elements
|
|
22
|
+
// emulateStyledComponentsV6Props();
|
|
23
|
+
|
|
24
|
+
// TODO breaking change, remove polyfills from lib and rely on test env for support
|
|
25
|
+
// class ResizeObserver {
|
|
26
|
+
// observe() {}
|
|
27
|
+
// unobserve() {}
|
|
28
|
+
// disconnect() {}
|
|
29
|
+
// }
|
|
30
|
+
|
|
31
|
+
// window.ResizeObserver = ResizeObserver
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const path = require('path')
|
|
2
|
+
|
|
3
|
+
// copied from jest internals, to support default functionality and
|
|
4
|
+
// to keep existing snapshots in their current location. We can remove this
|
|
5
|
+
// as we migrate away from the centralized __tests__ location.
|
|
6
|
+
function defaultResolveSnapshotPath(testPath, snapshotExtension) {
|
|
7
|
+
return path.join(
|
|
8
|
+
path.join(path.dirname(testPath), '__snapshots__'),
|
|
9
|
+
path.basename(testPath) + snapshotExtension
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function defaultResolveTestPath(snapshotPath, snapshotExtension) {
|
|
14
|
+
return path.resolve(
|
|
15
|
+
path.dirname(snapshotPath),
|
|
16
|
+
'..',
|
|
17
|
+
path.basename(snapshotPath, snapshotExtension)
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// helper to check if we should use default resolver functionality
|
|
22
|
+
function isLegacyDirectory(path) {
|
|
23
|
+
return (
|
|
24
|
+
path.includes('src/components/__tests__') ||
|
|
25
|
+
path.includes('src/layouts/__tests__')
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = {
|
|
30
|
+
testPathForConsistencyCheck: '.jest/example.test.js',
|
|
31
|
+
|
|
32
|
+
resolveSnapshotPath(testPath, snapshotExtension) {
|
|
33
|
+
if (isLegacyDirectory(testPath)) {
|
|
34
|
+
return defaultResolveSnapshotPath(testPath, snapshotExtension)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return testPath + snapshotExtension
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
resolveTestPath(snapshotFilePath, snapshotExtension) {
|
|
41
|
+
if (isLegacyDirectory(snapshotFilePath)) {
|
|
42
|
+
return defaultResolveTestPath(snapshotFilePath, snapshotExtension)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return snapshotFilePath.slice(0, -snapshotExtension.length)
|
|
46
|
+
},
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Emulate styled components v6 props behavior - pass down all non-transient components by default
|
|
2
|
+
export const emulateStyledComponentsV6Props = () => {
|
|
3
|
+
jest.mock('styled-components', () => {
|
|
4
|
+
const originalModule = jest.requireActual('styled-components')
|
|
5
|
+
|
|
6
|
+
const styledProxy = new Proxy(originalModule.default, {
|
|
7
|
+
get(target, prop) {
|
|
8
|
+
if (typeof target[prop] === 'function') {
|
|
9
|
+
return target[prop].withConfig({
|
|
10
|
+
shouldForwardProp: (propName) => !propName.startsWith('$'),
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
return target[prop]
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
__esModule: true,
|
|
19
|
+
...originalModule,
|
|
20
|
+
default: styledProxy,
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// These polyfills are helpful for unit testing of pragmatic-drag-and-drop
|
|
2
|
+
// More info: https://atlassian.design/components/pragmatic-drag-and-drop/optional-packages/unit-testing/about
|
|
3
|
+
import '@atlaskit/pragmatic-drag-and-drop-unit-testing/dom-rect-polyfill'
|
|
4
|
+
import '@atlaskit/pragmatic-drag-and-drop-unit-testing/drag-event-polyfill'
|
|
5
|
+
|
|
6
|
+
import { TextDecoder, TextEncoder } from 'util'
|
|
7
|
+
|
|
8
|
+
global.TextEncoder = TextEncoder
|
|
9
|
+
global.TextDecoder = TextDecoder
|
|
10
|
+
|
|
11
|
+
global.ResizeObserver = jest.fn(() => ({
|
|
12
|
+
observe: jest.fn(),
|
|
13
|
+
unobserve: jest.fn(),
|
|
14
|
+
disconnect: jest.fn(),
|
|
15
|
+
}))
|
|
16
|
+
|
|
17
|
+
// TODO remove this eventually
|
|
18
|
+
global['requestAnimationFrame'] = function requestAnimationFrame(callback) {
|
|
19
|
+
setTimeout(callback, 0)
|
|
20
|
+
|
|
21
|
+
return 0
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = ''
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 12.26.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2813b0a: [TextEditor] using prod license key for editor instead of dev key
|
|
8
|
+
|
|
9
|
+
## 12.26.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- b341ca9: Migration of the TextEditor component from TinyMCE to CKEditor, while providing backward compatibility with the old editor API with tinyMCE prop. See coreReactJestConfig for test setup compatibility.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 7407d2a: Fix Dropdown loading Spinner being clipped
|
|
18
|
+
- 8243b84: Fix focus styles for scroll areas
|
|
19
|
+
|
|
3
20
|
## 12.25.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -83,6 +83,14 @@ We use Storybook to develop. Stories are broken into two categories, Demos for i
|
|
|
83
83
|
yarn storybook
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
Additional testing includes Visual Regression Testing (VRT) that is ran in CI, which compares pixel snapshots of Storybook Coverage stories.
|
|
87
|
+
|
|
88
|
+
## Building
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
yarn build
|
|
92
|
+
```
|
|
93
|
+
|
|
86
94
|
## Testing
|
|
87
95
|
|
|
88
96
|
Testing currently consists of Jest snapshots and React Testing Library tests.
|
|
@@ -91,12 +99,50 @@ Testing currently consists of Jest snapshots and React Testing Library tests.
|
|
|
91
99
|
yarn test
|
|
92
100
|
```
|
|
93
101
|
|
|
94
|
-
|
|
102
|
+
## Jest Configuration
|
|
95
103
|
|
|
96
|
-
|
|
104
|
+
To ensure your Jest tests work seamlessly with `@procore/core-react`, we provide a configuration wrapper that you can easily use in your Jest setup.
|
|
105
|
+
|
|
106
|
+
### Using Jest config file
|
|
107
|
+
|
|
108
|
+
`jest.config.js`
|
|
97
109
|
|
|
110
|
+
```javascript
|
|
111
|
+
const { coreReactJestConfig } = require('@procore/core-react/jestConfig');
|
|
112
|
+
|
|
113
|
+
module.exports = coreReactJestConfig({
|
|
114
|
+
// Your existing Jest config
|
|
115
|
+
});
|
|
98
116
|
```
|
|
99
|
-
|
|
117
|
+
|
|
118
|
+
### Using Hammer
|
|
119
|
+
|
|
120
|
+
`hammer.config.js`
|
|
121
|
+
|
|
122
|
+
```javascript
|
|
123
|
+
import { coreReactJestConfig } from '@procore/core-react/jestConfig';
|
|
124
|
+
|
|
125
|
+
export default {
|
|
126
|
+
testJest: (defaultConfig) => coreReactJestConfig({
|
|
127
|
+
...defaultConfig,
|
|
128
|
+
// Your existing Jest config
|
|
129
|
+
})
|
|
130
|
+
};
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Using Core Scripts
|
|
134
|
+
|
|
135
|
+
`procore.config.js`
|
|
136
|
+
|
|
137
|
+
```javascript
|
|
138
|
+
const { coreReactJestConfig } = require('@procore/core-react/jestConfig');
|
|
139
|
+
|
|
140
|
+
module.exports = () => ({
|
|
141
|
+
jestOverride: (defaultConfig) => coreReactJestConfig({
|
|
142
|
+
...defaultConfig,
|
|
143
|
+
// Your existing Jest config
|
|
144
|
+
}),
|
|
145
|
+
});
|
|
100
146
|
```
|
|
101
147
|
|
|
102
148
|
## Contributing and Styleguide
|
|
@@ -5,11 +5,11 @@ import { getEllipsis } from '../_styles/mixins';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledAnchorNavigation = /*#__PURE__*/styled.ul.withConfig({
|
|
7
7
|
displayName: "StyledAnchorNavigation",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_26_1__sc-aacdj4-0"
|
|
9
9
|
})(["max-width:200px;margin:0;padding-inline-start:0;"]);
|
|
10
10
|
export var StyledAnchorSection = /*#__PURE__*/styled.li.withConfig({
|
|
11
11
|
displayName: "StyledAnchorSection",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_26_1__sc-aacdj4-1"
|
|
13
13
|
})(["display:flex;cursor:pointer;border-left:", "px solid ", ";background-color:", ";border-top-right-radius:4px;border-bottom-right-radius:4px;:hover{border-left:", "px solid ", ";background-color:", ";}"], spacing.xs, function (_ref) {
|
|
14
14
|
var $selected = _ref.$selected;
|
|
15
15
|
return $selected ? colors.gray15 : colors.gray90;
|
|
@@ -22,7 +22,7 @@ export var StyledAnchorSection = /*#__PURE__*/styled.li.withConfig({
|
|
|
22
22
|
}, colors.gray90);
|
|
23
23
|
export var StyledAnchor = /*#__PURE__*/styled.a.withConfig({
|
|
24
24
|
displayName: "StyledAnchor",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-12_26_1__sc-aacdj4-2"
|
|
26
26
|
})(["width:100%;padding:6px ", "px;", " ", ";", " :focus-visible{box-shadow:inset 0 0 0 2px ", ";outline:none;}"], spacing.sm, getTypographyIntent('body'), function (_ref4) {
|
|
27
27
|
var $selected = _ref4.$selected;
|
|
28
28
|
return $selected ? css(["font-weight:600;"]) : '';
|
|
@@ -28,26 +28,26 @@ var iconSize = {
|
|
|
28
28
|
};
|
|
29
29
|
export var StyledAvatarOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
30
30
|
displayName: "StyledAvatarOverlay",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_26_1__sc-7q2ydl-0"
|
|
32
32
|
})(["width:100%;height:100%;position:absolute;top:0;left:0;border-radius:100%;opacity:0;"]);
|
|
33
33
|
export var StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34
34
|
displayName: "StyledIconContainer",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_26_1__sc-7q2ydl-1"
|
|
36
36
|
})(["display:inline-flex;"]);
|
|
37
37
|
export var StyledLabelContainer = /*#__PURE__*/styled.div.withConfig({
|
|
38
38
|
displayName: "StyledLabelContainer",
|
|
39
|
-
componentId: "core-
|
|
39
|
+
componentId: "core-12_26_1__sc-7q2ydl-2"
|
|
40
40
|
})(["text-transform:uppercase;"]);
|
|
41
41
|
export var StyledPortraitContainer = /*#__PURE__*/styled.div.withConfig({
|
|
42
42
|
displayName: "StyledPortraitContainer",
|
|
43
|
-
componentId: "core-
|
|
43
|
+
componentId: "core-12_26_1__sc-7q2ydl-3"
|
|
44
44
|
})(["background-color:", ";background-position:center;background-repeat:no-repeat;background-size:cover;height:100%;width:100%;", ""], colors.white, function (_ref) {
|
|
45
45
|
var $imageUrl = _ref.$imageUrl;
|
|
46
46
|
return css(["background-image:url(", ");"], $imageUrl);
|
|
47
47
|
});
|
|
48
48
|
export var StyledAvatarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledAvatarContainer",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_26_1__sc-7q2ydl-4"
|
|
51
51
|
})(["display:inline-flex;justify-content:center;align-items:center;border-radius:100%;overflow:hidden;position:relative;cursor:default;color:", ";background-color:", ";text-decoration:none;a:has(> &){text-decoration:none;}&:focus{", "}a:focus:has(> &){", " border-radius:100%;}", " ", ";"], colors.white, colors.gray30, getGapOutlineFocus, getGapOutlineFocus, function (_ref2) {
|
|
52
52
|
var _ref2$$size = _ref2.$size,
|
|
53
53
|
$size = _ref2$$size === void 0 ? 'md' : _ref2$$size;
|
|
@@ -7,32 +7,32 @@ import { spacing } from '../_styles/spacing';
|
|
|
7
7
|
var maxModalWidth = 528;
|
|
8
8
|
var StyledBaseAvatar = /*#__PURE__*/styled(Avatar).withConfig({
|
|
9
9
|
displayName: "StyledBaseAvatar",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_26_1__sc-ft72hu-0"
|
|
11
11
|
})(["border-color:", ";border-style:solid;border-width:1px;&:hover{z-index:1;}&[role='img']:focus{outline:none;}"], colors.white);
|
|
12
12
|
export var StyledAvatar = /*#__PURE__*/styled(StyledBaseAvatar).withConfig({
|
|
13
13
|
displayName: "StyledAvatar",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_26_1__sc-ft72hu-1"
|
|
15
15
|
})(["background-color:", ";"], function (props) {
|
|
16
16
|
return colors[props.$color];
|
|
17
17
|
});
|
|
18
18
|
export var StyledContactItems = /*#__PURE__*/styled.div.withConfig({
|
|
19
19
|
displayName: "StyledContactItems",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_26_1__sc-ft72hu-2"
|
|
21
21
|
})(["padding-top:", "px;padding-bottom:", "px;padding-left:", "px;"], spacing.sm, spacing.sm, spacing.xs);
|
|
22
22
|
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledWrapper",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_26_1__sc-ft72hu-3"
|
|
25
25
|
})(["display:flex;", " + ", "{margin-left:-", "px;}"], StyledAvatar, StyledAvatar, spacing.sm);
|
|
26
26
|
export var StyledViewAllWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
27
27
|
displayName: "StyledViewAllWrapper",
|
|
28
|
-
componentId: "core-
|
|
28
|
+
componentId: "core-12_26_1__sc-ft72hu-4"
|
|
29
29
|
})(["display:flex;margin-left:", "px;margin-bottom:", "px;"], spacing.md, spacing.lg);
|
|
30
30
|
export var StyledModalBody = /*#__PURE__*/styled(Modal.Body).withConfig({
|
|
31
31
|
displayName: "StyledModalBody",
|
|
32
|
-
componentId: "core-
|
|
32
|
+
componentId: "core-12_26_1__sc-ft72hu-5"
|
|
33
33
|
})(["max-width:", "px;"], maxModalWidth);
|
|
34
34
|
export var StyledContactItem = /*#__PURE__*/styled(ContactItem).withConfig({
|
|
35
35
|
displayName: "StyledContactItem",
|
|
36
|
-
componentId: "core-
|
|
36
|
+
componentId: "core-12_26_1__sc-ft72hu-6"
|
|
37
37
|
})(["flex-shrink:0;"]);
|
|
38
38
|
//# sourceMappingURL=AvatarStack.styles.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AvatarStackItem } from '../AvatarStack.types';
|
|
2
|
+
export declare const groups: AvatarStackItem[];
|
|
3
|
+
export declare const companies: AvatarStackItem[];
|
|
4
|
+
export declare const users: AvatarStackItem[];
|
|
5
|
+
export declare const withoutImage: (item: AvatarStackItem) => {
|
|
6
|
+
imageUrl: undefined;
|
|
7
|
+
id: import("../AvatarStack.types").AvatarStackItemId;
|
|
8
|
+
name: string;
|
|
9
|
+
type: import("../AvatarStack.types").AvatarStackItemType;
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
linkUrl?: string | undefined;
|
|
12
|
+
initials?: string | undefined;
|
|
13
|
+
inactive?: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const inactive: (item: AvatarStackItem) => {
|
|
16
|
+
inactive: boolean;
|
|
17
|
+
id: import("../AvatarStack.types").AvatarStackItemId;
|
|
18
|
+
name: string;
|
|
19
|
+
type: import("../AvatarStack.types").AvatarStackItemType;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
imageUrl?: string | undefined;
|
|
22
|
+
linkUrl?: string | undefined;
|
|
23
|
+
initials?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
export declare const getAvatarMocks: (slice?: number) => AvatarStackItem[];
|