@procore/core-react 12.36.0 → 12.38.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 +46 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.d.ts +2 -1
- package/dist/Banner/Banner.js +53 -34
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Banner/Banner.types.d.ts +6 -0
- package/dist/Banner/Banner.types.js.map +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js.map +1 -1
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.js +0 -1
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Button.styles.js +5 -5
- 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/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js +2 -3
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DateSelect/DateSelect.js +1 -1
- package/dist/DateSelect/DateSelect.js.map +1 -1
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.js +0 -4
- package/dist/Dropdown/Dropdown.js.map +1 -1
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.js +8 -3
- package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +1 -0
- package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js +3 -1
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js.map +1 -1
- 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 +2 -1
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.js +29 -21
- package/dist/FileSelect/SourceItem/SourceItem.js.map +1 -1
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/Form/stories/util.js +1 -12
- 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.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.js +3 -3
- package/dist/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.d.ts +7 -4
- package/dist/MultiSelect/MultiSelect.styles.js +18 -10
- package/dist/MultiSelect/MultiSelect.styles.js.map +1 -1
- 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 +4 -2
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.types.d.ts +8 -0
- package/dist/OverlayTrigger/OverlayTrigger.types.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.d.ts +1 -0
- package/dist/PageLayout/PageLayout.styles.js +17 -17
- package/dist/PageLayout/PageLayout.styles.js.map +1 -1
- 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.styles.js +4 -4
- package/dist/Popover/Popover.js +2 -1
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.js +1 -1
- package/dist/SegmentedController/SegmentedController.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +46 -20
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.d.ts +5 -1
- package/dist/Select/Select.styles.js +45 -35
- package/dist/Select/Select.styles.js.map +1 -1
- package/dist/Select/Select.types.d.ts +13 -0
- package/dist/Select/Select.types.js.map +1 -1
- package/dist/Semantic/Semantic.styles.d.ts +4 -4
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.js +21 -6
- package/dist/Spinner/Spinner.js.map +1 -1
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.js +1 -3
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +39 -39
- package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.types.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.utils.d.ts +2 -1
- package/dist/SuperSelect/SuperSelect.utils.js +17 -0
- package/dist/SuperSelect/SuperSelect.utils.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
- package/dist/SuperSelect/useSuperSelect.js +26 -30
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +62 -59
- package/dist/Table/Table.styles.js.map +1 -1
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/Tearsheet/storybook/PageLayoutDemo.js +4 -1
- package/dist/Tearsheet/storybook/PageLayoutDemo.js.map +1 -1
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TierSelectionTieredSelect.js +12 -2
- package/dist/TieredSelect/TierSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.js +18 -5
- package/dist/TieredSelect/TieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/TieredSelectMenu.js +9 -2
- package/dist/TieredSelect/TieredSelectMenu.js.map +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tooltip/Tooltip.types.d.ts +4 -0
- package/dist/Tooltip/Tooltip.types.js.map +1 -1
- 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 +4 -41
- package/dist/_locales/de-DE.json +2 -2
- package/dist/_locales/en-AU.json +1 -1
- package/dist/_locales/en-CA.json +1 -1
- package/dist/_locales/en-GB.json +1 -1
- package/dist/_locales/en.json +3 -1
- package/dist/_locales/es-ES.json +1 -1
- package/dist/_locales/es.json +3 -3
- package/dist/_locales/fr-CA.json +2 -2
- package/dist/_locales/fr-FR.json +4 -4
- package/dist/_locales/is-IS.json +2 -2
- package/dist/_locales/it-IT.json +47 -47
- package/dist/_locales/ja-JP.json +4 -4
- package/dist/_locales/pl-PL.json +1 -1
- package/dist/_locales/pseudo.json +3 -1
- package/dist/_locales/pt-BR.json +4 -4
- package/dist/_locales/pt-PT.json +11 -11
- package/dist/_locales/th-TH.json +4 -4
- package/dist/_locales/zh-SG.json +1 -1
- package/dist/_locales/zh-TW.json +5 -5
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_styles/colors.js +7 -3
- package/dist/_styles/colors.js.map +1 -1
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +39 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +13 -13
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -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 +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +40 -30
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +750 -750
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +1 -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 +77 -77
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +48 -48
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +42 -32
- package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +30 -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 +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 +95 -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 +14 -14
- package/dist/_typedoc/Table/Table.types.json +102 -102
- 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 +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 +7 -7
- 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 +23 -13
- 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/_utils/storybookTooltip.d.ts +2 -0
- package/dist/_utils/storybookTooltip.js +12 -0
- package/dist/_utils/storybookTooltip.js.map +1 -0
- package/dist/_utils/triggerListeners.js +2 -2
- package/dist/_utils/triggerListeners.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":["Clear","classNames","isNil","React","Box","MenuImperative","useMenuImperativeControlNavigation","Notation","OverlayTrigger","useOverlayTriggerContext","Spinner","Tooltip","useI18nContext","OverflowObserver","addSubcomponents","StyledSelectArrow","StyledSelectArrowContainer","StyledSelectButton","StyledSelectButtonLabel","StyledSelectClearIcon","StyledSelectMenu","StyledSelectSpinner","noop","isFunction","obj","isOpen","_ref","_ref$open","open","OptGroup","forwardRef","props","ref","createElement","Group","_extends","clickable","Option","_ref2","value","_objectWithoutProperties","_excluded","Item","item","Button","_ref3","_ref3$block","block","children","className","clearRef","_ref3$disabled","disabled","_ref3$error","error","_ref3$focus","focus","label","_ref3$loading","loading","onClear","_ref3$open","placeholder","qa","_ref3$tabIndex","tabIndex","_ref3$isMenuOpened","isMenuOpened","_excluded2","i18n","hasClearIcon","Boolean","content","role","$block","$error","$disabled","$hasClearIcon","$loading","$open","$placeholder","_ref4","isOverflowingX","overflowRef","showTooltip","trigger","$hoverable","overlay","t","clear","size","variant","icon","onClick","onMouseDown","e","preventDefault","color","SelectMenu","_ref5","onSearch_","onSearch","header","footer","emptyMessage","optionsRef","i18nScope","_ref5$onSelect","onSelect","onSelect_","menuRef","_excluded3","ctx","_React$useState","useState","_React$useState2","_slicedToArray","searchValue","setSearchValue","_useMenuImperativeCon","menuProps","menuNavigationTriggerProps","useEffect","_menuRef$current","current","highlightFirst","_menuRef$current2","_menuRef$current3","highlightSuggested","highlightSelected","onKeyDown","_props$onKeyDown","call","key","stopPropagation","selection","hide","event","target","shadowStrength","circular","Search","autoComplete","onChange","Header","Children","count","Options","padding","Footer","Select_","Select","_ref6","_ref6$afterHide","afterHide","afterHide_","_ref6$afterShow","afterShow","afterShow_","_ref6$beforeHide","beforeHide","_ref6$beforeShow","beforeShow","_ref6$block","container","_ref6$disabled","_ref6$error","_ref6$hideDelay","hideDelay","_ref6$i18nScope","_ref6$label","_ref6$loading","onClear_","_ref6$onKeyDown","onScrollBottom","_ref6$onSelect","_ref6$placement","placement","_ref6$restoreFocusOnH","restoreFocusOnHide","_ref6$showDelay","showDelay","_ref6$tabIndex","_excluded4","useRef","overlayTriggerRef","_React$useState3","_React$useState4","setIsMenuOpened","emptyMessageText","scope","useCallback","_overlayTriggerRef$cu","autoFocus","canFlip","displayName"],"sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { Clear } from '@procore/core-icons/dist'\nimport classNames from 'classnames'\nimport { isNil } from 'ramda'\nimport React from 'react'\nimport { Box } from '../Box'\nimport {\n MenuImperative,\n useMenuImperativeControlNavigation,\n} from '../MenuImperative/MenuImperative'\nimport type { MenuRef, Selection } from '../MenuImperative/MenuImperative.types'\nimport { Notation } from '../Notation'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { Spinner } from '../Spinner'\nimport { Tooltip } from '../Tooltip'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { OverflowObserver } from '../_hooks/OverflowObserver'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport type { Props } from '../_utils/types'\nimport {\n StyledSelectArrow,\n StyledSelectArrowContainer,\n StyledSelectButton,\n StyledSelectButtonLabel,\n StyledSelectClearIcon,\n StyledSelectMenu,\n StyledSelectSpinner,\n} from './Select.styles'\nimport type {\n SelectButtonProps,\n SelectMenuProps,\n SelectOptionProps,\n SelectProps,\n} from './Select.types'\n\nfunction noop() {}\nfunction isFunction(obj: any) {\n return typeof obj === 'function'\n}\nfunction isOpen({ open = false }) {\n return open\n}\n\nexport const OptGroup = React.forwardRef<HTMLDivElement, Props>(\n (props, ref) => (\n <MenuImperative.Group {...props} clickable={false} ref={ref} />\n )\n)\n\nexport const Option = React.forwardRef<HTMLDivElement, SelectOptionProps>(\n ({ value, ...props }, ref) => (\n <MenuImperative.Item ref={ref} {...props} item={value} />\n )\n)\n\nexport const Button = React.forwardRef<HTMLDivElement, SelectButtonProps>(\n function Button(\n {\n block = false,\n children,\n className,\n clearRef,\n disabled = false,\n error = false,\n focus = false,\n label,\n loading = false,\n onClear,\n open = false,\n placeholder,\n qa,\n tabIndex = 0,\n isMenuOpened = false,\n ...props\n },\n ref\n ) {\n const i18n = useI18nContext()\n const hasClearIcon = !disabled && !loading && Boolean(label)\n\n const content = children || label || placeholder\n\n return (\n <StyledSelectButton\n className={classNames(className, {\n focus: isFunction(focus) ? (focus as Function)({ open }) : focus,\n })}\n ref={ref}\n role=\"button\"\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : tabIndex}\n $block={block}\n $error={error}\n $disabled={disabled}\n $hasClearIcon={hasClearIcon}\n $loading={loading}\n $open={open}\n $placeholder={!label}\n {...props}\n >\n <OverflowObserver>\n {({ isOverflowingX, ref: overflowRef }) => {\n const showTooltip = !disabled && isOverflowingX && !isMenuOpened\n const trigger = (\n <StyledSelectButtonLabel\n data-qa={qa?.label}\n $hoverable={showTooltip}\n ref={overflowRef}\n >\n {content}\n </StyledSelectButtonLabel>\n )\n\n return showTooltip ? (\n <Tooltip trigger=\"hover\" overlay={content}>\n {trigger}\n </Tooltip>\n ) : (\n trigger\n )\n }}\n </OverflowObserver>\n {onClear && (\n <StyledSelectClearIcon\n aria-hidden={true} // prevents reading \"delete field\" button when select in focus\n aria-label={i18n.t('core.select.clear')}\n ref={clearRef}\n data-qa={qa?.clear || 'core-select-clear'}\n size=\"sm\"\n variant=\"tertiary\"\n icon={<Clear />}\n onClick={onClear}\n onMouseDown={(e: React.MouseEvent) => e.preventDefault()} // prevents an element from getting the focus\n tabIndex={-1} // TODO revisit this accessibility\n />\n )}\n {loading ? (\n <StyledSelectSpinner>\n <Spinner color=\"blue50\" size=\"xs\" />\n </StyledSelectSpinner>\n ) : (\n <StyledSelectArrowContainer>\n <StyledSelectArrow />\n </StyledSelectArrowContainer>\n )}\n </StyledSelectButton>\n )\n }\n)\n\nconst SelectMenu = React.forwardRef<HTMLDivElement, SelectMenuProps>(\n function SelectMenu(\n {\n onSearch: onSearch_,\n header,\n footer,\n emptyMessage,\n optionsRef,\n children,\n i18nScope,\n onSelect: onSelect_ = noop,\n menuRef,\n ...props\n },\n ref\n ) {\n const ctx = useOverlayTriggerContext()\n\n const [searchValue, setSearchValue] = React.useState('')\n const { menuProps, menuNavigationTriggerProps } =\n useMenuImperativeControlNavigation(menuRef, Boolean(onSearch_))\n\n React.useEffect(() => {\n menuRef.current?.highlightFirst()\n }, [menuRef, searchValue])\n\n React.useEffect(() => {\n menuRef.current?.highlightSuggested()\n menuRef.current?.highlightSelected()\n }, [menuRef])\n\n function onKeyDown(e: React.KeyboardEvent<HTMLDivElement>) {\n props.onKeyDown?.(e)\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 e.stopPropagation()\n }\n }\n\n function onSelect(selection: Selection) {\n onSelect_(selection)\n\n ctx.hide(selection.event)\n }\n\n function onSearch(event: React.ChangeEvent<HTMLInputElement>) {\n setSearchValue(event.target.value)\n\n onSearch_?.(event)\n }\n\n return (\n <StyledSelectMenu ref={ref} shadowStrength={2}>\n <MenuImperative\n {...props}\n {...menuProps}\n ref={menuRef}\n role=\"listbox\"\n onKeyDown={onKeyDown}\n onSelect={onSelect}\n circular\n >\n {onSearch_ && (\n <MenuImperative.Search\n autoComplete=\"false\"\n i18nScope={i18nScope}\n onChange={onSearch}\n {...menuNavigationTriggerProps}\n />\n )}\n {header && <MenuImperative.Header>{header}</MenuImperative.Header>}\n {React.Children.count(children) ? (\n <MenuImperative.Options ref={optionsRef}>\n {children}\n </MenuImperative.Options>\n ) : (\n <Box padding=\"md lg\">\n <Notation variant=\"pagination\">{emptyMessage}</Notation>\n </Box>\n )}\n {footer && <MenuImperative.Footer>{footer}</MenuImperative.Footer>}\n </MenuImperative>\n </StyledSelectMenu>\n )\n }\n)\n\nconst Select_ = React.forwardRef<HTMLDivElement, SelectProps>(function Select(\n {\n afterHide: afterHide_ = noop,\n afterShow: afterShow_ = noop,\n beforeHide = () => true,\n beforeShow = () => true,\n block = false,\n children,\n className,\n container,\n disabled = false,\n emptyMessage,\n error = false,\n header,\n footer,\n hideDelay = 100,\n i18nScope = 'core.select',\n label = '',\n loading = false,\n onClear: onClear_,\n onKeyDown = noop,\n onScrollBottom,\n onSearch,\n onSelect = noop,\n optionsRef,\n placeholder,\n placement = 'bottom-left',\n restoreFocusOnHide = 'core-react',\n showDelay = 0,\n tabIndex = 0,\n qa,\n ...props\n },\n forwardRef\n) {\n const i18n = useI18nContext()\n const menuRef = React.useRef<MenuRef>(null)\n const overlayTriggerRef = React.useRef<HTMLDivElement>(null)\n const ref =\n (forwardRef as React.RefObject<HTMLDivElement>) || overlayTriggerRef\n const [isMenuOpened, setIsMenuOpened] = React.useState(false)\n\n const clearRef = React.useRef<HTMLButtonElement>(null)\n\n const emptyMessageText =\n emptyMessage ?? i18n.t('noResult', { scope: i18nScope })\n\n function afterHide() {\n afterHide_()\n setIsMenuOpened(false)\n onSearch?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>)\n }\n\n const onClear = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n onClear_?.(e)\n // IE 11 fix\n // Return focus back to trigger instead of the clear button\n overlayTriggerRef?.current?.focus()\n },\n [onClear_]\n )\n\n function afterShow() {\n afterShow_()\n setIsMenuOpened(true)\n }\n\n return (\n <OverlayTrigger\n autoFocus\n afterHide={afterHide}\n afterShow={afterShow}\n beforeHide={(e: Event) => {\n if (e.target === clearRef.current) {\n return false\n }\n\n return beforeHide(e)\n }}\n beforeShow={beforeShow}\n canFlip={true}\n container={container}\n hideDelay={hideDelay}\n restoreFocusOnHide={restoreFocusOnHide}\n overlay={\n <SelectMenu\n onSearch={onSearch}\n header={header}\n footer={footer}\n emptyMessage={emptyMessageText}\n optionsRef={optionsRef}\n i18nScope={i18nScope}\n onSelect={onSelect}\n onScrollBottom={onScrollBottom}\n menuRef={menuRef}\n >\n {children}\n </SelectMenu>\n }\n placement={placement}\n ref={ref}\n showDelay={showDelay}\n trigger={disabled ? 'none' : 'click'}\n >\n <Button\n {...props}\n block={block}\n className={className}\n clearRef={clearRef}\n disabled={disabled}\n error={error}\n focus={onSearch ? false : isOpen}\n label={label}\n loading={loading}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n onClear={isNil(onClear_) ? onClear_ : onClear}\n isMenuOpened={isMenuOpened}\n tabIndex={tabIndex}\n qa={qa}\n />\n </OverlayTrigger>\n )\n})\n\nSelect_.displayName = 'Select'\n\nButton.displayName = 'Select.Button'\n\nOption.displayName = 'Select.Option'\n\nOptGroup.displayName = 'Select.OptGroup'\n\n/**\n\n We use single selects to allow our users to choose a single option from a list,\n presented in a dropdown. We typically see these selects on forms.\n\n If you want users to select multiple options, use a multi select, group select,\n and tiered select if you want users to select from a tiered set of options,\n use a tiered select.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-select--demo)\n\n @see [Design Guidelines](https://design.procore.com/select)\n\n */\nexport const Select = addSubcomponents(\n {\n Button,\n Option,\n OptGroup,\n },\n Select_\n)\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,KAAK,QAAQ,OAAO;AAC7B,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SACEC,cAAc,EACdC,kCAAkC,QAC7B,kCAAkC;AAEzC,SAASC,QAAQ,QAAQ,aAAa;AACtC,SACEC,cAAc,EACdC,wBAAwB,QACnB,kCAAkC;AACzC,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,S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AK;IACTgB,KAAK,EAAEA,KAAM;IACbE,SAAS,EAAEA,SAAU;IACrBC,QAAQ,EAAEA,QAAS;IACnBE,QAAQ,EAAEA,QAAS;IACnBE,KAAK,EAAEA,KAAM;IACbE,KAAK,EAAE6C,QAAQ,GAAG,KAAK,GAAG5E,MAAO;IACjCgC,KAAK,EAAEA,KAAM;IACbE,OAAO,EAAEA,OAAQ;IACjBG,WAAW,EAAEA,WAAY;IACzBoE,SAAS,EAAEA,SAAU;IACrBtE,OAAO,EAAE1D,KAAK,CAAC0K,QAAQ,CAAC,GAAGA,QAAQ,GAAGhH,OAAQ;IAC9CO,YAAY,EAAEA,YAAa;IAC3BF,QAAQ,EAAEA,QAAS;IACnBF,EAAE,EAAEA;EAAG,EACR,CACa,CAAC;AAErB,CAAC,CAAC;AAEFuF,OAAO,CAAC6C,WAAW,GAAG,QAAQ;AAE9BvJ,MAAM,CAACuJ,WAAW,GAAG,eAAe;AAEpC9J,MAAM,CAAC8J,WAAW,GAAG,eAAe;AAEpCtK,QAAQ,CAACsK,WAAW,GAAG,iBAAiB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAM5C,MAAM,GAAGzI,gBAAgB,CACpC;EACE8B,MAAM,EAANA,MAAM;EACNP,MAAM,EAANA,MAAM;EACNR,QAAQ,EAARA;AACF,CAAC,EACDyH,OACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Select.js","names":["Clear","useId","classNames","isNil","React","Box","MenuImperative","useMenuImperativeControlNavigation","Notation","OverlayTrigger","useOverlayTriggerContext","Spinner","Tooltip","useI18nContext","OverflowObserver","addSubcomponents","StyledSelectArrow","StyledSelectArrowContainer","StyledSelectButton","StyledSelectButtonLabel","StyledSelectButtonWrapper","StyledSelectClearIcon","StyledSelectMenu","StyledSelectSpinner","noop","isFunction","obj","isOpen","_ref","_ref$open","open","OptGroup","forwardRef","props","ref","createElement","Group","_extends","clickable","Option","_ref2","value","_objectWithoutProperties","_excluded","Item","item","Button","_ref3","_ref3$block","block","children","className","clearRef","_ref3$disabled","disabled","_ref3$error","error","_ref3$focus","focus","label","_ref3$loading","loading","onClear","_ref3$open","placeholder","qa","_ref3$tabIndex","tabIndex","_ref3$isMenuOpened","isMenuOpened","_ref3$isListboxOnly","isListboxOnly","menuId","ariaExpandedProp","style","_excluded2","i18n","hasClearIcon","Boolean","showClearIcon","labelId","triggerRole","content","ariaExpanded","undefined","button","role","$block","$error","$disabled","$hasClearIcon","$showClearIcon","$loading","$open","$placeholder","_ref4","isOverflowingX","overflowRef","showTooltip","trigger","id","$hoverable","overlay","color","size","t","clear","variant","icon","onClick","onMouseDown","e","preventDefault","SelectMenu","_ref5","onSearch_","onSearch","header","footer","emptyMessage","optionsRef","i18nScope","_ref5$onSelect","onSelect","onSelect_","menuRef","_excluded3","ctx","_React$useState","useState","_React$useState2","_slicedToArray","searchValue","setSearchValue","_useMenuImperativeCon","menuProps","menuNavigationTriggerProps","useEffect","_menuRef$current","current","highlightFirst","_menuRef$current2","_menuRef$current3","highlightSuggested","highlightSelected","onKeyDown","_props$onKeyDown","call","key","stopPropagation","selection","hide","event","target","shadowStrength","circular","Search","autoComplete","onChange","Header","Children","count","Options","padding","Footer","Select_","Select","_ref6","_ref6$afterHide","afterHide","afterHide_","_ref6$afterShow","afterShow","afterShow_","_ref6$beforeHide","beforeHide","_ref6$beforeShow","beforeShow","_ref6$block","container","_ref6$disabled","_ref6$error","_ref6$hideDelay","hideDelay","_ref6$i18nScope","_ref6$label","_ref6$loading","onClear_","_ref6$onKeyDown","onScrollBottom","_ref6$onSelect","_ref6$placement","placement","_ref6$restoreFocusOnH","restoreFocusOnHide","_ref6$showDelay","showDelay","_ref6$tabIndex","_excluded4","useRef","overlayTriggerRef","_React$useState3","_React$useState4","setIsMenuOpened","emptyMessageText","scope","useCallback","_overlayTriggerRef$cu","autoFocus","canFlip","passA11yPropsToOverlay","overlayId","displayName"],"sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { Clear } from '@procore/core-icons/dist'\nimport { useId } from '@react-aria/utils'\nimport classNames from 'classnames'\nimport { isNil } from 'ramda'\nimport React from 'react'\nimport { Box } from '../Box'\nimport {\n MenuImperative,\n useMenuImperativeControlNavigation,\n} from '../MenuImperative/MenuImperative'\nimport type { MenuRef, Selection } from '../MenuImperative/MenuImperative.types'\nimport { Notation } from '../Notation'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { Spinner } from '../Spinner'\nimport { Tooltip } from '../Tooltip'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { OverflowObserver } from '../_hooks/OverflowObserver'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport type { Props } from '../_utils/types'\nimport {\n StyledSelectArrow,\n StyledSelectArrowContainer,\n StyledSelectButton,\n StyledSelectButtonLabel,\n StyledSelectButtonWrapper,\n StyledSelectClearIcon,\n StyledSelectMenu,\n StyledSelectSpinner,\n} from './Select.styles'\nimport type {\n SelectButtonProps,\n SelectMenuProps,\n SelectOptionProps,\n SelectProps,\n TriggerRole,\n} from './Select.types'\n\nfunction noop() {}\nfunction isFunction(obj: any) {\n return typeof obj === 'function'\n}\nfunction isOpen({ open = false }) {\n return open\n}\n\nexport const OptGroup = React.forwardRef<HTMLDivElement, Props>(\n (props, ref) => (\n <MenuImperative.Group {...props} clickable={false} ref={ref} />\n )\n)\n\nexport const Option = React.forwardRef<HTMLDivElement, SelectOptionProps>(\n ({ value, ...props }, ref) => (\n <MenuImperative.Item ref={ref} {...props} item={value} />\n )\n)\n\nexport const Button = React.forwardRef<HTMLDivElement, SelectButtonProps>(\n function Button(\n {\n block = false,\n children,\n className,\n clearRef,\n disabled = false,\n error = false,\n focus = false,\n label,\n loading = false,\n onClear,\n open = false,\n placeholder,\n qa,\n tabIndex = 0,\n isMenuOpened = false,\n isListboxOnly = false,\n menuId,\n 'aria-expanded': ariaExpandedProp,\n style,\n ...props\n },\n ref\n ) {\n const i18n = useI18nContext()\n const hasClearIcon = Boolean(onClear)\n const showClearIcon = !disabled && !loading && Boolean(label)\n const labelId = useId()\n const triggerRole: TriggerRole = isListboxOnly ? 'combobox' : 'button'\n\n const content = children || label || placeholder\n const ariaExpanded = disabled\n ? undefined\n : isListboxOnly\n ? ariaExpandedProp\n : open\n\n const button = (\n <StyledSelectButton\n ref={ref}\n role={triggerRole}\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : tabIndex}\n aria-expanded={ariaExpanded}\n aria-labelledby={isListboxOnly ? labelId : undefined}\n $block={block}\n $error={error}\n $disabled={disabled}\n $hasClearIcon={hasClearIcon}\n $showClearIcon={showClearIcon}\n $loading={loading}\n $open={open}\n $placeholder={!label}\n {...props}\n >\n <OverflowObserver>\n {({ isOverflowingX, ref: overflowRef }) => {\n const showTooltip = !disabled && isOverflowingX && !isMenuOpened\n const trigger = (\n <StyledSelectButtonLabel\n id={labelId}\n data-qa={qa?.label}\n $hoverable={showTooltip}\n ref={overflowRef}\n >\n {content}\n </StyledSelectButtonLabel>\n )\n\n return showTooltip ? (\n <Tooltip trigger=\"hover\" overlay={content}>\n {trigger}\n </Tooltip>\n ) : (\n trigger\n )\n }}\n </OverflowObserver>\n {loading ? (\n <StyledSelectSpinner>\n <Spinner color=\"blue50\" size=\"xs\" />\n </StyledSelectSpinner>\n ) : (\n <StyledSelectArrowContainer>\n <StyledSelectArrow />\n </StyledSelectArrowContainer>\n )}\n </StyledSelectButton>\n )\n\n return (\n <StyledSelectButtonWrapper\n $block={block}\n className={classNames(className, {\n focus: isFunction(focus) ? (focus as Function)({ open }) : focus,\n })}\n style={style}\n >\n {button}\n {onClear ? (\n <StyledSelectClearIcon\n aria-label={i18n.t('core.select.clear')}\n ref={clearRef}\n data-qa={qa?.clear || 'core-select-clear'}\n size=\"sm\"\n variant=\"tertiary\"\n icon={<Clear />}\n onClick={onClear}\n onMouseDown={(e: React.MouseEvent) => e.preventDefault()} // prevents an element from getting the focus\n tabIndex={showClearIcon ? 0 : -1}\n />\n ) : null}\n </StyledSelectButtonWrapper>\n )\n }\n)\n\nconst SelectMenu = React.forwardRef<HTMLDivElement, SelectMenuProps>(\n function SelectMenu(\n {\n onSearch: onSearch_,\n header,\n footer,\n emptyMessage,\n optionsRef,\n children,\n i18nScope,\n onSelect: onSelect_ = noop,\n menuRef,\n menuId,\n ...props\n },\n ref\n ) {\n const ctx = useOverlayTriggerContext()\n\n const [searchValue, setSearchValue] = React.useState('')\n const { menuProps, menuNavigationTriggerProps } =\n useMenuImperativeControlNavigation(menuRef, Boolean(onSearch_))\n\n React.useEffect(() => {\n menuRef.current?.highlightFirst()\n }, [menuRef, searchValue])\n\n React.useEffect(() => {\n menuRef.current?.highlightSuggested()\n menuRef.current?.highlightSelected()\n }, [menuRef])\n\n function onKeyDown(e: React.KeyboardEvent<HTMLDivElement>) {\n props.onKeyDown?.(e)\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 e.stopPropagation()\n }\n }\n\n function onSelect(selection: Selection) {\n onSelect_(selection)\n\n ctx.hide(selection.event)\n }\n\n function onSearch(event: React.ChangeEvent<HTMLInputElement>) {\n setSearchValue(event.target.value)\n\n onSearch_?.(event)\n }\n\n return (\n <StyledSelectMenu ref={ref} shadowStrength={2}>\n <MenuImperative\n {...props}\n {...menuProps}\n ref={menuRef}\n role=\"listbox\"\n onKeyDown={onKeyDown}\n onSelect={onSelect}\n id={menuId}\n circular\n >\n {onSearch_ && (\n <MenuImperative.Search\n autoComplete=\"false\"\n i18nScope={i18nScope}\n onChange={onSearch}\n {...menuNavigationTriggerProps}\n />\n )}\n {header && <MenuImperative.Header>{header}</MenuImperative.Header>}\n {React.Children.count(children) ? (\n <MenuImperative.Options ref={optionsRef}>\n {children}\n </MenuImperative.Options>\n ) : (\n <Box padding=\"md lg\">\n <Notation variant=\"pagination\">{emptyMessage}</Notation>\n </Box>\n )}\n {footer && <MenuImperative.Footer>{footer}</MenuImperative.Footer>}\n </MenuImperative>\n </StyledSelectMenu>\n )\n }\n)\n\nconst Select_ = React.forwardRef<HTMLDivElement, SelectProps>(function Select(\n {\n afterHide: afterHide_ = noop,\n afterShow: afterShow_ = noop,\n beforeHide = () => true,\n beforeShow = () => true,\n block = false,\n children,\n className,\n container,\n disabled = false,\n emptyMessage,\n error = false,\n header,\n footer,\n hideDelay = 100,\n i18nScope = 'core.select',\n label = '',\n loading = false,\n onClear: onClear_,\n onKeyDown = noop,\n onScrollBottom,\n onSearch,\n onSelect = noop,\n optionsRef,\n placeholder,\n placement = 'bottom-left',\n restoreFocusOnHide = 'core-react',\n showDelay = 0,\n tabIndex = 0,\n qa,\n ...props\n },\n forwardRef\n) {\n const i18n = useI18nContext()\n const menuRef = React.useRef<MenuRef>(null)\n const overlayTriggerRef = React.useRef<HTMLDivElement>(null)\n const ref =\n (forwardRef as React.RefObject<HTMLDivElement>) || overlayTriggerRef\n const [isMenuOpened, setIsMenuOpened] = React.useState(false)\n\n const clearRef = React.useRef<HTMLButtonElement>(null)\n const menuId = useId()\n const isListboxOnly = !onSearch && !header && !footer\n\n const emptyMessageText =\n emptyMessage ?? i18n.t('noResult', { scope: i18nScope })\n\n function afterHide() {\n afterHide_()\n setIsMenuOpened(false)\n onSearch?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>)\n }\n\n const onClear = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n onClear_?.(e)\n // IE 11 fix\n // Return focus back to trigger instead of the clear button\n overlayTriggerRef?.current?.focus()\n },\n [onClear_]\n )\n\n function afterShow() {\n afterShow_()\n setIsMenuOpened(true)\n }\n\n return (\n <OverlayTrigger\n autoFocus\n afterHide={afterHide}\n afterShow={afterShow}\n beforeHide={(e: Event) => {\n if (e.target === clearRef.current) {\n return false\n }\n\n return beforeHide(e)\n }}\n beforeShow={beforeShow}\n canFlip={true}\n container={container}\n hideDelay={hideDelay}\n restoreFocusOnHide={restoreFocusOnHide}\n role={isListboxOnly ? 'listbox' : undefined}\n passA11yPropsToOverlay={isListboxOnly}\n overlayId={menuId}\n overlay={\n <SelectMenu\n onSearch={onSearch}\n header={header}\n footer={footer}\n emptyMessage={emptyMessageText}\n optionsRef={optionsRef}\n i18nScope={i18nScope}\n onSelect={onSelect}\n onScrollBottom={onScrollBottom}\n menuRef={menuRef}\n menuId={menuId}\n >\n {children}\n </SelectMenu>\n }\n placement={placement}\n ref={ref}\n showDelay={showDelay}\n trigger={disabled ? 'none' : 'click'}\n >\n <Button\n {...props}\n block={block}\n className={className}\n clearRef={clearRef}\n disabled={disabled}\n error={error}\n focus={onSearch ? false : isOpen}\n label={label}\n loading={loading}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n onClear={isNil(onClear_) ? onClear_ : onClear}\n isMenuOpened={isMenuOpened}\n tabIndex={tabIndex}\n isListboxOnly={isListboxOnly}\n menuId={menuId}\n qa={qa}\n />\n </OverlayTrigger>\n )\n})\n\nSelect_.displayName = 'Select'\n\nButton.displayName = 'Select.Button'\n\nOption.displayName = 'Select.Option'\n\nOptGroup.displayName = 'Select.OptGroup'\n\n/**\n\n We use single selects to allow our users to choose a single option from a list,\n presented in a dropdown. We typically see these selects on forms.\n\n If you want users to select multiple options, use a multi select, group select,\n and tiered select if you want users to select from a tiered set of options,\n use a tiered select.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-select--demo)\n\n @see [Design Guidelines](https://design.procore.com/select)\n\n */\nexport const Select = addSubcomponents(\n {\n Button,\n Option,\n OptGroup,\n },\n Select_\n)\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,SAASC,KAAK,QAAQ,mBAAmB;AACzC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,KAAK,QAAQ,OAAO;AAC7B,OA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4
4
|
hovered: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const tableSelectClassName = "select--table";
|
|
7
|
+
export declare const StyledSelectButtonWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
8
|
+
$block: boolean;
|
|
9
|
+
}>> & string;
|
|
7
10
|
export declare const StyledSelectMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("react").HTMLAttributes<HTMLDivElement> & import("../Card").CardProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
8
11
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
12
|
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("../Card").CardProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
@@ -23,5 +26,6 @@ export declare const StyledSelectButton: import("styled-components/dist/types").
|
|
|
23
26
|
$loading: boolean;
|
|
24
27
|
$open: boolean;
|
|
25
28
|
$placeholder?: boolean | undefined;
|
|
26
|
-
$hasClearIcon
|
|
29
|
+
$hasClearIcon?: boolean | undefined;
|
|
30
|
+
$showClearIcon?: boolean | undefined;
|
|
27
31
|
}>> & string;
|
|
@@ -15,70 +15,80 @@ export var dataQa = {
|
|
|
15
15
|
};
|
|
16
16
|
export var tableSelectClassName = 'select--table';
|
|
17
17
|
var styledSelectButtonDefaultWidth = 248;
|
|
18
|
+
export var StyledSelectButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
19
|
+
displayName: "StyledSelectButtonWrapper",
|
|
20
|
+
componentId: "core-12_38_0__sc-mr8gwe-0"
|
|
21
|
+
})(["display:inline-block;position:relative;width:", ";"], function (_ref) {
|
|
22
|
+
var $block = _ref.$block;
|
|
23
|
+
return $block ? '100%' : "".concat(styledSelectButtonDefaultWidth, "px");
|
|
24
|
+
});
|
|
18
25
|
export var StyledSelectMenu = /*#__PURE__*/styled(Card).withConfig({
|
|
19
26
|
displayName: "StyledSelectMenu",
|
|
20
|
-
componentId: "core-
|
|
27
|
+
componentId: "core-12_38_0__sc-mr8gwe-1"
|
|
21
28
|
})(["display:flex;max-height:40vh;max-width:", "px;min-width:inherit;"], styledSelectButtonDefaultWidth);
|
|
22
29
|
export var StyledSelectButtonLabel = /*#__PURE__*/styled.div.withConfig({
|
|
23
30
|
displayName: "StyledSelectButtonLabel",
|
|
24
|
-
componentId: "core-
|
|
25
|
-
})(["", " flex-grow:1;margin-right:", "px;outline:none;pointer-events:", ";user-select:none;"], getEllipsis(), spacing.sm, function (
|
|
26
|
-
var $hoverable =
|
|
31
|
+
componentId: "core-12_38_0__sc-mr8gwe-2"
|
|
32
|
+
})(["", " flex-grow:1;margin-right:", "px;outline:none;pointer-events:", ";user-select:none;"], getEllipsis(), spacing.sm, function (_ref2) {
|
|
33
|
+
var $hoverable = _ref2.$hoverable;
|
|
27
34
|
return $hoverable ? 'initial' : 'none';
|
|
28
35
|
});
|
|
29
36
|
export var StyledSelectSpinner = /*#__PURE__*/styled.div.withConfig({
|
|
30
37
|
displayName: "StyledSelectSpinner",
|
|
31
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_38_0__sc-mr8gwe-3"
|
|
32
39
|
})(["align-items:center;display:flex;flex:0 0 auto;justify-content:center;line-height:0;"]);
|
|
33
40
|
export var StyledSelectArrowContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34
41
|
displayName: "StyledSelectArrowContainer",
|
|
35
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_38_0__sc-mr8gwe-4"
|
|
36
43
|
})(["align-items:center;display:inline-flex;height:16px;justify-content:flex-end;margin-left:", "px;width:8px;"], spacing.sm);
|
|
37
44
|
export var StyledSelectArrow = /*#__PURE__*/styled.div.withConfig({
|
|
38
45
|
displayName: "StyledSelectArrow",
|
|
39
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_38_0__sc-mr8gwe-5"
|
|
40
47
|
})(["position:relative;", ""], arrowDown(4, 'gray45'));
|
|
41
48
|
export var StyledSelectClearIcon = /*#__PURE__*/styled(Button).withConfig({
|
|
42
49
|
displayName: "StyledSelectClearIcon",
|
|
43
|
-
componentId: "core-
|
|
44
|
-
})(["", "{pointer-events:none;}"], StyledContent);
|
|
50
|
+
componentId: "core-12_38_0__sc-mr8gwe-6"
|
|
51
|
+
})(["position:absolute;right:29px;top:50%;transform:translateY(-50%);", "{pointer-events:none;}"], StyledContent);
|
|
45
52
|
export var StyledSelectButton = /*#__PURE__*/styled.div.withConfig({
|
|
46
53
|
displayName: "StyledSelectButton",
|
|
47
|
-
componentId: "core-
|
|
48
|
-
})(["", " align-items:center;background-color:", ";border-color:", ";border-radius:", "px;border-style:solid;border-width:1px;color:", ";cursor:pointer;display:inline-flex;height:36px;min-height:36px;outline:none;padding:0 ", "px;position:relative;white-space:nowrap;width:", ";&::placeholder{border-color:", ";}&:hover,&:active,&[data-qa=", "]{background-color:", ";border-color:", ";color:", ";}&.focus,&:focus,&[data-qa=", "]{", " ", "{stroke:", ";}}", " ", " ", " ", " ", " &.", "{", " ", " ", "}"], getTypographyIntent('body'), colors.white, colors.gray50, borderRadius.md, colors.gray15, spacing.md, function (
|
|
49
|
-
var $block =
|
|
54
|
+
componentId: "core-12_38_0__sc-mr8gwe-7"
|
|
55
|
+
})(["", " align-items:center;background-color:", ";border-color:", ";border-radius:", "px;border-style:solid;border-width:1px;color:", ";cursor:pointer;display:inline-flex;height:36px;min-height:36px;outline:none;padding:0 ", "px;position:relative;white-space:nowrap;width:", ";&::placeholder{border-color:", ";}&:hover,&:active,&[data-qa=", "]{background-color:", ";border-color:", ";color:", ";}&.focus,&:focus,&[data-qa=", "],", ":focus-within &{", " ", "{stroke:", ";}}", " ", " ", " ", " ", " ", " &.", "{", " ", " ", "}"], getTypographyIntent('body'), colors.white, colors.gray50, borderRadius.md, colors.gray15, spacing.md, function (_ref3) {
|
|
56
|
+
var $block = _ref3.$block;
|
|
50
57
|
return $block ? '100%' : "".concat(styledSelectButtonDefaultWidth, "px");
|
|
51
|
-
}, colors.gray45, dataQa.hovered, colors.white, colors.gray20, colors.gray15, dataQa.focused, getFocus(), StyledCircle, colors.blue50, function (
|
|
52
|
-
var
|
|
53
|
-
$placeholder =
|
|
58
|
+
}, colors.gray45, dataQa.hovered, colors.white, colors.gray20, colors.gray15, dataQa.focused, StyledSelectButtonWrapper, getFocus(), StyledCircle, colors.blue50, function (_ref4) {
|
|
59
|
+
var _ref4$$placeholder = _ref4.$placeholder,
|
|
60
|
+
$placeholder = _ref4$$placeholder === void 0 ? false : _ref4$$placeholder;
|
|
54
61
|
return $placeholder && css(["", "{color:", ";}"], StyledSelectButtonLabel, colors.gray45);
|
|
55
|
-
}, function (_ref4) {
|
|
56
|
-
var $disabled = _ref4.$disabled;
|
|
57
|
-
return $disabled && css(["background-color:", ";border-color:", ";color:", ";cursor:default;pointer-events:none;", "{color:", ";}", "{", "}"], colors.gray94, colors.gray50, colors.gray45, StyledSelectButtonLabel, colors.gray70, StyledSelectArrow, arrowDown(4, 'gray70'));
|
|
58
62
|
}, function (_ref5) {
|
|
59
|
-
var $
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
var $disabled = _ref5.$disabled;
|
|
64
|
+
return $disabled && css(["background-color:", ";border-color:", ";color:", ";cursor:default;pointer-events:none;", "{color:", ";}", "{", "}"], colors.gray94, colors.gray50, colors.gray45, StyledSelectButtonLabel, colors.gray70, StyledSelectArrow, arrowDown(4, 'gray70'));
|
|
65
|
+
}, function (_ref6) {
|
|
66
|
+
var $error = _ref6.$error,
|
|
67
|
+
$disabled = _ref6.$disabled,
|
|
68
|
+
$loading = _ref6.$loading;
|
|
62
69
|
if ($error && !$disabled) {
|
|
63
70
|
return css(["&,&:hover{border-color:", ";border-color:var(--core-input-error-border-color,", ");}&:hover:focus{", "}"], colors.red50, colors.red50, getFocus());
|
|
64
71
|
}
|
|
65
|
-
}, function (_ref6) {
|
|
66
|
-
var $hasClearIcon = _ref6.$hasClearIcon;
|
|
67
|
-
return css(["", "{opacity:", ";}"], StyledSelectClearIcon, $hasClearIcon ? 1 : 0);
|
|
68
72
|
}, function (_ref7) {
|
|
69
|
-
var $
|
|
73
|
+
var $hasClearIcon = _ref7.$hasClearIcon;
|
|
74
|
+
return css(["gap:", ";"], $hasClearIcon ? "".concat(spacing.xl, "px") : 0);
|
|
75
|
+
}, function (_ref8) {
|
|
76
|
+
var $showClearIcon = _ref8.$showClearIcon;
|
|
77
|
+
return css(["& + ", "{opacity:", ";}"], StyledSelectClearIcon, $showClearIcon ? 1 : 0);
|
|
78
|
+
}, function (_ref9) {
|
|
79
|
+
var $open = _ref9.$open;
|
|
70
80
|
return $open && css(["", "{", "}"], StyledSelectArrow, arrowUp(4, 'gray45'));
|
|
71
|
-
}, tableSelectClassName, function (
|
|
72
|
-
var $open =
|
|
81
|
+
}, tableSelectClassName, function (_ref0) {
|
|
82
|
+
var $open = _ref0.$open;
|
|
73
83
|
return $open && css(["background-color:", ";", "{white-space:nowrap;}", "{opacity:1;pointer-events:all;}"], colors.white, StyledSelectButtonLabel, StyledSelectArrow);
|
|
74
|
-
}, function (
|
|
75
|
-
var $open =
|
|
76
|
-
$
|
|
77
|
-
return $open && $
|
|
78
|
-
}, function (
|
|
79
|
-
var $open =
|
|
80
|
-
|
|
81
|
-
$placeholder =
|
|
84
|
+
}, function (_ref1) {
|
|
85
|
+
var $open = _ref1.$open,
|
|
86
|
+
$showClearIcon = _ref1.$showClearIcon;
|
|
87
|
+
return $open && $showClearIcon && css(["& + ", "{opacity:1;pointer-events:all;}"], StyledSelectClearIcon);
|
|
88
|
+
}, function (_ref10) {
|
|
89
|
+
var $open = _ref10.$open,
|
|
90
|
+
_ref10$$placeholder = _ref10.$placeholder,
|
|
91
|
+
$placeholder = _ref10$$placeholder === void 0 ? false : _ref10$$placeholder;
|
|
82
92
|
return $open && $placeholder && css(["", "{opacity:1;pointer-events:all;}"], StyledSelectButtonLabel);
|
|
83
93
|
});
|
|
84
94
|
//# sourceMappingURL=Select.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.js","names":["styled","css","Button","StyledContent","Card","StyledCircle","getTypographyIntent","arrowDown","arrowUp","borderRadius","colors","getEllipsis","getFocus","spacing","dataQa","focused","hovered","tableSelectClassName","styledSelectButtonDefaultWidth","
|
|
1
|
+
{"version":3,"file":"Select.styles.js","names":["styled","css","Button","StyledContent","Card","StyledCircle","getTypographyIntent","arrowDown","arrowUp","borderRadius","colors","getEllipsis","getFocus","spacing","dataQa","focused","hovered","tableSelectClassName","styledSelectButtonDefaultWidth","StyledSelectButtonWrapper","div","withConfig","displayName","componentId","_ref","$block","concat","StyledSelectMenu","StyledSelectButtonLabel","sm","_ref2","$hoverable","StyledSelectSpinner","StyledSelectArrowContainer","StyledSelectArrow","StyledSelectClearIcon","StyledSelectButton","white","gray50","md","gray15","_ref3","gray45","gray20","blue50","_ref4","_ref4$$placeholder","$placeholder","_ref5","$disabled","gray94","gray70","_ref6","$error","$loading","red50","_ref7","$hasClearIcon","xl","_ref8","$showClearIcon","_ref9","$open","_ref0","_ref1","_ref10","_ref10$$placeholder"],"sources":["../../src/Select/Select.styles.tsx"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { Button } from '../Button'\nimport { StyledContent } from '../Button/Button.styles'\nimport { Card } from '../Card'\nimport { StyledCircle } from '../Spinner/Spinner.styles'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { arrowDown, arrowUp } from '../_styles/arrows'\nimport { borderRadius } from '../_styles/borderRadius'\nimport { colors } from '../_styles/colors'\nimport { getEllipsis, getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\nexport const dataQa = {\n focused: 'core-select-focused',\n hovered: 'core-select-hovered',\n}\n\nexport const tableSelectClassName = 'select--table'\nconst styledSelectButtonDefaultWidth = 248\n\nexport const StyledSelectButtonWrapper = styled.div<{ $block: boolean }>`\n display: inline-block;\n position: relative;\n width: ${({ $block }) =>\n $block ? '100%' : `${styledSelectButtonDefaultWidth}px`};\n`\n\nexport const StyledSelectMenu = styled(Card)`\n display: flex;\n max-height: 40vh;\n max-width: ${styledSelectButtonDefaultWidth}px;\n min-width: inherit;\n`\n\nexport const StyledSelectButtonLabel = styled.div<{ $hoverable: boolean }>`\n ${getEllipsis()}\n flex-grow: 1;\n margin-right: ${spacing.sm}px;\n outline: none;\n pointer-events: ${({ $hoverable }) => ($hoverable ? 'initial' : 'none')};\n user-select: none;\n`\n\nexport const StyledSelectSpinner = styled.div`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n line-height: 0;\n`\n\nexport const StyledSelectArrowContainer = styled.div`\n align-items: center;\n display: inline-flex;\n height: 16px;\n justify-content: flex-end;\n margin-left: ${spacing.sm}px;\n width: 8px;\n`\n\nexport const StyledSelectArrow = styled.div`\n position: relative;\n ${arrowDown(4, 'gray45')}\n`\n\nexport const StyledSelectClearIcon = styled(Button)`\n position: absolute;\n right: 29px;\n top: 50%;\n transform: translateY(-50%);\n\n ${StyledContent} {\n pointer-events: none;\n }\n`\n\nexport const StyledSelectButton = styled.div<{\n $block: boolean\n $disabled: boolean\n $error: boolean\n $loading: boolean\n $open: boolean\n $placeholder?: boolean\n $hasClearIcon?: boolean\n $showClearIcon?: boolean\n}>`\n ${getTypographyIntent('body')}\n\n align-items: center;\n background-color: ${colors.white};\n border-color: ${colors.gray50};\n border-radius: ${borderRadius.md}px;\n border-style: solid;\n border-width: 1px;\n color: ${colors.gray15};\n cursor: pointer;\n display: inline-flex;\n height: 36px;\n min-height: 36px;\n outline: none;\n padding: 0 ${spacing.md}px;\n position: relative;\n white-space: nowrap;\n width: ${({ $block }) =>\n $block ? '100%' : `${styledSelectButtonDefaultWidth}px`};\n\n &::placeholder {\n border-color: ${colors.gray45};\n }\n\n &:hover,\n &:active,\n &[data-qa=${dataQa.hovered}] {\n background-color: ${colors.white};\n border-color: ${colors.gray20};\n color: ${colors.gray15};\n }\n\n &.focus,\n &:focus,\n &[data-qa=${dataQa.focused}],\n ${StyledSelectButtonWrapper}:focus-within & {\n ${getFocus()}\n\n ${StyledCircle} {\n stroke: ${colors.blue50};\n }\n }\n\n ${({ $placeholder = false }) =>\n $placeholder &&\n css`\n ${StyledSelectButtonLabel} {\n color: ${colors.gray45};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n background-color: ${colors.gray94};\n border-color: ${colors.gray50};\n color: ${colors.gray45};\n cursor: default;\n pointer-events: none;\n\n ${StyledSelectButtonLabel} {\n color: ${colors.gray70};\n }\n\n ${StyledSelectArrow} {\n ${arrowDown(4, 'gray70')}\n }\n `}\n\n ${({ $error, $disabled, $loading }) => {\n if ($error && !$disabled) {\n return css`\n &,\n &:hover {\n border-color: ${colors.red50};\n border-color: var(--core-input-error-border-color, ${colors.red50});\n }\n &:hover:focus {\n ${getFocus()}\n }\n `\n }\n }}\n\n ${({ $hasClearIcon }) => css`\n gap: ${$hasClearIcon ? `${spacing.xl}px` : 0};\n `}\n\n ${({ $showClearIcon }) => css`\n & + ${StyledSelectClearIcon} {\n opacity: ${$showClearIcon ? 1 : 0};\n }\n `}\n\n ${({ $open }) =>\n $open &&\n css`\n ${StyledSelectArrow} {\n ${arrowUp(4, 'gray45')}\n }\n `}\n\n &.${tableSelectClassName} {\n ${({ $open }) =>\n $open &&\n css`\n background-color: ${colors.white};\n\n ${StyledSelectButtonLabel} {\n white-space: nowrap;\n }\n\n ${StyledSelectArrow} {\n opacity: 1;\n pointer-events: all;\n }\n `}\n\n ${({ $open, $showClearIcon }) =>\n $open &&\n $showClearIcon &&\n css`\n & + ${StyledSelectClearIcon} {\n opacity: 1;\n pointer-events: all;\n }\n `}\n\n ${({ $open, $placeholder = false }) =>\n $open &&\n $placeholder &&\n css`\n ${StyledSelectButtonLabel} {\n opacity: 1;\n pointer-events: all;\n }\n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AAK,IACL7D,GAAG,iBACCiC,iBAAiB,EACf1B,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAEzB;AAAA,GAECS,oBAAoB,EACpB,UAAA8C,KAAA;EAAA,IAAGD,KAAK,GAAAC,KAAA,CAALD,KAAK;EAAA,OACRA,KAAK,IACL7D,GAAG,yFACmBS,MAAM,CAAC2B,KAAK,EAE9BT,uBAAuB,EAIvBM,iBAAiB,CAIpB;AAAA,GAED,UAAA8B,KAAA;EAAA,IAAGF,KAAK,GAAAE,KAAA,CAALF,KAAK;IAAEF,cAAc,GAAAI,KAAA,CAAdJ,cAAc;EAAA,OACxBE,KAAK,IACLF,cAAc,IACd3D,GAAG,8CACKkC,qBAAqB,CAI5B;AAAA,GAED,UAAA8B,MAAA;EAAA,IAAGH,KAAK,GAAAG,MAAA,CAALH,KAAK;IAAAI,mBAAA,GAAAD,MAAA,CAAElB,YAAY;IAAZA,YAAY,GAAAmB,mBAAA,cAAG,KAAK,GAAAA,mBAAA;EAAA,OAC9BJ,KAAK,IACLf,YAAY,IACZ9C,GAAG,0CACC2B,uBAAuB,CAI1B;AAAA,EAEN"}
|
|
@@ -6,6 +6,7 @@ import type { OverlayTriggerProps } from '../OverlayTrigger';
|
|
|
6
6
|
import type { PortalProps } from '../Portal/Portal.types';
|
|
7
7
|
export declare type SelectPlacement = DropdownPlacement;
|
|
8
8
|
declare type DivProps = React.ComponentPropsWithoutRef<'div'>;
|
|
9
|
+
export declare type TriggerRole = 'combobox' | 'button';
|
|
9
10
|
export interface SelectMenuProps extends Omit<DivProps, 'onSelect' | 'onDragEnd'>, Pick<PortalProps, 'container'> {
|
|
10
11
|
/**
|
|
11
12
|
* @since 10.19.0
|
|
@@ -47,6 +48,10 @@ export interface SelectMenuProps extends Omit<DivProps, 'onSelect' | 'onDragEnd'
|
|
|
47
48
|
* @since 10.19.0
|
|
48
49
|
*/
|
|
49
50
|
menuRef: React.RefObject<MenuRef>;
|
|
51
|
+
/**
|
|
52
|
+
* @since 12.35.1
|
|
53
|
+
*/
|
|
54
|
+
menuId: string;
|
|
50
55
|
}
|
|
51
56
|
export interface SelectOptionProps extends DivProps {
|
|
52
57
|
/**
|
|
@@ -288,5 +293,13 @@ export interface SelectButtonProps extends DivProps {
|
|
|
288
293
|
* @since 10.19.0
|
|
289
294
|
*/
|
|
290
295
|
isMenuOpened?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* @since 12.35.1
|
|
298
|
+
*/
|
|
299
|
+
isListboxOnly?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* @since 12.35.1
|
|
302
|
+
*/
|
|
303
|
+
menuId?: string;
|
|
291
304
|
}
|
|
292
305
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.types.js","names":[],"sources":["../../src/Select/Select.types.ts"],"sourcesContent":["import type { ButtonProps } from '../Button/Button.types'\nimport type { DropdownPlacement } from '../Dropdown/Dropdown.types'\nimport type { MenuProps, MenuRef } from '../MenuImperative/MenuImperative.types'\nimport type { OverlayTriggerProps } from '../OverlayTrigger'\nimport type { PortalProps } from '../Portal/Portal.types'\n\nexport type SelectPlacement = DropdownPlacement\n\ntype DivProps = React.ComponentPropsWithoutRef<'div'>\n\nexport interface SelectMenuProps\n extends Omit<DivProps, 'onSelect' | 'onDragEnd'>,\n Pick<PortalProps, 'container'> {\n /**\n * @since 10.19.0\n */\n emptyMessage?: string\n /**\n * @since 12.15.0\n */\n header?: React.ReactNode\n /**\n * @since 10.19.0\n */\n footer?: React.ReactNode\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 10.19.0\n */\n onClear?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n /**\n * @since 10.19.0\n */\n onScrollBottom?: MenuProps['onScrollBottom']\n /**\n * @since 10.19.0\n */\n onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void\n /**\n * @since 10.19.0\n */\n onSelect?: MenuProps['onSelect']\n /**\n * @since 10.19.0\n */\n optionsRef?: React.RefObject<HTMLDivElement>\n /**\n * @since 10.19.0\n */\n menuRef: React.RefObject<MenuRef>\n}\n\nexport interface SelectOptionProps extends DivProps {\n /**\n * @since 10.19.0\n */\n index?: number\n /**\n * @since 10.19.0\n */\n value: any\n /**\n * @since 10.19.0\n */\n disabled?: boolean\n\n /**\n * Represents the currently selected value. This option will be styled\n * differently as well as receive UX to scroll into view and start list\n * navigation from this element.\n * @since 10.19.0\n */\n selected?: boolean\n\n /**\n * If nothing is selected, suggest this option. Suggested options mimic the\n * UX of a selected option, scroll into view and start list navigation from\n * this element.\n * @since 10.19.0\n */\n suggested?: boolean\n}\n\ninterface QaTags {\n /**\n * @since 10.19.0\n */\n label: string\n /**\n * @since 10.19.0\n */\n clear: string\n}\n\nexport interface SelectProps\n extends Omit<DivProps, 'onSelect'>,\n Pick<PortalProps, 'container'> {\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 /**\n * Make the Select button 100% width\n * @since 10.19.0\n */\n block?: boolean\n\n /**\n * @default false\n * @since 10.19.0\n */\n disabled?: boolean\n\n /**\n * When there are no children this will render\n * @since 10.19.0\n */\n emptyMessage?: string\n\n /**\n * @default false\n * @since 10.19.0\n */\n error?: boolean\n /**\n * @since 12.15.0\n */\n header?: React.ReactNode\n /**\n * @since 10.19.0\n */\n footer?: React.ReactNode\n /**\n * @since 10.19.0\n */\n hideDelay?: number\n /**\n * The i18n key to use for the select's configurable strings.\n * Defaults to using the core library's default strings.\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 10.19.0\n */\n label?: React.ReactNode\n\n /**\n * If the select is loading\n * @default false\n * @since 10.19.0\n */\n loading?: boolean\n\n /**\n * It is possible for this component to have an empty value\n * (render placeholder). Enables the x icon.\n * @since 10.19.0\n */\n onClear?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * Optional `function` that automatically executes when\n * scrolling reaches the last item.\n * @since 10.19.0\n */\n onScrollBottom?: MenuProps['onScrollBottom']\n\n /**\n * Adds a search bar to the select.\n * @since 10.19.0\n */\n onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void\n /**\n * @since 10.19.0\n */\n onSelect?: MenuProps['onSelect']\n /**\n * @since 10.19.0\n */\n optionsRef?: React.RefObject<HTMLDivElement>\n\n /**\n * Renders when the label is blank\n * @since 10.19.0\n */\n placeholder?: string\n\n /**\n * The placement of the overlay\n * @default 'bottom-left'\n * @since 10.19.0\n */\n placement?: SelectPlacement\n /**\n * @since 10.19.0\n */\n qa?: Partial<QaTags>\n\n /**\n * Restore focus to the target after the overlay is hidden.\n * 'core-react' will use internal logic to restore focus,\n * 'react-aria-focus-scope' will use 'FocusScope' component from '@react-aria',\n * true will use both.\n * @default 'core-react'\n * @since 12.11.0\n */\n restoreFocusOnHide?: OverlayTriggerProps['restoreFocusOnHide']\n\n /**\n * @since 10.19.0\n */\n showDelay?: number\n\n /**\n * Configurable tabIndex for the select button\n * @default 0\n * @since 10.19.0\n */\n tabIndex?: number\n}\n\nexport interface SelectButtonProps extends DivProps {\n /**\n * @since 10.19.0\n */\n block?: ButtonProps['block']\n /**\n * @since 10.19.0\n */\n clearRef?: React.RefObject<HTMLButtonElement>\n /**\n * @since 10.19.0\n */\n disabled?: ButtonProps['disabled']\n /**\n * @since 10.19.0\n */\n dropdown?: boolean\n /**\n * @since 10.19.0\n */\n error?: 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 * @since 10.19.0\n */\n icon?: ButtonProps['icon']\n /**\n * @since 10.19.0\n */\n label?: React.ReactNode\n /**\n * @since 10.19.0\n */\n loading?: ButtonProps['loading']\n /**\n * @since 10.19.0\n */\n onClear?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n /**\n * @since 10.19.0\n */\n open?: boolean\n /**\n * @since 10.19.0\n */\n placeholder?: string\n /**\n * @since 10.19.0\n */\n qa?: Partial<QaTags>\n /**\n * @since 10.19.0\n */\n size?: ButtonProps['size']\n /**\n * @since 10.19.0\n */\n tabIndex?: number\n /**\n * @since 10.19.0\n */\n type?: ButtonProps['type']\n /**\n * @since 10.19.0\n */\n variant?: ButtonProps['variant']\n /**\n * @since 10.19.0\n */\n isMenuOpened?: boolean\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Select.types.js","names":[],"sources":["../../src/Select/Select.types.ts"],"sourcesContent":["import type { ButtonProps } from '../Button/Button.types'\nimport type { DropdownPlacement } from '../Dropdown/Dropdown.types'\nimport type { MenuProps, MenuRef } from '../MenuImperative/MenuImperative.types'\nimport type { OverlayTriggerProps } from '../OverlayTrigger'\nimport type { PortalProps } from '../Portal/Portal.types'\n\nexport type SelectPlacement = DropdownPlacement\n\ntype DivProps = React.ComponentPropsWithoutRef<'div'>\n\nexport type TriggerRole = 'combobox' | 'button'\n\nexport interface SelectMenuProps\n extends Omit<DivProps, 'onSelect' | 'onDragEnd'>,\n Pick<PortalProps, 'container'> {\n /**\n * @since 10.19.0\n */\n emptyMessage?: string\n /**\n * @since 12.15.0\n */\n header?: React.ReactNode\n /**\n * @since 10.19.0\n */\n footer?: React.ReactNode\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 10.19.0\n */\n onClear?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n /**\n * @since 10.19.0\n */\n onScrollBottom?: MenuProps['onScrollBottom']\n /**\n * @since 10.19.0\n */\n onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void\n /**\n * @since 10.19.0\n */\n onSelect?: MenuProps['onSelect']\n /**\n * @since 10.19.0\n */\n optionsRef?: React.RefObject<HTMLDivElement>\n /**\n * @since 10.19.0\n */\n menuRef: React.RefObject<MenuRef>\n /**\n * @since 12.35.1\n */\n menuId: string\n}\n\nexport interface SelectOptionProps extends DivProps {\n /**\n * @since 10.19.0\n */\n index?: number\n /**\n * @since 10.19.0\n */\n value: any\n /**\n * @since 10.19.0\n */\n disabled?: boolean\n\n /**\n * Represents the currently selected value. This option will be styled\n * differently as well as receive UX to scroll into view and start list\n * navigation from this element.\n * @since 10.19.0\n */\n selected?: boolean\n\n /**\n * If nothing is selected, suggest this option. Suggested options mimic the\n * UX of a selected option, scroll into view and start list navigation from\n * this element.\n * @since 10.19.0\n */\n suggested?: boolean\n}\n\ninterface QaTags {\n /**\n * @since 10.19.0\n */\n label: string\n /**\n * @since 10.19.0\n */\n clear: string\n}\n\nexport interface SelectProps\n extends Omit<DivProps, 'onSelect'>,\n Pick<PortalProps, 'container'> {\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 /**\n * Make the Select button 100% width\n * @since 10.19.0\n */\n block?: boolean\n\n /**\n * @default false\n * @since 10.19.0\n */\n disabled?: boolean\n\n /**\n * When there are no children this will render\n * @since 10.19.0\n */\n emptyMessage?: string\n\n /**\n * @default false\n * @since 10.19.0\n */\n error?: boolean\n /**\n * @since 12.15.0\n */\n header?: React.ReactNode\n /**\n * @since 10.19.0\n */\n footer?: React.ReactNode\n /**\n * @since 10.19.0\n */\n hideDelay?: number\n /**\n * The i18n key to use for the select's configurable strings.\n * Defaults to using the core library's default strings.\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 10.19.0\n */\n label?: React.ReactNode\n\n /**\n * If the select is loading\n * @default false\n * @since 10.19.0\n */\n loading?: boolean\n\n /**\n * It is possible for this component to have an empty value\n * (render placeholder). Enables the x icon.\n * @since 10.19.0\n */\n onClear?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * Optional `function` that automatically executes when\n * scrolling reaches the last item.\n * @since 10.19.0\n */\n onScrollBottom?: MenuProps['onScrollBottom']\n\n /**\n * Adds a search bar to the select.\n * @since 10.19.0\n */\n onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void\n /**\n * @since 10.19.0\n */\n onSelect?: MenuProps['onSelect']\n /**\n * @since 10.19.0\n */\n optionsRef?: React.RefObject<HTMLDivElement>\n\n /**\n * Renders when the label is blank\n * @since 10.19.0\n */\n placeholder?: string\n\n /**\n * The placement of the overlay\n * @default 'bottom-left'\n * @since 10.19.0\n */\n placement?: SelectPlacement\n /**\n * @since 10.19.0\n */\n qa?: Partial<QaTags>\n\n /**\n * Restore focus to the target after the overlay is hidden.\n * 'core-react' will use internal logic to restore focus,\n * 'react-aria-focus-scope' will use 'FocusScope' component from '@react-aria',\n * true will use both.\n * @default 'core-react'\n * @since 12.11.0\n */\n restoreFocusOnHide?: OverlayTriggerProps['restoreFocusOnHide']\n\n /**\n * @since 10.19.0\n */\n showDelay?: number\n\n /**\n * Configurable tabIndex for the select button\n * @default 0\n * @since 10.19.0\n */\n tabIndex?: number\n}\n\nexport interface SelectButtonProps extends DivProps {\n /**\n * @since 10.19.0\n */\n block?: ButtonProps['block']\n /**\n * @since 10.19.0\n */\n clearRef?: React.RefObject<HTMLButtonElement>\n /**\n * @since 10.19.0\n */\n disabled?: ButtonProps['disabled']\n /**\n * @since 10.19.0\n */\n dropdown?: boolean\n /**\n * @since 10.19.0\n */\n error?: 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 * @since 10.19.0\n */\n icon?: ButtonProps['icon']\n /**\n * @since 10.19.0\n */\n label?: React.ReactNode\n /**\n * @since 10.19.0\n */\n loading?: ButtonProps['loading']\n /**\n * @since 10.19.0\n */\n onClear?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n /**\n * @since 10.19.0\n */\n open?: boolean\n /**\n * @since 10.19.0\n */\n placeholder?: string\n /**\n * @since 10.19.0\n */\n qa?: Partial<QaTags>\n /**\n * @since 10.19.0\n */\n size?: ButtonProps['size']\n /**\n * @since 10.19.0\n */\n tabIndex?: number\n /**\n * @since 10.19.0\n */\n type?: ButtonProps['type']\n /**\n * @since 10.19.0\n */\n variant?: ButtonProps['variant']\n /**\n * @since 10.19.0\n */\n isMenuOpened?: boolean\n /**\n * @since 12.35.1\n */\n isListboxOnly?: boolean\n /**\n * @since 12.35.1\n */\n menuId?: string\n}\n"],"mappings":""}
|
|
@@ -22,10 +22,6 @@ export declare const StyledLabel: import("styled-components/dist/types").IStyled
|
|
|
22
22
|
ref?: ((instance: HTMLObjectElement | null) => void) | React.RefObject<HTMLObjectElement> | null | undefined;
|
|
23
23
|
}>, never> | import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("../Typography/Typography.styles").StyledTypographyProps> & import("../Typography/Typography.styles").StyledTypographyProps, "ref"> & {
|
|
24
24
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
25
|
-
}, Omit<React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, "ref"> & {
|
|
26
|
-
ref?: ((instance: HTMLMapElement | null) => void) | React.RefObject<HTMLMapElement> | null | undefined;
|
|
27
|
-
}>, never> | import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("../Typography/Typography.styles").StyledTypographyProps> & import("../Typography/Typography.styles").StyledTypographyProps, "ref"> & {
|
|
28
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
29
25
|
}, Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
|
|
30
26
|
ref?: ((instance: HTMLHeadingElement | null) => void) | React.RefObject<HTMLHeadingElement> | null | undefined;
|
|
31
27
|
}>, never> | import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("../Typography/Typography.styles").StyledTypographyProps> & import("../Typography/Typography.styles").StyledTypographyProps, "ref"> & {
|
|
@@ -206,6 +202,10 @@ export declare const StyledLabel: import("styled-components/dist/types").IStyled
|
|
|
206
202
|
ref?: ((instance: HTMLLinkElement | null) => void) | React.RefObject<HTMLLinkElement> | null | undefined;
|
|
207
203
|
}>, never> | import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("../Typography/Typography.styles").StyledTypographyProps> & import("../Typography/Typography.styles").StyledTypographyProps, "ref"> & {
|
|
208
204
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
205
|
+
}, Omit<React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, "ref"> & {
|
|
206
|
+
ref?: ((instance: HTMLMapElement | null) => void) | React.RefObject<HTMLMapElement> | null | undefined;
|
|
207
|
+
}>, never> | import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("../Typography/Typography.styles").StyledTypographyProps> & import("../Typography/Typography.styles").StyledTypographyProps, "ref"> & {
|
|
208
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
209
209
|
}, Omit<React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, "ref"> & {
|
|
210
210
|
ref?: ((instance: HTMLMetaElement | null) => void) | React.RefObject<HTMLMetaElement> | null | undefined;
|
|
211
211
|
}>, never> | import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("../Typography/Typography.styles").StyledTypographyProps> & import("../Typography/Typography.styles").StyledTypographyProps, "ref"> & {
|
|
@@ -5,15 +5,15 @@ import { colors } from '../_styles/colors';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledH1 = /*#__PURE__*/styled.h1.withConfig({
|
|
7
7
|
displayName: "StyledH1",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_38_0__sc-172j5qh-0"
|
|
9
9
|
})(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h1'));
|
|
10
10
|
export var StyledH2 = /*#__PURE__*/styled.h2.withConfig({
|
|
11
11
|
displayName: "StyledH2",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_38_0__sc-172j5qh-1"
|
|
13
13
|
})(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h2'));
|
|
14
14
|
export var StyledH3 = /*#__PURE__*/styled.h3.withConfig({
|
|
15
15
|
displayName: "StyledH3",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_38_0__sc-172j5qh-2"
|
|
17
17
|
})(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h3'));
|
|
18
18
|
var topMarginRules = function topMarginRules() {
|
|
19
19
|
return css(["& + &,p + &,ol + &,ul + &{margin-top:", "px;}"], spacing.lg);
|
|
@@ -28,11 +28,11 @@ export function getSmallIconBodyTextRules() {
|
|
|
28
28
|
}
|
|
29
29
|
export var StyledP = /*#__PURE__*/styled.p.withConfig({
|
|
30
30
|
displayName: "StyledP",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_38_0__sc-172j5qh-3"
|
|
32
32
|
})(["color:", ";", " ", " ", ""], colors.gray15, getTypographyIntent('body'), topMarginRules, semiboldRules);
|
|
33
33
|
export var StyledUL = /*#__PURE__*/styled.ul.withConfig({
|
|
34
34
|
displayName: "StyledUL",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_38_0__sc-172j5qh-4"
|
|
36
36
|
})(["color:", ";margin:0;padding:0;", " ", " padding-left:", "px;list-style-type:", ";"], colors.gray15, getTypographyIntent('body'), topMarginRules, spacing.lg, function (props) {
|
|
37
37
|
return props.$listStyleType || 'disc';
|
|
38
38
|
});
|
|
@@ -40,7 +40,7 @@ export var StyledOL = /*#__PURE__*/styled(StyledUL).attrs({
|
|
|
40
40
|
as: 'ol'
|
|
41
41
|
}).withConfig({
|
|
42
42
|
displayName: "StyledOL",
|
|
43
|
-
componentId: "core-
|
|
43
|
+
componentId: "core-12_38_0__sc-172j5qh-5"
|
|
44
44
|
})(["list-style-type:", ";"], function (props) {
|
|
45
45
|
return props.$listStyleType || 'decimal';
|
|
46
46
|
});
|
|
@@ -51,7 +51,7 @@ export var StyledLabel = /*#__PURE__*/styled(StyledTypography).attrs(function (p
|
|
|
51
51
|
};
|
|
52
52
|
}).withConfig({
|
|
53
53
|
displayName: "StyledLabel",
|
|
54
|
-
componentId: "core-
|
|
54
|
+
componentId: "core-12_38_0__sc-172j5qh-6"
|
|
55
55
|
})(["", " ", " > ", "{margin-left:", "px;vertical-align:top;}"], function (_ref) {
|
|
56
56
|
var _ref$$block = _ref.$block,
|
|
57
57
|
$block = _ref$$block === void 0 ? false : _ref$$block;
|
|
@@ -69,7 +69,7 @@ export function getUnstyledButton() {
|
|
|
69
69
|
*/
|
|
70
70
|
export var StyledUnstyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
71
71
|
displayName: "StyledUnstyledButton",
|
|
72
|
-
componentId: "core-
|
|
72
|
+
componentId: "core-12_38_0__sc-172j5qh-7"
|
|
73
73
|
})(["", ""], getUnstyledButton);
|
|
74
74
|
|
|
75
75
|
/**
|
|
@@ -77,6 +77,6 @@ export var StyledUnstyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
77
77
|
*/
|
|
78
78
|
export var StyledAnchor = /*#__PURE__*/styled.a.withConfig({
|
|
79
79
|
displayName: "StyledAnchor",
|
|
80
|
-
componentId: "core-
|
|
80
|
+
componentId: "core-12_38_0__sc-172j5qh-8"
|
|
81
81
|
})([""]);
|
|
82
82
|
//# sourceMappingURL=Semantic.styles.js.map
|
|
@@ -21,13 +21,13 @@ var getTrackBackgroundDisabled = function getTrackBackgroundDisabled(percent) {
|
|
|
21
21
|
var getThumbDisabledStyles = /*#__PURE__*/css(["cursor:not-allowed;border:2px solid ", ";"], colors.blue85);
|
|
22
22
|
export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledContainer",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_38_0__sc-12icguw-0"
|
|
25
25
|
})(["position:relative;", ";"], function (props) {
|
|
26
26
|
return props.$showLabel && 'padding-bottom: 10px';
|
|
27
27
|
});
|
|
28
28
|
export var StyledSlider = /*#__PURE__*/styled.input.withConfig({
|
|
29
29
|
displayName: "StyledSlider",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_38_0__sc-12icguw-1"
|
|
31
31
|
})(["-webkit-appearance:none;margin:0;padding-top:5px;padding-bottom:5px;width:100%;border:1px solid transparent;background-color:transparent;font-size:12px;&:focus{outline:none;", ";padding-top:5px;padding-bottom:5px;border-radius:2px;}&::-webkit-slider-runnable-track{", " ", "}&:disabled::-webkit-slider-runnable-track{cursor:not-allowed;", "}&::-webkit-slider-thumb{", " -webkit-appearance:none;margin-top:-5px;}&:disabled::-webkit-slider-thumb{", "}&::-moz-range-track{", " ", "}&:disabled::-moz-range-track{cursor:not-allowed;", "}&::-moz-range-thumb{", " height:12px;width:12px;}&:disabled::-moz-range-thumb{", "}&::-ms-track{", " height:", "px;color:transparent;", "}&:disabled::-ms-track{cursor:not-allowed;", "}&::-ms-fill-lower{background:", ";border:0px solid ", ";border-radius:2px;box-shadow:1px 1px 1px ", ";}&::-ms-fill-upper{background:", ";border:0px solid ", ";border-radius:2px;box-shadow:1px 1px 1px ", ";}&::-ms-thumb{", "}&:disabled::-ms-thumb{", "}&:focus::-ms-fill-lower{background:", ";}&:focus::-ms-fill-upper{background:", ";}"], function (props) {
|
|
32
32
|
return props.$isDragging ? "border: 1px solid transparent" : "border: 1px solid ".concat(colors.blue40);
|
|
33
33
|
}, getTrackStyles, function (props) {
|
|
@@ -45,14 +45,14 @@ export var StyledSlider = /*#__PURE__*/styled.input.withConfig({
|
|
|
45
45
|
}, colors.blue50, colors.black, colors.black, colors.gray70, colors.black, colors.black, getThumbStyles, getThumbDisabledStyles, colors.blue50, colors.gray70);
|
|
46
46
|
export var StyledIncrementOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
47
47
|
displayName: "StyledIncrementOverlay",
|
|
48
|
-
componentId: "core-
|
|
48
|
+
componentId: "core-12_38_0__sc-12icguw-2"
|
|
49
49
|
})(["position:relative;width:0;&::before{content:'';height:", "px;width:2px;background-color:white;display:block;}z-index:2;"], TRACK_HEIGHT);
|
|
50
50
|
export var StyledIncrementContainer = /*#__PURE__*/styled.div.withConfig({
|
|
51
51
|
displayName: "StyledIncrementContainer",
|
|
52
|
-
componentId: "core-
|
|
52
|
+
componentId: "core-12_38_0__sc-12icguw-3"
|
|
53
53
|
})(["position:absolute;display:flex;justify-content:space-between;top:6px;", " left:5px;right:5px;> :first-child{visibility:hidden;}> :last-child{visibility:hidden;}"], applyStylesOnlyToFF("\n top: 12px;\n "));
|
|
54
54
|
export var StyledLabel = /*#__PURE__*/styled(Typography).withConfig({
|
|
55
55
|
displayName: "StyledLabel",
|
|
56
|
-
componentId: "core-
|
|
56
|
+
componentId: "core-12_38_0__sc-12icguw-4"
|
|
57
57
|
})(["visibility:visible;position:absolute;left:50%;transform:translateX(-50%);margin-top:8px;"]);
|
|
58
58
|
//# sourceMappingURL=Slider.styles.js.map
|