@procore/core-react 12.21.2-cdn.0 → 12.22.0
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/CHANGELOG.md +6 -8
- package/dist/@types/global.d.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.styles.d.ts +6 -5
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.d.ts +7 -6
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.d.ts +1677 -13
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.d.ts +3 -2
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.js +1 -1
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.d.ts +22 -13
- package/dist/Banner/Banner.styles.js +12 -12
- package/dist/Banner/Banner.styles.js.map +1 -1
- package/dist/Box/Box.js +1 -1
- package/dist/Box/Box.js.map +1 -1
- package/dist/Box/Box.styles.d.ts +2 -1
- package/dist/Box/Box.styles.js +3 -3
- package/dist/Box/Box.styles.js.map +1 -1
- package/dist/Box/Box.types.d.ts +1 -1
- package/dist/Box/Box.types.js.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.d.ts +5 -4
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.d.ts +8 -6
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.d.ts +15 -9
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.d.ts +3 -2
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.d.ts +11 -10
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.d.ts +18 -7
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.d.ts +6 -2
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js +6 -6
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.d.ts +20 -13
- package/dist/DateInput/DateInput.styles.js +21 -23
- package/dist/DateInput/DateInput.styles.js.map +1 -1
- package/dist/DateSelect/DateSelect.js +2 -2
- package/dist/DateSelect/DateSelect.js.map +1 -1
- package/dist/DetailPage/DetailPage.styles.d.ts +13 -7
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.d.ts +10 -4
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.js +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.d.ts +5 -4
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +4 -1
- package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
- package/dist/Dropzone/Dropzone.d.ts +3 -1
- package/dist/Dropzone/Dropzone.js +5 -5
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.d.ts +24 -16
- package/dist/Dropzone/Dropzone.styles.js +22 -22
- package/dist/Dropzone/Dropzone.styles.js.map +1 -1
- package/dist/EmptyState/EmptyState.js +1 -1
- package/dist/EmptyState/EmptyState.js.map +1 -1
- package/dist/EmptyState/EmptyState.styles.d.ts +8 -7
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.d.ts +4 -3
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.d.ts +8 -4
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.d.ts +18 -10
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.d.ts +5 -3
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.d.ts +3 -3
- package/dist/FileSelect/FileSelect.js +4 -4
- package/dist/FileSelect/FileSelect.js.map +1 -1
- package/dist/FileSelect/FileSelect.styles.d.ts +4 -2
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.d.ts +7 -5
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.d.ts +4 -2
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.d.ts +11 -9
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.d.ts +10 -4
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.d.ts +5 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js +1 -1
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js.map +1 -1
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.d.ts +18 -8
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.d.ts +2 -1
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.d.ts +6 -5
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.d.ts +8 -7
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.d.ts +4 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.d.ts +2 -1
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.d.ts +48 -25
- package/dist/Form/Form.styles.js +18 -18
- package/dist/Form/Form.styles.js.map +1 -1
- package/dist/Form/Form.types.d.ts +1 -1
- package/dist/Form/Form.types.js.map +1 -1
- package/dist/Form/StyledFormikForm.styles.d.ts +7 -3
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.d.ts +5 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.d.ts +5 -4
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.js +1 -1
- package/dist/GroupSelect/GroupSelect.js.map +1 -1
- package/dist/GroupSelect/GroupSelect.styles.d.ts +4 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.js +5 -1
- package/dist/Input/Input.js.map +1 -1
- package/dist/Input/Input.styles.d.ts +8 -8
- package/dist/Input/Input.styles.js +5 -5
- package/dist/Input/Input.styles.js.map +1 -1
- package/dist/Link/Link.js +3 -1
- package/dist/Link/Link.js.map +1 -1
- package/dist/Link/Link.styles.d.ts +4 -1
- package/dist/Link/Link.styles.js +4 -4
- package/dist/Link/Link.styles.js.map +1 -1
- package/dist/Link/Link.types.d.ts +1 -2
- package/dist/Link/Link.types.js.map +1 -1
- package/dist/ListPage/ListPage.styles.d.ts +9 -8
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.d.ts +4 -3
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/Menu/Menu.js +6 -5
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.d.ts +2 -3
- package/dist/MenuImperative/MenuImperative.js +8 -26
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.d.ts +15 -13
- package/dist/MenuImperative/MenuImperative.styles.js +13 -13
- package/dist/MenuImperative/MenuImperative.styles.js.map +1 -1
- package/dist/Modal/Modal.d.ts +6 -6
- package/dist/Modal/Modal.js +2 -2
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.d.ts +27 -19
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.js +5 -5
- package/dist/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.d.ts +19 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.d.ts +4 -3
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +5 -5
- package/dist/Notation/Notation.js.map +1 -1
- package/dist/NumberInput/NumberInput.hooks.d.ts +1 -1
- package/dist/NumberInput/NumberInput.styles.d.ts +16 -10
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.d.ts +2 -1
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/a11yPresets.d.ts +20 -20
- package/dist/PageLayout/PageLayout.styles.d.ts +33 -24
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.d.ts +2 -1
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.d.ts +3 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.js.map +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.d.ts +10 -4
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.d.ts +12 -8
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.d.ts +5 -3
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.d.ts +13 -5
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.js +1 -1
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.d.ts +19 -15
- package/dist/Panel/Panel.styles.js +19 -19
- package/dist/Panel/Panel.styles.js.map +1 -1
- package/dist/Pill/Pill.styles.d.ts +9 -5
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.d.ts +7 -5
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.d.ts +3 -2
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.d.ts +2 -1
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.d.ts +3 -3
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.d.ts +5 -4
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.d.ts +5 -4
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.js +6 -2
- package/dist/Search/Search.js.map +1 -1
- package/dist/Search/Search.styles.d.ts +11 -12
- package/dist/Search/Search.styles.js +13 -7
- package/dist/Search/Search.styles.js.map +1 -1
- package/dist/Section/Section.styles.d.ts +11 -9
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.js +1 -1
- package/dist/SegmentedController/SegmentedController.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.styles.d.ts +8 -7
- package/dist/SegmentedController/SegmentedController.styles.js +9 -9
- package/dist/SegmentedController/SegmentedController.styles.js.map +1 -1
- package/dist/Select/Select.js +4 -4
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.d.ts +13 -9
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.d.ts +359 -20
- package/dist/Semantic/Semantic.styles.js +11 -12
- package/dist/Semantic/Semantic.styles.js.map +1 -1
- package/dist/Slider/Slider.styles.d.ts +9 -7
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.d.ts +9 -8
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.d.ts +13 -11
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.d.ts +1 -1
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.d.ts +3 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.d.ts +67 -54
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.types.d.ts +9 -8
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/presets/filterPreset.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.styles.d.ts +6 -5
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.d.ts +7 -3
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/Table.styles.d.ts +69 -45
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.d.ts +6 -5
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.d.ts +31 -9
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.d.ts +12 -10
- package/dist/Tearsheet/Tearsheet.styles.js +6 -6
- package/dist/Tearsheet/Tearsheet.styles.js.map +1 -1
- package/dist/TextArea/TextArea.js +6 -2
- package/dist/TextArea/TextArea.js.map +1 -1
- package/dist/TextArea/TextArea.styles.d.ts +7 -1
- package/dist/TextArea/TextArea.styles.js +2 -2
- package/dist/TextArea/TextArea.styles.js.map +1 -1
- package/dist/TextEditor/TextEditor.styles.d.ts +3 -2
- package/dist/TextEditorOutput/TextEditorOutput.styles.d.ts +2 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +131 -141
- package/dist/Thumbnail/Thumbnail.js +69 -56
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.d.ts +34 -32
- package/dist/Thumbnail/Thumbnail.styles.js +78 -79
- package/dist/Thumbnail/Thumbnail.styles.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.types.d.ts +1 -1
- package/dist/Thumbnail/Thumbnail.types.js.map +1 -1
- package/dist/Thumbnail/ThumbnailCaption.js +10 -10
- package/dist/Thumbnail/ThumbnailCaption.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.js +2 -2
- package/dist/ThumbnailGrid/ThumbnailGrid.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +20 -8
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TierSelectionTieredSelect.js +9 -9
- package/dist/TieredSelect/TierSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.styles.d.ts +29 -13
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/TieredSelect.types.d.ts +1 -1
- package/dist/TieredSelect/TieredSelect.types.js.map +1 -1
- package/dist/TieredSelect/TieredSelectMenu.js +10 -10
- package/dist/TieredSelect/TieredSelectMenu.js.map +1 -1
- package/dist/Tile/Tile.js +1 -1
- package/dist/Tile/Tile.js.map +1 -1
- package/dist/Tile/Tile.styles.d.ts +13 -11
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.d.ts +12 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.d.ts +7 -5
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.d.ts +4 -2
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.d.ts +9 -5
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.d.ts +8 -4
- package/dist/ToolHeader/ToolHeader.styles.d.ts +9 -7
- package/dist/ToolHeader/ToolHeader.styles.js +8 -8
- package/dist/ToolHeader/ToolHeader.styles.js.map +1 -1
- package/dist/ToolLandingPage/ToolLandingPage.styles.d.ts +5 -3
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.js +3 -4
- package/dist/Tooltip/Tooltip.js.map +1 -1
- package/dist/Tooltip/Tooltip.styles.d.ts +3 -2
- package/dist/Tooltip/Tooltip.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js.map +1 -1
- package/dist/Tree/Tree.styles.d.ts +24 -12
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.js +1 -1
- package/dist/Typeahead/Typeahead.js.map +1 -1
- package/dist/Typeahead/Typeahead.styles.d.ts +5 -7
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.d.ts +5 -4
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.styles.js.map +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/I18n.d.ts +9 -18
- package/dist/_hooks/I18n.js +29 -46
- package/dist/_hooks/I18n.js.map +1 -1
- package/dist/_styles/arrows.d.ts +4 -4
- package/dist/_styles/borderRadius.d.ts +1 -1
- package/dist/_styles/mixins.d.ts +7 -7
- package/dist/_styles/shadows.d.ts +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 +77 -77
- 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 +9 -9
- 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 +39 -29
- 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 +747 -747
- 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 +11 -6
- 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/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +28 -28
- 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 +6 -6
- 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 +12 -12
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- 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 +9 -9
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +44 -44
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +30 -30
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Title/Title.types.json +3 -3
- 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/package.json +10 -13
- package/yalc.lock +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownFlyout.js","names":["EllipsisVertical","React","useCallback","Card","DropdownButton","Portal","useClickOutside","useI18nContext","mergeRefs","defaultOptionRenderer","DropdownFlyoutContext","noop","transformOption","useDropdownFlyout","useDropdownFlyoutContext","StyledDropdownFlyout","StyledDropdownFlyoutItem","rootId","useDropdownFlyoutOverlay","FlyoutCaption","forwardRef","_ref","ref","option","highlighted","optionRenderer","props","_objectWithoutProperties","_excluded","createElement","_extends","displayName","FlyoutItem","_ref2","overlayElRef","useRef","_useDropdownFlyoutCon","isHighlighted","isExpanded","_onClick","onClick","expand","collapse","onMouseEnter","onMouseLeave","e","relatedTarget","Node","current","contains","_React$useState","useState","_React$useState2","_slicedToArray","referenceEl","setReferenceEl","Fragment","role","origin","Array","isArray","children","FlyoutList","options","overlayRef","placement","_ref3","_ref3$offset","offset","_useDropdownFlyoutOve","mainAxis","overlayStyle","referenceRef","useEffect","shadowStrength","style","map","key","id","DefaultButton","_ref4","icon","_excluded2","loading","undefined","arrow","Boolean","Children","count","DropdownFlyout","_ref5","disabled","label","_options","_ref5$onClick","_ref5$optionRenderer","_ref5$placement","_onKeyDown","onKeyDown","onFocus_","onFocus","onBlur_","onBlur","onMouseDown_","onMouseDown","onMouseEnter_","onMouseLeave_","size","_ref5$variant","variant","_excluded3","innerRef","containerRef","targetRef","flyoutOptions","useMemo","_useDropdownFlyout","closeSelectedDropdown","openDropdown","isOpen","setMouseOver","setFocused","onClickOutside","refs","element","I18n","ariaLabel","t","concat","trigger","isValidElement","_containerRef$current","target","dataset","flyout","preventDefault","_targetRef$current","focus","_React$useState3","_React$useState4","memoRef","cloneElement","_trigger$props$onClic","_trigger$props","call","tabIndex","Provider","value"],"sources":["../../src/DropdownFlyout/DropdownFlyout.tsx"],"sourcesContent":["import { EllipsisVertical } from '@procore/core-icons/dist'\nimport type { MouseEvent } from 'react'\nimport React, { useCallback } from 'react'\nimport type { ButtonProps } from '../Button/Button.types'\nimport { Card } from '../Card/Card'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport { Portal } from '../Portal'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { ReactElementWithRef } from '../_utils/types'\nimport {\n defaultOptionRenderer,\n DropdownFlyoutContext,\n noop,\n transformOption,\n useDropdownFlyout,\n useDropdownFlyoutContext,\n} from './DropdownFlyout.helpers'\nimport {\n StyledDropdownFlyout,\n StyledDropdownFlyoutItem,\n} from './DropdownFlyout.styles'\nimport type {\n DropdownFlyoutProps,\n FlyoutCaptionProps,\n FlyoutItemProps,\n FlyoutListProps,\n} from './DropdownFlyout.types'\nimport { rootId } from './DropdownFlyout.types'\nimport { useDropdownFlyoutOverlay } from './useDropdownFlyoutOverlay'\n\nexport const FlyoutCaption = React.forwardRef<\n HTMLDivElement,\n FlyoutCaptionProps\n>(function FlyoutCaption(\n { option, highlighted, optionRenderer, ...props },\n ref\n) {\n return (\n <StyledDropdownFlyoutItem\n {...props}\n ref={ref}\n data-highlighted={highlighted}\n data-flyout\n >\n {optionRenderer(option)}\n </StyledDropdownFlyoutItem>\n )\n})\n\nFlyoutCaption.displayName = 'FlyoutCaption'\n\nexport function FlyoutItem({ option }: FlyoutItemProps) {\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const {\n isHighlighted,\n isExpanded,\n onClick: _onClick,\n expand,\n collapse,\n optionRenderer,\n } = useDropdownFlyoutContext()\n\n const onMouseEnter = React.useCallback(() => expand(option), [option, expand])\n const onMouseLeave = React.useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (\n e.relatedTarget instanceof Node &&\n overlayElRef.current &&\n !overlayElRef.current.contains(e.relatedTarget as Node)\n ) {\n collapse(option)\n }\n },\n [collapse, option]\n )\n\n const onClick = React.useCallback(() => _onClick(option), [_onClick, option])\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <>\n <FlyoutCaption\n ref={setReferenceEl}\n role=\"listitem\"\n option={option.origin}\n onClick={onClick}\n optionRenderer={optionRenderer}\n highlighted={isHighlighted(option)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {Array.isArray(option.children) && isExpanded(option) ? (\n <Portal>\n <FlyoutList\n referenceEl={referenceEl}\n options={option.children}\n overlayRef={overlayElRef}\n placement=\"right-top\"\n />\n </Portal>\n ) : null}\n </>\n )\n}\n\nexport function FlyoutList({\n options,\n placement,\n referenceEl,\n overlayRef: overlayElRef,\n offset = 0,\n}: FlyoutListProps) {\n const { overlayStyle, referenceRef, overlayRef } = useDropdownFlyoutOverlay({\n placement,\n offset: { mainAxis: offset },\n })\n\n React.useEffect(() => {\n referenceRef(referenceEl)\n }, [referenceEl, referenceRef])\n\n return (\n <Card\n ref={mergeRefs(overlayRef, overlayElRef)}\n shadowStrength={2}\n style={overlayStyle}\n >\n <StyledDropdownFlyout role=\"list\">\n {options.map((option) => (\n <FlyoutItem key={option.id} option={option} />\n ))}\n </StyledDropdownFlyout>\n </Card>\n )\n}\n\nconst DefaultButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function DefaultButton({ children, icon, ...props }, ref) {\n return (\n <DropdownButton\n {...props}\n icon={\n props.loading ? undefined : !icon && !children ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n arrow={Boolean(React.Children.count(children))}\n ref={ref}\n >\n {children}\n </DropdownButton>\n )\n }\n)\n\n/**\n\n The dropdown flyout allows for additional menu items to be nested within\n parent items, which allows more menu options for users.\n @a11y WARN: DropdownFlyotus hold no value and take an action. Focus is expected\n to be moved from a Dropdown to something else, to continue the user flow.\n If the action is inert and does not move focus, this is left to be added\n by the consumer.\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropdownflyout--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown-flyout)\n\n */\nexport const DropdownFlyout = React.forwardRef<\n HTMLDivElement,\n DropdownFlyoutProps\n>(function DropdownFlyout(\n {\n disabled,\n icon,\n label,\n loading,\n options: _options,\n onClick: _onClick = noop,\n optionRenderer = defaultOptionRenderer,\n children,\n placement = 'right-bottom',\n onKeyDown: _onKeyDown,\n onFocus: onFocus_,\n onBlur: onBlur_,\n onMouseDown: onMouseDown_,\n onMouseEnter: onMouseEnter_,\n onMouseLeave: onMouseLeave_,\n size,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const containerRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const targetRef = React.useRef<HTMLElement>(null)\n\n const flyoutOptions = React.useMemo(\n () => transformOption(_options, rootId),\n [_options]\n )\n\n const {\n options,\n collapse,\n expand,\n closeSelectedDropdown,\n openDropdown,\n isOpen,\n onClick,\n onKeyDown,\n setMouseOver,\n setFocused,\n isExpanded,\n isHighlighted,\n } = useDropdownFlyout({\n flyoutOptions,\n onClick: _onClick,\n onKeyDown: _onKeyDown,\n })\n\n useClickOutside({\n onClickOutside: isOpen ? closeSelectedDropdown : noop,\n refs: [containerRef],\n })\n\n const element =\n typeof children === 'function' ? children({ isOpen }) : children\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${loading ? 'loading' : 'moreOptions'}`)\n\n const trigger: ReactElementWithRef = React.isValidElement(element) ? (\n element\n ) : (\n <DefaultButton\n aria-label={ariaLabel}\n children={label}\n disabled={disabled}\n loading={loading}\n icon={icon}\n size={size}\n variant={variant}\n />\n )\n\n function onBlur(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(false)\n closeSelectedDropdown(e)\n onBlur_?.(e)\n }\n\n function onFocus(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(true)\n onFocus_?.(e)\n }\n\n function onMouseDown(e: React.MouseEvent<HTMLDivElement>) {\n // Discard firing of blur event\n // when click was inside the dropdown\n if ((e.target as HTMLElement).dataset.flyout) {\n e.preventDefault()\n return\n }\n if (e.target instanceof Node && containerRef.current?.contains(e.target)) {\n e.preventDefault()\n targetRef.current?.focus()\n }\n onMouseDown_?.(e)\n }\n\n function onMouseLeave(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(false)\n onMouseLeave_?.(e)\n }\n\n function onMouseEnter(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(true)\n onMouseEnter_?.(e)\n }\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n // mergeRefs function is from shared utils.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const memoRef = useCallback(\n trigger.ref\n ? mergeRefs(trigger.ref, targetRef, setReferenceEl)\n : mergeRefs(targetRef, setReferenceEl),\n [targetRef, setReferenceEl, trigger.ref]\n )\n return (\n <div\n {...props}\n aria-label={undefined}\n ref={containerRef}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onMouseDown={onMouseDown}\n onBlur={onBlur}\n >\n {React.cloneElement(trigger, {\n ref: memoRef,\n onClick: (e: MouseEvent<HTMLElement, 'click'>) => {\n trigger.props.onClick?.(e)\n openDropdown()\n },\n tabIndex: 0,\n })}\n <DropdownFlyoutContext.Provider\n value={{\n expand,\n collapse,\n onClick,\n isExpanded,\n isHighlighted,\n optionRenderer,\n }}\n >\n {isOpen && (\n <Portal>\n <FlyoutList\n options={options}\n overlayRef={overlayElRef}\n placement={placement}\n referenceEl={referenceEl}\n offset={4}\n />\n </Portal>\n )}\n </DropdownFlyoutContext.Provider>\n </div>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,OAAOC,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAE1C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,qBAAqB,EACrBC,IAAI,EACJC,eAAe,EACfC,iBAAiB,EACjBC,wBAAwB,QACnB,0BAA0B;AACjC,SACEC,oBAAoB,EACpBC,wBAAwB,QACnB,yBAAyB;AAOhC,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,wBAAwB,QAAQ,4BAA4B;AAErE,OAAO,IAAMC,aAAa,gBAAGlB,KAAK,CAACmB,UAAU,CAG3C,SAASD,aAAaA,CAAAE,IAAA,EAEtBC,GAAG,EACH;EAAA,IAFEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IAAEC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAKC,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAG/C,oBACE3B,KAAA,CAAA4B,aAAA,CAACb,wBAAwB,EAAAc,QAAA,KACnBJ,KAAK;IACTJ,GAAG,EAAEA,GAAI;IACT,oBAAkBE,WAAY;IAC9B;EAAW,IAEVC,cAAc,CAACF,MAAM,CACE,CAAC;AAE/B,CAAC,CAAC;AAEFJ,aAAa,CAACY,WAAW,GAAG,eAAe;AAE3C,OAAO,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M,EAAEA;EAAO,iBAEdrG,KAAK,CAAC4I,YAAY,CAACZ,OAAO,EAAE;IAC3B3G,GAAG,EAAEsH,OAAO;IACZpG,OAAO,EAAE,SAATA,OAAOA,CAAGK,CAAmC,EAAK;MAAA,IAAAiG,qBAAA,EAAAC,cAAA;MAChD,CAAAD,qBAAA,IAAAC,cAAA,GAAAd,OAAO,CAACvG,KAAK,EAACc,OAAO,cAAAsG,qBAAA,uBAArBA,qBAAA,CAAAE,IAAA,CAAAD,cAAA,EAAwBlG,CAAC,CAAC;MAC1ByE,YAAY,CAAC,CAAC;IAChB,CAAC;IACD2B,QAAQ,EAAE;EACZ,CAAC,CAAC,eACFhJ,KAAA,CAAA4B,aAAA,CAACnB,qBAAqB,CAACwI,QAAQ;IAC7BC,KAAK,EAAE;MACL1G,MAAM,EAANA,MAAM;MACNC,QAAQ,EAARA,QAAQ;MACRF,OAAO,EAAPA,OAAO;MACPF,UAAU,EAAVA,UAAU;MACVD,aAAa,EAAbA,aAAa;MACbZ,cAAc,EAAdA;IACF;EAAE,GAED8F,MAAM,iBACLtH,KAAA,CAAA4B,aAAA,CAACxB,MAAM,qBACLJ,KAAA,CAAA4B,aAAA,CAACiC,UAAU;IACTC,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAE9B,YAAa;IACzB+B,SAAS,EAAEA,SAAU;IACrBX,WAAW,EAAEA,WAAY;IACzBc,MAAM,EAAE;EAAE,CACX,CACK,CAEoB,CAC7B,CAAC;AAEV,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"DropdownFlyout.js","names":["EllipsisVertical","React","useCallback","Card","DropdownButton","Portal","useClickOutside","useI18nContext","mergeRefs","defaultOptionRenderer","DropdownFlyoutContext","noop","transformOption","useDropdownFlyout","useDropdownFlyoutContext","StyledDropdownFlyout","StyledDropdownFlyoutItem","rootId","useDropdownFlyoutOverlay","FlyoutCaption","forwardRef","_ref","ref","option","highlighted","optionRenderer","props","_objectWithoutProperties","_excluded","createElement","_extends","displayName","FlyoutItem","_ref2","overlayElRef","useRef","_useDropdownFlyoutCon","isHighlighted","isExpanded","_onClick","onClick","expand","collapse","onMouseEnter","onMouseLeave","e","relatedTarget","Node","current","contains","_React$useState","useState","_React$useState2","_slicedToArray","referenceEl","setReferenceEl","Fragment","role","origin","Array","isArray","children","FlyoutList","options","overlayRef","placement","_ref3","_ref3$offset","offset","_useDropdownFlyoutOve","mainAxis","overlayStyle","referenceRef","useEffect","shadowStrength","style","map","key","id","DefaultButton","_ref4","icon","_excluded2","loading","undefined","arrow","Boolean","Children","count","DropdownFlyout","_ref5","disabled","label","_options","_ref5$onClick","_ref5$optionRenderer","_ref5$placement","_onKeyDown","onKeyDown","onFocus_","onFocus","onBlur_","onBlur","onMouseDown_","onMouseDown","onMouseEnter_","onMouseLeave_","size","_ref5$variant","variant","_excluded3","innerRef","containerRef","targetRef","flyoutOptions","useMemo","_useDropdownFlyout","closeSelectedDropdown","openDropdown","isOpen","setMouseOver","setFocused","onClickOutside","refs","element","I18n","ariaLabel","t","concat","trigger","isValidElement","_containerRef$current","target","dataset","flyout","preventDefault","_targetRef$current","focus","_React$useState3","_React$useState4","memoRef","cloneElement","_trigger$props$onClic","_trigger$props","call","tabIndex","Provider","value"],"sources":["../../src/DropdownFlyout/DropdownFlyout.tsx"],"sourcesContent":["import { EllipsisVertical } from '@procore/core-icons/dist'\nimport type { MouseEvent } from 'react'\nimport React, { useCallback } from 'react'\nimport type { ButtonProps } from '../Button'\nimport { Card } from '../Card'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport { Portal } from '../Portal'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { ReactElementWithRef } from '../_utils/types'\nimport {\n defaultOptionRenderer,\n DropdownFlyoutContext,\n noop,\n transformOption,\n useDropdownFlyout,\n useDropdownFlyoutContext,\n} from './DropdownFlyout.helpers'\nimport {\n StyledDropdownFlyout,\n StyledDropdownFlyoutItem,\n} from './DropdownFlyout.styles'\nimport type {\n DropdownFlyoutProps,\n FlyoutCaptionProps,\n FlyoutItemProps,\n FlyoutListProps,\n} from './DropdownFlyout.types'\nimport { rootId } from './DropdownFlyout.types'\nimport { useDropdownFlyoutOverlay } from './useDropdownFlyoutOverlay'\n\nexport const FlyoutCaption = React.forwardRef<\n HTMLDivElement,\n FlyoutCaptionProps\n>(function FlyoutCaption(\n { option, highlighted, optionRenderer, ...props },\n ref\n) {\n return (\n <StyledDropdownFlyoutItem\n {...props}\n ref={ref}\n data-highlighted={highlighted}\n data-flyout\n >\n {optionRenderer(option)}\n </StyledDropdownFlyoutItem>\n )\n})\n\nFlyoutCaption.displayName = 'FlyoutCaption'\n\nexport function FlyoutItem({ option }: FlyoutItemProps) {\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const {\n isHighlighted,\n isExpanded,\n onClick: _onClick,\n expand,\n collapse,\n optionRenderer,\n } = useDropdownFlyoutContext()\n\n const onMouseEnter = React.useCallback(() => expand(option), [option, expand])\n const onMouseLeave = React.useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (\n e.relatedTarget instanceof Node &&\n overlayElRef.current &&\n !overlayElRef.current.contains(e.relatedTarget as Node)\n ) {\n collapse(option)\n }\n },\n [collapse, option]\n )\n\n const onClick = React.useCallback(() => _onClick(option), [_onClick, option])\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <>\n <FlyoutCaption\n ref={setReferenceEl}\n role=\"listitem\"\n option={option.origin}\n onClick={onClick}\n optionRenderer={optionRenderer}\n highlighted={isHighlighted(option)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {Array.isArray(option.children) && isExpanded(option) ? (\n <Portal>\n <FlyoutList\n referenceEl={referenceEl}\n options={option.children}\n overlayRef={overlayElRef}\n placement=\"right-top\"\n />\n </Portal>\n ) : null}\n </>\n )\n}\n\nexport function FlyoutList({\n options,\n placement,\n referenceEl,\n overlayRef: overlayElRef,\n offset = 0,\n}: FlyoutListProps) {\n const { overlayStyle, referenceRef, overlayRef } = useDropdownFlyoutOverlay({\n placement,\n offset: { mainAxis: offset },\n })\n\n React.useEffect(() => {\n referenceRef(referenceEl)\n }, [referenceEl, referenceRef])\n\n return (\n <Card\n ref={mergeRefs(overlayRef, overlayElRef)}\n shadowStrength={2}\n style={overlayStyle}\n >\n <StyledDropdownFlyout role=\"list\">\n {options.map((option) => (\n <FlyoutItem key={option.id} option={option} />\n ))}\n </StyledDropdownFlyout>\n </Card>\n )\n}\n\nconst DefaultButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function DefaultButton({ children, icon, ...props }, ref) {\n return (\n <DropdownButton\n {...props}\n icon={\n props.loading ? undefined : !icon && !children ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n arrow={Boolean(React.Children.count(children))}\n ref={ref}\n >\n {children}\n </DropdownButton>\n )\n }\n)\n\n/**\n\n The dropdown flyout allows for additional menu items to be nested within\n parent items, which allows more menu options for users.\n @a11y WARN: DropdownFlyotus hold no value and take an action. Focus is expected\n to be moved from a Dropdown to something else, to continue the user flow.\n If the action is inert and does not move focus, this is left to be added\n by the consumer.\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropdownflyout--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown-flyout)\n\n */\nexport const DropdownFlyout = React.forwardRef<\n HTMLDivElement,\n DropdownFlyoutProps\n>(function DropdownFlyout(\n {\n disabled,\n icon,\n label,\n loading,\n options: _options,\n onClick: _onClick = noop,\n optionRenderer = defaultOptionRenderer,\n children,\n placement = 'right-bottom',\n onKeyDown: _onKeyDown,\n onFocus: onFocus_,\n onBlur: onBlur_,\n onMouseDown: onMouseDown_,\n onMouseEnter: onMouseEnter_,\n onMouseLeave: onMouseLeave_,\n size,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const containerRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const targetRef = React.useRef<HTMLElement>(null)\n\n const flyoutOptions = React.useMemo(\n () => transformOption(_options, rootId),\n [_options]\n )\n\n const {\n options,\n collapse,\n expand,\n closeSelectedDropdown,\n openDropdown,\n isOpen,\n onClick,\n onKeyDown,\n setMouseOver,\n setFocused,\n isExpanded,\n isHighlighted,\n } = useDropdownFlyout({\n flyoutOptions,\n onClick: _onClick,\n onKeyDown: _onKeyDown,\n })\n\n useClickOutside({\n onClickOutside: isOpen ? closeSelectedDropdown : noop,\n refs: [containerRef],\n })\n\n const element =\n typeof children === 'function' ? children({ isOpen }) : children\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${loading ? 'loading' : 'moreOptions'}`)\n\n const trigger: ReactElementWithRef = React.isValidElement(element) ? (\n element\n ) : (\n <DefaultButton\n aria-label={ariaLabel}\n children={label}\n disabled={disabled}\n loading={loading}\n icon={icon}\n size={size}\n variant={variant}\n />\n )\n\n function onBlur(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(false)\n closeSelectedDropdown(e)\n onBlur_?.(e)\n }\n\n function onFocus(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(true)\n onFocus_?.(e)\n }\n\n function onMouseDown(e: React.MouseEvent<HTMLDivElement>) {\n // Discard firing of blur event\n // when click was inside the dropdown\n if ((e.target as HTMLElement).dataset.flyout) {\n e.preventDefault()\n return\n }\n if (e.target instanceof Node && containerRef.current?.contains(e.target)) {\n e.preventDefault()\n targetRef.current?.focus()\n }\n onMouseDown_?.(e)\n }\n\n function onMouseLeave(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(false)\n onMouseLeave_?.(e)\n }\n\n function onMouseEnter(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(true)\n onMouseEnter_?.(e)\n }\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n // mergeRefs function is from shared utils.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const memoRef = useCallback(\n trigger.ref\n ? mergeRefs(trigger.ref, targetRef, setReferenceEl)\n : mergeRefs(targetRef, setReferenceEl),\n [targetRef, setReferenceEl, trigger.ref]\n )\n return (\n <div\n {...props}\n aria-label={undefined}\n ref={containerRef}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onMouseDown={onMouseDown}\n onBlur={onBlur}\n >\n {React.cloneElement(trigger, {\n ref: memoRef,\n onClick: (e: MouseEvent<HTMLElement, 'click'>) => {\n trigger.props.onClick?.(e)\n openDropdown()\n },\n tabIndex: 0,\n })}\n <DropdownFlyoutContext.Provider\n value={{\n expand,\n collapse,\n onClick,\n isExpanded,\n isHighlighted,\n optionRenderer,\n }}\n >\n {isOpen && (\n <Portal>\n <FlyoutList\n options={options}\n overlayRef={overlayElRef}\n placement={placement}\n referenceEl={referenceEl}\n offset={4}\n />\n </Portal>\n )}\n </DropdownFlyoutContext.Provider>\n </div>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,OAAOC,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAE1C,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,qBAAqB,EACrBC,IAAI,EACJC,eAAe,EACfC,iBAAiB,EACjBC,wBAAwB,QACnB,0BAA0B;AACjC,SACEC,oBAAoB,EACpBC,wBAAwB,QACnB,yBAAyB;AAOhC,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,wBAAwB,QAAQ,4BAA4B;AAErE,O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BACLJ,KAAA,CAAA4B,aAAA,CAACiC,UAAU;IACTC,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAE9B,YAAa;IACzB+B,SAAS,EAAEA,SAAU;IACrBX,WAAW,EAAEA,WAAY;IACzBc,MAAM,EAAE;EAAE,CACX,CACK,CAEoB,CAC7B,CAAC;AAEV,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledDropdownFlyout: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const StyledDropdownFlyoutItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const StyledDropdownFlyoutLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
5
|
+
export declare const StyledDropdownFlyoutExpandIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
@@ -6,18 +6,18 @@ import { getEllipsis } from '../_styles/mixins';
|
|
|
6
6
|
import { spacing } from '../_styles/spacing';
|
|
7
7
|
export var StyledDropdownFlyout = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledDropdownFlyout",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_22_0__sc-1i79jsg-0"
|
|
10
10
|
})(["display:flex;flex-wrap:wrap;flex-direction:column;width:100%;max-height:855px;padding:", "px 0;"], spacing.sm);
|
|
11
11
|
export var StyledDropdownFlyoutItem = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledDropdownFlyoutItem",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_22_0__sc-1i79jsg-1"
|
|
14
14
|
})(["display:flex;justify-content:space-between;cursor:pointer;width:100%;padding:", "px ", "px;color:", ";", " &[data-highlighted='true'],&:hover{background-color:", ";}"], spacing.xs, spacing.lg, colors.gray20, getTypographyIntent('body'), colors.gray96);
|
|
15
15
|
export var StyledDropdownFlyoutLabel = /*#__PURE__*/styled.span.withConfig({
|
|
16
16
|
displayName: "StyledDropdownFlyoutLabel",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_22_0__sc-1i79jsg-2"
|
|
18
18
|
})(["", ""], getEllipsis());
|
|
19
19
|
export var StyledDropdownFlyoutExpandIcon = /*#__PURE__*/styled.span.withConfig({
|
|
20
20
|
displayName: "StyledDropdownFlyoutExpandIcon",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_22_0__sc-1i79jsg-3"
|
|
22
22
|
})(["position:relative;display:inline-flex;align-self:center;flex-shrink:0;margin-left:", "px;white-space:nowrap;", ""], spacing.lg, arrowRight(4, 'black'));
|
|
23
23
|
//# sourceMappingURL=DropdownFlyout.styles.js.map
|
|
@@ -72,7 +72,10 @@ export interface FlyoutListProps extends DivAttributes {
|
|
|
72
72
|
referenceEl: HTMLElement | null;
|
|
73
73
|
offset?: number;
|
|
74
74
|
}
|
|
75
|
-
export interface DropdownFlyoutProps extends Omit<DivAttributes, 'onClick'> {
|
|
75
|
+
export interface DropdownFlyoutProps extends Omit<DivAttributes, 'children' | 'onClick'> {
|
|
76
|
+
children?: React.ReactNode | React.FunctionComponent<{
|
|
77
|
+
isOpen?: boolean;
|
|
78
|
+
}>;
|
|
76
79
|
/**
|
|
77
80
|
* @since 10.19.0
|
|
78
81
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownFlyout.types.js","names":["rootId"],"sources":["../../src/DropdownFlyout/DropdownFlyout.types.ts"],"sourcesContent":["import type { Ref } from 'react'\nimport type { DropdownProps } from '../Dropdown/Dropdown.types'\nimport type { OverlayProps } from '../Overlay/Overlay'\nimport type { DivAttributes, Placement, Props } from '../_utils/types'\n\nexport const rootId = 'ROOT_ID'\n\nexport type Action =\n | { type: 'highlight'; option: FlyoutOption }\n | { type: 'expand'; option: FlyoutOption }\n | { type: 'collapse'; option: FlyoutOption }\n | { type: 'close' }\n | { type: 'open' }\n | { type: 'setMouseOver'; isMouseOver: boolean }\n | { type: 'setFocused'; isFocused: boolean }\n | { type: 'updateOptions'; options: FlyoutOption[] }\n\ntype ExpandedItem = FlyoutOptionId\n\nexport type State = {\n highlighted: FlyoutOption\n expanded: ExpandedItem[]\n options: FlyoutOption[]\n isMouseOver: boolean\n isFocused: boolean\n isOpen: boolean\n}\n\nexport interface DropdownOption {\n value: any\n label: string\n children?: DropdownOption[]\n}\n\ntype OptionId = string\nexport interface FlyoutOption {\n /**\n * @since 10.19.0\n */\n id: OptionId\n /**\n * @since 10.19.0\n */\n parentId: OptionId | typeof rootId\n /**\n * @since 10.19.0\n */\n origin: DropdownOption\n /**\n * @since 10.19.0\n */\n children?: FlyoutOption[]\n}\n\nexport type FlyoutOptionId = FlyoutOption['id'] | typeof rootId\n\nexport interface FlyoutCaptionProps extends DivAttributes {\n option: DropdownOption\n highlighted: boolean\n optionRenderer: (option: DropdownOption) => React.ReactNode\n}\n\nexport interface FlyoutListProps extends DivAttributes {\n options: FlyoutOption[]\n overlayRef: Ref<HTMLDivElement>\n placement: Placement\n referenceEl: HTMLElement | null\n offset?: number\n}\n\nexport interface DropdownFlyoutProps
|
|
1
|
+
{"version":3,"file":"DropdownFlyout.types.js","names":["rootId"],"sources":["../../src/DropdownFlyout/DropdownFlyout.types.ts"],"sourcesContent":["import type { Ref } from 'react'\nimport type { DropdownProps } from '../Dropdown/Dropdown.types'\nimport type { OverlayProps } from '../Overlay/Overlay'\nimport type { DivAttributes, Placement, Props } from '../_utils/types'\n\nexport const rootId = 'ROOT_ID'\n\nexport type Action =\n | { type: 'highlight'; option: FlyoutOption }\n | { type: 'expand'; option: FlyoutOption }\n | { type: 'collapse'; option: FlyoutOption }\n | { type: 'close' }\n | { type: 'open' }\n | { type: 'setMouseOver'; isMouseOver: boolean }\n | { type: 'setFocused'; isFocused: boolean }\n | { type: 'updateOptions'; options: FlyoutOption[] }\n\ntype ExpandedItem = FlyoutOptionId\n\nexport type State = {\n highlighted: FlyoutOption\n expanded: ExpandedItem[]\n options: FlyoutOption[]\n isMouseOver: boolean\n isFocused: boolean\n isOpen: boolean\n}\n\nexport interface DropdownOption {\n value: any\n label: string\n children?: DropdownOption[]\n}\n\ntype OptionId = string\nexport interface FlyoutOption {\n /**\n * @since 10.19.0\n */\n id: OptionId\n /**\n * @since 10.19.0\n */\n parentId: OptionId | typeof rootId\n /**\n * @since 10.19.0\n */\n origin: DropdownOption\n /**\n * @since 10.19.0\n */\n children?: FlyoutOption[]\n}\n\nexport type FlyoutOptionId = FlyoutOption['id'] | typeof rootId\n\nexport interface FlyoutCaptionProps extends DivAttributes {\n option: DropdownOption\n highlighted: boolean\n optionRenderer: (option: DropdownOption) => React.ReactNode\n}\n\nexport interface FlyoutListProps extends DivAttributes {\n options: FlyoutOption[]\n overlayRef: Ref<HTMLDivElement>\n placement: Placement\n referenceEl: HTMLElement | null\n offset?: number\n}\n\nexport interface DropdownFlyoutProps\n extends Omit<DivAttributes, 'children' | 'onClick'> {\n children?: React.ReactNode | React.FunctionComponent<{ isOpen?: boolean }>\n /**\n * @since 10.19.0\n */\n disabled?: DropdownProps['disabled']\n\n /**\n * The text of the button.\n * @since 10.19.0\n */\n label?: DropdownProps['label']\n /**\n * @since 10.19.0\n */\n loading?: DropdownProps['loading']\n\n /**\n * The icon of the button.\n * @since 10.19.0\n */\n icon?: DropdownProps['icon']\n\n /**\n * Data of the dropdown options - `Option[]`\n * ```\n * type Option = { label: string; children?: Option[] }\n * ```\n * @since 10.19.0\n */\n options: DropdownOption[]\n\n /**\n * Callback for click on dropdown option\n * ```\n * (option: Option) => void\n * ```\n * @since 10.19.0\n */\n onClick?: (option: DropdownOption) => void\n\n /**\n * Render prop to specify custom dropdown option content\n * ```\n * (option: Option) => ReactNode\n * ```\n * @since 10.19.0\n */\n optionRenderer?: (option: DropdownOption) => React.ReactNode\n\n /**\n * @default 'right-bottom'\n * @since 10.19.0\n */\n placement?: OverlayProps['placement']\n\n /**\n * The button size\n * @default 'md'\n * @since 10.19.0\n */\n size?: DropdownProps['size']\n\n /**\n * @default 'secondary'\n * @since 10.19.0\n */\n variant?: DropdownProps['variant']\n}\n\nexport interface FlyoutItemProps extends Props {\n option: FlyoutOption\n}\n"],"mappings":"AAKA,OAAO,IAAMA,MAAM,GAAG,SAAS"}
|
|
@@ -2,7 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { DivAttributes } from '../_utils/types';
|
|
3
3
|
import type { DropzoneContentProps, DropzoneErrorBannerProps, DropzoneProps, DropzoneRef, MultipleErrorsProps } from './Dropzone.types';
|
|
4
4
|
export declare function MultipleErrors(props: MultipleErrorsProps): React.JSX.Element;
|
|
5
|
-
export declare const DropzoneErrorBanner: import("styled-components").
|
|
5
|
+
export declare const DropzoneErrorBanner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<DropzoneErrorBannerProps & DivAttributes & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
+
}, never>> & string & Omit<React.ForwardRefExoticComponent<DropzoneErrorBannerProps & DivAttributes & React.RefAttributes<HTMLDivElement>>, keyof React.Component<any, {}, any>>;
|
|
6
8
|
export declare function DropzoneDefaultMessage({ open, disabled, multiple, errorMessage, }: DropzoneContentProps & {
|
|
7
9
|
multiple: boolean;
|
|
8
10
|
}): React.JSX.Element;
|
|
@@ -95,7 +95,7 @@ export function MultipleErrors(props) {
|
|
|
95
95
|
// make error banner accessible as a styled-components selector
|
|
96
96
|
export var DropzoneErrorBanner = /*#__PURE__*/styled(DropzoneErrorBannerBase).withConfig({
|
|
97
97
|
displayName: "DropzoneErrorBanner",
|
|
98
|
-
componentId: "core-
|
|
98
|
+
componentId: "core-12_22_0__sc-l4fojb-0"
|
|
99
99
|
})([""]);
|
|
100
100
|
function DropzoneContainer(_ref2) {
|
|
101
101
|
var active = _ref2.active,
|
|
@@ -104,8 +104,8 @@ function DropzoneContainer(_ref2) {
|
|
|
104
104
|
rootProps = _ref2.rootProps,
|
|
105
105
|
children = _ref2.children;
|
|
106
106
|
return /*#__PURE__*/React.createElement(StyledDropzoneContainer, _extends({}, getRootProps(rootProps), {
|
|
107
|
-
active: active,
|
|
108
|
-
disabled: disabled
|
|
107
|
+
$active: active,
|
|
108
|
+
$disabled: disabled
|
|
109
109
|
}), children);
|
|
110
110
|
}
|
|
111
111
|
function DropzoneContent(_ref3) {
|
|
@@ -113,7 +113,7 @@ function DropzoneContent(_ref3) {
|
|
|
113
113
|
isIconVisible = _ref3.isIconVisible,
|
|
114
114
|
contentMessage = _ref3.contentMessage;
|
|
115
115
|
return /*#__PURE__*/React.createElement(StyledDropzoneMessage, null, isIconVisible && /*#__PURE__*/React.createElement(StyledDropzoneIcon, {
|
|
116
|
-
disabled: disabled
|
|
116
|
+
$disabled: disabled
|
|
117
117
|
}, disabled ? /*#__PURE__*/React.createElement(Ban, null) : /*#__PURE__*/React.createElement(Image, null)), contentMessage);
|
|
118
118
|
}
|
|
119
119
|
export function DropzoneDefaultMessage(_ref4) {
|
|
@@ -129,7 +129,7 @@ export function DropzoneDefaultMessage(_ref4) {
|
|
|
129
129
|
}, I18n.t('core.dropzone.uploadFiles', {
|
|
130
130
|
count: multiple ? Infinity : 1
|
|
131
131
|
})), /*#__PURE__*/React.createElement(StyledDropzoneCaption, {
|
|
132
|
-
error: !!errorMessage
|
|
132
|
+
$error: !!errorMessage
|
|
133
133
|
}, errorMessage || I18n.t('core.dropzone.dragAndDrop')));
|
|
134
134
|
}
|
|
135
135
|
var dropErrorsByReason = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, fileRejectionReason.maxFiles, dropErrors.fileAmount), fileRejectionReason.maxFileSize, dropErrors.maxFileSize), fileRejectionReason.minFileSize, dropErrors.minFileSize), fileRejectionReason.fileType, dropErrors.fileType);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropzone.js","names":["Ban","Image","equals","omit","React","styled","Banner","Box","Button","Token","Tooltip","Typography","useI18nContext","useResizeObserver","useFocusWithin","StyledDropzoneCaption","StyledDropzoneContainer","StyledDropzoneFocusDetector","StyledDropzoneIcon","StyledDropzoneMessage","StyledDropzoneWrapper","StyledErrorBanner","StyledErrorBannerDetails","StyledUploadButton","dropErrors","fileRejectionReason","getFileDetail","isZeroSize","extendedViewHeightBreakpoint","DropzoneErrorBannerBase","forwardRef","_ref","ref","error","onDismiss","qa","fileRejections","props","_objectWithoutProperties","_excluded","I18n","_React$useState","useState","_React$useState2","_slicedToArray","isExpanded","setExpanded","useEffect","title","body","message","type","reset","createElement","_extends","Content","Title","Body","Action","showErrorDetails","onClick","prev","t","Dismiss","hideError","ExpandableContent","expanded","MultipleErrors","filesByErrorType","reduce","acc","rejection","errors","forEach","dropErrorType","dropErrorsByReason","code","push","file","_defineProperty","fileAmount","minFileSize","maxFileSize","fileType","oneFileAtATime","multipleErrors","messages","count","maxFiles","minSize","sizeInMegabytes","getSizeInMB","maxSize","map","errorType","files","length","key","weight","name","DropzoneErrorBanner","withConfig","displayName","componentId","DropzoneContainer","_ref2","active","disabled","getRootProps","rootProps","children","DropzoneContent","_ref3","isIconVisible","contentMessage","DropzoneDefaultMessage","_ref4","open","multiple","errorMessage","Fragment","variant","Infinity","Dropzone_","Dropzone","_ref5","forceIconVisibility","contentRenderer","tooltip","rootRef","inputRef","dragError","dropError","dispatchDropError","getInputProps","isDragActive","_ref5$rootProps","_ref5$inputProps","inputProps","className","tokens","onClear","_React$useState3","_React$useState4","setIsIconVisible","_useFocusWithin","isFocusWithin","containerProps","toggleIconVisibility","useCallback","entries","_ref6","target","height","offsetHeight","setResizeObserverTarget","current","useImperativeHandle","isDropzoneDisabled","Boolean","useMemo","validRootProps","validInputProps","direction","alignItems","gap","trigger","overlay","as","display","flexWrap","paddingTop","token","Label","Remove","memo"],"sources":["../../src/Dropzone/Dropzone.tsx"],"sourcesContent":["import { Ban, Image } from '@procore/core-icons/dist'\nimport { equals, omit } from 'ramda'\nimport React from 'react'\nimport styled from 'styled-components'\nimport { Banner } from '../Banner'\nimport { Box } from '../Box'\nimport { Button } from '../Button'\nimport { Token } from '../Token'\nimport { Tooltip } from '../Tooltip'\nimport { Typography } from '../Typography'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useResizeObserver } from '../_hooks/ResizeObserver'\nimport { useFocusWithin } from '../_hooks/useFocusWithin'\nimport type { DivAttributes, Props } from '../_utils/types'\nimport {\n StyledDropzoneCaption,\n StyledDropzoneContainer,\n StyledDropzoneFocusDetector,\n StyledDropzoneIcon,\n StyledDropzoneMessage,\n StyledDropzoneWrapper,\n StyledErrorBanner,\n StyledErrorBannerDetails,\n StyledUploadButton,\n} from './Dropzone.styles'\nimport type {\n ContainerProps,\n ContentProps,\n DropErrorType,\n DropzoneContentProps,\n DropzoneErrorBannerProps,\n DropzoneInputProps,\n DropzoneProps,\n DropzoneRef,\n DropzoneRootProps,\n FileRejectionReason,\n MultipleErrorsProps,\n} from './Dropzone.types'\nimport { dropErrors, fileRejectionReason } from './Dropzone.types'\nimport { getFileDetail, isZeroSize } from './Dropzone.utils'\n\nconst extendedViewHeightBreakpoint = 172\n\nconst DropzoneErrorBannerBase = React.forwardRef<\n HTMLDivElement,\n DropzoneErrorBannerProps & DivAttributes\n>(({ error, onDismiss, qa, fileRejections, ...props }, ref) => {\n const I18n = useI18nContext()\n const [isExpanded, setExpanded] = React.useState(false)\n\n React.useEffect(() => {\n setExpanded(false)\n }, [error.title, error.body, error.message])\n\n if (error.type === dropErrors.reset) {\n return null\n }\n\n return (\n <StyledErrorBanner {...props} ref={ref}>\n <Banner.Content>\n <Banner.Title>{error.title}</Banner.Title>\n <Banner.Body>{error.message}</Banner.Body>\n </Banner.Content>\n {error.body ? (\n <Banner.Action>\n <Button\n data-qa={qa?.showErrorDetails}\n onClick={() => setExpanded((prev) => !prev)}\n >\n {isExpanded\n ? I18n.t('core.dropzone.hideDetails')\n : I18n.t('core.dropzone.showDetails')}\n </Button>\n </Banner.Action>\n ) : null}\n <Banner.Dismiss onClick={onDismiss} data-qa={qa?.hideError} />\n {error.body ? (\n <Banner.ExpandableContent expanded={isExpanded}>\n {error.body}\n </Banner.ExpandableContent>\n ) : null}\n </StyledErrorBanner>\n )\n})\n\nexport function MultipleErrors(props: MultipleErrorsProps) {\n const I18n = useI18nContext()\n\n const filesByErrorType = props.fileRejections.reduce(\n (acc, rejection) => {\n rejection.errors.forEach((error) => {\n const dropErrorType = dropErrorsByReason[error.code]\n acc[dropErrorType].push(rejection.file)\n })\n\n return acc\n },\n {\n [dropErrors.fileAmount]: [],\n [dropErrors.minFileSize]: [],\n [dropErrors.maxFileSize]: [],\n [dropErrors.fileType]: [],\n [dropErrors.oneFileAtATime]: [],\n [dropErrors.reset]: [],\n [dropErrors.multipleErrors]: [],\n } as Record<DropErrorType, File[]>\n )\n\n const messages: Record<DropErrorType, string> = {\n [dropErrors.fileAmount]: I18n.t('core.dropzone.maxFileNumberErrorGroup', {\n count: props.maxFiles,\n }),\n [dropErrors.minFileSize]: isZeroSize(props.minSize)\n ? I18n.t('core.dropzone.zeroFileSizeErrorGroup')\n : I18n.t('core.dropzone.minFileSizeErrorGroup', {\n sizeInMegabytes: getSizeInMB(props.minSize as number),\n }),\n [dropErrors.maxFileSize]: I18n.t('core.dropzone.maxFileSizeErrorGroup', {\n sizeInMegabytes: getSizeInMB(props.maxSize as number),\n }),\n [dropErrors.fileType]: I18n.t('core.dropzone.wrongFileTypeErrorGroup'),\n [dropErrors.reset]: '',\n [dropErrors.multipleErrors]: '',\n [dropErrors.oneFileAtATime]: '',\n }\n\n return (\n <div>\n {[\n dropErrors.fileAmount,\n dropErrors.fileType,\n dropErrors.maxFileSize,\n dropErrors.minFileSize,\n ].map((errorType) => {\n const files = filesByErrorType[errorType]\n return files.length ? (\n <div key={errorType}>\n <Typography weight=\"bold\">{messages[errorType]}</Typography>\n <StyledErrorBannerDetails>\n {filesByErrorType[errorType].map((file) => (\n <li key={file.name}>{getFileDetail(file)}</li>\n ))}\n </StyledErrorBannerDetails>\n </div>\n ) : null\n })}\n </div>\n )\n}\n\n// make error banner accessible as a styled-components selector\nexport const DropzoneErrorBanner = styled(DropzoneErrorBannerBase)``\n\nfunction DropzoneContainer({\n active,\n disabled,\n getRootProps,\n rootProps,\n children,\n}: ContainerProps & Props) {\n return (\n <StyledDropzoneContainer\n {...getRootProps(rootProps)}\n active={active}\n disabled={disabled}\n >\n {children}\n </StyledDropzoneContainer>\n )\n}\n\nfunction DropzoneContent({\n disabled,\n isIconVisible,\n contentMessage,\n}: ContentProps) {\n return (\n <StyledDropzoneMessage>\n {isIconVisible && (\n <StyledDropzoneIcon disabled={disabled}>\n {disabled ? <Ban /> : <Image />}\n </StyledDropzoneIcon>\n )}\n {contentMessage}\n </StyledDropzoneMessage>\n )\n}\n\nexport function DropzoneDefaultMessage({\n open,\n disabled,\n multiple,\n errorMessage,\n}: DropzoneContentProps & { multiple: boolean }) {\n const I18n = useI18nContext()\n\n return (\n <>\n <StyledUploadButton\n variant=\"secondary\"\n onClick={open}\n disabled={disabled}\n >\n {I18n.t('core.dropzone.uploadFiles', {\n count: multiple ? Infinity : 1,\n })}\n </StyledUploadButton>\n <StyledDropzoneCaption error={!!errorMessage}>\n {errorMessage || I18n.t('core.dropzone.dragAndDrop')}\n </StyledDropzoneCaption>\n </>\n )\n}\n\nconst dropErrorsByReason = {\n [fileRejectionReason.maxFiles]: dropErrors.fileAmount,\n [fileRejectionReason.maxFileSize]: dropErrors.maxFileSize,\n [fileRejectionReason.minFileSize]: dropErrors.minFileSize,\n [fileRejectionReason.fileType]: dropErrors.fileType,\n} as Record<FileRejectionReason, DropErrorType>\n\nconst getSizeInMB = (maxSize: number): number => maxSize / 10e5\n\nconst Dropzone_ = React.forwardRef<DropzoneRef, DropzoneProps>(\n function Dropzone(\n {\n isIconVisible: forceIconVisibility,\n contentRenderer,\n disabled,\n tooltip,\n rootRef,\n inputRef,\n dragError,\n dropError,\n dispatchDropError,\n getRootProps,\n getInputProps,\n isDragActive,\n multiple,\n fileRejections,\n open,\n rootProps = {} as DropzoneRootProps,\n inputProps = {} as DropzoneInputProps,\n className,\n qa,\n tokens,\n onClear,\n },\n ref\n ) {\n const [isIconVisible, setIsIconVisible] = React.useState(false)\n const { isFocusWithin, containerProps } = useFocusWithin()\n\n const toggleIconVisibility = React.useCallback(\n (entries: ResizeObserverEntry[]) => {\n const { offsetHeight: height } = entries[0].target as HTMLElement\n setIsIconVisible(height >= extendedViewHeightBreakpoint)\n },\n [setIsIconVisible]\n )\n\n const setResizeObserverTarget = useResizeObserver(toggleIconVisibility)\n\n React.useEffect(() => {\n setResizeObserverTarget(rootRef.current)\n }, [rootRef, setResizeObserverTarget])\n\n React.useImperativeHandle(ref, () => ({\n rootRef: rootRef as React.RefObject<HTMLElement>,\n inputRef: inputRef as React.RefObject<HTMLInputElement>,\n open,\n }))\n\n const isDropzoneDisabled = disabled || Boolean(dragError)\n\n const contentMessage = React.useMemo(\n () =>\n contentRenderer ? (\n contentRenderer({\n open,\n disabled: isDropzoneDisabled,\n errorMessage: dragError,\n })\n ) : (\n <DropzoneDefaultMessage\n open={open}\n disabled={isDropzoneDisabled}\n errorMessage={dragError}\n multiple={multiple}\n />\n ),\n [contentRenderer, open, isDropzoneDisabled, dragError, multiple]\n )\n\n const validRootProps = React.useMemo(\n () => omit(['disabled'], rootProps),\n [rootProps]\n )\n\n const validInputProps = React.useMemo(\n () => omit(['accept', 'multiple', 'type'], inputProps),\n [inputProps]\n )\n\n return (\n <StyledDropzoneWrapper\n direction=\"column\"\n alignItems=\"stretch\"\n gap=\"xs\"\n className={className}\n >\n <Tooltip\n trigger={Boolean(tooltip) ? 'hover' : 'none'}\n overlay={tooltip || ''}\n >\n <StyledDropzoneFocusDetector {...containerProps}>\n <DropzoneContainer\n rootProps={validRootProps}\n active={isDragActive || isFocusWithin}\n disabled={isDropzoneDisabled}\n getRootProps={getRootProps}\n >\n <input type=\"file\" {...getInputProps(validInputProps)} />\n <DropzoneContent\n disabled={isDropzoneDisabled}\n isIconVisible={\n typeof forceIconVisibility === 'undefined'\n ? isIconVisible\n : forceIconVisibility\n }\n contentMessage={contentMessage}\n />\n </DropzoneContainer>\n </StyledDropzoneFocusDetector>\n </Tooltip>\n <DropzoneErrorBanner\n qa={qa}\n error={dropError}\n fileRejections={fileRejections}\n onDismiss={() => dispatchDropError(dropErrors.reset)}\n />\n {tokens && tokens.length > 0 && (\n <Box as=\"ul\" display=\"flex\" flexWrap=\"wrap\" gap=\"sm\" paddingTop=\"lg\">\n {tokens.map((token) => (\n <li key={token.name}>\n <Token>\n <Token.Label>{getFileDetail(token)}</Token.Label>\n {onClear && <Token.Remove onClick={() => onClear(token)} />}\n </Token>\n </li>\n ))}\n </Box>\n )}\n </StyledDropzoneWrapper>\n )\n }\n)\n\nDropzoneContainer.displayName = 'DropzoneContainer'\n\nDropzoneContent.displayName = 'DropzoneContent'\n\nDropzone_.displayName = 'Dropzone'\n\n/**\n\n Dropzones allow users to quickly upload files from their computers, as well\n as optionally launch the file select component.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropzone--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropzone)\n\n*/\nexport const Dropzone = React.memo(Dropzone_, equals)\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAASA,GAAG,EAAEC,KAAK,QAAQ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","names":["Ban","Image","equals","omit","React","styled","Banner","Box","Button","Token","Tooltip","Typography","useI18nContext","useResizeObserver","useFocusWithin","StyledDropzoneCaption","StyledDropzoneContainer","StyledDropzoneFocusDetector","StyledDropzoneIcon","StyledDropzoneMessage","StyledDropzoneWrapper","StyledErrorBanner","StyledErrorBannerDetails","StyledUploadButton","dropErrors","fileRejectionReason","getFileDetail","isZeroSize","extendedViewHeightBreakpoint","DropzoneErrorBannerBase","forwardRef","_ref","ref","error","onDismiss","qa","fileRejections","props","_objectWithoutProperties","_excluded","I18n","_React$useState","useState","_React$useState2","_slicedToArray","isExpanded","setExpanded","useEffect","title","body","message","type","reset","createElement","_extends","Content","Title","Body","Action","showErrorDetails","onClick","prev","t","Dismiss","hideError","ExpandableContent","expanded","MultipleErrors","filesByErrorType","reduce","acc","rejection","errors","forEach","dropErrorType","dropErrorsByReason","code","push","file","_defineProperty","fileAmount","minFileSize","maxFileSize","fileType","oneFileAtATime","multipleErrors","messages","count","maxFiles","minSize","sizeInMegabytes","getSizeInMB","maxSize","map","errorType","files","length","key","weight","name","DropzoneErrorBanner","withConfig","displayName","componentId","DropzoneContainer","_ref2","active","disabled","getRootProps","rootProps","children","$active","$disabled","DropzoneContent","_ref3","isIconVisible","contentMessage","DropzoneDefaultMessage","_ref4","open","multiple","errorMessage","Fragment","variant","Infinity","$error","Dropzone_","Dropzone","_ref5","forceIconVisibility","contentRenderer","tooltip","rootRef","inputRef","dragError","dropError","dispatchDropError","getInputProps","isDragActive","_ref5$rootProps","_ref5$inputProps","inputProps","className","tokens","onClear","_React$useState3","_React$useState4","setIsIconVisible","_useFocusWithin","isFocusWithin","containerProps","toggleIconVisibility","useCallback","entries","_ref6","target","height","offsetHeight","setResizeObserverTarget","current","useImperativeHandle","isDropzoneDisabled","Boolean","useMemo","validRootProps","validInputProps","direction","alignItems","gap","trigger","overlay","as","display","flexWrap","paddingTop","token","Label","Remove","memo"],"sources":["../../src/Dropzone/Dropzone.tsx"],"sourcesContent":["import { Ban, Image } from '@procore/core-icons/dist'\nimport { equals, omit } from 'ramda'\nimport React from 'react'\nimport styled from 'styled-components'\nimport { Banner } from '../Banner'\nimport { Box } from '../Box'\nimport { Button } from '../Button'\nimport { Token } from '../Token'\nimport { Tooltip } from '../Tooltip'\nimport { Typography } from '../Typography'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useResizeObserver } from '../_hooks/ResizeObserver'\nimport { useFocusWithin } from '../_hooks/useFocusWithin'\nimport type { DivAttributes, Props } from '../_utils/types'\nimport {\n StyledDropzoneCaption,\n StyledDropzoneContainer,\n StyledDropzoneFocusDetector,\n StyledDropzoneIcon,\n StyledDropzoneMessage,\n StyledDropzoneWrapper,\n StyledErrorBanner,\n StyledErrorBannerDetails,\n StyledUploadButton,\n} from './Dropzone.styles'\nimport type {\n ContainerProps,\n ContentProps,\n DropErrorType,\n DropzoneContentProps,\n DropzoneErrorBannerProps,\n DropzoneInputProps,\n DropzoneProps,\n DropzoneRef,\n DropzoneRootProps,\n FileRejectionReason,\n MultipleErrorsProps,\n} from './Dropzone.types'\nimport { dropErrors, fileRejectionReason } from './Dropzone.types'\nimport { getFileDetail, isZeroSize } from './Dropzone.utils'\n\nconst extendedViewHeightBreakpoint = 172\n\nconst DropzoneErrorBannerBase = React.forwardRef<\n HTMLDivElement,\n DropzoneErrorBannerProps & DivAttributes\n>(({ error, onDismiss, qa, fileRejections, ...props }, ref) => {\n const I18n = useI18nContext()\n const [isExpanded, setExpanded] = React.useState(false)\n\n React.useEffect(() => {\n setExpanded(false)\n }, [error.title, error.body, error.message])\n\n if (error.type === dropErrors.reset) {\n return null\n }\n\n return (\n <StyledErrorBanner {...props} ref={ref}>\n <Banner.Content>\n <Banner.Title>{error.title}</Banner.Title>\n <Banner.Body>{error.message}</Banner.Body>\n </Banner.Content>\n {error.body ? (\n <Banner.Action>\n <Button\n data-qa={qa?.showErrorDetails}\n onClick={() => setExpanded((prev) => !prev)}\n >\n {isExpanded\n ? I18n.t('core.dropzone.hideDetails')\n : I18n.t('core.dropzone.showDetails')}\n </Button>\n </Banner.Action>\n ) : null}\n <Banner.Dismiss onClick={onDismiss} data-qa={qa?.hideError} />\n {error.body ? (\n <Banner.ExpandableContent expanded={isExpanded}>\n {error.body}\n </Banner.ExpandableContent>\n ) : null}\n </StyledErrorBanner>\n )\n})\n\nexport function MultipleErrors(props: MultipleErrorsProps) {\n const I18n = useI18nContext()\n\n const filesByErrorType = props.fileRejections.reduce(\n (acc, rejection) => {\n rejection.errors.forEach((error) => {\n const dropErrorType = dropErrorsByReason[error.code]\n acc[dropErrorType].push(rejection.file)\n })\n\n return acc\n },\n {\n [dropErrors.fileAmount]: [],\n [dropErrors.minFileSize]: [],\n [dropErrors.maxFileSize]: [],\n [dropErrors.fileType]: [],\n [dropErrors.oneFileAtATime]: [],\n [dropErrors.reset]: [],\n [dropErrors.multipleErrors]: [],\n } as Record<DropErrorType, File[]>\n )\n\n const messages: Record<DropErrorType, string> = {\n [dropErrors.fileAmount]: I18n.t('core.dropzone.maxFileNumberErrorGroup', {\n count: props.maxFiles,\n }),\n [dropErrors.minFileSize]: isZeroSize(props.minSize)\n ? I18n.t('core.dropzone.zeroFileSizeErrorGroup')\n : I18n.t('core.dropzone.minFileSizeErrorGroup', {\n sizeInMegabytes: getSizeInMB(props.minSize as number),\n }),\n [dropErrors.maxFileSize]: I18n.t('core.dropzone.maxFileSizeErrorGroup', {\n sizeInMegabytes: getSizeInMB(props.maxSize as number),\n }),\n [dropErrors.fileType]: I18n.t('core.dropzone.wrongFileTypeErrorGroup'),\n [dropErrors.reset]: '',\n [dropErrors.multipleErrors]: '',\n [dropErrors.oneFileAtATime]: '',\n }\n\n return (\n <div>\n {[\n dropErrors.fileAmount,\n dropErrors.fileType,\n dropErrors.maxFileSize,\n dropErrors.minFileSize,\n ].map((errorType) => {\n const files = filesByErrorType[errorType]\n return files.length ? (\n <div key={errorType}>\n <Typography weight=\"bold\">{messages[errorType]}</Typography>\n <StyledErrorBannerDetails>\n {filesByErrorType[errorType].map((file) => (\n <li key={file.name}>{getFileDetail(file)}</li>\n ))}\n </StyledErrorBannerDetails>\n </div>\n ) : null\n })}\n </div>\n )\n}\n\n// make error banner accessible as a styled-components selector\nexport const DropzoneErrorBanner = styled(DropzoneErrorBannerBase)``\n\nfunction DropzoneContainer({\n active,\n disabled,\n getRootProps,\n rootProps,\n children,\n}: ContainerProps & Props) {\n return (\n <StyledDropzoneContainer\n {...getRootProps(rootProps)}\n $active={active}\n $disabled={disabled}\n >\n {children}\n </StyledDropzoneContainer>\n )\n}\n\nfunction DropzoneContent({\n disabled,\n isIconVisible,\n contentMessage,\n}: ContentProps) {\n return (\n <StyledDropzoneMessage>\n {isIconVisible && (\n <StyledDropzoneIcon $disabled={disabled}>\n {disabled ? <Ban /> : <Image />}\n </StyledDropzoneIcon>\n )}\n {contentMessage}\n </StyledDropzoneMessage>\n )\n}\n\nexport function DropzoneDefaultMessage({\n open,\n disabled,\n multiple,\n errorMessage,\n}: DropzoneContentProps & { multiple: boolean }) {\n const I18n = useI18nContext()\n\n return (\n <>\n <StyledUploadButton\n variant=\"secondary\"\n onClick={open}\n disabled={disabled}\n >\n {I18n.t('core.dropzone.uploadFiles', {\n count: multiple ? Infinity : 1,\n })}\n </StyledUploadButton>\n <StyledDropzoneCaption $error={!!errorMessage}>\n {errorMessage || I18n.t('core.dropzone.dragAndDrop')}\n </StyledDropzoneCaption>\n </>\n )\n}\n\nconst dropErrorsByReason = {\n [fileRejectionReason.maxFiles]: dropErrors.fileAmount,\n [fileRejectionReason.maxFileSize]: dropErrors.maxFileSize,\n [fileRejectionReason.minFileSize]: dropErrors.minFileSize,\n [fileRejectionReason.fileType]: dropErrors.fileType,\n} as Record<FileRejectionReason, DropErrorType>\n\nconst getSizeInMB = (maxSize: number): number => maxSize / 10e5\n\nconst Dropzone_ = React.forwardRef<DropzoneRef, DropzoneProps>(\n function Dropzone(\n {\n isIconVisible: forceIconVisibility,\n contentRenderer,\n disabled,\n tooltip,\n rootRef,\n inputRef,\n dragError,\n dropError,\n dispatchDropError,\n getRootProps,\n getInputProps,\n isDragActive,\n multiple,\n fileRejections,\n open,\n rootProps = {} as DropzoneRootProps,\n inputProps = {} as DropzoneInputProps,\n className,\n qa,\n tokens,\n onClear,\n },\n ref\n ) {\n const [isIconVisible, setIsIconVisible] = React.useState(false)\n const { isFocusWithin, containerProps } = useFocusWithin()\n\n const toggleIconVisibility = React.useCallback(\n (entries: ResizeObserverEntry[]) => {\n const { offsetHeight: height } = entries[0].target as HTMLElement\n setIsIconVisible(height >= extendedViewHeightBreakpoint)\n },\n [setIsIconVisible]\n )\n\n const setResizeObserverTarget = useResizeObserver(toggleIconVisibility)\n\n React.useEffect(() => {\n setResizeObserverTarget(rootRef.current)\n }, [rootRef, setResizeObserverTarget])\n\n React.useImperativeHandle(ref, () => ({\n rootRef: rootRef as React.RefObject<HTMLElement>,\n inputRef: inputRef as React.RefObject<HTMLInputElement>,\n open,\n }))\n\n const isDropzoneDisabled = disabled || Boolean(dragError)\n\n const contentMessage = React.useMemo(\n () =>\n contentRenderer ? (\n contentRenderer({\n open,\n disabled: isDropzoneDisabled,\n errorMessage: dragError,\n })\n ) : (\n <DropzoneDefaultMessage\n open={open}\n disabled={isDropzoneDisabled}\n errorMessage={dragError}\n multiple={multiple}\n />\n ),\n [contentRenderer, open, isDropzoneDisabled, dragError, multiple]\n )\n\n const validRootProps = React.useMemo(\n () => omit(['disabled'], rootProps),\n [rootProps]\n )\n\n const validInputProps = React.useMemo(\n () => omit(['accept', 'multiple', 'type'], inputProps),\n [inputProps]\n )\n\n return (\n <StyledDropzoneWrapper\n direction=\"column\"\n alignItems=\"stretch\"\n gap=\"xs\"\n className={className}\n >\n <Tooltip\n trigger={Boolean(tooltip) ? 'hover' : 'none'}\n overlay={tooltip || ''}\n >\n <StyledDropzoneFocusDetector {...containerProps}>\n <DropzoneContainer\n rootProps={validRootProps}\n active={isDragActive || isFocusWithin}\n disabled={isDropzoneDisabled}\n getRootProps={getRootProps}\n >\n <input type=\"file\" {...getInputProps(validInputProps)} />\n <DropzoneContent\n disabled={isDropzoneDisabled}\n isIconVisible={\n typeof forceIconVisibility === 'undefined'\n ? isIconVisible\n : forceIconVisibility\n }\n contentMessage={contentMessage}\n />\n </DropzoneContainer>\n </StyledDropzoneFocusDetector>\n </Tooltip>\n <DropzoneErrorBanner\n qa={qa}\n error={dropError}\n fileRejections={fileRejections}\n onDismiss={() => dispatchDropError(dropErrors.reset)}\n />\n {tokens && tokens.length > 0 && (\n <Box as=\"ul\" display=\"flex\" flexWrap=\"wrap\" gap=\"sm\" paddingTop=\"lg\">\n {tokens.map((token) => (\n <li key={token.name}>\n <Token>\n <Token.Label>{getFileDetail(token)}</Token.Label>\n {onClear && <Token.Remove onClick={() => onClear(token)} />}\n </Token>\n </li>\n ))}\n </Box>\n )}\n </StyledDropzoneWrapper>\n )\n }\n)\n\nDropzoneContainer.displayName = 'DropzoneContainer'\n\nDropzoneContent.displayName = 'DropzoneContent'\n\nDropzone_.displayName = 'Dropzone'\n\n/**\n\n Dropzones allow users to quickly upload files from their computers, as well\n as optionally launch the file select component.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropzone--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropzone)\n\n*/\nexport const Dropzone = React.memo(Dropzone_, equals)\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAASA,GAAG,EAAEC,KAAK,QAAQ,0BAA0B;AACrD,SAASC,MAAM,EAAEC,IAAI,QAAQ,OAAO;AACpC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,cAAc,QAAQ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AAO,EAAC,MAAM;IAACC,QAAQ,EAAC,MAAM;IAACL,GAAG,EAAC,IAAI;IAACM,UAAU,EAAC;EAAI,GACjE/B,MAAM,CAAClD,GAAG,CAAC,UAACkF,KAAK;IAAA,oBAChB3K,KAAA,CAAAiD,aAAA;MAAI4C,GAAG,EAAE8E,KAAK,CAAC5E;IAAK,gBAClB/F,KAAA,CAAAiD,aAAA,CAAC5C,KAAK,qBACJL,KAAA,CAAAiD,aAAA,CAAC5C,KAAK,CAACuK,KAAK,QAAEtJ,aAAa,CAACqJ,KAAK,CAAe,CAAC,EAChD/B,OAAO,iBAAI5I,KAAA,CAAAiD,aAAA,CAAC5C,KAAK,CAACwK,MAAM;MAACrH,OAAO,EAAE,SAATA,OAAOA,CAAA;QAAA,OAAQoF,OAAO,CAAC+B,KAAK,CAAC;MAAA;IAAC,CAAE,CACrD,CACL,CAAC;EAAA,CACN,CACE,CAEc,CAAC;AAE5B,CACF,CAAC;AAEDvE,iBAAiB,CAACF,WAAW,GAAG,mBAAmB;AAEnDW,eAAe,CAACX,WAAW,GAAG,iBAAiB;AAE/CwB,SAAS,CAACxB,WAAW,GAAG,UAAU;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMyB,QAAQ,gBAAG3H,KAAK,CAAC8K,IAAI,CAACpD,SAAS,EAAE5H,MAAM,CAAC"}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledErrorBanner: import("styled-components").
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare const
|
|
2
|
+
export declare const StyledErrorBanner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("..").DivAttributes & import("../_utils/types").Props & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("../_utils/types").Props & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
5
|
+
export declare const StyledErrorBannerDetails: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
|
|
6
|
+
export declare const StyledDropzoneIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
7
|
+
$disabled: boolean;
|
|
8
|
+
}>> & string;
|
|
9
|
+
export declare const StyledDropzoneContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
10
|
+
$active: boolean;
|
|
11
|
+
$disabled: boolean;
|
|
12
|
+
}>> & string;
|
|
13
|
+
export declare const StyledDropzoneMessage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
+
export declare const StyledUploadButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("../Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
16
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("../Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
|
|
17
|
+
export declare const StyledDropzoneCaption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
18
|
+
$error: boolean;
|
|
19
|
+
}>> & string;
|
|
20
|
+
export declare const StyledDropzoneWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("..").DivAttributes & import("../Flex").FlexProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
21
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
22
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("../Flex").FlexProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
23
|
+
export declare const StyledDropzoneFocusDetector: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("..").DivAttributes & import("../Box").BoxProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
24
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
25
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("../Box").BoxProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
@@ -9,59 +9,59 @@ import { colors } from '../_styles/colors';
|
|
|
9
9
|
import { spacing } from '../_styles/spacing';
|
|
10
10
|
export var StyledErrorBanner = /*#__PURE__*/styled(ErrorBannerBase).withConfig({
|
|
11
11
|
displayName: "StyledErrorBanner",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_22_0__sc-by95hy-0"
|
|
13
13
|
})(["margin-top:", "px;flex-shrink:0;"], spacing.lg);
|
|
14
14
|
export var StyledErrorBannerDetails = /*#__PURE__*/styled.ul.withConfig({
|
|
15
15
|
displayName: "StyledErrorBannerDetails",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_22_0__sc-by95hy-1"
|
|
17
17
|
})(["margin:", "px;padding:0;list-style-position:inside;list-style-type:disc;"], spacing.xs);
|
|
18
18
|
export var StyledDropzoneIcon = /*#__PURE__*/styled.div.withConfig({
|
|
19
19
|
displayName: "StyledDropzoneIcon",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_22_0__sc-by95hy-2"
|
|
21
21
|
})(["display:flex;justify-content:center;align-items:center;height:64px;color:", ";margin-bottom:", "px;transition:all 250ms ease-out;", " svg{width:auto;height:100%;}"], colors.gray45, spacing.lg, function (_ref) {
|
|
22
|
-
var disabled = _ref
|
|
23
|
-
return disabled && css(["height:72px;margin-bottom:", "px;"], spacing.sm);
|
|
22
|
+
var $disabled = _ref.$disabled;
|
|
23
|
+
return $disabled && css(["height:72px;margin-bottom:", "px;"], spacing.sm);
|
|
24
24
|
});
|
|
25
25
|
var activeDropzone = /*#__PURE__*/css(["outline:none;border:2px dashed ", ";background-color:", ";& ", "{color:", ";transform:scale(0.95);}"], colors.blue50, colors.blue96, StyledDropzoneIcon, colors.blue50);
|
|
26
26
|
var disabledDropzone = /*#__PURE__*/css(["color:", ";border:2px dashed ", ";background-color:", ";cursor:not-allowed;& ", "{color:", ";transform:none;}"], colors.gray70, colors.gray85, colors.gray98, StyledDropzoneIcon, colors.gray85);
|
|
27
27
|
export var StyledDropzoneContainer = /*#__PURE__*/styled.div.withConfig({
|
|
28
28
|
displayName: "StyledDropzoneContainer",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_22_0__sc-by95hy-3"
|
|
30
30
|
})(["", " display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%;min-height:92px;padding:", "px;color:", ";border:2px dashed ", ";background-color:", ";border-radius:", "px;text-align:center;letter-spacing:0.25px;transition:all 250ms ease-out;cursor:grab;", " ", " ", " ", ""], getTypographyIntent('body'), spacing.lg, colors.gray40, colors.gray70, colors.gray96, borderRadius.md, function (_ref2) {
|
|
31
|
-
var disabled = _ref2
|
|
32
|
-
return
|
|
31
|
+
var $disabled = _ref2.$disabled;
|
|
32
|
+
return !$disabled && css(["&:hover{", "}"], activeDropzone);
|
|
33
33
|
}, function (_ref3) {
|
|
34
|
-
var disabled = _ref3
|
|
35
|
-
return disabled && disabledDropzone;
|
|
34
|
+
var $disabled = _ref3.$disabled;
|
|
35
|
+
return $disabled && disabledDropzone;
|
|
36
36
|
}, function (_ref4) {
|
|
37
|
-
var disabled = _ref4
|
|
38
|
-
return disabled && css(["&:hover,&:focus{", "}"], disabledDropzone);
|
|
37
|
+
var $disabled = _ref4.$disabled;
|
|
38
|
+
return $disabled && css(["&:hover,&:focus{", "}"], disabledDropzone);
|
|
39
39
|
}, function (_ref5) {
|
|
40
|
-
var active = _ref5
|
|
41
|
-
disabled = _ref5
|
|
42
|
-
return active &&
|
|
40
|
+
var $active = _ref5.$active,
|
|
41
|
+
$disabled = _ref5.$disabled;
|
|
42
|
+
return $active && !$disabled && activeDropzone;
|
|
43
43
|
});
|
|
44
44
|
export var StyledDropzoneMessage = /*#__PURE__*/styled.div.withConfig({
|
|
45
45
|
displayName: "StyledDropzoneMessage",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_22_0__sc-by95hy-4"
|
|
47
47
|
})(["user-select:none;"]);
|
|
48
48
|
export var StyledUploadButton = /*#__PURE__*/styled(Button).withConfig({
|
|
49
49
|
displayName: "StyledUploadButton",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_22_0__sc-by95hy-5"
|
|
51
51
|
})(["display:block;margin-left:auto;margin-right:auto;margin-bottom:", "px;"], spacing.sm);
|
|
52
52
|
export var StyledDropzoneCaption = /*#__PURE__*/styled.span.withConfig({
|
|
53
53
|
displayName: "StyledDropzoneCaption",
|
|
54
|
-
componentId: "core-
|
|
54
|
+
componentId: "core-12_22_0__sc-by95hy-6"
|
|
55
55
|
})(["color:", ";"], function (_ref6) {
|
|
56
|
-
var error = _ref6
|
|
57
|
-
return error && colors.gray15;
|
|
56
|
+
var $error = _ref6.$error;
|
|
57
|
+
return $error && colors.gray15;
|
|
58
58
|
});
|
|
59
59
|
export var StyledDropzoneWrapper = /*#__PURE__*/styled(Flex).withConfig({
|
|
60
60
|
displayName: "StyledDropzoneWrapper",
|
|
61
|
-
componentId: "core-
|
|
61
|
+
componentId: "core-12_22_0__sc-by95hy-7"
|
|
62
62
|
})(["height:100%;"]);
|
|
63
63
|
export var StyledDropzoneFocusDetector = /*#__PURE__*/styled(Box).withConfig({
|
|
64
64
|
displayName: "StyledDropzoneFocusDetector",
|
|
65
|
-
componentId: "core-
|
|
65
|
+
componentId: "core-12_22_0__sc-by95hy-8"
|
|
66
66
|
})(["height:100%;"]);
|
|
67
67
|
//# sourceMappingURL=Dropzone.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropzone.styles.js","names":["styled","css","ErrorBanner","ErrorBannerBase","Box","Button","Flex","getTypographyIntent","borderRadius","colors","spacing","StyledErrorBanner","withConfig","displayName","componentId","lg","StyledErrorBannerDetails","ul","xs","StyledDropzoneIcon","div","gray45","_ref","disabled","sm","activeDropzone","blue50","blue96","disabledDropzone","gray70","gray85","gray98","StyledDropzoneContainer","gray40","gray96","md","_ref2","_ref3","_ref4","_ref5","active","StyledDropzoneMessage","StyledUploadButton","StyledDropzoneCaption","span","_ref6","error","gray15","StyledDropzoneWrapper","StyledDropzoneFocusDetector"],"sources":["../../src/Dropzone/Dropzone.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { ErrorBanner as ErrorBannerBase } from '../Banner/Banner'\nimport { Box } from '../Box'\nimport { Button } from '../Button'\nimport { Flex } from '../Flex'\nimport { getTypographyIntent } from '../Typography'\nimport { borderRadius } from '../_styles/borderRadius'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nexport const StyledErrorBanner = styled(ErrorBannerBase)`\n margin-top: ${spacing.lg}px;\n flex-shrink: 0;\n`\nexport const StyledErrorBannerDetails = styled.ul`\n margin: ${spacing.xs}px;\n padding: 0;\n list-style-position: inside;\n list-style-type: disc;\n`\nexport const StyledDropzoneIcon = styled.div<{ disabled: boolean }>`\n display: flex;\n justify-content: center;\n align-items: center;\n height: 64px;\n color: ${colors.gray45};\n margin-bottom: ${spacing.lg}px;\n transition: all 250ms ease-out;\n\n ${({ disabled }) =>\n disabled &&\n css`\n height: 72px;\n margin-bottom: ${spacing.sm}px;\n `}\n\n svg {\n width: auto;\n height: 100%;\n }\n`\n\nconst activeDropzone = css`\n outline: none;\n border: 2px dashed ${colors.blue50};\n background-color: ${colors.blue96};\n\n & ${StyledDropzoneIcon} {\n color: ${colors.blue50};\n transform: scale(0.95);\n }\n`\n\nconst disabledDropzone = css`\n color: ${colors.gray70};\n border: 2px dashed ${colors.gray85};\n background-color: ${colors.gray98};\n cursor: not-allowed;\n\n & ${StyledDropzoneIcon} {\n color: ${colors.gray85};\n transform: none;\n }\n`\n\nexport const StyledDropzoneContainer = styled.div<{\n active: boolean\n disabled: boolean\n}>`\n ${getTypographyIntent('body')}\n\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n min-height: 92px;\n padding: ${spacing.lg}px;\n color: ${colors.gray40};\n border: 2px dashed ${colors.gray70};\n background-color: ${colors.gray96};\n border-radius: ${borderRadius.md}px;\n text-align: center;\n letter-spacing: 0.25px;\n transition: all 250ms ease-out;\n cursor: grab;\n\n ${({ disabled }) =>\n
|
|
1
|
+
{"version":3,"file":"Dropzone.styles.js","names":["styled","css","ErrorBanner","ErrorBannerBase","Box","Button","Flex","getTypographyIntent","borderRadius","colors","spacing","StyledErrorBanner","withConfig","displayName","componentId","lg","StyledErrorBannerDetails","ul","xs","StyledDropzoneIcon","div","gray45","_ref","$disabled","sm","activeDropzone","blue50","blue96","disabledDropzone","gray70","gray85","gray98","StyledDropzoneContainer","gray40","gray96","md","_ref2","_ref3","_ref4","_ref5","$active","StyledDropzoneMessage","StyledUploadButton","StyledDropzoneCaption","span","_ref6","$error","gray15","StyledDropzoneWrapper","StyledDropzoneFocusDetector"],"sources":["../../src/Dropzone/Dropzone.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { ErrorBanner as ErrorBannerBase } from '../Banner/Banner'\nimport { Box } from '../Box'\nimport { Button } from '../Button'\nimport { Flex } from '../Flex'\nimport { getTypographyIntent } from '../Typography'\nimport { borderRadius } from '../_styles/borderRadius'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nexport const StyledErrorBanner = styled(ErrorBannerBase)`\n margin-top: ${spacing.lg}px;\n flex-shrink: 0;\n`\nexport const StyledErrorBannerDetails = styled.ul`\n margin: ${spacing.xs}px;\n padding: 0;\n list-style-position: inside;\n list-style-type: disc;\n`\nexport const StyledDropzoneIcon = styled.div<{ $disabled: boolean }>`\n display: flex;\n justify-content: center;\n align-items: center;\n height: 64px;\n color: ${colors.gray45};\n margin-bottom: ${spacing.lg}px;\n transition: all 250ms ease-out;\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n height: 72px;\n margin-bottom: ${spacing.sm}px;\n `}\n\n svg {\n width: auto;\n height: 100%;\n }\n`\n\nconst activeDropzone = css`\n outline: none;\n border: 2px dashed ${colors.blue50};\n background-color: ${colors.blue96};\n\n & ${StyledDropzoneIcon} {\n color: ${colors.blue50};\n transform: scale(0.95);\n }\n`\n\nconst disabledDropzone = css`\n color: ${colors.gray70};\n border: 2px dashed ${colors.gray85};\n background-color: ${colors.gray98};\n cursor: not-allowed;\n\n & ${StyledDropzoneIcon} {\n color: ${colors.gray85};\n transform: none;\n }\n`\n\nexport const StyledDropzoneContainer = styled.div<{\n $active: boolean\n $disabled: boolean\n}>`\n ${getTypographyIntent('body')}\n\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n min-height: 92px;\n padding: ${spacing.lg}px;\n color: ${colors.gray40};\n border: 2px dashed ${colors.gray70};\n background-color: ${colors.gray96};\n border-radius: ${borderRadius.md}px;\n text-align: center;\n letter-spacing: 0.25px;\n transition: all 250ms ease-out;\n cursor: grab;\n\n ${({ $disabled }) =>\n !$disabled &&\n css`\n &:hover {\n ${activeDropzone}\n }\n `}\n\n ${({ $disabled }) => $disabled && disabledDropzone}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n &:hover,\n &:focus {\n ${disabledDropzone}\n }\n `}\n\n ${({ $active, $disabled }) => $active && !$disabled && activeDropzone}\n`\n\nexport const StyledDropzoneMessage = styled.div`\n user-select: none;\n`\n\nexport const StyledUploadButton = styled(Button)`\n display: block;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: ${spacing.sm}px;\n`\n\nexport const StyledDropzoneCaption = styled.span<{ $error: boolean }>`\n color: ${({ $error }) => $error && colors.gray15};\n`\n\nexport const StyledDropzoneWrapper = styled(Flex)`\n height: 100%;\n`\n\nexport const StyledDropzoneFocusDetector = styled(Box)`\n height: 100%;\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,IAAIC,eAAe,QAAQ,kBAAkB;AACjE,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,iBAAiB,gBAAGX,MAAM,CAACG,eAAe,CAAC,CAAAS,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yCACxCJ,OAAO,CAACK,EAAE,CAEzB;AACD,OAAO,IAAMC,wBAAwB,gBAAGhB,MAAM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Gf,SAAS,GAAAe,KAAA,CAATf,SAAS;EAAA,OACZA,SAAS,IACTtB,GAAG,4BAGG2B,gBAAgB,CAErB;AAAA,GAED,UAAAW,KAAA;EAAA,IAAGC,OAAO,GAAAD,KAAA,CAAPC,OAAO;IAAEjB,SAAS,GAAAgB,KAAA,CAAThB,SAAS;EAAA,OAAOiB,OAAO,IAAI,CAACjB,SAAS,IAAIE,cAAc;AAAA,EACtE;AAED,OAAO,IAAMgB,qBAAqB,gBAAGzC,MAAM,CAACoB,GAAG,CAAAR,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yBAE9C;AAED,OAAO,IAAM4B,kBAAkB,gBAAG1C,MAAM,CAACK,MAAM,CAAC,CAAAO,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+EAI7BJ,OAAO,CAACc,EAAE,CAC5B;AAED,OAAO,IAAMmB,qBAAqB,gBAAG3C,MAAM,CAAC4C,IAAI,CAAAhC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oBACrC,UAAA+B,KAAA;EAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;EAAA,OAAOA,MAAM,IAAIrC,MAAM,CAACsC,MAAM;AAAA,EACjD;AAED,OAAO,IAAMC,qBAAqB,gBAAGhD,MAAM,CAACM,IAAI,CAAC,CAAAM,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oBAEhD;AAED,OAAO,IAAMmC,2BAA2B,gBAAGjD,MAAM,CAACI,GAAG,CAAC,CAAAQ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oBAErD"}
|
|
@@ -276,7 +276,7 @@ var EmptyState_ = /*#__PURE__*/React.forwardRef(function EmptyState(_ref5, ref)
|
|
|
276
276
|
var presetImages = [NoResults, NoItems, NoItemsWithoutCreatePermissions, RecycleBin];
|
|
277
277
|
React.Children.forEach(children, function (child) {
|
|
278
278
|
if (! /*#__PURE__*/React.isValidElement(child)) return;
|
|
279
|
-
if (child.type === Image || presetImages.includes(child.type)) {
|
|
279
|
+
if (child.type === Image || typeof child.type !== 'string' && presetImages.includes(child.type)) {
|
|
280
280
|
image = child;
|
|
281
281
|
} else {
|
|
282
282
|
content.push(child);
|