@procore/core-react 11.31.0 → 11.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnchorNavigation/AnchorNavigation.d.ts +6 -6
- package/dist/AnchorNavigation/AnchorNavigation.js +19 -17
- package/dist/AnchorNavigation/AnchorNavigation.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +8 -7
- package/dist/AnchorNavigation/AnchorNavigation.styles.js.map +1 -1
- package/dist/Avatar/Avatar.d.ts +18 -4
- package/dist/Avatar/Avatar.js +30 -14
- package/dist/Avatar/Avatar.js.map +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.d.ts +19 -0
- package/dist/Banner/Banner.js +20 -19
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +12 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +13 -13
- package/dist/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/ContactItem/ContactItem.d.ts +14 -0
- package/dist/ContactItem/ContactItem.js +15 -14
- package/dist/ContactItem/ContactItem.js.map +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.d.ts +13 -0
- package/dist/Dropdown/Dropdown.js +14 -14
- package/dist/Dropdown/Dropdown.js.map +1 -1
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.d.ts +12 -0
- package/dist/Dropzone/Dropzone.js +14 -14
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.d.ts +13 -0
- package/dist/EmptyState/EmptyState.js +14 -14
- package/dist/EmptyState/EmptyState.js.map +1 -1
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.d.ts +3 -3
- package/dist/FileList/FileList.js +10 -10
- package/dist/FileList/FileList.js.map +1 -1
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.js +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.js.map +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.js +1 -1
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +16 -16
- 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 +10 -10
- package/dist/Menu/Menu.js +13 -13
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.d.ts +7 -0
- package/dist/MenuImperative/MenuImperative.js +8 -8
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.d.ts +16 -0
- package/dist/Modal/Modal.js +17 -17
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.d.ts +3 -3
- package/dist/PageLayout/PageLayout.js +60 -29
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.d.ts +2 -0
- package/dist/PageLayout/PageLayout.styles.js +37 -26
- package/dist/PageLayout/PageLayout.styles.js.map +1 -1
- package/dist/PageLayout/PageLayout.types.d.ts +6 -1
- package/dist/PageLayout/PageLayout.types.js.map +1 -1
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.d.ts +15 -0
- package/dist/Panel/Panel.js +16 -16
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.d.ts +2 -2
- package/dist/Popover/Popover.js +21 -22
- package/dist/Popover/Popover.js.map +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 +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +6 -6
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.d.ts +16 -0
- package/dist/Select/Select.js +17 -17
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- 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.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.d.ts +5 -5
- package/dist/Tabs/Tabs.js +32 -28
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +12 -6
- package/dist/Tabs/Tabs.styles.js +40 -38
- package/dist/Tabs/Tabs.styles.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.d.ts +14 -0
- package/dist/Thumbnail/Thumbnail.js +8 -8
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.d.ts +1 -1
- package/dist/Toast/Toast.js +18 -18
- package/dist/Toast/Toast.js.map +1 -1
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/Tooltip/Tooltip.d.ts +17 -0
- package/dist/Tooltip/Tooltip.js +18 -18
- package/dist/Tooltip/Tooltip.js.map +1 -1
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/useFileUploader.js +1 -1
- package/dist/_hooks/useFileUploader.js.map +1 -1
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +12 -12
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +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 +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +726 -726
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +4 -4
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +41 -41
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +38 -38
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +68 -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 +47 -47
- package/dist/_typedoc/Popover/Popover.types.json +14 -14
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +14 -14
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
- package/dist/_typedoc/Select/Select.types.json +57 -57
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +99 -99
- package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +8 -8
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_utils/isFunction.d.ts +1 -0
- package/dist/_utils/isFunction.js +4 -0
- package/dist/_utils/isFunction.js.map +1 -0
- package/package.json +1 -1
package/dist/Modal/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","names":["Clear","FocusScope","React","useEffect","Button","CloseWithConfirmContext","useCloseWithConfirmContext","useCloseWithConfirmState","useModalDialogLike","Portal","Heading","LevelContext","Section","SectionProvider","useDeprecation","useLayoutEventListener","useI18nContext","useOverflowObserver","useScrollLock","Visibility","addSubcomponents","mergeRefs","ChildRegistryProvider","useModalChildRegistryDispatch","fadeInClassName","fadeOutClassName","StyledModal","StyledModalBody","StyledModalButtons","StyledModalCancel","StyledModalContainer","StyledModalContent","StyledModalFooter","StyledModalFooterNotation","StyledModalFooterSummary","StyledModalHeader","StyledModalHeading","StyledModalScrim","StyledModalWarningIcon","useInitializeModalFocus","noop","defaultStartLevel","initialBodyLevel","defaultHowToClose","ModalCloseContext","createContext","howToClose","onClose","undefined","ModalBodyScrollContext","isBodyScrolled","setIsBodyScrolled","ModalClosableHeader","forwardRef","_ref","ref","children","externalOnClose","qa","props","_objectWithoutProperties","_excluded","_React$useContext","useContext","_React$useContext2","I18n","modalClosableHeaderRef","useRef","_useCloseWithConfirmC","closeWithConfirm","registerChildRef","child","onClickButton","e","includes","createElement","_extends","$isBodyScrolled","t","closeButton","onClick","icon","variant","ModalClosableFooterButtons","_ref2","_excluded2","_React$useContext3","_useCloseWithConfirmC2","modalClosableFooterButtonsRef","ModalContainer","_ref3","placement","width","_excluded3","_React$useContext4","modalContainerRef","hasOnClose","shadowStrength","$placement","$width","ModalBody","_ref4","_ref4$noSideSpacing","noSideSpacing","_excluded4","_useOverflowObserver","isOverflowingY","overflowRef","scrollRef","modalBodyRef","_React$useContext5","event","handler","currentTarget","scrollTop","scope","Provider","value","tabIndex","ModalFooterSummary","_ref5","_excluded5","ModalFooterNotation","_ref6","_excluded6","intent","color","italic","Modal_","_ref7","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","id","_ref7$onClickOverlay","onClickOverlay","_ref7$open","open","_ref7$placement","role","_excluded7","_React$useState","useState","_React$useState2","_slicedToArray","visible","setVisible","_React$useState3","_React$useState4","fadeType","setFadeType","closeWithConfirmState","setTimeout","onTransitionEnd","handleKeyDown","key","preventDefault","stopPropagation","_useModalDialogLike","isModal","isOpen","dialogProps_","dialogProps","onClickScrim","autoFocus","contain","restoreFocus","className","onKeyDown","ModalBodyScrollObserver","_ref8","_React$useState5","_React$useState6","ConfirmModal","_ref9","headline","_excluded8","Modal","size","ModalState","oldThing","displayName","Body","Container","Content","FooterSummary","Footer","FooterButtons","FooterNotation","Header","Overlay","Scrim","State"],"sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import { Clear } from '@procore/core-icons/dist'\nimport { FocusScope } from '@react-aria/focus'\nimport React, { useEffect } from 'react'\nimport { Button } from '../Button/Button'\nimport {\n CloseWithConfirmContext,\n useCloseWithConfirmContext,\n useCloseWithConfirmState,\n} from '../Form/closeWithConfirm'\nimport { useModalDialogLike } from '../OverlayTrigger/a11yPresets'\nimport { Portal } from '../Portal/Portal'\nimport {\n Heading,\n LevelContext,\n Section,\n SectionProvider,\n} from '../Section/Section'\nimport type { TypographyProps } from '../Typography/Typography.types'\nimport { useDeprecation } from '../_hooks/Deprecation'\nimport { useLayoutEventListener } from '../_hooks/EventListener'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useOverflowObserver } from '../_hooks/OverflowObserver'\nimport { useScrollLock } from '../_hooks/ScrollLock'\nimport type { RenderProps } from '../_hooks/Visibility'\nimport { Visibility } from '../_hooks/Visibility'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { DivAttributes, SpanAttributes } from '../_utils/types'\nimport {\n ChildRegistryProvider,\n useModalChildRegistryDispatch,\n} from './ChildRegistry.context'\nimport {\n fadeInClassName,\n fadeOutClassName,\n StyledModal,\n StyledModalBody,\n StyledModalButtons,\n StyledModalCancel,\n StyledModalContainer,\n StyledModalContent,\n StyledModalFooter,\n StyledModalFooterNotation,\n StyledModalFooterSummary,\n StyledModalHeader,\n StyledModalHeading,\n StyledModalScrim,\n StyledModalWarningIcon,\n} from './Modal.styles'\nimport type {\n ConfirmModalProps,\n ModalBodyProps,\n ModalCloseableHeaderProps,\n ModalCloseContextApi,\n ModalContainerProps,\n ModalOptionalCloseStartegy,\n ModalProps,\n} from './Modal.types'\nimport { useInitializeModalFocus } from './useInitializeModalFocus'\n\nfunction noop() {}\nconst defaultStartLevel = 2\nconst initialBodyLevel = 3\n\n// TODO default in breaking\nconst defaultHowToClose: ModalOptionalCloseStartegy[] = ['scrim', 'x']\n\nconst ModalCloseContext = React.createContext<ModalCloseContextApi>({\n howToClose: [],\n onClose: undefined,\n})\n\ninterface ModalBodyScrollContextApi {\n isBodyScrolled: boolean\n setIsBodyScrolled: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nconst ModalBodyScrollContext = React.createContext<ModalBodyScrollContextApi>({\n isBodyScrolled: false,\n setIsBodyScrolled: noop,\n})\n\nconst ModalClosableHeader = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(({ children, onClose: externalOnClose, qa, ...props }, ref) => {\n const { isBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const modalClosableHeaderRef = React.useRef(null)\n\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'header', ref: modalClosableHeaderRef })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n if (onClose && howToClose?.includes('x')) {\n closeWithConfirm(onClose)(e, 'x')\n return\n }\n closeWithConfirm(externalOnClose!)(e)\n }\n\n return (\n <StyledModalHeader\n $isBodyScrolled={isBodyScrolled}\n {...props}\n ref={mergeRefs(ref, modalClosableHeaderRef)}\n >\n <StyledModalHeading>{children}</StyledModalHeading>\n {(onClose && howToClose?.includes('x')) || externalOnClose ? (\n <StyledModalCancel>\n <Button\n aria-label={I18n.t('core.modal.a11y.close')}\n data-qa={qa?.closeButton}\n data-internal=\"close-button\"\n onClick={onClickButton}\n icon={<Clear />}\n variant=\"tertiary\"\n />\n </StyledModalCancel>\n ) : null}\n </StyledModalHeader>\n )\n})\n\nconst ModalClosableFooterButtons = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(({ children, ...props }, ref) => {\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const modalClosableFooterButtonsRef = React.useRef(null)\n\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({\n child: 'closeableButtons',\n ref: modalClosableFooterButtonsRef,\n })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n closeWithConfirm(onClose!)(e, 'footer-button')\n }\n\n return (\n <StyledModalButtons\n {...props}\n ref={mergeRefs(ref, modalClosableFooterButtonsRef)}\n >\n {howToClose?.includes('footer-button') && (\n <Button onClick={onClickButton} variant=\"tertiary\">\n {I18n.t('core.modal.cancel')}\n </Button>\n )}\n {children}\n </StyledModalButtons>\n )\n})\n\nconst ModalContainer = React.forwardRef<HTMLDivElement, ModalContainerProps>(\n ({ placement, width, ...props }, ref) => {\n const { onClose } = React.useContext(ModalCloseContext)\n const modalContainerRef = React.useRef<HTMLDivElement>(null)\n useInitializeModalFocus({ modalContainerRef, hasOnClose: !!onClose })\n\n return (\n <StyledModalContainer\n {...props}\n shadowStrength={4}\n $placement={placement}\n $width={width}\n ref={mergeRefs(ref, modalContainerRef)}\n />\n )\n }\n)\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ children, noSideSpacing = false, ...props }, ref) => {\n const { isOverflowingY, ref: overflowRef } = useOverflowObserver()\n const scrollRef = React.useRef(null)\n const modalBodyRef = React.useRef(null)\n const { setIsBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'body', ref: modalBodyRef })\n }, [])\n\n useLayoutEventListener({\n event: 'scroll',\n handler: (e: React.UIEvent<HTMLElement>) => {\n setIsBodyScrolled(e.currentTarget.scrollTop > 0)\n },\n scope: scrollRef,\n })\n\n return (\n <SectionProvider>\n <LevelContext.Provider value={initialBodyLevel}>\n <StyledModalBody\n {...props}\n isOverflowingY={isOverflowingY}\n noSideSpacing={noSideSpacing}\n ref={mergeRefs(overflowRef, scrollRef, ref, modalBodyRef)}\n tabIndex={0}\n >\n {children}\n </StyledModalBody>\n </LevelContext.Provider>\n </SectionProvider>\n )\n }\n)\n\nconst ModalFooterSummary = React.forwardRef<HTMLDivElement, DivAttributes>(\n ({ children, ...props }, ref) => {\n return (\n <StyledModalFooterSummary {...props} ref={ref}>\n {children}\n </StyledModalFooterSummary>\n )\n }\n)\n\nconst ModalFooterNotation = React.forwardRef<\n HTMLSpanElement,\n SpanAttributes & TypographyProps\n>(({ children, ...props }, ref) => (\n <StyledModalFooterNotation\n aria-live=\"polite\"\n intent=\"small\"\n color=\"gray45\"\n italic\n {...props}\n ref={ref}\n >\n {children}\n </StyledModalFooterNotation>\n))\n\n/**\n\n We use modals to present additional actions, information, or forms on pages\n where a user’s experience would benefit from remaining on the same page.\n They can include graphics, inputs, buttons, and other elements as needed to\n produce the workflow or action needed.\n\n Do not include modals on pages with complicated UI layouts.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-modal--demo)\n\n @see [Design Guidelines](https://design.procore.com/modal)\n\n */\nconst Modal_ = React.forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n children,\n howToClose,\n id,\n onClickOverlay = noop,\n onClose,\n open = false,\n placement = 'center',\n role,\n ...props\n },\n ref\n ) => {\n useScrollLock(open)\n const [visible, setVisible] = React.useState<boolean>(open)\n const [fadeType, setFadeType] = React.useState<string>('')\n const closeWithConfirmState = useCloseWithConfirmState()\n const { closeWithConfirm } = closeWithConfirmState\n\n React.useEffect(() => {\n if (open) {\n setVisible(true)\n setTimeout(() => {\n setFadeType(fadeInClassName)\n }, 0)\n } else {\n setFadeType(fadeOutClassName)\n }\n }, [open])\n\n const onTransitionEnd = () => {\n if (fadeType === fadeOutClassName) {\n setVisible(false)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (!onClose) return\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n closeWithConfirm(onClose)(e, 'x')\n }\n }\n\n const { dialogProps: dialogProps_ } = useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n isModal: false,\n isOpen: open,\n role,\n })\n\n const dialogProps = onClose && role === 'dialog' ? dialogProps_ : {}\n\n function onClickScrim(\n e: React.ComponentProps<typeof StyledModalScrim>['onClick']\n ) {\n onClickOverlay(e)\n if (onClose && howToClose?.includes('scrim')) {\n closeWithConfirm(onClose)(e, 'scrim')\n }\n }\n\n return visible ? (\n <Portal>\n <ModalCloseContext.Provider value={{ onClose, howToClose }}>\n <LevelContext.Provider value={defaultStartLevel}>\n <ChildRegistryProvider>\n <FocusScope\n // TODO breaking - always\n autoFocus={!!onClose}\n contain={!!onClose}\n restoreFocus={!!onClose}\n >\n <StyledModal\n className={fadeType}\n ref={ref}\n onTransitionEnd={onTransitionEnd}\n onKeyDown={handleKeyDown}\n {...dialogProps}\n >\n <StyledModalScrim onClick={onClickScrim} />\n\n <ModalContainer {...props} placement={placement}>\n <StyledModalContent>\n <ModalBodyScrollObserver>\n <CloseWithConfirmContext.Provider\n value={closeWithConfirmState}\n >\n {children}\n </CloseWithConfirmContext.Provider>\n </ModalBodyScrollObserver>\n </StyledModalContent>\n </ModalContainer>\n </StyledModal>\n </FocusScope>\n </ChildRegistryProvider>\n </LevelContext.Provider>\n </ModalCloseContext.Provider>\n </Portal>\n ) : null\n }\n)\n\nfunction ModalBodyScrollObserver({ children }: { children: React.ReactNode }) {\n const [isBodyScrolled, setIsBodyScrolled] = React.useState<boolean>(false)\n\n return (\n <ModalBodyScrollContext.Provider\n value={{ isBodyScrolled, setIsBodyScrolled }}\n >\n {children}\n </ModalBodyScrollContext.Provider>\n )\n}\n\nexport const ConfirmModal = React.forwardRef<HTMLDivElement, ConfirmModalProps>(\n ({ children, headline, onClose, ...props }, ref) => {\n return (\n <Modal {...props} ref={ref}>\n <ModalClosableHeader onClose={onClose}>\n <StyledModalWarningIcon size=\"lg\" />\n {headline}\n </ModalClosableHeader>\n {children}\n </Modal>\n )\n }\n)\n\nfunction ModalState(props: RenderProps) {\n useDeprecation({ oldThing: 'Modal.State' })\n return <Visibility {...props} />\n}\n\nModal_.displayName = 'Modal'\n\nConfirmModal.displayName = 'ConfirmModal'\n\nModalBody.displayName = 'Modal.Body'\n\nModalFooterNotation.displayName = 'Modal.FooterNotation'\n\nModalFooterSummary.displayName = 'Modal.FooterSummary'\n\nconst Body = ModalBody\nconst Container = ModalContainer\nconst Content = StyledModalContent\nconst FooterSummary = ModalFooterSummary\nconst Footer = StyledModalFooter\nconst FooterButtons = ModalClosableFooterButtons\nconst FooterNotation = ModalFooterNotation\nconst Header = ModalClosableHeader\nconst Overlay = StyledModal\nconst Scrim = StyledModalScrim\nconst State = ModalState\n\nexport const Modal = addSubcomponents(\n {\n Body,\n Container,\n Content,\n Footer,\n FooterButtons,\n FooterNotation,\n FooterSummary,\n Header,\n Heading: Heading,\n Overlay,\n Scrim,\n State,\n Section,\n },\n Modal_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SACEC,uBAAuB,EACvBC,0BAA0B,EAC1BC,wBAAwB,QACnB,0BAA0B;AACjC,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SACEC,OAAO,EACPC,YAAY,EACZC,OAAO,EACPC,eAAe,QACV,oBAAoB;AAE3B,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,sBAAsB,QAAQ,yBAAyB;AAChE,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,mBA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uK,QAAQ,EAAE;EAAc,CAAC,CAAC;EAC3C,oBAAOnL,KAAA,CAAAyE,aAAA,CAACxD,UAAU,EAAKwC,KAAQ,CAAC;AAClC;AAEAqE,MAAM,CAACsD,WAAW,GAAG,OAAO;AAE5BR,YAAY,CAACQ,WAAW,GAAG,cAAc;AAEzClF,SAAS,CAACkF,WAAW,GAAG,YAAY;AAEpC5D,mBAAmB,CAAC4D,WAAW,GAAG,sBAAsB;AAExD/D,kBAAkB,CAAC+D,WAAW,GAAG,qBAAqB;AAEtD,IAAMC,IAAI,GAAGnF,SAAS;AACtB,IAAMoF,SAAS,GAAG/F,cAAc;AAChC,IAAMgG,OAAO,GAAG1J,kBAAkB;AAClC,IAAM2J,aAAa,GAAGnE,kBAAkB;AACxC,IAAMoE,MAAM,GAAG3J,iBAAiB;AAChC,IAAM4J,aAAa,GAAGzG,0BAA0B;AAChD,IAAM0G,cAAc,GAAGnE,mBAAmB;AAC1C,IAAMoE,MAAM,GAAG1I,mBAAmB;AAClC,IAAM2I,OAAO,GAAGrK,WAAW;AAC3B,IAAMsK,KAAK,GAAG3J,gBAAgB;AAC9B,IAAM4J,KAAK,GAAGb,UAAU;AAExB,OAAO,IAAMF,KAAK,GAAG9J,gBAAgB,CACnC;EACEmK,IAAI,EAAJA,IAAI;EACJC,SAAS,EAATA,SAAS;EACTC,OAAO,EAAPA,OAAO;EACPE,MAAM,EAANA,MAAM;EACNC,aAAa,EAAbA,aAAa;EACbC,cAAc,EAAdA,cAAc;EACdH,aAAa,EAAbA,aAAa;EACbI,MAAM,EAANA,MAAM;EACNpL,OAAO,EAAEA,OAAO;EAChBqL,OAAO,EAAPA,OAAO;EACPC,KAAK,EAALA,KAAK;EACLC,KAAK,EAALA,KAAK;EACLrL,OAAO,EAAPA;AACF,CAAC,EACDoH,MACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["Clear","FocusScope","React","useEffect","Button","CloseWithConfirmContext","useCloseWithConfirmContext","useCloseWithConfirmState","useModalDialogLike","Portal","Heading","LevelContext","Section","SectionProvider","useDeprecation","useLayoutEventListener","useI18nContext","useOverflowObserver","useScrollLock","Visibility","addSubcomponents","mergeRefs","ChildRegistryProvider","useModalChildRegistryDispatch","fadeInClassName","fadeOutClassName","StyledModal","StyledModalBody","StyledModalButtons","StyledModalCancel","StyledModalContainer","StyledModalContent","StyledModalFooter","StyledModalFooterNotation","StyledModalFooterSummary","StyledModalHeader","StyledModalHeading","StyledModalScrim","StyledModalWarningIcon","useInitializeModalFocus","noop","defaultStartLevel","initialBodyLevel","defaultHowToClose","ModalCloseContext","createContext","howToClose","onClose","undefined","ModalBodyScrollContext","isBodyScrolled","setIsBodyScrolled","ModalClosableHeader","forwardRef","_ref","ref","children","externalOnClose","qa","props","_objectWithoutProperties","_excluded","_React$useContext","useContext","_React$useContext2","I18n","modalClosableHeaderRef","useRef","_useCloseWithConfirmC","closeWithConfirm","registerChildRef","child","onClickButton","e","includes","createElement","_extends","$isBodyScrolled","t","closeButton","onClick","icon","variant","ModalClosableFooterButtons","_ref2","_excluded2","_React$useContext3","_useCloseWithConfirmC2","modalClosableFooterButtonsRef","ModalContainer","_ref3","placement","width","_excluded3","_React$useContext4","modalContainerRef","hasOnClose","shadowStrength","$placement","$width","ModalBody","_ref4","_ref4$noSideSpacing","noSideSpacing","_excluded4","_useOverflowObserver","isOverflowingY","overflowRef","scrollRef","modalBodyRef","_React$useContext5","event","handler","currentTarget","scrollTop","scope","Provider","value","tabIndex","ModalFooterSummary","_ref5","_excluded5","ModalFooterNotation","_ref6","_excluded6","intent","color","italic","Modal_","_ref7","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","id","_ref7$onClickOverlay","onClickOverlay","_ref7$open","open","_ref7$placement","role","_excluded7","_React$useState","useState","_React$useState2","_slicedToArray","visible","setVisible","_React$useState3","_React$useState4","fadeType","setFadeType","closeWithConfirmState","setTimeout","onTransitionEnd","handleKeyDown","key","preventDefault","stopPropagation","_useModalDialogLike","isModal","isOpen","dialogProps_","dialogProps","onClickScrim","autoFocus","contain","restoreFocus","className","onKeyDown","ModalBodyScrollObserver","_ref8","_React$useState5","_React$useState6","ConfirmModal","_ref9","headline","_excluded8","Modal","size","ModalState","oldThing","displayName","Body","Container","Content","FooterSummary","Footer","FooterButtons","FooterNotation","Header","Overlay","Scrim","State"],"sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import { Clear } from '@procore/core-icons/dist'\nimport { FocusScope } from '@react-aria/focus'\nimport React, { useEffect } from 'react'\nimport { Button } from '../Button/Button'\nimport {\n CloseWithConfirmContext,\n useCloseWithConfirmContext,\n useCloseWithConfirmState,\n} from '../Form/closeWithConfirm'\nimport { useModalDialogLike } from '../OverlayTrigger/a11yPresets'\nimport { Portal } from '../Portal/Portal'\nimport {\n Heading,\n LevelContext,\n Section,\n SectionProvider,\n} from '../Section/Section'\nimport type { TypographyProps } from '../Typography/Typography.types'\nimport { useDeprecation } from '../_hooks/Deprecation'\nimport { useLayoutEventListener } from '../_hooks/EventListener'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useOverflowObserver } from '../_hooks/OverflowObserver'\nimport { useScrollLock } from '../_hooks/ScrollLock'\nimport type { RenderProps } from '../_hooks/Visibility'\nimport { Visibility } from '../_hooks/Visibility'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { DivAttributes, SpanAttributes } from '../_utils/types'\nimport {\n ChildRegistryProvider,\n useModalChildRegistryDispatch,\n} from './ChildRegistry.context'\nimport {\n fadeInClassName,\n fadeOutClassName,\n StyledModal,\n StyledModalBody,\n StyledModalButtons,\n StyledModalCancel,\n StyledModalContainer,\n StyledModalContent,\n StyledModalFooter,\n StyledModalFooterNotation,\n StyledModalFooterSummary,\n StyledModalHeader,\n StyledModalHeading,\n StyledModalScrim,\n StyledModalWarningIcon,\n} from './Modal.styles'\nimport type {\n ConfirmModalProps,\n ModalBodyProps,\n ModalCloseableHeaderProps,\n ModalCloseContextApi,\n ModalContainerProps,\n ModalOptionalCloseStartegy,\n ModalProps,\n} from './Modal.types'\nimport { useInitializeModalFocus } from './useInitializeModalFocus'\n\nfunction noop() {}\nconst defaultStartLevel = 2\nconst initialBodyLevel = 3\n\n// TODO default in breaking\nconst defaultHowToClose: ModalOptionalCloseStartegy[] = ['scrim', 'x']\n\nconst ModalCloseContext = React.createContext<ModalCloseContextApi>({\n howToClose: [],\n onClose: undefined,\n})\n\ninterface ModalBodyScrollContextApi {\n isBodyScrolled: boolean\n setIsBodyScrolled: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nconst ModalBodyScrollContext = React.createContext<ModalBodyScrollContextApi>({\n isBodyScrolled: false,\n setIsBodyScrolled: noop,\n})\n\nconst ModalClosableHeader = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(({ children, onClose: externalOnClose, qa, ...props }, ref) => {\n const { isBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const modalClosableHeaderRef = React.useRef(null)\n\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'header', ref: modalClosableHeaderRef })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n if (onClose && howToClose?.includes('x')) {\n closeWithConfirm(onClose)(e, 'x')\n return\n }\n closeWithConfirm(externalOnClose!)(e)\n }\n\n return (\n <StyledModalHeader\n $isBodyScrolled={isBodyScrolled}\n {...props}\n ref={mergeRefs(ref, modalClosableHeaderRef)}\n >\n <StyledModalHeading>{children}</StyledModalHeading>\n {(onClose && howToClose?.includes('x')) || externalOnClose ? (\n <StyledModalCancel>\n <Button\n aria-label={I18n.t('core.modal.a11y.close')}\n data-qa={qa?.closeButton}\n data-internal=\"close-button\"\n onClick={onClickButton}\n icon={<Clear />}\n variant=\"tertiary\"\n />\n </StyledModalCancel>\n ) : null}\n </StyledModalHeader>\n )\n})\n\nconst ModalClosableFooterButtons = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(({ children, ...props }, ref) => {\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const modalClosableFooterButtonsRef = React.useRef(null)\n\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({\n child: 'closeableButtons',\n ref: modalClosableFooterButtonsRef,\n })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n closeWithConfirm(onClose!)(e, 'footer-button')\n }\n\n return (\n <StyledModalButtons\n {...props}\n ref={mergeRefs(ref, modalClosableFooterButtonsRef)}\n >\n {howToClose?.includes('footer-button') && (\n <Button onClick={onClickButton} variant=\"tertiary\">\n {I18n.t('core.modal.cancel')}\n </Button>\n )}\n {children}\n </StyledModalButtons>\n )\n})\n\nconst ModalContainer = React.forwardRef<HTMLDivElement, ModalContainerProps>(\n ({ placement, width, ...props }, ref) => {\n const { onClose } = React.useContext(ModalCloseContext)\n const modalContainerRef = React.useRef<HTMLDivElement>(null)\n useInitializeModalFocus({ modalContainerRef, hasOnClose: !!onClose })\n\n return (\n <StyledModalContainer\n {...props}\n shadowStrength={4}\n $placement={placement}\n $width={width}\n ref={mergeRefs(ref, modalContainerRef)}\n />\n )\n }\n)\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ children, noSideSpacing = false, ...props }, ref) => {\n const { isOverflowingY, ref: overflowRef } = useOverflowObserver()\n const scrollRef = React.useRef(null)\n const modalBodyRef = React.useRef(null)\n const { setIsBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'body', ref: modalBodyRef })\n }, [])\n\n useLayoutEventListener({\n event: 'scroll',\n handler: (e: React.UIEvent<HTMLElement>) => {\n setIsBodyScrolled(e.currentTarget.scrollTop > 0)\n },\n scope: scrollRef,\n })\n\n return (\n <SectionProvider>\n <LevelContext.Provider value={initialBodyLevel}>\n <StyledModalBody\n {...props}\n isOverflowingY={isOverflowingY}\n noSideSpacing={noSideSpacing}\n ref={mergeRefs(overflowRef, scrollRef, ref, modalBodyRef)}\n tabIndex={0}\n >\n {children}\n </StyledModalBody>\n </LevelContext.Provider>\n </SectionProvider>\n )\n }\n)\n\nconst ModalFooterSummary = React.forwardRef<HTMLDivElement, DivAttributes>(\n ({ children, ...props }, ref) => {\n return (\n <StyledModalFooterSummary {...props} ref={ref}>\n {children}\n </StyledModalFooterSummary>\n )\n }\n)\n\nconst ModalFooterNotation = React.forwardRef<\n HTMLSpanElement,\n SpanAttributes & TypographyProps\n>(({ children, ...props }, ref) => (\n <StyledModalFooterNotation\n aria-live=\"polite\"\n intent=\"small\"\n color=\"gray45\"\n italic\n {...props}\n ref={ref}\n >\n {children}\n </StyledModalFooterNotation>\n))\n\nconst Modal_ = React.forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n children,\n howToClose,\n id,\n onClickOverlay = noop,\n onClose,\n open = false,\n placement = 'center',\n role,\n ...props\n },\n ref\n ) => {\n useScrollLock(open)\n const [visible, setVisible] = React.useState<boolean>(open)\n const [fadeType, setFadeType] = React.useState<string>('')\n const closeWithConfirmState = useCloseWithConfirmState()\n const { closeWithConfirm } = closeWithConfirmState\n\n React.useEffect(() => {\n if (open) {\n setVisible(true)\n setTimeout(() => {\n setFadeType(fadeInClassName)\n }, 0)\n } else {\n setFadeType(fadeOutClassName)\n }\n }, [open])\n\n const onTransitionEnd = () => {\n if (fadeType === fadeOutClassName) {\n setVisible(false)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (!onClose) return\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n closeWithConfirm(onClose)(e, 'x')\n }\n }\n\n const { dialogProps: dialogProps_ } = useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n isModal: false,\n isOpen: open,\n role,\n })\n\n const dialogProps = onClose && role === 'dialog' ? dialogProps_ : {}\n\n function onClickScrim(\n e: React.ComponentProps<typeof StyledModalScrim>['onClick']\n ) {\n onClickOverlay(e)\n if (onClose && howToClose?.includes('scrim')) {\n closeWithConfirm(onClose)(e, 'scrim')\n }\n }\n\n return visible ? (\n <Portal>\n <ModalCloseContext.Provider value={{ onClose, howToClose }}>\n <LevelContext.Provider value={defaultStartLevel}>\n <ChildRegistryProvider>\n <FocusScope\n // TODO breaking - always\n autoFocus={!!onClose}\n contain={!!onClose}\n restoreFocus={!!onClose}\n >\n <StyledModal\n className={fadeType}\n ref={ref}\n onTransitionEnd={onTransitionEnd}\n onKeyDown={handleKeyDown}\n {...dialogProps}\n >\n <StyledModalScrim onClick={onClickScrim} />\n\n <ModalContainer {...props} placement={placement}>\n <StyledModalContent>\n <ModalBodyScrollObserver>\n <CloseWithConfirmContext.Provider\n value={closeWithConfirmState}\n >\n {children}\n </CloseWithConfirmContext.Provider>\n </ModalBodyScrollObserver>\n </StyledModalContent>\n </ModalContainer>\n </StyledModal>\n </FocusScope>\n </ChildRegistryProvider>\n </LevelContext.Provider>\n </ModalCloseContext.Provider>\n </Portal>\n ) : null\n }\n)\n\nfunction ModalBodyScrollObserver({ children }: { children: React.ReactNode }) {\n const [isBodyScrolled, setIsBodyScrolled] = React.useState<boolean>(false)\n\n return (\n <ModalBodyScrollContext.Provider\n value={{ isBodyScrolled, setIsBodyScrolled }}\n >\n {children}\n </ModalBodyScrollContext.Provider>\n )\n}\n\nexport const ConfirmModal = React.forwardRef<HTMLDivElement, ConfirmModalProps>(\n ({ children, headline, onClose, ...props }, ref) => {\n return (\n <Modal {...props} ref={ref}>\n <ModalClosableHeader onClose={onClose}>\n <StyledModalWarningIcon size=\"lg\" />\n {headline}\n </ModalClosableHeader>\n {children}\n </Modal>\n )\n }\n)\n\nfunction ModalState(props: RenderProps) {\n useDeprecation({ oldThing: 'Modal.State' })\n return <Visibility {...props} />\n}\n\nModal_.displayName = 'Modal'\n\nConfirmModal.displayName = 'ConfirmModal'\n\nModalBody.displayName = 'Modal.Body'\n\nModalFooterNotation.displayName = 'Modal.FooterNotation'\n\nModalFooterSummary.displayName = 'Modal.FooterSummary'\n\nconst Body = ModalBody\nconst Container = ModalContainer\nconst Content = StyledModalContent\nconst FooterSummary = ModalFooterSummary\nconst Footer = StyledModalFooter\nconst FooterButtons = ModalClosableFooterButtons\nconst FooterNotation = ModalFooterNotation\nconst Header = ModalClosableHeader\nconst Overlay = StyledModal\nconst Scrim = StyledModalScrim\nconst State = ModalState\n\n/**\n\n We use modals to present additional actions, information, or forms on pages\n where a user’s experience would benefit from remaining on the same page.\n They can include graphics, inputs, buttons, and other elements as needed to\n produce the workflow or action needed.\n\n Do not include modals on pages with complicated UI layouts.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-modal--demo)\n\n @see [Design Guidelines](https://design.procore.com/modal)\n\n */\nexport const Modal = addSubcomponents(\n {\n Body,\n Container,\n Content,\n Footer,\n FooterButtons,\n FooterNotation,\n FooterSummary,\n Header,\n Heading: Heading,\n Overlay,\n Scrim,\n State,\n Section,\n },\n Modal_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SACEC,uBAAuB,EACvBC,0BAA0B,EAC1BC,wBAAwB,QACnB,0BAA0B;AACjC,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,MAAM,QAAQ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C,KAAK,EAALA,KAAK;EACLC,KAAK,EAALA,KAAK;EACLrL,OAAO,EAAPA;AACF,CAAC,EACDoH,MACF,CAAC"}
|
|
@@ -18,15 +18,15 @@ export var modalPixelWidths = {
|
|
|
18
18
|
};
|
|
19
19
|
export var StyledModal = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledModal",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-11_32_0__sc-1ijdug2-0"
|
|
22
22
|
})(["display:flex;height:100vh;position:absolute;opacity:0;transition:0.3s opacity ease;width:100vw;z-index:0;&.", "{opacity:1;}&.", "{opacity:0;}"], fadeInClassName, fadeOutClassName);
|
|
23
23
|
export var StyledModalButtons = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
displayName: "StyledModalButtons",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-11_32_0__sc-1ijdug2-1"
|
|
26
26
|
})(["display:flex;flex:0 0 auto;margin-left:", "px;> * + *{margin-left:", "px;}"], spacing.lg, spacing.sm);
|
|
27
27
|
export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
28
28
|
displayName: "StyledModalContainer",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-11_32_0__sc-1ijdug2-2"
|
|
30
30
|
})(["display:flex;flex-direction:row;position:absolute;z-index:2;", " ", ""], function (_ref) {
|
|
31
31
|
var $placement = _ref.$placement;
|
|
32
32
|
if ($placement === 'top') {
|
|
@@ -44,11 +44,11 @@ export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
|
44
44
|
});
|
|
45
45
|
export var StyledModalFooter = /*#__PURE__*/styled.div.withConfig({
|
|
46
46
|
displayName: "StyledModalFooter",
|
|
47
|
-
componentId: "core-
|
|
47
|
+
componentId: "core-11_32_0__sc-1ijdug2-3"
|
|
48
48
|
})(["align-items:center;display:flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;padding:", "px ", "px ", "px;"], spacing.xl, spacing.xxl, spacing.xxl);
|
|
49
49
|
export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
|
|
50
50
|
displayName: "StyledModalBody",
|
|
51
|
-
componentId: "core-
|
|
51
|
+
componentId: "core-11_32_0__sc-1ijdug2-4"
|
|
52
52
|
})(["", " box-sizing:border-box;color:", ";display:flex;flex-direction:column;max-width:", ";overflow:auto;", " > ", "{padding-left:0;padding-right:0;&:first-child > ", "{padding-top:0;}}", ""], getTypographyIntent('body'), colors.gray15, modalMaxWidth, function (_ref3) {
|
|
53
53
|
var noSideSpacing = _ref3.noSideSpacing;
|
|
54
54
|
return css(["padding:", "px ", "px;"], spacing.xl, noSideSpacing ? 0 : spacing.xxl);
|
|
@@ -58,37 +58,37 @@ export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
|
|
|
58
58
|
});
|
|
59
59
|
export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
|
|
60
60
|
displayName: "StyledModalContent",
|
|
61
|
-
componentId: "core-
|
|
61
|
+
componentId: "core-11_32_0__sc-1ijdug2-5"
|
|
62
62
|
})(["display:flex;flex-direction:column;max-height:90vh;overflow:hidden;width:100%;"]);
|
|
63
63
|
export var StyledModalFooterNotation = /*#__PURE__*/styled(Typography).withConfig({
|
|
64
64
|
displayName: "StyledModalFooterNotation",
|
|
65
|
-
componentId: "core-
|
|
65
|
+
componentId: "core-11_32_0__sc-1ijdug2-6"
|
|
66
66
|
})(["flex-grow:1;"]);
|
|
67
67
|
export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
|
|
68
68
|
displayName: "StyledModalHeader",
|
|
69
|
-
componentId: "core-
|
|
69
|
+
componentId: "core-11_32_0__sc-1ijdug2-7"
|
|
70
70
|
})(["align-items:flex-start;color:", ";display:flex;flex:0 0 auto;padding:", "px ", "px;position:relative;", ""], colors.gray10, spacing.xl, spacing.xxl, function (_ref5) {
|
|
71
71
|
var $isBodyScrolled = _ref5.$isBodyScrolled;
|
|
72
72
|
return css(["border-bottom:1px solid ", ";"], $isBodyScrolled ? colors.gray85 : 'transparent');
|
|
73
73
|
});
|
|
74
74
|
export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
|
|
75
75
|
displayName: "StyledModalHeading",
|
|
76
|
-
componentId: "core-
|
|
76
|
+
componentId: "core-11_32_0__sc-1ijdug2-8"
|
|
77
77
|
})(["", " align-items:center;display:flex;flex:1 1 auto;min-height:36px;padding-right:", "px;"], getTypographyIntent('h2'), spacing.lg);
|
|
78
78
|
export var StyledModalCancel = /*#__PURE__*/styled.div.withConfig({
|
|
79
79
|
displayName: "StyledModalCancel",
|
|
80
|
-
componentId: "core-
|
|
80
|
+
componentId: "core-11_32_0__sc-1ijdug2-9"
|
|
81
81
|
})(["flex:0 0 auto;"]);
|
|
82
82
|
export var StyledModalScrim = /*#__PURE__*/styled.div.withConfig({
|
|
83
83
|
displayName: "StyledModalScrim",
|
|
84
|
-
componentId: "core-
|
|
84
|
+
componentId: "core-11_32_0__sc-1ijdug2-10"
|
|
85
85
|
})(["background:hsla(200,8%,10%,0.6);height:100vh;left:0;position:absolute;top:0;width:100vw;z-index:1;"]);
|
|
86
86
|
export var StyledModalWarningIcon = /*#__PURE__*/styled(Warning).withConfig({
|
|
87
87
|
displayName: "StyledModalWarningIcon",
|
|
88
|
-
componentId: "core-
|
|
88
|
+
componentId: "core-11_32_0__sc-1ijdug2-11"
|
|
89
89
|
})(["color:", ";margin-right:", "px;"], colors.yellow40, spacing.sm);
|
|
90
90
|
export var StyledModalFooterSummary = /*#__PURE__*/styled.div.withConfig({
|
|
91
91
|
displayName: "StyledModalFooterSummary",
|
|
92
|
-
componentId: "core-
|
|
92
|
+
componentId: "core-11_32_0__sc-1ijdug2-12"
|
|
93
93
|
})(["", " border-top:1px solid ", ";border-bottom:1px solid ", ";padding:", "px ", "px;color:", ";font-style:italic;background-color:", ";margin:-", "px -", "px ", "px -", "px;flex:1 1 100%;"], getTypographyIntent('small'), colors.gray85, colors.gray85, spacing.md, spacing.xxl, colors.gray15, colors.gray98, spacing.xl, spacing.xxl, spacing.xl, spacing.xxl);
|
|
94
94
|
//# sourceMappingURL=Modal.styles.js.map
|
|
@@ -6,26 +6,26 @@ import { getFocus } from '../_styles/mixins';
|
|
|
6
6
|
import { spacing } from '../_styles/spacing';
|
|
7
7
|
export var StyledMultiSelectValues = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledMultiSelectValues",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-11_32_0__sc-s9ym9q-0"
|
|
10
10
|
})(["display:flex;flex-wrap:wrap;margin-bottom:2px;margin-left:", "px;margin-right:", "px;margin-top:2px;min-width:0;width:100%;"], spacing.md, spacing.xs);
|
|
11
11
|
export var StyledMultiSelectToken = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledMultiSelectToken",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-11_32_0__sc-s9ym9q-1"
|
|
14
14
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:0 1 auto;> div{max-width:178px;width:100%;}"], spacing.xs);
|
|
15
15
|
export var StyledMultiSelectSearchInput = /*#__PURE__*/styled.input.withConfig({
|
|
16
16
|
displayName: "StyledMultiSelectSearchInput",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-11_32_0__sc-s9ym9q-2"
|
|
18
18
|
})(["background-color:transparent;border-width:0;font-family:inherit;padding:0;height:24px;width:100%;", " ", " &::-ms-clear{display:none;}&:focus{box-shadow:none;outline:none;}&::placeholder{color:", ";}"], getTypographyIntent('body'), function (_ref) {
|
|
19
19
|
var $isNavigatingTokens = _ref.$isNavigatingTokens;
|
|
20
20
|
return $isNavigatingTokens && css(["color:transparent;"]);
|
|
21
21
|
}, colors.gray45);
|
|
22
22
|
export var StyledMultiSelectSearch = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledMultiSelectSearch",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-11_32_0__sc-s9ym9q-3"
|
|
25
25
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:1;max-width:100%;min-width:24px;"], spacing.xs);
|
|
26
26
|
export var StyledMultiSelectSearchIcon = /*#__PURE__*/styled.div.withConfig({
|
|
27
27
|
displayName: "StyledMultiSelectSearchIcon",
|
|
28
|
-
componentId: "core-
|
|
28
|
+
componentId: "core-11_32_0__sc-s9ym9q-4"
|
|
29
29
|
})(["align-items:center;align-self:flex-start;display:flex;height:34px;justify-content:flex-end;margin-left:", "px;margin-right:", "px;min-width:40px;width:40px;"], spacing.xs, spacing.md);
|
|
30
30
|
export var StyledMultiSelectClearIcon = StyledSelectClearIcon;
|
|
31
31
|
export var StyledMultiSelectArrowContainer = StyledSelectArrowContainer;
|
|
@@ -33,7 +33,7 @@ export var StyledMultiSelectArrow = StyledSelectArrow;
|
|
|
33
33
|
export var StyledMultiSelectMenu = StyledSelectMenu;
|
|
34
34
|
export var StyledMultiSelectButton = /*#__PURE__*/styled(StyledSelectButton).withConfig({
|
|
35
35
|
displayName: "StyledMultiSelectButton",
|
|
36
|
-
componentId: "core-
|
|
36
|
+
componentId: "core-11_32_0__sc-s9ym9q-5"
|
|
37
37
|
})(["height:auto;padding:0;white-space:normal;&:focus-within{", "}", ""], getFocus(), function (_ref2) {
|
|
38
38
|
var $emptyValue = _ref2.$emptyValue;
|
|
39
39
|
return $emptyValue && css(["", "{cursor:pointer;}"], StyledMultiSelectSearchInput);
|
|
@@ -6,14 +6,14 @@ export var optionMinHeight = 32;
|
|
|
6
6
|
export var defaultMenuHeight = 64;
|
|
7
7
|
export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledOptions",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-11_32_0__sc-3o6zya-0"
|
|
10
10
|
})([""]);
|
|
11
11
|
export var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledItem",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-11_32_0__sc-3o6zya-1"
|
|
14
14
|
})(["", ";padding:", "px ", "px;cursor:pointer;list-style-type:none;"], getTypographyIntent('body'), spacing.xs, spacing.md);
|
|
15
15
|
export var StyledGroup = /*#__PURE__*/styled.div.withConfig({
|
|
16
16
|
displayName: "StyledGroup",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-11_32_0__sc-3o6zya-2"
|
|
18
18
|
})(["", ";padding:", "px ", "px ", "px;font-weight:", ";background:white;list-style-type:none;"], getTypographyIntent('body'), spacing.md, spacing.md, spacing.xs, typographyWeights.semibold);
|
|
19
19
|
//# sourceMappingURL=NextMenu.styles.js.map
|
|
@@ -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_32_0__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_32_0__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_32_0__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_32_0__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_32_0__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_32_0__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_32_0__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_32_0__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_32_0__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
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GridProps } from '../Grid/Grid.types';
|
|
3
3
|
import type { DivAttributes, Props } from '../_utils/types';
|
|
4
|
-
import type { PageAsideProps, PageComponentProps, PageFooterProps, PageHeaderProps, PageMainProps } from './PageLayout.types';
|
|
4
|
+
import type { PageAsideProps, PageBodyNavigationProps, PageComponentProps, PageFooterProps, PageHeaderProps, PageMainProps } from './PageLayout.types';
|
|
5
5
|
export declare const PageContext: React.Context<{
|
|
6
6
|
bodyRef: React.RefObject<HTMLDivElement>;
|
|
7
7
|
footerRef: React.RefObject<HTMLDivElement>;
|
|
8
8
|
containerRef: React.RefObject<HTMLDivElement>;
|
|
9
|
+
navigationRef: React.RefObject<HTMLUListElement>;
|
|
9
10
|
aside: {
|
|
10
11
|
open: () => Promise<void>;
|
|
11
12
|
close: () => Promise<void>;
|
|
12
13
|
isOpen: boolean;
|
|
13
14
|
};
|
|
14
15
|
}>;
|
|
16
|
+
export declare const PageBodyNavigation: React.ForwardRefExoticComponent<PageBodyNavigationProps & React.RefAttributes<HTMLUListElement>>;
|
|
15
17
|
/**
|
|
16
18
|
Building block elements for layout that should be used to build a common skeleton of a page.
|
|
17
|
-
|
|
18
19
|
- Page
|
|
19
20
|
- Page.Main
|
|
20
21
|
- Page.Header
|
|
@@ -29,7 +30,6 @@ export declare const PageContext: React.Context<{
|
|
|
29
30
|
- Page.Body
|
|
30
31
|
- Page.Footer
|
|
31
32
|
- Page.Aside
|
|
32
|
-
|
|
33
33
|
Other helpers, such as Page.Grid, Page.Row and Page.Column are thin wrappers over Grid components and share the same API.
|
|
34
34
|
*/
|
|
35
35
|
export declare const Page: React.ForwardRefExoticComponent<DivAttributes & React.RefAttributes<HTMLDivElement>> & {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
2
|
var _excluded = ["gutterX"],
|
|
3
3
|
_excluded2 = ["transparent"],
|
|
4
|
-
_excluded3 = ["children",
|
|
4
|
+
_excluded3 = ["children"],
|
|
5
|
+
_excluded4 = ["children", "open"];
|
|
5
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -19,6 +20,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
19
20
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
21
|
import throttle from 'lodash.throttle';
|
|
21
22
|
import React from 'react';
|
|
23
|
+
import { AnchorNavigation } from '../AnchorNavigation';
|
|
22
24
|
import { Grid } from '../Grid/Grid';
|
|
23
25
|
import { TearsheetContext } from '../Tearsheet/Tearsheet';
|
|
24
26
|
import { useResize } from '../_hooks/Resize';
|
|
@@ -27,13 +29,14 @@ import { useUpdateEffect } from '../_hooks/useUpdateEffect';
|
|
|
27
29
|
import { addSubcomponents } from '../_utils/addSubcomponents';
|
|
28
30
|
import { mergeRefs } from '../_utils/mergeRefs';
|
|
29
31
|
import { pageLayoutRootDataAttr } from './PageLayout.constants';
|
|
30
|
-
import { animationDuration, StyledAside, StyledAsideFluidContainer, StyledAsidePanel, StyledBody, StyledFooter, StyledPageBanner, StyledPageBreadcrumbs, StyledPageContainer, StyledPageHeader, StyledPageMain, StyledPageTabs, StyledPageTitle } from './PageLayout.styles';
|
|
32
|
+
import { animationDuration, StyledAside, StyledAsideFluidContainer, StyledAsidePanel, StyledBody, StyledContent, StyledFooter, StyledNavigation, StyledPageBanner, StyledPageBreadcrumbs, StyledPageContainer, StyledPageHeader, StyledPageMain, StyledPageTabs, StyledPageTitle } from './PageLayout.styles';
|
|
31
33
|
import { getBottomOffsetForFooterUseCase, getGlobalBottomOffset, getGlobalTopOffset, getIsIntersectingVertically, getRightOffset, wait } from './PageLayout.utils';
|
|
32
34
|
var defaultAsideIsOpen = false;
|
|
33
35
|
export var PageContext = /*#__PURE__*/React.createContext({
|
|
34
36
|
bodyRef: /*#__PURE__*/React.createRef(),
|
|
35
37
|
footerRef: /*#__PURE__*/React.createRef(),
|
|
36
38
|
containerRef: /*#__PURE__*/React.createRef(),
|
|
39
|
+
navigationRef: /*#__PURE__*/React.createRef(),
|
|
37
40
|
aside: {
|
|
38
41
|
open: function open() {
|
|
39
42
|
return Promise.resolve();
|
|
@@ -60,20 +63,48 @@ var PageHeader = /*#__PURE__*/React.forwardRef(function PageHeader(_ref2, ref) {
|
|
|
60
63
|
ref: ref
|
|
61
64
|
}));
|
|
62
65
|
});
|
|
63
|
-
var PageBody = /*#__PURE__*/React.forwardRef(function PageBody(
|
|
66
|
+
var PageBody = /*#__PURE__*/React.forwardRef(function PageBody(_ref3, ref) {
|
|
67
|
+
var children = _ref3.children,
|
|
68
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
64
69
|
var _React$useContext = React.useContext(PageContext),
|
|
65
70
|
bodyRef = _React$useContext.bodyRef;
|
|
71
|
+
var navigation;
|
|
72
|
+
var content = [];
|
|
73
|
+
React.Children.forEach(children, function (child) {
|
|
74
|
+
if (! /*#__PURE__*/React.isValidElement(child)) return;
|
|
75
|
+
if (child.type === PageBodyNavigation) {
|
|
76
|
+
navigation = child;
|
|
77
|
+
} else {
|
|
78
|
+
content.push(child);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
if (!navigation) {
|
|
82
|
+
return /*#__PURE__*/React.createElement(StyledBody, _extends({
|
|
83
|
+
children: children
|
|
84
|
+
}, props, {
|
|
85
|
+
ref: mergeRefs(ref, bodyRef)
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
66
88
|
return /*#__PURE__*/React.createElement(StyledBody, _extends({}, props, {
|
|
67
89
|
ref: mergeRefs(ref, bodyRef)
|
|
68
|
-
}));
|
|
90
|
+
}), /*#__PURE__*/React.createElement(StyledNavigation, null, navigation), /*#__PURE__*/React.createElement(StyledContent, null, content));
|
|
69
91
|
});
|
|
70
|
-
var
|
|
92
|
+
export var PageBodyNavigation = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
93
|
+
var sections = _ref4.sections;
|
|
71
94
|
var _React$useContext2 = React.useContext(PageContext),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
95
|
+
navigationRef = _React$useContext2.navigationRef;
|
|
96
|
+
return /*#__PURE__*/React.createElement(AnchorNavigation, {
|
|
97
|
+
ref: mergeRefs(ref, navigationRef),
|
|
98
|
+
sections: sections
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
var PageFooter = /*#__PURE__*/React.forwardRef(function PageFooter(props, ref) {
|
|
102
|
+
var _React$useContext3 = React.useContext(PageContext),
|
|
103
|
+
bodyRef = _React$useContext3.bodyRef,
|
|
104
|
+
footerRef = _React$useContext3.footerRef,
|
|
105
|
+
aside = _React$useContext3.aside;
|
|
106
|
+
var _React$useContext4 = React.useContext(TearsheetContext),
|
|
107
|
+
addListener = _React$useContext4.addListener;
|
|
77
108
|
var _React$useState = React.useState(false),
|
|
78
109
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
79
110
|
isIntersectingWithBody = _React$useState2[0],
|
|
@@ -129,21 +160,21 @@ var PageFooter = /*#__PURE__*/React.forwardRef(function PageFooter(props, ref) {
|
|
|
129
160
|
ref: mergeRefs(ref, footerRef)
|
|
130
161
|
}));
|
|
131
162
|
});
|
|
132
|
-
var PageAside = /*#__PURE__*/React.forwardRef(function PageAside(
|
|
133
|
-
var children =
|
|
134
|
-
controlledIsOpen =
|
|
135
|
-
props = _objectWithoutProperties(
|
|
136
|
-
var _React$
|
|
137
|
-
_React$
|
|
138
|
-
contextIsOpen = _React$
|
|
139
|
-
open = _React$
|
|
140
|
-
close = _React$
|
|
141
|
-
var _React$
|
|
142
|
-
tearsheetPlacement = _React$
|
|
143
|
-
addTearsheetListener = _React$
|
|
144
|
-
var _React$
|
|
145
|
-
footerRef = _React$
|
|
146
|
-
containerRef = _React$
|
|
163
|
+
var PageAside = /*#__PURE__*/React.forwardRef(function PageAside(_ref5, ref) {
|
|
164
|
+
var children = _ref5.children,
|
|
165
|
+
controlledIsOpen = _ref5.open,
|
|
166
|
+
props = _objectWithoutProperties(_ref5, _excluded4);
|
|
167
|
+
var _React$useContext5 = React.useContext(PageContext),
|
|
168
|
+
_React$useContext5$as = _React$useContext5.aside,
|
|
169
|
+
contextIsOpen = _React$useContext5$as.isOpen,
|
|
170
|
+
open = _React$useContext5$as.open,
|
|
171
|
+
close = _React$useContext5$as.close;
|
|
172
|
+
var _React$useContext6 = React.useContext(TearsheetContext),
|
|
173
|
+
tearsheetPlacement = _React$useContext6.placement,
|
|
174
|
+
addTearsheetListener = _React$useContext6.addListener;
|
|
175
|
+
var _React$useContext7 = React.useContext(PageContext),
|
|
176
|
+
footerRef = _React$useContext7.footerRef,
|
|
177
|
+
containerRef = _React$useContext7.containerRef;
|
|
147
178
|
var innerRef = React.useRef(null);
|
|
148
179
|
var _React$useState3 = React.useState(null),
|
|
149
180
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
@@ -292,12 +323,14 @@ var PageContainer = /*#__PURE__*/React.forwardRef(function PageContainer(props,
|
|
|
292
323
|
};
|
|
293
324
|
var containerRef = React.useRef(null);
|
|
294
325
|
var bodyRef = React.useRef(null);
|
|
326
|
+
var navigationRef = React.useRef(null);
|
|
295
327
|
var footerRef = React.useRef(null);
|
|
296
328
|
return /*#__PURE__*/React.createElement(PageContext.Provider, {
|
|
297
329
|
value: {
|
|
298
330
|
bodyRef: bodyRef,
|
|
299
331
|
footerRef: footerRef,
|
|
300
332
|
containerRef: containerRef,
|
|
333
|
+
navigationRef: navigationRef,
|
|
301
334
|
aside: {
|
|
302
335
|
open: openAside,
|
|
303
336
|
close: closeAside,
|
|
@@ -309,8 +342,8 @@ var PageContainer = /*#__PURE__*/React.forwardRef(function PageContainer(props,
|
|
|
309
342
|
})));
|
|
310
343
|
});
|
|
311
344
|
var PageMain = /*#__PURE__*/React.forwardRef(function PageMain(props, ref) {
|
|
312
|
-
var _React$
|
|
313
|
-
tearsheetPlacement = _React$
|
|
345
|
+
var _React$useContext8 = React.useContext(TearsheetContext),
|
|
346
|
+
tearsheetPlacement = _React$useContext8.placement;
|
|
314
347
|
var attrs = _defineProperty({}, pageLayoutRootDataAttr, true);
|
|
315
348
|
return /*#__PURE__*/React.createElement(PageGrid, null, /*#__PURE__*/React.createElement(StyledPageMain, _extends({}, props, attrs, {
|
|
316
349
|
ref: ref,
|
|
@@ -351,7 +384,6 @@ PageMain.displayName = 'Page.Main';
|
|
|
351
384
|
|
|
352
385
|
/**
|
|
353
386
|
Building block elements for layout that should be used to build a common skeleton of a page.
|
|
354
|
-
|
|
355
387
|
- Page
|
|
356
388
|
- Page.Main
|
|
357
389
|
- Page.Header
|
|
@@ -366,7 +398,6 @@ PageMain.displayName = 'Page.Main';
|
|
|
366
398
|
- Page.Body
|
|
367
399
|
- Page.Footer
|
|
368
400
|
- Page.Aside
|
|
369
|
-
|
|
370
401
|
Other helpers, such as Page.Grid, Page.Row and Page.Column are thin wrappers over Grid components and share the same API.
|
|
371
402
|
*/
|
|
372
403
|
export var Page = addSubcomponents({
|