@procore/core-react 11.24.4 → 11.25.1
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/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.d.ts +7 -7
- package/dist/AvatarStack/AvatarStack.styles.d.ts +1 -1
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +26 -6
- package/dist/Checkbox/Checkbox.js.map +1 -1
- package/dist/Checkbox/Checkbox.styles.d.ts +6 -2
- package/dist/Checkbox/Checkbox.styles.js +21 -17
- package/dist/Checkbox/Checkbox.styles.js.map +1 -1
- package/dist/Checkbox/Checkbox.types.d.ts +10 -0
- package/dist/Checkbox/Checkbox.types.js.map +1 -1
- package/dist/ContactItem/ContactItem.styles.d.ts +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.d.ts +3 -3
- 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.d.ts +2 -2
- package/dist/DropdownFlyout/DropdownFlyout.helpers.d.ts +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.d.ts +2 -2
- 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.d.ts +2 -2
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.d.ts +72 -72
- package/dist/Form/Form.js +67 -35
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.d.ts +8 -4
- package/dist/Form/Form.styles.js +49 -35
- package/dist/Form/Form.styles.js.map +1 -1
- package/dist/Form/Form.types.d.ts +28 -1
- package/dist/Form/Form.types.js.map +1 -1
- package/dist/Form/FormFieldTooltip.d.ts +4 -0
- package/dist/Form/FormFieldTooltip.js +18 -0
- package/dist/Form/FormFieldTooltip.js.map +1 -0
- package/dist/Form/stories/util.d.ts +5 -3
- package/dist/Form/stories/util.js +61 -17
- package/dist/Form/stories/util.js.map +1 -1
- package/dist/Grid/Grid.d.ts +1 -1
- 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/Menu/Menu.d.ts +4 -4
- package/dist/MenuImperative/MenuImperative.d.ts +3 -3
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/ChildRegistry.context.d.ts +1 -1
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/Modal/storyHelpers.d.ts +2 -2
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextTile/NextTile.d.ts +1 -1
- 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/OverlayTrigger/OverlayTrigger.d.ts +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.js +9 -3
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.types.d.ts +2 -1
- package/dist/OverlayTrigger/OverlayTrigger.types.js.map +1 -1
- package/dist/OverlayTrigger/a11yPresets.d.ts +48 -48
- package/dist/PageLayout/PageLayout.d.ts +1 -1
- package/dist/PageLayout/PageLayout.styles.js +13 -13
- package/dist/Pagination/Pagination.styles.js +5 -5
- 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.d.ts +1 -1
- 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 +6 -4
- package/dist/Required/Required.styles.js.map +1 -1
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.d.ts +2 -2
- package/dist/Section/Section.styles.js +6 -6
- package/dist/SegmentedController/SegmentedController.d.ts +2 -2
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +3 -1
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Select/Select.types.d.ts +3 -2
- package/dist/Select/Select.types.js.map +1 -1
- package/dist/Semantic/Semantic.styles.d.ts +1 -1
- package/dist/Semantic/Semantic.styles.js +8 -8
- package/dist/Sidebar/Sidebar.styles.js +7 -7
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SuperSelect/SuperSelect.components.d.ts +29 -29
- package/dist/SuperSelect/SuperSelect.d.ts +29 -29
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/useSuperSelect.d.ts +87 -87
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/Tabs.styles.js +8 -8
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.d.ts +3 -3
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.d.ts +3 -3
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +226 -210
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/ThumbnailCaption.d.ts +2 -2
- package/dist/Thumbnail/ThumbnailDocumentIcon.d.ts +2 -2
- package/dist/Thumbnail/ThumbnailPreview.d.ts +2 -2
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +2 -2
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.d.ts +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 +3 -3
- package/dist/ToolHeader/ActionIcon.d.ts +2 -2
- package/dist/ToolHeader/ToolHeader.d.ts +2 -2
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.hooks.js +58 -36
- package/dist/Tree/Tree.hooks.js.map +1 -1
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/Tree.js.map +1 -1
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Tree/Tree.types.d.ts +7 -3
- package/dist/Tree/Tree.types.js.map +1 -1
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.colors.story.d.ts +2 -2
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.d.ts +2 -2
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/Analytics.d.ts +1 -1
- package/dist/_hooks/Anchor.d.ts +1 -1
- package/dist/_hooks/BoundingRect.d.ts +1 -1
- package/dist/_hooks/Buffer.d.ts +1 -1
- package/dist/_hooks/ClickOutside.d.ts +3 -2
- package/dist/_hooks/ClickOutside.js +8 -3
- package/dist/_hooks/ClickOutside.js.map +1 -1
- package/dist/_hooks/DateTime/DateTime.d.ts +1 -1
- package/dist/_hooks/DelayedToggle.d.ts +1 -1
- package/dist/_hooks/Event.d.ts +1 -1
- package/dist/_hooks/EventListener.js +14 -4
- package/dist/_hooks/EventListener.js.map +1 -1
- package/dist/_hooks/I18n.d.ts +387 -2
- package/dist/_hooks/InjectedScript.d.ts +1 -1
- package/dist/_hooks/ListNavigation.d.ts +1 -1
- package/dist/_hooks/TextEntry.d.ts +1 -1
- package/dist/_hooks/Timer.d.ts +1 -1
- package/dist/_hooks/Trigger.d.ts +1 -1
- package/dist/_hooks/Visibility.d.ts +1 -1
- package/dist/_hooks/ZIndex.d.ts +1 -1
- package/dist/_hooks/__tests__/EventListener.test.js +46 -0
- package/dist/_hooks/useSet.js +3 -3
- package/dist/_hooks/useSet.js.map +1 -1
- package/dist/_locales/de-DE.json +3 -1
- package/dist/_locales/en-AU.json +3 -1
- package/dist/_locales/en-CA.json +3 -1
- package/dist/_locales/en-GB.json +3 -1
- package/dist/_locales/en.json +3 -1
- package/dist/_locales/es-ES.json +3 -1
- package/dist/_locales/es.json +3 -1
- package/dist/_locales/fr-CA.json +3 -1
- package/dist/_locales/fr-FR.json +3 -1
- package/dist/_locales/is-IS.json +3 -1
- package/dist/_locales/ja-JP.json +360 -1
- package/dist/_locales/pt-BR.json +3 -1
- package/dist/_locales/th-TH.json +3 -1
- package/dist/_locales/zh-SG.json +3 -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 +11 -11
- 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 +27 -7
- 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 +4 -4
- 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 +11 -11
- 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 +980 -700
- 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 +38 -38
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +40 -30
- package/dist/_typedoc/PageLayout/PageLayout.types.json +22 -22
- 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 +56 -46
- 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 +75 -55
- 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 +106 -96
- 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/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 +94 -94
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +8 -8
- package/dist/_typedoc/_utils/types.json +3 -3
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import type { Props } from '../_utils/types';
|
|
|
3
3
|
import type { HeroMediaProps, HeroTextProps, InteractableTileProps, LinkTileProps, Roles, TileProps, TileRef } from './NextTile.types';
|
|
4
4
|
export declare const InteractableTile: React.ForwardRefExoticComponent<Omit<InteractableTileProps, "role"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export declare const LinkTile: React.ForwardRefExoticComponent<Omit<LinkTileProps, "role"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
6
|
-
declare function TileInner<Role extends Roles = 'none'>({ role, ...props }: TileProps<Role>, ref: TileRef<Role>): JSX.Element | null;
|
|
6
|
+
declare function TileInner<Role extends Roles = 'none'>({ role, ...props }: TileProps<Role>, ref: TileRef<Role>): React.JSX.Element | null;
|
|
7
7
|
/**
|
|
8
8
|
* <NextTile role={checkbox}/> can be used as single checkbox as well as in group.
|
|
9
9
|
*
|
|
@@ -14,7 +14,7 @@ var variantColorMap = {
|
|
|
14
14
|
};
|
|
15
15
|
var StyledNotation = /*#__PURE__*/styled.i.withConfig({
|
|
16
16
|
displayName: "StyledNotation",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-11_25_1__sc-160q1m6-0"
|
|
18
18
|
})(["", " color:", ";font-style:italic;"], getTypographyIntent('small'), function (_ref) {
|
|
19
19
|
var variant = _ref.variant;
|
|
20
20
|
return variant ? colors[variantColorMap[variant]] : colors.gray15;
|
|
@@ -12,37 +12,37 @@ var inputBgColor = colors.white;
|
|
|
12
12
|
var inputBorder = "".concat(colors.gray70, " solid 1px");
|
|
13
13
|
var StyledRootAddon = /*#__PURE__*/styled.span.withConfig({
|
|
14
14
|
displayName: "StyledRootAddon",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-11_25_1__sc-1782nvg-0"
|
|
16
16
|
})(["display:inline-flex;align-items:center;height:100%;position:absolute;top:0;color:", ";", ";"], function (_ref) {
|
|
17
17
|
var disabled = _ref.disabled;
|
|
18
18
|
return disabled ? colors.gray70 : colors.gray45;
|
|
19
19
|
}, getTypographyIntent('body'));
|
|
20
20
|
export var StyledPrefix = /*#__PURE__*/styled(StyledRootAddon).withConfig({
|
|
21
21
|
displayName: "StyledPrefix",
|
|
22
|
-
componentId: "core-
|
|
22
|
+
componentId: "core-11_25_1__sc-1782nvg-1"
|
|
23
23
|
})(["left:", "px;"], spacing.md);
|
|
24
24
|
export var StyledSuffix = /*#__PURE__*/styled(StyledRootAddon).withConfig({
|
|
25
25
|
displayName: "StyledSuffix",
|
|
26
|
-
componentId: "core-
|
|
26
|
+
componentId: "core-11_25_1__sc-1782nvg-2"
|
|
27
27
|
})(["right:", "px;"], function (_ref2) {
|
|
28
28
|
var withIncrementer = _ref2.withIncrementer;
|
|
29
29
|
return withIncrementer ? spacing.md + incrementerWidth : spacing.md;
|
|
30
30
|
});
|
|
31
31
|
export var StyledIncrementerWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
32
32
|
displayName: "StyledIncrementerWrapper",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-11_25_1__sc-1782nvg-3"
|
|
34
34
|
})(["display:flex;flex-direction:column;position:absolute;top:1px;right:1px;height:100%;"]);
|
|
35
35
|
export var StyledIncrementerButton = /*#__PURE__*/styled.button.withConfig({
|
|
36
36
|
displayName: "StyledIncrementerButton",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-11_25_1__sc-1782nvg-4"
|
|
38
38
|
})(["display:inline-flex;justify-content:center;align-items:center;width:", "px;height:calc(50% - 1px);border:none;border-radius:0px;outline:none;background-color:", ";padding:0;cursor:pointer;&:first-child,&:last-child{border-left:", ";&:disabled{border-color:", ";background-color:", ";}}&:first-child{border-top-right-radius:2px;}&:last-child{border-top:", ";border-bottom-right-radius:2px;}svg{fill:", ";}&:hover{svg{fill:", ";}}&:disabled{cursor:default;svg{fill:", ";}}"], incrementerWidth, inputBgColor, inputBorder, colors.gray70, colors.gray94, inputBorder, colors.gray45, colors.gray10, colors.gray70);
|
|
39
39
|
export var StyledInput = /*#__PURE__*/styled(Input).withConfig({
|
|
40
40
|
displayName: "StyledInput",
|
|
41
|
-
componentId: "core-
|
|
41
|
+
componentId: "core-11_25_1__sc-1782nvg-5"
|
|
42
42
|
})([""]);
|
|
43
43
|
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
44
44
|
displayName: "StyledWrapper",
|
|
45
|
-
componentId: "core-
|
|
45
|
+
componentId: "core-11_25_1__sc-1782nvg-6"
|
|
46
46
|
})(["position:relative;", ""], function (_ref3) {
|
|
47
47
|
var hasIncrementer = _ref3.hasIncrementer;
|
|
48
48
|
return hasIncrementer && css(["", "{padding-right:", "px;}"], StyledInput, spacing.md + incrementerWidth);
|
|
@@ -2,6 +2,6 @@ import styled from 'styled-components';
|
|
|
2
2
|
export var arrowSize = 8;
|
|
3
3
|
export var StyledArrow = /*#__PURE__*/styled.div.withConfig({
|
|
4
4
|
displayName: "StyledArrow",
|
|
5
|
-
componentId: "core-
|
|
5
|
+
componentId: "core-11_25_1__sc-1epxw7u-0"
|
|
6
6
|
})(["position:absolute;background:inherit;width:", "px;height:", "px;transform:rotate(45deg);"], arrowSize, arrowSize);
|
|
7
7
|
//# sourceMappingURL=OverlayArrow.styles.js.map
|
|
@@ -11,7 +11,7 @@ import type { OverlayTriggerProps } from './OverlayTrigger.types';
|
|
|
11
11
|
export declare const OverlayTrigger: React.ForwardRefExoticComponent<OverlayTriggerProps & React.RefAttributes<HTMLElement>>;
|
|
12
12
|
export declare function CloseOnFocus({ hide }: {
|
|
13
13
|
hide: (event: any) => any;
|
|
14
|
-
}): JSX.Element;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
15
|
export declare function useOverlayTriggerContext(): {
|
|
16
16
|
hide: (event: any) => any;
|
|
17
17
|
show: (event: any) => any;
|
|
@@ -34,11 +34,13 @@ if (!(globalThis !== null && globalThis !== void 0 && globalThis.ResizeObserver)
|
|
|
34
34
|
globalThis.ResizeObserver = ResizeObserverPolyfill;
|
|
35
35
|
}
|
|
36
36
|
var ClickOutside = function ClickOutside(_ref) {
|
|
37
|
-
var
|
|
37
|
+
var container = _ref.container,
|
|
38
|
+
onClickOutside = _ref.onClickOutside,
|
|
38
39
|
refs = _ref.refs;
|
|
39
40
|
useClickOutside({
|
|
40
41
|
onClickOutside: onClickOutside,
|
|
41
|
-
refs: refs
|
|
42
|
+
refs: refs,
|
|
43
|
+
container: container
|
|
42
44
|
});
|
|
43
45
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
44
46
|
};
|
|
@@ -74,6 +76,7 @@ export var OverlayTrigger = /*#__PURE__*/React.forwardRef(function OverlayTrigge
|
|
|
74
76
|
_ref2$clickOutsideIgn = _ref2.clickOutsideIgnoreRefs,
|
|
75
77
|
clickOutsideIgnoreRefs = _ref2$clickOutsideIgn === void 0 ? [] : _ref2$clickOutsideIgn,
|
|
76
78
|
containFocus = _ref2.containFocus,
|
|
79
|
+
container = _ref2.container,
|
|
77
80
|
_ref2$hideDelay = _ref2.hideDelay,
|
|
78
81
|
hideDelay = _ref2$hideDelay === void 0 ? 100 : _ref2$hideDelay,
|
|
79
82
|
hideKeys_ = _ref2.hideKeys,
|
|
@@ -189,12 +192,15 @@ export var OverlayTrigger = /*#__PURE__*/React.forwardRef(function OverlayTrigge
|
|
|
189
192
|
return /*#__PURE__*/React.createElement(DelayedToggleContext.Provider, {
|
|
190
193
|
value: delayedToggle
|
|
191
194
|
}, wrappedTriggerElement, visibility.isVisible && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ClickOutside, {
|
|
195
|
+
container: container,
|
|
192
196
|
onClickOutside: function onClickOutside(event) {
|
|
193
197
|
clickedOutsideRef.current = true;
|
|
194
198
|
delayedToggle.disable(event);
|
|
195
199
|
},
|
|
196
200
|
refs: [overlayElRef, triggerElRef].concat(_toConsumableArray(clickOutsideIgnoreRefs))
|
|
197
|
-
}), /*#__PURE__*/React.createElement(Portal,
|
|
201
|
+
}), /*#__PURE__*/React.createElement(Portal, _extends({
|
|
202
|
+
container: container
|
|
203
|
+
}, portalProps), /*#__PURE__*/React.createElement(Trigger, {
|
|
198
204
|
isEnabled: visibility.isVisible,
|
|
199
205
|
enable: delayedToggle.enable,
|
|
200
206
|
disable: delayedToggle.disable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayTrigger.js","names":["arrow","floatingArrow","flip","floatingFlip","limitShift","offset","floatingOffset","shift","floatingShift","size","floatingSize","FocusScope","useId","React","ResizeObserverPolyfill","Arrow","arrowSize","useOverlay","Portal","useClickOutside","DelayedToggleContext","useDelayedToggle","useDelayedToggleContext","Trigger","useTrigger","useVisibility","mergeRefs","useOverlayTriggerA11y","globalThis","ResizeObserver","ClickOutside","_ref","onClickOutside","refs","createElement","Fragment","OverlayTrigger","forwardRef","_ref2","ref","_ref2$afterHide","afterHide","_ref2$afterShow","afterShow","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","autoFocus","_ref2$beforeHide","beforeHide","_ref2$beforeShow","beforeShow","_ref2$canFlip","canFlip","children","_ref2$clickOutsideIgn","clickOutsideIgnoreRefs","containFocus","_ref2$hideDelay","hideDelay","hideKeys_","hideKeys","_ref2$initialIsVisibl","initialIsVisible","overlay","_ref2$padding","padding","_ref2$placement","placement","_ref2$restoreFocusOnH","restoreFocusOnHide","_ref2$showDelay","showDelay","_ref2$showKeys","showKeys","_ref2$shrinkOverlay","shrinkOverlay","_ref2$trigger","trigger","_ref2$arrow","overlayApiRef","overlayRef","role","_ref2$passA11yPropsTo","passA11yPropsToOverlay","isDialogRole","includes","console","warn","concat","target","triggerElRef","useRef","overlayElRef","_React$useState","useState","_React$useState2","_slicedToArray","referenceElement","setReferenceElement","clickedOutsideRef","visibility","useImperativeHandle","show","hide","triggers","useMemo","Array","isArray","useEffect","indexOf","isVisible","current","focus","delayedToggle","beforeDisable","beforeEnable","disableDelay","enableDelay","isEnabled","onDisable","onEnable","triggerApi","enable","disable","enableKeys","disableKeys","triggerRef","triggerElement","overlayId","_useOverlayTriggerA","canPropOverlayUp","isValidElement","id","isOpen","wrapperProps","overlayProps","portalProps","triggerProps","focusScopeProps","labelProps","wrappedTriggerElement","cloneElement","_objectSpread","open","Provider","value","event","_toConsumableArray","TriggerOverlay","contain","restoreFocus","overlayCloneProps","CloseOnFocus","_ref3","style","height","position","top","width","onFocus","opacity","useOverlayTriggerContext","_useDelayedToggleCont","toggle","_ref4","arrowRef","arrowPadding","middleware","mainAxis","limiter","apply","_ref5","elements","Object","assign","floating","minWidth","reference","getBoundingClientRect","element","filter","_useOverlay","overlayStyle","referenceRefCallback","referenceRef","middlewareData","currentPlacement","mergedRefs","_extends"],"sources":["../../src/OverlayTrigger/OverlayTrigger.tsx"],"sourcesContent":["import {\n arrow as floatingArrow,\n flip as floatingFlip,\n limitShift,\n offset as floatingOffset,\n shift as floatingShift,\n size as floatingSize,\n} from '@floating-ui/react-dom'\nimport { FocusScope } from '@react-aria/focus'\nimport { useId } from '@react-aria/utils'\nimport React from 'react'\nimport ResizeObserverPolyfill from 'resize-observer-polyfill'\nimport { Arrow } from '../Overlay/OverlayArrow'\nimport { arrowSize } from '../Overlay/OverlayArrow.styles'\nimport type { OverlayMiddleware } from '../Overlay/useOverlay'\nimport { useOverlay } from '../Overlay/useOverlay'\nimport { Portal } from '../Portal'\nimport type { ClickOutsideConfig } from '../_hooks/ClickOutside'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport {\n DelayedToggleContext,\n useDelayedToggle,\n useDelayedToggleContext,\n} from '../_hooks/DelayedToggle'\nimport type { TriggerApi } from '../_hooks/Trigger'\nimport { Trigger, useTrigger } from '../_hooks/Trigger'\nimport { useVisibility } from '../_hooks/Visibility'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { Placement } from '../_utils/placement'\nimport type { ReactElementWithRef } from '../_utils/types'\nimport { useOverlayTriggerA11y } from './a11yPresets'\nimport type {\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps,\n} from './OverlayTrigger.types'\n\nif (!globalThis?.ResizeObserver) {\n globalThis.ResizeObserver = ResizeObserverPolyfill\n}\n\nconst ClickOutside = ({ onClickOutside, refs }: ClickOutsideConfig) => {\n useClickOutside({\n onClickOutside,\n refs,\n })\n\n return <></>\n}\n\n/**\n\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-overlaytrigger--demo)\n\n */\nexport const OverlayTrigger = React.forwardRef<\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps\n>(function OverlayTrigger(\n {\n afterHide = () => {},\n afterShow = () => {},\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n autoFocus,\n beforeHide = () => true,\n beforeShow = () => true,\n canFlip = true,\n children,\n clickOutsideIgnoreRefs = [],\n containFocus,\n hideDelay = 100,\n hideKeys: hideKeys_,\n initialIsVisible = false,\n overlay,\n padding = 2,\n placement = 'top',\n restoreFocusOnHide = true, // TODO: change default to be false, but that is a breaking change\n showDelay = 0,\n showKeys = ['ArrowDown', 'Down'],\n shrinkOverlay = false,\n trigger = 'click',\n arrow = false,\n overlayRef: overlayApiRef,\n role,\n passA11yPropsToOverlay = false,\n },\n ref\n) {\n const isDialogRole = role === 'dialog'\n\n if (isDialogRole && (trigger === 'hover' || trigger?.includes('hover'))) {\n console.warn(\n `@procore/core-react: OverlayTigger has role ${role} and a hover trigger, this may cause weird focus management and is unrecommended. Review autoFocus prop.`\n )\n }\n\n const hideKeys = hideKeys_ ?? {\n // Note by default OverlayTrigger closes on tab. Dialog role changes the default.\n overlay:\n containFocus ?? isDialogRole\n ? ['Escape', 'Esc']\n : ['Escape', 'Esc', 'Tab'],\n target: ['Escape', 'Esc'],\n }\n\n const triggerElRef = React.useRef<HTMLElement>(null)\n const overlayElRef = React.useRef<HTMLElement>(null)\n const [referenceElement, setReferenceElement] =\n React.useState<HTMLElement | null>(null)\n const clickedOutsideRef = React.useRef(true)\n\n const visibility = useVisibility({\n afterHide,\n afterShow,\n initialIsVisible,\n })\n\n React.useImperativeHandle(overlayApiRef, () => ({\n show: visibility.show,\n hide: visibility.hide,\n }))\n\n const triggers = React.useMemo(\n () => (Array.isArray(trigger) ? trigger : [trigger]),\n [trigger]\n )\n\n React.useEffect(() => {\n if (triggers.indexOf('none') >= 0 && visibility.isVisible) {\n visibility.hide()\n }\n if (triggers.indexOf('always') >= 0 && !visibility.isVisible) {\n visibility.show()\n }\n }, [triggers, visibility.isVisible])\n\n // TODO delete in a separate branch for testing and rely only on FocusScope\n React.useEffect(() => {\n if (\n restoreFocusOnHide &&\n !visibility.isVisible &&\n !clickedOutsideRef.current\n ) {\n triggerElRef.current && triggerElRef.current.focus()\n }\n\n clickedOutsideRef.current = false\n }, [restoreFocusOnHide, triggerElRef, visibility.isVisible])\n\n const delayedToggle = useDelayedToggle({\n beforeDisable: beforeHide,\n beforeEnable: beforeShow,\n disableDelay: hideDelay,\n enableDelay: showDelay,\n isEnabled: visibility.isVisible,\n onDisable: visibility.hide,\n onEnable: visibility.show,\n })\n\n const triggerApi = useTrigger({\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n enableKeys: showKeys,\n disableKeys: hideKeys.target,\n trigger,\n triggerRef: triggerElRef,\n })\n\n const triggerElement =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => ReactElementWithRef)(triggerApi)\n : (children as ReactElementWithRef)\n\n const overlayId = useId()\n\n const {\n wrapperProps,\n overlayProps,\n portalProps,\n triggerProps,\n focusScopeProps,\n // Does not use. User needs to wire up when using dialog role!\n labelProps,\n } = useOverlayTriggerA11y({\n canPropOverlayUp: React.isValidElement(overlay) && passA11yPropsToOverlay,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id: overlayId,\n isOpen: visibility.isVisible,\n role,\n })\n\n const wrappedTriggerElement = React.cloneElement(triggerElement, {\n open: triggerApi.isVisible,\n ref: triggerElement.ref\n ? mergeRefs(triggerElement.ref, ref, triggerElRef, setReferenceElement)\n : mergeRefs(ref, triggerElRef, setReferenceElement),\n ...triggerProps,\n })\n\n return (\n <DelayedToggleContext.Provider value={delayedToggle}>\n {wrappedTriggerElement}\n {visibility.isVisible && (\n <>\n <ClickOutside\n {...{\n onClickOutside: (event) => {\n clickedOutsideRef.current = true\n delayedToggle.disable(event)\n },\n refs: [overlayElRef, triggerElRef, ...clickOutsideIgnoreRefs],\n }}\n />\n <Portal {...portalProps}>\n <Trigger\n {...{\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n disableKeys: hideKeys.overlay,\n trigger: trigger === 'click' ? 'none' : trigger,\n triggerRef: overlayElRef,\n }}\n >\n <TriggerOverlay\n autoFocus={autoFocus ?? focusScopeProps.autoFocus}\n containFocus={containFocus ?? focusScopeProps.contain}\n restoreFocus={\n restoreFocusOnHide ?? focusScopeProps.restoreFocus\n }\n ref={overlayElRef}\n referenceElement={referenceElement}\n overlay={overlay}\n shrinkOverlay={shrinkOverlay}\n placement={placement}\n padding={padding}\n canFlip={canFlip}\n arrow={arrow}\n wrapperProps={wrapperProps}\n overlayCloneProps={overlayProps}\n />\n </Trigger>\n </Portal>\n </>\n )}\n </DelayedToggleContext.Provider>\n )\n})\n\nexport function CloseOnFocus({ hide }: { hide: (event: any) => any }) {\n return (\n // in IE, the hidden input's cursor appears right under the menu\n // this positions it arbitrarily away where it won't be noticed\n <div\n style={{\n height: 0,\n position: 'absolute',\n top: 1000,\n width: 0,\n }}\n >\n <input onFocus={hide} style={{ opacity: 0 }} />\n </div>\n )\n}\n\nexport function useOverlayTriggerContext() {\n const { enable: show, disable: hide, toggle } = useDelayedToggleContext()\n\n return {\n hide,\n show,\n toggle,\n }\n}\n\ninterface TriggerOverlayProps {\n containFocus?: boolean\n autoFocus?: boolean\n restoreFocus?: boolean\n placement: Placement\n canFlip?: boolean\n arrow?: boolean\n padding: number\n shrinkOverlay: boolean\n overlay: React.ReactNode\n overlayCloneProps: any\n wrapperProps: Record<string, unknown>\n referenceElement: HTMLElement | null\n}\n\nexport const TriggerOverlay = React.forwardRef<\n HTMLElement,\n TriggerOverlayProps\n>(function (\n {\n autoFocus,\n containFocus,\n restoreFocus,\n placement,\n canFlip,\n arrow,\n padding,\n shrinkOverlay,\n overlay,\n referenceElement,\n wrapperProps,\n overlayCloneProps,\n },\n ref\n) {\n const arrowRef = React.useRef<HTMLDivElement>(null)\n\n const arrowPadding = arrowSize / 2 + 1\n const middleware = [\n floatingOffset({ mainAxis: arrow ? padding + arrowPadding : padding }),\n canFlip ? floatingFlip() : null,\n floatingShift({ limiter: limitShift() }),\n !shrinkOverlay\n ? floatingSize({\n apply({ elements }) {\n Object.assign(elements.floating.style, {\n minWidth: `${elements.reference.getBoundingClientRect().width}px`,\n })\n },\n })\n : null,\n floatingArrow({\n element: arrowRef,\n padding: 6,\n }),\n ].filter((middleware) => middleware !== null) as OverlayMiddleware[]\n\n const {\n overlayStyle,\n referenceRef: referenceRefCallback,\n overlayRef,\n middlewareData,\n placement: currentPlacement,\n } = useOverlay({\n middleware,\n placement,\n })\n\n React.useEffect(() => {\n referenceRefCallback(referenceElement)\n }, [referenceElement, referenceRefCallback])\n\n const mergedRefs = mergeRefs(ref, overlayRef)\n\n // TODO could just move clone and clone props to parent\n if (!React.isValidElement(overlay) && overlayCloneProps) {\n console.warn(\n 'PLEASE REPORT ISSUE @procore/core-react: OverlayTrigger TriggerOverlay is not a valid React element but wants to clone \"overlay\" with props. Cannot pass props to the element.'\n )\n }\n\n return (\n <FocusScope\n autoFocus={autoFocus}\n contain={containFocus}\n restoreFocus={restoreFocus}\n >\n <div\n data-qa=\"core-overlay-trigger-overlay-wrapper\"\n ref={mergedRefs}\n style={overlayStyle}\n {...wrapperProps}\n >\n {React.isValidElement(overlay)\n ? React.cloneElement(overlay, overlayCloneProps)\n : overlay}\n {arrow && (\n <Arrow\n ref={arrowRef}\n arrow={middlewareData.arrow}\n placement={currentPlacement}\n />\n )}\n </div>\n </FocusScope>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SACEA,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY,EACpBC,UAAU,EACVC,MAAM,IAAIC,cAAc,EACxBC,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY,QACf,wBAAwB;AAC/B,SAASC,UAAU,QAAQ,mBAAmB;AAC9C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E,oBAAoB,CAACtF,gBAAgB,CAAC;EACxC,CAAC,EAAE,CAACA,gBAAgB,EAAEsF,oBAAoB,CAAC,CAAC;EAE5C,IAAMI,UAAU,GAAGnK,SAAS,CAACa,GAAG,EAAE2C,UAAU,CAAC;;EAE7C;EACA,IAAI,eAACrE,KAAK,CAACwH,cAAc,CAACpE,OAAO,CAAC,IAAIwF,iBAAiB,EAAE;IACvDjE,OAAO,CAACC,IAAI,CACV,gLACF,CAAC;EACH;EAEA,oBACE5E,KAAA,CAAAqB,aAAA,CAACvB,UAAU;IACTqC,SAAS,EAAEA,SAAU;IACrBuG,OAAO,EAAE7F,YAAa;IACtB8F,YAAY,EAAEA;EAAa,gBAE3B3I,KAAA,CAAAqB,aAAA,QAAA4J,QAAA;IACE,WAAQ,sCAAsC;IAC9CvJ,GAAG,EAAEsJ,UAAW;IAChBjC,KAAK,EAAE4B;EAAa,GAChBhD,YAAY,GAEf,aAAA3H,KAAK,CAACwH,cAAc,CAACpE,OAAO,CAAC,gBAC1BpD,KAAK,CAACkI,YAAY,CAAC9E,OAAO,EAAEwF,iBAAiB,CAAC,GAC9CxF,OAAO,EACVjE,KAAK,iBACJa,KAAA,CAAAqB,aAAA,CAACnB,KAAK;IACJwB,GAAG,EAAEgI,QAAS;IACdvK,KAAK,EAAE2L,cAAc,CAAC3L,KAAM;IAC5BqE,SAAS,EAAEuH;EAAiB,CAC7B,CAEA,CACK,CAAC;AAEjB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"OverlayTrigger.js","names":["arrow","floatingArrow","flip","floatingFlip","limitShift","offset","floatingOffset","shift","floatingShift","size","floatingSize","FocusScope","useId","React","ResizeObserverPolyfill","Arrow","arrowSize","useOverlay","Portal","useClickOutside","DelayedToggleContext","useDelayedToggle","useDelayedToggleContext","Trigger","useTrigger","useVisibility","mergeRefs","useOverlayTriggerA11y","globalThis","ResizeObserver","ClickOutside","_ref","container","onClickOutside","refs","createElement","Fragment","OverlayTrigger","forwardRef","_ref2","ref","_ref2$afterHide","afterHide","_ref2$afterShow","afterShow","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","autoFocus","_ref2$beforeHide","beforeHide","_ref2$beforeShow","beforeShow","_ref2$canFlip","canFlip","children","_ref2$clickOutsideIgn","clickOutsideIgnoreRefs","containFocus","_ref2$hideDelay","hideDelay","hideKeys_","hideKeys","_ref2$initialIsVisibl","initialIsVisible","overlay","_ref2$padding","padding","_ref2$placement","placement","_ref2$restoreFocusOnH","restoreFocusOnHide","_ref2$showDelay","showDelay","_ref2$showKeys","showKeys","_ref2$shrinkOverlay","shrinkOverlay","_ref2$trigger","trigger","_ref2$arrow","overlayApiRef","overlayRef","role","_ref2$passA11yPropsTo","passA11yPropsToOverlay","isDialogRole","includes","console","warn","concat","target","triggerElRef","useRef","overlayElRef","_React$useState","useState","_React$useState2","_slicedToArray","referenceElement","setReferenceElement","clickedOutsideRef","visibility","useImperativeHandle","show","hide","triggers","useMemo","Array","isArray","useEffect","indexOf","isVisible","current","focus","delayedToggle","beforeDisable","beforeEnable","disableDelay","enableDelay","isEnabled","onDisable","onEnable","triggerApi","enable","disable","enableKeys","disableKeys","triggerRef","triggerElement","overlayId","_useOverlayTriggerA","canPropOverlayUp","isValidElement","id","isOpen","wrapperProps","overlayProps","portalProps","triggerProps","focusScopeProps","labelProps","wrappedTriggerElement","cloneElement","_objectSpread","open","Provider","value","event","_toConsumableArray","_extends","TriggerOverlay","contain","restoreFocus","overlayCloneProps","CloseOnFocus","_ref3","style","height","position","top","width","onFocus","opacity","useOverlayTriggerContext","_useDelayedToggleCont","toggle","_ref4","arrowRef","arrowPadding","middleware","mainAxis","limiter","apply","_ref5","elements","Object","assign","floating","minWidth","reference","getBoundingClientRect","element","filter","_useOverlay","overlayStyle","referenceRefCallback","referenceRef","middlewareData","currentPlacement","mergedRefs"],"sources":["../../src/OverlayTrigger/OverlayTrigger.tsx"],"sourcesContent":["import {\n arrow as floatingArrow,\n flip as floatingFlip,\n limitShift,\n offset as floatingOffset,\n shift as floatingShift,\n size as floatingSize,\n} from '@floating-ui/react-dom'\nimport { FocusScope } from '@react-aria/focus'\nimport { useId } from '@react-aria/utils'\nimport React from 'react'\nimport ResizeObserverPolyfill from 'resize-observer-polyfill'\nimport { Arrow } from '../Overlay/OverlayArrow'\nimport { arrowSize } from '../Overlay/OverlayArrow.styles'\nimport type { OverlayMiddleware } from '../Overlay/useOverlay'\nimport { useOverlay } from '../Overlay/useOverlay'\nimport { Portal } from '../Portal'\nimport type { ClickOutsideConfig } from '../_hooks/ClickOutside'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport {\n DelayedToggleContext,\n useDelayedToggle,\n useDelayedToggleContext,\n} from '../_hooks/DelayedToggle'\nimport type { TriggerApi } from '../_hooks/Trigger'\nimport { Trigger, useTrigger } from '../_hooks/Trigger'\nimport { useVisibility } from '../_hooks/Visibility'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { Placement } from '../_utils/placement'\nimport type { ReactElementWithRef } from '../_utils/types'\nimport { useOverlayTriggerA11y } from './a11yPresets'\nimport type {\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps,\n} from './OverlayTrigger.types'\n\nif (!globalThis?.ResizeObserver) {\n globalThis.ResizeObserver = ResizeObserverPolyfill\n}\n\nconst ClickOutside = ({\n container,\n onClickOutside,\n refs,\n}: ClickOutsideConfig) => {\n useClickOutside({\n onClickOutside,\n refs,\n container,\n })\n\n return <></>\n}\n\n/**\n\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-overlaytrigger--demo)\n\n */\nexport const OverlayTrigger = React.forwardRef<\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps\n>(function OverlayTrigger(\n {\n afterHide = () => {},\n afterShow = () => {},\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n autoFocus,\n beforeHide = () => true,\n beforeShow = () => true,\n canFlip = true,\n children,\n clickOutsideIgnoreRefs = [],\n containFocus,\n container,\n hideDelay = 100,\n hideKeys: hideKeys_,\n initialIsVisible = false,\n overlay,\n padding = 2,\n placement = 'top',\n restoreFocusOnHide = true, // TODO: change default to be false, but that is a breaking change\n showDelay = 0,\n showKeys = ['ArrowDown', 'Down'],\n shrinkOverlay = false,\n trigger = 'click',\n arrow = false,\n overlayRef: overlayApiRef,\n role,\n passA11yPropsToOverlay = false,\n },\n ref\n) {\n const isDialogRole = role === 'dialog'\n\n if (isDialogRole && (trigger === 'hover' || trigger?.includes('hover'))) {\n console.warn(\n `@procore/core-react: OverlayTigger has role ${role} and a hover trigger, this may cause weird focus management and is unrecommended. Review autoFocus prop.`\n )\n }\n\n const hideKeys = hideKeys_ ?? {\n // Note by default OverlayTrigger closes on tab. Dialog role changes the default.\n overlay:\n containFocus ?? isDialogRole\n ? ['Escape', 'Esc']\n : ['Escape', 'Esc', 'Tab'],\n target: ['Escape', 'Esc'],\n }\n\n const triggerElRef = React.useRef<HTMLElement>(null)\n const overlayElRef = React.useRef<HTMLElement>(null)\n const [referenceElement, setReferenceElement] =\n React.useState<HTMLElement | null>(null)\n const clickedOutsideRef = React.useRef(true)\n\n const visibility = useVisibility({\n afterHide,\n afterShow,\n initialIsVisible,\n })\n\n React.useImperativeHandle(overlayApiRef, () => ({\n show: visibility.show,\n hide: visibility.hide,\n }))\n\n const triggers = React.useMemo(\n () => (Array.isArray(trigger) ? trigger : [trigger]),\n [trigger]\n )\n\n React.useEffect(() => {\n if (triggers.indexOf('none') >= 0 && visibility.isVisible) {\n visibility.hide()\n }\n if (triggers.indexOf('always') >= 0 && !visibility.isVisible) {\n visibility.show()\n }\n }, [triggers, visibility.isVisible])\n\n // TODO delete in a separate branch for testing and rely only on FocusScope\n React.useEffect(() => {\n if (\n restoreFocusOnHide &&\n !visibility.isVisible &&\n !clickedOutsideRef.current\n ) {\n triggerElRef.current && triggerElRef.current.focus()\n }\n\n clickedOutsideRef.current = false\n }, [restoreFocusOnHide, triggerElRef, visibility.isVisible])\n\n const delayedToggle = useDelayedToggle({\n beforeDisable: beforeHide,\n beforeEnable: beforeShow,\n disableDelay: hideDelay,\n enableDelay: showDelay,\n isEnabled: visibility.isVisible,\n onDisable: visibility.hide,\n onEnable: visibility.show,\n })\n\n const triggerApi = useTrigger({\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n enableKeys: showKeys,\n disableKeys: hideKeys.target,\n trigger,\n triggerRef: triggerElRef,\n })\n\n const triggerElement =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => ReactElementWithRef)(triggerApi)\n : (children as ReactElementWithRef)\n\n const overlayId = useId()\n\n const {\n wrapperProps,\n overlayProps,\n portalProps,\n triggerProps,\n focusScopeProps,\n // Does not use. User needs to wire up when using dialog role!\n labelProps,\n } = useOverlayTriggerA11y({\n canPropOverlayUp: React.isValidElement(overlay) && passA11yPropsToOverlay,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id: overlayId,\n isOpen: visibility.isVisible,\n role,\n })\n\n const wrappedTriggerElement = React.cloneElement(triggerElement, {\n open: triggerApi.isVisible,\n ref: triggerElement.ref\n ? mergeRefs(triggerElement.ref, ref, triggerElRef, setReferenceElement)\n : mergeRefs(ref, triggerElRef, setReferenceElement),\n ...triggerProps,\n })\n\n return (\n <DelayedToggleContext.Provider value={delayedToggle}>\n {wrappedTriggerElement}\n {visibility.isVisible && (\n <>\n <ClickOutside\n {...{\n container: container,\n onClickOutside: (event) => {\n clickedOutsideRef.current = true\n delayedToggle.disable(event)\n },\n refs: [overlayElRef, triggerElRef, ...clickOutsideIgnoreRefs],\n }}\n />\n <Portal container={container} {...portalProps}>\n <Trigger\n {...{\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n disableKeys: hideKeys.overlay,\n trigger: trigger === 'click' ? 'none' : trigger,\n triggerRef: overlayElRef,\n }}\n >\n <TriggerOverlay\n autoFocus={autoFocus ?? focusScopeProps.autoFocus}\n containFocus={containFocus ?? focusScopeProps.contain}\n restoreFocus={\n restoreFocusOnHide ?? focusScopeProps.restoreFocus\n }\n ref={overlayElRef}\n referenceElement={referenceElement}\n overlay={overlay}\n shrinkOverlay={shrinkOverlay}\n placement={placement}\n padding={padding}\n canFlip={canFlip}\n arrow={arrow}\n wrapperProps={wrapperProps}\n overlayCloneProps={overlayProps}\n />\n </Trigger>\n </Portal>\n </>\n )}\n </DelayedToggleContext.Provider>\n )\n})\n\nexport function CloseOnFocus({ hide }: { hide: (event: any) => any }) {\n return (\n // in IE, the hidden input's cursor appears right under the menu\n // this positions it arbitrarily away where it won't be noticed\n <div\n style={{\n height: 0,\n position: 'absolute',\n top: 1000,\n width: 0,\n }}\n >\n <input onFocus={hide} style={{ opacity: 0 }} />\n </div>\n )\n}\n\nexport function useOverlayTriggerContext() {\n const { enable: show, disable: hide, toggle } = useDelayedToggleContext()\n\n return {\n hide,\n show,\n toggle,\n }\n}\n\ninterface TriggerOverlayProps {\n containFocus?: boolean\n autoFocus?: boolean\n restoreFocus?: boolean\n placement: Placement\n canFlip?: boolean\n arrow?: boolean\n padding: number\n shrinkOverlay: boolean\n overlay: React.ReactNode\n overlayCloneProps: any\n wrapperProps: Record<string, unknown>\n referenceElement: HTMLElement | null\n}\n\nexport const TriggerOverlay = React.forwardRef<\n HTMLElement,\n TriggerOverlayProps\n>(function (\n {\n autoFocus,\n containFocus,\n restoreFocus,\n placement,\n canFlip,\n arrow,\n padding,\n shrinkOverlay,\n overlay,\n referenceElement,\n wrapperProps,\n overlayCloneProps,\n },\n ref\n) {\n const arrowRef = React.useRef<HTMLDivElement>(null)\n\n const arrowPadding = arrowSize / 2 + 1\n const middleware = [\n floatingOffset({ mainAxis: arrow ? padding + arrowPadding : padding }),\n canFlip ? floatingFlip() : null,\n floatingShift({ limiter: limitShift() }),\n !shrinkOverlay\n ? floatingSize({\n apply({ elements }) {\n Object.assign(elements.floating.style, {\n minWidth: `${elements.reference.getBoundingClientRect().width}px`,\n })\n },\n })\n : null,\n floatingArrow({\n element: arrowRef,\n padding: 6,\n }),\n ].filter((middleware) => middleware !== null) as OverlayMiddleware[]\n\n const {\n overlayStyle,\n referenceRef: referenceRefCallback,\n overlayRef,\n middlewareData,\n placement: currentPlacement,\n } = useOverlay({\n middleware,\n placement,\n })\n\n React.useEffect(() => {\n referenceRefCallback(referenceElement)\n }, [referenceElement, referenceRefCallback])\n\n const mergedRefs = mergeRefs(ref, overlayRef)\n\n // TODO could just move clone and clone props to parent\n if (!React.isValidElement(overlay) && overlayCloneProps) {\n console.warn(\n 'PLEASE REPORT ISSUE @procore/core-react: OverlayTrigger TriggerOverlay is not a valid React element but wants to clone \"overlay\" with props. Cannot pass props to the element.'\n )\n }\n\n return (\n <FocusScope\n autoFocus={autoFocus}\n contain={containFocus}\n restoreFocus={restoreFocus}\n >\n <div\n data-qa=\"core-overlay-trigger-overlay-wrapper\"\n ref={mergedRefs}\n style={overlayStyle}\n {...wrapperProps}\n >\n {React.isValidElement(overlay)\n ? React.cloneElement(overlay, overlayCloneProps)\n : overlay}\n {arrow && (\n <Arrow\n ref={arrowRef}\n arrow={middlewareData.arrow}\n placement={currentPlacement}\n />\n )}\n </div>\n </FocusScope>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SACEA,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY,EACpBC,UAAU,EACVC,MAAM,IAAIC,cAAc,EACxBC,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY,QACf,wBAAwB;AAC/B,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,KAAK,QAAQ,mBAAmB;AACzC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SAASC,SAAS,QAAQ,gCAAg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YAAM;IACpB4E,oBAAoB,CAACvF,gBAAgB,CAAC;EACxC,CAAC,EAAE,CAACA,gBAAgB,EAAEuF,oBAAoB,CAAC,CAAC;EAE5C,IAAMI,UAAU,GAAGrK,SAAS,CAACc,GAAG,EAAE2C,UAAU,CAAC;;EAE7C;EACA,IAAI,eAACtE,KAAK,CAACyH,cAAc,CAACpE,OAAO,CAAC,IAAIyF,iBAAiB,EAAE;IACvDlE,OAAO,CAACC,IAAI,CACV,gLACF,CAAC;EACH;EAEA,oBACE7E,KAAA,CAAAsB,aAAA,CAACxB,UAAU;IACTsC,SAAS,EAAEA,SAAU;IACrBwG,OAAO,EAAE9F,YAAa;IACtB+F,YAAY,EAAEA;EAAa,gBAE3B7I,KAAA,CAAAsB,aAAA,QAAAoH,QAAA;IACE,WAAQ,sCAAsC;IAC9C/G,GAAG,EAAEuJ,UAAW;IAChBjC,KAAK,EAAE4B;EAAa,GAChBjD,YAAY,GAEf,aAAA5H,KAAK,CAACyH,cAAc,CAACpE,OAAO,CAAC,gBAC1BrD,KAAK,CAACmI,YAAY,CAAC9E,OAAO,EAAEyF,iBAAiB,CAAC,GAC9CzF,OAAO,EACVlE,KAAK,iBACJa,KAAA,CAAAsB,aAAA,CAACpB,KAAK;IACJyB,GAAG,EAAEiI,QAAS;IACdzK,KAAK,EAAE6L,cAAc,CAAC7L,KAAM;IAC5BsE,SAAS,EAAEwH;EAAiB,CAC7B,CAEA,CACK,CAAC;AAEjB,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { OverlayProps } from '../Overlay/Overlay';
|
|
3
|
+
import type { PortalProps } from '../Portal/Portal.types';
|
|
3
4
|
import type { BeforeCallback } from '../_hooks/DelayedCallback';
|
|
4
5
|
import type { TriggerRenderProps } from '../_hooks/Trigger';
|
|
5
6
|
import type { VisibilityConfig } from '../_hooks/Visibility';
|
|
@@ -8,7 +9,7 @@ export declare type PickedOverlayProps = Pick<OverlayProps, 'canFlip' | 'padding
|
|
|
8
9
|
export declare type PickedTriggerProps = Pick<TriggerRenderProps, 'children' | 'trigger'>;
|
|
9
10
|
export declare type PickedTriggerRenderProps = Pick<TriggerRenderProps, 'children'>;
|
|
10
11
|
export declare type PickedVisibilityProps = Pick<VisibilityConfig, 'afterHide' | 'afterShow' | 'initialIsVisible'>;
|
|
11
|
-
export interface OverlayTriggerProps extends PickedOverlayProps, PickedTriggerProps, PickedTriggerRenderProps, PickedVisibilityProps {
|
|
12
|
+
export interface OverlayTriggerProps extends PickedOverlayProps, PickedTriggerProps, PickedTriggerRenderProps, PickedVisibilityProps, Pick<PortalProps, 'container'> {
|
|
12
13
|
['aria-labelledby']?: string;
|
|
13
14
|
['aria-label']?: string;
|
|
14
15
|
['aria-describedby']?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayTrigger.types.js","names":[],"sources":["../../src/OverlayTrigger/OverlayTrigger.types.ts"],"sourcesContent":["import type { OverlayProps } from '../Overlay/Overlay'\nimport type { BeforeCallback } from '../_hooks/DelayedCallback'\nimport type { TriggerRenderProps } from '../_hooks/Trigger'\nimport type { VisibilityConfig } from '../_hooks/Visibility'\n\nexport type OverlayTriggerRole =\n | 'dialog'\n | 'menu'\n | 'listbox'\n | 'tooltip'\n | 'none'\n\nexport type PickedOverlayProps = Pick<\n OverlayProps,\n 'canFlip' | 'padding' | 'placement' | 'shrinkOverlay' | 'arrow'\n>\n\nexport type PickedTriggerProps = Pick<\n TriggerRenderProps,\n 'children' | 'trigger'\n>\n\nexport type PickedTriggerRenderProps = Pick<TriggerRenderProps, 'children'>\n\nexport type PickedVisibilityProps = Pick<\n VisibilityConfig,\n 'afterHide' | 'afterShow' | 'initialIsVisible'\n>\n\nexport interface OverlayTriggerProps\n extends PickedOverlayProps,\n PickedTriggerProps,\n PickedTriggerRenderProps,\n PickedVisibilityProps {\n ['aria-labelledby']?: string\n ['aria-label']?: string\n ['aria-describedby']?: string\n ['aria-details']?: string\n /**\n * The callback to run before the overlay is hidden. Returning\n * `false` will prevent hiding.\n * ```\n * (e: event) => boolean | Promise | undefined\n * ```\n * @since 10.19.0\n */\n beforeHide?: BeforeCallback\n /**\n * The callback to run before the overlay is shown. Returning\n * `false` will prevent showing.\n * ```\n * (e: event) => boolean | Promise | undefined\n * ```\n * @since 10.19.0\n */\n beforeShow?: BeforeCallback\n\n /**\n * Additional refs to check for clickOutside behavior\n * @since 10.19.0\n */\n clickOutsideIgnoreRefs?: React.RefObject<HTMLElement>[]\n\n /**\n * The delay when hiding the overlay\n * @since 10.19.0\n */\n hideDelay?: number\n\n /**\n * Keys to hide the overlay when the overlay is focused\n * @a11y OverlayTrigger by default closes on tab. To remove tab from closing\n * and have only Esc keys, set \"containFocus\" to true, or opt-in to a full dialog role.\n * @since 10.19.0\n */\n hideKeys?: {\n overlay: string[]\n target: string[]\n }\n overlay: React.ReactNode\n\n /**\n * Restore focus to the target after the overlay is hidden\n * @default true\n * @since 10.19.0\n */\n restoreFocusOnHide?: boolean\n\n /**\n * The delay when showing the overlay\n * @since 10.19.0\n */\n showDelay?: number\n\n /**\n * Keys to show the overlay when the target is focused\n * @since 10.19.0\n */\n showKeys?: string[]\n\n /**\n * Toggles overlay visibility\n * @since 11.2.0\n */\n overlayRef?: React.Ref<OverlayTriggerRef>\n\n /**\n * Accessibility props.\n * @a11y May opionate \"autoFocus\" and \"containFocus\"\n * @since 11.2.0\n */\n role?: OverlayTriggerRole\n\n /**\n * Whether to auto focus the first focusable element in the overlay on mount.\n * True by default for role \"dialog\"\n * @since 11.5.0\n */\n autoFocus?: boolean\n\n /**\n * Whether to contain focus inside the overlay, so users cannot move focus outside, for example in a modal dialog.\n * True by default for role \"dialog\"\n * @since 11.5.0\n * */\n containFocus?: boolean\n\n /**\n * By default, role and id are applied to wrapper. But has knowledge of\n * Set to true, if you want OverlayTrigger to place them on your overlay component.\n *\n * @default false\n * @since 11.5.0\n */\n passA11yPropsToOverlay?: boolean\n}\n\nexport interface OverlayTriggerRef {\n /**\n * Show visibility\n * @since 11.2.0\n */\n show: () => void\n /**\n * Hide overlay\n * @since 11.2.0\n */\n hide: () => void\n}\n\n/**\n * @deprecatedSince 11.2.0\n * @deprecated To be replaced by OverlayTriggerProps#overlayRef in future release\n */\nexport type DeprecatedOverlayTriggerRef = HTMLElement\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"OverlayTrigger.types.js","names":[],"sources":["../../src/OverlayTrigger/OverlayTrigger.types.ts"],"sourcesContent":["import type { OverlayProps } from '../Overlay/Overlay'\nimport type { PortalProps } from '../Portal/Portal.types'\nimport type { BeforeCallback } from '../_hooks/DelayedCallback'\nimport type { TriggerRenderProps } from '../_hooks/Trigger'\nimport type { VisibilityConfig } from '../_hooks/Visibility'\n\nexport type OverlayTriggerRole =\n | 'dialog'\n | 'menu'\n | 'listbox'\n | 'tooltip'\n | 'none'\n\nexport type PickedOverlayProps = Pick<\n OverlayProps,\n 'canFlip' | 'padding' | 'placement' | 'shrinkOverlay' | 'arrow'\n>\n\nexport type PickedTriggerProps = Pick<\n TriggerRenderProps,\n 'children' | 'trigger'\n>\n\nexport type PickedTriggerRenderProps = Pick<TriggerRenderProps, 'children'>\n\nexport type PickedVisibilityProps = Pick<\n VisibilityConfig,\n 'afterHide' | 'afterShow' | 'initialIsVisible'\n>\n\nexport interface OverlayTriggerProps\n extends PickedOverlayProps,\n PickedTriggerProps,\n PickedTriggerRenderProps,\n PickedVisibilityProps,\n Pick<PortalProps, 'container'> {\n ['aria-labelledby']?: string\n ['aria-label']?: string\n ['aria-describedby']?: string\n ['aria-details']?: string\n /**\n * The callback to run before the overlay is hidden. Returning\n * `false` will prevent hiding.\n * ```\n * (e: event) => boolean | Promise | undefined\n * ```\n * @since 10.19.0\n */\n beforeHide?: BeforeCallback\n /**\n * The callback to run before the overlay is shown. Returning\n * `false` will prevent showing.\n * ```\n * (e: event) => boolean | Promise | undefined\n * ```\n * @since 10.19.0\n */\n beforeShow?: BeforeCallback\n\n /**\n * Additional refs to check for clickOutside behavior\n * @since 10.19.0\n */\n clickOutsideIgnoreRefs?: React.RefObject<HTMLElement>[]\n\n /**\n * The delay when hiding the overlay\n * @since 10.19.0\n */\n hideDelay?: number\n\n /**\n * Keys to hide the overlay when the overlay is focused\n * @a11y OverlayTrigger by default closes on tab. To remove tab from closing\n * and have only Esc keys, set \"containFocus\" to true, or opt-in to a full dialog role.\n * @since 10.19.0\n */\n hideKeys?: {\n overlay: string[]\n target: string[]\n }\n overlay: React.ReactNode\n\n /**\n * Restore focus to the target after the overlay is hidden\n * @default true\n * @since 10.19.0\n */\n restoreFocusOnHide?: boolean\n\n /**\n * The delay when showing the overlay\n * @since 10.19.0\n */\n showDelay?: number\n\n /**\n * Keys to show the overlay when the target is focused\n * @since 10.19.0\n */\n showKeys?: string[]\n\n /**\n * Toggles overlay visibility\n * @since 11.2.0\n */\n overlayRef?: React.Ref<OverlayTriggerRef>\n\n /**\n * Accessibility props.\n * @a11y May opionate \"autoFocus\" and \"containFocus\"\n * @since 11.2.0\n */\n role?: OverlayTriggerRole\n\n /**\n * Whether to auto focus the first focusable element in the overlay on mount.\n * True by default for role \"dialog\"\n * @since 11.5.0\n */\n autoFocus?: boolean\n\n /**\n * Whether to contain focus inside the overlay, so users cannot move focus outside, for example in a modal dialog.\n * True by default for role \"dialog\"\n * @since 11.5.0\n * */\n containFocus?: boolean\n\n /**\n * By default, role and id are applied to wrapper. But has knowledge of\n * Set to true, if you want OverlayTrigger to place them on your overlay component.\n *\n * @default false\n * @since 11.5.0\n */\n passA11yPropsToOverlay?: boolean\n}\n\nexport interface OverlayTriggerRef {\n /**\n * Show visibility\n * @since 11.2.0\n */\n show: () => void\n /**\n * Hide overlay\n * @since 11.2.0\n */\n hide: () => void\n}\n\n/**\n * @deprecatedSince 11.2.0\n * @deprecated To be replaced by OverlayTriggerProps#overlayRef in future release\n */\nexport type DeprecatedOverlayTriggerRef = HTMLElement\n"],"mappings":""}
|
|
@@ -91,54 +91,54 @@ export declare function useLabelledPopup({ 'aria-describedby': ariaDescribedby,
|
|
|
91
91
|
id: string | undefined;
|
|
92
92
|
};
|
|
93
93
|
popupProps: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
94
|
+
"aria-activedescendant"?: string | undefined;
|
|
95
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
96
|
+
"aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
|
|
97
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
98
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
99
|
+
"aria-colcount"?: number | undefined;
|
|
100
|
+
"aria-colindex"?: number | undefined;
|
|
101
|
+
"aria-colspan"?: number | undefined;
|
|
102
|
+
"aria-controls"?: string | undefined;
|
|
103
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "step" | "date" | "page" | "location" | undefined;
|
|
104
|
+
"aria-describedby": string | undefined;
|
|
105
|
+
"aria-details": string | undefined;
|
|
106
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
107
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
108
|
+
"aria-errormessage"?: string | undefined;
|
|
109
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
110
|
+
"aria-flowto"?: string | undefined;
|
|
111
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
112
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
113
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
114
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
115
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
116
|
+
"aria-label"?: string | undefined;
|
|
117
|
+
"aria-labelledby"?: string | undefined;
|
|
118
|
+
"aria-level"?: number | undefined;
|
|
119
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
120
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
121
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
122
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
123
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
124
|
+
"aria-owns"?: string | undefined;
|
|
125
|
+
"aria-placeholder"?: string | undefined;
|
|
126
|
+
"aria-posinset"?: number | undefined;
|
|
127
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
128
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
129
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
130
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
131
|
+
"aria-roledescription"?: string | undefined;
|
|
132
|
+
"aria-rowcount"?: number | undefined;
|
|
133
|
+
"aria-rowindex"?: number | undefined;
|
|
134
|
+
"aria-rowspan"?: number | undefined;
|
|
135
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
136
|
+
"aria-setsize"?: number | undefined;
|
|
137
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
138
|
+
"aria-valuemax"?: number | undefined;
|
|
139
|
+
"aria-valuemin"?: number | undefined;
|
|
140
|
+
"aria-valuenow"?: number | undefined;
|
|
141
|
+
"aria-valuetext"?: string | undefined;
|
|
142
142
|
id?: string | undefined;
|
|
143
143
|
role: "dialog" | "menu" | "listbox";
|
|
144
144
|
};
|
|
@@ -43,7 +43,7 @@ export declare const Page: React.ForwardRefExoticComponent<DivAttributes & React
|
|
|
43
43
|
Main: React.ForwardRefExoticComponent<PageMainProps & React.RefAttributes<HTMLDivElement>>;
|
|
44
44
|
Aside: React.ForwardRefExoticComponent<PageAsideProps & React.RefAttributes<HTMLDivElement>>;
|
|
45
45
|
Grid: {
|
|
46
|
-
({ gutterX, ...props }: GridProps): JSX.Element;
|
|
46
|
+
({ gutterX, ...props }: GridProps): React.JSX.Element;
|
|
47
47
|
displayName: string;
|
|
48
48
|
};
|
|
49
49
|
Column: React.ForwardRefExoticComponent<import("../Grid/Grid.types").GridColProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -16,34 +16,34 @@ var headerCSS = /*#__PURE__*/css(["padding-top:", "px;margin-left:", "px;margin-
|
|
|
16
16
|
});
|
|
17
17
|
export var StyledPageHeader = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
displayName: "StyledPageHeader",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-11_25_1__sc-1cvdbsv-0"
|
|
20
20
|
})(["", ""], headerCSS);
|
|
21
21
|
export var StyledPageTitle = /*#__PURE__*/styled.div.withConfig({
|
|
22
22
|
displayName: "StyledPageTitle",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-11_25_1__sc-1cvdbsv-1"
|
|
24
24
|
})(["margin-top:", "px;&:last-child{padding-bottom:", "px;}&:first-child{margin-top:0;}"], spacing.lg, spacing.lg);
|
|
25
25
|
export var StyledPageBreadcrumbs = /*#__PURE__*/styled(Breadcrumbs).withConfig({
|
|
26
26
|
displayName: "StyledPageBreadcrumbs",
|
|
27
|
-
componentId: "core-
|
|
27
|
+
componentId: "core-11_25_1__sc-1cvdbsv-2"
|
|
28
28
|
})(["margin-top:", "px;&:first-child{margin-top:0;}"], spacing.lg);
|
|
29
29
|
export var StyledPageBanner = /*#__PURE__*/styled.div.withConfig({
|
|
30
30
|
displayName: "StyledPageBanner",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-11_25_1__sc-1cvdbsv-3"
|
|
32
32
|
})(["margin-top:", "px;&:first-child{margin-top:0;}"], spacing.lg);
|
|
33
33
|
export var getActions = function getActions() {
|
|
34
34
|
return css(["flex-shrink:0;padding-left:", "px;> button,> a{&:first-child{margin-left:0;}margin-left:", "px;}"], spacing.xl, spacing.sm);
|
|
35
35
|
};
|
|
36
36
|
export var StyledPageActions = /*#__PURE__*/styled.div.withConfig({
|
|
37
37
|
displayName: "StyledPageActions",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-11_25_1__sc-1cvdbsv-4"
|
|
39
39
|
})(["", ""], getActions());
|
|
40
40
|
export var StyledPageTabs = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledPageTabs",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-11_25_1__sc-1cvdbsv-5"
|
|
43
43
|
})(["margin-top:", "px;"], spacing.sm);
|
|
44
44
|
export var StyledBody = /*#__PURE__*/styled.div.withConfig({
|
|
45
45
|
displayName: "StyledBody",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-11_25_1__sc-1cvdbsv-6"
|
|
47
47
|
})(["margin-top:", "px;"], spacing.xl);
|
|
48
48
|
var panelWidth = 400;
|
|
49
49
|
var zIndexes = {
|
|
@@ -56,7 +56,7 @@ export var animationDuration = {
|
|
|
56
56
|
};
|
|
57
57
|
export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
58
58
|
displayName: "StyledFooter",
|
|
59
|
-
componentId: "core-
|
|
59
|
+
componentId: "core-11_25_1__sc-1cvdbsv-7"
|
|
60
60
|
})(["background-color:", ";margin:0 ", "px;", " position:sticky;bottom:0;z-index:", ";", ""], colors.white, outerPageSpacing * -1, function (_ref2) {
|
|
61
61
|
var $hasShadow = _ref2.$hasShadow;
|
|
62
62
|
return $hasShadow && getShadow(2, 'top');
|
|
@@ -66,7 +66,7 @@ export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
|
66
66
|
});
|
|
67
67
|
export var StyledAside = /*#__PURE__*/styled.div.withConfig({
|
|
68
68
|
displayName: "StyledAside",
|
|
69
|
-
componentId: "core-
|
|
69
|
+
componentId: "core-11_25_1__sc-1cvdbsv-8"
|
|
70
70
|
})(["", " @media ", "{position:absolute;right:0;}"], function (_ref4) {
|
|
71
71
|
var $closed = _ref4.$closed,
|
|
72
72
|
$open = _ref4.$open;
|
|
@@ -86,7 +86,7 @@ var getPanelAnimation = function getPanelAnimation() {
|
|
|
86
86
|
};
|
|
87
87
|
export var StyledAsidePanel = /*#__PURE__*/styled.div.withConfig({
|
|
88
88
|
displayName: "StyledAsidePanel",
|
|
89
|
-
componentId: "core-
|
|
89
|
+
componentId: "core-11_25_1__sc-1cvdbsv-9"
|
|
90
90
|
})(["", " @media ", "{", "}", " ", " border-left:1px solid ", ";width:", "px;position:fixed;background-color:", ";overflow:auto;z-index:", ";", " ", ""], function (_ref7) {
|
|
91
91
|
var $rightOffset = _ref7.$rightOffset;
|
|
92
92
|
return css(["@media ", "{", " border-left:0;z-index:", ";right:", "px;}"], getSmallScreenBreakpointValue(), getShadow(2), zIndexes.panelNarrowScreen, $rightOffset);
|
|
@@ -105,7 +105,7 @@ export var StyledAsidePanel = /*#__PURE__*/styled.div.withConfig({
|
|
|
105
105
|
});
|
|
106
106
|
export var StyledPageMain = /*#__PURE__*/styled.div.withConfig({
|
|
107
107
|
displayName: "StyledPageMain",
|
|
108
|
-
componentId: "core-
|
|
108
|
+
componentId: "core-11_25_1__sc-1cvdbsv-10"
|
|
109
109
|
})(["position:relative;padding:0 ", "px;max-width:100%;background-color:", ";", " ", ""], outerPageSpacing, colors.gray96, function () {
|
|
110
110
|
return isIE11() && css(["flex:1 0 0%;"]);
|
|
111
111
|
}, function (_ref12) {
|
|
@@ -120,13 +120,13 @@ export var StyledPageMain = /*#__PURE__*/styled.div.withConfig({
|
|
|
120
120
|
});
|
|
121
121
|
export var StyledPageContainer = /*#__PURE__*/styled.div.withConfig({
|
|
122
122
|
displayName: "StyledPageContainer",
|
|
123
|
-
componentId: "core-
|
|
123
|
+
componentId: "core-11_25_1__sc-1cvdbsv-11"
|
|
124
124
|
})(["display:grid;grid-template-columns:1fr auto;", ""], function () {
|
|
125
125
|
return isIE11() && css(["display:flex;flex-wrap:wrap;"]);
|
|
126
126
|
});
|
|
127
127
|
export var StyledAsideFluidContainer = /*#__PURE__*/styled.div.withConfig({
|
|
128
128
|
displayName: "StyledAsideFluidContainer",
|
|
129
|
-
componentId: "core-
|
|
129
|
+
componentId: "core-11_25_1__sc-1cvdbsv-12"
|
|
130
130
|
})(["", ""], function (_ref13) {
|
|
131
131
|
var $closed = _ref13.$closed,
|
|
132
132
|
$open = _ref13.$open;
|
|
@@ -5,22 +5,22 @@ import { Typography } from '../Typography/Typography';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
displayName: "StyledContainer",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-11_25_1__sc-fy34i1-0"
|
|
9
9
|
})(["display:flex;align-items:center;"]);
|
|
10
10
|
export var StyledPageCount = /*#__PURE__*/styled(Typography).withConfig({
|
|
11
11
|
displayName: "StyledPageCount",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-11_25_1__sc-fy34i1-1"
|
|
13
13
|
})(["margin-right:", "px;"], spacing.xl);
|
|
14
14
|
export var StyledCurrentPage = /*#__PURE__*/styled(Typography).withConfig({
|
|
15
15
|
displayName: "StyledCurrentPage",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-11_25_1__sc-fy34i1-2"
|
|
17
17
|
})(["margin-right:", "px;"], spacing.sm);
|
|
18
18
|
export var StyledButton = /*#__PURE__*/styled(Button).withConfig({
|
|
19
19
|
displayName: "StyledButton",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-11_25_1__sc-fy34i1-3"
|
|
21
21
|
})(["margin-left:", "px;"], spacing.sm);
|
|
22
22
|
export var StyledOverlay = /*#__PURE__*/styled(Card).withConfig({
|
|
23
23
|
displayName: "StyledOverlay",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-11_25_1__sc-fy34i1-4"
|
|
25
25
|
})(["max-height:300px;max-width:248px;"]);
|
|
26
26
|
//# sourceMappingURL=Pagination.styles.js.map
|
|
@@ -11,15 +11,15 @@ var gutter = /*#__PURE__*/css(["> * + *{margin-left:", "px;}"], spacing.sm);
|
|
|
11
11
|
var panel = /*#__PURE__*/css(["display:flex;align-items:center;padding:", "px;background:", ";"], spacing.lg, colors.white);
|
|
12
12
|
export var StyledHeader = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "StyledHeader",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-11_25_1__sc-lidix2-0"
|
|
15
15
|
})(["border-bottom:1px solid ", ";", ""], colors.gray85, panel);
|
|
16
16
|
export var StyledTitle = /*#__PURE__*/styled(Typography).withConfig({
|
|
17
17
|
displayName: "StyledTitle",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-11_25_1__sc-lidix2-1"
|
|
19
19
|
})(["flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
|
|
20
20
|
export var StyledHeaderBackAction = /*#__PURE__*/styled.div.withConfig({
|
|
21
21
|
displayName: "StyledHeaderBackAction",
|
|
22
|
-
componentId: "core-
|
|
22
|
+
componentId: "core-11_25_1__sc-lidix2-2"
|
|
23
23
|
})(["transition:all 300ms ease-out;flex-shrink:0;width:", "px;margin-right:", "px;opacity:", ";transform:translateX( ", "px );"], function (_ref) {
|
|
24
24
|
var active = _ref.active;
|
|
25
25
|
return active ? headerActionSize : 0;
|
|
@@ -35,38 +35,38 @@ export var StyledHeaderBackAction = /*#__PURE__*/styled.div.withConfig({
|
|
|
35
35
|
});
|
|
36
36
|
export var StyledMoreMenu = /*#__PURE__*/styled(Card).withConfig({
|
|
37
37
|
displayName: "StyledMoreMenu",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-11_25_1__sc-lidix2-3"
|
|
39
39
|
})(["max-height:128px;"]);
|
|
40
40
|
export var StyledHeaderActions = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledHeaderActions",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-11_25_1__sc-lidix2-4"
|
|
43
43
|
})(["display:flex;margin-left:", "px;flex-shrink:0;", ""], spacing.lg, gutter);
|
|
44
44
|
export var StyledCloseButton = /*#__PURE__*/styled.div.withConfig({
|
|
45
45
|
displayName: "StyledCloseButton",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-11_25_1__sc-lidix2-5"
|
|
47
47
|
})(["margin-left:", "px;"], spacing.sm);
|
|
48
48
|
export var StyledBody = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledBody",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-11_25_1__sc-lidix2-6"
|
|
51
51
|
})(["height:100%;background:", ";overflow-y:auto;> ", "{padding-left:", "px;padding-right:", "px;", "{padding-left:0;padding-right:0;}&:first-child > ", "{padding-top:", "px;}}"], function (_ref5) {
|
|
52
52
|
var secondaryBgColor = _ref5.secondaryBgColor;
|
|
53
53
|
return secondaryBgColor ? colors.gray96 : colors.white;
|
|
54
54
|
}, StyledSection, spacing.lg, spacing.lg, StyledSection, StyledSectionInner, spacing.lg);
|
|
55
55
|
export var StyledPanel = /*#__PURE__*/styled.aside.withConfig({
|
|
56
56
|
displayName: "StyledPanel",
|
|
57
|
-
componentId: "core-
|
|
57
|
+
componentId: "core-11_25_1__sc-lidix2-7"
|
|
58
58
|
})(["display:flex;flex-direction:column;width:100%;height:100%;background:", ";overflow:hidden;"], colors.white);
|
|
59
59
|
export var StyledFooterNotation = /*#__PURE__*/styled.div.withConfig({
|
|
60
60
|
displayName: "StyledFooterNotation",
|
|
61
|
-
componentId: "core-
|
|
61
|
+
componentId: "core-11_25_1__sc-lidix2-8"
|
|
62
62
|
})(["flex-grow:1;"]);
|
|
63
63
|
export var StyledFooterActions = /*#__PURE__*/styled.div.withConfig({
|
|
64
64
|
displayName: "StyledFooterActions",
|
|
65
|
-
componentId: "core-
|
|
65
|
+
componentId: "core-11_25_1__sc-lidix2-9"
|
|
66
66
|
})(["", ""], gutter);
|
|
67
67
|
export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
68
68
|
displayName: "StyledFooter",
|
|
69
|
-
componentId: "core-
|
|
69
|
+
componentId: "core-11_25_1__sc-lidix2-10"
|
|
70
70
|
})(["border-top:1px solid ", ";justify-content:flex-end;", " ", ""], colors.gray85, panel, function (_ref6) {
|
|
71
71
|
var $hasShadow = _ref6.$hasShadow;
|
|
72
72
|
return $hasShadow && css(["", " z-index:1;"], getShadow(2, 'top'));
|