@fluentui/react-charting 5.23.75 → 5.23.76

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.
@@ -109,6 +109,9 @@ export var getStyles = function (props) {
109
109
  ],
110
110
  hoverCardRoot: {
111
111
  padding: '8px',
112
+ position: 'relative',
113
+ overflowY: 'auto',
114
+ maxHeight: '300px',
112
115
  },
113
116
  subComponentStyles: {
114
117
  hoverCardStyles: {
@@ -1 +1 @@
1
- {"version":3,"file":"Legends.styles.js","sourceRoot":"../src/","sources":["components/Legends/Legends.styles.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAkC,MAAM,6BAA6B,CAAC;AAElH,gEAAgE;AAChE,MAAM,CAAC,IAAM,2BAA2B,GAAG,CAAC,CAAC;AAC7C,MAAM,CAAC,IAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,IAAM,cAAc,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,IAAM,aAAa,GAAG,EAAE,CAAC;AAChC,MAAM,CAAC,IAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,IAAM,gCAAgC,GAAG,EAAE,CAAC;AAC5C,iGAAiG;AACjG,uGAAuG;AACvG,gCAAgC;AAChC,MAAM,CAAC,IAAM,iBAAiB,GAAG,gCAAgC,GAAG,mBAAmB,CAAC;AACxF,MAAM,CAAC,IAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,IAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAwB;;IACxC,IAAA,SAAS,GAA4C,KAAK,UAAjD,EAAE,KAAK,GAAqC,KAAK,MAA1C,EAAE,KAAmC,KAAK,uBAAV,EAA9B,sBAAsB,mBAAG,KAAK,KAAA,CAAW;IAC7D,IAAA,KAAqB,KAAM,EAAzB,OAAO,aAAA,EAAE,KAAK,WAAW,CAAC;IAClC,IAA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AA4B,CAAE,CAAC,CAAC,CAAC,EAAE,GACjH;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,eAAe,EAAE,KAAM,CAAC,cAAc,CAAC,gBAAgB;YACvD,WAAW,EAAE,KAAK;YAClB,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK;SACnE;QACD,2BAA2B,EAAE;YAC3B,aAAa,CAAC,KAAM,EAAE,OAAO,CAAC;gCAE5B,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,QAAQ,IAClC,KAAK,CAAC,KAAK,KACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,UAAG,cAAc,OAAI;SAEjC;QACD,aAAa,EAAE;YACb,OAAO,EAAE,KAAK;SACf;QACD,kBAAkB,EAAE;YAClB,eAAe,EAAE;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC,KAAM,EAAE,OAAO,CAAC,CAAC;aACvC;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { ILegendsStyles, ILegendStyleProps } from './Legends.types';\nimport { HighContrastSelector, getFocusStyle, IGetFocusStylesOptions, IStyle } from '@fluentui/react/lib/Styling';\n\n// Constants needed to create legends using SVG for image export\nexport const LEGEND_CONTAINER_MARGIN_TOP = 8;\nexport const LEGEND_CONTAINER_MARGIN_START = 12;\nexport const LEGEND_PADDING = 8;\nexport const LEGEND_HEIGHT = 32;\nexport const LEGEND_SHAPE_BORDER = 1;\nconst LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;\n// SVG strokes are drawn centered around the path, with half of the stroke width extending inward\n// (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,\n// expand the shape accordingly.\nexport const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;\nexport const LEGEND_SHAPE_MARGIN_END = 8;\nexport const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;\n\nexport const getStyles = (props: ILegendStyleProps): ILegendsStyles => {\n const { className, theme, isLineLegendInBarChart = false } = props;\n const { palette, fonts } = theme!;\n const options: IGetFocusStylesOptions = {\n inset: undefined,\n position: undefined,\n highContrastStyle: {\n outlineColor: theme!.semanticColors.focusBorder,\n },\n borderColor: 'transparent',\n outlineColor: undefined,\n };\n return {\n root: [\n {\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n margin: '-8px 0 0 -8px',\n },\n className,\n ],\n legend: [\n getFocusStyle(theme!, options),\n {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n border: 'none',\n padding: `${LEGEND_PADDING}px`,\n background: 'none',\n textTransform: 'capitalize',\n },\n ],\n rect: {\n selectors: {\n [HighContrastSelector]: {\n content: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n opacity: props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? '0.6' : '',\n },\n },\n width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n height: isLineLegendInBarChart ? '4px' : `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n backgroundColor: props.stripePattern ? '' : props.colorOnSelectedState,\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n border: `${LEGEND_SHAPE_BORDER}px solid`,\n borderColor: props.borderColor ? props.borderColor : theme?.semanticColors.buttonBorder,\n content: props.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${props.colorOnSelectedState} 1px, ${props.colorOnSelectedState} 4px)`\n : '',\n },\n shape: [\n {\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n },\n ],\n triangle: {\n width: '0',\n height: '0',\n borderLeft: '6px solid transparent',\n borderRight: '6px solid transparent',\n borderTop: '10.4px solid',\n borderTopColor: props.colorOnSelectedState,\n marginRight: '8px',\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground\n ? '0.6'\n : props.opacity\n ? props.opacity\n : '',\n selectors: {\n [HighContrastSelector]: {\n border: '0px',\n height: '10.4px',\n width: '10.4px',\n clipPath: 'polygon(50% 100%, 0 0, 100% 0)',\n backgroundImage: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n } as IStyle,\n },\n },\n text: {\n ...fonts.small,\n lineHeight: '16px',\n color: theme?.semanticColors.bodyText,\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? `${INACTIVE_LEGEND_TEXT_OPACITY}` : '',\n },\n hoverChange: {\n width: '12px',\n height: '12px',\n backgroundColor: theme!.semanticColors.buttonBackground,\n marginRight: '8px',\n border: '1px solid',\n borderColor: props.borderColor ? props.borderColor : palette.black,\n },\n overflowIndicationTextStyle: [\n getFocusStyle(theme!, options),\n {\n cursor: 'pointer',\n color: theme?.semanticColors.bodyText,\n ...fonts.small,\n lineHeight: '16px',\n padding: `${LEGEND_PADDING}px`,\n },\n ],\n hoverCardRoot: {\n padding: '8px',\n },\n subComponentStyles: {\n hoverCardStyles: {\n host: [getFocusStyle(theme!, options)],\n },\n },\n };\n};\n"]}
1
+ {"version":3,"file":"Legends.styles.js","sourceRoot":"../src/","sources":["components/Legends/Legends.styles.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAkC,MAAM,6BAA6B,CAAC;AAElH,gEAAgE;AAChE,MAAM,CAAC,IAAM,2BAA2B,GAAG,CAAC,CAAC;AAC7C,MAAM,CAAC,IAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,IAAM,cAAc,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,IAAM,aAAa,GAAG,EAAE,CAAC;AAChC,MAAM,CAAC,IAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,IAA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AAE;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC,KAAM,EAAE,OAAO,CAAC,CAAC;aACvC;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { ILegendsStyles, ILegendStyleProps } from './Legends.types';\nimport { HighContrastSelector, getFocusStyle, IGetFocusStylesOptions, IStyle } from '@fluentui/react/lib/Styling';\n\n// Constants needed to create legends using SVG for image export\nexport const LEGEND_CONTAINER_MARGIN_TOP = 8;\nexport const LEGEND_CONTAINER_MARGIN_START = 12;\nexport const LEGEND_PADDING = 8;\nexport const LEGEND_HEIGHT = 32;\nexport const LEGEND_SHAPE_BORDER = 1;\nconst LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;\n// SVG strokes are drawn centered around the path, with half of the stroke width extending inward\n// (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,\n// expand the shape accordingly.\nexport const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;\nexport const LEGEND_SHAPE_MARGIN_END = 8;\nexport const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;\n\nexport const getStyles = (props: ILegendStyleProps): ILegendsStyles => {\n const { className, theme, isLineLegendInBarChart = false } = props;\n const { palette, fonts } = theme!;\n const options: IGetFocusStylesOptions = {\n inset: undefined,\n position: undefined,\n highContrastStyle: {\n outlineColor: theme!.semanticColors.focusBorder,\n },\n borderColor: 'transparent',\n outlineColor: undefined,\n };\n return {\n root: [\n {\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n margin: '-8px 0 0 -8px',\n },\n className,\n ],\n legend: [\n getFocusStyle(theme!, options),\n {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n border: 'none',\n padding: `${LEGEND_PADDING}px`,\n background: 'none',\n textTransform: 'capitalize',\n },\n ],\n rect: {\n selectors: {\n [HighContrastSelector]: {\n content: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n opacity: props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? '0.6' : '',\n },\n },\n width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n height: isLineLegendInBarChart ? '4px' : `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n backgroundColor: props.stripePattern ? '' : props.colorOnSelectedState,\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n border: `${LEGEND_SHAPE_BORDER}px solid`,\n borderColor: props.borderColor ? props.borderColor : theme?.semanticColors.buttonBorder,\n content: props.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${props.colorOnSelectedState} 1px, ${props.colorOnSelectedState} 4px)`\n : '',\n },\n shape: [\n {\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n },\n ],\n triangle: {\n width: '0',\n height: '0',\n borderLeft: '6px solid transparent',\n borderRight: '6px solid transparent',\n borderTop: '10.4px solid',\n borderTopColor: props.colorOnSelectedState,\n marginRight: '8px',\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground\n ? '0.6'\n : props.opacity\n ? props.opacity\n : '',\n selectors: {\n [HighContrastSelector]: {\n border: '0px',\n height: '10.4px',\n width: '10.4px',\n clipPath: 'polygon(50% 100%, 0 0, 100% 0)',\n backgroundImage: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n } as IStyle,\n },\n },\n text: {\n ...fonts.small,\n lineHeight: '16px',\n color: theme?.semanticColors.bodyText,\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? `${INACTIVE_LEGEND_TEXT_OPACITY}` : '',\n },\n hoverChange: {\n width: '12px',\n height: '12px',\n backgroundColor: theme!.semanticColors.buttonBackground,\n marginRight: '8px',\n border: '1px solid',\n borderColor: props.borderColor ? props.borderColor : palette.black,\n },\n overflowIndicationTextStyle: [\n getFocusStyle(theme!, options),\n {\n cursor: 'pointer',\n color: theme?.semanticColors.bodyText,\n ...fonts.small,\n lineHeight: '16px',\n padding: `${LEGEND_PADDING}px`,\n },\n ],\n hoverCardRoot: {\n padding: '8px',\n position: 'relative',\n overflowY: 'auto',\n maxHeight: '300px',\n },\n subComponentStyles: {\n hoverCardStyles: {\n host: [getFocusStyle(theme!, options)],\n },\n },\n };\n};\n"]}
@@ -111,6 +111,9 @@ define(["require", "exports", "tslib", "@fluentui/react/lib/Styling"], function
111
111
  ],
112
112
  hoverCardRoot: {
113
113
  padding: '8px',
114
+ position: 'relative',
115
+ overflowY: 'auto',
116
+ maxHeight: '300px',
114
117
  },
115
118
  subComponentStyles: {
116
119
  hoverCardStyles: {
@@ -1 +1 @@
1
- {"version":3,"file":"Legends.styles.js","sourceRoot":"../src/","sources":["components/Legends/Legends.styles.ts"],"names":[],"mappings":";;;;IAGA,gEAAgE;IACnD,QAAA,2BAA2B,GAAG,CAAC,CAAC;IAChC,QAAA,6BAA6B,GAAG,EAAE,CAAC;IACnC,QAAA,cAAc,GAAG,CAAC,CAAC;IACnB,QAAA,aAAa,GAAG,EAAE,CAAC;IACnB,QAAA,mBAAmB,GAAG,CAAC,CAAC;IACrC,IAAM,gCAAgC,GAAG,EAAE,CAAC;IAC5C,iGAAiG;IACjG,uGAAuG;IACvG,gCAAgC;IACnB,QAAA,iBAAiB,GAAG,gCAAgC,GAAG,2BAAmB,CAAC;IAC3E,QAAA,uBAAuB,GAAG,CAAC,CAAC;IAC5B,QAAA,4BAA4B,GAAG,IAAI,CAAC;IAE1C,IAAM,SAAS,GAAG,UAAC,KAAwB;;QACxC,IAAA,SAAS,GAA4C,KAAK,UAAjD,EAAE,KAAK,GAAqC,KAAK,MAA1C,EAAE,KAAmC,KAAK,uBAAV,EAA9B,sBAAsB,mBAAG,KAAK,KAAA,CAAW;QAC7D,IAAA,KAAqB,KAAM,EAAzB,OAAO,aAAA,EAAE,KAAK,WAAW,CAAC;QAClC,IAAM,OAAO,GAA2B;YACtC,KAAK,EAAE,SAAS;YAChB,QAAQ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CAAC,CAAC,CAAC,EAAE,GACjH;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,eAAe,EAAE,KAAM,CAAC,cAAc,CAAC,gBAAgB;gBACvD,WAAW,EAAE,KAAK;gBAClB,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK;aACnE;YACD,2BAA2B,EAAE;gBAC3B,IAAA,uBAAa,EAAC,KAAM,EAAE,OAAO,CAAC;oDAE5B,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,QAAQ,IAClC,KAAK,CAAC,KAAK,KACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,UAAG,sBAAc,OAAI;aAEjC;YACD,aAAa,EAAE;gBACb,OAAO,EAAE,KAAK;aACf;YACD,kBAAkB,EAAE;gBAClB,eAAe,EAAE;oBACf,IAAI,EAAE,CAAC,IAAA,uBAAa,EAAC,KAAM,EAAE,OAAO,CAAC,CAAC;iBACvC;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAnHW,QAAA,SAAS,aAmHpB","sourcesContent":["import { ILegendsStyles, ILegendStyleProps } from './Legends.types';\nimport { HighContrastSelector, getFocusStyle, IGetFocusStylesOptions, IStyle } from '@fluentui/react/lib/Styling';\n\n// Constants needed to create legends using SVG for image export\nexport const LEGEND_CONTAINER_MARGIN_TOP = 8;\nexport const LEGEND_CONTAINER_MARGIN_START = 12;\nexport const LEGEND_PADDING = 8;\nexport const LEGEND_HEIGHT = 32;\nexport const LEGEND_SHAPE_BORDER = 1;\nconst LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;\n// SVG strokes are drawn centered around the path, with half of the stroke width extending inward\n// (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,\n// expand the shape accordingly.\nexport const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;\nexport const LEGEND_SHAPE_MARGIN_END = 8;\nexport const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;\n\nexport const getStyles = (props: ILegendStyleProps): ILegendsStyles => {\n const { className, theme, isLineLegendInBarChart = false } = props;\n const { palette, fonts } = theme!;\n const options: IGetFocusStylesOptions = {\n inset: undefined,\n position: undefined,\n highContrastStyle: {\n outlineColor: theme!.semanticColors.focusBorder,\n },\n borderColor: 'transparent',\n outlineColor: undefined,\n };\n return {\n root: [\n {\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n margin: '-8px 0 0 -8px',\n },\n className,\n ],\n legend: [\n getFocusStyle(theme!, options),\n {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n border: 'none',\n padding: `${LEGEND_PADDING}px`,\n background: 'none',\n textTransform: 'capitalize',\n },\n ],\n rect: {\n selectors: {\n [HighContrastSelector]: {\n content: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n opacity: props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? '0.6' : '',\n },\n },\n width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n height: isLineLegendInBarChart ? '4px' : `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n backgroundColor: props.stripePattern ? '' : props.colorOnSelectedState,\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n border: `${LEGEND_SHAPE_BORDER}px solid`,\n borderColor: props.borderColor ? props.borderColor : theme?.semanticColors.buttonBorder,\n content: props.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${props.colorOnSelectedState} 1px, ${props.colorOnSelectedState} 4px)`\n : '',\n },\n shape: [\n {\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n },\n ],\n triangle: {\n width: '0',\n height: '0',\n borderLeft: '6px solid transparent',\n borderRight: '6px solid transparent',\n borderTop: '10.4px solid',\n borderTopColor: props.colorOnSelectedState,\n marginRight: '8px',\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground\n ? '0.6'\n : props.opacity\n ? props.opacity\n : '',\n selectors: {\n [HighContrastSelector]: {\n border: '0px',\n height: '10.4px',\n width: '10.4px',\n clipPath: 'polygon(50% 100%, 0 0, 100% 0)',\n backgroundImage: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n } as IStyle,\n },\n },\n text: {\n ...fonts.small,\n lineHeight: '16px',\n color: theme?.semanticColors.bodyText,\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? `${INACTIVE_LEGEND_TEXT_OPACITY}` : '',\n },\n hoverChange: {\n width: '12px',\n height: '12px',\n backgroundColor: theme!.semanticColors.buttonBackground,\n marginRight: '8px',\n border: '1px solid',\n borderColor: props.borderColor ? props.borderColor : palette.black,\n },\n overflowIndicationTextStyle: [\n getFocusStyle(theme!, options),\n {\n cursor: 'pointer',\n color: theme?.semanticColors.bodyText,\n ...fonts.small,\n lineHeight: '16px',\n padding: `${LEGEND_PADDING}px`,\n },\n ],\n hoverCardRoot: {\n padding: '8px',\n },\n subComponentStyles: {\n hoverCardStyles: {\n host: [getFocusStyle(theme!, options)],\n },\n },\n };\n};\n"]}
1
+ {"version":3,"file":"Legends.styles.js","sourceRoot":"../src/","sources":["components/Legends/Legends.styles.ts"],"names":[],"mappings":";;;;IAGA,gEAAgE;IACnD,QAAA,2BAA2B,GAAG,CAAC,CAAC;IAChC,QAAA,6BAA6B,GAAG,EAAE,CAAC;IACnC,QAAA,cAAc,GAAG,CAAC,CAAC;IACnB,QAAA,aAAa,GAAG,EAAE,CAAC;IACnB,QAAA,mBAAmB,GAAG,CAAC,CAAC;IACrC,IAAM,gCAAgC,GAAG,EAAE,CAAC;IAC5C,iGAAiG;IACjG,uGAAuG;IACvG,gCAAgC;IACnB,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AO,CAAC,CAAC;iBACvC;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAtHW,QAAA,SAAS,aAsHpB","sourcesContent":["import { ILegendsStyles, ILegendStyleProps } from './Legends.types';\nimport { HighContrastSelector, getFocusStyle, IGetFocusStylesOptions, IStyle } from '@fluentui/react/lib/Styling';\n\n// Constants needed to create legends using SVG for image export\nexport const LEGEND_CONTAINER_MARGIN_TOP = 8;\nexport const LEGEND_CONTAINER_MARGIN_START = 12;\nexport const LEGEND_PADDING = 8;\nexport const LEGEND_HEIGHT = 32;\nexport const LEGEND_SHAPE_BORDER = 1;\nconst LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;\n// SVG strokes are drawn centered around the path, with half of the stroke width extending inward\n// (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,\n// expand the shape accordingly.\nexport const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;\nexport const LEGEND_SHAPE_MARGIN_END = 8;\nexport const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;\n\nexport const getStyles = (props: ILegendStyleProps): ILegendsStyles => {\n const { className, theme, isLineLegendInBarChart = false } = props;\n const { palette, fonts } = theme!;\n const options: IGetFocusStylesOptions = {\n inset: undefined,\n position: undefined,\n highContrastStyle: {\n outlineColor: theme!.semanticColors.focusBorder,\n },\n borderColor: 'transparent',\n outlineColor: undefined,\n };\n return {\n root: [\n {\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n margin: '-8px 0 0 -8px',\n },\n className,\n ],\n legend: [\n getFocusStyle(theme!, options),\n {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n border: 'none',\n padding: `${LEGEND_PADDING}px`,\n background: 'none',\n textTransform: 'capitalize',\n },\n ],\n rect: {\n selectors: {\n [HighContrastSelector]: {\n content: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n opacity: props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? '0.6' : '',\n },\n },\n width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n height: isLineLegendInBarChart ? '4px' : `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n backgroundColor: props.stripePattern ? '' : props.colorOnSelectedState,\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n border: `${LEGEND_SHAPE_BORDER}px solid`,\n borderColor: props.borderColor ? props.borderColor : theme?.semanticColors.buttonBorder,\n content: props.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${props.colorOnSelectedState} 1px, ${props.colorOnSelectedState} 4px)`\n : '',\n },\n shape: [\n {\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n },\n ],\n triangle: {\n width: '0',\n height: '0',\n borderLeft: '6px solid transparent',\n borderRight: '6px solid transparent',\n borderTop: '10.4px solid',\n borderTopColor: props.colorOnSelectedState,\n marginRight: '8px',\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground\n ? '0.6'\n : props.opacity\n ? props.opacity\n : '',\n selectors: {\n [HighContrastSelector]: {\n border: '0px',\n height: '10.4px',\n width: '10.4px',\n clipPath: 'polygon(50% 100%, 0 0, 100% 0)',\n backgroundImage: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n } as IStyle,\n },\n },\n text: {\n ...fonts.small,\n lineHeight: '16px',\n color: theme?.semanticColors.bodyText,\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? `${INACTIVE_LEGEND_TEXT_OPACITY}` : '',\n },\n hoverChange: {\n width: '12px',\n height: '12px',\n backgroundColor: theme!.semanticColors.buttonBackground,\n marginRight: '8px',\n border: '1px solid',\n borderColor: props.borderColor ? props.borderColor : palette.black,\n },\n overflowIndicationTextStyle: [\n getFocusStyle(theme!, options),\n {\n cursor: 'pointer',\n color: theme?.semanticColors.bodyText,\n ...fonts.small,\n lineHeight: '16px',\n padding: `${LEGEND_PADDING}px`,\n },\n ],\n hoverCardRoot: {\n padding: '8px',\n position: 'relative',\n overflowY: 'auto',\n maxHeight: '300px',\n },\n subComponentStyles: {\n hoverCardStyles: {\n host: [getFocusStyle(theme!, options)],\n },\n },\n };\n};\n"]}
@@ -112,6 +112,9 @@ var getStyles = function (props) {
112
112
  ],
113
113
  hoverCardRoot: {
114
114
  padding: '8px',
115
+ position: 'relative',
116
+ overflowY: 'auto',
117
+ maxHeight: '300px',
115
118
  },
116
119
  subComponentStyles: {
117
120
  hoverCardStyles: {
@@ -1 +1 @@
1
- {"version":3,"file":"Legends.styles.js","sourceRoot":"../src/","sources":["components/Legends/Legends.styles.ts"],"names":[],"mappings":";;;;AACA,uDAAkH;AAElH,gEAAgE;AACnD,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAChC,QAAA,6BAA6B,GAAG,EAAE,CAAC;AACnC,QAAA,cAAc,GAAG,CAAC,CAAC;AACnB,QAAA,aAAa,GAAG,EAAE,CAAC;AACnB,QAAA,mBAAmB,GAAG,CAAC,CAAC;AACrC,IAAM,gCAAgC,GAAG,EAAE,CAAC;AAC5C,iGAAiG;AACjG,uGAAuG;AACvG,gCAAgC;AACnB,QAAA,iBAAiB,GAAG,gCAAgC,GAAG,2BAAmB,CAAC;AAC3E,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAC5B,QAAA,4BAA4B,GAAG,IAAI,CAAC;AAE1C,IAAM,SAAS,GAAG,UAAC,KAAwB;;IACxC,IAAA,SAAS,GAA4C,KAAK,UAAjD,EAAE,KAAK,GAAqC,KAAK,MAA1C,EAAE,KAAmC,KAAK,uBAAV,EAA9B,sBAAsB,mBAAG,KAAK,KAAA,CAAW;IAC7D,IAAA,KAAqB,KAAM,EAAzB,OAAO,aAAA,EAAE,KAAK,WAAW,CAAC;IAClC,IAAM,OAAO,GAA2B;QACtC,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,iBAAiB,EAAE;YACjB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YACb,MAAM,EAAE,MAAM;YACd,eAAe,EAAE,KAAM,CAAC,cAAc,CAAC,gBAAgB;YACvD,WAAW,EAAE,KAAK;YAClB,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK;SACnE;QACD,2BAA2B,EAAE;YAC3B,IAAA,uBAAa,EAAC,KAAM,EAAE,OAAO,CAAC;gDAE5B,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,QAAQ,IAClC,KAAK,CAAC,KAAK,KACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,UAAG,sBAAc,OAAI;SAEjC;QACD,aAAa,EAAE;YACb,OAAO,EAAE,KAAK;SACf;QACD,kBAAkB,EAAE;YAClB,eAAe,EAAE;gBACf,IAAI,EAAE,CAAC,IAAA,uBAAa,EAAC,KAAM,EAAE,OAAO,CAAC,CAAC;aACvC;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAnHW,QAAA,SAAS,aAmHpB","sourcesContent":["import { ILegendsStyles, ILegendStyleProps } from './Legends.types';\nimport { HighContrastSelector, getFocusStyle, IGetFocusStylesOptions, IStyle } from '@fluentui/react/lib/Styling';\n\n// Constants needed to create legends using SVG for image export\nexport const LEGEND_CONTAINER_MARGIN_TOP = 8;\nexport const LEGEND_CONTAINER_MARGIN_START = 12;\nexport const LEGEND_PADDING = 8;\nexport const LEGEND_HEIGHT = 32;\nexport const LEGEND_SHAPE_BORDER = 1;\nconst LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;\n// SVG strokes are drawn centered around the path, with half of the stroke width extending inward\n// (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,\n// expand the shape accordingly.\nexport const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;\nexport const LEGEND_SHAPE_MARGIN_END = 8;\nexport const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;\n\nexport const getStyles = (props: ILegendStyleProps): ILegendsStyles => {\n const { className, theme, isLineLegendInBarChart = false } = props;\n const { palette, fonts } = theme!;\n const options: IGetFocusStylesOptions = {\n inset: undefined,\n position: undefined,\n highContrastStyle: {\n outlineColor: theme!.semanticColors.focusBorder,\n },\n borderColor: 'transparent',\n outlineColor: undefined,\n };\n return {\n root: [\n {\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n margin: '-8px 0 0 -8px',\n },\n className,\n ],\n legend: [\n getFocusStyle(theme!, options),\n {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n border: 'none',\n padding: `${LEGEND_PADDING}px`,\n background: 'none',\n textTransform: 'capitalize',\n },\n ],\n rect: {\n selectors: {\n [HighContrastSelector]: {\n content: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n opacity: props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? '0.6' : '',\n },\n },\n width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n height: isLineLegendInBarChart ? '4px' : `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n backgroundColor: props.stripePattern ? '' : props.colorOnSelectedState,\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n border: `${LEGEND_SHAPE_BORDER}px solid`,\n borderColor: props.borderColor ? props.borderColor : theme?.semanticColors.buttonBorder,\n content: props.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${props.colorOnSelectedState} 1px, ${props.colorOnSelectedState} 4px)`\n : '',\n },\n shape: [\n {\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n },\n ],\n triangle: {\n width: '0',\n height: '0',\n borderLeft: '6px solid transparent',\n borderRight: '6px solid transparent',\n borderTop: '10.4px solid',\n borderTopColor: props.colorOnSelectedState,\n marginRight: '8px',\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground\n ? '0.6'\n : props.opacity\n ? props.opacity\n : '',\n selectors: {\n [HighContrastSelector]: {\n border: '0px',\n height: '10.4px',\n width: '10.4px',\n clipPath: 'polygon(50% 100%, 0 0, 100% 0)',\n backgroundImage: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n } as IStyle,\n },\n },\n text: {\n ...fonts.small,\n lineHeight: '16px',\n color: theme?.semanticColors.bodyText,\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? `${INACTIVE_LEGEND_TEXT_OPACITY}` : '',\n },\n hoverChange: {\n width: '12px',\n height: '12px',\n backgroundColor: theme!.semanticColors.buttonBackground,\n marginRight: '8px',\n border: '1px solid',\n borderColor: props.borderColor ? props.borderColor : palette.black,\n },\n overflowIndicationTextStyle: [\n getFocusStyle(theme!, options),\n {\n cursor: 'pointer',\n color: theme?.semanticColors.bodyText,\n ...fonts.small,\n lineHeight: '16px',\n padding: `${LEGEND_PADDING}px`,\n },\n ],\n hoverCardRoot: {\n padding: '8px',\n },\n subComponentStyles: {\n hoverCardStyles: {\n host: [getFocusStyle(theme!, options)],\n },\n },\n };\n};\n"]}
1
+ {"version":3,"file":"Legends.styles.js","sourceRoot":"../src/","sources":["components/Legends/Legends.styles.ts"],"names":[],"mappings":";;;;AACA,uDAAkH;AAElH,gEAAgE;AACnD,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAChC,QAAA,6BAA6B,GAAG,EAAE,CAAC;AACnC,QAAA,cAAc,GAAG,CAAC,CAAC;AACnB,QAAA,aAAa,GAAG,EAAE,CAAC;AACnB,QAAA,mBAAmB,GAAG,CAAC,CAAC;AACrC,IAAM,gCAAgC,GAAG,EAAE,CAAC;AAC5C,iGAAiG;AACjG,uGAAuG;AACvG,gCAAgC;AACnB,QAAA,iBAAiB,GAAG,gCAAgC,GAAG,2BAAmB,CAAC;AAC3E,QAAA,uBAAu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Props } from './Legends.types';\nimport { HighContrastSelector, getFocusStyle, IGetFocusStylesOptions, IStyle } from '@fluentui/react/lib/Styling';\n\n// Constants needed to create legends using SVG for image export\nexport const LEGEND_CONTAINER_MARGIN_TOP = 8;\nexport const LEGEND_CONTAINER_MARGIN_START = 12;\nexport const LEGEND_PADDING = 8;\nexport const LEGEND_HEIGHT = 32;\nexport const LEGEND_SHAPE_BORDER = 1;\nconst LEGEND_SHAPE_SIZE_WITHOUT_BORDER = 12;\n// SVG strokes are drawn centered around the path, with half of the stroke width extending inward\n// (overlapping the fill area) and half outward. To ensure the filled area maintains its intended size,\n// expand the shape accordingly.\nexport const LEGEND_SHAPE_SIZE = LEGEND_SHAPE_SIZE_WITHOUT_BORDER + LEGEND_SHAPE_BORDER;\nexport const LEGEND_SHAPE_MARGIN_END = 8;\nexport const INACTIVE_LEGEND_TEXT_OPACITY = 0.67;\n\nexport const getStyles = (props: ILegendStyleProps): ILegendsStyles => {\n const { className, theme, isLineLegendInBarChart = false } = props;\n const { palette, fonts } = theme!;\n const options: IGetFocusStylesOptions = {\n inset: undefined,\n position: undefined,\n highContrastStyle: {\n outlineColor: theme!.semanticColors.focusBorder,\n },\n borderColor: 'transparent',\n outlineColor: undefined,\n };\n return {\n root: [\n {\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n margin: '-8px 0 0 -8px',\n },\n className,\n ],\n legend: [\n getFocusStyle(theme!, options),\n {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n border: 'none',\n padding: `${LEGEND_PADDING}px`,\n background: 'none',\n textTransform: 'capitalize',\n },\n ],\n rect: {\n selectors: {\n [HighContrastSelector]: {\n content: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n opacity: props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? '0.6' : '',\n },\n },\n width: `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n height: isLineLegendInBarChart ? '4px' : `${LEGEND_SHAPE_SIZE_WITHOUT_BORDER}px`,\n backgroundColor: props.stripePattern ? '' : props.colorOnSelectedState,\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n border: `${LEGEND_SHAPE_BORDER}px solid`,\n borderColor: props.borderColor ? props.borderColor : theme?.semanticColors.buttonBorder,\n content: props.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${props.colorOnSelectedState} 1px, ${props.colorOnSelectedState} 4px)`\n : '',\n },\n shape: [\n {\n marginRight: `${LEGEND_SHAPE_MARGIN_END}px`,\n },\n ],\n triangle: {\n width: '0',\n height: '0',\n borderLeft: '6px solid transparent',\n borderRight: '6px solid transparent',\n borderTop: '10.4px solid',\n borderTopColor: props.colorOnSelectedState,\n marginRight: '8px',\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground\n ? '0.6'\n : props.opacity\n ? props.opacity\n : '',\n selectors: {\n [HighContrastSelector]: {\n border: '0px',\n height: '10.4px',\n width: '10.4px',\n clipPath: 'polygon(50% 100%, 0 0, 100% 0)',\n backgroundImage: `linear-gradient(to right, ${props.colorOnSelectedState}, ${props.colorOnSelectedState})`,\n } as IStyle,\n },\n },\n text: {\n ...fonts.small,\n lineHeight: '16px',\n color: theme?.semanticColors.bodyText,\n opacity:\n props.colorOnSelectedState === theme!.semanticColors.buttonBackground ? `${INACTIVE_LEGEND_TEXT_OPACITY}` : '',\n },\n hoverChange: {\n width: '12px',\n height: '12px',\n backgroundColor: theme!.semanticColors.buttonBackground,\n marginRight: '8px',\n border: '1px solid',\n borderColor: props.borderColor ? props.borderColor : palette.black,\n },\n overflowIndicationTextStyle: [\n getFocusStyle(theme!, options),\n {\n cursor: 'pointer',\n color: theme?.semanticColors.bodyText,\n ...fonts.small,\n lineHeight: '16px',\n padding: `${LEGEND_PADDING}px`,\n },\n ],\n hoverCardRoot: {\n padding: '8px',\n position: 'relative',\n overflowY: 'auto',\n maxHeight: '300px',\n },\n subComponentStyles: {\n hoverCardStyles: {\n host: [getFocusStyle(theme!, options)],\n },\n },\n };\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-charting",
3
- "version": "5.23.75",
3
+ "version": "5.23.76",
4
4
  "description": "React web charting controls for Microsoft fluentui system.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",