@procore/core-react 12.53.3 → 12.53.4
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 +9 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +4 -4
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +8 -8
- 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.js +97 -10
- package/dist/Calendar/Calendar.js.map +1 -1
- package/dist/Calendar/Calendar.styles.d.ts +3 -0
- package/dist/Calendar/Calendar.styles.js +13 -9
- package/dist/Calendar/Calendar.styles.js.map +1 -1
- package/dist/Calendar/Calendar.types.js.map +1 -1
- 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.js +1 -1
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.js +8 -8
- package/dist/DateInput/DateInput.styles.js.map +1 -1
- package/dist/DateSelect/DateSelect.js +60 -29
- package/dist/DateSelect/DateSelect.js.map +1 -1
- package/dist/DateSelect/DateSelect.types.d.ts +2 -2
- package/dist/DateSelect/DateSelect.types.js.map +1 -1
- 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.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.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 +6 -6
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +5 -0
- package/dist/Form/Form.js.map +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.js +3 -1
- package/dist/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +8 -8
- package/dist/MultiSelect/MultiSelect.types.d.ts +5 -0
- package/dist/MultiSelect/MultiSelect.types.js.map +1 -1
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextTile/NextTile.styles.js +5 -5
- 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 +5 -5
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.js +0 -1
- package/dist/Section/Section.js.map +1 -1
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.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 +40 -40
- package/dist/SuperSelect/SuperSelect.types.d.ts +7 -0
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
- package/dist/SuperSelect/useSuperSelect.js +7 -2
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +29 -29
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +16 -16
- package/dist/Tearsheet/Tearsheet.js +55 -31
- package/dist/Tearsheet/Tearsheet.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +21 -21
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/LeafSelectionTieredSelect.js +3 -1
- package/dist/TieredSelect/LeafSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TierSelectionTieredSelect.js +3 -1
- package/dist/TieredSelect/TierSelectionTieredSelect.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.styles.js +5 -5
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +3 -3
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/Tree.styles.js +10 -10
- package/dist/Typeahead/Typeahead.styles.js +4 -4
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +7 -7
- 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 +17 -17
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +12 -12
- 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 +45 -14
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/DetailPageTemplate/DetailPageTemplate.types.json +3 -3
- package/dist/_typedoc/Dropdown/Dropdown.types.json +38 -38
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +37 -37
- package/dist/_typedoc/Dropzone/Dropzone.types.json +50 -50
- package/dist/_typedoc/EmptyState/EmptyState.types.json +18 -18
- 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 +17 -17
- 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 +875 -773
- 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 +99 -79
- 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 +90 -90
- package/dist/_typedoc/Modal/Modal.types.json +48 -48
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +43 -33
- package/dist/_typedoc/NextTile/NextTile.types.json +33 -33
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +52 -52
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +33 -33
- package/dist/_typedoc/PageLayout/PageLayout.types.json +40 -40
- 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/SettingsPageTemplate/SettingsPageTemplate.types.json +3 -3
- 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 +136 -105
- package/dist/_typedoc/Tabs/Tablist.types.json +10 -10
- package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +43 -43
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
- package/dist/_typedoc/Tile/Tile.types.json +8 -8
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +7 -7
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +8 -8
- package/dist/_typedoc/ToolLandingPageTemplate/ToolLandingPageTemplate.types.json +2 -2
- package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
- package/dist/_typedoc/Tree/Tree.types.json +132 -132
- 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/a11y-tips.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 12.53.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a51cf67: Prevent Tearsheet from becoming stuck closed when the `open` prop changes rapidly during animations.
|
|
8
|
+
- be0ada1: Fix insufficient focus indicator contrast on `DateInput`/`DateSelect` date segments (WCAG 2.1 SC 1.4.11). The focused `mm`/`dd`/`yyyy` segment previously used a very light `blue96` background (~1.12:1 against the field background). It now uses `blue40` with white text, meeting the 3:1 minimum contrast ratio.
|
|
9
|
+
- f781141: Fixed an accessibility issue in Section where collapsible sections could not be expanded or collapsed with Enter or Space when using NVDA (Windows).
|
|
10
|
+
- 22e1882: Fixed an accessibility issue where required selects gave screen-reader users no signal that the field was mandatory (WCAG 3.3.2, 4.1.2). `SuperSelect` now accepts a `required` prop that sets `aria-required` on the element carrying `role="combobox"`, and `Form.Select`, `Form.MultiSelect`, `Form.GroupSelect`, `Form.TieredSelect` and `Form.PillSelect` now forward the field's required state to their combobox. `MultiSelect` also accepts `aria-required` directly.
|
|
11
|
+
|
|
3
12
|
## 12.53.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -5,15 +5,15 @@ import { getEllipsis } from '../_styles/mixins';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledAnchorNavigationLandmark = /*#__PURE__*/styled.nav.withConfig({
|
|
7
7
|
displayName: "StyledAnchorNavigationLandmark",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_53_4__sc-aacdj4-0"
|
|
9
9
|
})([""]);
|
|
10
10
|
export var StyledAnchorNavigation = /*#__PURE__*/styled.ul.withConfig({
|
|
11
11
|
displayName: "StyledAnchorNavigation",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_53_4__sc-aacdj4-1"
|
|
13
13
|
})(["max-width:200px;margin:0;padding-inline-start:0;"]);
|
|
14
14
|
export var StyledAnchorSection = /*#__PURE__*/styled.li.withConfig({
|
|
15
15
|
displayName: "StyledAnchorSection",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_53_4__sc-aacdj4-2"
|
|
17
17
|
})(["display:flex;cursor:pointer;border-left:", "px solid ", ";background-color:", ";border-top-right-radius:4px;border-bottom-right-radius:4px;:hover{border-left:", "px solid ", ";background-color:", ";}"], spacing.xs, function (_ref) {
|
|
18
18
|
var $selected = _ref.$selected;
|
|
19
19
|
return $selected ? colors.gray15 : colors.gray90;
|
|
@@ -26,7 +26,7 @@ export var StyledAnchorSection = /*#__PURE__*/styled.li.withConfig({
|
|
|
26
26
|
}, colors.gray90);
|
|
27
27
|
export var StyledAnchor = /*#__PURE__*/styled.a.withConfig({
|
|
28
28
|
displayName: "StyledAnchor",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_53_4__sc-aacdj4-3"
|
|
30
30
|
})(["box-sizing:border-box;display:block;flex:1;min-width:0;width:100%;padding:6px ", "px;color:inherit;text-decoration:none;&:visited{color:inherit;}", " ", ";", " :focus-visible{box-shadow:inset 0 0 0 2px ", ";outline:none;}"], spacing.sm, getTypographyIntent('body'), function (_ref4) {
|
|
31
31
|
var $selected = _ref4.$selected;
|
|
32
32
|
return $selected ? css(["font-weight:600;"]) : '';
|
|
@@ -28,26 +28,26 @@ var iconSize = {
|
|
|
28
28
|
};
|
|
29
29
|
export var StyledAvatarOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
30
30
|
displayName: "StyledAvatarOverlay",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_53_4__sc-7q2ydl-0"
|
|
32
32
|
})(["width:100%;height:100%;position:absolute;top:0;left:0;border-radius:100%;opacity:0;"]);
|
|
33
33
|
export var StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34
34
|
displayName: "StyledIconContainer",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_53_4__sc-7q2ydl-1"
|
|
36
36
|
})(["display:inline-flex;"]);
|
|
37
37
|
export var StyledLabelContainer = /*#__PURE__*/styled.div.withConfig({
|
|
38
38
|
displayName: "StyledLabelContainer",
|
|
39
|
-
componentId: "core-
|
|
39
|
+
componentId: "core-12_53_4__sc-7q2ydl-2"
|
|
40
40
|
})(["text-transform:uppercase;"]);
|
|
41
41
|
export var StyledPortraitContainer = /*#__PURE__*/styled.div.withConfig({
|
|
42
42
|
displayName: "StyledPortraitContainer",
|
|
43
|
-
componentId: "core-
|
|
43
|
+
componentId: "core-12_53_4__sc-7q2ydl-3"
|
|
44
44
|
})(["background-color:", ";background-position:center;background-repeat:no-repeat;background-size:cover;height:100%;width:100%;", ""], colors.white, function (_ref) {
|
|
45
45
|
var $imageUrl = _ref.$imageUrl;
|
|
46
46
|
return css(["background-image:url(", ");"], $imageUrl);
|
|
47
47
|
});
|
|
48
48
|
export var StyledAvatarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledAvatarContainer",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_53_4__sc-7q2ydl-4"
|
|
51
51
|
})(["display:inline-flex;justify-content:center;align-items:center;border-radius:100%;overflow:hidden;position:relative;cursor:default;color:", ";background-color:", ";text-decoration:none;a:has(> &){text-decoration:none;}&:focus{", "}a:focus:has(> &){", " border-radius:100%;}", " ", ";"], colors.white, colors.gray30, getGapOutlineFocus('outside'), getGapOutlineFocus('outside'), function (_ref2) {
|
|
52
52
|
var _ref2$$size = _ref2.$size,
|
|
53
53
|
$size = _ref2$$size === void 0 ? 'md' : _ref2$$size;
|
|
@@ -8,36 +8,36 @@ import { spacing } from '../_styles/spacing';
|
|
|
8
8
|
var maxModalWidth = 528;
|
|
9
9
|
var StyledBaseAvatar = /*#__PURE__*/styled(Avatar).withConfig({
|
|
10
10
|
displayName: "StyledBaseAvatar",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_53_4__sc-ft72hu-0"
|
|
12
12
|
})(["border-color:", ";border-style:solid;border-width:1px;&:hover{z-index:1;}"], colors.white);
|
|
13
13
|
export var StyledAvatar = /*#__PURE__*/styled(StyledBaseAvatar).withConfig({
|
|
14
14
|
displayName: "StyledAvatar",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_53_4__sc-ft72hu-1"
|
|
16
16
|
})(["background-color:", ";"], function (props) {
|
|
17
17
|
return colors[props.$color];
|
|
18
18
|
});
|
|
19
19
|
export var StyledFoldedPopoverContent = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledFoldedPopoverContent",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_53_4__sc-ft72hu-2"
|
|
22
22
|
})(["display:flex;flex-direction:column;max-height:var(", ",100vh);"], OVERLAY_AVAILABLE_HEIGHT_VAR);
|
|
23
23
|
export var StyledContactItems = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
displayName: "StyledContactItems",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-12_53_4__sc-ft72hu-3"
|
|
26
26
|
})(["padding-top:", "px;padding-left:", "px;flex:1 1 auto;min-height:0;overflow-y:auto;"], spacing.sm, spacing.xs);
|
|
27
27
|
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
28
28
|
displayName: "StyledWrapper",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_53_4__sc-ft72hu-4"
|
|
30
30
|
})(["display:flex;", " + ", "{margin-left:-", "px;}"], StyledAvatar, StyledAvatar, spacing.sm);
|
|
31
31
|
export var StyledViewAllWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
32
32
|
displayName: "StyledViewAllWrapper",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-12_53_4__sc-ft72hu-5"
|
|
34
34
|
})(["display:flex;margin-left:", "px;margin-top:", "px;margin-bottom:", "px;"], spacing.md, spacing.md, spacing.md);
|
|
35
35
|
export var StyledModalBody = /*#__PURE__*/styled(Modal.Body).withConfig({
|
|
36
36
|
displayName: "StyledModalBody",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-12_53_4__sc-ft72hu-6"
|
|
38
38
|
})(["max-width:", "px;"], maxModalWidth);
|
|
39
39
|
export var StyledContactItem = /*#__PURE__*/styled(ContactItem).withConfig({
|
|
40
40
|
displayName: "StyledContactItem",
|
|
41
|
-
componentId: "core-
|
|
41
|
+
componentId: "core-12_53_4__sc-ft72hu-7"
|
|
42
42
|
})(["flex-shrink:0;"]);
|
|
43
43
|
//# sourceMappingURL=AvatarStack.styles.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export var StyledBadge = /*#__PURE__*/styled.div.withConfig({
|
|
3
3
|
displayName: "StyledBadge",
|
|
4
|
-
componentId: "core-
|
|
4
|
+
componentId: "core-12_53_4__sc-rpertu-0"
|
|
5
5
|
})(["display:inline-block;position:relative;"]);
|
|
6
6
|
export var StyledBadgeLabel = /*#__PURE__*/styled.span.withConfig({
|
|
7
7
|
displayName: "StyledBadgeLabel",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_53_4__sc-rpertu-1"
|
|
9
9
|
})(["bottom:100%;position:absolute;right:0;transform:translateX(50%) translateY(50%);"]);
|
|
10
10
|
//# sourceMappingURL=Badge.styles.js.map
|
|
@@ -3,11 +3,11 @@ import { getTypographyIntent } from '../Typography';
|
|
|
3
3
|
import { colors } from '../_styles/colors';
|
|
4
4
|
export var StyledBadgeContainer = /*#__PURE__*/styled.div.withConfig({
|
|
5
5
|
displayName: "StyledBadgeContainer",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_53_4__sc-s2n9gd-0"
|
|
7
7
|
})(["display:inline-flex;position:relative;"]);
|
|
8
8
|
export var StyledBadgeContent = /*#__PURE__*/styled.div.withConfig({
|
|
9
9
|
displayName: "StyledBadgeContent",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_53_4__sc-s2n9gd-1"
|
|
11
11
|
})(["position:relative;", " ", " pointer-events:none;user-select:none;"], function (_ref) {
|
|
12
12
|
var $overlapping = _ref.$overlapping,
|
|
13
13
|
_ref$$xOffset = _ref.$xOffset,
|
|
@@ -20,13 +20,13 @@ export var StyledBadgeContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
20
20
|
});
|
|
21
21
|
export var StyledBadgeDotIndicator = /*#__PURE__*/styled.div.withConfig({
|
|
22
22
|
displayName: "StyledBadgeDotIndicator",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_53_4__sc-s2n9gd-2"
|
|
24
24
|
})(["width:6px;height:6px;border-radius:50%;background-color:", ";"], colors.orange50);
|
|
25
25
|
var oneDigitStyles = "\n border-radius: 50%;\n padding: 2px;\n min-width: 21.5px;\n min-height: 21.5px;\n";
|
|
26
26
|
var multiDigitStyles = "\n border-radius: 10px;\n padding: 2px 8px;\n";
|
|
27
27
|
export var StyledBadgeCounter = /*#__PURE__*/styled.div.withConfig({
|
|
28
28
|
displayName: "StyledBadgeCounter",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_53_4__sc-s2n9gd-3"
|
|
30
30
|
})(["display:inline-flex;justify-content:center;align-items:center;color:", ";background-color:", ";", " ", ""], colors.white, colors.orange50, getTypographyIntent('small'), function (props) {
|
|
31
31
|
return props.$oneDigit ? oneDigitStyles : multiDigitStyles;
|
|
32
32
|
});
|
|
@@ -39,7 +39,7 @@ var expandContent = function expandContent(maxHeight) {
|
|
|
39
39
|
};
|
|
40
40
|
export var StyledBannerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledBannerContainer",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_53_4__sc-149wm7c-0"
|
|
43
43
|
})(["align-items:center;border-left:", "px solid;border-radius:", "px;color:", ";display:flex;justify-content:space-between;min-height:52px;padding:0 ", "px;", " ", " ", ""], bannerLeft, borderRadius.md, colors.gray15, spacing.lg, bannerShadow, function (_ref) {
|
|
44
44
|
var $variant = _ref.$variant;
|
|
45
45
|
var _bannerVariantColors$ = bannerVariantColors[$variant],
|
|
@@ -52,15 +52,15 @@ export var StyledBannerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
52
52
|
});
|
|
53
53
|
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
|
54
54
|
displayName: "StyledContent",
|
|
55
|
-
componentId: "core-
|
|
55
|
+
componentId: "core-12_53_4__sc-149wm7c-1"
|
|
56
56
|
})(["align-self:center;margin:", "px ", "px ", "px 0;width:100%;"], spacing.sm, spacing.lg, spacing.sm);
|
|
57
57
|
export var StyledExpandableContentContainer = /*#__PURE__*/styled(Flex).withConfig({
|
|
58
58
|
displayName: "StyledExpandableContentContainer",
|
|
59
|
-
componentId: "core-
|
|
59
|
+
componentId: "core-12_53_4__sc-149wm7c-2"
|
|
60
60
|
})(["color:", ";min-height:52px;padding:0 ", "px;position:relative;z-index:1;", ""], colors.gray15, spacing.lg, bannerShadow);
|
|
61
61
|
export var StyledExpandableContent = /*#__PURE__*/styled(Flex).withConfig({
|
|
62
62
|
displayName: "StyledExpandableContent",
|
|
63
|
-
componentId: "core-
|
|
63
|
+
componentId: "core-12_53_4__sc-149wm7c-3"
|
|
64
64
|
})(["animation-duration:450ms;animation-fill-mode:forwards;animation-timing-function:ease-out;background-color:", ";box-sizing:border-box;font-size:14px;font-weight:500;letter-spacing:0.25px;line-height:20px;overflow-y:auto;padding:0 ", "px;position:relative;z-index:0;", " ", ""], colors.white, spacing.xl * 2 + spacing.sm, function (_ref3) {
|
|
65
65
|
var $isOverflowingY = _ref3.$isOverflowingY;
|
|
66
66
|
return $isOverflowingY && focusable;
|
|
@@ -70,23 +70,23 @@ export var StyledExpandableContent = /*#__PURE__*/styled(Flex).withConfig({
|
|
|
70
70
|
});
|
|
71
71
|
export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
|
|
72
72
|
displayName: "StyledTitle",
|
|
73
|
-
componentId: "core-
|
|
73
|
+
componentId: "core-12_53_4__sc-149wm7c-4"
|
|
74
74
|
})(["", " color:", ";font-weight:", ";"], getTypographyIntent('body'), colors.gray15, typographyWeights.semibold);
|
|
75
75
|
export var StyledBody = /*#__PURE__*/styled.div.withConfig({
|
|
76
76
|
displayName: "StyledBody",
|
|
77
|
-
componentId: "core-
|
|
77
|
+
componentId: "core-12_53_4__sc-149wm7c-5"
|
|
78
78
|
})(["", " color:", ";"], getTypographyIntent('body'), colors.gray15);
|
|
79
79
|
export var StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
80
80
|
displayName: "StyledIconContainer",
|
|
81
|
-
componentId: "core-
|
|
81
|
+
componentId: "core-12_53_4__sc-149wm7c-6"
|
|
82
82
|
})(["flex:0 0 auto;margin:", "px 0;"], spacing.lg);
|
|
83
83
|
export var StyledActionsTrigger = /*#__PURE__*/styled(DropdownButton).withConfig({
|
|
84
84
|
displayName: "StyledActionsTrigger",
|
|
85
|
-
componentId: "core-
|
|
85
|
+
componentId: "core-12_53_4__sc-149wm7c-7"
|
|
86
86
|
})(["flex-shrink:0;& + ", ",& + ", "{margin-left:-", "px;}"], StyledButton, StyledLinkButton, spacing.sm);
|
|
87
87
|
export var StyledAction = /*#__PURE__*/styled.div.withConfig({
|
|
88
88
|
displayName: "StyledAction",
|
|
89
|
-
componentId: "core-
|
|
89
|
+
componentId: "core-12_53_4__sc-149wm7c-8"
|
|
90
90
|
})(["margin:", "px 0 ", "px -", "px;& + ", ",& + ", ",& + ", "{margin-left:-", "px;}", ",", "{background:rgba(0,0,0,0.05);color:", ";&:hover{background:", ";color:", ";}}"], spacing.sm, spacing.sm, spacing.sm, StyledButton, StyledLinkButton, StyledActionsTrigger, spacing.sm, StyledButton, StyledLinkButton, colors.gray15, colors.gray85, colors.gray15);
|
|
91
91
|
function getMiniBannerIconColor(_ref5) {
|
|
92
92
|
var variant = _ref5.variant;
|
|
@@ -94,6 +94,6 @@ function getMiniBannerIconColor(_ref5) {
|
|
|
94
94
|
}
|
|
95
95
|
export var StyledMiniBannerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
96
96
|
displayName: "StyledMiniBannerContainer",
|
|
97
|
-
componentId: "core-
|
|
97
|
+
componentId: "core-12_53_4__sc-149wm7c-9"
|
|
98
98
|
})(["align-items:center;background-color:", ";display:flex;justify-content:space-between;padding:0 ", "px;", " ", " & ", "{margin:", "px;}"], colors.gray96, spacing.md, getTypographyIntent('small'), getMiniBannerIconColor, StyledContent, spacing.sm);
|
|
99
99
|
//# sourceMappingURL=Banner.styles.js.map
|
package/dist/Box/Box.styles.js
CHANGED
|
@@ -21,7 +21,7 @@ function sizeToPx(size) {
|
|
|
21
21
|
}
|
|
22
22
|
export var StyledBox = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledBox",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_53_4__sc-fgsy0p-0"
|
|
25
25
|
})(["", " ", ""], function (_ref) {
|
|
26
26
|
var as = _ref.as;
|
|
27
27
|
if (as === 'ol' || as === 'ul') {
|
|
@@ -4,19 +4,19 @@ import { colors } from '../_styles/colors';
|
|
|
4
4
|
import { spacing } from '../_styles/spacing';
|
|
5
5
|
export var StyledContainer = /*#__PURE__*/styled.nav.withConfig({
|
|
6
6
|
displayName: "StyledContainer",
|
|
7
|
-
componentId: "core-
|
|
7
|
+
componentId: "core-12_53_4__sc-1q6nqfz-0"
|
|
8
8
|
})(["color:", ";display:flex;align-items:center;a,a:hover{display:inline-flex;text-decoration:none;}"], colors.gray50);
|
|
9
9
|
export var StyledList = /*#__PURE__*/styled.ol.withConfig({
|
|
10
10
|
displayName: "StyledList",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_53_4__sc-1q6nqfz-1"
|
|
12
12
|
})(["display:flex;margin:0;padding-left:0;"]);
|
|
13
13
|
export var StyledSeparator = /*#__PURE__*/styled.div.withConfig({
|
|
14
14
|
displayName: "StyledSeparator",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_53_4__sc-1q6nqfz-2"
|
|
16
16
|
})(["align-items:center;display:inline-flex;justify-content:center;margin:0px ", "px;"], spacing.xs);
|
|
17
17
|
export var StyledCrumb = /*#__PURE__*/styled.li.withConfig({
|
|
18
18
|
displayName: "StyledCrumb",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_53_4__sc-1q6nqfz-3"
|
|
20
20
|
})(["", " align-items:center;color:", ";display:inline-flex;min-height:24px;text-decoration:none;&:hover{cursor:", ";text-decoration:", ";}> a{color:", ";", "}", ""], getTypographyIntent('body'), colors.gray40, function (_ref) {
|
|
21
21
|
var active = _ref.active;
|
|
22
22
|
return active ? 'default' : 'pointer';
|
|
@@ -92,11 +92,11 @@ function getColors(loading, variant) {
|
|
|
92
92
|
}
|
|
93
93
|
export var StyledContent = /*#__PURE__*/styled.span.withConfig({
|
|
94
94
|
displayName: "StyledContent",
|
|
95
|
-
componentId: "core-
|
|
95
|
+
componentId: "core-12_53_4__sc-c5bhwh-0"
|
|
96
96
|
})(["align-items:center;display:flex;overflow:hidden;"]);
|
|
97
97
|
export var StyledSpinner = /*#__PURE__*/styled(Spinner).withConfig({
|
|
98
98
|
displayName: "StyledSpinner",
|
|
99
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_53_4__sc-c5bhwh-1"
|
|
100
100
|
})(["box-sizing:border-box;display:none;position:absolute;transform:translateZ(0);@media ", "{left:50%;top:50%;", "}"], mediaIE11Hack, function (_ref) {
|
|
101
101
|
var size = _ref.size;
|
|
102
102
|
var margin = -1 * (spinnerDimensions[size !== null && size !== void 0 ? size : defaultSpinnerSize] / 2);
|
|
@@ -104,14 +104,14 @@ export var StyledSpinner = /*#__PURE__*/styled(Spinner).withConfig({
|
|
|
104
104
|
});
|
|
105
105
|
export var StyledLabel = /*#__PURE__*/styled.span.withConfig({
|
|
106
106
|
displayName: "StyledLabel",
|
|
107
|
-
componentId: "core-
|
|
107
|
+
componentId: "core-12_53_4__sc-c5bhwh-2"
|
|
108
108
|
})(["overflow:hidden;padding:0 6px;text-overflow:ellipsis;white-space:nowrap;& + span{padding-left:0;}"]);
|
|
109
109
|
export function getButtonStyles(block, disabled, loading, size, variant) {
|
|
110
110
|
return css(["", " &.focus,&:focus{outline:2px solid ", ";outline-offset:var(--core-button-focus-outline-offset,-1px);}", " ", " align-items:center;border-radius:", "px;border:0;box-sizing:border-box;cursor:pointer;display:inline-flex;flex-direction:row;flex-shrink:0;font-family:inherit;font-weight:", ";height:", "px;justify-content:center;margin:0;overflow:hidden;padding:0 ", "px;position:relative;pointer-events:", ";text-overflow:ellipsis;user-select:", ";vertical-align:middle;white-space:nowrap;width:", ";[data-icon-prop='true']{pointer-events:none;height:", "px;width:", "px;}", ""], getTypographyIntent(typographySizes[size]), colors.blue40, variant === 'UNSAFE_helixNav' && css(["&.focus,&:focus{outline:none;box-shadow:0 0 0 2px ", ";}"], colors.blue70), getColors(loading, variant), borderRadius.md, typographyWeights.semibold, heights[size], paddingX[size], disabled || loading ? 'none' : 'inherit', disabled || loading ? 'none' : 'inherit', block && '100%', size === 'sm' ? 16 : 24, size === 'sm' ? 16 : 24, loading && css(["", "{pointer-events:none;visibility:hidden;}", "{display:block;}"], StyledContent, StyledSpinner));
|
|
111
111
|
}
|
|
112
112
|
export var StyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
113
113
|
displayName: "StyledButton",
|
|
114
|
-
componentId: "core-
|
|
114
|
+
componentId: "core-12_53_4__sc-c5bhwh-3"
|
|
115
115
|
})(["", ""], function (_ref2) {
|
|
116
116
|
var $block = _ref2.$block,
|
|
117
117
|
disabled = _ref2.disabled,
|
|
@@ -122,7 +122,7 @@ export var StyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
122
122
|
});
|
|
123
123
|
export var StyledLinkButton = /*#__PURE__*/styled.a.withConfig({
|
|
124
124
|
displayName: "StyledLinkButton",
|
|
125
|
-
componentId: "core-
|
|
125
|
+
componentId: "core-12_53_4__sc-c5bhwh-4"
|
|
126
126
|
})(["&,&:hover{text-decoration:none;}", ""], function (_ref3) {
|
|
127
127
|
var $block = _ref3.$block,
|
|
128
128
|
$disabled = _ref3.$disabled,
|
|
@@ -4,6 +4,12 @@ var _excluded = ["dueDateTime", "displayDate", "disabledDate", "onSelect", "sele
|
|
|
4
4
|
_excluded4 = ["dueDateTime", "displayDate", "disabledDate", "monthRef", "onNavigate", "onSelect", "selectedEnd", "selectedStart", "yearRef"];
|
|
5
5
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
6
6
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
13
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
14
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
15
|
import { ChevronLeft, ChevronRight } from '@procore/core-icons/dist';
|
|
@@ -17,11 +23,47 @@ import { addSubcomponents } from '../_utils/addSubcomponents';
|
|
|
17
23
|
import { addMonths, format, getDates, getDayOfWeekLabel, getMonth, getMonthLabel, getMonthOptions, getRows, getYear, getYearOptions, isSameDay, isSameMonth, isWithinRange, subMonths, updateMonth, updateYear } from '../_utils/CalendarHelpers';
|
|
18
24
|
import { Select as SelectBase } from '../Select/Select';
|
|
19
25
|
import { getFormatterLocale } from '../_utils/i18n';
|
|
20
|
-
import { StyledContainer, StyledDayCell, StyledDayHeaderCell, StyledNavigation, StyledPaginator, StyledSelect, StyledWeekRow } from './Calendar.styles';
|
|
26
|
+
import { StyledCalendarGrid, StyledContainer, StyledDayCell, StyledDayHeaderCell, StyledNavigation, StyledPaginator, StyledSelect, StyledWeekRow } from './Calendar.styles';
|
|
21
27
|
function noop() {}
|
|
22
28
|
function returnFalse() {
|
|
23
29
|
return false;
|
|
24
30
|
}
|
|
31
|
+
function getInitialActiveIndex(dates, selectedStart, today, displayDate) {
|
|
32
|
+
var selectedIndex = selectedStart ? dates.findIndex(function (date) {
|
|
33
|
+
return isSameDay(date, selectedStart);
|
|
34
|
+
}) : -1;
|
|
35
|
+
if (selectedIndex >= 0) {
|
|
36
|
+
return selectedIndex;
|
|
37
|
+
}
|
|
38
|
+
var todayIndex = dates.findIndex(function (date) {
|
|
39
|
+
return isSameDay(date, today);
|
|
40
|
+
});
|
|
41
|
+
if (todayIndex >= 0) {
|
|
42
|
+
return todayIndex;
|
|
43
|
+
}
|
|
44
|
+
var firstOfMonthIndex = dates.findIndex(function (date) {
|
|
45
|
+
return isSameMonth(date, displayDate);
|
|
46
|
+
});
|
|
47
|
+
return firstOfMonthIndex >= 0 ? firstOfMonthIndex : 0;
|
|
48
|
+
}
|
|
49
|
+
var daysPerWeek = 7;
|
|
50
|
+
var lastWeekIndex = 5;
|
|
51
|
+
function getNextDayIndex(key, flatIndex) {
|
|
52
|
+
var row = Math.floor(flatIndex / daysPerWeek);
|
|
53
|
+
var col = flatIndex % daysPerWeek;
|
|
54
|
+
switch (key) {
|
|
55
|
+
case 'ArrowLeft':
|
|
56
|
+
return col > 0 ? flatIndex - 1 : undefined;
|
|
57
|
+
case 'ArrowRight':
|
|
58
|
+
return col < daysPerWeek - 1 ? flatIndex + 1 : undefined;
|
|
59
|
+
case 'ArrowUp':
|
|
60
|
+
return row > 0 ? flatIndex - daysPerWeek : undefined;
|
|
61
|
+
case 'ArrowDown':
|
|
62
|
+
return row < lastWeekIndex ? flatIndex + daysPerWeek : undefined;
|
|
63
|
+
default:
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
25
67
|
|
|
26
68
|
/**
|
|
27
69
|
* @parent Calendar
|
|
@@ -52,11 +94,44 @@ export function Body(_ref) {
|
|
|
52
94
|
var onSelect = function onSelect(day) {
|
|
53
95
|
onSelect_(dateTime.shiftZonedTimeToUtc(day, 'Calendar Body onSelect'));
|
|
54
96
|
};
|
|
55
|
-
|
|
97
|
+
var dayRefs = React.useRef([]);
|
|
98
|
+
var _React$useState = React.useState(function () {
|
|
99
|
+
return getInitialActiveIndex(dates, selectedStart, startOfDay(dateTime.newDate()), displayDate);
|
|
100
|
+
}),
|
|
101
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
102
|
+
activeIndex = _React$useState2[0],
|
|
103
|
+
setActiveIndex = _React$useState2[1];
|
|
104
|
+
|
|
105
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
106
|
+
React.useEffect(function () {
|
|
107
|
+
setActiveIndex(getInitialActiveIndex(dates, selectedStart, startOfDay(dateTime.newDate()), displayDate));
|
|
108
|
+
}, [format(displayDate, 'yyyy-MM')]);
|
|
109
|
+
var onDayKeyDown = function onDayKeyDown(event, flatIndex) {
|
|
110
|
+
var _dayRefs$current$next;
|
|
111
|
+
var nextIndex = getNextDayIndex(event.key, flatIndex);
|
|
112
|
+
if (nextIndex === undefined) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
(_dayRefs$current$next = dayRefs.current[nextIndex]) === null || _dayRefs$current$next === void 0 || _dayRefs$current$next.focus();
|
|
117
|
+
};
|
|
118
|
+
return /*#__PURE__*/React.createElement(StyledCalendarGrid, {
|
|
119
|
+
"aria-label": dateTime.format(displayDate, 'none', {
|
|
120
|
+
month: 'long',
|
|
121
|
+
year: 'numeric'
|
|
122
|
+
}),
|
|
123
|
+
role: "grid"
|
|
124
|
+
}, /*#__PURE__*/React.createElement(Weekdays, null), getRows(dates).map(function (row, rowIndex) {
|
|
56
125
|
return /*#__PURE__*/React.createElement(Week, {
|
|
57
126
|
key: "week-".concat(format(row[0], 'yyyy-MMMM-dddd'))
|
|
58
|
-
}, row.map(function (day) {
|
|
59
|
-
|
|
127
|
+
}, row.map(function (day, columnIndex) {
|
|
128
|
+
var flatIndex = rowIndex * daysPerWeek + columnIndex;
|
|
129
|
+
var selected = isWithinRange(day, selectedStart, selectedEnd);
|
|
130
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
"aria-selected": selected || undefined,
|
|
132
|
+
key: "day-".concat(format(day, 'yyyy-MMMM-dddd')),
|
|
133
|
+
role: "gridcell"
|
|
134
|
+
}, /*#__PURE__*/React.createElement(Day, _extends({
|
|
60
135
|
"aria-label": dateTime.format(day, 'weekday-date', {
|
|
61
136
|
timeZone: undefined
|
|
62
137
|
}),
|
|
@@ -65,16 +140,25 @@ export function Body(_ref) {
|
|
|
65
140
|
isRangeEnd: selectedEnd && isSameDay(day, selectedEnd),
|
|
66
141
|
isRangeStart: selectedStart && isSameDay(day, selectedStart),
|
|
67
142
|
isToday: isSameDay(day, startOfDay(dateTime.newDate())),
|
|
68
|
-
key: "day-".concat(format(day, 'yyyy-MMMM-dddd')),
|
|
69
143
|
onClick: function onClick() {
|
|
70
144
|
return onSelect(day);
|
|
71
145
|
},
|
|
72
|
-
|
|
146
|
+
onFocus: function onFocus() {
|
|
147
|
+
return setActiveIndex(flatIndex);
|
|
148
|
+
},
|
|
149
|
+
onKeyDown: function onKeyDown(event) {
|
|
150
|
+
return onDayKeyDown(event, flatIndex);
|
|
151
|
+
},
|
|
152
|
+
ref: function ref(element) {
|
|
153
|
+
dayRefs.current[flatIndex] = element;
|
|
154
|
+
},
|
|
155
|
+
selected: selected,
|
|
156
|
+
tabIndex: flatIndex === activeIndex ? 0 : -1
|
|
73
157
|
}, props), format(day, 'd'), dueDateTime && isSameDay(day, startOfDay(dueDateTime)) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("em", {
|
|
74
158
|
style: isAfter(dateTime.newDate(), dueDateTime) ? {
|
|
75
159
|
color: 'red'
|
|
76
160
|
} : undefined
|
|
77
|
-
}, dateTime.format(dueDateTime_, 'time'))));
|
|
161
|
+
}, dateTime.format(dueDateTime_, 'time')))));
|
|
78
162
|
}));
|
|
79
163
|
}));
|
|
80
164
|
}
|
|
@@ -189,7 +273,8 @@ export var Prev = /*#__PURE__*/React.forwardRef(function Prev(props, ref) {
|
|
|
189
273
|
*/
|
|
190
274
|
export var Week = /*#__PURE__*/React.forwardRef(function Week(props, ref) {
|
|
191
275
|
return /*#__PURE__*/React.createElement(StyledWeekRow, _extends({
|
|
192
|
-
ref: ref
|
|
276
|
+
ref: ref,
|
|
277
|
+
role: "row"
|
|
193
278
|
}, props));
|
|
194
279
|
});
|
|
195
280
|
|
|
@@ -208,10 +293,12 @@ export var Weekdays = /*#__PURE__*/React.forwardRef(function Weekdays(props, ref
|
|
|
208
293
|
var startDayOfWeek = getStartDayOfTheWeek(formatterLocale);
|
|
209
294
|
return /*#__PURE__*/React.createElement(StyledWeekRow, _extends({
|
|
210
295
|
ref: ref,
|
|
211
|
-
|
|
296
|
+
role: "row",
|
|
297
|
+
"aria-hidden": true
|
|
212
298
|
}, props), range(startDayOfWeek, startDayOfWeek + 7).map(function (day) {
|
|
213
299
|
return /*#__PURE__*/React.createElement(StyledDayHeaderCell, {
|
|
214
|
-
key: "day-".concat(day)
|
|
300
|
+
key: "day-".concat(day),
|
|
301
|
+
role: "columnheader"
|
|
215
302
|
}, getDayOfWeekLabel(day, formatterLocale));
|
|
216
303
|
}));
|
|
217
304
|
});
|