@procore/core-react 12.17.5 → 12.17.7
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/babel.config.js +4 -1
- package/dist/AnchorNavigation/AnchorNavigation.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/AnchorNavigation/AnchorNavigationProvider.js +5 -5
- package/dist/AnchorNavigation/AnchorNavigationProvider.js.map +1 -1
- package/dist/Avatar/Avatar.js +10 -11
- package/dist/Avatar/Avatar.js.map +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.js +14 -14
- package/dist/AvatarStack/AvatarStack.js.map +1 -1
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.js +1 -1
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.js +44 -14
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.d.ts +1 -1
- package/dist/Banner/Banner.styles.js +15 -15
- package/dist/Banner/Banner.styles.js.map +1 -1
- package/dist/Box/Box.js +3 -3
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +9 -9
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.js +7 -7
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Button.styles.d.ts +1 -0
- package/dist/Button/Button.styles.js +7 -7
- package/dist/Button/Button.styles.js.map +1 -1
- package/dist/Button/Button.types.d.ts +4 -0
- package/dist/Button/Button.types.js.map +1 -1
- package/dist/Calendar/Calendar.js +4 -4
- package/dist/Calendar/Calendar.js.map +1 -1
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.js +3 -3
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.js +9 -9
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +2 -2
- package/dist/CheckboxGroup/CheckboxGroup.js +8 -8
- package/dist/ClickOutside/ClickOutside.js +3 -3
- package/dist/ContactItem/ContactItem.js +3 -3
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js +11 -11
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.js +10 -10
- package/dist/DateSelect/DateSelect.js +8 -8
- package/dist/DateSelect/DateSelect.js.map +1 -1
- package/dist/DetailPage/DetailPage.js +3 -3
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/DetailPage/examples/TableExample.js +5 -5
- package/dist/DetailPageTemplate/DetailPageTemplate.js +3 -3
- package/dist/Dropdown/Dropdown.js +8 -8
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.helpers.js +14 -14
- package/dist/DropdownFlyout/DropdownFlyout.js +8 -8
- package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.hooks.js +17 -18
- package/dist/Dropzone/Dropzone.hooks.js.map +1 -1
- package/dist/Dropzone/Dropzone.js +19 -21
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.js +3 -3
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.js +3 -3
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorer.js.map +1 -1
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerModal.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js +5 -5
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js.map +1 -1
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileExplorer/useSidebarNavigation.js +8 -8
- package/dist/FileSelect/FileSelect.js +21 -21
- package/dist/FileSelect/FileSelect.js.map +1 -1
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.js +5 -5
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.js.map +1 -1
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.js +8 -8
- package/dist/FileSelect/FileTokenList/FileTokenList.js.map +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.js +20 -20
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.js +19 -19
- package/dist/FileSelect/LocalSource/LocalSource.js.map +1 -1
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/ProgressAnnouncer/ProgressAnnouncer.js +11 -11
- package/dist/FileSelect/SourceItem/SourceItem.js +3 -3
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js +8 -8
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js.map +1 -1
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.js +21 -21
- package/dist/FileSelect/TreeSource/TreeSource.js.map +1 -1
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileSelect/storyHelpers.js +4 -4
- package/dist/FileSelect/storyHelpers.js.map +1 -1
- package/dist/FileToken/FileToken.js +8 -8
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.js +25 -35
- package/dist/FilterToken/FilterToken.js.map +1 -1
- package/dist/FilterToken/FilterToken.styles.d.ts +5 -0
- package/dist/FilterToken/FilterToken.styles.js +18 -2
- package/dist/FilterToken/FilterToken.styles.js.map +1 -1
- package/dist/Flex/Flex.js +3 -3
- package/dist/FlexList/FlexList.js +3 -3
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +22 -18
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/FormFieldTooltip.js +1 -1
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/Form/stories/util.js +9 -9
- package/dist/Form/stories/util.js.map +1 -1
- package/dist/GhostPlaceholder/GhostPlaceholder.js +3 -3
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.js +3 -3
- package/dist/Grid/Grid.styles.js +3 -3
- package/dist/Grid/Grid.utils.js +5 -5
- package/dist/GroupSelect/GroupSelect.js +17 -17
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.js +3 -3
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.js +3 -3
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.js +3 -3
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.js +3 -3
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/Menu/Menu.js +15 -15
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.js +15 -15
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/MenuImperative/sensors.js +8 -8
- package/dist/MenuImperative/sensors.js.map +1 -1
- package/dist/Modal/ChildRegistry.context.js +11 -11
- package/dist/Modal/Modal.js +8 -8
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/Modal/Modal.types.d.ts +3 -1
- package/dist/Modal/Modal.types.js.map +1 -1
- package/dist/Modal/storyHelpers.js +7 -7
- package/dist/MultiSelect/MultiSelect.js +17 -17
- package/dist/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.js +14 -14
- package/dist/NextMenu/NextMenu.js.map +1 -1
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextMenu/NextMenuItem.js +3 -3
- package/dist/NextMenu/sampleData.js +7 -6
- package/dist/NextMenu/sampleData.js.map +1 -1
- package/dist/NextTile/NextTile.js +9 -9
- package/dist/Notation/Notation.js +4 -4
- package/dist/NumberInput/NumberInput.hooks.js +5 -5
- package/dist/NumberInput/NumberInput.js +14 -14
- package/dist/NumberInput/NumberInput.js.map +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/NumberInput/NumberInput.utils.js +11 -11
- package/dist/Overlay/Overlay.js.map +1 -1
- package/dist/Overlay/OverlayArrow.js +4 -4
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.js +15 -15
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/OverlayTrigger/a11yPresets.js +6 -6
- package/dist/OverlayTrigger/a11yPresets.js.map +1 -1
- package/dist/PageFooterTemplate/PageFooterTemplate.js +3 -3
- package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.js +3 -3
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageHeaderTemplate/PageHeaderTemplate.utils.js +5 -5
- package/dist/PageLayout/PageLayout.js +15 -15
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate.js +3 -3
- package/dist/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/PageTemplate/PageTemplateCard.js +3 -3
- package/dist/Pagination/Pagination.js +3 -3
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Pagination/PaginationSelect.js +3 -3
- package/dist/Panel/Panel.js +8 -8
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.js +3 -3
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.js +8 -8
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.js +9 -9
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.js +3 -3
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/ProgressBar/ProgressBar.js +10 -8
- package/dist/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/ProgressBar/ProgressBar.types.js.map +1 -1
- package/dist/RadioButton/RadioButton.js +3 -3
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.hooks.js +5 -5
- package/dist/Search/Search.js +3 -3
- package/dist/Search/Search.js.map +1 -1
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.js +15 -16
- package/dist/Section/Section.js.map +1 -1
- package/dist/Section/Section.styles.js +7 -7
- package/dist/Section/Section.styles.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.js +14 -14
- package/dist/SegmentedController/SegmentedController.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +8 -8
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.js +3 -3
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/SettingsPage/SettingsPage.js +3 -3
- package/dist/SettingsPageTemplate/SettingsPageTemplate.js +3 -3
- package/dist/Slider/Slider.js +8 -8
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.js +3 -3
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.context.js +5 -5
- package/dist/SplitViewCard/SplitViewCard.context.js.map +1 -1
- package/dist/SplitViewCard/SplitViewCard.js +8 -8
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.js +7 -7
- package/dist/SuperSelect/SuperSelect.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/SuperSelect.utils.js +15 -16
- package/dist/SuperSelect/SuperSelect.utils.js.map +1 -1
- package/dist/SuperSelect/presets/contactsPreset.js +3 -3
- package/dist/SuperSelect/presets/contactsPreset.js.map +1 -1
- package/dist/SuperSelect/presets/filterPreset.js +1 -1
- package/dist/SuperSelect/presets/filterPreset.js.map +1 -1
- package/dist/SuperSelect/presets/pillPreset.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.js +14 -14
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.js +3 -3
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.js +9 -9
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.js +3 -3
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.js +17 -17
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.js +11 -11
- package/dist/Tearsheet/Tearsheet.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.js +3 -3
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.js +17 -17
- package/dist/TextEditorOutput/TextEditorOutput.js +9 -9
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +8 -0
- package/dist/Thumbnail/Thumbnail.hooks.js +8 -8
- package/dist/Thumbnail/Thumbnail.js +9 -9
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/Thumbnail.utils.js +11 -12
- package/dist/Thumbnail/Thumbnail.utils.js.map +1 -1
- package/dist/Thumbnail/ThumbnailCaption.js +3 -3
- package/dist/Thumbnail/ThumbnailDocumentIcon.js +7 -8
- package/dist/Thumbnail/ThumbnailDocumentIcon.js.map +1 -1
- package/dist/Thumbnail/ThumbnailPreview.js +5 -5
- package/dist/ThumbnailGrid/ThumbnailGrid.hooks.js +5 -5
- package/dist/ThumbnailGrid/ThumbnailGrid.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredDropdown/TieredDropdown.js +14 -14
- package/dist/TieredDropdown/TieredDropdown.js.map +1 -1
- package/dist/TieredDropdown/useSearch.js +5 -5
- package/dist/TieredSelect/LeafSelectionTieredSelect.js +8 -8
- package/dist/TieredSelect/LeafSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TierSelectionTieredSelect.js +17 -17
- package/dist/TieredSelect/TierSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.js +8 -8
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/TieredSelectMenu.js +17 -17
- package/dist/TieredSelect/TieredSelectMenu.js.map +1 -1
- package/dist/Tile/Tile.js +3 -3
- package/dist/Tile/Tile.js.map +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.js +3 -3
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.js +4 -4
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.js +4 -4
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ActionIcon.js +3 -3
- package/dist/ToolHeader/ActionIcon.types.example.js.map +1 -1
- package/dist/ToolHeader/ToolHeader.js +9 -9
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.js +3 -3
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js +3 -3
- package/dist/Tooltip/Tooltip.js +8 -8
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.hooks.js +14 -14
- package/dist/Tree/Tree.hooks.js.map +1 -1
- package/dist/Tree/Tree.js +14 -14
- package/dist/Tree/Tree.js.map +1 -1
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Tree/Tree.styles.js.map +1 -1
- package/dist/Typeahead/Typeahead.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/Anchor.js +19 -16
- package/dist/_hooks/Anchor.js.map +1 -1
- package/dist/_hooks/Buffer.js +8 -7
- package/dist/_hooks/Buffer.js.map +1 -1
- package/dist/_hooks/ClickOutside.js +2 -1
- package/dist/_hooks/ClickOutside.js.map +1 -1
- package/dist/_hooks/DateTime/DateTime.js +17 -17
- package/dist/_hooks/DelayedCallback.js +1 -1
- package/dist/_hooks/DelayedToggle.js +7 -2
- package/dist/_hooks/DelayedToggle.js.map +1 -1
- package/dist/_hooks/Deprecation.js +1 -0
- package/dist/_hooks/Deprecation.js.map +1 -1
- package/dist/_hooks/EventListener.js +5 -5
- package/dist/_hooks/FocusScopeOverride.js +6 -6
- package/dist/_hooks/FocusScopeOverride.js.map +1 -1
- package/dist/_hooks/Hotkey.js +2 -2
- package/dist/_hooks/Hotkey.js.map +1 -1
- package/dist/_hooks/I18n.js +13 -13
- package/dist/_hooks/InjectedScript.js +8 -7
- package/dist/_hooks/InjectedScript.js.map +1 -1
- package/dist/_hooks/IntersectionObserver/useIntersectionObserver.js +5 -5
- package/dist/_hooks/ListNavigation.js +9 -7
- package/dist/_hooks/ListNavigation.js.map +1 -1
- package/dist/_hooks/OverflowObserver/OverflowObserver.js +6 -6
- package/dist/_hooks/ResizeObserver.js +5 -5
- package/dist/_hooks/TextEntry.js +5 -2
- package/dist/_hooks/TextEntry.js.map +1 -1
- package/dist/_hooks/Timer.js +1 -0
- package/dist/_hooks/Timer.js.map +1 -1
- package/dist/_hooks/Trigger.js +19 -13
- package/dist/_hooks/Trigger.js.map +1 -1
- package/dist/_hooks/Visibility.js +9 -7
- package/dist/_hooks/Visibility.js.map +1 -1
- package/dist/_hooks/ZIndex.js +7 -7
- package/dist/_hooks/getI18nProviderLocale.js +2 -1
- package/dist/_hooks/getI18nProviderLocale.js.map +1 -1
- package/dist/_hooks/useCurrentMedia.js +5 -5
- package/dist/_hooks/useFileUploader.js +15 -15
- package/dist/_hooks/useFileUploader.js.map +1 -1
- package/dist/_hooks/useFocusWithin.js +5 -5
- package/dist/_hooks/useMediaLessThan.js +5 -5
- package/dist/_hooks/useSet.js +5 -5
- package/dist/_styles/colors.js +6 -6
- package/dist/_styles/spacing.d.ts +27 -0
- package/dist/_styles/spacing.js +27 -0
- package/dist/_styles/spacing.js.map +1 -1
- 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 +24 -16
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +43 -39
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
- package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +745 -745
- 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 +4 -4
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +50 -50
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +34 -30
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +19 -19
- 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 +12 -12
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- 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 +11 -11
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +6 -6
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +48 -44
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +4 -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/_typedoc/deprecations.json +1 -1
- package/dist/_utils/TinyMCE.js +4 -4
- package/dist/_utils/TinyMCE.js.map +1 -1
- package/dist/_utils/closeWithConfirm.js +5 -5
- package/dist/_utils/closeWithConfirm.js.map +1 -1
- package/dist/_utils/dateTime.js +6 -6
- package/dist/_utils/dateTime.js.map +1 -1
- package/dist/_utils/getAnchorPosition.js +11 -11
- package/dist/_utils/getAnchorPosition.js.map +1 -1
- package/dist/_utils/partition.js +5 -5
- package/dist/_utils/runInQueue.js +4 -4
- package/dist/_utils/runInQueue.js.map +1 -1
- package/dist/_utils/slotify.js +7 -7
- package/dist/_utils/triggerListeners.js +6 -6
- package/package.json +5 -4
- package/tsconfig.prod.json +2 -1
- package/tsconfig.test.json +1 -1
package/dist/Banner/Banner.js
CHANGED
|
@@ -12,27 +12,42 @@ var _excluded = ["children", "variant"],
|
|
|
12
12
|
_excluded12 = ["children"],
|
|
13
13
|
_excluded13 = ["children"],
|
|
14
14
|
_excluded14 = ["children", "variant"];
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
16
|
-
function _slicedToArray(
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
17
17
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
-
function _unsupportedIterableToArray(
|
|
19
|
-
function _arrayLikeToArray(
|
|
20
|
-
function _iterableToArrayLimit(
|
|
21
|
-
function _arrayWithHoles(
|
|
22
|
-
function _objectWithoutProperties(
|
|
23
|
-
function _objectWithoutPropertiesLoose(
|
|
18
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
19
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
21
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
24
24
|
import { Clear, EllipsisVertical, Error, Info, Warning } from '@procore/core-icons/dist';
|
|
25
25
|
import { partition } from 'ramda';
|
|
26
26
|
import React from 'react';
|
|
27
|
-
import { Button } from '../Button
|
|
28
|
-
import { Card } from '../Card
|
|
27
|
+
import { Button } from '../Button';
|
|
28
|
+
import { Card } from '../Card';
|
|
29
|
+
import { Flex } from '../Flex';
|
|
29
30
|
import { Menu, useMenu } from '../Menu/Menu';
|
|
30
|
-
import { OverlayTrigger } from '../OverlayTrigger
|
|
31
|
+
import { OverlayTrigger } from '../OverlayTrigger';
|
|
31
32
|
import { useI18nContext } from '../_hooks/I18n';
|
|
32
33
|
import { OverflowObserver } from '../_hooks/OverflowObserver';
|
|
33
34
|
import { addSubcomponents } from '../_utils/addSubcomponents';
|
|
34
35
|
import { mergeRefs } from '../_utils/mergeRefs';
|
|
35
36
|
import { StyledAction, StyledActionsTrigger, StyledBannerContainer, StyledBody, StyledContent, StyledExpandableContent, StyledExpandableContentContainer, StyledIconContainer, StyledMiniBannerContainer, StyledTitle } from './Banner.styles';
|
|
37
|
+
var defaultIcons = {
|
|
38
|
+
error: /*#__PURE__*/React.createElement(Error, {
|
|
39
|
+
size: "lg"
|
|
40
|
+
}),
|
|
41
|
+
attention: /*#__PURE__*/React.createElement(Warning, {
|
|
42
|
+
size: "lg"
|
|
43
|
+
}),
|
|
44
|
+
info: /*#__PURE__*/React.createElement(Info, {
|
|
45
|
+
size: "lg"
|
|
46
|
+
}),
|
|
47
|
+
UNSAFE_attention_emphasized: /*#__PURE__*/React.createElement(Warning, {
|
|
48
|
+
size: "lg"
|
|
49
|
+
})
|
|
50
|
+
};
|
|
36
51
|
var Banner_ = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
37
52
|
var children = _ref.children,
|
|
38
53
|
variant = _ref.variant,
|
|
@@ -44,14 +59,30 @@ var Banner_ = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
|
44
59
|
expandableContentNodes = _ref3[0],
|
|
45
60
|
content = _ref3[1];
|
|
46
61
|
var isExpandable = expandableContentNodes.length !== 0;
|
|
62
|
+
var iconElement = React.useMemo(function () {
|
|
63
|
+
return React.Children.toArray(children).find(function (child) {
|
|
64
|
+
return /*#__PURE__*/React.isValidElement(child) && child.type === Icon;
|
|
65
|
+
});
|
|
66
|
+
}, [children]);
|
|
67
|
+
var hasCustomIcon = iconElement && iconElement.props.icon;
|
|
47
68
|
return /*#__PURE__*/React.createElement(StyledBannerContainer, _extends({
|
|
48
69
|
ref: ref,
|
|
49
70
|
$isExpandable: isExpandable,
|
|
50
71
|
variant: variant
|
|
51
72
|
}, props), isExpandable ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledExpandableContentContainer, {
|
|
52
73
|
justifyContent: "space-between",
|
|
53
|
-
alignItems: "center"
|
|
54
|
-
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
gap: "lg"
|
|
76
|
+
}, !hasCustomIcon && /*#__PURE__*/React.createElement(Icon, {
|
|
77
|
+
icon: defaultIcons[variant]
|
|
78
|
+
}), content), expandableContentNodes) : /*#__PURE__*/React.createElement(Flex, {
|
|
79
|
+
justifyContent: "flex-start",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
gap: "lg",
|
|
82
|
+
grow: "1"
|
|
83
|
+
}, !hasCustomIcon && /*#__PURE__*/React.createElement(Icon, {
|
|
84
|
+
icon: defaultIcons[variant]
|
|
85
|
+
}), content));
|
|
55
86
|
});
|
|
56
87
|
var Content = /*#__PURE__*/React.forwardRef(function Content(_ref4, ref) {
|
|
57
88
|
var children = _ref4.children,
|
|
@@ -206,7 +237,6 @@ export var AttentionBanner = /*#__PURE__*/React.forwardRef(function AttentionBan
|
|
|
206
237
|
})
|
|
207
238
|
}), children);
|
|
208
239
|
});
|
|
209
|
-
|
|
210
240
|
/**
|
|
211
241
|
* @deprecated ActionBanner was renamed to AttentionBanner.
|
|
212
242
|
* @deprecatedSince 11.26.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","names":["Clear","EllipsisVertical","Error","Info","Warning","partition","React","Button","Card","Menu","useMenu","OverlayTrigger","useI18nContext","OverflowObserver","addSubcomponents","mergeRefs","StyledAction","StyledActionsTrigger","StyledBannerContainer","StyledBody","StyledContent","StyledExpandableContent","StyledExpandableContentContainer","StyledIconContainer","StyledMiniBannerContainer","StyledTitle","Banner_","forwardRef","Banner","_ref","ref","children","variant","props","_objectWithoutProperties","_excluded","_ref2","element","isValidElement","type","ExpandableContent","Children","toArray","_ref3","_slicedToArray","expandableContentNodes","content","isExpandable","length","createElement","_extends","$isExpandable","Fragment","justifyContent","alignItems","Content","_ref4","_excluded2","_ref5","_ref5$expanded","expanded","_ref5$expandableConte","expandableContentMaxHeight","_excluded3","containerRef","useRef","_ref6","overflowRef","isOverflowingY","onAnimationEnd","current","$isOverflowingY","$expandableContentMaxHeight","tabIndex","Title","_ref7","_excluded4","Body","_ref8","_excluded5","Action","_ref9","_excluded6","DropdownAction","_ref10","_excluded7","Item","item","Actions","_ref11","_excluded8","actionButtons","filter","overlay","node","focus","usingHook","isSelectable","_ref12","Options","map","_ref13","idx","actionButtonProps","key","placement","arrow","icon","Icon","_ref14","_excluded9","Dismiss","_ref15","_excluded10","I18n","t","ErrorBanner","_ref16","_excluded11","size","InfoBanner","_ref17","_excluded12","AttentionBanner","_ref18","_excluded13","ActionBanner","UNSAFE_MiniBanner","MiniBanner","_ref19","_ref19$variant","_excluded14","displayName"],"sources":["../../src/Banner/Banner.tsx"],"sourcesContent":["import {\n Clear,\n EllipsisVertical,\n Error,\n Info,\n Warning,\n} from '@procore/core-icons/dist'\nimport { partition } from 'ramda'\nimport React from 'react'\nimport { Button } from '../Button/Button'\nimport { Card } from '../Card/Card'\nimport { Menu, useMenu } from '../Menu/Menu'\nimport { OverlayTrigger } from '../OverlayTrigger/OverlayTrigger'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { OverflowObserver } from '../_hooks/OverflowObserver'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { ButtonAttributes, DivAttributes, Props } from '../_utils/types'\nimport {\n StyledAction,\n StyledActionsTrigger,\n StyledBannerContainer,\n StyledBody,\n StyledContent,\n StyledExpandableContent,\n StyledExpandableContentContainer,\n StyledIconContainer,\n StyledMiniBannerContainer,\n StyledTitle,\n} from './Banner.styles'\nimport type {\n BannerExpandableContentProps,\n BannerIconProps,\n BannerProps,\n BannerVariant,\n} from './Banner.types'\n\nconst Banner_ = React.forwardRef<HTMLDivElement, DivAttributes & BannerProps>(\n function Banner({ children, variant, ...props }, ref) {\n const [expandableContentNodes, content] = partition(\n (element: React.ReactNode) =>\n React.isValidElement(element) && element.type === ExpandableContent,\n React.Children.toArray(children)\n ) as [React.ReactElement[], React.ReactElement[]]\n\n const isExpandable = expandableContentNodes.length !== 0\n\n return (\n <StyledBannerContainer\n ref={ref}\n $isExpandable={isExpandable}\n variant={variant}\n {...props}\n >\n {isExpandable ? (\n <>\n <StyledExpandableContentContainer\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n {content}\n </StyledExpandableContentContainer>\n {expandableContentNodes}\n </>\n ) : (\n content\n )}\n </StyledBannerContainer>\n )\n }\n)\n\nconst Content = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Content({ children, ...props }, ref) {\n return (\n <StyledContent {...props} ref={ref}>\n {children}\n </StyledContent>\n )\n }\n)\n\nconst ExpandableContent = React.forwardRef<\n HTMLDivElement,\n DivAttributes & BannerExpandableContentProps\n>(function ExpandableContent(\n { children, expanded = false, expandableContentMaxHeight = 120, ...props },\n ref\n) {\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n return expanded ? (\n <OverflowObserver>\n {({ ref: overflowRef, isOverflowingY }) => (\n <StyledExpandableContent\n ref={mergeRefs(ref, containerRef)}\n data-qa=\"core-banner-expandable-content\"\n onAnimationEnd={() => overflowRef(containerRef.current)}\n $isOverflowingY={isOverflowingY}\n $expandableContentMaxHeight={expandableContentMaxHeight}\n {...props}\n {...(isOverflowingY && { tabIndex: 0 })}\n >\n {children}\n </StyledExpandableContent>\n )}\n </OverflowObserver>\n ) : null\n})\n\nconst Title = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Title({ children, ...props }, ref) {\n return (\n <StyledTitle {...props} ref={ref}>\n {children}\n </StyledTitle>\n )\n }\n)\n\nconst Body = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Body({ children, ...props }, ref) {\n return (\n <StyledBody {...props} ref={ref}>\n {children}\n </StyledBody>\n )\n }\n)\n\nconst Action = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Action({ children, ...props }, ref) {\n return (\n <StyledAction {...props} ref={ref}>\n {children}\n </StyledAction>\n )\n }\n)\n\nconst DropdownAction = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function DropdownAction({ children, ...props }, ref) {\n return (\n <Menu.Item ref={ref} item={null} {...(props as any)}>\n {children}\n </Menu.Item>\n )\n }\n)\n\nconst Actions = React.forwardRef<HTMLButtonElement, ButtonAttributes & Props>(\n function Actions({ children, ...props }, ref) {\n const actionButtons = React.Children.toArray(children).filter(\n (element: React.ReactNode) =>\n React.isValidElement(element) && element.type === Action\n ) as React.ReactElement[]\n\n return (\n <OverlayTrigger\n overlay={\n <Card>\n <Menu\n ref={(node) => node?.focus()}\n usingHook={useMenu({\n isSelectable: ({ type }) => type === DropdownAction,\n })}\n >\n <Menu.Options>\n {actionButtons.map(({ props: actionButtonProps }, idx) => (\n <DropdownAction key={idx} {...actionButtonProps} />\n ))}\n </Menu.Options>\n </Menu>\n </Card>\n }\n ref={ref}\n placement=\"bottom-right\"\n >\n <StyledActionsTrigger\n data-qa=\"core-banner-actions-trigger\"\n variant=\"tertiary\"\n arrow={false}\n icon={<EllipsisVertical />}\n {...props}\n />\n </OverlayTrigger>\n )\n }\n)\n\nconst Icon = React.forwardRef<HTMLDivElement, DivAttributes & BannerIconProps>(\n function Icon({ children, icon, ...props }, ref) {\n return (\n <StyledIconContainer ref={ref} aria-hidden=\"true\" {...props}>\n {icon}\n </StyledIconContainer>\n )\n }\n)\n\nconst Dismiss = React.forwardRef<HTMLButtonElement, ButtonAttributes & Props>(\n function Dismiss({ children, ...props }, ref) {\n const I18n = useI18nContext()\n\n return (\n <Button\n aria-label={I18n.t('core.banner.dismissAlert')}\n ref={ref}\n {...props}\n icon={<Clear />}\n variant=\"tertiary\"\n />\n )\n }\n)\n\nexport const ErrorBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props\n>(function ErrorBanner({ children, ...props }, ref) {\n return (\n <Banner ref={ref} variant=\"error\" {...props}>\n <Icon icon={<Error size=\"lg\" />} />\n {children}\n </Banner>\n )\n})\n\nexport const InfoBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props\n>(function InfoBanner({ children, ...props }, ref) {\n return (\n <Banner ref={ref} variant=\"info\" {...props}>\n <Icon icon={<Info size=\"lg\" />} />\n {children}\n </Banner>\n )\n})\n\n/**\n * @since 11.26.0\n */\nexport const AttentionBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props\n>(function AttentionBanner({ children, ...props }, ref) {\n return (\n <Banner ref={ref} variant=\"attention\" {...props}>\n <Icon icon={<Warning size=\"lg\" />} />\n {children}\n </Banner>\n )\n})\n\n/**\n * @deprecated ActionBanner was renamed to AttentionBanner.\n * @deprecatedSince 11.26.0\n */\nexport const ActionBanner = AttentionBanner\n\nexport const UNSAFE_MiniBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props & { variant?: BannerVariant }\n>(function MiniBanner({ children, variant = 'info', ...props }, ref) {\n return (\n <StyledMiniBannerContainer ref={ref} variant={variant} {...props}>\n {children}\n </StyledMiniBannerContainer>\n )\n})\n\nBanner_.displayName = 'Banner'\n\nBody.displayName = 'Banner.Body'\n\nContent.displayName = 'Banner.Content'\n\nExpandableContent.displayName = 'Banner.ExpandableContent'\n\nTitle.displayName = 'Banner.Title'\n\nAction.displayName = 'Banner.Action'\n\nActions.displayName = 'Banner.Actions'\n\nDropdownAction.displayName = 'Banner.DropdownAction'\n\nIcon.displayName = 'Banner.Icon'\n\nDismiss.displayName = 'Banner.Dismiss'\n\nErrorBanner.displayName = 'ErrorBanner'\n\nInfoBanner.displayName = 'InfoBanner'\n\nAttentionBanner.displayName = 'AttentionBanner'\n\nActionBanner.displayName = 'ActionBanner'\n\nUNSAFE_MiniBanner.displayName = 'MiniBanner'\n\n/**\n\n\n We use banners to contextually convey complicated or supplemental information\n to a user. Depending on the type of banner, we can provide more information\n about a feature or page the user is on, an action the user needs to perform,\n or an error the user has encountered.\n\n Procore banners are informative and actionable. Always explain what the user\n needs to know (and in some cases, why they’re seeing the banner), and provide\n an actionable next step.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-banner--demo)\n\n @see [Design Guidelines](https://design.procore.com/banner)\n\n */\nexport const Banner = addSubcomponents(\n {\n Body,\n Content,\n ExpandableContent,\n Title,\n Action,\n Actions,\n Icon,\n Dismiss,\n },\n Banner_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SACEA,KAAK,EACLC,gBAAgB,EAChBC,KAAK,EACLC,IAAI,EACJC,OAAO,QACF,0BAA0B;AACjC,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,EAAEC,OAAO,QAAQ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AO,EAAPA;AACF,CAAC,EACDrF,OACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Banner.js","names":["Clear","EllipsisVertical","Error","Info","Warning","partition","React","Button","Card","Flex","Menu","useMenu","OverlayTrigger","useI18nContext","OverflowObserver","addSubcomponents","mergeRefs","StyledAction","StyledActionsTrigger","StyledBannerContainer","StyledBody","StyledContent","StyledExpandableContent","StyledExpandableContentContainer","StyledIconContainer","StyledMiniBannerContainer","StyledTitle","defaultIcons","error","createElement","size","attention","info","UNSAFE_attention_emphasized","Banner_","forwardRef","Banner","_ref","ref","children","variant","props","_objectWithoutProperties","_excluded","_ref2","element","isValidElement","type","ExpandableContent","Children","toArray","_ref3","_slicedToArray","expandableContentNodes","content","isExpandable","length","iconElement","useMemo","find","child","Icon","hasCustomIcon","icon","_extends","$isExpandable","Fragment","justifyContent","alignItems","gap","grow","Content","_ref4","_excluded2","_ref5","_ref5$expanded","expanded","_ref5$expandableConte","expandableContentMaxHeight","_excluded3","containerRef","useRef","_ref6","overflowRef","isOverflowingY","onAnimationEnd","current","$isOverflowingY","$expandableContentMaxHeight","tabIndex","Title","_ref7","_excluded4","Body","_ref8","_excluded5","Action","_ref9","_excluded6","DropdownAction","_ref10","_excluded7","Item","item","Actions","_ref11","_excluded8","actionButtons","filter","overlay","node","focus","usingHook","isSelectable","_ref12","Options","map","_ref13","idx","actionButtonProps","key","placement","arrow","_ref14","_excluded9","Dismiss","_ref15","_excluded10","I18n","t","ErrorBanner","_ref16","_excluded11","InfoBanner","_ref17","_excluded12","AttentionBanner","_ref18","_excluded13","ActionBanner","UNSAFE_MiniBanner","MiniBanner","_ref19","_ref19$variant","_excluded14","displayName"],"sources":["../../src/Banner/Banner.tsx"],"sourcesContent":["import {\n Clear,\n EllipsisVertical,\n Error,\n Info,\n Warning,\n} from '@procore/core-icons/dist'\nimport { partition } from 'ramda'\nimport React from 'react'\nimport { Button } from '../Button'\nimport { Card } from '../Card'\nimport { Flex } from '../Flex'\nimport { Menu, useMenu } from '../Menu/Menu'\nimport { OverlayTrigger } from '../OverlayTrigger'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { OverflowObserver } from '../_hooks/OverflowObserver'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { ButtonAttributes, DivAttributes, Props } from '../_utils/types'\nimport {\n StyledAction,\n StyledActionsTrigger,\n StyledBannerContainer,\n StyledBody,\n StyledContent,\n StyledExpandableContent,\n StyledExpandableContentContainer,\n StyledIconContainer,\n StyledMiniBannerContainer,\n StyledTitle,\n} from './Banner.styles'\nimport type {\n BannerExpandableContentProps,\n BannerIconProps,\n BannerProps,\n BannerVariant,\n} from './Banner.types'\n\nconst defaultIcons: Record<BannerVariant, React.ReactNode> = {\n error: <Error size=\"lg\" />,\n attention: <Warning size=\"lg\" />,\n info: <Info size=\"lg\" />,\n UNSAFE_attention_emphasized: <Warning size=\"lg\" />,\n}\n\nconst Banner_ = React.forwardRef<HTMLDivElement, DivAttributes & BannerProps>(\n function Banner({ children, variant, ...props }, ref) {\n const [expandableContentNodes, content] = partition(\n (element: React.ReactNode) =>\n React.isValidElement(element) && element.type === ExpandableContent,\n React.Children.toArray(children)\n ) as [React.ReactElement[], React.ReactElement[]]\n const isExpandable = expandableContentNodes.length !== 0\n\n const iconElement = React.useMemo(() => {\n return React.Children.toArray(children).find(\n (child) => React.isValidElement(child) && child.type === Icon\n ) as React.ReactElement<BannerIconProps> | undefined\n }, [children])\n\n const hasCustomIcon = iconElement && iconElement.props.icon\n\n return (\n <StyledBannerContainer\n ref={ref}\n $isExpandable={isExpandable}\n variant={variant}\n {...props}\n >\n {isExpandable ? (\n <>\n <StyledExpandableContentContainer\n justifyContent=\"space-between\"\n alignItems=\"center\"\n gap=\"lg\"\n >\n {!hasCustomIcon && <Icon icon={defaultIcons[variant]} />}\n {content}\n </StyledExpandableContentContainer>\n {expandableContentNodes}\n </>\n ) : (\n <Flex\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n gap=\"lg\"\n grow=\"1\"\n >\n {!hasCustomIcon && <Icon icon={defaultIcons[variant]} />}\n {content}\n </Flex>\n )}\n </StyledBannerContainer>\n )\n }\n)\n\nconst Content = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Content({ children, ...props }, ref) {\n return (\n <StyledContent {...props} ref={ref}>\n {children}\n </StyledContent>\n )\n }\n)\n\nconst ExpandableContent = React.forwardRef<\n HTMLDivElement,\n DivAttributes & BannerExpandableContentProps\n>(function ExpandableContent(\n { children, expanded = false, expandableContentMaxHeight = 120, ...props },\n ref\n) {\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n return expanded ? (\n <OverflowObserver>\n {({ ref: overflowRef, isOverflowingY }) => (\n <StyledExpandableContent\n ref={mergeRefs(ref, containerRef)}\n data-qa=\"core-banner-expandable-content\"\n onAnimationEnd={() => overflowRef(containerRef.current)}\n $isOverflowingY={isOverflowingY}\n $expandableContentMaxHeight={expandableContentMaxHeight}\n {...props}\n {...(isOverflowingY && { tabIndex: 0 })}\n >\n {children}\n </StyledExpandableContent>\n )}\n </OverflowObserver>\n ) : null\n})\n\nconst Title = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Title({ children, ...props }, ref) {\n return (\n <StyledTitle {...props} ref={ref}>\n {children}\n </StyledTitle>\n )\n }\n)\n\nconst Body = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Body({ children, ...props }, ref) {\n return (\n <StyledBody {...props} ref={ref}>\n {children}\n </StyledBody>\n )\n }\n)\n\nconst Action = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function Action({ children, ...props }, ref) {\n return (\n <StyledAction {...props} ref={ref}>\n {children}\n </StyledAction>\n )\n }\n)\n\nconst DropdownAction = React.forwardRef<HTMLDivElement, DivAttributes & Props>(\n function DropdownAction({ children, ...props }, ref) {\n return (\n <Menu.Item ref={ref} item={null} {...(props as any)}>\n {children}\n </Menu.Item>\n )\n }\n)\n\nconst Actions = React.forwardRef<HTMLButtonElement, ButtonAttributes & Props>(\n function Actions({ children, ...props }, ref) {\n const actionButtons = React.Children.toArray(children).filter(\n (element: React.ReactNode) =>\n React.isValidElement(element) && element.type === Action\n ) as React.ReactElement[]\n\n return (\n <OverlayTrigger\n overlay={\n <Card>\n <Menu\n ref={(node) => node?.focus()}\n usingHook={useMenu({\n isSelectable: ({ type }) => type === DropdownAction,\n })}\n >\n <Menu.Options>\n {actionButtons.map(({ props: actionButtonProps }, idx) => (\n <DropdownAction key={idx} {...actionButtonProps} />\n ))}\n </Menu.Options>\n </Menu>\n </Card>\n }\n ref={ref}\n placement=\"bottom-right\"\n >\n <StyledActionsTrigger\n data-qa=\"core-banner-actions-trigger\"\n variant=\"tertiary\"\n arrow={false}\n icon={<EllipsisVertical />}\n {...props}\n />\n </OverlayTrigger>\n )\n }\n)\n\nconst Icon = React.forwardRef<HTMLDivElement, DivAttributes & BannerIconProps>(\n function Icon({ children, icon, ...props }, ref) {\n return (\n <StyledIconContainer ref={ref} aria-hidden=\"true\" {...props}>\n {icon}\n </StyledIconContainer>\n )\n }\n)\n\nconst Dismiss = React.forwardRef<HTMLButtonElement, ButtonAttributes & Props>(\n function Dismiss({ children, ...props }, ref) {\n const I18n = useI18nContext()\n\n return (\n <Button\n aria-label={I18n.t('core.banner.dismissAlert')}\n ref={ref}\n {...props}\n icon={<Clear />}\n variant=\"tertiary\"\n />\n )\n }\n)\n\nexport const ErrorBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props\n>(function ErrorBanner({ children, ...props }, ref) {\n return (\n <Banner ref={ref} variant=\"error\" {...props}>\n <Icon icon={<Error size=\"lg\" />} />\n {children}\n </Banner>\n )\n})\n\nexport const InfoBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props\n>(function InfoBanner({ children, ...props }, ref) {\n return (\n <Banner ref={ref} variant=\"info\" {...props}>\n <Icon icon={<Info size=\"lg\" />} />\n {children}\n </Banner>\n )\n})\n\n/**\n * @since 11.26.0\n */\nexport const AttentionBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props\n>(function AttentionBanner({ children, ...props }, ref) {\n return (\n <Banner ref={ref} variant=\"attention\" {...props}>\n <Icon icon={<Warning size=\"lg\" />} />\n {children}\n </Banner>\n )\n})\n/**\n * @deprecated ActionBanner was renamed to AttentionBanner.\n * @deprecatedSince 11.26.0\n */\nexport const ActionBanner = AttentionBanner\n\nexport const UNSAFE_MiniBanner = React.forwardRef<\n HTMLDivElement,\n DivAttributes & Props & { variant?: BannerVariant }\n>(function MiniBanner({ children, variant = 'info', ...props }, ref) {\n return (\n <StyledMiniBannerContainer ref={ref} variant={variant} {...props}>\n {children}\n </StyledMiniBannerContainer>\n )\n})\n\nBanner_.displayName = 'Banner'\n\nBody.displayName = 'Banner.Body'\n\nContent.displayName = 'Banner.Content'\n\nExpandableContent.displayName = 'Banner.ExpandableContent'\n\nTitle.displayName = 'Banner.Title'\n\nAction.displayName = 'Banner.Action'\n\nActions.displayName = 'Banner.Actions'\n\nDropdownAction.displayName = 'Banner.DropdownAction'\n\nIcon.displayName = 'Banner.Icon'\n\nDismiss.displayName = 'Banner.Dismiss'\n\nErrorBanner.displayName = 'ErrorBanner'\n\nInfoBanner.displayName = 'InfoBanner'\n\nAttentionBanner.displayName = 'AttentionBanner'\n\nActionBanner.displayName = 'ActionBanner'\n\nUNSAFE_MiniBanner.displayName = 'MiniBanner'\n\n/**\n\n\n We use banners to contextually convey complicated or supplemental information\n to a user. Depending on the type of banner, we can provide more information\n about a feature or page the user is on, an action the user needs to perform,\n or an error the user has encountered.\n\n Procore banners are informative and actionable. Always explain what the user\n needs to know (and in some cases, why they’re seeing the banner), and provide\n an actionable next step.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-banner--demo)\n\n @see [Design Guidelines](https://design.procore.com/banner)\n\n */\nexport const Banner = addSubcomponents(\n {\n Body,\n Content,\n ExpandableContent,\n Title,\n Action,\n Actions,\n Icon,\n Dismiss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,GAAG,YAAY;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAM7G,MAAM,GAAGrB,gBAAgB,CACpC;EACE8E,IAAI,EAAJA,IAAI;EACJtB,OAAO,EAAPA,OAAO;EACPvB,iBAAiB,EAAjBA,iBAAiB;EACjB0C,KAAK,EAALA,KAAK;EACLM,MAAM,EAANA,MAAM;EACNQ,OAAO,EAAPA,OAAO;EACP3C,IAAI,EAAJA,IAAI;EACJgE,OAAO,EAAPA;AACF,CAAC,EACD3F,OACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FlexProps } from '../Flex
|
|
2
|
+
import type { FlexProps } from '../Flex';
|
|
3
3
|
import type { BannerProps, BannerVariant } from './Banner.types';
|
|
4
4
|
export declare const StyledBannerContainer: import("styled-components").StyledComponent<"div", any, {
|
|
5
5
|
$isExpandable: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styled, { css, keyframes } from 'styled-components';
|
|
2
2
|
import { StyledButton, StyledLinkButton } from '../Button/Button.styles';
|
|
3
3
|
import { DropdownButton } from '../Dropdown/Dropdown';
|
|
4
|
-
import { Flex } from '../Flex
|
|
5
|
-
import { getTypographyIntent, typographyWeights } from '../Typography
|
|
4
|
+
import { Flex } from '../Flex';
|
|
5
|
+
import { getTypographyIntent, typographyWeights } from '../Typography';
|
|
6
6
|
import { borderRadius } from '../_styles/borderRadius';
|
|
7
7
|
import { colors } from '../_styles/colors';
|
|
8
8
|
import { focusable } from '../_styles/mixins';
|
|
@@ -39,7 +39,7 @@ var expandContent = function expandContent(maxHeight) {
|
|
|
39
39
|
};
|
|
40
40
|
export var StyledBannerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledBannerContainer",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_17_7__sc-149wm7c-0"
|
|
43
43
|
})(["align-items:center;border-left:", "px solid;border-radius:", "px;color:", ";display:flex;justify-content:space-between;min-height:52px;padding:0 ", "px;", " ", " ", ""], bannerLeft, borderRadius.md, colors.gray15, spacing.lg, bannerShadow, function (_ref) {
|
|
44
44
|
var variant = _ref.variant;
|
|
45
45
|
var _bannerVariantColors$ = bannerVariantColors[variant],
|
|
@@ -52,15 +52,15 @@ export var StyledBannerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
52
52
|
});
|
|
53
53
|
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
|
54
54
|
displayName: "StyledContent",
|
|
55
|
-
componentId: "core-
|
|
56
|
-
})(["align-self:center;margin:", "px ", "px;width:100%;"], spacing.sm, spacing.lg);
|
|
55
|
+
componentId: "core-12_17_7__sc-149wm7c-1"
|
|
56
|
+
})(["align-self:center;margin:", "px ", "px ", "px 0;width:100%;"], spacing.sm, spacing.lg, spacing.sm);
|
|
57
57
|
export var StyledExpandableContentContainer = /*#__PURE__*/styled(Flex).withConfig({
|
|
58
58
|
displayName: "StyledExpandableContentContainer",
|
|
59
|
-
componentId: "core-
|
|
59
|
+
componentId: "core-12_17_7__sc-149wm7c-2"
|
|
60
60
|
})(["color:", ";min-height:52px;padding:0 ", "px;position:relative;z-index:1;", ""], colors.gray15, spacing.lg, bannerShadow);
|
|
61
61
|
export var StyledExpandableContent = /*#__PURE__*/styled(Flex).withConfig({
|
|
62
62
|
displayName: "StyledExpandableContent",
|
|
63
|
-
componentId: "core-
|
|
63
|
+
componentId: "core-12_17_7__sc-149wm7c-3"
|
|
64
64
|
})(["animation-duration:450ms;animation-fill-mode:forwards;animation-timing-function:ease-out;background-color:", ";box-sizing:border-box;font-size:14px;font-weight:500;letter-spacing:0.25px;line-height:20px;overflow-y:auto;padding:0 ", "px;position:relative;z-index:0;", " ", ""], colors.white, spacing.xl * 2 + spacing.sm, function (_ref3) {
|
|
65
65
|
var $isOverflowingY = _ref3.$isOverflowingY;
|
|
66
66
|
return $isOverflowingY && focusable;
|
|
@@ -70,30 +70,30 @@ export var StyledExpandableContent = /*#__PURE__*/styled(Flex).withConfig({
|
|
|
70
70
|
});
|
|
71
71
|
export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
|
|
72
72
|
displayName: "StyledTitle",
|
|
73
|
-
componentId: "core-
|
|
73
|
+
componentId: "core-12_17_7__sc-149wm7c-4"
|
|
74
74
|
})(["", " color:", ";font-weight:", ";"], getTypographyIntent('body'), colors.gray15, typographyWeights.semibold);
|
|
75
75
|
export var StyledBody = /*#__PURE__*/styled.div.withConfig({
|
|
76
76
|
displayName: "StyledBody",
|
|
77
|
-
componentId: "core-
|
|
77
|
+
componentId: "core-12_17_7__sc-149wm7c-5"
|
|
78
78
|
})(["", " color:", ";"], getTypographyIntent('body'), colors.gray15);
|
|
79
79
|
export var StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
80
80
|
displayName: "StyledIconContainer",
|
|
81
|
-
componentId: "core-
|
|
81
|
+
componentId: "core-12_17_7__sc-149wm7c-6"
|
|
82
82
|
})(["flex:0 0 auto;margin:", "px 0;"], spacing.lg);
|
|
83
83
|
export var StyledActionsTrigger = /*#__PURE__*/styled(DropdownButton).withConfig({
|
|
84
84
|
displayName: "StyledActionsTrigger",
|
|
85
|
-
componentId: "core-
|
|
86
|
-
})(["flex-shrink:0;& + ", ",& + ", "{margin-left
|
|
85
|
+
componentId: "core-12_17_7__sc-149wm7c-7"
|
|
86
|
+
})(["flex-shrink:0;& + ", ",& + ", "{margin-left:-", "px;}"], StyledButton, StyledLinkButton, spacing.sm);
|
|
87
87
|
export var StyledAction = /*#__PURE__*/styled.div.withConfig({
|
|
88
88
|
displayName: "StyledAction",
|
|
89
|
-
componentId: "core-
|
|
90
|
-
})(["margin:", "px 0;& + ", ",& + ", ",& + ", "{margin-left
|
|
89
|
+
componentId: "core-12_17_7__sc-149wm7c-8"
|
|
90
|
+
})(["margin:", "px 0 ", "px -", "px;& + ", ",& + ", ",& + ", "{margin-left:-", "px;}", ",", "{background:rgba(0,0,0,0.05);color:", ";&:hover{background:", ";color:", ";}}"], spacing.sm, spacing.sm, spacing.sm, StyledButton, StyledLinkButton, StyledActionsTrigger, spacing.sm, StyledButton, StyledLinkButton, colors.gray15, colors.gray85, colors.gray15);
|
|
91
91
|
function getMiniBannerIconColor(_ref5) {
|
|
92
92
|
var variant = _ref5.variant;
|
|
93
93
|
return css(["& ", "{color:", ";}"], StyledIconContainer, miniBannerVariantColors[variant]);
|
|
94
94
|
}
|
|
95
95
|
export var StyledMiniBannerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
96
96
|
displayName: "StyledMiniBannerContainer",
|
|
97
|
-
componentId: "core-
|
|
97
|
+
componentId: "core-12_17_7__sc-149wm7c-9"
|
|
98
98
|
})(["align-items:center;background-color:", ";display:flex;justify-content:space-between;padding:0 ", "px;", " ", " & ", "{margin:", "px;}"], colors.gray96, spacing.md, getTypographyIntent('small'), getMiniBannerIconColor, StyledContent, spacing.sm);
|
|
99
99
|
//# sourceMappingURL=Banner.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.styles.js","names":["styled","css","keyframes","StyledButton","StyledLinkButton","DropdownButton","Flex","getTypographyIntent","typographyWeights","borderRadius","colors","focusable","getShadow","spacing","bannerLeft","bannerVariantColors","attention","primary","yellow40","secondary","yellow94","error","red50","red98","info","blue50","blue96","UNSAFE_attention_emphasized","orange50","orange98","miniBannerVariantColors","yellow50","green50","bannerShadow","expandContent","maxHeight","sm","StyledBannerContainer","div","withConfig","displayName","componentId","md","gray15","lg","_ref","variant","_bannerVariantColors$","StyledIconContainer","_ref2","$isExpandable","StyledContent","StyledExpandableContentContainer","StyledExpandableContent","white","xl","_ref3","$isOverflowingY","_ref4","$expandableContentMaxHeight","StyledTitle","semibold","StyledBody","StyledActionsTrigger","StyledAction","gray85","getMiniBannerIconColor","_ref5","StyledMiniBannerContainer","gray96"],"sources":["../../src/Banner/Banner.styles.ts"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components'\nimport { StyledButton, StyledLinkButton } from '../Button/Button.styles'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport {
|
|
1
|
+
{"version":3,"file":"Banner.styles.js","names":["styled","css","keyframes","StyledButton","StyledLinkButton","DropdownButton","Flex","getTypographyIntent","typographyWeights","borderRadius","colors","focusable","getShadow","spacing","bannerLeft","bannerVariantColors","attention","primary","yellow40","secondary","yellow94","error","red50","red98","info","blue50","blue96","UNSAFE_attention_emphasized","orange50","orange98","miniBannerVariantColors","yellow50","green50","bannerShadow","expandContent","maxHeight","sm","StyledBannerContainer","div","withConfig","displayName","componentId","md","gray15","lg","_ref","variant","_bannerVariantColors$","StyledIconContainer","_ref2","$isExpandable","StyledContent","StyledExpandableContentContainer","StyledExpandableContent","white","xl","_ref3","$isOverflowingY","_ref4","$expandableContentMaxHeight","StyledTitle","semibold","StyledBody","StyledActionsTrigger","StyledAction","gray85","getMiniBannerIconColor","_ref5","StyledMiniBannerContainer","gray96"],"sources":["../../src/Banner/Banner.styles.ts"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components'\nimport { StyledButton, StyledLinkButton } from '../Button/Button.styles'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport type { FlexProps } from '../Flex'\nimport { Flex } from '../Flex'\nimport { getTypographyIntent, typographyWeights } from '../Typography'\nimport { borderRadius } from '../_styles/borderRadius'\nimport { colors } from '../_styles/colors'\nimport { focusable } from '../_styles/mixins'\nimport { getShadow } from '../_styles/shadows'\nimport { spacing } from '../_styles/spacing'\nimport type { BannerProps, BannerVariant } from './Banner.types'\n\nconst bannerLeft = 8\n\nconst bannerVariantColors = {\n attention: {\n primary: colors.yellow40,\n secondary: colors.yellow94,\n },\n error: {\n primary: colors.red50,\n secondary: colors.red98,\n },\n info: {\n primary: colors.blue50,\n secondary: colors.blue96,\n },\n UNSAFE_attention_emphasized: {\n primary: colors.orange50,\n secondary: colors.orange98,\n },\n} as const\n\nconst miniBannerVariantColors = {\n attention: colors.yellow50,\n error: colors.red50,\n info: colors.blue50,\n UNSAFE_attention_emphasized: colors.green50,\n}\n\nconst bannerShadow = getShadow(1, 'bottom')\n\nconst expandContent = (maxHeight: number) => keyframes`\n from {\n padding-top: 0;\n padding-bottom: 0;\n max-height: 0;\n min-height: 0;\n overflow-y: hidden;\n }\n to {\n padding-top: ${spacing.sm}px;\n padding-bottom: ${spacing.sm}px;\n min-height: 32px;\n max-height: ${maxHeight}px;\n overflow-y: auto;\n }\n`\n\nexport const StyledBannerContainer = styled.div<\n { $isExpandable: boolean } & BannerProps\n>`\n align-items: center;\n border-left: ${bannerLeft}px solid;\n border-radius: ${borderRadius.md}px;\n color: ${colors.gray15};\n display: flex;\n justify-content: space-between;\n min-height: 52px;\n padding: 0 ${spacing.lg}px;\n\n ${bannerShadow}\n\n ${({ variant }) => {\n const { primary, secondary } = bannerVariantColors[variant]\n\n return css`\n border-left-color: ${primary};\n background-color: ${secondary};\n\n & ${StyledIconContainer} {\n color: ${primary};\n }\n `\n }}\n\n ${({ $isExpandable }) =>\n $isExpandable &&\n css`\n flex-direction: column;\n align-items: stretch;\n padding: 0;\n `}\n`\n\nexport const StyledContent = styled.div`\n align-self: center;\n margin: ${spacing.sm}px ${spacing.lg}px ${spacing.sm}px 0;\n width: 100%;\n`\n\nexport const StyledExpandableContentContainer = styled(Flex)`\n color: ${colors.gray15};\n min-height: 52px;\n padding: 0 ${spacing.lg}px;\n position: relative;\n z-index: 1;\n\n ${bannerShadow}\n`\n\nexport const StyledExpandableContent = styled(Flex)<\n FlexProps & { $isOverflowingY: boolean; $expandableContentMaxHeight: number }\n>`\n animation-duration: 450ms;\n animation-fill-mode: forwards;\n animation-timing-function: ease-out;\n background-color: ${colors.white};\n box-sizing: border-box;\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0.25px;\n line-height: 20px;\n overflow-y: auto;\n padding: 0 ${spacing.xl * 2 + spacing.sm}px;\n position: relative;\n z-index: 0;\n\n ${({ $isOverflowingY }) => $isOverflowingY && focusable}\n ${({ $expandableContentMaxHeight }) =>\n css`\n animation-name: ${expandContent($expandableContentMaxHeight)};\n `}\n`\n\nexport const StyledTitle = styled.div`\n ${getTypographyIntent('body')}\n color: ${colors.gray15};\n font-weight: ${typographyWeights.semibold};\n`\n\nexport const StyledBody = styled.div`\n ${getTypographyIntent('body')}\n color: ${colors.gray15};\n`\n\nexport const StyledIconContainer = styled.div`\n flex: 0 0 auto;\n margin: ${spacing.lg}px 0;\n`\n\nexport const StyledActionsTrigger = styled(DropdownButton)`\n flex-shrink: 0;\n\n & + ${StyledButton}, & + ${StyledLinkButton} {\n margin-left: -${spacing.sm}px;\n }\n`\n\nexport const StyledAction = styled.div`\n margin: ${spacing.sm}px 0 ${spacing.sm}px -${spacing.sm}px;\n\n & + ${StyledButton}, & + ${StyledLinkButton}, & + ${StyledActionsTrigger} {\n margin-left: -${spacing.sm}px;\n }\n\n ${StyledButton}, ${StyledLinkButton} {\n background: rgba(0, 0, 0, 0.05);\n color: ${colors.gray15};\n\n &:hover {\n background: ${colors.gray85};\n color: ${colors.gray15};\n }\n }\n`\n\nfunction getMiniBannerIconColor({ variant }: { variant: BannerVariant }) {\n return css`\n & ${StyledIconContainer} {\n color: ${miniBannerVariantColors[variant]};\n }\n `\n}\n\nexport const StyledMiniBannerContainer = styled.div<{\n variant: BannerVariant\n}>`\n align-items: center;\n background-color: ${colors.gray96};\n display: flex;\n justify-content: space-between;\n padding: 0 ${spacing.md}px;\n\n ${getTypographyIntent('small')}\n\n ${getMiniBannerIconColor}\n\n & ${StyledContent} {\n margin: ${spacing.sm}px;\n }\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAC1D,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,yBAAyB;AACxE,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,mBAA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rB,OAAO,GAAAqB,KAAA,CAAPrB,OAAO;EACvC,OAAO7C,GAAG,0BACJ+C,mBAAmB,EACZlB,uBAAuB,CAACgB,OAAO,CAAC;AAG/C;AAEA,OAAO,IAAMsB,yBAAyB,gBAAGpE,MAAM,CAACsC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8IAI7B/B,MAAM,CAAC2D,MAAM,EAGpBxD,OAAO,CAAC6B,EAAE,EAErBnC,mBAAmB,CAAC,OAAO,CAAC,EAE5B2D,sBAAsB,EAEpBf,aAAa,EACLtC,OAAO,CAACuB,EAAE,CAEvB"}
|
package/dist/Box/Box.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["as", "alignContent", "alignItems", "alignSelf", "children", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "justifyContent", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "order", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "textAlign"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { StyledBox } from './Box.styles';
|
|
7
7
|
// TODO remove this after we decommission the LegacyDisplay type
|
package/dist/Box/Box.styles.js
CHANGED
|
@@ -21,7 +21,7 @@ function sizeToPx(size) {
|
|
|
21
21
|
}
|
|
22
22
|
export var StyledBox = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledBox",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_17_7__sc-fgsy0p-0"
|
|
25
25
|
})(["", " ", ""], function (_ref) {
|
|
26
26
|
var $as = _ref.$as;
|
|
27
27
|
if ($as === 'ol' || $as === 'ul') {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["children", "variant"],
|
|
3
3
|
_excluded2 = ["variant"],
|
|
4
4
|
_excluded3 = ["isLast"];
|
|
5
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
8
|
-
function _defineProperty(
|
|
9
|
-
function _toPropertyKey(
|
|
10
|
-
function _toPrimitive(
|
|
11
|
-
function _objectWithoutProperties(
|
|
12
|
-
function _objectWithoutPropertiesLoose(
|
|
5
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
13
|
import { ChevronRight } from '@procore/core-icons';
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { useI18nContext } from '../_hooks/I18n';
|
|
@@ -4,19 +4,19 @@ import { colors } from '../_styles/colors';
|
|
|
4
4
|
import { spacing } from '../_styles/spacing';
|
|
5
5
|
export var StyledContainer = /*#__PURE__*/styled.nav.withConfig({
|
|
6
6
|
displayName: "StyledContainer",
|
|
7
|
-
componentId: "core-
|
|
7
|
+
componentId: "core-12_17_7__sc-1q6nqfz-0"
|
|
8
8
|
})(["color:", ";display:flex;align-items:center;a,a:hover{display:inline-flex;text-decoration:none;}"], colors.gray50);
|
|
9
9
|
export var StyledList = /*#__PURE__*/styled.ol.withConfig({
|
|
10
10
|
displayName: "StyledList",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_17_7__sc-1q6nqfz-1"
|
|
12
12
|
})(["display:flex;margin:0;padding-left:0;"]);
|
|
13
13
|
export var StyledSeparator = /*#__PURE__*/styled.div.withConfig({
|
|
14
14
|
displayName: "StyledSeparator",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_17_7__sc-1q6nqfz-2"
|
|
16
16
|
})(["align-items:center;display:inline-flex;justify-content:center;margin:0px ", "px;"], spacing.xs);
|
|
17
17
|
export var StyledCrumb = /*#__PURE__*/styled.li.withConfig({
|
|
18
18
|
displayName: "StyledCrumb",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_17_7__sc-1q6nqfz-3"
|
|
20
20
|
})(["", " align-items:center;color:", ";display:inline-flex;min-height:24px;text-decoration:none;&:hover{cursor:", ";text-decoration:", ";}> a{color:", ";", "}", ""], getTypographyIntent('body'), colors.gray45, function (_ref) {
|
|
21
21
|
var active = _ref.active;
|
|
22
22
|
return active ? 'default' : 'pointer';
|
package/dist/Button/Button.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var _excluded = ["block", "children", "disabled", "icon", "iconRight", "loading", "size", "type", "variant"],
|
|
2
2
|
_excluded2 = ["block", "children", "disabled", "href", "icon", "iconRight", "size", "variant"];
|
|
3
|
-
function _typeof(
|
|
4
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
5
|
-
function _objectWithoutProperties(
|
|
6
|
-
function _objectWithoutPropertiesLoose(
|
|
7
|
-
function _defineProperty(
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { useEventListener } from '../_hooks/EventListener';
|
|
12
12
|
import { mergeRefs } from '../_utils/mergeRefs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["React","useEventListener","mergeRefs","StyledButton","StyledContent","StyledLabel","StyledLinkButton","StyledSpinner","SPINNER_VARIANT","primary","secondary","tertiary","tertiaryContrast","UNSAFE_helixNav","ButtonContent","_ref","children","icon","iconRight","size","variant","createElement","Fragment","isValidElement","cloneElement","_defineProperty","Children","map","child","color","Button","forwardRef","_ref2","ref","_ref2$block","block","_ref2$disabled","disabled","_ref2$loading","loading","_ref2$size","_ref2$type","type","_ref2$variant","props","_objectWithoutProperties","_excluded","_extends","undefined","tabIndex","$block","$loading","$size","$variant","LinkButton","_ref3","_ref3$block","disabled_","href_","href","_ref3$size","_ref3$variant","_excluded2","innerRef","useRef","mimicButtonRole","e","key","indexOf","_innerRef$current","preventDefault","current","click","event","handler","scope","role","$disabled"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import type { FunctionComponent, PropsWithChildren } from 'react'\nimport React from 'react'\nimport { useEventListener } from '../_hooks/EventListener'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport {\n StyledButton,\n StyledContent,\n StyledLabel,\n StyledLinkButton,\n StyledSpinner,\n} from './Button.styles'\nimport type {\n ButtonProps,\n ButtonVariant,\n LinkButtonProps,\n} from './Button.types'\n\nconst SPINNER_VARIANT:
|
|
1
|
+
{"version":3,"file":"Button.js","names":["React","useEventListener","mergeRefs","StyledButton","StyledContent","StyledLabel","StyledLinkButton","StyledSpinner","SPINNER_VARIANT","primary","secondary","tertiary","tertiaryContrast","UNSAFE_helixNav","ButtonContent","_ref","children","icon","iconRight","size","variant","createElement","Fragment","isValidElement","cloneElement","_defineProperty","Children","map","child","color","Button","forwardRef","_ref2","ref","_ref2$block","block","_ref2$disabled","disabled","_ref2$loading","loading","_ref2$size","_ref2$type","type","_ref2$variant","props","_objectWithoutProperties","_excluded","_extends","undefined","tabIndex","$block","$loading","$size","$variant","LinkButton","_ref3","_ref3$block","disabled_","href_","href","_ref3$size","_ref3$variant","_excluded2","innerRef","useRef","mimicButtonRole","e","key","indexOf","_innerRef$current","preventDefault","current","click","event","handler","scope","role","$disabled"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import type { FunctionComponent, PropsWithChildren } from 'react'\nimport React from 'react'\nimport { useEventListener } from '../_hooks/EventListener'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport {\n StyledButton,\n StyledContent,\n StyledLabel,\n StyledLinkButton,\n StyledSpinner,\n} from './Button.styles'\nimport type {\n ButtonProps,\n ButtonVariant,\n LinkButtonProps,\n} from './Button.types'\n\nconst SPINNER_VARIANT: Record<ButtonVariant, 'white' | 'gray15'> = {\n primary: 'white',\n secondary: 'gray15',\n tertiary: 'gray15',\n tertiaryContrast: 'gray15',\n UNSAFE_helixNav: 'white',\n}\n\nconst ButtonContent: FunctionComponent<\n PropsWithChildren<\n Pick<ButtonProps, 'icon' | 'iconRight' | 'size' | 'variant'>\n >\n> = ({ children, icon, iconRight, size, variant }) => {\n return (\n <>\n <StyledContent>\n {React.isValidElement<{ ['data-icon-prop']: string }>(icon)\n ? React.cloneElement(icon, { ['data-icon-prop']: 'true' })\n : null}\n {React.Children.map(children, (child) => {\n return <StyledLabel>{child}</StyledLabel>\n })}\n {React.isValidElement<{ ['data-icon-prop']: string }>(iconRight)\n ? React.cloneElement(iconRight, { ['data-icon-prop']: 'true' })\n : null}\n </StyledContent>\n <StyledSpinner\n size={size === 'lg' ? 'md' : 'sm'}\n color={variant ? SPINNER_VARIANT[variant] : 'gray15'}\n />\n </>\n )\n}\n\n/**\n\n We use buttons to link to other pages or to trigger an action.\n Buttons clearly define what happens when a user clicks it.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-button--demo)\n\n @see [Design Guidelines](https://design.procore.com/button)\n\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n block = false,\n children,\n disabled = false,\n icon,\n iconRight,\n loading = false,\n size = 'md',\n type = 'button',\n variant = 'primary',\n ...props\n },\n ref\n ) {\n return (\n <StyledButton\n aria-busy={loading || undefined}\n data-a11y-skip={variant === 'primary' ? 'color-contrast' : undefined}\n tabIndex={0}\n {...props}\n $block={block}\n disabled={disabled || loading}\n $loading={loading}\n $size={size}\n $variant={variant}\n type={type}\n ref={ref}\n >\n <ButtonContent\n icon={icon}\n iconRight={iconRight}\n size={size}\n variant={variant}\n >\n {children}\n </ButtonContent>\n </StyledButton>\n )\n }\n)\n\nexport const LinkButton = React.forwardRef<HTMLAnchorElement, LinkButtonProps>(\n function LinkButton(\n {\n block = false,\n children,\n disabled: disabled_,\n href: href_,\n icon,\n iconRight,\n size = 'md',\n variant = 'primary',\n ...props\n },\n ref\n ) {\n const innerRef = React.useRef<HTMLAnchorElement>(null)\n\n const mimicButtonRole = (e: React.KeyboardEvent<HTMLAnchorElement>) => {\n const { key } = e\n\n if (['Enter', 'Spacebar', ' '].indexOf(key) >= 0) {\n // Prevents the page to scroll when \"space\" is pressed\n e.preventDefault()\n innerRef.current?.click()\n }\n }\n\n useEventListener({\n event: 'keydown',\n handler: mimicButtonRole,\n scope: innerRef,\n })\n\n const disabled = disabled_ || !href_\n const href = disabled ? undefined : href_\n\n return (\n <StyledLinkButton\n data-a11y-skip={variant === 'primary' ? 'color-contrast' : undefined}\n role=\"button\"\n {...props}\n aria-disabled={disabled}\n href={href}\n $disabled={disabled}\n $block={block}\n $size={size}\n $variant={variant}\n ref={mergeRefs(ref, innerRef)}\n >\n <ButtonContent\n icon={icon}\n iconRight={iconRight}\n size={size}\n variant={variant}\n >\n {children}\n </ButtonContent>\n </StyledLinkButton>\n )\n }\n)\n"],"mappings":";;;;;;;;;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SACEC,YAAY,EACZC,aAAa,EACbC,WAAW,EACXC,gBAAgB,EAChBC,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MAChD;MACAH,CAAC,CAACI,cAAc,CAAC,CAAC;MAClB,CAAAD,iBAAA,GAAAN,QAAQ,CAACQ,OAAO,cAAAF,iBAAA,uBAAhBA,iBAAA,CAAkBG,KAAK,CAAC,CAAC;IAC3B;EACF,CAAC;EAEDvE,gBAAgB,CAAC;IACfwE,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAET,eAAe;IACxBU,KAAK,EAAEZ;EACT,CAAC,CAAC;EAEF,IAAM1B,QAAQ,GAAGoB,SAAS,IAAI,CAACC,KAAK;EACpC,IAAMC,IAAI,GAAGtB,QAAQ,GAAGW,SAAS,GAAGU,KAAK;EAEzC,oBACE1D,KAAA,CAAAqB,aAAA,CAACf,gBAAgB,EAAAyC,QAAA;IACf,kBAAgB3B,OAAO,KAAK,SAAS,GAAG,gBAAgB,GAAG4B,SAAU;IACrE4B,IAAI,EAAC;EAAQ,GACThC,KAAK;IACT,iBAAeP,QAAS;IACxBsB,IAAI,EAAEA,IAAK;IACXkB,SAAS,EAAExC,QAAS;IACpBa,MAAM,EAAEf,KAAM;IACdiB,KAAK,EAAEjC,IAAK;IACZkC,QAAQ,EAAEjC,OAAQ;IAClBa,GAAG,EAAE/B,SAAS,CAAC+B,GAAG,EAAE8B,QAAQ;EAAE,iBAE9B/D,KAAA,CAAAqB,aAAA,CAACP,aAAa;IACZG,IAAI,EAAEA,IAAK;IACXC,SAAS,EAAEA,SAAU;IACrBC,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEA;EAAQ,GAEhBJ,QACY,CACC,CAAC;AAEvB,CACF,CAAC"}
|
|
@@ -19,6 +19,7 @@ interface StyledButtonProps {
|
|
|
19
19
|
$size: ButtonSizes;
|
|
20
20
|
$variant: ButtonVariant;
|
|
21
21
|
}
|
|
22
|
+
export declare function getButtonStyles(block: boolean, disabled: boolean, loading: boolean, size: ButtonSizes, variant: ButtonVariant): import("styled-components").FlattenSimpleInterpolation;
|
|
22
23
|
export declare const StyledButton: import("styled-components").StyledComponent<"button", any, StyledButtonProps, never>;
|
|
23
24
|
interface StyledLinkButtonProps extends Pick<StyledButtonProps, '$block' | '$size' | '$variant'> {
|
|
24
25
|
$disabled: boolean;
|