@pega/cosmos-react-core 9.0.0-build.27.0 → 9.0.0-build.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AppShell/AppShell.styles.js +1 -1
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/Drawer.d.ts +1 -1
- package/lib/components/AppShell/Drawer.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.js +7 -3
- package/lib/components/AppShell/Drawer.js.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.js +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +6 -6
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.styles.d.ts +3 -0
- package/lib/components/CompositeInput/CompositeInput.styles.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.styles.js +30 -1
- package/lib/components/CompositeInput/CompositeInput.styles.js.map +1 -1
- package/lib/components/Location/GoogleMapsAPI.d.ts +3 -3
- package/lib/components/Location/GoogleMapsAPI.d.ts.map +1 -1
- package/lib/components/Location/GoogleMapsAPI.js +8 -8
- package/lib/components/Location/GoogleMapsAPI.js.map +1 -1
- package/lib/components/Location/LocationAPI.types.d.ts +1 -1
- package/lib/components/Location/LocationAPI.types.d.ts.map +1 -1
- package/lib/components/Location/LocationAPI.types.js.map +1 -1
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js +27 -8
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Location/LocationView.d.ts +2 -0
- package/lib/components/Location/LocationView.d.ts.map +1 -1
- package/lib/components/Location/LocationView.js +3 -3
- package/lib/components/Location/LocationView.js.map +1 -1
- package/package.json +1 -1
|
@@ -202,7 +202,7 @@ export const StyledSidebarNav = styled(StyledAppNav)(({ withAppHeader, portalAge
|
|
|
202
202
|
const { navState } = useContext(AppShellContext);
|
|
203
203
|
return css `
|
|
204
204
|
position: fixed;
|
|
205
|
-
z-index:
|
|
205
|
+
z-index: ${theme.base['z-index'].drawer};
|
|
206
206
|
max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});
|
|
207
207
|
width: ${navState === 'open' || navState === 'opening' ? navOpenWidth : navWidth};
|
|
208
208
|
transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,mCAAmC,EACnC,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CA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Content":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { darken, getContrast, lighten, rem, remToPx, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAlert } from '../Badges/Alert';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledLink } from '../Link/Link';\nimport { Count } from '../Badges';\nimport { StyledAvatar } from '../Avatar';\nimport { StyledIcon } from '../Icon';\nimport { StyledImage } from '../Image/Image';\nimport { defaultThemeProp } from '../../theme';\nimport {\n calculateFontSize,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n readableColor\n} from '../../styles';\nimport type { FontSize } from '../../styles';\nimport { StyledMenuItem } from '../Menu/Menu.styles';\nimport { useDirection } from '../../hooks';\nimport { StyledBareButton } from '../Button/BareButton';\nimport Button from '../Button';\nimport { StyledTooltip } from '../Tooltip';\nimport { StyledProgressBackdrop } from '../Progress';\nimport Icon from '../Icon/Icon';\nimport { StyledText } from '../Text';\nimport Flex from '../Flex';\nimport { resizeDrawerMaxWidth } from '../../styles/constants';\nimport { tryCatch } from '../../utils';\nimport { StyledDrawer } from '../Drawer';\n\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors } from './style-utils';\nimport type { NavOrientation } from './AppShell.types';\n\nexport const navWidth = '4rem';\nexport const navOpenWidth = '18.75rem';\nexport const headerHeight = '3rem';\nexport const mobileHeaderHeight = '3.75rem';\nexport const topNavHeight = '3rem';\nconst iconWidth = '1.125rem';\nconst iconBoxSize = `calc((${navWidth} - ${iconWidth} - 2 * var(--nav-padding)) / 2)`;\n\nexport const menuButtonWidth = (theme: DefaultTheme) =>\n Number.parseInt(theme.base['hit-area']['finger-min'], 10) +\n Number.parseInt(\n tryCatch(\n () => remToPx(2),\n () => '32px'\n ),\n 10\n );\n\nexport const StyledAppInfo = styled.a(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const { hoverBg, foreground } = navContrastColors(theme);\n\n return css`\n padding: ${theme.base.spacing} calc(${navWidth} / 4);\n grid-template-columns: calc(${navWidth} / 2) auto;\n column-gap: calc(${navWidth} / 4);\n vertical-align: middle;\n\n &:hover,\n button&:hover {\n background-color: ${hoverBg};\n text-decoration: none;\n }\n\n &:focus:not([disabled]) {\n outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${StyledImage} {\n display: inline-block;\n width: calc(${navWidth} / 2);\n margin-inline-end: calc(${theme.base.spacing} * 2);\n vertical-align: middle;\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: middle;\n }\n\n span:last-of-type {\n font-size: ${fontSize.xs};\n color: ${foreground};\n }\n\n span:first-of-type {\n font-size: ${fontSize.s};\n color: ${foreground};\n margin-inline-end: calc(${theme.base.spacing});\n vertical-align: middle;\n }\n `;\n});\n\nStyledAppInfo.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled(Flex)(({ theme }) => {\n return css`\n overflow-x: hidden;\n overflow-y: auto;\n padding-block-start: calc(0.125 * ${theme.base.spacing});\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow: visible;\n flex-shrink: 0;\n }\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledUtilsSeparator = styled.div<{ navOpen?: boolean }>(({ theme, navOpen }) => {\n return css`\n position: sticky;\n inset-block-end: 0;\n margin-block-start: auto;\n margin-inline: var(--nav-padding);\n border-block-start: 0.0625rem solid ${theme.components['app-shell'].nav['separator-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n position: relative;\n margin-inline-end: calc(var(--nav-padding) / 2);\n\n ${navOpen &&\n css`\n margin-inline-end: var(--nav-padding);\n `}\n }\n `;\n});\n\nStyledUtilsSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledCountIcon = styled(Count)`\n position: absolute;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: 0.25lh;\n inset-inline-start: calc((${navWidth} / 2) - var(--nav-padding));\n`;\n\nStyledCountIcon.defaultProps = defaultThemeProp;\n\nexport const StyledSingleSelectIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n height: ${theme.base['hit-area']['mouse-min']};\n width: ${theme.base['hit-area']['mouse-min']};\n margin-inline-start: calc(2 * ${theme.base.spacing});\n `;\n});\n\nStyledSingleSelectIconBox.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItemExpandCollapse = styled(Icon)``;\n\nexport const StyledNavListItemGroupIndicator = styled(Icon)(({\n theme: {\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n }\n}) => {\n return css`\n position: absolute;\n width: 0.75rem;\n height: 0.75rem;\n margin-block-start: calc(${iconWidth} / 8);\n margin-inline-start: 2.5rem;\n ${detached &&\n css`\n margin-inline-start: calc(${navWidth} / 2 - ${iconWidth} / 6);\n `}\n `;\n});\n\nStyledNavListItemGroupIndicator.defaultProps = defaultThemeProp;\n\nexport const StyledUtilIconCount = styled.span`\n flex-shrink: 0;\n`;\n\nexport const StyledNavItemIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n\n > ${StyledIcon}, ${StyledUtilIconCount} > ${StyledIcon} {\n margin-inline: ${iconBoxSize};\n }\n\n ${StyledAvatar} {\n margin-inline: calc(\n (${navWidth} - ${theme.base['hit-area']['mouse-min']} - 2 * var(--nav-padding)) / 2\n );\n margin-block: calc(0.5 * ${theme.base.spacing});\n font-weight: ${theme.base['font-weight'].normal};\n }\n `;\n});\n\nStyledNavItemIconBox.defaultProps = defaultThemeProp;\n\nconst StyledAppNav = styled.nav(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n\n const foregroundColor = calculateForegroundColor(navBg, navFgColor);\n\n return css`\n --nav-padding: ${theme.components['app-shell'].nav.detached ? '0.75rem' : '0px'};\n background: ${navBg};\n color: ${foregroundColor};\n overflow: hidden;\n white-space: nowrap;\n border-color: ${theme.components['app-shell'].nav['border-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow-y: auto;\n overflow-x: clip;\n }\n padding-block-start: ${theme.base.spacing};\n\n /* App navigation can be focused with shortcut */\n &:focus-visible {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${theme.base['custom-scrollbar'] &&\n css`\n * {\n scrollbar-width: thin;\n }\n `}\n `;\n});\n\nStyledAppNav.defaultProps = defaultThemeProp;\n\nexport const StyledSidebarNav = styled(StyledAppNav)<{\n withAppHeader: boolean;\n portalAgent?: boolean;\n}>(({ withAppHeader, portalAgent, theme }) => {\n const { rtl } = useDirection();\n\n const { navState } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: ${navState === 'open' || navState === 'opening' ? navOpenWidth : navWidth};\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${withAppHeader ? headerHeight : '0rem'});\n padding-block-end: ${theme.base.spacing};\n\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n ${portalAgent\n ? css`\n box-shadow: inset ${rtl ? '0.0625rem' : '-0.0625rem'} 0 0 0\n ${theme.components['app-shell'].nav['border-color']};\n `\n : css`\n border-inline-end: 0.0625rem solid ${transparentize(0.9, '#000')};\n border-color: ${theme.components['app-shell'].nav['border-color']};\n `}\n `;\n});\n\nStyledSidebarNav.defaultProps = defaultThemeProp;\n\nexport const StyledCaseClose = styled.button``;\n\nexport const StyledNavListItemVisualContainer = styled.div<{\n isCurrent: boolean;\n navOpen: boolean;\n}>(\n ({\n theme: {\n base: { spacing },\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n },\n isCurrent,\n navOpen\n }) => {\n return css`\n max-width: ${navWidth};\n\n &:has(${StyledAvatar}) {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n & > ${StyledText} {\n padding-inline: ${isCurrent\n ? `${spacing} calc(0.5 * ${spacing})`\n : `calc(0.5 * ${spacing})`};\n\n ${!navOpen &&\n detached &&\n css`\n padding-inline: 0;\n max-width: calc(${navWidth} * 0.625);\n `}\n }\n `;\n }\n);\n\nStyledNavListItemVisualContainer.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItem = styled.li<{\n nestedListCollapsed: boolean;\n singleSelect: boolean;\n}>(({ theme, nestedListCollapsed, singleSelect }) => {\n const {\n base: {\n 'font-weight': { 'semi-bold': semiBold }\n },\n components: {\n 'app-shell': {\n nav: {\n detached,\n 'item-border-radius': navItemBorderRadius,\n 'selected-background': navSelectedBackground\n }\n }\n }\n } = theme;\n\n const { navOpen } = useContext(AppShellContext);\n const { foreground, nestedList } = navContrastColors(theme);\n const { rtl } = useDirection();\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n return css`\n display: block;\n position: relative;\n padding-block: 0;\n padding-inline: var(--nav-padding);\n\n ${StyledIcon} {\n font-size: 1.25rem;\n }\n\n ${StyledCaseClose} {\n display: flex;\n position: absolute;\n opacity: 0;\n left: ${navOpen ? 'auto' : '100%'};\n top: 50%;\n bottom: 50%;\n margin: auto 0;\n color: ${foreground};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n `}\n }\n\n &:first-child ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n\n > :first-child {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding-block: ${theme.base.spacing};\n padding-inline: 0;\n white-space: nowrap;\n color: ${foreground};\n cursor: pointer;\n text-decoration: none;\n border-block: ${rem(1)} solid transparent;\n\n ${detached &&\n css`\n --item-height: 2.5rem;\n padding: 0;\n min-height: var(--item-height);\n height: auto;\n border: none;\n border-radius: ${navItemBorderRadius};\n transition: border-radius ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n `}\n ${detached &&\n css`\n &:not(:only-child):has(+ ul) {\n background: ${nestedListColor};\n margin-block-end: 0.0625rem;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n }\n `}\n span:not(${StyledCountIcon}) {\n overflow: hidden;\n text-overflow: ellipsis;\n color: inherit;\n white-space: nowrap;\n }\n\n &:hover,\n &:focus {\n color: ${foreground};\n background: ${transparentize(0.9, foreground)};\n }\n\n &:hover + ${StyledCaseClose}, &:focus + ${StyledCaseClose} {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n\n @media (forced-colors: none) {\n &:not([aria-current='page'], [aria-expanded='false']:has(+ ul [aria-current='page'])) {\n outline: none;\n }\n }\n }\n\n ${StyledNavListItemExpandCollapse} {\n position: absolute;\n left: ${navOpen ? 'auto' : '100%'};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n `}\n margin: 0;\n opacity: ${navOpen ? '1' : '0'};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${!nestedListCollapsed &&\n css`\n transform: rotateZ(${rtl ? '-90deg' : '90deg'});\n `}\n }\n\n ${singleSelect &&\n css`\n ${StyledNavItemIconBox} > ${StyledIcon} {\n margin-inline: calc(${theme.base.spacing} - var(--nav-padding));\n }\n `}\n ${StyledSingleSelectIconBox} + span {\n margin-inline-start: ${theme.base.spacing};\n }\n }\n\n [aria-expanded='true'] {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n [aria-current='page'],\n [aria-expanded='false']:has(+ ul [aria-current='page']) {\n position: relative;\n font-weight: ${semiBold};\n border-block: ${rem(1)} solid ${theme.components['app-shell'].nav['border-color']};\n background: ${transparentize(0.85, foreground)};\n ${detached &&\n css`\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n outline: 0.0625rem solid;\n\n &:hover,\n &:focus {\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n }\n `}\n\n ${!detached &&\n css`\n &::before {\n content: '';\n position: absolute;\n width: ${rem(4)};\n inset-inline-start: 0;\n top: 0;\n bottom: 0;\n background-color: ${foreground};\n }\n `}\n }\n\n ${StyledNavItemIconBox} {\n display: flex;\n justify-content: center;\n width: calc(${navWidth} - 2 * var(--nav-padding));\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul(({ theme }) => {\n return css`\n min-width: ${navWidth};\n\n & > ${StyledNavListItem} {\n &:not(:last-child),\n &:only-child {\n margin-block-end: calc(${theme.base.spacing} / 2);\n }\n }\n\n & > ${StyledNavListItem}:last-of-type {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `;\n});\nStyledNavList.defaultProps = defaultThemeProp;\n\nexport const StyledNavCasesList = styled.div(({ theme }) => {\n return css`\n ${StyledNavListItem} {\n > :first-child {\n padding: ${theme.base.spacing} 0;\n }\n }\n `;\n});\n\nStyledNavCasesList.defaultProps = defaultThemeProp;\n\nexport const StyledNestedNavList = styled(StyledNavList)(({ theme }) => {\n const {\n base: { 'border-radius': borderRadius, spacing },\n\n components: {\n 'app-shell': {\n nav: { detached, 'selected-background': navSelectedBackground }\n }\n }\n } = theme;\n\n const { nestedList, foreground } = navContrastColors(theme);\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n const resolvedSelectedBg =\n navSelectedBackground !== 'auto' ? navSelectedBackground : transparentize(0.9, foreground);\n\n return css`\n background: ${nestedListColor};\n border-radius: ${detached ? borderRadius : '0px'};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n\n ${StyledNavListItem} {\n &:first-child {\n border-block-start: ${spacing} solid transparent;\n }\n\n &:last-child {\n border-block-end: calc(0.5 * ${spacing}) solid transparent;\n }\n\n &:not(:last-child) {\n margin-block-end: calc(${spacing} / 2);\n }\n\n > :first-child {\n &:has(${StyledIcon}) {\n padding-inline-start: calc(((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2));\n }\n\n &:not(:has(${StyledIcon})) {\n padding-inline-start: calc(\n ((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2) + ${iconBoxSize}\n );\n }\n }\n\n ${detached &&\n css`\n [aria-current='page'] {\n background: ${resolvedSelectedBg};\n\n &:hover,\n &:focus {\n background: ${resolvedSelectedBg};\n }\n }\n `}\n }\n `;\n});\n\nStyledNestedNavList.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTypes = styled.div(({ theme }) => {\n const { foreground } = navContrastColors(theme);\n\n return css`\n button {\n ${StyledNavItemIconBox} {\n transition: transform ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n }\n\n &[aria-expanded='false'] ${StyledNavItemIconBox} {\n transform: none;\n }\n\n &[aria-expanded='true'] ${StyledNavItemIconBox} {\n transform: rotateZ(45deg);\n }\n }\n\n > ${StyledNavList} > ${StyledNavListItem} > ${StyledBareButton} {\n background: ${theme.components['app-shell'].nav['create-button-background']};\n\n &:hover,\n &:focus {\n background: ${transparentize(0.9, foreground)};\n }\n }\n `;\n});\n\nStyledCaseTypes.defaultProps = defaultThemeProp;\n\nexport const StyledUtils = styled.div(({ theme }) => {\n return css`\n ${StyledNavList} {\n padding-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledBareButton} > ${StyledIcon}:first-child, ${StyledBareButton} > ${StyledUtilIconCount} {\n margin: 0 calc((${navWidth} - ${iconWidth}) / 2);\n }\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenu = styled(StyledAppNav)`\n width: 100%;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${mobileHeaderHeight});\n`;\n\nStyledMobileMoreMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMobileNav = styled.header(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'focus-shadow': focusShadow },\n text\n }\n } = theme;\n const mobileNavColor = theme.components['app-shell'].nav.background;\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n width: 100%;\n min-height: ${mobileHeaderHeight};\n z-index: calc(${theme.base['z-index'].drawer} + 1);\n background: ${mobileNavColor};\n color: ${foreground};\n padding: calc(0.25 * ${theme.base.spacing});\n position: fixed;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: calc(100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}));\n\n & + ${StyledDrawer}, & + ${StyledDrawer} ${StyledDrawer} {\n bottom: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n width: 100%;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(\n 100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}) - var(\n --appshell-top-offset,\n 0rem\n )\n );\n }\n\n > div:has(> ${StyledNavList}),\n > div:has(> ${StyledNavList}) > ${StyledNavList}, > ${StyledNavList} {\n display: contents;\n\n ${StyledNavListItem} {\n flex-grow: 1;\n width: ${rem(menuButtonWidth(theme))};\n padding: 0;\n margin: 0;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n\n ${StyledBareButton}, ${StyledLink} {\n flex-direction: column;\n justify-content: center;\n height: ${hitAreaFinger};\n padding: 0 calc(0.25 * ${theme.base.spacing});\n border-radius: ${borderRadius};\n border-block: none;\n\n &::before {\n width: 0;\n }\n\n span:not(${StyledCountIcon}) {\n width: inherit;\n text-align: center;\n }\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${focusShadow};\n }\n\n ${StyledNavListItemVisualContainer} {\n padding: 0;\n margin: 0;\n\n ${StyledNavItemIconBox} {\n display: flex;\n }\n }\n }\n }\n }\n `;\n});\n\nStyledMobileNav.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenuButton = styled(Button)(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'border-width': borderWidth },\n text\n }\n } = theme;\n const { navOpen } = useContext(AppShellContext);\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n flex-direction: column;\n flex: 1 0 ${rem(menuButtonWidth(theme))};\n width: ${rem(menuButtonWidth(theme))};\n height: ${hitAreaFinger};\n border-radius: ${borderRadius};\n border: none;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n padding-inline: calc(0.25 * ${theme.base.spacing});\n\n span {\n width: inherit;\n ${ellipsisOverflow}\n }\n\n ${navOpen &&\n css`\n &::before {\n content: '';\n position: absolute;\n inset: calc(${borderWidth} * -1);\n border-radius: inherit;\n background: ${transparentize(0.85, foreground)};\n }\n `}\n\n ${StyledAlert} {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: calc(50% + (0.625rem / 2));\n }\n `;\n});\n\nStyledMobileMoreMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledLoading = styled.div`\n font-size: 2rem;\n`;\n\nexport const StyledAppMain = styled.main<{\n appHeader: boolean;\n mobileNav: boolean;\n navOpen: boolean;\n previewActive: boolean;\n headerOffset?: number;\n $navOrientation?: NavOrientation;\n}>(\n ({\n appHeader,\n mobileNav,\n navOpen,\n previewActive,\n headerOffset = 0,\n $navOrientation = 'side-rail',\n theme\n }) => {\n const isTopBar = $navOrientation === 'top-bar';\n let heightOffset = appHeader ? headerHeight : '0rem';\n if (mobileNav) {\n heightOffset = mobileHeaderHeight;\n }\n const appBackground = theme.base.palette['app-background'];\n\n if (isTopBar && !mobileNav) {\n const totalChromeHeight = appHeader\n ? `calc(${headerHeight} + ${topNavHeight})`\n : topNavHeight;\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n position: relative;\n margin-inline-start: 0;\n /* stylelint-disable-next-line unit-allowed-list */\n min-height: calc(100dvh - ${totalChromeHeight});\n background: ${appBackground};\n\n &:focus {\n outline: none;\n }\n\n & > ${StyledProgressBackdrop} {\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: calc(100dvh - ${totalChromeHeight});\n max-width: 100vw;\n inset-block-start: ${totalChromeHeight};\n inset-inline-start: 0;\n position: fixed;\n transition-property: opacity, max-height, inset-block-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${previewActive &&\n css`\n transition: none;\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n `}\n }\n `;\n }\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n\n @media (min-width: ${theme.base.breakpoints.sm}) {\n --appshell-horizontal-offset: ${navOpen ? navOpenWidth : navWidth};\n }\n position: relative;\n margin-inline-start: ${mobileNav ? 0 : navWidth};\n /* stylelint-disable-next-line unit-allowed-list */\n min-height: calc(100dvh - ${heightOffset});\n background: ${appBackground};\n\n &:focus {\n outline: none;\n }\n\n ${mobileNav &&\n css`\n position: fixed;\n inset-inline: 0;\n /* stylelint-disable-next-line length-zero-no-unit */\n inset-block-start: var(--appshell-top-offset, 0rem);\n inset-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n height: auto;\n min-height: unset;\n overflow: auto;\n `}\n ${navOpen &&\n !mobileNav &&\n css`\n margin-inline-start: ${navOpenWidth};\n `}\n ${!mobileNav &&\n css`\n transition: margin-inline-start\n ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n `}\n & > ${StyledProgressBackdrop} {\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: calc(100dvh - ${heightOffset});\n max-width: calc(100vw - ${navOpen ? navOpenWidth : navWidth});\n inset-block-start: ${heightOffset};\n inset-inline-start: ${navOpen ? navOpenWidth : navWidth};\n position: fixed;\n transition-property: opacity, max-height, max-width, inset-block-start, inset-inline-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition: margin-inline-end ${!mobileNav ? ', margin-inline-start' : ''};\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${previewActive &&\n css`\n transition: none;\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n `}\n }\n `;\n }\n);\n\nStyledAppMain.defaultProps = defaultThemeProp;\n\nexport const StyledBannerRegion = styled.div(({ theme }) => {\n return css`\n padding: calc(2 * ${theme.base.spacing});\n `;\n});\n\nStyledBannerRegion.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellTooltip = styled(StyledTooltip)(({ theme }) => {\n const bg = theme.components.tooltip['background-color'];\n const color = readableColor(bg);\n\n return css`\n background-color: ${bg};\n padding: 0;\n\n header {\n color: ${color};\n border-bottom: none;\n }\n\n ${StyledMenuItem} {\n background-color: ${bg};\n color: ${color};\n\n &:hover,\n &:focus {\n background-color: ${bg};\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n `;\n});\n\nStyledAppShellTooltip.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellToggleButton = styled(Button)(({ theme }) => {\n const {\n background: navBg,\n 'foreground-color': navFgColor,\n 'expand-button': { background: expandBtnBgToken, 'foreground-color': expandBtnFgToken }\n } = theme.components['app-shell'].nav;\n\n const { backgroundColor } = calculateBackgroundAndContrastColor(navBg, navFgColor);\n\n let defaultBg = darken(0.2, backgroundColor);\n if (getContrast(backgroundColor, defaultBg) < 1.3) {\n defaultBg = lighten(0.2, backgroundColor);\n }\n\n const resolvedBg = expandBtnBgToken !== 'auto' ? expandBtnBgToken : defaultBg;\n const resolvedFg = expandBtnFgToken;\n\n return css`\n background: ${resolvedBg};\n color: ${resolvedFg};\n border: none;\n margin-block-start: ${theme.base.spacing};\n\n ${StyledIcon} {\n width: 1.25rem;\n height: 1.25rem;\n font-weight: bold;\n }\n\n &:enabled:focus,\n :not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledAppShellToggleButton.defaultProps = defaultThemeProp;\n\nexport const StyledNavAgentIcon = styled.div`\n width: 1.5rem;\n height: 1.5rem;\n display: inline-flex;\n flex-shrink: 0;\n\n & > svg {\n width: 100%;\n height: 100%;\n }\n`;\n\nStyledNavAgentIcon.defaultProps = defaultThemeProp;\n\nexport const StyledAIAssistant = styled.div(({ theme }) => {\n const { navOpen } = useContext(AppShellContext);\n const { rtl } = useDirection();\n\n const { detached } = theme.components['app-shell'].nav;\n const activeBg = theme.components.agent.background;\n const speed = theme.base.animation.speed;\n const ease = theme.base.animation.timing.ease;\n\n const radius = 'calc(var(--item-height) / 4)';\n\n const inwardSide = rtl ? '100%' : '0%';\n\n return css`\n ${detached &&\n css`\n ${StyledNavList} {\n margin-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledNavList} > ${StyledNavListItem}:last-of-type {\n padding-block-end: 0;\n }\n\n ${StyledNavListItem} {\n > :first-child {\n transition:\n border-start-end-radius ${speed} ${ease},\n border-end-end-radius ${speed} ${ease},\n background ${speed} ${ease};\n border-radius: ${radius};\n outline: none;\n }\n\n &:has([aria-current='page']) {\n z-index: 1;\n padding-inline-end: 0;\n\n > :first-child {\n background: ${activeBg};\n border-block-color: transparent;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n\n &:focus {\n outline: none;\n box-shadow:\n inset ${rtl ? '0.25rem' : '-0.25rem'} 0 0 0 ${activeBg},\n ${theme.base.shadow['focus-inset']};\n }\n\n &::before {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n bottom: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n }\n\n &::after {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n top: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n }\n }\n\n ${!navOpen &&\n css`\n > :first-child > span:not(${StyledCountIcon}) {\n max-width: 0;\n overflow: hidden;\n }\n `}\n }\n }\n `}\n `;\n});\n\nStyledAIAssistant.defaultProps = defaultThemeProp;\n\nexport const StyledShareIcon = styled(Icon)`\n transform: rotate(180deg);\n`;\n\nStyledShareIcon.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,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AU;8BACR,MAAM;wBACZ,MAAM;;;4BAGF,UAAU;8BACR,MAAM;wBACZ,MAAM;;;;;YAKlB,CAAC,OAAO;YACV,GAAG,CAAA;wCAC2B,eAAe;;;;WAI5C;;;KAGN;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAE1C,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { darken, getContrast, lighten, rem, remToPx, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAlert } from '../Badges/Alert';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledLink } from '../Link/Link';\nimport { Count } from '../Badges';\nimport { StyledAvatar } from '../Avatar';\nimport { StyledIcon } from '../Icon';\nimport { StyledImage } from '../Image/Image';\nimport { defaultThemeProp } from '../../theme';\nimport {\n calculateFontSize,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n readableColor\n} from '../../styles';\nimport type { FontSize } from '../../styles';\nimport { StyledMenuItem } from '../Menu/Menu.styles';\nimport { useDirection } from '../../hooks';\nimport { StyledBareButton } from '../Button/BareButton';\nimport Button from '../Button';\nimport { StyledTooltip } from '../Tooltip';\nimport { StyledProgressBackdrop } from '../Progress';\nimport Icon from '../Icon/Icon';\nimport { StyledText } from '../Text';\nimport Flex from '../Flex';\nimport { resizeDrawerMaxWidth } from '../../styles/constants';\nimport { tryCatch } from '../../utils';\nimport { StyledDrawer } from '../Drawer';\n\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors } from './style-utils';\nimport type { NavOrientation } from './AppShell.types';\n\nexport const navWidth = '4rem';\nexport const navOpenWidth = '18.75rem';\nexport const headerHeight = '3rem';\nexport const mobileHeaderHeight = '3.75rem';\nexport const topNavHeight = '3rem';\nconst iconWidth = '1.125rem';\nconst iconBoxSize = `calc((${navWidth} - ${iconWidth} - 2 * var(--nav-padding)) / 2)`;\n\nexport const menuButtonWidth = (theme: DefaultTheme) =>\n Number.parseInt(theme.base['hit-area']['finger-min'], 10) +\n Number.parseInt(\n tryCatch(\n () => remToPx(2),\n () => '32px'\n ),\n 10\n );\n\nexport const StyledAppInfo = styled.a(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const { hoverBg, foreground } = navContrastColors(theme);\n\n return css`\n padding: ${theme.base.spacing} calc(${navWidth} / 4);\n grid-template-columns: calc(${navWidth} / 2) auto;\n column-gap: calc(${navWidth} / 4);\n vertical-align: middle;\n\n &:hover,\n button&:hover {\n background-color: ${hoverBg};\n text-decoration: none;\n }\n\n &:focus:not([disabled]) {\n outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${StyledImage} {\n display: inline-block;\n width: calc(${navWidth} / 2);\n margin-inline-end: calc(${theme.base.spacing} * 2);\n vertical-align: middle;\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: middle;\n }\n\n span:last-of-type {\n font-size: ${fontSize.xs};\n color: ${foreground};\n }\n\n span:first-of-type {\n font-size: ${fontSize.s};\n color: ${foreground};\n margin-inline-end: calc(${theme.base.spacing});\n vertical-align: middle;\n }\n `;\n});\n\nStyledAppInfo.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled(Flex)(({ theme }) => {\n return css`\n overflow-x: hidden;\n overflow-y: auto;\n padding-block-start: calc(0.125 * ${theme.base.spacing});\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow: visible;\n flex-shrink: 0;\n }\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledUtilsSeparator = styled.div<{ navOpen?: boolean }>(({ theme, navOpen }) => {\n return css`\n position: sticky;\n inset-block-end: 0;\n margin-block-start: auto;\n margin-inline: var(--nav-padding);\n border-block-start: 0.0625rem solid ${theme.components['app-shell'].nav['separator-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n position: relative;\n margin-inline-end: calc(var(--nav-padding) / 2);\n\n ${navOpen &&\n css`\n margin-inline-end: var(--nav-padding);\n `}\n }\n `;\n});\n\nStyledUtilsSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledCountIcon = styled(Count)`\n position: absolute;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: 0.25lh;\n inset-inline-start: calc((${navWidth} / 2) - var(--nav-padding));\n`;\n\nStyledCountIcon.defaultProps = defaultThemeProp;\n\nexport const StyledSingleSelectIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n height: ${theme.base['hit-area']['mouse-min']};\n width: ${theme.base['hit-area']['mouse-min']};\n margin-inline-start: calc(2 * ${theme.base.spacing});\n `;\n});\n\nStyledSingleSelectIconBox.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItemExpandCollapse = styled(Icon)``;\n\nexport const StyledNavListItemGroupIndicator = styled(Icon)(({\n theme: {\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n }\n}) => {\n return css`\n position: absolute;\n width: 0.75rem;\n height: 0.75rem;\n margin-block-start: calc(${iconWidth} / 8);\n margin-inline-start: 2.5rem;\n ${detached &&\n css`\n margin-inline-start: calc(${navWidth} / 2 - ${iconWidth} / 6);\n `}\n `;\n});\n\nStyledNavListItemGroupIndicator.defaultProps = defaultThemeProp;\n\nexport const StyledUtilIconCount = styled.span`\n flex-shrink: 0;\n`;\n\nexport const StyledNavItemIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n\n > ${StyledIcon}, ${StyledUtilIconCount} > ${StyledIcon} {\n margin-inline: ${iconBoxSize};\n }\n\n ${StyledAvatar} {\n margin-inline: calc(\n (${navWidth} - ${theme.base['hit-area']['mouse-min']} - 2 * var(--nav-padding)) / 2\n );\n margin-block: calc(0.5 * ${theme.base.spacing});\n font-weight: ${theme.base['font-weight'].normal};\n }\n `;\n});\n\nStyledNavItemIconBox.defaultProps = defaultThemeProp;\n\nconst StyledAppNav = styled.nav(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n\n const foregroundColor = calculateForegroundColor(navBg, navFgColor);\n\n return css`\n --nav-padding: ${theme.components['app-shell'].nav.detached ? '0.75rem' : '0px'};\n background: ${navBg};\n color: ${foregroundColor};\n overflow: hidden;\n white-space: nowrap;\n border-color: ${theme.components['app-shell'].nav['border-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow-y: auto;\n overflow-x: clip;\n }\n padding-block-start: ${theme.base.spacing};\n\n /* App navigation can be focused with shortcut */\n &:focus-visible {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${theme.base['custom-scrollbar'] &&\n css`\n * {\n scrollbar-width: thin;\n }\n `}\n `;\n});\n\nStyledAppNav.defaultProps = defaultThemeProp;\n\nexport const StyledSidebarNav = styled(StyledAppNav)<{\n withAppHeader: boolean;\n portalAgent?: boolean;\n}>(({ withAppHeader, portalAgent, theme }) => {\n const { rtl } = useDirection();\n\n const { navState } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n z-index: ${theme.base['z-index'].drawer};\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: ${navState === 'open' || navState === 'opening' ? navOpenWidth : navWidth};\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${withAppHeader ? headerHeight : '0rem'});\n padding-block-end: ${theme.base.spacing};\n\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n ${portalAgent\n ? css`\n box-shadow: inset ${rtl ? '0.0625rem' : '-0.0625rem'} 0 0 0\n ${theme.components['app-shell'].nav['border-color']};\n `\n : css`\n border-inline-end: 0.0625rem solid ${transparentize(0.9, '#000')};\n border-color: ${theme.components['app-shell'].nav['border-color']};\n `}\n `;\n});\n\nStyledSidebarNav.defaultProps = defaultThemeProp;\n\nexport const StyledCaseClose = styled.button``;\n\nexport const StyledNavListItemVisualContainer = styled.div<{\n isCurrent: boolean;\n navOpen: boolean;\n}>(\n ({\n theme: {\n base: { spacing },\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n },\n isCurrent,\n navOpen\n }) => {\n return css`\n max-width: ${navWidth};\n\n &:has(${StyledAvatar}) {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n & > ${StyledText} {\n padding-inline: ${isCurrent\n ? `${spacing} calc(0.5 * ${spacing})`\n : `calc(0.5 * ${spacing})`};\n\n ${!navOpen &&\n detached &&\n css`\n padding-inline: 0;\n max-width: calc(${navWidth} * 0.625);\n `}\n }\n `;\n }\n);\n\nStyledNavListItemVisualContainer.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItem = styled.li<{\n nestedListCollapsed: boolean;\n singleSelect: boolean;\n}>(({ theme, nestedListCollapsed, singleSelect }) => {\n const {\n base: {\n 'font-weight': { 'semi-bold': semiBold }\n },\n components: {\n 'app-shell': {\n nav: {\n detached,\n 'item-border-radius': navItemBorderRadius,\n 'selected-background': navSelectedBackground\n }\n }\n }\n } = theme;\n\n const { navOpen } = useContext(AppShellContext);\n const { foreground, nestedList } = navContrastColors(theme);\n const { rtl } = useDirection();\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n return css`\n display: block;\n position: relative;\n padding-block: 0;\n padding-inline: var(--nav-padding);\n\n ${StyledIcon} {\n font-size: 1.25rem;\n }\n\n ${StyledCaseClose} {\n display: flex;\n position: absolute;\n opacity: 0;\n left: ${navOpen ? 'auto' : '100%'};\n top: 50%;\n bottom: 50%;\n margin: auto 0;\n color: ${foreground};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n `}\n }\n\n &:first-child ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n\n > :first-child {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding-block: ${theme.base.spacing};\n padding-inline: 0;\n white-space: nowrap;\n color: ${foreground};\n cursor: pointer;\n text-decoration: none;\n border-block: ${rem(1)} solid transparent;\n\n ${detached &&\n css`\n --item-height: 2.5rem;\n padding: 0;\n min-height: var(--item-height);\n height: auto;\n border: none;\n border-radius: ${navItemBorderRadius};\n transition: border-radius ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n `}\n ${detached &&\n css`\n &:not(:only-child):has(+ ul) {\n background: ${nestedListColor};\n margin-block-end: 0.0625rem;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n }\n `}\n span:not(${StyledCountIcon}) {\n overflow: hidden;\n text-overflow: ellipsis;\n color: inherit;\n white-space: nowrap;\n }\n\n &:hover,\n &:focus {\n color: ${foreground};\n background: ${transparentize(0.9, foreground)};\n }\n\n &:hover + ${StyledCaseClose}, &:focus + ${StyledCaseClose} {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n\n @media (forced-colors: none) {\n &:not([aria-current='page'], [aria-expanded='false']:has(+ ul [aria-current='page'])) {\n outline: none;\n }\n }\n }\n\n ${StyledNavListItemExpandCollapse} {\n position: absolute;\n left: ${navOpen ? 'auto' : '100%'};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n `}\n margin: 0;\n opacity: ${navOpen ? '1' : '0'};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${!nestedListCollapsed &&\n css`\n transform: rotateZ(${rtl ? '-90deg' : '90deg'});\n `}\n }\n\n ${singleSelect &&\n css`\n ${StyledNavItemIconBox} > ${StyledIcon} {\n margin-inline: calc(${theme.base.spacing} - var(--nav-padding));\n }\n `}\n ${StyledSingleSelectIconBox} + span {\n margin-inline-start: ${theme.base.spacing};\n }\n }\n\n [aria-expanded='true'] {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n [aria-current='page'],\n [aria-expanded='false']:has(+ ul [aria-current='page']) {\n position: relative;\n font-weight: ${semiBold};\n border-block: ${rem(1)} solid ${theme.components['app-shell'].nav['border-color']};\n background: ${transparentize(0.85, foreground)};\n ${detached &&\n css`\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n outline: 0.0625rem solid;\n\n &:hover,\n &:focus {\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n }\n `}\n\n ${!detached &&\n css`\n &::before {\n content: '';\n position: absolute;\n width: ${rem(4)};\n inset-inline-start: 0;\n top: 0;\n bottom: 0;\n background-color: ${foreground};\n }\n `}\n }\n\n ${StyledNavItemIconBox} {\n display: flex;\n justify-content: center;\n width: calc(${navWidth} - 2 * var(--nav-padding));\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul(({ theme }) => {\n return css`\n min-width: ${navWidth};\n\n & > ${StyledNavListItem} {\n &:not(:last-child),\n &:only-child {\n margin-block-end: calc(${theme.base.spacing} / 2);\n }\n }\n\n & > ${StyledNavListItem}:last-of-type {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `;\n});\nStyledNavList.defaultProps = defaultThemeProp;\n\nexport const StyledNavCasesList = styled.div(({ theme }) => {\n return css`\n ${StyledNavListItem} {\n > :first-child {\n padding: ${theme.base.spacing} 0;\n }\n }\n `;\n});\n\nStyledNavCasesList.defaultProps = defaultThemeProp;\n\nexport const StyledNestedNavList = styled(StyledNavList)(({ theme }) => {\n const {\n base: { 'border-radius': borderRadius, spacing },\n\n components: {\n 'app-shell': {\n nav: { detached, 'selected-background': navSelectedBackground }\n }\n }\n } = theme;\n\n const { nestedList, foreground } = navContrastColors(theme);\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n const resolvedSelectedBg =\n navSelectedBackground !== 'auto' ? navSelectedBackground : transparentize(0.9, foreground);\n\n return css`\n background: ${nestedListColor};\n border-radius: ${detached ? borderRadius : '0px'};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n\n ${StyledNavListItem} {\n &:first-child {\n border-block-start: ${spacing} solid transparent;\n }\n\n &:last-child {\n border-block-end: calc(0.5 * ${spacing}) solid transparent;\n }\n\n &:not(:last-child) {\n margin-block-end: calc(${spacing} / 2);\n }\n\n > :first-child {\n &:has(${StyledIcon}) {\n padding-inline-start: calc(((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2));\n }\n\n &:not(:has(${StyledIcon})) {\n padding-inline-start: calc(\n ((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2) + ${iconBoxSize}\n );\n }\n }\n\n ${detached &&\n css`\n [aria-current='page'] {\n background: ${resolvedSelectedBg};\n\n &:hover,\n &:focus {\n background: ${resolvedSelectedBg};\n }\n }\n `}\n }\n `;\n});\n\nStyledNestedNavList.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTypes = styled.div(({ theme }) => {\n const { foreground } = navContrastColors(theme);\n\n return css`\n button {\n ${StyledNavItemIconBox} {\n transition: transform ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n }\n\n &[aria-expanded='false'] ${StyledNavItemIconBox} {\n transform: none;\n }\n\n &[aria-expanded='true'] ${StyledNavItemIconBox} {\n transform: rotateZ(45deg);\n }\n }\n\n > ${StyledNavList} > ${StyledNavListItem} > ${StyledBareButton} {\n background: ${theme.components['app-shell'].nav['create-button-background']};\n\n &:hover,\n &:focus {\n background: ${transparentize(0.9, foreground)};\n }\n }\n `;\n});\n\nStyledCaseTypes.defaultProps = defaultThemeProp;\n\nexport const StyledUtils = styled.div(({ theme }) => {\n return css`\n ${StyledNavList} {\n padding-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledBareButton} > ${StyledIcon}:first-child, ${StyledBareButton} > ${StyledUtilIconCount} {\n margin: 0 calc((${navWidth} - ${iconWidth}) / 2);\n }\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenu = styled(StyledAppNav)`\n width: 100%;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${mobileHeaderHeight});\n`;\n\nStyledMobileMoreMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMobileNav = styled.header(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'focus-shadow': focusShadow },\n text\n }\n } = theme;\n const mobileNavColor = theme.components['app-shell'].nav.background;\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n width: 100%;\n min-height: ${mobileHeaderHeight};\n z-index: calc(${theme.base['z-index'].drawer} + 1);\n background: ${mobileNavColor};\n color: ${foreground};\n padding: calc(0.25 * ${theme.base.spacing});\n position: fixed;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: calc(100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}));\n\n & + ${StyledDrawer}, & + ${StyledDrawer} ${StyledDrawer} {\n bottom: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n width: 100%;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(\n 100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}) - var(\n --appshell-top-offset,\n 0rem\n )\n );\n }\n\n > div:has(> ${StyledNavList}),\n > div:has(> ${StyledNavList}) > ${StyledNavList}, > ${StyledNavList} {\n display: contents;\n\n ${StyledNavListItem} {\n flex-grow: 1;\n width: ${rem(menuButtonWidth(theme))};\n padding: 0;\n margin: 0;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n\n ${StyledBareButton}, ${StyledLink} {\n flex-direction: column;\n justify-content: center;\n height: ${hitAreaFinger};\n padding: 0 calc(0.25 * ${theme.base.spacing});\n border-radius: ${borderRadius};\n border-block: none;\n\n &::before {\n width: 0;\n }\n\n span:not(${StyledCountIcon}) {\n width: inherit;\n text-align: center;\n }\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${focusShadow};\n }\n\n ${StyledNavListItemVisualContainer} {\n padding: 0;\n margin: 0;\n\n ${StyledNavItemIconBox} {\n display: flex;\n }\n }\n }\n }\n }\n `;\n});\n\nStyledMobileNav.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenuButton = styled(Button)(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'border-width': borderWidth },\n text\n }\n } = theme;\n const { navOpen } = useContext(AppShellContext);\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n flex-direction: column;\n flex: 1 0 ${rem(menuButtonWidth(theme))};\n width: ${rem(menuButtonWidth(theme))};\n height: ${hitAreaFinger};\n border-radius: ${borderRadius};\n border: none;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n padding-inline: calc(0.25 * ${theme.base.spacing});\n\n span {\n width: inherit;\n ${ellipsisOverflow}\n }\n\n ${navOpen &&\n css`\n &::before {\n content: '';\n position: absolute;\n inset: calc(${borderWidth} * -1);\n border-radius: inherit;\n background: ${transparentize(0.85, foreground)};\n }\n `}\n\n ${StyledAlert} {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: calc(50% + (0.625rem / 2));\n }\n `;\n});\n\nStyledMobileMoreMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledLoading = styled.div`\n font-size: 2rem;\n`;\n\nexport const StyledAppMain = styled.main<{\n appHeader: boolean;\n mobileNav: boolean;\n navOpen: boolean;\n previewActive: boolean;\n headerOffset?: number;\n $navOrientation?: NavOrientation;\n}>(\n ({\n appHeader,\n mobileNav,\n navOpen,\n previewActive,\n headerOffset = 0,\n $navOrientation = 'side-rail',\n theme\n }) => {\n const isTopBar = $navOrientation === 'top-bar';\n let heightOffset = appHeader ? headerHeight : '0rem';\n if (mobileNav) {\n heightOffset = mobileHeaderHeight;\n }\n const appBackground = theme.base.palette['app-background'];\n\n if (isTopBar && !mobileNav) {\n const totalChromeHeight = appHeader\n ? `calc(${headerHeight} + ${topNavHeight})`\n : topNavHeight;\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n position: relative;\n margin-inline-start: 0;\n /* stylelint-disable-next-line unit-allowed-list */\n min-height: calc(100dvh - ${totalChromeHeight});\n background: ${appBackground};\n\n &:focus {\n outline: none;\n }\n\n & > ${StyledProgressBackdrop} {\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: calc(100dvh - ${totalChromeHeight});\n max-width: 100vw;\n inset-block-start: ${totalChromeHeight};\n inset-inline-start: 0;\n position: fixed;\n transition-property: opacity, max-height, inset-block-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${previewActive &&\n css`\n transition: none;\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n `}\n }\n `;\n }\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n\n @media (min-width: ${theme.base.breakpoints.sm}) {\n --appshell-horizontal-offset: ${navOpen ? navOpenWidth : navWidth};\n }\n position: relative;\n margin-inline-start: ${mobileNav ? 0 : navWidth};\n /* stylelint-disable-next-line unit-allowed-list */\n min-height: calc(100dvh - ${heightOffset});\n background: ${appBackground};\n\n &:focus {\n outline: none;\n }\n\n ${mobileNav &&\n css`\n position: fixed;\n inset-inline: 0;\n /* stylelint-disable-next-line length-zero-no-unit */\n inset-block-start: var(--appshell-top-offset, 0rem);\n inset-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n height: auto;\n min-height: unset;\n overflow: auto;\n `}\n ${navOpen &&\n !mobileNav &&\n css`\n margin-inline-start: ${navOpenWidth};\n `}\n ${!mobileNav &&\n css`\n transition: margin-inline-start\n ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n `}\n & > ${StyledProgressBackdrop} {\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: calc(100dvh - ${heightOffset});\n max-width: calc(100vw - ${navOpen ? navOpenWidth : navWidth});\n inset-block-start: ${heightOffset};\n inset-inline-start: ${navOpen ? navOpenWidth : navWidth};\n position: fixed;\n transition-property: opacity, max-height, max-width, inset-block-start, inset-inline-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition: margin-inline-end ${!mobileNav ? ', margin-inline-start' : ''};\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${previewActive &&\n css`\n transition: none;\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n `}\n }\n `;\n }\n);\n\nStyledAppMain.defaultProps = defaultThemeProp;\n\nexport const StyledBannerRegion = styled.div(({ theme }) => {\n return css`\n padding: calc(2 * ${theme.base.spacing});\n `;\n});\n\nStyledBannerRegion.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellTooltip = styled(StyledTooltip)(({ theme }) => {\n const bg = theme.components.tooltip['background-color'];\n const color = readableColor(bg);\n\n return css`\n background-color: ${bg};\n padding: 0;\n\n header {\n color: ${color};\n border-bottom: none;\n }\n\n ${StyledMenuItem} {\n background-color: ${bg};\n color: ${color};\n\n &:hover,\n &:focus {\n background-color: ${bg};\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n `;\n});\n\nStyledAppShellTooltip.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellToggleButton = styled(Button)(({ theme }) => {\n const {\n background: navBg,\n 'foreground-color': navFgColor,\n 'expand-button': { background: expandBtnBgToken, 'foreground-color': expandBtnFgToken }\n } = theme.components['app-shell'].nav;\n\n const { backgroundColor } = calculateBackgroundAndContrastColor(navBg, navFgColor);\n\n let defaultBg = darken(0.2, backgroundColor);\n if (getContrast(backgroundColor, defaultBg) < 1.3) {\n defaultBg = lighten(0.2, backgroundColor);\n }\n\n const resolvedBg = expandBtnBgToken !== 'auto' ? expandBtnBgToken : defaultBg;\n const resolvedFg = expandBtnFgToken;\n\n return css`\n background: ${resolvedBg};\n color: ${resolvedFg};\n border: none;\n margin-block-start: ${theme.base.spacing};\n\n ${StyledIcon} {\n width: 1.25rem;\n height: 1.25rem;\n font-weight: bold;\n }\n\n &:enabled:focus,\n :not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledAppShellToggleButton.defaultProps = defaultThemeProp;\n\nexport const StyledNavAgentIcon = styled.div`\n width: 1.5rem;\n height: 1.5rem;\n display: inline-flex;\n flex-shrink: 0;\n\n & > svg {\n width: 100%;\n height: 100%;\n }\n`;\n\nStyledNavAgentIcon.defaultProps = defaultThemeProp;\n\nexport const StyledAIAssistant = styled.div(({ theme }) => {\n const { navOpen } = useContext(AppShellContext);\n const { rtl } = useDirection();\n\n const { detached } = theme.components['app-shell'].nav;\n const activeBg = theme.components.agent.background;\n const speed = theme.base.animation.speed;\n const ease = theme.base.animation.timing.ease;\n\n const radius = 'calc(var(--item-height) / 4)';\n\n const inwardSide = rtl ? '100%' : '0%';\n\n return css`\n ${detached &&\n css`\n ${StyledNavList} {\n margin-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledNavList} > ${StyledNavListItem}:last-of-type {\n padding-block-end: 0;\n }\n\n ${StyledNavListItem} {\n > :first-child {\n transition:\n border-start-end-radius ${speed} ${ease},\n border-end-end-radius ${speed} ${ease},\n background ${speed} ${ease};\n border-radius: ${radius};\n outline: none;\n }\n\n &:has([aria-current='page']) {\n z-index: 1;\n padding-inline-end: 0;\n\n > :first-child {\n background: ${activeBg};\n border-block-color: transparent;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n\n &:focus {\n outline: none;\n box-shadow:\n inset ${rtl ? '0.25rem' : '-0.25rem'} 0 0 0 ${activeBg},\n ${theme.base.shadow['focus-inset']};\n }\n\n &::before {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n bottom: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n }\n\n &::after {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n top: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n }\n }\n\n ${!navOpen &&\n css`\n > :first-child > span:not(${StyledCountIcon}) {\n max-width: 0;\n overflow: hidden;\n }\n `}\n }\n }\n `}\n `;\n});\n\nStyledAIAssistant.defaultProps = defaultThemeProp;\n\nexport const StyledShareIcon = styled(Icon)`\n transform: rotate(180deg);\n`;\n\nStyledShareIcon.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -9,6 +9,6 @@ interface DrawerViewProps {
|
|
|
9
9
|
/** When provided, the drawer is offset below the chrome (header + top nav). */
|
|
10
10
|
topOffset?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const _default: ({ content, header, onDrawerOpen, onDrawerClose, drawerOpen, setDrawerOpen, topOffset }: DrawerViewProps) => import("react
|
|
12
|
+
declare const _default: ({ content, header, onDrawerOpen, onDrawerClose, drawerOpen, setDrawerOpen, topOffset }: DrawerViewProps) => import("react").ReactPortal | undefined;
|
|
13
13
|
export default _default;
|
|
14
14
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAmCvC,UAAU,eAAe;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;yBAEe,wFAQb,eAAe;AARlB,wBA8GE"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useContext, useLayoutEffect, useRef } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
3
4
|
import BareButton from '../Button/BareButton';
|
|
4
5
|
import Drawer from '../Drawer';
|
|
5
6
|
import Flex from '../Flex';
|
|
6
7
|
import Icon, { registerIcon } from '../Icon';
|
|
7
8
|
import * as arrowLeftIcon from '../Icon/icons/arrow-left.icon';
|
|
8
9
|
import Text from '../Text';
|
|
9
|
-
import { useConsolidatedRef, useDirection, useElement, useEscape, useFocusTrap, useI18n, useTheme, useUID } from '../../hooks';
|
|
10
|
+
import { useConfiguration, useConsolidatedRef, useDirection, useElement, useEscape, useFocusTrap, useI18n, useTheme, useUID } from '../../hooks';
|
|
10
11
|
import Configuration from '../Configuration/Configuration';
|
|
11
|
-
import { getActiveElement } from '../../utils';
|
|
12
|
+
import { documentIsAvailable, getActiveElement } from '../../utils';
|
|
12
13
|
import { isSolidColor } from '../../styles';
|
|
13
14
|
import AppShellContext from './AppShellContext';
|
|
14
15
|
import { StyledDrawerWrapper, StyledTopNavDrawerOffset, StyledDrawerBackButton, StyledDrawerHeading, StyledDrawerListContainer } from './Drawer.styles';
|
|
15
16
|
import { navContrastColors } from './style-utils';
|
|
16
17
|
registerIcon(arrowLeftIcon);
|
|
17
18
|
export default ({ content, header, onDrawerOpen, onDrawerClose, drawerOpen, setDrawerOpen, topOffset }) => {
|
|
19
|
+
const { portalTarget = documentIsAvailable ? document.body : undefined } = useConfiguration();
|
|
18
20
|
const t = useI18n();
|
|
19
21
|
const theme = useTheme();
|
|
20
22
|
const { focusedImperatively } = useContext(AppShellContext);
|
|
@@ -54,6 +56,8 @@ export default ({ content, header, onDrawerOpen, onDrawerClose, drawerOpen, setD
|
|
|
54
56
|
onDrawerClose?.();
|
|
55
57
|
returnFocusRef.current?.focus();
|
|
56
58
|
}, onOuterClick: () => setDrawerOpen(false), ref: drawerRef, children: [_jsxs(Flex, { as: StyledDrawerHeading, role: 'none', container: { alignItems: 'center' }, children: [_jsx(BareButton, { as: StyledDrawerBackButton, ref: backButtonRef, onClick: () => setDrawerOpen(false), "aria-label": t('close_noun', [header]), children: _jsx(Icon, { name: `arrow-${start}` }) }), _jsx(Text, { variant: 'h2', id: headerId, children: header })] }), _jsx(Flex, { as: StyledDrawerListContainer, container: { direction: 'column' }, "aria-labelledby": headerId, children: content })] }));
|
|
57
|
-
|
|
59
|
+
// Needs to be portalled to prevent clipping on iOS Safari - see https://bugs.webkit.org/show_bug.cgi?id=160953
|
|
60
|
+
return (portalTarget &&
|
|
61
|
+
createPortal(_jsx(Configuration, { theme: navTheme, portalTarget: drawerEl ?? undefined, children: topOffset ? (_jsx(StyledTopNavDrawerOffset, { "$topOffset": topOffset, children: drawerContent })) : (drawerContent) }), portalTarget));
|
|
58
62
|
};
|
|
59
63
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,SAAS,EACT,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,mBAAmB,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,aAC5E,KAAC,UAAU,IACT,EAAE,EAAE,sBAAsB,EAC1B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,gBACvB,CAAC,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC,YAErC,KAAC,IAAI,IAAC,IAAI,EAAE,SAAS,KAAK,EAAE,GAAI,GACrB,EACb,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,EAAC,EAAE,EAAE,QAAQ,YAC5B,MAAM,GACF,IACF,EACP,KAAC,IAAI,IACH,EAAE,EAAE,yBAAyB,EAC7B,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,qBACjB,QAAQ,YAExB,OAAO,GACH,IACA,CACV,CAAC;IAEF,+GAA+G;IAC/G,OAAO,CACL,YAAY;QACZ,YAAY,CACV,KAAC,aAAa,IAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,IAAI,SAAS,YAChE,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,wBAAwB,kBAAa,SAAS,YAC5C,aAAa,GACW,CAC5B,CAAC,CAAC,CAAC,CACF,aAAa,CACd,GACa,EAChB,YAAY,CACb,CACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useContext, useLayoutEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport type { ReactNode } from 'react';\n\nimport BareButton from '../Button/BareButton';\nimport Drawer from '../Drawer';\nimport Flex from '../Flex';\nimport Icon, { registerIcon } from '../Icon';\nimport * as arrowLeftIcon from '../Icon/icons/arrow-left.icon';\nimport Text from '../Text';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useDirection,\n useElement,\n useEscape,\n useFocusTrap,\n useI18n,\n useTheme,\n useUID\n} from '../../hooks';\nimport Configuration from '../Configuration/Configuration';\nimport { documentIsAvailable, getActiveElement } from '../../utils';\nimport { isSolidColor } from '../../styles';\n\nimport AppShellContext from './AppShellContext';\nimport {\n StyledDrawerWrapper,\n StyledTopNavDrawerOffset,\n StyledDrawerBackButton,\n StyledDrawerHeading,\n StyledDrawerListContainer\n} from './Drawer.styles';\nimport { navContrastColors } from './style-utils';\n\nregisterIcon(arrowLeftIcon);\n\ninterface DrawerViewProps {\n content: ReactNode;\n header: string;\n onDrawerOpen?: () => void;\n onDrawerClose?: () => void;\n drawerOpen: boolean;\n setDrawerOpen: (open: boolean) => void;\n /** When provided, the drawer is offset below the chrome (header + top nav). */\n topOffset?: string;\n}\n\nexport default ({\n content,\n header,\n onDrawerOpen,\n onDrawerClose,\n drawerOpen,\n setDrawerOpen,\n topOffset\n}: DrawerViewProps) => {\n const { portalTarget = documentIsAvailable ? document.body : undefined } = useConfiguration();\n const t = useI18n();\n const theme = useTheme();\n const { focusedImperatively } = useContext(AppShellContext);\n const { start } = useDirection();\n const returnFocusRef = useRef<HTMLElement>();\n const [drawerEl, setDrawerEl] = useElement<HTMLDivElement>();\n const drawerRef = useConsolidatedRef(setDrawerEl);\n const backButtonRef = useRef<HTMLButtonElement>(null);\n const headerId = useUID();\n\n useEscape(\n () => {\n setDrawerOpen(false);\n },\n drawerEl,\n [drawerEl]\n );\n\n useFocusTrap(drawerRef);\n\n const { foreground, interactive, urgent } = navContrastColors(theme);\n const navBg = theme.components['app-shell'].nav.background;\n const navTheme = {\n base: {\n palette: {\n 'primary-background': isSolidColor(navBg) ? navBg : 'transparent',\n 'foreground-color': foreground,\n interactive,\n urgent\n }\n }\n };\n\n // Using layout effect to capture the focused element prior to drawer elements taking focus.\n useLayoutEffect(() => {\n returnFocusRef.current = (getActiveElement() as HTMLElement) ?? undefined;\n }, []);\n\n const drawerContent = (\n <Drawer\n role='dialog'\n aria-labelledby={headerId}\n as={StyledDrawerWrapper}\n position={topOffset ? 'absolute' : 'fixed'}\n placement={start}\n open={drawerOpen}\n nullWhenClosed\n onAfterOpen={() => {\n if (backButtonRef.current && !drawerRef.current?.contains(getActiveElement())) {\n focusedImperatively.current = true;\n backButtonRef.current.focus();\n }\n onDrawerOpen?.();\n }}\n onAfterClose={() => {\n onDrawerClose?.();\n returnFocusRef.current?.focus();\n }}\n onOuterClick={() => setDrawerOpen(false)}\n ref={drawerRef}\n >\n <Flex as={StyledDrawerHeading} role='none' container={{ alignItems: 'center' }}>\n <BareButton\n as={StyledDrawerBackButton}\n ref={backButtonRef}\n onClick={() => setDrawerOpen(false)}\n aria-label={t('close_noun', [header])}\n >\n <Icon name={`arrow-${start}`} />\n </BareButton>\n <Text variant='h2' id={headerId}>\n {header}\n </Text>\n </Flex>\n <Flex\n as={StyledDrawerListContainer}\n container={{ direction: 'column' }}\n aria-labelledby={headerId}\n >\n {content}\n </Flex>\n </Drawer>\n );\n\n // Needs to be portalled to prevent clipping on iOS Safari - see https://bugs.webkit.org/show_bug.cgi?id=160953\n return (\n portalTarget &&\n createPortal(\n <Configuration theme={navTheme} portalTarget={drawerEl ?? undefined}>\n {topOffset ? (\n <StyledTopNavDrawerOffset $topOffset={topOffset}>\n {drawerContent}\n </StyledTopNavDrawerOffset>\n ) : (\n drawerContent\n )}\n </Configuration>,\n portalTarget\n )\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationListItemWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/NavigationListItemWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,EAAE,EAAiC,MAAM,OAAO,CAAC;AAe5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AA8DhE,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"NavigationListItemWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/NavigationListItemWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,EAAE,EAAiC,MAAM,OAAO,CAAC;AAe5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AA8DhE,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,uBAAuB,CA2PhD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -196,7 +196,7 @@ const ListItemWrapper = props => {
|
|
|
196
196
|
onChange: (e) => setFilterValue(e.target.value)
|
|
197
197
|
}
|
|
198
198
|
: undefined;
|
|
199
|
-
return (_jsxs(_Fragment, { children: [children, !navOpen && (_jsxs(_Fragment, { children: [!popoverOpen && (_jsx(Tooltip, { target: childElementRef.current, placement: mobileNavBar ? 'top' : end, showDelay: 'none', hideDelay: 'none', children: tooltipLabel })), popoverOpen && isMenu && (_jsx(Popover, { target: childElementRef.current, placement: `${mobileNavBar ? 'top' : end}-start`, ref: popoverRef, as: StyledNavigationPopover, arrow: true, modifiers: [
|
|
199
|
+
return (_jsxs(_Fragment, { children: [children, !navOpen && (_jsxs(_Fragment, { children: [!popoverOpen && (_jsx(Tooltip, { target: childElementRef.current, placement: mobileNavBar ? 'top' : end, showDelay: 'none', hideDelay: 'none', children: tooltipLabel })), popoverOpen && isMenu && (_jsx(Popover, { target: childElementRef.current, placement: `${mobileNavBar ? 'top' : end}-start`, ref: popoverRef, as: StyledNavigationPopover, arrow: true, strategy: mobileNavBar ? 'absolute' : 'fixed', modifiers: [
|
|
200
200
|
...(headerEl
|
|
201
201
|
? [
|
|
202
202
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationListItemWrapper.js","sourceRoot":"","sources":["../../../src/components/AppShell/NavigationListItemWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,aAAa,C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AQ,EAChB,cAAc,EAAE,eAAe,CAAC,OAAO,IAAI,SAAS,EACpD,QAAQ,EAAE,EAAE,EACZ,MAAM,EAAE,YAAY,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gCAC9B,OAAO;oCACL,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAW;oCACzC,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAW;oCAC9C,IAAI,EAAE,IAAI,CAAC,IAAI;oCACf,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;wCAChB,CAAC,CAAC,eAAe,EAAE,CAAC;wCACpB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;wCAClB,cAAc,CAAC,KAAK,CAAC,CAAC;oCACxB,CAAC;iCACF,CAAC;4BACJ,CAAC,CAAC,EACF,MAAM,EAAE,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,KAAK,GAAQ,EACzC,YAAY,EAAE,mBAAmB,EACjC,YAAY,EAAE,mBAAmB,GACjC,CACH,GACO,CACX,IACA,CACJ,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { remToPx, stripUnit } from 'polished';\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent, FC, MouseEvent as ReactMouseEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { tryCatch, createStringMatcher, isInstance } from '../../utils';\nimport { useDirection, useEscape, useOuterEvent, useTheme, useUID } from '../../hooks';\nimport Text, { StyledText } from '../Text';\nimport Tooltip from '../Tooltip';\nimport Popover from '../Popover';\nimport Menu from '../Menu';\nimport { StyledMenu, StyledMenuListContainer, StyledMenuListWrapper } from '../Menu/Menu.styles';\nimport { StyledEmptyState } from '../EmptyState';\nimport { StyledIcon } from '../Icon';\nimport { defaultThemeProp } from '../../theme';\nimport { calculateFontSize } from '../../styles';\n\nimport type { NavListItemWrapperProps } from './AppShell.types';\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors } from './style-utils';\n\nconst StyledNavigationPopover = styled.div<{ mobileNavBar?: boolean }>(\n ({ theme, mobileNavBar }) => {\n const { hoverBg, foreground, backgroundColor } = navContrastColors(theme);\n\n const headingFontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']).s;\n return css`\n display: flex;\n background: ${backgroundColor};\n\n ${StyledMenu} {\n display: flex;\n flex-direction: column;\n ${mobileNavBar &&\n css`\n width: calc(100vw - (2 * ${theme.base.spacing}));\n `}\n }\n\n ${StyledMenuListWrapper} {\n overflow: auto;\n }\n\n &,\n ${StyledMenuListContainer} {\n background: ${backgroundColor};\n\n header {\n color: ${foreground};\n border-bottom: none;\n\n h2 {\n font-weight: ${theme.base['font-weight']['semi-bold']};\n font-size: ${headingFontSize};\n }\n }\n }\n\n ${StyledMenuListContainer} li {\n color: ${foreground};\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n background-color: ${hoverBg};\n }\n }\n\n ${StyledEmptyState} {\n ${StyledIcon}, ${StyledText} {\n color: ${foreground};\n }\n }\n `;\n }\n);\n\nStyledNavigationPopover.defaultProps = defaultThemeProp;\n\nconst ListItemWrapper: FC<NavListItemWrapperProps> = props => {\n const {\n children,\n childElementRef,\n label,\n tooltipLabel,\n items,\n filterAt = 5,\n content,\n onMenuToggle,\n mobileNavBar\n } = props;\n const { navOpen, collapsedHoverMenus, headerEl } = useContext(AppShellContext);\n const popoverRef = useRef<HTMLDivElement>(null);\n const filterElRef = useRef<HTMLInputElement>(null);\n const isMenu = (Array.isArray(items) && items.length > 0) || !!content;\n const renderFilter = Array.isArray(items) && items.length >= filterAt;\n\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [filterValue, setFilterValue] = useState('');\n const filterRegex = createStringMatcher(filterValue, 'contains');\n\n const { end } = useDirection();\n const mousedOverMenu = useRef(false);\n const hidePopoverTimeout = useRef<number | null>();\n const theme = useTheme();\n\n const closePopover = (focusChildEl: boolean = false) => {\n if (popoverOpen) {\n setFilterValue('');\n setPopoverOpen(false);\n if (focusChildEl) {\n childElementRef.current?.focus();\n }\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n }\n };\n\n const onMouseEnterContent = () => {\n if (collapsedHoverMenus) {\n mousedOverMenu.current = true;\n }\n };\n\n const onMouseLeaveContent = () => {\n if (mousedOverMenu.current && collapsedHoverMenus) {\n mousedOverMenu.current = false;\n closePopover();\n }\n };\n\n useOuterEvent('click', isMenu ? [popoverRef, childElementRef] : [], () => closePopover());\n\n useEffect(() => {\n const onClick = () => {\n if (isMenu) {\n if (!navOpen && !popoverOpen) setPopoverOpen(true);\n else {\n setTimeout(() => {\n closePopover(true);\n }, 0);\n }\n }\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Tab' && !content) {\n setPopoverOpen(false);\n }\n };\n\n const onMouseEnter = () => {\n if (isMenu && collapsedHoverMenus && !navOpen && !popoverOpen) {\n setPopoverOpen(true);\n }\n };\n\n const onMouseOut = (e: MouseEvent) => {\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n\n const tag = (e.relatedTarget as HTMLElement | null)?.tagName.toLowerCase();\n\n // If the mouse is mousing out from this nav item onto another nav item\n if (tag && ['a', 'button', 'form'].includes(tag)) {\n closePopover();\n } else {\n hidePopoverTimeout.current = window.setTimeout(() => {\n if (!mousedOverMenu.current) {\n closePopover();\n }\n }, 1000);\n }\n };\n\n const onBlur = (e: FocusEvent) => {\n if (isInstance(e.relatedTarget, Node) && popoverRef.current?.contains(e.relatedTarget)) {\n return;\n }\n closePopover();\n };\n\n childElementRef.current?.addEventListener('blur', onBlur);\n childElementRef.current?.addEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.addEventListener('mouseenter', onMouseEnter);\n childElementRef.current?.addEventListener('mouseleave', onMouseOut);\n } else {\n childElementRef.current?.addEventListener('click', onClick);\n }\n return () => {\n childElementRef.current?.removeEventListener('blur', onBlur);\n childElementRef.current?.removeEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.removeEventListener('mouseenter', onMouseEnter);\n childElementRef.current?.removeEventListener('mouseleave', onMouseOut);\n } else {\n childElementRef.current?.removeEventListener('click', onClick);\n }\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n };\n }, [isMenu, navOpen, closePopover, collapsedHoverMenus, popoverOpen]);\n\n useEffect(() => {\n onMenuToggle?.(popoverOpen ? 'open' : 'close');\n }, [popoverOpen]);\n\n useEscape(() => closePopover(true), childElementRef, [childElementRef]);\n\n useEscape(() => closePopover(true), popoverRef, [popoverRef]);\n\n const searchListId = useUID();\n\n const itemsToRender = renderFilter\n ? items.filter(item => {\n return filterRegex.test(item.primary);\n })\n : items ?? [];\n\n const filterInputProps = renderFilter\n ? {\n value: filterValue,\n ref: filterElRef,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setFilterValue(e.target.value)\n }\n : undefined;\n\n return (\n <>\n {children}\n {!navOpen && (\n <>\n {!popoverOpen && (\n <Tooltip\n target={childElementRef.current}\n placement={mobileNavBar ? 'top' : end}\n showDelay='none'\n hideDelay='none'\n >\n {tooltipLabel}\n </Tooltip>\n )}\n {popoverOpen && isMenu && (\n <Popover\n target={childElementRef.current}\n placement={`${mobileNavBar ? 'top' : end}-start`}\n ref={popoverRef}\n as={StyledNavigationPopover}\n arrow\n modifiers={[\n ...(headerEl\n ? [\n {\n name: 'preventOverflow',\n options: {\n padding: {\n top: headerEl.offsetHeight + 8,\n right: 8,\n bottom: 8,\n left: 8\n }\n }\n }\n ]\n : []),\n ...(mobileNavBar\n ? [\n {\n name: 'offset',\n options: {\n offset: [\n 0,\n tryCatch(\n () => 5.5 + Number(stripUnit(remToPx(theme.base.spacing))),\n () => 5.5 + 8\n )\n ]\n }\n }\n ]\n : [])\n ]}\n onClick={(e: ReactMouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n }}\n mobileNavBar={mobileNavBar}\n >\n {content ? (\n <div onMouseEnter={onMouseEnterContent} onMouseLeave={onMouseLeaveContent}>\n {content}\n </div>\n ) : (\n <Menu\n mode='action'\n variant='flyout'\n focusControlEl={childElementRef.current ?? undefined}\n scrollAt={99}\n listId={searchListId}\n filterInputProps={filterInputProps}\n items={itemsToRender.map(item => {\n return {\n id: (item.primary || item.text) as string,\n primary: (item.primary || item.text) as string,\n href: item.href,\n onClick: (_, e) => {\n e.stopPropagation();\n item.onClick?.(e);\n setPopoverOpen(false);\n }\n };\n })}\n header={<Text variant='h2'>{label}</Text>}\n onMouseEnter={onMouseEnterContent}\n onMouseLeave={onMouseLeaveContent}\n />\n )}\n </Popover>\n )}\n </>\n )}\n </>\n );\n};\n\nexport default ListItemWrapper;\n"]}
|
|
1
|
+
{"version":3,"file":"NavigationListItemWrapper.js","sourceRoot":"","sources":["../../../src/components/AppShell/NavigationListItemWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,OAAO,MAAM,YAAY,CAAC;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AAgB,EAClC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gCAC9B,OAAO;oCACL,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAW;oCACzC,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAW;oCAC9C,IAAI,EAAE,IAAI,CAAC,IAAI;oCACf,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;wCAChB,CAAC,CAAC,eAAe,EAAE,CAAC;wCACpB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;wCAClB,cAAc,CAAC,KAAK,CAAC,CAAC;oCACxB,CAAC;iCACF,CAAC;4BACJ,CAAC,CAAC,EACF,MAAM,EAAE,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,KAAK,GAAQ,EACzC,YAAY,EAAE,mBAAmB,EACjC,YAAY,EAAE,mBAAmB,GACjC,CACH,GACO,CACX,IACA,CACJ,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { remToPx, stripUnit } from 'polished';\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent, FC, MouseEvent as ReactMouseEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { tryCatch, createStringMatcher, isInstance } from '../../utils';\nimport { useDirection, useEscape, useOuterEvent, useTheme, useUID } from '../../hooks';\nimport Text, { StyledText } from '../Text';\nimport Tooltip from '../Tooltip';\nimport Popover from '../Popover';\nimport Menu from '../Menu';\nimport { StyledMenu, StyledMenuListContainer, StyledMenuListWrapper } from '../Menu/Menu.styles';\nimport { StyledEmptyState } from '../EmptyState';\nimport { StyledIcon } from '../Icon';\nimport { defaultThemeProp } from '../../theme';\nimport { calculateFontSize } from '../../styles';\n\nimport type { NavListItemWrapperProps } from './AppShell.types';\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors } from './style-utils';\n\nconst StyledNavigationPopover = styled.div<{ mobileNavBar?: boolean }>(\n ({ theme, mobileNavBar }) => {\n const { hoverBg, foreground, backgroundColor } = navContrastColors(theme);\n\n const headingFontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']).s;\n return css`\n display: flex;\n background: ${backgroundColor};\n\n ${StyledMenu} {\n display: flex;\n flex-direction: column;\n ${mobileNavBar &&\n css`\n width: calc(100vw - (2 * ${theme.base.spacing}));\n `}\n }\n\n ${StyledMenuListWrapper} {\n overflow: auto;\n }\n\n &,\n ${StyledMenuListContainer} {\n background: ${backgroundColor};\n\n header {\n color: ${foreground};\n border-bottom: none;\n\n h2 {\n font-weight: ${theme.base['font-weight']['semi-bold']};\n font-size: ${headingFontSize};\n }\n }\n }\n\n ${StyledMenuListContainer} li {\n color: ${foreground};\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n background-color: ${hoverBg};\n }\n }\n\n ${StyledEmptyState} {\n ${StyledIcon}, ${StyledText} {\n color: ${foreground};\n }\n }\n `;\n }\n);\n\nStyledNavigationPopover.defaultProps = defaultThemeProp;\n\nconst ListItemWrapper: FC<NavListItemWrapperProps> = props => {\n const {\n children,\n childElementRef,\n label,\n tooltipLabel,\n items,\n filterAt = 5,\n content,\n onMenuToggle,\n mobileNavBar\n } = props;\n const { navOpen, collapsedHoverMenus, headerEl } = useContext(AppShellContext);\n const popoverRef = useRef<HTMLDivElement>(null);\n const filterElRef = useRef<HTMLInputElement>(null);\n const isMenu = (Array.isArray(items) && items.length > 0) || !!content;\n const renderFilter = Array.isArray(items) && items.length >= filterAt;\n\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [filterValue, setFilterValue] = useState('');\n const filterRegex = createStringMatcher(filterValue, 'contains');\n\n const { end } = useDirection();\n const mousedOverMenu = useRef(false);\n const hidePopoverTimeout = useRef<number | null>();\n const theme = useTheme();\n\n const closePopover = (focusChildEl: boolean = false) => {\n if (popoverOpen) {\n setFilterValue('');\n setPopoverOpen(false);\n if (focusChildEl) {\n childElementRef.current?.focus();\n }\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n }\n };\n\n const onMouseEnterContent = () => {\n if (collapsedHoverMenus) {\n mousedOverMenu.current = true;\n }\n };\n\n const onMouseLeaveContent = () => {\n if (mousedOverMenu.current && collapsedHoverMenus) {\n mousedOverMenu.current = false;\n closePopover();\n }\n };\n\n useOuterEvent('click', isMenu ? [popoverRef, childElementRef] : [], () => closePopover());\n\n useEffect(() => {\n const onClick = () => {\n if (isMenu) {\n if (!navOpen && !popoverOpen) setPopoverOpen(true);\n else {\n setTimeout(() => {\n closePopover(true);\n }, 0);\n }\n }\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Tab' && !content) {\n setPopoverOpen(false);\n }\n };\n\n const onMouseEnter = () => {\n if (isMenu && collapsedHoverMenus && !navOpen && !popoverOpen) {\n setPopoverOpen(true);\n }\n };\n\n const onMouseOut = (e: MouseEvent) => {\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n\n const tag = (e.relatedTarget as HTMLElement | null)?.tagName.toLowerCase();\n\n // If the mouse is mousing out from this nav item onto another nav item\n if (tag && ['a', 'button', 'form'].includes(tag)) {\n closePopover();\n } else {\n hidePopoverTimeout.current = window.setTimeout(() => {\n if (!mousedOverMenu.current) {\n closePopover();\n }\n }, 1000);\n }\n };\n\n const onBlur = (e: FocusEvent) => {\n if (isInstance(e.relatedTarget, Node) && popoverRef.current?.contains(e.relatedTarget)) {\n return;\n }\n closePopover();\n };\n\n childElementRef.current?.addEventListener('blur', onBlur);\n childElementRef.current?.addEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.addEventListener('mouseenter', onMouseEnter);\n childElementRef.current?.addEventListener('mouseleave', onMouseOut);\n } else {\n childElementRef.current?.addEventListener('click', onClick);\n }\n return () => {\n childElementRef.current?.removeEventListener('blur', onBlur);\n childElementRef.current?.removeEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.removeEventListener('mouseenter', onMouseEnter);\n childElementRef.current?.removeEventListener('mouseleave', onMouseOut);\n } else {\n childElementRef.current?.removeEventListener('click', onClick);\n }\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n };\n }, [isMenu, navOpen, closePopover, collapsedHoverMenus, popoverOpen]);\n\n useEffect(() => {\n onMenuToggle?.(popoverOpen ? 'open' : 'close');\n }, [popoverOpen]);\n\n useEscape(() => closePopover(true), childElementRef, [childElementRef]);\n\n useEscape(() => closePopover(true), popoverRef, [popoverRef]);\n\n const searchListId = useUID();\n\n const itemsToRender = renderFilter\n ? items.filter(item => {\n return filterRegex.test(item.primary);\n })\n : items ?? [];\n\n const filterInputProps = renderFilter\n ? {\n value: filterValue,\n ref: filterElRef,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setFilterValue(e.target.value)\n }\n : undefined;\n\n return (\n <>\n {children}\n {!navOpen && (\n <>\n {!popoverOpen && (\n <Tooltip\n target={childElementRef.current}\n placement={mobileNavBar ? 'top' : end}\n showDelay='none'\n hideDelay='none'\n >\n {tooltipLabel}\n </Tooltip>\n )}\n {popoverOpen && isMenu && (\n <Popover\n target={childElementRef.current}\n placement={`${mobileNavBar ? 'top' : end}-start`}\n ref={popoverRef}\n as={StyledNavigationPopover}\n arrow\n strategy={mobileNavBar ? 'absolute' : 'fixed'}\n modifiers={[\n ...(headerEl\n ? [\n {\n name: 'preventOverflow',\n options: {\n padding: {\n top: headerEl.offsetHeight + 8,\n right: 8,\n bottom: 8,\n left: 8\n }\n }\n }\n ]\n : []),\n ...(mobileNavBar\n ? [\n {\n name: 'offset',\n options: {\n offset: [\n 0,\n tryCatch(\n () => 5.5 + Number(stripUnit(remToPx(theme.base.spacing))),\n () => 5.5 + 8\n )\n ]\n }\n }\n ]\n : [])\n ]}\n onClick={(e: ReactMouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n }}\n mobileNavBar={mobileNavBar}\n >\n {content ? (\n <div onMouseEnter={onMouseEnterContent} onMouseLeave={onMouseLeaveContent}>\n {content}\n </div>\n ) : (\n <Menu\n mode='action'\n variant='flyout'\n focusControlEl={childElementRef.current ?? undefined}\n scrollAt={99}\n listId={searchListId}\n filterInputProps={filterInputProps}\n items={itemsToRender.map(item => {\n return {\n id: (item.primary || item.text) as string,\n primary: (item.primary || item.text) as string,\n href: item.href,\n onClick: (_, e) => {\n e.stopPropagation();\n item.onClick?.(e);\n setPopoverOpen(false);\n }\n };\n })}\n header={<Text variant='h2'>{label}</Text>}\n onMouseEnter={onMouseEnterContent}\n onMouseLeave={onMouseLeaveContent}\n />\n )}\n </Popover>\n )}\n </>\n )}\n </>\n );\n};\n\nexport default ListItemWrapper;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeInput.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CompositeInput.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;0BAsJ1D,CAAC,SAAS,MAAM,SAAS,mBAAmB,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI;;;AAjJ9E,wBAmJE"}
|
|
@@ -11,7 +11,7 @@ import Flex from '../Flex';
|
|
|
11
11
|
import Button from '../Button';
|
|
12
12
|
import FormField from '../FormField';
|
|
13
13
|
import { FormDialog } from '../Dialog';
|
|
14
|
-
import { StyledCompositeInput, StyledInputButton, StyledInputContainer } from './CompositeInput.styles';
|
|
14
|
+
import { StyledClearButton, StyledCompositeInput, StyledInputButton, StyledInputContainer } from './CompositeInput.styles';
|
|
15
15
|
import { getCompositeInputTestIds } from './CompositeInput.test-ids';
|
|
16
16
|
registerIcon(caretDownIcon, caretUpIcon, timesIcon);
|
|
17
17
|
export default withTestIds(forwardRef(function CompositeInput(props, ref) {
|
|
@@ -36,14 +36,14 @@ export default withTestIds(forwardRef(function CompositeInput(props, ref) {
|
|
|
36
36
|
e.preventDefault();
|
|
37
37
|
setOpen(true);
|
|
38
38
|
}
|
|
39
|
-
}, value: value ?? '', ref: buttonRef }),
|
|
40
|
-
onClear();
|
|
41
|
-
buttonRef.current?.focus();
|
|
42
|
-
}, disabled: disabled, children: _jsx(Icon, { name: 'times' }) })) : (_jsx(Button, { icon: true, variant: 'simple', onClick: () => {
|
|
39
|
+
}, value: value ?? '', ref: buttonRef }), _jsx(Button, { icon: true, variant: 'simple', onClick: () => {
|
|
43
40
|
setOpen(!open);
|
|
44
41
|
}, onMouseDown: (e) => {
|
|
45
42
|
e.preventDefault();
|
|
46
|
-
}, "aria-label": t(open ? 'composite_input_close_button_a11y' : 'composite_input_open_button_a11y'), disabled: disabled, tabIndex: '-1', children: _jsx(Icon, { name: open ? 'caret-up' : 'caret-down' }) })
|
|
43
|
+
}, "aria-label": t(open ? 'composite_input_close_button_a11y' : 'composite_input_open_button_a11y'), disabled: disabled, tabIndex: '-1', children: _jsx(Icon, { name: open ? 'caret-up' : 'caret-down' }) }), onClear && (_jsx(StyledClearButton, { icon: true, variant: 'simple', label: t('clear'), onClick: () => {
|
|
44
|
+
onClear();
|
|
45
|
+
buttonRef.current?.focus();
|
|
46
|
+
}, disabled: disabled, children: _jsx(Icon, { name: 'times' }) }))] }), open && containerRef.current && (_jsx(FormDialog, { arrow: false, "aria-label": label, target: containerRef.current, placement: 'bottom-start', onCancel: () => onCancel({ close: closePopover }), onSubmit: {
|
|
47
47
|
text: t('apply'),
|
|
48
48
|
handler: () => onApply({ close: closePopover })
|
|
49
49
|
}, id: `${id}-dialog`, children: _jsx(Flex, { container: { direction: 'column' }, children: _jsx(Renderer, { ...rendererProps }) }) }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeInput.js","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,YAAY,CAAC,aAAa,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAEpD,eAAe,WAAW,CACxB,UAAU,CACR,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG;IAChC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EACJ,MAAM,EACN,EAAE,GAAG,GAAG,EACR,QAAQ,EACR,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,cAAc,EACd,MAAM,EAAE,EA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AE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,YAE7B,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACyE,EAC5E,wBAAwB,CACzB,CAAC","sourcesContent":["import { forwardRef, useRef, useState } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport Icon, { registerIcon } from '../Icon';\nimport * as caretDownIcon from '../Icon/icons/caret-down.icon';\nimport * as caretUpIcon from '../Icon/icons/caret-up.icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport type { RefElement } from '../../types';\nimport { useConsolidatedRef, useI18n, useTestIds, useUID } from '../../hooks';\nimport { StyledFormControl } from '../FormControl';\nimport { createClassName, withTestIds } from '../../utils';\nimport Flex from '../Flex';\nimport Button from '../Button';\nimport FormField from '../FormField';\nimport { FormDialog } from '../Dialog';\n\nimport {\n StyledClearButton,\n StyledCompositeInput,\n StyledInputButton,\n StyledInputContainer\n} from './CompositeInput.styles';\nimport type { CompositeInputProps } from './CompositeInput.types';\nimport { getCompositeInputTestIds } from './CompositeInput.test-ids';\n\nregisterIcon(caretDownIcon, caretUpIcon, timesIcon);\n\nexport default withTestIds(\n forwardRef<RefElement<CompositeInputProps>, PropsWithoutRef<CompositeInputProps>>(\n function CompositeInput(props, ref) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n disabled,\n value,\n onClear,\n required,\n status,\n info,\n label,\n labelHidden,\n additionalInfo,\n dialog: { renderer: Renderer, rendererProps, onApply, onCancel },\n className,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getCompositeInputTestIds);\n const t = useI18n();\n\n const [open, setOpen] = useState(false);\n\n const containerRef = useConsolidatedRef<HTMLDivElement>(ref);\n const buttonRef = useRef<HTMLInputElement>(null);\n\n const closePopover = () => {\n setOpen(false);\n buttonRef.current?.focus();\n };\n\n const labelId = `${id}-label`;\n\n const Comp = (\n <Flex\n as={StyledCompositeInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center' }}\n status={status}\n disabled={disabled}\n ref={containerRef}\n >\n <Flex container={{ alignItems: 'center' }} item={{ grow: 1 }} as={StyledInputContainer}>\n <StyledInputButton\n data-testid={testIds.control}\n {...restProps}\n id={id}\n disabled={disabled}\n aria-haspopup='dialog'\n aria-describedby={info ? `${id}-info` : undefined}\n aria-controls={open ? `${id}-dialog` : undefined}\n className={createClassName('composite-input', className)}\n readOnly\n required={required}\n onClick={() => {\n if (!disabled) {\n setOpen(true);\n }\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n setOpen(true);\n }\n }}\n value={value ?? ''}\n ref={buttonRef}\n />\n <Button\n icon\n variant='simple'\n onClick={() => {\n setOpen(!open);\n }}\n onMouseDown={(e: MouseEvent) => {\n e.preventDefault();\n }}\n aria-label={t(\n open ? 'composite_input_close_button_a11y' : 'composite_input_open_button_a11y'\n )}\n disabled={disabled}\n tabIndex='-1'\n >\n <Icon name={open ? 'caret-up' : 'caret-down'} />\n </Button>\n {onClear && (\n <StyledClearButton\n icon\n variant='simple'\n label={t('clear')}\n onClick={() => {\n onClear();\n buttonRef.current?.focus();\n }}\n disabled={disabled}\n >\n <Icon name='times' />\n </StyledClearButton>\n )}\n </Flex>\n\n {open && containerRef.current && (\n <FormDialog\n arrow={false}\n // FIXME: The wrath of optional labels, as a ReactNode, strikes again...\n aria-label={label as string}\n target={containerRef.current}\n placement='bottom-start'\n onCancel={() => onCancel({ close: closePopover })}\n onSubmit={{\n text: t('apply'),\n handler: () => onApply({ close: closePopover })\n }}\n id={`${id}-dialog`}\n >\n <Flex container={{ direction: 'column' }}>\n <Renderer {...rendererProps} />\n </Flex>\n </FormDialog>\n )}\n </Flex>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n labelId={labelId}\n additionalInfo={additionalInfo}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n ) as <P extends object>(props: CompositeInputProps<P>) => JSX.Element | null,\n getCompositeInputTestIds\n);\n"]}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const StyledInputButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>, "ref"> & {
|
|
2
2
|
ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
3
3
|
}, never>> & string;
|
|
4
|
+
export declare const StyledClearButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("../Button").ButtonProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement> & import("../..").ForwardProps, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLAnchorElement | HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement | HTMLButtonElement> | null | undefined;
|
|
6
|
+
}, never>> & string & Omit<import("../..").ForwardRefForwardPropsComponent<import("../Button").ButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
4
7
|
export declare const StyledInputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
8
|
export declare const StyledCompositeInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
9
|
export default StyledCompositeInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;mBAc7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CompositeInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;mBAc7B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;2JAkC5B,CAAC;AAIH,eAAO,MAAM,oBAAoB,6NAoChC,CAAC;AAIF,eAAO,MAAM,oBAAoB,6NAyBhC,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
|