UNPKG

3.45 kBSource Map (JSON)View Raw
1{"version":3,"file":"ExpandingCard.styles.js","sourceRoot":"../src/","sources":["components/HoverCard/ExpandingCard.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAG1E,IAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,8BAA8B;IAC3C,YAAY,EAAE,+BAA+B;IAC7C,kBAAkB,EAAE,2CAA2C;CAChE,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,KAA+B;;IAErD,IAAA,mBAAK,EACL,+BAAW,EACX,qEAA8B,EAC9B,2CAAiB,EACjB,6CAAkB,EAClB,2BAAS,CACD;IAEF,IAAA,uBAAO,CAAW;IAC1B,IAAM,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAEhE,OAAO;QACL,IAAI,EAAE;YACJ,UAAU,CAAC,IAAI;YACf;gBACE,KAAK,EAAE,GAAG;gBACV,aAAa,EAAE,MAAM;gBACrB,SAAS;oBACP,GAAC,oBAAoB,IAAG;wBACtB,MAAM,EAAE,sBAAsB;qBAC/B;uBACF;aACF;YACD,SAAS;SACV;QACD,WAAW,EAAE;YACX,UAAU,CAAC,WAAW;YACtB;gBACE,aAAa,EAAE,MAAM;gBACrB,QAAQ,EAAE,UAAU;gBACpB,MAAM,EAAE,iBAAiB;aAC1B;SACF;QACD,YAAY,EAAE;YACZ,UAAU,CAAC,YAAY;YACvB;gBACE,MAAM,EAAE,CAAC;gBACT,SAAS,EAAE,QAAQ;gBACnB,aAAa,EAAE,MAAM;gBACrB,UAAU,EAAE,0CAA0C;gBACtD,SAAS,EAAE;oBACT,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI;wBACb,QAAQ,EAAE,UAAU;wBACpB,OAAO,EAAE,OAAO;wBAChB,GAAG,EAAE,CAAC;wBACN,IAAI,EAAE,EAAE;wBACR,KAAK,EAAE,GAAG;wBACV,MAAM,EAAE,CAAC;wBACT,eAAe,EAAE,OAAO,CAAC,cAAc;qBACxC;iBACF;aACF;YACD,8BAA8B,IAAI;gBAChC,MAAM,EAAE,kBAAkB;aAC3B;SACF;QACD,kBAAkB,EAAE;YAClB,UAAU,CAAC,kBAAkB;YAC7B,WAAW,IAAI;gBACb,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,YAAY;gBACvB,SAAS,EAAE,MAAM;aAClB;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { getGlobalClassNames, HighContrastSelector } from '../../Styling';\nimport { IExpandingCardStyles, IExpandingCardStyleProps } from './ExpandingCard.types';\n\nconst GlobalClassNames = {\n root: 'ms-ExpandingCard-root',\n compactCard: 'ms-ExpandingCard-compactCard',\n expandedCard: 'ms-ExpandingCard-expandedCard',\n expandedCardScroll: 'ms-ExpandingCard-expandedCardScrollRegion',\n};\n\nexport function getStyles(props: IExpandingCardStyleProps): IExpandingCardStyles {\n const {\n theme,\n needsScroll,\n expandedCardFirstFrameRendered,\n compactCardHeight,\n expandedCardHeight,\n className,\n } = props;\n\n const { palette } = theme;\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n {\n width: 320,\n pointerEvents: 'none',\n selectors: {\n [HighContrastSelector]: {\n border: '1px solid WindowText',\n },\n },\n },\n className,\n ],\n compactCard: [\n classNames.compactCard,\n {\n pointerEvents: 'auto',\n position: 'relative',\n height: compactCardHeight,\n },\n ],\n expandedCard: [\n classNames.expandedCard,\n {\n height: 1,\n overflowY: 'hidden',\n pointerEvents: 'auto',\n transition: 'height 0.467s cubic-bezier(0.5, 0, 0, 1)',\n selectors: {\n ':before': {\n content: '\"\"',\n position: 'relative',\n display: 'block',\n top: 0,\n left: 24,\n width: 272,\n height: 1,\n backgroundColor: palette.neutralLighter,\n },\n },\n },\n expandedCardFirstFrameRendered && {\n height: expandedCardHeight,\n },\n ],\n expandedCardScroll: [\n classNames.expandedCardScroll,\n needsScroll && {\n height: '100%',\n boxSizing: 'border-box',\n overflowY: 'auto',\n },\n ],\n };\n}\n"]}
\No newline at end of file