@pega/cosmos-react-core 2.0.0-dev.21.0 → 2.0.0-dev.21.1
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 +2 -4
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +1 -0
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Button/BareButton.d.ts.map +1 -1
- package/lib/components/Button/BareButton.js +13 -13
- package/lib/components/Button/BareButton.js.map +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +13 -13
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Configuration/Configuration.js +1 -1
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.js +14 -5
- package/lib/components/DateTime/Picker/Calendar.styles.js.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,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAOxC,OAAa,EAAE,SAAS,EAAc,MAAM,SAAS,CAAC;AAatD,eAAO,MAAM,oBAAoB;WAAyB,MAAM;SAmC/D,CAAC;AAIF,eAAO,MAAM,aAAa,uGA4CxB,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAQ3B,CAAC;AAIH,eAAO,MAAM,eAAe,0GAa3B,CAAC;AAIF,eAAO,MAAM,qBAAqB,yGAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,0GAE/B,CAAC;AAEF,eAAO,MAAM,YAAY;eAA2B,OAAO;aAAW,OA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
748
|
`;
|
|
749
749
|
/* Main content region styles */
|
|
750
750
|
export const StyledAppMain = styled.main(({ appHeader, mobileNav, headerOffset = 0, theme }) => {
|
|
751
|
-
|
|
752
|
-
if (appHeader || mobileNav)
|
|
753
|
-
heightOffset = 3;
|
|
751
|
+
const heightOffset = appHeader || mobileNav ? headerHeight : '0rem';
|
|
754
752
|
return css `
|
|
755
753
|
--appshell-offset: ${headerOffset}px;
|
|
756
754
|
position: relative;
|
|
757
755
|
margin-inline-start: ${mobileNav ? 0 : navWidth};
|
|
758
|
-
min-height: calc(100vh - ${heightOffset}
|
|
756
|
+
min-height: calc(100vh - ${heightOffset});
|
|
759
757
|
background-color: ${theme.base.palette['app-background']};
|
|
760
758
|
|
|
761
759
|
:focus {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,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,EACL,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE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,EAAE;IAC/D,OAAO,GAAG,CAAA;;;eAGG,KAAK,CAAC,IAAI,CAAC,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,OAAO;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, mix, readableColor, rgba } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAvatar } from '../Avatar';\nimport { StyledIcon } from '../Icon';\nimport { StyledImage } from '../Image/Image';\nimport {\n StyledSearchInput,\n StyledSearchIcon,\n StyledSearchTextInput\n} from '../SearchInput/SearchInput';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils/utils';\nimport { DrawerProps } from '../Drawer';\nimport Flex from '../Flex';\nimport { StyledSummaryItem } from '../SummaryItem';\nimport { readableHue, calculateFontSize, getHoverColors } from '../../styles';\nimport { StyledPopover } from '../Popover';\nimport { StyledEmptyState } from '../EmptyState';\nimport { StyledMenuListContainer } from '../Menu/Menu.styles';\nimport Text, { TextProps, StyledText } from '../Text';\nimport { useDirection } from '../../hooks';\nimport { StyledBareButton } from '../Button/BareButton';\nimport { StyledAlert } from '../Badges/Alert';\n\nimport AppShellContext from './AppShellContext';\n\nconst navWidth = '4rem';\nconst navOpenWidth = '18.75rem';\nconst headerHeight = '3rem';\n\n/* AppShell styles */\n\nexport const StyledAppEnvironment = styled(Flex)<{ color: string }>(\n ({\n color,\n theme: {\n base: {\n spacing,\n 'font-weight': { bold }\n },\n components: {\n 'app-shell': {\n nav: { 'background-color': navColor }\n }\n }\n }\n }) => {\n const foreground = tryCatch(\n () => readableHue(color, color),\n () => readableHue(navColor, navColor)\n );\n\n const shadow = tryCatch(() => rgba(foreground, 0.1));\n\n return css`\n background-color: ${color};\n color: ${foreground};\n box-shadow: inset 0 0 0 0.0625rem ${shadow};\n height: calc(${spacing} * 2.5);\n padding: 0 ${spacing};\n text-align: center;\n text-transform: uppercase;\n font-weight: ${bold};\n overflow: hidden;\n text-overflow: ellipsis;\n `;\n }\n);\n\nStyledAppEnvironment.defaultProps = defaultThemeProp;\n\nexport const StyledAppInfo = styled.a(({ theme, href }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const hoverColor = tryCatch(() =>\n lighten(0.05, theme.components['app-shell'].nav['background-color'])\n );\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\n ${href &&\n css`\n &:hover {\n background: ${hoverColor};\n text-decoration: none;\n }\n `}\n\n &:focus:not([disabled]) {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n\n ${StyledImage} {\n display: inline-block;\n width: calc(${navWidth} / 2);\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n span:last-of-type {\n font-size: ${fontSize.xs};\n color: rgba(255, 255, 255, 0.7);\n }\n\n span:first-of-type {\n font-size: ${fontSize.s};\n color: ${theme.base.colors.white};\n }\n `;\n});\n\nStyledAppInfo.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled.div(() => {\n const { navOpen } = useContext(AppShellContext);\n\n return css`\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: ${navOpen ? 'auto' : 'hidden'};\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledCountIcon = styled.span(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n position: absolute;\n inset-inline-start: calc(4 * ${spacing});\n top: calc(0.5 * ${spacing});\n padding: 0 calc(0.5 * ${spacing});\n `;\n }\n);\n\nStyledCountIcon.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellNavIcon = styled.svg``;\nexport const StyledUtilIconCount = styled.span`\n flex-shrink: 0;\n`;\n\nexport const StyledAppNav = styled.nav<{ appHeader: boolean; showEnv: boolean }>(\n ({ appHeader, showEnv, theme }) => {\n const { navOpen, navState } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n z-index: ${navState !== 'closed'\n ? css`calc(${theme.base['z-index'].backdrop} - 1) `\n : 'auto'};\n background: ${theme.components['app-shell'].nav['background-color']};\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: ${navOpen ? navOpenWidth : navWidth};\n height: calc(100vh - ${appHeader ? headerHeight : '0rem'});\n overflow: hidden;\n white-space: nowrap;\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n padding-block-end: ${theme.base.spacing};\n\n ${!showEnv &&\n css`\n padding-block-start: ${theme.base.spacing};\n `}\n\n @media (min-width: ${theme.base.breakpoints.xl}) {\n z-index: auto;\n\n /* Setting width here keeps the nav width transition in sync with main's margin transition on resize which is also in a media query. */\n width: ${navOpenWidth};\n }\n\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n ${theme.base['custom-scrollbar'] &&\n css`\n * {\n scrollbar-color: rgba(255, 255, 255, 0.6) rgba(0, 0, 0, 0.2);\n scrollbar-width: thin;\n }\n\n @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {\n /* stylelint-disable unit-allowed-list */\n\n *::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n *::-webkit-scrollbar-track {\n background-color: rgba(0, 0, 0, 0.2);\n }\n\n *::-webkit-scrollbar-corner {\n background-color: rgba(0, 0, 0, 0.2);\n border-bottom-right-radius: inherit;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: calc(1.125 * ${theme.base['border-radius']});\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.6);\n }\n\n *::-webkit-scrollbar-thumb:hover {\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.7);\n }\n\n *::-webkit-scrollbar-track:horizontal {\n border-bottom-left-radius: inherit;\n }\n\n *::-webkit-scrollbar-track:vertical {\n border-top-right-radius: inherit;\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-no-unknown */\n *::-webkit-scrollbar-track:not(:corner-present) {\n border-bottom-right-radius: inherit;\n }\n\n /* stylelint-enable unit-allowed-list */\n }\n `}\n `;\n }\n);\n\nStyledAppNav.defaultProps = defaultThemeProp;\n\nexport const StyledSearchForm = styled.form(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n flex-shrink: 0;\n padding: ${theme.base.spacing} 0;\n\n ${StyledSearchInput} {\n margin: 0 calc((${navWidth} - ${theme.base['hit-area']['mouse-min']}) / 2);\n\n &:focus-within {\n box-shadow: ${theme.base.shadow['focus-inverted']};\n\n ${StyledSearchIcon} {\n color: rgba(255, 255, 255, 0.9);\n }\n }\n\n input {\n border-color: ${borderColor};\n\n &::placeholder {\n color: rgba(255, 255, 255, 0.4);\n }\n\n &:focus:not([disabled]) {\n border-color: ${borderColor};\n }\n }\n\n input,\n ${StyledSearchIcon} {\n background: ${borderColor};\n color: rgba(255, 255, 255, 0.7);\n }\n }\n `;\n});\n\nStyledSearchForm.defaultProps = defaultThemeProp;\n\nexport const StyledNavListMenuButton = styled.button(({ theme }) => {\n return css`\n & + ${StyledPopover} {\n &,\n ${StyledMenuListContainer} {\n background-color: ${theme.components['app-shell'].nav['background-color']};\n }\n\n ${StyledMenuListContainer} li {\n color: rgba(255, 255, 255, 0.7);\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n color: #ffffff;\n background-color: rgba(255, 255, 255, 0.05);\n }\n }\n }\n `;\n});\n\nStyledNavListMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseClose = styled.button``;\n\nexport const StyledNavListItem = styled.li<{\n nestedListCollapsed: boolean;\n}>(({ theme, nestedListCollapsed }) => {\n const { navOpen } = useContext(AppShellContext);\n const activeBackground = tryCatch(() =>\n rgba('#000000', theme.base.transparency['transparent-4'])\n );\n\n const { rtl } = useDirection();\n\n return css`\n display: block;\n position: relative;\n ${StyledIcon} {\n font-size: 1.25rem;\n }\n\n ${StyledCaseClose} {\n display: flex;\n position: absolute;\n left: ${navOpen ? 'auto' : '100%'};\n opacity: 0;\n &:hover,\n &:focus {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n `}\n top: 50%;\n bottom: 50%;\n margin: auto 0;\n color: rgba(255, 255, 255, 0.7);\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n > :first-child {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding: calc(1.25 * ${theme.base.spacing}) 0;\n white-space: nowrap;\n color: rgba(255, 255, 255, 0.7);\n cursor: pointer;\n font-weight: ${theme.base['font-weight']['semi-bold']};\n text-decoration: none;\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n color: inherit;\n white-space: nowrap;\n }\n\n &:hover,\n &:focus {\n color: #ffffff;\n background: rgba(255, 255, 255, 0.05);\n }\n\n &:hover + ${StyledCaseClose}, &:focus + ${StyledCaseClose} {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n\n ${StyledAppShellNavIcon}:last-child {\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 ${StyledAppShellNavIcon}:first-child {\n flex-shrink: 0;\n margin: 0 calc((${navWidth} - 1.125rem) / 2);\n }\n }\n\n &[aria-current='page'] > :first-child {\n color: ${theme.base.colors.blue.light};\n background-color: ${activeBackground};\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul``;\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 background = tryCatch(() => rgba('#000000', theme.base.transparency['transparent-4']));\n return css`\n background: ${background};\n\n ${StyledNavListItem} {\n > :first-child {\n padding-inline-start: ${navWidth};\n font-weight: ${theme.base['font-weight'].normal};\n }\n }\n `;\n});\n\nStyledNestedNavList.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTypes = styled.div<{ expanded: boolean }>(props => {\n const {\n expanded,\n theme: {\n base: {\n animation: {\n speed,\n timing: { ease: acceleration }\n }\n }\n }\n } = props;\n\n return css`\n ${StyledIcon} {\n &:first-of-type {\n transition: transform ${speed} ${acceleration};\n transform: ${expanded ? 'rotateZ(45deg)' : 'none'};\n }\n }\n `;\n});\n\nStyledCaseTypes.defaultProps = defaultThemeProp;\n\nexport const StyledUtils = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n return css`\n border-top: 0.0625rem solid ${borderColor};\n li ${StyledAvatar} {\n flex-shrink: 0;\n margin: 0 calc((${navWidth} - ${theme.base['hit-area']['mouse-min']}) / 2);\n font-weight: ${theme.base['font-weight'].normal};\n }\n\n ${StyledBareButton} > ${StyledIcon}:first-child, ${StyledBareButton} > ${StyledUtilIconCount} {\n flex-shrink: 0;\n margin: 0 calc((${navWidth} - 1.125rem) / 2);\n }\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\n/* AppHeader styles */\n\nexport const StyledAppHeaderInfo = styled.div<{ centerLogo: boolean }>(({ centerLogo, theme }) => {\n return css`\n & > :first-child {\n text-decoration: none;\n vertical-align: top;\n }\n\n ${StyledImage} {\n height: 1.625rem;\n\n ${centerLogo &&\n css`\n padding-inline-start: ${theme.base.spacing};\n `}\n }\n `;\n});\n\nStyledAppHeaderInfo.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSearchForm = styled.form<{ isMediumOrAbove: boolean }>(\n ({ isMediumOrAbove, theme }) => {\n const backgroundColor = theme.base.palette['app-background'];\n const headerColor = theme.components['app-shell'].header['background-color'];\n const contrastColor = tryCatch(() => readableColor(headerColor));\n\n return css`\n max-width: 33vw;\n min-width: 10rem;\n width: 100%;\n justify-self: center;\n margin-inline-start: 0;\n margin-inline-end: auto;\n transition: max-width ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n ${StyledSearchInput} {\n ${StyledSearchIcon} {\n background: ${backgroundColor};\n }\n\n ${StyledSearchTextInput} {\n background: ${backgroundColor};\n border-color: ${backgroundColor};\n }\n }\n\n ${!isMediumOrAbove &&\n css`\n max-width: 2rem;\n min-width: 2rem;\n margin-inline-start: auto;\n margin-inline-end: 0;\n\n &:not([focused]) {\n ${StyledSearchInput} {\n ${StyledSearchIcon} {\n background: ${headerColor};\n color: ${contrastColor};\n }\n\n ${StyledSearchTextInput} {\n background: ${headerColor};\n border-color: ${headerColor};\n\n &:hover:not(:focus) {\n border-color: ${headerColor};\n }\n }\n }\n }\n\n &:focus-within {\n max-width: 100%;\n min-width: 10rem;\n\n ${StyledSearchInput} {\n ${StyledSearchIcon} {\n background: ${backgroundColor};\n }\n\n ${StyledSearchTextInput} {\n background: ${backgroundColor};\n border-color: ${backgroundColor};\n\n &:hover:not(:focus) {\n border-color: ${contrastColor};\n }\n }\n }\n }\n `}\n `;\n }\n);\n\nStyledAppHeaderSearchForm.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSpacer = styled.div`\n margin: auto;\n`;\n\nexport const StyledAppHeaderText = styled(Text)<{ variant: TextProps['variant'] }>(\n ({ theme, variant }) => {\n const contrastColor = tryCatch(() =>\n readableColor(theme.components['app-shell'].header['background-color'])\n );\n const secondaryColor = tryCatch(() =>\n rgba(\n contrastColor ?? theme.base.palette['foreground-color'],\n theme.base.transparency['transparent-2']\n )\n );\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${variant === 'secondary' ? secondaryColor : contrastColor};\n font-size: ${fontSize.s};\n\n ${variant !== 'secondary' &&\n css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `}\n `;\n }\n);\n\nStyledAppHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderOperator = styled.button(\n ({ theme }) => css`\n border-radius: 50%;\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledAppHeaderOperator.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeader = styled.header<{ hideTitle: boolean }>(({ hideTitle, theme }) => {\n const headerColor = theme.components['app-shell'].header['background-color'];\n const contrastColor = tryCatch(() => readableColor(headerColor));\n const hoverColors = getHoverColors(mix(0.01, theme.base.palette.interactive, headerColor));\n\n return css`\n position: sticky;\n z-index: ${theme.base['z-index'].drawer};\n top: 0;\n gap: ${theme.base.spacing};\n max-width: 100%;\n height: ${headerHeight};\n background-color: ${headerColor};\n border-bottom: solid 0.0625rem ${theme.base.palette['border-line']};\n\n > :first-child {\n justify-self: flex-start;\n min-width: 33vw;\n\n ${hideTitle &&\n css`\n min-width: fit-content;\n `}\n }\n\n > ${StyledAppHeaderOperator} {\n justify-self: flex-end;\n\n + ${StyledPopover} {\n &,\n ${StyledMenuListContainer} {\n background-color: ${headerColor};\n }\n\n ${StyledMenuListContainer} li {\n color: ${contrastColor};\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n color: ${hoverColors.foreground};\n background-color: ${hoverColors.background};\n }\n }\n }\n }\n `;\n});\n\nStyledAppHeader.defaultProps = defaultThemeProp;\n\n/* Mobile AppShell styles */\n\nexport const StyledMobileNav = styled.header(({ theme }) => {\n const mobileNavColor = theme.base.palette['brand-primary'];\n\n const contrastColor = tryCatch(() => readableColor(mobileNavColor));\n\n return css`\n min-width: 100%;\n min-height: ${headerHeight};\n z-index: ${theme.base['z-index'].drawer};\n background-color: ${mobileNavColor};\n color: ${contrastColor};\n position: sticky;\n top: 0;\n padding-inline-start: ${theme.base.spacing};\n\n @media (pointer: coarse) {\n padding-inline-start: 0;\n }\n `;\n});\n\nStyledMobileNav.defaultProps = defaultThemeProp;\n\n/* AppShell Drawer styles */\n\nexport const StyledDrawerWrapper = styled.div<DrawerProps>(({ theme, open }) => {\n return css`\n background: ${theme.components['app-shell'].nav['background-color']};\n width: 100%;\n height: 100%;\n color: rgba(255, 255, 255, 0.7);\n opacity: ${open ? 1 : 0};\n `;\n});\n\nStyledDrawerWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerHeading = styled.header(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n line-height: 1;\n\n span {\n font-size: ${fontSize.s};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n margin: 0 auto;\n position: relative;\n left: -0.7rem;\n }\n\n svg {\n font-size: ${fontSize.xxl};\n cursor: pointer;\n color: rgba(255, 255, 255, 0.7);\n }\n `;\n});\n\nStyledDrawerHeading.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerBackButton = styled.button(({ theme }) => {\n return css`\n height: ${theme.base['hit-area']['mouse-min']};\n width: ${theme.base['hit-area']['mouse-min']};\n border-radius: calc(\n ${`${theme.base['border-radius']} * ${theme.components.button['border-radius']}`}\n );\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledDrawerBackButton.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerList = styled.ul<{ displayPins: boolean }>(() => {\n return css``;\n});\n\nStyledDrawerList.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerMetaList = styled.ul`\n li {\n color: inherit;\n }\n`;\n\nexport const StyledDrawerPinButton = styled.button(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const { ltr } = useDirection();\n\n return css`\n color: inherit;\n padding: calc(2 * ${theme.base.spacing});\n cursor: pointer;\n font-size: ${fontSize.xxl};\n\n ${StyledIcon} {\n display: block;\n ${ltr &&\n css`\n transform: scaleX(-1);\n `}\n }\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledDrawerPinButton.defaultProps = defaultThemeProp;\n\nexport const EmptyDrawerVisual = styled.div(({ theme }) => {\n return css`\n width: calc(4 * ${theme.base.spacing});\n height: calc(4 * ${theme.base.spacing});\n `;\n});\n\nEmptyDrawerVisual.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerListHeading = styled.h3(({ theme }) => {\n return css`\n position: sticky;\n top: 0;\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n background-color: hsl(207 14% 13% / 1);\n z-index: 1;\n `;\n});\n\nStyledDrawerListHeading.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerViewAll = styled.a(({ theme }) => {\n return css`\n position: sticky;\n bottom: 0;\n padding: ${theme.base.spacing} 0;\n color: inherit;\n background-color: ${theme.components['app-shell'].nav['background-color']};\n text-align: center;\n margin-top: 0.0625rem;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n box-shadow: unset;\n }\n `;\n});\n\nStyledDrawerViewAll.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerListSection = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n border-top: 0.0625rem solid ${borderColor};\n min-height: max(20%, 8rem);\n overflow-y: auto;\n `;\n});\n\nStyledDrawerListSection.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerListContainer = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n height: calc(100% - 4 * ${theme.base.spacing} - ${fontSize.xxl});\n overflow: auto;\n `;\n});\n\nStyledDrawerListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledLoading = styled.div`\n font-size: 2rem;\n`;\n\n/* Main content region styles */\n\nexport const StyledAppMain = styled.main<{\n appHeader: boolean;\n mobileNav: boolean;\n headerOffset?: number;\n}>(({ appHeader, mobileNav, headerOffset = 0, theme }) => {\n let heightOffset = 0;\n if (appHeader || mobileNav) heightOffset = 3;\n\n return css`\n --appshell-offset: ${headerOffset}px;\n position: relative;\n margin-inline-start: ${mobileNav ? 0 : navWidth};\n min-height: calc(100vh - ${heightOffset}rem);\n background-color: ${theme.base.palette['app-background']};\n\n :focus {\n outline: none;\n }\n\n @media (min-width: ${theme.base.breakpoints.xl}) {\n margin-inline-start: ${navOpenWidth};\n }\n\n ${!mobileNav &&\n css`\n transition: margin-inline-start\n ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\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\n/* AppShellList styles */\nexport const StyledAppShellListWrapper = styled.div(({ theme }) => {\n return css`\n max-height: 100%;\n white-space: nowrap;\n\n ${StyledSummaryItem} {\n position: relative;\n &::after {\n content: '';\n position: absolute;\n top: calc(100% - 0.03125rem);\n inset-inline-end: 1rem;\n inset-inline-start: 1rem;\n height: 0.0625rem;\n background-color: ${theme.base.colors.gray['extra-dark']};\n }\n }\n `;\n});\n\nStyledAppShellListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellList = styled.ul``;\n\nStyledAppShellList.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellSummaryItem = styled.div(({ theme }) => {\n return css`\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n color: inherit;\n background-color: transparent;\n border: none;\n text-decoration: none;\n cursor: pointer;\n text-align: start;\n white-space: normal;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledAppShellSummaryItem.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellMetaList = styled.ul`\n li {\n color: inherit;\n }\n`;\n\nexport const StyledAppShellPinButton = styled.button(({ theme }) => {\n return css`\n color: inherit;\n border: none;\n background-color: transparent;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledAppShellPinButton.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationVisual = styled.span<{ unread?: boolean; visualIncluded?: boolean }>(\n ({ theme, unread, visualIncluded }) => {\n return css`\n position: relative;\n ${StyledAlert} {\n display: ${unread ? 'auto' : 'none'};\n position: absolute;\n inset-inline-start: -0.65625rem;\n top: ${visualIncluded ? 'calc(50% - 0.15625rem)' : '0.5rem'};\n background-color: ${theme.base.palette.light};\n height: 0.3125rem;\n width: 0.3125rem;\n } ;\n `;\n }\n);\n\nStyledNotificationVisual.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationPrimary = styled.span<{ unread?: boolean }>(({ theme, unread }) => {\n return css`\n font-weight: ${unread\n ? theme.base['font-weight'].bold\n : theme.base['font-weight']['semi-bold']};\n color: ${unread ? theme.base.palette.light : 'inherit'};\n `;\n});\n\nStyledNotificationPrimary.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationSecondary = styled.span<{ unread?: boolean }>(\n ({ theme, unread }) => {\n return css`\n ${StyledText} {\n opacity: ${unread\n ? theme.base.transparency['transparent-1']\n : theme.base.transparency['transparent-3']};\n }\n `;\n }\n);\n\nStyledNotificationSecondary.defaultProps = defaultThemeProp;\n\nexport const EmptyStateColorContrast = styled.div`\n ${StyledEmptyState} {\n span,\n svg {\n color: rgba(255, 255, 255, 0.7);\n }\n }\n`;\n\nexport const StyledAppShellListSection = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n border-top: 0.0625rem solid ${borderColor};\n min-height: max(20%, 8rem);\n overflow-y: auto;\n `;\n});\n\nStyledAppShellListSection.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellListHeading = styled.h3(({ theme }) => {\n return css`\n position: sticky;\n top: 0;\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n background-color: hsl(207 14% 13% / 1);\n z-index: 1;\n `;\n});\n\nStyledAppShellListHeading.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;AAChD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,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,EACL,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,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,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC/D,OAAO,GAAG,CAAA;;;eAGG,KAAK,CAAC,IAAI,CAAC,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,OAAO;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, mix, readableColor, rgba } from 'polished';\nimport { useContext } from 'react';\n\nimport { StyledAvatar } from '../Avatar';\nimport { StyledIcon } from '../Icon';\nimport { StyledImage } from '../Image/Image';\nimport {\n StyledSearchInput,\n StyledSearchIcon,\n StyledSearchTextInput\n} from '../SearchInput/SearchInput';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils/utils';\nimport { DrawerProps } from '../Drawer';\nimport Flex from '../Flex';\nimport { StyledSummaryItem } from '../SummaryItem';\nimport { readableHue, calculateFontSize, getHoverColors } from '../../styles';\nimport { StyledPopover } from '../Popover';\nimport { StyledEmptyState } from '../EmptyState';\nimport { StyledMenuListContainer } from '../Menu/Menu.styles';\nimport Text, { TextProps, StyledText } from '../Text';\nimport { useDirection } from '../../hooks';\nimport { StyledBareButton } from '../Button/BareButton';\nimport { StyledAlert } from '../Badges/Alert';\n\nimport AppShellContext from './AppShellContext';\n\nconst navWidth = '4rem';\nconst navOpenWidth = '18.75rem';\nconst headerHeight = '3rem';\n\n/* AppShell styles */\n\nexport const StyledAppEnvironment = styled(Flex)<{ color: string }>(\n ({\n color,\n theme: {\n base: {\n spacing,\n 'font-weight': { bold }\n },\n components: {\n 'app-shell': {\n nav: { 'background-color': navColor }\n }\n }\n }\n }) => {\n const foreground = tryCatch(\n () => readableHue(color, color),\n () => readableHue(navColor, navColor)\n );\n\n const shadow = tryCatch(() => rgba(foreground, 0.1));\n\n return css`\n background-color: ${color};\n color: ${foreground};\n box-shadow: inset 0 0 0 0.0625rem ${shadow};\n height: calc(${spacing} * 2.5);\n padding: 0 ${spacing};\n text-align: center;\n text-transform: uppercase;\n font-weight: ${bold};\n overflow: hidden;\n text-overflow: ellipsis;\n `;\n }\n);\n\nStyledAppEnvironment.defaultProps = defaultThemeProp;\n\nexport const StyledAppInfo = styled.a(({ theme, href }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const hoverColor = tryCatch(() =>\n lighten(0.05, theme.components['app-shell'].nav['background-color'])\n );\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\n ${href &&\n css`\n &:hover {\n background: ${hoverColor};\n text-decoration: none;\n }\n `}\n\n &:focus:not([disabled]) {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n\n ${StyledImage} {\n display: inline-block;\n width: calc(${navWidth} / 2);\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n span:last-of-type {\n font-size: ${fontSize.xs};\n color: rgba(255, 255, 255, 0.7);\n }\n\n span:first-of-type {\n font-size: ${fontSize.s};\n color: ${theme.base.colors.white};\n }\n `;\n});\n\nStyledAppInfo.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled.div(() => {\n const { navOpen } = useContext(AppShellContext);\n\n return css`\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: ${navOpen ? 'auto' : 'hidden'};\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledCountIcon = styled.span(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n position: absolute;\n inset-inline-start: calc(4 * ${spacing});\n top: calc(0.5 * ${spacing});\n padding: 0 calc(0.5 * ${spacing});\n `;\n }\n);\n\nStyledCountIcon.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellNavIcon = styled.svg``;\nexport const StyledUtilIconCount = styled.span`\n flex-shrink: 0;\n`;\n\nexport const StyledAppNav = styled.nav<{ appHeader: boolean; showEnv: boolean }>(\n ({ appHeader, showEnv, theme }) => {\n const { navOpen, navState } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n z-index: ${navState !== 'closed'\n ? css`calc(${theme.base['z-index'].backdrop} - 1) `\n : 'auto'};\n background: ${theme.components['app-shell'].nav['background-color']};\n max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});\n width: ${navOpen ? navOpenWidth : navWidth};\n height: calc(100vh - ${appHeader ? headerHeight : '0rem'});\n overflow: hidden;\n white-space: nowrap;\n transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\n padding-block-end: ${theme.base.spacing};\n\n ${!showEnv &&\n css`\n padding-block-start: ${theme.base.spacing};\n `}\n\n @media (min-width: ${theme.base.breakpoints.xl}) {\n z-index: auto;\n\n /* Setting width here keeps the nav width transition in sync with main's margin transition on resize which is also in a media query. */\n width: ${navOpenWidth};\n }\n\n @media (pointer: coarse) {\n max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});\n }\n\n ${theme.base['custom-scrollbar'] &&\n css`\n * {\n scrollbar-color: rgba(255, 255, 255, 0.6) rgba(0, 0, 0, 0.2);\n scrollbar-width: thin;\n }\n\n @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {\n /* stylelint-disable unit-allowed-list */\n\n *::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n *::-webkit-scrollbar-track {\n background-color: rgba(0, 0, 0, 0.2);\n }\n\n *::-webkit-scrollbar-corner {\n background-color: rgba(0, 0, 0, 0.2);\n border-bottom-right-radius: inherit;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: calc(1.125 * ${theme.base['border-radius']});\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.6);\n }\n\n *::-webkit-scrollbar-thumb:hover {\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.7);\n }\n\n *::-webkit-scrollbar-track:horizontal {\n border-bottom-left-radius: inherit;\n }\n\n *::-webkit-scrollbar-track:vertical {\n border-top-right-radius: inherit;\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-no-unknown */\n *::-webkit-scrollbar-track:not(:corner-present) {\n border-bottom-right-radius: inherit;\n }\n\n /* stylelint-enable unit-allowed-list */\n }\n `}\n `;\n }\n);\n\nStyledAppNav.defaultProps = defaultThemeProp;\n\nexport const StyledSearchForm = styled.form(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n flex-shrink: 0;\n padding: ${theme.base.spacing} 0;\n\n ${StyledSearchInput} {\n margin: 0 calc((${navWidth} - ${theme.base['hit-area']['mouse-min']}) / 2);\n\n &:focus-within {\n box-shadow: ${theme.base.shadow['focus-inverted']};\n\n ${StyledSearchIcon} {\n color: rgba(255, 255, 255, 0.9);\n }\n }\n\n input {\n border-color: ${borderColor};\n\n &::placeholder {\n color: rgba(255, 255, 255, 0.4);\n }\n\n &:focus:not([disabled]) {\n border-color: ${borderColor};\n }\n }\n\n input,\n ${StyledSearchIcon} {\n background: ${borderColor};\n color: rgba(255, 255, 255, 0.7);\n }\n }\n `;\n});\n\nStyledSearchForm.defaultProps = defaultThemeProp;\n\nexport const StyledNavListMenuButton = styled.button(({ theme }) => {\n return css`\n & + ${StyledPopover} {\n &,\n ${StyledMenuListContainer} {\n background-color: ${theme.components['app-shell'].nav['background-color']};\n }\n\n ${StyledMenuListContainer} li {\n color: rgba(255, 255, 255, 0.7);\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n color: #ffffff;\n background-color: rgba(255, 255, 255, 0.05);\n }\n }\n }\n `;\n});\n\nStyledNavListMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseClose = styled.button``;\n\nexport const StyledNavListItem = styled.li<{\n nestedListCollapsed: boolean;\n}>(({ theme, nestedListCollapsed }) => {\n const { navOpen } = useContext(AppShellContext);\n const activeBackground = tryCatch(() =>\n rgba('#000000', theme.base.transparency['transparent-4'])\n );\n\n const { rtl } = useDirection();\n\n return css`\n display: block;\n position: relative;\n ${StyledIcon} {\n font-size: 1.25rem;\n }\n\n ${StyledCaseClose} {\n display: flex;\n position: absolute;\n left: ${navOpen ? 'auto' : '100%'};\n opacity: 0;\n &:hover,\n &:focus {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n `}\n top: 50%;\n bottom: 50%;\n margin: auto 0;\n color: rgba(255, 255, 255, 0.7);\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n }\n\n > :first-child {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding: calc(1.25 * ${theme.base.spacing}) 0;\n white-space: nowrap;\n color: rgba(255, 255, 255, 0.7);\n cursor: pointer;\n font-weight: ${theme.base['font-weight']['semi-bold']};\n text-decoration: none;\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n color: inherit;\n white-space: nowrap;\n }\n\n &:hover,\n &:focus {\n color: #ffffff;\n background: rgba(255, 255, 255, 0.05);\n }\n\n &:hover + ${StyledCaseClose}, &:focus + ${StyledCaseClose} {\n ${navOpen &&\n css`\n opacity: 1;\n `}\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n\n ${StyledAppShellNavIcon}:last-child {\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 ${StyledAppShellNavIcon}:first-child {\n flex-shrink: 0;\n margin: 0 calc((${navWidth} - 1.125rem) / 2);\n }\n }\n\n &[aria-current='page'] > :first-child {\n color: ${theme.base.colors.blue.light};\n background-color: ${activeBackground};\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul``;\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 background = tryCatch(() => rgba('#000000', theme.base.transparency['transparent-4']));\n return css`\n background: ${background};\n\n ${StyledNavListItem} {\n > :first-child {\n padding-inline-start: ${navWidth};\n font-weight: ${theme.base['font-weight'].normal};\n }\n }\n `;\n});\n\nStyledNestedNavList.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTypes = styled.div<{ expanded: boolean }>(props => {\n const {\n expanded,\n theme: {\n base: {\n animation: {\n speed,\n timing: { ease: acceleration }\n }\n }\n }\n } = props;\n\n return css`\n ${StyledIcon} {\n &:first-of-type {\n transition: transform ${speed} ${acceleration};\n transform: ${expanded ? 'rotateZ(45deg)' : 'none'};\n }\n }\n `;\n});\n\nStyledCaseTypes.defaultProps = defaultThemeProp;\n\nexport const StyledUtils = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n return css`\n border-top: 0.0625rem solid ${borderColor};\n li ${StyledAvatar} {\n flex-shrink: 0;\n margin: 0 calc((${navWidth} - ${theme.base['hit-area']['mouse-min']}) / 2);\n font-weight: ${theme.base['font-weight'].normal};\n }\n\n ${StyledBareButton} > ${StyledIcon}:first-child, ${StyledBareButton} > ${StyledUtilIconCount} {\n flex-shrink: 0;\n margin: 0 calc((${navWidth} - 1.125rem) / 2);\n }\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\n/* AppHeader styles */\n\nexport const StyledAppHeaderInfo = styled.div<{ centerLogo: boolean }>(({ centerLogo, theme }) => {\n return css`\n & > :first-child {\n text-decoration: none;\n vertical-align: top;\n }\n\n ${StyledImage} {\n height: 1.625rem;\n\n ${centerLogo &&\n css`\n padding-inline-start: ${theme.base.spacing};\n `}\n }\n `;\n});\n\nStyledAppHeaderInfo.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSearchForm = styled.form<{ isMediumOrAbove: boolean }>(\n ({ isMediumOrAbove, theme }) => {\n const backgroundColor = theme.base.palette['app-background'];\n const headerColor = theme.components['app-shell'].header['background-color'];\n const contrastColor = tryCatch(() => readableColor(headerColor));\n\n return css`\n max-width: 33vw;\n min-width: 10rem;\n width: 100%;\n justify-self: center;\n margin-inline-start: 0;\n margin-inline-end: auto;\n transition: max-width ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n ${StyledSearchInput} {\n ${StyledSearchIcon} {\n background: ${backgroundColor};\n }\n\n ${StyledSearchTextInput} {\n background: ${backgroundColor};\n border-color: ${backgroundColor};\n }\n }\n\n ${!isMediumOrAbove &&\n css`\n max-width: 2rem;\n min-width: 2rem;\n margin-inline-start: auto;\n margin-inline-end: 0;\n\n &:not([focused]) {\n ${StyledSearchInput} {\n ${StyledSearchIcon} {\n background: ${headerColor};\n color: ${contrastColor};\n }\n\n ${StyledSearchTextInput} {\n background: ${headerColor};\n border-color: ${headerColor};\n\n &:hover:not(:focus) {\n border-color: ${headerColor};\n }\n }\n }\n }\n\n &:focus-within {\n max-width: 100%;\n min-width: 10rem;\n\n ${StyledSearchInput} {\n ${StyledSearchIcon} {\n background: ${backgroundColor};\n }\n\n ${StyledSearchTextInput} {\n background: ${backgroundColor};\n border-color: ${backgroundColor};\n\n &:hover:not(:focus) {\n border-color: ${contrastColor};\n }\n }\n }\n }\n `}\n `;\n }\n);\n\nStyledAppHeaderSearchForm.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSpacer = styled.div`\n margin: auto;\n`;\n\nexport const StyledAppHeaderText = styled(Text)<{ variant: TextProps['variant'] }>(\n ({ theme, variant }) => {\n const contrastColor = tryCatch(() =>\n readableColor(theme.components['app-shell'].header['background-color'])\n );\n const secondaryColor = tryCatch(() =>\n rgba(\n contrastColor ?? theme.base.palette['foreground-color'],\n theme.base.transparency['transparent-2']\n )\n );\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${variant === 'secondary' ? secondaryColor : contrastColor};\n font-size: ${fontSize.s};\n\n ${variant !== 'secondary' &&\n css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `}\n `;\n }\n);\n\nStyledAppHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderOperator = styled.button(\n ({ theme }) => css`\n border-radius: 50%;\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledAppHeaderOperator.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeader = styled.header<{ hideTitle: boolean }>(({ hideTitle, theme }) => {\n const headerColor = theme.components['app-shell'].header['background-color'];\n const contrastColor = tryCatch(() => readableColor(headerColor));\n const hoverColors = getHoverColors(mix(0.01, theme.base.palette.interactive, headerColor));\n\n return css`\n position: sticky;\n z-index: ${theme.base['z-index'].drawer};\n top: 0;\n gap: ${theme.base.spacing};\n max-width: 100%;\n height: ${headerHeight};\n background-color: ${headerColor};\n border-bottom: solid 0.0625rem ${theme.base.palette['border-line']};\n\n > :first-child {\n justify-self: flex-start;\n min-width: 33vw;\n\n ${hideTitle &&\n css`\n min-width: fit-content;\n `}\n }\n\n > ${StyledAppHeaderOperator} {\n justify-self: flex-end;\n\n + ${StyledPopover} {\n &,\n ${StyledMenuListContainer} {\n background-color: ${headerColor};\n }\n\n ${StyledMenuListContainer} li {\n color: ${contrastColor};\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n color: ${hoverColors.foreground};\n background-color: ${hoverColors.background};\n }\n }\n }\n }\n `;\n});\n\nStyledAppHeader.defaultProps = defaultThemeProp;\n\n/* Mobile AppShell styles */\n\nexport const StyledMobileNav = styled.header(({ theme }) => {\n const mobileNavColor = theme.base.palette['brand-primary'];\n\n const contrastColor = tryCatch(() => readableColor(mobileNavColor));\n\n return css`\n min-width: 100%;\n min-height: ${headerHeight};\n z-index: ${theme.base['z-index'].drawer};\n background-color: ${mobileNavColor};\n color: ${contrastColor};\n position: sticky;\n top: 0;\n padding-inline-start: ${theme.base.spacing};\n\n @media (pointer: coarse) {\n padding-inline-start: 0;\n }\n `;\n});\n\nStyledMobileNav.defaultProps = defaultThemeProp;\n\n/* AppShell Drawer styles */\n\nexport const StyledDrawerWrapper = styled.div<DrawerProps>(({ theme, open }) => {\n return css`\n background: ${theme.components['app-shell'].nav['background-color']};\n width: 100%;\n height: 100%;\n color: rgba(255, 255, 255, 0.7);\n opacity: ${open ? 1 : 0};\n `;\n});\n\nStyledDrawerWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerHeading = styled.header(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n line-height: 1;\n\n span {\n font-size: ${fontSize.s};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n margin: 0 auto;\n position: relative;\n left: -0.7rem;\n }\n\n svg {\n font-size: ${fontSize.xxl};\n cursor: pointer;\n color: rgba(255, 255, 255, 0.7);\n }\n `;\n});\n\nStyledDrawerHeading.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerBackButton = styled.button(({ theme }) => {\n return css`\n height: ${theme.base['hit-area']['mouse-min']};\n width: ${theme.base['hit-area']['mouse-min']};\n border-radius: calc(\n ${`${theme.base['border-radius']} * ${theme.components.button['border-radius']}`}\n );\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledDrawerBackButton.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerList = styled.ul<{ displayPins: boolean }>(() => {\n return css``;\n});\n\nStyledDrawerList.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerMetaList = styled.ul`\n li {\n color: inherit;\n }\n`;\n\nexport const StyledDrawerPinButton = styled.button(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const { ltr } = useDirection();\n\n return css`\n color: inherit;\n padding: calc(2 * ${theme.base.spacing});\n cursor: pointer;\n font-size: ${fontSize.xxl};\n\n ${StyledIcon} {\n display: block;\n ${ltr &&\n css`\n transform: scaleX(-1);\n `}\n }\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledDrawerPinButton.defaultProps = defaultThemeProp;\n\nexport const EmptyDrawerVisual = styled.div(({ theme }) => {\n return css`\n width: calc(4 * ${theme.base.spacing});\n height: calc(4 * ${theme.base.spacing});\n `;\n});\n\nEmptyDrawerVisual.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerListHeading = styled.h3(({ theme }) => {\n return css`\n position: sticky;\n top: 0;\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n background-color: hsl(207 14% 13% / 1);\n z-index: 1;\n `;\n});\n\nStyledDrawerListHeading.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerViewAll = styled.a(({ theme }) => {\n return css`\n position: sticky;\n bottom: 0;\n padding: ${theme.base.spacing} 0;\n color: inherit;\n background-color: ${theme.components['app-shell'].nav['background-color']};\n text-align: center;\n margin-top: 0.0625rem;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n box-shadow: unset;\n }\n `;\n});\n\nStyledDrawerViewAll.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerListSection = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n border-top: 0.0625rem solid ${borderColor};\n min-height: max(20%, 8rem);\n overflow-y: auto;\n `;\n});\n\nStyledDrawerListSection.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerListContainer = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n height: calc(100% - 4 * ${theme.base.spacing} - ${fontSize.xxl});\n overflow: auto;\n `;\n});\n\nStyledDrawerListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledLoading = styled.div`\n font-size: 2rem;\n`;\n\n/* Main content region styles */\n\nexport const StyledAppMain = styled.main<{\n appHeader: boolean;\n mobileNav: boolean;\n headerOffset?: number;\n}>(({ appHeader, mobileNav, headerOffset = 0, theme }) => {\n const heightOffset = appHeader || mobileNav ? headerHeight : '0rem';\n\n return css`\n --appshell-offset: ${headerOffset}px;\n position: relative;\n margin-inline-start: ${mobileNav ? 0 : navWidth};\n min-height: calc(100vh - ${heightOffset});\n background-color: ${theme.base.palette['app-background']};\n\n :focus {\n outline: none;\n }\n\n @media (min-width: ${theme.base.breakpoints.xl}) {\n margin-inline-start: ${navOpenWidth};\n }\n\n ${!mobileNav &&\n css`\n transition: margin-inline-start\n ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};\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\n/* AppShellList styles */\nexport const StyledAppShellListWrapper = styled.div(({ theme }) => {\n return css`\n max-height: 100%;\n white-space: nowrap;\n\n ${StyledSummaryItem} {\n position: relative;\n &::after {\n content: '';\n position: absolute;\n top: calc(100% - 0.03125rem);\n inset-inline-end: 1rem;\n inset-inline-start: 1rem;\n height: 0.0625rem;\n background-color: ${theme.base.colors.gray['extra-dark']};\n }\n }\n `;\n});\n\nStyledAppShellListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellList = styled.ul``;\n\nStyledAppShellList.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellSummaryItem = styled.div(({ theme }) => {\n return css`\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n color: inherit;\n background-color: transparent;\n border: none;\n text-decoration: none;\n cursor: pointer;\n text-align: start;\n white-space: normal;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledAppShellSummaryItem.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellMetaList = styled.ul`\n li {\n color: inherit;\n }\n`;\n\nexport const StyledAppShellPinButton = styled.button(({ theme }) => {\n return css`\n color: inherit;\n border: none;\n background-color: transparent;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n `;\n});\n\nStyledAppShellPinButton.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationVisual = styled.span<{ unread?: boolean; visualIncluded?: boolean }>(\n ({ theme, unread, visualIncluded }) => {\n return css`\n position: relative;\n ${StyledAlert} {\n display: ${unread ? 'auto' : 'none'};\n position: absolute;\n inset-inline-start: -0.65625rem;\n top: ${visualIncluded ? 'calc(50% - 0.15625rem)' : '0.5rem'};\n background-color: ${theme.base.palette.light};\n height: 0.3125rem;\n width: 0.3125rem;\n } ;\n `;\n }\n);\n\nStyledNotificationVisual.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationPrimary = styled.span<{ unread?: boolean }>(({ theme, unread }) => {\n return css`\n font-weight: ${unread\n ? theme.base['font-weight'].bold\n : theme.base['font-weight']['semi-bold']};\n color: ${unread ? theme.base.palette.light : 'inherit'};\n `;\n});\n\nStyledNotificationPrimary.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationSecondary = styled.span<{ unread?: boolean }>(\n ({ theme, unread }) => {\n return css`\n ${StyledText} {\n opacity: ${unread\n ? theme.base.transparency['transparent-1']\n : theme.base.transparency['transparent-3']};\n }\n `;\n }\n);\n\nStyledNotificationSecondary.defaultProps = defaultThemeProp;\n\nexport const EmptyStateColorContrast = styled.div`\n ${StyledEmptyState} {\n span,\n svg {\n color: rgba(255, 255, 255, 0.7);\n }\n }\n`;\n\nexport const StyledAppShellListSection = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n border-top: 0.0625rem solid ${borderColor};\n min-height: max(20%, 8rem);\n overflow-y: auto;\n `;\n});\n\nStyledAppShellListSection.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellListHeading = styled.h3(({ theme }) => {\n return css`\n position: sticky;\n top: 0;\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n background-color: hsl(207 14% 13% / 1);\n z-index: 1;\n `;\n});\n\nStyledAppShellListHeading.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,GAAG,EAEH,cAAc,EAIf,MAAM,OAAO,CAAC;AAKf,OAAO,EACL,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,UAAU,EACX,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,cAAc;IAC5D,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IACl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AAC,CAAC,QAAQ,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,KAC7D,SAAS,aAEZ,OAAO,EACP,MAAM,KAAK,QAAQ,IAAI,KAAC,KAAK,IAAC,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,SAAS,WAAG,YACpE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import {\n FunctionComponent,\n forwardRef,\n Ref,\n PropsWithoutRef,\n SyntheticEvent,\n useState,\n useEffect,\n useMemo\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor, rgba } from 'polished';\n\nimport Image from '../Image';\nimport {\n BaseProps,\n ForwardProps,\n PropsWithDefaults,\n NoChildrenProp,\n OmitStrict\n} from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport Icon, { StyledIcon } from '../Icon';\nimport { Alert } from '../Badges';\nimport { useI18n } from '../../hooks';\nimport { tryCatch } from '../../utils';\n\nexport interface AvatarProps extends BaseProps, NoChildrenProp {\n /** The name of the identity the Avatar represents. */\n name: string;\n /** Content of the Avatar as an image source url. */\n imageSrc?: string;\n /** An icon to render as the content of the avatar. imageSrc will take precedence if passed. */\n icon?: string;\n /**\n * Shape of the Avatar.\n * @default \"circle\"\n */\n shape?: 'circle' | 'squircle';\n /**\n * Avatar size.\n * @default \"m\"\n */\n size?: 's' | 'm' | 'l';\n /** If defined, will render status icon on the avatar. */\n status?: 'active';\n /** Optional error handler in the event an image fails to load. */\n onImageError?: (err: SyntheticEvent<HTMLImageElement>) => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement | HTMLImageElement>;\n}\n\ntype AvatarPropsWithDefaults = PropsWithDefaults<AvatarProps, 'shape' | 'size'>;\n\nconst sizeToRem = {\n s: 1,\n m: 2,\n l: 2.5\n};\n\nconst fontSizeToRem = {\n s: 0.5625,\n m: 0.8125,\n l: 1\n};\n\nconst sizeToBorderRadius = {\n s: 0.25,\n m: 0.5,\n l: 1\n};\n\nexport const StyledAvatarImage = styled(Image)`\n min-height: 100%;\n min-width: 100%;\n aspect-ratio: 1 / 1;\n object-fit: cover;\n border-radius: inherit;\n`;\n\nexport const StyledAvatar = styled.div<\n OmitStrict<AvatarPropsWithDefaults, 'name' | 'children'> & {\n hasSrc?: boolean;\n hasBrokenImage?: boolean;\n }\n>(\n ({\n hasBrokenImage,\n hasSrc,\n size,\n shape,\n theme: {\n base: {\n palette: { 'foreground-color': foregroundColor, 'primary-background': primaryBackground }\n },\n components: { avatar }\n }\n }) => {\n const sizeRem = sizeToRem[size];\n const fontSize = fontSizeToRem[size];\n const backgroundColor =\n hasSrc && !hasBrokenImage ? primaryBackground : avatar['background-color'];\n const shadowColor = tryCatch(() => rgba(foregroundColor, 0.1));\n const color = tryCatch(() => readableColor(avatar['background-color']));\n\n return css`\n position: relative;\n background-color: ${backgroundColor};\n color: ${color};\n width: ${sizeRem}rem;\n height: ${sizeRem}rem;\n min-width: ${sizeRem}rem;\n min-height: ${sizeRem}rem;\n font-size: ${fontSize}rem;\n text-transform: uppercase;\n line-height: ${sizeRem}rem;\n text-align: center;\n display: inline-block;\n border-radius: 100%;\n user-select: none;\n -webkit-user-select: none;\n\n ${shape === 'squircle' &&\n css`\n border-radius: calc(${sizeToBorderRadius[size]} * ${avatar['border-radius']});\n `}\n\n ${StyledIcon} {\n width: 50%;\n height: 100%;\n vertical-align: initial;\n }\n\n ::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n box-shadow: inset 0 0 0 0.0625rem ${shadowColor};\n }\n `;\n }\n);\n\nStyledAvatar.defaultProps = defaultThemeProp;\n\nexport const StyledStatus = styled.div<Pick<AvatarPropsWithDefaults, 'size'>>(({ size, theme }) => {\n /** Scales alert badge dimensions based on size of avatar */\n const sizeDimensions = (0.625 * sizeToRem[size]) / sizeToRem.m;\n\n return css`\n position: absolute;\n height: ${sizeDimensions}rem;\n width: ${sizeDimensions}rem;\n inset-block-end: 0;\n inset-inline-end: 0;\n z-index: 1;\n animation: pop calc(${theme.base.animation.speed} * 2) cubic-bezier(1, 1.65, 0.3, 1.24);\n\n @keyframes pop {\n 0% {\n opacity: 0;\n transform: scale(0);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(1);\n }\n }\n `;\n});\n\nStyledStatus.defaultProps = defaultThemeProp;\n\n/**\n * Helper function to construct a two or one letter initial from the title prop.\n * This text will be displayed if no valid image source is provided.\n * @param name\n * @param size\n */\nconst getInitials = (name: AvatarProps['name'], size: AvatarProps['size']) => {\n const words = name.split(' ');\n const firstInitial = words[0].slice(0, 1);\n\n return words.length === 1 || size === 's'\n ? firstInitial\n : `${firstInitial}${words[1].slice(0, 1)}`;\n};\n\n/**\n * Generally, avatars are used to distinguish between different operators and\n * objects when they are shown in a list or in a small space. Users of applications\n * can upload a custom avatar of their choice.\n */\nconst Avatar: FunctionComponent<AvatarProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<AvatarProps>, ref: Ref<HTMLDivElement | HTMLImageElement>) => {\n const {\n shape = 'circle',\n size = 'm',\n imageSrc,\n icon,\n name,\n status,\n onImageError,\n ...restProps\n } = props;\n const [hasBrokenImage, setHasBrokenImage] = useState<undefined | boolean>();\n const t = useI18n();\n\n useEffect(() => {\n setHasBrokenImage(undefined);\n }, [imageSrc]);\n\n const content = useMemo(() => {\n if (icon) {\n return <Icon name={icon} />;\n }\n if (imageSrc && !hasBrokenImage) {\n return (\n <StyledAvatarImage\n src={imageSrc}\n alt={name}\n onError={(e: SyntheticEvent<HTMLImageElement>) => {\n setHasBrokenImage(true);\n onImageError?.(e);\n }}\n onLoad={() => {\n setHasBrokenImage(false);\n }}\n />\n );\n }\n return getInitials(name, size);\n }, [imageSrc, name, size, icon, hasBrokenImage, onImageError]);\n\n return (\n <StyledAvatar\n role='img'\n hasSrc={!!imageSrc}\n hasBrokenImage={hasBrokenImage}\n shape={shape}\n size={size}\n ref={ref}\n aria-label={`${name}${status ? ` ${t('status')} ${status}` : ''}`}\n {...restProps}\n >\n {content}\n {status === 'active' && <Alert as={StyledStatus} size={size} variant='success' />}\n </StyledAvatar>\n );\n }\n);\n\nexport default Avatar;\n"]}
|
|
1
|
+
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAIV,QAAQ,EACR,SAAS,EACT,OAAO,EACR,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,KAAK,MAAM,UAAU,CAAC;AAQ7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA6BvC,MAAM,SAAS,GAAG;IAChB,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,GAAG;CACP,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACzB,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;;;;;CAM7C,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAMpC,CAAC,EACC,cAAc,EAC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 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor, rgba } from 'polished';\n\nimport Image from '../Image';\nimport {\n BaseProps,\n ForwardProps,\n PropsWithDefaults,\n NoChildrenProp,\n OmitStrict\n} from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport Icon, { StyledIcon } from '../Icon';\nimport { Alert } from '../Badges';\nimport { useI18n } from '../../hooks';\nimport { tryCatch } from '../../utils';\n\nexport interface AvatarProps extends BaseProps, NoChildrenProp {\n /** The name of the identity the Avatar represents. */\n name: string;\n /** Content of the Avatar as an image source url. */\n imageSrc?: string;\n /** An icon to render as the content of the avatar. imageSrc will take precedence if passed. */\n icon?: string;\n /**\n * Shape of the Avatar.\n * @default \"circle\"\n */\n shape?: 'circle' | 'squircle';\n /**\n * Avatar size.\n * @default \"m\"\n */\n size?: 's' | 'm' | 'l';\n /** If defined, will render status icon on the avatar. */\n status?: 'active';\n /** Optional error handler in the event an image fails to load. */\n onImageError?: (err: SyntheticEvent<HTMLImageElement>) => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement | HTMLImageElement>;\n}\n\ntype AvatarPropsWithDefaults = PropsWithDefaults<AvatarProps, 'shape' | 'size'>;\n\nconst sizeToRem = {\n s: 1,\n m: 2,\n l: 2.5\n};\n\nconst fontSizeToRem = {\n s: 0.5625,\n m: 0.8125,\n l: 1\n};\n\nconst sizeToBorderRadius = {\n s: 0.25,\n m: 0.5,\n l: 1\n};\n\nexport const StyledAvatarImage = styled(Image)`\n min-height: 100%;\n min-width: 100%;\n aspect-ratio: 1 / 1;\n object-fit: cover;\n border-radius: inherit;\n`;\n\nexport const StyledAvatar = styled.div<\n OmitStrict<AvatarPropsWithDefaults, 'name' | 'children'> & {\n hasSrc?: boolean;\n hasBrokenImage?: boolean;\n }\n>(\n ({\n hasBrokenImage,\n hasSrc,\n size,\n shape,\n theme: {\n base: {\n palette: { 'foreground-color': foregroundColor, 'primary-background': primaryBackground }\n },\n components: { avatar }\n }\n }) => {\n const sizeRem = sizeToRem[size];\n const fontSize = fontSizeToRem[size];\n const backgroundColor =\n hasSrc && !hasBrokenImage ? primaryBackground : avatar['background-color'];\n const shadowColor = tryCatch(() => rgba(foregroundColor, 0.1));\n const color = tryCatch(() => readableColor(avatar['background-color']));\n\n return css`\n position: relative;\n background-color: ${backgroundColor};\n color: ${color};\n width: ${sizeRem}rem;\n height: ${sizeRem}rem;\n min-width: ${sizeRem}rem;\n min-height: ${sizeRem}rem;\n font-size: ${fontSize}rem;\n text-transform: uppercase;\n line-height: ${sizeRem}rem;\n text-align: center;\n vertical-align: top;\n display: inline-block;\n border-radius: 100%;\n user-select: none;\n -webkit-user-select: none;\n\n ${shape === 'squircle' &&\n css`\n border-radius: calc(${sizeToBorderRadius[size]} * ${avatar['border-radius']});\n `}\n\n ${StyledIcon} {\n width: 50%;\n height: 100%;\n vertical-align: initial;\n }\n\n ::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n box-shadow: inset 0 0 0 0.0625rem ${shadowColor};\n }\n `;\n }\n);\n\nStyledAvatar.defaultProps = defaultThemeProp;\n\nexport const StyledStatus = styled.div<Pick<AvatarPropsWithDefaults, 'size'>>(({ size, theme }) => {\n /** Scales alert badge dimensions based on size of avatar */\n const sizeDimensions = (0.625 * sizeToRem[size]) / sizeToRem.m;\n\n return css`\n position: absolute;\n height: ${sizeDimensions}rem;\n width: ${sizeDimensions}rem;\n inset-block-end: 0;\n inset-inline-end: 0;\n z-index: 1;\n animation: pop calc(${theme.base.animation.speed} * 2) cubic-bezier(1, 1.65, 0.3, 1.24);\n\n @keyframes pop {\n 0% {\n opacity: 0;\n transform: scale(0);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(1);\n }\n }\n `;\n});\n\nStyledStatus.defaultProps = defaultThemeProp;\n\n/**\n * Helper function to construct a two or one letter initial from the title prop.\n * This text will be displayed if no valid image source is provided.\n * @param name\n * @param size\n */\nconst getInitials = (name: AvatarProps['name'], size: AvatarProps['size']) => {\n const words = name.split(' ');\n const firstInitial = words[0].slice(0, 1);\n\n return words.length === 1 || size === 's'\n ? firstInitial\n : `${firstInitial}${words[1].slice(0, 1)}`;\n};\n\n/**\n * Generally, avatars are used to distinguish between different operators and\n * objects when they are shown in a list or in a small space. Users of applications\n * can upload a custom avatar of their choice.\n */\nconst Avatar: FunctionComponent<AvatarProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<AvatarProps>, ref: Ref<HTMLDivElement | HTMLImageElement>) => {\n const {\n shape = 'circle',\n size = 'm',\n imageSrc,\n icon,\n name,\n status,\n onImageError,\n ...restProps\n } = props;\n const [hasBrokenImage, setHasBrokenImage] = useState<undefined | boolean>();\n const t = useI18n();\n\n useEffect(() => {\n setHasBrokenImage(undefined);\n }, [imageSrc]);\n\n const content = useMemo(() => {\n if (icon) {\n return <Icon name={icon} />;\n }\n if (imageSrc && !hasBrokenImage) {\n return (\n <StyledAvatarImage\n src={imageSrc}\n alt={name}\n onError={(e: SyntheticEvent<HTMLImageElement>) => {\n setHasBrokenImage(true);\n onImageError?.(e);\n }}\n onLoad={() => {\n setHasBrokenImage(false);\n }}\n />\n );\n }\n return getInitials(name, size);\n }, [imageSrc, name, size, icon, hasBrokenImage, onImageError]);\n\n return (\n <StyledAvatar\n role='img'\n hasSrc={!!imageSrc}\n hasBrokenImage={hasBrokenImage}\n shape={shape}\n size={size}\n ref={ref}\n aria-label={`${name}${status ? ` ${t('status')} ${status}` : ''}`}\n {...restProps}\n >\n {content}\n {status === 'active' && <Alert as={StyledStatus} size={size} variant='success' />}\n </StyledAvatar>\n );\n }\n);\n\nexport default Avatar;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BareButton.d.ts","sourceRoot":"","sources":["../../../src/components/Button/BareButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"BareButton.d.ts","sourceRoot":"","sources":["../../../src/components/Button/BareButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,sCAAsC;IACtC,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACnC,wFAAwF;IACxF,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,6CAA6C;IAC7C,GAAG,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,4GAU5B,CAAC;AAIF,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CA6CjE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useRef } from 'react';
|
|
2
|
+
import { forwardRef, useRef, useEffect } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { defaultThemeProp } from '../../theme';
|
|
5
5
|
import { useConsolidatedRef } from '../../hooks';
|
|
@@ -16,22 +16,22 @@ export const StyledBareButton = styled.button `
|
|
|
16
16
|
`;
|
|
17
17
|
StyledBareButton.defaultProps = defaultThemeProp;
|
|
18
18
|
const BareButton = forwardRef(({ type = 'button', disabled = false, href, ...restProps }, ref) => {
|
|
19
|
-
const
|
|
19
|
+
const mouseDownEvent = useRef();
|
|
20
20
|
const buttonRef = useConsolidatedRef(ref);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
return () => {
|
|
23
|
+
mouseDownEvent.current = undefined;
|
|
24
|
+
};
|
|
25
|
+
}, []);
|
|
21
26
|
return (_jsx(StyledBareButton, { ref: buttonRef, as: href ? 'a' : undefined, type: href ? undefined : type, disabled: disabled, ...restProps, href: href, onMouseDown: (e) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return handlerReturn;
|
|
26
|
-
}
|
|
27
|
-
shouldFocus.current = true;
|
|
27
|
+
restProps.onMouseDown?.(e);
|
|
28
|
+
e.persist();
|
|
29
|
+
mouseDownEvent.current = e;
|
|
28
30
|
}, onMouseUp: (e) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (shouldFocus.current) {
|
|
31
|
+
const shouldFocus = mouseDownEvent.current && !mouseDownEvent.current.defaultPrevented;
|
|
32
|
+
mouseDownEvent.current = undefined;
|
|
33
|
+
if (shouldFocus && buttonRef.current !== document.activeElement) {
|
|
33
34
|
buttonRef.current?.focus();
|
|
34
|
-
shouldFocus.current = false;
|
|
35
35
|
}
|
|
36
36
|
return restProps.onMouseUp?.(e);
|
|
37
37
|
} }, void 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BareButton.js","sourceRoot":"","sources":["../../../src/components/Button/BareButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,MAAM,
|
|
1
|
+
{"version":3,"file":"BareButton.js","sourceRoot":"","sources":["../../../src/components/Button/BareButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,MAAM,EAMN,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAuBjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;;;;2BAQlB,KAAK,CAAC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S,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;aAC5B;YAED,OAAQ,SAAS,CAAC,SAA2C,EAAE,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC,WACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import {\n forwardRef,\n useRef,\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n MouseEvent,\n MouseEventHandler,\n useEffect\n} from 'react';\nimport styled from 'styled-components';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { useConsolidatedRef } from '../../hooks';\n\nimport { ButtonProps } from './Button';\n\nexport interface BareButtonProps extends BaseProps {\n /** Text or content for the Button. */\n children: ButtonProps['children'];\n /**\n * Determines if the Button will be disabled.\n * @default false\n */\n disabled?: ButtonProps['disabled'];\n /** A location to navigate to. Passing an href will render a Link styled as a Button. */\n href?: ButtonProps['href'];\n /**\n * Controls the behavior of a Button within a Form.\n * @default \"button\"\n */\n type?: ButtonProps['type'];\n /** Ref forwarded to the wrapping element. */\n ref?: ButtonProps['ref'];\n}\n\nexport const StyledBareButton = styled.button`\n background: none;\n border: none;\n outline: none;\n cursor: pointer;\n user-select: none;\n\n & + & {\n margin-inline-start: ${props => props.theme.base.spacing};\n }\n`;\n\nStyledBareButton.defaultProps = defaultThemeProp;\n\nconst BareButton: FunctionComponent<BareButtonProps & ForwardProps> = forwardRef(\n (\n {\n type = 'button',\n disabled = false,\n href,\n ...restProps\n }: PropsWithoutRef<BareButtonProps> & ForwardProps,\n ref: Ref<HTMLButtonElement>\n ) => {\n const mouseDownEvent = useRef<MouseEvent>();\n const buttonRef = useConsolidatedRef(ref);\n\n useEffect(() => {\n return () => {\n mouseDownEvent.current = undefined;\n };\n }, []);\n\n return (\n <StyledBareButton\n ref={buttonRef}\n as={href ? ('a' as any) : undefined}\n type={href ? undefined : type}\n disabled={disabled}\n {...restProps}\n href={href}\n onMouseDown={(e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n (restProps.onMouseDown as MouseEventHandler | undefined)?.(e);\n e.persist();\n mouseDownEvent.current = e;\n }}\n onMouseUp={(e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n const shouldFocus = mouseDownEvent.current && !mouseDownEvent.current.defaultPrevented;\n mouseDownEvent.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 );\n }\n);\n\nexport default BareButton;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EACjB,SAAS,EAET,GAAG,EAGJ,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWjF,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;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED,aAAK,uBAAuB,GAAG,iBAAiB,CAC9C,WAAW,EACX,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CACrD,CAAC;AAEF,eAAO,MAAM,YAAY,iIAyNxB,CAAC;AAIF,QAAA,MAAM,MAAM,EAAE,iBAAiB,CAAC,WAAW,GAAG,YAAY,CAwEzD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, forwardRef } from 'react';
|
|
2
|
+
import { useRef, useEffect, forwardRef } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
import { mix, readableColor } from 'polished';
|
|
5
5
|
import { defaultThemeProp } from '../../theme';
|
|
@@ -196,23 +196,23 @@ export const StyledButton = styled.button.withConfig(omitProps('loading'))(({ va
|
|
|
196
196
|
StyledButton.defaultProps = defaultThemeProp;
|
|
197
197
|
const Button = forwardRef(({ variant = 'secondary', type = 'button', disabled = false, icon = false, compact = false, href, as, forwardedAs, label, 'aria-label': ariaLabel, loading = false, children, ...restProps }, ref) => {
|
|
198
198
|
const [buttonEl, setButtonEl] = useElement();
|
|
199
|
-
const
|
|
199
|
+
const mouseDownEvent = useRef();
|
|
200
200
|
const buttonRef = useConsolidatedRef(ref, setButtonEl);
|
|
201
201
|
const showProgress = loading && variant !== 'link' && variant !== 'text';
|
|
202
|
+
useEffect(() => {
|
|
203
|
+
return () => {
|
|
204
|
+
mouseDownEvent.current = undefined;
|
|
205
|
+
};
|
|
206
|
+
}, []);
|
|
202
207
|
return (_jsxs(_Fragment, { children: [_jsxs(StyledButton, { ...restProps, ref: buttonRef, as: as || (href ? 'a' : 'button'), forwardedAs: forwardedAs || (href ? 'a' : 'button'), variant: variant, icon: icon, compact: compact, type: href ? undefined : type, href: href, disabled: disabled && !href, loading: showProgress, "aria-label": ariaLabel || label, onMouseDown: (e) => {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return handlerReturn;
|
|
207
|
-
}
|
|
208
|
-
shouldFocus.current = true;
|
|
208
|
+
restProps.onMouseDown?.(e);
|
|
209
|
+
e.persist();
|
|
210
|
+
mouseDownEvent.current = e;
|
|
209
211
|
}, onMouseUp: (e) => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
if (shouldFocus.current) {
|
|
212
|
+
const shouldFocus = mouseDownEvent.current && !mouseDownEvent.current.defaultPrevented;
|
|
213
|
+
mouseDownEvent.current = undefined;
|
|
214
|
+
if (shouldFocus && buttonRef.current !== document.activeElement) {
|
|
214
215
|
buttonRef.current?.focus();
|
|
215
|
-
shouldFocus.current = false;
|
|
216
216
|
}
|
|
217
217
|
return restProps.onMouseUp?.(e);
|
|
218
218
|
}, children: [showProgress && _jsx(Progress, { variant: 'ring', placement: 'local' }, void 0), children] }, void 0), buttonEl && label && (_jsx(Tooltip, { target: buttonEl, showDelay: 'none', hideDelay: 'none', describeTarget: false, children: label }, void 0))] }, void 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,UAAU,EAOX,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,M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react';\nimport styled, { css } from 'styled-components';\nimport { mix, readableColor } from 'polished';\n\nimport { BaseProps, ForwardProps, PropsWithDefaults, AsProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { getHoverColors, omitProps } 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 /**\n * The label text will be used inside a Tooltip.\n */\n label?: string;\n /**\n * The aria label text will be inserted as the aria-label on the Button.\n */\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>;\n}\n\ntype ButtonPropsWithDefaults = PropsWithDefaults<\n ButtonProps,\n 'variant' | 'type' | 'disabled' | 'icon' | 'loading'\n>;\n\nexport const StyledButton = styled.button.withConfig<ButtonPropsWithDefaults>(omitProps('loading'))(\n ({\n variant,\n icon,\n loading,\n compact,\n theme: {\n base: {\n spacing,\n 'border-radius': baseBorderRadius,\n palette: { 'primary-background': backgroundColor, 'foreground-color': textColor },\n 'hit-area': {\n 'mouse-min': hitAreaMouse,\n 'finger-min': hitAreaFinger,\n 'compact-min': hitAreaCompact\n },\n animation: {\n speed,\n timing: { ease }\n },\n 'disabled-opacity': disabledOpacity\n },\n components: {\n button: {\n color,\n 'secondary-color': secondaryColor,\n padding,\n 'border-radius': borderRadius,\n 'border-width': borderWidth,\n 'focus-shadow': focusShadow,\n touch: { padding: touchPadding }\n },\n link: { color: linkColor }\n }\n }\n }) => {\n const borderColor = variant === 'secondary' ? color : 'transparent';\n const contrastColor = tryCatch(() => readableColor(color));\n\n const hoverColors = getHoverColors(color);\n const hoverPrimaryColor = hoverColors.background;\n const hoverContrastColor = hoverColors.foreground;\n\n const secondaryHoverColor = tryCatch(() => mix(0.85, secondaryColor, color));\n\n let buttonColor = contrastColor;\n let buttonBackgroundColor = color;\n if (variant === 'secondary') {\n buttonColor = color;\n buttonBackgroundColor = secondaryColor;\n } else if (variant === 'simple') {\n if (icon) {\n buttonColor = 'currentColor';\n buttonBackgroundColor = 'transparent';\n } else {\n buttonColor = color;\n buttonBackgroundColor = backgroundColor;\n }\n } else if (variant === 'link') {\n buttonColor = linkColor;\n buttonBackgroundColor = 'transparent';\n } else if (variant === 'text') {\n buttonColor = textColor;\n buttonBackgroundColor = 'transparent';\n }\n\n return css`\n color: ${buttonColor};\n background-color: ${buttonBackgroundColor};\n display: ${variant === 'link' || variant === 'text' ? 'inline' : 'inline-flex'};\n align-items: center;\n outline: none;\n text-decoration: none;\n transition: all calc(0.5 * ${speed}) ${ease};\n cursor: pointer;\n\n ${variant !== 'link' && variant !== 'text'\n ? css`\n justify-content: center;\n line-height: 1;\n border: ${borderWidth} solid ${borderColor};\n position: relative;\n `\n : css`\n text-align: start;\n border: none;\n\n > ${StyledIcon} {\n vertical-align: bottom;\n }\n `}\n\n & + & {\n margin-inline-start: ${spacing};\n }\n\n /* Not able to combine with selector above. Stylis bug? */\n & + ${StyledPopover} + & {\n margin-inline-start: ${spacing};\n }\n\n @media (hover: hover) {\n &:hover {\n ${variant === 'primary' &&\n css`\n background-color: ${hoverPrimaryColor};\n color: ${hoverContrastColor};\n text-decoration: none;\n `}\n\n ${(variant === 'secondary' || (variant === 'simple' && !icon)) &&\n css`\n background-color: ${secondaryHoverColor};\n text-decoration: none;\n `}\n\n ${variant === 'simple' &&\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.15;\n }\n `}\n\n ${(variant === 'link' || variant === 'text') &&\n css`\n text-decoration: underline;\n `}\n }\n }\n\n ${variant !== 'link' &&\n variant !== 'text' &&\n css`\n min-height: ${hitAreaMouse};\n min-width: ${hitAreaMouse};\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n -webkit-user-select: none;\n user-select: none;\n `}\n\n ${compact &&\n css`\n min-height: ${hitAreaCompact};\n min-width: ${hitAreaCompact};\n `}\n\n ${!icon &&\n variant !== 'link' &&\n variant !== 'text' &&\n css`\n padding: ${padding};\n `}\n\n ${variant !== 'link' &&\n variant !== 'text' &&\n css`\n @media (pointer: coarse) {\n ${!compact &&\n css`\n min-height: ${hitAreaFinger};\n min-width: ${hitAreaFinger};\n `}\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n ${!icon &&\n css`\n padding: ${touchPadding};\n `}\n }\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 ${icon &&\n variant !== 'link' &&\n variant !== 'text' &&\n css`\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n > svg {\n display: block;\n }\n `}\n\n ${loading &&\n css`\n ${StyledBackdrop} {\n background-color: ${buttonBackgroundColor};\n border-radius: inherit;\n }\n ${StyledProgressRing} {\n width: 1em;\n height: 1em;\n circle:nth-child(2) {\n animation-duration: calc(${speed} * 2);\n }\n }\n `}\n `;\n }\n);\n\nStyledButton.defaultProps = defaultThemeProp;\n\nconst Button: FunctionComponent<ButtonProps & ForwardProps> = forwardRef(\n (\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 ...restProps\n }: PropsWithoutRef<ButtonProps> & ForwardProps,\n ref: Ref<HTMLButtonElement>\n ) => {\n const [buttonEl, setButtonEl] = useElement();\n const shouldFocus = useRef(false);\n const buttonRef = useConsolidatedRef<HTMLButtonElement>(ref, setButtonEl);\n const showProgress = loading && variant !== 'link' && variant !== 'text';\n\n return (\n <>\n <StyledButton\n {...restProps}\n ref={buttonRef}\n as={as || (href ? 'a' : 'button')}\n forwardedAs={forwardedAs || (href ? 'a' : 'button')}\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: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (restProps.onMouseDown) {\n const handlerReturn = (restProps.onMouseDown as MouseEventHandler)?.(e) as\n | false\n | void;\n\n if (handlerReturn === false || e.defaultPrevented) return handlerReturn;\n }\n\n shouldFocus.current = true;\n }}\n onMouseUp={(e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (buttonRef.current === document.activeElement) {\n shouldFocus.current = false;\n }\n\n if (shouldFocus.current) {\n buttonRef.current?.focus();\n shouldFocus.current = false;\n }\n\n return (restProps.onMouseUp as MouseEventHandler)?.(e);\n }}\n >\n {showProgress && <Progress variant='ring' placement='local' />}\n {children}\n </StyledButton>\n {buttonEl && label && (\n <Tooltip target={buttonEl} showDelay='none' hideDelay='none' describeTarget={false}>\n {label}\n </Tooltip>\n )}\n </>\n );\n }\n);\n\nexport default Button;\n"]}
|
|
1
|
+
{"version":3,"file":"Button.js","source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,EAAC,OAAO,WAAG,EAC7D,QAAQ,YACI,EACd,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,WACE,CACX,YACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import {\n useRef,\n useEffect,\n forwardRef,\n FunctionComponent,\n ReactNode,\n PropsWithoutRef,\n Ref,\n MouseEvent,\n MouseEventHandler\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport { mix, readableColor } from 'polished';\n\nimport { BaseProps, ForwardProps, PropsWithDefaults, AsProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { getHoverColors, omitProps } 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 /**\n * The label text will be used inside a Tooltip.\n */\n label?: string;\n /**\n * The aria label text will be inserted as the aria-label on the Button.\n */\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>;\n}\n\ntype ButtonPropsWithDefaults = PropsWithDefaults<\n ButtonProps,\n 'variant' | 'type' | 'disabled' | 'icon' | 'loading'\n>;\n\nexport const StyledButton = styled.button.withConfig<ButtonPropsWithDefaults>(omitProps('loading'))(\n ({\n variant,\n icon,\n loading,\n compact,\n theme: {\n base: {\n spacing,\n 'border-radius': baseBorderRadius,\n palette: { 'primary-background': backgroundColor, 'foreground-color': textColor },\n 'hit-area': {\n 'mouse-min': hitAreaMouse,\n 'finger-min': hitAreaFinger,\n 'compact-min': hitAreaCompact\n },\n animation: {\n speed,\n timing: { ease }\n },\n 'disabled-opacity': disabledOpacity\n },\n components: {\n button: {\n color,\n 'secondary-color': secondaryColor,\n padding,\n 'border-radius': borderRadius,\n 'border-width': borderWidth,\n 'focus-shadow': focusShadow,\n touch: { padding: touchPadding }\n },\n link: { color: linkColor }\n }\n }\n }) => {\n const borderColor = variant === 'secondary' ? color : 'transparent';\n const contrastColor = tryCatch(() => readableColor(color));\n\n const hoverColors = getHoverColors(color);\n const hoverPrimaryColor = hoverColors.background;\n const hoverContrastColor = hoverColors.foreground;\n\n const secondaryHoverColor = tryCatch(() => mix(0.85, secondaryColor, color));\n\n let buttonColor = contrastColor;\n let buttonBackgroundColor = color;\n if (variant === 'secondary') {\n buttonColor = color;\n buttonBackgroundColor = secondaryColor;\n } else if (variant === 'simple') {\n if (icon) {\n buttonColor = 'currentColor';\n buttonBackgroundColor = 'transparent';\n } else {\n buttonColor = color;\n buttonBackgroundColor = backgroundColor;\n }\n } else if (variant === 'link') {\n buttonColor = linkColor;\n buttonBackgroundColor = 'transparent';\n } else if (variant === 'text') {\n buttonColor = textColor;\n buttonBackgroundColor = 'transparent';\n }\n\n return css`\n color: ${buttonColor};\n background-color: ${buttonBackgroundColor};\n display: ${variant === 'link' || variant === 'text' ? 'inline' : 'inline-flex'};\n align-items: center;\n outline: none;\n text-decoration: none;\n transition: all calc(0.5 * ${speed}) ${ease};\n cursor: pointer;\n\n ${variant !== 'link' && variant !== 'text'\n ? css`\n justify-content: center;\n line-height: 1;\n border: ${borderWidth} solid ${borderColor};\n position: relative;\n `\n : css`\n text-align: start;\n border: none;\n\n > ${StyledIcon} {\n vertical-align: bottom;\n }\n `}\n\n & + & {\n margin-inline-start: ${spacing};\n }\n\n /* Not able to combine with selector above. Stylis bug? */\n & + ${StyledPopover} + & {\n margin-inline-start: ${spacing};\n }\n\n @media (hover: hover) {\n &:hover {\n ${variant === 'primary' &&\n css`\n background-color: ${hoverPrimaryColor};\n color: ${hoverContrastColor};\n text-decoration: none;\n `}\n\n ${(variant === 'secondary' || (variant === 'simple' && !icon)) &&\n css`\n background-color: ${secondaryHoverColor};\n text-decoration: none;\n `}\n\n ${variant === 'simple' &&\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.15;\n }\n `}\n\n ${(variant === 'link' || variant === 'text') &&\n css`\n text-decoration: underline;\n `}\n }\n }\n\n ${variant !== 'link' &&\n variant !== 'text' &&\n css`\n min-height: ${hitAreaMouse};\n min-width: ${hitAreaMouse};\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n -webkit-user-select: none;\n user-select: none;\n `}\n\n ${compact &&\n css`\n min-height: ${hitAreaCompact};\n min-width: ${hitAreaCompact};\n `}\n\n ${!icon &&\n variant !== 'link' &&\n variant !== 'text' &&\n css`\n padding: ${padding};\n `}\n\n ${variant !== 'link' &&\n variant !== 'text' &&\n css`\n @media (pointer: coarse) {\n ${!compact &&\n css`\n min-height: ${hitAreaFinger};\n min-width: ${hitAreaFinger};\n `}\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n ${!icon &&\n css`\n padding: ${touchPadding};\n `}\n }\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 ${icon &&\n variant !== 'link' &&\n variant !== 'text' &&\n css`\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n > svg {\n display: block;\n }\n `}\n\n ${loading &&\n css`\n ${StyledBackdrop} {\n background-color: ${buttonBackgroundColor};\n border-radius: inherit;\n }\n ${StyledProgressRing} {\n width: 1em;\n height: 1em;\n circle:nth-child(2) {\n animation-duration: calc(${speed} * 2);\n }\n }\n `}\n `;\n }\n);\n\nStyledButton.defaultProps = defaultThemeProp;\n\nconst Button: FunctionComponent<ButtonProps & ForwardProps> = forwardRef(\n (\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 ...restProps\n }: PropsWithoutRef<ButtonProps> & ForwardProps,\n ref: Ref<HTMLButtonElement>\n ) => {\n const [buttonEl, setButtonEl] = useElement();\n const mouseDownEvent = useRef<MouseEvent>();\n const buttonRef = useConsolidatedRef<HTMLButtonElement>(ref, setButtonEl);\n const showProgress = loading && variant !== 'link' && variant !== 'text';\n\n useEffect(() => {\n return () => {\n mouseDownEvent.current = undefined;\n };\n }, []);\n\n return (\n <>\n <StyledButton\n {...restProps}\n ref={buttonRef}\n as={as || (href ? 'a' : 'button')}\n forwardedAs={forwardedAs || (href ? 'a' : 'button')}\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: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n (restProps.onMouseDown as MouseEventHandler | undefined)?.(e);\n e.persist();\n mouseDownEvent.current = e;\n }}\n onMouseUp={(e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n const shouldFocus = mouseDownEvent.current && !mouseDownEvent.current.defaultPrevented;\n mouseDownEvent.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='local' />}\n {children}\n </StyledButton>\n {buttonEl && label && (\n <Tooltip target={buttonEl} showDelay='none' hideDelay='none' describeTarget={false}>\n {label}\n </Tooltip>\n )}\n </>\n );\n }\n);\n\nexport default Button;\n"]}
|
|
@@ -25,7 +25,7 @@ if (windowIsAvailable) {
|
|
|
25
25
|
if (!window[metaKey]) {
|
|
26
26
|
window[metaKey] = [];
|
|
27
27
|
}
|
|
28
|
-
window[metaKey].push({ version: '2.0.0-dev.21.
|
|
28
|
+
window[metaKey].push({ version: '2.0.0-dev.21.1' });
|
|
29
29
|
}
|
|
30
30
|
const Configuration = ({ context = ConfigurationContext, children, locale, direction, translations: customTranslations, theme, disableDefaultFontLoading, styleSheetTarget, portalTarget, overrideMap, renderNativeControls }) => {
|
|
31
31
|
const ctx = useContext(context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../src/components/Configuration/Configuration.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EAIV,OAAO,EACP,QAAQ,EACR,SAAS,EAEV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EAGrB,kBAAkB,EAClB,SAAS,IAAI,iBAAiB,EAC/B,MAAM,Y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AiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;YAC1F,YAAY;YACZ,YAAY;YACZ,CAAC,cAAc,CAAC,EAAE,IAAI;YACtB,gBAAgB,EAAE,gBAAgB,IAAI,GAAG,CAAC,gBAAgB;YAC1D,YAAY,EAAE,YAAY,IAAI,GAAG,CAAC,YAAY;YAC9C,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW;YACnF,oBAAoB,EAAE,oBAAoB,IAAI,GAAG,CAAC,oBAAoB;SACvE,YAED,KAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,YAAG,eAAe,WAAiB,WAC7C,CACjC,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC;AAE1C,eAAe,aAAa,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n FunctionComponent,\n ComponentType,\n ReactNode,\n useMemo,\n useState,\n useEffect,\n Context\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { ThemeProvider, StyleSheetManager } from 'styled-components';\n\nimport { GlobalStyle } from '../../styles';\nimport {\n ThemeMachine,\n BaseThemeMachine,\n DefaultSettableTheme,\n DefaultThemeDefinition\n} from '../../theme';\nimport {\n createTranslationPack,\n Translation,\n TranslationPack,\n DefaultTranslation,\n direction as directionOfLocale\n} from '../../i18n';\nimport { FileInputProps } from '../File';\nimport { windowIsAvailable, navigatorIsAvailable, documentIsAvailable } from '../../utils';\n\nexport interface ConfigurationProps {\n /**\n * Any components or nodes that should be impacted by the settings applied by this Configuration component.\n */\n children: ReactNode;\n /**\n * Context to read previous configuration values from.\n */\n context?: Context<ConfigurationContextValue>;\n /**\n * User locale as defined in [BCP-47](https://www.techonthenet.com/js/language_tags.php).\n */\n locale?: string;\n /**\n * Override rendering direction of the document. Direction will be based on the locale if now provided.\n */\n direction?: 'ltr' | 'rtl';\n /**\n * Object with (partial) translations.\n */\n translations?: Translation;\n /**\n * Theme object used to override any or all Cosmos theme properties.\n */\n theme?: DefaultSettableTheme;\n /**\n * Disables loading Open Sans from Google Fonts. Only takes effect on the root configuration.\n */\n disableDefaultFontLoading?: boolean;\n /**\n * Target element for loading styles related to `styled-components`.\n */\n styleSheetTarget?: HTMLElement;\n /**\n * Target element for rendering a `ReactDOM` portal.\n */\n portalTarget?: Element;\n /**\n * Override map to replace Cosmos components.\n */\n overrideMap?: {\n FileInput?: ComponentType<FileInputProps>;\n };\n /**\n * Use native HTML5 controls for inputs instead of rich ones.\n * @default false\n */\n renderNativeControls?: boolean;\n}\n\nconst initializedKey = Symbol.for('@pega/cosmos-react-core.configuration.initialized');\n\nexport interface ConfigurationContextValue {\n [initializedKey]: boolean;\n locale: string;\n direction: ConfigurationProps['direction'];\n translations: TranslationPack;\n themeMachine: ThemeMachine<DefaultThemeDefinition>;\n styleSheetTarget?: HTMLElement;\n portalTarget?: Element;\n overrideMap: NonNullable<ConfigurationProps['overrideMap']>;\n renderNativeControls: boolean;\n}\n\nconst defaultProps: Partial<ConfigurationProps> = {};\nconst defaultLocale = navigatorIsAvailable ? navigator.language : 'en';\n\nexport const ConfigurationContext = createContext<ConfigurationContextValue>({\n [initializedKey]: false,\n locale: defaultLocale,\n direction: directionOfLocale(defaultLocale),\n translations: DefaultTranslation,\n themeMachine: BaseThemeMachine,\n styleSheetTarget: documentIsAvailable ? document.head : undefined,\n portalTarget: documentIsAvailable ? document.body : undefined,\n overrideMap: {},\n renderNativeControls: false\n});\n\nconst metaKey = Symbol.for('@pega/cosmos-react-core.metadata');\n\ninterface CosmosMetadata {\n version: string;\n}\n\ndeclare global {\n interface Window {\n [metaKey]: CosmosMetadata[];\n }\n}\n\nif (windowIsAvailable) {\n if (!window[metaKey]) {\n window[metaKey] = [];\n }\n\n window[metaKey].push({ version: '2.0.0-dev.21.
|
|
1
|
+
{"version":3,"file":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C,qBAAqB,QAAC,MAAM,EAAE,gBAAgB,IAAI,GAAG,CAAC,gBAAgB,YACvF,8BACG,CAAC,yBAAyB;oBACzB,OAAO;oBACP,mBAAmB;oBACnB,YAAY,CACV,eACE,GAAG,EAAC,YAAY,EAChB,IAAI,EAAC,+GAA+G,WACpH,EACF,QAAQ,CAAC,IAAI,CACd,EACH,KAAC,WAAW,aAAG,EACd,QAAQ,YACR,WACe,CACrB,CAAC;IACF,OAAO,CACL,KAAC,oBAAoB,CAAC,QAAQ,IAC5B,KAAK,EAAE;YACL,MAAM,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM;YAC5B,SAAS,EAAE,SAAS,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;YAC1F,YAAY;YACZ,YAAY;YACZ,CAAC,cAAc,CAAC,EAAE,IAAI;YACtB,gBAAgB,EAAE,gBAAgB,IAAI,GAAG,CAAC,gBAAgB;YAC1D,YAAY,EAAE,YAAY,IAAI,GAAG,CAAC,YAAY;YAC9C,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW;YACnF,oBAAoB,EAAE,oBAAoB,IAAI,GAAG,CAAC,oBAAoB;SACvE,YAED,KAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,YAAG,eAAe,WAAiB,WAC7C,CACjC,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC;AAE1C,eAAe,aAAa,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n FunctionComponent,\n ComponentType,\n ReactNode,\n useMemo,\n useState,\n useEffect,\n Context\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { ThemeProvider, StyleSheetManager } from 'styled-components';\n\nimport { GlobalStyle } from '../../styles';\nimport {\n ThemeMachine,\n BaseThemeMachine,\n DefaultSettableTheme,\n DefaultThemeDefinition\n} from '../../theme';\nimport {\n createTranslationPack,\n Translation,\n TranslationPack,\n DefaultTranslation,\n direction as directionOfLocale\n} from '../../i18n';\nimport { FileInputProps } from '../File';\nimport { windowIsAvailable, navigatorIsAvailable, documentIsAvailable } from '../../utils';\n\nexport interface ConfigurationProps {\n /**\n * Any components or nodes that should be impacted by the settings applied by this Configuration component.\n */\n children: ReactNode;\n /**\n * Context to read previous configuration values from.\n */\n context?: Context<ConfigurationContextValue>;\n /**\n * User locale as defined in [BCP-47](https://www.techonthenet.com/js/language_tags.php).\n */\n locale?: string;\n /**\n * Override rendering direction of the document. Direction will be based on the locale if now provided.\n */\n direction?: 'ltr' | 'rtl';\n /**\n * Object with (partial) translations.\n */\n translations?: Translation;\n /**\n * Theme object used to override any or all Cosmos theme properties.\n */\n theme?: DefaultSettableTheme;\n /**\n * Disables loading Open Sans from Google Fonts. Only takes effect on the root configuration.\n */\n disableDefaultFontLoading?: boolean;\n /**\n * Target element for loading styles related to `styled-components`.\n */\n styleSheetTarget?: HTMLElement;\n /**\n * Target element for rendering a `ReactDOM` portal.\n */\n portalTarget?: Element;\n /**\n * Override map to replace Cosmos components.\n */\n overrideMap?: {\n FileInput?: ComponentType<FileInputProps>;\n };\n /**\n * Use native HTML5 controls for inputs instead of rich ones.\n * @default false\n */\n renderNativeControls?: boolean;\n}\n\nconst initializedKey = Symbol.for('@pega/cosmos-react-core.configuration.initialized');\n\nexport interface ConfigurationContextValue {\n [initializedKey]: boolean;\n locale: string;\n direction: ConfigurationProps['direction'];\n translations: TranslationPack;\n themeMachine: ThemeMachine<DefaultThemeDefinition>;\n styleSheetTarget?: HTMLElement;\n portalTarget?: Element;\n overrideMap: NonNullable<ConfigurationProps['overrideMap']>;\n renderNativeControls: boolean;\n}\n\nconst defaultProps: Partial<ConfigurationProps> = {};\nconst defaultLocale = navigatorIsAvailable ? navigator.language : 'en';\n\nexport const ConfigurationContext = createContext<ConfigurationContextValue>({\n [initializedKey]: false,\n locale: defaultLocale,\n direction: directionOfLocale(defaultLocale),\n translations: DefaultTranslation,\n themeMachine: BaseThemeMachine,\n styleSheetTarget: documentIsAvailable ? document.head : undefined,\n portalTarget: documentIsAvailable ? document.body : undefined,\n overrideMap: {},\n renderNativeControls: false\n});\n\nconst metaKey = Symbol.for('@pega/cosmos-react-core.metadata');\n\ninterface CosmosMetadata {\n version: string;\n}\n\ndeclare global {\n interface Window {\n [metaKey]: CosmosMetadata[];\n }\n}\n\nif (windowIsAvailable) {\n if (!window[metaKey]) {\n window[metaKey] = [];\n }\n\n window[metaKey].push({ version: '2.0.0-dev.21.1' });\n}\n\nconst Configuration: FunctionComponent<ConfigurationProps> = ({\n context = ConfigurationContext,\n children,\n locale,\n direction,\n translations: customTranslations,\n theme,\n disableDefaultFontLoading,\n styleSheetTarget,\n portalTarget,\n overrideMap,\n renderNativeControls\n}: ConfigurationProps) => {\n const ctx = useContext(context);\n const themeMachine = theme\n ? new ThemeMachine<DefaultThemeDefinition>({ theme, parent: ctx.themeMachine })\n : ctx.themeMachine;\n const translations = useMemo(\n () => createTranslationPack({ ...ctx.translations, ...customTranslations }),\n [ctx.translations, customTranslations]\n );\n\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n const wrappedChildren = ctx[initializedKey] ? (\n children\n ) : (\n <StyleSheetManager disableVendorPrefixes target={styleSheetTarget ?? ctx.styleSheetTarget}>\n <>\n {!disableDefaultFontLoading &&\n mounted &&\n documentIsAvailable &&\n createPortal(\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap'\n />,\n document.head\n )}\n <GlobalStyle />\n {children}\n </>\n </StyleSheetManager>\n );\n return (\n <ConfigurationContext.Provider\n value={{\n locale: locale ?? ctx.locale,\n direction: direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),\n translations,\n themeMachine,\n [initializedKey]: true,\n styleSheetTarget: styleSheetTarget ?? ctx.styleSheetTarget,\n portalTarget: portalTarget ?? ctx.portalTarget,\n overrideMap: overrideMap ? { ...ctx.overrideMap, ...overrideMap } : ctx.overrideMap,\n renderNativeControls: renderNativeControls ?? ctx.renderNativeControls\n }}\n >\n <ThemeProvider theme={themeMachine.theme}>{wrappedChildren}</ThemeProvider>\n </ConfigurationContext.Provider>\n );\n};\n\nConfiguration.defaultProps = defaultProps;\n\nexport default Configuration;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Picker/Calendar.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,4UA0CrB,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGA2B5B,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAkB3B,CAAC;AAIH,eAAO,MAAM,iBAAiB,0GAI7B,CAAC;AAIF,eAAO,MAAM,gBAAgB,yGAE5B,CAAC;AAEF,eAAO,MAAM,SAAS;aAAiC,OAAO;iBAAe,OAAO;SA4BlF,CAAC;AAIH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"Calendar.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Picker/Calendar.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,4UA0CrB,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGA2B5B,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAkB3B,CAAC;AAIH,eAAO,MAAM,iBAAiB,0GAI7B,CAAC;AAIF,eAAO,MAAM,gBAAgB,yGAE5B,CAAC;AAEF,eAAO,MAAM,SAAS;aAAiC,OAAO;iBAAe,OAAO;SA4BlF,CAAC;AAIH,eAAO,MAAM,eAAe,0GAc1B,CAAC;AAIH,eAAO,MAAM,gBAAgB,0GAoB3B,CAAC;AAIH,eAAO,MAAM,cAAc,2GAoBzB,CAAC;AAIH,eAAO,MAAM,cAAc,2GA2CzB,CAAC"}
|
|
@@ -99,21 +99,30 @@ export const StyledDay = styled(StyledPick)(props => {
|
|
|
99
99
|
});
|
|
100
100
|
StyledDay.defaultProps = defaultThemeProp;
|
|
101
101
|
export const StyledWeekLabel = styled(StyledColumnLabel)(props => {
|
|
102
|
-
const { theme: { base: { spacing } } } = props;
|
|
102
|
+
const { theme: { base: { spacing, breakpoints } } } = props;
|
|
103
103
|
return css `
|
|
104
|
-
margin-inline-end:
|
|
104
|
+
margin-inline-end: 0;
|
|
105
|
+
|
|
106
|
+
@media (min-width: ${breakpoints.sm}) {
|
|
107
|
+
margin-inline-end: ${spacing};
|
|
108
|
+
}
|
|
105
109
|
`;
|
|
106
110
|
});
|
|
107
111
|
StyledWeekLabel.defaultProps = defaultThemeProp;
|
|
108
112
|
export const StyledWeekNumber = styled.span(props => {
|
|
109
|
-
const { theme: { base: { spacing, colors, 'disabled-opacity': disabledOpacity } } } = props;
|
|
113
|
+
const { theme: { base: { breakpoints, spacing, colors, 'disabled-opacity': disabledOpacity } } } = props;
|
|
110
114
|
return css `
|
|
111
115
|
line-height: 2.625rem;
|
|
112
|
-
padding: 0
|
|
113
|
-
margin-inline-end:
|
|
116
|
+
padding: 0;
|
|
117
|
+
margin-inline-end: 0;
|
|
114
118
|
background-color: ${colors.gray['extra-light']};
|
|
115
119
|
display: inline-block;
|
|
116
120
|
opacity: ${disabledOpacity};
|
|
121
|
+
|
|
122
|
+
@media (min-width: ${breakpoints.sm}) {
|
|
123
|
+
padding: 0 ${spacing};
|
|
124
|
+
margin-inline-end: ${spacing};
|
|
125
|
+
}
|
|
117
126
|
`;
|
|
118
127
|
});
|
|
119
128
|
StyledWeekNumber.defaultProps = defaultThemeProp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.styles.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Picker/Calendar.styles.ts"],"names":[],"mappings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M,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,eAAe,EAAE,EAC5E,EACF,GAAG,KAAK,CAAC;IAEV,OAAO,GAAG,CAAA;;;;wBAIY,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;;eAEnC,eAAe;;yBAEL,WAAW,CAAC,EAAE;mBACpB,OAAO;2BACC,OAAO;;GAE/B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjD,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,GAAG,KAAK,CAAC;IACV,OAAO,GAAG,CAAA;;;;;;;0BAOc,OAAO;;;MAG3B,UAAU;2BACW,OAAO;;GAE/B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjD,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EACjD,EACF,GAAG,KAAK,CAAC;IACV,OAAO,GAAG,CAAA;;;;;;;;;;;0BAWc,OAAO;;;;;;;;QAQzB,SAAS;;;;;;;UAOP,gBAAgB;sCACY,YAAY,gBAAgB,YAAY;;;;UAIpE,gBAAgB;0CACgB,YAAY,gBAAgB,YAAY;;;;GAI/E,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { hideVisually, rgba as polishedRgba } from 'polished';\n\nimport { defaultThemeProp } from '../../../theme';\nimport { StyledSelect } from '../../Select/Select';\nimport { StyledButton } from '../../Button';\nimport { tryCatch } from '../../../utils';\n\nexport const StyledPick = styled(StyledButton)(props => {\n const {\n theme: {\n base: {\n colors,\n 'border-radius': borderRadius,\n palette: { interactive, light },\n 'disabled-opacity': disabledOpacity,\n spacing\n }\n }\n } = props;\n\n return css`\n height: 2.625rem;\n border-radius: calc(0.5 * ${borderRadius});\n padding: 0 ${spacing};\n background-color: transparent;\n\n & + & {\n margin-inline-start: 0;\n }\n\n &[aria-readonly]:enabled {\n opacity: ${disabledOpacity};\n }\n\n &[aria-selected]:enabled {\n background-color: ${interactive};\n color: ${light};\n }\n\n &:disabled {\n background-color: ${colors.gray['extra-light']};\n border-radius: 0;\n }\n\n &:focus {\n outline: none;\n box-shadow: inset 0 0 0 0.125rem ${colors.blue.light};\n }\n `;\n});\n\nStyledPick.defaultProps = defaultThemeProp;\n\nexport const StyledMonthPicker = styled.div(props => {\n const {\n theme: {\n base: {\n spacing,\n 'border-radius': baseBorderRadius,\n palette: { 'foreground-color': color }\n },\n components: { 'form-control': formControl }\n }\n } = props;\n return css`\n margin: calc(2 * ${spacing}) calc(0.5 * ${spacing});\n font-size: 0.875rem;\n\n ${StyledSelect} {\n border-radius: calc(${baseBorderRadius} * ${formControl['border-radius']});\n }\n\n ${StyledButton} {\n border-radius: calc(${baseBorderRadius} * ${formControl['border-radius']});\n border: 0;\n &:enabled {\n color: ${color};\n }\n }\n `;\n});\n\nStyledMonthPicker.defaultProps = defaultThemeProp;\n\nexport const StyledDatePicker = styled.div(props => {\n const {\n theme: {\n base: { spacing },\n components: {\n 'form-control': { 'foreground-color': foreground }\n }\n }\n } = props;\n return css`\n width: max-content;\n\n ${StyledButton} {\n border: transparent;\n color: ${foreground};\n }\n padding: 0 ${spacing} ${spacing} ${spacing};\n `;\n});\n\nStyledDatePicker.defaultProps = defaultThemeProp;\n\nexport const StyledColumnLabel = styled.span`\n text-align: center;\n margin: 0 auto;\n font-size: 0.75rem;\n`;\n\nStyledColumnLabel.defaultProps = defaultThemeProp;\n\nexport const ScreenReaderOnly = styled.div`\n ${hideVisually}\n`;\n\nexport const StyledDay = styled(StyledPick)<{ current: boolean; highlighted: boolean }>(props => {\n const {\n theme: {\n base: {\n colors,\n palette: { interactive }\n }\n },\n current,\n highlighted\n } = props;\n\n const highlightedBgColor = tryCatch(() => polishedRgba(interactive, 0.1));\n\n return css`\n background-color: ${highlighted ? highlightedBgColor : 'transparent'};\n\n ${highlighted &&\n css`\n border-radius: 0;\n `}\n\n ${current &&\n css`\n color: ${colors.slate.dark};\n font-weight: bold;\n `}\n `;\n});\n\nStyledDay.defaultProps = defaultThemeProp;\n\nexport const StyledWeekLabel = styled(StyledColumnLabel)(props => {\n const {\n theme: {\n base: { spacing, breakpoints }\n }\n } = props;\n\n return css`\n margin-inline-end: 0;\n\n @media (min-width: ${breakpoints.sm}) {\n margin-inline-end: ${spacing};\n }\n `;\n});\n\nStyledWeekLabel.defaultProps = defaultThemeProp;\n\nexport const StyledWeekNumber = styled.span(props => {\n const {\n theme: {\n base: { breakpoints, spacing, colors, 'disabled-opacity': disabledOpacity }\n }\n } = props;\n\n return css`\n line-height: 2.625rem;\n padding: 0;\n margin-inline-end: 0;\n background-color: ${colors.gray['extra-light']};\n display: inline-block;\n opacity: ${disabledOpacity};\n\n @media (min-width: ${breakpoints.sm}) {\n padding: 0 ${spacing};\n margin-inline-end: ${spacing};\n }\n `;\n});\n\nStyledWeekNumber.defaultProps = defaultThemeProp;\n\nexport const StyledWeekGrid = styled.table(props => {\n const {\n theme: {\n base: { spacing }\n }\n } = props;\n return css`\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n\n thead {\n th {\n padding-bottom: ${spacing};\n }\n }\n ${StyledPick} {\n margin-inline-end: ${spacing};\n }\n `;\n});\n\nStyledWeekGrid.defaultProps = defaultThemeProp;\n\nexport const StyledCalendar = styled.table(props => {\n const {\n theme: {\n base: { 'border-radius': borderRadius, spacing }\n }\n } = props;\n return css`\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n\n th {\n max-width: 2.625rem;\n }\n\n thead {\n th {\n padding-bottom: ${spacing};\n }\n }\n\n td {\n width: 2.625rem;\n max-width: 2.625rem;\n\n ${StyledDay} {\n width: 100%;\n }\n }\n\n tr {\n &:first-child {\n ${StyledWeekNumber} {\n border-radius: calc(0.5 * ${borderRadius}) calc(0.5 * ${borderRadius}) 0 0;\n }\n }\n &:last-child {\n ${StyledWeekNumber} {\n border-radius: 0 0 calc(0.5 * ${borderRadius}) calc(0.5 * ${borderRadius});\n }\n }\n }\n `;\n});\n\nStyledCalendar.defaultProps = defaultThemeProp;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-core",
|
|
3
|
-
"version": "2.0.0-dev.21.
|
|
3
|
+
"version": "2.0.0-dev.21.1",
|
|
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
|
"author": "Pegasystems",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|