@procore/core-react 12.25.0 → 12.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.d.ts +9 -10
- package/dist/Avatar/Avatar.js.map +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.d.ts +2 -2
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.d.ts +15 -15
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.d.ts +4 -4
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js.map +1 -1
- package/dist/Box/Box.d.ts +1 -2
- package/dist/Box/Box.js.map +1 -1
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +3 -4
- 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/Button/Button.types.d.ts +2 -3
- package/dist/Button/Button.types.js.map +1 -1
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.d.ts +1 -2
- package/dist/Card/Card.js.map +1 -1
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/Checkbox.types.d.ts +1 -2
- package/dist/Checkbox/Checkbox.types.js.map +1 -1
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.d.ts +2 -3
- package/dist/ContactItem/ContactItem.js.map +1 -1
- package/dist/ContactItem/ContactItem.styles.d.ts +5 -5
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.d.ts +4 -4
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DateInput/DateInput.types.d.ts +2 -2
- package/dist/DateInput/DateInput.types.js.map +1 -1
- package/dist/DetailPage/DetailPage.d.ts +1 -1
- package/dist/DetailPage/DetailPage.styles.d.ts +4 -4
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.d.ts +1 -1
- package/dist/Dropdown/Dropdown.styles.d.ts +2 -2
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.helpers.js +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.helpers.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +4 -4
- package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
- package/dist/Dropzone/Dropzone.d.ts +2 -3
- package/dist/Dropzone/Dropzone.js +1 -2
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.d.ts +6 -6
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.d.ts +6 -6
- 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 +1 -2
- 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/FileExplorerModal.d.ts +1 -2
- package/dist/FileSelect/FileExplorer/FileExplorerModal.js.map +1 -1
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.d.ts +2 -2
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.d.ts +3 -4
- package/dist/FileSelect/FileSelect.js.map +1 -1
- package/dist/FileSelect/FileSelect.styles.d.ts +2 -2
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelect.types.d.ts +1 -2
- package/dist/FileSelect/FileSelect.types.js.map +1 -1
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.d.ts +1 -2
- package/dist/FileSelect/FileTokenList/FileTokenList.js.map +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.d.ts +2 -2
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.d.ts +1 -2
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.d.ts +6 -6
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.d.ts +1 -1
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.d.ts +2 -2
- package/dist/FileSelect/SourceItem/SourceItem.js.map +1 -1
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js.map +1 -1
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.d.ts +7 -7
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/ThumbnailList/ThumbnailList.types.d.ts +2 -2
- package/dist/FileSelect/ThumbnailList/ThumbnailList.types.js.map +1 -1
- package/dist/FileSelect/TreeSource/TreeSource.d.ts +1 -2
- package/dist/FileSelect/TreeSource/TreeSource.js.map +1 -1
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.d.ts +1 -2
- package/dist/FileToken/FileToken.js +17 -18
- package/dist/FileToken/FileToken.js.map +1 -1
- package/dist/FileToken/FileToken.styles.js +9 -9
- package/dist/FileToken/FileToken.styles.js.map +1 -1
- package/dist/FileToken/FileToken.types.d.ts +22 -0
- package/dist/FileToken/FileToken.types.js.map +1 -1
- package/dist/FileToken/FileTokenInner.d.ts +3 -0
- package/dist/FileToken/FileTokenInner.js +25 -0
- package/dist/FileToken/FileTokenInner.js.map +1 -0
- package/dist/FilterToken/FilterToken.d.ts +3 -4
- package/dist/FilterToken/FilterToken.js.map +1 -1
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/Flex/Flex.d.ts +1 -2
- package/dist/Flex/Flex.js.map +1 -1
- package/dist/FlexList/FlexList.d.ts +1 -2
- package/dist/FlexList/FlexList.js.map +1 -1
- package/dist/FlexList/FlexList.styles.d.ts +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.d.ts +2 -2
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.d.ts +2 -2
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/Form/index.d.ts +1 -1
- package/dist/Form/index.js.map +1 -1
- package/dist/GhostPlaceholder/GhostPlaceholder.js +9 -0
- package/dist/GhostPlaceholder/GhostPlaceholder.js.map +1 -1
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/Grid/Grid.types.d.ts +4 -4
- package/dist/Grid/Grid.types.js.map +1 -1
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.d.ts +1 -2
- package/dist/Input/Input.js.map +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Input/Input.types.d.ts +2 -2
- package/dist/Input/Input.types.js.map +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/Link/Link.types.d.ts +2 -2
- package/dist/Link/Link.types.js.map +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/Menu/Menu.d.ts +8 -9
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.d.ts +8 -9
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.d.ts +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/MenuImperative/MenuImperative.types.d.ts +2 -2
- package/dist/MenuImperative/MenuImperative.types.js.map +1 -1
- package/dist/Modal/Modal.d.ts +7 -6
- package/dist/Modal/Modal.js +47 -11
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.d.ts +4 -4
- package/dist/Modal/Modal.styles.js +15 -14
- package/dist/Modal/Modal.styles.js.map +1 -1
- package/dist/Modal/Modal.types.d.ts +6 -4
- package/dist/Modal/Modal.types.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.d.ts +2 -2
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextTile/NextTile.types.d.ts +3 -3
- package/dist/NextTile/NextTile.types.js.map +1 -1
- package/dist/Notation/Notation.d.ts +1 -2
- package/dist/Notation/Notation.js +1 -1
- package/dist/Notation/Notation.js.map +1 -1
- package/dist/NumberInput/NumberInput.js +5 -2
- package/dist/NumberInput/NumberInput.js.map +1 -1
- package/dist/NumberInput/NumberInput.styles.d.ts +2 -2
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.d.ts +2 -2
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageLayout/PageLayout.types.d.ts +3 -3
- package/dist/PageLayout/PageLayout.types.js.map +1 -1
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.d.ts +4 -4
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.d.ts +6 -4
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.d.ts +6 -6
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.d.ts +6 -7
- package/dist/Panel/Panel.js +22 -8
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.d.ts +5 -5
- package/dist/Panel/Panel.styles.js +16 -15
- package/dist/Panel/Panel.styles.js.map +1 -1
- package/dist/Panel/Panel.types.d.ts +14 -5
- package/dist/Panel/Panel.types.js.map +1 -1
- package/dist/Pill/Pill.js +15 -7
- package/dist/Pill/Pill.js.map +1 -1
- package/dist/Pill/Pill.styles.d.ts +3 -0
- package/dist/Pill/Pill.styles.js +7 -3
- package/dist/Pill/Pill.styles.js.map +1 -1
- package/dist/Pill/Pill.types.d.ts +1 -1
- package/dist/Pill/Pill.types.js.map +1 -1
- package/dist/PillSelect/PillSelect.js.map +1 -1
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.d.ts +1 -2
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/Popover/Popover.styles.js +4 -4
- package/dist/Popover/Popover.styles.js.map +1 -1
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/ProgressBar/ProgressBar.types.d.ts +2 -2
- package/dist/ProgressBar/ProgressBar.types.js.map +1 -1
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.js +6 -5
- package/dist/Section/Section.js.map +1 -1
- package/dist/Section/Section.styles.d.ts +5 -5
- package/dist/Section/Section.styles.js +9 -8
- package/dist/Section/Section.styles.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/SegmentedController/SegmentedController.types.d.ts +2 -2
- package/dist/SegmentedController/SegmentedController.types.js.map +1 -1
- package/dist/Select/Select.styles.d.ts +2 -2
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.d.ts +1 -1
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Semantic/Semantic.types.d.ts +1 -2
- package/dist/Semantic/Semantic.types.js.map +1 -1
- package/dist/SettingsPage/SettingsPage.d.ts +1 -1
- package/dist/Slider/Slider.styles.d.ts +2 -2
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Slider/Slider.types.d.ts +2 -2
- package/dist/Slider/Slider.types.js.map +1 -1
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.d.ts +0 -1
- package/dist/SplitViewCard/SplitViewCard.js +29 -26
- package/dist/SplitViewCard/SplitViewCard.js.map +1 -1
- package/dist/SplitViewCard/SplitViewCard.styles.js +10 -9
- package/dist/SplitViewCard/SplitViewCard.styles.js.map +1 -1
- package/dist/SplitViewCard/SplitViewCard.types.d.ts +11 -0
- package/dist/SplitViewCard/SplitViewCard.types.js.map +1 -1
- package/dist/SplitViewCard/SplitViewCardInternal.context.d.ts +2 -2
- package/dist/SplitViewCard/SplitViewCardInternal.context.js +4 -1
- package/dist/SplitViewCard/SplitViewCardInternal.context.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.components.d.ts +4 -3
- package/dist/SuperSelect/SuperSelect.components.js +5 -1
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.d.ts +2 -2
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.d.ts +6 -6
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/SuperSelect.types.d.ts +3 -2
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
- package/dist/SuperSelect/useSuperSelect.js +28 -1
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.d.ts +1 -2
- package/dist/Switch/Switch.js.map +1 -1
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Switch/Switch.types.d.ts +2 -2
- package/dist/Switch/Switch.types.js.map +1 -1
- package/dist/Table/Table.d.ts +34 -35
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/Table.styles.d.ts +6 -6
- package/dist/Table/Table.styles.js +28 -28
- package/dist/Table/Table.types.d.ts +1 -2
- package/dist/Table/Table.types.js.map +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js.map +1 -1
- package/dist/TableShelf/TableShelf.d.ts +12 -13
- package/dist/TableShelf/TableShelf.js.map +1 -1
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.d.ts +4 -5
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +2 -2
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.js +9 -6
- package/dist/Tearsheet/Tearsheet.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.d.ts +2 -2
- package/dist/Tearsheet/Tearsheet.styles.js +7 -6
- package/dist/Tearsheet/Tearsheet.styles.js.map +1 -1
- package/dist/TextArea/TextArea.d.ts +1 -2
- package/dist/TextArea/TextArea.js.map +1 -1
- package/dist/TextArea/TextArea.styles.js +4 -4
- package/dist/TextArea/TextArea.styles.js.map +1 -1
- package/dist/TextArea/TextArea.types.d.ts +2 -2
- package/dist/TextArea/TextArea.types.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.d.ts +1 -2
- package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/TextEditorOutput/index.d.ts +1 -0
- package/dist/TextEditorOutput/index.js.map +1 -1
- package/dist/TextInput/TextInput.d.ts +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +6 -7
- package/dist/Thumbnail/Thumbnail.hooks.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.d.ts +2 -2
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/index.d.ts +1 -1
- package/dist/Thumbnail/index.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.d.ts +1 -2
- package/dist/ThumbnailGrid/ThumbnailGrid.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +9 -9
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.d.ts +15 -15
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.d.ts +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Tile/Tile.types.d.ts +4 -4
- package/dist/Tile/Tile.types.js.map +1 -1
- package/dist/Title/Title.d.ts +5 -6
- package/dist/Title/Title.js.map +1 -1
- package/dist/Title/Title.styles.d.ts +3 -3
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Title/Title.types.d.ts +2 -2
- package/dist/Title/Title.types.js.map +1 -1
- package/dist/Toast/Toast.d.ts +4 -5
- 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/ToggleButton/ToggleButton.types.d.ts +1 -2
- package/dist/ToggleButton/ToggleButton.types.js.map +1 -1
- package/dist/Token/Token.d.ts +5 -4
- package/dist/Token/Token.js +37 -10
- package/dist/Token/Token.js.map +1 -1
- package/dist/Token/Token.styles.d.ts +3 -7
- package/dist/Token/Token.styles.js +8 -8
- package/dist/Token/Token.styles.js.map +1 -1
- package/dist/Token/Token.types.d.ts +4 -0
- package/dist/Token/Token.types.js.map +1 -1
- package/dist/ToolHeader/ToolHeader.d.ts +6 -7
- package/dist/ToolHeader/ToolHeader.js.map +1 -1
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.d.ts +6 -6
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Tree/Tree.types.d.ts +2 -3
- package/dist/Tree/Tree.types.js.map +1 -1
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.d.ts +1 -2
- package/dist/Typography/Typography.js.map +1 -1
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/ClickOutside.js +8 -4
- package/dist/_hooks/ClickOutside.js.map +1 -1
- package/dist/_locales/de-DE.json +1 -1
- package/dist/_locales/en-AU.json +1 -1
- package/dist/_locales/en-CA.json +1 -1
- package/dist/_locales/en-GB.json +1 -1
- package/dist/_locales/en.json +1 -1
- package/dist/_locales/es-ES.json +1 -1
- package/dist/_locales/es.json +1 -1
- package/dist/_locales/fr-CA.json +1 -1
- package/dist/_locales/fr-FR.json +1 -1
- package/dist/_locales/is-IS.json +1 -1
- package/dist/_locales/it-IT.json +1 -1
- package/dist/_locales/ja-JP.json +1 -1
- package/dist/_locales/pl-PL.json +1 -1
- package/dist/_locales/pseudo.json +1 -1
- package/dist/_locales/pt-BR.json +1 -1
- package/dist/_locales/th-TH.json +1 -1
- package/dist/_locales/zh-SG.json +1 -1
- package/dist/_locales/zh-TW.json +1 -1
- package/dist/_styles/mixins.js +1 -1
- package/dist/_styles/mixins.js.map +1 -1
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- 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 +13 -13
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -18
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +739 -759
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +1 -31
- 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 +54 -54
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +32 -32
- package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -56
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +51 -29
- package/dist/_typedoc/Pill/Pill.types.json +4 -4
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +60 -60
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +34 -12
- package/dist/_typedoc/Switch/Switch.types.json +1 -32
- package/dist/_typedoc/Table/Table.types.json +101 -101
- package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +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 +8 -8
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +30 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_utils/slotify.d.ts +1 -2
- package/dist/_utils/slotify.js.map +1 -1
- package/dist/_utils/types.d.ts +16 -18
- package/dist/_utils/types.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/Modal/Modal.js
CHANGED
|
@@ -16,6 +16,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
16
16
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
18
18
|
import { Clear } from '@procore/core-icons/dist';
|
|
19
|
+
import { useId } from '@react-aria/utils';
|
|
19
20
|
import React, { useEffect } from 'react';
|
|
20
21
|
import { Button } from '../Button';
|
|
21
22
|
import { useModalDialogLike } from '../OverlayTrigger/a11yPresets';
|
|
@@ -41,9 +42,13 @@ var ModalCloseContext = /*#__PURE__*/React.createContext({
|
|
|
41
42
|
howToClose: [],
|
|
42
43
|
onClose: undefined
|
|
43
44
|
});
|
|
45
|
+
var ModalPrimaryHeadingCheckContext = /*#__PURE__*/React.createContext({
|
|
46
|
+
inModalHeader: false
|
|
47
|
+
});
|
|
44
48
|
var ModalBodyScrollContext = /*#__PURE__*/React.createContext({
|
|
45
49
|
isBodyScrolled: false,
|
|
46
|
-
setIsBodyScrolled: noop
|
|
50
|
+
setIsBodyScrolled: noop,
|
|
51
|
+
ariaLabelledBy: undefined
|
|
47
52
|
});
|
|
48
53
|
var ModalClosableHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
49
54
|
var children = _ref.children,
|
|
@@ -53,6 +58,7 @@ var ModalClosableHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
53
58
|
qa = _ref.qa,
|
|
54
59
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
60
|
var _React$useContext = React.useContext(ModalBodyScrollContext),
|
|
61
|
+
ariaLabelledBy = _React$useContext.ariaLabelledBy,
|
|
56
62
|
isBodyScrolled = _React$useContext.isBodyScrolled;
|
|
57
63
|
var _React$useContext2 = React.useContext(ModalCloseContext),
|
|
58
64
|
howToClose = _React$useContext2.howToClose,
|
|
@@ -80,8 +86,15 @@ var ModalClosableHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
80
86
|
$isBodyScrolled: isBodyScrolled
|
|
81
87
|
}, props, {
|
|
82
88
|
ref: mergeRefs(ref, modalClosableHeaderRef)
|
|
83
|
-
}), /*#__PURE__*/React.createElement(
|
|
89
|
+
}), /*#__PURE__*/React.createElement(ModalPrimaryHeadingCheckContext.Provider, {
|
|
90
|
+
value: {
|
|
91
|
+
inModalHeader: true
|
|
92
|
+
}
|
|
93
|
+
}, /*#__PURE__*/React.createElement(StyledModalHeading, {
|
|
84
94
|
$compact: compact
|
|
95
|
+
// This made all children the heading, like Title content
|
|
96
|
+
,
|
|
97
|
+
id: ariaLabelledBy
|
|
85
98
|
}, children), onClose && howToClose !== null && howToClose !== void 0 && howToClose.includes('x') || externalOnClose ? /*#__PURE__*/React.createElement(StyledModalCancel, null, /*#__PURE__*/React.createElement(Button, {
|
|
86
99
|
"aria-label": I18n.t('core.modal.a11y.close'),
|
|
87
100
|
"data-internal": "close-button",
|
|
@@ -90,7 +103,7 @@ var ModalClosableHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
90
103
|
onClick: onClickButton,
|
|
91
104
|
size: compact ? 'sm' : 'md',
|
|
92
105
|
variant: "tertiary"
|
|
93
|
-
})) : null);
|
|
106
|
+
})) : null));
|
|
94
107
|
});
|
|
95
108
|
var ModalClosableFooterButtons = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
96
109
|
var children = _ref2.children,
|
|
@@ -153,6 +166,7 @@ var ModalBody = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
153
166
|
var scrollRef = React.useRef(null);
|
|
154
167
|
var modalBodyRef = React.useRef(null);
|
|
155
168
|
var _React$useContext5 = React.useContext(ModalBodyScrollContext),
|
|
169
|
+
ariaLabelledBy = _React$useContext5.ariaLabelledBy,
|
|
156
170
|
setIsBodyScrolled = _React$useContext5.setIsBodyScrolled;
|
|
157
171
|
var registerChildRef = useModalChildRegistryDispatch();
|
|
158
172
|
useEffect(function () {
|
|
@@ -175,7 +189,9 @@ var ModalBody = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
175
189
|
$isOverflowingY: isOverflowingY,
|
|
176
190
|
$noSideSpacing: noSideSpacing,
|
|
177
191
|
ref: mergeRefs(overflowRef, scrollRef, ref, modalBodyRef),
|
|
178
|
-
tabIndex: 0
|
|
192
|
+
tabIndex: 0,
|
|
193
|
+
role: "region",
|
|
194
|
+
"aria-labelledby": ariaLabelledBy
|
|
179
195
|
}), children)));
|
|
180
196
|
});
|
|
181
197
|
var ModalFooterSummary = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
@@ -217,6 +233,8 @@ var Modal_ = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
217
233
|
role = _ref7.role,
|
|
218
234
|
props = _objectWithoutProperties(_ref7, _excluded7);
|
|
219
235
|
useScrollLock(open);
|
|
236
|
+
var defaultLabelId = useId();
|
|
237
|
+
var labelledbyId = ariaLabel ? id : ariaLabelledby !== null && ariaLabelledby !== void 0 ? ariaLabelledby : defaultLabelId;
|
|
220
238
|
var _React$useState = React.useState(open),
|
|
221
239
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
222
240
|
visible = _React$useState2[0],
|
|
@@ -256,7 +274,7 @@ var Modal_ = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
256
274
|
var _useModalDialogLike = useModalDialogLike({
|
|
257
275
|
'aria-describedby': ariaDescribedby,
|
|
258
276
|
'aria-details': ariaDetails,
|
|
259
|
-
'aria-labelledby':
|
|
277
|
+
'aria-labelledby': labelledbyId,
|
|
260
278
|
'aria-label': ariaLabel,
|
|
261
279
|
id: id,
|
|
262
280
|
isModal: false,
|
|
@@ -297,23 +315,27 @@ var Modal_ = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
297
315
|
placement: placement
|
|
298
316
|
}), /*#__PURE__*/React.createElement(StyledModalContent, {
|
|
299
317
|
$compact: compact
|
|
300
|
-
}, /*#__PURE__*/React.createElement(ModalBodyScrollObserver,
|
|
318
|
+
}, /*#__PURE__*/React.createElement(ModalBodyScrollObserver, {
|
|
319
|
+
ariaLabelledBy: labelledbyId
|
|
320
|
+
}, /*#__PURE__*/React.createElement(CloseWithConfirmContext.Provider, {
|
|
301
321
|
value: closeWithConfirmState
|
|
302
322
|
}, children)))))))))) : null;
|
|
303
323
|
});
|
|
304
|
-
function ModalBodyScrollObserver(_ref8) {
|
|
305
|
-
var
|
|
324
|
+
var ModalBodyScrollObserver = function ModalBodyScrollObserver(_ref8) {
|
|
325
|
+
var ariaLabelledBy = _ref8.ariaLabelledBy,
|
|
326
|
+
children = _ref8.children;
|
|
306
327
|
var _React$useState5 = React.useState(false),
|
|
307
328
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
308
329
|
isBodyScrolled = _React$useState6[0],
|
|
309
330
|
setIsBodyScrolled = _React$useState6[1];
|
|
310
331
|
return /*#__PURE__*/React.createElement(ModalBodyScrollContext.Provider, {
|
|
311
332
|
value: {
|
|
333
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
312
334
|
isBodyScrolled: isBodyScrolled,
|
|
313
335
|
setIsBodyScrolled: setIsBodyScrolled
|
|
314
336
|
}
|
|
315
337
|
}, children);
|
|
316
|
-
}
|
|
338
|
+
};
|
|
317
339
|
export var ConfirmModal = /*#__PURE__*/React.forwardRef(function (_ref9, ref) {
|
|
318
340
|
var children = _ref9.children,
|
|
319
341
|
headline = _ref9.headline,
|
|
@@ -327,6 +349,21 @@ export var ConfirmModal = /*#__PURE__*/React.forwardRef(function (_ref9, ref) {
|
|
|
327
349
|
size: "lg"
|
|
328
350
|
}), headline), children);
|
|
329
351
|
});
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Applies proper smenatics regardless of where in the Modal.
|
|
355
|
+
* Adds the generate ID to node when necessary so the dialog and scroll region
|
|
356
|
+
* aria-labelledby by can find the primary heading (in the Modal.Header)
|
|
357
|
+
*/
|
|
358
|
+
var ModalHeading = function ModalHeading(props) {
|
|
359
|
+
var _React$useContext6 = React.useContext(ModalBodyScrollContext),
|
|
360
|
+
ariaLabelledBy = _React$useContext6.ariaLabelledBy;
|
|
361
|
+
var _React$useContext7 = React.useContext(ModalPrimaryHeadingCheckContext),
|
|
362
|
+
inModalHeader = _React$useContext7.inModalHeader;
|
|
363
|
+
return /*#__PURE__*/React.createElement(Heading, _extends({
|
|
364
|
+
id: inModalHeader ? ariaLabelledBy : undefined
|
|
365
|
+
}, props));
|
|
366
|
+
};
|
|
330
367
|
function ModalState(props) {
|
|
331
368
|
useDeprecation({
|
|
332
369
|
oldThing: 'Modal.State'
|
|
@@ -375,8 +412,7 @@ export var Modal = addSubcomponents({
|
|
|
375
412
|
FooterNotation: FooterNotation,
|
|
376
413
|
FooterSummary: FooterSummary,
|
|
377
414
|
Header: Header,
|
|
378
|
-
Heading:
|
|
379
|
-
// Could make this tabIndex -1, and focus it on open
|
|
415
|
+
Heading: ModalHeading,
|
|
380
416
|
Overlay: Overlay,
|
|
381
417
|
Scrim: Scrim,
|
|
382
418
|
State: State,
|
package/dist/Modal/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","names":["Clear","React","useEffect","Button","useModalDialogLike","Portal","Heading","LevelContext","Section","SectionProvider","useDeprecation","useLayoutEventListener","OverridableFocusScope","useI18nContext","useOverflowObserver","useScrollLock","Visibility","addSubcomponents","CloseWithConfirmContext","useCloseWithConfirmContext","useCloseWithConfirmState","mergeRefs","ChildRegistryProvider","useModalChildRegistryDispatch","fadeInClassName","fadeOutClassName","StyledModal","StyledModalBody","StyledModalButtons","StyledModalCancel","StyledModalContainer","StyledModalContent","StyledModalFooter","StyledModalFooterNotation","StyledModalFooterSummary","StyledModalHeader","StyledModalHeading","StyledModalScrim","StyledModalWarningIcon","useInitializeModalFocus","noop","defaultStartLevel","initialBodyLevel","ModalCloseContext","createContext","howToClose","onClose","undefined","ModalBodyScrollContext","isBodyScrolled","setIsBodyScrolled","ModalClosableHeader","forwardRef","_ref","ref","children","_ref$compact","compact","externalOnClose","qa","props","_objectWithoutProperties","_excluded","_React$useContext","useContext","_React$useContext2","I18n","modalClosableHeaderRef","useRef","_useCloseWithConfirmC","closeWithConfirm","registerChildRef","child","onClickButton","e","includes","createElement","_extends","$compact","$isBodyScrolled","t","closeButton","icon","onClick","size","variant","ModalClosableFooterButtons","_ref2","_excluded2","_React$useContext3","_useCloseWithConfirmC2","modalClosableFooterButtonsRef","ModalContainer","_ref3","_ref3$compact","placement","width","_excluded3","_React$useContext4","modalContainerRef","hasOnClose","shadowStrength","$placement","$width","ModalBody","_ref4","_ref4$compact","_ref4$noSideSpacing","noSideSpacing","_excluded4","_useOverflowObserver","isOverflowingY","overflowRef","scrollRef","modalBodyRef","_React$useContext5","event","handler","currentTarget","scrollTop","scope","Provider","value","$isOverflowingY","$noSideSpacing","tabIndex","ModalFooterSummary","_ref5","_excluded5","ModalFooterNotation","_ref6","_excluded6","intent","color","italic","Modal_","_ref7","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","_ref7$compact","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","fadeTimer","setTimeout","clearTimeout","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","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 React, { useEffect } from 'react'\nimport { Button } from '../Button'\nimport { useModalDialogLike } from '../OverlayTrigger/a11yPresets'\nimport { Portal } from '../Portal'\nimport {\n Heading,\n LevelContext,\n Section,\n SectionProvider,\n} from '../Section/Section'\nimport type { TypographyProps } from '../Typography'\nimport { useDeprecation } from '../_hooks/Deprecation'\nimport { useLayoutEventListener } from '../_hooks/EventListener'\nimport { OverridableFocusScope } from '../_hooks/FocusScopeOverride'\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 {\n CloseWithConfirmContext,\n useCloseWithConfirmContext,\n useCloseWithConfirmState,\n} from '../_utils/closeWithConfirm'\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 ModalProps,\n} from './Modal.types'\nimport { useInitializeModalFocus } from './useInitializeModalFocus'\n\nfunction noop() {}\nconst defaultStartLevel = 2\nconst initialBodyLevel = 3\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>(\n (\n { children, compact = false, onClose: externalOnClose, qa, ...props },\n ref\n ) => {\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 $compact={compact}\n $isBodyScrolled={isBodyScrolled}\n {...props}\n ref={mergeRefs(ref, modalClosableHeaderRef)}\n >\n <StyledModalHeading $compact={compact}>{children}</StyledModalHeading>\n {(onClose && howToClose?.includes('x')) || externalOnClose ? (\n <StyledModalCancel>\n <Button\n aria-label={I18n.t('core.modal.a11y.close')}\n data-internal=\"close-button\"\n data-qa={qa?.closeButton}\n icon={<Clear />}\n onClick={onClickButton}\n size={compact ? 'sm' : 'md'}\n variant=\"tertiary\"\n />\n </StyledModalCancel>\n ) : null}\n </StyledModalHeader>\n )\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 ({ compact = false, 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 $compact={compact}\n $placement={placement}\n $width={width}\n ref={mergeRefs(ref, modalContainerRef)}\n />\n )\n }\n)\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ children, compact = false, 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 $compact={compact}\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 compact = false,\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 const fadeTimer = setTimeout(() => {\n setFadeType(fadeInClassName)\n }, 0)\n return () => clearTimeout(fadeTimer)\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(e: React.MouseEvent<HTMLDivElement>) {\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 <OverridableFocusScope\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\n data-qa=\"core-modal-scrim\"\n onClick={onClickScrim}\n />\n\n <ModalContainer\n {...props}\n compact={compact}\n placement={placement}\n >\n <StyledModalContent $compact={compact}>\n <ModalBodyScrollObserver>\n <CloseWithConfirmContext.Provider\n value={closeWithConfirmState}\n >\n {children}\n </CloseWithConfirmContext.Provider>\n </ModalBodyScrollObserver>\n </StyledModalContent>\n </ModalContainer>\n </StyledModal>\n </OverridableFocusScope>\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, // Could make this tabIndex -1, and focus it on open\n Overlay,\n Scrim,\n State,\n Section,\n },\n Modal_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,MAAM,QAAQ,WAAW;AAClC,SACEC,OAAO,EACPC,YAAY,EACZC,OAAO,EACPC,eAAe,QACV,oBAAoB;AAE3B,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,sBAAsB,QAAQ,yBAAyB;AAChE,SAASC,qBAAqB,QAAQ,8BAA8B;AACpE,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SACEC,uBAAuB,EACvBC,0BAA0B,EAC1BC,wBAAwB,QACnB,4BAA4B;AACnC,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,6BAA6B,QACxB,yBAAyB;AAChC,SACEC,eAAe,EACfC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,kBAAkB,EAClBC,iBAAiB,EACjBC,oBAAoB,EACpBC,kBAAkB,EAClBC,iBAAiB,EACjBC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EACbI,MAAM,EAANA,MAAM;EACNjM,OAAO,EAAEA,OAAO;EAAE;EAClBkM,OAAO,EAAPA,OAAO;EACPC,KAAK,EAALA,KAAK;EACLC,KAAK,EAALA,KAAK;EACLlM,OAAO,EAAPA;AACF,CAAC,EACD+H,MACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["Clear","useId","React","useEffect","Button","useModalDialogLike","Portal","Heading","LevelContext","Section","SectionProvider","useDeprecation","useLayoutEventListener","OverridableFocusScope","useI18nContext","useOverflowObserver","useScrollLock","Visibility","addSubcomponents","CloseWithConfirmContext","useCloseWithConfirmContext","useCloseWithConfirmState","mergeRefs","ChildRegistryProvider","useModalChildRegistryDispatch","fadeInClassName","fadeOutClassName","StyledModal","StyledModalBody","StyledModalButtons","StyledModalCancel","StyledModalContainer","StyledModalContent","StyledModalFooter","StyledModalFooterNotation","StyledModalFooterSummary","StyledModalHeader","StyledModalHeading","StyledModalScrim","StyledModalWarningIcon","useInitializeModalFocus","noop","defaultStartLevel","initialBodyLevel","ModalCloseContext","createContext","howToClose","onClose","undefined","ModalPrimaryHeadingCheckContext","inModalHeader","ModalBodyScrollContext","isBodyScrolled","setIsBodyScrolled","ariaLabelledBy","ModalClosableHeader","forwardRef","_ref","ref","children","_ref$compact","compact","externalOnClose","qa","props","_objectWithoutProperties","_excluded","_React$useContext","useContext","_React$useContext2","I18n","modalClosableHeaderRef","useRef","_useCloseWithConfirmC","closeWithConfirm","registerChildRef","child","onClickButton","e","includes","createElement","_extends","$compact","$isBodyScrolled","Provider","value","id","t","closeButton","icon","onClick","size","variant","ModalClosableFooterButtons","_ref2","_excluded2","_React$useContext3","_useCloseWithConfirmC2","modalClosableFooterButtonsRef","ModalContainer","_ref3","_ref3$compact","placement","width","_excluded3","_React$useContext4","modalContainerRef","hasOnClose","shadowStrength","$placement","$width","ModalBody","_ref4","_ref4$compact","_ref4$noSideSpacing","noSideSpacing","_excluded4","_useOverflowObserver","isOverflowingY","overflowRef","scrollRef","modalBodyRef","_React$useContext5","event","handler","currentTarget","scrollTop","scope","$isOverflowingY","$noSideSpacing","tabIndex","role","ModalFooterSummary","_ref5","_excluded5","ModalFooterNotation","_ref6","_excluded6","intent","color","italic","Modal_","_ref7","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","_ref7$compact","_ref7$onClickOverlay","onClickOverlay","_ref7$open","open","_ref7$placement","_excluded7","defaultLabelId","labelledbyId","_React$useState","useState","_React$useState2","_slicedToArray","visible","setVisible","_React$useState3","_React$useState4","fadeType","setFadeType","closeWithConfirmState","fadeTimer","setTimeout","clearTimeout","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","ModalHeading","_React$useContext6","_React$useContext7","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 { useId } from '@react-aria/utils'\nimport React, { useEffect } from 'react'\nimport { Button } from '../Button'\nimport { useModalDialogLike } from '../OverlayTrigger/a11yPresets'\nimport { Portal } from '../Portal'\nimport {\n Heading,\n LevelContext,\n Section,\n SectionProvider,\n} from '../Section/Section'\nimport type { HeadingProps } from '../Semantic/Semantic.types'\nimport type { TypographyProps } from '../Typography'\nimport { useDeprecation } from '../_hooks/Deprecation'\nimport { useLayoutEventListener } from '../_hooks/EventListener'\nimport { OverridableFocusScope } from '../_hooks/FocusScopeOverride'\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 {\n CloseWithConfirmContext,\n useCloseWithConfirmContext,\n useCloseWithConfirmState,\n} from '../_utils/closeWithConfirm'\nimport { mergeRefs } from '../_utils/mergeRefs'\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 ModalProps,\n} from './Modal.types'\nimport { useInitializeModalFocus } from './useInitializeModalFocus'\n\nfunction noop() {}\nconst defaultStartLevel = 2\nconst initialBodyLevel = 3\n\nconst ModalCloseContext = React.createContext<ModalCloseContextApi>({\n howToClose: [],\n onClose: undefined,\n})\n\nconst ModalPrimaryHeadingCheckContext = React.createContext({\n inModalHeader: false,\n})\n\ninterface ModalBodyScrollContextApi {\n isBodyScrolled: boolean\n setIsBodyScrolled: React.Dispatch<React.SetStateAction<boolean>>\n ariaLabelledBy?: string\n}\n\nconst ModalBodyScrollContext = React.createContext<ModalBodyScrollContextApi>({\n isBodyScrolled: false,\n setIsBodyScrolled: noop,\n ariaLabelledBy: undefined,\n})\n\nconst ModalClosableHeader = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(\n (\n { children, compact = false, onClose: externalOnClose, qa, ...props },\n ref\n ) => {\n const { ariaLabelledBy, isBodyScrolled } = React.useContext(\n ModalBodyScrollContext\n )\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 $compact={compact}\n $isBodyScrolled={isBodyScrolled}\n {...props}\n ref={mergeRefs(ref, modalClosableHeaderRef)}\n >\n <ModalPrimaryHeadingCheckContext.Provider\n value={{ inModalHeader: true }}\n >\n <StyledModalHeading\n $compact={compact}\n // This made all children the heading, like Title content\n id={ariaLabelledBy}\n >\n {children}\n </StyledModalHeading>\n {(onClose && howToClose?.includes('x')) || externalOnClose ? (\n <StyledModalCancel>\n <Button\n aria-label={I18n.t('core.modal.a11y.close')}\n data-internal=\"close-button\"\n data-qa={qa?.closeButton}\n icon={<Clear />}\n onClick={onClickButton}\n size={compact ? 'sm' : 'md'}\n variant=\"tertiary\"\n />\n </StyledModalCancel>\n ) : null}\n </ModalPrimaryHeadingCheckContext.Provider>\n </StyledModalHeader>\n )\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 ({ compact = false, 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 $compact={compact}\n $placement={placement}\n $width={width}\n ref={mergeRefs(ref, modalContainerRef)}\n />\n )\n }\n)\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ children, compact = false, noSideSpacing = false, ...props }, ref) => {\n const { isOverflowingY, ref: overflowRef } = useOverflowObserver()\n const scrollRef = React.useRef(null)\n const modalBodyRef = React.useRef(null)\n const { ariaLabelledBy, setIsBodyScrolled } = React.useContext(\n ModalBodyScrollContext\n )\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 $compact={compact}\n $isOverflowingY={isOverflowingY}\n $noSideSpacing={noSideSpacing}\n ref={mergeRefs(overflowRef, scrollRef, ref, modalBodyRef)}\n tabIndex={0}\n role=\"region\"\n aria-labelledby={ariaLabelledBy}\n >\n {children}\n </StyledModalBody>\n </LevelContext.Provider>\n </SectionProvider>\n )\n }\n)\n\nconst ModalFooterSummary = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ children, ...props }, ref) => {\n return (\n <StyledModalFooterSummary {...props} ref={ref}>\n {children}\n </StyledModalFooterSummary>\n )\n})\n\nconst ModalFooterNotation = React.forwardRef<\n HTMLSpanElement,\n React.HTMLAttributes<HTMLSpanElement> & 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 compact = false,\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 defaultLabelId = useId()\n const labelledbyId = ariaLabel ? id : ariaLabelledby ?? defaultLabelId\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 const fadeTimer = setTimeout(() => {\n setFadeType(fadeInClassName)\n }, 0)\n return () => clearTimeout(fadeTimer)\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': labelledbyId,\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(e: React.MouseEvent<HTMLDivElement>) {\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 <OverridableFocusScope\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\n data-qa=\"core-modal-scrim\"\n onClick={onClickScrim}\n />\n\n <ModalContainer\n {...props}\n compact={compact}\n placement={placement}\n >\n <StyledModalContent $compact={compact}>\n <ModalBodyScrollObserver ariaLabelledBy={labelledbyId}>\n <CloseWithConfirmContext.Provider\n value={closeWithConfirmState}\n >\n {children}\n </CloseWithConfirmContext.Provider>\n </ModalBodyScrollObserver>\n </StyledModalContent>\n </ModalContainer>\n </StyledModal>\n </OverridableFocusScope>\n </ChildRegistryProvider>\n </LevelContext.Provider>\n </ModalCloseContext.Provider>\n </Portal>\n ) : null\n }\n)\n\ninterface ModalBodyScrollObserverProps {\n ariaLabelledBy?: string\n}\n\nconst ModalBodyScrollObserver = ({\n ariaLabelledBy,\n children,\n}: React.PropsWithChildren<ModalBodyScrollObserverProps>) => {\n const [isBodyScrolled, setIsBodyScrolled] = React.useState<boolean>(false)\n\n return (\n <ModalBodyScrollContext.Provider\n value={{ ariaLabelledBy, 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\n/**\n * Applies proper smenatics regardless of where in the Modal.\n * Adds the generate ID to node when necessary so the dialog and scroll region\n * aria-labelledby by can find the primary heading (in the Modal.Header)\n */\nconst ModalHeading = (\n props: React.PropsWithChildren<HeadingProps & { level?: number }>\n) => {\n const { ariaLabelledBy } = React.useContext(ModalBodyScrollContext)\n const { inModalHeader } = React.useContext(ModalPrimaryHeadingCheckContext)\n\n return <Heading id={inModalHeader ? ariaLabelledBy : undefined} {...props} />\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: ModalHeading,\n Overlay,\n Scrim,\n State,\n Section,\n },\n Modal_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,SAASC,KAAK,QAAQ,mBAAmB;AACzC,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,MAAM,QAAQ,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B,IAAM2F,SAAS,GAAGvG,cAAc;AAChC,IAAMwG,OAAO,GAAG3K,kBAAkB;AAClC,IAAM4K,aAAa,GAAGxE,kBAAkB;AACxC,IAAMyE,MAAM,GAAG5K,iBAAiB;AAChC,IAAM6K,aAAa,GAAGjH,0BAA0B;AAChD,IAAMkH,cAAc,GAAGxE,mBAAmB;AAC1C,IAAMyE,MAAM,GAAGzJ,mBAAmB;AAClC,IAAM0J,OAAO,GAAGtL,WAAW;AAC3B,IAAMuL,KAAK,GAAG5K,gBAAgB;AAC9B,IAAM6K,KAAK,GAAGb,UAAU;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMJ,KAAK,GAAGhL,gBAAgB,CACnC;EACEuL,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;EACNzM,OAAO,EAAE4L,YAAY;EACrBc,OAAO,EAAPA,OAAO;EACPC,KAAK,EAALA,KAAK;EACLC,KAAK,EAALA,KAAK;EACL1M,OAAO,EAAPA;AACF,CAAC,EACDoI,MACF,CAAC"}
|
|
@@ -12,13 +12,13 @@ export declare const modalPixelWidths: {
|
|
|
12
12
|
};
|
|
13
13
|
export declare const StyledModal: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
14
|
export declare const StyledModalButtons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
|
-
export declare const StyledModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("
|
|
15
|
+
export declare const StyledModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("react").HTMLAttributes<HTMLDivElement> & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
16
16
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
$compact: boolean;
|
|
19
19
|
$placement: ModalPlacement;
|
|
20
20
|
$width?: ModalWidth | undefined;
|
|
21
|
-
}>> & string & Omit<import("react").ForwardRefExoticComponent<import("
|
|
21
|
+
}>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
22
22
|
export declare const StyledModalFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
23
23
|
export declare const StyledModalBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
24
24
|
$compact: boolean;
|
|
@@ -28,9 +28,9 @@ export declare const StyledModalBody: import("styled-components/dist/types").ISt
|
|
|
28
28
|
export declare const StyledModalContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
29
29
|
$compact?: boolean | undefined;
|
|
30
30
|
}>> & string;
|
|
31
|
-
export declare const StyledModalFooterNotation: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("
|
|
31
|
+
export declare const StyledModalFooterNotation: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("react").HTMLAttributes<HTMLSpanElement> & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
32
32
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
33
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("
|
|
33
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, keyof import("react").Component<any, {}, any>>;
|
|
34
34
|
export declare const StyledModalHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
35
35
|
$compact: boolean;
|
|
36
36
|
$isBodyScrolled: boolean;
|
|
@@ -5,6 +5,7 @@ import { StyledSection, StyledSectionInner } from '../Section/Section.styles';
|
|
|
5
5
|
import { Typography } from '../Typography/Typography';
|
|
6
6
|
import { getTypographyIntent } from '../Typography/Typography.styles';
|
|
7
7
|
import { colors } from '../_styles/colors';
|
|
8
|
+
import { getFocus } from '../_styles/mixins';
|
|
8
9
|
import { spacing } from '../_styles/spacing';
|
|
9
10
|
export var fadeInClassName = 'fade-in';
|
|
10
11
|
export var fadeOutClassName = 'fade-out';
|
|
@@ -31,15 +32,15 @@ var screenWidthPixelBreakpoints = {
|
|
|
31
32
|
};
|
|
32
33
|
export var StyledModal = /*#__PURE__*/styled.div.withConfig({
|
|
33
34
|
displayName: "StyledModal",
|
|
34
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_25_2__sc-1ijdug2-0"
|
|
35
36
|
})(["display:flex;height:100vh;position:absolute;opacity:0;transition:0.3s opacity ease;width:100vw;z-index:0;pointer-events:none;&.", "{opacity:1;pointer-events:auto;}&.", "{opacity:0;pointer-events:none;}"], fadeInClassName, fadeOutClassName);
|
|
36
37
|
export var StyledModalButtons = /*#__PURE__*/styled.div.withConfig({
|
|
37
38
|
displayName: "StyledModalButtons",
|
|
38
|
-
componentId: "core-
|
|
39
|
+
componentId: "core-12_25_2__sc-1ijdug2-1"
|
|
39
40
|
})(["display:flex;flex:0 0 auto;margin-left:", "px;> * + *{margin-left:", "px;}"], spacing.lg, spacing.sm);
|
|
40
41
|
export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
41
42
|
displayName: "StyledModalContainer",
|
|
42
|
-
componentId: "core-
|
|
43
|
+
componentId: "core-12_25_2__sc-1ijdug2-2"
|
|
43
44
|
})(["display:flex;flex-direction:row;position:absolute;z-index:2;", " ", " ", ""], function (_ref) {
|
|
44
45
|
var $compact = _ref.$compact;
|
|
45
46
|
if (!$compact) {
|
|
@@ -63,12 +64,12 @@ export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
|
63
64
|
});
|
|
64
65
|
export var StyledModalFooter = /*#__PURE__*/styled.div.withConfig({
|
|
65
66
|
displayName: "StyledModalFooter",
|
|
66
|
-
componentId: "core-
|
|
67
|
+
componentId: "core-12_25_2__sc-1ijdug2-3"
|
|
67
68
|
})(["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);
|
|
68
69
|
export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
|
|
69
70
|
displayName: "StyledModalBody",
|
|
70
|
-
componentId: "core-
|
|
71
|
-
})(["", " box-sizing:border-box;color:", ";display:flex;flex-direction:column;overflow:auto;", " ", " > ", "{padding-left:0;padding-right:0;&:first-child > ", "{padding-top:0;}}", ""], getTypographyIntent('body'), colors.gray15, function (_ref4) {
|
|
71
|
+
componentId: "core-12_25_2__sc-1ijdug2-4"
|
|
72
|
+
})(["", " &:focus-visible{", "}box-sizing:border-box;color:", ";display:flex;flex-direction:column;overflow:auto;", " ", " > ", "{padding-left:0;padding-right:0;&:first-child > ", "{padding-top:0;}}", ""], getTypographyIntent('body'), getFocus(), colors.gray15, function (_ref4) {
|
|
72
73
|
var $noSideSpacing = _ref4.$noSideSpacing;
|
|
73
74
|
return css(["padding:", "px ", "px;"], spacing.xl, $noSideSpacing ? 0 : spacing.xxl);
|
|
74
75
|
}, function (_ref5) {
|
|
@@ -84,7 +85,7 @@ export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
|
|
|
84
85
|
});
|
|
85
86
|
export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
|
|
86
87
|
displayName: "StyledModalContent",
|
|
87
|
-
componentId: "core-
|
|
88
|
+
componentId: "core-12_25_2__sc-1ijdug2-5"
|
|
88
89
|
})(["display:flex;flex-direction:column;max-height:90vh;overflow:hidden;width:100%;", ""], function (_ref7) {
|
|
89
90
|
var _ref7$$compact = _ref7.$compact,
|
|
90
91
|
$compact = _ref7$$compact === void 0 ? false : _ref7$$compact;
|
|
@@ -95,11 +96,11 @@ export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
95
96
|
});
|
|
96
97
|
export var StyledModalFooterNotation = /*#__PURE__*/styled(Typography).withConfig({
|
|
97
98
|
displayName: "StyledModalFooterNotation",
|
|
98
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_25_2__sc-1ijdug2-6"
|
|
99
100
|
})(["flex-grow:1;"]);
|
|
100
101
|
export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
|
|
101
102
|
displayName: "StyledModalHeader",
|
|
102
|
-
componentId: "core-
|
|
103
|
+
componentId: "core-12_25_2__sc-1ijdug2-7"
|
|
103
104
|
})(["align-items:flex-start;color:", ";display:flex;flex:0 0 auto;position:relative;", " ", ""], colors.gray10, function (_ref8) {
|
|
104
105
|
var $compact = _ref8.$compact,
|
|
105
106
|
$isBodyScrolled = _ref8.$isBodyScrolled;
|
|
@@ -117,7 +118,7 @@ export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
|
|
|
117
118
|
});
|
|
118
119
|
export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
|
|
119
120
|
displayName: "StyledModalHeading",
|
|
120
|
-
componentId: "core-
|
|
121
|
+
componentId: "core-12_25_2__sc-1ijdug2-8"
|
|
121
122
|
})(["", " align-items:center;display:flex;flex:1 1 auto;min-height:36px;padding-right:", "px;", ""], function (_ref0) {
|
|
122
123
|
var $compact = _ref0.$compact;
|
|
123
124
|
return getTypographyIntent($compact ? 'h3' : 'h2');
|
|
@@ -133,18 +134,18 @@ export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
|
|
|
133
134
|
});
|
|
134
135
|
export var StyledModalCancel = /*#__PURE__*/styled.div.withConfig({
|
|
135
136
|
displayName: "StyledModalCancel",
|
|
136
|
-
componentId: "core-
|
|
137
|
+
componentId: "core-12_25_2__sc-1ijdug2-9"
|
|
137
138
|
})(["flex:0 0 auto;"]);
|
|
138
139
|
export var StyledModalScrim = /*#__PURE__*/styled.div.withConfig({
|
|
139
140
|
displayName: "StyledModalScrim",
|
|
140
|
-
componentId: "core-
|
|
141
|
+
componentId: "core-12_25_2__sc-1ijdug2-10"
|
|
141
142
|
})(["background:hsla(200,8%,10%,0.6);height:100vh;left:0;position:absolute;top:0;width:100vw;z-index:1;"]);
|
|
142
143
|
export var StyledModalWarningIcon = /*#__PURE__*/styled(Warning).withConfig({
|
|
143
144
|
displayName: "StyledModalWarningIcon",
|
|
144
|
-
componentId: "core-
|
|
145
|
+
componentId: "core-12_25_2__sc-1ijdug2-11"
|
|
145
146
|
})(["color:", ";margin-right:", "px;"], colors.yellow40, spacing.sm);
|
|
146
147
|
export var StyledModalFooterSummary = /*#__PURE__*/styled.div.withConfig({
|
|
147
148
|
displayName: "StyledModalFooterSummary",
|
|
148
|
-
componentId: "core-
|
|
149
|
+
componentId: "core-12_25_2__sc-1ijdug2-12"
|
|
149
150
|
})(["", " 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);
|
|
150
151
|
//# sourceMappingURL=Modal.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.styles.js","names":["Warning","styled","css","Card","StyledSection","StyledSectionInner","Typography","getTypographyIntent","colors","spacing","fadeInClassName","fadeOutClassName","modalMaxWidth","modalPixelGutter","xl","modalPixelWidths","sm","md","lg","compactModalFullscreenMaxHeight","screenWidthPixelBreakpoints","mobile","small","min","max","large","StyledModal","div","withConfig","displayName","componentId","StyledModalButtons","StyledModalContainer","_ref","$compact","_ref2","$placement","_ref3","$width","StyledModalBody","StyledModalFooter","xxl","gray15","_ref4","$noSideSpacing","_ref5","_ref6","$isOverflowingY","gray85","StyledModalFooterSummary","StyledModalContent","_ref7","_ref7$$compact","StyledModalFooterNotation","StyledModalHeader","gray10","_ref8","$isBodyScrolled","_ref9","spacings","concat","StyledModalHeading","_ref0","_ref1","_ref10","StyledModalCancel","StyledModalScrim","StyledModalWarningIcon","yellow40","gray98"],"sources":["../../src/Modal/Modal.styles.ts"],"sourcesContent":["import { Warning } from '@procore/core-icons'\nimport styled, { css } from 'styled-components'\nimport { Card } from '../Card/Card'\nimport { StyledSection, StyledSectionInner } from '../Section/Section.styles'\nimport { Typography } from '../Typography/Typography'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\nimport type { ModalPlacement, ModalWidth } from './Modal.types'\n\nexport const fadeInClassName = 'fade-in'\nexport const fadeOutClassName = 'fade-out'\nexport const modalMaxWidth = '640px'\nexport const modalPixelGutter = spacing.xl\nexport const modalPixelWidths = {\n sm: 432,\n md: 688,\n lg: 1152,\n xl: 1920,\n}\n\nconst compactModalFullscreenMaxHeight = 940\nconst screenWidthPixelBreakpoints = {\n mobile: {\n small: {\n min: 0,\n max: 439,\n },\n large: {\n min: 440,\n max: 767,\n },\n },\n}\n\nexport const StyledModal = styled.div`\n display: flex;\n height: 100vh;\n position: absolute;\n opacity: 0;\n transition: 0.3s opacity ease;\n width: 100vw;\n z-index: 0;\n pointer-events: none;\n\n &.${fadeInClassName} {\n opacity: 1;\n pointer-events: auto;\n }\n\n &.${fadeOutClassName} {\n opacity: 0;\n pointer-events: none;\n }\n`\n\nexport const StyledModalButtons = styled.div`\n display: flex;\n flex: 0 0 auto;\n margin-left: ${spacing.lg}px;\n\n > * + * {\n margin-left: ${spacing.sm}px;\n }\n`\n\nexport const StyledModalContainer = styled(Card)<{\n $compact: boolean\n $placement: ModalPlacement\n $width?: ModalWidth\n}>`\n display: flex;\n flex-direction: row;\n position: absolute;\n z-index: 2;\n\n ${({ $compact }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n @media (max-width: ${screenWidthPixelBreakpoints.mobile.small\n .max}px) and (max-height: ${compactModalFullscreenMaxHeight}px) {\n border-radius: 0;\n height: 100vh;\n width: 100vw;\n }\n @media (min-width: ${screenWidthPixelBreakpoints.mobile.large\n .min}px) and (max-width: ${screenWidthPixelBreakpoints.mobile.large\n .max}px) {\n max-height: calc(100vh - 24px);\n width: 416px;\n }\n @media (min-height: ${compactModalFullscreenMaxHeight + 1}px) {\n height: 916px;\n max-width: 100vw;\n }\n `\n }}\n\n ${({ $placement }) => {\n if ($placement === 'top') {\n return css`\n top: 5vh;\n `\n }\n\n return css`\n top: 50vh;\n transform: translateY(-50%);\n `\n }}\n\n ${({ $width, $placement }) => {\n if ($width) {\n return css`\n left: ${modalPixelGutter}px;\n right: ${modalPixelGutter}px;\n margin-left: auto;\n margin-right: auto;\n max-width: ${modalPixelWidths[$width]}px;\n\n // TODO deprecated, moving width up. delete line in breaking change\n ${StyledModalBody} {\n max-width: none;\n }\n `\n }\n // TODO deprecated, uses new centering, required width\n return css`\n left: 50vw;\n transform: translateX(-50%)\n ${$placement === 'center' && 'translateY(-50%)'};\n `\n }}\n`\n\nexport const StyledModalFooter = styled.div`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n justify-content: flex-end;\n padding: ${spacing.xl}px ${spacing.xxl}px ${spacing.xxl}px;\n`\n\nexport const StyledModalBody = styled.div<{\n $compact: boolean\n $isOverflowingY: boolean\n $noSideSpacing: boolean\n}>`\n ${getTypographyIntent('body')}\n\n box-sizing: border-box;\n color: ${colors.gray15};\n display: flex;\n flex-direction: column;\n overflow: auto;\n ${({ $noSideSpacing }) => {\n return css`\n padding: ${spacing.xl}px ${$noSideSpacing ? 0 : spacing.xxl}px;\n `\n }}\n\n ${({ $compact }) => {\n if (!$compact) {\n // TODO deprecated, moving width up. delete line in breaking change\n return css`\n max-width: ${modalMaxWidth};\n `\n }\n\n return css`\n padding: 8px 16px;\n `\n }}\n\n > ${StyledSection} {\n padding-left: 0;\n padding-right: 0;\n\n &:first-child > ${StyledSectionInner} {\n padding-top: 0;\n }\n }\n\n ${({ $isOverflowingY }) =>\n $isOverflowingY &&\n css`\n & + ${StyledModalFooter} {\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: ${colors.gray85};\n ${StyledModalFooterSummary} {\n border-top: none;\n }\n }\n `}\n`\n\nexport const StyledModalContent = styled.div<{ $compact?: boolean }>`\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n width: 100%;\n\n ${({ $compact = false }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n max-height: unset;\n `\n }}\n`\n\nexport const StyledModalFooterNotation = styled(Typography)`\n flex-grow: 1;\n`\n\nexport const StyledModalHeader = styled.div<{\n $compact: boolean\n $isBodyScrolled: boolean\n}>`\n align-items: flex-start;\n color: ${colors.gray10};\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${({ $compact, $isBodyScrolled }) => {\n if ($compact) {\n return css`\n border-bottom: 1px solid ${colors.gray85};\n `\n }\n\n return css`\n border-bottom: 1px solid\n ${$isBodyScrolled ? colors.gray85 : 'transparent'};\n `\n }}\n\n ${({ $compact }) => {\n let spacings = `${spacing.xl}px ${spacing.xxl}px`\n\n if ($compact) {\n spacings = `${spacing.md}px ${spacing.lg}px`\n }\n\n return css`\n padding: ${spacings};\n `\n }}\n`\n\nexport const StyledModalHeading = styled.div<{ $compact: boolean }>`\n ${({ $compact }) => getTypographyIntent($compact ? 'h3' : 'h2')}\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n min-height: 36px;\n padding-right: ${({ $compact }) => ($compact ? 36 : spacing.lg)}px;\n\n ${({ $compact }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n min-height: unset;\n `\n }}\n`\n\nexport const StyledModalCancel = styled.div`\n flex: 0 0 auto;\n`\n\nexport const StyledModalScrim = styled.div`\n background: hsla(200, 8%, 10%, 0.6);\n height: 100vh;\n left: 0;\n position: absolute;\n top: 0;\n width: 100vw;\n z-index: 1;\n`\n\nexport const StyledModalWarningIcon = styled(Warning)`\n color: ${colors.yellow40};\n margin-right: ${spacing.sm}px;\n`\nexport const StyledModalFooterSummary = styled.div`\n ${getTypographyIntent('small')}\n border-top: 1px solid ${colors.gray85};\n border-bottom: 1px solid ${colors.gray85};\n padding: ${spacing.md}px ${spacing.xxl}px;\n color: ${colors.gray15};\n font-style: italic;\n background-color: ${colors.gray98};\n margin: -${spacing.xl}px -${spacing.xxl}px ${spacing.xl}px -${spacing.xxl}px;\n flex: 1 1 100%;\n`\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,qBAAqB;AAC7C,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,2BAA2B;AAC7E,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,OAAO,IAAMC,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AAE,CAC3B;AACD,OAAO,IAAMiC,wBAAwB,gBAAGhD,MAAM,CAAC0B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kMAC9CvB,mBAAmB,CAAC,OAAO,CAAC,EACNC,MAAM,CAACwC,MAAM,EACVxC,MAAM,CAACwC,MAAM,EAC7BvC,OAAO,CAACQ,EAAE,EAAMR,OAAO,CAACgC,GAAG,EAC7BjC,MAAM,CAACkC,MAAM,EAEFlC,MAAM,CAAC6D,MAAM,EACtB5D,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACgC,GAAG,EAAMhC,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACgC,GAAG,CAE1E"}
|
|
1
|
+
{"version":3,"file":"Modal.styles.js","names":["Warning","styled","css","Card","StyledSection","StyledSectionInner","Typography","getTypographyIntent","colors","getFocus","spacing","fadeInClassName","fadeOutClassName","modalMaxWidth","modalPixelGutter","xl","modalPixelWidths","sm","md","lg","compactModalFullscreenMaxHeight","screenWidthPixelBreakpoints","mobile","small","min","max","large","StyledModal","div","withConfig","displayName","componentId","StyledModalButtons","StyledModalContainer","_ref","$compact","_ref2","$placement","_ref3","$width","StyledModalBody","StyledModalFooter","xxl","gray15","_ref4","$noSideSpacing","_ref5","_ref6","$isOverflowingY","gray85","StyledModalFooterSummary","StyledModalContent","_ref7","_ref7$$compact","StyledModalFooterNotation","StyledModalHeader","gray10","_ref8","$isBodyScrolled","_ref9","spacings","concat","StyledModalHeading","_ref0","_ref1","_ref10","StyledModalCancel","StyledModalScrim","StyledModalWarningIcon","yellow40","gray98"],"sources":["../../src/Modal/Modal.styles.ts"],"sourcesContent":["import { Warning } from '@procore/core-icons'\nimport styled, { css } from 'styled-components'\nimport { Card } from '../Card/Card'\nimport { StyledSection, StyledSectionInner } from '../Section/Section.styles'\nimport { Typography } from '../Typography/Typography'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\nimport type { ModalPlacement, ModalWidth } from './Modal.types'\n\nexport const fadeInClassName = 'fade-in'\nexport const fadeOutClassName = 'fade-out'\nexport const modalMaxWidth = '640px'\nexport const modalPixelGutter = spacing.xl\nexport const modalPixelWidths = {\n sm: 432,\n md: 688,\n lg: 1152,\n xl: 1920,\n}\n\nconst compactModalFullscreenMaxHeight = 940\nconst screenWidthPixelBreakpoints = {\n mobile: {\n small: {\n min: 0,\n max: 439,\n },\n large: {\n min: 440,\n max: 767,\n },\n },\n}\n\nexport const StyledModal = styled.div`\n display: flex;\n height: 100vh;\n position: absolute;\n opacity: 0;\n transition: 0.3s opacity ease;\n width: 100vw;\n z-index: 0;\n pointer-events: none;\n\n &.${fadeInClassName} {\n opacity: 1;\n pointer-events: auto;\n }\n\n &.${fadeOutClassName} {\n opacity: 0;\n pointer-events: none;\n }\n`\n\nexport const StyledModalButtons = styled.div`\n display: flex;\n flex: 0 0 auto;\n margin-left: ${spacing.lg}px;\n\n > * + * {\n margin-left: ${spacing.sm}px;\n }\n`\n\nexport const StyledModalContainer = styled(Card)<{\n $compact: boolean\n $placement: ModalPlacement\n $width?: ModalWidth\n}>`\n display: flex;\n flex-direction: row;\n position: absolute;\n z-index: 2;\n\n ${({ $compact }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n @media (max-width: ${screenWidthPixelBreakpoints.mobile.small\n .max}px) and (max-height: ${compactModalFullscreenMaxHeight}px) {\n border-radius: 0;\n height: 100vh;\n width: 100vw;\n }\n @media (min-width: ${screenWidthPixelBreakpoints.mobile.large\n .min}px) and (max-width: ${screenWidthPixelBreakpoints.mobile.large\n .max}px) {\n max-height: calc(100vh - 24px);\n width: 416px;\n }\n @media (min-height: ${compactModalFullscreenMaxHeight + 1}px) {\n height: 916px;\n max-width: 100vw;\n }\n `\n }}\n\n ${({ $placement }) => {\n if ($placement === 'top') {\n return css`\n top: 5vh;\n `\n }\n\n return css`\n top: 50vh;\n transform: translateY(-50%);\n `\n }}\n\n ${({ $width, $placement }) => {\n if ($width) {\n return css`\n left: ${modalPixelGutter}px;\n right: ${modalPixelGutter}px;\n margin-left: auto;\n margin-right: auto;\n max-width: ${modalPixelWidths[$width]}px;\n\n // TODO deprecated, moving width up. delete line in breaking change\n ${StyledModalBody} {\n max-width: none;\n }\n `\n }\n // TODO deprecated, uses new centering, required width\n return css`\n left: 50vw;\n transform: translateX(-50%)\n ${$placement === 'center' && 'translateY(-50%)'};\n `\n }}\n`\n\nexport const StyledModalFooter = styled.div`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n justify-content: flex-end;\n padding: ${spacing.xl}px ${spacing.xxl}px ${spacing.xxl}px;\n`\n\nexport const StyledModalBody = styled.div<{\n $compact: boolean\n $isOverflowingY: boolean\n $noSideSpacing: boolean\n}>`\n ${getTypographyIntent('body')}\n\n &:focus-visible {\n ${getFocus()}\n }\n\n box-sizing: border-box;\n color: ${colors.gray15};\n display: flex;\n flex-direction: column;\n overflow: auto;\n ${({ $noSideSpacing }) => {\n return css`\n padding: ${spacing.xl}px ${$noSideSpacing ? 0 : spacing.xxl}px;\n `\n }}\n\n ${({ $compact }) => {\n if (!$compact) {\n // TODO deprecated, moving width up. delete line in breaking change\n return css`\n max-width: ${modalMaxWidth};\n `\n }\n\n return css`\n padding: 8px 16px;\n `\n }}\n\n > ${StyledSection} {\n padding-left: 0;\n padding-right: 0;\n\n &:first-child > ${StyledSectionInner} {\n padding-top: 0;\n }\n }\n\n ${({ $isOverflowingY }) =>\n $isOverflowingY &&\n css`\n & + ${StyledModalFooter} {\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: ${colors.gray85};\n ${StyledModalFooterSummary} {\n border-top: none;\n }\n }\n `}\n`\n\nexport const StyledModalContent = styled.div<{ $compact?: boolean }>`\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n width: 100%;\n\n ${({ $compact = false }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n max-height: unset;\n `\n }}\n`\n\nexport const StyledModalFooterNotation = styled(Typography)`\n flex-grow: 1;\n`\n\nexport const StyledModalHeader = styled.div<{\n $compact: boolean\n $isBodyScrolled: boolean\n}>`\n align-items: flex-start;\n color: ${colors.gray10};\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${({ $compact, $isBodyScrolled }) => {\n if ($compact) {\n return css`\n border-bottom: 1px solid ${colors.gray85};\n `\n }\n\n return css`\n border-bottom: 1px solid\n ${$isBodyScrolled ? colors.gray85 : 'transparent'};\n `\n }}\n\n ${({ $compact }) => {\n let spacings = `${spacing.xl}px ${spacing.xxl}px`\n\n if ($compact) {\n spacings = `${spacing.md}px ${spacing.lg}px`\n }\n\n return css`\n padding: ${spacings};\n `\n }}\n`\n\nexport const StyledModalHeading = styled.div<{ $compact: boolean }>`\n ${({ $compact }) => getTypographyIntent($compact ? 'h3' : 'h2')}\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n min-height: 36px;\n padding-right: ${({ $compact }) => ($compact ? 36 : spacing.lg)}px;\n\n ${({ $compact }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n min-height: unset;\n `\n }}\n`\n\nexport const StyledModalCancel = styled.div`\n flex: 0 0 auto;\n`\n\nexport const StyledModalScrim = styled.div`\n background: hsla(200, 8%, 10%, 0.6);\n height: 100vh;\n left: 0;\n position: absolute;\n top: 0;\n width: 100vw;\n z-index: 1;\n`\n\nexport const StyledModalWarningIcon = styled(Warning)`\n color: ${colors.yellow40};\n margin-right: ${spacing.sm}px;\n`\nexport const StyledModalFooterSummary = styled.div`\n ${getTypographyIntent('small')}\n border-top: 1px solid ${colors.gray85};\n border-bottom: 1px solid ${colors.gray85};\n padding: ${spacing.md}px ${spacing.xxl}px;\n color: ${colors.gray15};\n font-style: italic;\n background-color: ${colors.gray98};\n margin: -${spacing.xl}px -${spacing.xxl}px ${spacing.xl}px -${spacing.xxl}px;\n flex: 1 1 100%;\n`\n"],"mappings":"AAAA,SAASA,OAAO,QA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iBAAiB,gBAAGjE,MAAM,CAAC2B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sBAE1C;AAED,OAAO,IAAMoC,gBAAgB,gBAAGlE,MAAM,CAAC2B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0GAQzC;AAED,OAAO,IAAMqC,sBAAsB,gBAAGnE,MAAM,CAACD,OAAO,CAAC,CAAA6B,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wCAC1CvB,MAAM,CAAC6D,QAAQ,EACR3D,OAAO,CAACO,EAAE,CAC3B;AACD,OAAO,IAAMiC,wBAAwB,gBAAGjD,MAAM,CAAC2B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kMAC9CxB,mBAAmB,CAAC,OAAO,CAAC,EACNC,MAAM,CAACyC,MAAM,EACVzC,MAAM,CAACyC,MAAM,EAC7BvC,OAAO,CAACQ,EAAE,EAAMR,OAAO,CAACgC,GAAG,EAC7BlC,MAAM,CAACmC,MAAM,EAEFnC,MAAM,CAAC8D,MAAM,EACtB5D,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACgC,GAAG,EAAMhC,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACgC,GAAG,CAE1E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Props } from '../_utils/types';
|
|
3
3
|
export declare type ModalPlacement = 'top' | 'center';
|
|
4
4
|
export declare type ModalWidth = 'sm' | 'md' | 'lg' | 'xl';
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ export interface ModalCloseContextApi {
|
|
|
18
18
|
howToClose: ModalOptionalCloseStartegy[] | undefined;
|
|
19
19
|
onClose: ModalOnClose | undefined;
|
|
20
20
|
}
|
|
21
|
-
export interface ModalCloseableHeaderProps extends
|
|
21
|
+
export interface ModalCloseableHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
22
22
|
/**
|
|
23
23
|
* @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY
|
|
24
24
|
* @defaultValue false
|
|
@@ -33,12 +33,14 @@ export interface ModalProps extends Props {
|
|
|
33
33
|
'aria-describedby'?: string;
|
|
34
34
|
'aria-details'?: string;
|
|
35
35
|
/**
|
|
36
|
-
* @a11y `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.
|
|
36
|
+
* @a11y Automatially created when using `Modal.Heading`. The `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.
|
|
37
37
|
* @since 11.12.0
|
|
38
38
|
*/
|
|
39
39
|
'aria-labelledby'?: string;
|
|
40
40
|
/**
|
|
41
41
|
* @a11y `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.
|
|
42
|
+
* If using an `aria-label` instead of a node, be sure give the modal an `id` so
|
|
43
|
+
* other regions can reference it.
|
|
42
44
|
* @since 11.12.0
|
|
43
45
|
*/
|
|
44
46
|
'aria-label'?: string;
|
|
@@ -143,7 +145,7 @@ export interface ModalCloseableHeaderProps extends Props {
|
|
|
143
145
|
closeButton?: string;
|
|
144
146
|
};
|
|
145
147
|
}
|
|
146
|
-
export interface ModalBodyProps extends
|
|
148
|
+
export interface ModalBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
147
149
|
/**
|
|
148
150
|
* @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY
|
|
149
151
|
* @defaultValue false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.types.js","names":[],"sources":["../../src/Modal/Modal.types.ts"],"sourcesContent":["import type React from 'react'\nimport type {
|
|
1
|
+
{"version":3,"file":"Modal.types.js","names":[],"sources":["../../src/Modal/Modal.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { Props } from '../_utils/types'\n\nexport type ModalPlacement = 'top' | 'center'\nexport type ModalWidth = 'sm' | 'md' | 'lg' | 'xl'\n\n/**\n * Additional UI/UX to dismiss. (In addition to the Esc key)\n * - `x` Close Button in the Modal Header\n * - `scrim` Overlay dimmed scrim\n * - `footer-button` Cancel Button in the Modal Footer Actions\n */\nexport type ModalOptionalCloseStartegy = 'x' | 'footer-button' | 'scrim'\ntype ModalCloseStragety = 'esc' | ModalOptionalCloseStartegy\n\ntype ModalOnClose = (\n event: // clicked scrim\n | React.MouseEvent<HTMLDivElement>\n // clicked x button\n | React.MouseEvent<HTMLButtonElement>\n // pressed escape key\n | React.KeyboardEvent<HTMLElement>,\n how: ModalCloseStragety\n) => void\n\nexport interface ModalCloseContextApi {\n /**\n * Escape key will always close a dialog. This adds additional UI or UX to close.\n */\n howToClose: ModalOptionalCloseStartegy[] | undefined\n onClose: ModalOnClose | undefined\n}\n\nexport interface ModalCloseableHeaderProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n qa?: { closeButton?: string }\n}\n\nexport interface ModalProps extends Props {\n 'aria-describedby'?: string\n 'aria-details'?: string\n /**\n * @a11y Automatially created when using `Modal.Heading`. The `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.\n * @since 11.12.0\n */\n 'aria-labelledby'?: string\n /**\n * @a11y `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.\n * If using an `aria-label` instead of a node, be sure give the modal an `id` so\n * other regions can reference it.\n * @since 11.12.0\n */\n 'aria-label'?: string\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n /**\n * This adds additional UI or UX to close. Escape key will always close a dialog, see `onClose`.\n *\n * NOTE 'footer-button': Footer Cancel button still requires at least a rendered self closing `Modal.FooterButtons`.\n *\n * NOTE 'x': The X button still requires a rendered `Modal.Header` component.\n * @defaultValue []\n * @since 11.12.0\n */\n howToClose?: ModalOptionalCloseStartegy[]\n /**\n * Aligns with `role` and `ref` location.\n */\n id?: string\n /**\n * Callback for clicking the overlay\n * @since 10.19.0\n */\n onClickOverlay?: (event: React.MouseEvent<HTMLDivElement>) => void\n /**\n * When a user closes the Modal by some approved `howToClose` method or the Escape key. This also opts-in to dialog focus management.\n * @a11y Future default! Moves focus into and cycles focus in the Modal, and returning focus\n * to the trigger when closed. Also enables the Escape key to close the Modal.\n * @since 11.6.0\n */\n onClose?: ModalOnClose\n /**\n * Modal open state\n * @defaultValue false\n * @since 10.19.0\n */\n open?: boolean\n /**\n * Enable dialog props. REQUIRES `onClose` to enable Escape key and focus management. MUST be labelled, prefer `aria-labelledby` over `aria-label`.\n */\n role?: 'dialog'\n /**\n * Vertical placement of the modal.\n * Positioning modal at the top ensures that variable height modal won't shift position during content loading,\n * providing a more stable user experience.\n * @defaultValue center\n * @since 10.19.0\n */\n placement?: ModalPlacement\n /**\n * Sets a width on the container and uses next centering.\n * Future will default to `md`\n * @since 10.19.0\n */\n width?: ModalWidth\n}\n\nexport interface ModalContainerProps extends Props {\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n /**\n * @since 10.19.0\n */\n placement: ModalPlacement\n /**\n * @since 10.19.0\n */\n width?: ModalWidth\n}\n\nexport interface ConfirmModalProps extends Omit<ModalProps, 'onClose'> {\n /**\n * Headline message\n * @since 10.19.0\n */\n headline?: string\n\n /**\n * The dismiss onClick callback\n * @since 10.19.0\n */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void\n}\n\n/**\n * NOTE: Using howToClose 'x' requires the `Modal.Header` component.\n * @a11y This component is a not semantic heading! For that, see `Modal.Heading`.\n */\nexport interface ModalCloseableHeaderProps extends Props {\n /**\n * @since 10.19.0\n */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void\n /**\n * @since 10.19.0\n */\n qa?: { closeButton?: string }\n}\n\nexport interface ModalBodyProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n /**\n * Removes left, right paddings from the modal body when true\n * @defaultValue false\n * @since 10.19.0\n */\n noSideSpacing?: boolean\n}\n"],"mappings":""}
|
|
@@ -11,9 +11,9 @@ export declare const StyledMultiSelectClearIcon: import("styled-components/dist/
|
|
|
11
11
|
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
|
|
12
12
|
export declare const StyledMultiSelectArrowContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
13
|
export declare const StyledMultiSelectArrow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
-
export declare const StyledMultiSelectMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("
|
|
14
|
+
export declare const StyledMultiSelectMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("react").HTMLAttributes<HTMLDivElement> & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
15
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
16
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("
|
|
16
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
17
17
|
export declare const StyledMultiSelectButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$disabled" | "$loading" | "$block" | "$error" | "$open" | "$placeholder" | "$hasClearIcon"> & {
|
|
18
18
|
$block: boolean;
|
|
19
19
|
$disabled: boolean;
|