@procore/core-react 12.14.0 → 12.15.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.js +3 -3
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.d.ts +3 -3
- package/dist/Banner/Banner.styles.js +16 -16
- package/dist/Banner/Banner.styles.js.map +1 -1
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +5 -2
- package/dist/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js +1 -1
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.d.ts +1 -1
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DateInput/DateInput.styles.js.map +1 -1
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/DetailPageTemplate/DetailPageTemplate.d.ts +11 -0
- package/dist/DetailPageTemplate/DetailPageTemplate.js +38 -0
- package/dist/DetailPageTemplate/DetailPageTemplate.js.map +1 -0
- package/dist/DetailPageTemplate/DetailPageTemplate.types.d.ts +13 -0
- package/dist/DetailPageTemplate/DetailPageTemplate.types.js +2 -0
- package/dist/DetailPageTemplate/DetailPageTemplate.types.js.map +1 -0
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/Dropdown/Dropdown.types.d.ts +5 -11
- package/dist/Dropdown/Dropdown.types.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +12 -14
- package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
- package/dist/Dropzone/Dropzone.js +3 -2
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/Dropzone/Dropzone.types.d.ts +22 -20
- 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.js +3 -3
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.d.ts +3 -3
- package/dist/FileSelect/GridSource/GridSource.styles.js +12 -12
- package/dist/FileSelect/GridSource/GridSource.styles.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.types.d.ts +14 -23
- package/dist/FileSelect/GridSource/GridSource.types.js.map +1 -1
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/LocalSource/LocalSource.types.d.ts +43 -47
- package/dist/FileSelect/LocalSource/LocalSource.types.js.map +1 -1
- 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/FileSelect/TreeSource/TreeSource.types.d.ts +3 -1
- package/dist/FileSelect/TreeSource/TreeSource.types.js.map +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +12 -7
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/Form.types.d.ts +55 -67
- package/dist/Form/Form.types.js.map +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.js +8 -5
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.js +2 -2
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.d.ts +2 -2
- package/dist/Modal/Modal.styles.js +17 -17
- package/dist/Modal/Modal.styles.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/MultiSelect/MultiSelect.types.d.ts +22 -15
- package/dist/MultiSelect/MultiSelect.types.js.map +1 -1
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.js +2 -2
- package/dist/NumberInput/NumberInput.js.map +1 -1
- package/dist/NumberInput/NumberInput.styles.d.ts +2 -2
- package/dist/NumberInput/NumberInput.styles.js +11 -11
- package/dist/NumberInput/NumberInput.styles.js.map +1 -1
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.js +5 -6
- package/dist/PageHeaderTemplate/PageHeaderTemplate.js.map +1 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- 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/Pill/Pill.types.d.ts +3 -1
- package/dist/Pill/Pill.types.js.map +1 -1
- 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/Search/Search.types.d.ts +4 -2
- package/dist/Search/Search.types.js.map +1 -1
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +6 -3
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Select/Select.types.d.ts +9 -1
- package/dist/Select/Select.types.js.map +1 -1
- package/dist/Semantic/Semantic.d.ts +3 -7
- package/dist/Semantic/Semantic.js +14 -2
- package/dist/Semantic/Semantic.js.map +1 -1
- package/dist/Semantic/Semantic.styles.d.ts +3 -3
- package/dist/Semantic/Semantic.styles.js +11 -11
- package/dist/Semantic/Semantic.styles.js.map +1 -1
- package/dist/Semantic/Semantic.types.d.ts +5 -0
- package/dist/Semantic/Semantic.types.js.map +1 -1
- package/dist/SettingsPageTemplate/SettingsPageTemplate.d.ts +7 -0
- package/dist/SettingsPageTemplate/SettingsPageTemplate.js +34 -0
- package/dist/SettingsPageTemplate/SettingsPageTemplate.js.map +1 -0
- package/dist/SettingsPageTemplate/SettingsPageTemplate.types.d.ts +9 -0
- package/dist/SettingsPageTemplate/SettingsPageTemplate.types.js +2 -0
- package/dist/SettingsPageTemplate/SettingsPageTemplate.types.js.map +1 -0
- package/dist/Slider/Slider.js +2 -2
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Slider/Slider.styles.d.ts +2 -2
- package/dist/Slider/Slider.styles.js +9 -9
- package/dist/Slider/Slider.styles.js.map +1 -1
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/Spinner/Spinner.types.d.ts +2 -5
- package/dist/Spinner/Spinner.types.js.map +1 -1
- 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/TextEditor/TextEditor.types.d.ts +12 -9
- package/dist/TextEditor/TextEditor.types.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.js +25 -10
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/Thumbnail.types.d.ts +2 -3
- package/dist/Thumbnail/Thumbnail.types.js.map +1 -1
- package/dist/Thumbnail/ThumbnailCaption.js +2 -2
- package/dist/Thumbnail/ThumbnailCaption.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/TieredSelect.types.d.ts +64 -40
- package/dist/TieredSelect/TieredSelect.types.js.map +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Tile/Tile.types.d.ts +1 -1
- package/dist/Tile/Tile.types.js.map +1 -1
- 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/ToggleButton/ToggleButton.types.d.ts +1 -1
- package/dist/ToggleButton/ToggleButton.types.js.map +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 +5 -0
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js +44 -0
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js.map +1 -0
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.d.ts +7 -0
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.js +2 -0
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.js.map +1 -0
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.js +3 -3
- package/dist/Tree/Tree.js.map +1 -1
- package/dist/Tree/Tree.styles.d.ts +9 -3
- package/dist/Tree/Tree.styles.js +23 -15
- package/dist/Tree/Tree.styles.js.map +1 -1
- package/dist/Tree/Tree.types.d.ts +40 -19
- package/dist/Tree/Tree.types.js.map +1 -1
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.js +1 -1
- package/dist/Typography/Typography.js.map +1 -1
- package/dist/Typography/Typography.styles.d.ts +2 -1
- package/dist/Typography/Typography.styles.js +3 -3
- package/dist/Typography/Typography.styles.js.map +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +12 -12
- 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 +39 -39
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +35 -35
- package/dist/_typedoc/Dropzone/Dropzone.types.json +53 -53
- package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
- 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 +42 -42
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +30 -30
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +27 -27
- 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 +1015 -975
- 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 +54 -54
- 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 +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 +35 -35
- 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 +28 -28
- 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 +4 -4
- package/dist/_typedoc/PillSelect/PillSelect.types.json +58 -48
- package/dist/_typedoc/Popover/Popover.types.json +14 -14
- 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 +22 -22
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
- package/dist/_typedoc/Select/Select.types.json +78 -58
- 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 +11 -11
- 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 +112 -102
- package/dist/_typedoc/Tabs/Tabs.types.json +19 -19
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +13 -13
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +23 -23
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +56 -56
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +44 -44
- package/dist/_typedoc/Tile/Tile.types.json +32 -32
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +6 -6
- package/dist/_typedoc/Token/Token.types.json +4 -4
- 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 +110 -110
- 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 +2 -2
|
@@ -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_15_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_15_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_15_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_15_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
|
|
@@ -92,28 +92,26 @@ export interface DropdownFlyoutProps extends Omit<DivAttributes, 'onClick'> {
|
|
|
92
92
|
*/
|
|
93
93
|
icon?: DropdownProps['icon'];
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* </CodeBlock>
|
|
100
|
-
* </div>
|
|
95
|
+
* Data of the dropdown options - `Option[]`
|
|
96
|
+
* ```
|
|
97
|
+
* type Option = { label: string; children?: Option[] }
|
|
98
|
+
* ```
|
|
101
99
|
* @since 10.19.0
|
|
102
100
|
*/
|
|
103
101
|
options: DropdownOption[];
|
|
104
102
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
103
|
+
* Callback for click on dropdown option
|
|
104
|
+
* ```
|
|
105
|
+
* (option: Option) => void
|
|
106
|
+
* ```
|
|
109
107
|
* @since 10.19.0
|
|
110
108
|
*/
|
|
111
109
|
onClick?: (option: DropdownOption) => void;
|
|
112
110
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
111
|
+
* Render prop to specify custom dropdown option content
|
|
112
|
+
* ```
|
|
113
|
+
* (option: Option) => ReactNode
|
|
114
|
+
* ```
|
|
117
115
|
* @since 10.19.0
|
|
118
116
|
*/
|
|
119
117
|
optionRenderer?: (option: DropdownOption) => React.ReactNode;
|
|
@@ -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 extends Omit<DivAttributes, 'onClick'> {\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 *
|
|
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 extends Omit<DivAttributes, 'onClick'> {\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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
2
|
var _dropErrorsByReason;
|
|
3
|
-
var _excluded = ["error", "onDismiss", "qa"];
|
|
3
|
+
var _excluded = ["error", "onDismiss", "qa", "fileRejections"];
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -31,6 +31,7 @@ var DropzoneErrorBannerBase = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
|
31
31
|
var error = _ref.error,
|
|
32
32
|
onDismiss = _ref.onDismiss,
|
|
33
33
|
qa = _ref.qa,
|
|
34
|
+
fileRejections = _ref.fileRejections,
|
|
34
35
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
35
36
|
var I18n = useI18nContext();
|
|
36
37
|
var _React$useState = React.useState(false),
|
|
@@ -94,7 +95,7 @@ export function MultipleErrors(props) {
|
|
|
94
95
|
// make error banner accessible as a styled-components selector
|
|
95
96
|
export var DropzoneErrorBanner = /*#__PURE__*/styled(DropzoneErrorBannerBase).withConfig({
|
|
96
97
|
displayName: "DropzoneErrorBanner",
|
|
97
|
-
componentId: "core-
|
|
98
|
+
componentId: "core-12_15_0__sc-l4fojb-0"
|
|
98
99
|
})([""]);
|
|
99
100
|
function DropzoneContainer(_ref3) {
|
|
100
101
|
var active = _ref3.active,
|
|
@@ -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","extendedViewHeightBreakpoint","DropzoneErrorBannerBase","forwardRef","_ref","ref","error","onDismiss","qa","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","_props$fileRejections","_messages","filesByErrorType","fileRejections","reduce","acc","rejection","errors","forEach","dropErrorType","dropErrorsByReason","code","push","file","_defineProperty","fileAmount","minFileSize","maxFileSize","fileType","oneFileAtATime","multipleErrors","messages","count","maxFiles","sizeInMegabytes","getSizeInMB","minSize","maxSize","map","errorType","files","length","key","weight","_ref2","name","DropzoneErrorBanner","withConfig","displayName","componentId","DropzoneContainer","_ref3","active","disabled","getRootProps","rootProps","children","DropzoneContent","_ref4","isIconVisible","contentMessage","DropzoneDefaultMessage","_ref5","open","multiple","errorMessage","Fragment","variant","Infinity","_dropErrorsByReason","Dropzone_","Dropzone","_ref6","forceIconVisibility","contentRenderer","tooltip","rootRef","inputRef","dragError","dropError","dispatchDropError","getInputProps","isDragActive","_ref6$rootProps","_ref6$inputProps","inputProps","className","_React$useState3","_React$useState4","setIsIconVisible","_useFocusWithin","isFocusWithin","containerProps","toggleIconVisibility","useCallback","entries","_ref7","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'\n\nconst extendedViewHeightBreakpoint = 172\n\nconst DropzoneErrorBannerBase = React.forwardRef<\n HTMLDivElement,\n DropzoneErrorBannerProps & DivAttributes\n>(({ error, onDismiss, qa, ...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]: 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(({ name }) => (\n <li key={name}>{name}</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"],"mappings":";;;;;;;;;;;;;;;AAAA,SAASA,GAAG,EAAE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V7G,KAAA,CAAA4C,aAAA,CAACmD,mBAAmB;IAClBpE,EAAE,EAAEA,EAAG;IACPF,KAAK,EAAEuG,SAAU;IACjBlE,cAAc,EAAEA,cAAe;IAC/BpC,SAAS,EAAE,SAAAA,UAAA;MAAA,OAAMuG,iBAAiB,CAAC/G,UAAU,CAACyB,KAAK,CAAC;IAAA;EAAC,CACtD,CACoB,CAAC;AAE5B,CACF,CAAC;AAEDwD,iBAAiB,CAACF,WAAW,GAAG,mBAAmB;AAEnDS,eAAe,CAACT,WAAW,GAAG,iBAAiB;AAE/CsB,SAAS,CAACtB,WAAW,GAAG,UAAU;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMuB,QAAQ,gBAAGxH,KAAK,CAACiK,IAAI,CAAC1C,SAAS,EAAEzH,MAAM,CAAC"}
|
|
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","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","_props$fileRejections","_messages","filesByErrorType","reduce","acc","rejection","errors","forEach","dropErrorType","dropErrorsByReason","code","push","file","_defineProperty","fileAmount","minFileSize","maxFileSize","fileType","oneFileAtATime","multipleErrors","messages","count","maxFiles","sizeInMegabytes","getSizeInMB","minSize","maxSize","map","errorType","files","length","key","weight","_ref2","name","DropzoneErrorBanner","withConfig","displayName","componentId","DropzoneContainer","_ref3","active","disabled","getRootProps","rootProps","children","DropzoneContent","_ref4","isIconVisible","contentMessage","DropzoneDefaultMessage","_ref5","open","multiple","errorMessage","Fragment","variant","Infinity","_dropErrorsByReason","Dropzone_","Dropzone","_ref6","forceIconVisibility","contentRenderer","tooltip","rootRef","inputRef","dragError","dropError","dispatchDropError","getInputProps","isDragActive","_ref6$rootProps","_ref6$inputProps","inputProps","className","_React$useState3","_React$useState4","setIsIconVisible","_useFocusWithin","isFocusWithin","containerProps","toggleIconVisibility","useCallback","entries","_ref7","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'\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]: 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(({ name }) => (\n <li key={name}>{name}</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"],"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,kBAAkB;AACzC,SAASC,MAAM,QAAQ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S,EAAE,SAAAA,UAAA;MAAA,OAAMuG,iBAAiB,CAAC/G,UAAU,CAAC0B,KAAK,CAAC;IAAA;EAAC,CACtD,CACoB,CAAC;AAE5B,CACF,CAAC;AAEDuD,iBAAiB,CAACF,WAAW,GAAG,mBAAmB;AAEnDS,eAAe,CAACT,WAAW,GAAG,iBAAiB;AAE/CsB,SAAS,CAACtB,WAAW,GAAG,UAAU;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMuB,QAAQ,gBAAGxH,KAAK,CAACiK,IAAI,CAAC1C,SAAS,EAAEzH,MAAM,CAAC"}
|
|
@@ -9,15 +9,15 @@ 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_15_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_15_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_15_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_15_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);
|
|
@@ -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_15_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_15_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_15_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_15_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_15_0__sc-by95hy-8"
|
|
66
66
|
})(["height:100%;"]);
|
|
67
67
|
//# sourceMappingURL=Dropzone.styles.js.map
|
|
@@ -12,12 +12,12 @@ export interface DropzoneErrorBannerProps {
|
|
|
12
12
|
error: DropzoneHookState['dropError'];
|
|
13
13
|
/**
|
|
14
14
|
* Rejected files and why they were rejected
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* ```
|
|
16
|
+
* {
|
|
17
17
|
* file: File,
|
|
18
18
|
* errors: FileError[]
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* }[]
|
|
20
|
+
* ```
|
|
21
21
|
* @since 10.19.0
|
|
22
22
|
*/
|
|
23
23
|
fileRejections: DropzoneHookState['fileRejections'];
|
|
@@ -79,7 +79,7 @@ export interface ContainerProps {
|
|
|
79
79
|
export interface ContentProps {
|
|
80
80
|
/**
|
|
81
81
|
* Force icon visibility
|
|
82
|
-
*
|
|
82
|
+
* `NOTICE:` passing `true` or `false`
|
|
83
83
|
* value explicitly will make component ignore resizing.
|
|
84
84
|
* @since 10.19.0
|
|
85
85
|
*/
|
|
@@ -170,17 +170,17 @@ export declare type DropzoneHookState = DropzoneState & {
|
|
|
170
170
|
multiple: boolean;
|
|
171
171
|
/**
|
|
172
172
|
* Error message if dragged files is rejected
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
173
|
+
* ```
|
|
174
|
+
* { type: DropErrorType, title: string, message: string }
|
|
175
|
+
* ```
|
|
176
176
|
* @since 10.19.0
|
|
177
177
|
*/
|
|
178
178
|
dragError: string;
|
|
179
179
|
/**
|
|
180
180
|
* Error message if dropped files is rejected
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
181
|
+
* ```
|
|
182
|
+
* { type: DropErrorType, title: string, message: string }
|
|
183
|
+
* ```
|
|
184
184
|
* @since 10.19.0
|
|
185
185
|
*/
|
|
186
186
|
dropError: DropError;
|
|
@@ -191,8 +191,10 @@ export declare type DropzoneHookState = DropzoneState & {
|
|
|
191
191
|
*/
|
|
192
192
|
disabled: boolean;
|
|
193
193
|
/**
|
|
194
|
-
* Sets
|
|
195
|
-
*
|
|
194
|
+
* Sets `dropError`.
|
|
195
|
+
* ```
|
|
196
|
+
* (error: DropErrorType) => void
|
|
197
|
+
* ```
|
|
196
198
|
* @since 10.19.0
|
|
197
199
|
*/
|
|
198
200
|
dispatchDropError: (error: DropErrorType) => void;
|
|
@@ -233,13 +235,13 @@ export interface DropzoneProps extends DropzoneHookState {
|
|
|
233
235
|
*/
|
|
234
236
|
contentRenderer?: (props: DropzoneContentProps) => React.ReactNode;
|
|
235
237
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
238
|
+
* `NOTICE:`
|
|
239
|
+
*
|
|
240
|
+
* `true` - will make Icon always visible, despite the component height
|
|
241
|
+
*
|
|
242
|
+
* `false` - will make Icon always hide, despite the component height
|
|
243
|
+
*
|
|
244
|
+
* `undefined` - will look on the component height to decide show or hide Icon
|
|
243
245
|
* @since 10.19.0
|
|
244
246
|
*/
|
|
245
247
|
isIconVisible?: boolean;
|
|
@@ -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 *
|
|
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":"AAgBA,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;;AAkEV;AACA;AACA;AACA;AACA"}
|
|
@@ -6,27 +6,27 @@ var emptyStateWidth = 440;
|
|
|
6
6
|
var emptyStateWidthCompact = 352;
|
|
7
7
|
export var StyledSvg = /*#__PURE__*/styled.svg.withConfig({
|
|
8
8
|
displayName: "StyledSvg",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_15_0__sc-1xaoo8n-0"
|
|
10
10
|
})(["width:200px;height:200px;"]);
|
|
11
11
|
export var StyledImage = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledImage",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_15_0__sc-1xaoo8n-1"
|
|
14
14
|
})([""]);
|
|
15
15
|
export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
|
|
16
16
|
displayName: "StyledTitle",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_15_0__sc-1xaoo8n-2"
|
|
18
18
|
})(["margin-top:", "px;text-align:center;color:", ";width:", "px;", ""], spacing.xl, colors.gray15, emptyStateWidth, getTypographyIntent('h2'));
|
|
19
19
|
export var StyledDescription = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledDescription",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_15_0__sc-1xaoo8n-3"
|
|
22
22
|
})(["margin-top:", "px;text-align:center;color:", ";width:", "px;", ""], spacing.lg, colors.gray45, emptyStateWidth, getTypographyIntent('body'));
|
|
23
23
|
export var StyledActions = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
displayName: "StyledActions",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-12_15_0__sc-1xaoo8n-4"
|
|
26
26
|
})(["margin-top:", "px;"], spacing.xl);
|
|
27
27
|
export var StyledEmptyState = /*#__PURE__*/styled.div.withConfig({
|
|
28
28
|
displayName: "StyledEmptyState",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_15_0__sc-1xaoo8n-5"
|
|
30
30
|
})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:", "px;margin-bottom:", "px;", "{> img{max-width:200px;}}", "}"], function (_ref) {
|
|
31
31
|
var $compact = _ref.$compact;
|
|
32
32
|
return $compact ? 0 : 96;
|
|
@@ -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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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_15_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
|