@procore/core-react 12.45.0 → 12.46.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 +14 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +4 -4
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/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 +9 -9
- package/dist/EmptyState/EmptyState.d.ts +3 -5
- package/dist/EmptyState/EmptyState.js.map +1 -1
- package/dist/EmptyState/EmptyState.styles.d.ts +2 -2
- package/dist/EmptyState/EmptyState.styles.js +10 -10
- package/dist/EmptyState/EmptyState.styles.js.map +1 -1
- package/dist/EmptyState/EmptyState.types.d.ts +11 -0
- package/dist/EmptyState/EmptyState.types.js.map +1 -1
- 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.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.js +1 -0
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.d.ts +2 -4
- 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 +6 -6
- 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.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +3 -3
- 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 +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 +8 -8
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +39 -39
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/OverdueContext.d.ts +4 -0
- package/dist/Table/OverdueContext.js +10 -0
- package/dist/Table/OverdueContext.js.map +1 -0
- package/dist/Table/OverdueContext.types.d.ts +6 -0
- package/dist/Table/OverdueContext.types.js +2 -0
- package/dist/Table/OverdueContext.types.js.map +1 -0
- package/dist/Table/Table.js +58 -10
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/Table.styles.d.ts +9 -0
- package/dist/Table/Table.styles.js +52 -45
- package/dist/Table/Table.styles.js.map +1 -1
- package/dist/Table/Table.types.d.ts +7 -0
- package/dist/Table/Table.types.js.map +1 -1
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +16 -16
- 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.d.ts +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.js +14 -4
- package/dist/ThumbnailGrid/ThumbnailGrid.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/ThumbnailGrid/ThumbnailGrid.types.d.ts +34 -6
- package/dist/ThumbnailGrid/ThumbnailGrid.types.js.map +1 -1
- 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.js +20 -4
- package/dist/Token/Token.js.map +1 -1
- package/dist/Token/Token.styles.d.ts +2 -0
- package/dist/Token/Token.styles.js +14 -5
- package/dist/Token/Token.styles.js.map +1 -1
- package/dist/Token/Token.types.d.ts +3 -1
- package/dist/Token/Token.types.js.map +1 -1
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.js +23 -18
- package/dist/Tooltip/Tooltip.js.map +1 -1
- 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 +49 -11
- package/dist/_locales/de-DE.json +2 -0
- package/dist/_locales/en-AU.json +2 -0
- package/dist/_locales/en-CA.json +2 -0
- package/dist/_locales/en-GB.json +2 -0
- package/dist/_locales/en.json +3 -1
- package/dist/_locales/es-ES.json +2 -0
- package/dist/_locales/es.json +2 -0
- package/dist/_locales/fr-CA.json +2 -0
- package/dist/_locales/fr-FR.json +2 -0
- package/dist/_locales/is-IS.json +2 -0
- package/dist/_locales/it-IT.json +3 -1
- package/dist/_locales/ja-JP.json +2 -0
- package/dist/_locales/nb-NO.json +6 -4
- package/dist/_locales/pl-PL.json +2 -0
- package/dist/_locales/pseudo.json +3 -1
- package/dist/_locales/pt-BR.json +2 -0
- package/dist/_locales/pt-PT.json +4 -2
- package/dist/_locales/th-TH.json +2 -0
- package/dist/_locales/zh-SG.json +2 -0
- package/dist/_locales/zh-TW.json +2 -0
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +4 -4
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +25 -25
- 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 +14 -14
- 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 +38 -38
- 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 +39 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- 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 +84 -84
- package/dist/_typedoc/Modal/Modal.types.json +48 -48
- 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 +28 -28
- 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 +122 -102
- package/dist/_typedoc/Tabs/Tabs.types.json +21 -21
- 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 +11 -11
- 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 +1 -1
|
@@ -22,40 +22,40 @@ var styledSelectButtonDefaultWidth = 248;
|
|
|
22
22
|
export var extendedSelectMenuWidth = 360;
|
|
23
23
|
export var PillSelectOptionWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
displayName: "PillSelectOptionWrapper",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-12_46_0__sc-1uf5708-0"
|
|
26
26
|
})(["display:flex;align-items:center;justify-content:space-between;padding:", "px ", "px;"], spacing.xs, spacing.lg);
|
|
27
27
|
export var PillSelectLabel = /*#__PURE__*/styled(Pill).withConfig({
|
|
28
28
|
displayName: "PillSelectLabel",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_46_0__sc-1uf5708-1"
|
|
30
30
|
})(["", ""], getEllipsis);
|
|
31
31
|
export var PillSelectLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
32
32
|
displayName: "PillSelectLabelWrapper",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-12_46_0__sc-1uf5708-2"
|
|
34
34
|
})(["display:flex;max-width:100%;pointer-events:auto;", ""], function (_ref) {
|
|
35
35
|
var disabled = _ref.disabled;
|
|
36
36
|
return disabled && css(["pointer-events:none;"]);
|
|
37
37
|
});
|
|
38
38
|
export var StyledCheckboxContainer = /*#__PURE__*/styled.div.withConfig({
|
|
39
39
|
displayName: "StyledCheckboxContainer",
|
|
40
|
-
componentId: "core-
|
|
40
|
+
componentId: "core-12_46_0__sc-1uf5708-3"
|
|
41
41
|
})(["padding-left:", "px;"], spacing.lg);
|
|
42
42
|
export var StyledCheckmarkContainer = /*#__PURE__*/styled.div.withConfig({
|
|
43
43
|
displayName: "StyledCheckmarkContainer",
|
|
44
|
-
componentId: "core-
|
|
44
|
+
componentId: "core-12_46_0__sc-1uf5708-4"
|
|
45
45
|
})(["align-items:center;color:", ";display:inline-flex;flex-shrink:0;padding:0 ", "px 0 ", "px;"], colors.blue50, spacing.lg, spacing.sm);
|
|
46
46
|
|
|
47
47
|
// Do not merge with StyledMenu, needed for max-height working in IE
|
|
48
48
|
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledWrapper",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_46_0__sc-1uf5708-5"
|
|
51
51
|
})(["display:flex;max-height:inherit;min-width:inherit;outline:none;width:inherit;"]);
|
|
52
52
|
export var StyledMenu = /*#__PURE__*/styled.div.withConfig({
|
|
53
53
|
displayName: "StyledMenu",
|
|
54
|
-
componentId: "core-
|
|
54
|
+
componentId: "core-12_46_0__sc-1uf5708-6"
|
|
55
55
|
})(["display:flex;flex-direction:column;outline:0;width:100%;"]);
|
|
56
56
|
export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
|
|
57
57
|
displayName: "StyledOptions",
|
|
58
|
-
componentId: "core-
|
|
58
|
+
componentId: "core-12_46_0__sc-1uf5708-7"
|
|
59
59
|
})(["flex-basis:auto;flex-grow:1;flex-shrink:1;min-height:", "px;", ";padding:", "px 0;position:relative;overflow:hidden;&:focus{", " margin:-1px;}"], optionMinHeight, function (_ref2) {
|
|
60
60
|
var _ref2$$scrollable = _ref2.$scrollable,
|
|
61
61
|
$scrollable = _ref2$$scrollable === void 0 ? true : _ref2$$scrollable;
|
|
@@ -63,53 +63,53 @@ export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
|
|
|
63
63
|
}, spacing.sm, getFocus());
|
|
64
64
|
export var StyledItemContent = /*#__PURE__*/styled.div.withConfig({
|
|
65
65
|
displayName: "StyledItemContent",
|
|
66
|
-
componentId: "core-
|
|
66
|
+
componentId: "core-12_46_0__sc-1uf5708-8"
|
|
67
67
|
})(["display:flex;flex-direction:row;align-items:center;"]);
|
|
68
68
|
export var StyledOptionGroupLabel = /*#__PURE__*/styled.div.withConfig({
|
|
69
69
|
displayName: "StyledOptionGroupLabel",
|
|
70
|
-
componentId: "core-
|
|
70
|
+
componentId: "core-12_46_0__sc-1uf5708-9"
|
|
71
71
|
})(["padding:", "px 0 ", "px ", "px;"], spacing.md, spacing.xs, spacing.lg);
|
|
72
72
|
export var StyledItemLabel = /*#__PURE__*/styled.div.withConfig({
|
|
73
73
|
displayName: "StyledItemLabel",
|
|
74
|
-
componentId: "core-
|
|
74
|
+
componentId: "core-12_46_0__sc-1uf5708-10"
|
|
75
75
|
})(["", ""], function (_ref3) {
|
|
76
76
|
var $draggable = _ref3.$draggable;
|
|
77
77
|
return css(["padding:", "px ", "px;overflow-wrap:anywhere;"], spacing.xs, $draggable ? 0 : spacing.lg);
|
|
78
78
|
});
|
|
79
79
|
export var StyledDraggableWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
80
80
|
displayName: "StyledDraggableWrapper",
|
|
81
|
-
componentId: "core-
|
|
81
|
+
componentId: "core-12_46_0__sc-1uf5708-11"
|
|
82
82
|
})(["display:flex;width:100%;align-items:center;"]);
|
|
83
83
|
export var StyledGrip = /*#__PURE__*/styled.div.withConfig({
|
|
84
84
|
displayName: "StyledGrip",
|
|
85
|
-
componentId: "core-
|
|
85
|
+
componentId: "core-12_46_0__sc-1uf5708-12"
|
|
86
86
|
})(["padding:0 2px;height:24px;visibility:hidden;"]);
|
|
87
87
|
export var StyledFooter = /*#__PURE__*/styled(Box).withConfig({
|
|
88
88
|
displayName: "StyledFooter",
|
|
89
|
-
componentId: "core-
|
|
89
|
+
componentId: "core-12_46_0__sc-1uf5708-13"
|
|
90
90
|
})(["border-top:1px solid ", ";"], colors.gray85);
|
|
91
91
|
export var StyledHeader = /*#__PURE__*/styled.div.withConfig({
|
|
92
92
|
displayName: "StyledHeader",
|
|
93
|
-
componentId: "core-
|
|
93
|
+
componentId: "core-12_46_0__sc-1uf5708-14"
|
|
94
94
|
})([""]);
|
|
95
95
|
export var StyledEmptyMessage = /*#__PURE__*/styled.div.withConfig({
|
|
96
96
|
displayName: "StyledEmptyMessage",
|
|
97
|
-
componentId: "core-
|
|
97
|
+
componentId: "core-12_46_0__sc-1uf5708-15"
|
|
98
98
|
})(["", ";padding:", "px ", "px;color:", ";"], getTypographyIntent('body'), spacing.md, spacing.lg, colors.gray45);
|
|
99
99
|
export var StyledSearchContainer = /*#__PURE__*/styled.div.withConfig({
|
|
100
100
|
displayName: "StyledSearchContainer",
|
|
101
|
-
componentId: "core-
|
|
101
|
+
componentId: "core-12_46_0__sc-1uf5708-16"
|
|
102
102
|
})(["padding:", "px ", "px ", "px;", " > *{pointer-events:none;}"], spacing.lg, spacing.lg, spacing.sm, StyledButton);
|
|
103
103
|
export var StyledGroup = /*#__PURE__*/styled.div.withConfig({
|
|
104
104
|
displayName: "StyledGroup",
|
|
105
|
-
componentId: "core-
|
|
105
|
+
componentId: "core-12_46_0__sc-1uf5708-17"
|
|
106
106
|
})(["", " color:", ";cursor:", ";font-weight:", ";padding:", "px ", "px;&:not(:first-child){padding-top:", "px;}&&{padding:0;}", "{padding:", "px ", " px;}&:not(:first-child){", "{padding-top:", " px;}}"], getTypographyIntent('body'), colors.gray15, function (_ref4) {
|
|
107
107
|
var $clickable = _ref4.$clickable;
|
|
108
108
|
return $clickable ? 'pointer' : 'default';
|
|
109
109
|
}, typographyWeights.semibold, spacing.xs, spacing.lg, spacing.md + spacing.xs, StyledOptionGroupLabel, spacing.xs, spacing.lg, StyledOptionGroupLabel, spacing.md + spacing.xs);
|
|
110
110
|
export var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
111
111
|
displayName: "StyledItem",
|
|
112
|
-
componentId: "core-
|
|
112
|
+
componentId: "core-12_46_0__sc-1uf5708-18"
|
|
113
113
|
})(["", ";align-items:center;cursor:pointer;list-style-type:none;display:flex;padding:0;", " ", " ", " a{color:", ";display:block;margin:-", "px -", "px;padding:", "px ", "px;text-decoration:none;&:hover{color:", ";text-decoration:none;}}&[data-highlighted='true']{background-color:", ";}", " &:hover,&:active{", "{visibility:visible;}}", "{color:inherit;cursor:pointer;}", " ", " ", ""], getTypographyIntent('body'), function (_ref5) {
|
|
114
114
|
var $emptyMinHeight = _ref5.$emptyMinHeight;
|
|
115
115
|
return css(["&:empty{min-height:", "px;}"], $emptyMinHeight);
|
|
@@ -147,54 +147,54 @@ export var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
|
147
147
|
});
|
|
148
148
|
export var StyledSelectAll = /*#__PURE__*/styled(Box).withConfig({
|
|
149
149
|
displayName: "StyledSelectAll",
|
|
150
|
-
componentId: "core-
|
|
150
|
+
componentId: "core-12_46_0__sc-1uf5708-19"
|
|
151
151
|
})(["padding-top:", "px;padding-bottom:", "px;border-bottom:1px solid ", ";"], spacing.md, spacing.md, colors.gray85);
|
|
152
152
|
export var StyledDroppable = /*#__PURE__*/styled.div.withConfig({
|
|
153
153
|
displayName: "StyledDroppable",
|
|
154
|
-
componentId: "core-
|
|
154
|
+
componentId: "core-12_46_0__sc-1uf5708-20"
|
|
155
155
|
})(["", ",", "{padding-left:28px;}"], StyledGroup, StyledItem);
|
|
156
156
|
export var StyledSelectMenu = /*#__PURE__*/styled(Card).withConfig({
|
|
157
157
|
displayName: "StyledSelectMenu",
|
|
158
|
-
componentId: "core-
|
|
158
|
+
componentId: "core-12_46_0__sc-1uf5708-21"
|
|
159
159
|
})(["display:flex;max-height:40vh;max-width:", "px;min-width:inherit;"], styledSelectButtonDefaultWidth);
|
|
160
160
|
export var StyledLabel = /*#__PURE__*/styled.div.withConfig({
|
|
161
161
|
displayName: "StyledLabel",
|
|
162
|
-
componentId: "core-
|
|
162
|
+
componentId: "core-12_46_0__sc-1uf5708-22"
|
|
163
163
|
})(["", " flex-grow:1;margin-right:", "px;outline:none;pointer-events:", ";user-select:none;"], getEllipsis(), spacing.sm, function (_ref10) {
|
|
164
164
|
var $hoverable = _ref10.$hoverable;
|
|
165
165
|
return $hoverable ? 'initial' : 'none';
|
|
166
166
|
});
|
|
167
167
|
export var StyledIndicators = /*#__PURE__*/styled.div.withConfig({
|
|
168
168
|
displayName: "StyledIndicators",
|
|
169
|
-
componentId: "core-
|
|
169
|
+
componentId: "core-12_46_0__sc-1uf5708-23"
|
|
170
170
|
})(["align-items:center;align-self:flex-start;display:flex;height:34px;justify-content:flex-end;margin-left:", "px;min-width:40px;width:40px;"], spacing.xs);
|
|
171
171
|
export var StyledClearIcon = /*#__PURE__*/styled(Button).withConfig({
|
|
172
172
|
displayName: "StyledClearIcon",
|
|
173
|
-
componentId: "core-
|
|
173
|
+
componentId: "core-12_46_0__sc-1uf5708-24"
|
|
174
174
|
})([""]);
|
|
175
175
|
export var StyledSpinner = /*#__PURE__*/styled.div.withConfig({
|
|
176
176
|
displayName: "StyledSpinner",
|
|
177
|
-
componentId: "core-
|
|
177
|
+
componentId: "core-12_46_0__sc-1uf5708-25"
|
|
178
178
|
})(["align-items:center;display:flex;flex:0 0 auto;justify-content:center;line-height:0;"]);
|
|
179
179
|
export var StyledArrowContainer = /*#__PURE__*/styled.div.withConfig({
|
|
180
180
|
displayName: "StyledArrowContainer",
|
|
181
|
-
componentId: "core-
|
|
181
|
+
componentId: "core-12_46_0__sc-1uf5708-26"
|
|
182
182
|
})(["align-items:center;display:inline-flex;height:16px;justify-content:flex-end;margin-left:", "px;width:8px;"], spacing.sm);
|
|
183
183
|
export var StyledArrow = /*#__PURE__*/styled.span.withConfig({
|
|
184
184
|
displayName: "StyledArrow",
|
|
185
|
-
componentId: "core-
|
|
185
|
+
componentId: "core-12_46_0__sc-1uf5708-27"
|
|
186
186
|
})(["display:inline-flex;svg{fill:", ";}"], colors.gray45);
|
|
187
187
|
export var StyledArrowOutline = /*#__PURE__*/styled.polygon.withConfig({
|
|
188
188
|
displayName: "StyledArrowOutline",
|
|
189
|
-
componentId: "core-
|
|
189
|
+
componentId: "core-12_46_0__sc-1uf5708-28"
|
|
190
190
|
})([""]);
|
|
191
191
|
export var StyledArrowFill = /*#__PURE__*/styled.polygon.withConfig({
|
|
192
192
|
displayName: "StyledArrowFill",
|
|
193
|
-
componentId: "core-
|
|
193
|
+
componentId: "core-12_46_0__sc-1uf5708-29"
|
|
194
194
|
})([""]);
|
|
195
195
|
export var StyledTrigger = /*#__PURE__*/styled.div.withConfig({
|
|
196
196
|
displayName: "StyledTrigger",
|
|
197
|
-
componentId: "core-
|
|
197
|
+
componentId: "core-12_46_0__sc-1uf5708-30"
|
|
198
198
|
})(["", " align-items:center;background-color:", ";border-color:", ";border-radius:", "px;border-style:solid;border-width:1px;color:", ";cursor:pointer;display:inline-flex;height:36px;min-height:36px;outline:none;padding:0 ", "px;position:relative;white-space:nowrap;width:", ";&::placeholder{border-color:", ";}&:hover,&:active,&[data-qa=", "]{background-color:", ";border-color:", ";color:", ";}&:focus,&:focus-within,&[data-qa=", "]{", " ", "{stroke:", ";}}", " ", " ", " ", " ", " ", " ", "}"], getTypographyIntent('body'), colors.white, colors.gray50, borderRadius.md, colors.gray15, spacing.md, function (_ref11) {
|
|
199
199
|
var $block = _ref11.$block;
|
|
200
200
|
return $block ? '100%' : "".concat(styledSelectButtonDefaultWidth, "px");
|
|
@@ -229,35 +229,35 @@ export var StyledTrigger = /*#__PURE__*/styled.div.withConfig({
|
|
|
229
229
|
});
|
|
230
230
|
export var StyledOverlay = /*#__PURE__*/styled(Card).withConfig({
|
|
231
231
|
displayName: "StyledOverlay",
|
|
232
|
-
componentId: "core-
|
|
232
|
+
componentId: "core-12_46_0__sc-1uf5708-31"
|
|
233
233
|
})(["display:flex;flex-direction:column;"]);
|
|
234
234
|
export var StyledVirtuoso = /*#__PURE__*/styled(Virtuoso).withConfig({
|
|
235
235
|
displayName: "StyledVirtuoso",
|
|
236
|
-
componentId: "core-
|
|
236
|
+
componentId: "core-12_46_0__sc-1uf5708-32"
|
|
237
237
|
})(["flex:1 1 auto;"]);
|
|
238
238
|
export var StyledEllipses = /*#__PURE__*/styled.div.withConfig({
|
|
239
239
|
displayName: "StyledEllipses",
|
|
240
|
-
componentId: "core-
|
|
240
|
+
componentId: "core-12_46_0__sc-1uf5708-33"
|
|
241
241
|
})(["", " display:inline-flex;> div{display:inline-flex;width:100%;}"], getEllipsis());
|
|
242
242
|
export var StyledMultiValueContainer = /*#__PURE__*/styled.div.withConfig({
|
|
243
243
|
displayName: "StyledMultiValueContainer",
|
|
244
|
-
componentId: "core-
|
|
244
|
+
componentId: "core-12_46_0__sc-1uf5708-34"
|
|
245
245
|
})(["display:flex;flex-wrap:wrap;margin-bottom:2px;margin-right:", "px;margin-top:2px;min-width:0;width:100%;"], spacing.xs);
|
|
246
246
|
export var StyledTokenList = /*#__PURE__*/styled.ul.withConfig({
|
|
247
247
|
displayName: "StyledTokenList",
|
|
248
|
-
componentId: "core-
|
|
248
|
+
componentId: "core-12_46_0__sc-1uf5708-35"
|
|
249
249
|
})(["display:contents;list-style:none;margin:0;padding:0;"]);
|
|
250
250
|
export var StyledMultiValue = /*#__PURE__*/styled.li.withConfig({
|
|
251
251
|
displayName: "StyledMultiValue",
|
|
252
|
-
componentId: "core-
|
|
252
|
+
componentId: "core-12_46_0__sc-1uf5708-36"
|
|
253
253
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:0 1 auto;> div{max-width:178px;width:100%;}"], spacing.xs);
|
|
254
254
|
export var StyledMultiInputContainer = /*#__PURE__*/styled.div.withConfig({
|
|
255
255
|
displayName: "StyledMultiInputContainer",
|
|
256
|
-
componentId: "core-
|
|
256
|
+
componentId: "core-12_46_0__sc-1uf5708-37"
|
|
257
257
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:1;max-width:100%;min-width:24px;"], spacing.xs);
|
|
258
258
|
export var StyledMultiInput = /*#__PURE__*/styled.button.withConfig({
|
|
259
259
|
displayName: "StyledMultiInput",
|
|
260
|
-
componentId: "core-
|
|
260
|
+
componentId: "core-12_46_0__sc-1uf5708-38"
|
|
261
261
|
})(["background-color:transparent;border-width:0;font-family:inherit;padding:0;height:24px;width:100%;text-align:left;cursor:inherit;", " ", " ", " &:focus{box-shadow:none;outline:none;}"], getTypographyIntent('body'), function (_ref19) {
|
|
262
262
|
var $isNavigatingTokens = _ref19.$isNavigatingTokens;
|
|
263
263
|
return $isNavigatingTokens && css(["color:transparent;"]);
|
|
@@ -8,19 +8,19 @@ var trackWidth = 36;
|
|
|
8
8
|
var toggleSize = 16;
|
|
9
9
|
export var StyledTrack = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "StyledTrack",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_46_0__sc-mwn4kg-0"
|
|
12
12
|
})(["background-color:", ";border-radius:", "px;height:", "px;width:", "px;position:relative;transition:0.2s;"], colors.gray70, trackHeight, trackHeight, trackWidth);
|
|
13
13
|
export var StyledToggle = /*#__PURE__*/styled.span.withConfig({
|
|
14
14
|
displayName: "StyledToggle",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_46_0__sc-mwn4kg-1"
|
|
16
16
|
})(["background-color:", ";border-radius:50%;bottom:2px;height:", "px;left:2px;position:absolute;transition:all 0.2s;width:", "px;"], colors.white, toggleSize, toggleSize);
|
|
17
17
|
export var StyledSwitchLabel = /*#__PURE__*/styled.span.withConfig({
|
|
18
18
|
displayName: "StyledSwitchLabel",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_46_0__sc-mwn4kg-2"
|
|
20
20
|
})(["", " padding-left:", "px;user-select:none;"], getTypographyIntent('body'), spacing.md);
|
|
21
21
|
export var StyledSwitchContainer = /*#__PURE__*/styled.label.withConfig({
|
|
22
22
|
displayName: "StyledSwitchContainer",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_46_0__sc-mwn4kg-3"
|
|
24
24
|
})(["cursor:pointer;display:grid;grid-template-columns:", "px 1fr;position:relative;& + &{margin-top:", "px;}", " ", " ", ""], trackWidth, spacing.md, function (_ref) {
|
|
25
25
|
var $checked = _ref.$checked;
|
|
26
26
|
return $checked && css(["", "{background-color:", ";", "{transform:translateX(", "px);}}"], StyledTrack, colors.blue50, StyledToggle, spacing.lg);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export var OverdueContext = /*#__PURE__*/React.createContext({
|
|
3
|
+
overdue: false,
|
|
4
|
+
hasExplicitIcon: false,
|
|
5
|
+
iconClaimedRef: {
|
|
6
|
+
current: false
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export var CellOverdueIconContext = /*#__PURE__*/React.createContext(false);
|
|
10
|
+
//# sourceMappingURL=OverdueContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverdueContext.js","names":["React","OverdueContext","createContext","overdue","hasExplicitIcon","iconClaimedRef","current","CellOverdueIconContext"],"sources":["../../src/Table/OverdueContext.ts"],"sourcesContent":["import React from 'react'\nimport type { OverdueContextValue } from './OverdueContext.types'\n\nexport const OverdueContext = React.createContext<OverdueContextValue>({\n overdue: false,\n hasExplicitIcon: false,\n iconClaimedRef: { current: false },\n})\n\nexport const CellOverdueIconContext = React.createContext(false)\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,OAAO,IAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAAsB;EACrEC,OAAO,EAAE,KAAK;EACdC,eAAe,EAAE,KAAK;EACtBC,cAAc,EAAE;IAAEC,OAAO,EAAE;EAAM;AACnC,CAAC,CAAC;AAEF,OAAO,IAAMC,sBAAsB,gBAAGP,KAAK,CAACE,aAAa,CAAC,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverdueContext.types.js","names":[],"sources":["../../src/Table/OverdueContext.types.ts"],"sourcesContent":["import type React from 'react'\n\nexport interface OverdueContextValue {\n overdue: boolean\n hasExplicitIcon: boolean\n iconClaimedRef: React.MutableRefObject<boolean>\n}\n"],"mappings":""}
|
package/dist/Table/Table.js
CHANGED
|
@@ -9,7 +9,7 @@ var _excluded = ["children", "inline", "variant"],
|
|
|
9
9
|
_excluded8 = ["children"],
|
|
10
10
|
_excluded9 = ["children", "colSpan", "depth"],
|
|
11
11
|
_excluded0 = ["children", "overdue"],
|
|
12
|
-
_excluded1 = ["children", "snugfit", "variant"],
|
|
12
|
+
_excluded1 = ["children", "overdueIcon", "snugfit", "variant"],
|
|
13
13
|
_excluded10 = ["children", "value", "currencyOptions"],
|
|
14
14
|
_excluded11 = ["children", "className", "disabled", "errorMessage", "processing"],
|
|
15
15
|
_excluded12 = ["children"],
|
|
@@ -38,7 +38,8 @@ import { Spinner } from '../Spinner';
|
|
|
38
38
|
import { useI18nContext } from '../_hooks/I18n';
|
|
39
39
|
import { mergeAriaIds } from '../_utils/a11y';
|
|
40
40
|
import { addSubcomponents } from '../_utils/addSubcomponents';
|
|
41
|
-
import {
|
|
41
|
+
import { CellOverdueIconContext, OverdueContext } from './OverdueContext';
|
|
42
|
+
import { StyledCarat, StyledCaratWrapper, StyledCheckbox, StyledHead, StyledIconCell, StyledLoadingContainer, StyledOverdueIcon, StyledSelectCellWrapper, StyledTable, StyledTableBodyCell, StyledTableBodyRow, StyledTableCellDateInput, StyledTableCellInput, StyledTableCellSelect, StyledTableCellText, StyledTableCellTextArea, StyledTableGroupRow, StyledTableGroupRowContent, StyledTableGroupRowHeader, StyledTableGroupRowTitle, StyledTableHeaderCell, StyledTableHeaderCellIconWrapper, StyledTableHeaderCellLabel, StyledTableHeaderCellSortableContainer, StyledTableHeaderCellSortButton, StyledTableHeaderCellSortIcon, StyledTableInlineEditContainer, StyledTableInlineEditErrorBox, StyledTableWrapper } from './Table.styles';
|
|
42
43
|
export var Table_ = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
43
44
|
var children = _ref.children,
|
|
44
45
|
inline = _ref.inline,
|
|
@@ -197,22 +198,42 @@ export var BodyRow = /*#__PURE__*/React.forwardRef(function BodyRow(_ref0, ref)
|
|
|
197
198
|
_ref0$overdue = _ref0.overdue,
|
|
198
199
|
overdue = _ref0$overdue === void 0 ? false : _ref0$overdue,
|
|
199
200
|
props = _objectWithoutProperties(_ref0, _excluded0);
|
|
200
|
-
|
|
201
|
+
var iconClaimedRef = React.useRef(false);
|
|
202
|
+
iconClaimedRef.current = false;
|
|
203
|
+
var hasExplicitIcon = React.useMemo(function () {
|
|
204
|
+
return overdue && React.Children.toArray(children).some(function (child) {
|
|
205
|
+
return /*#__PURE__*/React.isValidElement(child) && child.props.overdueIcon;
|
|
206
|
+
});
|
|
207
|
+
}, [children, overdue]);
|
|
208
|
+
var overdueContext = React.useMemo(function () {
|
|
209
|
+
return {
|
|
210
|
+
overdue: overdue,
|
|
211
|
+
hasExplicitIcon: hasExplicitIcon,
|
|
212
|
+
iconClaimedRef: iconClaimedRef
|
|
213
|
+
};
|
|
214
|
+
}, [overdue, hasExplicitIcon]);
|
|
215
|
+
return /*#__PURE__*/React.createElement(OverdueContext.Provider, {
|
|
216
|
+
value: overdueContext
|
|
217
|
+
}, /*#__PURE__*/React.createElement(StyledTableBodyRow, _extends({
|
|
201
218
|
ref: ref,
|
|
202
219
|
$overdue: overdue
|
|
203
|
-
}, props), children);
|
|
220
|
+
}, props), children));
|
|
204
221
|
});
|
|
205
222
|
export var BodyCell = /*#__PURE__*/React.forwardRef(function BodyCell(_ref1, ref) {
|
|
206
223
|
var children = _ref1.children,
|
|
224
|
+
_ref1$overdueIcon = _ref1.overdueIcon,
|
|
225
|
+
overdueIcon = _ref1$overdueIcon === void 0 ? false : _ref1$overdueIcon,
|
|
207
226
|
_ref1$snugfit = _ref1.snugfit,
|
|
208
227
|
snugfit = _ref1$snugfit === void 0 ? false : _ref1$snugfit,
|
|
209
228
|
_ref1$variant = _ref1.variant,
|
|
210
229
|
variant = _ref1$variant === void 0 ? '' : _ref1$variant,
|
|
211
230
|
props = _objectWithoutProperties(_ref1, _excluded1);
|
|
212
|
-
return /*#__PURE__*/React.createElement(
|
|
231
|
+
return /*#__PURE__*/React.createElement(CellOverdueIconContext.Provider, {
|
|
232
|
+
value: overdueIcon
|
|
233
|
+
}, /*#__PURE__*/React.createElement(StyledTableBodyCell, _extends({
|
|
213
234
|
ref: ref,
|
|
214
235
|
$snugfit: snugfit || variant === 'snugfit'
|
|
215
|
-
}, props), children);
|
|
236
|
+
}, props), children));
|
|
216
237
|
});
|
|
217
238
|
export var CurrencyCell = /*#__PURE__*/React.forwardRef(function CurrencyCell(_ref10, ref) {
|
|
218
239
|
var children = _ref10.children,
|
|
@@ -220,11 +241,12 @@ export var CurrencyCell = /*#__PURE__*/React.forwardRef(function CurrencyCell(_r
|
|
|
220
241
|
currencyOptions = _ref10.currencyOptions,
|
|
221
242
|
props = _objectWithoutProperties(_ref10, _excluded10);
|
|
222
243
|
var I18n = useI18nContext();
|
|
244
|
+
var icon = useOverdueIcon(true);
|
|
223
245
|
if (children) {
|
|
224
246
|
return /*#__PURE__*/React.createElement(StyledTableCellText, _extends({
|
|
225
247
|
$currency: true,
|
|
226
248
|
ref: ref
|
|
227
|
-
}, props), children);
|
|
249
|
+
}, props), icon, children);
|
|
228
250
|
}
|
|
229
251
|
var internalCurrencyOptions = _objectSpread({
|
|
230
252
|
locale: I18n.locale,
|
|
@@ -235,7 +257,7 @@ export var CurrencyCell = /*#__PURE__*/React.forwardRef(function CurrencyCell(_r
|
|
|
235
257
|
return /*#__PURE__*/React.createElement(StyledTableCellText, _extends({
|
|
236
258
|
$currency: true,
|
|
237
259
|
ref: ref
|
|
238
|
-
}, props), internalValue);
|
|
260
|
+
}, props), icon, internalValue);
|
|
239
261
|
});
|
|
240
262
|
export var DateSelectCell = /*#__PURE__*/React.forwardRef(function DateSelectCell(_ref11, ref) {
|
|
241
263
|
var children = _ref11.children,
|
|
@@ -328,10 +350,11 @@ export var LinkCell = /*#__PURE__*/React.forwardRef(function LinkCell(_ref14, re
|
|
|
328
350
|
export var PercentCell = /*#__PURE__*/React.forwardRef(function PercentCell(_ref15, ref) {
|
|
329
351
|
var children = _ref15.children,
|
|
330
352
|
props = _objectWithoutProperties(_ref15, _excluded15);
|
|
353
|
+
var icon = useOverdueIcon(true);
|
|
331
354
|
return /*#__PURE__*/React.createElement(StyledTableCellText, _extends({
|
|
332
355
|
$percent: true,
|
|
333
356
|
ref: ref
|
|
334
|
-
}, props), children);
|
|
357
|
+
}, props), icon, children);
|
|
335
358
|
});
|
|
336
359
|
export var SelectCell = /*#__PURE__*/React.forwardRef(function SelectCell(_ref16, ref) {
|
|
337
360
|
var _ref16$block = _ref16.block,
|
|
@@ -421,12 +444,37 @@ export var TextAreaCell = /*#__PURE__*/React.forwardRef(function TextAreaCell(_r
|
|
|
421
444
|
id: errorId
|
|
422
445
|
}, errorMessage));
|
|
423
446
|
});
|
|
447
|
+
function useOverdueIcon(rightAligned) {
|
|
448
|
+
var _React$useContext = React.useContext(OverdueContext),
|
|
449
|
+
overdue = _React$useContext.overdue,
|
|
450
|
+
hasExplicitIcon = _React$useContext.hasExplicitIcon,
|
|
451
|
+
iconClaimedRef = _React$useContext.iconClaimedRef;
|
|
452
|
+
var cellOverdueIcon = React.useContext(CellOverdueIconContext);
|
|
453
|
+
var I18n = useI18nContext();
|
|
454
|
+
if (!overdue) return null;
|
|
455
|
+
var show = false;
|
|
456
|
+
if (hasExplicitIcon) {
|
|
457
|
+
show = cellOverdueIcon;
|
|
458
|
+
} else if (!iconClaimedRef.current) {
|
|
459
|
+
iconClaimedRef.current = true;
|
|
460
|
+
show = true;
|
|
461
|
+
}
|
|
462
|
+
if (!show) return null;
|
|
463
|
+
return /*#__PURE__*/React.createElement(StyledOverdueIcon, {
|
|
464
|
+
"aria-hidden": false,
|
|
465
|
+
size: "sm",
|
|
466
|
+
role: "img",
|
|
467
|
+
"aria-label": I18n.t('core.table.a11y.overdue'),
|
|
468
|
+
$rightAligned: rightAligned
|
|
469
|
+
});
|
|
470
|
+
}
|
|
424
471
|
export var TextCell = /*#__PURE__*/React.forwardRef(function TextCell(_ref18, ref) {
|
|
425
472
|
var children = _ref18.children,
|
|
426
473
|
props = _objectWithoutProperties(_ref18, _excluded18);
|
|
474
|
+
var icon = useOverdueIcon();
|
|
427
475
|
return /*#__PURE__*/React.createElement(StyledTableCellText, _extends({
|
|
428
476
|
ref: ref
|
|
429
|
-
}, props), children);
|
|
477
|
+
}, props), children, icon);
|
|
430
478
|
});
|
|
431
479
|
Table_.displayName = 'Table';
|
|
432
480
|
Body.displayName = 'Table.Body';
|