@pega/cosmos-react-core 9.0.0-build.29.6 → 9.0.0-build.29.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +0 -8
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/Button/Button.d.ts +5 -0
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +8 -4
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/LiveLog/LiveLog.js +2 -2
- package/lib/components/LiveLog/LiveLog.js.map +1 -1
- package/lib/components/LiveLog/LiveLog.types.d.ts +1 -1
- package/lib/components/LiveLog/LiveLog.types.js.map +1 -1
- package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +1 -0
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/Toaster/Toaster.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.js +0 -1
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
- package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAkCtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,YAAY,aAAa,CAAC;AACvC,eAAO,MAAM,YAAY,SAAS,CAAC;AACnC,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,YAAY,SAAS,CAAC;AAInC,eAAO,MAAM,eAAe,G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6NAI7B,CAAC;AAIH,eAAO,MAAM,qBAAqB;;mBAwBhC,CAAC;AAIH,eAAO,MAAM,0BAA0B;;2JAkCrC,CAAC;AAIH,eAAO,MAAM,kBAAkB,6NAU9B,CAAC;AAIF,eAAO,MAAM,iBAAiB,6NAyG5B,CAAC;AAIH,eAAO,MAAM,eAAe,kYAE3B,CAAC"}
|
|
@@ -209,7 +209,6 @@ export const StyledSidebarNav = styled(StyledAppNav)(({ withAppHeader, portalAge
|
|
|
209
209
|
var(--safe-area-inset-inline-start, 0rem)
|
|
210
210
|
);
|
|
211
211
|
transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};
|
|
212
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
213
212
|
height: calc(100dvh - ${withAppHeader ? headerHeight : '0rem'});
|
|
214
213
|
padding-inline-start: var(--safe-area-inset-inline-start, 0);
|
|
215
214
|
padding-block-end: ${theme.base.spacing};
|
|
@@ -564,7 +563,6 @@ export const StyledUtils = styled.div(({ theme }) => {
|
|
|
564
563
|
StyledUtils.defaultProps = defaultThemeProp;
|
|
565
564
|
export const StyledMobileMoreMenu = styled(StyledAppNav) `
|
|
566
565
|
width: 100%;
|
|
567
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
568
566
|
height: calc(100dvh - ${mobileHeaderHeight});
|
|
569
567
|
`;
|
|
570
568
|
StyledMobileMoreMenu.defaultProps = defaultThemeProp;
|
|
@@ -581,13 +579,11 @@ export const StyledMobileNav = styled.header(({ theme }) => {
|
|
|
581
579
|
color: ${foreground};
|
|
582
580
|
padding: calc(0.25 * ${theme.base.spacing});
|
|
583
581
|
position: fixed;
|
|
584
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
585
582
|
inset-block-start: calc(100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}));
|
|
586
583
|
|
|
587
584
|
& + ${StyledDrawer}, & + ${StyledDrawer} ${StyledDrawer} {
|
|
588
585
|
inset-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});
|
|
589
586
|
width: 100%;
|
|
590
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
591
587
|
height: calc(
|
|
592
588
|
100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}) - var(
|
|
593
589
|
--appshell-top-offset,
|
|
@@ -701,7 +697,6 @@ export const StyledAppMain = styled.main(({ appHeader, previewActive, headerOffs
|
|
|
701
697
|
--appshell-horizontal-offset: 0rem;
|
|
702
698
|
position: relative;
|
|
703
699
|
margin-inline-start: 0;
|
|
704
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
705
700
|
min-height: calc(100dvh - ${totalChromeHeight});
|
|
706
701
|
background: ${appBackground};
|
|
707
702
|
|
|
@@ -710,7 +705,6 @@ export const StyledAppMain = styled.main(({ appHeader, previewActive, headerOffs
|
|
|
710
705
|
}
|
|
711
706
|
|
|
712
707
|
& > ${StyledProgressBackdrop} {
|
|
713
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
714
708
|
max-height: calc(100dvh - ${totalChromeHeight});
|
|
715
709
|
max-width: 100vw;
|
|
716
710
|
inset-block-start: ${totalChromeHeight};
|
|
@@ -745,7 +739,6 @@ export const StyledAppMain = styled.main(({ appHeader, previewActive, headerOffs
|
|
|
745
739
|
}
|
|
746
740
|
position: relative;
|
|
747
741
|
margin-inline-start: ${isMobileNav ? 0 : 'var(--appshell-horizontal-offset, 0)'};
|
|
748
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
749
742
|
min-height: calc(100dvh - ${heightOffset});
|
|
750
743
|
background: ${appBackground};
|
|
751
744
|
|
|
@@ -773,7 +766,6 @@ export const StyledAppMain = styled.main(({ appHeader, previewActive, headerOffs
|
|
|
773
766
|
`};
|
|
774
767
|
|
|
775
768
|
& > ${StyledProgressBackdrop} {
|
|
776
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
777
769
|
max-height: calc(100dvh - ${heightOffset});
|
|
778
770
|
max-width: calc(100vw - ${navOpen ? navOpenWidth : navWidth});
|
|
779
771
|
inset-block-start: ${heightOffset};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,mCAAmC,EACnC,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAA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C,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAEvC,OAAO,GAAG,CAAA;MACN,QAAQ;QACV,GAAG,CAAA;QACC,aAAa;mCACc,KAAK,CAAC,IAAI,CAAC,OAAO;;;QAG7C,aAAa,MAAM,iBAAiB;;;;QAIpC,iBAAiB;;;sCAGa,KAAK,IAAI,IAAI;oCACf,KAAK,IAAI,IAAI;yBACxB,KAAK,IAAI,IAAI;2BACX,MAAM;;;;;;;;;0BASP,QAAQ;;;;;;;;wBAQV,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,UAAU,QAAQ;kBACpD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;;;;;;;;uBAQ3B,MAAM;wBACL,MAAM;4BACF,QAAQ;;;4BAGR,UAAU;8BACR,MAAM;wBACZ,MAAM;;;4BAGF,UAAU;8BACR,MAAM;wBACZ,MAAM;;;;;;;;;uBASP,MAAM;wBACL,MAAM;4BACF,QAAQ;;;4BAGR,UAAU;8BACR,MAAM;wBACZ,MAAM;;;4BAGF,UAAU;8BACR,MAAM;wBACZ,MAAM;;;;;YAKlB,CAAC,OAAO;YACV,GAAG,CAAA;wCAC2B,eAAe;;;;WAI5C;;;KAGN;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAE1C,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { darken, getContrast, lighten, rem, remToPx, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAlert } from '../Badges/Alert';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledLink } from '../Link/Link';\nimport { Count } from '../Badges';\nimport { StyledAvatar } from '../Avatar';\nimport { StyledIcon } from '../Icon';\nimport { StyledImage } from '../Image/Image';\nimport { defaultThemeProp } from '../../theme';\nimport {\n calculateFontSize,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n readableColor\n} from '../../styles';\nimport type { FontSize } from '../../styles';\nimport { StyledMenuItem } from '../Menu/Menu.styles';\nimport { useDirection } from '../../hooks';\nimport { StyledBareButton } from '../Button/BareButton';\nimport Button from '../Button';\nimport { StyledTooltip } from '../Tooltip';\nimport { StyledProgressBackdrop } from '../Progress';\nimport Icon from '../Icon/Icon';\nimport { StyledText } from '../Text';\nimport Flex from '../Flex';\nimport { resizeDrawerMaxWidth } from '../../styles/constants';\nimport { tryCatch } from '../../utils';\nimport { StyledDrawer } from '../Drawer';\n\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors } from './style-utils';\nimport type { NavOrientation } from './AppShell.types';\n\nexport const navWidth = '4rem';\nexport const navOpenWidth = '18.75rem';\nexport const headerHeight = '3rem';\nexport const mobileHeaderHeight = '3.75rem';\nexport const topNavHeight = '3rem';\nconst iconWidth = '1.125rem';\nconst iconBoxSize = `calc((${navWidth} - ${iconWidth} - 2 * var(--nav-padding)) / 2)`;\n\nexport const menuButtonWidth = (theme: DefaultTheme) =>\n Number.parseInt(theme.base['hit-area']['finger-min'], 10) +\n Number.parseInt(\n tryCatch(\n () => remToPx(2),\n () => '32px'\n ),\n 10\n );\n\nexport const StyledAppInfo = styled.a(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const { hoverBg, foreground } = navContrastColors(theme);\n\n return css`\n padding: ${theme.base.spacing} calc(${navWidth} / 4);\n grid-template-columns: calc(${navWidth} / 2) auto;\n column-gap: calc(${navWidth} / 4);\n vertical-align: middle;\n\n &:hover,\n button&:hover {\n background-color: ${hoverBg};\n text-decoration: none;\n }\n\n &:focus:not([disabled]) {\n outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${StyledImage} {\n display: inline-block;\n width: calc(${navWidth} / 2);\n margin-inline-end: calc(${theme.base.spacing} * 2);\n vertical-align: middle;\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: middle;\n }\n\n span:last-of-type {\n font-size: ${fontSize.xs};\n color: ${foreground};\n }\n\n span:first-of-type {\n font-size: ${fontSize.s};\n color: ${foreground};\n margin-inline-end: calc(${theme.base.spacing});\n vertical-align: middle;\n }\n `;\n});\n\nStyledAppInfo.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled(Flex)(({ theme }) => {\n return css`\n overflow-x: hidden;\n overflow-y: auto;\n padding-block-start: calc(0.125 * ${theme.base.spacing});\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow: visible;\n flex-shrink: 0;\n }\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledUtilsSeparator = styled.div<{ navOpen?: boolean }>(({ theme, navOpen }) => {\n return css`\n position: sticky;\n inset-block-end: 0;\n margin-block-start: auto;\n margin-inline: var(--nav-padding);\n border-block-start: 0.0625rem solid ${theme.components['app-shell'].nav['separator-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n position: relative;\n margin-inline-end: calc(var(--nav-padding) / 2);\n\n ${navOpen &&\n css`\n margin-inline-end: var(--nav-padding);\n `}\n }\n `;\n});\n\nStyledUtilsSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledCountIcon = styled(Count)`\n position: absolute;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: 0.25lh;\n inset-inline-start: calc((${navWidth} / 2) - var(--nav-padding));\n`;\n\nStyledCountIcon.defaultProps = defaultThemeProp;\n\nexport const StyledSingleSelectIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n height: ${theme.base['hit-area']['mouse-min']};\n width: ${theme.base['hit-area']['mouse-min']};\n margin-inline-start: calc(2 * ${theme.base.spacing});\n `;\n});\n\nStyledSingleSelectIconBox.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItemExpandCollapse = styled(Icon)``;\n\nexport const StyledNavListItemGroupIndicator = styled(Icon)(({\n theme: {\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n }\n}) => {\n return css`\n position: absolute;\n width: 0.75rem;\n height: 0.75rem;\n margin-block-start: calc(${iconWidth} / 8);\n margin-inline-start: 2.5rem;\n ${detached &&\n css`\n margin-inline-start: calc(${navWidth} / 2 - ${iconWidth} / 6);\n `}\n `;\n});\n\nStyledNavListItemGroupIndicator.defaultProps = defaultThemeProp;\n\nexport const StyledUtilIconCount = styled.span`\n flex-shrink: 0;\n`;\n\nexport const StyledNavItemIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n\n > ${StyledIcon}, ${StyledUtilIconCount} > ${StyledIcon} {\n margin-inline: ${iconBoxSize};\n }\n\n ${StyledAvatar} {\n margin-inline: calc(\n (${navWidth} - ${theme.base['hit-area']['mouse-min']} - 2 * var(--nav-padding)) / 2\n );\n margin-block: calc(0.5 * ${theme.base.spacing});\n font-weight: ${theme.base['font-weight'].normal};\n }\n `;\n});\n\nStyledNavItemIconBox.defaultProps = defaultThemeProp;\n\nconst StyledAppNav = styled.nav(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n\n const foregroundColor = calculateForegroundColor(navBg, navFgColor);\n\n return css`\n --nav-padding: ${theme.components['app-shell'].nav.detached ? '0.75rem' : '0px'};\n background: ${navBg};\n color: ${foregroundColor};\n overflow: hidden;\n white-space: nowrap;\n border-color: ${theme.components['app-shell'].nav['border-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow-y: auto;\n overflow-x: clip;\n }\n padding-block-start: ${theme.base.spacing};\n\n /* App navigation can be focused with shortcut */\n &:focus-visible {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${theme.base['custom-scrollbar'] &&\n css`\n * {\n scrollbar-width: thin;\n }\n `}\n `;\n});\n\nStyledAppNav.defaultProps = defaultThemeProp;\n\nexport const StyledSidebarNav = styled(StyledAppNav)<{\n withAppHeader: boolean;\n portalAgent?: boolean;\n}>(({ withAppHeader, portalAgent, theme }) => {\n const { rtl } = useDirection();\n\n const { navState } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: calc(\n ${navState === 'open' || navState === 'opening' ? navOpenWidth : navWidth} +\n var(--safe-area-inset-inline-start, 0rem)\n );\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${withAppHeader ? headerHeight : '0rem'});\n padding-inline-start: var(--safe-area-inset-inline-start, 0);\n padding-block-end: ${theme.base.spacing};\n\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n ${portalAgent\n ? css`\n box-shadow: inset ${rtl ? '0.0625rem' : '-0.0625rem'} 0 0 0\n ${theme.components['app-shell'].nav['border-color']};\n `\n : css`\n border-inline-end: 0.0625rem solid ${transparentize(0.9, '#000')};\n border-color: ${theme.components['app-shell'].nav['border-color']};\n `}\n `;\n});\n\nStyledSidebarNav.defaultProps = defaultThemeProp;\n\nexport const StyledCaseClose = styled.button``;\n\nexport const StyledNavListItemVisualContainer = styled.div<{\n isCurrent: boolean;\n navOpen: boolean;\n}>(\n ({\n theme: {\n base: { spacing },\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n },\n isCurrent,\n navOpen\n }) => {\n return css`\n max-width: ${navWidth};\n\n &:has(${StyledAvatar}) {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n & > ${StyledText} {\n padding-inline: ${isCurrent\n ? `${spacing} calc(0.5 * ${spacing})`\n : `calc(0.5 * ${spacing})`};\n\n ${!navOpen &&\n detached &&\n css`\n padding-inline: 0;\n max-width: calc(${navWidth} * 0.625);\n `}\n }\n `;\n }\n);\n\nStyledNavListItemVisualContainer.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItem = styled.li<{\n nestedListCollapsed: boolean;\n singleSelect: boolean;\n}>(({ theme, nestedListCollapsed, singleSelect }) => {\n const {\n base: {\n 'font-weight': { 'semi-bold': semiBold }\n },\n components: {\n 'app-shell': {\n nav: {\n detached,\n 'item-border-radius': navItemBorderRadius,\n 'selected-background': navSelectedBackground\n }\n }\n }\n } = theme;\n\n const { navOpen } = useContext(AppShellContext);\n const { foreground, nestedList } = navContrastColors(theme);\n const { rtl } = useDirection();\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n return css`\n display: block;\n position: relative;\n padding-block: 0;\n padding-inline: var(--nav-padding);\n\n ${StyledIcon} {\n font-size: 1.25rem;\n }\n\n ${StyledCaseClose} {\n display: flex;\n position: absolute;\n opacity: 0;\n left: ${navOpen ? 'auto' : '100%'};\n top: 50%;\n bottom: 50%;\n margin: auto 0;\n color: ${foreground};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n `}\n }\n\n &:first-child ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n\n > :first-child {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding-block: ${theme.base.spacing};\n padding-inline: 0;\n white-space: nowrap;\n color: ${foreground};\n cursor: pointer;\n text-decoration: none;\n border-block: ${rem(1)} solid transparent;\n\n ${detached &&\n css`\n --item-height: 2.5rem;\n padding: 0;\n min-height: var(--item-height);\n height: auto;\n border: none;\n border-radius: ${navItemBorderRadius};\n transition: border-radius ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n `}\n ${detached &&\n css`\n &:not(:only-child):has(+ ul) {\n background: ${nestedListColor};\n margin-block-end: 0.0625rem;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n }\n `}\n span:not(${StyledCountIcon}) {\n overflow: hidden;\n text-overflow: ellipsis;\n color: inherit;\n white-space: nowrap;\n }\n\n &:hover,\n &:focus {\n color: ${foreground};\n background: ${transparentize(0.9, foreground)};\n }\n\n &:hover + ${StyledCaseClose}, &:focus + ${StyledCaseClose} {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n\n @media (forced-colors: none) {\n &:not([aria-current='page'], [aria-expanded='false']:has(+ ul [aria-current='page'])) {\n outline: none;\n }\n }\n }\n\n ${StyledNavListItemExpandCollapse} {\n position: absolute;\n left: ${navOpen ? 'auto' : '100%'};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n `}\n margin: 0;\n opacity: ${navOpen ? '1' : '0'};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${!nestedListCollapsed &&\n css`\n transform: rotateZ(${rtl ? '-90deg' : '90deg'});\n `}\n }\n\n ${singleSelect &&\n css`\n ${StyledNavItemIconBox} > ${StyledIcon} {\n margin-inline: calc(${theme.base.spacing} - var(--nav-padding));\n }\n `}\n ${StyledSingleSelectIconBox} + span {\n margin-inline-start: ${theme.base.spacing};\n }\n }\n\n [aria-expanded='true'] {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n [aria-current='page'],\n [aria-expanded='false']:has(+ ul [aria-current='page']) {\n position: relative;\n font-weight: ${semiBold};\n border-block: ${rem(1)} solid ${theme.components['app-shell'].nav['border-color']};\n background: ${transparentize(0.85, foreground)};\n ${detached &&\n css`\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n outline: 0.0625rem solid;\n\n &:hover,\n &:focus {\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n }\n `}\n\n ${!detached &&\n css`\n &::before {\n content: '';\n position: absolute;\n width: ${rem(4)};\n inset-inline-start: 0;\n top: 0;\n bottom: 0;\n background-color: ${foreground};\n }\n `}\n }\n\n ${StyledNavItemIconBox} {\n display: flex;\n justify-content: center;\n width: calc(${navWidth} - 2 * var(--nav-padding));\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul(({ theme }) => {\n return css`\n min-width: ${navWidth};\n\n & > ${StyledNavListItem} {\n &:not(:last-child),\n &:only-child {\n margin-block-end: calc(${theme.base.spacing} / 2);\n }\n }\n\n & > ${StyledNavListItem}:last-of-type {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `;\n});\nStyledNavList.defaultProps = defaultThemeProp;\n\nexport const StyledNavCasesList = styled.div(({ theme }) => {\n return css`\n ${StyledNavListItem} {\n > :first-child {\n padding: ${theme.base.spacing} 0;\n }\n }\n `;\n});\n\nStyledNavCasesList.defaultProps = defaultThemeProp;\n\nexport const StyledNestedNavList = styled(StyledNavList)(({ theme }) => {\n const {\n base: { 'border-radius': borderRadius, spacing },\n\n components: {\n 'app-shell': {\n nav: { detached, 'selected-background': navSelectedBackground }\n }\n }\n } = theme;\n\n const { nestedList, foreground } = navContrastColors(theme);\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n const resolvedSelectedBg =\n navSelectedBackground !== 'auto' ? navSelectedBackground : transparentize(0.9, foreground);\n\n return css`\n background: ${nestedListColor};\n border-radius: ${detached ? borderRadius : '0px'};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n\n ${StyledNavListItem} {\n &:first-child {\n border-block-start: ${spacing} solid transparent;\n }\n\n &:last-child {\n border-block-end: calc(0.5 * ${spacing}) solid transparent;\n }\n\n &:not(:last-child) {\n margin-block-end: calc(${spacing} / 2);\n }\n\n > :first-child {\n &:has(${StyledIcon}) {\n padding-inline-start: calc(((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2));\n }\n\n &:not(:has(${StyledIcon})) {\n padding-inline-start: calc(\n ((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2) + ${iconBoxSize}\n );\n }\n }\n\n ${detached &&\n css`\n [aria-current='page'] {\n background: ${resolvedSelectedBg};\n\n &:hover,\n &:focus {\n background: ${resolvedSelectedBg};\n }\n }\n `}\n }\n `;\n});\n\nStyledNestedNavList.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTypes = styled.div(({ theme }) => {\n const { foreground } = navContrastColors(theme);\n\n return css`\n button {\n ${StyledNavItemIconBox} {\n transition: transform ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n }\n\n &[aria-expanded='false'] ${StyledNavItemIconBox} {\n transform: none;\n }\n\n &[aria-expanded='true'] ${StyledNavItemIconBox} {\n transform: rotateZ(45deg);\n }\n }\n\n > ${StyledNavList} > ${StyledNavListItem} > ${StyledBareButton} {\n background: ${theme.components['app-shell'].nav['create-button-background']};\n\n &:hover,\n &:focus {\n background: ${transparentize(0.9, foreground)};\n }\n }\n `;\n});\n\nStyledCaseTypes.defaultProps = defaultThemeProp;\n\nexport const StyledUtils = styled.div(({ theme }) => {\n return css`\n ${StyledNavList} {\n padding-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledBareButton} > ${StyledIcon}:first-child, ${StyledBareButton} > ${StyledUtilIconCount} {\n margin: 0 calc((${navWidth} - ${iconWidth}) / 2);\n }\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenu = styled(StyledAppNav)`\n width: 100%;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(100dvh - ${mobileHeaderHeight});\n`;\n\nStyledMobileMoreMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMobileNav = styled.header(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'focus-shadow': focusShadow },\n text\n }\n } = theme;\n const mobileNavColor = theme.components['app-shell'].nav.background;\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n width: 100%;\n min-height: ${mobileHeaderHeight};\n z-index: calc(${theme.base['z-index'].drawer} + 1);\n background: ${mobileNavColor};\n color: ${foreground};\n padding: calc(0.25 * ${theme.base.spacing});\n position: fixed;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: calc(100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}));\n\n & + ${StyledDrawer}, & + ${StyledDrawer} ${StyledDrawer} {\n inset-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n width: 100%;\n /* stylelint-disable-next-line unit-allowed-list */\n height: calc(\n 100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}) - var(\n --appshell-top-offset,\n 0rem\n )\n );\n }\n\n > div:has(> ${StyledNavList}),\n > div:has(> ${StyledNavList}) > ${StyledNavList}, > ${StyledNavList} {\n display: contents;\n\n ${StyledNavListItem} {\n flex-grow: 1;\n width: ${rem(menuButtonWidth(theme))};\n padding: 0;\n margin: 0;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n\n ${StyledBareButton}, ${StyledLink} {\n flex-direction: column;\n justify-content: center;\n height: ${hitAreaFinger};\n padding: 0 calc(0.25 * ${theme.base.spacing});\n border-radius: ${borderRadius};\n border-block: none;\n\n &::before {\n width: 0;\n }\n\n span:not(${StyledCountIcon}) {\n width: inherit;\n text-align: center;\n }\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${focusShadow};\n }\n\n ${StyledNavListItemVisualContainer} {\n padding: 0;\n margin: 0;\n\n ${StyledNavItemIconBox} {\n display: flex;\n }\n }\n }\n }\n }\n `;\n});\n\nStyledMobileNav.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenuButton = styled(Button)(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'border-width': borderWidth },\n text\n }\n } = theme;\n const { navOpen } = useContext(AppShellContext);\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n flex-direction: column;\n flex: 1 0 ${rem(menuButtonWidth(theme))};\n width: ${rem(menuButtonWidth(theme))};\n height: ${hitAreaFinger};\n border-radius: ${borderRadius};\n border: none;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n padding-inline: calc(0.25 * ${theme.base.spacing});\n\n span {\n width: inherit;\n ${ellipsisOverflow}\n }\n\n ${navOpen &&\n css`\n &::before {\n content: '';\n position: absolute;\n inset: calc(${borderWidth} * -1);\n border-radius: inherit;\n background: ${transparentize(0.85, foreground)};\n }\n `}\n\n ${StyledAlert} {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: calc(50% + (0.625rem / 2));\n }\n `;\n});\n\nStyledMobileMoreMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledLoading = styled.div`\n font-size: 2rem;\n`;\n\nexport const StyledAppMain = styled.main<{\n appHeader: boolean;\n previewActive: boolean;\n headerOffset?: number;\n $navOrientation?: NavOrientation;\n}>(({ appHeader, previewActive, headerOffset = 0, $navOrientation = 'side-rail', theme }) => {\n const { navOpen, isMobileNav } = useContext(AppShellContext);\n const isTopBar = $navOrientation === 'top-bar';\n let heightOffset = appHeader ? headerHeight : '0rem';\n if (isMobileNav) {\n heightOffset = mobileHeaderHeight;\n }\n const appBackground = theme.base.palette['app-background'];\n\n if (isTopBar && !isMobileNav) {\n const totalChromeHeight = `calc(var(--app-header-height, 0px) + ${topNavHeight})`;\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n position: relative;\n margin-inline-start: 0;\n /* stylelint-disable-next-line unit-allowed-list */\n min-height: calc(100dvh - ${totalChromeHeight});\n background: ${appBackground};\n\n &:focus {\n outline: none;\n }\n\n & > ${StyledProgressBackdrop} {\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: calc(100dvh - ${totalChromeHeight});\n max-width: 100vw;\n inset-block-start: ${totalChromeHeight};\n inset-inline-start: 0;\n position: fixed;\n transition-property: opacity, max-height, inset-block-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${previewActive &&\n css`\n transition: none;\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n `}\n }\n `;\n }\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n\n @media (min-width: ${theme.base.breakpoints.sm}) {\n --appshell-horizontal-offset: calc(\n ${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem)\n );\n }\n position: relative;\n margin-inline-start: ${isMobileNav ? 0 : 'var(--appshell-horizontal-offset, 0)'};\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 ${isMobileNav\n ? css`\n position: fixed;\n /* stylelint-disable-next-line length-zero-no-unit */\n inset-block-start: var(--appshell-top-offset, 0rem);\n inset-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n height: auto;\n min-height: unset;\n overflow: auto;\n `\n : css`\n transition: margin-inline-start\n ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n margin-inline-start: calc(\n ${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem)\n );\n padding-inline-end: var(--safe-area-inset-inline-end, 0);\n `};\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 ${!isMobileNav &&\n css`\n inset-inline-start: calc(\n ${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem)\n );\n `}\n position: fixed;\n transition-property: opacity, max-height, max-width, inset-block-start, inset-inline-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition: margin-inline-end ${!isMobileNav ? ', 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 {\n background: navBg,\n 'foreground-color': navFgColor,\n 'expand-button': { background: expandBtnBgToken, 'foreground-color': expandBtnFgToken }\n } = theme.components['app-shell'].nav;\n\n const { backgroundColor } = calculateBackgroundAndContrastColor(navBg, navFgColor);\n\n let defaultBg = darken(0.2, backgroundColor);\n if (getContrast(backgroundColor, defaultBg) < 1.3) {\n defaultBg = lighten(0.2, backgroundColor);\n }\n\n const resolvedBg = expandBtnBgToken !== 'auto' ? expandBtnBgToken : defaultBg;\n const resolvedFg = expandBtnFgToken;\n\n return css`\n background: ${resolvedBg};\n color: ${resolvedFg};\n border: none;\n margin-block-start: ${theme.base.spacing};\n\n ${StyledIcon} {\n width: 1.25rem;\n height: 1.25rem;\n font-weight: bold;\n }\n\n &:enabled:focus,\n :not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledAppShellToggleButton.defaultProps = defaultThemeProp;\n\nexport const StyledNavAgentIcon = styled.div`\n width: 1.5rem;\n height: 1.5rem;\n display: inline-flex;\n flex-shrink: 0;\n\n & > svg {\n width: 100%;\n height: 100%;\n }\n`;\n\nStyledNavAgentIcon.defaultProps = defaultThemeProp;\n\nexport const StyledAIAssistant = styled.div(({ theme }) => {\n const { navOpen } = useContext(AppShellContext);\n const { rtl } = useDirection();\n\n const { detached } = theme.components['app-shell'].nav;\n const activeBg = theme.components.agent.background;\n const speed = theme.base.animation.speed;\n const ease = theme.base.animation.timing.ease;\n\n const radius = 'calc(var(--item-height) / 4)';\n\n const inwardSide = rtl ? '100%' : '0%';\n\n return css`\n ${detached &&\n css`\n ${StyledNavList} {\n margin-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledNavList} > ${StyledNavListItem}:last-of-type {\n padding-block-end: 0;\n }\n\n ${StyledNavListItem} {\n > :first-child {\n transition:\n border-start-end-radius ${speed} ${ease},\n border-end-end-radius ${speed} ${ease},\n background ${speed} ${ease};\n border-radius: ${radius};\n outline: none;\n }\n\n &:has([aria-current='page']) {\n z-index: 1;\n padding-inline-end: 0;\n\n > :first-child {\n background: ${activeBg};\n border-block-color: transparent;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n\n &:focus {\n outline: none;\n box-shadow:\n inset ${rtl ? '0.25rem' : '-0.25rem'} 0 0 0 ${activeBg},\n ${theme.base.shadow['focus-inset']};\n }\n\n &::before {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n bottom: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n }\n\n &::after {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n top: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n }\n }\n\n ${!navOpen &&\n css`\n > :first-child > span:not(${StyledCountIcon}) {\n max-width: 0;\n overflow: hidden;\n }\n `}\n }\n }\n `}\n `;\n});\n\nStyledAIAssistant.defaultProps = defaultThemeProp;\n\nexport const StyledShareIcon = styled(Icon)`\n transform: rotate(180deg);\n`;\n\nStyledShareIcon.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,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R,UAAU;8BACR,MAAM;wBACZ,MAAM;;;4BAGF,UAAU;8BACR,MAAM;wBACZ,MAAM;;;;;YAKlB,CAAC,OAAO;YACV,GAAG,CAAA;wCAC2B,eAAe;;;;WAI5C;;;KAGN;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAE1C,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { darken, getContrast, lighten, rem, remToPx, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAlert } from '../Badges/Alert';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledLink } from '../Link/Link';\nimport { Count } from '../Badges';\nimport { StyledAvatar } from '../Avatar';\nimport { StyledIcon } from '../Icon';\nimport { StyledImage } from '../Image/Image';\nimport { defaultThemeProp } from '../../theme';\nimport {\n calculateFontSize,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n readableColor\n} from '../../styles';\nimport type { FontSize } from '../../styles';\nimport { StyledMenuItem } from '../Menu/Menu.styles';\nimport { useDirection } from '../../hooks';\nimport { StyledBareButton } from '../Button/BareButton';\nimport Button from '../Button';\nimport { StyledTooltip } from '../Tooltip';\nimport { StyledProgressBackdrop } from '../Progress';\nimport Icon from '../Icon/Icon';\nimport { StyledText } from '../Text';\nimport Flex from '../Flex';\nimport { resizeDrawerMaxWidth } from '../../styles/constants';\nimport { tryCatch } from '../../utils';\nimport { StyledDrawer } from '../Drawer';\n\nimport AppShellContext from './AppShellContext';\nimport { navContrastColors } from './style-utils';\nimport type { NavOrientation } from './AppShell.types';\n\nexport const navWidth = '4rem';\nexport const navOpenWidth = '18.75rem';\nexport const headerHeight = '3rem';\nexport const mobileHeaderHeight = '3.75rem';\nexport const topNavHeight = '3rem';\nconst iconWidth = '1.125rem';\nconst iconBoxSize = `calc((${navWidth} - ${iconWidth} - 2 * var(--nav-padding)) / 2)`;\n\nexport const menuButtonWidth = (theme: DefaultTheme) =>\n Number.parseInt(theme.base['hit-area']['finger-min'], 10) +\n Number.parseInt(\n tryCatch(\n () => remToPx(2),\n () => '32px'\n ),\n 10\n );\n\nexport const StyledAppInfo = styled.a(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const { hoverBg, foreground } = navContrastColors(theme);\n\n return css`\n padding: ${theme.base.spacing} calc(${navWidth} / 4);\n grid-template-columns: calc(${navWidth} / 2) auto;\n column-gap: calc(${navWidth} / 4);\n vertical-align: middle;\n\n &:hover,\n button&:hover {\n background-color: ${hoverBg};\n text-decoration: none;\n }\n\n &:focus:not([disabled]) {\n outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${StyledImage} {\n display: inline-block;\n width: calc(${navWidth} / 2);\n margin-inline-end: calc(${theme.base.spacing} * 2);\n vertical-align: middle;\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: middle;\n }\n\n span:last-of-type {\n font-size: ${fontSize.xs};\n color: ${foreground};\n }\n\n span:first-of-type {\n font-size: ${fontSize.s};\n color: ${foreground};\n margin-inline-end: calc(${theme.base.spacing});\n vertical-align: middle;\n }\n `;\n});\n\nStyledAppInfo.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled(Flex)(({ theme }) => {\n return css`\n overflow-x: hidden;\n overflow-y: auto;\n padding-block-start: calc(0.125 * ${theme.base.spacing});\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow: visible;\n flex-shrink: 0;\n }\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledUtilsSeparator = styled.div<{ navOpen?: boolean }>(({ theme, navOpen }) => {\n return css`\n position: sticky;\n inset-block-end: 0;\n margin-block-start: auto;\n margin-inline: var(--nav-padding);\n border-block-start: 0.0625rem solid ${theme.components['app-shell'].nav['separator-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n position: relative;\n margin-inline-end: calc(var(--nav-padding) / 2);\n\n ${navOpen &&\n css`\n margin-inline-end: var(--nav-padding);\n `}\n }\n `;\n});\n\nStyledUtilsSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledCountIcon = styled(Count)`\n position: absolute;\n /* stylelint-disable-next-line unit-allowed-list */\n inset-block-start: 0.25lh;\n inset-inline-start: calc((${navWidth} / 2) - var(--nav-padding));\n`;\n\nStyledCountIcon.defaultProps = defaultThemeProp;\n\nexport const StyledSingleSelectIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n height: ${theme.base['hit-area']['mouse-min']};\n width: ${theme.base['hit-area']['mouse-min']};\n margin-inline-start: calc(2 * ${theme.base.spacing});\n `;\n});\n\nStyledSingleSelectIconBox.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItemExpandCollapse = styled(Icon)``;\n\nexport const StyledNavListItemGroupIndicator = styled(Icon)(({\n theme: {\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n }\n}) => {\n return css`\n position: absolute;\n width: 0.75rem;\n height: 0.75rem;\n margin-block-start: calc(${iconWidth} / 8);\n margin-inline-start: 2.5rem;\n ${detached &&\n css`\n margin-inline-start: calc(${navWidth} / 2 - ${iconWidth} / 6);\n `}\n `;\n});\n\nStyledNavListItemGroupIndicator.defaultProps = defaultThemeProp;\n\nexport const StyledUtilIconCount = styled.span`\n flex-shrink: 0;\n`;\n\nexport const StyledNavItemIconBox = styled.span(({ theme }) => {\n return css`\n flex-shrink: 0;\n\n > ${StyledIcon}, ${StyledUtilIconCount} > ${StyledIcon} {\n margin-inline: ${iconBoxSize};\n }\n\n ${StyledAvatar} {\n margin-inline: calc(\n (${navWidth} - ${theme.base['hit-area']['mouse-min']} - 2 * var(--nav-padding)) / 2\n );\n margin-block: calc(0.5 * ${theme.base.spacing});\n font-weight: ${theme.base['font-weight'].normal};\n }\n `;\n});\n\nStyledNavItemIconBox.defaultProps = defaultThemeProp;\n\nconst StyledAppNav = styled.nav(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n\n const foregroundColor = calculateForegroundColor(navBg, navFgColor);\n\n return css`\n --nav-padding: ${theme.components['app-shell'].nav.detached ? '0.75rem' : '0px'};\n background: ${navBg};\n color: ${foregroundColor};\n overflow: hidden;\n white-space: nowrap;\n border-color: ${theme.components['app-shell'].nav['border-color']};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n overflow-y: auto;\n overflow-x: clip;\n }\n padding-block-start: ${theme.base.spacing};\n\n /* App navigation can be focused with shortcut */\n &:focus-visible {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${theme.base['custom-scrollbar'] &&\n css`\n * {\n scrollbar-width: thin;\n }\n `}\n `;\n});\n\nStyledAppNav.defaultProps = defaultThemeProp;\n\nexport const StyledSidebarNav = styled(StyledAppNav)<{\n withAppHeader: boolean;\n portalAgent?: boolean;\n}>(({ withAppHeader, portalAgent, theme }) => {\n const { rtl } = useDirection();\n\n const { navState } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: calc(\n ${navState === 'open' || navState === 'opening' ? navOpenWidth : navWidth} +\n var(--safe-area-inset-inline-start, 0rem)\n );\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n height: calc(100dvh - ${withAppHeader ? headerHeight : '0rem'});\n padding-inline-start: var(--safe-area-inset-inline-start, 0);\n padding-block-end: ${theme.base.spacing};\n\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n ${portalAgent\n ? css`\n box-shadow: inset ${rtl ? '0.0625rem' : '-0.0625rem'} 0 0 0\n ${theme.components['app-shell'].nav['border-color']};\n `\n : css`\n border-inline-end: 0.0625rem solid ${transparentize(0.9, '#000')};\n border-color: ${theme.components['app-shell'].nav['border-color']};\n `}\n `;\n});\n\nStyledSidebarNav.defaultProps = defaultThemeProp;\n\nexport const StyledCaseClose = styled.button``;\n\nexport const StyledNavListItemVisualContainer = styled.div<{\n isCurrent: boolean;\n navOpen: boolean;\n}>(\n ({\n theme: {\n base: { spacing },\n components: {\n 'app-shell': {\n nav: { detached }\n }\n }\n },\n isCurrent,\n navOpen\n }) => {\n return css`\n max-width: ${navWidth};\n\n &:has(${StyledAvatar}) {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n & > ${StyledText} {\n padding-inline: ${isCurrent\n ? `${spacing} calc(0.5 * ${spacing})`\n : `calc(0.5 * ${spacing})`};\n\n ${!navOpen &&\n detached &&\n css`\n padding-inline: 0;\n max-width: calc(${navWidth} * 0.625);\n `}\n }\n `;\n }\n);\n\nStyledNavListItemVisualContainer.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItem = styled.li<{\n nestedListCollapsed: boolean;\n singleSelect: boolean;\n}>(({ theme, nestedListCollapsed, singleSelect }) => {\n const {\n base: {\n 'font-weight': { 'semi-bold': semiBold }\n },\n components: {\n 'app-shell': {\n nav: {\n detached,\n 'item-border-radius': navItemBorderRadius,\n 'selected-background': navSelectedBackground\n }\n }\n }\n } = theme;\n\n const { navOpen } = useContext(AppShellContext);\n const { foreground, nestedList } = navContrastColors(theme);\n const { rtl } = useDirection();\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n return css`\n display: block;\n position: relative;\n padding-block: 0;\n padding-inline: var(--nav-padding);\n\n ${StyledIcon} {\n font-size: 1.25rem;\n }\n\n ${StyledCaseClose} {\n display: flex;\n position: absolute;\n opacity: 0;\n left: ${navOpen ? 'auto' : '100%'};\n top: 50%;\n bottom: 50%;\n margin: auto 0;\n color: ${foreground};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n `}\n }\n\n &:first-child ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n\n > :first-child {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding-block: ${theme.base.spacing};\n padding-inline: 0;\n white-space: nowrap;\n color: ${foreground};\n cursor: pointer;\n text-decoration: none;\n border-block: ${rem(1)} solid transparent;\n\n ${detached &&\n css`\n --item-height: 2.5rem;\n padding: 0;\n min-height: var(--item-height);\n height: auto;\n border: none;\n border-radius: ${navItemBorderRadius};\n transition: border-radius ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n `}\n ${detached &&\n css`\n &:not(:only-child):has(+ ul) {\n background: ${nestedListColor};\n margin-block-end: 0.0625rem;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n }\n `}\n span:not(${StyledCountIcon}) {\n overflow: hidden;\n text-overflow: ellipsis;\n color: inherit;\n white-space: nowrap;\n }\n\n &:hover,\n &:focus {\n color: ${foreground};\n background: ${transparentize(0.9, foreground)};\n }\n\n &:hover + ${StyledCaseClose}, &:focus + ${StyledCaseClose} {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n\n @media (forced-colors: none) {\n &:not([aria-current='page'], [aria-expanded='false']:has(+ ul [aria-current='page'])) {\n outline: none;\n }\n }\n }\n\n ${StyledNavListItemExpandCollapse} {\n position: absolute;\n left: ${navOpen ? 'auto' : '100%'};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n `}\n margin: 0;\n opacity: ${navOpen ? '1' : '0'};\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${!nestedListCollapsed &&\n css`\n transform: rotateZ(${rtl ? '-90deg' : '90deg'});\n `}\n }\n\n ${singleSelect &&\n css`\n ${StyledNavItemIconBox} > ${StyledIcon} {\n margin-inline: calc(${theme.base.spacing} - var(--nav-padding));\n }\n `}\n ${StyledSingleSelectIconBox} + span {\n margin-inline-start: ${theme.base.spacing};\n }\n }\n\n [aria-expanded='true'] {\n ${StyledNavListItemGroupIndicator} {\n display: none;\n }\n }\n\n [aria-current='page'],\n [aria-expanded='false']:has(+ ul [aria-current='page']) {\n position: relative;\n font-weight: ${semiBold};\n border-block: ${rem(1)} solid ${theme.components['app-shell'].nav['border-color']};\n background: ${transparentize(0.85, foreground)};\n ${detached &&\n css`\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n outline: 0.0625rem solid;\n\n &:hover,\n &:focus {\n background: ${navSelectedBackground !== 'auto'\n ? navSelectedBackground\n : transparentize(0.9, foreground)};\n }\n `}\n\n ${!detached &&\n css`\n &::before {\n content: '';\n position: absolute;\n width: ${rem(4)};\n inset-inline-start: 0;\n top: 0;\n bottom: 0;\n background-color: ${foreground};\n }\n `}\n }\n\n ${StyledNavItemIconBox} {\n display: flex;\n justify-content: center;\n width: calc(${navWidth} - 2 * var(--nav-padding));\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul(({ theme }) => {\n return css`\n min-width: ${navWidth};\n\n & > ${StyledNavListItem} {\n &:not(:last-child),\n &:only-child {\n margin-block-end: calc(${theme.base.spacing} / 2);\n }\n }\n\n & > ${StyledNavListItem}:last-of-type {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `;\n});\nStyledNavList.defaultProps = defaultThemeProp;\n\nexport const StyledNavCasesList = styled.div(({ theme }) => {\n return css`\n ${StyledNavListItem} {\n > :first-child {\n padding: ${theme.base.spacing} 0;\n }\n }\n `;\n});\n\nStyledNavCasesList.defaultProps = defaultThemeProp;\n\nexport const StyledNestedNavList = styled(StyledNavList)(({ theme }) => {\n const {\n base: { 'border-radius': borderRadius, spacing },\n\n components: {\n 'app-shell': {\n nav: { detached, 'selected-background': navSelectedBackground }\n }\n }\n } = theme;\n\n const { nestedList, foreground } = navContrastColors(theme);\n\n const nestedListColor =\n theme.components['app-shell'].nav['nested-list-background'] === 'auto'\n ? nestedList\n : theme.components['app-shell'].nav['nested-list-background'];\n\n const resolvedSelectedBg =\n navSelectedBackground !== 'auto' ? navSelectedBackground : transparentize(0.9, foreground);\n\n return css`\n background: ${nestedListColor};\n border-radius: ${detached ? borderRadius : '0px'};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n\n ${StyledNavListItem} {\n &:first-child {\n border-block-start: ${spacing} solid transparent;\n }\n\n &:last-child {\n border-block-end: calc(0.5 * ${spacing}) solid transparent;\n }\n\n &:not(:last-child) {\n margin-block-end: calc(${spacing} / 2);\n }\n\n > :first-child {\n &:has(${StyledIcon}) {\n padding-inline-start: calc(((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2));\n }\n\n &:not(:has(${StyledIcon})) {\n padding-inline-start: calc(\n ((${navWidth} - (3 * var(--nav-padding)) - ${iconWidth}) / 2) + ${iconBoxSize}\n );\n }\n }\n\n ${detached &&\n css`\n [aria-current='page'] {\n background: ${resolvedSelectedBg};\n\n &:hover,\n &:focus {\n background: ${resolvedSelectedBg};\n }\n }\n `}\n }\n `;\n});\n\nStyledNestedNavList.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTypes = styled.div(({ theme }) => {\n const { foreground } = navContrastColors(theme);\n\n return css`\n button {\n ${StyledNavItemIconBox} {\n transition: transform ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n }\n\n &[aria-expanded='false'] ${StyledNavItemIconBox} {\n transform: none;\n }\n\n &[aria-expanded='true'] ${StyledNavItemIconBox} {\n transform: rotateZ(45deg);\n }\n }\n\n > ${StyledNavList} > ${StyledNavListItem} > ${StyledBareButton} {\n background: ${theme.components['app-shell'].nav['create-button-background']};\n\n &:hover,\n &:focus {\n background: ${transparentize(0.9, foreground)};\n }\n }\n `;\n});\n\nStyledCaseTypes.defaultProps = defaultThemeProp;\n\nexport const StyledUtils = styled.div(({ theme }) => {\n return css`\n ${StyledNavList} {\n padding-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledBareButton} > ${StyledIcon}:first-child, ${StyledBareButton} > ${StyledUtilIconCount} {\n margin: 0 calc((${navWidth} - ${iconWidth}) / 2);\n }\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenu = styled(StyledAppNav)`\n width: 100%;\n height: calc(100dvh - ${mobileHeaderHeight});\n`;\n\nStyledMobileMoreMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMobileNav = styled.header(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'focus-shadow': focusShadow },\n text\n }\n } = theme;\n const mobileNavColor = theme.components['app-shell'].nav.background;\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n width: 100%;\n min-height: ${mobileHeaderHeight};\n z-index: calc(${theme.base['z-index'].drawer} + 1);\n background: ${mobileNavColor};\n color: ${foreground};\n padding: calc(0.25 * ${theme.base.spacing});\n position: fixed;\n inset-block-start: calc(100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}));\n\n & + ${StyledDrawer}, & + ${StyledDrawer} ${StyledDrawer} {\n inset-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n width: 100%;\n height: calc(\n 100dvh - var(--appshell-bottom-offset, ${mobileHeaderHeight}) - var(\n --appshell-top-offset,\n 0rem\n )\n );\n }\n\n > div:has(> ${StyledNavList}),\n > div:has(> ${StyledNavList}) > ${StyledNavList}, > ${StyledNavList} {\n display: contents;\n\n ${StyledNavListItem} {\n flex-grow: 1;\n width: ${rem(menuButtonWidth(theme))};\n padding: 0;\n margin: 0;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n\n ${StyledBareButton}, ${StyledLink} {\n flex-direction: column;\n justify-content: center;\n height: ${hitAreaFinger};\n padding: 0 calc(0.25 * ${theme.base.spacing});\n border-radius: ${borderRadius};\n border-block: none;\n\n &::before {\n width: 0;\n }\n\n span:not(${StyledCountIcon}) {\n width: inherit;\n text-align: center;\n }\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${focusShadow};\n }\n\n ${StyledNavListItemVisualContainer} {\n padding: 0;\n margin: 0;\n\n ${StyledNavItemIconBox} {\n display: flex;\n }\n }\n }\n }\n }\n `;\n});\n\nStyledMobileNav.defaultProps = defaultThemeProp;\n\nexport const StyledMobileMoreMenuButton = styled(Button)(({ theme }) => {\n const {\n base: {\n 'hit-area': { 'finger-min': hitAreaFinger },\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: {\n button: { 'border-width': borderWidth },\n text\n }\n } = theme;\n const { navOpen } = useContext(AppShellContext);\n const { foreground } = navContrastColors(theme);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n flex-direction: column;\n flex: 1 0 ${rem(menuButtonWidth(theme))};\n width: ${rem(menuButtonWidth(theme))};\n height: ${hitAreaFinger};\n border-radius: ${borderRadius};\n border: none;\n font-size: ${fontSizes[text.secondary['font-size'] as FontSize]};\n padding-inline: calc(0.25 * ${theme.base.spacing});\n\n span {\n width: inherit;\n ${ellipsisOverflow}\n }\n\n ${navOpen &&\n css`\n &::before {\n content: '';\n position: absolute;\n inset: calc(${borderWidth} * -1);\n border-radius: inherit;\n background: ${transparentize(0.85, foreground)};\n }\n `}\n\n ${StyledAlert} {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: calc(50% + (0.625rem / 2));\n }\n `;\n});\n\nStyledMobileMoreMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledLoading = styled.div`\n font-size: 2rem;\n`;\n\nexport const StyledAppMain = styled.main<{\n appHeader: boolean;\n previewActive: boolean;\n headerOffset?: number;\n $navOrientation?: NavOrientation;\n}>(({ appHeader, previewActive, headerOffset = 0, $navOrientation = 'side-rail', theme }) => {\n const { navOpen, isMobileNav } = useContext(AppShellContext);\n const isTopBar = $navOrientation === 'top-bar';\n let heightOffset = appHeader ? headerHeight : '0rem';\n if (isMobileNav) {\n heightOffset = mobileHeaderHeight;\n }\n const appBackground = theme.base.palette['app-background'];\n\n if (isTopBar && !isMobileNav) {\n const totalChromeHeight = `calc(var(--app-header-height, 0px) + ${topNavHeight})`;\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n position: relative;\n margin-inline-start: 0;\n min-height: calc(100dvh - ${totalChromeHeight});\n background: ${appBackground};\n\n &:focus {\n outline: none;\n }\n\n & > ${StyledProgressBackdrop} {\n max-height: calc(100dvh - ${totalChromeHeight});\n max-width: 100vw;\n inset-block-start: ${totalChromeHeight};\n inset-inline-start: 0;\n position: fixed;\n transition-property: opacity, max-height, inset-block-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${previewActive &&\n css`\n transition: none;\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n `}\n }\n `;\n }\n\n return css`\n --appshell-offset: ${headerOffset}px;\n /* stylelint-disable-next-line length-zero-no-unit */\n --appshell-horizontal-offset: 0rem;\n\n @media (min-width: ${theme.base.breakpoints.sm}) {\n --appshell-horizontal-offset: calc(\n ${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem)\n );\n }\n position: relative;\n margin-inline-start: ${isMobileNav ? 0 : 'var(--appshell-horizontal-offset, 0)'};\n min-height: calc(100dvh - ${heightOffset});\n background: ${appBackground};\n\n &:focus {\n outline: none;\n }\n\n ${isMobileNav\n ? css`\n position: fixed;\n /* stylelint-disable-next-line length-zero-no-unit */\n inset-block-start: var(--appshell-top-offset, 0rem);\n inset-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});\n height: auto;\n min-height: unset;\n overflow: auto;\n `\n : css`\n transition: margin-inline-start\n ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n margin-inline-start: calc(\n ${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem)\n );\n padding-inline-end: var(--safe-area-inset-inline-end, 0);\n `};\n\n & > ${StyledProgressBackdrop} {\n max-height: calc(100dvh - ${heightOffset});\n max-width: calc(100vw - ${navOpen ? navOpenWidth : navWidth});\n inset-block-start: ${heightOffset};\n ${!isMobileNav &&\n css`\n inset-inline-start: calc(\n ${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem)\n );\n `}\n position: fixed;\n transition-property: opacity, max-height, max-width, inset-block-start, inset-inline-start;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n @media (min-width: ${theme.base.breakpoints.md}) {\n transition: margin-inline-end ${!isMobileNav ? ', 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 {\n background: navBg,\n 'foreground-color': navFgColor,\n 'expand-button': { background: expandBtnBgToken, 'foreground-color': expandBtnFgToken }\n } = theme.components['app-shell'].nav;\n\n const { backgroundColor } = calculateBackgroundAndContrastColor(navBg, navFgColor);\n\n let defaultBg = darken(0.2, backgroundColor);\n if (getContrast(backgroundColor, defaultBg) < 1.3) {\n defaultBg = lighten(0.2, backgroundColor);\n }\n\n const resolvedBg = expandBtnBgToken !== 'auto' ? expandBtnBgToken : defaultBg;\n const resolvedFg = expandBtnFgToken;\n\n return css`\n background: ${resolvedBg};\n color: ${resolvedFg};\n border: none;\n margin-block-start: ${theme.base.spacing};\n\n ${StyledIcon} {\n width: 1.25rem;\n height: 1.25rem;\n font-weight: bold;\n }\n\n &:enabled:focus,\n :not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledAppShellToggleButton.defaultProps = defaultThemeProp;\n\nexport const StyledNavAgentIcon = styled.div`\n width: 1.5rem;\n height: 1.5rem;\n display: inline-flex;\n flex-shrink: 0;\n\n & > svg {\n width: 100%;\n height: 100%;\n }\n`;\n\nStyledNavAgentIcon.defaultProps = defaultThemeProp;\n\nexport const StyledAIAssistant = styled.div(({ theme }) => {\n const { navOpen } = useContext(AppShellContext);\n const { rtl } = useDirection();\n\n const { detached } = theme.components['app-shell'].nav;\n const activeBg = theme.components.agent.background;\n const speed = theme.base.animation.speed;\n const ease = theme.base.animation.timing.ease;\n\n const radius = 'calc(var(--item-height) / 4)';\n\n const inwardSide = rtl ? '100%' : '0%';\n\n return css`\n ${detached &&\n css`\n ${StyledNavList} {\n margin-block-start: calc(${theme.base.spacing} / 2);\n }\n\n ${StyledNavList} > ${StyledNavListItem}:last-of-type {\n padding-block-end: 0;\n }\n\n ${StyledNavListItem} {\n > :first-child {\n transition:\n border-start-end-radius ${speed} ${ease},\n border-end-end-radius ${speed} ${ease},\n background ${speed} ${ease};\n border-radius: ${radius};\n outline: none;\n }\n\n &:has([aria-current='page']) {\n z-index: 1;\n padding-inline-end: 0;\n\n > :first-child {\n background: ${activeBg};\n border-block-color: transparent;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n\n &:focus {\n outline: none;\n box-shadow:\n inset ${rtl ? '0.25rem' : '-0.25rem'} 0 0 0 ${activeBg},\n ${theme.base.shadow['focus-inset']};\n }\n\n &::before {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n bottom: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 0%,\n transparent ${radius},\n black ${radius}\n );\n }\n\n &::after {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n top: 100%;\n width: ${radius};\n height: ${radius};\n background: ${activeBg};\n pointer-events: none;\n -webkit-mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n mask-image: radial-gradient(\n circle at ${inwardSide} 100%,\n transparent ${radius},\n black ${radius}\n );\n }\n }\n\n ${!navOpen &&\n css`\n > :first-child > span:not(${StyledCountIcon}) {\n max-width: 0;\n overflow: hidden;\n }\n `}\n }\n }\n `}\n `;\n});\n\nStyledAIAssistant.defaultProps = defaultThemeProp;\n\nexport const StyledShareIcon = styled(Icon)`\n transform: rotate(180deg);\n`;\n\nStyledShareIcon.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -34,6 +34,11 @@ export interface ButtonProps extends BaseProps, AsProp {
|
|
|
34
34
|
label?: string;
|
|
35
35
|
/** The aria label text will be inserted as the aria-label on the Button. */
|
|
36
36
|
'aria-label'?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Applies visual disabled styles without disabling the button element itself.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
'aria-disabled'?: boolean | 'true' | 'false';
|
|
37
42
|
/**
|
|
38
43
|
* Optionally renders an indeterminate progress indicator in a button.
|
|
39
44
|
* @default false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EAET,GAAG,EAGJ,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EACV,SAAS,EAET,+BAA+B,EAC/B,iBAAiB,EACjB,MAAM,EACP,MAAM,aAAa,CAAC;AAkBrB,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,MAAM;IACpD,sCAAsC;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/D;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;CAClD;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAC9C,WAAW,EACX,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,G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BAAgB,iUA+D3B,CAAC;AAIH,QAAA,MAAM,MAAM,EAAE,+BAA+B,CAAC,WAAW,CA2GvD,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -41,8 +41,12 @@ const baseStyles = (theme) => {
|
|
|
41
41
|
pointer-events: none;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
&[aria-disabled='true'] {
|
|
45
|
+
opacity: ${disabledOpacity};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:not([disabled], [aria-disabled='true']):focus,
|
|
49
|
+
&:enabled:not([aria-disabled='true']):focus {
|
|
46
50
|
box-shadow: ${focusShadow};
|
|
47
51
|
}
|
|
48
52
|
`;
|
|
@@ -309,7 +313,7 @@ export const StyledButtonLink = styled.a.withConfig(omitProps('loading'))(({ the
|
|
|
309
313
|
`;
|
|
310
314
|
});
|
|
311
315
|
StyledButtonLink.defaultProps = defaultThemeProp;
|
|
312
|
-
const Button = forwardRef(function Button({ variant = 'secondary', type = 'button', disabled = false, icon = false, compact = false, href, as, forwardedAs, label, 'aria-label': ariaLabel, loading = false, children, className, ...restProps }, ref) {
|
|
316
|
+
const Button = forwardRef(function Button({ variant = 'secondary', type = 'button', disabled = false, icon = false, compact = false, href, as, forwardedAs, label, 'aria-label': ariaLabel, 'aria-disabled': ariaDisabled, loading = false, children, className, ...restProps }, ref) {
|
|
313
317
|
const [buttonEl, setButtonEl] = useElement();
|
|
314
318
|
const mouseDownEvent = useRef();
|
|
315
319
|
const mouseDownPosition = useRef();
|
|
@@ -343,7 +347,7 @@ const Button = forwardRef(function Button({ variant = 'secondary', type = 'butto
|
|
|
343
347
|
mouseDownTimestamp.current = undefined;
|
|
344
348
|
};
|
|
345
349
|
}, []);
|
|
346
|
-
return (_jsxs(_Fragment, { children: [_jsxs(StyledComp, { ...restProps, ref: buttonRef, as: as || (href ? 'a' : 'button'), forwardedAs: forwardedAs || (href ? 'a' : 'button'), className: createClassName('button', className, { variant, icon, compact, loading }), variant: variant, icon: icon, compact: compact, type: href ? undefined : type, href: href, disabled: disabled && !href, loading: showProgress, "aria-label": ariaLabel || label, onMouseDown: (e) => {
|
|
350
|
+
return (_jsxs(_Fragment, { children: [_jsxs(StyledComp, { ...restProps, ref: buttonRef, as: as || (href ? 'a' : 'button'), forwardedAs: forwardedAs || (href ? 'a' : 'button'), className: createClassName('button', className, { variant, icon, compact, loading }), variant: variant, icon: icon, compact: compact, type: href ? undefined : type, href: href, disabled: disabled && !href, "aria-disabled": ariaDisabled, loading: showProgress, "aria-label": ariaLabel || label, onMouseDown: (e) => {
|
|
347
351
|
restProps.onMouseDown?.(e);
|
|
348
352
|
e.persist();
|
|
349
353
|
mouseDownEvent.current = e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAQtD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,uBAAuB,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AASxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,cAAc,EACd,YAAY,EACZ,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,QAAQ,EAAE,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EA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EAAE,CAAC,CAAyD,EAAE,EAAE;oBACvE,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,gBAAgB,CAAC;oBACvF,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;oBACnC,iBAAiB,CAAC,OAAO,GAAG,SAAS,CAAC;oBACtC,kBAAkB,CAAC,OAAO,GAAG,SAAS,CAAC;oBAEvC,IAAI,WAAW,IAAI,SAAS,CAAC,OAAO,KAAK,QAAQ,CAAC,aAAa,EAAE,CAAC;wBAChE,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;oBAC7B,CAAC;oBAED,OAAQ,SAAS,CAAC,SAA2C,EAAE,CAAC,CAAC,CAAC,CAAC;gBACrE,CAAC,aAEA,YAAY,IAAI,KAAC,QAAQ,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,GAAG,EAC9D,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAC9B,EAEZ,QAAQ,IAAI,KAAK,IAAI,CACpB,KAAC,OAAO,IAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,EAAC,cAAc,EAAE,KAAK,YAC/E,KAAK,GACE,CACX,IACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["import { useRef, useEffect, forwardRef } from 'react';\nimport type {\n ReactNode,\n PropsWithoutRef,\n Ref,\n MouseEventHandler,\n MouseEvent as ReactMouseEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { meetsContrastGuidelines, mix } from 'polished';\n\nimport type {\n BaseProps,\n ForwardProps,\n ForwardRefForwardPropsComponent,\n PropsWithDefaults,\n AsProp\n} from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { isPositionWithinRect, tryCatch, createClassName } from '../../utils';\nimport {\n getActiveColors,\n getHoverColors,\n isSolidColor,\n omitProps,\n readableColor,\n readableHue\n} from '../../styles';\nimport { useElement, useConsolidatedRef } from '../../hooks';\nimport Tooltip from '../Tooltip';\nimport Progress, { StyledProgressRing } from '../Progress';\nimport { StyledBackdrop } from '../Backdrop';\nimport { StyledIcon } from '../Icon';\nimport { StyledPopover } from '../Popover';\n\nexport interface ButtonProps extends BaseProps, AsProp {\n /** Text or content for the Button. */\n children: ReactNode;\n /**\n * Determines if the Button will be disabled.\n * @default false\n */\n disabled?: boolean;\n /** A location to navigate to. Passing an href will render an anchor styled as a Button. */\n href?: string;\n /**\n * Controls the styling of the Button.\n * @default 'secondary'\n */\n variant?: 'primary' | 'secondary' | 'simple' | 'link' | 'text';\n /**\n * Controls the behavior of a Button within a Form.\n * @default 'button'\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Set the Icon prop to `true` if you're using just an Icon in your Button. Make sure to pass an Icon as children if `true`.\n * @default false\n */\n icon?: boolean;\n /**\n * Used for a smaller sized button.\n * @default false\n */\n compact?: boolean;\n /** The label text will be used inside a Tooltip. */\n label?: string;\n /** The aria label text will be inserted as the aria-label on the Button. */\n 'aria-label'?: string;\n /**\n * Optionally renders an indeterminate progress indicator in a button.\n * @default false\n */\n loading?: boolean;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;\n}\n\ntype ButtonPropsWithDefaults = PropsWithDefaults<\n ButtonProps,\n 'variant' | 'type' | 'disabled' | 'icon' | 'loading'\n>;\n\nconst baseStyles = (theme: DefaultTheme) => {\n const {\n base: {\n spacing,\n animation: {\n speed,\n timing: { ease }\n },\n 'disabled-opacity': disabledOpacity\n },\n components: {\n button: { 'focus-shadow': focusShadow }\n }\n } = theme;\n\n return css`\n text-decoration: none;\n transition-property: background-color, color, border-color, box-shadow, translate;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${ease};\n cursor: pointer;\n\n @media (forced-colors: none) {\n outline: none;\n }\n\n & + & {\n margin-inline-start: ${spacing};\n }\n\n /* Not able to combine with selector above. Stylis bug? */\n\n & + ${StyledPopover} + & {\n margin-inline-start: ${spacing};\n }\n\n &:disabled,\n &[disabled] {\n opacity: ${disabledOpacity};\n cursor: not-allowed;\n pointer-events: none;\n }\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${focusShadow};\n }\n `;\n};\n\n/* If the background color is not provided, the color will be used for the hover and active styles */\nconst getFilledButtonStyles = (color: string, backgroundColor?: string) => ({\n contrastColor: backgroundColor ? color : tryCatch(() => readableColor(color)),\n hoverColors: getHoverColors(backgroundColor || color),\n activeColors: getActiveColors(backgroundColor || color)\n});\n\nconst getOutlinedButtonStyles = (color: string, backgroundColor: string) => {\n // If the background color is not solid, use the readable color for the text\n const fallbackBackground = isSolidColor(backgroundColor) ? backgroundColor : readableColor(color);\n const backgroundUsable = tryCatch(() => meetsContrastGuidelines(color, fallbackBackground).AA);\n const usableColor = backgroundUsable ? color : readableHue(color, backgroundColor);\n const hoverBackgroundColor = tryCatch(() => mix(0.9, backgroundColor, color));\n const activeBackgroundColor = tryCatch(() => mix(0.8, backgroundColor, usableColor));\n\n return {\n textColor: backgroundUsable ? color : readableColor(color),\n hoverBg: hoverBackgroundColor,\n hoverFg: readableHue(color, hoverBackgroundColor ?? 'transparent'),\n activeBg: tryCatch(() => mix(0.8, backgroundColor, usableColor)),\n activeFg: readableHue(usableColor, activeBackgroundColor ?? 'transparent')\n };\n};\n\nexport const StyledButton = styled.button.withConfig(omitProps('loading'))<ButtonPropsWithDefaults>(\n ({ variant, icon, loading, compact, theme }) => {\n const {\n base: {\n spacing,\n 'border-radius': baseBorderRadius,\n palette: { 'primary-background': backgroundColor },\n 'hit-area': {\n 'mouse-min': hitAreaMouse,\n 'finger-min': hitAreaFinger,\n 'compact-min': hitAreaCompact\n },\n animation: { speed }\n },\n components: {\n button: {\n color,\n 'foreground-color': foregroundColor,\n 'secondary-color': secondaryColor,\n 'secondary-fill-style': fillStyle,\n padding,\n 'border-radius': borderRadius,\n 'border-width': borderWidth,\n touch: { padding: touchPadding }\n }\n }\n } = theme;\n\n // Base\n const base = baseStyles(theme);\n\n // Non-text base\n const nonTextual = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: ${hitAreaMouse};\n min-width: ${hitAreaMouse};\n border: ${borderWidth} solid transparent;\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n -webkit-user-select: none;\n user-select: none;\n white-space: nowrap;\n\n ${!icon &&\n css`\n padding: ${padding};\n `}\n\n ${icon &&\n css`\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n\n > svg {\n display: block;\n }\n `} ${compact &&\n css`\n min-height: ${hitAreaCompact};\n min-width: ${hitAreaCompact};\n `} @media (\n pointer: coarse) {\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n\n ${!compact &&\n css`\n min-height: ${hitAreaFinger};\n min-width: ${hitAreaFinger};\n `}\n\n ${!icon &&\n css`\n padding: ${touchPadding};\n `}\n }\n\n &:active {\n translate: 0 0.0625rem;\n }\n `;\n\n // Primary and Secondary-filled\n /* For primary button, use the foreground color as the text color. If foreground is 'auto', then calculate based on background\n For secondary button, always use the secondary color */\n const { contrastColor, hoverColors, activeColors } =\n variant !== 'primary' || foregroundColor === 'auto'\n ? getFilledButtonStyles(variant === 'primary' ? color : secondaryColor)\n : getFilledButtonStyles(foregroundColor, color);\n\n const solidButtonStyles = css`\n --button-background-color: ${variant === 'primary' ? color : secondaryColor};\n color: ${contrastColor};\n background-color: ${variant === 'primary' ? color : secondaryColor};\n\n @media (hover: hover) {\n &:hover {\n background-color: ${hoverColors.background};\n text-decoration: none;\n }\n }\n\n &:active {\n background-color: ${activeColors.background};\n color: ${activeColors.foreground};\n text-decoration: none;\n }\n `;\n\n // Secondary-outline\n const secondaryOutlineButtonStyles = getOutlinedButtonStyles(secondaryColor, backgroundColor);\n const secondary = css`\n --button-background-color: ${backgroundColor};\n color: ${secondaryOutlineButtonStyles.textColor};\n background-color: ${backgroundColor};\n border-color: ${secondaryColor};\n\n @media (hover: hover) {\n &:hover {\n background-color: ${secondaryOutlineButtonStyles.hoverBg};\n text-decoration: none;\n }\n }\n\n &:active {\n color: ${secondaryOutlineButtonStyles.activeFg};\n background-color: ${secondaryOutlineButtonStyles.activeBg};\n border-color: ${secondaryOutlineButtonStyles.activeFg};\n text-decoration: none;\n }\n `;\n\n // Simple\n const simpleButtonStyles = getOutlinedButtonStyles(\n fillStyle === 'outline' ? secondaryColor : color,\n backgroundColor\n );\n const simple = css`\n --button-background-color: ${icon ? 'transparent' : backgroundColor};\n color: ${icon ? 'currentColor' : simpleButtonStyles.textColor};\n background-color: ${icon ? 'transparent' : backgroundColor};\n\n @media (hover: hover) {\n &:hover {\n ${icon &&\n css`\n &::before {\n content: '';\n position: absolute;\n top: calc(${borderWidth} * -1);\n bottom: calc(${borderWidth} * -1);\n left: calc(${borderWidth} * -1);\n right: calc(${borderWidth} * -1);\n border-radius: inherit;\n background-color: currentColor;\n opacity: 0.1;\n }\n `}\n\n ${!icon &&\n css`\n background-color: ${simpleButtonStyles.hoverBg};\n color: ${simpleButtonStyles.hoverFg};\n border-color: ${simpleButtonStyles.hoverFg};\n text-decoration: none;\n `}\n }\n\n &:active {\n ${icon &&\n css`\n &::before {\n content: '';\n position: absolute;\n top: calc(${borderWidth} * -1);\n bottom: calc(${borderWidth} * -1);\n left: calc(${borderWidth} * -1);\n right: calc(${borderWidth} * -1);\n border-radius: inherit;\n background-color: currentColor;\n opacity: 0.2;\n }\n `}\n\n ${!icon &&\n css`\n background-color: ${simpleButtonStyles.activeBg};\n color: ${simpleButtonStyles.activeFg};\n border-color: ${simpleButtonStyles.activeFg};\n text-decoration: none;\n `}\n }\n }\n `;\n\n return css`\n ${base}\n ${nonTextual}\n ${(variant === 'primary' || (variant === 'secondary' && fillStyle === 'fill')) &&\n solidButtonStyles}\n ${variant === 'secondary' && fillStyle === 'outline' && secondary}\n ${variant === 'simple' && simple}\n ${variant === 'primary' &&\n css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `}\n\n ${loading &&\n css`\n ${StyledBackdrop} {\n background-color: var(--button-background-color);\n border-radius: inherit;\n }\n\n ${StyledProgressRing} {\n width: 1em;\n height: 1em;\n\n ${!icon &&\n css`\n margin-inline-end: calc(${spacing} / 2);\n `}\n circle:nth-child(2) {\n animation-duration: calc(${speed} * 2);\n }\n }\n `}\n `;\n }\n);\n\nStyledButton.defaultProps = defaultThemeProp;\n\nexport const StyledButtonLink = styled.a.withConfig(omitProps('loading'))<\n Pick<ButtonPropsWithDefaults, 'variant' | 'href'> &\n // Needed for omitProps\n Pick<ButtonProps, 'loading'>\n>(({ theme, variant, href }) => {\n const {\n base: {\n palette: { 'foreground-color': textVariantColor }\n },\n components: {\n button: { color: primaryColor, 'secondary-fill-style': fillStyle },\n link: { color: linkColor }\n }\n } = theme;\n\n let linkVariantColor = linkColor;\n if (!href && fillStyle === 'solid') {\n linkVariantColor = primaryColor;\n }\n const { background: activeLinkColor } = getActiveColors(linkVariantColor);\n const { background: activeTextColor } = getActiveColors(textVariantColor);\n\n const base = baseStyles(theme);\n\n const textual = css`\n background-color: transparent;\n display: inline;\n text-align: start;\n border: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n > ${StyledIcon} {\n vertical-align: bottom;\n }\n `;\n\n const link = css`\n color: ${linkVariantColor};\n\n &:active {\n color: ${activeLinkColor};\n }\n `;\n\n const text = css`\n color: ${textVariantColor};\n\n &:active {\n color: ${activeTextColor};\n }\n `;\n\n return css`\n ${base}\n ${textual}\n ${variant === 'link' && link}\n ${variant === 'text' && text}\n `;\n});\n\nStyledButtonLink.defaultProps = defaultThemeProp;\n\nconst Button: ForwardRefForwardPropsComponent<ButtonProps> = forwardRef(function Button(\n {\n variant = 'secondary',\n type = 'button',\n disabled = false,\n icon = false,\n compact = false,\n href,\n as,\n forwardedAs,\n label,\n 'aria-label': ariaLabel,\n loading = false,\n children,\n className,\n ...restProps\n }: PropsWithoutRef<ButtonProps> & ForwardProps,\n ref: ButtonProps['ref']\n) {\n const [buttonEl, setButtonEl] = useElement<HTMLButtonElement | HTMLAnchorElement>();\n const mouseDownEvent = useRef<ReactMouseEvent>();\n const mouseDownPosition = useRef<DOMRect>();\n const mouseDownTimestamp = useRef<number>();\n const buttonRef = useConsolidatedRef(ref, setButtonEl);\n const isTextual = ['link', 'text'].includes(variant);\n const showProgress = loading && !isTextual;\n const StyledComp: React.ElementType = isTextual ? StyledButtonLink : StyledButton;\n\n const handleClickWithElementShift = (e: MouseEvent) => {\n if (\n buttonRef.current &&\n mouseDownPosition.current &&\n mouseDownTimestamp.current &&\n isPositionWithinRect({ x: e.clientX, y: e.clientY }, mouseDownPosition.current) &&\n Date.now() - mouseDownTimestamp.current < 500\n ) {\n // Only click if the button is still the topmost element at its own position.\n // If something has rendered over the button between mousedown and mouseup,\n // elementFromPoint will return that — not the button — and we should not trigger a click.\n const { x, y, width, height } = buttonRef.current.getBoundingClientRect();\n const elementAtPoint = document.elementFromPoint(x + width / 2, y + height / 2);\n if (buttonRef.current.contains(elementAtPoint) || elementAtPoint === buttonRef.current) {\n buttonRef.current.click();\n }\n }\n };\n\n useEffect(() => {\n document.addEventListener('mouseup', handleClickWithElementShift);\n\n return () => {\n document.removeEventListener('mouseup', handleClickWithElementShift);\n mouseDownEvent.current = undefined;\n mouseDownPosition.current = undefined;\n mouseDownTimestamp.current = undefined;\n };\n }, []);\n\n return (\n <>\n <StyledComp\n {...restProps}\n ref={buttonRef}\n as={as || (href ? 'a' : 'button')}\n forwardedAs={forwardedAs || (href ? 'a' : 'button')}\n className={createClassName('button', className, { variant, icon, compact, loading })}\n variant={variant}\n icon={icon}\n compact={compact}\n type={href ? undefined : type}\n href={href}\n disabled={disabled && !href}\n loading={showProgress}\n aria-label={ariaLabel || label}\n onMouseDown={(e: ReactMouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n (restProps.onMouseDown as MouseEventHandler | undefined)?.(e);\n e.persist();\n mouseDownEvent.current = e;\n mouseDownPosition.current = e.currentTarget.getBoundingClientRect();\n mouseDownTimestamp.current = Date.now();\n }}\n onMouseUp={(e: ReactMouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n const shouldFocus = mouseDownEvent.current && !mouseDownEvent.current.defaultPrevented;\n mouseDownEvent.current = undefined;\n mouseDownPosition.current = undefined;\n mouseDownTimestamp.current = undefined;\n\n if (shouldFocus && buttonRef.current !== document.activeElement) {\n buttonRef.current?.focus();\n }\n\n return (restProps.onMouseUp as MouseEventHandler | undefined)?.(e);\n }}\n >\n {showProgress && <Progress variant='ring' placement='inline' />}\n {!icon || !showProgress ? children : null}\n </StyledComp>\n\n {buttonEl && label && (\n <Tooltip target={buttonEl} showDelay='none' hideDelay='none' describeTarget={false}>\n {label}\n </Tooltip>\n )}\n </>\n );\n});\n\nexport default Button;\n"]}
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAQtD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,uBAAuB,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AASxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,cAAc,EACd,YAAY,EACZ,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,QAAQ,EAAE,EAAE,kBAAkB,EA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B,CAAC,OAAO,GAAG,CAAC,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;oBACpE,kBAAkB,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBAC1C,CAAC,EACD,SAAS,EAAE,CAAC,CAAyD,EAAE,EAAE;oBACvE,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,gBAAgB,CAAC;oBACvF,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;oBACnC,iBAAiB,CAAC,OAAO,GAAG,SAAS,CAAC;oBACtC,kBAAkB,CAAC,OAAO,GAAG,SAAS,CAAC;oBAEvC,IAAI,WAAW,IAAI,SAAS,CAAC,OAAO,KAAK,QAAQ,CAAC,aAAa,EAAE,CAAC;wBAChE,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;oBAC7B,CAAC;oBAED,OAAQ,SAAS,CAAC,SAA2C,EAAE,CAAC,CAAC,CAAC,CAAC;gBACrE,CAAC,aAEA,YAAY,IAAI,KAAC,QAAQ,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,GAAG,EAC9D,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAC9B,EAEZ,QAAQ,IAAI,KAAK,IAAI,CACpB,KAAC,OAAO,IAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,EAAC,cAAc,EAAE,KAAK,YAC/E,KAAK,GACE,CACX,IACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["import { useRef, useEffect, forwardRef } from 'react';\nimport type {\n ReactNode,\n PropsWithoutRef,\n Ref,\n MouseEventHandler,\n MouseEvent as ReactMouseEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { meetsContrastGuidelines, mix } from 'polished';\n\nimport type {\n BaseProps,\n ForwardProps,\n ForwardRefForwardPropsComponent,\n PropsWithDefaults,\n AsProp\n} from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { isPositionWithinRect, tryCatch, createClassName } from '../../utils';\nimport {\n getActiveColors,\n getHoverColors,\n isSolidColor,\n omitProps,\n readableColor,\n readableHue\n} from '../../styles';\nimport { useElement, useConsolidatedRef } from '../../hooks';\nimport Tooltip from '../Tooltip';\nimport Progress, { StyledProgressRing } from '../Progress';\nimport { StyledBackdrop } from '../Backdrop';\nimport { StyledIcon } from '../Icon';\nimport { StyledPopover } from '../Popover';\n\nexport interface ButtonProps extends BaseProps, AsProp {\n /** Text or content for the Button. */\n children: ReactNode;\n /**\n * Determines if the Button will be disabled.\n * @default false\n */\n disabled?: boolean;\n /** A location to navigate to. Passing an href will render an anchor styled as a Button. */\n href?: string;\n /**\n * Controls the styling of the Button.\n * @default 'secondary'\n */\n variant?: 'primary' | 'secondary' | 'simple' | 'link' | 'text';\n /**\n * Controls the behavior of a Button within a Form.\n * @default 'button'\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Set the Icon prop to `true` if you're using just an Icon in your Button. Make sure to pass an Icon as children if `true`.\n * @default false\n */\n icon?: boolean;\n /**\n * Used for a smaller sized button.\n * @default false\n */\n compact?: boolean;\n /** The label text will be used inside a Tooltip. */\n label?: string;\n /** The aria label text will be inserted as the aria-label on the Button. */\n 'aria-label'?: string;\n /**\n * Applies visual disabled styles without disabling the button element itself.\n * @default false\n */\n 'aria-disabled'?: boolean | 'true' | 'false';\n /**\n * Optionally renders an indeterminate progress indicator in a button.\n * @default false\n */\n loading?: boolean;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;\n}\n\ntype ButtonPropsWithDefaults = PropsWithDefaults<\n ButtonProps,\n 'variant' | 'type' | 'disabled' | 'icon' | 'loading'\n>;\n\nconst baseStyles = (theme: DefaultTheme) => {\n const {\n base: {\n spacing,\n animation: {\n speed,\n timing: { ease }\n },\n 'disabled-opacity': disabledOpacity\n },\n components: {\n button: { 'focus-shadow': focusShadow }\n }\n } = theme;\n\n return css`\n text-decoration: none;\n transition-property: background-color, color, border-color, box-shadow, translate;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${ease};\n cursor: pointer;\n\n @media (forced-colors: none) {\n outline: none;\n }\n\n & + & {\n margin-inline-start: ${spacing};\n }\n\n /* Not able to combine with selector above. Stylis bug? */\n\n & + ${StyledPopover} + & {\n margin-inline-start: ${spacing};\n }\n\n &:disabled,\n &[disabled] {\n opacity: ${disabledOpacity};\n cursor: not-allowed;\n pointer-events: none;\n }\n\n &[aria-disabled='true'] {\n opacity: ${disabledOpacity};\n }\n\n &:not([disabled], [aria-disabled='true']):focus,\n &:enabled:not([aria-disabled='true']):focus {\n box-shadow: ${focusShadow};\n }\n `;\n};\n\n/* If the background color is not provided, the color will be used for the hover and active styles */\nconst getFilledButtonStyles = (color: string, backgroundColor?: string) => ({\n contrastColor: backgroundColor ? color : tryCatch(() => readableColor(color)),\n hoverColors: getHoverColors(backgroundColor || color),\n activeColors: getActiveColors(backgroundColor || color)\n});\n\nconst getOutlinedButtonStyles = (color: string, backgroundColor: string) => {\n // If the background color is not solid, use the readable color for the text\n const fallbackBackground = isSolidColor(backgroundColor) ? backgroundColor : readableColor(color);\n const backgroundUsable = tryCatch(() => meetsContrastGuidelines(color, fallbackBackground).AA);\n const usableColor = backgroundUsable ? color : readableHue(color, backgroundColor);\n const hoverBackgroundColor = tryCatch(() => mix(0.9, backgroundColor, color));\n const activeBackgroundColor = tryCatch(() => mix(0.8, backgroundColor, usableColor));\n\n return {\n textColor: backgroundUsable ? color : readableColor(color),\n hoverBg: hoverBackgroundColor,\n hoverFg: readableHue(color, hoverBackgroundColor ?? 'transparent'),\n activeBg: tryCatch(() => mix(0.8, backgroundColor, usableColor)),\n activeFg: readableHue(usableColor, activeBackgroundColor ?? 'transparent')\n };\n};\n\nexport const StyledButton = styled.button.withConfig(omitProps('loading'))<ButtonPropsWithDefaults>(\n ({ variant, icon, loading, compact, theme }) => {\n const {\n base: {\n spacing,\n 'border-radius': baseBorderRadius,\n palette: { 'primary-background': backgroundColor },\n 'hit-area': {\n 'mouse-min': hitAreaMouse,\n 'finger-min': hitAreaFinger,\n 'compact-min': hitAreaCompact\n },\n animation: { speed }\n },\n components: {\n button: {\n color,\n 'foreground-color': foregroundColor,\n 'secondary-color': secondaryColor,\n 'secondary-fill-style': fillStyle,\n padding,\n 'border-radius': borderRadius,\n 'border-width': borderWidth,\n touch: { padding: touchPadding }\n }\n }\n } = theme;\n\n // Base\n const base = baseStyles(theme);\n\n // Non-text base\n const nonTextual = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: ${hitAreaMouse};\n min-width: ${hitAreaMouse};\n border: ${borderWidth} solid transparent;\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n -webkit-user-select: none;\n user-select: none;\n white-space: nowrap;\n\n ${!icon &&\n css`\n padding: ${padding};\n `}\n\n ${icon &&\n css`\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n\n > svg {\n display: block;\n }\n `} ${compact &&\n css`\n min-height: ${hitAreaCompact};\n min-width: ${hitAreaCompact};\n `} @media (\n pointer: coarse) {\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n\n ${!compact &&\n css`\n min-height: ${hitAreaFinger};\n min-width: ${hitAreaFinger};\n `}\n\n ${!icon &&\n css`\n padding: ${touchPadding};\n `}\n }\n\n &:active {\n translate: 0 0.0625rem;\n }\n `;\n\n // Primary and Secondary-filled\n /* For primary button, use the foreground color as the text color. If foreground is 'auto', then calculate based on background\n For secondary button, always use the secondary color */\n const { contrastColor, hoverColors, activeColors } =\n variant !== 'primary' || foregroundColor === 'auto'\n ? getFilledButtonStyles(variant === 'primary' ? color : secondaryColor)\n : getFilledButtonStyles(foregroundColor, color);\n\n const solidButtonStyles = css`\n --button-background-color: ${variant === 'primary' ? color : secondaryColor};\n color: ${contrastColor};\n background-color: ${variant === 'primary' ? color : secondaryColor};\n\n @media (hover: hover) {\n &:hover {\n background-color: ${hoverColors.background};\n text-decoration: none;\n }\n }\n\n &:active {\n background-color: ${activeColors.background};\n color: ${activeColors.foreground};\n text-decoration: none;\n }\n `;\n\n // Secondary-outline\n const secondaryOutlineButtonStyles = getOutlinedButtonStyles(secondaryColor, backgroundColor);\n const secondary = css`\n --button-background-color: ${backgroundColor};\n color: ${secondaryOutlineButtonStyles.textColor};\n background-color: ${backgroundColor};\n border-color: ${secondaryColor};\n\n @media (hover: hover) {\n &:hover {\n background-color: ${secondaryOutlineButtonStyles.hoverBg};\n text-decoration: none;\n }\n }\n\n &:active {\n color: ${secondaryOutlineButtonStyles.activeFg};\n background-color: ${secondaryOutlineButtonStyles.activeBg};\n border-color: ${secondaryOutlineButtonStyles.activeFg};\n text-decoration: none;\n }\n `;\n\n // Simple\n const simpleButtonStyles = getOutlinedButtonStyles(\n fillStyle === 'outline' ? secondaryColor : color,\n backgroundColor\n );\n const simple = css`\n --button-background-color: ${icon ? 'transparent' : backgroundColor};\n color: ${icon ? 'currentColor' : simpleButtonStyles.textColor};\n background-color: ${icon ? 'transparent' : backgroundColor};\n\n @media (hover: hover) {\n &:hover {\n ${icon &&\n css`\n &::before {\n content: '';\n position: absolute;\n top: calc(${borderWidth} * -1);\n bottom: calc(${borderWidth} * -1);\n left: calc(${borderWidth} * -1);\n right: calc(${borderWidth} * -1);\n border-radius: inherit;\n background-color: currentColor;\n opacity: 0.1;\n }\n `}\n\n ${!icon &&\n css`\n background-color: ${simpleButtonStyles.hoverBg};\n color: ${simpleButtonStyles.hoverFg};\n border-color: ${simpleButtonStyles.hoverFg};\n text-decoration: none;\n `}\n }\n\n &:active {\n ${icon &&\n css`\n &::before {\n content: '';\n position: absolute;\n top: calc(${borderWidth} * -1);\n bottom: calc(${borderWidth} * -1);\n left: calc(${borderWidth} * -1);\n right: calc(${borderWidth} * -1);\n border-radius: inherit;\n background-color: currentColor;\n opacity: 0.2;\n }\n `}\n\n ${!icon &&\n css`\n background-color: ${simpleButtonStyles.activeBg};\n color: ${simpleButtonStyles.activeFg};\n border-color: ${simpleButtonStyles.activeFg};\n text-decoration: none;\n `}\n }\n }\n `;\n\n return css`\n ${base}\n ${nonTextual}\n ${(variant === 'primary' || (variant === 'secondary' && fillStyle === 'fill')) &&\n solidButtonStyles}\n ${variant === 'secondary' && fillStyle === 'outline' && secondary}\n ${variant === 'simple' && simple}\n ${variant === 'primary' &&\n css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `}\n\n ${loading &&\n css`\n ${StyledBackdrop} {\n background-color: var(--button-background-color);\n border-radius: inherit;\n }\n\n ${StyledProgressRing} {\n width: 1em;\n height: 1em;\n\n ${!icon &&\n css`\n margin-inline-end: calc(${spacing} / 2);\n `}\n circle:nth-child(2) {\n animation-duration: calc(${speed} * 2);\n }\n }\n `}\n `;\n }\n);\n\nStyledButton.defaultProps = defaultThemeProp;\n\nexport const StyledButtonLink = styled.a.withConfig(omitProps('loading'))<\n Pick<ButtonPropsWithDefaults, 'variant' | 'href'> &\n // Needed for omitProps\n Pick<ButtonProps, 'loading'>\n>(({ theme, variant, href }) => {\n const {\n base: {\n palette: { 'foreground-color': textVariantColor }\n },\n components: {\n button: { color: primaryColor, 'secondary-fill-style': fillStyle },\n link: { color: linkColor }\n }\n } = theme;\n\n let linkVariantColor = linkColor;\n if (!href && fillStyle === 'solid') {\n linkVariantColor = primaryColor;\n }\n const { background: activeLinkColor } = getActiveColors(linkVariantColor);\n const { background: activeTextColor } = getActiveColors(textVariantColor);\n\n const base = baseStyles(theme);\n\n const textual = css`\n background-color: transparent;\n display: inline;\n text-align: start;\n border: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n > ${StyledIcon} {\n vertical-align: bottom;\n }\n `;\n\n const link = css`\n color: ${linkVariantColor};\n\n &:active {\n color: ${activeLinkColor};\n }\n `;\n\n const text = css`\n color: ${textVariantColor};\n\n &:active {\n color: ${activeTextColor};\n }\n `;\n\n return css`\n ${base}\n ${textual}\n ${variant === 'link' && link}\n ${variant === 'text' && text}\n `;\n});\n\nStyledButtonLink.defaultProps = defaultThemeProp;\n\nconst Button: ForwardRefForwardPropsComponent<ButtonProps> = forwardRef(function Button(\n {\n variant = 'secondary',\n type = 'button',\n disabled = false,\n icon = false,\n compact = false,\n href,\n as,\n forwardedAs,\n label,\n 'aria-label': ariaLabel,\n 'aria-disabled': ariaDisabled,\n loading = false,\n children,\n className,\n ...restProps\n }: PropsWithoutRef<ButtonProps> & ForwardProps,\n ref: ButtonProps['ref']\n) {\n const [buttonEl, setButtonEl] = useElement<HTMLButtonElement | HTMLAnchorElement>();\n const mouseDownEvent = useRef<ReactMouseEvent>();\n const mouseDownPosition = useRef<DOMRect>();\n const mouseDownTimestamp = useRef<number>();\n const buttonRef = useConsolidatedRef(ref, setButtonEl);\n const isTextual = ['link', 'text'].includes(variant);\n const showProgress = loading && !isTextual;\n const StyledComp: React.ElementType = isTextual ? StyledButtonLink : StyledButton;\n\n const handleClickWithElementShift = (e: MouseEvent) => {\n if (\n buttonRef.current &&\n mouseDownPosition.current &&\n mouseDownTimestamp.current &&\n isPositionWithinRect({ x: e.clientX, y: e.clientY }, mouseDownPosition.current) &&\n Date.now() - mouseDownTimestamp.current < 500\n ) {\n // Only click if the button is still the topmost element at its own position.\n // If something has rendered over the button between mousedown and mouseup,\n // elementFromPoint will return that — not the button — and we should not trigger a click.\n const { x, y, width, height } = buttonRef.current.getBoundingClientRect();\n const elementAtPoint = document.elementFromPoint(x + width / 2, y + height / 2);\n if (buttonRef.current.contains(elementAtPoint) || elementAtPoint === buttonRef.current) {\n buttonRef.current.click();\n }\n }\n };\n\n useEffect(() => {\n document.addEventListener('mouseup', handleClickWithElementShift);\n\n return () => {\n document.removeEventListener('mouseup', handleClickWithElementShift);\n mouseDownEvent.current = undefined;\n mouseDownPosition.current = undefined;\n mouseDownTimestamp.current = undefined;\n };\n }, []);\n\n return (\n <>\n <StyledComp\n {...restProps}\n ref={buttonRef}\n as={as || (href ? 'a' : 'button')}\n forwardedAs={forwardedAs || (href ? 'a' : 'button')}\n className={createClassName('button', className, { variant, icon, compact, loading })}\n variant={variant}\n icon={icon}\n compact={compact}\n type={href ? undefined : type}\n href={href}\n disabled={disabled && !href}\n aria-disabled={ariaDisabled}\n loading={showProgress}\n aria-label={ariaLabel || label}\n onMouseDown={(e: ReactMouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n (restProps.onMouseDown as MouseEventHandler | undefined)?.(e);\n e.persist();\n mouseDownEvent.current = e;\n mouseDownPosition.current = e.currentTarget.getBoundingClientRect();\n mouseDownTimestamp.current = Date.now();\n }}\n onMouseUp={(e: ReactMouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n const shouldFocus = mouseDownEvent.current && !mouseDownEvent.current.defaultPrevented;\n mouseDownEvent.current = undefined;\n mouseDownPosition.current = undefined;\n mouseDownTimestamp.current = undefined;\n\n if (shouldFocus && buttonRef.current !== document.activeElement) {\n buttonRef.current?.focus();\n }\n\n return (restProps.onMouseUp as MouseEventHandler | undefined)?.(e);\n }}\n >\n {showProgress && <Progress variant='ring' placement='inline' />}\n {!icon || !showProgress ? children : null}\n </StyledComp>\n\n {buttonEl && label && (\n <Tooltip target={buttonEl} showDelay='none' hideDelay='none' describeTarget={false}>\n {label}\n </Tooltip>\n )}\n </>\n );\n});\n\nexport default Button;\n"]}
|
|
@@ -30,7 +30,7 @@ const reducer = (state, action) => {
|
|
|
30
30
|
case 'setMaxLength': {
|
|
31
31
|
return {
|
|
32
32
|
...state,
|
|
33
|
-
maxLength: action.payload > 0 ? action.payload :
|
|
33
|
+
maxLength: action.payload > 0 ? action.payload : 15
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
case 'trimLength': {
|
|
@@ -50,7 +50,7 @@ const reducer = (state, action) => {
|
|
|
50
50
|
return state;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
const LiveLog = ({ children, maxLength =
|
|
53
|
+
const LiveLog = ({ children, maxLength = 15 }) => {
|
|
54
54
|
const t = useI18n();
|
|
55
55
|
const [state, dispatch] = useReducer(reducer, {
|
|
56
56
|
maxLength,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveLog.js","sourceRoot":"","sources":["../../../src/components/LiveLog/LiveLog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAO7C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQ3C,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,MAAqB,EAAE,EAAE;IAC7D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAEzB,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;YACvC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;YACxC,MAAM,eAAe,GACnB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC;gBACrD,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAE/C,IAAI,eAAe,EAAE,CAAC;gBACpB,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;gBAEvB,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,KAAK,WAAW,EAAE,CAAC;oBACzC,OAAO;wBACL,GAAG,KAAK;wBACR,iBAAiB,E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BAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAChD,sBAAa,OAAO,IAAZ,EAAE,CAAe,CAC1B,CAAC,IACQ,IACK,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { useEffect, useContext, useReducer, useMemo } from 'react';\nimport type { FunctionComponent, Reducer, Context } from 'react';\n\nimport { createUID, windowIsAvailable } from '../../utils';\nimport { useI18n } from '../../hooks';\n\nimport { StyledLog } from './LiveLog.styles';\nimport type {\n LiveLogContextValue,\n LiveLogProps,\n LiveLogState,\n ReducerAction\n} from './LiveLog.types';\nimport { LiveLogContext } from './Context';\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n liveLogContext?: Context<LiveLogContextValue>;\n }\n}\n\nconst reducer = (state: LiveLogState, action: ReducerAction) => {\n const type = action.type;\n\n switch (type) {\n case 'announce': {\n const message = action.payload.message;\n const messageType = action.payload.type;\n const announceMessage =\n ['alert', 'error', 'exception'].includes(messageType) ||\n !state.suppressedTypes.includes(messageType);\n\n if (announceMessage) {\n const id = createUID();\n\n if (action.payload.level === 'assertive') {\n return {\n ...state,\n assertiveMessages: [...state.assertiveMessages, { message, id }]\n };\n }\n\n return {\n ...state,\n politeMessages: [...state.politeMessages, { message, id }]\n };\n }\n\n return state;\n }\n case 'setMaxLength': {\n return {\n ...state,\n maxLength: action.payload > 0 ? action.payload :
|
|
1
|
+
{"version":3,"file":"LiveLog.js","sourceRoot":"","sources":["../../../src/components/LiveLog/LiveLog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,k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AC,cAAc,IAAI,cAAc;QAChD,CAAC,CAAC,cAAc,CAAC;IACnB,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACrC,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;QACzB,OAAO,KAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAoB,CAAC;IAC1E,CAAC;IAED,OAAO,CACL,MAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,aAAa,aACnC,QAAQ,EAET,MAAC,SAAS,IAAC,IAAI,EAAC,KAAK,mBAAe,WAAW,aAC7C,uBAAK,CAAC,CAAC,sBAAsB,CAAC,GAAM,EACnC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAC7C,sBAAa,OAAO,IAAZ,EAAE,CAAe,CAC1B,CAAC,IACQ,EAEZ,MAAC,SAAS,IAAC,IAAI,EAAC,KAAK,eAAW,WAAW,mBAAe,WAAW,aACnE,uBAAK,CAAC,CAAC,yBAAyB,CAAC,GAAM,EACtC,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAChD,sBAAa,OAAO,IAAZ,EAAE,CAAe,CAC1B,CAAC,IACQ,IACK,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { useEffect, useContext, useReducer, useMemo } from 'react';\nimport type { FunctionComponent, Reducer, Context } from 'react';\n\nimport { createUID, windowIsAvailable } from '../../utils';\nimport { useI18n } from '../../hooks';\n\nimport { StyledLog } from './LiveLog.styles';\nimport type {\n LiveLogContextValue,\n LiveLogProps,\n LiveLogState,\n ReducerAction\n} from './LiveLog.types';\nimport { LiveLogContext } from './Context';\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n liveLogContext?: Context<LiveLogContextValue>;\n }\n}\n\nconst reducer = (state: LiveLogState, action: ReducerAction) => {\n const type = action.type;\n\n switch (type) {\n case 'announce': {\n const message = action.payload.message;\n const messageType = action.payload.type;\n const announceMessage =\n ['alert', 'error', 'exception'].includes(messageType) ||\n !state.suppressedTypes.includes(messageType);\n\n if (announceMessage) {\n const id = createUID();\n\n if (action.payload.level === 'assertive') {\n return {\n ...state,\n assertiveMessages: [...state.assertiveMessages, { message, id }]\n };\n }\n\n return {\n ...state,\n politeMessages: [...state.politeMessages, { message, id }]\n };\n }\n\n return state;\n }\n case 'setMaxLength': {\n return {\n ...state,\n maxLength: action.payload > 0 ? action.payload : 15\n };\n }\n case 'trimLength': {\n const trimPolite = state.politeMessages.length > state.maxLength;\n const trimAssertive = state.assertiveMessages.length > state.maxLength;\n\n return {\n ...state,\n politeMessages: trimPolite\n ? [...state.politeMessages.slice(-state.maxLength)]\n : state.politeMessages,\n assertiveMessages: trimAssertive\n ? [...state.assertiveMessages.slice(-state.maxLength)]\n : state.assertiveMessages\n };\n }\n default:\n return state;\n }\n};\n\nconst LiveLog: FunctionComponent<LiveLogProps> = ({ children, maxLength = 15 }: LiveLogProps) => {\n const t = useI18n();\n\n const [state, dispatch] = useReducer<Reducer<LiveLogState, ReducerAction>>(reducer, {\n maxLength,\n politeMessages: [],\n assertiveMessages: [],\n suppressedTypes: [] // initialize via a11y settings once available.\n });\n\n // Manage log length.\n useEffect(() => {\n const timeout = setTimeout(() => {\n dispatch({ type: 'trimLength' });\n }, 1000);\n\n return () => {\n clearTimeout(timeout);\n };\n }, [state.assertiveMessages, state.politeMessages, state.maxLength]);\n\n // Update max length\n useEffect(() => {\n dispatch({ type: 'setMaxLength', payload: maxLength });\n }, [maxLength]);\n\n const providerValue = useMemo<LiveLogContextValue>(\n () => ({\n announce: ({ message, type = 'info', assertive = false }) => {\n dispatch({\n type: 'announce',\n payload: { message, type, level: assertive ? 'assertive' : 'polite' }\n });\n },\n announcePolite: ({ message, type = 'info' }) => {\n dispatch({ type: 'announce', payload: { message, type, level: 'polite' } });\n },\n announceAssertive: ({ message, type = 'info' }) => {\n dispatch({ type: 'announce', payload: { message, type, level: 'assertive' } });\n },\n initialized: true\n }),\n []\n );\n\n // Don't create additional LiveLogContext.Providers.\n const context = windowIsAvailable\n ? window.cosmos.liveLogContext ?? LiveLogContext\n : LiveLogContext;\n const priorCtx = useContext(context);\n if (priorCtx.initialized) {\n return <context.Provider value={priorCtx}>{children}</context.Provider>;\n }\n\n return (\n <context.Provider value={providerValue}>\n {children}\n\n <StyledLog role='log' aria-relevant='additions'>\n <h6>{t('polite_announcements')}</h6>\n {state.politeMessages.map(({ message, id }) => (\n <p key={id}>{message}</p>\n ))}\n </StyledLog>\n\n <StyledLog role='log' aria-live='assertive' aria-relevant='additions'>\n <h6>{t('assertive_announcements')}</h6>\n {state.assertiveMessages.map(({ message, id }) => (\n <p key={id}>{message}</p>\n ))}\n </StyledLog>\n </context.Provider>\n );\n};\n\nexport default LiveLog;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveLog.types.js","sourceRoot":"","sources":["../../../src/components/LiveLog/LiveLog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nexport type AnnouncementType =\n /** Immediate attention req.\n * (high priority)\n * (cannot be disabled)\n */\n | 'alert'\n /** Immediate action req.\n * (high priority)\n * (cannot be disabled)\n */\n | 'error'\n /** System failure\n * (high priority)\n * (cannot be disabled)\n */\n | 'exception'\n /** No immediate action req.\n * (medium priority)\n */\n | 'warning'\n /** Feedback on actions\n * (medium priority)\n */\n | 'acknowledgement'\n /** Confirmation of action completion\n * (medium priority)\n */\n | 'success'\n /** Passive notification\n * (low priority)\n * (ex: \"Kelly liked your comment.\")\n */\n | 'info'\n /** System feedback\n * (low priority)\n * (ex: \"Loading create form.\")\n */\n | 'status';\n\ninterface AnnounceMethodProps {\n /** Message to announce */\n message: string;\n /** Announcement type\n * @default 'info'\n */\n type?: AnnouncementType;\n}\n\ninterface GenericAnnounceMethodProps extends AnnounceMethodProps {\n /** Whether announcement is assertive.\n * @default false\n */\n assertive?: boolean;\n}\n\nexport interface LiveLogContextValue {\n announce: (props: GenericAnnounceMethodProps) => void;\n announcePolite: (props: AnnounceMethodProps) => void;\n announceAssertive: (props: AnnounceMethodProps) => void;\n /** @internal */\n initialized: boolean;\n}\n\nexport interface LiveLogProps {\n /** Content that will be provided live log context. */\n children: ReactNode;\n /** Length at which to start shifting the window of persisted messages.\n * @default
|
|
1
|
+
{"version":3,"file":"LiveLog.types.js","sourceRoot":"","sources":["../../../src/components/LiveLog/LiveLog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nexport type AnnouncementType =\n /** Immediate attention req.\n * (high priority)\n * (cannot be disabled)\n */\n | 'alert'\n /** Immediate action req.\n * (high priority)\n * (cannot be disabled)\n */\n | 'error'\n /** System failure\n * (high priority)\n * (cannot be disabled)\n */\n | 'exception'\n /** No immediate action req.\n * (medium priority)\n */\n | 'warning'\n /** Feedback on actions\n * (medium priority)\n */\n | 'acknowledgement'\n /** Confirmation of action completion\n * (medium priority)\n */\n | 'success'\n /** Passive notification\n * (low priority)\n * (ex: \"Kelly liked your comment.\")\n */\n | 'info'\n /** System feedback\n * (low priority)\n * (ex: \"Loading create form.\")\n */\n | 'status';\n\ninterface AnnounceMethodProps {\n /** Message to announce */\n message: string;\n /** Announcement type\n * @default 'info'\n */\n type?: AnnouncementType;\n}\n\ninterface GenericAnnounceMethodProps extends AnnounceMethodProps {\n /** Whether announcement is assertive.\n * @default false\n */\n assertive?: boolean;\n}\n\nexport interface LiveLogContextValue {\n announce: (props: GenericAnnounceMethodProps) => void;\n announcePolite: (props: AnnounceMethodProps) => void;\n announceAssertive: (props: AnnounceMethodProps) => void;\n /** @internal */\n initialized: boolean;\n}\n\nexport interface LiveLogProps {\n /** Content that will be provided live log context. */\n children: ReactNode;\n /** Length at which to start shifting the window of persisted messages.\n * @default 15\n */\n maxLength?: number;\n}\n\ninterface MessageStateItem {\n message: AnnounceMethodProps['message'];\n id: string;\n}\n\nexport interface LiveLogState {\n maxLength: number;\n politeMessages: MessageStateItem[];\n assertiveMessages: MessageStateItem[];\n suppressedTypes: AnnouncementType[];\n}\n\nexport type ReducerAction =\n | {\n type: 'announce';\n payload: {\n message: AnnounceMethodProps['message'];\n level: 'polite' | 'assertive';\n type: AnnouncementType;\n };\n }\n | {\n type: 'setMaxLength';\n payload: number;\n }\n | {\n type: 'trimLength';\n };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAInE,eAAO,MAAM,uBAAuB,6NAAe,CAAC;AAEpD,eAAO,MAAM,iBAAiB,uNAwB5B,CAAC;AAIH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Modal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAInE,eAAO,MAAM,uBAAuB,6NAAe,CAAC;AAEpD,eAAO,MAAM,iBAAiB,uNAwB5B,CAAC;AAIH,eAAO,MAAM,kBAAkB,6NAuB7B,CAAC;AAIH,eAAO,MAAM,WAAW,sxBA6JtB,CAAC;AAIH,eAAO,MAAM,oBAAoB,+NAIhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,gBAAgB,E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n\nimport { StyledButton } from '../Button';\nimport type { PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { StyledIcon } from '../Icon';\nimport { StyledCard } from '../Card';\nimport { StyledBackdrop } from '../Backdrop';\nimport { StyledResponsiveActionsContainer } from '../ResponsiveActions';\nimport { StyledProgressBackdrop } from '../Progress';\nimport { ellipsisOverflow } from '../../styles/mixins';\n\nimport type { ModalContextValue, ModalProps } from './Modal.types';\n\ntype ModalPropsWithDefaults = PropsWithDefaults<ModalProps, 'stretch' | 'center' | 'autoWidth'>;\n\nexport const StyledModalChildrenWrap = styled.div``;\n\nexport const StyledModalHeader = styled.header(({ theme: { base } }) => {\n const padAdjust = 0.75;\n\n return css`\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});\n\n @media (width < ${base.breakpoints.sm}) {\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${1.5 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(1.5 * ${base.spacing});\n }\n\n h2 {\n margin-block-start: calc(0.5 * ${base.spacing});\n }\n\n h2 > ${StyledIcon} {\n margin-inline-end: ${base.spacing};\n }\n\n ${StyledButton} {\n color: ${base.palette['foreground-color']};\n }\n `;\n});\n\nStyledModalHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModalContent = styled.div(({ theme: { base } }) => {\n return css`\n position: relative;\n padding: calc(0.5 * ${base.spacing}) calc(3 * ${base.spacing});\n overflow-anchor: none;\n\n @media (width < ${base.breakpoints.sm}) {\n padding: calc(0.5 * ${base.spacing}) calc(1.5 * ${base.spacing});\n }\n\n @media (height >= 31.25rem) {\n overflow-y: auto;\n }\n\n &:last-child {\n padding-bottom: calc(3 * ${base.spacing});\n }\n\n & > [data-config-root='true'] > ${StyledBackdrop} {\n top: var(--scroll-top, 0);\n }\n `;\n});\n\nStyledModalContent.defaultProps = defaultThemeProp;\n\nexport const StyledModal = styled(StyledCard)<\n ModalPropsWithDefaults & Pick<ModalContextValue, 'alert' | 'state'>\n>(({ theme: { base, components }, alert, autoWidth, center, stretch, state }) => {\n let defaultMinWidth = '80ch';\n let defaultMaxWidth = '80ch';\n\n if (alert) {\n defaultMinWidth = '60ch';\n defaultMaxWidth = '60ch';\n } else if (autoWidth) {\n defaultMaxWidth = '100%';\n }\n\n return css`\n position: relative;\n box-shadow: ${base.shadow.high};\n\n @media (height < 31.25rem) {\n overflow-y: auto;\n }\n\n @media (forced-colors: active) {\n border: 0.0625rem solid transparent;\n }\n\n ${StyledResponsiveActionsContainer} {\n padding: calc(2.5 * ${base.spacing}) calc(3 * ${base.spacing}) calc(3 * ${base.spacing});\n @media (width < ${base.breakpoints.sm}) {\n padding: calc(5 * ${base.spacing}) calc(1.5 * ${base.spacing}) calc(1.5 * ${base.spacing});\n }\n }\n\n ${!alert && stretch\n ? css`\n height: calc(100% - 1rem);\n\n ${autoWidth\n ? css`\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n `\n : css`\n width: calc(100% - 1rem);\n `}\n\n @media (min-width: ${base.breakpoints.sm}) {\n height: calc(100% - 2rem);\n\n ${autoWidth\n ? css`\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n `\n : css`\n width: calc(100% - 2rem);\n `}\n }\n\n @media (min-width: ${base.breakpoints.md}) {\n height: calc(100% - 4rem);\n\n ${autoWidth\n ? css`\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n `\n : css`\n width: calc(100% - 4rem);\n `}\n }\n `\n : css`\n min-width: min(calc(100% - 1rem), ${defaultMinWidth});\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n max-height: calc(100% - 1rem);\n\n &:not(:has(footer)) ${StyledProgressBackdrop} {\n border-end-start-radius: ${base['border-radius']};\n border-end-end-radius: ${base['border-radius']};\n }\n\n ${!center &&\n css`\n margin-block-start: 0.5rem;\n `}\n\n @media (min-width: ${base.breakpoints.sm}) {\n min-width: min(calc(100% - 2rem), ${defaultMinWidth});\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n max-height: calc(100% - 2rem);\n ${!center &&\n css`\n margin-block-start: 1rem;\n `}\n }\n\n @media (min-width: ${base.breakpoints.md}) {\n min-width: min(calc(100% - 4rem), ${defaultMinWidth});\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n max-height: calc(100% - 4rem);\n ${!center &&\n css`\n margin-block-start: 2rem;\n `}\n }\n `}\n\n ${state === 'docked' &&\n css`\n /*\n * This seems like the most optimal of the suboptimal solutions.\n * https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity\n */\n &&& {\n /* Using non logical properties due to Safari 14.x support and since the inline bottom values are the same. */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n pointer-events: auto;\n }\n `}\n\n &[aria-busy='true'] {\n ${StyledModalContent} {\n /* TODO: Replace with useScrollToggle hook. */\n overflow: hidden;\n min-height: 8rem;\n }\n }\n\n &:focus-visible {\n @media (forced-colors: none) {\n outline: none;\n }\n box-shadow: ${base.shadow.focus};\n }\n\n &&& {\n background: ${components.modal.background};\n }\n\n &[data-moveable] {\n position: absolute;\n\n ${StyledModalHeader} {\n cursor: grab;\n\n &:focus-visible {\n outline: none;\n }\n\n &:active {\n cursor: grabbing;\n }\n }\n\n &:has(${StyledModalHeader}:focus-visible) {\n box-shadow: ${base.shadow.high}, ${base.shadow.focus};\n }\n }\n `;\n});\n\nStyledModal.defaultProps = defaultThemeProp;\n\nexport const StyledMinimizedLabel = styled.span`\n flex-shrink: 1;\n ${ellipsisOverflow}\n font-weight: bold;\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAA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AC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { StyledButton } from '../Button';\nimport type { PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { StyledIcon } from '../Icon';\nimport { StyledCard } from '../Card';\nimport { StyledBackdrop } from '../Backdrop';\nimport { StyledResponsiveActionsContainer } from '../ResponsiveActions';\nimport { StyledProgressBackdrop } from '../Progress';\nimport { ellipsisOverflow } from '../../styles/mixins';\n\nimport type { ModalContextValue, ModalProps } from './Modal.types';\n\ntype ModalPropsWithDefaults = PropsWithDefaults<ModalProps, 'stretch' | 'center' | 'autoWidth'>;\n\nexport const StyledModalChildrenWrap = styled.div``;\n\nexport const StyledModalHeader = styled.header(({ theme: { base } }) => {\n const padAdjust = 0.75;\n\n return css`\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});\n\n @media (width < ${base.breakpoints.sm}) {\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${1.5 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(1.5 * ${base.spacing});\n }\n\n h2 {\n margin-block-start: calc(0.5 * ${base.spacing});\n }\n\n h2 > ${StyledIcon} {\n margin-inline-end: ${base.spacing};\n }\n\n ${StyledButton} {\n color: ${base.palette['foreground-color']};\n }\n `;\n});\n\nStyledModalHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModalContent = styled.div(({ theme: { base } }) => {\n return css`\n position: relative;\n padding: calc(0.5 * ${base.spacing}) calc(3 * ${base.spacing});\n overflow-anchor: none;\n\n @media (width < ${base.breakpoints.sm}) {\n padding: calc(0.5 * ${base.spacing}) calc(1.5 * ${base.spacing});\n }\n\n @media (height >= 31.25rem) {\n overflow-y: auto;\n }\n\n &:last-child {\n padding-bottom: calc(3 * ${base.spacing});\n }\n\n & > [data-config-root='true'] > ${StyledBackdrop} {\n top: var(--scroll-top, 0);\n height: 100%;\n }\n `;\n});\n\nStyledModalContent.defaultProps = defaultThemeProp;\n\nexport const StyledModal = styled(StyledCard)<\n ModalPropsWithDefaults & Pick<ModalContextValue, 'alert' | 'state'>\n>(({ theme: { base, components }, alert, autoWidth, center, stretch, state }) => {\n let defaultMinWidth = '80ch';\n let defaultMaxWidth = '80ch';\n\n if (alert) {\n defaultMinWidth = '60ch';\n defaultMaxWidth = '60ch';\n } else if (autoWidth) {\n defaultMaxWidth = '100%';\n }\n\n return css`\n position: relative;\n box-shadow: ${base.shadow.high};\n\n @media (height < 31.25rem) {\n overflow-y: auto;\n }\n\n @media (forced-colors: active) {\n border: 0.0625rem solid transparent;\n }\n\n ${StyledResponsiveActionsContainer} {\n padding: calc(2.5 * ${base.spacing}) calc(3 * ${base.spacing}) calc(3 * ${base.spacing});\n @media (width < ${base.breakpoints.sm}) {\n padding: calc(5 * ${base.spacing}) calc(1.5 * ${base.spacing}) calc(1.5 * ${base.spacing});\n }\n }\n\n ${!alert && stretch\n ? css`\n height: calc(100% - 1rem);\n\n ${autoWidth\n ? css`\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n `\n : css`\n width: calc(100% - 1rem);\n `}\n\n @media (min-width: ${base.breakpoints.sm}) {\n height: calc(100% - 2rem);\n\n ${autoWidth\n ? css`\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n `\n : css`\n width: calc(100% - 2rem);\n `}\n }\n\n @media (min-width: ${base.breakpoints.md}) {\n height: calc(100% - 4rem);\n\n ${autoWidth\n ? css`\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n `\n : css`\n width: calc(100% - 4rem);\n `}\n }\n `\n : css`\n min-width: min(calc(100% - 1rem), ${defaultMinWidth});\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n max-height: calc(100% - 1rem);\n\n &:not(:has(footer)) ${StyledProgressBackdrop} {\n border-end-start-radius: ${base['border-radius']};\n border-end-end-radius: ${base['border-radius']};\n }\n\n ${!center &&\n css`\n margin-block-start: 0.5rem;\n `}\n\n @media (min-width: ${base.breakpoints.sm}) {\n min-width: min(calc(100% - 2rem), ${defaultMinWidth});\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n max-height: calc(100% - 2rem);\n ${!center &&\n css`\n margin-block-start: 1rem;\n `}\n }\n\n @media (min-width: ${base.breakpoints.md}) {\n min-width: min(calc(100% - 4rem), ${defaultMinWidth});\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n max-height: calc(100% - 4rem);\n ${!center &&\n css`\n margin-block-start: 2rem;\n `}\n }\n `}\n\n ${state === 'docked' &&\n css`\n /*\n * This seems like the most optimal of the suboptimal solutions.\n * https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity\n */\n &&& {\n /* Using non logical properties due to Safari 14.x support and since the inline bottom values are the same. */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n pointer-events: auto;\n }\n `}\n\n &[aria-busy='true'] {\n ${StyledModalContent} {\n /* TODO: Replace with useScrollToggle hook. */\n overflow: hidden;\n min-height: 8rem;\n }\n }\n\n &:focus-visible {\n @media (forced-colors: none) {\n outline: none;\n }\n box-shadow: ${base.shadow.focus};\n }\n\n &&& {\n background: ${components.modal.background};\n }\n\n &[data-moveable] {\n position: absolute;\n\n ${StyledModalHeader} {\n cursor: grab;\n\n &:focus-visible {\n outline: none;\n }\n\n &:active {\n cursor: grabbing;\n }\n }\n\n &:has(${StyledModalHeader}:focus-visible) {\n box-shadow: ${base.shadow.high}, ${base.shadow.focus};\n }\n }\n `;\n});\n\nStyledModal.defaultProps = defaultThemeProp;\n\nexport const StyledMinimizedLabel = styled.span`\n flex-shrink: 1;\n ${ellipsisOverflow}\n font-weight: bold;\n`;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.d.ts","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,iBAAiB,EAGjB,OAAO,EAIR,MAAM,OAAO,CAAC;AA6Bf,OAAO,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAgB,YAAY,EAAoC,MAAM,iBAAiB,CAAC;AAEpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AA2BrD,OAAO,QAAQ,YAAY,CAAC;IAC1B,UAAiB,aAAa;QAC5B,cAAc,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;KAC/C;CACF;;;;
|
|
1
|
+
{"version":3,"file":"Toaster.d.ts","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,iBAAiB,EAGjB,OAAO,EAIR,MAAM,OAAO,CAAC;AA6Bf,OAAO,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAgB,YAAY,EAAoC,MAAM,iBAAiB,CAAC;AAEpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AA2BrD,OAAO,QAAQ,YAAY,CAAC;IAC1B,UAAiB,aAAa;QAC5B,cAAc,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;KAC/C;CACF;;;;AAqWD,wBAAuD"}
|
|
@@ -89,7 +89,6 @@ const StyledToaster = styled.div(({ theme }) => {
|
|
|
89
89
|
width: min(40ch, calc(100% - 1rem));
|
|
90
90
|
inset-inline-start: 50%;
|
|
91
91
|
transform: translateX(-50%);
|
|
92
|
-
/* stylelint-disable-next-line unit-allowed-list */
|
|
93
92
|
top: calc(100dvh - var(--appshell-bottom-offset, 0rem));
|
|
94
93
|
`;
|
|
95
94
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.js","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,OAAO,EACP,eAAe,EACf,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACV,MAAM,OA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EAAE,OAAO,CAAC,EAAE,GAAI,CACrF,CAAC;oBACJ,CAAC,CAAC,GACY,EAChB,YAAY,CACb,IACF,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import {\n useContext,\n useReducer,\n useMemo,\n useLayoutEffect,\n useRef,\n useState,\n forwardRef,\n useEffect\n} from 'react';\nimport type {\n FunctionComponent,\n CSSProperties,\n TransitionEvent,\n Context,\n PropsWithoutRef,\n Ref,\n Dispatch\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { css } from 'styled-components';\n\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport Link, { StyledLink } from '../Link';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport {\n createUID,\n windowIsAvailable,\n withTestIds,\n hasProp,\n getActiveElement,\n getFocusables\n} from '../../utils';\nimport {\n useConfiguration,\n useI18n,\n useLiveLog,\n useOS,\n useShortcut,\n useTestIds,\n useConsolidatedRef,\n useEscape,\n useFocusWithin\n} from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport Flex from '../Flex';\nimport '../../init';\nimport { registerAction } from '../ShortcutManager';\nimport { Keyboard } from '../Badges';\nimport { StyledKeyboard } from '../Badges/Keyboard';\n\nimport type { ToastMessage, ToasterProps, BaseToastMessage, CreatedMessage } from './Toaster.types';\nimport { ToasterContext } from './Context';\nimport type { ToasterContextValue } from './Context';\nimport { getToasterTestIds } from './Toaster.test-ids';\n\nregisterIcon(timesIcon);\nregisterAction(\n { id: 'JumpToToast', defaultKeyBinding: 'Alt+Enter' },\n { id: 'DismissToast', defaultKeyBinding: 'Alt+Q' }\n);\n\ntype ToastState = (BaseToastMessage | CreatedMessage) & {\n id: NonNullable<ToastMessage['id']>;\n dismissAfter?: number;\n};\n\ntype ToastReducerAction =\n | { type: 'push'; payload: ToastState }\n | { type: 'unmount'; payload: ToastState['id'] };\n\ntype ToastProps = ToastState & {\n // determines if this is the first toast in the list, used to dismiss the first toast with a shortcut, not exposed outside\n firstToast: boolean;\n topLevelDismiss: ToasterProps['onDismiss'];\n translateY: number;\n dispatch: Dispatch<ToastReducerAction>;\n ref: Ref<HTMLDivElement>;\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n toasterContext?: Context<ToasterContextValue>;\n }\n}\n\nconst StyledToastButton = styled.button(\n ({ theme }) => css`\n border: none;\n color: inherit;\n padding: 0;\n font-size: 1rem;\n margin-block: calc(${theme.base.spacing} / 2);\n margin-inline-end: calc(${theme.base.spacing} / 2);\n\n &:enabled:hover {\n background: #ffffff19;\n }\n\n &:enabled:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledToastButton.defaultProps = defaultThemeProp;\n\nconst StyledToastContent = styled.div(({ theme }) => {\n return css`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: clip;\n text-overflow: ellipsis;\n font-size: ${theme.base['font-size']};\n margin-inline-start: calc(${theme.base['border-radius']} / 2);\n padding-inline-start: calc(${theme.base.spacing} / 2);\n\n ${StyledLink} {\n color: ${theme.base.colors.blue.light};\n }\n `;\n});\n\nStyledToastContent.defaultProps = defaultThemeProp;\n\nconst StyledToast = styled.div(({ theme }) => {\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 100%;\n background: ${theme.base.colors.slate['extra-dark']};\n color: ${theme.base.colors.white};\n border-radius: calc(${theme.base['border-radius']} / 2);\n opacity: var(--opacity);\n transform: translateY(var(--translateY)) scale(var(--scale));\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledKeyboard} {\n color: ${theme.base.palette.light};\n background-color: ${theme.base.colors.gray.dark};\n border-color: ${theme.base.colors.gray.medium};\n inset-block-start: unset;\n }\n `;\n});\n\nStyledToast.defaultProps = defaultThemeProp;\n\nconst StyledToaster = styled.div(({ theme }) => {\n return css`\n position: fixed;\n z-index: ${theme.base['z-index'].toast};\n width: min(40ch, calc(100% - 1rem));\n inset-inline-start: 50%;\n transform: translateX(-50%);\n /* stylelint-disable-next-line unit-allowed-list */\n top: calc(100dvh - var(--appshell-bottom-offset, 0rem));\n `;\n});\n\nStyledToaster.defaultProps = defaultThemeProp;\n\nfunction reducer(current: ToastState[], action: ToastReducerAction) {\n switch (action.type) {\n case 'push':\n return [\n ...current,\n {\n ...action.payload\n }\n ];\n\n case 'unmount':\n return current.filter(m => m.id !== action.payload);\n\n default:\n return current;\n }\n}\n\nconst Toast = forwardRef(function Toast(\n {\n id,\n firstToast,\n dispatch,\n topLevelDismiss,\n translateY,\n onDismiss,\n dismissAfter,\n ...restProps\n }: PropsWithoutRef<ToastProps>,\n ref: ToastProps['ref']\n) {\n const [dismissed, setDismissed] = useState(false);\n const timeoutRef = useRef(NaN);\n const t = useI18n();\n const { macintosh } = useOS();\n const { announcePolite } = useLiveLog();\n const content = hasProp(restProps, 'href') ? t('created') : restProps.content;\n const initiatorRef = useRef<HTMLElement | null>(null);\n const containerRef = useConsolidatedRef(ref);\n\n useEffect(() => {\n let fullMessage = content;\n if (hasProp(restProps, 'href')) {\n // CreatedMessage\n fullMessage = restProps.caseId\n ? `${content} ${restProps.caseId} ${restProps.label}`\n : `${content} ${restProps.label}`;\n }\n\n const shortcutJumpMessage = t('keypress_instruction', [\n macintosh ? 'Option + Enter' : 'Alt + Enter',\n t('shortcut_JumpToToast')\n ]);\n\n const shortcutDismissMessage = t('keypress_instruction', [\n macintosh ? 'Option + Q' : 'Alt + Q',\n t('shortcut_DismissToast')\n ]);\n\n announcePolite({\n message: `${fullMessage}. ${shortcutJumpMessage}. ${shortcutDismissMessage}.`,\n type: 'acknowledgement'\n });\n }, []);\n\n const onTransitionEnd = (e: TransitionEvent<HTMLDivElement>) => {\n if (dismissed && e.propertyName === 'opacity' && e.target === e.currentTarget) {\n dispatch({ type: 'unmount', payload: id });\n }\n };\n\n const dismiss = (timeout: boolean) => () => {\n if (initiatorRef.current) {\n initiatorRef.current?.focus?.();\n initiatorRef.current = null;\n }\n clearTimeout(timeoutRef.current);\n if (dismissed) return;\n setDismissed(true);\n onDismiss?.({ id, timeout });\n topLevelDismiss?.({ id, timeout });\n };\n\n const startTimer = () => {\n if (dismissAfter) {\n timeoutRef.current = window.setTimeout(dismiss(true), dismissAfter);\n }\n };\n\n useEffect(() => {\n startTimer();\n return () => {\n window.clearTimeout(timeoutRef.current);\n };\n }, []);\n\n // Alt+Enter focuses on the first focusable element in the first toast.\n // Tab to the next toast if there are multiple.\n useShortcut('JumpToToast', () => {\n const activeElement = getActiveElement();\n if (activeElement && activeElement !== document.body) {\n initiatorRef.current = activeElement as HTMLElement;\n }\n if (firstToast && containerRef.current) {\n getFocusables(containerRef.current)[0]?.focus();\n }\n });\n\n // Alt+Q dismisses the first toast.\n useShortcut('DismissToast', () => {\n if (firstToast) dismiss(false)();\n });\n\n // Escape dismisses the toast and focuses the initiator.\n useEscape(() => {\n const currentFocus = getActiveElement();\n if (containerRef.current?.contains(currentFocus)) {\n dismiss(false)();\n }\n });\n\n useFocusWithin([containerRef], (focused: boolean) => {\n if (focused) {\n window.clearTimeout(timeoutRef.current);\n } else {\n startTimer();\n }\n });\n\n return (\n <Flex\n {...restProps}\n data-app-region\n container={{ alignItems: 'center', gap: 0.25 }}\n as={StyledToast}\n ref={containerRef}\n style={\n {\n '--translateY': `${-translateY}px`,\n '--opacity': dismissed ? '0' : '1',\n '--scale': dismissed ? '0' : '1'\n } as CSSProperties\n }\n onTransitionEnd={onTransitionEnd}\n >\n <Flex item={{ grow: 1 }} as={StyledToastContent}>\n {content}\n {hasProp(restProps, 'href') ? (\n <>\n \n <Link href={restProps.href}>\n {restProps.caseId ? `(${restProps.caseId}): ${restProps.label}` : restProps.label}\n </Link>\n </>\n ) : undefined}\n </Flex>\n <Flex container={{ inline: true, justify: 'end', gap: 0.5 }}>\n <Keyboard keyName='Alt' />\n <Keyboard keyName='Enter' />\n </Flex>\n <Button\n as={StyledToastButton}\n variant='simple'\n onClick={dismiss(false)}\n icon\n aria-label={t('dismiss_label')}\n >\n <Icon name='times' />\n </Button>\n </Flex>\n );\n});\n\nconst Toaster: FunctionComponent<ToasterProps> = ({\n testId,\n children,\n onDismiss\n}: ToasterProps) => {\n const { portalTarget } = useConfiguration();\n const [messages, dispatch] = useReducer(reducer, []);\n const [yOffsets, setYOffsets] = useState<number[]>([]);\n const heightHashRef = useRef<{\n [id: string]: number;\n }>({});\n const testIds = useTestIds(testId, getToasterTestIds);\n\n // This effect will cause a re-render with a translateY value set for each toast.\n useLayoutEffect(() => {\n const heights = [...messages].reverse().map(({ id }) => heightHashRef.current[id]);\n\n setYOffsets(\n heights\n .map((_, i) => heights.slice(0, i + 1).reduce((sum, cur) => sum + cur + 4, 0))\n .reverse()\n );\n }, [messages.length]);\n\n const providerValue = useMemo(\n () => ({\n push(incoming: ToastMessage) {\n const message: ToastState = {\n ...incoming,\n id: incoming.id ?? createUID(),\n dismissAfter: hasProp(incoming, 'href') ? 15_000 : 7_500\n };\n\n dispatch({\n type: 'push',\n payload: message\n });\n },\n initialized: true\n }),\n []\n );\n\n // Don't create additional ToasterContext.Providers.\n const context = windowIsAvailable\n ? window.cosmos.toasterContext ?? ToasterContext\n : ToasterContext;\n const priorCtx = useContext(context);\n if (priorCtx.initialized) {\n return <context.Provider value={priorCtx}>{children}</context.Provider>;\n }\n\n return (\n <>\n <context.Provider value={providerValue}>{children}</context.Provider>\n {!!messages.length &&\n portalTarget &&\n createPortal(\n <StyledToaster data-testid={testIds.root}>\n {messages.map((message, i) => {\n const sharedProps = {\n translateY: yOffsets[i] ?? 0,\n firstToast: i === 0,\n topLevelDismiss: onDismiss,\n dispatch,\n ref: el => {\n if (el) {\n heightHashRef.current[message.id] = el.offsetHeight;\n } else {\n delete heightHashRef.current[message.id];\n }\n }\n } satisfies Partial<ToastProps>;\n\n if (hasProp(message, 'href')) {\n return (\n // Toast with Link\n <Toast\n data-testid={testIds.toast}\n {...message}\n {...sharedProps}\n key={message.id}\n />\n );\n }\n\n return (\n // Base Toast\n <Toast data-testid={testIds.toast} {...message} {...sharedProps} key={message.id} />\n );\n })}\n </StyledToaster>,\n portalTarget\n )}\n </>\n );\n};\n\nexport default withTestIds(Toaster, getToasterTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"Toaster.js","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,OAAO,EACP,eAAe,EACf,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACV,MAAM,OAAO,CAAC;AAUf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,Q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AAC,YAAY,CAAC;gCACtD,CAAC;qCAAM,CAAC;oCACN,OAAO,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;gCAC3C,CAAC;4BACH,CAAC;yBAC4B,CAAC;wBAEhC,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;4BAC7B,OAAO;4BACL,kBAAkB;4BAClB,eAAC,KAAK,mBACS,OAAO,CAAC,KAAK,KACtB,OAAO,KACP,WAAW,EACf,GAAG,EAAE,OAAO,CAAC,EAAE,GACf,CACH,CAAC;wBACJ,CAAC;wBAED,OAAO;wBACL,aAAa;wBACb,eAAC,KAAK,mBAAc,OAAO,CAAC,KAAK,KAAM,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAI,CACrF,CAAC;oBACJ,CAAC,CAAC,GACY,EAChB,YAAY,CACb,IACF,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import {\n useContext,\n useReducer,\n useMemo,\n useLayoutEffect,\n useRef,\n useState,\n forwardRef,\n useEffect\n} from 'react';\nimport type {\n FunctionComponent,\n CSSProperties,\n TransitionEvent,\n Context,\n PropsWithoutRef,\n Ref,\n Dispatch\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { css } from 'styled-components';\n\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport Link, { StyledLink } from '../Link';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport {\n createUID,\n windowIsAvailable,\n withTestIds,\n hasProp,\n getActiveElement,\n getFocusables\n} from '../../utils';\nimport {\n useConfiguration,\n useI18n,\n useLiveLog,\n useOS,\n useShortcut,\n useTestIds,\n useConsolidatedRef,\n useEscape,\n useFocusWithin\n} from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport Flex from '../Flex';\nimport '../../init';\nimport { registerAction } from '../ShortcutManager';\nimport { Keyboard } from '../Badges';\nimport { StyledKeyboard } from '../Badges/Keyboard';\n\nimport type { ToastMessage, ToasterProps, BaseToastMessage, CreatedMessage } from './Toaster.types';\nimport { ToasterContext } from './Context';\nimport type { ToasterContextValue } from './Context';\nimport { getToasterTestIds } from './Toaster.test-ids';\n\nregisterIcon(timesIcon);\nregisterAction(\n { id: 'JumpToToast', defaultKeyBinding: 'Alt+Enter' },\n { id: 'DismissToast', defaultKeyBinding: 'Alt+Q' }\n);\n\ntype ToastState = (BaseToastMessage | CreatedMessage) & {\n id: NonNullable<ToastMessage['id']>;\n dismissAfter?: number;\n};\n\ntype ToastReducerAction =\n | { type: 'push'; payload: ToastState }\n | { type: 'unmount'; payload: ToastState['id'] };\n\ntype ToastProps = ToastState & {\n // determines if this is the first toast in the list, used to dismiss the first toast with a shortcut, not exposed outside\n firstToast: boolean;\n topLevelDismiss: ToasterProps['onDismiss'];\n translateY: number;\n dispatch: Dispatch<ToastReducerAction>;\n ref: Ref<HTMLDivElement>;\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n toasterContext?: Context<ToasterContextValue>;\n }\n}\n\nconst StyledToastButton = styled.button(\n ({ theme }) => css`\n border: none;\n color: inherit;\n padding: 0;\n font-size: 1rem;\n margin-block: calc(${theme.base.spacing} / 2);\n margin-inline-end: calc(${theme.base.spacing} / 2);\n\n &:enabled:hover {\n background: #ffffff19;\n }\n\n &:enabled:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledToastButton.defaultProps = defaultThemeProp;\n\nconst StyledToastContent = styled.div(({ theme }) => {\n return css`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: clip;\n text-overflow: ellipsis;\n font-size: ${theme.base['font-size']};\n margin-inline-start: calc(${theme.base['border-radius']} / 2);\n padding-inline-start: calc(${theme.base.spacing} / 2);\n\n ${StyledLink} {\n color: ${theme.base.colors.blue.light};\n }\n `;\n});\n\nStyledToastContent.defaultProps = defaultThemeProp;\n\nconst StyledToast = styled.div(({ theme }) => {\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 100%;\n background: ${theme.base.colors.slate['extra-dark']};\n color: ${theme.base.colors.white};\n border-radius: calc(${theme.base['border-radius']} / 2);\n opacity: var(--opacity);\n transform: translateY(var(--translateY)) scale(var(--scale));\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledKeyboard} {\n color: ${theme.base.palette.light};\n background-color: ${theme.base.colors.gray.dark};\n border-color: ${theme.base.colors.gray.medium};\n inset-block-start: unset;\n }\n `;\n});\n\nStyledToast.defaultProps = defaultThemeProp;\n\nconst StyledToaster = styled.div(({ theme }) => {\n return css`\n position: fixed;\n z-index: ${theme.base['z-index'].toast};\n width: min(40ch, calc(100% - 1rem));\n inset-inline-start: 50%;\n transform: translateX(-50%);\n top: calc(100dvh - var(--appshell-bottom-offset, 0rem));\n `;\n});\n\nStyledToaster.defaultProps = defaultThemeProp;\n\nfunction reducer(current: ToastState[], action: ToastReducerAction) {\n switch (action.type) {\n case 'push':\n return [\n ...current,\n {\n ...action.payload\n }\n ];\n\n case 'unmount':\n return current.filter(m => m.id !== action.payload);\n\n default:\n return current;\n }\n}\n\nconst Toast = forwardRef(function Toast(\n {\n id,\n firstToast,\n dispatch,\n topLevelDismiss,\n translateY,\n onDismiss,\n dismissAfter,\n ...restProps\n }: PropsWithoutRef<ToastProps>,\n ref: ToastProps['ref']\n) {\n const [dismissed, setDismissed] = useState(false);\n const timeoutRef = useRef(NaN);\n const t = useI18n();\n const { macintosh } = useOS();\n const { announcePolite } = useLiveLog();\n const content = hasProp(restProps, 'href') ? t('created') : restProps.content;\n const initiatorRef = useRef<HTMLElement | null>(null);\n const containerRef = useConsolidatedRef(ref);\n\n useEffect(() => {\n let fullMessage = content;\n if (hasProp(restProps, 'href')) {\n // CreatedMessage\n fullMessage = restProps.caseId\n ? `${content} ${restProps.caseId} ${restProps.label}`\n : `${content} ${restProps.label}`;\n }\n\n const shortcutJumpMessage = t('keypress_instruction', [\n macintosh ? 'Option + Enter' : 'Alt + Enter',\n t('shortcut_JumpToToast')\n ]);\n\n const shortcutDismissMessage = t('keypress_instruction', [\n macintosh ? 'Option + Q' : 'Alt + Q',\n t('shortcut_DismissToast')\n ]);\n\n announcePolite({\n message: `${fullMessage}. ${shortcutJumpMessage}. ${shortcutDismissMessage}.`,\n type: 'acknowledgement'\n });\n }, []);\n\n const onTransitionEnd = (e: TransitionEvent<HTMLDivElement>) => {\n if (dismissed && e.propertyName === 'opacity' && e.target === e.currentTarget) {\n dispatch({ type: 'unmount', payload: id });\n }\n };\n\n const dismiss = (timeout: boolean) => () => {\n if (initiatorRef.current) {\n initiatorRef.current?.focus?.();\n initiatorRef.current = null;\n }\n clearTimeout(timeoutRef.current);\n if (dismissed) return;\n setDismissed(true);\n onDismiss?.({ id, timeout });\n topLevelDismiss?.({ id, timeout });\n };\n\n const startTimer = () => {\n if (dismissAfter) {\n timeoutRef.current = window.setTimeout(dismiss(true), dismissAfter);\n }\n };\n\n useEffect(() => {\n startTimer();\n return () => {\n window.clearTimeout(timeoutRef.current);\n };\n }, []);\n\n // Alt+Enter focuses on the first focusable element in the first toast.\n // Tab to the next toast if there are multiple.\n useShortcut('JumpToToast', () => {\n const activeElement = getActiveElement();\n if (activeElement && activeElement !== document.body) {\n initiatorRef.current = activeElement as HTMLElement;\n }\n if (firstToast && containerRef.current) {\n getFocusables(containerRef.current)[0]?.focus();\n }\n });\n\n // Alt+Q dismisses the first toast.\n useShortcut('DismissToast', () => {\n if (firstToast) dismiss(false)();\n });\n\n // Escape dismisses the toast and focuses the initiator.\n useEscape(() => {\n const currentFocus = getActiveElement();\n if (containerRef.current?.contains(currentFocus)) {\n dismiss(false)();\n }\n });\n\n useFocusWithin([containerRef], (focused: boolean) => {\n if (focused) {\n window.clearTimeout(timeoutRef.current);\n } else {\n startTimer();\n }\n });\n\n return (\n <Flex\n {...restProps}\n data-app-region\n container={{ alignItems: 'center', gap: 0.25 }}\n as={StyledToast}\n ref={containerRef}\n style={\n {\n '--translateY': `${-translateY}px`,\n '--opacity': dismissed ? '0' : '1',\n '--scale': dismissed ? '0' : '1'\n } as CSSProperties\n }\n onTransitionEnd={onTransitionEnd}\n >\n <Flex item={{ grow: 1 }} as={StyledToastContent}>\n {content}\n {hasProp(restProps, 'href') ? (\n <>\n \n <Link href={restProps.href}>\n {restProps.caseId ? `(${restProps.caseId}): ${restProps.label}` : restProps.label}\n </Link>\n </>\n ) : undefined}\n </Flex>\n <Flex container={{ inline: true, justify: 'end', gap: 0.5 }}>\n <Keyboard keyName='Alt' />\n <Keyboard keyName='Enter' />\n </Flex>\n <Button\n as={StyledToastButton}\n variant='simple'\n onClick={dismiss(false)}\n icon\n aria-label={t('dismiss_label')}\n >\n <Icon name='times' />\n </Button>\n </Flex>\n );\n});\n\nconst Toaster: FunctionComponent<ToasterProps> = ({\n testId,\n children,\n onDismiss\n}: ToasterProps) => {\n const { portalTarget } = useConfiguration();\n const [messages, dispatch] = useReducer(reducer, []);\n const [yOffsets, setYOffsets] = useState<number[]>([]);\n const heightHashRef = useRef<{\n [id: string]: number;\n }>({});\n const testIds = useTestIds(testId, getToasterTestIds);\n\n // This effect will cause a re-render with a translateY value set for each toast.\n useLayoutEffect(() => {\n const heights = [...messages].reverse().map(({ id }) => heightHashRef.current[id]);\n\n setYOffsets(\n heights\n .map((_, i) => heights.slice(0, i + 1).reduce((sum, cur) => sum + cur + 4, 0))\n .reverse()\n );\n }, [messages.length]);\n\n const providerValue = useMemo(\n () => ({\n push(incoming: ToastMessage) {\n const message: ToastState = {\n ...incoming,\n id: incoming.id ?? createUID(),\n dismissAfter: hasProp(incoming, 'href') ? 15_000 : 7_500\n };\n\n dispatch({\n type: 'push',\n payload: message\n });\n },\n initialized: true\n }),\n []\n );\n\n // Don't create additional ToasterContext.Providers.\n const context = windowIsAvailable\n ? window.cosmos.toasterContext ?? ToasterContext\n : ToasterContext;\n const priorCtx = useContext(context);\n if (priorCtx.initialized) {\n return <context.Provider value={priorCtx}>{children}</context.Provider>;\n }\n\n return (\n <>\n <context.Provider value={providerValue}>{children}</context.Provider>\n {!!messages.length &&\n portalTarget &&\n createPortal(\n <StyledToaster data-testid={testIds.root}>\n {messages.map((message, i) => {\n const sharedProps = {\n translateY: yOffsets[i] ?? 0,\n firstToast: i === 0,\n topLevelDismiss: onDismiss,\n dispatch,\n ref: el => {\n if (el) {\n heightHashRef.current[message.id] = el.offsetHeight;\n } else {\n delete heightHashRef.current[message.id];\n }\n }\n } satisfies Partial<ToastProps>;\n\n if (hasProp(message, 'href')) {\n return (\n // Toast with Link\n <Toast\n data-testid={testIds.toast}\n {...message}\n {...sharedProps}\n key={message.id}\n />\n );\n }\n\n return (\n // Base Toast\n <Toast data-testid={testIds.toast} {...message} {...sharedProps} key={message.id} />\n );\n })}\n </StyledToaster>,\n portalTarget\n )}\n </>\n );\n};\n\nexport default withTestIds(Toaster, getToasterTestIds);\n"]}
|
|
@@ -9,7 +9,7 @@ export declare const StyledNodeIcon: import("styled-components/dist/types").ISty
|
|
|
9
9
|
export declare const StyledNodeText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
10
10
|
export declare const StyledToggleIconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
11
|
export declare const StyledStandardTreeItemSubTree: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<StandardTreePropsWithDefaults, "lined">>> & string;
|
|
12
|
-
export declare const StyledLoadMoreButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "compact" | "icon" | "disabled" | "label" | "ref" | "className" | "type" | "href" | "aria-label" | "children" | "loading" | "as" | "forwardedAs" | "variant"> & Pick<import("../Button").ButtonProps, "compact" | "label" | "ref" | "className" | "href" | "aria-label" | "children" | "as" | "forwardedAs"> & Required<Pick<import("../Button").ButtonProps, "icon" | "disabled" | "type" | "loading" | "variant">>, never>> & string;
|
|
12
|
+
export declare const StyledLoadMoreButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "compact" | "icon" | "disabled" | "label" | "ref" | "className" | "type" | "href" | "aria-disabled" | "aria-label" | "children" | "loading" | "as" | "forwardedAs" | "variant"> & Pick<import("../Button").ButtonProps, "compact" | "label" | "ref" | "className" | "href" | "aria-disabled" | "aria-label" | "children" | "as" | "forwardedAs"> & Required<Pick<import("../Button").ButtonProps, "icon" | "disabled" | "type" | "loading" | "variant">>, never>> & string;
|
|
13
13
|
export declare const StyledNodeInteraction: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
14
|
export declare const StyledStandardTreeLeaf: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
15
|
export declare const StyledStandardTreeParent: typeof StyledNodeInteraction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardTree.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.styles.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE7F,eAAO,MAAM,gBAAgB,kYAAiB,CAAC;AAE/C,eAAO,MAAM,iBAAiB,6NAAe,CAAC;AAE9C,eAAO,MAAM,mBAAmB;;uJAAiB,CAAC;AAElD,eAAO,MAAM,kBAAkB,6NAU7B,CAAC;AAIH,eAAO,MAAM,cAAc,kYAAiB,CAAC;AAE7C,eAAO,MAAM,cAAc,+NAAgB,CAAC;AAE5C,eAAO,MAAM,uBAAuB,6NAKlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,iRAiCxC,CAAC;AAIH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"StandardTree.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.styles.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE7F,eAAO,MAAM,gBAAgB,kYAAiB,CAAC;AAE/C,eAAO,MAAM,iBAAiB,6NAAe,CAAC;AAE9C,eAAO,MAAM,mBAAmB;;uJAAiB,CAAC;AAElD,eAAO,MAAM,kBAAkB,6NAU7B,CAAC;AAIH,eAAO,MAAM,cAAc,kYAAiB,CAAC;AAE7C,eAAO,MAAM,cAAc,+NAAgB,CAAC;AAE5C,eAAO,MAAM,uBAAuB,6NAKlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,iRAiCxC,CAAC;AAIH,eAAO,MAAM,oBAAoB,wsBAI/B,CAAC;AAIH,eAAO,MAAM,qBAAqB,6NAsDhC,CAAC;AAIH,eAAO,MAAM,sBAAsB,6NASjC,CAAC;AAIH,eAAO,MAAM,wBAAwB,EAAE,OAAO,qBA6B7C,CAAC;AAIF,eAAO,MAAM,sBAAsB,6NAclC,CAAC;AAIF,eAAO,MAAM,kBAAkB;;iDAI9B,CAAC;AAIF,eAAO,MAAM,oBAAoB,+NAShC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-core",
|
|
3
|
-
"version": "9.0.0-build.29.
|
|
3
|
+
"version": "9.0.0-build.29.8",
|
|
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",
|