@procore/core-react 12.4.1 → 12.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.d.ts +3 -3
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.styles.d.ts +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.d.ts +3 -3
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.d.ts +2 -2
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.d.ts +2 -2
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.d.ts +2 -2
- package/dist/Dropdown/Dropdown.styles.d.ts +1 -1
- 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.d.ts +3 -3
- 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.d.ts +1 -1
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.d.ts +1 -1
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.d.ts +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.d.ts +5 -5
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.d.ts +1 -1
- 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.d.ts +1 -1
- 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/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.d.ts +3 -3
- package/dist/MenuImperative/MenuImperative.styles.d.ts +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/MenuImperative/MenuImperative.types.d.ts +5 -3
- package/dist/MenuImperative/MenuImperative.types.js.map +1 -1
- package/dist/Modal/Modal.styles.d.ts +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.d.ts +1 -1
- 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 +15 -15
- package/dist/Pagination/Pagination.styles.d.ts +1 -1
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.d.ts +1 -1
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.d.ts +5 -5
- package/dist/Section/Section.styles.js +6 -6
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.d.ts +1 -1
- 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/SuperSelect/SuperSelect.d.ts +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.d.ts +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.d.ts +3 -3
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/useSuperSelect.d.ts +3 -3
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.d.ts +1 -1
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.d.ts +1 -1
- package/dist/Tabs/Tabs.styles.js +8 -8
- package/dist/Tearsheet/Tearsheet.styles.d.ts +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.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.d.ts +12 -12
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.d.ts +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.d.ts +1 -1
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.d.ts +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.js +37 -8
- package/dist/_hooks/I18n.js.map +1 -1
- package/dist/_hooks/getI18nProviderLocale.d.ts +1 -0
- package/dist/_hooks/getI18nProviderLocale.js +1 -1
- package/dist/_hooks/getI18nProviderLocale.js.map +1 -1
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -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 +726 -726
- 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 +41 -41
- 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 +27 -27
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +47 -47
- 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 +14 -14
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
- package/dist/_typedoc/Select/Select.types.json +57 -57
- 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/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +99 -99
- package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
- 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/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/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_0__sc-e1ql06-8"
|
|
50
50
|
})(["min-height:auto;"]);
|
|
51
51
|
//# sourceMappingURL=TieredSelect.styles.js.map
|
|
@@ -11,7 +11,7 @@ export declare const StyledSelectableTile: import("styled-components").StyledCom
|
|
|
11
11
|
}, never>;
|
|
12
12
|
export declare const StyledInteractableTile: import("styled-components").StyledComponent<"div", any, StyledTile, never>;
|
|
13
13
|
export declare const StyledFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
-
export declare const StyledTileContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("
|
|
14
|
+
export declare const StyledTileContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
15
15
|
export declare const StyledHeroMedia: import("styled-components").StyledComponent<"figure", any, {
|
|
16
16
|
$orientation: TileCommonProps['orientation'];
|
|
17
17
|
}, never>;
|
package/dist/Tile/Tile.styles.js
CHANGED
|
@@ -39,7 +39,7 @@ var getTileStyles = function getTileStyles(_ref) {
|
|
|
39
39
|
};
|
|
40
40
|
export var StyledLinkTile = /*#__PURE__*/styled.a.withConfig({
|
|
41
41
|
displayName: "StyledLinkTile",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_5_0__sc-8q9p0n-0"
|
|
43
43
|
})(["", " text-decoration:none;color:inherit;"], function (_ref2) {
|
|
44
44
|
var $orientation = _ref2.$orientation;
|
|
45
45
|
return getTileStyles({
|
|
@@ -49,7 +49,7 @@ export var StyledLinkTile = /*#__PURE__*/styled.a.withConfig({
|
|
|
49
49
|
});
|
|
50
50
|
export var StyledSelectableTile = /*#__PURE__*/styled.div.withConfig({
|
|
51
51
|
displayName: "StyledSelectableTile",
|
|
52
|
-
componentId: "core-
|
|
52
|
+
componentId: "core-12_5_0__sc-8q9p0n-1"
|
|
53
53
|
})(["", ""], function (_ref3) {
|
|
54
54
|
var $orientation = _ref3.$orientation,
|
|
55
55
|
$selected = _ref3.$selected,
|
|
@@ -65,7 +65,7 @@ export var StyledSelectableTile = /*#__PURE__*/styled.div.withConfig({
|
|
|
65
65
|
});
|
|
66
66
|
export var StyledInteractableTile = /*#__PURE__*/styled.div.withConfig({
|
|
67
67
|
displayName: "StyledInteractableTile",
|
|
68
|
-
componentId: "core-
|
|
68
|
+
componentId: "core-12_5_0__sc-8q9p0n-2"
|
|
69
69
|
})(["", ""], function (_ref4) {
|
|
70
70
|
var $orientation = _ref4.$orientation;
|
|
71
71
|
return getTileStyles({
|
|
@@ -74,26 +74,26 @@ export var StyledInteractableTile = /*#__PURE__*/styled.div.withConfig({
|
|
|
74
74
|
});
|
|
75
75
|
export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
76
76
|
displayName: "StyledFooter",
|
|
77
|
-
componentId: "core-
|
|
77
|
+
componentId: "core-12_5_0__sc-8q9p0n-3"
|
|
78
78
|
})(["grid-area:footer;padding:", "px;> ", "{flex-wrap:wrap-reverse;}"], spacing.lg, StyledActions);
|
|
79
79
|
export var StyledTileContent = /*#__PURE__*/styled(StyledContent).withConfig({
|
|
80
80
|
displayName: "StyledTileContent",
|
|
81
|
-
componentId: "core-
|
|
81
|
+
componentId: "core-12_5_0__sc-8q9p0n-4"
|
|
82
82
|
})(["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);
|
|
83
83
|
export var StyledHeroMedia = /*#__PURE__*/styled.figure.withConfig({
|
|
84
84
|
displayName: "StyledHeroMedia",
|
|
85
|
-
componentId: "core-
|
|
85
|
+
componentId: "core-12_5_0__sc-8q9p0n-5"
|
|
86
86
|
})(["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) {
|
|
87
87
|
var $orientation = _ref5.$orientation;
|
|
88
88
|
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%;}"]);
|
|
89
89
|
});
|
|
90
90
|
export var StyledHeroOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
91
91
|
displayName: "StyledHeroOverlay",
|
|
92
|
-
componentId: "core-
|
|
92
|
+
componentId: "core-12_5_0__sc-8q9p0n-6"
|
|
93
93
|
})(["position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;"]);
|
|
94
94
|
export var StyledHeroText = /*#__PURE__*/styled.div.withConfig({
|
|
95
95
|
displayName: "StyledHeroText",
|
|
96
|
-
componentId: "core-
|
|
96
|
+
componentId: "core-12_5_0__sc-8q9p0n-7"
|
|
97
97
|
})(["grid-area:hero;+ ", "{grid-area:body;}padding:", "px;border-radius:inherit;", ""], StyledTileContent, spacing.lg, function (_ref6) {
|
|
98
98
|
var $orientation = _ref6.$orientation;
|
|
99
99
|
return $orientation === 'landscape' ? css(["display:flex;flex-direction:column;justify-content:center;padding-right:0;"]) : css(["padding-bottom:0;"]);
|
|
@@ -7,5 +7,5 @@ export declare const StyledTitleContent: import("styled-components").StyledCompo
|
|
|
7
7
|
}, never>;
|
|
8
8
|
export declare const StyledText: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
9
9
|
export declare const StyledTitlePill: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
10
|
-
export declare const StyledTitleActions: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("
|
|
10
|
+
export declare const StyledTitleActions: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
11
11
|
export declare const StyledSubtext: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../_utils/types").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
@@ -5,36 +5,36 @@ import { Typography } from '../Typography/Typography';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
displayName: "StyledTitle",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_5_0__sc-1t2ye1d-0"
|
|
9
9
|
})(["display:flex;align-items:flex-start;"]);
|
|
10
10
|
export var StyledAssets = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
displayName: "StyledAssets",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_5_0__sc-1t2ye1d-1"
|
|
13
13
|
})(["margin-right:", "px;", ""], spacing.md, function (_ref) {
|
|
14
14
|
var alignment = _ref.alignment;
|
|
15
15
|
return css(["align-self:", ";"], alignment);
|
|
16
16
|
});
|
|
17
17
|
export var StyledTitleContent = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
displayName: "StyledTitleContent",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_5_0__sc-1t2ye1d-2"
|
|
20
20
|
})(["align-self:center;", ""], function (_ref2) {
|
|
21
21
|
var $hasActions = _ref2.$hasActions;
|
|
22
22
|
return $hasActions && css(["margin-right:", "px;"], spacing.lg);
|
|
23
23
|
});
|
|
24
24
|
export var StyledText = /*#__PURE__*/styled.span.withConfig({
|
|
25
25
|
displayName: "StyledText",
|
|
26
|
-
componentId: "core-
|
|
26
|
+
componentId: "core-12_5_0__sc-1t2ye1d-3"
|
|
27
27
|
})(["> h1,> h2,> h3{display:inline;}"]);
|
|
28
28
|
export var StyledTitlePill = /*#__PURE__*/styled.span.withConfig({
|
|
29
29
|
displayName: "StyledTitlePill",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_5_0__sc-1t2ye1d-4"
|
|
31
31
|
})(["margin-left:", "px;", "{vertical-align:text-top;}"], spacing.sm, StyledPill);
|
|
32
32
|
export var StyledTitleActions = /*#__PURE__*/styled(StyledActions).withConfig({
|
|
33
33
|
displayName: "StyledTitleActions",
|
|
34
|
-
componentId: "core-
|
|
34
|
+
componentId: "core-12_5_0__sc-1t2ye1d-5"
|
|
35
35
|
})(["margin-left:auto;"]);
|
|
36
36
|
export var StyledSubtext = /*#__PURE__*/styled(Typography).withConfig({
|
|
37
37
|
displayName: "StyledSubtext",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_5_0__sc-1t2ye1d-6"
|
|
39
39
|
})(["display:block;"]);
|
|
40
40
|
//# sourceMappingURL=Title.styles.js.map
|
|
@@ -7,7 +7,7 @@ import { getShadow } from '../_styles/shadows';
|
|
|
7
7
|
import { spacing } from '../_styles/spacing';
|
|
8
8
|
export var StyledToast = /*#__PURE__*/styled.div.withConfig({
|
|
9
9
|
displayName: "StyledToast",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_5_0__sc-1l6lk2n-0"
|
|
11
11
|
})(["", " align-items:center;background-color:", ";border-radius:", "px;color:", ";display:flex;min-height:48px;padding:", "px ", "px;width:550px;"], getShadow(4, 'bottom'), function (_ref) {
|
|
12
12
|
var $variant = _ref.$variant;
|
|
13
13
|
return $variant === 'success' ? colors.green30 : colors.red50;
|
|
@@ -16,13 +16,13 @@ export var StyledToast = /*#__PURE__*/styled.div.withConfig({
|
|
|
16
16
|
// $legacy is direct string inside Toast. Next is with subcomponents
|
|
17
17
|
export var StyledToastText = /*#__PURE__*/styled.span.withConfig({
|
|
18
18
|
displayName: "StyledToastText",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_5_0__sc-1l6lk2n-1"
|
|
20
20
|
})(["", " font-weight:", ";overflow:hidden;", ""], getTypographyIntent('body'), typographyWeights.semibold, function (_ref2) {
|
|
21
21
|
var $legacy = _ref2.$legacy;
|
|
22
22
|
return $legacy ? "margin-left: ".concat(spacing.lg, "px;") : "padding: 0 ".concat(spacing.lg, "px;");
|
|
23
23
|
});
|
|
24
24
|
export var StyledToastButton = /*#__PURE__*/styled(Button).withConfig({
|
|
25
25
|
displayName: "StyledToastButton",
|
|
26
|
-
componentId: "core-
|
|
26
|
+
componentId: "core-12_5_0__sc-1l6lk2n-2"
|
|
27
27
|
})(["line-height:0;color:", ";padding:0;margin-left:auto;"], colors.white);
|
|
28
28
|
//# sourceMappingURL=Toast.styles.js.map
|
|
@@ -3,7 +3,7 @@ import { Button } from '../Button/Button';
|
|
|
3
3
|
import { colors } from '../_styles/colors';
|
|
4
4
|
export var StyledToggleButton = /*#__PURE__*/styled(Button).withConfig({
|
|
5
5
|
displayName: "StyledToggleButton",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_5_0__sc-1x59fxi-0"
|
|
7
7
|
})(["", "}"], function (_ref) {
|
|
8
8
|
var $selected = _ref.$selected;
|
|
9
9
|
return $selected && css(["background-color:", ";color:", ";&:hover{background-color:", ";color:", ";}&:focus{background-color:", ";color:", ";}&:disabled{background-color:", ";color:", ";}"], colors.blue50, colors.white, colors.blue40, colors.white, colors.blue50, colors.white, colors.blue85, colors.white);
|
|
@@ -6,15 +6,15 @@ import { getEllipsis, getFocus } from '../_styles/mixins';
|
|
|
6
6
|
import { spacing } from '../_styles/spacing';
|
|
7
7
|
export var StyledLabel = /*#__PURE__*/styled.span.withConfig({
|
|
8
8
|
displayName: "StyledLabel",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_5_0__sc-zqi94b-0"
|
|
10
10
|
})(["", " ", " flex:0 1 auto;"], getTypographyIntent('body'), getEllipsis);
|
|
11
11
|
export var StyledRemove = /*#__PURE__*/styled(Clear).withConfig({
|
|
12
12
|
displayName: "StyledRemove",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_5_0__sc-zqi94b-1"
|
|
14
14
|
})(["border-radius:100%;cursor:pointer;flex:0 0 auto;height:16px;margin:0 -", "px 0 ", "px;width:16px;&:hover{background:", ";color:", ";}"], spacing.sm, spacing.sm, colors.white, colors.blue40);
|
|
15
15
|
export var StyledToken = /*#__PURE__*/styled.div.withConfig({
|
|
16
16
|
displayName: "StyledToken",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_5_0__sc-zqi94b-2"
|
|
18
18
|
})(["align-items:center;background-color:", ";border-radius:200px;border:1px solid transparent;color:", ";cursor:default;display:inline-flex;height:24px;line-height:1;max-width:360px;min-width:48px;padding:", "px ", "px;&:hover,&.hover{background-color:", ";}", " ", " ", ""], colors.blue50, colors.white, spacing.xs, spacing.md, colors.blue45, function (_ref) {
|
|
19
19
|
var _ref$$focused = _ref.$focused,
|
|
20
20
|
$focused = _ref$$focused === void 0 ? false : _ref$$focused,
|
|
@@ -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_5_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_5_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_5_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_5_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_5_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_5_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
|
|
@@ -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_5_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_5_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
|
|
@@ -8,8 +8,8 @@ export declare const StyledTreeRowContainer: import("styled-components").StyledC
|
|
|
8
8
|
}, never>;
|
|
9
9
|
export declare const StyledTreeRowContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
10
|
export declare const StyledTreeRowWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
-
export declare const StyledChevronContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("
|
|
12
|
-
export declare const StyledIconContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("
|
|
11
|
+
export declare const StyledChevronContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
12
|
+
export declare const StyledIconContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {
|
|
13
13
|
$isSelected?: boolean | undefined;
|
|
14
14
|
}, never>;
|
|
15
15
|
export declare const StyledChevron: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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_5_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.js
CHANGED
|
@@ -18,6 +18,7 @@ import jaJP from '../_locales/ja-JP.json';
|
|
|
18
18
|
import ptBR from '../_locales/pt-BR.json';
|
|
19
19
|
import thTH from '../_locales/th-TH.json';
|
|
20
20
|
import zhSG from '../_locales/zh-SG.json';
|
|
21
|
+
import { OVERWRITE_LOCALE_MAP } from './getI18nProviderLocale';
|
|
21
22
|
/* Set up i18n-js */
|
|
22
23
|
export var coreTranslations = {
|
|
23
24
|
'de-DE': deDE,
|
|
@@ -40,28 +41,56 @@ function getValidLocale(_ref) {
|
|
|
40
41
|
translations = _ref.translations;
|
|
41
42
|
return locale;
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
var FALLBACK_LOCALE_MAP = {
|
|
45
|
+
'es-ES': 'es',
|
|
46
|
+
'fr-FR': 'fr-CA'
|
|
47
|
+
};
|
|
48
|
+
function getTranslationFallbacks(locale) {
|
|
49
|
+
if (locale === 'en') {
|
|
50
|
+
return ['en'];
|
|
51
|
+
}
|
|
52
|
+
if (OVERWRITE_LOCALE_MAP[locale]) {
|
|
53
|
+
return [OVERWRITE_LOCALE_MAP[locale], 'en'];
|
|
54
|
+
}
|
|
55
|
+
if (FALLBACK_LOCALE_MAP[locale]) {
|
|
56
|
+
return [locale, FALLBACK_LOCALE_MAP[locale], 'en'];
|
|
57
|
+
}
|
|
58
|
+
return [locale, 'en'];
|
|
59
|
+
}
|
|
60
|
+
function setTranslationFallbacks(_ref2) {
|
|
61
|
+
var I18n = _ref2.I18n,
|
|
62
|
+
locale = _ref2.locale;
|
|
63
|
+
I18n.locales[locale] = function () {
|
|
64
|
+
return getTranslationFallbacks(locale);
|
|
65
|
+
};
|
|
66
|
+
return I18n;
|
|
67
|
+
}
|
|
68
|
+
export function useI18n(_ref3) {
|
|
69
|
+
var _locale = _ref3.locale,
|
|
70
|
+
_ref3$translations = _ref3.translations,
|
|
71
|
+
_translations = _ref3$translations === void 0 ? {} : _ref3$translations;
|
|
47
72
|
var translations = R.mergeDeepLeft(_translations, coreTranslations);
|
|
48
73
|
var locale = getValidLocale({
|
|
49
74
|
locale: _locale,
|
|
50
75
|
translations: translations
|
|
51
76
|
});
|
|
52
|
-
|
|
77
|
+
var I18n = createI18njs({
|
|
53
78
|
locale: locale,
|
|
54
79
|
translations: translations
|
|
55
80
|
});
|
|
81
|
+
return setTranslationFallbacks({
|
|
82
|
+
I18n: I18n,
|
|
83
|
+
locale: locale || 'en'
|
|
84
|
+
});
|
|
56
85
|
}
|
|
57
86
|
export var I18nContext = /*#__PURE__*/React.createContext(createI18njs({
|
|
58
87
|
locale: 'en',
|
|
59
88
|
translations: coreTranslations // inject our translations
|
|
60
89
|
}));
|
|
61
90
|
|
|
62
|
-
export function I18nProvider(
|
|
63
|
-
var children =
|
|
64
|
-
props = _objectWithoutProperties(
|
|
91
|
+
export function I18nProvider(_ref4) {
|
|
92
|
+
var children = _ref4.children,
|
|
93
|
+
props = _objectWithoutProperties(_ref4, _excluded);
|
|
65
94
|
return /*#__PURE__*/React.createElement(I18nContext.Provider, {
|
|
66
95
|
value: useI18n(props)
|
|
67
96
|
}, children);
|
package/dist/_hooks/I18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18n.js","names":["createI18njs","R","React","deDE","enAU","enCA","enGB","en","esES","es","frCA","frFR","isIS","jaJP","ptBR","thTH","zhSG","coreTranslations","getValidLocale","_ref","locale","translations","
|
|
1
|
+
{"version":3,"file":"I18n.js","names":["createI18njs","R","React","deDE","enAU","enCA","enGB","en","esES","es","frCA","frFR","isIS","jaJP","ptBR","thTH","zhSG","OVERWRITE_LOCALE_MAP","coreTranslations","getValidLocale","_ref","locale","translations","FALLBACK_LOCALE_MAP","getTranslationFallbacks","setTranslationFallbacks","_ref2","I18n","locales","useI18n","_ref3","_locale","_ref3$translations","_translations","mergeDeepLeft","I18nContext","createContext","I18nProvider","_ref4","children","props","_objectWithoutProperties","_excluded","createElement","Provider","value","useI18nContext","ctx","useContext"],"sources":["../../src/_hooks/I18n.tsx"],"sourcesContent":["import type { I18njs, I18njsConfig } from '@procore/core-i18n-js'\nimport { createI18njs } from '@procore/core-i18n-js'\nimport * as R from 'ramda'\nimport React from 'react'\nimport deDE from '../_locales/de-DE.json'\nimport enAU from '../_locales/en-AU.json'\nimport enCA from '../_locales/en-CA.json'\nimport enGB from '../_locales/en-GB.json'\nimport en from '../_locales/en.json'\nimport esES from '../_locales/es-ES.json'\nimport es from '../_locales/es.json'\nimport frCA from '../_locales/fr-CA.json'\nimport frFR from '../_locales/fr-FR.json'\nimport isIS from '../_locales/is-IS.json'\nimport jaJP from '../_locales/ja-JP.json'\nimport ptBR from '../_locales/pt-BR.json'\nimport thTH from '../_locales/th-TH.json'\nimport zhSG from '../_locales/zh-SG.json'\nimport { OVERWRITE_LOCALE_MAP } from './getI18nProviderLocale'\n\ntype I18nConfig = Omit<I18njsConfig, 'I18n'>\n\ntype RequiredI18nConfig = {\n I18n: I18njs\n locale: string\n}\n\nexport type Locale =\n | 'de-DE'\n | 'en-AE'\n | 'en-AU'\n | 'en-CA'\n | 'en-GB'\n | 'en-SG'\n | 'en'\n | 'es-ES'\n | 'es'\n | 'fr-CA'\n | 'fr-FR'\n | 'is-IS'\n | 'ja-JP'\n | 'pt-BR'\n | 'th-TH'\n | 'zh-SG'\n | 'pseudo'\n\n/* Set up i18n-js */\nexport const coreTranslations = {\n 'de-DE': deDE,\n en,\n 'en-AU': enAU,\n 'en-CA': enCA,\n 'en-GB': enGB,\n es,\n 'es-ES': esES,\n 'fr-CA': frCA,\n 'fr-FR': frFR,\n 'is-IS': isIS,\n 'ja-JP': jaJP,\n 'pt-BR': ptBR,\n 'th-TH': thTH,\n 'zh-SG': zhSG,\n} as const\n\nfunction getValidLocale({ locale, translations }: I18njsConfig) {\n return locale\n}\n\nconst FALLBACK_LOCALE_MAP: Record<string, string> = {\n 'es-ES': 'es',\n 'fr-FR': 'fr-CA',\n}\n\nfunction getTranslationFallbacks(locale: string) {\n if (locale === 'en') {\n return ['en']\n }\n\n if (OVERWRITE_LOCALE_MAP[locale]) {\n return [OVERWRITE_LOCALE_MAP[locale], 'en']\n }\n\n if (FALLBACK_LOCALE_MAP[locale]) {\n return [locale, FALLBACK_LOCALE_MAP[locale], 'en']\n }\n\n return [locale, 'en']\n}\n\nfunction setTranslationFallbacks({ I18n, locale }: RequiredI18nConfig) {\n I18n.locales[locale] = function () {\n return getTranslationFallbacks(locale)\n }\n\n return I18n\n}\n\nexport function useI18n({\n locale: _locale,\n translations: _translations = {},\n}: I18njsConfig): I18njs {\n const translations = R.mergeDeepLeft(_translations, coreTranslations)\n const locale = getValidLocale({ locale: _locale, translations })\n const I18n = createI18njs({\n locale,\n translations,\n })\n return setTranslationFallbacks({ I18n, locale: locale || 'en' })\n}\n\nexport const I18nContext: React.Context<I18njs> = React.createContext(\n createI18njs({\n locale: 'en',\n translations: coreTranslations, // inject our translations\n })\n)\n\nexport function I18nProvider({\n children,\n ...props\n}: I18nConfig & { children: React.ReactNode }) {\n return (\n <I18nContext.Provider value={useI18n(props)}>\n {children}\n </I18nContext.Provider>\n )\n}\n\nexport function useI18nContext() {\n const ctx = React.useContext(I18nContext)\n\n if (!ctx) {\n // TODO investigate a way to do warnings that won't annoy people\n // we probably need to introduce a build system to have nice dev warnings\n // console.warn()\n }\n\n return ctx\n}\n"],"mappings":"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"}
|
|
@@ -5,7 +5,7 @@ var SUPPORTED_LOCALES = ['de-DE', 'en-AU', 'en-CA', 'en-GB', 'en', 'es-ES', 'es'
|
|
|
5
5
|
this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7
|
|
6
6
|
for any locales that are not listed in SUPPORTED_LOCALES
|
|
7
7
|
*/
|
|
8
|
-
var OVERWRITE_LOCALE_MAP = {
|
|
8
|
+
export var OVERWRITE_LOCALE_MAP = {
|
|
9
9
|
'en-AE': 'en-GB',
|
|
10
10
|
'en-SG': 'en-GB',
|
|
11
11
|
'es-419': 'es'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getI18nProviderLocale.js","names":["SUPPORTED_LOCALES","OVERWRITE_LOCALE_MAP","getI18nProviderLocale","envLocale","includes"],"sources":["../../src/_hooks/getI18nProviderLocale.ts"],"sourcesContent":["import type { Locale } from './I18n'\n\n// All and only locales that will receive smartling translations and can be directly fed into <I18nProvider>\nconst SUPPORTED_LOCALES: Locale[] = [\n 'de-DE',\n 'en-AU',\n 'en-CA',\n 'en-GB',\n 'en',\n 'es-ES',\n 'es',\n 'fr-CA',\n 'fr-FR',\n 'is-IS',\n 'ja-JP',\n 'pt-BR',\n 'th-TH',\n 'zh-SG',\n]\n/*\n all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'\n this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7\n for any locales that are not listed in SUPPORTED_LOCALES\n*/\
|
|
1
|
+
{"version":3,"file":"getI18nProviderLocale.js","names":["SUPPORTED_LOCALES","OVERWRITE_LOCALE_MAP","getI18nProviderLocale","envLocale","includes"],"sources":["../../src/_hooks/getI18nProviderLocale.ts"],"sourcesContent":["import type { Locale } from './I18n'\n\n// All and only locales that will receive smartling translations and can be directly fed into <I18nProvider>\nconst SUPPORTED_LOCALES: Locale[] = [\n 'de-DE',\n 'en-AU',\n 'en-CA',\n 'en-GB',\n 'en',\n 'es-ES',\n 'es',\n 'fr-CA',\n 'fr-FR',\n 'is-IS',\n 'ja-JP',\n 'pt-BR',\n 'th-TH',\n 'zh-SG',\n]\n/*\n all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'\n this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7\n for any locales that are not listed in SUPPORTED_LOCALES\n*/\nexport const OVERWRITE_LOCALE_MAP: Record<string, Locale> = {\n 'en-AE': 'en-GB',\n 'en-SG': 'en-GB',\n 'es-419': 'es',\n} as const\n\n/**\n * Returns the locale that should be used for the I18nProvider based on the environment locale\n * @param envLocale - the locale from the environment\n * @returns the locale that should be used for the I18nProvider\n */\nexport function getI18nProviderLocale(envLocale: string): Locale {\n if (SUPPORTED_LOCALES.includes(envLocale as Locale)) {\n return envLocale as Locale\n }\n if (OVERWRITE_LOCALE_MAP[envLocale]) {\n return OVERWRITE_LOCALE_MAP[envLocale]\n }\n\n return 'en'\n}\n"],"mappings":"AAEA;AACA,IAAMA,iBAA2B,GAAG,CAClC,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,CACR;AACD;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,oBAA4C,GAAG;EAC1D,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,OAAO;EAChB,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAACC,SAAiB,EAAU;EAC/D,IAAIH,iBAAiB,CAACI,QAAQ,CAACD,SAAmB,CAAC,EAAE;IACnD,OAAOA,SAAS;EAClB;EACA,IAAIF,oBAAoB,CAACE,SAAS,CAAC,EAAE;IACnC,OAAOF,oBAAoB,CAACE,SAAS,CAAC;EACxC;EAEA,OAAO,IAAI;AACb"}
|