@fluentui/react-migration-v8-v9 1.0.25 → 1.0.26
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/CHANGELOG.json +46 -1
- package/CHANGELOG.md +11 -2
- package/lib/components/Button/ActionButtonShim.js +4 -3
- package/lib/components/Button/ActionButtonShim.js.map +1 -1
- package/lib/components/Button/ButtonShim.js +6 -7
- package/lib/components/Button/ButtonShim.js.map +1 -1
- package/lib/components/Button/CompoundButtonShim.js +6 -5
- package/lib/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib/components/Button/DefaultButtonShim.js +2 -2
- package/lib/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib/components/Button/MenuButtonShim.js +10 -6
- package/lib/components/Button/MenuButtonShim.js.map +1 -1
- package/lib/components/Button/PrimaryButtonShim.js +2 -2
- package/lib/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib/components/Button/ToggleButtonShim.js +6 -4
- package/lib/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib/components/Button/shimButtonProps.js +6 -5
- package/lib/components/Button/shimButtonProps.js.map +1 -1
- package/lib/components/Menu/MenuShim.js +16 -14
- package/lib/components/Menu/MenuShim.js.map +1 -1
- package/lib/components/Menu/shimMenuProps.js +6 -4
- package/lib/components/Menu/shimMenuProps.js.map +1 -1
- package/lib/components/Stack/StackItemShim.js +61 -72
- package/lib/components/Stack/StackItemShim.js.map +1 -1
- package/lib/components/Stack/StackShim.js +85 -101
- package/lib/components/Stack/StackShim.js.map +1 -1
- package/lib/components/Stack/stackUtils.js +12 -24
- package/lib/components/Stack/stackUtils.js.map +1 -1
- package/lib/components/Theme/themeDuplicates.js.map +1 -1
- package/lib/components/Theme/v8ThemeShim.js +34 -27
- package/lib/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib/components/Theme/v9BrandVariantsShim.js +0 -8
- package/lib/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib/components/Theme/v9ThemeShim.js +2 -8
- package/lib/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Button/ActionButtonShim.js +4 -7
- package/lib-commonjs/components/Button/ActionButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ButtonShim.js +6 -13
- package/lib-commonjs/components/Button/ButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CommandButtonShim.js +0 -2
- package/lib-commonjs/components/Button/CommandButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CompoundButtonShim.js +6 -9
- package/lib-commonjs/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/DefaultButtonShim.js +2 -5
- package/lib-commonjs/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/MenuButtonShim.js +12 -12
- package/lib-commonjs/components/Button/MenuButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/PrimaryButtonShim.js +2 -5
- package/lib-commonjs/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ToggleButtonShim.js +6 -8
- package/lib-commonjs/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/index.js +0 -10
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/shimButtonProps.js +6 -9
- package/lib-commonjs/components/Button/shimButtonProps.js.map +1 -1
- package/lib-commonjs/components/Menu/MenuShim.js +20 -22
- package/lib-commonjs/components/Menu/MenuShim.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js +0 -3
- package/lib-commonjs/components/Menu/index.js.map +1 -1
- package/lib-commonjs/components/Menu/shimMenuProps.js +6 -14
- package/lib-commonjs/components/Menu/shimMenuProps.js.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.js +61 -76
- package/lib-commonjs/components/Stack/StackItemShim.js.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.js +85 -107
- package/lib-commonjs/components/Stack/StackShim.js.map +1 -1
- package/lib-commonjs/components/Stack/index.js +0 -3
- package/lib-commonjs/components/Stack/index.js.map +1 -1
- package/lib-commonjs/components/Stack/stackUtils.js +12 -29
- package/lib-commonjs/components/Stack/stackUtils.js.map +1 -1
- package/lib-commonjs/components/Theme/index.js +0 -5
- package/lib-commonjs/components/Theme/index.js.map +1 -1
- package/lib-commonjs/components/Theme/themeDuplicates.js +1 -1
- package/lib-commonjs/components/Theme/themeDuplicates.js.map +1 -1
- package/lib-commonjs/components/Theme/v8ThemeShim.js +34 -31
- package/lib-commonjs/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js +0 -11
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9ThemeShim.js +2 -12
- package/lib-commonjs/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib-commonjs/index.js +0 -8
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-migration-v8-v9/src/components/Theme/v8ThemeShim.ts"],"names":[],"mappings":"AAAA,SAAS,WAAT,EAAsB,cAAtB,QAA4C,iBAA5C;AAKA,SAAS,KAAT,EAAgB,UAAhB,EAA4B,IAA5B,EAAkC,YAAlC,EAAgD,KAAhD,EAAuD,UAAvD,QAAyE,mBAAzE;AAEA,MAAM,cAAc,GAAG;EACrB,KADqB;EAErB,kBAAkB,EAAE,UAAU,CAAC,EAAD,CAFT;EAGrB,WAAW,EAAE,IAAI,CAAC,CAAD,CAHI;EAIrB,cAAc,EAAE,IAAI,CAAC,EAAD,CAJC;EAKrB,iBAAiB,EAAE,IAAI,CAAC,EAAD,CALF;EAMrB,gBAAgB,EAAE,IAAI,CAAC,EAAD,CAND;EAOrB,mBAAmB,EAAE,IAAI,CAAC,EAAD,CAPJ;EAQrB,eAAe,EAAE,IAAI,CAAC,EAAD,CARA;EASrB,kBAAkB,EAAE,IAAI,CAAC,EAAD,CATH;EAUr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,CAAC,SAAS,CAAC,OAAX,EAAoB,OAApB,CALd;IAML,UAAU,EAAE,WAAW,IAAI,CAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,UAAT,MAAwB;EAN9C,CAAP;AAQD,CAhBM","sourcesContent":["import { createTheme, DefaultPalette } from '@fluentui/react';\nimport type { IPalette, ISemanticColors, IFontStyles, IFontWeight, IEffects, Theme as ThemeV8 } from '@fluentui/react';\n\nimport { BrandVariants, Theme as ThemeV9 } from '@fluentui/react-components';\n\nimport { black, blackAlpha, grey, sharedColors, white, whiteAlpha } from './themeDuplicates';\n\nconst mappedNeutrals = {\n black,\n blackTranslucent40: blackAlpha[40],\n neutralDark: grey[8],\n neutralPrimary: grey[14],\n neutralPrimaryAlt: grey[22],\n neutralSecondary: grey[36],\n neutralSecondaryAlt: grey[52],\n neutralTertiary: grey[62],\n neutralTertiaryAlt: grey[78],\n neutralQuaternary: grey[82],\n neutralQuaternaryAlt: grey[88],\n neutralLight: grey[92],\n neutralLighter: grey[96],\n neutralLighterAlt: grey[98],\n white,\n whiteTranslucent40: whiteAlpha[40],\n};\n\nconst invertedMappedNeutrals = {\n black: white,\n blackTranslucent40: whiteAlpha[40],\n neutralDark: grey[98],\n neutralPrimary: grey[96],\n neutralPrimaryAlt: grey[84],\n neutralSecondary: grey[82],\n neutralSecondaryAlt: grey[74],\n neutralTertiary: grey[44],\n neutralTertiaryAlt: grey[26],\n neutralQuaternary: grey[24],\n neutralQuaternaryAlt: grey[18],\n neutralLight: grey[16],\n neutralLighter: grey[14],\n neutralLighterAlt: grey[10],\n white: black,\n whiteTranslucent40: blackAlpha[40],\n};\n\nconst mappedSharedColors = {\n yellowDark: sharedColors.marigold.shade10,\n yellow: sharedColors.yellow.primary,\n yellowLight: sharedColors.yellow.tint40,\n orange: sharedColors.orange.primary,\n orangeLight: sharedColors.orange.tint20,\n orangeLighter: sharedColors.orange.tint40,\n redDark: sharedColors.darkRed.primary,\n red: sharedColors.red.primary,\n magentaDark: sharedColors.magenta.shade30,\n magenta: sharedColors.magenta.primary,\n magentaLight: sharedColors.magenta.tint30,\n purpleDark: sharedColors.darkPurple.primary,\n purple: sharedColors.purple.primary,\n purpleLight: sharedColors.purple.tint40,\n blueDark: sharedColors.darkBlue.primary,\n blueMid: sharedColors.royalBlue.primary,\n blue: sharedColors.blue.primary,\n blueLight: sharedColors.lightBlue.primary,\n tealDark: sharedColors.darkTeal.primary,\n teal: sharedColors.teal.primary,\n tealLight: sharedColors.lightTeal.primary,\n greenDark: sharedColors.darkGreen.primary,\n green: sharedColors.green.primary,\n greenLight: sharedColors.lightGreen.primary,\n};\n\n/**\n * Creates a v8 palette given a brand ramp\n */\nconst mapPalette = (brandColors: BrandVariants, inverted: boolean): IPalette => {\n const neutrals = inverted ? invertedMappedNeutrals : mappedNeutrals;\n const brands = inverted\n ? {\n themeDarker: brandColors[110],\n themeDark: brandColors[100],\n themeDarkAlt: brandColors[100],\n themePrimary: brandColors[90],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[60],\n themeLight: brandColors[50],\n themeLighter: brandColors[40],\n themeLighterAlt: brandColors[30],\n }\n : {\n themeDarker: brandColors[40],\n themeDark: brandColors[60],\n themeDarkAlt: brandColors[70],\n themePrimary: brandColors[80],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[120],\n themeLight: brandColors[140],\n themeLighter: brandColors[150],\n themeLighterAlt: brandColors[160],\n };\n\n return {\n ...DefaultPalette,\n ...neutrals,\n accent: brands.themePrimary,\n ...mappedSharedColors,\n ...brands,\n };\n};\n\n/**\n * Returns v9 theme colors overlaid on a base set of v8 semantic colors\n */\nconst mapSemanticColors = (baseColors: ISemanticColors, theme: ThemeV9): ISemanticColors => {\n return {\n ...baseColors,\n accentButtonBackground: theme.colorBrandBackground,\n accentButtonText: theme.colorNeutralForegroundOnBrand,\n actionLink: theme.colorNeutralForeground1,\n actionLinkHovered: theme.colorNeutralForeground1Hover,\n // blockingBackground,\n // blockingIcon,\n bodyBackground: theme.colorNeutralBackground1,\n bodyBackgroundChecked: theme.colorNeutralBackground1Selected,\n bodyBackgroundHovered: theme.colorNeutralBackground1Hover,\n bodyDivider: theme.colorNeutralStroke2,\n bodyFrameBackground: theme.colorNeutralBackground1,\n bodyFrameDivider: theme.colorNeutralStroke2,\n bodyStandoutBackground: theme.colorNeutralBackground2,\n bodySubtext: theme.colorNeutralForeground2,\n bodyText: theme.colorNeutralForeground1,\n bodyTextChecked: theme.colorNeutralForeground1Selected,\n buttonBackground: theme.colorNeutralBackground1,\n buttonBackgroundChecked: theme.colorNeutralBackground1Selected,\n buttonBackgroundCheckedHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n buttonBackgroundHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundPressed: theme.colorNeutralBackground1Pressed,\n buttonBorder: theme.colorNeutralStroke1,\n buttonBorderDisabled: theme.colorNeutralStrokeDisabled,\n buttonText: theme.colorNeutralForeground1,\n buttonTextChecked: theme.colorNeutralForeground1,\n buttonTextCheckedHovered: theme.colorNeutralForeground1,\n buttonTextDisabled: theme.colorNeutralForegroundDisabled,\n buttonTextHovered: theme.colorNeutralForeground1,\n buttonTextPressed: theme.colorNeutralForeground1,\n cardShadow: theme.shadow4,\n cardShadowHovered: theme.shadow8,\n cardStandoutBackground: theme.colorNeutralBackground1,\n defaultStateBackground: theme.colorNeutralBackground2,\n disabledBackground: theme.colorNeutralBackgroundDisabled,\n disabledBodySubtext: theme.colorNeutralForegroundDisabled,\n disabledBodyText: theme.colorNeutralForegroundDisabled,\n disabledBorder: theme.colorNeutralStrokeDisabled,\n disabledSubtext: theme.colorNeutralForegroundDisabled,\n disabledText: theme.colorNeutralForegroundDisabled,\n // errorBackground,\n // errorIcon,\n // errorText: ,\n focusBorder: theme.colorStrokeFocus2,\n // infoBackground,\n // infoIcon,\n inputBackground: theme.colorNeutralBackground1,\n inputBackgroundChecked: theme.colorBrandBackground,\n inputBackgroundCheckedHovered: theme.colorBrandBackgroundHover,\n inputBorder: theme.colorNeutralStrokeAccessible,\n inputBorderHovered: theme.colorNeutralStrokeAccessibleHover,\n inputFocusBorderAlt: theme.colorBrandStroke1,\n inputForegroundChecked: theme.colorNeutralForegroundOnBrand,\n inputIcon: theme.colorNeutralForeground3,\n inputIconDisabled: theme.colorNeutralForegroundDisabled,\n inputIconHovered: theme.colorNeutralForeground3,\n inputPlaceholderBackgroundChecked: theme.colorBrandBackgroundInvertedSelected,\n inputPlaceholderText: theme.colorNeutralForeground4,\n inputText: theme.colorNeutralForeground1,\n inputTextHovered: theme.colorNeutralForeground1Hover,\n link: theme.colorBrandForegroundLink,\n linkHovered: theme.colorBrandForegroundLinkHover,\n listBackground: theme.colorNeutralBackground1,\n listHeaderBackgroundHovered: theme.colorNeutralBackground1Hover,\n listHeaderBackgroundPressed: theme.colorNeutralBackground1Pressed,\n listItemBackgroundChecked: theme.colorNeutralBackground1Selected,\n listItemBackgroundCheckedHovered: theme.colorNeutralBackground1Selected,\n listItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n listText: theme.colorNeutralForeground1,\n listTextColor: theme.colorNeutralForeground1,\n menuBackground: theme.colorNeutralBackground1,\n menuDivider: theme.colorNeutralStroke2,\n menuHeader: theme.colorNeutralForeground3,\n menuIcon: theme.colorNeutralForeground1,\n menuItemBackgroundChecked: theme.colorNeutralBackground1,\n menuItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n menuItemBackgroundPressed: theme.colorNeutralBackground1Hover,\n menuItemText: theme.colorNeutralForeground1,\n menuItemTextHovered: theme.colorNeutralForeground1Hover,\n messageLink: theme.colorBrandForegroundLink,\n messageLinkHovered: theme.colorBrandForegroundLinkHover,\n messageText: theme.colorNeutralForeground1,\n primaryButtonBackground: theme.colorBrandBackground,\n primaryButtonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n primaryButtonBackgroundHovered: theme.colorBrandBackgroundHover,\n primaryButtonBackgroundPressed: theme.colorBrandBackgroundPressed,\n primaryButtonBorder: theme.colorTransparentStroke,\n primaryButtonText: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextDisabled: theme.colorNeutralForegroundDisabled,\n primaryButtonTextHovered: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextPressed: theme.colorNeutralForegroundOnBrand,\n // severeWarningBackground,\n // severeWarningIcon,\n // smallInputBorder,\n // successBackground,\n // successIcon,\n // successText: ,\n // variantBorder,\n // variantBorderHovered,\n // warningBackground,\n // warningHighlight,\n // warningIcon,\n // warningText: ,\n };\n};\n\n/**\n * Overlays v9 fonts on a set of base v8 fonts.\n */\nconst mapFonts = (baseFonts: IFontStyles, theme: ThemeV9): IFontStyles => {\n return {\n ...baseFonts,\n tiny: {\n ...baseFonts.tiny,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xSmall: {\n ...baseFonts.xSmall,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n small: {\n ...baseFonts.small,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n smallPlus: {\n ...baseFonts.smallPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n medium: {\n ...baseFonts.medium,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase300,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n mediumPlus: {\n ...baseFonts.mediumPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n large: {\n ...baseFonts.large,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase500,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n xxLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero700,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n superLarge: {\n ...baseFonts.superLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero900,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n mega: {\n ...baseFonts.mega,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero1000,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n };\n};\n\n/**\n * Overlays v9 shadows and border radii on a base set of v8 effects.\n */\nconst mapEffects = (baseEffects: IEffects, theme: ThemeV9): IEffects => {\n return {\n ...baseEffects,\n elevation4: theme.shadow4,\n elevation8: theme.shadow8,\n elevation16: theme.shadow16,\n elevation64: theme.shadow64,\n roundedCorner2: theme.borderRadiusSmall,\n roundedCorner4: theme.borderRadiusMedium,\n roundedCorner6: theme.borderRadiusLarge,\n };\n};\n\n/**\n * Creates a v8 theme from v9 brand colors and theme.\n * You can optionally pass a v8 base theme.\n * Otherwise the default v8 theme is used.\n *\n * The v9 colors, fonts, and effects are applied on top of the v8 theme\n * to allow v8 components to look as much like v9 components as possible.\n */\nexport const createV8Theme = (\n brandColors: BrandVariants,\n themeV9: ThemeV9,\n isDarkTheme: boolean = false,\n themeV8?: ThemeV8,\n): ThemeV8 => {\n const baseTheme = themeV8 || createTheme({ isInverted: isDarkTheme });\n\n return {\n ...baseTheme,\n palette: mapPalette(brandColors, isDarkTheme),\n semanticColors: mapSemanticColors(baseTheme.semanticColors, themeV9),\n fonts: mapFonts(baseTheme.fonts, themeV9),\n effects: mapEffects(baseTheme.effects, themeV9),\n isInverted: isDarkTheme || themeV8?.isInverted === true,\n };\n};\n"],"sourceRo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S,CAACK,OAAO,EAAER,OAAO,CAAC;IAC/CI,UAAU,EAAEH,WAAW,IAAI,QAAO,aAAPC,OAAO,uBAAPA,OAAO,CAAEE,UAAU,MAAK;GACpD;AACH,CAAC","names":["createTheme","DefaultPalette","black","blackAlpha","grey","sharedColors","white","whiteAlpha","mappedNeutrals","blackTranslucent40","neutralDark","neutralPrimary","neutralPrimaryAlt","neutralSecondary","neutralSecondaryAlt","neutralTertiary","neutralTertiaryAlt","neutralQuaternary","neutralQuaternaryAlt","neutralLight","neutralLighter","neutralLighterAlt","whiteTranslucent40","invertedMappedNeutrals","mappedSharedColors","yellowDark","marigold","shade10","yellow","primary","yellowLight","tint40","orange","orangeLight","tint20","orangeLighter","redDark","darkRed","red","magentaDark","magenta","shade30","magentaLight","tint30","purpleDark","darkPurple","purple","purpleLight","blueDark","darkBlue","blueMid","royalBlue","blue","blueLight","lightBlue","tealDark","darkTeal","teal","tealLight","lightTeal","greenDark","darkGreen","green","greenLight","lightGreen","mapPalette","brandColors","inverted","neutrals","brands","themeDarker","themeDark","themeDarkAlt","themePrimary","themeSecondary","themeTertiary","themeLight","themeLighter","themeLighterAlt","accent","mapSemanticColors","baseColors","theme","accentButtonBackground","colorBrandBackground","accentButtonText","colorNeutralForegroundOnBrand","actionLink","colorNeutralForeground1","actionLinkHovered","colorNeutralForeground1Hover","bodyBackground","colorNeutralBackground1","bodyBackgroundChecked","colorNeutralBackground1Selected","bodyBackgroundHovered","colorNeutralBackground1Hover","bodyDivider","colorNeutralStroke2","bodyFrameBackground","bodyFrameDivider","bodyStandoutBackground","colorNeutralBackground2","bodySubtext","colorNeutralForeground2","bodyText","bodyTextChecked","colorNeutralForeground1Selected","buttonBackground","buttonBackgroundChecked","buttonBackgroundCheckedHovered","buttonBackgroundDisabled","colorNeutralBackgroundDisabled","buttonBackgroundHovered","buttonBackgroundPressed","colorNeutralBackground1Pressed","buttonBorder","colorNeutralStroke1","buttonBorderDisabled","colorNeutralStrokeDisabled","buttonText","buttonTextChecked","buttonTextCheckedHovered","buttonTextDisabled","colorNeutralForegroundDisabled","buttonTextHovered","buttonTextPressed","cardShadow","shadow4","cardShadowHovered","shadow8","cardStandoutBackground","defaultStateBackground","disabledBackground","disabledBodySubtext","disabledBodyText","disabledBorder","disabledSubtext","disabledText","focusBorder","colorStrokeFocus2","inputBackground","inputBackgroundChecked","inputBackgroundCheckedHovered","colorBrandBackgroundHover","inputBorder","colorNeutralStrokeAccessible","inputBorderHovered","colorNeutralStrokeAccessibleHover","inputFocusBorderAlt","colorBrandStroke1","inputForegroundChecked","inputIcon","colorNeutralForeground3","inputIconDisabled","inputIconHovered","inputPlaceholderBackgroundChecked","colorBrandBackgroundInvertedSelected","inputPlaceholderText","colorNeutralForeground4","inputText","inputTextHovered","link","colorBrandForegroundLink","linkHovered","colorBrandForegroundLinkHover","listBackground","listHeaderBackgroundHovered","listHeaderBackgroundPressed","listItemBackgroundChecked","listItemBackgroundCheckedHovered","listItemBackgroundHovered","listText","listTextColor","menuBackground","menuDivider","menuHeader","menuIcon","menuItemBackgroundChecked","menuItemBackgroundHovered","menuItemBackgroundPressed","menuItemText","menuItemTextHovered","messageLink","messageLinkHovered","messageText","primaryButtonBackground","primaryButtonBackgroundDisabled","primaryButtonBackgroundHovered","primaryButtonBackgroundPressed","colorBrandBackgroundPressed","primaryButtonBorder","colorTransparentStroke","primaryButtonText","primaryButtonTextDisabled","primaryButtonTextHovered","primaryButtonTextPressed","mapFonts","baseFonts","tiny","fontFamily","fontFamilyBase","fontSize","fontSizeBase100","fontWeight","fontWeightRegular","xSmall","small","fontSizeBase200","smallPlus","medium","fontSizeBase300","mediumPlus","fontSizeBase400","large","xLarge","xxLarge","fontSizeBase500","fontWeightSemibold","fontSizeHero700","superLarge","fontSizeHero900","mega","fontSizeHero1000","mapEffects","baseEffects","elevation4","elevation8","elevation16","shadow16","elevation64","shadow64","roundedCorner2","borderRadiusSmall","roundedCorner4","borderRadiusMedium","roundedCorner6","borderRadiusLarge","createV8Theme","themeV9","isDarkTheme","themeV8","baseTheme","isInverted","palette","semanticColors","fonts","effects"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Theme/v8ThemeShim.ts"],"sourcesContent":["import { createTheme, DefaultPalette } from '@fluentui/react';\nimport type { IPalette, ISemanticColors, IFontStyles, IFontWeight, IEffects, Theme as ThemeV8 } from '@fluentui/react';\n\nimport { BrandVariants, Theme as ThemeV9 } from '@fluentui/react-components';\n\nimport { black, blackAlpha, grey, sharedColors, white, whiteAlpha } from './themeDuplicates';\n\nconst mappedNeutrals = {\n black,\n blackTranslucent40: blackAlpha[40],\n neutralDark: grey[8],\n neutralPrimary: grey[14],\n neutralPrimaryAlt: grey[22],\n neutralSecondary: grey[36],\n neutralSecondaryAlt: grey[52],\n neutralTertiary: grey[62],\n neutralTertiaryAlt: grey[78],\n neutralQuaternary: grey[82],\n neutralQuaternaryAlt: grey[88],\n neutralLight: grey[92],\n neutralLighter: grey[96],\n neutralLighterAlt: grey[98],\n white,\n whiteTranslucent40: whiteAlpha[40],\n};\n\nconst invertedMappedNeutrals = {\n black: white,\n blackTranslucent40: whiteAlpha[40],\n neutralDark: grey[98],\n neutralPrimary: grey[96],\n neutralPrimaryAlt: grey[84],\n neutralSecondary: grey[82],\n neutralSecondaryAlt: grey[74],\n neutralTertiary: grey[44],\n neutralTertiaryAlt: grey[26],\n neutralQuaternary: grey[24],\n neutralQuaternaryAlt: grey[18],\n neutralLight: grey[16],\n neutralLighter: grey[14],\n neutralLighterAlt: grey[10],\n white: black,\n whiteTranslucent40: blackAlpha[40],\n};\n\nconst mappedSharedColors = {\n yellowDark: sharedColors.marigold.shade10,\n yellow: sharedColors.yellow.primary,\n yellowLight: sharedColors.yellow.tint40,\n orange: sharedColors.orange.primary,\n orangeLight: sharedColors.orange.tint20,\n orangeLighter: sharedColors.orange.tint40,\n redDark: sharedColors.darkRed.primary,\n red: sharedColors.red.primary,\n magentaDark: sharedColors.magenta.shade30,\n magenta: sharedColors.magenta.primary,\n magentaLight: sharedColors.magenta.tint30,\n purpleDark: sharedColors.darkPurple.primary,\n purple: sharedColors.purple.primary,\n purpleLight: sharedColors.purple.tint40,\n blueDark: sharedColors.darkBlue.primary,\n blueMid: sharedColors.royalBlue.primary,\n blue: sharedColors.blue.primary,\n blueLight: sharedColors.lightBlue.primary,\n tealDark: sharedColors.darkTeal.primary,\n teal: sharedColors.teal.primary,\n tealLight: sharedColors.lightTeal.primary,\n greenDark: sharedColors.darkGreen.primary,\n green: sharedColors.green.primary,\n greenLight: sharedColors.lightGreen.primary,\n};\n\n/**\n * Creates a v8 palette given a brand ramp\n */\nconst mapPalette = (brandColors: BrandVariants, inverted: boolean): IPalette => {\n const neutrals = inverted ? invertedMappedNeutrals : mappedNeutrals;\n const brands = inverted\n ? {\n themeDarker: brandColors[110],\n themeDark: brandColors[100],\n themeDarkAlt: brandColors[100],\n themePrimary: brandColors[90],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[60],\n themeLight: brandColors[50],\n themeLighter: brandColors[40],\n themeLighterAlt: brandColors[30],\n }\n : {\n themeDarker: brandColors[40],\n themeDark: brandColors[60],\n themeDarkAlt: brandColors[70],\n themePrimary: brandColors[80],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[120],\n themeLight: brandColors[140],\n themeLighter: brandColors[150],\n themeLighterAlt: brandColors[160],\n };\n\n return {\n ...DefaultPalette,\n ...neutrals,\n accent: brands.themePrimary,\n ...mappedSharedColors,\n ...brands,\n };\n};\n\n/**\n * Returns v9 theme colors overlaid on a base set of v8 semantic colors\n */\nconst mapSemanticColors = (baseColors: ISemanticColors, theme: ThemeV9): ISemanticColors => {\n return {\n ...baseColors,\n accentButtonBackground: theme.colorBrandBackground,\n accentButtonText: theme.colorNeutralForegroundOnBrand,\n actionLink: theme.colorNeutralForeground1,\n actionLinkHovered: theme.colorNeutralForeground1Hover,\n // blockingBackground,\n // blockingIcon,\n bodyBackground: theme.colorNeutralBackground1,\n bodyBackgroundChecked: theme.colorNeutralBackground1Selected,\n bodyBackgroundHovered: theme.colorNeutralBackground1Hover,\n bodyDivider: theme.colorNeutralStroke2,\n bodyFrameBackground: theme.colorNeutralBackground1,\n bodyFrameDivider: theme.colorNeutralStroke2,\n bodyStandoutBackground: theme.colorNeutralBackground2,\n bodySubtext: theme.colorNeutralForeground2,\n bodyText: theme.colorNeutralForeground1,\n bodyTextChecked: theme.colorNeutralForeground1Selected,\n buttonBackground: theme.colorNeutralBackground1,\n buttonBackgroundChecked: theme.colorNeutralBackground1Selected,\n buttonBackgroundCheckedHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n buttonBackgroundHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundPressed: theme.colorNeutralBackground1Pressed,\n buttonBorder: theme.colorNeutralStroke1,\n buttonBorderDisabled: theme.colorNeutralStrokeDisabled,\n buttonText: theme.colorNeutralForeground1,\n buttonTextChecked: theme.colorNeutralForeground1,\n buttonTextCheckedHovered: theme.colorNeutralForeground1,\n buttonTextDisabled: theme.colorNeutralForegroundDisabled,\n buttonTextHovered: theme.colorNeutralForeground1,\n buttonTextPressed: theme.colorNeutralForeground1,\n cardShadow: theme.shadow4,\n cardShadowHovered: theme.shadow8,\n cardStandoutBackground: theme.colorNeutralBackground1,\n defaultStateBackground: theme.colorNeutralBackground2,\n disabledBackground: theme.colorNeutralBackgroundDisabled,\n disabledBodySubtext: theme.colorNeutralForegroundDisabled,\n disabledBodyText: theme.colorNeutralForegroundDisabled,\n disabledBorder: theme.colorNeutralStrokeDisabled,\n disabledSubtext: theme.colorNeutralForegroundDisabled,\n disabledText: theme.colorNeutralForegroundDisabled,\n // errorBackground,\n // errorIcon,\n // errorText: ,\n focusBorder: theme.colorStrokeFocus2,\n // infoBackground,\n // infoIcon,\n inputBackground: theme.colorNeutralBackground1,\n inputBackgroundChecked: theme.colorBrandBackground,\n inputBackgroundCheckedHovered: theme.colorBrandBackgroundHover,\n inputBorder: theme.colorNeutralStrokeAccessible,\n inputBorderHovered: theme.colorNeutralStrokeAccessibleHover,\n inputFocusBorderAlt: theme.colorBrandStroke1,\n inputForegroundChecked: theme.colorNeutralForegroundOnBrand,\n inputIcon: theme.colorNeutralForeground3,\n inputIconDisabled: theme.colorNeutralForegroundDisabled,\n inputIconHovered: theme.colorNeutralForeground3,\n inputPlaceholderBackgroundChecked: theme.colorBrandBackgroundInvertedSelected,\n inputPlaceholderText: theme.colorNeutralForeground4,\n inputText: theme.colorNeutralForeground1,\n inputTextHovered: theme.colorNeutralForeground1Hover,\n link: theme.colorBrandForegroundLink,\n linkHovered: theme.colorBrandForegroundLinkHover,\n listBackground: theme.colorNeutralBackground1,\n listHeaderBackgroundHovered: theme.colorNeutralBackground1Hover,\n listHeaderBackgroundPressed: theme.colorNeutralBackground1Pressed,\n listItemBackgroundChecked: theme.colorNeutralBackground1Selected,\n listItemBackgroundCheckedHovered: theme.colorNeutralBackground1Selected,\n listItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n listText: theme.colorNeutralForeground1,\n listTextColor: theme.colorNeutralForeground1,\n menuBackground: theme.colorNeutralBackground1,\n menuDivider: theme.colorNeutralStroke2,\n menuHeader: theme.colorNeutralForeground3,\n menuIcon: theme.colorNeutralForeground1,\n menuItemBackgroundChecked: theme.colorNeutralBackground1,\n menuItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n menuItemBackgroundPressed: theme.colorNeutralBackground1Hover,\n menuItemText: theme.colorNeutralForeground1,\n menuItemTextHovered: theme.colorNeutralForeground1Hover,\n messageLink: theme.colorBrandForegroundLink,\n messageLinkHovered: theme.colorBrandForegroundLinkHover,\n messageText: theme.colorNeutralForeground1,\n primaryButtonBackground: theme.colorBrandBackground,\n primaryButtonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n primaryButtonBackgroundHovered: theme.colorBrandBackgroundHover,\n primaryButtonBackgroundPressed: theme.colorBrandBackgroundPressed,\n primaryButtonBorder: theme.colorTransparentStroke,\n primaryButtonText: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextDisabled: theme.colorNeutralForegroundDisabled,\n primaryButtonTextHovered: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextPressed: theme.colorNeutralForegroundOnBrand,\n // severeWarningBackground,\n // severeWarningIcon,\n // smallInputBorder,\n // successBackground,\n // successIcon,\n // successText: ,\n // variantBorder,\n // variantBorderHovered,\n // warningBackground,\n // warningHighlight,\n // warningIcon,\n // warningText: ,\n };\n};\n\n/**\n * Overlays v9 fonts on a set of base v8 fonts.\n */\nconst mapFonts = (baseFonts: IFontStyles, theme: ThemeV9): IFontStyles => {\n return {\n ...baseFonts,\n tiny: {\n ...baseFonts.tiny,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xSmall: {\n ...baseFonts.xSmall,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n small: {\n ...baseFonts.small,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n smallPlus: {\n ...baseFonts.smallPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n medium: {\n ...baseFonts.medium,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase300,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n mediumPlus: {\n ...baseFonts.mediumPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n large: {\n ...baseFonts.large,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase500,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n xxLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero700,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n superLarge: {\n ...baseFonts.superLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero900,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n mega: {\n ...baseFonts.mega,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero1000,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n };\n};\n\n/**\n * Overlays v9 shadows and border radii on a base set of v8 effects.\n */\nconst mapEffects = (baseEffects: IEffects, theme: ThemeV9): IEffects => {\n return {\n ...baseEffects,\n elevation4: theme.shadow4,\n elevation8: theme.shadow8,\n elevation16: theme.shadow16,\n elevation64: theme.shadow64,\n roundedCorner2: theme.borderRadiusSmall,\n roundedCorner4: theme.borderRadiusMedium,\n roundedCorner6: theme.borderRadiusLarge,\n };\n};\n\n/**\n * Creates a v8 theme from v9 brand colors and theme.\n * You can optionally pass a v8 base theme.\n * Otherwise the default v8 theme is used.\n *\n * The v9 colors, fonts, and effects are applied on top of the v8 theme\n * to allow v8 components to look as much like v9 components as possible.\n */\nexport const createV8Theme = (\n brandColors: BrandVariants,\n themeV9: ThemeV9,\n isDarkTheme: boolean = false,\n themeV8?: ThemeV8,\n): ThemeV8 => {\n const baseTheme = themeV8 || createTheme({ isInverted: isDarkTheme });\n\n return {\n ...baseTheme,\n palette: mapPalette(brandColors, isDarkTheme),\n semanticColors: mapSemanticColors(baseTheme.semanticColors, themeV9),\n fonts: mapFonts(baseTheme.fonts, themeV9),\n effects: mapEffects(baseTheme.effects, themeV9),\n isInverted: isDarkTheme || themeV8?.isInverted === true,\n };\n};\n"]}
|
|
@@ -2,15 +2,12 @@ import { TinyColor } from '@ctrl/tinycolor';
|
|
|
2
2
|
/**
|
|
3
3
|
* A helper to mix colors using tiny color by an amount and get back a hex string.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
5
|
const mixColors = (colorA, colorB, amount) => {
|
|
7
6
|
return new TinyColor(colorA).mix(new TinyColor(colorB), amount).toHexString();
|
|
8
7
|
};
|
|
9
8
|
/**
|
|
10
9
|
* Creates a v9 brand ramp by pairwise mixing v8 palette colors.
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
11
|
const mixByPairs = palette => {
|
|
15
12
|
return {
|
|
16
13
|
10: palette.themeDarker,
|
|
@@ -36,8 +33,6 @@ const mixByPairs = palette => {
|
|
|
36
33
|
* using steps between themeDarker and themePrimary and
|
|
37
34
|
* between themePrimary and themeLighterAlt.
|
|
38
35
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
36
|
const mixPrimaryAndEnds = palette => {
|
|
42
37
|
return {
|
|
43
38
|
10: palette.themeDarker,
|
|
@@ -62,13 +57,10 @@ const mixPrimaryAndEnds = palette => {
|
|
|
62
57
|
* Creates v9 brand colors from a v8 palette using interpolation
|
|
63
58
|
* A v8 palette has nine colors and v9 has sixteen colors.
|
|
64
59
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
60
|
export const createBrandVariants = (palette, interpolation = 'pairs') => {
|
|
68
61
|
switch (interpolation) {
|
|
69
62
|
case 'primaryAndEnds':
|
|
70
63
|
return mixPrimaryAndEnds(palette);
|
|
71
|
-
|
|
72
64
|
case 'pairs':
|
|
73
65
|
default:
|
|
74
66
|
return mixByPairs(palette);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAEA,SAASA,SAAS,QAAQ,iBAAiB;AAG3C;;;AAGA,MAAMC,SAAS,GAAG,CAACC,MAAkB,EAAEC,MAAkB,EAAEC,MAAe,KAAI;EAC5E,OAAO,IAAIJ,SAAS,CAACE,MAAM,CAAC,CAACG,GAAG,CAAC,IAAIL,SAAS,CAACG,MAAM,CAAC,EAAEC,MAAM,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AID;;;;AAIA,OAAO,MAAME,mBAAmB,GAAG,CAACX,OAAiB,EAAEY,gBAA+B,OAAO,KAAmB;EAC9G,QAAQA,aAAa;IACnB,KAAK,gBAAgB;MACnB,OAAOF,iBAAiB,CAACV,OAAO,CAAC;IACnC,KAAK,OAAO;IACZ;MACE,OAAOD,UAAU,CAACC,OAAO,CAAC;EAAC;AAEjC,CAAC","names":["TinyColor","mixColors","colorA","colorB","amount","mix","toHexString","mixByPairs","palette","themeDarker","themeDark","themeDarkAlt","themePrimary","themeSecondary","themeTertiary","themeLight","themeLighter","themeLighterAlt","mixPrimaryAndEnds","createBrandVariants","interpolation"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Theme/v9BrandVariantsShim.ts"],"sourcesContent":["import type { IPalette } from '@fluentui/react';\nimport type { BrandVariants } from '@fluentui/react-components';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport type { ColorInput } from '@ctrl/tinycolor';\n\n/**\n * A helper to mix colors using tiny color by an amount and get back a hex string.\n */\nconst mixColors = (colorA: ColorInput, colorB: ColorInput, amount?: number) => {\n return new TinyColor(colorA).mix(new TinyColor(colorB), amount).toHexString();\n};\n\n/**\n * Creates a v9 brand ramp by pairwise mixing v8 palette colors.\n */\nconst mixByPairs = (palette: IPalette): BrandVariants => {\n return {\n 10: palette.themeDarker,\n 20: mixColors(palette.themeDarker, palette.themeDark),\n 30: palette.themeDark,\n 40: mixColors(palette.themeDark, palette.themeDarkAlt),\n 50: palette.themeDarkAlt,\n 60: mixColors(palette.themeDarkAlt, palette.themePrimary),\n 70: palette.themePrimary,\n 80: mixColors(palette.themePrimary, palette.themeSecondary),\n 90: palette.themeSecondary,\n 100: mixColors(palette.themeSecondary, palette.themeTertiary),\n 110: palette.themeTertiary,\n 120: mixColors(palette.themeTertiary, palette.themeLight),\n 130: palette.themeLight,\n 140: mixColors(palette.themeLight, palette.themeLighter),\n 150: palette.themeLighter,\n 160: mixColors(palette.themeLighter, palette.themeLighterAlt),\n };\n};\n\n/**\n * Creates a v9 brand ramp by mixing v8 palette colors\n * using steps between themeDarker and themePrimary and\n * between themePrimary and themeLighterAlt.\n */\nconst mixPrimaryAndEnds = (palette: IPalette): BrandVariants => {\n return {\n 10: palette.themeDarker,\n 20: mixColors(palette.themeDarker, palette.themePrimary, 20),\n 30: mixColors(palette.themeDarker, palette.themePrimary, 30),\n 40: mixColors(palette.themeDarker, palette.themePrimary, 40),\n 50: mixColors(palette.themeDarker, palette.themePrimary, 50),\n 60: mixColors(palette.themeDarker, palette.themePrimary, 60),\n 70: mixColors(palette.themeDarker, palette.themePrimary, 70),\n 80: palette.themePrimary,\n 90: mixColors(palette.themePrimary, palette.themeLighterAlt, 10),\n 100: mixColors(palette.themePrimary, palette.themeLighterAlt, 20),\n 110: mixColors(palette.themePrimary, palette.themeLighterAlt, 30),\n 120: mixColors(palette.themePrimary, palette.themeLighterAlt, 40),\n 130: mixColors(palette.themePrimary, palette.themeLighterAlt, 50),\n 140: mixColors(palette.themePrimary, palette.themeLighterAlt, 60),\n 150: mixColors(palette.themePrimary, palette.themeLighterAlt, 70),\n 160: palette.themeLighterAlt,\n };\n};\n\ntype Interpolation = 'pairs' | 'primaryAndEnds';\n\n/**\n * Creates v9 brand colors from a v8 palette using interpolation\n * A v8 palette has nine colors and v9 has sixteen colors.\n */\nexport const createBrandVariants = (palette: IPalette, interpolation: Interpolation = 'pairs'): BrandVariants => {\n switch (interpolation) {\n case 'primaryAndEnds':\n return mixPrimaryAndEnds(palette);\n case 'pairs':\n default:\n return mixByPairs(palette);\n }\n};\n"]}
|
|
@@ -3,7 +3,6 @@ import { blackAlpha, whiteAlpha, grey } from './themeDuplicates';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates v9 color tokens from a v8 palette.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
const mapAliasColors = (palette, inverted) => {
|
|
8
7
|
return {
|
|
9
8
|
colorNeutralForeground1: palette.neutralPrimary,
|
|
@@ -158,8 +157,6 @@ const mapAliasColors = (palette, inverted) => {
|
|
|
158
157
|
/**
|
|
159
158
|
* Creates v9 shadow tokens from v8 effects.
|
|
160
159
|
*/
|
|
161
|
-
|
|
162
|
-
|
|
163
160
|
const mapShadowTokens = effects => {
|
|
164
161
|
return {
|
|
165
162
|
shadow4: effects.elevation4,
|
|
@@ -171,8 +168,6 @@ const mapShadowTokens = effects => {
|
|
|
171
168
|
/**
|
|
172
169
|
* Creates v9 border radius tokens from v8 effects
|
|
173
170
|
*/
|
|
174
|
-
|
|
175
|
-
|
|
176
171
|
const mapBorderRadiusTokens = effects => {
|
|
177
172
|
return {
|
|
178
173
|
borderRadiusSmall: effects.roundedCorner2,
|
|
@@ -184,11 +179,10 @@ const mapBorderRadiusTokens = effects => {
|
|
|
184
179
|
* Creates a v9 theme from a v8 theme.
|
|
185
180
|
* You can optional pass a base v9 theme; otherwise webLightTheme is used.
|
|
186
181
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
182
|
export const createV9Theme = (themeV8, baseThemeV9) => {
|
|
190
183
|
const baseTheme = baseThemeV9 !== null && baseThemeV9 !== void 0 ? baseThemeV9 : webLightTheme;
|
|
191
|
-
return {
|
|
184
|
+
return {
|
|
185
|
+
...baseTheme,
|
|
192
186
|
...mapAliasColors(themeV8.palette, themeV8.isInverted),
|
|
193
187
|
...mapShadowTokens(themeV8.effects),
|
|
194
188
|
...mapBorderRadiusTokens(themeV8.effects)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-migration-v8-v9/src/components/Theme/v9ThemeShim.ts"],"names":[],"mappings":"AAEA,SAA2B,aAA3B,QAAgD,4BAAhD;AAEA,SAAS,UAAT,EAAqB,UAArB,EAAiC,IAAjC,QAA6C,mBAA7C;AAEA;;AAEG;;AACH,MAAM,cAAc,GAAG,CAAC,OAAD,EAAoB,QAApB,KAAsD;EAC3E,OAAO;IACL,uBAAuB,EAAE,OAAO,CAAC,cAD5B;IAEL,4BAA4B,EAAE,OAAO,C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wJA;;AAEG;;;AACH,MAAM,eAAe,GAAI,OAAD,IAA6C;EACnE,OAAO;IACL,OAAO,EAAE,OAAO,CAAC,UADZ;IAEL,OAAO,EAAE,OAAO,CAAC,UAFZ;IAGL,QAAQ,EAAE,OAAO,CAAC,WAHb;IAIL,QAAQ,EAAE,OAAO,CAAC;EAJb,CAAP;AAMD,CAPD;AASA;;AAEG;;;AACH,MAAM,qBAAqB,GAAI,OAAD,IAAmD;EAC/E,OAAO;IACL,iBAAiB,EAAE,OAAO,CAAC,cADtB;IAEL,kBAAkB,EAAE,OAAO,CAAC,cAFvB;IAGL,iBAAiB,EAAE,OAAO,CAAC;EAHtB,CAAP;AAKD,CAND;AAQA;;;AAGG;;;AACH,OAAO,MAAM,aAAa,GAAG,CAAC,OAAD,EAAmB,WAAnB,KAAqD;EAChF,MAAM,SAAS,GAAG,WAAW,KAAA,IAAX,IAAA,WAAW,KAAA,KAAA,CAAX,GAAA,WAAA,GAAe,aAAjC;EAEA,OAAO,EACL,GAAG,SADE;IAEL,GAAG,cAAc,CAAC,OAAO,CAAC,OAAT,EAAkB,OAAO,CAAC,UAA1B,CAFZ;IAGL,GAAG,eAAe,CAAC,OAAO,CAAC,OAAT,CAHb;IAIL,GAAG,qBAAqB,CAAC,OAAO,CAAC,OAAT;EAJnB,CAAP;AAMD,CATM","sourcesContent":["import { Theme as ThemeV8 } from '@fluentui/react';\nimport type { IEffects, IPalette } from '@fluentui/react';\nimport { Theme as ThemeV9, webLightTheme } from '@fluentui/react-components';\nimport type { BorderRadiusTokens, ColorTokens, ShadowTokens } from '@fluentui/react-components';\nimport { blackAlpha, whiteAlpha, grey } from './themeDuplicates';\n\n/**\n * Creates v9 color tokens from a v8 palette.\n */\nconst mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {\n return {\n colorNeutralForeground1: palette.neutralPrimary,\n colorNeutralForeground1Hover: palette.neutralPrimary,\n colorNeutralForeground1Pressed: palette.neutralPrimary,\n colorNeutralForeground1Selected: palette.neutralPrimary,\n colorNeutralForeground2: palette.neutralSecondary,\n colorNeutralForeground2Hover: palette.neutralPrimary,\n colorNeutralForeground2Pressed: palette.neutralPrimary,\n colorNeutralForeground2Selected: palette.neutralPrimary,\n colorNeutralForeground2BrandHover: palette.themePrimary,\n colorNeutralForeground2BrandPressed: palette.themeDarkAlt,\n colorNeutralForeground2BrandSelected: palette.themePrimary,\n colorNeutralForeground3: palette.neutralTertiary,\n colorNeutralForeground3Hover: palette.neutralSecondary,\n colorNeutralForeground3Pressed: palette.neutralSecondary,\n colorNeutralForeground3Selected: palette.neutralSecondary,\n colorNeutralForeground3BrandHover: palette.themePrimary,\n colorNeutralForeground3BrandPressed: palette.themeDarkAlt,\n colorNeutralForeground3BrandSelected: palette.themePrimary,\n colorNeutralForeground4: palette.neutralQuaternary,\n colorNeutralForegroundDisabled: palette.neutralTertiaryAlt,\n colorNeutralForegroundInvertedDisabled: whiteAlpha[40],\n colorBrandForegroundLink: palette.themeDarkAlt,\n colorBrandForegroundLinkHover: palette.themeDark,\n colorBrandForegroundLinkPressed: palette.themeDarker,\n colorBrandForegroundLinkSelected: palette.themeDarkAlt,\n colorNeutralForeground2Link: palette.neutralSecondary,\n colorNeutralForeground2LinkHover: palette.neutralPrimary,\n colorNeutralForeground2LinkPressed: palette.neutralPrimary,\n colorNeutralForeground2LinkSelected: palette.neutralPrimary,\n colorCompoundBrandForeground1: palette.themePrimary,\n colorCompoundBrandForeground1Hover: palette.themeDarkAlt,\n colorCompoundBrandForeground1Pressed: palette.themeDark,\n colorBrandForeground1: palette.themePrimary,\n colorBrandForeground2: palette.themeDarkAlt,\n colorNeutralForeground1Static: palette.neutralPrimary,\n colorNeutralForegroundInverted: palette.white,\n colorNeutralForegroundInvertedHover: palette.white,\n colorNeutralForegroundInvertedPressed: palette.white,\n colorNeutralForegroundInvertedSelected: palette.white,\n colorNeutralForegroundOnBrand: palette.white,\n colorNeutralForegroundStaticInverted: palette.white,\n colorNeutralForegroundInvertedLink: palette.white,\n colorNeutralForegroundInvertedLinkHover: palette.white,\n colorNeutralForegroundInvertedLinkPressed: palette.white,\n colorNeutralForegroundInvertedLinkSelected: palette.white,\n colorNeutralForegroundInverted2: palette.white,\n colorBrandForegroundInverted: palette.themeSecondary,\n colorBrandForegroundInvertedHover: palette.themeTertiary,\n colorBrandForegroundInvertedPressed: palette.themeSecondary,\n colorBrandForegroundOnLight: palette.themePrimary,\n colorBrandForegroundOnLightHover: palette.themeDarkAlt,\n colorBrandForegroundOnLightPressed: palette.themeDark,\n colorBrandForegroundOnLightSelected: palette.themeDark,\n colorNeutralBackground1: palette.white,\n colorNeutralBackground1Hover: palette.neutralLighter,\n colorNeutralBackground1Pressed: palette.neutralQuaternaryAlt,\n colorNeutralBackground1Selected: palette.neutralLight,\n colorNeutralBackground2: palette.neutralLighterAlt,\n colorNeutralBackground2Hover: palette.neutralLighter,\n colorNeutralBackground2Pressed: palette.neutralQuaternaryAlt,\n colorNeutralBackground2Selected: palette.neutralLight,\n colorNeutralBackground3: palette.neutralLighter,\n colorNeutralBackground3Hover: palette.neutralLight,\n colorNeutralBackground3Pressed: palette.neutralQuaternary,\n colorNeutralBackground3Selected: palette.neutralQuaternaryAlt,\n colorNeutralBackground4: palette.neutralLighter,\n colorNeutralBackground4Hover: palette.neutralLighterAlt,\n colorNeutralBackground4Pressed: palette.neutralLighter,\n colorNeutralBackground4Selected: palette.white,\n colorNeutralBackground5: palette.neutralLight,\n colorNeutralBackground5Hover: palette.neutralLighter,\n colorNeutralBackground5Pressed: palette.neutralLighter,\n colorNeutralBackground5Selected: palette.neutralLighterAlt,\n colorNeutralBackground6: palette.neutralLight,\n colorNeutralBackgroundStatic: grey[20],\n colorNeutralBackgroundInverted: palette.neutralSecondary,\n colorSubtleBackground: 'transparent',\n colorSubtleBackgroundHover: palette.neutralLighter,\n colorSubtleBackgroundPressed: palette.neutralQuaternaryAlt,\n colorSubtleBackgroundSelected: palette.neutralLight,\n colorSubtleBackgroundLightAlphaHover: inverted ? whiteAlpha[10] : whiteAlpha[80],\n colorSubtleBackgroundLightAlphaPressed: inverted ? whiteAlpha[5] : whiteAlpha[50],\n colorSubtleBackgroundLightAlphaSelected: 'transparent',\n colorSubtleBackgroundInverted: 'transparent',\n colorSubtleBackgroundInvertedHover: blackAlpha[10],\n colorSubtleBackgroundInvertedPressed: blackAlpha[30],\n colorSubtleBackgroundInvertedSelected: blackAlpha[20],\n colorTransparentBackground: 'transparent',\n colorTransparentBackgroundHover: 'transparent',\n colorTransparentBackgroundPressed: 'transparent',\n colorTransparentBackgroundSelected: 'transparent',\n colorNeutralBackgroundDisabled: palette.neutralLighter,\n colorNeutralBackgroundInvertedDisabled: whiteAlpha[10],\n colorNeutralStencil1: palette.neutralLight,\n colorNeutralStencil2: palette.neutralLighterAlt,\n colorNeutralStencil1Alpha: inverted ? whiteAlpha[10] : blackAlpha[10],\n colorNeutralStencil2Alpha: inverted ? whiteAlpha[5] : blackAlpha[5],\n colorBackgroundOverlay: blackAlpha[40],\n colorScrollbarOverlay: blackAlpha[50],\n colorBrandBackground: palette.themePrimary,\n colorBrandBackgroundHover: palette.themeDarkAlt,\n colorBrandBackgroundPressed: palette.themeDarker,\n colorBrandBackgroundSelected: palette.themeDark,\n colorCompoundBrandBackground: palette.themePrimary,\n colorCompoundBrandBackgroundHover: palette.themeDarkAlt,\n colorCompoundBrandBackgroundPressed: palette.themeDark,\n colorBrandBackgroundStatic: palette.themePrimary,\n colorBrandBackground2: palette.themeLighterAlt,\n colorBrandBackgroundInverted: palette.white,\n colorBrandBackgroundInvertedHover: palette.themeLighterAlt,\n colorBrandBackgroundInvertedPressed: palette.themeLight,\n colorBrandBackgroundInvertedSelected: palette.themeLighter,\n colorNeutralStrokeAccessible: palette.neutralSecondary,\n colorNeutralStrokeAccessibleHover: palette.neutralSecondary,\n colorNeutralStrokeAccessiblePressed: palette.neutralSecondary,\n colorNeutralStrokeAccessibleSelected: palette.themePrimary,\n colorNeutralStroke1: palette.neutralQuaternary,\n colorNeutralStroke1Hover: palette.neutralTertiaryAlt,\n colorNeutralStroke1Pressed: palette.neutralTertiaryAlt,\n colorNeutralStroke1Selected: palette.neutralTertiaryAlt,\n colorNeutralStroke2: palette.neutralQuaternaryAlt,\n colorNeutralStroke3: palette.neutralLighter,\n colorNeutralStrokeOnBrand: palette.white,\n colorNeutralStrokeOnBrand2: palette.white,\n colorNeutralStrokeOnBrand2Hover: palette.white,\n colorNeutralStrokeOnBrand2Pressed: palette.white,\n colorNeutralStrokeOnBrand2Selected: palette.white,\n colorBrandStroke1: palette.themePrimary,\n colorBrandStroke2: palette.themeLight,\n colorCompoundBrandStroke: palette.themePrimary,\n colorCompoundBrandStrokeHover: palette.themeDarkAlt,\n colorCompoundBrandStrokePressed: palette.themeDark,\n colorNeutralStrokeDisabled: palette.neutralQuaternaryAlt,\n colorNeutralStrokeInvertedDisabled: whiteAlpha[40],\n colorTransparentStroke: 'transparent',\n colorTransparentStrokeInteractive: 'transparent',\n colorTransparentStrokeDisabled: 'transparent',\n colorStrokeFocus1: palette.white,\n colorStrokeFocus2: palette.black,\n colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)',\n colorNeutralShadowKey: 'rgba(0,0,0,0.14)',\n colorNeutralShadowAmbientLighter: 'rgba(0,0,0,0.06)',\n colorNeutralShadowKeyLighter: 'rgba(0,0,0,0.07)',\n colorNeutralShadowAmbientDarker: 'rgba(0,0,0,0.20)',\n colorNeutralShadowKeyDarker: 'rgba(0,0,0,0.24)',\n colorBrandShadowAmbient: 'rgba(0,0,0,0.30)',\n colorBrandShadowKey: 'rgba(0,0,0,0.25)',\n };\n};\n\n/**\n * Creates v9 shadow tokens from v8 effects.\n */\nconst mapShadowTokens = (effects: IEffects): Partial<ShadowTokens> => {\n return {\n shadow4: effects.elevation4,\n shadow8: effects.elevation8,\n shadow16: effects.elevation16,\n shadow64: effects.elevation64,\n };\n};\n\n/**\n * Creates v9 border radius tokens from v8 effects\n */\nconst mapBorderRadiusTokens = (effects: IEffects): Partial<BorderRadiusTokens> => {\n return {\n borderRadiusSmall: effects.roundedCorner2,\n borderRadiusMedium: effects.roundedCorner4,\n borderRadiusLarge: effects.roundedCorner6,\n };\n};\n\n/**\n * Creates a v9 theme from a v8 theme.\n * You can optional pass a base v9 theme; otherwise webLightTheme is used.\n */\nexport const createV9Theme = (themeV8: ThemeV8, baseThemeV9?: ThemeV9): ThemeV9 => {\n const baseTheme = baseThemeV9 ?? webLightTheme;\n\n return {\n ...baseTheme,\n ...mapAliasColors(themeV8.palette, themeV8.isInverted),\n ...mapShadowTokens(themeV8.effects),\n ...mapBorderRadiusTokens(themeV8.effects),\n };\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"mappings":"AAEA,SAA2BA,aAAa,QAAQ,4BAA4B;AAE5E,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,mBAAmB;AAEhE;;;AAGA,MAAMC,cAAc,GAAG,CAACC,OAAiB,EAAEC,QAAiB,KAAiB;EAC3E,OAAO;IACLC,uBAAuB,EAAEF,OAAO,CAACG,cAAc;IAC/CC,4BAA4B,EAAEJ,OAAO,CAACG,cAAc;IACpDE,8BAA8B,EAAEL,OAAO,CAACG,cAAc;IACtDG,+BAA+B,EAAEN,OAAO,CAACG,cAAc;IACvDI,uBAAuB,EAAEP,OAAO,CAACQ,gBAAgB;IACjDC,4BAA4B,EAAET,OAAO,CAACG,cAAc;IACpDO,8BAA8B,EAAEV,OAAO,CAACG,cAAc;IACtDQ,+BAA+B,EAAEX,OAAO,CAACG,cAAc;IACvDS,iCAAiC,EAAEZ,OAAO,CAACa,YAAY;IACvDC,mCAAmC,EAAEd,OAAO,CAACe,YAAY;IACzDC,oCAAoC,EAAEhB,OAAO,CAACa,YAAY;IAC1DI,uBAAuB,EAAEjB,OAAO,CAACkB,eAAe;IAChDC,4BAA4B,EAAEnB,OAAO,CAACQ,gBAAgB;IACtDY,8BAA8B,EAAEpB,OAAO,CAACQ,gBAAgB;IACxDa,+BAA+B,E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B;AACH,CAAC;AAED;;;AAGA,MAAMC,qBAAqB,GAAIT,OAAiB,IAAiC;EAC/E,OAAO;IACLU,iBAAiB,EAAEV,OAAO,CAACW,cAAc;IACzCC,kBAAkB,EAAEZ,OAAO,CAACa,cAAc;IAC1CC,iBAAiB,EAAEd,OAAO,CAACe;GAC5B;AACH,CAAC;AAED;;;;AAIA,OAAO,MAAMC,aAAa,GAAG,CAACC,OAAgB,EAAEC,WAAqB,KAAa;EAChF,MAAMC,SAAS,GAAGD,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAIjM,aAAa;EAE9C,OAAO;IACL,GAAGkM,SAAS;IACZ,GAAG9L,cAAc,CAAC4L,OAAO,CAAC3L,OAAO,EAAE2L,OAAO,CAACG,UAAU,CAAC;IACtD,GAAGrB,eAAe,CAACkB,OAAO,CAACjB,OAAO,CAAC;IACnC,GAAGS,qBAAqB,CAACQ,OAAO,CAACjB,OAAO;GACzC;AACH,CAAC","names":["webLightTheme","blackAlpha","whiteAlpha","grey","mapAliasColors","palette","inverted","colorNeutralForeground1","neutralPrimary","colorNeutralForeground1Hover","colorNeutralForeground1Pressed","colorNeutralForeground1Selected","colorNeutralForeground2","neutralSecondary","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","colorNeutralForeground2Selected","colorNeutralForeground2BrandHover","themePrimary","colorNeutralForeground2BrandPressed","themeDarkAlt","colorNeutralForeground2BrandSelected","colorNeutralForeground3","neutralTertiary","colorNeutralForeground3Hover","colorNeutralForeground3Pressed","colorNeutralForeground3Selected","colorNeutralForeground3BrandHover","colorNeutralForeground3BrandPressed","colorNeutralForeground3BrandSelected","colorNeutralForeground4","neutralQuaternary","colorNeutralForegroundDisabled","neutralTertiaryAlt","colorNeutralForegroundInvertedDisabled","colorBrandForegroundLink","colorBrandForegroundLinkHover","themeDark","colorBrandForegroundLinkPressed","themeDarker","colorBrandForegroundLinkSelected","colorNeutralForeground2Link","colorNeutralForeground2LinkHover","colorNeutralForeground2LinkPressed","colorNeutralForeground2LinkSelected","colorCompoundBrandForeground1","colorCompoundBrandForeground1Hover","colorCompoundBrandForeground1Pressed","colorBrandForeground1","colorBrandForeground2","colorNeutralForeground1Static","colorNeutralForegroundInverted","white","colorNeutralForegroundInvertedHover","colorNeutralForegroundInvertedPressed","colorNeutralForegroundInvertedSelected","colorNeutralForegroundOnBrand","colorNeutralForegroundStaticInverted","colorNeutralForegroundInvertedLink","colorNeutralForegroundInvertedLinkHover","colorNeutralForegroundInvertedLinkPressed","colorNeutralForegroundInvertedLinkSelected","colorNeutralForegroundInverted2","colorBrandForegroundInverted","themeSecondary","colorBrandForegroundInvertedHover","themeTertiary","colorBrandForegroundInvertedPressed","colorBrandForegroundOnLight","colorBrandForegroundOnLightHover","colorBrandForegroundOnLightPressed","colorBrandForegroundOnLightSelected","colorNeutralBackground1","colorNeutralBackground1Hover","neutralLighter","colorNeutralBackground1Pressed","neutralQuaternaryAlt","colorNeutralBackground1Selected","neutralLight","colorNeutralBackground2","neutralLighterAlt","colorNeutralBackground2Hover","colorNeutralBackground2Pressed","colorNeutralBackground2Selected","colorNeutralBackground3","colorNeutralBackground3Hover","colorNeutralBackground3Pressed","colorNeutralBackground3Selected","colorNeutralBackground4","colorNeutralBackground4Hover","colorNeutralBackground4Pressed","colorNeutralBackground4Selected","colorNeutralBackground5","colorNeutralBackground5Hover","colorNeutralBackground5Pressed","colorNeutralBackground5Selected","colorNeutralBackground6","colorNeutralBackgroundStatic","colorNeutralBackgroundInverted","colorSubtleBackground","colorSubtleBackgroundHover","colorSubtleBackgroundPressed","colorSubtleBackgroundSelected","colorSubtleBackgroundLightAlphaHover","colorSubtleBackgroundLightAlphaPressed","colorSubtleBackgroundLightAlphaSelected","colorSubtleBackgroundInverted","colorSubtleBackgroundInvertedHover","colorSubtleBackgroundInvertedPressed","colorSubtleBackgroundInvertedSelected","colorTransparentBackground","colorTransparentBackgroundHover","colorTransparentBackgroundPressed","colorTransparentBackgroundSelected","colorNeutralBackgroundDisabled","colorNeutralBackgroundInvertedDisabled","colorNeutralStencil1","colorNeutralStencil2","colorNeutralStencil1Alpha","colorNeutralStencil2Alpha","colorBackgroundOverlay","colorScrollbarOverlay","colorBrandBackground","colorBrandBackgroundHover","colorBrandBackgroundPressed","colorBrandBackgroundSelected","colorCompoundBrandBackground","colorCompoundBrandBackgroundHover","colorCompoundBrandBackgroundPressed","colorBrandBackgroundStatic","colorBrandBackground2","themeLighterAlt","colorBrandBackgroundInverted","colorBrandBackgroundInvertedHover","colorBrandBackgroundInvertedPressed","themeLight","colorBrandBackgroundInvertedSelected","themeLighter","colorNeutralStrokeAccessible","colorNeutralStrokeAccessibleHover","colorNeutralStrokeAccessiblePressed","colorNeutralStrokeAccessibleSelected","colorNeutralStroke1","colorNeutralStroke1Hover","colorNeutralStroke1Pressed","colorNeutralStroke1Selected","colorNeutralStroke2","colorNeutralStroke3","colorNeutralStrokeOnBrand","colorNeutralStrokeOnBrand2","colorNeutralStrokeOnBrand2Hover","colorNeutralStrokeOnBrand2Pressed","colorNeutralStrokeOnBrand2Selected","colorBrandStroke1","colorBrandStroke2","colorCompoundBrandStroke","colorCompoundBrandStrokeHover","colorCompoundBrandStrokePressed","colorNeutralStrokeDisabled","colorNeutralStrokeInvertedDisabled","colorTransparentStroke","colorTransparentStrokeInteractive","colorTransparentStrokeDisabled","colorStrokeFocus1","colorStrokeFocus2","black","colorNeutralShadowAmbient","colorNeutralShadowKey","colorNeutralShadowAmbientLighter","colorNeutralShadowKeyLighter","colorNeutralShadowAmbientDarker","colorNeutralShadowKeyDarker","colorBrandShadowAmbient","colorBrandShadowKey","mapShadowTokens","effects","shadow4","elevation4","shadow8","elevation8","shadow16","elevation16","shadow64","elevation64","mapBorderRadiusTokens","borderRadiusSmall","roundedCorner2","borderRadiusMedium","roundedCorner4","borderRadiusLarge","roundedCorner6","createV9Theme","themeV8","baseThemeV9","baseTheme","isInverted"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Theme/v9ThemeShim.ts"],"sourcesContent":["import { Theme as ThemeV8 } from '@fluentui/react';\nimport type { IEffects, IPalette } from '@fluentui/react';\nimport { Theme as ThemeV9, webLightTheme } from '@fluentui/react-components';\nimport type { BorderRadiusTokens, ColorTokens, ShadowTokens } from '@fluentui/react-components';\nimport { blackAlpha, whiteAlpha, grey } from './themeDuplicates';\n\n/**\n * Creates v9 color tokens from a v8 palette.\n */\nconst mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {\n return {\n colorNeutralForeground1: palette.neutralPrimary,\n colorNeutralForeground1Hover: palette.neutralPrimary,\n colorNeutralForeground1Pressed: palette.neutralPrimary,\n colorNeutralForeground1Selected: palette.neutralPrimary,\n colorNeutralForeground2: palette.neutralSecondary,\n colorNeutralForeground2Hover: palette.neutralPrimary,\n colorNeutralForeground2Pressed: palette.neutralPrimary,\n colorNeutralForeground2Selected: palette.neutralPrimary,\n colorNeutralForeground2BrandHover: palette.themePrimary,\n colorNeutralForeground2BrandPressed: palette.themeDarkAlt,\n colorNeutralForeground2BrandSelected: palette.themePrimary,\n colorNeutralForeground3: palette.neutralTertiary,\n colorNeutralForeground3Hover: palette.neutralSecondary,\n colorNeutralForeground3Pressed: palette.neutralSecondary,\n colorNeutralForeground3Selected: palette.neutralSecondary,\n colorNeutralForeground3BrandHover: palette.themePrimary,\n colorNeutralForeground3BrandPressed: palette.themeDarkAlt,\n colorNeutralForeground3BrandSelected: palette.themePrimary,\n colorNeutralForeground4: palette.neutralQuaternary,\n colorNeutralForegroundDisabled: palette.neutralTertiaryAlt,\n colorNeutralForegroundInvertedDisabled: whiteAlpha[40],\n colorBrandForegroundLink: palette.themeDarkAlt,\n colorBrandForegroundLinkHover: palette.themeDark,\n colorBrandForegroundLinkPressed: palette.themeDarker,\n colorBrandForegroundLinkSelected: palette.themeDarkAlt,\n colorNeutralForeground2Link: palette.neutralSecondary,\n colorNeutralForeground2LinkHover: palette.neutralPrimary,\n colorNeutralForeground2LinkPressed: palette.neutralPrimary,\n colorNeutralForeground2LinkSelected: palette.neutralPrimary,\n colorCompoundBrandForeground1: palette.themePrimary,\n colorCompoundBrandForeground1Hover: palette.themeDarkAlt,\n colorCompoundBrandForeground1Pressed: palette.themeDark,\n colorBrandForeground1: palette.themePrimary,\n colorBrandForeground2: palette.themeDarkAlt,\n colorNeutralForeground1Static: palette.neutralPrimary,\n colorNeutralForegroundInverted: palette.white,\n colorNeutralForegroundInvertedHover: palette.white,\n colorNeutralForegroundInvertedPressed: palette.white,\n colorNeutralForegroundInvertedSelected: palette.white,\n colorNeutralForegroundOnBrand: palette.white,\n colorNeutralForegroundStaticInverted: palette.white,\n colorNeutralForegroundInvertedLink: palette.white,\n colorNeutralForegroundInvertedLinkHover: palette.white,\n colorNeutralForegroundInvertedLinkPressed: palette.white,\n colorNeutralForegroundInvertedLinkSelected: palette.white,\n colorNeutralForegroundInverted2: palette.white,\n colorBrandForegroundInverted: palette.themeSecondary,\n colorBrandForegroundInvertedHover: palette.themeTertiary,\n colorBrandForegroundInvertedPressed: palette.themeSecondary,\n colorBrandForegroundOnLight: palette.themePrimary,\n colorBrandForegroundOnLightHover: palette.themeDarkAlt,\n colorBrandForegroundOnLightPressed: palette.themeDark,\n colorBrandForegroundOnLightSelected: palette.themeDark,\n colorNeutralBackground1: palette.white,\n colorNeutralBackground1Hover: palette.neutralLighter,\n colorNeutralBackground1Pressed: palette.neutralQuaternaryAlt,\n colorNeutralBackground1Selected: palette.neutralLight,\n colorNeutralBackground2: palette.neutralLighterAlt,\n colorNeutralBackground2Hover: palette.neutralLighter,\n colorNeutralBackground2Pressed: palette.neutralQuaternaryAlt,\n colorNeutralBackground2Selected: palette.neutralLight,\n colorNeutralBackground3: palette.neutralLighter,\n colorNeutralBackground3Hover: palette.neutralLight,\n colorNeutralBackground3Pressed: palette.neutralQuaternary,\n colorNeutralBackground3Selected: palette.neutralQuaternaryAlt,\n colorNeutralBackground4: palette.neutralLighter,\n colorNeutralBackground4Hover: palette.neutralLighterAlt,\n colorNeutralBackground4Pressed: palette.neutralLighter,\n colorNeutralBackground4Selected: palette.white,\n colorNeutralBackground5: palette.neutralLight,\n colorNeutralBackground5Hover: palette.neutralLighter,\n colorNeutralBackground5Pressed: palette.neutralLighter,\n colorNeutralBackground5Selected: palette.neutralLighterAlt,\n colorNeutralBackground6: palette.neutralLight,\n colorNeutralBackgroundStatic: grey[20],\n colorNeutralBackgroundInverted: palette.neutralSecondary,\n colorSubtleBackground: 'transparent',\n colorSubtleBackgroundHover: palette.neutralLighter,\n colorSubtleBackgroundPressed: palette.neutralQuaternaryAlt,\n colorSubtleBackgroundSelected: palette.neutralLight,\n colorSubtleBackgroundLightAlphaHover: inverted ? whiteAlpha[10] : whiteAlpha[80],\n colorSubtleBackgroundLightAlphaPressed: inverted ? whiteAlpha[5] : whiteAlpha[50],\n colorSubtleBackgroundLightAlphaSelected: 'transparent',\n colorSubtleBackgroundInverted: 'transparent',\n colorSubtleBackgroundInvertedHover: blackAlpha[10],\n colorSubtleBackgroundInvertedPressed: blackAlpha[30],\n colorSubtleBackgroundInvertedSelected: blackAlpha[20],\n colorTransparentBackground: 'transparent',\n colorTransparentBackgroundHover: 'transparent',\n colorTransparentBackgroundPressed: 'transparent',\n colorTransparentBackgroundSelected: 'transparent',\n colorNeutralBackgroundDisabled: palette.neutralLighter,\n colorNeutralBackgroundInvertedDisabled: whiteAlpha[10],\n colorNeutralStencil1: palette.neutralLight,\n colorNeutralStencil2: palette.neutralLighterAlt,\n colorNeutralStencil1Alpha: inverted ? whiteAlpha[10] : blackAlpha[10],\n colorNeutralStencil2Alpha: inverted ? whiteAlpha[5] : blackAlpha[5],\n colorBackgroundOverlay: blackAlpha[40],\n colorScrollbarOverlay: blackAlpha[50],\n colorBrandBackground: palette.themePrimary,\n colorBrandBackgroundHover: palette.themeDarkAlt,\n colorBrandBackgroundPressed: palette.themeDarker,\n colorBrandBackgroundSelected: palette.themeDark,\n colorCompoundBrandBackground: palette.themePrimary,\n colorCompoundBrandBackgroundHover: palette.themeDarkAlt,\n colorCompoundBrandBackgroundPressed: palette.themeDark,\n colorBrandBackgroundStatic: palette.themePrimary,\n colorBrandBackground2: palette.themeLighterAlt,\n colorBrandBackgroundInverted: palette.white,\n colorBrandBackgroundInvertedHover: palette.themeLighterAlt,\n colorBrandBackgroundInvertedPressed: palette.themeLight,\n colorBrandBackgroundInvertedSelected: palette.themeLighter,\n colorNeutralStrokeAccessible: palette.neutralSecondary,\n colorNeutralStrokeAccessibleHover: palette.neutralSecondary,\n colorNeutralStrokeAccessiblePressed: palette.neutralSecondary,\n colorNeutralStrokeAccessibleSelected: palette.themePrimary,\n colorNeutralStroke1: palette.neutralQuaternary,\n colorNeutralStroke1Hover: palette.neutralTertiaryAlt,\n colorNeutralStroke1Pressed: palette.neutralTertiaryAlt,\n colorNeutralStroke1Selected: palette.neutralTertiaryAlt,\n colorNeutralStroke2: palette.neutralQuaternaryAlt,\n colorNeutralStroke3: palette.neutralLighter,\n colorNeutralStrokeOnBrand: palette.white,\n colorNeutralStrokeOnBrand2: palette.white,\n colorNeutralStrokeOnBrand2Hover: palette.white,\n colorNeutralStrokeOnBrand2Pressed: palette.white,\n colorNeutralStrokeOnBrand2Selected: palette.white,\n colorBrandStroke1: palette.themePrimary,\n colorBrandStroke2: palette.themeLight,\n colorCompoundBrandStroke: palette.themePrimary,\n colorCompoundBrandStrokeHover: palette.themeDarkAlt,\n colorCompoundBrandStrokePressed: palette.themeDark,\n colorNeutralStrokeDisabled: palette.neutralQuaternaryAlt,\n colorNeutralStrokeInvertedDisabled: whiteAlpha[40],\n colorTransparentStroke: 'transparent',\n colorTransparentStrokeInteractive: 'transparent',\n colorTransparentStrokeDisabled: 'transparent',\n colorStrokeFocus1: palette.white,\n colorStrokeFocus2: palette.black,\n colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)',\n colorNeutralShadowKey: 'rgba(0,0,0,0.14)',\n colorNeutralShadowAmbientLighter: 'rgba(0,0,0,0.06)',\n colorNeutralShadowKeyLighter: 'rgba(0,0,0,0.07)',\n colorNeutralShadowAmbientDarker: 'rgba(0,0,0,0.20)',\n colorNeutralShadowKeyDarker: 'rgba(0,0,0,0.24)',\n colorBrandShadowAmbient: 'rgba(0,0,0,0.30)',\n colorBrandShadowKey: 'rgba(0,0,0,0.25)',\n };\n};\n\n/**\n * Creates v9 shadow tokens from v8 effects.\n */\nconst mapShadowTokens = (effects: IEffects): Partial<ShadowTokens> => {\n return {\n shadow4: effects.elevation4,\n shadow8: effects.elevation8,\n shadow16: effects.elevation16,\n shadow64: effects.elevation64,\n };\n};\n\n/**\n * Creates v9 border radius tokens from v8 effects\n */\nconst mapBorderRadiusTokens = (effects: IEffects): Partial<BorderRadiusTokens> => {\n return {\n borderRadiusSmall: effects.roundedCorner2,\n borderRadiusMedium: effects.roundedCorner4,\n borderRadiusLarge: effects.roundedCorner6,\n };\n};\n\n/**\n * Creates a v9 theme from a v8 theme.\n * You can optional pass a base v9 theme; otherwise webLightTheme is used.\n */\nexport const createV9Theme = (themeV8: ThemeV8, baseThemeV9?: ThemeV9): ThemeV9 => {\n const baseTheme = baseThemeV9 ?? webLightTheme;\n\n return {\n ...baseTheme,\n ...mapAliasColors(themeV8.palette, themeV8.isInverted),\n ...mapShadowTokens(themeV8.effects),\n ...mapBorderRadiusTokens(themeV8.effects),\n };\n};\n"]}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAAA,SACEA,gBAAgB,EAChBC,UAAU,EACVC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,QACX,2BAA2B;AAElC,SAASC,YAAY,EAAEC,aAAa,QAAQ,yBAAyB;AAErE,SAASC,aAAa,EAAEC,SAAS,QAAQ,0BAA0B;AAEnE,SACEC,KAAK,EACLC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,aAAa,EACbC,aAAa,EACbC,IAAI,EACJC,WAAW,EACXC,YAAY,EACZC,YAAY,EACZC,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,YAAY,EACZC,KAAK,EACLC,UAAU,QACL,0BAA0B","names":["ActionButtonShim","ButtonShim","CommandButtonShim","CompoundButtonShim","DefaultButtonShim","MenuButtonShim","PrimaryButtonShim","shimButtonProps","ToggleButtonShim","MenuItemShim","shimMenuProps","StackItemShim","StackShim","black","blackAlpha","brandWeb","createBrandVariants","createV8Theme","createV9Theme","grey","grey14Alpha","hcButtonFace","hcButtonText","hcCanvas","hcCanvasText","hcDisabled","hcHighlight","hcHighlightText","hcHyperlink","sharedColors","white","whiteAlpha"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/index.ts"],"sourcesContent":["export {\n ActionButtonShim,\n ButtonShim,\n CommandButtonShim,\n CompoundButtonShim,\n DefaultButtonShim,\n MenuButtonShim,\n PrimaryButtonShim,\n shimButtonProps,\n ToggleButtonShim,\n} from './components/Button/index';\n\nexport { MenuItemShim, shimMenuProps } from './components/Menu/index';\n\nexport { StackItemShim, StackShim } from './components/Stack/index';\n\nexport {\n black,\n blackAlpha,\n brandWeb,\n createBrandVariants,\n createV8Theme,\n createV9Theme,\n grey,\n grey14Alpha,\n hcButtonFace,\n hcButtonText,\n hcCanvas,\n hcCanvasText,\n hcDisabled,\n hcHighlight,\n hcHighlightText,\n hcHyperlink,\n sharedColors,\n white,\n whiteAlpha,\n} from './components/Theme/index';\n\nexport type {\n AlphaColors,\n ColorVariants,\n GlobalSharedColors,\n Greys,\n TextAlignment,\n TextAlignments,\n} from './components/Theme/index';\n"]}
|
|
@@ -4,23 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ActionButtonShim = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_components_1 = /*#__PURE__*/require("@fluentui/react-components");
|
|
11
|
-
|
|
12
9
|
const shimButtonProps_1 = /*#__PURE__*/require("./shimButtonProps");
|
|
13
10
|
/**
|
|
14
11
|
* Shims a v8 ActionButton to render a v9 Button
|
|
15
12
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
13
|
exports.ActionButtonShim = /*#__PURE__*/React.forwardRef((props, _ref) => {
|
|
19
|
-
const variantProps = {
|
|
14
|
+
const variantProps = {
|
|
15
|
+
...props,
|
|
20
16
|
variantClassName: 'ms-Button--action ms-Button--command'
|
|
21
17
|
};
|
|
22
18
|
const shimProps = shimButtonProps_1.shimButtonProps(variantProps);
|
|
23
|
-
return React.createElement(react_components_1.Button, {
|
|
19
|
+
return React.createElement(react_components_1.Button, {
|
|
20
|
+
...props,
|
|
24
21
|
...shimProps,
|
|
25
22
|
appearance: "transparent"
|
|
26
23
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAEA;AAEA;;;AAGaA,wBAAgB,gBAEzBC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;EACnC,MAAMC,YAAY,GAAG;IACnB,GAAGF,KAAK;IACRG,gBAAgB,EAAE;GACnB;EAED,MAAMC,SAAS,GAAGC,iCAAe,CAACH,YAAY,CAAC;EAE/C,OAAOJ,oBAACQ,yBAAM;IAAA,GAAMN,KAAgD;IAAA,GAAMI,SAAS;IAAEG,UAAU,EAAC;EAAa,EAAG;AAClH,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","variantProps","variantClassName","shimProps","shimButtonProps_1","react_components_1","appearance"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/ActionButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims a v8 ActionButton to render a v9 Button\n */\nexport const ActionButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: 'ms-Button--action ms-Button--command',\n };\n\n const shimProps = shimButtonProps(variantProps);\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} appearance=\"transparent\" />;\n});\n"]}
|
|
@@ -4,33 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ButtonShim = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_components_1 = /*#__PURE__*/require("@fluentui/react-components");
|
|
11
|
-
|
|
12
9
|
const shimButtonProps_1 = /*#__PURE__*/require("./shimButtonProps");
|
|
13
|
-
|
|
14
10
|
const ToggleButtonShim_1 = /*#__PURE__*/require("./ToggleButtonShim");
|
|
15
|
-
|
|
16
11
|
const CompoundButtonShim_1 = /*#__PURE__*/require("./CompoundButtonShim");
|
|
17
|
-
|
|
18
12
|
exports.ButtonShim = /*#__PURE__*/React.forwardRef((props, _ref) => {
|
|
19
13
|
var _a;
|
|
20
|
-
|
|
21
14
|
const shimProps = shimButtonProps_1.shimButtonProps(props);
|
|
22
|
-
|
|
23
15
|
if (props.toggle) {
|
|
24
|
-
return React.createElement(ToggleButtonShim_1.ToggleButtonShim, {
|
|
16
|
+
return React.createElement(ToggleButtonShim_1.ToggleButtonShim, {
|
|
17
|
+
...props
|
|
25
18
|
}, props.children);
|
|
26
19
|
}
|
|
27
|
-
|
|
28
20
|
if (props.secondaryText || ((_a = props.onRenderDescription) === null || _a === void 0 ? void 0 : _a.call(props, props))) {
|
|
29
|
-
return React.createElement(CompoundButtonShim_1.CompoundButtonShim, {
|
|
21
|
+
return React.createElement(CompoundButtonShim_1.CompoundButtonShim, {
|
|
22
|
+
...props
|
|
30
23
|
});
|
|
31
24
|
}
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
return React.createElement(react_components_1.Button, {
|
|
26
|
+
...props,
|
|
34
27
|
...shimProps
|
|
35
28
|
});
|
|
36
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAEA;AACA;AACA;AAEaA,kBAAU,gBAEnBC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;;EACnC,MAAMC,SAAS,GAAGC,iCAAe,CAACH,KAAK,CAAC;EAExC,IAAIA,KAAK,CAACI,MAAM,EAAE;IAChB,OAAON,oBAACO,mCAAgB;MAAA,GAAKL;IAAK,GAAGA,KAAK,CAACM,QAAQ,CAAoB;;EAEzE,IAAIN,KAAK,CAACO,aAAa,KAAI,WAAK,CAACC,mBAAmB,+CAAzBR,KAAK,EAAuBA,KAAK,CAAC,GAAE;IAC7D,OAAOF,oBAACW,uCAAkB;MAAA,GAAKT;IAAK,EAAI;;EAG1C,OAAOF,oBAACY,yBAAM;IAAA,GAAMV,KAAgD;IAAA,GAAME;EAAS,EAAI;AACzF,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","shimProps","shimButtonProps_1","toggle","ToggleButtonShim_1","children","secondaryText","onRenderDescription","CompoundButtonShim_1","react_components_1"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/ButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\nimport { ToggleButtonShim } from './ToggleButtonShim';\nimport { CompoundButtonShim } from './CompoundButtonShim';\n\nexport const ButtonShim: React.ForwardRefExoticComponent<\n IBaseButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const shimProps = shimButtonProps(props);\n\n if (props.toggle) {\n return <ToggleButtonShim {...props}>{props.children}</ToggleButtonShim>;\n }\n if (props.secondaryText || props.onRenderDescription?.(props)) {\n return <CompoundButtonShim {...props} />;\n }\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"]}
|
|
@@ -7,9 +7,7 @@ exports.CommandButtonShim = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* Shims v8 CommandButtonShim to render a v9 Button
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
var ActionButtonShim_1 = /*#__PURE__*/require("./ActionButtonShim");
|
|
12
|
-
|
|
13
11
|
Object.defineProperty(exports, "CommandButtonShim", {
|
|
14
12
|
enumerable: true,
|
|
15
13
|
get: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-migration-v8-v9/src/components/Button/CommandButtonShim.tsx"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;;;AAGA;AAASA;EAAAC;EAAAC;IAAA,0CAAgB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/CommandButtonShim.tsx"],"sourcesContent":["/**\n * Shims v8 CommandButtonShim to render a v9 Button\n */\nexport { ActionButtonShim as CommandButtonShim } from './ActionButtonShim';\n"]}
|
|
@@ -4,27 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CompoundButtonShim = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_components_1 = /*#__PURE__*/require("@fluentui/react-components");
|
|
11
|
-
|
|
12
9
|
const shimButtonProps_1 = /*#__PURE__*/require("./shimButtonProps");
|
|
13
10
|
/**
|
|
14
11
|
* Shims v8 CompoundButton to render a v9 CompoundButton
|
|
15
12
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
13
|
exports.CompoundButtonShim = /*#__PURE__*/React.forwardRef((props, _ref) => {
|
|
19
14
|
var _a;
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const variantProps = {
|
|
16
|
+
...props,
|
|
22
17
|
variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound'
|
|
23
18
|
};
|
|
24
|
-
const shimProps = {
|
|
19
|
+
const shimProps = {
|
|
20
|
+
...shimButtonProps_1.shimButtonProps(variantProps),
|
|
25
21
|
secondaryContent: props.secondaryText || ((_a = props.onRenderDescription) === null || _a === void 0 ? void 0 : _a.call(props, props))
|
|
26
22
|
};
|
|
27
|
-
return React.createElement(react_components_1.CompoundButton, {
|
|
23
|
+
return React.createElement(react_components_1.CompoundButton, {
|
|
24
|
+
...props,
|
|
28
25
|
...shimProps
|
|
29
26
|
});
|
|
30
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAGA;AAEA;;;AAGaA,0BAAkB,gBAE3BC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;;EACnC,MAAMC,YAAY,GAAG;IACnB,GAAGF,KAAK;IACRG,gBAAgB,EAAEH,KAAK,CAACI,OAAO,GAAG,4BAA4B,GAAG;GAClE;EAED,MAAMC,SAAS,GAAwB;IACrC,GAAGC,iCAAe,CAACJ,YAAY,CAAC;IAChCK,gBAAgB,EAAEP,KAAK,CAACQ,aAAa,KAAI,WAAK,CAACC,mBAAmB,+CAAzBT,KAAK,EAAuBA,KAAK,CAAC;GAC5E;EAED,OAAOF,oBAACY,iCAAc;IAAA,GAAMV,KAAgD;IAAA,GAAMK;EAAS,EAAI;AACjG,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","shimButtonProps_1","secondaryContent","secondaryText","onRenderDescription","react_components_1"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/CompoundButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { CompoundButton } from '@fluentui/react-components';\nimport type { CompoundButtonProps } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 CompoundButton to render a v9 CompoundButton\n */\nexport const CompoundButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound',\n };\n\n const shimProps: CompoundButtonProps = {\n ...shimButtonProps(variantProps),\n secondaryContent: props.secondaryText || props.onRenderDescription?.(props),\n };\n\n return <CompoundButton {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"]}
|
|
@@ -4,17 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DefaultButtonShim = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const ButtonShim_1 = /*#__PURE__*/require("./ButtonShim");
|
|
11
9
|
/**
|
|
12
10
|
* Shims a v8 DefaultButton to render a v9 Button
|
|
13
11
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
12
|
exports.DefaultButtonShim = /*#__PURE__*/React.forwardRef((props, _ref) => {
|
|
17
|
-
return React.createElement(ButtonShim_1.ButtonShim, {
|
|
13
|
+
return React.createElement(ButtonShim_1.ButtonShim, {
|
|
14
|
+
...props,
|
|
18
15
|
variantClassName: props.primary ? 'ms-Button--primary' : 'ms-Button--default'
|
|
19
16
|
});
|
|
20
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAEA;;;AAGaA,yBAAiB,gBAE1BC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;EACnC,OAAOH,oBAACI,uBAAU;IAAA,GAAKF,KAAK;IAAEG,gBAAgB,EAAEH,KAAK,CAACI,OAAO,GAAG,oBAAoB,GAAG;EAAoB,EAAI;AACjH,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","ButtonShim_1","variantClassName","primary"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/DefaultButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { ButtonShim } from './ButtonShim';\n\n/**\n * Shims a v8 DefaultButton to render a v9 Button\n */\nexport const DefaultButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n return <ButtonShim {...props} variantClassName={props.primary ? 'ms-Button--primary' : 'ms-Button--default'} />;\n});\n"]}
|
|
@@ -4,29 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MenuButtonShim = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_components_1 = /*#__PURE__*/require("@fluentui/react-components");
|
|
11
|
-
|
|
12
9
|
const index_1 = /*#__PURE__*/require("../Menu/index");
|
|
13
|
-
|
|
14
10
|
const shimButtonProps_1 = /*#__PURE__*/require("./shimButtonProps");
|
|
15
|
-
|
|
16
11
|
exports.MenuButtonShim = /*#__PURE__*/React.forwardRef((props, _ref) => {
|
|
17
12
|
var _a;
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const variantProps = {
|
|
14
|
+
...props,
|
|
20
15
|
variantClassName: props.primary ? 'ms-Button--primary' : 'ms-Button--default'
|
|
21
16
|
};
|
|
22
|
-
const shimProps = {
|
|
17
|
+
const shimProps = {
|
|
18
|
+
...shimButtonProps_1.shimButtonProps(variantProps)
|
|
23
19
|
};
|
|
24
20
|
const shimmedMenuProps = props.menuProps ? index_1.shimMenuProps(props.menuProps) : {};
|
|
25
|
-
return React.createElement(react_components_1.Menu, {
|
|
26
|
-
|
|
27
|
-
}
|
|
21
|
+
return React.createElement(react_components_1.Menu, {
|
|
22
|
+
...shimmedMenuProps
|
|
23
|
+
}, React.createElement(react_components_1.MenuTrigger, null, React.createElement(react_components_1.MenuButton, {
|
|
24
|
+
...shimProps
|
|
25
|
+
})), React.createElement(react_components_1.MenuPopover, null, React.createElement(react_components_1.MenuList, null, (_a = props.menuProps) === null || _a === void 0 ? void 0 : _a.items.map(item =>
|
|
26
|
+
// key is added through item spread
|
|
28
27
|
// eslint-disable-next-line react/jsx-key
|
|
29
|
-
React.createElement(index_1.MenuItemShim, {
|
|
28
|
+
React.createElement(index_1.MenuItemShim, {
|
|
29
|
+
...item
|
|
30
30
|
})))));
|
|
31
31
|
});
|
|
32
32
|
//# sourceMappingURL=MenuButtonShim.js.map
|