@procore/core-react 12.18.1 → 12.20.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/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.js +1 -1
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Button.styles.d.ts +7 -3
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Button/Button.styles.js.map +1 -1
- package/dist/Button/Button.types.d.ts +19 -1
- package/dist/Button/Button.types.js.map +1 -1
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/DetailPageTemplate/DetailPageTemplate.d.ts +6 -9
- package/dist/DetailPageTemplate/DetailPageTemplate.js +28 -26
- package/dist/DetailPageTemplate/DetailPageTemplate.js.map +1 -1
- package/dist/DetailPageTemplate/DetailPageTemplate.types.d.ts +18 -12
- package/dist/DetailPageTemplate/DetailPageTemplate.types.js.map +1 -1
- package/dist/DetailPageTemplate/index.d.ts +2 -0
- package/dist/DetailPageTemplate/index.js +2 -0
- package/dist/DetailPageTemplate/index.js.map +1 -0
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.hooks.js +2 -1
- package/dist/Dropzone/Dropzone.hooks.js.map +1 -1
- package/dist/Dropzone/Dropzone.js +26 -7
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.d.ts +3 -3
- package/dist/Dropzone/Dropzone.styles.js +14 -14
- package/dist/Dropzone/Dropzone.styles.js.map +1 -1
- package/dist/Dropzone/Dropzone.types.d.ts +18 -1
- package/dist/Dropzone/Dropzone.types.js.map +1 -1
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.d.ts +1 -1
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/{PageFooterTemplate → PageTemplate/PageFooterTemplate}/PageFooterTemplate.js +9 -5
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.js.map +1 -0
- package/dist/{PageFooterTemplate → PageTemplate/PageFooterTemplate}/PageFooterTemplate.styles.js +3 -3
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js.map +1 -0
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.types.d.ts +18 -0
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.types.js.map +1 -0
- package/dist/PageTemplate/PageFooterTemplate/index.d.ts +2 -0
- package/dist/PageTemplate/PageFooterTemplate/index.js +2 -0
- package/dist/PageTemplate/PageFooterTemplate/index.js.map +1 -0
- package/dist/{PageHeaderTemplate → PageTemplate/PageHeaderTemplate}/PageHeaderTemplate.js +20 -15
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.js.map +1 -0
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.d.ts +13 -0
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +22 -0
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js.map +1 -0
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.types.d.ts +43 -0
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.types.js.map +1 -0
- package/dist/{PageHeaderTemplate → PageTemplate/PageHeaderTemplate}/PageHeaderTemplate.utils.js +2 -2
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.utils.js.map +1 -0
- package/dist/PageTemplate/PageHeaderTemplate/index.d.ts +2 -0
- package/dist/PageTemplate/PageHeaderTemplate/index.js +2 -0
- package/dist/PageTemplate/PageHeaderTemplate/index.js.map +1 -0
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.js.map +1 -0
- package/dist/{PagePaneTemplate → PageTemplate/PagePaneTemplate}/PagePaneTemplate.styles.d.ts +11 -11
- package/dist/{PagePaneTemplate → PageTemplate/PagePaneTemplate}/PagePaneTemplate.styles.js +9 -9
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js.map +1 -0
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.types.js.map +1 -0
- package/dist/PageTemplate/{PageTemplate.js → PageTemplate/PageTemplate.js} +8 -6
- package/dist/PageTemplate/PageTemplate/PageTemplate.js.map +1 -0
- package/dist/PageTemplate/{PageTemplate.styles.d.ts → PageTemplate/PageTemplate.styles.d.ts} +1 -1
- package/dist/PageTemplate/{PageTemplate.styles.js → PageTemplate/PageTemplate.styles.js} +6 -6
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js.map +1 -0
- package/dist/PageTemplate/PageTemplate/PageTemplate.types.js.map +1 -0
- package/dist/PageTemplate/{PageTemplateCard.d.ts → PageTemplate/PageTemplateCard.d.ts} +4 -2
- package/dist/PageTemplate/{PageTemplateCard.js → PageTemplate/PageTemplateCard.js} +4 -4
- package/dist/PageTemplate/PageTemplate/PageTemplateCard.js.map +1 -0
- package/dist/PageTemplate/PageTemplate/PageTemplateContext.js.map +1 -0
- package/dist/PageTemplate/PageTemplate/PageTemplateContext.types.js.map +1 -0
- package/dist/PageTemplate/PageTemplate/index.d.ts +2 -0
- package/dist/PageTemplate/PageTemplate/index.js +2 -0
- package/dist/PageTemplate/PageTemplate/index.js.map +1 -0
- package/dist/PageTemplate/PageTemplate/usePageTemplateContext.js.map +1 -0
- package/dist/PageTemplate/index.d.ts +1 -0
- package/dist/PageTemplate/index.js +2 -0
- package/dist/PageTemplate/index.js.map +1 -0
- package/dist/PageTemplate/storyUtils.d.ts +2 -0
- package/dist/PageTemplate/storyUtils.js +15 -0
- package/dist/PageTemplate/storyUtils.js.map +1 -0
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/SettingsPageTemplate/SettingsPageTemplate.d.ts +6 -5
- package/dist/SettingsPageTemplate/SettingsPageTemplate.js +24 -21
- package/dist/SettingsPageTemplate/SettingsPageTemplate.js.map +1 -1
- package/dist/SettingsPageTemplate/SettingsPageTemplate.types.d.ts +18 -8
- package/dist/SettingsPageTemplate/SettingsPageTemplate.types.js.map +1 -1
- package/dist/SettingsPageTemplate/index.d.ts +2 -0
- package/dist/SettingsPageTemplate/index.js +2 -0
- package/dist/SettingsPageTemplate/index.js.map +1 -0
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +12 -12
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.d.ts +6 -3
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js +23 -22
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js.map +1 -1
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.d.ts +46 -6
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.js.map +1 -1
- package/dist/ToolLandingPageTemplate/index.d.ts +2 -0
- package/dist/ToolLandingPageTemplate/index.js +2 -0
- package/dist/ToolLandingPageTemplate/index.js.map +1 -0
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/I18n.d.ts +37 -1
- package/dist/_hooks/I18n.js +26 -0
- package/dist/_hooks/I18n.js.map +1 -1
- package/dist/_locales/de-DE.json +1 -1
- package/dist/_locales/en-AU.json +3 -3
- package/dist/_locales/en-CA.json +1 -1
- package/dist/_locales/en-GB.json +1 -1
- package/dist/_locales/es.json +1 -1
- package/dist/_locales/fr-CA.json +1 -1
- package/dist/_locales/it-IT.json +372 -0
- package/dist/_locales/pt-BR.json +1 -1
- package/dist/_typedoc/Avatar/Avatar.types.json +45 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +39 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +18 -13
- package/dist/_typedoc/Box/Box.types.json +125 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +42 -12
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +22 -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 +50 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/DetailPageTemplate/DetailPageTemplate.types.json +17 -0
- package/dist/_typedoc/Dropdown/Dropdown.types.json +49 -39
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +44 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +109 -42
- package/dist/_typedoc/EmptyState/EmptyState.types.json +21 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +50 -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 +861 -741
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +38 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +72 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +4 -4
- package/dist/_typedoc/ListPage/ListPage.types.json +18 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +84 -74
- package/dist/_typedoc/Modal/Modal.types.json +61 -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 +62 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +63 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +34 -29
- package/dist/_typedoc/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.types.json +7 -0
- 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 +7 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +25 -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 +19 -19
- 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 +67 -62
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/SettingsPageTemplate/SettingsPageTemplate.types.json +17 -0
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +19 -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 +32 -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 +29 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +47 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +35 -30
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +9 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +30 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
- package/dist/_typedoc/ToolLandingPageTemplate/ToolLandingPageTemplate.types.json +12 -0
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +91 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +12 -2
- package/dist/_typedoc/Typography/Typography.types.json +19 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/dist/_utils/propsTypedoc.d.ts +4 -0
- package/dist/_utils/propsTypedoc.js +4 -0
- package/dist/_utils/propsTypedoc.js.map +1 -1
- package/dist/_utils/types.d.ts +10 -0
- package/dist/_utils/types.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/PageFooterTemplate/PageFooterTemplate.js.map +0 -1
- package/dist/PageFooterTemplate/PageFooterTemplate.styles.js.map +0 -1
- package/dist/PageFooterTemplate/PageFooterTemplate.types.d.ts +0 -6
- package/dist/PageFooterTemplate/PageFooterTemplate.types.js.map +0 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.js.map +0 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.d.ts +0 -4
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +0 -18
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js.map +0 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.types.d.ts +0 -12
- package/dist/PageHeaderTemplate/PageHeaderTemplate.types.js.map +0 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.utils.js.map +0 -1
- package/dist/PagePaneTemplate/PagePaneTemplate.js.map +0 -1
- package/dist/PagePaneTemplate/PagePaneTemplate.styles.js.map +0 -1
- package/dist/PagePaneTemplate/PagePaneTemplate.types.js.map +0 -1
- package/dist/PageTemplate/PageTemplate.js.map +0 -1
- package/dist/PageTemplate/PageTemplate.styles.js.map +0 -1
- package/dist/PageTemplate/PageTemplate.types.js.map +0 -1
- package/dist/PageTemplate/PageTemplateCard.js.map +0 -1
- package/dist/PageTemplate/PageTemplateContext.js.map +0 -1
- package/dist/PageTemplate/PageTemplateContext.types.js.map +0 -1
- package/dist/PageTemplate/usePageTemplateContext.js.map +0 -1
- /package/dist/{PageFooterTemplate → PageTemplate/PageFooterTemplate}/PageFooterTemplate.d.ts +0 -0
- /package/dist/{PageFooterTemplate → PageTemplate/PageFooterTemplate}/PageFooterTemplate.styles.d.ts +0 -0
- /package/dist/{PageFooterTemplate → PageTemplate/PageFooterTemplate}/PageFooterTemplate.types.js +0 -0
- /package/dist/{PageHeaderTemplate → PageTemplate/PageHeaderTemplate}/PageHeaderTemplate.d.ts +0 -0
- /package/dist/{PageHeaderTemplate → PageTemplate/PageHeaderTemplate}/PageHeaderTemplate.types.js +0 -0
- /package/dist/{PageHeaderTemplate → PageTemplate/PageHeaderTemplate}/PageHeaderTemplate.utils.d.ts +0 -0
- /package/dist/{PagePaneTemplate → PageTemplate/PagePaneTemplate}/PagePaneTemplate.d.ts +0 -0
- /package/dist/{PagePaneTemplate → PageTemplate/PagePaneTemplate}/PagePaneTemplate.js +0 -0
- /package/dist/{PagePaneTemplate → PageTemplate/PagePaneTemplate}/PagePaneTemplate.types.d.ts +0 -0
- /package/dist/{PagePaneTemplate → PageTemplate/PagePaneTemplate}/PagePaneTemplate.types.js +0 -0
- /package/dist/PageTemplate/{PageTemplate.d.ts → PageTemplate/PageTemplate.d.ts} +0 -0
- /package/dist/PageTemplate/{PageTemplate.types.d.ts → PageTemplate/PageTemplate.types.d.ts} +0 -0
- /package/dist/PageTemplate/{PageTemplate.types.js → PageTemplate/PageTemplate.types.js} +0 -0
- /package/dist/PageTemplate/{PageTemplateContext.d.ts → PageTemplate/PageTemplateContext.d.ts} +0 -0
- /package/dist/PageTemplate/{PageTemplateContext.js → PageTemplate/PageTemplateContext.js} +0 -0
- /package/dist/PageTemplate/{PageTemplateContext.types.d.ts → PageTemplate/PageTemplateContext.types.d.ts} +0 -0
- /package/dist/PageTemplate/{PageTemplateContext.types.js → PageTemplate/PageTemplateContext.types.js} +0 -0
- /package/dist/PageTemplate/{usePageTemplateContext.d.ts → PageTemplate/usePageTemplateContext.d.ts} +0 -0
- /package/dist/PageTemplate/{usePageTemplateContext.js → PageTemplate/usePageTemplateContext.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropzone.js","names":["Ban","Image","equals","omit","React","styled","Banner","Button","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","_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","trigger","overlay","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/Banner'\nimport { Button } from '../Button/Button'\nimport { Tooltip } from '../Tooltip/Tooltip'\nimport { Typography } from '../Typography/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 },\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 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 </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"],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AASA,CAAA;MAAA,OAAQmG,iBAAiB,CAAC7G,UAAU,CAAC4B,KAAK,CAAC;IAAA;EAAC,CACtD,CACoB,CAAC;AAE5B,CACF,CAAC;AAEDoD,iBAAiB,CAACF,WAAW,GAAG,mBAAmB;AAEnDS,eAAe,CAACT,WAAW,GAAG,iBAAiB;AAE/CqB,SAAS,CAACrB,WAAW,GAAG,UAAU;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMsB,QAAQ,gBAAGtH,KAAK,CAAC+J,IAAI,CAAC1C,SAAS,EAAEvH,MAAM,CAAC"}
|
|
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(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IAAI,CAACpD,SAAS,EAAEzH,MAAM,CAAC"}
|
|
@@ -9,9 +9,9 @@ export declare const StyledDropzoneContainer: import("styled-components").Styled
|
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
}, never>;
|
|
11
11
|
export declare const StyledDropzoneMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
|
-
export declare const StyledUploadButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("
|
|
12
|
+
export declare const StyledUploadButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
13
13
|
export declare const StyledDropzoneCaption: import("styled-components").StyledComponent<"span", any, {
|
|
14
14
|
error: boolean;
|
|
15
15
|
}, never>;
|
|
16
|
-
export declare const StyledDropzoneWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("
|
|
17
|
-
export declare const StyledDropzoneFocusDetector: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("
|
|
16
|
+
export declare const StyledDropzoneWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("../Flex").FlexProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
17
|
+
export declare const StyledDropzoneFocusDetector: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("../Box").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { ErrorBanner as ErrorBannerBase } from '../Banner/Banner';
|
|
3
|
-
import { Box } from '../Box
|
|
4
|
-
import { Button } from '../Button
|
|
5
|
-
import { Flex } from '../Flex
|
|
6
|
-
import { getTypographyIntent } from '../Typography
|
|
3
|
+
import { Box } from '../Box';
|
|
4
|
+
import { Button } from '../Button';
|
|
5
|
+
import { Flex } from '../Flex';
|
|
6
|
+
import { getTypographyIntent } from '../Typography';
|
|
7
7
|
import { borderRadius } from '../_styles/borderRadius';
|
|
8
8
|
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_20_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_20_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_20_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
22
|
var disabled = _ref.disabled;
|
|
23
23
|
return disabled && css(["height:72px;margin-bottom:", "px;"], spacing.sm);
|
|
@@ -26,7 +26,7 @@ var activeDropzone = /*#__PURE__*/css(["outline:none;border:2px dashed ", ";back
|
|
|
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_20_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
31
|
var disabled = _ref2.disabled;
|
|
32
32
|
return !disabled && css(["&:hover{", "}"], activeDropzone);
|
|
@@ -35,7 +35,7 @@ export var StyledDropzoneContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
35
35
|
return disabled && disabledDropzone;
|
|
36
36
|
}, function (_ref4) {
|
|
37
37
|
var disabled = _ref4.disabled;
|
|
38
|
-
return disabled && css(["&:hover,&:
|
|
38
|
+
return disabled && css(["&:hover,&:focus{", "}"], disabledDropzone);
|
|
39
39
|
}, function (_ref5) {
|
|
40
40
|
var active = _ref5.active,
|
|
41
41
|
disabled = _ref5.disabled;
|
|
@@ -43,25 +43,25 @@ export var StyledDropzoneContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
43
43
|
});
|
|
44
44
|
export var StyledDropzoneMessage = /*#__PURE__*/styled.div.withConfig({
|
|
45
45
|
displayName: "StyledDropzoneMessage",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_20_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_20_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_20_0__sc-by95hy-6"
|
|
55
55
|
})(["color:", ";"], function (_ref6) {
|
|
56
56
|
var error = _ref6.error;
|
|
57
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_20_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_20_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
|
|
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,WAA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c,KAAA,CAARd,QAAQ;EAAA,OAAOA,QAAQ,IAAIK,gBAAgB;AAAA,GAE9C,UAAAU,KAAA;EAAA,IAAGf,QAAQ,GAAAe,KAAA,CAARf,QAAQ;EAAA,OACXA,QAAQ,IACRtB,GAAG,4BAGG2B,gBAAgB,CAErB;AAAA,GAED,UAAAW,KAAA;EAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;IAAEjB,QAAQ,GAAAgB,KAAA,CAARhB,QAAQ;EAAA,OAAOiB,MAAM,IAAI,CAACjB,QAAQ,IAAIE,cAAc;AAAA,EAClE;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,KAAK,GAAAD,KAAA,CAALC,KAAK;EAAA,OAAOA,KAAK,IAAIrC,MAAM,CAACsC,MAAM;AAAA,EAC/C;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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { DropzoneInputProps as DropzoneInputPropsBase, DropzoneOptions, DropzoneRootProps as DropzoneRootPropsBase, DropzoneState } from 'react-dropzone';
|
|
3
|
-
import { type FileError as FileRejectionError, type FileRejection } from 'react-dropzone';
|
|
3
|
+
import { type FileError as FileRejectionError, type FileRejection, type FileWithPath } from 'react-dropzone';
|
|
4
4
|
export declare type DropzoneFile = any;
|
|
5
5
|
export declare type FileRejectionReason = FileRejectionError['code'];
|
|
6
6
|
export declare const fileRejectionReason: Record<string, FileRejectionReason>;
|
|
@@ -198,6 +198,11 @@ export declare type DropzoneHookState = DropzoneState & {
|
|
|
198
198
|
* @since 10.19.0
|
|
199
199
|
*/
|
|
200
200
|
dispatchDropError: (error: DropErrorType) => void;
|
|
201
|
+
/**
|
|
202
|
+
* Array of already selected files
|
|
203
|
+
* @since 12.19.0
|
|
204
|
+
*/
|
|
205
|
+
value?: FileWithPath[];
|
|
201
206
|
};
|
|
202
207
|
/**
|
|
203
208
|
* WARNING
|
|
@@ -248,8 +253,20 @@ export interface DropzoneProps extends DropzoneHookState {
|
|
|
248
253
|
/**
|
|
249
254
|
* Dropzone tooltip content
|
|
250
255
|
* @since 10.19.0
|
|
256
|
+
* @deprecatedSince 12.19.0
|
|
257
|
+
* @deprecated `tooltip` has been deprecated and will be removed in the future version. Please use `contentRenderer` instead
|
|
251
258
|
*/
|
|
252
259
|
tooltip?: React.ReactNode | string;
|
|
260
|
+
/**
|
|
261
|
+
* Array of already selected files
|
|
262
|
+
* @since 12.19.0
|
|
263
|
+
*/
|
|
264
|
+
tokens?: FileWithPath[];
|
|
265
|
+
/**
|
|
266
|
+
* Handler function to clear already selected files
|
|
267
|
+
* @since 12.19.0
|
|
268
|
+
*/
|
|
269
|
+
onClear?: (token: FileWithPath) => void;
|
|
253
270
|
/**
|
|
254
271
|
* Additional props for dropzone element
|
|
255
272
|
* @since 10.19.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropzone.types.js","names":["fileRejectionReason","maxFiles","maxFileSize","minFileSize","fileType","dropErrors","fileAmount","oneFileAtATime","multipleErrors","reset"],"sources":["../../src/Dropzone/Dropzone.types.ts"],"sourcesContent":["import type React from 'react'\nimport type {\n DropzoneInputProps as DropzoneInputPropsBase,\n DropzoneOptions,\n DropzoneRootProps as DropzoneRootPropsBase,\n DropzoneState,\n} from 'react-dropzone'\nimport {\n type FileError as FileRejectionError,\n type FileRejection,\n} from 'react-dropzone'\n\nexport type DropzoneFile = any\n\nexport type FileRejectionReason = FileRejectionError['code']\n\nexport const fileRejectionReason: Record<string, FileRejectionReason> = {\n maxFiles: 'too-many-files',\n maxFileSize: 'file-too-large',\n minFileSize: 'file-too-small',\n fileType: 'file-invalid-type',\n}\n\nexport type { FileRejection, FileRejectionError }\n\nexport interface DropzoneErrorBannerProps {\n /**\n * @since 10.19.0\n */\n error: DropzoneHookState['dropError']\n\n /**\n * Rejected files and why they were rejected\n * ```\n * {\n * file: File,\n * errors: FileError[]\n * }[]\n * ```\n * @since 10.19.0\n */\n fileRejections: DropzoneHookState['fileRejections']\n /**\n * @since 10.19.0\n */\n onDismiss: () => void\n /**\n * @since 10.19.0\n */\n className?: string\n /**\n * @since 10.19.0\n */\n qa?: {\n showErrorDetails?: string\n hideError?: string\n }\n}\n\nexport interface MultipleErrorsProps {\n /**\n * @since 10.19.0\n */\n fileRejections: FileRejection[]\n /**\n * @since 10.19.0\n */\n maxFiles?: number\n /**\n * @since 10.19.0\n */\n maxSize?: number\n /**\n * @since 10.19.0\n */\n minSize?: number\n}\n\nexport interface ContainerProps {\n /**\n * Additional props for dropzone container element\n * @since 10.19.0\n */\n rootProps: DropzoneRootProps\n\n /**\n * Returns the props you should apply to the root drop container you render\n * @since 10.19.0\n */\n getRootProps: DropzoneState['getRootProps']\n /**\n * @since 10.19.0\n */\n active: boolean\n\n /**\n * Enable/disable the dropzone container\n * @since 10.19.0\n */\n disabled: boolean\n}\nexport interface ContentProps {\n /**\n * Force icon visibility\n * `NOTICE:` passing `true` or `false`\n * value explicitly will make component ignore resizing.\n * @since 10.19.0\n */\n isIconVisible: boolean\n\n /**\n * Enable/disable the dropzone content\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n contentMessage: React.ReactNode\n}\n\nexport interface DropzoneContentProps {\n /**\n * Open the native file selection dialog\n * @since 10.19.0\n */\n open: () => void\n\n /**\n * Enable/disable the dropzone content\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n errorMessage?: string\n}\n\nexport interface DropzoneHookProps\n extends Partial<Omit<DropzoneOptions, 'minSize' | 'maxSize'>> {\n /**\n * Array of already selected items\n * @since 10.19.0\n */\n value?: DropzoneFile[]\n\n /**\n * Maximum number files to the dropzone is allowed. All files above the limit\n * will be rejected.\n * @since 10.19.0\n */\n maxFileNumber?: number\n\n /**\n * Minimum file size (in bytes)\n * @since 10.19.0\n */\n minFileSize?: DropzoneOptions['minSize']\n\n /**\n * Maximum file size (in bytes)\n * @since 10.19.0\n */\n maxFileSize?: DropzoneOptions['maxSize']\n}\n\nexport const dropErrors = {\n fileType: 'FILE_TYPE_ERROR',\n fileAmount: 'FILE_AMOUNT_ERROR',\n maxFileSize: 'MAX_FILE_SIZE',\n minFileSize: 'MIN_FILE_SIZE',\n oneFileAtATime: 'ONE_FILE_AT_A_TIME',\n multipleErrors: 'MULTIPLE_ERRORS',\n reset: 'RESET',\n} as const\n\nexport type DropErrorType = (typeof dropErrors)[keyof typeof dropErrors]\n\nexport type DropError = {\n /**\n * @since 10.19.0\n */\n type: DropErrorType\n /**\n * @since 10.19.0\n */\n title: string\n /**\n * @since 10.19.0\n */\n message: string\n /**\n * @since 10.19.0\n */\n body?: React.ReactNode\n}\n\nexport type DropzoneHookState = DropzoneState & {\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @default false\n * @since 10.19.0\n * */\n multiple: boolean\n\n /**\n * Error message if dragged files is rejected\n * ```\n * { type: DropErrorType, title: string, message: string }\n * ```\n * @since 10.19.0\n */\n dragError: string\n\n /**\n * Error message if dropped files is rejected\n * ```\n * { type: DropErrorType, title: string, message: string }\n * ```\n * @since 10.19.0\n */\n dropError: DropError\n\n /**\n * Enable/disable the dropzone\n * @default false\n * @since 10.19.0\n */\n disabled: boolean\n\n /**\n * Sets `dropError`.\n * ```\n * (error: DropErrorType) => void\n * ```\n * @since 10.19.0\n */\n dispatchDropError: (error: DropErrorType) => void\n}\n\n/**\n * WARNING\n * To keep component work as expected according to props passed to `useDropzone` hook\n * Some properties are omitted\n */\ntype FrozenDropzoneRootKeys = 'disabled'\n\ntype FrozenDropzoneRootProps = {\n [key in FrozenDropzoneRootKeys]?: never\n}\n\ntype FrozenDropzoneInputKeys = 'accept' | 'multiple' | 'type'\n\ntype FrozenDropzoneInputProps = {\n [key in FrozenDropzoneInputKeys]: never\n}\n\nexport type DropzoneRootProps = DropzoneRootPropsBase & FrozenDropzoneRootProps\n\nexport type DropzoneInputProps = DropzoneInputPropsBase &\n FrozenDropzoneInputProps\n\nexport interface QaTags {\n /**\n * @since 10.19.0\n */\n dropzone?: string\n /**\n * @since 10.19.0\n */\n showErrorDetails?: string\n /**\n * @since 10.19.0\n */\n hideError?: string\n}\n\nexport interface DropzoneProps extends DropzoneHookState {\n /**\n * Render prop to specify a custom dropzone body message\n * @since 10.19.0\n */\n contentRenderer?: (props: DropzoneContentProps) => React.ReactNode\n /**\n * `NOTICE:`\n *\n * `true` - will make Icon always visible, despite the component height\n *\n * `false` - will make Icon always hide, despite the component height\n *\n * `undefined` - will look on the component height to decide show or hide Icon\n * @since 10.19.0\n */\n isIconVisible?: boolean\n\n /**\n * Dropzone tooltip content\n * @since 10.19.0\n */\n tooltip?: React.ReactNode | string\n\n /**\n * Additional props for dropzone element\n * @since 10.19.0\n */\n rootProps?: DropzoneRootProps\n\n /**\n * Additional props for input element\n * @since 10.19.0\n */\n inputProps?: DropzoneInputProps\n /**\n * @since 10.19.0\n */\n className?: string\n /**\n * @since 10.19.0\n */\n qa?: QaTags\n}\n\nexport interface DropzoneRef {\n /**\n * @since 10.19.0\n */\n rootRef: React.RefObject<HTMLElement>\n /**\n * @since 10.19.0\n */\n inputRef: React.RefObject<HTMLInputElement>\n\n /**\n * Open the native file selection dialog\n * @since 10.19.0\n */\n open: () => void\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dropzone.types.js","names":["fileRejectionReason","maxFiles","maxFileSize","minFileSize","fileType","dropErrors","fileAmount","oneFileAtATime","multipleErrors","reset"],"sources":["../../src/Dropzone/Dropzone.types.ts"],"sourcesContent":["import type React from 'react'\nimport type {\n DropzoneInputProps as DropzoneInputPropsBase,\n DropzoneOptions,\n DropzoneRootProps as DropzoneRootPropsBase,\n DropzoneState,\n} from 'react-dropzone'\nimport {\n type FileError as FileRejectionError,\n type FileRejection,\n type FileWithPath,\n} from 'react-dropzone'\n\nexport type DropzoneFile = any\n\nexport type FileRejectionReason = FileRejectionError['code']\n\nexport const fileRejectionReason: Record<string, FileRejectionReason> = {\n maxFiles: 'too-many-files',\n maxFileSize: 'file-too-large',\n minFileSize: 'file-too-small',\n fileType: 'file-invalid-type',\n}\n\nexport type { FileRejection, FileRejectionError }\n\nexport interface DropzoneErrorBannerProps {\n /**\n * @since 10.19.0\n */\n error: DropzoneHookState['dropError']\n\n /**\n * Rejected files and why they were rejected\n * ```\n * {\n * file: File,\n * errors: FileError[]\n * }[]\n * ```\n * @since 10.19.0\n */\n fileRejections: DropzoneHookState['fileRejections']\n /**\n * @since 10.19.0\n */\n onDismiss: () => void\n /**\n * @since 10.19.0\n */\n className?: string\n /**\n * @since 10.19.0\n */\n qa?: {\n showErrorDetails?: string\n hideError?: string\n }\n}\n\nexport interface MultipleErrorsProps {\n /**\n * @since 10.19.0\n */\n fileRejections: FileRejection[]\n /**\n * @since 10.19.0\n */\n maxFiles?: number\n /**\n * @since 10.19.0\n */\n maxSize?: number\n /**\n * @since 10.19.0\n */\n minSize?: number\n}\n\nexport interface ContainerProps {\n /**\n * Additional props for dropzone container element\n * @since 10.19.0\n */\n rootProps: DropzoneRootProps\n\n /**\n * Returns the props you should apply to the root drop container you render\n * @since 10.19.0\n */\n getRootProps: DropzoneState['getRootProps']\n /**\n * @since 10.19.0\n */\n active: boolean\n\n /**\n * Enable/disable the dropzone container\n * @since 10.19.0\n */\n disabled: boolean\n}\nexport interface ContentProps {\n /**\n * Force icon visibility\n * `NOTICE:` passing `true` or `false`\n * value explicitly will make component ignore resizing.\n * @since 10.19.0\n */\n isIconVisible: boolean\n\n /**\n * Enable/disable the dropzone content\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n contentMessage: React.ReactNode\n}\n\nexport interface DropzoneContentProps {\n /**\n * Open the native file selection dialog\n * @since 10.19.0\n */\n open: () => void\n\n /**\n * Enable/disable the dropzone content\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n errorMessage?: string\n}\n\nexport interface DropzoneHookProps\n extends Partial<Omit<DropzoneOptions, 'minSize' | 'maxSize'>> {\n /**\n * Array of already selected items\n * @since 10.19.0\n */\n value?: DropzoneFile[]\n\n /**\n * Maximum number files to the dropzone is allowed. All files above the limit\n * will be rejected.\n * @since 10.19.0\n */\n maxFileNumber?: number\n\n /**\n * Minimum file size (in bytes)\n * @since 10.19.0\n */\n minFileSize?: DropzoneOptions['minSize']\n\n /**\n * Maximum file size (in bytes)\n * @since 10.19.0\n */\n maxFileSize?: DropzoneOptions['maxSize']\n}\n\nexport const dropErrors = {\n fileType: 'FILE_TYPE_ERROR',\n fileAmount: 'FILE_AMOUNT_ERROR',\n maxFileSize: 'MAX_FILE_SIZE',\n minFileSize: 'MIN_FILE_SIZE',\n oneFileAtATime: 'ONE_FILE_AT_A_TIME',\n multipleErrors: 'MULTIPLE_ERRORS',\n reset: 'RESET',\n} as const\n\nexport type DropErrorType = (typeof dropErrors)[keyof typeof dropErrors]\n\nexport type DropError = {\n /**\n * @since 10.19.0\n */\n type: DropErrorType\n /**\n * @since 10.19.0\n */\n title: string\n /**\n * @since 10.19.0\n */\n message: string\n /**\n * @since 10.19.0\n */\n body?: React.ReactNode\n}\n\nexport type DropzoneHookState = DropzoneState & {\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @default false\n * @since 10.19.0\n * */\n multiple: boolean\n\n /**\n * Error message if dragged files is rejected\n * ```\n * { type: DropErrorType, title: string, message: string }\n * ```\n * @since 10.19.0\n */\n dragError: string\n\n /**\n * Error message if dropped files is rejected\n * ```\n * { type: DropErrorType, title: string, message: string }\n * ```\n * @since 10.19.0\n */\n dropError: DropError\n\n /**\n * Enable/disable the dropzone\n * @default false\n * @since 10.19.0\n */\n disabled: boolean\n\n /**\n * Sets `dropError`.\n * ```\n * (error: DropErrorType) => void\n * ```\n * @since 10.19.0\n */\n dispatchDropError: (error: DropErrorType) => void\n\n /**\n * Array of already selected files\n * @since 12.19.0\n */\n value?: FileWithPath[]\n}\n\n/**\n * WARNING\n * To keep component work as expected according to props passed to `useDropzone` hook\n * Some properties are omitted\n */\ntype FrozenDropzoneRootKeys = 'disabled'\n\ntype FrozenDropzoneRootProps = {\n [key in FrozenDropzoneRootKeys]?: never\n}\n\ntype FrozenDropzoneInputKeys = 'accept' | 'multiple' | 'type'\n\ntype FrozenDropzoneInputProps = {\n [key in FrozenDropzoneInputKeys]: never\n}\n\nexport type DropzoneRootProps = DropzoneRootPropsBase & FrozenDropzoneRootProps\n\nexport type DropzoneInputProps = DropzoneInputPropsBase &\n FrozenDropzoneInputProps\n\nexport interface QaTags {\n /**\n * @since 10.19.0\n */\n dropzone?: string\n /**\n * @since 10.19.0\n */\n showErrorDetails?: string\n /**\n * @since 10.19.0\n */\n hideError?: string\n}\n\nexport interface DropzoneProps extends DropzoneHookState {\n /**\n * Render prop to specify a custom dropzone body message\n * @since 10.19.0\n */\n contentRenderer?: (props: DropzoneContentProps) => React.ReactNode\n /**\n * `NOTICE:`\n *\n * `true` - will make Icon always visible, despite the component height\n *\n * `false` - will make Icon always hide, despite the component height\n *\n * `undefined` - will look on the component height to decide show or hide Icon\n * @since 10.19.0\n */\n isIconVisible?: boolean\n\n /**\n * Dropzone tooltip content\n * @since 10.19.0\n * @deprecatedSince 12.19.0\n * @deprecated `tooltip` has been deprecated and will be removed in the future version. Please use `contentRenderer` instead\n */\n tooltip?: React.ReactNode | string\n\n /**\n * Array of already selected files\n * @since 12.19.0\n */\n tokens?: FileWithPath[]\n\n /**\n * Handler function to clear already selected files\n * @since 12.19.0\n */\n onClear?: (token: FileWithPath) => void\n\n /**\n * Additional props for dropzone element\n * @since 10.19.0\n */\n rootProps?: DropzoneRootProps\n\n /**\n * Additional props for input element\n * @since 10.19.0\n */\n inputProps?: DropzoneInputProps\n /**\n * @since 10.19.0\n */\n className?: string\n /**\n * @since 10.19.0\n */\n qa?: QaTags\n}\n\nexport interface DropzoneRef {\n /**\n * @since 10.19.0\n */\n rootRef: React.RefObject<HTMLElement>\n /**\n * @since 10.19.0\n */\n inputRef: React.RefObject<HTMLInputElement>\n\n /**\n * Open the native file selection dialog\n * @since 10.19.0\n */\n open: () => void\n}\n"],"mappings":"AAiBA,OAAO,IAAMA,mBAAwD,GAAG;EACtEC,QAAQ,EAAE,gBAAgB;EAC1BC,WAAW,EAAE,gBAAgB;EAC7BC,WAAW,EAAE,gBAAgB;EAC7BC,QAAQ,EAAE;AACZ,CAAC;AAkJD,OAAO,IAAMC,UAAU,GAAG;EACxBD,QAAQ,EAAE,iBAAiB;EAC3BE,UAAU,EAAE,mBAAmB;EAC/BJ,WAAW,EAAE,eAAe;EAC5BC,WAAW,EAAE,eAAe;EAC5BI,cAAc,EAAE,oBAAoB;EACpCC,cAAc,EAAE,iBAAiB;EACjCC,KAAK,EAAE;AACT,CAAU;;AAwEV;AACA;AACA;AACA;AACA"}
|
|
@@ -5,27 +5,27 @@ import { spacing } from '../_styles/spacing';
|
|
|
5
5
|
var emptyStateWidth = 312;
|
|
6
6
|
export var StyledSvg = /*#__PURE__*/styled.svg.withConfig({
|
|
7
7
|
displayName: "StyledSvg",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_20_0__sc-1xaoo8n-0"
|
|
9
9
|
})(["width:200px;height:200px;"]);
|
|
10
10
|
export var StyledImage = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
displayName: "StyledImage",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_20_0__sc-1xaoo8n-1"
|
|
13
13
|
})([""]);
|
|
14
14
|
export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
|
|
15
15
|
displayName: "StyledTitle",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_20_0__sc-1xaoo8n-2"
|
|
17
17
|
})(["color:", ";max-width:", "px;width:100%;", ""], colors.gray15, emptyStateWidth, getTypographyIntent('h2'));
|
|
18
18
|
export var StyledDescription = /*#__PURE__*/styled.div.withConfig({
|
|
19
19
|
displayName: "StyledDescription",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_20_0__sc-1xaoo8n-3"
|
|
21
21
|
})(["margin-top:", "px;color:", ";max-width:", "px;width:100%;", ""], spacing.lg, colors.gray45, emptyStateWidth, getTypographyIntent('body'));
|
|
22
22
|
export var StyledActions = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledActions",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_20_0__sc-1xaoo8n-4"
|
|
25
25
|
})(["margin-top:", "px;"], spacing.xl);
|
|
26
26
|
export var StyledEmptyState = /*#__PURE__*/styled.div.withConfig({
|
|
27
27
|
displayName: "StyledEmptyState",
|
|
28
|
-
componentId: "core-
|
|
28
|
+
componentId: "core-12_20_0__sc-1xaoo8n-5"
|
|
29
29
|
})(["display:flex;justify-content:center;align-items:", ";gap:", "px;flex-direction:", ";margin-top:", "px;margin-bottom:", "px;", "{> img{max-width:200px;}}", " ", "}"], function (_ref) {
|
|
30
30
|
var $isHorizontal = _ref.$isHorizontal;
|
|
31
31
|
return $isHorizontal ? 'flex-start' : 'center';
|
|
@@ -2,14 +2,14 @@ import styled from 'styled-components';
|
|
|
2
2
|
import { getSmallIconBodyTextRules, StyledP } from '../Semantic/Semantic.styles';
|
|
3
3
|
export var StyledField = /*#__PURE__*/styled.div.withConfig({
|
|
4
4
|
displayName: "StyledField",
|
|
5
|
-
componentId: "core-
|
|
5
|
+
componentId: "core-12_20_0__sc-1q3pe6s-0"
|
|
6
6
|
})(["> ", "{", "}"], StyledP, getSmallIconBodyTextRules);
|
|
7
7
|
export var StyledFieldHeader = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledFieldHeader",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_20_0__sc-1q3pe6s-1"
|
|
10
10
|
})(["", " > ", "{", "}"], getSmallIconBodyTextRules, StyledP, getSmallIconBodyTextRules);
|
|
11
11
|
export var StyledFieldFooter = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledFieldFooter",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_20_0__sc-1q3pe6s-2"
|
|
14
14
|
})(["> ", "{", "}"], StyledP, getSmallIconBodyTextRules);
|
|
15
15
|
//# sourceMappingURL=Field.styles.js.map
|
|
@@ -3,18 +3,18 @@ import { LinkButton } from '../Button/Button';
|
|
|
3
3
|
import { spacing } from '../_styles/spacing';
|
|
4
4
|
export var StyledFileListDownloadAll = /*#__PURE__*/styled(LinkButton).withConfig({
|
|
5
5
|
displayName: "StyledFileListDownloadAll",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_20_0__sc-7gltjc-0"
|
|
7
7
|
})(["margin-bottom:", "px;"], spacing.xs);
|
|
8
8
|
export var StyledFileListItem = /*#__PURE__*/styled.li.withConfig({
|
|
9
9
|
displayName: "StyledFileListItem",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_20_0__sc-7gltjc-1"
|
|
11
11
|
})(["display:flex;align-items:center;margin-bottom:", "px;word-break:break-word;&:last-child{margin-bottom:0;}"], spacing.xs);
|
|
12
12
|
export var StyledFileListItemTextInactive = /*#__PURE__*/styled.span.withConfig({
|
|
13
13
|
displayName: "StyledFileListItemTextInactive",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_20_0__sc-7gltjc-2"
|
|
15
15
|
})(["cursor:pointer;"]);
|
|
16
16
|
export var StyledFileListItemDownloadIcon = /*#__PURE__*/styled(LinkButton).withConfig({
|
|
17
17
|
displayName: "StyledFileListItemDownloadIcon",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_20_0__sc-7gltjc-3"
|
|
19
19
|
})(["margin-left:", "px;align-self:flex-start;"], spacing.sm);
|
|
20
20
|
//# sourceMappingURL=FileList.styles.js.map
|
|
@@ -12,40 +12,40 @@ var modalContainerMaxHeight = 996;
|
|
|
12
12
|
var modalContainerMargin = 80;
|
|
13
13
|
export var StyledModalOverlay = /*#__PURE__*/styled(Modal.Overlay).withConfig({
|
|
14
14
|
displayName: "StyledModalOverlay",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_20_0__sc-343gts-0"
|
|
16
16
|
})(["opacity:0;pointer-events:none;transition:opacity 0.3s linear;visibility:hidden;", ""], function (props) {
|
|
17
17
|
return props.$open && "\n opacity: 1;\n pointer-events: all;\n visibility: visible;\n ";
|
|
18
18
|
});
|
|
19
19
|
export var StyledModalContainer = /*#__PURE__*/styled(Modal.Container).withConfig({
|
|
20
20
|
displayName: "StyledModalContainer",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_20_0__sc-343gts-1"
|
|
22
22
|
})(["width:calc(100% - ", "px);height:calc(100% - ", "px);top:calc(50vh - ", "px);left:calc(50vw - ", "px);margin:", "px;min-width:", "px;min-height:", "px;max-width:", "px;max-height:", "px;"], modalContainerMargin * 2, modalContainerMargin * 2, modalContainerMargin, modalContainerMargin, modalContainerMargin, modalContainerMinWidth, modalContainerMinHeight, modalContainerMaxWidth, modalContainerMaxHeight);
|
|
23
23
|
export var StyledModalBody = /*#__PURE__*/styled(Modal.Body).withConfig({
|
|
24
24
|
displayName: "StyledModalBody",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-12_20_0__sc-343gts-2"
|
|
26
26
|
})(["min-height:", "px;height:100%;margin:0;max-width:none;padding:0;border-bottom:1px solid ", ";"], modalBodyMinHeight, colors.gray85);
|
|
27
27
|
export var StyledModalInnerBody = /*#__PURE__*/styled.div.withConfig({
|
|
28
28
|
displayName: "StyledModalInnerBody",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_20_0__sc-343gts-3"
|
|
30
30
|
})(["display:flex;flex-direction:row;height:100%;overflow:hidden;"]);
|
|
31
31
|
export var StyledModalHeader = /*#__PURE__*/styled(Modal.Header).withConfig({
|
|
32
32
|
displayName: "StyledModalHeader",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-12_20_0__sc-343gts-4"
|
|
34
34
|
})(["border-bottom:1px solid ", ";"], colors.gray85);
|
|
35
35
|
export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
|
|
36
36
|
displayName: "StyledModalContent",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-12_20_0__sc-343gts-5"
|
|
38
38
|
})(["display:flex;width:100%;height:100%;overflow-y:auto;outline:none;"]);
|
|
39
39
|
export var StyledSource = /*#__PURE__*/styled.div.withConfig({
|
|
40
40
|
displayName: "StyledSource",
|
|
41
|
-
componentId: "core-
|
|
41
|
+
componentId: "core-12_20_0__sc-343gts-6"
|
|
42
42
|
})(["width:100%;height:100%;"]);
|
|
43
43
|
export var StyledAttachButton = /*#__PURE__*/styled.div.withConfig({
|
|
44
44
|
displayName: "StyledAttachButton",
|
|
45
|
-
componentId: "core-
|
|
45
|
+
componentId: "core-12_20_0__sc-343gts-7"
|
|
46
46
|
})(["margin-left:", "px;"], spacing.md);
|
|
47
47
|
export var StyledFileTreeSpinner = /*#__PURE__*/styled.div.withConfig({
|
|
48
48
|
displayName: "StyledFileTreeSpinner",
|
|
49
|
-
componentId: "core-
|
|
49
|
+
componentId: "core-12_20_0__sc-343gts-8"
|
|
50
50
|
})(["display:flex;align-items:center;justify-content:center;height:100%;"]);
|
|
51
51
|
//# sourceMappingURL=FileExplorer.styles.js.map
|
|
@@ -3,14 +3,14 @@ import { colors } from '../../_styles/colors';
|
|
|
3
3
|
import { SourceItem } from '../SourceItem/SourceItem';
|
|
4
4
|
export var StyledSidebar = /*#__PURE__*/styled.div.withConfig({
|
|
5
5
|
displayName: "StyledSidebar",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_20_0__sc-s03uiv-0"
|
|
7
7
|
})(["display:flex;flex-shrink:0;width:300px;border-right:1px solid ", ";"], colors.gray85);
|
|
8
8
|
export var StyledNavigation = /*#__PURE__*/styled.div.withConfig({
|
|
9
9
|
displayName: "StyledNavigation",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_20_0__sc-s03uiv-1"
|
|
11
11
|
})(["display:flex;flex-direction:column;width:100%;&:focus{outline:none;}"]);
|
|
12
12
|
export var StyledSourceItem = /*#__PURE__*/styled(SourceItem).withConfig({
|
|
13
13
|
displayName: "StyledSourceItem",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_20_0__sc-s03uiv-2"
|
|
15
15
|
})(["width:100%;padding-left:10px;&:focus{padding-left:9px;}"]);
|
|
16
16
|
//# sourceMappingURL=FileExplorerSidebar.styles.js.map
|
|
@@ -3,10 +3,10 @@ import { spacing } from '../_styles/spacing';
|
|
|
3
3
|
import { FileTokenList } from './FileTokenList';
|
|
4
4
|
export var StyledFileTokenList = /*#__PURE__*/styled(FileTokenList).withConfig({
|
|
5
5
|
displayName: "StyledFileTokenList",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_20_0__sc-1r3srjk-0"
|
|
7
7
|
})(["margin-top:", "px;"], spacing.md);
|
|
8
8
|
export var StyledFileSelect = /*#__PURE__*/styled.div.withConfig({
|
|
9
9
|
displayName: "StyledFileSelect",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_20_0__sc-1r3srjk-1"
|
|
11
11
|
})(["display:flex;flex-direction:column;"]);
|
|
12
12
|
//# sourceMappingURL=FileSelect.styles.js.map
|
|
@@ -5,20 +5,20 @@ import { spacing } from '../../_styles/spacing';
|
|
|
5
5
|
export var dropzoneContainerAttr = 'data-dropzone-container';
|
|
6
6
|
export var StyledDropzone = /*#__PURE__*/styled(Dropzone).withConfig({
|
|
7
7
|
displayName: "StyledDropzone",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_20_0__sc-ueh7d7-0"
|
|
9
9
|
})(["", ""], function (_ref) {
|
|
10
10
|
var hidden = _ref.hidden;
|
|
11
11
|
return hidden && "\n [".concat(dropzoneContainerAttr, "] {\n align-self: flex-start;\n margin-bottom: ").concat(spacing.xs, "px;\n\n &,\n &:hover {\n width: auto;\n min-height: auto;\n border: none;\n padding: 0;\n background: transparent;\n cursor: default;\n }\n }\n \n ");
|
|
12
12
|
});
|
|
13
13
|
export var StyledDropzoneMessage = /*#__PURE__*/styled.span.withConfig({
|
|
14
14
|
displayName: "StyledDropzoneMessage",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_20_0__sc-ueh7d7-1"
|
|
16
16
|
})(["", ""], function (_ref2) {
|
|
17
17
|
var error = _ref2.error;
|
|
18
18
|
return error && "\n color: ".concat(colors.gray15, ";\n ");
|
|
19
19
|
});
|
|
20
20
|
export var StyledUploadButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
21
21
|
displayName: "StyledUploadButtonWrapper",
|
|
22
|
-
componentId: "core-
|
|
22
|
+
componentId: "core-12_20_0__sc-ueh7d7-2"
|
|
23
23
|
})(["display:block;margin-left:auto;margin-right:auto;margin-bottom:", "px;"], spacing.sm);
|
|
24
24
|
//# sourceMappingURL=FileSelectDropzone.styles.js.map
|
|
@@ -3,10 +3,10 @@ import { FileToken } from '../../FileToken/FileToken';
|
|
|
3
3
|
import { spacing } from '../../_styles/spacing';
|
|
4
4
|
export var StyledTokenList = /*#__PURE__*/styled.div.withConfig({
|
|
5
5
|
displayName: "StyledTokenList",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_20_0__sc-u9tli5-0"
|
|
7
7
|
})(["display:flex;flex-wrap:wrap;"]);
|
|
8
8
|
export var StyledFileToken = /*#__PURE__*/styled(FileToken).withConfig({
|
|
9
9
|
displayName: "StyledFileToken",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_20_0__sc-u9tli5-1"
|
|
11
11
|
})(["margin-bottom:", "px;margin-right:", "px;"], spacing.sm, spacing.sm);
|
|
12
12
|
//# sourceMappingURL=FileTokenList.styles.js.map
|
|
@@ -13,7 +13,7 @@ export var contentHeight = modalBodyWidth - modalBodyBorderTopWidth - toolbarHei
|
|
|
13
13
|
// TODO Update box-shadow to use getShadow instead
|
|
14
14
|
export var StyledToolbar = /*#__PURE__*/styled.div.withConfig({
|
|
15
15
|
displayName: "StyledToolbar",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_20_0__sc-1sj6hvp-0"
|
|
17
17
|
})(["display:flex;align-items:center;flex-direction:row;width:100%;min-height:", "px;padding:16px 24px;", " ", " & > * + *{margin-left:", "px;}"], toolbarHeight, function (_ref) {
|
|
18
18
|
var $alignRight = _ref.$alignRight;
|
|
19
19
|
return css(["justify-content:", ";"], $alignRight ? 'flex-end' : 'space-between');
|
|
@@ -23,23 +23,23 @@ export var StyledToolbar = /*#__PURE__*/styled.div.withConfig({
|
|
|
23
23
|
}, spacing.sm);
|
|
24
24
|
export var StyledSearchWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
25
25
|
displayName: "StyledSearchWrapper",
|
|
26
|
-
componentId: "core-
|
|
26
|
+
componentId: "core-12_20_0__sc-1sj6hvp-1"
|
|
27
27
|
})(["width:286px;flex-shrink:1;min-width:180px;"]);
|
|
28
28
|
export var StyledEmptyStateWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
29
29
|
displayName: "StyledEmptyStateWrapper",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_20_0__sc-1sj6hvp-2"
|
|
31
31
|
})(["width:100%;height:100%;display:flex;justify-content:center;align-items:center;"]);
|
|
32
32
|
export var StyledEmptyState = /*#__PURE__*/styled(EmptyState).withConfig({
|
|
33
33
|
displayName: "StyledEmptyState",
|
|
34
|
-
componentId: "core-
|
|
34
|
+
componentId: "core-12_20_0__sc-1sj6hvp-3"
|
|
35
35
|
})(["margin-top:0;margin-bottom:0;img{width:160px;}"]);
|
|
36
36
|
export var StyledSpinnerWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
37
37
|
displayName: "StyledSpinnerWrapper",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_20_0__sc-1sj6hvp-4"
|
|
39
39
|
})(["height:", "px;width:100%;display:flex;align-items:center;justify-content:center;"], contentHeight);
|
|
40
40
|
export var StyledGrid = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledGrid",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_20_0__sc-1sj6hvp-5"
|
|
43
43
|
})(["display:flex;flex-direction:column;", ""], function (_ref3) {
|
|
44
44
|
var $isEmpty = _ref3.$isEmpty;
|
|
45
45
|
return $isEmpty && 'height: 100%;';
|
|
@@ -15,21 +15,21 @@ var dropzoneHeightWithIcon = 176;
|
|
|
15
15
|
var sourceWidth = 568;
|
|
16
16
|
export var StyledLocalSource = /*#__PURE__*/styled.div.withConfig({
|
|
17
17
|
displayName: "StyledLocalSource",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_20_0__sc-psqe8z-0"
|
|
19
19
|
})(["display:flex;flex-grow:1;flex-direction:column;align-items:stretch;height:", "px;max-height:", "px;padding:", "px ", "px ", "px ", "px;overflow-y:hidden;"], contentHeight, contentHeight, spacing.xl, spacing.xl + spacing.lg, spacing.xl, spacing.xl);
|
|
20
20
|
export var StyledDropzoneErrorBanner = /*#__PURE__*/styled(DropzoneErrorBanner).withConfig({
|
|
21
21
|
displayName: "StyledDropzoneErrorBanner",
|
|
22
|
-
componentId: "core-
|
|
22
|
+
componentId: "core-12_20_0__sc-psqe8z-1"
|
|
23
23
|
})(["margin-top:", "px;margin-bottom:", "px;margin-right:2px;"], errorBannerMarginTop, errorBannerMarginBottom);
|
|
24
24
|
export var StyledDropzoneWrapper = /*#__PURE__*/styled(Dropzone).withConfig({
|
|
25
25
|
displayName: "StyledDropzoneWrapper",
|
|
26
|
-
componentId: "core-
|
|
26
|
+
componentId: "core-12_20_0__sc-psqe8z-2"
|
|
27
27
|
})(["display:flex;height:auto;min-height:", "px;> div:first-child{display:flex;height:auto;}> ", "{display:none;}@media ", "{width:", "px;> div:first-child{height:100%;}}"], function (_ref) {
|
|
28
28
|
var isIconVisible = _ref.isIconVisible;
|
|
29
29
|
return isIconVisible ? dropzoneHeightWithIcon : dropzoneHeight;
|
|
30
30
|
}, DropzoneErrorBanner, mediaIE11Hack, sourceWidth);
|
|
31
31
|
export var StyledThumbnailList = /*#__PURE__*/styled(ThumbnailList).withConfig({
|
|
32
32
|
displayName: "StyledThumbnailList",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-12_20_0__sc-psqe8z-3"
|
|
34
34
|
})(["margin-top:", "px;border:", "px solid ", ";"], listMarginTop, listBorderWidth, colors.gray85);
|
|
35
35
|
//# sourceMappingURL=LocalSource.styles.js.map
|