@procore/core-react 12.44.0 → 12.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/AnchorNavigation/AnchorNavigation.js +12 -8
- package/dist/AnchorNavigation/AnchorNavigation.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +5 -5
- package/dist/AnchorNavigation/AnchorNavigation.styles.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.types.d.ts +1 -0
- package/dist/AnchorNavigation/AnchorNavigation.types.js.map +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.js +3 -1
- package/dist/AvatarStack/AvatarStack.js.map +1 -1
- 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.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Button/Button.types.d.ts +5 -0
- package/dist/Button/Button.types.js.map +1 -1
- package/dist/Calendar/Calendar.styles.js +9 -9
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.js +5 -2
- package/dist/Dropdown/Dropdown.js.map +1 -1
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/Dropdown/Dropdown.types.d.ts +1 -1
- package/dist/Dropdown/Dropdown.types.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.d.ts +3 -5
- package/dist/EmptyState/EmptyState.js.map +1 -1
- package/dist/EmptyState/EmptyState.styles.d.ts +2 -2
- package/dist/EmptyState/EmptyState.styles.js +10 -10
- package/dist/EmptyState/EmptyState.styles.js.map +1 -1
- package/dist/EmptyState/EmptyState.types.d.ts +11 -0
- package/dist/EmptyState/EmptyState.types.js.map +1 -1
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.js +1 -0
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.d.ts +2 -4
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +6 -6
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +11 -4
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.d.ts +518 -8
- package/dist/Form/Form.styles.js +15 -15
- package/dist/Form/Form.styles.js.map +1 -1
- package/dist/Form/Form.types.d.ts +2 -3
- package/dist/Form/Form.types.js.map +1 -1
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/Form/stories/util.js +3 -14
- package/dist/Form/stories/util.js.map +1 -1
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.js +6 -4
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +13 -13
- package/dist/MenuImperative/MenuImperative.styles.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.types.d.ts +2 -4
- package/dist/MenuImperative/MenuImperative.types.js.map +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.js +0 -2
- package/dist/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +8 -8
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.js +6 -0
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +3 -3
- package/dist/PillSelect/PillSelect.js +0 -1
- package/dist/PillSelect/PillSelect.js.map +1 -1
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +2 -1
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +8 -8
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.js +4 -1
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Slider/Slider.styles.d.ts +5 -1
- package/dist/Slider/Slider.styles.js +16 -11
- package/dist/Slider/Slider.styles.js.map +1 -1
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +39 -39
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/OverdueContext.d.ts +4 -0
- package/dist/Table/OverdueContext.js +10 -0
- package/dist/Table/OverdueContext.js.map +1 -0
- package/dist/Table/OverdueContext.types.d.ts +6 -0
- package/dist/Table/OverdueContext.types.js +2 -0
- package/dist/Table/OverdueContext.types.js.map +1 -0
- package/dist/Table/Table.js +76 -23
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/Table.styles.d.ts +19 -9
- package/dist/Table/Table.styles.js +67 -56
- package/dist/Table/Table.styles.js.map +1 -1
- package/dist/Table/Table.types.d.ts +7 -0
- package/dist/Table/Table.types.js.map +1 -1
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.js +41 -28
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +6 -0
- package/dist/Tabs/Tabs.styles.js +29 -20
- package/dist/Tabs/Tabs.styles.js.map +1 -1
- package/dist/Tabs/Tabs.types.d.ts +8 -0
- package/dist/Tabs/Tabs.types.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.js +4 -0
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/Thumbnail.types.d.ts +12 -0
- package/dist/Thumbnail/Thumbnail.types.js.map +1 -1
- package/dist/Thumbnail/ThumbnailCaption.d.ts +1 -1
- package/dist/Thumbnail/ThumbnailCaption.js +15 -7
- package/dist/Thumbnail/ThumbnailCaption.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.d.ts +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.js +14 -4
- package/dist/ThumbnailGrid/ThumbnailGrid.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/ThumbnailGrid/ThumbnailGrid.types.d.ts +34 -6
- package/dist/ThumbnailGrid/ThumbnailGrid.types.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.js +20 -4
- package/dist/Token/Token.js.map +1 -1
- package/dist/Token/Token.styles.d.ts +2 -0
- package/dist/Token/Token.styles.js +14 -5
- package/dist/Token/Token.styles.js.map +1 -1
- package/dist/Token/Token.types.d.ts +3 -1
- package/dist/Token/Token.types.js.map +1 -1
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.js +23 -18
- package/dist/Tooltip/Tooltip.js.map +1 -1
- package/dist/Tooltip/Tooltip.styles.js +3 -3
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/Tree.styles.js +10 -10
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/I18n.d.ts +782 -30
- package/dist/_locales/de-DE.json +22 -2
- package/dist/_locales/en-AU.json +22 -2
- package/dist/_locales/en-CA.json +22 -2
- package/dist/_locales/en-GB.json +22 -2
- package/dist/_locales/en.json +4 -1
- package/dist/_locales/es-ES.json +23 -3
- package/dist/_locales/es.json +22 -2
- package/dist/_locales/fr-CA.json +23 -3
- package/dist/_locales/fr-FR.json +28 -8
- package/dist/_locales/is-IS.json +22 -2
- package/dist/_locales/it-IT.json +23 -3
- package/dist/_locales/ja-JP.json +23 -3
- package/dist/_locales/nb-NO.json +412 -1
- package/dist/_locales/pl-PL.json +22 -2
- package/dist/_locales/pseudo.json +4 -1
- package/dist/_locales/pt-BR.json +22 -2
- package/dist/_locales/pt-PT.json +27 -7
- package/dist/_locales/th-TH.json +22 -2
- package/dist/_locales/zh-SG.json +22 -2
- package/dist/_locales/zh-TW.json +25 -5
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +4 -4
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +25 -25
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +15 -15
- 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 -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 -8
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +50 -38
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +31 -31
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +39 -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 +824 -824
- 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 +54 -54
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +1 -1
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +90 -88
- package/dist/_typedoc/Modal/Modal.types.json +48 -48
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +33 -33
- 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 +48 -48
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +33 -33
- package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +38 -27
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +67 -67
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
- package/dist/_typedoc/Table/Table.types.json +122 -102
- package/dist/_typedoc/Tabs/Tabs.types.json +23 -22
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +43 -43
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
- package/dist/_typedoc/Tile/Tile.types.json +8 -8
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +11 -11
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +8 -8
- package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
- package/dist/_typedoc/Tree/Tree.types.json +88 -88
- 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/package.json +1 -1
|
@@ -5,6 +5,11 @@ export declare type SizingObject = {
|
|
|
5
5
|
[key in ButtonSizes]: number;
|
|
6
6
|
};
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
/**
|
|
9
|
+
* @a11y Icon-only buttons must have an accessible name.
|
|
10
|
+
* Add an `aria-label` or `aria-labelledby` prop to describe the button's purpose.
|
|
11
|
+
*/
|
|
12
|
+
'aria-label'?: string;
|
|
8
13
|
/**
|
|
9
14
|
* Sets the button to be 100% of the width of its parent
|
|
10
15
|
* @since 10.19.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.types.js","names":[],"sources":["../../src/Button/Button.types.ts"],"sourcesContent":["import type React from 'react'\n\nexport type ButtonSizes = 'sm' | 'md' | 'lg'\n\nexport type ButtonVariant =\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'tertiaryContrast'\n | 'UNSAFE_helixNav'\n\nexport type SizingObject = { [key in ButtonSizes]: number }\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * Sets the button to be 100% of the width of its parent\n * @since 10.19.0\n */\n block?: boolean\n /**\n * string icons have been deprecated, please pass a component from `@procore/core-icons`\n * The icon to display on the left side of the label\n * @since 10.19.0\n */\n icon?: React.ReactNode\n /**\n * The icon to display on the right side of the label\n * @since 10.19.0\n * @deprecatedSince 12.18.0\n * @deprecated iconRight has been deprecated and will be removed in a future version\n */\n iconRight?: React.ReactNode\n /**\n * Shows the button spinner\n * @since 10.19.0\n */\n loading?: boolean\n /**\n * The size of the button\n * @since 10.19.0\n */\n size?: ButtonSizes\n /**\n * The variant of the button.\n * @ deprecated variant \"tertiaryContrast\" has been deprecated since 12.18.0\n * and will be removed in a future version\n * @since 10.27.2\n */\n variant?: ButtonVariant\n}\n\nexport type AsLinkProps = React.ComponentProps<'a'>\n\nexport interface LinkButtonProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>,\n Pick<\n ButtonProps,\n 'block' | 'disabled' | 'icon' | 'iconRight' | 'size' | 'variant'\n > {\n /**\n * Render a specific component for the link. This MUST return an anchor tag.\n * The component will receive props like onClick and className that\n * MUST be added to the element.\n *\n * This prop is useful when working with links connected to a router, and\n * a component 'outside of core-react' wants to render the `a` tag.\n *\n * @example\n * const RoutedLink = (p) => <a {...p} href=\"/test\" />\n * <LinkButton as={RoutedLink}>\n * @since 12.20.0\n */\n as?:\n | React.FunctionComponent<AsLinkProps>\n | React.ForwardRefExoticComponent<AsLinkProps>\n /**\n * Use role link when the link has destination. Use role button when it is used for POST.\n * @default 'button'\n */\n role?: 'link' | 'button'\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Button.types.js","names":[],"sources":["../../src/Button/Button.types.ts"],"sourcesContent":["import type React from 'react'\n\nexport type ButtonSizes = 'sm' | 'md' | 'lg'\n\nexport type ButtonVariant =\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'tertiaryContrast'\n | 'UNSAFE_helixNav'\n\nexport type SizingObject = { [key in ButtonSizes]: number }\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * @a11y Icon-only buttons must have an accessible name.\n * Add an `aria-label` or `aria-labelledby` prop to describe the button's purpose.\n */\n 'aria-label'?: string\n /**\n * Sets the button to be 100% of the width of its parent\n * @since 10.19.0\n */\n block?: boolean\n /**\n * string icons have been deprecated, please pass a component from `@procore/core-icons`\n * The icon to display on the left side of the label\n * @since 10.19.0\n */\n icon?: React.ReactNode\n /**\n * The icon to display on the right side of the label\n * @since 10.19.0\n * @deprecatedSince 12.18.0\n * @deprecated iconRight has been deprecated and will be removed in a future version\n */\n iconRight?: React.ReactNode\n /**\n * Shows the button spinner\n * @since 10.19.0\n */\n loading?: boolean\n /**\n * The size of the button\n * @since 10.19.0\n */\n size?: ButtonSizes\n /**\n * The variant of the button.\n * @ deprecated variant \"tertiaryContrast\" has been deprecated since 12.18.0\n * and will be removed in a future version\n * @since 10.27.2\n */\n variant?: ButtonVariant\n}\n\nexport type AsLinkProps = React.ComponentProps<'a'>\n\nexport interface LinkButtonProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>,\n Pick<\n ButtonProps,\n 'block' | 'disabled' | 'icon' | 'iconRight' | 'size' | 'variant'\n > {\n /**\n * Render a specific component for the link. This MUST return an anchor tag.\n * The component will receive props like onClick and className that\n * MUST be added to the element.\n *\n * This prop is useful when working with links connected to a router, and\n * a component 'outside of core-react' wants to render the `a` tag.\n *\n * @example\n * const RoutedLink = (p) => <a {...p} href=\"/test\" />\n * <LinkButton as={RoutedLink}>\n * @since 12.20.0\n */\n as?:\n | React.FunctionComponent<AsLinkProps>\n | React.ForwardRefExoticComponent<AsLinkProps>\n /**\n * Use role link when the link has destination. Use role button when it is used for POST.\n * @default 'button'\n */\n role?: 'link' | 'button'\n}\n"],"mappings":""}
|
|
@@ -8,37 +8,37 @@ var cellSize = 36; // TODO one-off size
|
|
|
8
8
|
|
|
9
9
|
export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "StyledContainer",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_46_0__sc-1kkl86t-0"
|
|
12
12
|
})(["", ";display:inline-flex;flex-direction:column;padding:", "px ", "px ", "px;"], getTypographyIntent('small'), spacing.lg, spacing.md, spacing.md);
|
|
13
13
|
export var StyledPaginator = /*#__PURE__*/styled(Button).withConfig({
|
|
14
14
|
displayName: "StyledPaginator",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_46_0__sc-1kkl86t-1"
|
|
16
16
|
})(["flex:0 0 auto;"]);
|
|
17
17
|
export var StyledSelect = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
displayName: "StyledSelect",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_46_0__sc-1kkl86t-2"
|
|
20
20
|
})(["display:inline-flex;flex:1 1 0;margin-left:", "px;> div{font-size:12px;}"], spacing.sm);
|
|
21
21
|
export var StyledNavigation = /*#__PURE__*/styled.div.withConfig({
|
|
22
22
|
displayName: "StyledNavigation",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_46_0__sc-1kkl86t-3"
|
|
24
24
|
})(["display:inline-flex;margin-bottom:", "px;", " + ", ",", " + ", "{margin-left:", "px;}"], spacing.sm, StyledPaginator, StyledSelect, StyledSelect, StyledPaginator, spacing.sm);
|
|
25
25
|
export var StyledCell = /*#__PURE__*/styled.div.withConfig({
|
|
26
26
|
displayName: "StyledCell",
|
|
27
|
-
componentId: "core-
|
|
27
|
+
componentId: "core-12_46_0__sc-1kkl86t-4"
|
|
28
28
|
})(["align-items:center;display:inline-flex;height:", "px;justify-content:center;width:", "px;"], cellSize, cellSize);
|
|
29
29
|
export var StyledDayHeaderCell = /*#__PURE__*/styled(StyledCell).withConfig({
|
|
30
30
|
displayName: "StyledDayHeaderCell",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_46_0__sc-1kkl86t-5"
|
|
32
32
|
})(["cursor:default;font-weight:", ";"], typographyWeights.semibold);
|
|
33
33
|
export var StyledCellButton = /*#__PURE__*/styled.button.attrs({
|
|
34
34
|
type: 'button'
|
|
35
35
|
}).withConfig({
|
|
36
36
|
displayName: "StyledCellButton",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-12_46_0__sc-1kkl86t-6"
|
|
38
38
|
})(["align-items:center;display:inline-flex;height:", "px;justify-content:center;width:", "px;cursor:pointer;border:none;background:none;padding:0;font:inherit;"], cellSize, cellSize);
|
|
39
39
|
export var StyledDayCell = /*#__PURE__*/styled(StyledCellButton).withConfig({
|
|
40
40
|
displayName: "StyledDayCell",
|
|
41
|
-
componentId: "core-
|
|
41
|
+
componentId: "core-12_46_0__sc-1kkl86t-7"
|
|
42
42
|
})(["", ""], function (_ref) {
|
|
43
43
|
var _ref$$disabled = _ref.$disabled,
|
|
44
44
|
$disabled = _ref$$disabled === void 0 ? false : _ref$$disabled,
|
|
@@ -61,6 +61,6 @@ export var StyledDayCell = /*#__PURE__*/styled(StyledCellButton).withConfig({
|
|
|
61
61
|
});
|
|
62
62
|
export var StyledWeekRow = /*#__PURE__*/styled.div.withConfig({
|
|
63
63
|
displayName: "StyledWeekRow",
|
|
64
|
-
componentId: "core-
|
|
64
|
+
componentId: "core-12_46_0__sc-1kkl86t-8"
|
|
65
65
|
})(["display:inline-flex;padding-bottom:2px;user-select:none;&:last-child{padding-bottom:0;}", "{&:first-child{border-top-left-radius:", "px;border-bottom-left-radius:", "px;}&:last-child{border-top-right-radius:", "px;border-bottom-right-radius:", "px;}}"], StyledCell, borderRadius.md, borderRadius.md, borderRadius.md, borderRadius.md);
|
|
66
66
|
//# sourceMappingURL=Calendar.styles.js.map
|
package/dist/Card/Card.styles.js
CHANGED
|
@@ -4,7 +4,7 @@ import { colors } from '../_styles/colors';
|
|
|
4
4
|
import { getShadow } from '../_styles/shadows';
|
|
5
5
|
export var StyledCardContainer = /*#__PURE__*/styled.div.withConfig({
|
|
6
6
|
displayName: "StyledCardContainer",
|
|
7
|
-
componentId: "core-
|
|
7
|
+
componentId: "core-12_46_0__sc-2fii7b-0"
|
|
8
8
|
})(["background-color:", ";border-radius:", "px;transition:box-shadow 0.2s ease-in-out;", " ", ""], colors.white, borderRadius.md, function (_ref) {
|
|
9
9
|
var $level = _ref.$level,
|
|
10
10
|
$shadowStrength = _ref.$shadowStrength;
|
|
@@ -9,7 +9,7 @@ export var dataQa = {
|
|
|
9
9
|
export var checkboxSize = 20;
|
|
10
10
|
export var StyledCheckboxContainer = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
displayName: "StyledCheckboxContainer",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_46_0__sc-u63tye-0"
|
|
13
13
|
})(["color:", ";display:block;position:relative;& + &{margin-top:", "px;}"], colors.gray15, spacing.md);
|
|
14
14
|
function StyledIndeterminate() {
|
|
15
15
|
return css(["background-color:", ";content:'';height:2px;left:5px;position:absolute;top:9px;width:10px;border:none;"], colors.white);
|
|
@@ -48,18 +48,18 @@ function StyledFakeIndeterminate() {
|
|
|
48
48
|
}
|
|
49
49
|
export var StyledCheckboxLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
50
50
|
displayName: "StyledCheckboxLabelWrapper",
|
|
51
|
-
componentId: "core-
|
|
51
|
+
componentId: "core-12_46_0__sc-u63tye-1"
|
|
52
52
|
})(["padding-left:", "px;min-height:", "px;position:relative;", ""], function (_ref) {
|
|
53
53
|
var $hasLabel = _ref.$hasLabel;
|
|
54
54
|
return $hasLabel ? checkboxSize + spacing.md : checkboxSize;
|
|
55
55
|
}, checkboxSize, getTypographyIntent('body'));
|
|
56
56
|
export var StyledCheckboxLabel = /*#__PURE__*/styled.label.withConfig({
|
|
57
57
|
displayName: "StyledCheckboxLabel",
|
|
58
|
-
componentId: "core-
|
|
58
|
+
componentId: "core-12_46_0__sc-u63tye-2"
|
|
59
59
|
})(["user-select:none;&:before{background-color:", ";border-radius:2px;border:2px solid ", ";content:'';display:inline-block;height:", "px;width:", "px;min-width:", "px;top:0;left:0;position:absolute;}"], colors.white, colors.gray70, checkboxSize, checkboxSize, checkboxSize);
|
|
60
60
|
export var StyledCheckboxInput = /*#__PURE__*/styled.input.withConfig({
|
|
61
61
|
displayName: "StyledCheckboxInput",
|
|
62
|
-
componentId: "core-
|
|
62
|
+
componentId: "core-12_46_0__sc-u63tye-3"
|
|
63
63
|
})(["left:0;opacity:0;position:absolute;top:0;&:disabled:checked + ", " > ", ":before{background-color:", ";border-color:", ";}&:disabled + ", " > ", ":before{background-color:", ";border-color:", ";}", " &:checked + ", " > ", "{&:before{background-color:", ";border-color:", ";color:", ";}&:after{", "}}&:focus:not(:disabled),&[data-qa=", "]:not(:disabled){+ ", " > ", ":before{", "}}", ""], StyledCheckboxLabelWrapper, StyledCheckboxLabel, colors.blue85, colors.blue85, StyledCheckboxLabelWrapper, StyledCheckboxLabel, function (_ref2) {
|
|
64
64
|
var $indeterminate = _ref2.$indeterminate;
|
|
65
65
|
return $indeterminate ? colors.gray85 : colors.white;
|
|
@@ -83,7 +83,7 @@ export var StyledCheckboxInput = /*#__PURE__*/styled.input.withConfig({
|
|
|
83
83
|
});
|
|
84
84
|
export var StyledFakeCheckboxLabel = /*#__PURE__*/styled.span.withConfig({
|
|
85
85
|
displayName: "StyledFakeCheckboxLabel",
|
|
86
|
-
componentId: "core-
|
|
86
|
+
componentId: "core-12_46_0__sc-u63tye-4"
|
|
87
87
|
})(["", " display:block;min-height:", "px;padding-left:", "px;position:relative;user-select:none;cursor:pointer;", ""], getTypographyIntent('body'), checkboxSize, function (_ref7) {
|
|
88
88
|
var children = _ref7.children;
|
|
89
89
|
return children ? checkboxSize + spacing.md : checkboxSize;
|
|
@@ -99,7 +99,7 @@ export var StyledFakeCheckboxLabel = /*#__PURE__*/styled.span.withConfig({
|
|
|
99
99
|
});
|
|
100
100
|
export var StyledFakeCheckboxInput = /*#__PURE__*/styled.div.withConfig({
|
|
101
101
|
displayName: "StyledFakeCheckboxInput",
|
|
102
|
-
componentId: "core-
|
|
102
|
+
componentId: "core-12_46_0__sc-u63tye-5"
|
|
103
103
|
})(["width:", "px;height:", "px;border-radius:2px;border:2px solid ", ";position:absolute;", " ", " ", " ", ""], checkboxSize, checkboxSize, colors.gray70, function (_ref9) {
|
|
104
104
|
var $checked = _ref9.$checked,
|
|
105
105
|
$disabled = _ref9.$disabled,
|
|
@@ -7,23 +7,23 @@ import { getLineClamp } from '../_styles/mixins';
|
|
|
7
7
|
import { spacing } from '../_styles/spacing';
|
|
8
8
|
export var ContactItemAvatarWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
9
9
|
displayName: "ContactItemAvatarWrapper",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_46_0__sc-1c4z9pn-0"
|
|
11
11
|
})(["display:inline-flex;align-self:flex-start;"]);
|
|
12
12
|
export var ContactItemAvatar = /*#__PURE__*/styled(Avatar).withConfig({
|
|
13
13
|
displayName: "ContactItemAvatar",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_46_0__sc-1c4z9pn-1"
|
|
15
15
|
})(["cursor:inherit;font-weight:", ";"], typographyWeights.bold);
|
|
16
16
|
export var ContactItemTextWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
17
17
|
displayName: "ContactItemTextWrapper",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_46_0__sc-1c4z9pn-2"
|
|
19
19
|
})(["overflow:hidden;margin-left:", "px;"], spacing.sm);
|
|
20
20
|
export var ContactItemText = /*#__PURE__*/styled(Typography).withConfig({
|
|
21
21
|
displayName: "ContactItemText",
|
|
22
|
-
componentId: "core-
|
|
22
|
+
componentId: "core-12_46_0__sc-1c4z9pn-3"
|
|
23
23
|
})(["display:flex;", ""], getLineClamp());
|
|
24
24
|
export var ContactItemWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
25
25
|
displayName: "ContactItemWrapper",
|
|
26
|
-
componentId: "core-
|
|
26
|
+
componentId: "core-12_46_0__sc-1c4z9pn-4"
|
|
27
27
|
})(["display:flex;flex-direction:row;align-items:center;padding:", "px ", "px ", "px ", "px;", " ", " ", ""], spacing.sm, spacing.lg, spacing.sm, spacing.sm, function (_ref) {
|
|
28
28
|
var $disabled = _ref.$disabled,
|
|
29
29
|
$clickable = _ref.$clickable;
|
|
@@ -5,10 +5,10 @@ import { mediaIE11Hack } from '../_styles/media';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledContent = /*#__PURE__*/styled(Box).withConfig({
|
|
7
7
|
displayName: "StyledContent",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_46_0__sc-10y57gh-0"
|
|
9
9
|
})(["> * + *,> * + h1,> * + h2,> * + h3,> * + h4,> * + p,> * + ul,> * + ol{margin-top:", "px;}> ", " + *{margin-top:0;}> ", ",> ", " > ", ",> ", "{", "{min-height:0;margin-bottom:", "px;}&:last-child ", "{margin-bottom:0;}}"], spacing.lg, StyledFormRow, StyledFormRow, StyledForm, StyledFormRow, StyledFormRow, StyledFormFieldBanner, spacing.md, StyledFormFieldBanner);
|
|
10
10
|
export var StyledActions = /*#__PURE__*/styled(Box).withConfig({
|
|
11
11
|
displayName: "StyledActions",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_46_0__sc-10y57gh-1"
|
|
13
13
|
})(["display:flex;justify-content:flex-end;gap:", "px;@media ", "{& > * + *{margin-left:", "px;}}"], spacing.sm, mediaIE11Hack, spacing.sm);
|
|
14
14
|
//# sourceMappingURL=Content.styles.js.map
|
|
@@ -10,15 +10,15 @@ var inputHeight = 36; // TODO one-off
|
|
|
10
10
|
var disabledCss = /*#__PURE__*/css(["background-color:", ";color:", ";border-width:1px;border-style:solid;border-color:", ";pointer-events:none;svg{color:", ";}"], colors.gray94, colors.gray45, colors.gray50, colors.gray45);
|
|
11
11
|
export var StyledCalendar = /*#__PURE__*/styled(Calendar).withConfig({
|
|
12
12
|
displayName: "StyledCalendar",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_46_0__sc-w10btf-0"
|
|
14
14
|
})(["color:", ";"], colors.gray45);
|
|
15
15
|
export var StyledDateSegmentsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16
16
|
displayName: "StyledDateSegmentsContainer",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_46_0__sc-w10btf-1"
|
|
18
18
|
})(["min-width:104px;display:flex;gap:", "px;"], spacing.xs);
|
|
19
19
|
export var StyledDateInputSegment = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledDateInputSegment",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_46_0__sc-w10btf-2"
|
|
22
22
|
})(["", " outline:none;text-align:center;&:focus{background-color:", ";}&::selection{background-color:transparent;}&[data-placeholder='true']{color:", ";}"], getTypographyIntent('body'), colors.blue96, function (_ref) {
|
|
23
23
|
var $disabled = _ref.$disabled;
|
|
24
24
|
return $disabled ? colors.gray70 : colors.gray45;
|
|
@@ -29,15 +29,15 @@ export var StyledDateInputDelimiter = /*#__PURE__*/styled.span.attrs(function (p
|
|
|
29
29
|
};
|
|
30
30
|
}).withConfig({
|
|
31
31
|
displayName: "StyledDateInputDelimiter",
|
|
32
|
-
componentId: "core-
|
|
32
|
+
componentId: "core-12_46_0__sc-w10btf-3"
|
|
33
33
|
})(["", " user-select:none;"], getTypographyIntent('body'));
|
|
34
34
|
export var StyledDateInputIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35
35
|
displayName: "StyledDateInputIconContainer",
|
|
36
|
-
componentId: "core-
|
|
36
|
+
componentId: "core-12_46_0__sc-w10btf-4"
|
|
37
37
|
})(["display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;margin:0 0 0 ", "px;height:24px;width:24px;"], spacing.xs);
|
|
38
38
|
export var StyledDateInput = /*#__PURE__*/styled.div.withConfig({
|
|
39
39
|
displayName: "StyledDateInput",
|
|
40
|
-
componentId: "core-
|
|
40
|
+
componentId: "core-12_46_0__sc-w10btf-5"
|
|
41
41
|
})(["align-items:center;border-color:", ";border-radius:4px;border-style:solid;border-width:1px;display:inline-flex;flex-direction:row;height:", "px;justify-content:center;padding:0 ", "px 0 ", "px;&::placeholder{color:", ";}", " &:focus-within,&[data-qa=", "]{", ";}&:disabled{", "}", " ", ""], colors.gray50, inputHeight, spacing.xs, spacing.sm, colors.gray45, function (_ref2) {
|
|
42
42
|
var $error = _ref2.$error;
|
|
43
43
|
return !$error && css(["&:hover,&[data-qa=", "]{border-color:", ";}"], dataQa.hovered, colors.gray20);
|
|
@@ -8,32 +8,32 @@ import { colors } from '../_styles/colors';
|
|
|
8
8
|
import { spacing } from '../_styles/spacing';
|
|
9
9
|
export var StyledDetailPage = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "StyledDetailPage",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_46_0__sc-cytnlo-0"
|
|
12
12
|
})(["background-color:", ";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;"], colors.gray96);
|
|
13
13
|
export var StyledDetailPageBody = /*#__PURE__*/styled.div.withConfig({
|
|
14
14
|
displayName: "StyledDetailPageBody",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_46_0__sc-cytnlo-1"
|
|
16
16
|
})(["padding-bottom:", "px;"], spacing.xl);
|
|
17
17
|
export var StyledDetailPageFooterNotation = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
displayName: "StyledDetailPageFooterNotation",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_46_0__sc-cytnlo-2"
|
|
20
20
|
})(["flex-grow:1;z-index:1;"]);
|
|
21
21
|
export var StyledDetailPageFooter = /*#__PURE__*/styled(Page.Footer).withConfig({
|
|
22
22
|
displayName: "StyledDetailPageFooter",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_46_0__sc-cytnlo-3"
|
|
24
24
|
})(["display:flex;padding:", "px 0;background-color:", ";justify-content:center;"], spacing.lg, colors.white);
|
|
25
25
|
export var StyledDetailPageFooterActions = /*#__PURE__*/styled(Box).withConfig({
|
|
26
26
|
displayName: "StyledDetailPageFooterActions",
|
|
27
|
-
componentId: "core-
|
|
27
|
+
componentId: "core-12_46_0__sc-cytnlo-4"
|
|
28
28
|
})(["", ""], getActions());
|
|
29
29
|
var maxFooterContentWidth = 1920;
|
|
30
30
|
export var StyledDetailPageFooterContent = /*#__PURE__*/styled.div.withConfig({
|
|
31
31
|
displayName: "StyledDetailPageFooterContent",
|
|
32
|
-
componentId: "core-
|
|
32
|
+
componentId: "core-12_46_0__sc-cytnlo-5"
|
|
33
33
|
})(["width:100%;align-items:center;display:flex;justify-content:flex-end;padding:0 ", "px;max-width:", "px;"], spacing.xl, maxFooterContentWidth);
|
|
34
34
|
var detailPageCardBorderRadius = 8;
|
|
35
35
|
export var StyledDetailPageCard = /*#__PURE__*/styled(Card).withConfig({
|
|
36
36
|
displayName: "StyledDetailPageCard",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-12_46_0__sc-cytnlo-6"
|
|
38
38
|
})(["width:100%;border-radius:", "px;margin-top:", "px;margin-bottom:", "px;& + &{margin-top:", "px;}&:first-child{margin-top:0;}&:last-child{margin-bottom:", "px;}& > ", "{padding:", "px ", "px 0 ", "px;max-width:100%;&:empty{padding:0;}}& > ", " + ", " > ", "{border-top:0;}> .", ":first-child + .", ",> ", " + .", " + .", "{margin-top:", "px;}"], detailPageCardBorderRadius, spacing.lg, spacing.sm, spacing.sm, spacing.lg, StyledPageBanner, spacing.lg, spacing.lg, spacing.lg, StyledPageBanner, StyledSection, StyledSectionInner, sectionClassnames.levelAnonymous, sectionClassnames.level(2), StyledPageBanner, sectionClassnames.levelAnonymous, sectionClassnames.level(2), spacing.xxl * -1);
|
|
39
39
|
//# sourceMappingURL=DetailPage.styles.js.map
|
|
@@ -153,7 +153,8 @@ var Dropdown_ = /*#__PURE__*/React.forwardRef(function Dropdown(_ref5, ref) {
|
|
|
153
153
|
props = _objectWithoutProperties(_ref5, _excluded3);
|
|
154
154
|
var menuRef = React.useRef(null);
|
|
155
155
|
var buttonRef = React.useRef(null);
|
|
156
|
-
var
|
|
156
|
+
var isSearchable = Boolean(onSearch);
|
|
157
|
+
var isDialog = hasTabbableElements && !isSearchable;
|
|
157
158
|
function afterHide(e) {
|
|
158
159
|
// @ts-expect-error
|
|
159
160
|
if ((e === null || e === void 0 ? void 0 : e.key) === 'Escape' || e !== null && e !== void 0 && e.restoreFocus) {
|
|
@@ -170,13 +171,15 @@ var Dropdown_ = /*#__PURE__*/React.forwardRef(function Dropdown(_ref5, ref) {
|
|
|
170
171
|
var I18n = useI18nContext();
|
|
171
172
|
var ariaLabel = props['aria-label'] || label || I18n.t("core.dropdown.".concat(props.loading ? 'loading' : 'moreOptions'));
|
|
172
173
|
return /*#__PURE__*/React.createElement(OverlayTrigger, {
|
|
173
|
-
role: isDialog ? 'dialog' : 'menu',
|
|
174
|
+
role: isSearchable ? undefined : isDialog ? 'dialog' : 'menu',
|
|
175
|
+
trackAriaExpanded: isSearchable,
|
|
174
176
|
passA11yPropsToOverlay: !isDialog,
|
|
175
177
|
autoFocus: true,
|
|
176
178
|
afterHide: afterHide,
|
|
177
179
|
afterShow: afterShow,
|
|
178
180
|
beforeHide: beforeHide,
|
|
179
181
|
beforeShow: beforeShow,
|
|
182
|
+
containFocus: !!footer || hasTabbableElements,
|
|
180
183
|
overlay: /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
181
184
|
footer: footer,
|
|
182
185
|
i18nScope: i18nScope,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","names":["CaretDown","CaretUp","EllipsisVertical","classNames","React","MenuImperative","useMenuImperativeControlNavigation","OverlayTrigger","useOverlayTriggerContext","useI18nContext","addSubcomponents","mergeRefs","StyledDropdownButton","StyledDropdownMenu","StyledDropdownSpinner","noop","isFunction","obj","isOpen","_ref","_ref$open","open","Item","forwardRef","_ref2","ref","_ref2$restoreFocus","restoreFocus","props","_objectWithoutProperties","_excluded","createElement","_extends","DropdownButton","_ref3","children","className","_ref3$arrow","arrow","_ref3$loading","loading","_ref3$open","_ref3$focus","focus","_ref3$variant","variant","_excluded2","caret","size","icon","undefined","iconRight","$loading","DropdownMenu","_ref4","footer","i18nScope","menuRef","onSearch_","onSearch","_ref4$onSelect","onSelect","onSelect_","id","overlayTriggerContext","_React$useState","useState","_React$useState2","_slicedToArray","search","setSearch","_useMenuImperativeCon","Boolean","menuId","menuProps","menuNavigationTriggerProps","selection","hide","e","target","value","onKeyDown","key","stopPropagation","shadowStrength","role","Search","onChange","Options","Footer","Dropdown_","Dropdown","_ref5","afterHide_","afterHide","afterShow","beforeHide","beforeShow","error","_ref5$i18nScope","label","_ref5$onKeyDown","_ref5$onSelect","_ref5$placement","placement","_ref5$restoreFocusOnH","restoreFocusOnHide","_ref5$variant","_ref5$hasTabbableElem","hasTabbableElements","_excluded3","useRef","buttonRef","isDialog","_buttonRef$current","current","I18n","ariaLabel","t","concat","passA11yPropsToOverlay","autoFocus","overlay","useDropdownContext","DropdownConsumer","_ref6","displayName","Group"],"sources":["../../src/Dropdown/Dropdown.tsx"],"sourcesContent":["import { CaretDown, CaretUp, EllipsisVertical } from '@procore/core-icons/dist'\nimport classNames from 'classnames'\nimport React from 'react'\nimport {\n MenuImperative,\n useMenuImperativeControlNavigation,\n} from '../MenuImperative/MenuImperative'\nimport type { MenuRef, Selection } from '../MenuImperative/MenuImperative.types'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport {\n StyledDropdownButton,\n StyledDropdownMenu,\n StyledDropdownSpinner,\n} from './Dropdown.styles'\nimport type {\n ConsumerProps,\n DropdownButtonProps,\n DropdownItemProps,\n DropdownMenuProps,\n DropdownProps,\n} from './Dropdown.types'\n\nfunction noop() {}\nfunction isFunction(obj: any) {\n return typeof obj === 'function'\n}\nfunction isOpen({ open = false }) {\n return open\n}\n\nconst Item = React.forwardRef<HTMLDivElement, DropdownItemProps>(function Item(\n { restoreFocus = false, ...props },\n ref\n) {\n return (\n <MenuImperative.Item ref={ref} restoreFocus={restoreFocus} {...props} />\n )\n}) as typeof MenuImperative.Item\n\nexport const DropdownButton = React.forwardRef<\n HTMLButtonElement,\n DropdownButtonProps\n>(function DropdownButton(\n {\n children,\n className,\n arrow = false,\n loading = false,\n open = false,\n focus = false,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const caret =\n arrow && (open ? <CaretUp size=\"sm\" /> : <CaretDown size=\"sm\" />)\n\n const icon = loading ? (\n <StyledDropdownSpinner\n size=\"xs\"\n variant={variant === 'primary' ? 'light' : 'default'}\n />\n ) : (\n caret\n )\n\n return (\n <StyledDropdownButton\n {...props}\n className={classNames(className, {\n focus: isFunction(focus) ? (focus as Function)({ open }) : focus,\n })}\n aria-busy={loading || undefined}\n iconRight={icon}\n $loading={loading}\n variant={variant}\n ref={ref}\n >\n {children}\n </StyledDropdownButton>\n )\n})\n\nconst DropdownMenu = React.forwardRef<HTMLDivElement, DropdownMenuProps>(\n function DropdownMenu(\n {\n children,\n footer,\n i18nScope,\n menuRef,\n onSearch: onSearch_,\n onSelect: onSelect_ = noop,\n id,\n },\n ref\n ) {\n const overlayTriggerContext = useOverlayTriggerContext()\n\n const [search, setSearch] = React.useState('')\n const { menuProps, menuNavigationTriggerProps } =\n useMenuImperativeControlNavigation(menuRef, Boolean(onSearch_), {\n menuId: id,\n })\n\n function onSelect(selection: Selection) {\n overlayTriggerContext.hide({ restoreFocus: selection.restoreFocus })\n\n onSelect_(selection)\n }\n\n function onSearch(e: React.ChangeEvent<HTMLInputElement>) {\n setSearch(e.target.value)\n\n onSearch_?.(e)\n }\n\n function onKeyDown(e: React.KeyboardEvent<HTMLInputElement>) {\n // This is disconnected from the OverlayTrigger closing on Escape.\n // Closing a dropdown with Escape will not close a Modal, because stopP.\n // It is called only once because the menu component is unmounted.\n // The next Escape will propagate.\n if (e.key === 'Escape' || e.key === 'Esc') {\n // only let parent listeners (modal, overlay) know when empty\n e.stopPropagation()\n }\n }\n\n return (\n <StyledDropdownMenu ref={ref} shadowStrength={2}>\n <MenuImperative\n {...menuProps}\n ref={menuRef}\n onKeyDown={onKeyDown}\n onSelect={onSelect}\n role=\"menu\"\n >\n {onSearch_ && (\n <MenuImperative.Search\n {...menuNavigationTriggerProps}\n onChange={onSearch}\n i18nScope={i18nScope}\n />\n )}\n <MenuImperative.Options>{children}</MenuImperative.Options>\n {footer && <MenuImperative.Footer>{footer}</MenuImperative.Footer>}\n </MenuImperative>\n </StyledDropdownMenu>\n )\n }\n)\n\nconst Dropdown_ = React.forwardRef<HTMLButtonElement, DropdownProps>(\n function Dropdown(\n {\n afterHide: afterHide_,\n afterShow,\n beforeHide,\n beforeShow,\n children,\n error,\n footer,\n i18nScope = 'core.dropdown',\n icon,\n label,\n onKeyDown = noop,\n onSearch,\n onSelect = noop,\n placement = 'bottom-left',\n restoreFocusOnHide = false,\n variant = 'secondary',\n hasTabbableElements = false,\n ...props\n },\n ref\n ) {\n const menuRef = React.useRef<MenuRef>(null)\n const buttonRef = React.useRef<HTMLButtonElement>(null)\n const isDialog = Boolean(onSearch) || hasTabbableElements\n\n function afterHide(e: Event | undefined) {\n // @ts-expect-error\n if (e?.key === 'Escape' || e?.restoreFocus) {\n buttonRef.current?.focus()\n }\n\n afterHide_?.(e)\n\n onSearch?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>)\n }\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${props.loading ? 'loading' : 'moreOptions'}`)\n\n return (\n <OverlayTrigger\n role={isDialog ? 'dialog' : 'menu'}\n passA11yPropsToOverlay={!isDialog}\n autoFocus\n afterHide={afterHide}\n afterShow={afterShow}\n beforeHide={beforeHide}\n beforeShow={beforeShow}\n overlay={\n <DropdownMenu\n footer={footer}\n i18nScope={i18nScope}\n menuRef={menuRef}\n onSearch={onSearch}\n onSelect={onSelect}\n >\n {children}\n </DropdownMenu>\n }\n placement={placement}\n ref={mergeRefs(ref, buttonRef)}\n restoreFocusOnHide={restoreFocusOnHide}\n >\n <DropdownButton\n {...props}\n aria-label={ariaLabel}\n arrow={label !== undefined}\n focus={onSearch ? false : isOpen}\n icon={\n props.loading && !label ? undefined : !icon && !label ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n onKeyDown={onKeyDown}\n variant={variant}\n >\n {label}\n </DropdownButton>\n </OverlayTrigger>\n )\n }\n)\n\nexport const useDropdownContext = useOverlayTriggerContext\n\nexport function DropdownConsumer({ children }: ConsumerProps) {\n return children(useDropdownContext())\n}\n\nDropdown_.displayName = 'Dropdown'\n\nItem.displayName = 'Dropdown.Item'\n\n/**\n\n Dropdowns display a list of actions in a menu that opens and closes. We use\n dropdowns most commonly to trigger an action or to redirect the user to\n a new page or modal.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropdown--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown)\n\n*/\nexport const Dropdown = addSubcomponents(\n {\n Item,\n Group: MenuImperative.Group,\n },\n Dropdown_\n)\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,gBAAgB,QAAQ,0BAA0B;AAC/E,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,cAAc,EACdC,kCAAkC,QAC7B,kCAAkC;AAEzC,SACEC,cAAc,EACdC,wBAAwB,QACnB,kCAAkC;AACzC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,qBAAqB,QAChB,mBAAmB;AAS1B,SAASC,IAAIA,CAAA,EAAG,CAAC;AACjB,SAASC,UAAUA,CAACC,GAAQ,EAAE;EAC5B,OAAO,OAAOA,GAAG,KAAK,UAAU;AAClC;AACA,SAASC,MAAMA,CAAAC,IAAA,EAAmB;EAAA,IAAAC,SAAA,GAAAD,IAAA,CAAhBE,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,KAAK,GAAAA,SAAA;EAC5B,OAAOC,IAAI;AACb;AAEA,IAAMC,IAAI,gBAAGlB,KAAK,CAACmB,UAAU,CAAoC,SAASD,IAA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AAC;AACvC;AAEAjC,SAAS,CAACoC,WAAW,GAAG,UAAU;AAElCxG,IAAI,CAACwG,WAAW,GAAG,eAAe;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMnC,QAAQ,GAAGjF,gBAAgB,CACtC;EACEY,IAAI,EAAJA,IAAI;EACJyG,KAAK,EAAE1H,cAAc,CAAC0H;AACxB,CAAC,EACDrC,SACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Dropdown.js","names":["CaretDown","CaretUp","EllipsisVertical","classNames","React","MenuImperative","useMenuImperativeControlNavigation","OverlayTrigger","useOverlayTriggerContext","useI18nContext","addSubcomponents","mergeRefs","StyledDropdownButton","StyledDropdownMenu","StyledDropdownSpinner","noop","isFunction","obj","isOpen","_ref","_ref$open","open","Item","forwardRef","_ref2","ref","_ref2$restoreFocus","restoreFocus","props","_objectWithoutProperties","_excluded","createElement","_extends","DropdownButton","_ref3","children","className","_ref3$arrow","arrow","_ref3$loading","loading","_ref3$open","_ref3$focus","focus","_ref3$variant","variant","_excluded2","caret","size","icon","undefined","iconRight","$loading","DropdownMenu","_ref4","footer","i18nScope","menuRef","onSearch_","onSearch","_ref4$onSelect","onSelect","onSelect_","id","overlayTriggerContext","_React$useState","useState","_React$useState2","_slicedToArray","search","setSearch","_useMenuImperativeCon","Boolean","menuId","menuProps","menuNavigationTriggerProps","selection","hide","e","target","value","onKeyDown","key","stopPropagation","shadowStrength","role","Search","onChange","Options","Footer","Dropdown_","Dropdown","_ref5","afterHide_","afterHide","afterShow","beforeHide","beforeShow","error","_ref5$i18nScope","label","_ref5$onKeyDown","_ref5$onSelect","_ref5$placement","placement","_ref5$restoreFocusOnH","restoreFocusOnHide","_ref5$variant","_ref5$hasTabbableElem","hasTabbableElements","_excluded3","useRef","buttonRef","isSearchable","isDialog","_buttonRef$current","current","I18n","ariaLabel","t","concat","trackAriaExpanded","passA11yPropsToOverlay","autoFocus","containFocus","overlay","useDropdownContext","DropdownConsumer","_ref6","displayName","Group"],"sources":["../../src/Dropdown/Dropdown.tsx"],"sourcesContent":["import { CaretDown, CaretUp, EllipsisVertical } from '@procore/core-icons/dist'\nimport classNames from 'classnames'\nimport React from 'react'\nimport {\n MenuImperative,\n useMenuImperativeControlNavigation,\n} from '../MenuImperative/MenuImperative'\nimport type { MenuRef, Selection } from '../MenuImperative/MenuImperative.types'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport {\n StyledDropdownButton,\n StyledDropdownMenu,\n StyledDropdownSpinner,\n} from './Dropdown.styles'\nimport type {\n ConsumerProps,\n DropdownButtonProps,\n DropdownItemProps,\n DropdownMenuProps,\n DropdownProps,\n} from './Dropdown.types'\n\nfunction noop() {}\nfunction isFunction(obj: any) {\n return typeof obj === 'function'\n}\nfunction isOpen({ open = false }) {\n return open\n}\n\nconst Item = React.forwardRef<HTMLDivElement, DropdownItemProps>(function Item(\n { restoreFocus = false, ...props },\n ref\n) {\n return (\n <MenuImperative.Item ref={ref} restoreFocus={restoreFocus} {...props} />\n )\n}) as typeof MenuImperative.Item\n\nexport const DropdownButton = React.forwardRef<\n HTMLButtonElement,\n DropdownButtonProps\n>(function DropdownButton(\n {\n children,\n className,\n arrow = false,\n loading = false,\n open = false,\n focus = false,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const caret =\n arrow && (open ? <CaretUp size=\"sm\" /> : <CaretDown size=\"sm\" />)\n\n const icon = loading ? (\n <StyledDropdownSpinner\n size=\"xs\"\n variant={variant === 'primary' ? 'light' : 'default'}\n />\n ) : (\n caret\n )\n\n return (\n <StyledDropdownButton\n {...props}\n className={classNames(className, {\n focus: isFunction(focus) ? (focus as Function)({ open }) : focus,\n })}\n aria-busy={loading || undefined}\n iconRight={icon}\n $loading={loading}\n variant={variant}\n ref={ref}\n >\n {children}\n </StyledDropdownButton>\n )\n})\n\nconst DropdownMenu = React.forwardRef<HTMLDivElement, DropdownMenuProps>(\n function DropdownMenu(\n {\n children,\n footer,\n i18nScope,\n menuRef,\n onSearch: onSearch_,\n onSelect: onSelect_ = noop,\n id,\n },\n ref\n ) {\n const overlayTriggerContext = useOverlayTriggerContext()\n\n const [search, setSearch] = React.useState('')\n const { menuProps, menuNavigationTriggerProps } =\n useMenuImperativeControlNavigation(menuRef, Boolean(onSearch_), {\n menuId: id,\n })\n\n function onSelect(selection: Selection) {\n overlayTriggerContext.hide({ restoreFocus: selection.restoreFocus })\n\n onSelect_(selection)\n }\n\n function onSearch(e: React.ChangeEvent<HTMLInputElement>) {\n setSearch(e.target.value)\n\n onSearch_?.(e)\n }\n\n function onKeyDown(e: React.KeyboardEvent<HTMLInputElement>) {\n // This is disconnected from the OverlayTrigger closing on Escape.\n // Closing a dropdown with Escape will not close a Modal, because stopP.\n // It is called only once because the menu component is unmounted.\n // The next Escape will propagate.\n if (e.key === 'Escape' || e.key === 'Esc') {\n // only let parent listeners (modal, overlay) know when empty\n e.stopPropagation()\n }\n }\n\n return (\n <StyledDropdownMenu ref={ref} shadowStrength={2}>\n <MenuImperative\n {...menuProps}\n ref={menuRef}\n onKeyDown={onKeyDown}\n onSelect={onSelect}\n role=\"menu\"\n >\n {onSearch_ && (\n <MenuImperative.Search\n {...menuNavigationTriggerProps}\n onChange={onSearch}\n i18nScope={i18nScope}\n />\n )}\n <MenuImperative.Options>{children}</MenuImperative.Options>\n {footer && <MenuImperative.Footer>{footer}</MenuImperative.Footer>}\n </MenuImperative>\n </StyledDropdownMenu>\n )\n }\n)\n\nconst Dropdown_ = React.forwardRef<HTMLButtonElement, DropdownProps>(\n function Dropdown(\n {\n afterHide: afterHide_,\n afterShow,\n beforeHide,\n beforeShow,\n children,\n error,\n footer,\n i18nScope = 'core.dropdown',\n icon,\n label,\n onKeyDown = noop,\n onSearch,\n onSelect = noop,\n placement = 'bottom-left',\n restoreFocusOnHide = false,\n variant = 'secondary',\n hasTabbableElements = false,\n ...props\n },\n ref\n ) {\n const menuRef = React.useRef<MenuRef>(null)\n const buttonRef = React.useRef<HTMLButtonElement>(null)\n const isSearchable = Boolean(onSearch)\n const isDialog = hasTabbableElements && !isSearchable\n\n function afterHide(e: Event | undefined) {\n // @ts-expect-error\n if (e?.key === 'Escape' || e?.restoreFocus) {\n buttonRef.current?.focus()\n }\n\n afterHide_?.(e)\n\n onSearch?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>)\n }\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${props.loading ? 'loading' : 'moreOptions'}`)\n\n return (\n <OverlayTrigger\n role={isSearchable ? undefined : isDialog ? 'dialog' : 'menu'}\n trackAriaExpanded={isSearchable}\n passA11yPropsToOverlay={!isDialog}\n autoFocus\n afterHide={afterHide}\n afterShow={afterShow}\n beforeHide={beforeHide}\n beforeShow={beforeShow}\n containFocus={!!footer || hasTabbableElements}\n overlay={\n <DropdownMenu\n footer={footer}\n i18nScope={i18nScope}\n menuRef={menuRef}\n onSearch={onSearch}\n onSelect={onSelect}\n >\n {children}\n </DropdownMenu>\n }\n placement={placement}\n ref={mergeRefs(ref, buttonRef)}\n restoreFocusOnHide={restoreFocusOnHide}\n >\n <DropdownButton\n {...props}\n aria-label={ariaLabel}\n arrow={label !== undefined}\n focus={onSearch ? false : isOpen}\n icon={\n props.loading && !label ? undefined : !icon && !label ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n onKeyDown={onKeyDown}\n variant={variant}\n >\n {label}\n </DropdownButton>\n </OverlayTrigger>\n )\n }\n)\n\nexport const useDropdownContext = useOverlayTriggerContext\n\nexport function DropdownConsumer({ children }: ConsumerProps) {\n return children(useDropdownContext())\n}\n\nDropdown_.displayName = 'Dropdown'\n\nItem.displayName = 'Dropdown.Item'\n\n/**\n\n Dropdowns display a list of actions in a menu that opens and closes. We use\n dropdowns most commonly to trigger an action or to redirect the user to\n a new page or modal.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropdown--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown)\n\n*/\nexport const Dropdown = addSubcomponents(\n {\n Item,\n Group: MenuImperative.Group,\n },\n Dropdown_\n)\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,gBAAgB,QAAQ,0BAA0B;AAC/E,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,cAAc,EACdC,kCAAkC,QAC7B,kCAAkC;AAEzC,SACEC,cAAc,EACdC,wBAAwB,QACnB,kCAAkC;AACzC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,qBAAqB,QAChB,mBAAmB;AAS1B,SAASC,IAAIA,CAAA,EAAG,CAAC;AACjB,SAASC,UAAUA,CAACC,GAAQ,EAAE;EAC5B,OAAO,OAAOA,GAAG,KAAK,UAAU;AAClC;AACA,SAASC,MAAMA,CAAAC,IAAA,EAAmB;EAAA,IAAAC,SAAA,GAAAD,IAAA,CAAhBE,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,KAAK,GAAAA,SAAA;EAC5B,OAAOC,IAAI;AACb;AAEA,IAAMC,IAAI,gBAAGlB,KAAK,CAACmB,UAAU,CAAoC,SAASD,IAAIA,CAAAE,KAAA,EAE5EC,GAAG,EACH;EAAA,IAAAC,kBAAA,GAAAF,KAAA,CAFEG,YAAY;IAAZA,YAAY,GAAAD,kBAAA,cAAG,KAAK,GAAAA,kBAAA;IAAKE,KAAK,GAAAC,wBAAA,CAAAL,KAAA,EAAAM,SAAA;EAGhC,oBACE1B,KAAA,CAAA2B,aAAA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WAAW,GAAG,eAAe;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMtC,QAAQ,GAAGjF,gBAAgB,CACtC;EACEY,IAAI,EAAJA,IAAI;EACJ4G,KAAK,EAAE7H,cAAc,CAAC6H;AACxB,CAAC,EACDxC,SACF,CAAC"}
|
|
@@ -5,15 +5,15 @@ import { Card } from '../Card/Card';
|
|
|
5
5
|
import { Spinner } from '../Spinner/Spinner';
|
|
6
6
|
export var StyledDropdownMenu = /*#__PURE__*/styled(Card).withConfig({
|
|
7
7
|
displayName: "StyledDropdownMenu",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_46_0__sc-ufsy2q-0"
|
|
9
9
|
})(["display:flex;max-height:40vh;max-width:248px;min-width:inherit;"]);
|
|
10
10
|
export var StyledDropdownSpinner = /*#__PURE__*/styled(Spinner).withConfig({
|
|
11
11
|
displayName: "StyledDropdownSpinner",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_46_0__sc-ufsy2q-1"
|
|
13
13
|
})(["margin:0 6px;"]);
|
|
14
14
|
export var StyledDropdownButton = /*#__PURE__*/styled(Button).withConfig({
|
|
15
15
|
displayName: "StyledDropdownButton",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_46_0__sc-ufsy2q-2"
|
|
17
17
|
})(["pointer-events:", ";", ""], function (_ref) {
|
|
18
18
|
var disabled = _ref.disabled,
|
|
19
19
|
$loading = _ref.$loading;
|
|
@@ -86,7 +86,7 @@ export interface DropdownProps extends Omit<HTMLButtonProps, 'onSelect'> {
|
|
|
86
86
|
placement?: DropdownPlacement;
|
|
87
87
|
/**
|
|
88
88
|
* If focus should return to the button after selection.
|
|
89
|
-
* @
|
|
89
|
+
* @a11y Dropdowns hold no value and take an action. Focus is expected
|
|
90
90
|
* to be moved from a Dropdown to something else, to continue the user flow .
|
|
91
91
|
* If all actions are inert and does not move focus, set this to `true`.
|
|
92
92
|
* If some actions are inert consider using `restoreFocus` on `Dropdown.Item`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.types.js","names":[],"sources":["../../src/Dropdown/Dropdown.types.ts"],"sourcesContent":["import type { ButtonProps } from '../Button/Button.types'\nimport type {\n MenuItemProps,\n MenuRef,\n Selection,\n} from '../MenuImperative/MenuImperative.types'\nimport type { OverlayTriggerProps } from '../OverlayTrigger/OverlayTrigger.types'\nimport type { Placement } from '../_utils/types'\n\ntype HTMLButtonProps = React.ComponentPropsWithoutRef<'button'>\n\ntype HTMLDivProps = React.ComponentPropsWithoutRef<'div'>\n\nexport type DropdownPlacement = Extract<\n Placement,\n 'bottom' | 'bottom-left' | 'bottom-right' | 'top' | 'top-left' | 'top-right'\n>\n\nexport interface DropdownProps extends Omit<HTMLButtonProps, 'onSelect'> {\n /**\n * @since 10.19.0\n */\n afterHide?: OverlayTriggerProps['afterHide']\n /**\n * @since 10.19.0\n */\n afterShow?: OverlayTriggerProps['afterShow']\n /**\n * @since 10.19.0\n */\n beforeHide?: OverlayTriggerProps['beforeHide']\n /**\n * @since 10.19.0\n */\n beforeShow?: OverlayTriggerProps['beforeShow']\n /**\n * @since 10.19.0\n */\n block?: ButtonProps['block']\n /**\n * @since 10.19.0\n */\n className?: ButtonProps['className']\n /**\n * @since 10.19.0\n */\n disabled?: ButtonProps['disabled']\n /**\n * @since 10.19.0\n */\n error?: boolean\n\n /**\n * Content to render in a footer.\n * @since 10.19.0\n */\n footer?: React.ReactNode\n /**\n * The i18n key to use for the dropdowns's configurable strings.\n * Defaults to using the core library's default strings.\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @remarks string icons have been deprecated, please pass a component from `@procore/core-icons`\n * @since 10.19.0\n */\n icon?: ButtonProps['icon']\n /**\n * The button text.\n * @since 10.19.0\n */\n label?: string\n /**\n * @since 10.19.0\n */\n loading?: ButtonProps['loading']\n\n /**\n * Adds a search bar to the dropdown.\n * @since 10.19.0\n */\n onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void\n\n /**\n * Callback for selecting an item from the menu\n * ```\n * ({ event: ReactEvent, item: Menu.Item.props.item, group: bool }) => void\n * ```\n * `item` will be the `item` prop supplied to the `Item` component\n * @since 10.19.0\n */\n onSelect?: (selection: Selection) => void\n\n /**\n * The placement of the overlay.\n * @default 'bottom-left'\n * @since 10.19.0\n */\n placement?: DropdownPlacement\n /**\n * If focus should return to the button after selection.\n * @
|
|
1
|
+
{"version":3,"file":"Dropdown.types.js","names":[],"sources":["../../src/Dropdown/Dropdown.types.ts"],"sourcesContent":["import type { ButtonProps } from '../Button/Button.types'\nimport type {\n MenuItemProps,\n MenuRef,\n Selection,\n} from '../MenuImperative/MenuImperative.types'\nimport type { OverlayTriggerProps } from '../OverlayTrigger/OverlayTrigger.types'\nimport type { Placement } from '../_utils/types'\n\ntype HTMLButtonProps = React.ComponentPropsWithoutRef<'button'>\n\ntype HTMLDivProps = React.ComponentPropsWithoutRef<'div'>\n\nexport type DropdownPlacement = Extract<\n Placement,\n 'bottom' | 'bottom-left' | 'bottom-right' | 'top' | 'top-left' | 'top-right'\n>\n\nexport interface DropdownProps extends Omit<HTMLButtonProps, 'onSelect'> {\n /**\n * @since 10.19.0\n */\n afterHide?: OverlayTriggerProps['afterHide']\n /**\n * @since 10.19.0\n */\n afterShow?: OverlayTriggerProps['afterShow']\n /**\n * @since 10.19.0\n */\n beforeHide?: OverlayTriggerProps['beforeHide']\n /**\n * @since 10.19.0\n */\n beforeShow?: OverlayTriggerProps['beforeShow']\n /**\n * @since 10.19.0\n */\n block?: ButtonProps['block']\n /**\n * @since 10.19.0\n */\n className?: ButtonProps['className']\n /**\n * @since 10.19.0\n */\n disabled?: ButtonProps['disabled']\n /**\n * @since 10.19.0\n */\n error?: boolean\n\n /**\n * Content to render in a footer.\n * @since 10.19.0\n */\n footer?: React.ReactNode\n /**\n * The i18n key to use for the dropdowns's configurable strings.\n * Defaults to using the core library's default strings.\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @remarks string icons have been deprecated, please pass a component from `@procore/core-icons`\n * @since 10.19.0\n */\n icon?: ButtonProps['icon']\n /**\n * The button text.\n * @since 10.19.0\n */\n label?: string\n /**\n * @since 10.19.0\n */\n loading?: ButtonProps['loading']\n\n /**\n * Adds a search bar to the dropdown.\n * @since 10.19.0\n */\n onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void\n\n /**\n * Callback for selecting an item from the menu\n * ```\n * ({ event: ReactEvent, item: Menu.Item.props.item, group: bool }) => void\n * ```\n * `item` will be the `item` prop supplied to the `Item` component\n * @since 10.19.0\n */\n onSelect?: (selection: Selection) => void\n\n /**\n * The placement of the overlay.\n * @default 'bottom-left'\n * @since 10.19.0\n */\n placement?: DropdownPlacement\n /**\n * If focus should return to the button after selection.\n * @a11y Dropdowns hold no value and take an action. Focus is expected\n * to be moved from a Dropdown to something else, to continue the user flow .\n * If all actions are inert and does not move focus, set this to `true`.\n * If some actions are inert consider using `restoreFocus` on `Dropdown.Item`.\n * Closing Dropdown via `Escape` always restores focus.\n * @default false\n * @since 11.13.0\n */\n restoreFocusOnHide?: OverlayTriggerProps['restoreFocusOnHide']\n /**\n * The button size\n * @default 'md'\n * @since 10.19.0\n */\n size?: ButtonProps['size']\n /**\n * @since 10.19.0\n */\n trigger?: OverlayTriggerProps['trigger']\n /**\n * @since 10.19.0\n */\n type?: ButtonProps['type']\n\n /**\n * @default 'secondary'\n * @since 10.19.0\n */\n variant?: ButtonProps['variant']\n /**\n * Whether to act as modal dialog.\n * Should be used when Dropdown has tabbable elements (e.g. buttons in footer).\n * @default 'false'\n * @since 11.5.0\n */\n hasTabbableElements?: boolean\n}\n\nexport type DropdownItemProps = MenuItemProps\n\nexport interface DropdownButtonProps extends ButtonProps {\n /**\n * Shows the arrow when activated\n * @since 10.19.0\n */\n arrow?: boolean\n /**\n * Shows the button spinner\n * @since 10.19.0\n */\n loading?: boolean\n /**\n * Changes the direction of the arrow if shown\n * @since 10.19.0\n */\n open?: boolean\n /**\n * @since 11.9.0\n * If the component should apply a focus appeareance. This is\n * not DOM focus management, and purely visual.\n */\n focus?: boolean | ((obj: { open: boolean }) => boolean)\n}\n\nexport interface DropdownMenuProps extends Omit<HTMLDivProps, 'onSelect'> {\n /**\n * @since 10.19.0\n */\n footer?: React.ReactNode\n /**\n * @since 10.19.0\n */\n menuRef: React.RefObject<MenuRef>\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 10.19.0\n */\n onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void\n /**\n * @since 10.19.0\n */\n onSelect?: (selection: Selection) => void\n}\n\nexport interface ConsumerProps {\n /**\n * @since 10.19.0\n */\n children: (api: any) => JSX.Element\n}\n"],"mappings":""}
|
|
@@ -6,18 +6,18 @@ import { getEllipsis } from '../_styles/mixins';
|
|
|
6
6
|
import { spacing } from '../_styles/spacing';
|
|
7
7
|
export var StyledDropdownFlyout = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledDropdownFlyout",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_46_0__sc-1i79jsg-0"
|
|
10
10
|
})(["display:flex;flex-wrap:wrap;flex-direction:column;width:100%;max-height:855px;padding:", "px 0;"], spacing.sm);
|
|
11
11
|
export var StyledDropdownFlyoutItem = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledDropdownFlyoutItem",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_46_0__sc-1i79jsg-1"
|
|
14
14
|
})(["display:flex;justify-content:space-between;cursor:pointer;width:100%;padding:", "px ", "px;color:", ";", " &[data-highlighted='true'],&:hover{background-color:", ";}"], spacing.xs, spacing.lg, colors.gray20, getTypographyIntent('body'), colors.gray96);
|
|
15
15
|
export var StyledDropdownFlyoutLabel = /*#__PURE__*/styled.span.withConfig({
|
|
16
16
|
displayName: "StyledDropdownFlyoutLabel",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_46_0__sc-1i79jsg-2"
|
|
18
18
|
})(["", ""], getEllipsis());
|
|
19
19
|
export var StyledDropdownFlyoutExpandIcon = /*#__PURE__*/styled.span.withConfig({
|
|
20
20
|
displayName: "StyledDropdownFlyoutExpandIcon",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_46_0__sc-1i79jsg-3"
|
|
22
22
|
})(["position:relative;display:inline-flex;align-self:center;flex-shrink:0;margin-left:", "px;white-space:nowrap;", ""], spacing.lg, arrowRight(4, 'black'));
|
|
23
23
|
//# sourceMappingURL=DropdownFlyout.styles.js.map
|
|
@@ -95,7 +95,7 @@ export function MultipleErrors(props) {
|
|
|
95
95
|
// make error banner accessible as a styled-components selector
|
|
96
96
|
export var DropzoneErrorBanner = /*#__PURE__*/styled(DropzoneErrorBannerBase).withConfig({
|
|
97
97
|
displayName: "DropzoneErrorBanner",
|
|
98
|
-
componentId: "core-
|
|
98
|
+
componentId: "core-12_46_0__sc-l4fojb-0"
|
|
99
99
|
})([""]);
|
|
100
100
|
function DropzoneContainer(_ref2) {
|
|
101
101
|
var active = _ref2.active,
|
|
@@ -9,15 +9,15 @@ import { colors } from '../_styles/colors';
|
|
|
9
9
|
import { spacing } from '../_styles/spacing';
|
|
10
10
|
export var StyledErrorBanner = /*#__PURE__*/styled(ErrorBannerBase).withConfig({
|
|
11
11
|
displayName: "StyledErrorBanner",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_46_0__sc-by95hy-0"
|
|
13
13
|
})(["margin-top:", "px;flex-shrink:0;"], spacing.lg);
|
|
14
14
|
export var StyledErrorBannerDetails = /*#__PURE__*/styled.ul.withConfig({
|
|
15
15
|
displayName: "StyledErrorBannerDetails",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_46_0__sc-by95hy-1"
|
|
17
17
|
})(["margin:", "px;padding:0;list-style-position:inside;list-style-type:disc;"], spacing.xs);
|
|
18
18
|
export var StyledDropzoneIcon = /*#__PURE__*/styled.div.withConfig({
|
|
19
19
|
displayName: "StyledDropzoneIcon",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_46_0__sc-by95hy-2"
|
|
21
21
|
})(["display:flex;justify-content:center;align-items:center;height:64px;color:", ";margin-bottom:", "px;transition:all 250ms ease-out;", " svg{width:auto;height:100%;}"], colors.gray45, spacing.lg, function (_ref) {
|
|
22
22
|
var $disabled = _ref.$disabled;
|
|
23
23
|
return $disabled && css(["height:72px;margin-bottom:", "px;"], spacing.sm);
|
|
@@ -26,7 +26,7 @@ var activeDropzone = /*#__PURE__*/css(["outline:none;border:2px dashed ", ";back
|
|
|
26
26
|
var disabledDropzone = /*#__PURE__*/css(["color:", ";border:2px dashed ", ";background-color:", ";cursor:not-allowed;& ", "{color:", ";transform:none;}"], colors.gray70, colors.gray85, colors.gray98, StyledDropzoneIcon, colors.gray85);
|
|
27
27
|
export var StyledDropzoneContainer = /*#__PURE__*/styled.div.withConfig({
|
|
28
28
|
displayName: "StyledDropzoneContainer",
|
|
29
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_46_0__sc-by95hy-3"
|
|
30
30
|
})(["", " display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%;min-height:92px;padding:", "px;color:", ";border:2px dashed ", ";background-color:", ";border-radius:", "px;text-align:center;letter-spacing:0.25px;transition:all 250ms ease-out;cursor:grab;", " ", " ", " ", ""], getTypographyIntent('body'), spacing.lg, colors.gray40, colors.gray70, colors.gray96, borderRadius.md, function (_ref2) {
|
|
31
31
|
var $disabled = _ref2.$disabled;
|
|
32
32
|
return !$disabled && css(["&:hover{", "}"], activeDropzone);
|
|
@@ -43,25 +43,25 @@ export var StyledDropzoneContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
43
43
|
});
|
|
44
44
|
export var StyledDropzoneMessage = /*#__PURE__*/styled.div.withConfig({
|
|
45
45
|
displayName: "StyledDropzoneMessage",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_46_0__sc-by95hy-4"
|
|
47
47
|
})(["user-select:none;"]);
|
|
48
48
|
export var StyledUploadButton = /*#__PURE__*/styled(Button).withConfig({
|
|
49
49
|
displayName: "StyledUploadButton",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_46_0__sc-by95hy-5"
|
|
51
51
|
})(["&&{display:block;margin-left:auto;margin-right:auto;margin-bottom:", "px;}"], spacing.sm);
|
|
52
52
|
export var StyledDropzoneCaption = /*#__PURE__*/styled.span.withConfig({
|
|
53
53
|
displayName: "StyledDropzoneCaption",
|
|
54
|
-
componentId: "core-
|
|
54
|
+
componentId: "core-12_46_0__sc-by95hy-6"
|
|
55
55
|
})(["color:", ";"], function (_ref6) {
|
|
56
56
|
var $error = _ref6.$error;
|
|
57
57
|
return $error && colors.gray15;
|
|
58
58
|
});
|
|
59
59
|
export var StyledDropzoneWrapper = /*#__PURE__*/styled(Flex).withConfig({
|
|
60
60
|
displayName: "StyledDropzoneWrapper",
|
|
61
|
-
componentId: "core-
|
|
61
|
+
componentId: "core-12_46_0__sc-by95hy-7"
|
|
62
62
|
})(["height:100%;"]);
|
|
63
63
|
export var StyledDropzoneFocusDetector = /*#__PURE__*/styled(Box).withConfig({
|
|
64
64
|
displayName: "StyledDropzoneFocusDetector",
|
|
65
|
-
componentId: "core-
|
|
65
|
+
componentId: "core-12_46_0__sc-by95hy-8"
|
|
66
66
|
})(["height:100%;"]);
|
|
67
67
|
//# sourceMappingURL=Dropzone.styles.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Props } from '../_utils/types';
|
|
3
|
-
import type { EmptyStateImageProps, EmptyStateProps } from './EmptyState.types';
|
|
3
|
+
import type { EmptyStateDescriptionsProps, EmptyStateImageProps, EmptyStateProps, EmptyStateTitleProps } from './EmptyState.types';
|
|
4
4
|
/**
|
|
5
5
|
|
|
6
6
|
We place empty states on pages where nothing has been created yet.
|
|
@@ -16,13 +16,11 @@ import type { EmptyStateImageProps, EmptyStateProps } from './EmptyState.types';
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const EmptyState: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & EmptyStateProps & React.RefAttributes<HTMLDivElement>> & {
|
|
18
18
|
Actions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
Description: React.ForwardRefExoticComponent<
|
|
20
|
-
as?: "div" | "p" | undefined;
|
|
21
|
-
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Description: React.ForwardRefExoticComponent<EmptyStateDescriptionsProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
20
|
Image: React.ForwardRefExoticComponent<React.ImgHTMLAttributes<HTMLImageElement> & React.HTMLAttributes<HTMLDivElement> & EmptyStateImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
21
|
NoItems: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
24
22
|
NoItemsWithoutCreatePermissions: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
25
23
|
NoResults: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
26
24
|
RecycleBin: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
Title: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
25
|
+
Title: React.ForwardRefExoticComponent<EmptyStateTitleProps & React.HTMLAttributes<HTMLHeadingElement | HTMLParagraphElement> & React.RefAttributes<HTMLHeadingElement | HTMLParagraphElement>>;
|
|
28
26
|
};
|