UNPKG

11 kBSource Map (JSON)View Raw
1{"version":3,"file":"Pivot.styles.js","sourceRoot":"../src/","sources":["components/Pivot/Pivot.styles.ts"],"names":[],"mappings":";AACA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EAEpB,SAAS,EACT,WAAW,EACX,4BAA4B,GAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,IAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,eAAe;IACrB,cAAc,EAAE,aAAa;IAC7B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,sBAAsB;IACnC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,gBAAgB;IAC5B,IAAI,EAAE,eAAe;CACtB,CAAC;AAEF,IAAM,UAAU,GAAG,UAAC,KAAuB;;IACjC,IAAA,+BAAW,EAAE,6BAAU,CAAW;IACpC,IAAA,gBAAuC,EAArC,kCAAc,EAAE,gBAAqB,CAAC;IAC9C,OAAO;QACL,KAAK,CAAC,MAAM;QACZ;YACE,KAAK,EAAE,cAAc,CAAC,UAAU;YAChC,OAAO,EAAE,cAAc;YACvB,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,UAAU;YACpB,eAAe,EAAE,aAAa;YAC9B,MAAM,EAAE,CAAC;YACT,YAAY,EAAE,CAAC;YACf,SAAS;oBACP,SAAS,EAAE;wBACT,eAAe,EAAE,aAAa;wBAC9B,MAAM,EAAE,CAAC;wBACT,OAAO,EAAE,IAAI;wBACb,MAAM,EAAE,CAAC;wBACT,IAAI,EAAE,CAAC;wBACP,QAAQ,EAAE,UAAU;wBACpB,KAAK,EAAE,CAAC;wBACR,UAAU,EAAE,UAAQ,kBAAkB,C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,KAAK;aACrB;SACF;QACD,KAAK,EAAE;YACL,UAAU,CAAC,KAAK;YAChB;gBACE,OAAO,EAAE,cAAc;gBACvB,aAAa,EAAE,KAAK;aACrB;SACF;QACD,IAAI,EAAE,UAAU,CAAC,IAAI;KACtB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { IPivotStyleProps, IPivotStyles } from './Pivot.types';\nimport {\n AnimationVariables,\n getGlobalClassNames,\n HighContrastSelector,\n IStyle,\n normalize,\n FontWeights,\n getHighContrastNoAdjustStyle,\n} from '../../Styling';\nimport { IsFocusVisibleClassName } from '../../Utilities';\n\nconst globalClassNames = {\n count: 'ms-Pivot-count',\n icon: 'ms-Pivot-icon',\n linkIsSelected: 'is-selected',\n link: 'ms-Pivot-link',\n linkContent: 'ms-Pivot-linkContent',\n root: 'ms-Pivot',\n rootIsLarge: 'ms-Pivot--large',\n rootIsTabs: 'ms-Pivot--tabs',\n text: 'ms-Pivot-text',\n};\n\nconst linkStyles = (props: IPivotStyleProps): IStyle[] => {\n const { rootIsLarge, rootIsTabs } = props;\n const { semanticColors, fonts } = props.theme;\n return [\n fonts.medium,\n {\n color: semanticColors.actionLink,\n display: 'inline-block',\n lineHeight: 44,\n height: 44,\n marginRight: 8,\n padding: '0 8px',\n textAlign: 'center',\n position: 'relative',\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n selectors: {\n ':before': {\n backgroundColor: 'transparent',\n bottom: 0,\n content: '\"\"',\n height: 2,\n left: 8,\n position: 'absolute',\n right: 8,\n transition: `left ${AnimationVariables.durationValue2} ${AnimationVariables.easeFunction2},\n right ${AnimationVariables.durationValue2} ${AnimationVariables.easeFunction2}`,\n },\n ':after': {\n color: 'transparent',\n content: 'attr(data-content)',\n display: 'block',\n fontWeight: FontWeights.bold,\n height: 1,\n overflow: 'hidden',\n visibility: 'hidden',\n },\n ':hover': {\n backgroundColor: semanticColors.buttonBackgroundHovered,\n color: semanticColors.buttonTextHovered,\n cursor: 'pointer',\n },\n ':active': {\n backgroundColor: semanticColors.buttonBackgroundPressed,\n color: semanticColors.buttonTextHovered,\n },\n ':focus': {\n outline: 'none',\n },\n [`.${IsFocusVisibleClassName} &:focus`]: {\n outline: `1px solid ${semanticColors.focusBorder}`,\n },\n [`.${IsFocusVisibleClassName} &:focus:after`]: {\n content: 'attr(data-content)',\n position: 'relative',\n border: 0,\n },\n },\n },\n rootIsLarge && {\n fontSize: fonts.large.fontSize,\n },\n rootIsTabs && [\n {\n marginRight: 0,\n height: 44,\n lineHeight: 44,\n backgroundColor: semanticColors.buttonBackground,\n padding: '0 10px',\n verticalAlign: 'top',\n selectors: {\n ':focus': {\n outlineOffset: '-1px',\n },\n [`.${IsFocusVisibleClassName} &:focus::before`]: {\n height: 'auto',\n background: 'transparent',\n transition: 'none',\n },\n },\n },\n ],\n ];\n};\n\nexport const getStyles = (props: IPivotStyleProps): IPivotStyles => {\n const { className, rootIsLarge, rootIsTabs, theme } = props;\n const { semanticColors, fonts } = theme;\n\n const classNames = getGlobalClassNames(globalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.medium,\n normalize,\n {\n position: 'relative',\n color: semanticColors.link,\n whiteSpace: 'nowrap',\n },\n rootIsLarge && classNames.rootIsLarge,\n rootIsTabs && classNames.rootIsTabs,\n className,\n ],\n itemContainer: {\n selectors: {\n '&[hidden]': {\n display: 'none',\n },\n },\n },\n link: [\n classNames.link,\n ...linkStyles(props),\n rootIsTabs && {\n selectors: {\n '&:hover, &:focus': {\n color: semanticColors.buttonTextCheckedHovered,\n },\n '&:active, &:hover': {\n color: semanticColors.primaryButtonText,\n backgroundColor: semanticColors.primaryButtonBackground,\n },\n },\n },\n ],\n linkIsSelected: [\n classNames.link,\n classNames.linkIsSelected,\n ...linkStyles(props),\n {\n fontWeight: FontWeights.semibold,\n selectors: {\n ':before': {\n backgroundColor: semanticColors.inputBackgroundChecked,\n selectors: {\n [HighContrastSelector]: {\n backgroundColor: 'Highlight',\n },\n },\n },\n ':hover::before': {\n left: 0,\n right: 0,\n },\n [HighContrastSelector]: {\n color: 'Highlight',\n },\n },\n },\n rootIsTabs && {\n backgroundColor: semanticColors.primaryButtonBackground,\n color: semanticColors.primaryButtonText,\n fontWeight: FontWeights.regular,\n selectors: {\n ':before': {\n backgroundColor: 'transparent',\n transition: 'none',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n content: '\"\"',\n height: 0,\n },\n ':hover': {\n backgroundColor: semanticColors.primaryButtonBackgroundHovered,\n color: semanticColors.primaryButtonText,\n },\n '&:active': {\n backgroundColor: semanticColors.primaryButtonBackgroundPressed,\n color: semanticColors.primaryButtonText,\n },\n [HighContrastSelector]: {\n fontWeight: FontWeights.semibold,\n color: 'HighlightText',\n background: 'Highlight',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n ],\n linkContent: [\n classNames.linkContent,\n {\n flex: '0 1 100%',\n selectors: {\n '& > * ': {\n marginLeft: 4,\n },\n '& > *:first-child': {\n marginLeft: 0,\n },\n },\n },\n ],\n text: [\n classNames.text,\n {\n display: 'inline-block',\n verticalAlign: 'top',\n },\n ],\n count: [\n classNames.count,\n {\n display: 'inline-block',\n verticalAlign: 'top',\n },\n ],\n icon: classNames.icon,\n };\n};\n"]}
\No newline at end of file