@procore/core-react 12.17.3 → 12.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnchorNavigation/AnchorNavigation.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/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/Calendar/Calendar.styles.js +8 -8
- 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.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.js +1 -1
- package/dist/Dropdown/Dropdown.js.map +1 -1
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.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.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.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.d.ts +1 -0
- package/dist/Form/Form.js +2 -0
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.d.ts +2 -0
- package/dist/Form/Form.styles.js +15 -14
- package/dist/Form/Form.styles.js.map +1 -1
- package/dist/Form/Form.types.d.ts +30 -1
- package/dist/Form/Form.types.js.map +1 -1
- package/dist/Form/StyledFormikForm.styles.d.ts +1 -0
- package/dist/Form/StyledFormikForm.styles.js +4 -2
- package/dist/Form/StyledFormikForm.styles.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/Link/Link.types.d.ts +3 -0
- package/dist/Link/Link.types.js.map +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/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 +2 -2
- 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.js +5 -4
- package/dist/SegmentedController/SegmentedController.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.styles.d.ts +1 -1
- package/dist/SegmentedController/SegmentedController.styles.js +8 -8
- package/dist/SegmentedController/SegmentedController.styles.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.types.d.ts +10 -1
- package/dist/SegmentedController/SegmentedController.types.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.d.ts +2 -2
- package/dist/Spinner/Spinner.js +4 -2
- package/dist/Spinner/Spinner.js.map +1 -1
- package/dist/Spinner/Spinner.styles.d.ts +1 -1
- package/dist/Spinner/Spinner.styles.js +17 -11
- package/dist/Spinner/Spinner.styles.js.map +1 -1
- package/dist/Spinner/Spinner.types.d.ts +6 -5
- package/dist/Spinner/Spinner.types.js.map +1 -1
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/Tabs.js +14 -12
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +2 -2
- package/dist/Tabs/Tabs.styles.js +28 -28
- package/dist/Tabs/Tabs.styles.js.map +1 -1
- package/dist/Tabs/Tabs.types.d.ts +8 -1
- 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.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TierSelectionTieredSelect.js +32 -7
- package/dist/TieredSelect/TierSelectionTieredSelect.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.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/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +12 -12
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
- package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +749 -744
- 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 +7 -5
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +28 -28
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +19 -19
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +37 -23
- package/dist/_typedoc/Select/Select.types.json +60 -60
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +16 -16
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +101 -101
- package/dist/_typedoc/Tabs/Tabs.types.json +34 -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 +9 -9
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.styles.js","names":["styled","css","Card","StyledItem","getTypographyIntent","colors","spacing","hiddenTab","visible","borderRadius","xs","StyledTabBase","div","withConfig","displayName","componentId","StyledTabInnerBase","StyledDropdownTabBase","getTabStyle","xl","_ref","$active","gray15","_ref2","$dark","gray90","blue40","StyledTab","StyledTabInner","_ref3","_ref4","white","gray70","StyledDropdownTab","StyledDropdownTabInner","StyledLink","span","getHelixHeaderTabStyles","sm","blue70","_ref5","gray30","StyledGlobalNavigationTab","StyledGlobalNavigationDropdownTab","StyledGlobalNavigationDropdownTabInner","StyledGlobalNavigationLink","StyledOverlay","blue50","StyledTabList","StyledTabs","nav","_ref6","_ref7","index","_ref8","_ref8$index","getStyledComponents","helixHeader","arguments","length","undefined","Tab","TabInner","Link","DropdownTab","DropdownTabInner"],"sources":["../../src/Tabs/Tabs.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { Card } from '../Card/Card'\nimport { StyledItem } from '../MenuImperative/MenuImperative.styles'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\ntype TabStyleProps = {\n $active?: boolean\n $dark?: boolean\n}\n\nconst hiddenTab = css`\n pointer-events: none;\n position: absolute;\n visibility: hidden;\n`\n\nconst visible = css`\n pointer-events: all;\n position: relative;\n visibility: visible;\n`\n\nconst borderRadius = css`\n border-radius: ${spacing.xs}px ${spacing.xs}px 0 0;\n`\n\n//// START BASE LAYOUT COMPONENTS FOR TABS ////\n\n/**\n * Elements to handle general layout and browser resets.\n * Will be the referencable element (class) other selectors\n * that need to target general layout references.\n */\nconst StyledTabBase = styled.div<TabStyleProps>`\n align-items: center;\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n flex: 0 0 auto;\n justify-content: center;\n position: relative;\n white-space: nowrap;\n\n // Browser button and anchor style resets\n text-decoration: none;\n background-color: transparent;\n border: none;\n font-family: inherit;\n padding: 0;\n`\n\nconst StyledTabInnerBase = styled.div<TabStyleProps>`\n align-self: baseline;\n box-sizing: border-box;\n\n &,\n > a {\n display: flex;\n text-decoration: none;\n width: 100%;\n }\n`\n\n// This so that it can be visible/hidden via CSS down below\nconst StyledDropdownTabBase = styled(StyledTabBase)`\n ${hiddenTab}\n`\n\n//// END BASE LAYOUT COMPONENTS FOR TABS ////\n\n//// START TRADITIONAL DESIGN SYSTEM TAB STYLES ////\n\n/**\n * Styles specific to the Design System general cases (not Global nav)\n */\nfunction getTabStyle() {\n return css<TabStyleProps>`\n ${borderRadius}\n height: 26px;\n\n & + ${StyledTabBase} {\n margin-left: ${spacing.xl}px;\n }\n\n a& {\n ${borderRadius}\n }\n\n &,\n a&,\n button& {\n ${({ $active }) => {\n if ($active) {\n return css`\n border-bottom: 3px solid ${colors.gray15};\n `\n }\n }}\n }\n\n &:focus,\n &:focus-within,\n &:hover {\n background: ${({ $dark }) => ($dark ? 'transparent' : colors.gray90)};\n }\n\n &:focus,\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${colors.blue40};\n outline: none;\n\n a {\n outline: none;\n }\n }\n `\n}\n\nconst StyledTab = styled(StyledTabBase)<TabStyleProps>`\n ${getTabStyle}\n`\n\nconst StyledTabInner = styled(StyledTabInnerBase)<TabStyleProps>`\n ${getTypographyIntent('body')}\n\n padding: 0 ${spacing.xs}px;\n font-weight: ${({ $active }) => ($active ? 600 : 400)};\n\n &,\n > a {\n ${borderRadius}\n color: ${colors.gray15};\n height: 23px;\n }\n\n /* TODO: Dark mode was not considered for helix updates,\n * matching previous UX patterns - April 2nd 2024\n */\n ${({ $active, $dark }) => {\n if ($dark) {\n return css`\n &,\n > a,\n button&,\n a& {\n color: ${$active ? colors.white : colors.gray70};\n\n &:hover {\n color: white;\n }\n }\n `\n }\n }}\n`\n\nconst StyledDropdownTab = styled(StyledDropdownTabBase)`\n ${getTabStyle}\n`\n\nconst StyledDropdownTabInner = styled(StyledTabInner)`\n align-items: center;\n cursor: pointer;\n display: inline-flex;\n`\n\nconst StyledLink = styled.span`\n align-items: center;\n display: flex;\n height: 23px; // TODO one-off\n ${borderRadius}\n box-sizing: border-box;\n`\n\n//// END TRADITIONAL DESIGN SYSTEM TAB STYLES ////\n\n//// START HELIX GLOBAL NAVIGATION TAB STYLES ////\n\nfunction getHelixHeaderTabStyles() {\n return css<TabStyleProps>`\n border-radius: 4px;\n color: ${colors.white};\n height: 24px;\n overflow: hidden;\n padding: ${spacing.xs}px;\n text-align: center;\n\n ${getTypographyIntent('small')};\n font-weight: 600; // Different than typograhy intent small, must be defined after\n\n & + ${StyledTabBase} {\n margin-left: ${spacing.sm}px;\n }\n\n &:hover {\n background: rgba(117, 131, 138, 0.3);\n color: ${colors.white};\n text-decoration: none;\n }\n\n &:focus {\n outline: 2px solid ${colors.blue70};\n outline-offset: -2px;\n background: rgba(117, 131, 138, 0.3);\n }\n\n ${({ $active }) => {\n if ($active) {\n return css`\n background: ${colors.gray30};\n `\n }\n }}\n `\n}\n\nconst StyledGlobalNavigationTab = styled(StyledTabBase)`\n ${getHelixHeaderTabStyles}\n`\n\nconst StyledGlobalNavigationDropdownTab = styled(StyledDropdownTabBase)`\n ${getHelixHeaderTabStyles}\n`\n\nconst StyledGlobalNavigationDropdownTabInner = styled(StyledTabInnerBase)`\n align-items: center;\n cursor: pointer;\n display: inline-flex;\n`\n\nconst StyledGlobalNavigationLink = styled.span`\n padding-left: 6px;\n padding-right: 6px;\n`\n\n//// END HELIX GLOBAL NAVIGATION TAB STYLES ////\n\nexport const StyledOverlay = styled(Card)`\n max-height: 40vh;\n\n ${StyledItem} {\n padding: 0;\n display: flex;\n justify-content: center;\n\n a {\n margin: unset;\n padding: unset;\n }\n }\n\n ${StyledLink} {\n padding: 0;\n display: flex;\n }\n\n ${StyledTabInnerBase} {\n // unsure why top and bottom are not uniform\n // design docs show uniform 4px\n padding: 2px 16px 4px 16px;\n }\n\n ${StyledLink},\n ${StyledTabBase} {\n color: ${colors.gray15};\n border-radius: 0;\n display: flex;\n width: 100%;\n\n background: inherit;\n font-weight: inherit;\n font-size: inherit;\n padding: 0;\n }\n\n [data-selected='true'] {\n ${StyledLink}, ${StyledTabBase} {\n border-bottom-color: transparent;\n color: ${colors.blue50};\n }\n }\n`\n\nexport const StyledTabList = styled.div`\n display: flex;\n width: 100%;\n`\n\nexport const StyledTabs = styled.nav<{\n $dark?: boolean\n index?: number\n}>`\n background-color: ${({ $dark }) => $dark && colors.gray15};\n display: flex;\n overflow: hidden;\n width: 100%;\n\n ${StyledTabBase} {\n // we want to hide all tabs after overflow index\n &:nth-child(1n + ${({ index }) => index}) {\n // but not the \"More\" dropdown tab\n &:not(${StyledDropdownTabBase}) {\n ${hiddenTab}\n }\n }\n }\n\n ${({ index = -1 }) =>\n index >= 0 &&\n css`\n ${StyledDropdownTabBase} {\n ${visible}\n }\n `}\n`\n\n/**\n * Switches between different Tab styles of traditional and helix header navigation.\n * Allows separate style CSS without conditionals across all the components.\n * @returns Subcomponents to render\n */\nexport function getStyledComponents(helixHeader = false) {\n if (helixHeader) {\n return {\n Tab: StyledGlobalNavigationTab,\n TabInner: StyledTabInnerBase,\n Link: StyledGlobalNavigationLink,\n DropdownTab: StyledGlobalNavigationDropdownTab,\n DropdownTabInner: StyledGlobalNavigationDropdownTabInner,\n }\n }\n return {\n Tab: StyledTab,\n TabInner: StyledTabInner,\n Link: StyledLink,\n DropdownTab: StyledDropdownTab,\n DropdownTabInner: StyledDropdownTabInner,\n }\n}\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,UAAU,QAAQ,yCAAyC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EM,UAAAyC,KAAA;EAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK;EAAA,OAAOA,KAAK;AAAA,GAE7BpC,qBAAqB,EACzBV,SAAS,EAKf,UAAA+C,KAAA;EAAA,IAAAC,WAAA,GAAAD,KAAA,CAAGD,KAAK;IAALA,KAAK,GAAAE,WAAA,cAAG,CAAC,CAAC,GAAAA,WAAA;EAAA,OACbF,KAAK,IAAI,CAAC,IACVpD,GAAG,iBACCgB,qBAAqB,EACnBT,OAAO,CAEZ;AAAA,EACJ;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,SAASgD,mBAAmBA,CAAA,EAAsB;EAAA,IAArBC,WAAW,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EACrD,IAAID,WAAW,EAAE;IACf,OAAO;MACLI,GAAG,EAAEnB,yBAAyB;MAC9BoB,QAAQ,EAAE9C,kBAAkB;MAC5B+C,IAAI,EAAElB,0BAA0B;MAChCmB,WAAW,EAAErB,iCAAiC;MAC9CsB,gBAAgB,EAAErB;IACpB,CAAC;EACH;EACA,OAAO;IACLiB,GAAG,EAAElC,SAAS;IACdmC,QAAQ,EAAElC,cAAc;IACxBmC,IAAI,EAAE5B,UAAU;IAChB6B,WAAW,EAAE/B,iBAAiB;IAC9BgC,gBAAgB,EAAE/B;EACpB,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"Tabs.styles.js","names":["styled","css","Card","StyledItem","getTypographyIntent","colors","spacing","hiddenTab","visible","borderRadius","xs","StyledTabBase","div","withConfig","displayName","componentId","StyledTabInnerBase","StyledDropdownTabBase","getTabStyle","xl","_ref","$selected","gray15","_ref2","$dark","gray90","blue40","StyledTab","StyledTabInner","_ref3","_ref4","white","gray70","StyledDropdownTab","StyledDropdownTabInner","StyledLink","span","getHelixHeaderTabStyles","sm","blue70","_ref5","gray30","StyledGlobalNavigationTab","StyledGlobalNavigationDropdownTab","StyledGlobalNavigationDropdownTabInner","StyledGlobalNavigationLink","StyledOverlay","blue50","StyledTabList","StyledTabs","nav","_ref6","_ref7","index","_ref8","_ref8$index","getStyledComponents","helixHeader","arguments","length","undefined","Tab","TabInner","Link","DropdownTab","DropdownTabInner"],"sources":["../../src/Tabs/Tabs.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { Card } from '../Card'\nimport { StyledItem } from '../MenuImperative/MenuImperative.styles'\nimport { getTypographyIntent } from '../Typography'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\ntype TabStyleProps = {\n $selected?: boolean\n $dark?: boolean\n}\n\nconst hiddenTab = css`\n pointer-events: none;\n position: absolute;\n visibility: hidden;\n`\n\nconst visible = css`\n pointer-events: all;\n position: relative;\n visibility: visible;\n`\n\nconst borderRadius = css`\n border-radius: ${spacing.xs}px ${spacing.xs}px 0 0;\n`\n\n//// START BASE LAYOUT COMPONENTS FOR TABS ////\n\n/**\n * Elements to handle general layout and browser resets.\n * Will be the referencable element (class) other selectors\n * that need to target general layout references.\n */\nconst StyledTabBase = styled.div<TabStyleProps>`\n align-items: center;\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n flex: 0 0 auto;\n justify-content: center;\n position: relative;\n white-space: nowrap;\n\n // Browser button and anchor style resets\n text-decoration: none;\n background-color: transparent;\n border: none;\n font-family: inherit;\n padding: 0;\n`\n\nconst StyledTabInnerBase = styled.div<TabStyleProps>`\n align-self: baseline;\n box-sizing: border-box;\n\n &,\n > a {\n display: flex;\n text-decoration: none;\n width: 100%;\n }\n`\n\n// This so that it can be visible/hidden via CSS down below\nconst StyledDropdownTabBase = styled(StyledTabBase)`\n ${hiddenTab}\n`\n\n//// END BASE LAYOUT COMPONENTS FOR TABS ////\n\n//// START TRADITIONAL DESIGN SYSTEM TAB STYLES ////\n\n/**\n * Styles specific to the Design System general cases (not Global nav)\n */\nfunction getTabStyle() {\n return css<TabStyleProps>`\n ${borderRadius};\n height: 26px;\n\n & + ${StyledTabBase} {\n margin-left: ${spacing.xl}px;\n }\n\n a& {\n ${borderRadius}\n }\n\n &,\n a&,\n button& {\n ${({ $selected }) => {\n if ($selected) {\n return css`\n border-bottom: 3px solid ${colors.gray15};\n `\n }\n }}\n }\n\n &:focus,\n &:focus-within,\n &:hover {\n background: ${({ $dark }) => ($dark ? 'transparent' : colors.gray90)};\n }\n\n &:focus,\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${colors.blue40};\n outline: none;\n\n a {\n outline: none;\n }\n }\n `\n}\n\nconst StyledTab = styled(StyledTabBase)<TabStyleProps>`\n ${getTabStyle}\n`\n\nconst StyledTabInner = styled(StyledTabInnerBase)<TabStyleProps>`\n ${getTypographyIntent('body')}\n\n padding: 0 ${spacing.xs}px;\n font-weight: ${({ $selected }) => ($selected ? 600 : 400)};\n\n &,\n > a {\n ${borderRadius};\n color: ${colors.gray15};\n height: 23px;\n }\n\n /* TODO: Dark mode was not considered for helix updates,\n * matching previous UX patterns - April 2nd 2024\n */\n ${({ $selected, $dark }) => {\n if ($dark) {\n return css`\n &,\n > a,\n button&,\n a& {\n color: ${$selected ? colors.white : colors.gray70};\n\n &:hover {\n color: white;\n }\n }\n `\n }\n }}\n`\n\nconst StyledDropdownTab = styled(StyledDropdownTabBase)`\n ${getTabStyle}\n`\n\nconst StyledDropdownTabInner = styled(StyledTabInner)`\n align-items: center;\n cursor: pointer;\n display: inline-flex;\n`\n\nconst StyledLink = styled.span`\n align-items: center;\n display: flex;\n height: 23px; // TODO one-off\n ${borderRadius};\n box-sizing: border-box;\n`\n\n//// END TRADITIONAL DESIGN SYSTEM TAB STYLES ////\n\n//// START HELIX GLOBAL NAVIGATION TAB STYLES ////\n\nfunction getHelixHeaderTabStyles() {\n return css<TabStyleProps>`\n border-radius: 4px;\n color: ${colors.white};\n height: 24px;\n overflow: hidden;\n padding: ${spacing.xs}px;\n text-align: center;\n\n ${getTypographyIntent('small')};\n font-weight: 600; // Different than typograhy intent small, must be defined after\n\n & + ${StyledTabBase} {\n margin-left: ${spacing.sm}px;\n }\n\n &:hover {\n background: rgba(117, 131, 138, 0.3);\n color: ${colors.white};\n text-decoration: none;\n }\n\n &:focus {\n outline: 2px solid ${colors.blue70};\n outline-offset: -2px;\n background: rgba(117, 131, 138, 0.3);\n }\n\n ${({ $selected }) => {\n if ($selected) {\n return css`\n background: ${colors.gray30};\n `\n }\n }}\n `\n}\n\nconst StyledGlobalNavigationTab = styled(StyledTabBase)`\n ${getHelixHeaderTabStyles}\n`\n\nconst StyledGlobalNavigationDropdownTab = styled(StyledDropdownTabBase)`\n ${getHelixHeaderTabStyles}\n`\n\nconst StyledGlobalNavigationDropdownTabInner = styled(StyledTabInnerBase)`\n align-items: center;\n cursor: pointer;\n display: inline-flex;\n`\n\nconst StyledGlobalNavigationLink = styled.span`\n padding-left: 6px;\n padding-right: 6px;\n`\n\n//// END HELIX GLOBAL NAVIGATION TAB STYLES ////\n\nexport const StyledOverlay = styled(Card)`\n max-height: 40vh;\n\n ${StyledItem} {\n padding: 0;\n display: flex;\n justify-content: center;\n\n a {\n margin: unset;\n padding: unset;\n }\n }\n\n ${StyledLink} {\n padding: 0;\n display: flex;\n }\n\n ${StyledTabInnerBase} {\n // unsure why top and bottom are not uniform\n // design docs show uniform 4px\n padding: 2px 16px 4px 16px;\n }\n\n ${StyledLink},\n ${StyledTabBase} {\n color: ${colors.gray15};\n border-radius: 0;\n display: flex;\n width: 100%;\n\n background: inherit;\n font-weight: inherit;\n font-size: inherit;\n padding: 0;\n }\n\n [data-selected='true'] {\n ${StyledLink}, ${StyledTabBase} {\n border-bottom-color: transparent;\n color: ${colors.blue50};\n }\n }\n`\n\nexport const StyledTabList = styled.div`\n display: flex;\n width: 100%;\n`\n\nexport const StyledTabs = styled.nav<{\n $dark?: boolean\n index?: number\n}>`\n background-color: ${({ $dark }) => $dark && colors.gray15};\n display: flex;\n overflow: hidden;\n width: 100%;\n\n ${StyledTabBase} {\n // we want to hide all tabs after overflow index\n &:nth-child(1n + ${({ index }) => index}) {\n // but not the \"More\" dropdown tab\n &:not(${StyledDropdownTabBase}) {\n ${hiddenTab}\n }\n }\n }\n\n ${({ index = -1 }) =>\n index >= 0 &&\n css`\n ${StyledDropdownTabBase} {\n ${visible}\n }\n `}\n`\n\n/**\n * Switches between different Tab styles of traditional and helix header navigation.\n * Allows separate style CSS without conditionals across all the components.\n * @returns Subcomponents to render\n */\nexport function getStyledComponents(helixHeader = false) {\n if (helixHeader) {\n return {\n Tab: StyledGlobalNavigationTab,\n TabInner: StyledTabInnerBase,\n Link: StyledGlobalNavigationLink,\n DropdownTab: StyledGlobalNavigationDropdownTab,\n DropdownTabInner: StyledGlobalNavigationDropdownTabInner,\n }\n }\n return {\n Tab: StyledTab,\n TabInner: StyledTabInner,\n Link: StyledLink,\n DropdownTab: StyledDropdownTab,\n DropdownTabInner: StyledDropdownTabInner,\n }\n}\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,UAAU,QAAQ,yCAAyC;AACpE,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAO5C,IAAMC,SAAS,gBAAGN,GAAG,8DAIpB;AAED,IAAMO,OAAO,gBAAGP,GAAG,8DAIlB;AAED,IAAMQ,YAAY,gBAAGR,GAAG,uCACLK,OAAO,CAACI,EAAE,EAAMJ,OAAO,CAACI,EAAE,CAC5C;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAMC,aAAa,gBAAGX,MAAM,CAACY,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0PAgB/B;AAED,IAAMC,kBAAkB,gBAAGhB,MAAM,CAACY,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sGAUpC;;AAED;AACA,IAAME,qBAAqB,gBAAGjB,MAAM,CAACW,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AC9BoB,QAAQ,EAAE9C,kBAAkB;MAC5B+C,IAAI,EAAElB,0BAA0B;MAChCmB,WAAW,EAAErB,iCAAiC;MAC9CsB,gBAAgB,EAAErB;IACpB,CAAC;EACH;EACA,OAAO;IACLiB,GAAG,EAAElC,SAAS;IACdmC,QAAQ,EAAElC,cAAc;IACxBmC,IAAI,EAAE5B,UAAU;IAChB6B,WAAW,EAAE/B,iBAAiB;IAC9BgC,gBAAgB,EAAE/B;EACpB,CAAC;AACH"}
|
|
@@ -27,8 +27,15 @@ export interface BaseTabProps extends Props {
|
|
|
27
27
|
/**
|
|
28
28
|
* The tab is active
|
|
29
29
|
* @since 10.19.0
|
|
30
|
+
* @deprecated Please use `selected` instead
|
|
31
|
+
* @deprecatedSince 12.18.0
|
|
30
32
|
*/
|
|
31
33
|
active?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The tab is selected
|
|
36
|
+
* @since 12.18.0
|
|
37
|
+
*/
|
|
38
|
+
selected?: boolean;
|
|
32
39
|
/**
|
|
33
40
|
* Whether or not tab is in dark mode
|
|
34
41
|
* @private
|
|
@@ -64,7 +71,7 @@ export interface BaseTabProps extends Props {
|
|
|
64
71
|
*/
|
|
65
72
|
overflowing?: boolean;
|
|
66
73
|
/**
|
|
67
|
-
* @deprecated please use the `
|
|
74
|
+
* @deprecated please use the `selected` props to configure style. The
|
|
68
75
|
* `dropdown`, `hover`, and `overflowing` variants were only for internal use
|
|
69
76
|
* and should not be used in clients
|
|
70
77
|
* @deprecatedSince 11
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.types.js","names":["tabVariant","none","active","dark","dropdown","hover","overflowing"],"sources":["../../src/Tabs/Tabs.types.ts"],"sourcesContent":["import type { AriaButtonProps } from '@react-aria/button'\nimport type React from 'react'\nimport type { Polymorphic } from '../_utils/polymorphic'\nimport type { Props } from '../_utils/types'\n\nexport type TabRoleType = 'link' | 'button'\n\nexport interface TabPolyMap extends Record<TabRoleType, React.ElementType> {\n button: 'button'\n link: 'a'\n}\n\nexport type TabRole = TabRoleType | undefined\n\nexport type TabRef<Role extends TabRole = undefined> = Role extends TabRoleType\n ? Polymorphic.Ref<TabPolyMap, Role>\n : React.ComponentPropsWithRef<'div'>['ref']\n\nexport type TabProps<Role extends TabRole = undefined> = Role extends 'link'\n ? Polymorphic.ComponentPropsWithRef<TabPolyMap, 'link', 'href', BaseTabProps>\n : Role extends 'button'\n ? Polymorphic.ComponentPropsWithRef<\n TabPolyMap,\n 'button',\n never,\n BaseTabProps & { onPress: AriaButtonProps['onPress'] }\n >\n : BaseTabProps & { ref?: TabRef<undefined> }\n\nexport const tabVariant = {\n none: '',\n active: 'active',\n dark: 'dark',\n dropdown: 'dropdown',\n hover: 'hover',\n overflowing: 'overflowing',\n} as const\n\ntype TabVariant = (typeof tabVariant)[keyof typeof tabVariant]\n\nexport interface BaseTabProps extends Props {\n /**\n * The tab is active\n * @since 10.19.0\n */\n active?: boolean\n\n /**\n * Whether or not tab is in dark mode\n * @private\n * @since 10.19.0\n * @deprecated Custom styles intended for the global navigation header.\n * Future Core-React will look holistically at themes and dark mode support.\n *\n * AFTER - Regular Tab styles. If needing dark support, please reach out.\n * @deprecatedSince 12.8.0\n */\n dark?: boolean\n\n /**\n * @private\n * @since 10.19.0\n */\n onMount?: (el: HTMLDivElement | null) => void\n\n /**\n * @private\n */\n onUnmount?: () => void\n\n /**\n * @deprecated This was never intended to be a public facing API and does not\n * do anything. It will be removed in the future.\n * @deprecatedSince 11\n * @since 10.19.0\n */\n dropdown?: boolean\n\n /**\n * @deprecated This was never intended to be a public facing API and does not\n * do anything. It will be removed in the future.\n * @deprecatedSince 11\n * @since 10.19.0\n */\n overflowing?: boolean\n\n /**\n * @deprecated please use the `
|
|
1
|
+
{"version":3,"file":"Tabs.types.js","names":["tabVariant","none","active","dark","dropdown","hover","overflowing"],"sources":["../../src/Tabs/Tabs.types.ts"],"sourcesContent":["import type { AriaButtonProps } from '@react-aria/button'\nimport type React from 'react'\nimport type { Polymorphic } from '../_utils/polymorphic'\nimport type { Props } from '../_utils/types'\n\nexport type TabRoleType = 'link' | 'button'\n\nexport interface TabPolyMap extends Record<TabRoleType, React.ElementType> {\n button: 'button'\n link: 'a'\n}\n\nexport type TabRole = TabRoleType | undefined\n\nexport type TabRef<Role extends TabRole = undefined> = Role extends TabRoleType\n ? Polymorphic.Ref<TabPolyMap, Role>\n : React.ComponentPropsWithRef<'div'>['ref']\n\nexport type TabProps<Role extends TabRole = undefined> = Role extends 'link'\n ? Polymorphic.ComponentPropsWithRef<TabPolyMap, 'link', 'href', BaseTabProps>\n : Role extends 'button'\n ? Polymorphic.ComponentPropsWithRef<\n TabPolyMap,\n 'button',\n never,\n BaseTabProps & { onPress: AriaButtonProps['onPress'] }\n >\n : BaseTabProps & { ref?: TabRef<undefined> }\n\nexport const tabVariant = {\n none: '',\n active: 'active',\n dark: 'dark',\n dropdown: 'dropdown',\n hover: 'hover',\n overflowing: 'overflowing',\n} as const\n\ntype TabVariant = (typeof tabVariant)[keyof typeof tabVariant]\n\nexport interface BaseTabProps extends Props {\n /**\n * The tab is active\n * @since 10.19.0\n * @deprecated Please use `selected` instead\n * @deprecatedSince 12.18.0\n */\n active?: boolean\n\n /**\n * The tab is selected\n * @since 12.18.0\n */\n selected?: boolean\n\n /**\n * Whether or not tab is in dark mode\n * @private\n * @since 10.19.0\n * @deprecated Custom styles intended for the global navigation header.\n * Future Core-React will look holistically at themes and dark mode support.\n *\n * AFTER - Regular Tab styles. If needing dark support, please reach out.\n * @deprecatedSince 12.8.0\n */\n dark?: boolean\n\n /**\n * @private\n * @since 10.19.0\n */\n onMount?: (el: HTMLDivElement | null) => void\n\n /**\n * @private\n */\n onUnmount?: () => void\n\n /**\n * @deprecated This was never intended to be a public facing API and does not\n * do anything. It will be removed in the future.\n * @deprecatedSince 11\n * @since 10.19.0\n */\n dropdown?: boolean\n\n /**\n * @deprecated This was never intended to be a public facing API and does not\n * do anything. It will be removed in the future.\n * @deprecatedSince 11\n * @since 10.19.0\n */\n overflowing?: boolean\n\n /**\n * @deprecated please use the `selected` props to configure style. The\n * `dropdown`, `hover`, and `overflowing` variants were only for internal use\n * and should not be used in clients\n * @deprecatedSince 11\n * @since 10.19.0\n */\n variant?: TabVariant\n /**\n * @since 11.6.0\n */\n disabled?: boolean\n /**\n * Sets the Tab's role\n * @since 11.6.0\n */\n role?: TabRole\n /**\n * Tab styles specific to the global navigation header.\n * @deprecated @experimental Alternative style variant. To be used on Helix Header ONLY\n * @since 12.8.0\n */\n UNSAFE_helixHeader?: boolean\n}\n\nexport interface TabsTabProps extends BaseTabProps {}\n\nexport interface QaTags {\n /**\n * @since 10.19.0\n */\n more?: string\n}\n\nexport interface TabsProps extends Props {\n /**\n * @since 10.19.0\n * @deprecated Custom styles intended for the global navigation header.\n * Future Core-React will look holistically at themes and dark mode support.\n *\n * AFTER - Regular Tab styles. If needing dark support, please reach out.\n * @deprecatedSince 12.8.0\n */\n dark?: boolean\n /**\n * @since 10.19.0\n */\n qa?: QaTags\n /**\n * Tab styles specific to the global navigation header.\n * @deprecated @experimental Alternative style variant. To be used on Helix Header ONLY\n * @since 12.8.0\n */\n UNSAFE_helixHeader?: boolean\n}\n\nexport interface TabDropdownProps extends Props {\n /**\n * @since 10.19.0\n */\n visible?: boolean\n /**\n * @since 10.19.0\n */\n qa?: QaTags\n}\n"],"mappings":"AA6BA,OAAO,IAAMA,UAAU,GAAG;EACxBC,IAAI,EAAE,EAAE;EACRC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,OAAO;EACdC,WAAW,EAAE;AACf,CAAU"}
|
|
@@ -47,7 +47,7 @@ var getSlideOutAnimation = function getSlideOutAnimation($placement) {
|
|
|
47
47
|
};
|
|
48
48
|
export var StyledTearsheetContent = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledTearsheetContent",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_17_5__sc-ljrxoq-0"
|
|
51
51
|
})(["display:flex;z-index:2;width:100%;", " ", " ", " ", ""], function (_ref) {
|
|
52
52
|
var $open = _ref.$open,
|
|
53
53
|
$placement = _ref.$placement;
|
|
@@ -67,7 +67,7 @@ export var StyledTearsheetContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
67
67
|
export var minScrimSize = spacing.xxl * 3;
|
|
68
68
|
export var StyledTearsheetBody = /*#__PURE__*/styled.div.withConfig({
|
|
69
69
|
displayName: "StyledTearsheetBody",
|
|
70
|
-
componentId: "core-
|
|
70
|
+
componentId: "core-12_17_5__sc-ljrxoq-1"
|
|
71
71
|
})(["display:flex;overflow-y:auto;flex-direction:column;background-color:", ";", " ", "}"], colors.white, function (_ref5) {
|
|
72
72
|
var $block = _ref5.$block,
|
|
73
73
|
$placement = _ref5.$placement,
|
|
@@ -88,7 +88,7 @@ var zoomIn = /*#__PURE__*/keyframes(["from{transform:scale(0);}to{transform:scal
|
|
|
88
88
|
var zoomOut = /*#__PURE__*/keyframes(["from{transform:scale(1);}to{transform:scale(0);}"]);
|
|
89
89
|
export var StyledScrimContainer = /*#__PURE__*/styled.div.withConfig({
|
|
90
90
|
displayName: "StyledScrimContainer",
|
|
91
|
-
componentId: "core-
|
|
91
|
+
componentId: "core-12_17_5__sc-ljrxoq-2"
|
|
92
92
|
})(["", ""], function (_ref7) {
|
|
93
93
|
var $placement = _ref7.$placement;
|
|
94
94
|
var minSizeProp = ['top', 'bottom'].includes($placement) ? 'min-height' : 'min-width';
|
|
@@ -96,7 +96,7 @@ export var StyledScrimContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
96
96
|
});
|
|
97
97
|
export var StyledButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
98
98
|
displayName: "StyledButtonContainer",
|
|
99
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_17_5__sc-ljrxoq-3"
|
|
100
100
|
})(["", ""], function (_ref8) {
|
|
101
101
|
var $placement = _ref8.$placement;
|
|
102
102
|
switch ($placement) {
|
|
@@ -111,7 +111,7 @@ export var StyledButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
111
111
|
});
|
|
112
112
|
export var StyledButtonCard = /*#__PURE__*/styled(Card).withConfig({
|
|
113
113
|
displayName: "StyledButtonCard",
|
|
114
|
-
componentId: "core-
|
|
114
|
+
componentId: "core-12_17_5__sc-ljrxoq-4"
|
|
115
115
|
})(["display:inline-flex;margin:", "px;", " ", " ", ""], spacing.xl, function (_ref9) {
|
|
116
116
|
var $open = _ref9.$open;
|
|
117
117
|
return $open ? css(["transform:scale(1);"]) : css(["transform:scale(0);"]);
|
|
@@ -3,7 +3,7 @@ import { getInputStyles } from '../Input/Input.styles';
|
|
|
3
3
|
import { spacing } from '../_styles/spacing';
|
|
4
4
|
export var StyledTextArea = /*#__PURE__*/styled.textarea.withConfig({
|
|
5
5
|
displayName: "StyledTextArea",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_17_5__sc-u5mow1-0"
|
|
7
7
|
})(["", " height:auto;min-height:64px;padding:", "px ", "px;resize:", ";"], getInputStyles, spacing.sm, spacing.md, function (_ref) {
|
|
8
8
|
var _ref$resize = _ref.resize,
|
|
9
9
|
resize = _ref$resize === void 0 ? 'both' : _ref$resize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export var StyledEditor = /*#__PURE__*/styled.div.withConfig({
|
|
3
3
|
displayName: "StyledEditor",
|
|
4
|
-
componentId: "core-
|
|
4
|
+
componentId: "core-12_17_5__sc-1lje1b0-0"
|
|
5
5
|
})(["> .tox-tinymce{border:none;}"]);
|
|
6
6
|
//# sourceMappingURL=TextEditorOutput.styles.js.map
|
|
@@ -28,35 +28,35 @@ var captionBase = /*#__PURE__*/css(["color:", ";font-size:12px;line-height:16px;
|
|
|
28
28
|
});
|
|
29
29
|
export var StyledMultilineCaption = /*#__PURE__*/styled.div.withConfig({
|
|
30
30
|
displayName: "StyledMultilineCaption",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_17_5__sc-195f70c-0"
|
|
32
32
|
})(["", " display:flex;word-wrap:break-word;overflow-wrap:break-word;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:", "px;"], captionBase, multilineCaptionMaxHeight);
|
|
33
33
|
export var StyledCaptionText = /*#__PURE__*/styled.span.withConfig({
|
|
34
34
|
displayName: "StyledCaptionText",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_17_5__sc-195f70c-1"
|
|
36
36
|
})(["width:100%;"]);
|
|
37
37
|
export var StyledPlaceholderCaption = /*#__PURE__*/styled.div.withConfig({
|
|
38
38
|
displayName: "StyledPlaceholderCaption",
|
|
39
|
-
componentId: "core-
|
|
39
|
+
componentId: "core-12_17_5__sc-195f70c-2"
|
|
40
40
|
})(["", ""], captionBase);
|
|
41
41
|
export var StyledSingleLineCaption = /*#__PURE__*/styled.div.withConfig({
|
|
42
42
|
displayName: "StyledSingleLineCaption",
|
|
43
|
-
componentId: "core-
|
|
43
|
+
componentId: "core-12_17_5__sc-195f70c-3"
|
|
44
44
|
})(["display:flex;", ""], captionBase);
|
|
45
45
|
export var StyledSinglelineCaptionBody = /*#__PURE__*/styled.span.withConfig({
|
|
46
46
|
displayName: "StyledSinglelineCaptionBody",
|
|
47
|
-
componentId: "core-
|
|
47
|
+
componentId: "core-12_17_5__sc-195f70c-4"
|
|
48
48
|
})(["", ""], getEllipsis);
|
|
49
49
|
export var StyledSinglelineCaptionEnding = /*#__PURE__*/styled.span.withConfig({
|
|
50
50
|
displayName: "StyledSinglelineCaptionEnding",
|
|
51
|
-
componentId: "core-
|
|
51
|
+
componentId: "core-12_17_5__sc-195f70c-5"
|
|
52
52
|
})(["max-width:50%;white-space:nowrap;flex-shrink:0;"]);
|
|
53
53
|
export var StyledLabelText = /*#__PURE__*/styled(Typography).withConfig({
|
|
54
54
|
displayName: "StyledLabelText",
|
|
55
|
-
componentId: "core-
|
|
55
|
+
componentId: "core-12_17_5__sc-195f70c-6"
|
|
56
56
|
})(["", ""], getEllipsis());
|
|
57
57
|
export var StyledThumbnailFigCaption = /*#__PURE__*/styled.figcaption.withConfig({
|
|
58
58
|
displayName: "StyledThumbnailFigCaption",
|
|
59
|
-
componentId: "core-
|
|
59
|
+
componentId: "core-12_17_5__sc-195f70c-7"
|
|
60
60
|
})(["", " ", " color:", ";font-weight:", ";text-align:center;width:100%;position:absolute;bottom:0;right:0;left:0;opacity:0.85;height:", "px;padding:", "px ", "px;background-color:", ";"], getTypographyIntent('small'), getEllipsis(), function (_ref5) {
|
|
61
61
|
var _ref5$$color = _ref5.$color,
|
|
62
62
|
$color = _ref5$$color === void 0 ? 'gray15' : _ref5$$color;
|
|
@@ -64,7 +64,7 @@ export var StyledThumbnailFigCaption = /*#__PURE__*/styled.figcaption.withConfig
|
|
|
64
64
|
}, typographyWeights.bold, labelHeight, spacing.sm / 2, spacing.sm, colors.white);
|
|
65
65
|
export var StyledLabel = /*#__PURE__*/styled.div.withConfig({
|
|
66
66
|
displayName: "StyledLabel",
|
|
67
|
-
componentId: "core-
|
|
67
|
+
componentId: "core-12_17_5__sc-195f70c-8"
|
|
68
68
|
})(["display:flex;justify-content:center;position:absolute;bottom:0;right:0;left:0;opacity:0.85;height:", "px;padding:", "px ", "px;font-size:", "px;background-color:", ";"], labelHeight, spacing.sm / 2, spacing.sm, labelFontSize, colors.white);
|
|
69
69
|
var thumbnailBase = /*#__PURE__*/css(["display:flex;justify-content:center;align-items:center;position:relative;overflow:hidden;border:1px solid ", ";border-radius:", "px;margin:0;", " ", " &:focus{", ";}", " ", " ", ""], colors.gray85, borderRadius.md, function (_ref6) {
|
|
70
70
|
var clickable = _ref6.clickable;
|
|
@@ -86,7 +86,7 @@ var thumbnailBase = /*#__PURE__*/css(["display:flex;justify-content:center;align
|
|
|
86
86
|
});
|
|
87
87
|
export var StyledTickIcon = /*#__PURE__*/styled.svg.withConfig({
|
|
88
88
|
displayName: "StyledTickIcon",
|
|
89
|
-
componentId: "core-
|
|
89
|
+
componentId: "core-12_17_5__sc-195f70c-9"
|
|
90
90
|
})(["position:absolute;top:", "px;right:", "px;width:", "px;height:", "px;opacity:0;transform:scale(0.75);transition:transform 250ms ease-out,opacity 100ms ease-out;", " ", ""], spacing.sm, spacing.sm, tickSize, tickSize, function (_ref11) {
|
|
91
91
|
var selected = _ref11.selected;
|
|
92
92
|
return selected ? "\n opacity: 1;\n transform: scale(1);\n " : '';
|
|
@@ -96,28 +96,28 @@ export var StyledTickIcon = /*#__PURE__*/styled.svg.withConfig({
|
|
|
96
96
|
});
|
|
97
97
|
export var StyledFileIcon = /*#__PURE__*/styled(DocumentIcon).withConfig({
|
|
98
98
|
displayName: "StyledFileIcon",
|
|
99
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_17_5__sc-195f70c-10"
|
|
100
100
|
})(["width:36.5%;height:auto;"]);
|
|
101
101
|
export var StyledImageThumbnailPreview = /*#__PURE__*/styled.div.withConfig({
|
|
102
102
|
displayName: "StyledImageThumbnailPreview",
|
|
103
|
-
componentId: "core-
|
|
103
|
+
componentId: "core-12_17_5__sc-195f70c-11"
|
|
104
104
|
})(["width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center;", ""], function (_ref13) {
|
|
105
105
|
var $bgImage = _ref13.$bgImage;
|
|
106
106
|
return css(["background-image:url(", ");"], $bgImage);
|
|
107
107
|
});
|
|
108
108
|
export var StyledImageThumbnailOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
109
109
|
displayName: "StyledImageThumbnailOverlay",
|
|
110
|
-
componentId: "core-
|
|
110
|
+
componentId: "core-12_17_5__sc-195f70c-12"
|
|
111
111
|
})(["display:none;position:absolute;top:0;bottom:0;left:0;right:0;"]);
|
|
112
112
|
var blackOverlay = "\n background-color: ".concat(colors.black, ";\n opacity: 0.2;\n");
|
|
113
113
|
var whiteOverlay = "\n background-color: ".concat(colors.white, ";\n opacity: 0.5;\n");
|
|
114
114
|
export var StyledImageThumbnailImage = /*#__PURE__*/styled.img.withConfig({
|
|
115
115
|
displayName: "StyledImageThumbnailImage",
|
|
116
|
-
componentId: "core-
|
|
116
|
+
componentId: "core-12_17_5__sc-195f70c-13"
|
|
117
117
|
})([""]);
|
|
118
118
|
export var StyledImageThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
119
119
|
displayName: "StyledImageThumbnail",
|
|
120
|
-
componentId: "core-
|
|
120
|
+
componentId: "core-12_17_5__sc-195f70c-14"
|
|
121
121
|
})(["", " flex-direction:column;", " ", " ", " ", " ", " ", ""], thumbnailBase, function (_ref14) {
|
|
122
122
|
var disabled = _ref14.disabled;
|
|
123
123
|
return disabled ? "\n &,\n &:hover {\n ".concat(StyledImageThumbnailOverlay, " {\n display: block;\n ").concat(whiteOverlay, "\n }\n }\n ").concat(StyledImageThumbnailPreview, ",\n ").concat(StyledTickIcon, ",\n ").concat(StyledImageThumbnailImage, " {\n filter: saturate(0);\n }\n ").concat(StyledFileIcon, " {\n filter: saturate(0);\n z-index: -1;\n }\n ") : '';
|
|
@@ -146,7 +146,7 @@ export var StyledImageThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
|
146
146
|
});
|
|
147
147
|
export var StyledThumbnailWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
148
148
|
displayName: "StyledThumbnailWrapper",
|
|
149
|
-
componentId: "core-
|
|
149
|
+
componentId: "core-12_17_5__sc-195f70c-15"
|
|
150
150
|
})(["display:flex;", " ", ""], function (_ref20) {
|
|
151
151
|
var size = _ref20.size;
|
|
152
152
|
return size === 'lg' ? "\n width: ".concat(thumbnailSizeLg, "px;\n ") : '';
|
|
@@ -157,7 +157,7 @@ export var StyledThumbnailWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
157
157
|
});
|
|
158
158
|
export var StyledPlaceholderThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
159
159
|
displayName: "StyledPlaceholderThumbnail",
|
|
160
|
-
componentId: "core-
|
|
160
|
+
componentId: "core-12_17_5__sc-195f70c-16"
|
|
161
161
|
})(["", " ", " ", " ", " ", ""], thumbnailBase, function (_ref22) {
|
|
162
162
|
var clickable = _ref22.clickable;
|
|
163
163
|
return clickable ? "\n &:hover {\n background-color: ".concat(colors.gray96, ";\n }\n\n ") : '';
|
|
@@ -7,31 +7,31 @@ import { getEllipsis } from '../_styles/mixins';
|
|
|
7
7
|
import { spacing } from '../_styles/spacing';
|
|
8
8
|
export var StyledCheckbox = /*#__PURE__*/styled(Checkbox).withConfig({
|
|
9
9
|
displayName: "StyledCheckbox",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_17_5__sc-1inrbm9-0"
|
|
11
11
|
})(["input{z-index:2;}"]);
|
|
12
12
|
export var StyledGroupCell = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "StyledGroupCell",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_17_5__sc-1inrbm9-1"
|
|
15
15
|
})(["display:flex;align-items:flex-end;padding-bottom:", "px;"], spacing.md);
|
|
16
16
|
export var StyledThumbnail = /*#__PURE__*/styled(Thumbnail).withConfig({
|
|
17
17
|
displayName: "StyledThumbnail",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_17_5__sc-1inrbm9-2"
|
|
19
19
|
})(["display:inline-flex;&:focus{outline:none;}"]);
|
|
20
20
|
// VariableSizeGrid has provided width and height as inline style, so to make it flexible and support responsive !important was added
|
|
21
21
|
export var StyledVariableSizeGrid = /*#__PURE__*/styled(VariableSizeGrid).withConfig({
|
|
22
22
|
displayName: "StyledVariableSizeGrid",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_17_5__sc-1inrbm9-3"
|
|
24
24
|
})(["height:100% !important;& > div{width:100% !important;}"]);
|
|
25
25
|
export var StyledGroupTitle = /*#__PURE__*/styled(Typography).withConfig({
|
|
26
26
|
displayName: "StyledGroupTitle",
|
|
27
|
-
componentId: "core-
|
|
27
|
+
componentId: "core-12_17_5__sc-1inrbm9-4"
|
|
28
28
|
})(["", ""], getEllipsis);
|
|
29
29
|
export var StyledSpinnerWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
30
30
|
displayName: "StyledSpinnerWrapper",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_17_5__sc-1inrbm9-5"
|
|
32
32
|
})(["display:flex;justify-content:center;align-items:center;width:100%;height:100%;"]);
|
|
33
33
|
export var StyledThumbnailGrid = /*#__PURE__*/styled.div.withConfig({
|
|
34
34
|
displayName: "StyledThumbnailGrid",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_17_5__sc-1inrbm9-6"
|
|
36
36
|
})(["display:flex;flex-wrap:wrap;outline:none;"]);
|
|
37
37
|
//# sourceMappingURL=ThumbnailGrid.styles.js.map
|
|
@@ -21,7 +21,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
21
21
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
22
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
23
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
|
-
import { ChevronRight, Home, Plus } from '@procore/core-icons/dist';
|
|
24
|
+
import { ChevronRight, Help, Home, Plus } from '@procore/core-icons/dist';
|
|
25
25
|
import React from 'react';
|
|
26
26
|
import { Box } from '../Box/Box';
|
|
27
27
|
import { Breadcrumbs } from '../Breadcrumbs/Breadcrumbs';
|
|
@@ -32,11 +32,12 @@ import { MenuImperative, useMenuImperativeControlNavigation } from '../MenuImper
|
|
|
32
32
|
import { CloseOnFocus, OverlayTrigger, useOverlayTriggerContext } from '../OverlayTrigger/OverlayTrigger';
|
|
33
33
|
import { Select } from '../Select/Select';
|
|
34
34
|
import { Spinner } from '../Spinner/Spinner';
|
|
35
|
+
import { Tooltip } from '../Tooltip';
|
|
35
36
|
import { Typography } from '../Typography/Typography';
|
|
36
37
|
import { isEventSource } from '../_hooks/ClickOutside';
|
|
37
38
|
import { useI18nContext } from '../_hooks/I18n';
|
|
38
39
|
import { TieredSelectContext, useHighlightItemEffects } from './TieredSelect';
|
|
39
|
-
import { StyledTieredSelect, StyledTieredSelectArrowButton, StyledTieredSelectBreadcrumbs, StyledTieredSelectHome, StyledTieredSelectLoadingMore, StyledTieredSelectOption, StyledTieredSelectOverlay, StyledTieredSelectSpinnerOverlay } from './TieredSelect.styles';
|
|
40
|
+
import { StyledTieredSelect, StyledTieredSelectArrowButton, StyledTieredSelectBreadcrumbs, StyledTieredSelectHome, StyledTieredSelectIcon, StyledTieredSelectLoadingMore, StyledTieredSelectOption, StyledTieredSelectOverlay, StyledTieredSelectSpinnerOverlay } from './TieredSelect.styles';
|
|
40
41
|
function stopProp(e) {
|
|
41
42
|
if (e.key === 'Escape' || e.key === 'Esc') {
|
|
42
43
|
e.stopPropagation();
|
|
@@ -65,6 +66,12 @@ function ArrowButton(_ref) {
|
|
|
65
66
|
variant: "tertiary"
|
|
66
67
|
}));
|
|
67
68
|
}
|
|
69
|
+
function ItemTooltipIcon() {
|
|
70
|
+
return /*#__PURE__*/React.createElement(StyledTieredSelectIcon, {
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
justifyContent: "center"
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Help, null));
|
|
74
|
+
}
|
|
68
75
|
var QuickCreateInput = /*#__PURE__*/React.forwardRef(function QuickCreateInput(_ref2, ref) {
|
|
69
76
|
var autoFocus = _ref2.autoFocus,
|
|
70
77
|
onSubmit = _ref2.onSubmit,
|
|
@@ -122,7 +129,8 @@ var TieredSelectMenu = /*#__PURE__*/React.forwardRef(function TieredSelectMenu(_
|
|
|
122
129
|
getNextGroupId = _React$useContext.getNextGroupId,
|
|
123
130
|
i18nScope = _React$useContext.i18nScope,
|
|
124
131
|
onQuickCreate = _React$useContext.onQuickCreate,
|
|
125
|
-
onScrollBottom = _React$useContext.onScrollBottom
|
|
132
|
+
onScrollBottom = _React$useContext.onScrollBottom,
|
|
133
|
+
isTierDisabled = _React$useContext.isTierDisabled;
|
|
126
134
|
var quickCreateRef = React.useRef(null);
|
|
127
135
|
var _useOverlayTriggerCon = useOverlayTriggerContext(),
|
|
128
136
|
hide = _useOverlayTriggerCon.hide;
|
|
@@ -336,18 +344,35 @@ var TieredSelectMenu = /*#__PURE__*/React.forwardRef(function TieredSelectMenu(_
|
|
|
336
344
|
})) : null), !isQuickCreating ? /*#__PURE__*/React.createElement(Options, {
|
|
337
345
|
emptyMessage: menuEmptyMessage
|
|
338
346
|
}, filteredOptions.map(function (tier, index) {
|
|
339
|
-
|
|
347
|
+
var _isTierDisabled;
|
|
348
|
+
var tooltip = (_isTierDisabled = isTierDisabled === null || isTierDisabled === void 0 ? void 0 : isTierDisabled(tier)) !== null && _isTierDisabled !== void 0 ? _isTierDisabled : false;
|
|
349
|
+
var isDisabled = Boolean(tooltip);
|
|
350
|
+
var showNextTierArrow = !tooltip && (Boolean(getNextGroupId(tier)) || Boolean(onQuickCreate));
|
|
351
|
+
var overlay = typeof tooltip === 'string' ? tooltip : null;
|
|
352
|
+
var menuItem = /*#__PURE__*/React.createElement(StyledTieredSelectOption, {
|
|
340
353
|
item: tier,
|
|
341
354
|
key: "".concat(getId(tier), "-").concat(index),
|
|
342
|
-
selected: isTierSelected(tier)
|
|
343
|
-
|
|
355
|
+
selected: isTierSelected(tier),
|
|
356
|
+
disabled: isDisabled
|
|
357
|
+
}, getLabel(tier), showNextTierArrow && /*#__PURE__*/React.createElement(Box, {
|
|
344
358
|
paddingLeft: "sm"
|
|
345
359
|
}, /*#__PURE__*/React.createElement(ArrowButton, {
|
|
346
360
|
"data-qa": "tiered-select-arrow",
|
|
347
361
|
onClick: function onClick() {
|
|
348
362
|
return onNavigateForward(tier);
|
|
349
363
|
}
|
|
350
|
-
}))
|
|
364
|
+
})), tooltip && /*#__PURE__*/React.createElement(Box, {
|
|
365
|
+
paddingLeft: "sm"
|
|
366
|
+
}, /*#__PURE__*/React.createElement(ItemTooltipIcon, null)));
|
|
367
|
+
if (isDisabled && overlay) {
|
|
368
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
369
|
+
key: "".concat(getId(tier), "-").concat(index, "-tooltip"),
|
|
370
|
+
overlay: overlay,
|
|
371
|
+
trigger: 'hover',
|
|
372
|
+
placement: "right"
|
|
373
|
+
}, menuItem);
|
|
374
|
+
}
|
|
375
|
+
return menuItem;
|
|
351
376
|
}).concat(loadingMore && !loading ? [/*#__PURE__*/React.createElement(StyledTieredSelectLoadingMore, {
|
|
352
377
|
"data-qa": "tiered-select-loading-more",
|
|
353
378
|
key: 'tiered-select-loading-more'
|