@procore/core-react 12.39.0 → 12.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.d.ts +1 -1
- package/dist/AvatarStack/AvatarStack.js +29 -6
- package/dist/AvatarStack/AvatarStack.js.map +1 -1
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/AvatarStack/AvatarStack.types.d.ts +7 -0
- package/dist/AvatarStack/AvatarStack.types.js.map +1 -1
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +9 -9
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- 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/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +10 -10
- package/dist/Dropzone/Dropzone.styles.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 +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.d.ts +8 -15
- package/dist/FileSelect/FileSelect.js +8 -15
- package/dist/FileSelect/FileSelect.js.map +1 -1
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.d.ts +8 -0
- package/dist/FileSelect/FileTokenList/FileTokenList.js +9 -0
- package/dist/FileSelect/FileTokenList/FileTokenList.js.map +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js.map +1 -1
- 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.js +6 -11
- package/dist/FileToken/FileToken.js.map +1 -1
- package/dist/FileToken/FileToken.styles.d.ts +2 -0
- package/dist/FileToken/FileToken.styles.js +14 -4
- package/dist/FileToken/FileToken.styles.js.map +1 -1
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +13 -13
- 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 +11 -11
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +8 -8
- 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/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.d.ts +1 -2
- package/dist/Panel/Panel.js +27 -49
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.js +13 -13
- package/dist/Panel/Panel.styles.js.map +1 -1
- package/dist/Panel/Panel.types.d.ts +0 -14
- package/dist/Panel/Panel.types.js.map +1 -1
- package/dist/Pill/Pill.styles.js +3 -3
- package/dist/PillSelect/PillSelect.d.ts +2 -1
- package/dist/PillSelect/PillSelect.js +59 -41
- package/dist/PillSelect/PillSelect.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/Section/Section.js +0 -1
- package/dist/Section/Section.js.map +1 -1
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.d.ts +2 -0
- package/dist/Select/Select.js +108 -79
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +8 -8
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +10 -10
- package/dist/SplitViewCard/SplitViewCard.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +38 -38
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/Table/Table.types.d.ts +5 -2
- package/dist/Table/Table.types.js.map +1 -1
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.js +23 -9
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +2 -2
- package/dist/Tabs/Tabs.styles.js +26 -26
- package/dist/Tabs/Tabs.styles.js.map +1 -1
- package/dist/Tabs/Tabs.types.d.ts +6 -0
- package/dist/Tabs/Tabs.types.js.map +1 -1
- 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.js +126 -46
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/Thumbnail.types.d.ts +12 -0
- package/dist/Thumbnail/Thumbnail.types.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.utils.d.ts +2 -0
- package/dist/Thumbnail/Thumbnail.utils.js +6 -0
- package/dist/Thumbnail/Thumbnail.utils.js.map +1 -1
- package/dist/Thumbnail/ThumbnailCaption.js +45 -52
- 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/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.js +3 -1
- package/dist/ToolHeader/ToolHeader.js.map +1 -1
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +3 -3
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/Tree.styles.js +10 -10
- 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 +25 -0
- package/dist/_locales/de-DE.json +2 -1
- package/dist/_locales/en-AU.json +2 -1
- package/dist/_locales/en-CA.json +2 -1
- package/dist/_locales/en-GB.json +2 -1
- package/dist/_locales/en.json +5 -1
- package/dist/_locales/es-ES.json +2 -1
- package/dist/_locales/es.json +2 -1
- package/dist/_locales/fr-CA.json +2 -1
- package/dist/_locales/fr-FR.json +2 -1
- package/dist/_locales/is-IS.json +2 -1
- package/dist/_locales/it-IT.json +2 -1
- package/dist/_locales/ja-JP.json +2 -1
- package/dist/_locales/pl-PL.json +2 -1
- package/dist/_locales/pseudo.json +5 -1
- package/dist/_locales/pt-BR.json +2 -1
- package/dist/_locales/pt-PT.json +4 -3
- package/dist/_locales/th-TH.json +2 -1
- package/dist/_locales/zh-SG.json +2 -1
- package/dist/_locales/zh-TW.json +2 -1
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +34 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +15 -15
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +13 -13
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +31 -31
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.json +3 -3
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +760 -760
- 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 +1 -1
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +77 -77
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +33 -33
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +48 -48
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +33 -33
- 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 +27 -63
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +67 -67
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
- package/dist/_typedoc/Table/Table.types.json +102 -102
- package/dist/_typedoc/Tabs/Tabs.types.json +30 -20
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +43 -43
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
- package/dist/_typedoc/Tile/Tile.types.json +8 -8
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +7 -7
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +8 -8
- package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
- package/dist/_typedoc/Tree/Tree.types.json +88 -88
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/package.json +3 -3
|
@@ -27,35 +27,35 @@ var captionBase = /*#__PURE__*/css(["color:", ";font-size:12px;line-height:16px;
|
|
|
27
27
|
});
|
|
28
28
|
export var StyledMultilineCaption = /*#__PURE__*/styled.div.withConfig({
|
|
29
29
|
displayName: "StyledMultilineCaption",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_41_0__sc-195f70c-0"
|
|
31
31
|
})(["", ";display:flex;word-wrap:break-word;overflow-wrap:break-word;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:", "px;"], captionBase, multilineCaptionMaxHeight);
|
|
32
32
|
export var StyledCaptionText = /*#__PURE__*/styled.span.withConfig({
|
|
33
33
|
displayName: "StyledCaptionText",
|
|
34
|
-
componentId: "core-
|
|
34
|
+
componentId: "core-12_41_0__sc-195f70c-1"
|
|
35
35
|
})(["width:100%;"]);
|
|
36
36
|
export var StyledPlaceholderCaption = /*#__PURE__*/styled.div.withConfig({
|
|
37
37
|
displayName: "StyledPlaceholderCaption",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_41_0__sc-195f70c-2"
|
|
39
39
|
})(["", ""], captionBase);
|
|
40
40
|
export var StyledSingleLineCaption = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledSingleLineCaption",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_41_0__sc-195f70c-3"
|
|
43
43
|
})(["display:flex;", ""], captionBase);
|
|
44
44
|
export var StyledSinglelineCaptionBody = /*#__PURE__*/styled.span.withConfig({
|
|
45
45
|
displayName: "StyledSinglelineCaptionBody",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_41_0__sc-195f70c-4"
|
|
47
47
|
})(["", ""], getEllipsis);
|
|
48
48
|
export var StyledSinglelineCaptionEnding = /*#__PURE__*/styled.span.withConfig({
|
|
49
49
|
displayName: "StyledSinglelineCaptionEnding",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_41_0__sc-195f70c-5"
|
|
51
51
|
})(["max-width:50%;white-space:nowrap;flex-shrink:0;"]);
|
|
52
52
|
export var StyledLabelText = /*#__PURE__*/styled(Typography).withConfig({
|
|
53
53
|
displayName: "StyledLabelText",
|
|
54
|
-
componentId: "core-
|
|
54
|
+
componentId: "core-12_41_0__sc-195f70c-6"
|
|
55
55
|
})(["", ""], getEllipsis());
|
|
56
56
|
export var StyledThumbnailFigCaption = /*#__PURE__*/styled.figcaption.withConfig({
|
|
57
57
|
displayName: "StyledThumbnailFigCaption",
|
|
58
|
-
componentId: "core-
|
|
58
|
+
componentId: "core-12_41_0__sc-195f70c-7"
|
|
59
59
|
})(["", " ", " color:", ";font-weight:", ";text-align:center;width:100%;position:absolute;bottom:0;right:0;left:0;opacity:0.85;height:", "px;padding:", "px ", "px;background-color:", ";"], getTypographyIntent('small'), getEllipsis(), function (_ref5) {
|
|
60
60
|
var _ref5$$color = _ref5.$color,
|
|
61
61
|
$color = _ref5$$color === void 0 ? 'gray15' : _ref5$$color;
|
|
@@ -63,7 +63,7 @@ export var StyledThumbnailFigCaption = /*#__PURE__*/styled.figcaption.withConfig
|
|
|
63
63
|
}, typographyWeights.bold, labelHeight, spacing.sm / 2, spacing.sm, colors.white);
|
|
64
64
|
export var StyledLabel = /*#__PURE__*/styled.div.withConfig({
|
|
65
65
|
displayName: "StyledLabel",
|
|
66
|
-
componentId: "core-
|
|
66
|
+
componentId: "core-12_41_0__sc-195f70c-8"
|
|
67
67
|
})(["display:flex;justify-content:center;position:absolute;bottom:0;right:0;left:0;opacity:0.85;height:", "px;padding:", "px ", "px;font-size:", "px;background-color:", ";"], labelHeight, spacing.sm / 2, spacing.sm, labelFontSize, colors.white);
|
|
68
68
|
var thumbnailBase = /*#__PURE__*/css(["display:flex;justify-content:center;align-items:center;position:relative;overflow:hidden;border:1px solid ", ";border-radius:", "px;margin:0;", " ", " &:focus{", ";}", " ", " ", ""], colors.gray85, borderRadius.md, function (_ref6) {
|
|
69
69
|
var $clickable = _ref6.$clickable;
|
|
@@ -85,7 +85,7 @@ var thumbnailBase = /*#__PURE__*/css(["display:flex;justify-content:center;align
|
|
|
85
85
|
});
|
|
86
86
|
export var StyledTickIcon = /*#__PURE__*/styled.svg.withConfig({
|
|
87
87
|
displayName: "StyledTickIcon",
|
|
88
|
-
componentId: "core-
|
|
88
|
+
componentId: "core-12_41_0__sc-195f70c-9"
|
|
89
89
|
})(["position:absolute;top:", "px;right:", "px;width:", "px;height:", "px;opacity:0;transform:scale(0.75);transition:transform 250ms ease-out,opacity 100ms ease-out;", " ", ""], spacing.sm, spacing.sm, tickSize, tickSize, function (_ref1) {
|
|
90
90
|
var $selected = _ref1.$selected;
|
|
91
91
|
return $selected && css(["opacity:1;transform:scale(1);"]);
|
|
@@ -95,28 +95,28 @@ export var StyledTickIcon = /*#__PURE__*/styled.svg.withConfig({
|
|
|
95
95
|
});
|
|
96
96
|
export var StyledFileIcon = /*#__PURE__*/styled(DocumentIcon).withConfig({
|
|
97
97
|
displayName: "StyledFileIcon",
|
|
98
|
-
componentId: "core-
|
|
98
|
+
componentId: "core-12_41_0__sc-195f70c-10"
|
|
99
99
|
})(["width:36.5%;height:auto;"]);
|
|
100
100
|
export var StyledImageThumbnailPreview = /*#__PURE__*/styled.div.withConfig({
|
|
101
101
|
displayName: "StyledImageThumbnailPreview",
|
|
102
|
-
componentId: "core-
|
|
102
|
+
componentId: "core-12_41_0__sc-195f70c-11"
|
|
103
103
|
})(["width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center;", ""], function (_ref11) {
|
|
104
104
|
var $bgImage = _ref11.$bgImage;
|
|
105
105
|
return css(["background-image:url(", ");"], $bgImage);
|
|
106
106
|
});
|
|
107
107
|
export var StyledImageThumbnailOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
108
108
|
displayName: "StyledImageThumbnailOverlay",
|
|
109
|
-
componentId: "core-
|
|
109
|
+
componentId: "core-12_41_0__sc-195f70c-12"
|
|
110
110
|
})(["display:none;position:absolute;top:0;bottom:0;left:0;right:0;"]);
|
|
111
111
|
var blackOverlay = "\n background-color: ".concat(colors.black, ";\n opacity: 0.2;\n");
|
|
112
112
|
var whiteOverlay = "\n background-color: ".concat(colors.white, ";\n opacity: 0.5;\n");
|
|
113
113
|
export var StyledImageThumbnailImage = /*#__PURE__*/styled.img.withConfig({
|
|
114
114
|
displayName: "StyledImageThumbnailImage",
|
|
115
|
-
componentId: "core-
|
|
115
|
+
componentId: "core-12_41_0__sc-195f70c-13"
|
|
116
116
|
})([""]);
|
|
117
117
|
export var StyledImageThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
118
118
|
displayName: "StyledImageThumbnail",
|
|
119
|
-
componentId: "core-
|
|
119
|
+
componentId: "core-12_41_0__sc-195f70c-14"
|
|
120
120
|
})(["", ";flex-direction:column;", " ", " ", " ", " ", " ", ""], thumbnailBase, function (_ref12) {
|
|
121
121
|
var $disabled = _ref12.$disabled;
|
|
122
122
|
return $disabled && css(["&,&:hover{", "{display:block;", "}}", ",", ",", "{filter:saturate(0);}", "{filter:saturate(0);z-index:-1;}"], StyledImageThumbnailOverlay, whiteOverlay, StyledImageThumbnailPreview, StyledTickIcon, StyledImageThumbnailImage, StyledFileIcon);
|
|
@@ -145,7 +145,7 @@ export var StyledImageThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
|
145
145
|
});
|
|
146
146
|
export var StyledThumbnailWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
147
147
|
displayName: "StyledThumbnailWrapper",
|
|
148
|
-
componentId: "core-
|
|
148
|
+
componentId: "core-12_41_0__sc-195f70c-15"
|
|
149
149
|
})(["display:flex;", " ", ""], function (_ref18) {
|
|
150
150
|
var $size = _ref18.$size;
|
|
151
151
|
return $size === 'lg' ? "\n width: ".concat(thumbnailSizeLg, "px;\n ") : '';
|
|
@@ -156,7 +156,7 @@ export var StyledThumbnailWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
156
156
|
});
|
|
157
157
|
export var StyledPlaceholderThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
158
158
|
displayName: "StyledPlaceholderThumbnail",
|
|
159
|
-
componentId: "core-
|
|
159
|
+
componentId: "core-12_41_0__sc-195f70c-16"
|
|
160
160
|
})(["", " ", " ", " ", " ", ""], thumbnailBase, function (_ref20) {
|
|
161
161
|
var $clickable = _ref20.$clickable;
|
|
162
162
|
return $clickable && css(["&:hover{background-color:", ";}"], colors.gray96);
|
|
@@ -156,6 +156,10 @@ export interface MultilineCaptionProps {
|
|
|
156
156
|
* @since 10.19.0
|
|
157
157
|
*/
|
|
158
158
|
qa: string;
|
|
159
|
+
/**
|
|
160
|
+
* Called when the caption overflow state changes (e.g. when it becomes truncated).
|
|
161
|
+
*/
|
|
162
|
+
onCaptionOverflowChange?: (isOverflowing: boolean) => void;
|
|
159
163
|
}
|
|
160
164
|
export interface SinglelineCaptionProps {
|
|
161
165
|
/**
|
|
@@ -178,6 +182,10 @@ export interface SinglelineCaptionProps {
|
|
|
178
182
|
* @since 10.19.0
|
|
179
183
|
*/
|
|
180
184
|
qa: string;
|
|
185
|
+
/**
|
|
186
|
+
* Called when the caption overflow state changes (e.g. when it becomes truncated).
|
|
187
|
+
*/
|
|
188
|
+
onCaptionOverflowChange?: (isOverflowing: boolean) => void;
|
|
181
189
|
}
|
|
182
190
|
export interface CaptionTooltipProps {
|
|
183
191
|
/**
|
|
@@ -222,6 +230,10 @@ export interface CaptionProps {
|
|
|
222
230
|
* @since 10.19.0
|
|
223
231
|
*/
|
|
224
232
|
qa?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Called when the caption overflow state changes (e.g. when it becomes truncated).
|
|
235
|
+
*/
|
|
236
|
+
onCaptionOverflowChange?: (isOverflowing: boolean) => void;
|
|
225
237
|
}
|
|
226
238
|
export interface LabelProps {
|
|
227
239
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Thumbnail.types.js","names":[],"sources":["../../src/Thumbnail/Thumbnail.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { ReactNode } from 'react'\nimport type { Polymorphic } from '../_utils/polymorphic'\nimport type { AriaLabelled, Props } from '../_utils/types'\nimport type { ThumbnailDocumentIconVariant } from './ThumbnailDocumentIcon'\n\nexport type SizeVariant = 'sm' | 'lg'\n\nexport type LayoutVariant = 'row' | 'column'\n\nexport interface QaTags {\n /**\n * @since 10.19.0\n */\n caption?: string\n}\n\n/**\n * @since 11.6.0\n */\nexport type ThumbnailRoleType = 'checkbox' | 'figure'\n\nexport type ThumbnailRoles = ThumbnailRoleType | undefined\n\nexport interface ThumbnailPolyMap\n extends Record<ThumbnailRoleType, React.ElementType> {\n figure: 'figure'\n checkbox: 'input'\n}\n\n/**\n * @since 11.6.0\n */\nexport type ThumbnailRef<Role extends ThumbnailRoles = undefined> =\n Role extends ThumbnailRoleType\n ? Polymorphic.Ref<ThumbnailPolyMap, Role>\n : React.ComponentPropsWithRef<'div'>['ref']\n\nexport interface BaseThumbnailProps extends Props {\n /**\n * Alt text for the Thumbnail image\n * @since 11.6.0\n */\n alt?: string\n\n /**\n * An image URL or a `File` to generate a preview for\n * @since 10.19.0\n */\n src?: File | string | null\n\n /**\n * Thumbnail size\n * @default 'lg'\n * @since 10.19.0\n */\n size?: SizeVariant\n\n /**\n * Use \"focused\" view\n * @default false\n * @since 10.19.0\n */\n focused?: boolean\n\n /**\n * Use \"selected\" view\n * @default false\n * @since 10.19.0\n */\n selected?: boolean\n\n /**\n * Use \"disabled\" view\n * @default false\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean\n /**\n * @since 10.19.0\n */\n clickable?: boolean\n\n /**\n * Thumbnail caption\n * @default ''\n * @since 10.19.0\n */\n caption?: string\n\n /**\n * Show placeholder for caption if it is empty\n * @default false\n * @since 10.19.0\n */\n hasCaptionPlaceholder?: boolean\n\n /**\n * Unless variant is provided, filename is used\n * to choose a placeholder icon based on extension.\n * E.g. for 'filename=\"panda.png\"', image variant will be used\n * @since 11.7.0\n * */\n filename?: string\n\n /**\n * @since 11.7.0\n */\n variant?: ThumbnailDocumentIconVariant\n\n /**\n * Thumbnail label\n * @default ''\n * @since 10.19.0\n */\n label?: string\n\n /**\n * @since 11.6.0\n */\n tabIndex?: number\n\n /**\n * @since 10.19.0\n */\n qa?: QaTags\n\n /**\n * @since 11.6.0\n */\n onClick?: (e: React.MouseEvent) => void\n}\n\ntype DecorativeThumbnailProps<Role extends ThumbnailRoles = undefined> = {\n role?: Role\n} & BaseThumbnailProps\n\nexport type ThumbnailProps<Role extends ThumbnailRoles = undefined> =\n Role extends 'figure'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'figure',\n never,\n BaseThumbnailProps\n >\n : Role extends 'checkbox'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'checkbox',\n never,\n BaseThumbnailProps & {\n /** onChange from React Aria is fired before onClick */\n onChange?: (isSelected: boolean) => void\n }\n >\n : DecorativeThumbnailProps & { ref?: ThumbnailRef<undefined> }\n\nexport interface FilePreviewProps {\n /**\n * @since 10.19.0\n */\n file: File\n}\nexport interface BasePlaceholderProps extends Omit<BaseThumbnailProps, 'src'> {}\n\ntype DecorativePlaceholderProps<Role extends ThumbnailRoles = undefined> = {\n role?: Role\n} & BasePlaceholderProps\n\nexport type PlaceholderProps<Role extends ThumbnailRoles = undefined> =\n Role extends 'figure'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'figure',\n never,\n AriaLabelled<BasePlaceholderProps>\n >\n : Role extends 'checkbox'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'checkbox',\n never,\n AriaLabelled<BasePlaceholderProps> & {\n /** onChange from React Aria is fired before onClick */\n onChange?: (isSelected: boolean) => void\n }\n >\n : DecorativePlaceholderProps & { ref?: ThumbnailRef<undefined> }\n\nexport interface MultilineCaptionProps {\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n caption: string\n /**\n * @since 10.19.0\n */\n error: boolean\n /**\n * @since 10.19.0\n */\n layout: 'row' | 'column'\n /**\n * @since 10.19.0\n */\n qa: string\n}\n\nexport interface SinglelineCaptionProps {\n /**\n * @since 10.19.0\n */\n caption: string\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n error: boolean\n /**\n * @since 10.19.0\n */\n layout: 'row' | 'column'\n /**\n * @since 10.19.0\n */\n qa: string\n}\n\nexport interface CaptionTooltipProps {\n /**\n * @since 10.19.0\n */\n overlay: string\n /**\n * @since 10.19.0\n */\n isVisible: boolean\n /**\n * @since 10.19.0\n */\n children: ReactNode\n}\n\nexport interface CaptionProps {\n /**\n * @since 10.19.0\n */\n layout: LayoutVariant\n /**\n * @since 10.19.0\n */\n caption: string\n /**\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean\n /**\n * @since 10.19.0\n */\n hasCaptionPlaceholder: boolean\n /**\n * @since 10.19.0\n */\n multiline: boolean\n /**\n * @since 10.19.0\n */\n qa?: string\n}\n\nexport interface LabelProps {\n /**\n * @since 11.6.0\n */\n id?: string\n /**\n * @since 10.19.0\n */\n label: string\n /**\n * @since 10.19.0\n */\n disabled: boolean\n}\n\nexport interface TickIconProps {\n /**\n * @since 10.19.0\n */\n size: SizeVariant\n /**\n * @since 10.19.0\n */\n selected: boolean\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Thumbnail.types.js","names":[],"sources":["../../src/Thumbnail/Thumbnail.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { ReactNode } from 'react'\nimport type { Polymorphic } from '../_utils/polymorphic'\nimport type { AriaLabelled, Props } from '../_utils/types'\nimport type { ThumbnailDocumentIconVariant } from './ThumbnailDocumentIcon'\n\nexport type SizeVariant = 'sm' | 'lg'\n\nexport type LayoutVariant = 'row' | 'column'\n\nexport interface QaTags {\n /**\n * @since 10.19.0\n */\n caption?: string\n}\n\n/**\n * @since 11.6.0\n */\nexport type ThumbnailRoleType = 'checkbox' | 'figure'\n\nexport type ThumbnailRoles = ThumbnailRoleType | undefined\n\nexport interface ThumbnailPolyMap\n extends Record<ThumbnailRoleType, React.ElementType> {\n figure: 'figure'\n checkbox: 'input'\n}\n\n/**\n * @since 11.6.0\n */\nexport type ThumbnailRef<Role extends ThumbnailRoles = undefined> =\n Role extends ThumbnailRoleType\n ? Polymorphic.Ref<ThumbnailPolyMap, Role>\n : React.ComponentPropsWithRef<'div'>['ref']\n\nexport interface BaseThumbnailProps extends Props {\n /**\n * Alt text for the Thumbnail image\n * @since 11.6.0\n */\n alt?: string\n\n /**\n * An image URL or a `File` to generate a preview for\n * @since 10.19.0\n */\n src?: File | string | null\n\n /**\n * Thumbnail size\n * @default 'lg'\n * @since 10.19.0\n */\n size?: SizeVariant\n\n /**\n * Use \"focused\" view\n * @default false\n * @since 10.19.0\n */\n focused?: boolean\n\n /**\n * Use \"selected\" view\n * @default false\n * @since 10.19.0\n */\n selected?: boolean\n\n /**\n * Use \"disabled\" view\n * @default false\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean\n /**\n * @since 10.19.0\n */\n clickable?: boolean\n\n /**\n * Thumbnail caption\n * @default ''\n * @since 10.19.0\n */\n caption?: string\n\n /**\n * Show placeholder for caption if it is empty\n * @default false\n * @since 10.19.0\n */\n hasCaptionPlaceholder?: boolean\n\n /**\n * Unless variant is provided, filename is used\n * to choose a placeholder icon based on extension.\n * E.g. for 'filename=\"panda.png\"', image variant will be used\n * @since 11.7.0\n * */\n filename?: string\n\n /**\n * @since 11.7.0\n */\n variant?: ThumbnailDocumentIconVariant\n\n /**\n * Thumbnail label\n * @default ''\n * @since 10.19.0\n */\n label?: string\n\n /**\n * @since 11.6.0\n */\n tabIndex?: number\n\n /**\n * @since 10.19.0\n */\n qa?: QaTags\n\n /**\n * @since 11.6.0\n */\n onClick?: (e: React.MouseEvent) => void\n}\n\ntype DecorativeThumbnailProps<Role extends ThumbnailRoles = undefined> = {\n role?: Role\n} & BaseThumbnailProps\n\nexport type ThumbnailProps<Role extends ThumbnailRoles = undefined> =\n Role extends 'figure'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'figure',\n never,\n BaseThumbnailProps\n >\n : Role extends 'checkbox'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'checkbox',\n never,\n BaseThumbnailProps & {\n /** onChange from React Aria is fired before onClick */\n onChange?: (isSelected: boolean) => void\n }\n >\n : DecorativeThumbnailProps & { ref?: ThumbnailRef<undefined> }\n\nexport interface FilePreviewProps {\n /**\n * @since 10.19.0\n */\n file: File\n}\nexport interface BasePlaceholderProps extends Omit<BaseThumbnailProps, 'src'> {}\n\ntype DecorativePlaceholderProps<Role extends ThumbnailRoles = undefined> = {\n role?: Role\n} & BasePlaceholderProps\n\nexport type PlaceholderProps<Role extends ThumbnailRoles = undefined> =\n Role extends 'figure'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'figure',\n never,\n AriaLabelled<BasePlaceholderProps>\n >\n : Role extends 'checkbox'\n ? Polymorphic.ComponentPropsWithRef<\n ThumbnailPolyMap,\n 'checkbox',\n never,\n AriaLabelled<BasePlaceholderProps> & {\n /** onChange from React Aria is fired before onClick */\n onChange?: (isSelected: boolean) => void\n }\n >\n : DecorativePlaceholderProps & { ref?: ThumbnailRef<undefined> }\n\nexport interface MultilineCaptionProps {\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n caption: string\n /**\n * @since 10.19.0\n */\n error: boolean\n /**\n * @since 10.19.0\n */\n layout: 'row' | 'column'\n /**\n * @since 10.19.0\n */\n qa: string\n /**\n * Called when the caption overflow state changes (e.g. when it becomes truncated).\n */\n onCaptionOverflowChange?: (isOverflowing: boolean) => void\n}\n\nexport interface SinglelineCaptionProps {\n /**\n * @since 10.19.0\n */\n caption: string\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n error: boolean\n /**\n * @since 10.19.0\n */\n layout: 'row' | 'column'\n /**\n * @since 10.19.0\n */\n qa: string\n /**\n * Called when the caption overflow state changes (e.g. when it becomes truncated).\n */\n onCaptionOverflowChange?: (isOverflowing: boolean) => void\n}\n\nexport interface CaptionTooltipProps {\n /**\n * @since 10.19.0\n */\n overlay: string\n /**\n * @since 10.19.0\n */\n isVisible: boolean\n /**\n * @since 10.19.0\n */\n children: ReactNode\n}\n\nexport interface CaptionProps {\n /**\n * @since 10.19.0\n */\n layout: LayoutVariant\n /**\n * @since 10.19.0\n */\n caption: string\n /**\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean\n /**\n * @since 10.19.0\n */\n hasCaptionPlaceholder: boolean\n /**\n * @since 10.19.0\n */\n multiline: boolean\n /**\n * @since 10.19.0\n */\n qa?: string\n /**\n * Called when the caption overflow state changes (e.g. when it becomes truncated).\n */\n onCaptionOverflowChange?: (isOverflowing: boolean) => void\n}\n\nexport interface LabelProps {\n /**\n * @since 11.6.0\n */\n id?: string\n /**\n * @since 10.19.0\n */\n label: string\n /**\n * @since 10.19.0\n */\n disabled: boolean\n}\n\nexport interface TickIconProps {\n /**\n * @since 10.19.0\n */\n size: SizeVariant\n /**\n * @since 10.19.0\n */\n selected: boolean\n}\n"],"mappings":""}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { I18njs } from '@procore/core-i18n-js';
|
|
1
2
|
import type { ThumbnailDocumentIconVariant } from './ThumbnailDocumentIcon';
|
|
2
3
|
export declare function getIsFilePreviewableAsImage(src: File | string | null | undefined): boolean;
|
|
3
4
|
export declare function getThumbnailVariantForFilename(filename: string): ThumbnailDocumentIconVariant;
|
|
5
|
+
export declare function getThumbnailAriaLabel(i18n: I18njs, label?: string, caption?: string): string | undefined;
|
|
@@ -49,4 +49,10 @@ export function getThumbnailVariantForFilename(filename) {
|
|
|
49
49
|
return defaultUnknownName;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
export function getThumbnailAriaLabel(i18n, label, caption) {
|
|
53
|
+
var parts = [];
|
|
54
|
+
if (label) parts.push("".concat(i18n.t('core.thumbnail.aria-label.label'), ": ").concat(label));
|
|
55
|
+
if (caption) parts.push("".concat(i18n.t('core.thumbnail.aria-label.caption'), ": ").concat(caption));
|
|
56
|
+
return parts.length > 0 ? parts.join('. ') : undefined;
|
|
57
|
+
}
|
|
52
58
|
//# sourceMappingURL=Thumbnail.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Thumbnail.utils.js","names":["getFileExtension","getIsFilePreviewableAsImage","src","File","type","startsWith","extensions","_defineProperty","image","drawing","email","gantt","zip","xml","word","ini","mov","pdf","powerpoint","excel","extensionsByVariant","Object","entries","variantByExtension","reduce","acc","_ref","_ref2","_slicedToArray","exts","forEach","ext","getThumbnailVariantForFilename","filename","defaultUnknownName","_unused"],"sources":["../../src/Thumbnail/Thumbnail.utils.ts"],"sourcesContent":["import { getFileExtension } from '../_utils/filename'\nimport type { ThumbnailDocumentIconVariant } from './ThumbnailDocumentIcon'\n\nexport function getIsFilePreviewableAsImage(\n src: File | string | null | undefined\n) {\n return (\n src instanceof File &&\n src.type.startsWith('image/') &&\n // not allow previewing vendor image mime types, such as \"image/vnd.adobe.photoshop\"\n !src.type.startsWith('image/vnd.') &&\n // not allow previewing .tiff images, as a not browser-compatible format\n src.type !== 'image/tiff'\n )\n}\n\nconst extensions: { [k in ThumbnailDocumentIconVariant]?: string[] } = {\n image: ['png', 'jpg', 'jpeg', 'gif', 'psd', 'tiff', 'tif', 'bmp'],\n drawing: ['cad', 'dwg', 'dwf', 'dwfx'],\n email: ['msg', 'eml'],\n gantt: ['mpp', 'p6', 'xer'],\n zip: ['zip', 'rar', '7zip'],\n xml: ['rtf', 'txt'],\n word: ['doc', 'docx'],\n ini: ['ini', 'xml', 'exe'],\n mov: ['mov', 'avi'],\n pdf: ['pdf'],\n powerpoint: ['ppt', 'pptx'],\n excel: ['csv', 'xls', 'xlsx'],\n ['3d']: [\n 'stl',\n 'obj',\n 'ma',\n 'fbx',\n 'dae',\n '3ds',\n 'iges',\n 'step',\n 'wrl',\n 'rvt',\n 'ifc',\n 'nwc',\n 'nwd',\n 'nwf',\n ],\n unknown: [],\n}\n\nconst extensionsByVariant = Object.entries(extensions) as [\n ThumbnailDocumentIconVariant,\n string[]\n][]\n\nconst variantByExtension = extensionsByVariant.reduce((acc, [type, exts]) => {\n exts.forEach((ext) => {\n acc[ext] = type\n })\n return acc\n}, {} as Record<string, ThumbnailDocumentIconVariant>)\n\nexport function getThumbnailVariantForFilename(\n filename: string\n): ThumbnailDocumentIconVariant {\n const defaultUnknownName = 'unknown'\n\n try {\n const ext = getFileExtension(filename)\n return ext\n ? variantByExtension[ext] || defaultUnknownName\n : defaultUnknownName\n } catch {\n return defaultUnknownName\n }\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Thumbnail.utils.js","names":["getFileExtension","getIsFilePreviewableAsImage","src","File","type","startsWith","extensions","_defineProperty","image","drawing","email","gantt","zip","xml","word","ini","mov","pdf","powerpoint","excel","extensionsByVariant","Object","entries","variantByExtension","reduce","acc","_ref","_ref2","_slicedToArray","exts","forEach","ext","getThumbnailVariantForFilename","filename","defaultUnknownName","_unused","getThumbnailAriaLabel","i18n","label","caption","parts","push","concat","t","length","join","undefined"],"sources":["../../src/Thumbnail/Thumbnail.utils.ts"],"sourcesContent":["import type { I18njs } from '@procore/core-i18n-js'\nimport { getFileExtension } from '../_utils/filename'\nimport type { ThumbnailDocumentIconVariant } from './ThumbnailDocumentIcon'\n\nexport function getIsFilePreviewableAsImage(\n src: File | string | null | undefined\n) {\n return (\n src instanceof File &&\n src.type.startsWith('image/') &&\n // not allow previewing vendor image mime types, such as \"image/vnd.adobe.photoshop\"\n !src.type.startsWith('image/vnd.') &&\n // not allow previewing .tiff images, as a not browser-compatible format\n src.type !== 'image/tiff'\n )\n}\n\nconst extensions: { [k in ThumbnailDocumentIconVariant]?: string[] } = {\n image: ['png', 'jpg', 'jpeg', 'gif', 'psd', 'tiff', 'tif', 'bmp'],\n drawing: ['cad', 'dwg', 'dwf', 'dwfx'],\n email: ['msg', 'eml'],\n gantt: ['mpp', 'p6', 'xer'],\n zip: ['zip', 'rar', '7zip'],\n xml: ['rtf', 'txt'],\n word: ['doc', 'docx'],\n ini: ['ini', 'xml', 'exe'],\n mov: ['mov', 'avi'],\n pdf: ['pdf'],\n powerpoint: ['ppt', 'pptx'],\n excel: ['csv', 'xls', 'xlsx'],\n ['3d']: [\n 'stl',\n 'obj',\n 'ma',\n 'fbx',\n 'dae',\n '3ds',\n 'iges',\n 'step',\n 'wrl',\n 'rvt',\n 'ifc',\n 'nwc',\n 'nwd',\n 'nwf',\n ],\n unknown: [],\n}\n\nconst extensionsByVariant = Object.entries(extensions) as [\n ThumbnailDocumentIconVariant,\n string[]\n][]\n\nconst variantByExtension = extensionsByVariant.reduce((acc, [type, exts]) => {\n exts.forEach((ext) => {\n acc[ext] = type\n })\n return acc\n}, {} as Record<string, ThumbnailDocumentIconVariant>)\n\nexport function getThumbnailVariantForFilename(\n filename: string\n): ThumbnailDocumentIconVariant {\n const defaultUnknownName = 'unknown'\n\n try {\n const ext = getFileExtension(filename)\n return ext\n ? variantByExtension[ext] || defaultUnknownName\n : defaultUnknownName\n } catch {\n return defaultUnknownName\n }\n}\n\nexport function getThumbnailAriaLabel(\n i18n: I18njs,\n label?: string,\n caption?: string\n): string | undefined {\n const parts: string[] = []\n if (label)\n parts.push(`${i18n.t('core.thumbnail.aria-label.label')}: ${label}`)\n if (caption)\n parts.push(`${i18n.t('core.thumbnail.aria-label.caption')}: ${caption}`)\n return parts.length > 0 ? parts.join('. ') : undefined\n}\n"],"mappings":";;;;;;;;;;AACA,SAASA,gBAAgB,QAAQ,oBAAoB;AAGrD,OAAO,SAASC,2BAA2BA,CACzCC,GAAqC,EACrC;EACA,OACEA,GAAG,YAAYC,IAAI,IACnBD,GAAG,CAACE,IAAI,CAACC,UAAU,CAAC,QAAQ,CAAC;EAC7B;EACA,CAACH,GAAG,CAACE,IAAI,CAACC,UAAU,CAAC,YAAY,CAAC;EAClC;EACAH,GAAG,CAACE,IAAI,KAAK,YAAY;AAE7B;AAEA,IAAME,UAA8D,GAAAC,eAAA,CAAAA,eAAA;EAClEC,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;EACjEC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;EACtCC,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;EACrBC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;EAC3BC,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;EAC3BC,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;EACnBC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;EACrBC,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;EAC1BC,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;EACnBC,GAAG,EAAE,CAAC,KAAK,CAAC;EACZC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;EAC3BC,KAAK,EAAE,CAAC,KAAK,E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AK,CAACC,IAAI,IAAAC,MAAA,CAAIL,IAAI,CAACM,CAAC,CAAC,mCAAmC,CAAC,QAAAD,MAAA,CAAKH,OAAO,CAAE,CAAC;EAC1E,OAAOC,KAAK,CAACI,MAAM,GAAG,CAAC,GAAGJ,KAAK,CAACK,IAAI,CAAC,IAAI,CAAC,GAAGC,SAAS;AACxD"}
|
|
@@ -1,53 +1,44 @@
|
|
|
1
|
-
var _excluded = ["disabled", "caption", "error", "layout", "qa"],
|
|
2
|
-
_excluded2 = ["caption", "error", "disabled", "layout", "qa"],
|
|
1
|
+
var _excluded = ["disabled", "caption", "error", "layout", "qa", "onCaptionOverflowChange"],
|
|
2
|
+
_excluded2 = ["caption", "error", "disabled", "layout", "qa", "onCaptionOverflowChange"],
|
|
3
3
|
_excluded3 = ["layout", "disabled", "error", "caption", "hasCaptionPlaceholder", "multiline", "qa"];
|
|
4
4
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
5
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
6
6
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { Tooltip } from '../Tooltip';
|
|
7
|
+
import React, { useEffect } from 'react';
|
|
9
8
|
import { useOverflowObserver } from '../_hooks/OverflowObserver';
|
|
10
9
|
import { parseFilename } from '../_utils/filename';
|
|
11
10
|
import { StyledCaptionText, StyledMultilineCaption, StyledPlaceholderCaption, StyledSingleLineCaption, StyledSinglelineCaptionBody, StyledSinglelineCaptionEnding } from './Thumbnail.styles';
|
|
12
|
-
function
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, children);
|
|
21
|
-
}
|
|
22
|
-
function MultilineCaption(_ref2) {
|
|
23
|
-
var disabled = _ref2.disabled,
|
|
24
|
-
caption = _ref2.caption,
|
|
25
|
-
error = _ref2.error,
|
|
26
|
-
layout = _ref2.layout,
|
|
27
|
-
qa = _ref2.qa,
|
|
28
|
-
props = _objectWithoutProperties(_ref2, _excluded);
|
|
11
|
+
function MultilineCaption(_ref) {
|
|
12
|
+
var disabled = _ref.disabled,
|
|
13
|
+
caption = _ref.caption,
|
|
14
|
+
error = _ref.error,
|
|
15
|
+
layout = _ref.layout,
|
|
16
|
+
qa = _ref.qa,
|
|
17
|
+
onCaptionOverflowChange = _ref.onCaptionOverflowChange,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
19
|
var _useOverflowObserver = useOverflowObserver(),
|
|
30
20
|
ref = _useOverflowObserver.ref,
|
|
31
21
|
isOverflowing = _useOverflowObserver.isOverflowing;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
useEffect(function () {
|
|
23
|
+
onCaptionOverflowChange === null || onCaptionOverflowChange === void 0 ? void 0 : onCaptionOverflowChange(isOverflowing);
|
|
24
|
+
}, [isOverflowing, onCaptionOverflowChange]);
|
|
25
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
36
26
|
"data-qa": qa
|
|
37
27
|
}, /*#__PURE__*/React.createElement(StyledMultilineCaption, _extends({
|
|
38
28
|
ref: ref,
|
|
39
29
|
$disabled: disabled,
|
|
40
30
|
$error: error,
|
|
41
31
|
$layout: layout
|
|
42
|
-
}, props), /*#__PURE__*/React.createElement(StyledCaptionText, null, caption)))
|
|
32
|
+
}, props), /*#__PURE__*/React.createElement(StyledCaptionText, null, caption)));
|
|
43
33
|
}
|
|
44
|
-
function SinglelineCaption(
|
|
45
|
-
var caption =
|
|
46
|
-
error =
|
|
47
|
-
disabled =
|
|
48
|
-
layout =
|
|
49
|
-
qa =
|
|
50
|
-
|
|
34
|
+
function SinglelineCaption(_ref2) {
|
|
35
|
+
var caption = _ref2.caption,
|
|
36
|
+
error = _ref2.error,
|
|
37
|
+
disabled = _ref2.disabled,
|
|
38
|
+
layout = _ref2.layout,
|
|
39
|
+
qa = _ref2.qa,
|
|
40
|
+
onCaptionOverflowChange = _ref2.onCaptionOverflowChange,
|
|
41
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
51
42
|
var _useOverflowObserver2 = useOverflowObserver(),
|
|
52
43
|
ref = _useOverflowObserver2.ref,
|
|
53
44
|
isOverflowing = _useOverflowObserver2.isOverflowing;
|
|
@@ -55,30 +46,30 @@ function SinglelineCaption(_ref3) {
|
|
|
55
46
|
filename = _parseFilename.filename,
|
|
56
47
|
extension = _parseFilename.extension,
|
|
57
48
|
isFilename = _parseFilename.isFilename;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
onCaptionOverflowChange === null || onCaptionOverflowChange === void 0 ? void 0 : onCaptionOverflowChange(isOverflowing);
|
|
51
|
+
}, [isOverflowing, onCaptionOverflowChange]);
|
|
52
|
+
return /*#__PURE__*/React.createElement(StyledSingleLineCaption, _extends({
|
|
62
53
|
$error: error,
|
|
63
54
|
$disabled: disabled,
|
|
64
55
|
$layout: layout,
|
|
65
56
|
"data-qa": qa
|
|
66
57
|
}, props), /*#__PURE__*/React.createElement(StyledSinglelineCaptionBody, {
|
|
67
58
|
ref: ref
|
|
68
|
-
}, isFilename ? "".concat(filename, ".") : caption), isFilename && /*#__PURE__*/React.createElement(StyledSinglelineCaptionEnding, null, extension))
|
|
59
|
+
}, isFilename ? "".concat(filename, ".") : caption), isFilename && /*#__PURE__*/React.createElement(StyledSinglelineCaptionEnding, null, extension));
|
|
69
60
|
}
|
|
70
|
-
export function ThumbnailCaption(
|
|
71
|
-
var layout =
|
|
72
|
-
|
|
73
|
-
disabled =
|
|
74
|
-
|
|
75
|
-
error =
|
|
76
|
-
caption =
|
|
77
|
-
hasCaptionPlaceholder =
|
|
78
|
-
multiline =
|
|
79
|
-
|
|
80
|
-
qa =
|
|
81
|
-
props = _objectWithoutProperties(
|
|
61
|
+
export function ThumbnailCaption(_ref3) {
|
|
62
|
+
var layout = _ref3.layout,
|
|
63
|
+
_ref3$disabled = _ref3.disabled,
|
|
64
|
+
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
|
|
65
|
+
_ref3$error = _ref3.error,
|
|
66
|
+
error = _ref3$error === void 0 ? false : _ref3$error,
|
|
67
|
+
caption = _ref3.caption,
|
|
68
|
+
hasCaptionPlaceholder = _ref3.hasCaptionPlaceholder,
|
|
69
|
+
multiline = _ref3.multiline,
|
|
70
|
+
_ref3$qa = _ref3.qa,
|
|
71
|
+
qa = _ref3$qa === void 0 ? '' : _ref3$qa,
|
|
72
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
82
73
|
if (!caption) {
|
|
83
74
|
var captionPlaceholder = hasCaptionPlaceholder && '- -';
|
|
84
75
|
if (captionPlaceholder) {
|
|
@@ -97,7 +88,8 @@ export function ThumbnailCaption(_ref4) {
|
|
|
97
88
|
caption: caption,
|
|
98
89
|
error: error,
|
|
99
90
|
layout: layout,
|
|
100
|
-
qa: qa
|
|
91
|
+
qa: qa,
|
|
92
|
+
onCaptionOverflowChange: props.onCaptionOverflowChange
|
|
101
93
|
}, props));
|
|
102
94
|
}
|
|
103
95
|
return /*#__PURE__*/React.createElement(SinglelineCaption, _extends({
|
|
@@ -105,7 +97,8 @@ export function ThumbnailCaption(_ref4) {
|
|
|
105
97
|
disabled: disabled,
|
|
106
98
|
error: error,
|
|
107
99
|
layout: layout,
|
|
108
|
-
qa: qa
|
|
100
|
+
qa: qa,
|
|
101
|
+
onCaptionOverflowChange: props.onCaptionOverflowChange
|
|
109
102
|
}, props));
|
|
110
103
|
}
|
|
111
104
|
//# sourceMappingURL=ThumbnailCaption.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThumbnailCaption.js","names":["React","
|
|
1
|
+
{"version":3,"file":"ThumbnailCaption.js","names":["React","useEffect","useOverflowObserver","parseFilename","StyledCaptionText","StyledMultilineCaption","StyledPlaceholderCaption","StyledSingleLineCaption","StyledSinglelineCaptionBody","StyledSinglelineCaptionEnding","MultilineCaption","_ref","disabled","caption","error","layout","qa","onCaptionOverflowChange","props","_objectWithoutProperties","_excluded","_useOverflowObserver","ref","isOverflowing","createElement","_extends","$disabled","$error","$layout","SinglelineCaption","_ref2","_excluded2","_useOverflowObserver2","_parseFilename","filename","extension","isFilename","concat","ThumbnailCaption","_ref3","_ref3$disabled","_ref3$error","hasCaptionPlaceholder","multiline","_ref3$qa","_excluded3","captionPlaceholder"],"sources":["../../src/Thumbnail/ThumbnailCaption.tsx"],"sourcesContent":["import React, { useEffect } from 'react'\nimport { useOverflowObserver } from '../_hooks/OverflowObserver'\nimport { parseFilename } from '../_utils/filename'\nimport type { Props } from '../_utils/types'\nimport {\n StyledCaptionText,\n StyledMultilineCaption,\n StyledPlaceholderCaption,\n StyledSingleLineCaption,\n StyledSinglelineCaptionBody,\n StyledSinglelineCaptionEnding,\n} from './Thumbnail.styles'\nimport type {\n CaptionProps,\n MultilineCaptionProps,\n SinglelineCaptionProps,\n} from './Thumbnail.types'\n\nfunction MultilineCaption({\n disabled,\n caption,\n error,\n layout,\n qa,\n onCaptionOverflowChange,\n ...props\n}: MultilineCaptionProps & Props) {\n const { ref, isOverflowing } = useOverflowObserver()\n\n useEffect(() => {\n onCaptionOverflowChange?.(isOverflowing)\n }, [isOverflowing, onCaptionOverflowChange])\n\n return (\n <span data-qa={qa}>\n <StyledMultilineCaption\n ref={ref}\n $disabled={disabled}\n $error={error}\n $layout={layout}\n {...props}\n >\n <StyledCaptionText>{caption}</StyledCaptionText>\n </StyledMultilineCaption>\n </span>\n )\n}\n\nfunction SinglelineCaption({\n caption,\n error,\n disabled,\n layout,\n qa,\n onCaptionOverflowChange,\n ...props\n}: SinglelineCaptionProps & Props) {\n const { ref, isOverflowing } = useOverflowObserver()\n const { filename, extension, isFilename } = parseFilename(caption)\n\n useEffect(() => {\n onCaptionOverflowChange?.(isOverflowing)\n }, [isOverflowing, onCaptionOverflowChange])\n\n return (\n <StyledSingleLineCaption\n $error={error}\n $disabled={disabled}\n $layout={layout}\n data-qa={qa}\n {...props}\n >\n <StyledSinglelineCaptionBody ref={ref}>\n {isFilename ? `${filename}.` : caption}\n </StyledSinglelineCaptionBody>\n {isFilename && (\n <StyledSinglelineCaptionEnding>\n {extension}\n </StyledSinglelineCaptionEnding>\n )}\n </StyledSingleLineCaption>\n )\n}\n\nexport function ThumbnailCaption({\n layout,\n disabled = false,\n error = false,\n caption,\n hasCaptionPlaceholder,\n multiline,\n qa = '',\n ...props\n}: CaptionProps) {\n if (!caption) {\n const captionPlaceholder = hasCaptionPlaceholder && '- -'\n\n if (captionPlaceholder) {\n return (\n <StyledPlaceholderCaption\n $disabled={disabled}\n $error={error}\n $layout={layout}\n data-qa={qa}\n >\n <StyledCaptionText>{captionPlaceholder}</StyledCaptionText>\n </StyledPlaceholderCaption>\n )\n }\n\n return null\n }\n\n if (multiline) {\n return (\n <MultilineCaption\n disabled={disabled}\n caption={caption}\n error={error}\n layout={layout}\n qa={qa}\n onCaptionOverflowChange={props.onCaptionOverflowChange}\n {...props}\n />\n )\n }\n\n return (\n <SinglelineCaption\n caption={caption}\n disabled={disabled}\n error={error}\n layout={layout}\n qa={qa}\n onCaptionOverflowChange={props.onCaptionOverflowChange}\n {...props}\n />\n )\n}\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,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MAAM,EAAEA,MAAO;IACfC,EAAE,EAAEA,EAAG;IACPC,uBAAuB,EAAEC,KAAK,CAACD;EAAwB,GACnDC,KAAK,CACV,CAAC;AAEN"}
|
|
@@ -7,31 +7,31 @@ import { getEllipsis } from '../_styles/mixins';
|
|
|
7
7
|
import { spacing } from '../_styles/spacing';
|
|
8
8
|
export var StyledCheckbox = /*#__PURE__*/styled(Checkbox).withConfig({
|
|
9
9
|
displayName: "StyledCheckbox",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_41_0__sc-1inrbm9-0"
|
|
11
11
|
})(["input{z-index:2;}"]);
|
|
12
12
|
export var StyledGroupCell = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "StyledGroupCell",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_41_0__sc-1inrbm9-1"
|
|
15
15
|
})(["display:flex;align-items:flex-end;padding-bottom:", "px;"], spacing.md);
|
|
16
16
|
export var StyledThumbnail = /*#__PURE__*/styled(Thumbnail).withConfig({
|
|
17
17
|
displayName: "StyledThumbnail",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_41_0__sc-1inrbm9-2"
|
|
19
19
|
})(["display:inline-flex;&:focus{outline:none;}"]);
|
|
20
20
|
// VariableSizeGrid has provided width and height as inline style, so to make it flexible and support responsive !important was added
|
|
21
21
|
export var StyledVariableSizeGrid = /*#__PURE__*/styled(VariableSizeGrid).withConfig({
|
|
22
22
|
displayName: "StyledVariableSizeGrid",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_41_0__sc-1inrbm9-3"
|
|
24
24
|
})(["height:100% !important;& > div{width:100% !important;}"]);
|
|
25
25
|
export var StyledGroupTitle = /*#__PURE__*/styled(Typography).withConfig({
|
|
26
26
|
displayName: "StyledGroupTitle",
|
|
27
|
-
componentId: "core-
|
|
27
|
+
componentId: "core-12_41_0__sc-1inrbm9-4"
|
|
28
28
|
})(["", ""], getEllipsis);
|
|
29
29
|
export var StyledSpinnerWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
30
30
|
displayName: "StyledSpinnerWrapper",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_41_0__sc-1inrbm9-5"
|
|
32
32
|
})(["display:flex;justify-content:center;align-items:center;width:100%;height:100%;"]);
|
|
33
33
|
export var StyledThumbnailGrid = /*#__PURE__*/styled.div.withConfig({
|
|
34
34
|
displayName: "StyledThumbnailGrid",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_41_0__sc-1inrbm9-6"
|
|
36
36
|
})(["display:flex;flex-wrap:wrap;outline:none;"]);
|
|
37
37
|
//# sourceMappingURL=ThumbnailGrid.styles.js.map
|
|
@@ -9,19 +9,19 @@ import { colors } from '../_styles/colors';
|
|
|
9
9
|
import { spacing } from '../_styles/spacing';
|
|
10
10
|
export var StyledTieredSelect = /*#__PURE__*/styled(MenuImperative).withConfig({
|
|
11
11
|
displayName: "StyledTieredSelect",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_41_0__sc-e1ql06-0"
|
|
13
13
|
})(["align-items:stretch;max-height:40vh;"]);
|
|
14
14
|
export var StyledTieredSelectIcon = /*#__PURE__*/styled(Flex).withConfig({
|
|
15
15
|
displayName: "StyledTieredSelectIcon",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_41_0__sc-e1ql06-1"
|
|
17
17
|
})(["height:24px;width:24px;"]);
|
|
18
18
|
export var StyledTieredSelectArrowButton = /*#__PURE__*/styled(Button).withConfig({
|
|
19
19
|
displayName: "StyledTieredSelectArrowButton",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_41_0__sc-e1ql06-2"
|
|
21
21
|
})(["border:1px solid transparent;"]);
|
|
22
22
|
export var StyledTieredSelectBreadcrumbs = /*#__PURE__*/styled(Breadcrumbs).withConfig({
|
|
23
23
|
displayName: "StyledTieredSelectBreadcrumbs",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_41_0__sc-e1ql06-3"
|
|
25
25
|
})(["background-color:", ";flex-wrap:wrap;margin-top:", "px;max-height:68px;overflow-y:auto;padding:", "px ", "px;", ""], colors.gray96, spacing.sm, spacing.xs, spacing.md, function (_ref) {
|
|
26
26
|
var $nonInteractive = _ref.$nonInteractive;
|
|
27
27
|
if ($nonInteractive) {
|
|
@@ -30,22 +30,22 @@ export var StyledTieredSelectBreadcrumbs = /*#__PURE__*/styled(Breadcrumbs).with
|
|
|
30
30
|
});
|
|
31
31
|
export var StyledTieredSelectHome = /*#__PURE__*/styled(Flex).withConfig({
|
|
32
32
|
displayName: "StyledTieredSelectHome",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-12_41_0__sc-e1ql06-4"
|
|
34
34
|
})(["height:20px;"]);
|
|
35
35
|
export var StyledTieredSelectOption = /*#__PURE__*/styled(MenuImperative.Item).withConfig({
|
|
36
36
|
displayName: "StyledTieredSelectOption",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-12_41_0__sc-e1ql06-5"
|
|
38
38
|
})(["align-items:center;display:flex;justify-content:space-between;padding:2px ", "px;"], spacing.lg);
|
|
39
39
|
export var StyledTieredSelectLoadingMore = /*#__PURE__*/styled(Flex).withConfig({
|
|
40
40
|
displayName: "StyledTieredSelectLoadingMore",
|
|
41
|
-
componentId: "core-
|
|
41
|
+
componentId: "core-12_41_0__sc-e1ql06-6"
|
|
42
42
|
})(["align-items:center;justify-content:center;padding:", "px ", "px 0px ", "px;"], spacing.xs, spacing.lg, spacing.lg);
|
|
43
43
|
export var StyledTieredSelectOverlay = /*#__PURE__*/styled(Card).withConfig({
|
|
44
44
|
displayName: "StyledTieredSelectOverlay",
|
|
45
|
-
componentId: "core-
|
|
45
|
+
componentId: "core-12_41_0__sc-e1ql06-7"
|
|
46
46
|
})(["max-width:248px;min-width:inherit;"]);
|
|
47
47
|
export var StyledTieredSelectSpinnerOverlay = /*#__PURE__*/styled(Spinner).withConfig({
|
|
48
48
|
displayName: "StyledTieredSelectSpinnerOverlay",
|
|
49
|
-
componentId: "core-
|
|
49
|
+
componentId: "core-12_41_0__sc-e1ql06-8"
|
|
50
50
|
})(["min-height:auto;"]);
|
|
51
51
|
//# sourceMappingURL=TieredSelect.styles.js.map
|
package/dist/Tile/Tile.styles.js
CHANGED
|
@@ -44,7 +44,7 @@ var getTileStyles = function getTileStyles(_ref) {
|
|
|
44
44
|
};
|
|
45
45
|
export var StyledLinkTile = /*#__PURE__*/styled.a.withConfig({
|
|
46
46
|
displayName: "StyledLinkTile",
|
|
47
|
-
componentId: "core-
|
|
47
|
+
componentId: "core-12_41_0__sc-8q9p0n-0"
|
|
48
48
|
})(["", " text-decoration:none;color:inherit;"], function (_ref2) {
|
|
49
49
|
var $orientation = _ref2.$orientation;
|
|
50
50
|
return getTileStyles({
|
|
@@ -54,7 +54,7 @@ export var StyledLinkTile = /*#__PURE__*/styled.a.withConfig({
|
|
|
54
54
|
});
|
|
55
55
|
export var StyledSelectableTile = /*#__PURE__*/styled.div.withConfig({
|
|
56
56
|
displayName: "StyledSelectableTile",
|
|
57
|
-
componentId: "core-
|
|
57
|
+
componentId: "core-12_41_0__sc-8q9p0n-1"
|
|
58
58
|
})(["", ""], function (_ref3) {
|
|
59
59
|
var $orientation = _ref3.$orientation,
|
|
60
60
|
$selected = _ref3.$selected,
|
|
@@ -72,7 +72,7 @@ export var StyledSelectableTile = /*#__PURE__*/styled.div.withConfig({
|
|
|
72
72
|
});
|
|
73
73
|
export var StyledInteractableTile = /*#__PURE__*/styled.div.withConfig({
|
|
74
74
|
displayName: "StyledInteractableTile",
|
|
75
|
-
componentId: "core-
|
|
75
|
+
componentId: "core-12_41_0__sc-8q9p0n-2"
|
|
76
76
|
})(["", ""], function (_ref4) {
|
|
77
77
|
var $orientation = _ref4.$orientation;
|
|
78
78
|
return getTileStyles({
|
|
@@ -81,26 +81,26 @@ export var StyledInteractableTile = /*#__PURE__*/styled.div.withConfig({
|
|
|
81
81
|
});
|
|
82
82
|
export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
83
83
|
displayName: "StyledFooter",
|
|
84
|
-
componentId: "core-
|
|
84
|
+
componentId: "core-12_41_0__sc-8q9p0n-3"
|
|
85
85
|
})(["grid-area:footer;padding:", "px;> ", "{flex-wrap:wrap-reverse;}"], spacing.lg, StyledActions);
|
|
86
86
|
export var StyledTileContent = /*#__PURE__*/styled(StyledContent).withConfig({
|
|
87
87
|
displayName: "StyledTileContent",
|
|
88
|
-
componentId: "core-
|
|
88
|
+
componentId: "core-12_41_0__sc-8q9p0n-4"
|
|
89
89
|
})(["grid-column-start:hero-start;grid-column-end:body-end;padding:", "px;+ ", "{padding-top:0;}> ", ",> ", " > ", ",> ", "{grid-column-gap:", "px;}"], spacing.lg, StyledFooter, SFormRow, SForm, SFormRow, SFormRow, spacing.md);
|
|
90
90
|
export var StyledHeroMedia = /*#__PURE__*/styled.figure.withConfig({
|
|
91
91
|
displayName: "StyledHeroMedia",
|
|
92
|
-
componentId: "core-
|
|
92
|
+
componentId: "core-12_41_0__sc-8q9p0n-5"
|
|
93
93
|
})(["grid-area:hero;margin:0;position:relative;overflow:hidden;font-size:0;> *{font-size:initial;}+ ", "{grid-area:body;}> video{background-color:", ";}> img,> picture > img{object-fit:cover;}", ""], StyledTileContent, colors.black, function (_ref5) {
|
|
94
94
|
var $orientation = _ref5.$orientation;
|
|
95
95
|
return $orientation === 'landscape' && !isIE11() ? css(["border-top-left-radius:inherit;border-bottom-left-radius:inherit;> *,> picture > img{height:100%;width:100%;position:absolute;}@media ", "{> picture > img,> img{width:auto;left:50%;transform:translate(-50%,0);}}"], mediaIE11Hack) : css(["min-height:156px;max-height:567px;border-top-left-radius:inherit;border-top-right-radius:inherit;> *,> picture > img{min-height:inherit;max-height:inherit;height:auto;width:100%;}"]);
|
|
96
96
|
});
|
|
97
97
|
export var StyledHeroOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
98
98
|
displayName: "StyledHeroOverlay",
|
|
99
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_41_0__sc-8q9p0n-6"
|
|
100
100
|
})(["position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;"]);
|
|
101
101
|
export var StyledHeroText = /*#__PURE__*/styled.div.withConfig({
|
|
102
102
|
displayName: "StyledHeroText",
|
|
103
|
-
componentId: "core-
|
|
103
|
+
componentId: "core-12_41_0__sc-8q9p0n-7"
|
|
104
104
|
})(["grid-area:hero;+ ", "{grid-area:body;}padding:", "px;border-radius:inherit;", ""], StyledTileContent, spacing.lg, function (_ref6) {
|
|
105
105
|
var $orientation = _ref6.$orientation;
|
|
106
106
|
return $orientation === 'landscape' ? css(["display:flex;flex-direction:column;justify-content:center;padding-right:0;"]) : css(["padding-bottom:0;"]);
|