@procore/core-react 12.11.0 → 12.12.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.d.ts +1 -1
- package/dist/AvatarStack/AvatarStack.js +4 -3
- package/dist/AvatarStack/AvatarStack.js.map +1 -1
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/AvatarStack/AvatarStack.types.d.ts +6 -0
- package/dist/AvatarStack/AvatarStack.types.js.map +1 -1
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.js +4 -1
- package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.d.ts +1 -1
- package/dist/Panel/Panel.js +30 -44
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.d.ts +2 -2
- package/dist/Panel/Panel.styles.js +14 -15
- package/dist/Panel/Panel.styles.js.map +1 -1
- package/dist/Panel/Panel.types.d.ts +5 -5
- package/dist/Panel/Panel.types.js.map +1 -1
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/ThumbnailDocumentIcon.d.ts +1 -1
- package/dist/Thumbnail/ThumbnailDocumentIcon.js +23 -1
- package/dist/Thumbnail/ThumbnailDocumentIcon.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.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/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 +363 -1
- package/dist/_hooks/I18n.js +30 -26
- package/dist/_hooks/I18n.js.map +1 -1
- package/dist/_locales/en-AU.json +5 -5
- package/dist/_locales/en-CA.json +1 -1
- package/dist/_locales/en-GB.json +5 -5
- package/dist/_locales/en.json +1 -1
- package/dist/_locales/fr-CA.json +1 -1
- package/dist/_locales/fr-FR.json +1 -1
- package/dist/_locales/pl-PL.json +364 -2
- package/dist/_locales/pseudo.json +1 -1
- package/dist/_locales/pt-BR.json +2 -2
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +33 -23
- 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 +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
- 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 +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 +730 -730
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +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 +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +33 -33
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +48 -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 +18 -18
- 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 +58 -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 +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +100 -100
- 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 +9 -9
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- 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 +3 -3
- 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 +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_utils/i18n.js +1 -0
- package/dist/_utils/i18n.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { colors } from '../_styles/colors';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledHeaderBadge = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
displayName: "StyledHeaderBadge",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_12_0__sc-1jpjx47-0"
|
|
9
9
|
})(["", " border-radius:10px;border-style:solid;border-width:1px;display:inline-block;margin-bottom:", "px;padding:1px ", "px;", ""], getTypographyIntent('small'), spacing.sm, spacing.sm, function (_ref) {
|
|
10
10
|
var $variant = _ref.$variant;
|
|
11
11
|
if ($variant) {
|
|
@@ -18,22 +18,22 @@ export var StyledHeaderBadge = /*#__PURE__*/styled.div.withConfig({
|
|
|
18
18
|
// TODO in v12 remove cursor: pointer;
|
|
19
19
|
export var StyledToolHeaderIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledToolHeaderIconContainer",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_12_0__sc-1jpjx47-1"
|
|
22
22
|
})(["color:", ";cursor:pointer;display:inline-flex;flex:0 0 auto;"], colors.orange50);
|
|
23
23
|
export var StyledHeaderTabs = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
displayName: "StyledHeaderTabs",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-12_12_0__sc-1jpjx47-2"
|
|
26
26
|
})(["align-self:flex-end;flex:1 1 auto;min-width:100px;overflow:hidden;"]);
|
|
27
27
|
export var StyledHeaderActions = /*#__PURE__*/styled.div.withConfig({
|
|
28
28
|
displayName: "StyledHeaderActions",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_12_0__sc-1jpjx47-3"
|
|
30
30
|
})(["flex:0 0 auto;margin-left:auto;padding-left:", "px;"], spacing.lg);
|
|
31
31
|
export var StyledToolHeaderTitle = /*#__PURE__*/styled(H1).withConfig({
|
|
32
32
|
displayName: "StyledToolHeaderTitle",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-12_12_0__sc-1jpjx47-4"
|
|
34
34
|
})(["margin-right:", "px;white-space:nowrap;"], spacing.xl);
|
|
35
35
|
export var StyledToolHeader = /*#__PURE__*/styled.div.withConfig({
|
|
36
36
|
displayName: "StyledToolHeader",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-12_12_0__sc-1jpjx47-5"
|
|
38
38
|
})(["align-items:center;display:flex;min-height:36px;width:100%;", " + ", ",a + ", ",button + ", "{margin-left:", "px;}"], StyledToolHeaderIconContainer, StyledToolHeaderTitle, StyledToolHeaderTitle, StyledToolHeaderTitle, spacing.lg);
|
|
39
39
|
//# sourceMappingURL=ToolHeader.styles.js.map
|
|
@@ -3,14 +3,14 @@ import { Page } from '../PageLayout';
|
|
|
3
3
|
import { spacing } from '../_styles/spacing';
|
|
4
4
|
export var StyledTitleOuter = /*#__PURE__*/styled(Page.Title).withConfig({
|
|
5
5
|
displayName: "StyledTitleOuter",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_12_0__sc-wa8j06-0"
|
|
7
7
|
})(["align-items:center;display:flex;gap:", "px;"], spacing.md);
|
|
8
8
|
export var StyledTitleInner = /*#__PURE__*/styled.div.withConfig({
|
|
9
9
|
displayName: "StyledTitleInner",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_12_0__sc-wa8j06-1"
|
|
11
11
|
})(["width:100%;"]);
|
|
12
12
|
export var StyledToolLandingPageBodyContent = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "StyledToolLandingPageBodyContent",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_12_0__sc-wa8j06-2"
|
|
15
15
|
})(["> * + *{margin-top:", "px;}"], spacing.sm);
|
|
16
16
|
//# sourceMappingURL=ToolLandingPage.styles.js.map
|
|
@@ -6,10 +6,10 @@ import { getShadow } from '../_styles/shadows';
|
|
|
6
6
|
import { spacing } from '../_styles/spacing';
|
|
7
7
|
export var StyledTooltip = /*#__PURE__*/styled.span.withConfig({
|
|
8
8
|
displayName: "StyledTooltip",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_12_0__sc-1fawsi4-0"
|
|
10
10
|
})(["", " color:", ";max-width:200px;padding:", "px ", "px;position:relative;word-wrap:break-word;overflow-wrap:break-word;white-space:normal;"], getTypographyIntent('small'), colors.white, spacing.sm, spacing.md);
|
|
11
11
|
export var StyledContainer = /*#__PURE__*/styled.span.withConfig({
|
|
12
12
|
displayName: "StyledContainer",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_12_0__sc-1fawsi4-1"
|
|
14
14
|
})(["display:inline-flex;background-color:", ";border-radius:", "px;", " & + [data-overlay-arrow]{background:", ";}"], colors.gray15, borderRadius.md, getShadow(3, 'bottom'), colors.gray15);
|
|
15
15
|
//# sourceMappingURL=Tooltip.styles.js.map
|
package/dist/Tree/Tree.styles.js
CHANGED
|
@@ -5,15 +5,15 @@ import { Typography } from '../Typography/Typography';
|
|
|
5
5
|
import { colors } from '../_styles/colors';
|
|
6
6
|
export var StyledFilenameCaption = /*#__PURE__*/styled(Typography).withConfig({
|
|
7
7
|
displayName: "StyledFilenameCaption",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_12_0__sc-2d45b5-0"
|
|
9
9
|
})(["display:flex;width:100%;"]);
|
|
10
10
|
export var StyledTree = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
displayName: "StyledTree",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_12_0__sc-2d45b5-1"
|
|
13
13
|
})(["width:100%;height:100%;min-height:36px;outline:none;overflow:auto;"]);
|
|
14
14
|
export var StyledTreeRowContainer = /*#__PURE__*/styled(Typography).withConfig({
|
|
15
15
|
displayName: "StyledTreeRowContainer",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_12_0__sc-2d45b5-2"
|
|
17
17
|
})(["display:flex;align-items:center;height:36px;background:transparent;box-shadow:inset 4px 0px 0px transparent;cursor:default;outline:none;", " &:hover{background:", ";}", " ", ""], function (_ref) {
|
|
18
18
|
var isSelectable = _ref.isSelectable;
|
|
19
19
|
return isSelectable ? 'cursor: pointer;' : '';
|
|
@@ -27,30 +27,30 @@ export var StyledTreeRowContainer = /*#__PURE__*/styled(Typography).withConfig({
|
|
|
27
27
|
});
|
|
28
28
|
export var StyledTreeRowContent = /*#__PURE__*/styled.div.withConfig({
|
|
29
29
|
displayName: "StyledTreeRowContent",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_12_0__sc-2d45b5-3"
|
|
31
31
|
})(["display:flex;align-items:center;"]);
|
|
32
32
|
export var StyledTreeRowWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33
33
|
displayName: "StyledTreeRowWrapper",
|
|
34
|
-
componentId: "core-
|
|
34
|
+
componentId: "core-12_12_0__sc-2d45b5-4"
|
|
35
35
|
})(["outline:none;"]);
|
|
36
36
|
var StyledIconBase = /*#__PURE__*/styled(Box).withConfig({
|
|
37
37
|
displayName: "StyledIconBase",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_12_0__sc-2d45b5-5"
|
|
39
39
|
})(["display:flex;justify-content:center;align-items:center;width:24px;height:24px;min-width:24px;min-height:24px;"]);
|
|
40
40
|
export var StyledChevronContainer = /*#__PURE__*/styled(StyledIconBase).withConfig({
|
|
41
41
|
displayName: "StyledChevronContainer",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_12_0__sc-2d45b5-6"
|
|
43
43
|
})([""]);
|
|
44
44
|
export var StyledIconContainer = /*#__PURE__*/styled(StyledIconBase).withConfig({
|
|
45
45
|
displayName: "StyledIconContainer",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_12_0__sc-2d45b5-7"
|
|
47
47
|
})(["color:", ";"], function (_ref4) {
|
|
48
48
|
var $isSelected = _ref4.$isSelected;
|
|
49
49
|
return $isSelected ? colors.blue45 : colors.gray40;
|
|
50
50
|
});
|
|
51
51
|
export var StyledChevron = /*#__PURE__*/styled(ChevronRight).withConfig({
|
|
52
52
|
displayName: "StyledChevron",
|
|
53
|
-
componentId: "core-
|
|
53
|
+
componentId: "core-12_12_0__sc-2d45b5-8"
|
|
54
54
|
})(["transform:rotate(", "deg);transition:transform 150ms ease-out;"], function (_ref5) {
|
|
55
55
|
var $isExpanded = _ref5.$isExpanded;
|
|
56
56
|
return $isExpanded ? 90 : 0;
|
|
@@ -5,11 +5,11 @@ import { spacing } from '../_styles/spacing';
|
|
|
5
5
|
var inputHeight = 36;
|
|
6
6
|
export var StyledInput = /*#__PURE__*/styled.input.withConfig({
|
|
7
7
|
displayName: "StyledInput",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_12_0__sc-gpc39h-0"
|
|
9
9
|
})(["", " padding-right:", "px;"], getSearchInputStyles(), spacing.xxl);
|
|
10
10
|
export var StyledIcon = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
displayName: "StyledIcon",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_12_0__sc-gpc39h-1"
|
|
13
13
|
})(["align-items:center;color:", ";display:flex;height:", "px;justify-content:center;pointer-events:", ";position:absolute;right:0;top:0;width:", "px;"], function (p) {
|
|
14
14
|
return p.disabled ? colors.gray70 : colors.gray45;
|
|
15
15
|
}, inputHeight, function (p) {
|
|
@@ -17,6 +17,6 @@ export var StyledIcon = /*#__PURE__*/styled.div.withConfig({
|
|
|
17
17
|
}, inputHeight);
|
|
18
18
|
export var StyledTypeahead = /*#__PURE__*/styled.div.withConfig({
|
|
19
19
|
displayName: "StyledTypeahead",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_12_0__sc-gpc39h-2"
|
|
21
21
|
})(["position:relative;width:100%;"]);
|
|
22
22
|
//# sourceMappingURL=Typeahead.styles.js.map
|
|
@@ -35,7 +35,7 @@ export var semiboldRules = function semiboldRules() {
|
|
|
35
35
|
};
|
|
36
36
|
export var StyledTypography = /*#__PURE__*/styled.span.withConfig({
|
|
37
37
|
displayName: "StyledTypography",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_12_0__sc-1c4583t-0"
|
|
39
39
|
})(["", " color:", ";font-style:", ";font-weight:", ";", " ", " em,i{font-style:italic;}"], function (_ref) {
|
|
40
40
|
var _ref$intent = _ref.intent,
|
|
41
41
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent;
|
|
@@ -5,11 +5,11 @@ import { colors } from '../_styles/colors';
|
|
|
5
5
|
import { getTypographyIntent } from './Typography.styles';
|
|
6
6
|
var StyledBodyCell = /*#__PURE__*/styled(Table.BodyCell).withConfig({
|
|
7
7
|
displayName: "StyledBodyCell",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_12_0__sc-p4v7d-0"
|
|
9
9
|
})([""]);
|
|
10
10
|
var StyledTextCell = /*#__PURE__*/styled(Table.TextCell).withConfig({
|
|
11
11
|
displayName: "StyledTextCell",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_12_0__sc-p4v7d-1"
|
|
13
13
|
})(["", " color:", ";"], getTypographyIntent('body'), colors.blue50);
|
|
14
14
|
function BodyCell() {
|
|
15
15
|
return /*#__PURE__*/React.createElement(StyledBodyCell, {
|
package/dist/_hooks/I18n.d.ts
CHANGED
|
@@ -5484,7 +5484,369 @@ export declare const coreTranslations: {
|
|
|
5484
5484
|
};
|
|
5485
5485
|
};
|
|
5486
5486
|
readonly 'pl-PL': {
|
|
5487
|
-
core: {
|
|
5487
|
+
core: {
|
|
5488
|
+
banner: {
|
|
5489
|
+
dismissAlert: string;
|
|
5490
|
+
};
|
|
5491
|
+
breadcrumbs: {
|
|
5492
|
+
label: string;
|
|
5493
|
+
};
|
|
5494
|
+
calendar: {
|
|
5495
|
+
navigationLabel: string;
|
|
5496
|
+
};
|
|
5497
|
+
connected: {
|
|
5498
|
+
fileSelect: {
|
|
5499
|
+
documents: string;
|
|
5500
|
+
drawings: string;
|
|
5501
|
+
forms: string;
|
|
5502
|
+
photos: string;
|
|
5503
|
+
selectAlbum: string;
|
|
5504
|
+
selectAnAlbum: string;
|
|
5505
|
+
selectArea: string;
|
|
5506
|
+
selectAnArea: string;
|
|
5507
|
+
selectDiscipline: string;
|
|
5508
|
+
selectADiscipline: string;
|
|
5509
|
+
selectSet: string;
|
|
5510
|
+
selectASet: string;
|
|
5511
|
+
selectTemplate: string;
|
|
5512
|
+
selectATemplate: string;
|
|
5513
|
+
};
|
|
5514
|
+
emails: {
|
|
5515
|
+
emailSendErrorTitle: string;
|
|
5516
|
+
emailBodyRequiredError: string;
|
|
5517
|
+
emailContentValidationError: string;
|
|
5518
|
+
emailContentDisclaimer: string;
|
|
5519
|
+
recipientSelectPlaceholder: string;
|
|
5520
|
+
emailRecipientRequiredError: string;
|
|
5521
|
+
emailSubjectRequiredError: string;
|
|
5522
|
+
goToAllEmails: string;
|
|
5523
|
+
sendEmail: string;
|
|
5524
|
+
replyAll: string;
|
|
5525
|
+
downloadAll: string;
|
|
5526
|
+
showAll: string;
|
|
5527
|
+
showLess: string;
|
|
5528
|
+
composeEmailPageTitle: string;
|
|
5529
|
+
emailSentMessage: string;
|
|
5530
|
+
from: string;
|
|
5531
|
+
to: string;
|
|
5532
|
+
cc: string;
|
|
5533
|
+
bcc: string;
|
|
5534
|
+
downloadPdfLong: string;
|
|
5535
|
+
downloadPdfShort: string;
|
|
5536
|
+
privateEmailDisclaimer: string;
|
|
5537
|
+
privateLabel: string;
|
|
5538
|
+
settingsLink: string;
|
|
5539
|
+
composeNewEmail: string;
|
|
5540
|
+
startNewCommunication: string;
|
|
5541
|
+
emptyStateTitle: string;
|
|
5542
|
+
emptyStateDescription: string;
|
|
5543
|
+
reply: string;
|
|
5544
|
+
cancel: string;
|
|
5545
|
+
subject: string;
|
|
5546
|
+
subjectPlaceholder: string;
|
|
5547
|
+
};
|
|
5548
|
+
distributionSelect: {
|
|
5549
|
+
noCompany: string;
|
|
5550
|
+
peopleCount: string;
|
|
5551
|
+
distributionGroups: string;
|
|
5552
|
+
people: string;
|
|
5553
|
+
};
|
|
5554
|
+
relatedItems: {
|
|
5555
|
+
cancel: string;
|
|
5556
|
+
close: string;
|
|
5557
|
+
date: string;
|
|
5558
|
+
itemType: string;
|
|
5559
|
+
itemTypeGroupLabel: {
|
|
5560
|
+
dailyLog: string;
|
|
5561
|
+
prostoreFile: string;
|
|
5562
|
+
};
|
|
5563
|
+
itemName: string;
|
|
5564
|
+
loading: string;
|
|
5565
|
+
notes: string;
|
|
5566
|
+
notesPlaceholder: string;
|
|
5567
|
+
newItem: string;
|
|
5568
|
+
noRelatedItems: {
|
|
5569
|
+
title: string;
|
|
5570
|
+
description: string;
|
|
5571
|
+
};
|
|
5572
|
+
noItems: {
|
|
5573
|
+
title: string;
|
|
5574
|
+
description: string;
|
|
5575
|
+
};
|
|
5576
|
+
noResultsSearchQuery: {
|
|
5577
|
+
title: string;
|
|
5578
|
+
description: string;
|
|
5579
|
+
};
|
|
5580
|
+
noResultsServerError: {
|
|
5581
|
+
title: string;
|
|
5582
|
+
description: string;
|
|
5583
|
+
action: string;
|
|
5584
|
+
};
|
|
5585
|
+
panelTitle: string;
|
|
5586
|
+
search: string;
|
|
5587
|
+
searchItemType: string;
|
|
5588
|
+
submit: string;
|
|
5589
|
+
toast: {
|
|
5590
|
+
itemAdded: string;
|
|
5591
|
+
itemAdditionFailed: string;
|
|
5592
|
+
itemRemoved: string;
|
|
5593
|
+
requestError: string;
|
|
5594
|
+
};
|
|
5595
|
+
};
|
|
5596
|
+
};
|
|
5597
|
+
dateTimeFormat: {
|
|
5598
|
+
dateAtTime: string;
|
|
5599
|
+
timeOnDate: string;
|
|
5600
|
+
};
|
|
5601
|
+
table: {
|
|
5602
|
+
sortableColumn: string;
|
|
5603
|
+
};
|
|
5604
|
+
dataTable: {
|
|
5605
|
+
emptyState: {
|
|
5606
|
+
noFilteredResults: {
|
|
5607
|
+
description: string;
|
|
5608
|
+
title: string;
|
|
5609
|
+
};
|
|
5610
|
+
};
|
|
5611
|
+
exporting: string;
|
|
5612
|
+
filters: {
|
|
5613
|
+
filters: string;
|
|
5614
|
+
moreFilters: string;
|
|
5615
|
+
clearAllFilters: string;
|
|
5616
|
+
};
|
|
5617
|
+
grandTotals: string;
|
|
5618
|
+
search: string;
|
|
5619
|
+
subtotals: string;
|
|
5620
|
+
tableSettings: {
|
|
5621
|
+
configureColumns: string;
|
|
5622
|
+
resetToDefault: string;
|
|
5623
|
+
rowHeight: string;
|
|
5624
|
+
small: string;
|
|
5625
|
+
medium: string;
|
|
5626
|
+
large: string;
|
|
5627
|
+
tableSettings: string;
|
|
5628
|
+
};
|
|
5629
|
+
};
|
|
5630
|
+
dateInput: {
|
|
5631
|
+
clear: string;
|
|
5632
|
+
ariaLabel: string;
|
|
5633
|
+
segment: {
|
|
5634
|
+
ariaLabel: {
|
|
5635
|
+
withValue: {
|
|
5636
|
+
month: string;
|
|
5637
|
+
day: string;
|
|
5638
|
+
year: string;
|
|
5639
|
+
};
|
|
5640
|
+
withoutValue: {
|
|
5641
|
+
month: string;
|
|
5642
|
+
day: string;
|
|
5643
|
+
year: string;
|
|
5644
|
+
};
|
|
5645
|
+
};
|
|
5646
|
+
ariaValueText: {
|
|
5647
|
+
empty: string;
|
|
5648
|
+
};
|
|
5649
|
+
};
|
|
5650
|
+
clearButton: {
|
|
5651
|
+
ariaLabel: string;
|
|
5652
|
+
};
|
|
5653
|
+
};
|
|
5654
|
+
dropdown: {
|
|
5655
|
+
search: string;
|
|
5656
|
+
moreOptions: string;
|
|
5657
|
+
loading: string;
|
|
5658
|
+
};
|
|
5659
|
+
dropzone: {
|
|
5660
|
+
uploadFiles: {
|
|
5661
|
+
one: string;
|
|
5662
|
+
other: string;
|
|
5663
|
+
};
|
|
5664
|
+
dragAndDrop: string;
|
|
5665
|
+
incorrectFileTypeMessage: {
|
|
5666
|
+
one: string;
|
|
5667
|
+
other: string;
|
|
5668
|
+
};
|
|
5669
|
+
incorrectFileNumber: string;
|
|
5670
|
+
invalidAmountAttachments: {
|
|
5671
|
+
one: string;
|
|
5672
|
+
other: string;
|
|
5673
|
+
};
|
|
5674
|
+
hideDetails: string;
|
|
5675
|
+
showDetails: string;
|
|
5676
|
+
errorTitle: string;
|
|
5677
|
+
oneFileAtATimeError: string;
|
|
5678
|
+
multipleErrorsMessage: string;
|
|
5679
|
+
maxFileSizeErrorGroup: string;
|
|
5680
|
+
minFileSizeErrorGroup: string;
|
|
5681
|
+
maxFileNumberErrorGroup: string;
|
|
5682
|
+
wrongFileTypeErrorGroup: string;
|
|
5683
|
+
standaloneMaxFileNumberError: string;
|
|
5684
|
+
standaloneUnsupportedFileTypeError: string;
|
|
5685
|
+
standaloneMinFileSizeError: string;
|
|
5686
|
+
standaloneMaxFileSizeError: string;
|
|
5687
|
+
uploadTotalProgress: {
|
|
5688
|
+
withFailed: string;
|
|
5689
|
+
withoutFailed: string;
|
|
5690
|
+
};
|
|
5691
|
+
};
|
|
5692
|
+
modal: {
|
|
5693
|
+
a11y: {
|
|
5694
|
+
close: string;
|
|
5695
|
+
};
|
|
5696
|
+
cancel: string;
|
|
5697
|
+
};
|
|
5698
|
+
multiSelect: {
|
|
5699
|
+
clearAll: string;
|
|
5700
|
+
selectValues: string;
|
|
5701
|
+
noResults: string;
|
|
5702
|
+
};
|
|
5703
|
+
tearsheet: {
|
|
5704
|
+
a11y: {
|
|
5705
|
+
close: string;
|
|
5706
|
+
};
|
|
5707
|
+
};
|
|
5708
|
+
fileAttacher: {
|
|
5709
|
+
attachFiles: {
|
|
5710
|
+
one: string;
|
|
5711
|
+
other: string;
|
|
5712
|
+
};
|
|
5713
|
+
};
|
|
5714
|
+
fileToken: {
|
|
5715
|
+
uploading: string;
|
|
5716
|
+
};
|
|
5717
|
+
tree: {
|
|
5718
|
+
selectionLimit: {
|
|
5719
|
+
one: string;
|
|
5720
|
+
other: string;
|
|
5721
|
+
};
|
|
5722
|
+
unsupportedFileType: {
|
|
5723
|
+
specific: string;
|
|
5724
|
+
unspecific: string;
|
|
5725
|
+
};
|
|
5726
|
+
};
|
|
5727
|
+
fileExplorer: {
|
|
5728
|
+
filesSelectedWithLimit: string;
|
|
5729
|
+
ungroupedThumbnailGridGroup: string;
|
|
5730
|
+
filesSelected: {
|
|
5731
|
+
one: string;
|
|
5732
|
+
other: string;
|
|
5733
|
+
};
|
|
5734
|
+
cancelAction: string;
|
|
5735
|
+
attachAction: string;
|
|
5736
|
+
maxNumberOfFilesSelected: string;
|
|
5737
|
+
modalTitle: string;
|
|
5738
|
+
filesPendingUpload: string;
|
|
5739
|
+
noSelectedItems: string;
|
|
5740
|
+
emptySearchResults: string;
|
|
5741
|
+
noItems: string;
|
|
5742
|
+
searchPlaceholder: string;
|
|
5743
|
+
uploadFailed: string;
|
|
5744
|
+
supportedFileTypes: string;
|
|
5745
|
+
};
|
|
5746
|
+
form: {
|
|
5747
|
+
closeWithConfirm: {
|
|
5748
|
+
confirmMessage: string;
|
|
5749
|
+
};
|
|
5750
|
+
checkbox: {
|
|
5751
|
+
no: string;
|
|
5752
|
+
yes: string;
|
|
5753
|
+
checked: string;
|
|
5754
|
+
unchecked: string;
|
|
5755
|
+
};
|
|
5756
|
+
errorBanner: {
|
|
5757
|
+
coundNotCreateItem: string;
|
|
5758
|
+
couldNotUpdateItem: string;
|
|
5759
|
+
fixErrorsToCreate: string;
|
|
5760
|
+
fixErrorsToUpdate: string;
|
|
5761
|
+
};
|
|
5762
|
+
field: {
|
|
5763
|
+
tooltipHelp: string;
|
|
5764
|
+
};
|
|
5765
|
+
};
|
|
5766
|
+
menu: {
|
|
5767
|
+
search: string;
|
|
5768
|
+
};
|
|
5769
|
+
pagination: {
|
|
5770
|
+
interval: string;
|
|
5771
|
+
notation: string;
|
|
5772
|
+
page: string;
|
|
5773
|
+
nextPage: string;
|
|
5774
|
+
prevPage: string;
|
|
5775
|
+
};
|
|
5776
|
+
search: {
|
|
5777
|
+
clear: string;
|
|
5778
|
+
goSearch: string;
|
|
5779
|
+
};
|
|
5780
|
+
select: {
|
|
5781
|
+
clear: string;
|
|
5782
|
+
search: string;
|
|
5783
|
+
};
|
|
5784
|
+
splitViewCard: {
|
|
5785
|
+
a11y: {
|
|
5786
|
+
close: string;
|
|
5787
|
+
};
|
|
5788
|
+
};
|
|
5789
|
+
tabs: {
|
|
5790
|
+
more: string;
|
|
5791
|
+
};
|
|
5792
|
+
thumbnail: {
|
|
5793
|
+
checked: string;
|
|
5794
|
+
};
|
|
5795
|
+
thumbnailList: {
|
|
5796
|
+
removeUpload: string;
|
|
5797
|
+
uploading: string;
|
|
5798
|
+
};
|
|
5799
|
+
toast: {
|
|
5800
|
+
a11y: {
|
|
5801
|
+
dismiss: string;
|
|
5802
|
+
};
|
|
5803
|
+
};
|
|
5804
|
+
fileList: {
|
|
5805
|
+
downloadAll: string;
|
|
5806
|
+
download: string;
|
|
5807
|
+
noPreview: string;
|
|
5808
|
+
};
|
|
5809
|
+
tieredSelect: {
|
|
5810
|
+
emptyMessage: string;
|
|
5811
|
+
goToTier: string;
|
|
5812
|
+
placeholder: string;
|
|
5813
|
+
quickCreateActionLabel: string;
|
|
5814
|
+
quickCreateCancelLabel: string;
|
|
5815
|
+
quickCreateCreateLabel: string;
|
|
5816
|
+
quickCreatePlaceholder: string;
|
|
5817
|
+
searchEmptyMessage: string;
|
|
5818
|
+
searchPlaceholder: string;
|
|
5819
|
+
spinnerLabel: string;
|
|
5820
|
+
};
|
|
5821
|
+
tieredDropdown: {
|
|
5822
|
+
emptyMessage: string;
|
|
5823
|
+
searchEmptyMessage: string;
|
|
5824
|
+
searchPlaceholder: string;
|
|
5825
|
+
spinnerLabel: string;
|
|
5826
|
+
};
|
|
5827
|
+
token: {
|
|
5828
|
+
remove: string;
|
|
5829
|
+
};
|
|
5830
|
+
toolHeader: {
|
|
5831
|
+
settingsAction: string;
|
|
5832
|
+
};
|
|
5833
|
+
fileSelect: {
|
|
5834
|
+
localFilesSource: string;
|
|
5835
|
+
uploadFailed: string;
|
|
5836
|
+
maxNumberOfFilesSelected: string;
|
|
5837
|
+
};
|
|
5838
|
+
required: {
|
|
5839
|
+
requiredFields: string;
|
|
5840
|
+
};
|
|
5841
|
+
avatarStack: {
|
|
5842
|
+
viewAll: string;
|
|
5843
|
+
close: string;
|
|
5844
|
+
};
|
|
5845
|
+
panel: {
|
|
5846
|
+
close: string;
|
|
5847
|
+
goBack: string;
|
|
5848
|
+
};
|
|
5849
|
+
};
|
|
5488
5850
|
};
|
|
5489
5851
|
};
|
|
5490
5852
|
export declare function useI18n({ locale: _locale, translations: _translations, }: I18njsConfig): I18njs;
|
package/dist/_hooks/I18n.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
2
|
+
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
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
4
16
|
import { createI18njs } from '@procore/core-i18n-js';
|
|
5
17
|
import * as R from 'ramda';
|
|
6
18
|
import React from 'react';
|
|
@@ -52,34 +64,29 @@ function getValidLocale(_ref) {
|
|
|
52
64
|
translations = _ref.translations;
|
|
53
65
|
return locale;
|
|
54
66
|
}
|
|
55
|
-
var FALLBACK_LOCALE_MAP = {
|
|
67
|
+
var FALLBACK_LOCALE_MAP = _objectSpread({
|
|
56
68
|
'es-ES': 'es',
|
|
57
69
|
'fr-FR': 'fr-CA'
|
|
58
|
-
};
|
|
70
|
+
}, OVERWRITE_LOCALE_MAP);
|
|
59
71
|
function getTranslationFallbacks(locale) {
|
|
60
|
-
if (locale === 'en') {
|
|
61
|
-
return ['en'];
|
|
62
|
-
}
|
|
63
|
-
if (OVERWRITE_LOCALE_MAP[locale]) {
|
|
64
|
-
return [OVERWRITE_LOCALE_MAP[locale], 'en'];
|
|
65
|
-
}
|
|
66
72
|
if (FALLBACK_LOCALE_MAP[locale]) {
|
|
67
|
-
return [
|
|
73
|
+
return [FALLBACK_LOCALE_MAP[locale], 'en'];
|
|
68
74
|
}
|
|
69
|
-
return [
|
|
75
|
+
return ['en'];
|
|
70
76
|
}
|
|
71
|
-
function setTranslationFallbacks(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
function setTranslationFallbacks(I18n) {
|
|
78
|
+
I18n.locales[I18n.locale] = function () {
|
|
79
|
+
var fallbacks = getTranslationFallbacks(I18n.locale).filter(function (locale) {
|
|
80
|
+
return locale !== I18n.locale;
|
|
81
|
+
});
|
|
82
|
+
return [I18n.locale].concat(_toConsumableArray(fallbacks));
|
|
76
83
|
};
|
|
77
84
|
return I18n;
|
|
78
85
|
}
|
|
79
|
-
export function useI18n(
|
|
80
|
-
var _locale =
|
|
81
|
-
|
|
82
|
-
_translations =
|
|
86
|
+
export function useI18n(_ref2) {
|
|
87
|
+
var _locale = _ref2.locale,
|
|
88
|
+
_ref2$translations = _ref2.translations,
|
|
89
|
+
_translations = _ref2$translations === void 0 ? {} : _ref2$translations;
|
|
83
90
|
var translations = R.mergeDeepLeft(_translations, coreTranslations);
|
|
84
91
|
var locale = getValidLocale({
|
|
85
92
|
locale: _locale,
|
|
@@ -89,19 +96,16 @@ export function useI18n(_ref3) {
|
|
|
89
96
|
locale: locale,
|
|
90
97
|
translations: translations
|
|
91
98
|
});
|
|
92
|
-
return setTranslationFallbacks(
|
|
93
|
-
I18n: I18n,
|
|
94
|
-
locale: locale || 'en'
|
|
95
|
-
});
|
|
99
|
+
return setTranslationFallbacks(I18n);
|
|
96
100
|
}
|
|
97
101
|
export var I18nContext = /*#__PURE__*/React.createContext(createI18njs({
|
|
98
102
|
locale: 'en',
|
|
99
103
|
translations: coreTranslations // inject our translations
|
|
100
104
|
}));
|
|
101
105
|
|
|
102
|
-
export function I18nProvider(
|
|
103
|
-
var children =
|
|
104
|
-
props = _objectWithoutProperties(
|
|
106
|
+
export function I18nProvider(_ref3) {
|
|
107
|
+
var children = _ref3.children,
|
|
108
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
105
109
|
return /*#__PURE__*/React.createElement(I18nContext.Provider, {
|
|
106
110
|
value: useI18n(props)
|
|
107
111
|
}, children);
|