@pega/cosmos-react-core 9.0.0-build.16.0 → 9.0.0-build.16.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.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +8 -15
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +5 -4
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +49 -28
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.js +9 -1
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
- package/lib/components/Menu/Menu.styles.js +9 -0
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/theme/theme.d.ts +6 -0
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +4 -0
- package/lib/theme/themeOverrides.schema.json +3 -0
- package/lib/theme/themes/virgoTheme.json +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAqC,EAAE,EAAE,MAAM,OAAO,CAAC;AActF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA+ChD,OAAO,KAAK,EACV,aAAa,EAMb,UAAU,EACX,MAAM,kBAAkB,CAAC;AAqH1B,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CA0IhC,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAqC,EAAE,EAAE,MAAM,OAAO,CAAC;AActF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA+ChD,OAAO,KAAK,EACV,aAAa,EAMb,UAAU,EACX,MAAM,kBAAkB,CAAC;AAqH1B,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CA0IhC,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAmb5D,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -16,7 +16,6 @@ import { useI18n, useBreakpoint, useConsolidatedRef, useDirection, useElement, u
|
|
|
16
16
|
import { openCloseStates } from '../../hooks/useTransitionState';
|
|
17
17
|
import Grid from '../Grid';
|
|
18
18
|
import Button from '../Button';
|
|
19
|
-
import Drawer from '../Drawer';
|
|
20
19
|
import Tooltip from '../Tooltip/Tooltip';
|
|
21
20
|
import SkipLinks from '../SkipLinks';
|
|
22
21
|
import VisuallyHiddenText from '../VisuallyHiddenText';
|
|
@@ -27,7 +26,7 @@ import { debounce, focusHeadingOrContainer, isValidElement } from '../../utils';
|
|
|
27
26
|
import AppShellContext, { AppShellDrawerContext } from './AppShellContext';
|
|
28
27
|
import AppShellDrawer from './Drawer';
|
|
29
28
|
import AppHeader from './AppHeader';
|
|
30
|
-
import { StyledAppNav, StyledAppInfo, StyledCaseTypes, StyledScrollWrap, StyledUtils, StyledAppMain, StyledNavCasesList, StyledBannerRegion, StyledCountIcon, StyledUtilIconCount, StyledMobileNav, StyledAppShellTooltip, StyledAppShellToggleButton, StyledNavListExpandCollapse,
|
|
29
|
+
import { StyledAppNav, StyledAppInfo, StyledCaseTypes, StyledScrollWrap, StyledUtils, StyledAppMain, StyledNavCasesList, StyledBannerRegion, StyledCountIcon, StyledUtilIconCount, StyledMobileNav, StyledAppShellTooltip, StyledAppShellToggleButton, StyledNavListExpandCollapse, StyledMobileDrawer, mobileHeaderHeight, StyledMobileButton, StyledUtilsSeparator } from './AppShell.styles';
|
|
31
30
|
import NavigationList from './NavigationList';
|
|
32
31
|
import { AppShellSearch } from './AppShellSearch';
|
|
33
32
|
import { followingNodes } from './utils';
|
|
@@ -186,7 +185,6 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
186
185
|
const { disableScroll, enableScroll } = useScrollToggle();
|
|
187
186
|
const navRef = useConsolidatedRef(ref);
|
|
188
187
|
const [mobileNavOpen, setMobileNavOpen] = useState(false);
|
|
189
|
-
const [mobileNavBackdrop, setMobileNavBackdrop] = useState(false);
|
|
190
188
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
191
189
|
const [previewActive, setPreviewActive] = useState(false);
|
|
192
190
|
const [mobileNavLinksCount, setMobileNavLinksCount] = useState(0);
|
|
@@ -254,10 +252,8 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
254
252
|
}
|
|
255
253
|
}, [mobileNavOpen]);
|
|
256
254
|
useEffect(() => {
|
|
257
|
-
if (isSmallOrAbove && mobileNavOpen)
|
|
258
|
-
setMobileNavBackdrop(false);
|
|
255
|
+
if (isSmallOrAbove && mobileNavOpen)
|
|
259
256
|
setMobileNavOpen(false);
|
|
260
|
-
}
|
|
261
257
|
}, [isSmallOrAbove, mobileNavOpen]);
|
|
262
258
|
useLayoutEffect(() => {
|
|
263
259
|
if (!mobileHeaderEl)
|
|
@@ -318,7 +314,7 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
318
314
|
}, ref: isSmallOrAbove ? navRef : undefined, as: StyledAppNav, appHeader: showAppHeader, navOpen: mobileNavOpen, onFocus: onFocus, "data-app-region": true, "aria-label": t('app_shell_main_navigation_label'), children: [!showAppHeader && (_jsxs(_Fragment, { children: [_jsxs(StyledAppInfo, { as: Grid, forwardedAs: appInfoAs, variant: 'link', href: appInfoHref, onClick: appInfoOnClick, "aria-label": `${appName}${portalName ? ` - ${portalName}` : ''}`, ...appInfoRestProps, container: {
|
|
319
315
|
alignItems: 'center',
|
|
320
316
|
areas: portalName ? '"logo app" "logo portal"' : '"logo app"'
|
|
321
|
-
}, ref: setAppInfoEl, icon: true, children: [_jsx(Grid, { item: { area: 'logo' }, as: Image, src: logoSrc, alt: appName }), _jsx(Grid, { item: { area: 'app' }, as: appNameHidden ? VisuallyHiddenText : 'span', children: appName }), portalName && (_jsx(Grid, { item: { area: 'portal' }, as: 'span', children: portalName }))] }), navState === 'closed' && (!appNameHidden || portalName) && (_jsx(Tooltip, { target: appInfoEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: `${appNameHidden ? '' : appName} ${portalName ?? ''}`.trim() }))] })), searchInput && !showAppHeader && (_jsx(AppShellSearch, { searchLabel: searchLabel, collapsed: !mobileNavOpen && ['closed', 'closing'].includes(navState), searchInput: searchInput })), _jsxs(StyledScrollWrap, { tabIndex: -1, onClick: isSmallOrAbove
|
|
317
|
+
}, ref: setAppInfoEl, icon: true, children: [_jsx(Grid, { item: { area: 'logo' }, as: Image, src: logoSrc, alt: appName }), _jsx(Grid, { item: { area: 'app' }, as: appNameHidden ? VisuallyHiddenText : 'span', children: appName }), portalName && (_jsx(Grid, { item: { area: 'portal' }, as: 'span', children: portalName }))] }), navState === 'closed' && (!appNameHidden || portalName) && (_jsx(Tooltip, { target: appInfoEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: `${appNameHidden ? '' : appName} ${portalName ?? ''}`.trim() }))] })), searchInput && !showAppHeader && (_jsx(AppShellSearch, { searchLabel: searchLabel, collapsed: !mobileNavOpen && ['closed', 'closing'].includes(navState), searchInput: searchInput })), _jsxs(StyledScrollWrap, { container: { direction: 'column' }, item: { grow: 1 }, tabIndex: -1, onClick: isSmallOrAbove
|
|
322
318
|
? () => {
|
|
323
319
|
if (['closing', 'closed'].includes(navState)) {
|
|
324
320
|
openNav(0);
|
|
@@ -327,7 +323,7 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
327
323
|
closeNav(0);
|
|
328
324
|
}
|
|
329
325
|
}
|
|
330
|
-
: undefined, children: [isSmallOrAbove && caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes }), links && _jsx(Links, { links: isSmallOrAbove ? links : links.slice(mobileNavLinksCount) }), cases && _jsx(Cases, { cases: cases })] }), _jsx(Utils, { appHeader: showAppHeader, operator: operator, contextSwitcher: contextSwitcher, items: utils }), !mobileNavOpen && (_jsxs(StyledNavListExpandCollapse, { isCurrent: false, navOpen: ['open', 'opening'].includes(navState), children: [_jsx(StyledAppShellToggleButton, { icon: true, ref: setExpandCollapseEl, compact: true, variant: 'simple', onClick: () => {
|
|
326
|
+
: undefined, children: [isSmallOrAbove && caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes }), links && _jsx(Links, { links: isSmallOrAbove ? links : links.slice(mobileNavLinksCount) }), cases && _jsx(Cases, { cases: cases }), ['open', 'opening'].includes(navState) && (_jsx(StyledUtilsSeparator, { navOpen: ['open', 'opening'].includes(navState) }))] }), ['closed', 'closing'].includes(navState) && _jsx(StyledUtilsSeparator, {}), _jsx(Utils, { appHeader: showAppHeader, operator: operator, contextSwitcher: contextSwitcher, items: utils }), !mobileNavOpen && (_jsxs(StyledNavListExpandCollapse, { isCurrent: false, navOpen: ['open', 'opening'].includes(navState), children: [_jsx(StyledAppShellToggleButton, { icon: true, ref: setExpandCollapseEl, compact: true, variant: 'simple', onClick: () => {
|
|
331
327
|
setNavState(navState === 'closed' ? 'open' : 'closed');
|
|
332
328
|
}, "aria-label": navState === 'closed' ? t('expand_navigation') : t('collapse_navigation'), children: ['closed', 'closing'].includes(navState) ? (_jsx(Icon, { name: `arrow-micro-${end}` })) : (_jsx(Icon, { name: `arrow-micro-${start}` })) }), ['open', 'closed'].includes(navState) && (_jsx(Tooltip, { target: expandCollapseEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: navState === 'closed' ? t('expand_navigation') : t('collapse_navigation') }))] }))] }));
|
|
333
329
|
return (_jsxs(AppShellContext.Provider, { value: useMemo(() => ({
|
|
@@ -352,13 +348,10 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
352
348
|
mobileHeaderEl,
|
|
353
349
|
searchContainerEl,
|
|
354
350
|
previewActive
|
|
355
|
-
]), children: [_jsx(SkipLinks, { items: skipLinks }), showAppHeader && (_jsx(AppHeader, { ...appInfo, contextSwitcher: contextSwitcher, searchInput: searchInput, searchLabel: searchLabel, operator: operator, searchPage: searchPage, ref: setHeaderEl })), isSmallOrAbove ? (appNav) : (_jsxs(_Fragment, { children: [_jsxs(Flex, { as: StyledMobileNav, container: { alignItems: 'center', justify: 'around' }, ref: setMobileHeaderEl, navOpen:
|
|
356
|
-
utils?.some(item => (isValidElement(item) ? false : !!item.count)) && (_jsx(Alert, { variant: 'urgent' })), _jsx("span", { children: t('app_shell_more') })] })] }), _jsx(
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}, children: _jsx(Drawer, { open: mobileNavOpen, ref: mobileNavRef, onAfterClose: () => {
|
|
360
|
-
setMobileNavBackdrop(false);
|
|
361
|
-
}, position: 'fixed', placement: 'bottom', size: `calc(100dvh - ${mobileHeaderHeight})`, nullWhenClosed: true, children: appNav }) })] })), showMainContent && (_jsxs(StyledAppMain, { appHeader: showAppHeader, mobileNav: !isSmallOrAbove, previewActive: previewActive, headerOffset: isSmallOrAbove ? headerEl?.offsetHeight : undefined, navOpen: ['open', 'opening'].includes(navState) || mobileNavOpen, "aria-busy": !!progress, "data-app-region": true, children: [_jsx(Progress, { visible: !!progress, placement: 'local', message: typeof progress === 'string' ? progress : t('loading') }), banners && _jsx(StyledBannerRegion, { children: banners }), main] }))] }));
|
|
351
|
+
]), children: [_jsx(SkipLinks, { items: skipLinks }), showAppHeader && (_jsx(AppHeader, { ...appInfo, contextSwitcher: contextSwitcher, searchInput: searchInput, searchLabel: searchLabel, operator: operator, searchPage: searchPage, ref: setHeaderEl })), isSmallOrAbove ? (appNav) : (_jsxs(_Fragment, { children: [_jsxs(Flex, { as: StyledMobileNav, container: { alignItems: 'center', justify: 'around' }, ref: setMobileHeaderEl, navOpen: setMobileNavOpen, children: [caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes, mobileNavBar: true }), links && _jsx(Links, { links: links.slice(0, mobileNavLinksCount), mobileNavBar: true }), _jsxs(StyledMobileButton, { variant: 'simple', onClick: () => setMobileNavOpen(prev => !prev), label: t('app_shell_more'), icon: true, children: [_jsx(Icon, { name: 'more' }), !mobileNavOpen &&
|
|
352
|
+
utils?.some(item => (isValidElement(item) ? false : !!item.count)) && (_jsx(Alert, { variant: 'urgent' })), _jsx("span", { children: t('app_shell_more') })] })] }), _jsx(StyledMobileDrawer, { open: mobileNavOpen, ref: mobileNavRef, onAfterClose: () => {
|
|
353
|
+
setMobileNavOpen(false);
|
|
354
|
+
}, position: 'fixed', placement: 'bottom', size: `calc(100dvh - ${mobileHeaderHeight})`, nullWhenClosed: true, children: appNav })] })), showMainContent && (_jsxs(StyledAppMain, { appHeader: showAppHeader, mobileNav: !isSmallOrAbove, previewActive: previewActive, headerOffset: isSmallOrAbove ? headerEl?.offsetHeight : undefined, navOpen: ['open', 'opening'].includes(navState) || mobileNavOpen, "aria-busy": !!progress, "data-app-region": true, children: [_jsx(Progress, { visible: !!progress, placement: 'local', message: typeof progress === 'string' ? progress : t('loading') }), banners && _jsx(StyledBannerRegion, { children: banners }), main] }))] }));
|
|
362
355
|
});
|
|
363
356
|
export default AppShell;
|
|
364
357
|
//# sourceMappingURL=AppShell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EAC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,GAAG,EAAE;gCACjB,oBAAoB,CAAC,KAAK,CAAC,CAAC;4BAC9B,CAAC,EACD,QAAQ,EAAC,OAAO,EAChB,SAAS,EAAC,QAAQ,EAClB,IAAI,EAAE,iBAAiB,kBAAkB,GAAG,EAC5C,cAAc,kBAEb,MAAM,GACA,GACY,IACtB,CACJ,EACA,eAAe,IAAI,CAClB,MAAC,aAAa,IACZ,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,CAAC,cAAc,EAC1B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,SAAS,EACjE,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,aAAa,eACrD,CAAC,CAAC,QAAQ,sCAGrB,KAAC,QAAQ,IACP,OAAO,EAAE,CAAC,CAAC,QAAQ,EACnB,SAAS,EAAC,OAAO,EACjB,OAAO,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAC/D,EAED,OAAO,IAAI,KAAC,kBAAkB,cAAE,OAAO,GAAsB,EAC7D,IAAI,IACS,CACjB,IACwB,CAC5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import {\n forwardRef,\n useState,\n useCallback,\n useEffect,\n useMemo,\n useContext,\n useRef,\n useLayoutEffect\n} from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref, ElementType, FC } from 'react';\n\nimport { Alert } from '../Badges';\nimport Flex from '../Flex';\nimport Link from '../Link';\nimport Icon, { registerIcon } from '../Icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport * as plusIcon from '../Icon/icons/plus.icon';\nimport * as caseSolidIcon from '../Icon/icons/case-solid.icon';\nimport * as barsIcon from '../Icon/icons/bars.icon';\nimport * as caretLeftIcon from '../Icon/icons/caret-left.icon';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport * as moreIcon from '../Icon/icons/more.icon';\nimport Image from '../Image';\nimport type { ForwardProps } from '../../types';\nimport {\n useI18n,\n useBreakpoint,\n useConsolidatedRef,\n useDirection,\n useElement,\n useTransitionState,\n useEvent,\n useOuterEvent,\n useScrollToggle\n} from '../../hooks';\nimport { openCloseStates } from '../../hooks/useTransitionState';\nimport Grid from '../Grid';\nimport Button from '../Button';\nimport Drawer from '../Drawer';\nimport Tooltip from '../Tooltip/Tooltip';\nimport SkipLinks from '../SkipLinks';\nimport type { SkipLinksProps } from '../SkipLinks';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport Progress from '../Progress';\nimport { registerAction } from '../ShortcutManager';\nimport useShortcut from '../../hooks/useShortcut';\nimport { debounce, focusHeadingOrContainer, isValidElement } from '../../utils';\n\nimport AppShellContext, { AppShellDrawerContext } from './AppShellContext';\nimport AppShellDrawer from './Drawer';\nimport AppHeader from './AppHeader';\nimport {\n StyledAppNav,\n StyledAppInfo,\n StyledCaseTypes,\n StyledScrollWrap,\n StyledUtils,\n StyledAppMain,\n StyledNavCasesList,\n StyledBannerRegion,\n StyledCountIcon,\n StyledUtilIconCount,\n StyledMobileNav,\n StyledAppShellTooltip,\n StyledAppShellToggleButton,\n StyledNavListExpandCollapse,\n StyledMobileBackdrop,\n mobileHeaderHeight,\n StyledMobileButton\n} from './AppShell.styles';\nimport type {\n AppShellProps,\n CaseProps,\n CaseTypeProps,\n LinkProps,\n NavListItemProps,\n UtilItemProps,\n UtilsProps\n} from './AppShell.types';\nimport NavigationList from './NavigationList';\nimport { AppShellSearch } from './AppShellSearch';\nimport { followingNodes } from './utils';\n\nregisterIcon(timesIcon, plusIcon, caseSolidIcon, barsIcon, caretRightIcon, caretLeftIcon, moreIcon);\nregisterAction(\n { id: 'NextRegion', defaultKeyBinding: 'F9' },\n { id: 'PrevRegion', defaultKeyBinding: 'Shift+F9' }\n);\n\nconst CaseTypes: FunctionComponent<{ caseTypes: CaseTypeProps[]; mobileNavBar?: boolean }> = ({\n caseTypes,\n mobileNavBar\n}: {\n caseTypes: CaseTypeProps[];\n mobileNavBar?: boolean;\n}) => {\n const t = useI18n();\n\n const transformedCaseTypes = caseTypes.map(caseType => {\n return {\n ...caseType,\n visual: caseType.icon ? <Icon name={caseType.icon} /> : undefined,\n primary: caseType.name\n };\n });\n\n return useMemo(\n () => (\n <StyledCaseTypes>\n <NavigationList\n items={[\n {\n primary: t('app_shell_create'),\n visual: <Icon name='plus' />,\n items: transformedCaseTypes\n }\n ]}\n mobileNavBar={mobileNavBar}\n />\n </StyledCaseTypes>\n ),\n [caseTypes]\n );\n};\n\nconst Links: FunctionComponent<{ links: LinkProps[]; mobileNavBar?: boolean }> = (props: {\n links: LinkProps[];\n mobileNavBar?: boolean;\n}) => {\n const { links, mobileNavBar } = props;\n const [transformedLinks, setTransformedLinks] = useState<NavListItemProps[]>([]);\n\n // TODO: Can this be a memo instead of a state and an effect?\n const mergedNavLinks = (items: LinkProps[]): NavListItemProps[] => {\n return items.map((link: LinkProps) => {\n return {\n ...link,\n primary: link.name,\n 'aria-current': link.active ? 'page' : null,\n visual: link.icon ? <Icon name={link.icon} /> : null,\n onClick: link.links ? undefined : link.onClick,\n items: link.links ? mergedNavLinks(link.links) : undefined\n };\n });\n };\n\n useEffect(() => {\n setTransformedLinks(mergedNavLinks(links));\n }, [links]);\n\n return (\n <div>\n <NavigationList items={transformedLinks} mobileNavBar={mobileNavBar} />\n </div>\n );\n};\n\nconst Cases: FunctionComponent<{ cases: CaseProps[] }> = (props: { cases: CaseProps[] }) => {\n const { cases } = props;\n\n const setupCases = (items: CaseProps[]): NavListItemProps[] => {\n return items.map((item: CaseProps) => {\n const {\n id,\n primary,\n secondary,\n collapsedItemInfo,\n visual = <Icon name='case-solid' />,\n active,\n onClick,\n onDismiss,\n ...restProps\n } = item;\n return {\n ...restProps,\n id,\n 'aria-current': active ? 'page' : undefined,\n primary,\n secondary,\n collapsedItemInfo,\n active: !!active,\n onClick,\n onDismiss,\n visual\n };\n });\n };\n\n return (\n <StyledNavCasesList>\n <NavigationList items={setupCases(cases)} />\n </StyledNavCasesList>\n );\n};\n\nexport const Utils: FC<UtilsProps> = ({ contextSwitcher = {}, operator, items, appHeader }) => {\n const t = useI18n();\n const {\n contexts,\n onContextClick,\n label: contextSwitcherLabel = t('switch_to')\n } = contextSwitcher;\n const { navOpen, navState, drawerOpen, setDrawerOpen } = useContext(AppShellContext);\n const [item, setItem] = useState<UtilItemProps>();\n\n useEffect(() => {\n if (drawerOpen && item) {\n setItem(\n items?.find<UtilItemProps>(\n (utilItem): utilItem is UtilItemProps =>\n !isValidElement(utilItem) && utilItem.name === item.name\n )\n );\n }\n }, [items]);\n\n const operatorInfo: NavListItemProps[] = useMemo(\n () =>\n appHeader\n ? []\n : [\n {\n primary: t('app_shell_user_account'),\n visual: operator.avatar,\n items: operator.actions\n }\n ],\n [appHeader, operator.name, operator.avatar, operator.actions]\n );\n\n const contextSwitcherUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!appHeader && contexts && contexts?.length > 1 && !!onContextClick) {\n return {\n name: contextSwitcherLabel,\n primary: contextSwitcherLabel,\n visual: <Icon name='dot-9-solid' />,\n drawerView: (\n <NavigationList\n items={contexts!.map(context => ({\n ...context,\n primary: context.primary,\n 'aria-current': !!context.selected,\n visual: context.visual,\n onClick: e => {\n onContextClick(context.id, e);\n }\n }))}\n singleSelect\n />\n )\n };\n }\n }, [appHeader, contexts, contextSwitcherLabel, onContextClick]);\n\n const transform = useCallback(\n (utilItem: UtilItemProps): NavListItemProps => {\n const uItem = { ...utilItem };\n delete uItem.onDrawerClose;\n delete uItem.onDrawerOpen;\n return {\n onClick: () => {\n if (utilItem.drawerView) {\n setItem(utilItem);\n }\n },\n ...uItem,\n primary: utilItem.name,\n visual: utilItem.count ? (\n <StyledUtilIconCount>\n {utilItem.visual}\n <StyledCountIcon variant='urgent' id={`${utilItem.name}-count`}>\n {utilItem.count}\n </StyledCountIcon>\n </StyledUtilIconCount>\n ) : (\n utilItem.visual\n ),\n collapseItems: !navOpen\n };\n },\n [navOpen]\n );\n\n const utilItems = useMemo(() => {\n return [\n ...(items ?? []).map(uItem => {\n return isValidElement(uItem) ? uItem : transform(uItem);\n }),\n ...(contextSwitcherUtilItem ? [transform(contextSwitcherUtilItem)] : []),\n ...operatorInfo\n ];\n }, [items, operatorInfo, transform]);\n\n useEffect(() => {\n if (item) setDrawerOpen(true);\n }, [item]);\n\n useEffect(() => {\n if (navState === 'closed' || navState === 'closing') setDrawerOpen(false);\n }, [navState]);\n\n return (\n <AppShellDrawerContext.Provider\n value={useMemo(\n () => ({\n drawerOpen,\n closeDrawer: () => {\n setDrawerOpen(false);\n },\n openDrawer: setItem\n }),\n [drawerOpen]\n )}\n >\n <StyledUtils>\n <NavigationList items={utilItems} collapsed />\n </StyledUtils>\n\n {item && (\n <AppShellDrawer\n drawerOpen={drawerOpen}\n setDrawerOpen={setDrawerOpen}\n content={item.drawerView}\n header={item.drawerHeader || item.name}\n onDrawerClose={() => {\n setItem(undefined);\n item.onDrawerClose?.();\n }}\n onDrawerOpen={item.onDrawerOpen}\n />\n )}\n </AppShellDrawerContext.Provider>\n );\n};\n\nconst AppShell: FunctionComponent<AppShellProps & ForwardProps> = forwardRef(function AppShell(\n props: PropsWithoutRef<AppShellProps>,\n ref: Ref<HTMLDivElement>\n) {\n const t = useI18n();\n\n const {\n appInfo,\n contextSwitcher,\n searchInput,\n appHeader,\n searchPage,\n searchLabel = t('sitewide'),\n caseTypes,\n links,\n banners,\n progress,\n main,\n operator,\n utils,\n cases,\n defaultExpanded = false,\n collapsedHoverMenus = false,\n ...restProps\n } = props;\n const {\n appName,\n portalName,\n href: appInfoHref,\n onClick: appInfoOnClick,\n imageSrc: logoSrc,\n appNameHidden,\n ...appInfoRestProps\n } = appInfo;\n let appInfoAs: ElementType = 'div';\n if (appInfoHref) appInfoAs = Link;\n else if (appInfoOnClick) appInfoAs = Button;\n\n const { start, end } = useDirection();\n const { disableScroll, enableScroll } = useScrollToggle();\n const navRef = useConsolidatedRef(ref);\n\n const [mobileNavOpen, setMobileNavOpen] = useState(false);\n const [mobileNavBackdrop, setMobileNavBackdrop] = useState(false);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const [previewActive, setPreviewActive] = useState(false);\n const [mobileNavLinksCount, setMobileNavLinksCount] = useState(0);\n\n const focusedImperatively = useRef(false);\n const [headerEl, setHeaderEl] = useElement<HTMLDivElement>();\n const [mobileHeaderEl, setMobileHeaderEl] = useElement<HTMLDivElement>();\n const [appInfoEl, setAppInfoEl] = useElement<HTMLAnchorElement>();\n const [expandCollapseEl, setExpandCollapseEl] = useElement<HTMLButtonElement>();\n\n const isSmallOrAbove = useBreakpoint('sm');\n\n const showAppHeader = !!appHeader && isSmallOrAbove;\n const showMainContent = showAppHeader ? !!(headerEl || mobileHeaderEl) : true;\n\n const openNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n const closeNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n const previewTriggerRef = useRef<HTMLElement>(null);\n\n const [searchContainerEl, setSearchContainerEl] = useState<HTMLElement | null>(null);\n\n const { state: navState, set: setNavState } = useTransitionState({\n ref: navRef,\n property: 'width',\n states: openCloseStates,\n defaultState: defaultExpanded ? 'open' : 'closed'\n });\n\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: { ariaLabel: t('main_content'), selector: 'main' }\n }\n ],\n [t]\n );\n\n const openNav = useCallback((delay: number = 0) => {\n if (closeNavTimeoutId.current) clearTimeout(closeNavTimeoutId.current);\n openNavTimeoutId.current = setTimeout(() => {\n setNavState('open');\n }, delay);\n }, []);\n\n const closeNav = useCallback((delay: number = 0) => {\n if (openNavTimeoutId.current) clearTimeout(openNavTimeoutId.current);\n closeNavTimeoutId.current = setTimeout(() => {\n setNavState('closed');\n }, delay);\n }, []);\n\n const onFocus = useCallback(() => {\n focusedImperatively.current = false;\n }, [openNav, isSmallOrAbove]);\n\n const mobileNavRef = useRef<HTMLDivElement>(null);\n\n useOuterEvent('focusin', [mobileNavRef], () => setMobileNavOpen(false));\n\n useEffect(() => {\n if (mobileNavOpen) {\n disableScroll();\n } else {\n enableScroll();\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (mobileNavOpen) {\n const onKeyDown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') setMobileNavOpen(false);\n };\n\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (isSmallOrAbove && mobileNavOpen) {\n setMobileNavBackdrop(false);\n setMobileNavOpen(false);\n }\n }, [isSmallOrAbove, mobileNavOpen]);\n\n useLayoutEffect(() => {\n if (!mobileHeaderEl) return;\n\n const resizeObserver = new ResizeObserver(\n debounce(() => {\n const mobileHeaderWidth = mobileHeaderEl?.offsetWidth ?? 0;\n const regionsPaddingInlinePixels = mobileHeaderEl\n ? 2 *\n Number.parseInt(\n window.getComputedStyle(mobileHeaderEl).getPropertyValue('padding-inline-start'),\n 10\n )\n : 0;\n const mobileNavButton = mobileHeaderEl?.lastElementChild;\n if (mobileNavButton instanceof HTMLElement) {\n const mobileNavButtonWidth = mobileNavButton.offsetWidth;\n setMobileNavLinksCount(\n Math.floor(mobileHeaderWidth / (mobileNavButtonWidth + regionsPaddingInlinePixels)) -\n (caseTypes?.length ? 2 : 1)\n );\n }\n }, 0)\n );\n\n resizeObserver.observe(mobileHeaderEl);\n\n return () => resizeObserver.disconnect();\n }, [mobileHeaderEl, caseTypes?.length]);\n\n const activatedEl = useRef<Element>(document.body);\n useEvent('click', e => {\n activatedEl.current = document.elementFromPoint(e.clientX, e.clientY) ?? document.body;\n });\n\n useShortcut('NextRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as Element, as we requested to give us only elements\n (node as Element).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n // try to focus first visibleregion\n const focusedNode = regionEls.find(node => focusHeadingOrContainer(node, ''));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n useShortcut('PrevRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as HTMLElement, as we requested to give us only elements\n (node as HTMLElement).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n regionEls.reverse();\n if (regionEls[0].contains(activeElement)) regionEls.splice(0, 1);\n const focusedNode = regionEls.find(node => focusHeadingOrContainer(node, ''));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n const appNav = (\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n justify: 'between'\n }}\n ref={isSmallOrAbove ? navRef : undefined}\n as={StyledAppNav}\n appHeader={showAppHeader}\n navOpen={mobileNavOpen}\n onFocus={onFocus}\n data-app-region\n aria-label={t('app_shell_main_navigation_label')}\n >\n {!showAppHeader && (\n <>\n <StyledAppInfo\n as={Grid}\n forwardedAs={appInfoAs}\n variant='link'\n href={appInfoHref}\n onClick={appInfoOnClick}\n aria-label={`${appName}${portalName ? ` - ${portalName}` : ''}`}\n {...appInfoRestProps}\n container={{\n alignItems: 'center',\n areas: portalName ? '\"logo app\" \"logo portal\"' : '\"logo app\"'\n }}\n ref={setAppInfoEl}\n icon\n >\n <Grid item={{ area: 'logo' }} as={Image} src={logoSrc} alt={appName} />\n <Grid item={{ area: 'app' }} as={appNameHidden ? VisuallyHiddenText : 'span'}>\n {appName}\n </Grid>\n {portalName && (\n <Grid item={{ area: 'portal' }} as='span'>\n {portalName}\n </Grid>\n )}\n </StyledAppInfo>\n {navState === 'closed' && (!appNameHidden || portalName) && (\n <Tooltip\n target={appInfoEl}\n placement='right'\n as={StyledAppShellTooltip}\n showDelay='none'\n hideDelay='none'\n >\n {`${appNameHidden ? '' : appName} ${portalName ?? ''}`.trim()}\n </Tooltip>\n )}\n </>\n )}\n\n {searchInput && !showAppHeader && (\n <AppShellSearch\n searchLabel={searchLabel}\n collapsed={!mobileNavOpen && ['closed', 'closing'].includes(navState)}\n searchInput={searchInput}\n />\n )}\n\n <StyledScrollWrap\n tabIndex={-1}\n onClick={\n isSmallOrAbove\n ? () => {\n if (['closing', 'closed'].includes(navState)) {\n openNav(0);\n } else {\n closeNav(0);\n }\n }\n : undefined\n }\n >\n {isSmallOrAbove && caseTypes && caseTypes.length > 0 && <CaseTypes caseTypes={caseTypes} />}\n {links && <Links links={isSmallOrAbove ? links : links.slice(mobileNavLinksCount)} />}\n {cases && <Cases cases={cases} />}\n </StyledScrollWrap>\n\n <Utils\n appHeader={showAppHeader}\n operator={operator}\n contextSwitcher={contextSwitcher}\n items={utils}\n />\n\n {!mobileNavOpen && (\n <StyledNavListExpandCollapse\n isCurrent={false}\n navOpen={['open', 'opening'].includes(navState)}\n >\n <StyledAppShellToggleButton\n icon\n ref={setExpandCollapseEl}\n compact\n variant='simple'\n onClick={() => {\n setNavState(navState === 'closed' ? 'open' : 'closed');\n }}\n aria-label={navState === 'closed' ? t('expand_navigation') : t('collapse_navigation')}\n >\n {['closed', 'closing'].includes(navState) ? (\n <Icon name={`arrow-micro-${end}`} />\n ) : (\n <Icon name={`arrow-micro-${start}`} />\n )}\n </StyledAppShellToggleButton>\n\n {['open', 'closed'].includes(navState) && (\n <Tooltip\n target={expandCollapseEl}\n placement='right'\n as={StyledAppShellTooltip}\n showDelay='none'\n hideDelay='none'\n >\n {navState === 'closed' ? t('expand_navigation') : t('collapse_navigation')}\n </Tooltip>\n )}\n </StyledNavListExpandCollapse>\n )}\n </Flex>\n );\n\n return (\n <AppShellContext.Provider\n value={useMemo(\n () => ({\n navOpen: mobileNavOpen || navState === 'open' || navState === 'opening',\n drawerOpen,\n setDrawerOpen,\n collapsedHoverMenus,\n navState,\n focusedImperatively,\n headerEl: headerEl || mobileHeaderEl,\n previewTriggerRef,\n searchContainerEl,\n setSearchContainerEl,\n mobileNavOpen,\n previewActive,\n setPreviewActive\n }),\n [\n navState,\n drawerOpen,\n mobileNavOpen,\n headerEl,\n mobileHeaderEl,\n searchContainerEl,\n previewActive\n ]\n )}\n >\n <SkipLinks items={skipLinks} />\n {showAppHeader && (\n <AppHeader\n {...appInfo}\n contextSwitcher={contextSwitcher}\n searchInput={searchInput}\n searchLabel={searchLabel}\n operator={operator}\n searchPage={searchPage}\n ref={setHeaderEl}\n />\n )}\n {isSmallOrAbove ? (\n appNav\n ) : (\n <>\n <Flex\n as={StyledMobileNav}\n container={{ alignItems: 'center', justify: 'around' }}\n ref={setMobileHeaderEl}\n navOpen={mobileNavBackdrop}\n >\n {caseTypes && caseTypes.length > 0 && <CaseTypes caseTypes={caseTypes} mobileNavBar />}\n {links && <Links links={links.slice(0, mobileNavLinksCount)} mobileNavBar />}\n <StyledMobileButton\n variant='simple'\n onClick={() =>\n mobileNavBackdrop ? setMobileNavOpen(false) : setMobileNavBackdrop(true)\n }\n label={t('app_shell_more')}\n icon\n >\n <Icon name='more' />\n {!mobileNavBackdrop &&\n utils?.some(item => (isValidElement(item) ? false : !!item.count)) && (\n <Alert variant='urgent' />\n )}\n <span>{t('app_shell_more')}</span>\n </StyledMobileButton>\n </Flex>\n\n <StyledMobileBackdrop\n open={mobileNavBackdrop}\n transitionSpeed='none'\n onAfterTransitionIn={() => setMobileNavOpen(true)}\n onBeforeTransitionOut={() => setMobileNavOpen(false)}\n onClick={e => {\n if (e.currentTarget === e.target) setMobileNavOpen(false);\n }}\n >\n <Drawer\n open={mobileNavOpen}\n ref={mobileNavRef}\n onAfterClose={() => {\n setMobileNavBackdrop(false);\n }}\n position='fixed'\n placement='bottom'\n size={`calc(100dvh - ${mobileHeaderHeight})`}\n nullWhenClosed\n >\n {appNav}\n </Drawer>\n </StyledMobileBackdrop>\n </>\n )}\n {showMainContent && (\n <StyledAppMain\n appHeader={showAppHeader}\n mobileNav={!isSmallOrAbove}\n previewActive={previewActive}\n headerOffset={isSmallOrAbove ? headerEl?.offsetHeight : undefined}\n navOpen={['open', 'opening'].includes(navState) || mobileNavOpen}\n aria-busy={!!progress}\n data-app-region\n >\n <Progress\n visible={!!progress}\n placement='local'\n message={typeof progress === 'string' ? progress : t('loading')}\n />\n\n {banners && <StyledBannerRegion>{banners}</StyledBannerRegion>}\n {main}\n </StyledAppMain>\n )}\n </AppShellContext.Provider>\n );\n});\n\nexport default AppShell;\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,UAAU,EACV,MAAM,EACN,eAAe,EAChB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,QAAQ,MAA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C/D,EAED,OAAO,IAAI,KAAC,kBAAkB,cAAE,OAAO,GAAsB,EAC7D,IAAI,IACS,CACjB,IACwB,CAC5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import {\n forwardRef,\n useState,\n useCallback,\n useEffect,\n useMemo,\n useContext,\n useRef,\n useLayoutEffect\n} from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref, ElementType, FC } from 'react';\n\nimport { Alert } from '../Badges';\nimport Flex from '../Flex';\nimport Link from '../Link';\nimport Icon, { registerIcon } from '../Icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport * as plusIcon from '../Icon/icons/plus.icon';\nimport * as caseSolidIcon from '../Icon/icons/case-solid.icon';\nimport * as barsIcon from '../Icon/icons/bars.icon';\nimport * as caretLeftIcon from '../Icon/icons/caret-left.icon';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport * as moreIcon from '../Icon/icons/more.icon';\nimport Image from '../Image';\nimport type { ForwardProps } from '../../types';\nimport {\n useI18n,\n useBreakpoint,\n useConsolidatedRef,\n useDirection,\n useElement,\n useTransitionState,\n useEvent,\n useOuterEvent,\n useScrollToggle\n} from '../../hooks';\nimport { openCloseStates } from '../../hooks/useTransitionState';\nimport Grid from '../Grid';\nimport Button from '../Button';\nimport Tooltip from '../Tooltip/Tooltip';\nimport SkipLinks from '../SkipLinks';\nimport type { SkipLinksProps } from '../SkipLinks';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport Progress from '../Progress';\nimport { registerAction } from '../ShortcutManager';\nimport useShortcut from '../../hooks/useShortcut';\nimport { debounce, focusHeadingOrContainer, isValidElement } from '../../utils';\n\nimport AppShellContext, { AppShellDrawerContext } from './AppShellContext';\nimport AppShellDrawer from './Drawer';\nimport AppHeader from './AppHeader';\nimport {\n StyledAppNav,\n StyledAppInfo,\n StyledCaseTypes,\n StyledScrollWrap,\n StyledUtils,\n StyledAppMain,\n StyledNavCasesList,\n StyledBannerRegion,\n StyledCountIcon,\n StyledUtilIconCount,\n StyledMobileNav,\n StyledAppShellTooltip,\n StyledAppShellToggleButton,\n StyledNavListExpandCollapse,\n StyledMobileDrawer,\n mobileHeaderHeight,\n StyledMobileButton,\n StyledUtilsSeparator\n} from './AppShell.styles';\nimport type {\n AppShellProps,\n CaseProps,\n CaseTypeProps,\n LinkProps,\n NavListItemProps,\n UtilItemProps,\n UtilsProps\n} from './AppShell.types';\nimport NavigationList from './NavigationList';\nimport { AppShellSearch } from './AppShellSearch';\nimport { followingNodes } from './utils';\n\nregisterIcon(timesIcon, plusIcon, caseSolidIcon, barsIcon, caretRightIcon, caretLeftIcon, moreIcon);\nregisterAction(\n { id: 'NextRegion', defaultKeyBinding: 'F9' },\n { id: 'PrevRegion', defaultKeyBinding: 'Shift+F9' }\n);\n\nconst CaseTypes: FunctionComponent<{ caseTypes: CaseTypeProps[]; mobileNavBar?: boolean }> = ({\n caseTypes,\n mobileNavBar\n}: {\n caseTypes: CaseTypeProps[];\n mobileNavBar?: boolean;\n}) => {\n const t = useI18n();\n\n const transformedCaseTypes = caseTypes.map(caseType => {\n return {\n ...caseType,\n visual: caseType.icon ? <Icon name={caseType.icon} /> : undefined,\n primary: caseType.name\n };\n });\n\n return useMemo(\n () => (\n <StyledCaseTypes>\n <NavigationList\n items={[\n {\n primary: t('app_shell_create'),\n visual: <Icon name='plus' />,\n items: transformedCaseTypes\n }\n ]}\n mobileNavBar={mobileNavBar}\n />\n </StyledCaseTypes>\n ),\n [caseTypes]\n );\n};\n\nconst Links: FunctionComponent<{ links: LinkProps[]; mobileNavBar?: boolean }> = (props: {\n links: LinkProps[];\n mobileNavBar?: boolean;\n}) => {\n const { links, mobileNavBar } = props;\n const [transformedLinks, setTransformedLinks] = useState<NavListItemProps[]>([]);\n\n // TODO: Can this be a memo instead of a state and an effect?\n const mergedNavLinks = (items: LinkProps[]): NavListItemProps[] => {\n return items.map((link: LinkProps) => {\n return {\n ...link,\n primary: link.name,\n 'aria-current': link.active ? 'page' : null,\n visual: link.icon ? <Icon name={link.icon} /> : null,\n onClick: link.links ? undefined : link.onClick,\n items: link.links ? mergedNavLinks(link.links) : undefined\n };\n });\n };\n\n useEffect(() => {\n setTransformedLinks(mergedNavLinks(links));\n }, [links]);\n\n return (\n <div>\n <NavigationList items={transformedLinks} mobileNavBar={mobileNavBar} />\n </div>\n );\n};\n\nconst Cases: FunctionComponent<{ cases: CaseProps[] }> = (props: { cases: CaseProps[] }) => {\n const { cases } = props;\n\n const setupCases = (items: CaseProps[]): NavListItemProps[] => {\n return items.map((item: CaseProps) => {\n const {\n id,\n primary,\n secondary,\n collapsedItemInfo,\n visual = <Icon name='case-solid' />,\n active,\n onClick,\n onDismiss,\n ...restProps\n } = item;\n return {\n ...restProps,\n id,\n 'aria-current': active ? 'page' : undefined,\n primary,\n secondary,\n collapsedItemInfo,\n active: !!active,\n onClick,\n onDismiss,\n visual\n };\n });\n };\n\n return (\n <StyledNavCasesList>\n <NavigationList items={setupCases(cases)} />\n </StyledNavCasesList>\n );\n};\n\nexport const Utils: FC<UtilsProps> = ({ contextSwitcher = {}, operator, items, appHeader }) => {\n const t = useI18n();\n const {\n contexts,\n onContextClick,\n label: contextSwitcherLabel = t('switch_to')\n } = contextSwitcher;\n const { navOpen, navState, drawerOpen, setDrawerOpen } = useContext(AppShellContext);\n const [item, setItem] = useState<UtilItemProps>();\n\n useEffect(() => {\n if (drawerOpen && item) {\n setItem(\n items?.find<UtilItemProps>(\n (utilItem): utilItem is UtilItemProps =>\n !isValidElement(utilItem) && utilItem.name === item.name\n )\n );\n }\n }, [items]);\n\n const operatorInfo: NavListItemProps[] = useMemo(\n () =>\n appHeader\n ? []\n : [\n {\n primary: t('app_shell_user_account'),\n visual: operator.avatar,\n items: operator.actions\n }\n ],\n [appHeader, operator.name, operator.avatar, operator.actions]\n );\n\n const contextSwitcherUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!appHeader && contexts && contexts?.length > 1 && !!onContextClick) {\n return {\n name: contextSwitcherLabel,\n primary: contextSwitcherLabel,\n visual: <Icon name='dot-9-solid' />,\n drawerView: (\n <NavigationList\n items={contexts!.map(context => ({\n ...context,\n primary: context.primary,\n 'aria-current': !!context.selected,\n visual: context.visual,\n onClick: e => {\n onContextClick(context.id, e);\n }\n }))}\n singleSelect\n />\n )\n };\n }\n }, [appHeader, contexts, contextSwitcherLabel, onContextClick]);\n\n const transform = useCallback(\n (utilItem: UtilItemProps): NavListItemProps => {\n const uItem = { ...utilItem };\n delete uItem.onDrawerClose;\n delete uItem.onDrawerOpen;\n return {\n onClick: () => {\n if (utilItem.drawerView) {\n setItem(utilItem);\n }\n },\n ...uItem,\n primary: utilItem.name,\n visual: utilItem.count ? (\n <StyledUtilIconCount>\n {utilItem.visual}\n <StyledCountIcon variant='urgent' id={`${utilItem.name}-count`}>\n {utilItem.count}\n </StyledCountIcon>\n </StyledUtilIconCount>\n ) : (\n utilItem.visual\n ),\n collapseItems: !navOpen\n };\n },\n [navOpen]\n );\n\n const utilItems = useMemo(() => {\n return [\n ...(items ?? []).map(uItem => {\n return isValidElement(uItem) ? uItem : transform(uItem);\n }),\n ...(contextSwitcherUtilItem ? [transform(contextSwitcherUtilItem)] : []),\n ...operatorInfo\n ];\n }, [items, operatorInfo, transform]);\n\n useEffect(() => {\n if (item) setDrawerOpen(true);\n }, [item]);\n\n useEffect(() => {\n if (navState === 'closed' || navState === 'closing') setDrawerOpen(false);\n }, [navState]);\n\n return (\n <AppShellDrawerContext.Provider\n value={useMemo(\n () => ({\n drawerOpen,\n closeDrawer: () => {\n setDrawerOpen(false);\n },\n openDrawer: setItem\n }),\n [drawerOpen]\n )}\n >\n <StyledUtils>\n <NavigationList items={utilItems} collapsed />\n </StyledUtils>\n\n {item && (\n <AppShellDrawer\n drawerOpen={drawerOpen}\n setDrawerOpen={setDrawerOpen}\n content={item.drawerView}\n header={item.drawerHeader || item.name}\n onDrawerClose={() => {\n setItem(undefined);\n item.onDrawerClose?.();\n }}\n onDrawerOpen={item.onDrawerOpen}\n />\n )}\n </AppShellDrawerContext.Provider>\n );\n};\n\nconst AppShell: FunctionComponent<AppShellProps & ForwardProps> = forwardRef(function AppShell(\n props: PropsWithoutRef<AppShellProps>,\n ref: Ref<HTMLDivElement>\n) {\n const t = useI18n();\n\n const {\n appInfo,\n contextSwitcher,\n searchInput,\n appHeader,\n searchPage,\n searchLabel = t('sitewide'),\n caseTypes,\n links,\n banners,\n progress,\n main,\n operator,\n utils,\n cases,\n defaultExpanded = false,\n collapsedHoverMenus = false,\n ...restProps\n } = props;\n const {\n appName,\n portalName,\n href: appInfoHref,\n onClick: appInfoOnClick,\n imageSrc: logoSrc,\n appNameHidden,\n ...appInfoRestProps\n } = appInfo;\n let appInfoAs: ElementType = 'div';\n if (appInfoHref) appInfoAs = Link;\n else if (appInfoOnClick) appInfoAs = Button;\n\n const { start, end } = useDirection();\n const { disableScroll, enableScroll } = useScrollToggle();\n const navRef = useConsolidatedRef(ref);\n\n const [mobileNavOpen, setMobileNavOpen] = useState(false);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const [previewActive, setPreviewActive] = useState(false);\n const [mobileNavLinksCount, setMobileNavLinksCount] = useState(0);\n\n const focusedImperatively = useRef(false);\n const [headerEl, setHeaderEl] = useElement<HTMLDivElement>();\n const [mobileHeaderEl, setMobileHeaderEl] = useElement<HTMLDivElement>();\n const [appInfoEl, setAppInfoEl] = useElement<HTMLAnchorElement>();\n const [expandCollapseEl, setExpandCollapseEl] = useElement<HTMLButtonElement>();\n\n const isSmallOrAbove = useBreakpoint('sm');\n\n const showAppHeader = !!appHeader && isSmallOrAbove;\n const showMainContent = showAppHeader ? !!(headerEl || mobileHeaderEl) : true;\n\n const openNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n const closeNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n const previewTriggerRef = useRef<HTMLElement>(null);\n\n const [searchContainerEl, setSearchContainerEl] = useState<HTMLElement | null>(null);\n\n const { state: navState, set: setNavState } = useTransitionState({\n ref: navRef,\n property: 'width',\n states: openCloseStates,\n defaultState: defaultExpanded ? 'open' : 'closed'\n });\n\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: { ariaLabel: t('main_content'), selector: 'main' }\n }\n ],\n [t]\n );\n\n const openNav = useCallback((delay: number = 0) => {\n if (closeNavTimeoutId.current) clearTimeout(closeNavTimeoutId.current);\n openNavTimeoutId.current = setTimeout(() => {\n setNavState('open');\n }, delay);\n }, []);\n\n const closeNav = useCallback((delay: number = 0) => {\n if (openNavTimeoutId.current) clearTimeout(openNavTimeoutId.current);\n closeNavTimeoutId.current = setTimeout(() => {\n setNavState('closed');\n }, delay);\n }, []);\n\n const onFocus = useCallback(() => {\n focusedImperatively.current = false;\n }, [openNav, isSmallOrAbove]);\n\n const mobileNavRef = useRef<HTMLDivElement>(null);\n\n useOuterEvent('focusin', [mobileNavRef], () => setMobileNavOpen(false));\n\n useEffect(() => {\n if (mobileNavOpen) {\n disableScroll();\n } else {\n enableScroll();\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (mobileNavOpen) {\n const onKeyDown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') setMobileNavOpen(false);\n };\n\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (isSmallOrAbove && mobileNavOpen) setMobileNavOpen(false);\n }, [isSmallOrAbove, mobileNavOpen]);\n\n useLayoutEffect(() => {\n if (!mobileHeaderEl) return;\n\n const resizeObserver = new ResizeObserver(\n debounce(() => {\n const mobileHeaderWidth = mobileHeaderEl?.offsetWidth ?? 0;\n const regionsPaddingInlinePixels = mobileHeaderEl\n ? 2 *\n Number.parseInt(\n window.getComputedStyle(mobileHeaderEl).getPropertyValue('padding-inline-start'),\n 10\n )\n : 0;\n const mobileNavButton = mobileHeaderEl?.lastElementChild;\n if (mobileNavButton instanceof HTMLElement) {\n const mobileNavButtonWidth = mobileNavButton.offsetWidth;\n setMobileNavLinksCount(\n Math.floor(mobileHeaderWidth / (mobileNavButtonWidth + regionsPaddingInlinePixels)) -\n (caseTypes?.length ? 2 : 1)\n );\n }\n }, 0)\n );\n\n resizeObserver.observe(mobileHeaderEl);\n\n return () => resizeObserver.disconnect();\n }, [mobileHeaderEl, caseTypes?.length]);\n\n const activatedEl = useRef<Element>(document.body);\n useEvent('click', e => {\n activatedEl.current = document.elementFromPoint(e.clientX, e.clientY) ?? document.body;\n });\n\n useShortcut('NextRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as Element, as we requested to give us only elements\n (node as Element).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n // try to focus first visibleregion\n const focusedNode = regionEls.find(node => focusHeadingOrContainer(node, ''));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n useShortcut('PrevRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as HTMLElement, as we requested to give us only elements\n (node as HTMLElement).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n regionEls.reverse();\n if (regionEls[0].contains(activeElement)) regionEls.splice(0, 1);\n const focusedNode = regionEls.find(node => focusHeadingOrContainer(node, ''));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n const appNav = (\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n justify: 'between'\n }}\n ref={isSmallOrAbove ? navRef : undefined}\n as={StyledAppNav}\n appHeader={showAppHeader}\n navOpen={mobileNavOpen}\n onFocus={onFocus}\n data-app-region\n aria-label={t('app_shell_main_navigation_label')}\n >\n {!showAppHeader && (\n <>\n <StyledAppInfo\n as={Grid}\n forwardedAs={appInfoAs}\n variant='link'\n href={appInfoHref}\n onClick={appInfoOnClick}\n aria-label={`${appName}${portalName ? ` - ${portalName}` : ''}`}\n {...appInfoRestProps}\n container={{\n alignItems: 'center',\n areas: portalName ? '\"logo app\" \"logo portal\"' : '\"logo app\"'\n }}\n ref={setAppInfoEl}\n icon\n >\n <Grid item={{ area: 'logo' }} as={Image} src={logoSrc} alt={appName} />\n <Grid item={{ area: 'app' }} as={appNameHidden ? VisuallyHiddenText : 'span'}>\n {appName}\n </Grid>\n {portalName && (\n <Grid item={{ area: 'portal' }} as='span'>\n {portalName}\n </Grid>\n )}\n </StyledAppInfo>\n {navState === 'closed' && (!appNameHidden || portalName) && (\n <Tooltip\n target={appInfoEl}\n placement='right'\n as={StyledAppShellTooltip}\n showDelay='none'\n hideDelay='none'\n >\n {`${appNameHidden ? '' : appName} ${portalName ?? ''}`.trim()}\n </Tooltip>\n )}\n </>\n )}\n {searchInput && !showAppHeader && (\n <AppShellSearch\n searchLabel={searchLabel}\n collapsed={!mobileNavOpen && ['closed', 'closing'].includes(navState)}\n searchInput={searchInput}\n />\n )}\n <StyledScrollWrap\n container={{ direction: 'column' }}\n item={{ grow: 1 }}\n tabIndex={-1}\n onClick={\n isSmallOrAbove\n ? () => {\n if (['closing', 'closed'].includes(navState)) {\n openNav(0);\n } else {\n closeNav(0);\n }\n }\n : undefined\n }\n >\n {isSmallOrAbove && caseTypes && caseTypes.length > 0 && <CaseTypes caseTypes={caseTypes} />}\n {links && <Links links={isSmallOrAbove ? links : links.slice(mobileNavLinksCount)} />}\n {cases && <Cases cases={cases} />}\n {['open', 'opening'].includes(navState) && (\n <StyledUtilsSeparator navOpen={['open', 'opening'].includes(navState)} />\n )}\n </StyledScrollWrap>\n {['closed', 'closing'].includes(navState) && <StyledUtilsSeparator />}\n <Utils\n appHeader={showAppHeader}\n operator={operator}\n contextSwitcher={contextSwitcher}\n items={utils}\n />\n {!mobileNavOpen && (\n <StyledNavListExpandCollapse\n isCurrent={false}\n navOpen={['open', 'opening'].includes(navState)}\n >\n <StyledAppShellToggleButton\n icon\n ref={setExpandCollapseEl}\n compact\n variant='simple'\n onClick={() => {\n setNavState(navState === 'closed' ? 'open' : 'closed');\n }}\n aria-label={navState === 'closed' ? t('expand_navigation') : t('collapse_navigation')}\n >\n {['closed', 'closing'].includes(navState) ? (\n <Icon name={`arrow-micro-${end}`} />\n ) : (\n <Icon name={`arrow-micro-${start}`} />\n )}\n </StyledAppShellToggleButton>\n\n {['open', 'closed'].includes(navState) && (\n <Tooltip\n target={expandCollapseEl}\n placement='right'\n as={StyledAppShellTooltip}\n showDelay='none'\n hideDelay='none'\n >\n {navState === 'closed' ? t('expand_navigation') : t('collapse_navigation')}\n </Tooltip>\n )}\n </StyledNavListExpandCollapse>\n )}\n </Flex>\n );\n\n return (\n <AppShellContext.Provider\n value={useMemo(\n () => ({\n navOpen: mobileNavOpen || navState === 'open' || navState === 'opening',\n drawerOpen,\n setDrawerOpen,\n collapsedHoverMenus,\n navState,\n focusedImperatively,\n headerEl: headerEl || mobileHeaderEl,\n previewTriggerRef,\n searchContainerEl,\n setSearchContainerEl,\n mobileNavOpen,\n previewActive,\n setPreviewActive\n }),\n [\n navState,\n drawerOpen,\n mobileNavOpen,\n headerEl,\n mobileHeaderEl,\n searchContainerEl,\n previewActive\n ]\n )}\n >\n <SkipLinks items={skipLinks} />\n {showAppHeader && (\n <AppHeader\n {...appInfo}\n contextSwitcher={contextSwitcher}\n searchInput={searchInput}\n searchLabel={searchLabel}\n operator={operator}\n searchPage={searchPage}\n ref={setHeaderEl}\n />\n )}\n {isSmallOrAbove ? (\n appNav\n ) : (\n <>\n <Flex\n as={StyledMobileNav}\n container={{ alignItems: 'center', justify: 'around' }}\n ref={setMobileHeaderEl}\n navOpen={setMobileNavOpen}\n >\n {caseTypes && caseTypes.length > 0 && <CaseTypes caseTypes={caseTypes} mobileNavBar />}\n {links && <Links links={links.slice(0, mobileNavLinksCount)} mobileNavBar />}\n <StyledMobileButton\n variant='simple'\n onClick={() => setMobileNavOpen(prev => !prev)}\n label={t('app_shell_more')}\n icon\n >\n <Icon name='more' />\n {!mobileNavOpen &&\n utils?.some(item => (isValidElement(item) ? false : !!item.count)) && (\n <Alert variant='urgent' />\n )}\n <span>{t('app_shell_more')}</span>\n </StyledMobileButton>\n </Flex>\n <StyledMobileDrawer\n open={mobileNavOpen}\n ref={mobileNavRef}\n onAfterClose={() => {\n setMobileNavOpen(false);\n }}\n position='fixed'\n placement='bottom'\n size={`calc(100dvh - ${mobileHeaderHeight})`}\n nullWhenClosed\n >\n {appNav}\n </StyledMobileDrawer>\n </>\n )}\n {showMainContent && (\n <StyledAppMain\n appHeader={showAppHeader}\n mobileNav={!isSmallOrAbove}\n previewActive={previewActive}\n headerOffset={isSmallOrAbove ? headerEl?.offsetHeight : undefined}\n navOpen={['open', 'opening'].includes(navState) || mobileNavOpen}\n aria-busy={!!progress}\n data-app-region\n >\n <Progress\n visible={!!progress}\n placement='local'\n message={typeof progress === 'string' ? progress : t('loading')}\n />\n\n {banners && <StyledBannerRegion>{banners}</StyledBannerRegion>}\n {main}\n </StyledAppMain>\n )}\n </AppShellContext.Provider>\n );\n});\n\nexport default AppShell;\n"]}
|
|
@@ -3,7 +3,10 @@ export declare const navOpenWidth = "18.75rem";
|
|
|
3
3
|
export declare const headerHeight = "3rem";
|
|
4
4
|
export declare const mobileHeaderHeight = "3.75rem";
|
|
5
5
|
export declare const StyledAppInfo: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
-
export declare const StyledScrollWrap: import("styled-components").StyledComponent<"
|
|
6
|
+
export declare const StyledScrollWrap: import("styled-components").StyledComponent<import("../..").ForwardRefForwardPropsComponent<import("../Flex").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const StyledUtilsSeparator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
navOpen?: boolean;
|
|
9
|
+
}, never>;
|
|
7
10
|
export declare const StyledCountIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Badges").CountProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
8
11
|
getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
|
|
9
12
|
}, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -38,9 +41,7 @@ export declare const StyledMobileNav: import("styled-components").StyledComponen
|
|
|
38
41
|
navOpen: boolean;
|
|
39
42
|
}, never>;
|
|
40
43
|
export declare const StyledMobileButton: import("styled-components").StyledComponent<import("../..").ForwardRefForwardPropsComponent<import("../Button").ButtonProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
41
|
-
export declare const
|
|
42
|
-
getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
|
|
43
|
-
}, import("styled-components").DefaultTheme, {}, never>;
|
|
44
|
+
export declare const StyledMobileDrawer: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Drawer").DrawerProps & import("../..").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
44
45
|
export declare const StyledLoading: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
45
46
|
export declare const StyledAppMain: import("styled-components").StyledComponent<"main", import("styled-components").DefaultTheme, {
|
|
46
47
|
appHeader: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,YAAY,aAAa,CAAC;AACvC,eAAO,MAAM,YA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WAAW,yGAUtB,CAAC;AAIH,eAAO,MAAM,eAAe;aACjB,OAAO;SAyEhB,CAAC;AAIH,eAAO,MAAM,kBAAkB,oLA4C7B,CAAC;AAIH,eAAO,MAAM,kBAAkB,qMAY9B,CAAC;AAIF,eAAO,MAAM,aAAa,yGAEzB,CAAC;AAEF,eAAO,MAAM,aAAa;eACb,OAAO;eACP,OAAO;aACT,OAAO;mBACD,OAAO;mBACP,MAAM;SAmErB,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAI7B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAwBhC,CAAC;AAIH,eAAO,MAAM,0BAA0B,oLA2BrC,CAAC"}
|
|
@@ -4,8 +4,7 @@ import { useContext } from 'react';
|
|
|
4
4
|
import { StyledAlert } from '../Badges/Alert';
|
|
5
5
|
import { ellipsisOverflow } from '../../styles/mixins';
|
|
6
6
|
import { StyledLink } from '../Link/Link';
|
|
7
|
-
import
|
|
8
|
-
import Backdrop from '../Backdrop/Backdrop';
|
|
7
|
+
import Drawer from '../Drawer';
|
|
9
8
|
import { Count } from '../Badges';
|
|
10
9
|
import { StyledAvatar } from '../Avatar';
|
|
11
10
|
import { StyledIcon } from '../Icon';
|
|
@@ -20,6 +19,7 @@ import { StyledTooltip } from '../Tooltip';
|
|
|
20
19
|
import { StyledProgressBackdrop } from '../Progress';
|
|
21
20
|
import Icon from '../Icon/Icon';
|
|
22
21
|
import { StyledText } from '../Text';
|
|
22
|
+
import Flex from '../Flex';
|
|
23
23
|
import { resizeDrawerMaxWidth } from '../../styles/constants';
|
|
24
24
|
import AppShellContext from './AppShellContext';
|
|
25
25
|
import { navContrastColors, pxToRem } from './style-utils';
|
|
@@ -76,9 +76,8 @@ export const StyledAppInfo = styled.a(({ theme }) => {
|
|
|
76
76
|
`;
|
|
77
77
|
});
|
|
78
78
|
StyledAppInfo.defaultProps = defaultThemeProp;
|
|
79
|
-
export const StyledScrollWrap = styled
|
|
79
|
+
export const StyledScrollWrap = styled(Flex)(({ theme }) => {
|
|
80
80
|
return css `
|
|
81
|
-
flex-grow: 1;
|
|
82
81
|
overflow-x: hidden;
|
|
83
82
|
overflow-y: auto;
|
|
84
83
|
@media (height <= ${theme.base.breakpoints.sm}) {
|
|
@@ -88,6 +87,26 @@ export const StyledScrollWrap = styled.div(({ theme }) => {
|
|
|
88
87
|
`;
|
|
89
88
|
});
|
|
90
89
|
StyledScrollWrap.defaultProps = defaultThemeProp;
|
|
90
|
+
export const StyledUtilsSeparator = styled.div(({ theme, navOpen }) => {
|
|
91
|
+
return css `
|
|
92
|
+
position: sticky;
|
|
93
|
+
inset-block-end: 0;
|
|
94
|
+
margin-block-start: auto;
|
|
95
|
+
margin-inline: var(--nav-padding);
|
|
96
|
+
border-block-start: 0.0625rem solid ${theme.components['app-shell'].nav['separator-color']};
|
|
97
|
+
|
|
98
|
+
@media (height <= ${theme.base.breakpoints.sm}) {
|
|
99
|
+
position: relative;
|
|
100
|
+
margin-inline-end: calc(var(--nav-padding) / 2);
|
|
101
|
+
|
|
102
|
+
${navOpen &&
|
|
103
|
+
css `
|
|
104
|
+
margin-inline-end: var(--nav-padding);
|
|
105
|
+
`}
|
|
106
|
+
}
|
|
107
|
+
`;
|
|
108
|
+
});
|
|
109
|
+
StyledUtilsSeparator.defaultProps = defaultThemeProp;
|
|
91
110
|
export const StyledCountIcon = styled(Count) `
|
|
92
111
|
position: absolute;
|
|
93
112
|
/* stylelint-disable-next-line unit-allowed-list */
|
|
@@ -146,6 +165,7 @@ export const StyledAppNav = styled.nav(({ appHeader, showEnv, theme }) => {
|
|
|
146
165
|
const navFgColor = theme.components['app-shell'].nav['foreground-color'];
|
|
147
166
|
const foregroundColor = calculateForegroundColor(navBg, navFgColor);
|
|
148
167
|
return css `
|
|
168
|
+
--nav-padding: ${theme.components['app-shell'].nav.detached ? '0.75rem' : '0px'};
|
|
149
169
|
position: fixed;
|
|
150
170
|
z-index: calc(${theme.base['z-index'].backdrop} - 2);
|
|
151
171
|
background: ${navBg};
|
|
@@ -287,7 +307,7 @@ export const StyledNavListItem = styled.li(({ theme, nestedListCollapsed, single
|
|
|
287
307
|
css `
|
|
288
308
|
&:not(:only-child) {
|
|
289
309
|
background: ${nestedListColor};
|
|
290
|
-
margin-block-end: 0.
|
|
310
|
+
margin-block-end: 0.0625rem;
|
|
291
311
|
border-end-start-radius: 0;
|
|
292
312
|
border-end-end-radius: 0;
|
|
293
313
|
}
|
|
@@ -380,18 +400,21 @@ export const StyledNavListItem = styled.li(({ theme, nestedListCollapsed, single
|
|
|
380
400
|
`;
|
|
381
401
|
});
|
|
382
402
|
StyledNavListItem.defaultProps = defaultThemeProp;
|
|
383
|
-
export const StyledNavList = styled.ul(({ theme
|
|
403
|
+
export const StyledNavList = styled.ul(({ theme }) => {
|
|
384
404
|
return css `
|
|
385
|
-
|
|
386
|
-
min-width: ${navWidth};
|
|
405
|
+
min-width: ${navWidth};
|
|
387
406
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
407
|
+
& > ${StyledNavListItem} {
|
|
408
|
+
&:not(:last-child),
|
|
409
|
+
&:only-child {
|
|
410
|
+
margin-block-end: calc(${theme.base.spacing} / 2);
|
|
393
411
|
}
|
|
394
|
-
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
& > ${StyledNavListItem}:last-of-type {
|
|
415
|
+
padding-block-end: calc(${theme.base.spacing} / 2);
|
|
416
|
+
}
|
|
417
|
+
`;
|
|
395
418
|
});
|
|
396
419
|
StyledNavList.defaultProps = defaultThemeProp;
|
|
397
420
|
export const StyledNavCasesList = styled.div(({ theme }) => {
|
|
@@ -474,8 +497,9 @@ export const StyledCaseTypes = styled.div(({ theme }) => {
|
|
|
474
497
|
StyledCaseTypes.defaultProps = defaultThemeProp;
|
|
475
498
|
export const StyledUtils = styled.div(({ theme }) => {
|
|
476
499
|
return css `
|
|
477
|
-
|
|
478
|
-
|
|
500
|
+
${StyledNavList} {
|
|
501
|
+
padding-block-start: calc(${theme.base.spacing} / 2);
|
|
502
|
+
}
|
|
479
503
|
|
|
480
504
|
${StyledBareButton} > ${StyledIcon}:first-child, ${StyledBareButton} > ${StyledUtilIconCount} {
|
|
481
505
|
margin: 0 calc((${navWidth} - ${iconWidth}) / 2);
|
|
@@ -585,23 +609,20 @@ export const StyledMobileButton = styled(Button)(({ theme }) => {
|
|
|
585
609
|
`;
|
|
586
610
|
});
|
|
587
611
|
StyledMobileButton.defaultProps = defaultThemeProp;
|
|
588
|
-
export const
|
|
612
|
+
export const StyledMobileDrawer = styled(Drawer) `
|
|
589
613
|
/* stylelint-disable-next-line unit-allowed-list */
|
|
590
614
|
height: calc(100dvh - ${mobileHeaderHeight});
|
|
615
|
+
bottom: ${mobileHeaderHeight};
|
|
591
616
|
|
|
592
|
-
> ${
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
599
|
-
height: calc(100dvh - ${mobileHeaderHeight});
|
|
600
|
-
border-inline-end: none;
|
|
601
|
-
}
|
|
617
|
+
> ${StyledAppNav} {
|
|
618
|
+
width: 100vw;
|
|
619
|
+
max-width: inherit;
|
|
620
|
+
/* stylelint-disable-next-line unit-allowed-list */
|
|
621
|
+
height: calc(100dvh - ${mobileHeaderHeight});
|
|
622
|
+
border-inline-end: none;
|
|
602
623
|
}
|
|
603
624
|
`;
|
|
604
|
-
|
|
625
|
+
StyledMobileDrawer.defaultProps = defaultThemeProp;
|
|
605
626
|
export const StyledLoading = styled.div `
|
|
606
627
|
font-size: 2rem;
|
|
607
628
|
`;
|
|
@@ -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;AAChD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,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AAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrE,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC;IAC3D,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACzE,MAAM,EAAE,eAAe,EAAE,GAAG,mCAAmC,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACnF,IAAI,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IAEtC,IAAI,WAAW,CAAC,eAAe,EAAE,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC;QAC3C,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,GAAG,CAAA;kBACM,EAAE;aACP,UAAU;;2BAEI,KAAK,CAAC,IAAI,CAAC,OAAO;;MAEvC,UAAU;;;;;;;;oBAQI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;GAExC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { darken, getContrast, lighten, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAlert } from '../Badges/Alert';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledLink } from '../Link/Link';\nimport { StyledDrawer } from '../Drawer/Drawer';\nimport Backdrop from '../Backdrop/Backdrop';\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 { 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 { resizeDrawerMaxWidth } from '../../styles/constants';\n\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors, pxToRem } from './style-utils';\n\nexport const navWidth = '4rem';\nexport const navOpenWidth = '18.75rem';\nexport const headerHeight = '3rem';\nexport const mobileHeaderHeight = '3.75rem';\nconst iconWidth = '1.125rem';\nconst iconBoxSize = `calc((${navWidth} - ${iconWidth} - 2 * var(--nav-padding)) / 2)`;\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.div(({ theme }) => {\n return css`\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow: visible;\n flex-shrink: 0;\n }\n `;\n});\n\nStyledScrollWrap.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\nexport const StyledAppNav = styled.nav<{ appHeader: boolean; showEnv: boolean }>(\n ({ appHeader, showEnv, theme }) => {\n const { navOpen } = useContext(AppShellContext);\n\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 position: fixed;\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n background: ${navBg};\n color: ${foregroundColor};\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: ${navOpen ? navOpenWidth : navWidth};\n height: calc(100vh - ${appHeader ? headerHeight : '0rem'});\n overflow: hidden;\n white-space: nowrap;\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n padding-block-end: ${theme.base.spacing};\n border-inline-end: ${pxToRem(1)} solid ${transparentize(0.9, '#000')};\n border-color: ${theme.components['app-shell'].nav['border-color']};\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow-y: auto;\n overflow-x: clip;\n }\n\n ${!showEnv &&\n css`\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);\n\nStyledAppNav.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 `}\n }\n `;\n }\n);\n\nStyledNavListItemVisualContainer.defaultProps = defaultThemeProp;\n\nexport const StyledNavListExpandCollapse = styled(StyledNavListItemVisualContainer)`\n display: flex;\n justify-content: center;\n min-width: ${navWidth};\n`;\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: { detached }\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: ${pxToRem(1)} solid transparent;\n\n ${detached &&\n css`\n --item-height: 2.5rem;\n padding: 0;\n height: var(--item-height);\n border: none;\n border-radius: calc(var(--item-height) / 2);\n transition: border-radius ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n `}\n ${detached &&\n css`\n &:not(:only-child) {\n background: ${nestedListColor};\n margin-block-end: 0.125rem;\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 outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\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: ${pxToRem(1)} solid ${theme.components['app-shell'].nav['border-color']};\n background: ${transparentize(0.85, foreground)};\n ${detached &&\n css`\n background: ${transparentize(0.9, foreground)};\n `}\n\n ${!detached &&\n css`\n &::before {\n content: '';\n position: absolute;\n width: ${pxToRem(4)};\n inset-inline-start: 0;\n top: 0;\n bottom: 0;\n background-color: ${foreground};\n }\n `}\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul(\n ({\n theme: {\n base,\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n }\n }) => {\n return css`\n --nav-padding: ${detached ? '0.75rem' : '0px'};\n min-width: ${navWidth};\n\n & > ${StyledNavListItem} {\n &:not(:last-child),\n &:only-child {\n margin-block-end: calc(${base.spacing} / 2);\n }\n }\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 }\n }\n }\n } = theme;\n\n const { nestedList } = 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 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 `;\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 border-block-start: 0.0625rem solid ${theme.components['app-shell'].nav['border-color']};\n margin-block-start: calc(${theme.base.spacing} / 2);\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 StyledMobileNav = styled.header<{\n navOpen: boolean;\n}>(({ theme, navOpen }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius\n },\n components: {\n button: { 'focus-shadow': focusShadow }\n }\n } = theme;\n const mobileNavColor = theme.components['app-shell'].nav.background;\n const { foreground } = navContrastColors(theme);\n\n return css`\n min-width: 100%;\n min-height: ${mobileHeaderHeight};\n z-index: ${theme.base['z-index'].drawer};\n background: ${mobileNavColor};\n color: ${foreground};\n padding: ${theme.base.spacing};\n position: fixed;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: calc(100dvh - ${mobileHeaderHeight});\n\n ${navOpen &&\n css`\n z-index: calc(${theme.base['z-index'].backdrop} + 1);\n `}\n > div:has(> ${StyledNavList}),\n > div:has(> ${StyledNavList}) > ${StyledNavList} {\n display: contents;\n\n ${StyledNavListItem} {\n width: calc(${hitAreaFinger} + (2.5 * ${theme.base.spacing}));\n padding: 0;\n margin: 0;\n\n ${StyledBareButton}, ${StyledLink} {\n flex-direction: column;\n justify-content: center;\n gap: calc(0.5 * ${theme.base.spacing});\n height: ${hitAreaFinger};\n padding: 0 ${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 StyledMobileButton = styled(Button)(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius\n },\n components: {\n button: { 'border-width': borderWidth }\n }\n } = theme;\n const { mobileNavOpen } = useContext(AppShellContext);\n const { foreground } = navContrastColors(theme);\n\n return css`\n flex-direction: column;\n flex-shrink: 0;\n gap: calc(0.5 * ${theme.base.spacing});\n height: ${hitAreaFinger};\n width: calc(${hitAreaFinger} + (2.5 * ${theme.base.spacing}));\n border-radius: ${borderRadius};\n border: none;\n\n span {\n width: inherit;\n padding-inline: ${theme.base.spacing};\n ${ellipsisOverflow}\n }\n\n ${mobileNavOpen &&\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 ${StyledAlert} {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: calc(50% + (0.625rem / 2));\n }\n `;\n});\n\nStyledMobileButton.defaultProps = defaultThemeProp;\n\nexport const StyledMobileBackdrop = styled(Backdrop)`\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${mobileHeaderHeight});\n\n > ${StyledDrawer} {\n bottom: ${mobileHeaderHeight};\n\n > ${StyledAppNav}, ${StyledDrawer} {\n width: 100vw;\n max-width: inherit;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${mobileHeaderHeight});\n border-inline-end: none;\n }\n }\n`;\n\nStyledMobileBackdrop.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}>(({ appHeader, mobileNav, navOpen, previewActive, headerOffset = 0, theme }) => {\n let heightOffset = appHeader ? headerHeight : '0rem';\n if (mobileNav) {\n heightOffset = mobileHeaderHeight;\n }\n const appBackground = theme.base.palette['app-background'];\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 --appshell-bottom-offset: ${mobileHeaderHeight};\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${heightOffset});\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.xl}) {\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\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 navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const { backgroundColor } = calculateBackgroundAndContrastColor(navBg, navFgColor);\n let bg = darken(0.2, backgroundColor);\n\n if (getContrast(backgroundColor, bg) < 1.3) {\n bg = lighten(0.2, backgroundColor);\n }\n\n return css`\n background: ${bg};\n color: ${navFgColor};\n border: none;\n margin-top: calc(1 * ${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"]}
|
|
1
|
+
{"version":3,"file":"AppShell.styles.js","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AAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;GAExC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { darken, getContrast, lighten, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAlert } from '../Badges/Alert';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledLink } from '../Link/Link';\nimport Drawer from '../Drawer';\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 { 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';\n\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors, pxToRem } from './style-utils';\n\nexport const navWidth = '4rem';\nexport const navOpenWidth = '18.75rem';\nexport const headerHeight = '3rem';\nexport const mobileHeaderHeight = '3.75rem';\nconst iconWidth = '1.125rem';\nconst iconBoxSize = `calc((${navWidth} - ${iconWidth} - 2 * var(--nav-padding)) / 2)`;\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 @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\nexport const StyledAppNav = styled.nav<{ appHeader: boolean; showEnv: boolean }>(\n ({ appHeader, showEnv, theme }) => {\n const { navOpen } = useContext(AppShellContext);\n\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 position: fixed;\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n background: ${navBg};\n color: ${foregroundColor};\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: ${navOpen ? navOpenWidth : navWidth};\n height: calc(100vh - ${appHeader ? headerHeight : '0rem'});\n overflow: hidden;\n white-space: nowrap;\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n padding-block-end: ${theme.base.spacing};\n border-inline-end: ${pxToRem(1)} solid ${transparentize(0.9, '#000')};\n border-color: ${theme.components['app-shell'].nav['border-color']};\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow-y: auto;\n overflow-x: clip;\n }\n\n ${!showEnv &&\n css`\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);\n\nStyledAppNav.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 `}\n }\n `;\n }\n);\n\nStyledNavListItemVisualContainer.defaultProps = defaultThemeProp;\n\nexport const StyledNavListExpandCollapse = styled(StyledNavListItemVisualContainer)`\n display: flex;\n justify-content: center;\n min-width: ${navWidth};\n`;\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: { detached }\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: ${pxToRem(1)} solid transparent;\n\n ${detached &&\n css`\n --item-height: 2.5rem;\n padding: 0;\n height: var(--item-height);\n border: none;\n border-radius: calc(var(--item-height) / 2);\n transition: border-radius ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n `}\n ${detached &&\n css`\n &:not(:only-child) {\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 outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\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: ${pxToRem(1)} solid ${theme.components['app-shell'].nav['border-color']};\n background: ${transparentize(0.85, foreground)};\n ${detached &&\n css`\n background: ${transparentize(0.9, foreground)};\n `}\n\n ${!detached &&\n css`\n &::before {\n content: '';\n position: absolute;\n width: ${pxToRem(4)};\n inset-inline-start: 0;\n top: 0;\n bottom: 0;\n background-color: ${foreground};\n }\n `}\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 }\n }\n }\n } = theme;\n\n const { nestedList } = 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 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 `;\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 StyledMobileNav = styled.header<{\n navOpen: boolean;\n}>(({ theme, navOpen }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius\n },\n components: {\n button: { 'focus-shadow': focusShadow }\n }\n } = theme;\n const mobileNavColor = theme.components['app-shell'].nav.background;\n const { foreground } = navContrastColors(theme);\n\n return css`\n min-width: 100%;\n min-height: ${mobileHeaderHeight};\n z-index: ${theme.base['z-index'].drawer};\n background: ${mobileNavColor};\n color: ${foreground};\n padding: ${theme.base.spacing};\n position: fixed;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: calc(100dvh - ${mobileHeaderHeight});\n\n ${navOpen &&\n css`\n z-index: calc(${theme.base['z-index'].backdrop} + 1);\n `}\n > div:has(> ${StyledNavList}),\n > div:has(> ${StyledNavList}) > ${StyledNavList} {\n display: contents;\n\n ${StyledNavListItem} {\n width: calc(${hitAreaFinger} + (2.5 * ${theme.base.spacing}));\n padding: 0;\n margin: 0;\n\n ${StyledBareButton}, ${StyledLink} {\n flex-direction: column;\n justify-content: center;\n gap: calc(0.5 * ${theme.base.spacing});\n height: ${hitAreaFinger};\n padding: 0 ${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 StyledMobileButton = styled(Button)(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius\n },\n components: {\n button: { 'border-width': borderWidth }\n }\n } = theme;\n const { mobileNavOpen } = useContext(AppShellContext);\n const { foreground } = navContrastColors(theme);\n\n return css`\n flex-direction: column;\n flex-shrink: 0;\n gap: calc(0.5 * ${theme.base.spacing});\n height: ${hitAreaFinger};\n width: calc(${hitAreaFinger} + (2.5 * ${theme.base.spacing}));\n border-radius: ${borderRadius};\n border: none;\n\n span {\n width: inherit;\n padding-inline: ${theme.base.spacing};\n ${ellipsisOverflow}\n }\n\n ${mobileNavOpen &&\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 ${StyledAlert} {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: calc(50% + (0.625rem / 2));\n }\n `;\n});\n\nStyledMobileButton.defaultProps = defaultThemeProp;\n\nexport const StyledMobileDrawer = styled(Drawer)`\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${mobileHeaderHeight});\n bottom: ${mobileHeaderHeight};\n\n > ${StyledAppNav} {\n width: 100vw;\n max-width: inherit;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${mobileHeaderHeight});\n border-inline-end: none;\n }\n`;\n\nStyledMobileDrawer.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}>(({ appHeader, mobileNav, navOpen, previewActive, headerOffset = 0, theme }) => {\n let heightOffset = appHeader ? headerHeight : '0rem';\n if (mobileNav) {\n heightOffset = mobileHeaderHeight;\n }\n const appBackground = theme.base.palette['app-background'];\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 --appshell-bottom-offset: ${mobileHeaderHeight};\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${heightOffset});\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.xl}) {\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\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 navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const { backgroundColor } = calculateBackgroundAndContrastColor(navBg, navFgColor);\n let bg = darken(0.2, backgroundColor);\n\n if (getContrast(backgroundColor, bg) < 1.3) {\n bg = lighten(0.2, backgroundColor);\n }\n\n return css`\n background: ${bg};\n color: ${navFgColor};\n border: none;\n margin-top: calc(1 * ${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"]}
|
|
@@ -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;
|
|
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,CAqPhD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -4,11 +4,13 @@ import { useContext, useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import { tryCatch, createStringMatcher, isInstance } from '../../utils';
|
|
6
6
|
import { useDirection, useEscape, useOuterEvent, useTheme, useUID } from '../../hooks';
|
|
7
|
-
import Text from '../Text';
|
|
7
|
+
import Text, { StyledText } from '../Text';
|
|
8
8
|
import Tooltip from '../Tooltip';
|
|
9
9
|
import Popover from '../Popover';
|
|
10
10
|
import Menu from '../Menu';
|
|
11
11
|
import { StyledMenu, StyledMenuListContainer, StyledMenuListWrapper } from '../Menu/Menu.styles';
|
|
12
|
+
import { StyledEmptyState } from '../EmptyState';
|
|
13
|
+
import { StyledIcon } from '../Icon';
|
|
12
14
|
import { defaultThemeProp } from '../../theme';
|
|
13
15
|
import { calculateFontSize } from '../../styles';
|
|
14
16
|
import AppShellContext from './AppShellContext';
|
|
@@ -57,6 +59,12 @@ const StyledNavigationPopover = styled.div(({ theme, mobileNavBar }) => {
|
|
|
57
59
|
background-color: ${hoverBg};
|
|
58
60
|
}
|
|
59
61
|
}
|
|
62
|
+
|
|
63
|
+
${StyledEmptyState} {
|
|
64
|
+
${StyledIcon}, ${StyledText} {
|
|
65
|
+
color: ${foreground};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
60
68
|
`;
|
|
61
69
|
});
|
|
62
70
|
StyledNavigationPopover.defaultProps = defaultThemeProp;
|
|
@@ -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,Q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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 from '../Text';\nimport Tooltip from '../Tooltip';\nimport Popover from '../Popover';\nimport Menu from '../Menu';\nimport { StyledMenu, StyledMenuListContainer, StyledMenuListWrapper } from '../Menu/Menu.styles';\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 }\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 renderFilter = 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 = true) => {\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', [popoverRef], () => closePopover());\n\n useEffect(() => {\n const onClick = (e: Event) => {\n if (items.length || content) {\n if (!navOpen) {\n e.stopPropagation();\n e.preventDefault();\n }\n if (!navOpen && !popoverOpen) setPopoverOpen(true);\n else {\n setTimeout(() => {\n closePopover(false);\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 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(false);\n } else {\n hidePopoverTimeout.current = window.setTimeout(() => {\n if (!mousedOverMenu.current) {\n closePopover(false);\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(false);\n };\n\n childElementRef.current?.addEventListener('click', onClick);\n childElementRef.current?.addEventListener('blur', e => onBlur(e));\n childElementRef.current?.addEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.addEventListener('mouseenter', onClick);\n childElementRef.current?.addEventListener('mouseleave', onMouseOut);\n }\n return () => {\n childElementRef.current?.removeEventListener('click', onClick);\n childElementRef.current?.removeEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.removeEventListener('mouseenter', onClick);\n childElementRef.current?.removeEventListener('mouseleave', onMouseOut);\n }\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n };\n }, [items, content, navOpen, closePopover, collapsedHoverMenus]);\n\n useEffect(() => {\n onMenuToggle?.(popoverOpen ? 'open' : 'close');\n }, [popoverOpen]);\n\n useEscape(() => closePopover(), childElementRef, [childElementRef]);\n\n useEscape(() => closePopover(), 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 onBlur: () => closePopover(false)\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 && (items.length || content) && (\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;AACjC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CACxC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE;IAC1B,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,iBAAiB,CAA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OAAO,CAAC,CAAC,CAAC,CACT,cAAK,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,YACtE,OAAO,GACJ,CACP,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IACH,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,QAAQ,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 renderFilter = 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 = true) => {\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', [popoverRef], () => closePopover());\n\n useEffect(() => {\n const onClick = (e: Event) => {\n if (items.length || content) {\n if (!navOpen) {\n e.stopPropagation();\n e.preventDefault();\n }\n if (!navOpen && !popoverOpen) setPopoverOpen(true);\n else {\n setTimeout(() => {\n closePopover(false);\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 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(false);\n } else {\n hidePopoverTimeout.current = window.setTimeout(() => {\n if (!mousedOverMenu.current) {\n closePopover(false);\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(false);\n };\n\n childElementRef.current?.addEventListener('click', onClick);\n childElementRef.current?.addEventListener('blur', e => onBlur(e));\n childElementRef.current?.addEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.addEventListener('mouseenter', onClick);\n childElementRef.current?.addEventListener('mouseleave', onMouseOut);\n }\n return () => {\n childElementRef.current?.removeEventListener('click', onClick);\n childElementRef.current?.removeEventListener('keydown', onKeyDown);\n if (collapsedHoverMenus) {\n childElementRef.current?.removeEventListener('mouseenter', onClick);\n childElementRef.current?.removeEventListener('mouseleave', onMouseOut);\n }\n if (hidePopoverTimeout.current) {\n clearTimeout(hidePopoverTimeout.current);\n hidePopoverTimeout.current = null;\n }\n };\n }, [items, content, navOpen, closePopover, collapsedHoverMenus]);\n\n useEffect(() => {\n onMenuToggle?.(popoverOpen ? 'open' : 'close');\n }, [popoverOpen]);\n\n useEscape(() => closePopover(), childElementRef, [childElementRef]);\n\n useEscape(() => closePopover(), 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 onBlur: () => closePopover(false)\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 && (items.length || content) && (\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,kBAAkB,oLAE9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,0KAAiB,CAAC;AAElD,eAAO,MAAM,cAAc;kBACX,OAAO;WACd,SAAS,CAAC,MAAM,CAAC;iBACX,SAAS,CAAC,YAAY,CAAC;gBACxB,OAAO;uBACA,OAAO;SA2O3B,CAAC;AAIF,eAAO,MAAM,eAAe,yGAS3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,uGAElC,CAAC;AAEF,eAAO,MAAM,eAAe,wGAM1B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAUhC,CAAC;AAIH,eAAO,MAAM,oBAAoB,4GA6C/B,CAAC;AAIH,eAAO,MAAM,cAAc,wGAiB1B,CAAC;AAIF,eAAO,MAAM,uBAAuB,8GAMlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,8GAEzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wGAI7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yGA0BjC,CAAC;AAIF,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,kBAAkB,oLAE9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,0KAAiB,CAAC;AAElD,eAAO,MAAM,cAAc;kBACX,OAAO;WACd,SAAS,CAAC,MAAM,CAAC;iBACX,SAAS,CAAC,YAAY,CAAC;gBACxB,OAAO;uBACA,OAAO;SA2O3B,CAAC;AAIF,eAAO,MAAM,eAAe,yGAS3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,uGAElC,CAAC;AAEF,eAAO,MAAM,eAAe,wGAM1B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAUhC,CAAC;AAIH,eAAO,MAAM,oBAAoB,4GA6C/B,CAAC;AAIH,eAAO,MAAM,cAAc,wGAiB1B,CAAC;AAIF,eAAO,MAAM,uBAAuB,8GAMlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,8GAEzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wGAI7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yGA0BjC,CAAC;AAIF,eAAO,MAAM,UAAU,yGA4DrB,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGA0C3B,CAAC;AAIH,eAAO,MAAM,gBAAgB,0KAkB3B,CAAC"}
|
|
@@ -396,6 +396,15 @@ export const StyledMenu = styled.div(({ theme }) => {
|
|
|
396
396
|
|
|
397
397
|
&[data-active-scope='true'] [data-current='true'] {
|
|
398
398
|
box-shadow: ${theme.base.shadow['focus-inset']};
|
|
399
|
+
&:first-child {
|
|
400
|
+
border-start-start-radius: inherit;
|
|
401
|
+
border-start-end-radius: inherit;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
&:last-child {
|
|
405
|
+
border-end-start-radius: inherit;
|
|
406
|
+
border-end-end-radius: inherit;
|
|
407
|
+
}
|
|
399
408
|
}
|
|
400
409
|
|
|
401
410
|
${StyledVisuallyHiddenText}:first-child {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.styles.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,YAAY,EACb,MAA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,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { hideVisually, mix, rgba, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledEmptyState } from '../EmptyState';\nimport Icon, { StyledIcon } from '../Icon';\nimport { StyledGrid } from '../Grid';\nimport { tryCatch } from '../../utils';\nimport { StyledText } from '../Text';\nimport { StyledVisuallyHiddenText } from '../VisuallyHiddenText/VisuallyHiddenText';\nimport { StyledMetaList, StyledMetaListItem } from '../MetaList/MetaList';\nimport Button, { StyledButton } from '../Button';\nimport { readableColor } from '../../styles';\nimport {\n StyledPrimary,\n StyledSecondary,\n StyledSummaryItem,\n StyledSummaryItemActions,\n StyledVisual\n} from '../SummaryItem';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledFlex } from '../Flex';\nimport { StyledFormControl } from '../FormControl';\n\nimport type { MenuProps } from './Menu.types';\n\nexport const StyledExpandButton = styled(Button)`\n align-self: center;\n`;\n\nexport const StyledCheckMarkIcon = styled(Icon)``;\n\nexport const StyledMenuItem = styled.li<{\n isParentItem: boolean;\n mode?: MenuProps['mode'];\n itemLayout?: MenuProps['itemLayout'];\n isChecked?: boolean;\n selectableParent?: boolean;\n}>(\n ({\n theme: { base, components },\n isParentItem,\n itemLayout,\n mode = 'action',\n 'aria-selected': isChecked = false,\n selectableParent = false\n }) => {\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverCheckColor = tryCatch(() =>\n rgba(\n components['radio-check'][':checked']['background-color'],\n base.transparency['transparent-5']\n )\n );\n\n const checkedBackground = components['radio-check'][':checked']['background-color'];\n const checkedForeground = tryCatch(() => readableColor(checkedBackground));\n\n return css`\n min-height: ${base['hit-area']['mouse-min']};\n padding-block: calc(0.75 * ${base.spacing});\n padding-inline: ${base.spacing};\n cursor: pointer;\n\n > ${StyledSummaryItem} {\n ${StyledSummaryItemActions}, ${StyledVisual} {\n display: grid;\n align-items: center;\n }\n\n > ${StyledVisual}:has(> :nth-child(2)) {\n grid-template-columns: auto auto;\n grid-column-gap: ${base.spacing};\n }\n\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['mouse-min']};\n align-self: start;\n }\n `}\n }\n\n ${itemLayout === 'inline' &&\n css`\n justify-content: flex-start;\n\n ${StyledSummaryItem} {\n /* Sets grid columns based on SummaryItem content combinations */\n\n &:has(${StyledVisual}):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary secondary actions';\n grid-template-columns: auto auto 1fr auto;\n }\n\n &:has(${StyledVisual}):has(${StyledSecondary}):not(:has(${StyledSummaryItemActions})) {\n grid-template-areas: 'visual primary secondary';\n grid-template-columns: auto auto 1fr;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'visual primary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'primary secondary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary secondary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):has(\n ${StyledSummaryItemActions}\n ) {\n grid-template-areas: 'primary actions';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary';\n grid-template-columns: 1fr;\n flex-grow: 0;\n }\n\n & > ${StyledPrimary} {\n ${ellipsisOverflow};\n }\n\n & > ${StyledSecondary} {\n ${ellipsisOverflow};\n\n ul {\n li {\n ${ellipsisOverflow};\n }\n justify-content: end;\n }\n }\n\n & > ${StyledSummaryItemActions} > ${StyledFlex} {\n justify-content: end;\n }\n }\n `}\n\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['finger-min']};\n }\n `}\n }\n\n &:focus-within {\n background-color: ${activeColor};\n }\n\n &:hover {\n ${StyledCheckMarkIcon} {\n visibility: visible;\n ${mode === 'single-select' &&\n css`\n color: ${isChecked ? checkedBackground : hoverCheckColor};\n `}\n ${mode === 'multi-select' &&\n css`\n ${!isChecked &&\n css`\n border-color: ${components['form-control'][':hover']['border-color']};\n `}\n `}\n }\n }\n\n &:hover:not([aria-disabled='true']) {\n background-color: ${hoverColor};\n }\n\n a:first-of-type {\n display: block;\n width: 100%;\n text-decoration: none;\n color: inherit;\n }\n\n /* The enclosing menu item has required min-height already set */\n ${isParentItem &&\n selectableParent &&\n css`\n ${StyledSummaryItemActions} ${StyledButton} {\n min-height: unset;\n }\n `}\n\n ${isParentItem &&\n !selectableParent &&\n (mode === 'multi-select' || mode === 'single-select') &&\n css`\n padding-inline-start: calc(1.125rem + 2 * ${base.spacing});\n `}\n\n ${StyledGrid} {\n flex-grow: 1;\n }\n\n ${StyledCheckMarkIcon} {\n margin-inline-start: 0;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedForeground};\n background-color: ${checkedBackground};\n border: 0.0625rem solid ${components['radio-check'][':checked']['border-color']};\n `\n : css`\n color: transparent;\n border: 0.0625rem solid ${components['radio-check']['border-color']};\n `}\n border-radius: min(\n calc(${base['border-radius']} * ${components.checkbox['border-radius']}),\n 0.25rem\n );\n `}\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n background-color: ${components['form-control'][':disabled']['background-color']};\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nStyledMenuItem.defaultProps = defaultThemeProp;\n\nexport const StyledAncestors = styled.div`\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n & > ${StyledText} {\n ${ellipsisOverflow};\n }\n`;\n\nexport const StyledVisibilityHidden = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledSeparator = styled.li(({ theme }) => {\n return css`\n height: 0.0625rem;\n background-color: ${theme.base.palette['border-line']};\n margin: ${theme.base.spacing} 0;\n `;\n});\n\nStyledSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupHeader = styled.div(({ theme }) => {\n return css`\n min-height: ${theme.base['hit-area']['mouse-min']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n background-color: ${theme.base.palette['secondary-background']};\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n }\n `;\n});\n\nStyledMenuGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n cursor: pointer;\n width: 100%;\n background-color: ${base.palette['primary-background']};\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &:focus-within {\n box-shadow: ${base.shadow['focus-inset']};\n background-color: ${activeColor};\n }\n\n &:hover:not([aria-disabled='true']):not([data-current='true']) {\n background-color: ${hoverColor};\n }\n color: ${base.palette['foreground-color']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n border-radius: inherit;\n\n > ${StyledGrid} {\n grid-column-gap: ${base.spacing};\n }\n\n ${StyledIcon} {\n /* Fixes vertical align issue increasing box size beyond square */\n display: block;\n }\n `;\n});\n\nStyledMenuListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledEmptyState} {\n padding: ${theme.base.spacing};\n height: auto;\n }\n\n li:not(:first-child):not([role='presentation']) > ${StyledMenuGroupHeader} {\n margin-block-start: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n ${StyledMetaList} ${StyledMetaListItem} * {\n display: inline;\n vertical-align: baseline;\n margin: 0;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n\n return css`\n display: flex;\n flex-direction: column;\n\n &,\n ${StyledMenuListWrapper} {\n max-height: inherit;\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &[data-active-scope='true'] [data-current='true'] {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${StyledVisuallyHiddenText}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMenuFilter = styled.div(({ theme }) => {\n const borderRadius = `calc(${theme.components['search-input']['border-radius']} * ${theme.base['border-radius']})`;\n\n return css`\n position: relative;\n min-height: ${theme.components.input.height};\n height: ${theme.components.input.height};\n --icon-start-padding: calc(1.5 * ${theme.components.input.padding});\n /* stylelint-disable-next-line unit-allowed-list */\n --icon-size: max(1.125rem, 14px);\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n min-width: ${theme.base['hit-area']['finger-min']};\n }\n\n ${StyledFormControl} {\n height: 100%;\n border-radius: ${borderRadius};\n padding-inline-start: calc(\n var(--icon-start-padding) + var(--icon-size) + (0.5 * ${theme.components.input.padding})\n );\n padding-inline-end: calc(1.5 * ${theme.components.input.padding});\n\n &::-webkit-search-cancel-button {\n display: none;\n }\n\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &:focus:not([disabled]) {\n box-shadow: ${theme.base.shadow['focus-inset']};\n border-color: ${theme.components['form-control']['border-color']};\n\n :hover {\n border-color: ${theme.components['form-control'][':hover']['border-color']};\n }\n }\n }\n `;\n});\n\nStyledMenuFilter.defaultProps = defaultThemeProp;\n\nexport const StyledFilterIcon = styled(Icon)(({ theme }) => {\n const iconColor = tryCatch(() => transparentize(0.3, theme.base.palette['foreground-color']));\n\n return css`\n position: absolute;\n pointer-events: none;\n color: ${iconColor};\n inset-inline-start: var(--icon-start-padding);\n /* stylelint-disable unit-allowed-list */\n inset-block-start: calc(0.5 * (${theme.components.input.height} - max(1.125rem, 14px)));\n\n @media (pointer: coarse) {\n inset-block-start: calc(\n 0.5 * (${theme.base['hit-area']['finger-min']} - max(1.125rem, 14px))\n );\n }\n /* stylelint-enable unit-allowed-list */\n `;\n});\n\nStyledFilterIcon.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"Menu.styles.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,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CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { hideVisually, mix, rgba, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledEmptyState } from '../EmptyState';\nimport Icon, { StyledIcon } from '../Icon';\nimport { StyledGrid } from '../Grid';\nimport { tryCatch } from '../../utils';\nimport { StyledText } from '../Text';\nimport { StyledVisuallyHiddenText } from '../VisuallyHiddenText/VisuallyHiddenText';\nimport { StyledMetaList, StyledMetaListItem } from '../MetaList/MetaList';\nimport Button, { StyledButton } from '../Button';\nimport { readableColor } from '../../styles';\nimport {\n StyledPrimary,\n StyledSecondary,\n StyledSummaryItem,\n StyledSummaryItemActions,\n StyledVisual\n} from '../SummaryItem';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledFlex } from '../Flex';\nimport { StyledFormControl } from '../FormControl';\n\nimport type { MenuProps } from './Menu.types';\n\nexport const StyledExpandButton = styled(Button)`\n align-self: center;\n`;\n\nexport const StyledCheckMarkIcon = styled(Icon)``;\n\nexport const StyledMenuItem = styled.li<{\n isParentItem: boolean;\n mode?: MenuProps['mode'];\n itemLayout?: MenuProps['itemLayout'];\n isChecked?: boolean;\n selectableParent?: boolean;\n}>(\n ({\n theme: { base, components },\n isParentItem,\n itemLayout,\n mode = 'action',\n 'aria-selected': isChecked = false,\n selectableParent = false\n }) => {\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverCheckColor = tryCatch(() =>\n rgba(\n components['radio-check'][':checked']['background-color'],\n base.transparency['transparent-5']\n )\n );\n\n const checkedBackground = components['radio-check'][':checked']['background-color'];\n const checkedForeground = tryCatch(() => readableColor(checkedBackground));\n\n return css`\n min-height: ${base['hit-area']['mouse-min']};\n padding-block: calc(0.75 * ${base.spacing});\n padding-inline: ${base.spacing};\n cursor: pointer;\n\n > ${StyledSummaryItem} {\n ${StyledSummaryItemActions}, ${StyledVisual} {\n display: grid;\n align-items: center;\n }\n\n > ${StyledVisual}:has(> :nth-child(2)) {\n grid-template-columns: auto auto;\n grid-column-gap: ${base.spacing};\n }\n\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['mouse-min']};\n align-self: start;\n }\n `}\n }\n\n ${itemLayout === 'inline' &&\n css`\n justify-content: flex-start;\n\n ${StyledSummaryItem} {\n /* Sets grid columns based on SummaryItem content combinations */\n\n &:has(${StyledVisual}):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary secondary actions';\n grid-template-columns: auto auto 1fr auto;\n }\n\n &:has(${StyledVisual}):has(${StyledSecondary}):not(:has(${StyledSummaryItemActions})) {\n grid-template-areas: 'visual primary secondary';\n grid-template-columns: auto auto 1fr;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'visual primary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'primary secondary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary secondary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):has(\n ${StyledSummaryItemActions}\n ) {\n grid-template-areas: 'primary actions';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary';\n grid-template-columns: 1fr;\n flex-grow: 0;\n }\n\n & > ${StyledPrimary} {\n ${ellipsisOverflow};\n }\n\n & > ${StyledSecondary} {\n ${ellipsisOverflow};\n\n ul {\n li {\n ${ellipsisOverflow};\n }\n justify-content: end;\n }\n }\n\n & > ${StyledSummaryItemActions} > ${StyledFlex} {\n justify-content: end;\n }\n }\n `}\n\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['finger-min']};\n }\n `}\n }\n\n &:focus-within {\n background-color: ${activeColor};\n }\n\n &:hover {\n ${StyledCheckMarkIcon} {\n visibility: visible;\n ${mode === 'single-select' &&\n css`\n color: ${isChecked ? checkedBackground : hoverCheckColor};\n `}\n ${mode === 'multi-select' &&\n css`\n ${!isChecked &&\n css`\n border-color: ${components['form-control'][':hover']['border-color']};\n `}\n `}\n }\n }\n\n &:hover:not([aria-disabled='true']) {\n background-color: ${hoverColor};\n }\n\n a:first-of-type {\n display: block;\n width: 100%;\n text-decoration: none;\n color: inherit;\n }\n\n /* The enclosing menu item has required min-height already set */\n ${isParentItem &&\n selectableParent &&\n css`\n ${StyledSummaryItemActions} ${StyledButton} {\n min-height: unset;\n }\n `}\n\n ${isParentItem &&\n !selectableParent &&\n (mode === 'multi-select' || mode === 'single-select') &&\n css`\n padding-inline-start: calc(1.125rem + 2 * ${base.spacing});\n `}\n\n ${StyledGrid} {\n flex-grow: 1;\n }\n\n ${StyledCheckMarkIcon} {\n margin-inline-start: 0;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedForeground};\n background-color: ${checkedBackground};\n border: 0.0625rem solid ${components['radio-check'][':checked']['border-color']};\n `\n : css`\n color: transparent;\n border: 0.0625rem solid ${components['radio-check']['border-color']};\n `}\n border-radius: min(\n calc(${base['border-radius']} * ${components.checkbox['border-radius']}),\n 0.25rem\n );\n `}\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n background-color: ${components['form-control'][':disabled']['background-color']};\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nStyledMenuItem.defaultProps = defaultThemeProp;\n\nexport const StyledAncestors = styled.div`\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n & > ${StyledText} {\n ${ellipsisOverflow};\n }\n`;\n\nexport const StyledVisibilityHidden = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledSeparator = styled.li(({ theme }) => {\n return css`\n height: 0.0625rem;\n background-color: ${theme.base.palette['border-line']};\n margin: ${theme.base.spacing} 0;\n `;\n});\n\nStyledSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupHeader = styled.div(({ theme }) => {\n return css`\n min-height: ${theme.base['hit-area']['mouse-min']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n background-color: ${theme.base.palette['secondary-background']};\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n }\n `;\n});\n\nStyledMenuGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n cursor: pointer;\n width: 100%;\n background-color: ${base.palette['primary-background']};\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &:focus-within {\n box-shadow: ${base.shadow['focus-inset']};\n background-color: ${activeColor};\n }\n\n &:hover:not([aria-disabled='true']):not([data-current='true']) {\n background-color: ${hoverColor};\n }\n color: ${base.palette['foreground-color']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n border-radius: inherit;\n\n > ${StyledGrid} {\n grid-column-gap: ${base.spacing};\n }\n\n ${StyledIcon} {\n /* Fixes vertical align issue increasing box size beyond square */\n display: block;\n }\n `;\n});\n\nStyledMenuListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledEmptyState} {\n padding: ${theme.base.spacing};\n height: auto;\n }\n\n li:not(:first-child):not([role='presentation']) > ${StyledMenuGroupHeader} {\n margin-block-start: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n ${StyledMetaList} ${StyledMetaListItem} * {\n display: inline;\n vertical-align: baseline;\n margin: 0;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n\n return css`\n display: flex;\n flex-direction: column;\n\n &,\n ${StyledMenuListWrapper} {\n max-height: inherit;\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &[data-active-scope='true'] [data-current='true'] {\n box-shadow: ${theme.base.shadow['focus-inset']};\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n }\n\n ${StyledVisuallyHiddenText}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMenuFilter = styled.div(({ theme }) => {\n const borderRadius = `calc(${theme.components['search-input']['border-radius']} * ${theme.base['border-radius']})`;\n\n return css`\n position: relative;\n min-height: ${theme.components.input.height};\n height: ${theme.components.input.height};\n --icon-start-padding: calc(1.5 * ${theme.components.input.padding});\n /* stylelint-disable-next-line unit-allowed-list */\n --icon-size: max(1.125rem, 14px);\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n min-width: ${theme.base['hit-area']['finger-min']};\n }\n\n ${StyledFormControl} {\n height: 100%;\n border-radius: ${borderRadius};\n padding-inline-start: calc(\n var(--icon-start-padding) + var(--icon-size) + (0.5 * ${theme.components.input.padding})\n );\n padding-inline-end: calc(1.5 * ${theme.components.input.padding});\n\n &::-webkit-search-cancel-button {\n display: none;\n }\n\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &:focus:not([disabled]) {\n box-shadow: ${theme.base.shadow['focus-inset']};\n border-color: ${theme.components['form-control']['border-color']};\n\n :hover {\n border-color: ${theme.components['form-control'][':hover']['border-color']};\n }\n }\n }\n `;\n});\n\nStyledMenuFilter.defaultProps = defaultThemeProp;\n\nexport const StyledFilterIcon = styled(Icon)(({ theme }) => {\n const iconColor = tryCatch(() => transparentize(0.3, theme.base.palette['foreground-color']));\n\n return css`\n position: absolute;\n pointer-events: none;\n color: ${iconColor};\n inset-inline-start: var(--icon-start-padding);\n /* stylelint-disable unit-allowed-list */\n inset-block-start: calc(0.5 * (${theme.components.input.height} - max(1.125rem, 14px)));\n\n @media (pointer: coarse) {\n inset-block-start: calc(\n 0.5 * (${theme.base['hit-area']['finger-min']} - max(1.125rem, 14px))\n );\n }\n /* stylelint-enable unit-allowed-list */\n `;\n});\n\nStyledFilterIcon.defaultProps = defaultThemeProp;\n"]}
|
package/lib/theme/theme.d.ts
CHANGED
|
@@ -547,6 +547,10 @@ export declare const BaseThemeMachine: ThemeMachine<{
|
|
|
547
547
|
$type: string;
|
|
548
548
|
$value: string;
|
|
549
549
|
};
|
|
550
|
+
"separator-color": {
|
|
551
|
+
$type: string;
|
|
552
|
+
$value: string;
|
|
553
|
+
};
|
|
550
554
|
"create-button-background": {
|
|
551
555
|
$type: string;
|
|
552
556
|
$value: string;
|
|
@@ -1947,6 +1951,7 @@ export declare const WorkTheme: {
|
|
|
1947
1951
|
readonly "foreground-color": string;
|
|
1948
1952
|
readonly "background-color": string;
|
|
1949
1953
|
readonly "border-color": string;
|
|
1954
|
+
readonly "separator-color": string;
|
|
1950
1955
|
readonly "create-button-background": string;
|
|
1951
1956
|
readonly "nested-list-background": string;
|
|
1952
1957
|
readonly detached: boolean;
|
|
@@ -2616,6 +2621,7 @@ export declare const defaultThemeProp: Readonly<{
|
|
|
2616
2621
|
readonly "foreground-color": string;
|
|
2617
2622
|
readonly "background-color": string;
|
|
2618
2623
|
readonly "border-color": string;
|
|
2624
|
+
readonly "separator-color": string;
|
|
2619
2625
|
readonly "create-button-background": string;
|
|
2620
2626
|
readonly "nested-list-background": string;
|
|
2621
2627
|
readonly detached: boolean;
|
package/lib/theme/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.ts"],"names":[],"mappings":"AAAA,OAAO,YAAgC,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,sBAAsB,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC;AAEnE,OAAO,EAAE,sBAAsB,IAAI,eAAe,EAAE,CAAC;AAErD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.ts"],"names":[],"mappings":"AAAA,OAAO,YAAgC,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,sBAAsB,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC;AAEnE,OAAO,EAAE,sBAAsB,IAAI,eAAe,EAAE,CAAC;AAErD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
"$type": "inherited",
|
|
543
543
|
"$value": "base.palette.border-line"
|
|
544
544
|
},
|
|
545
|
+
"separator-color": {
|
|
546
|
+
"$type": "inherited",
|
|
547
|
+
"$value": "components.app-shell.nav.border-color"
|
|
548
|
+
},
|
|
545
549
|
"create-button-background": {
|
|
546
550
|
"$type": "literal",
|
|
547
551
|
"$value": "auto"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-core",
|
|
3
|
-
"version": "9.0.0-build.16.
|
|
3
|
+
"version": "9.0.0-build.16.2",
|
|
4
4
|
"description": "Cosmos is a visual design system and UI component collection. Its goal is to empower application developers in their pursuit to create engaging and rewarding user experiences.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|