@backstage/core-components 0.14.8-next.2 → 0.14.8

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.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @backstage/core-components
2
2
 
3
+ ## 0.14.8
4
+
5
+ ### Patch Changes
6
+
7
+ - a0b46f6: Having tooltip inherit font size for consistency in catalog table columns
8
+ - 59cee81: Use `inherit` variant on OverflowTooltip underlying Typography component.
9
+ - eae0e4d: Fixed an issue causing `SidebarSubmenu` text to not follow the theme color
10
+ - e4811ec: Make number of decimal digits in Gauge configurable via the `decimalDigits` property
11
+ - 83c4251: Adds icons to status component
12
+ - 3e175c8: Removed max width from `Select` component.
13
+ - 57d7582: Fixed a bug in `SupportButton` where the title was rendered with the characteristics of a button.
14
+ - Updated dependencies
15
+ - @backstage/core-plugin-api@1.9.3
16
+ - @backstage/theme@0.5.6
17
+ - @backstage/config@1.2.0
18
+ - @backstage/errors@1.2.4
19
+ - @backstage/version-bridge@1.0.8
20
+
3
21
  ## 0.14.8-next.2
4
22
 
5
23
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/core-components",
3
- "version": "0.14.8-next.2",
3
+ "version": "0.14.8",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
@@ -43,7 +43,8 @@ const defaultGaugeProps = {
43
43
  fractional: true,
44
44
  inverse: false,
45
45
  unit: "%",
46
- max: 100
46
+ max: 100,
47
+ relativeToMax: false
47
48
  };
48
49
  const getProgressColor = ({
49
50
  palette,
@@ -68,12 +69,32 @@ function Gauge(props) {
68
69
  const { getColor = getProgressColor, size = "normal" } = props;
69
70
  const classes = useStyles(props);
70
71
  const { palette } = useTheme();
71
- const { value, fractional, inverse, unit, max, description } = {
72
+ const {
73
+ value,
74
+ fractional,
75
+ inverse,
76
+ unit,
77
+ max,
78
+ description,
79
+ relativeToMax,
80
+ decimalDigits
81
+ } = {
72
82
  ...defaultGaugeProps,
73
83
  ...props
74
84
  };
75
- const asPercentage = fractional ? Math.round(value * max) : value;
76
- const asActual = max !== 100 ? Math.round(value) : asPercentage;
85
+ let asPercentage;
86
+ if (relativeToMax) {
87
+ asPercentage = value / max * 100;
88
+ } else {
89
+ asPercentage = fractional ? Math.round(value * max) : value;
90
+ }
91
+ let asActual;
92
+ if (relativeToMax) {
93
+ asActual = value;
94
+ } else {
95
+ asActual = max !== 100 ? Math.round(value) : asPercentage;
96
+ }
97
+ const asDisplay = decimalDigits === void 0 ? asActual.toString() : asActual.toFixed(decimalDigits);
77
98
  const [isHovering, setIsHovering] = useState(false);
78
99
  useEffect(() => {
79
100
  const node = hoverRef;
@@ -98,7 +119,12 @@ function Gauge(props) {
98
119
  percent: asPercentage,
99
120
  strokeWidth: 12,
100
121
  trailWidth: 12,
101
- strokeColor: getColor({ palette, value: asActual, inverse, max }),
122
+ strokeColor: getColor({
123
+ palette,
124
+ value: asPercentage,
125
+ inverse,
126
+ max: relativeToMax ? 100 : max
127
+ }),
102
128
  className: classes.circle
103
129
  }
104
130
  ), description && isHovering ? /* @__PURE__ */ React__default.createElement(Box, { className: classes.description }, description) : /* @__PURE__ */ React__default.createElement(
@@ -108,7 +134,7 @@ function Gauge(props) {
108
134
  [classes.overlaySmall]: size === "small"
109
135
  })
110
136
  },
111
- isNaN(value) ? "N/A" : `${asActual}${unit}`
137
+ isNaN(value) ? "N/A" : `${asDisplay}${unit}`
112
138
  ));
113
139
  }
114
140
 
@@ -1 +1 @@
1
- {"version":3,"file":"Gauge.esm.js","sources":["../../../src/components/ProgressBars/Gauge.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstagePalette } from '@backstage/theme';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { Circle } from 'rc-progress';\nimport React, { ReactNode, useEffect, useState } from 'react';\nimport Box from '@material-ui/core/Box';\nimport classNames from 'classnames';\n\n/** @public */\nexport type GaugeClassKey =\n | 'root'\n | 'overlay'\n | 'description'\n | 'circle'\n | 'colorUnknown';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n position: 'relative',\n lineHeight: 0,\n },\n overlay: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -60%)',\n fontSize: theme.typography.pxToRem(45),\n fontWeight: theme.typography.fontWeightBold,\n color: theme.palette.textContrast,\n },\n overlaySmall: {\n fontSize: theme.typography.pxToRem(25),\n },\n description: {\n fontSize: '100%',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n position: 'absolute',\n wordBreak: 'break-all',\n display: 'inline-block',\n },\n circle: {\n width: '80%',\n transform: 'translate(10%, 0)',\n },\n colorUnknown: {},\n }),\n { name: 'BackstageGauge' },\n);\n\n/** @public */\nexport type GaugeProps = {\n value: number;\n fractional?: boolean;\n inverse?: boolean;\n unit?: string;\n max?: number;\n size?: 'normal' | 'small';\n description?: ReactNode;\n getColor?: GaugePropsGetColor;\n};\n\n/** @public */\nexport type GaugePropsGetColorOptions = {\n palette: BackstagePalette;\n value: number;\n inverse?: boolean;\n max?: number;\n};\n\n/** @public */\nexport type GaugePropsGetColor = (args: GaugePropsGetColorOptions) => string;\n\nconst defaultGaugeProps = {\n fractional: true,\n inverse: false,\n unit: '%',\n max: 100,\n};\n\nexport const getProgressColor: GaugePropsGetColor = ({\n palette,\n value,\n inverse,\n max,\n}) => {\n if (isNaN(value)) {\n return '#ddd';\n }\n\n const actualMax = max ? max : defaultGaugeProps.max;\n const actualValue = inverse ? actualMax - value : value;\n\n if (actualValue < actualMax / 3) {\n return palette.status.error;\n } else if (actualValue < actualMax * (2 / 3)) {\n return palette.status.warning;\n }\n\n return palette.status.ok;\n};\n\n/**\n * Circular Progress Bar\n *\n * @public\n *\n */\n\nexport function Gauge(props: GaugeProps) {\n const [hoverRef, setHoverRef] = useState<HTMLDivElement | null>(null);\n const { getColor = getProgressColor, size = 'normal' } = props;\n const classes = useStyles(props);\n const { palette } = useTheme();\n const { value, fractional, inverse, unit, max, description } = {\n ...defaultGaugeProps,\n ...props,\n };\n\n const asPercentage = fractional ? Math.round(value * max) : value;\n const asActual = max !== 100 ? Math.round(value) : asPercentage;\n\n const [isHovering, setIsHovering] = useState(false);\n\n useEffect(() => {\n const node = hoverRef;\n const handleMouseOver = () => setIsHovering(true);\n const handleMouseOut = () => setIsHovering(false);\n if (node && description) {\n node.addEventListener('mouseenter', handleMouseOver);\n node.addEventListener('mouseleave', handleMouseOut);\n\n return () => {\n node.removeEventListener('mouseenter', handleMouseOver);\n node.removeEventListener('mouseleave', handleMouseOut);\n };\n }\n return () => {\n setIsHovering(false);\n };\n }, [description, hoverRef]);\n\n return (\n <Box {...{ ref: setHoverRef }} className={classes.root}>\n <Circle\n strokeLinecap=\"butt\"\n percent={asPercentage}\n strokeWidth={12}\n trailWidth={12}\n strokeColor={getColor({ palette, value: asActual, inverse, max })}\n className={classes.circle}\n />\n {description && isHovering ? (\n <Box className={classes.description}>{description}</Box>\n ) : (\n <Box\n className={classNames(classes.overlay, {\n [classes.overlaySmall]: size === 'small',\n })}\n >\n {isNaN(value) ? 'N/A' : `${asActual}${unit}`}\n </Box>\n )}\n </Box>\n );\n}\n"],"names":["React"],"mappings":";;;;;;AA+BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,QAAU,EAAA,UAAA;AAAA,MACV,UAAY,EAAA,CAAA;AAAA,KACd;AAAA,I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,aAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,UAAW,CAAA,OAAA,CAAQ,OAAS,EAAA;AAAA,QACrC,CAAC,OAAA,CAAQ,YAAY,GAAG,IAAS,KAAA,OAAA;AAAA,OAClC,CAAA;AAAA,KAAA;AAAA,IAEA,MAAM,KAAK,CAAA,GAAI,QAAQ,CAAG,EAAA,QAAQ,GAAG,IAAI,CAAA,CAAA;AAAA,GAGhD,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Gauge.esm.js","sources":["../../../src/components/ProgressBars/Gauge.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstagePalette } from '@backstage/theme';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { Circle } from 'rc-progress';\nimport React, { ReactNode, useEffect, useState } from 'react';\nimport Box from '@material-ui/core/Box';\nimport classNames from 'classnames';\n\n/** @public */\nexport type GaugeClassKey =\n | 'root'\n | 'overlay'\n | 'description'\n | 'circle'\n | 'colorUnknown';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n position: 'relative',\n lineHeight: 0,\n },\n overlay: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -60%)',\n fontSize: theme.typography.pxToRem(45),\n fontWeight: theme.typography.fontWeightBold,\n color: theme.palette.textContrast,\n },\n overlaySmall: {\n fontSize: theme.typography.pxToRem(25),\n },\n description: {\n fontSize: '100%',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n position: 'absolute',\n wordBreak: 'break-all',\n display: 'inline-block',\n },\n circle: {\n width: '80%',\n transform: 'translate(10%, 0)',\n },\n colorUnknown: {},\n }),\n { name: 'BackstageGauge' },\n);\n\n/** @public */\nexport type GaugeProps = {\n value: number;\n fractional?: boolean;\n inverse?: boolean;\n unit?: string;\n max?: number;\n size?: 'normal' | 'small';\n description?: ReactNode;\n getColor?: GaugePropsGetColor;\n relativeToMax?: boolean;\n decimalDigits?: number;\n};\n\n/** @public */\nexport type GaugePropsGetColorOptions = {\n palette: BackstagePalette;\n value: number;\n inverse?: boolean;\n max?: number;\n};\n\n/** @public */\nexport type GaugePropsGetColor = (args: GaugePropsGetColorOptions) => string;\n\nconst defaultGaugeProps = {\n fractional: true,\n inverse: false,\n unit: '%',\n max: 100,\n relativeToMax: false,\n};\n\nexport const getProgressColor: GaugePropsGetColor = ({\n palette,\n value,\n inverse,\n max,\n}) => {\n if (isNaN(value)) {\n return '#ddd';\n }\n\n const actualMax = max ? max : defaultGaugeProps.max;\n const actualValue = inverse ? actualMax - value : value;\n\n if (actualValue < actualMax / 3) {\n return palette.status.error;\n } else if (actualValue < actualMax * (2 / 3)) {\n return palette.status.warning;\n }\n\n return palette.status.ok;\n};\n\n/**\n * Circular Progress Bar\n *\n * @public\n *\n */\n\nexport function Gauge(props: GaugeProps) {\n const [hoverRef, setHoverRef] = useState<HTMLDivElement | null>(null);\n const { getColor = getProgressColor, size = 'normal' } = props;\n const classes = useStyles(props);\n const { palette } = useTheme();\n const {\n value,\n fractional,\n inverse,\n unit,\n max,\n description,\n relativeToMax,\n decimalDigits,\n } = {\n ...defaultGaugeProps,\n ...props,\n };\n\n let asPercentage: number;\n if (relativeToMax) {\n asPercentage = (value / max) * 100;\n } else {\n asPercentage = fractional ? Math.round(value * max) : value;\n }\n let asActual: number;\n if (relativeToMax) {\n asActual = value;\n } else {\n asActual = max !== 100 ? Math.round(value) : asPercentage;\n }\n const asDisplay =\n decimalDigits === undefined\n ? asActual.toString()\n : asActual.toFixed(decimalDigits);\n\n const [isHovering, setIsHovering] = useState(false);\n\n useEffect(() => {\n const node = hoverRef;\n const handleMouseOver = () => setIsHovering(true);\n const handleMouseOut = () => setIsHovering(false);\n if (node && description) {\n node.addEventListener('mouseenter', handleMouseOver);\n node.addEventListener('mouseleave', handleMouseOut);\n\n return () => {\n node.removeEventListener('mouseenter', handleMouseOver);\n node.removeEventListener('mouseleave', handleMouseOut);\n };\n }\n return () => {\n setIsHovering(false);\n };\n }, [description, hoverRef]);\n\n return (\n <Box {...{ ref: setHoverRef }} className={classes.root}>\n <Circle\n strokeLinecap=\"butt\"\n percent={asPercentage}\n strokeWidth={12}\n trailWidth={12}\n strokeColor={getColor({\n palette,\n value: asPercentage,\n inverse,\n max: relativeToMax ? 100 : max,\n })}\n className={classes.circle}\n />\n {description && isHovering ? (\n <Box className={classes.description}>{description}</Box>\n ) : (\n <Box\n className={classNames(classes.overlay, {\n [classes.overlaySmall]: size === 'small',\n })}\n >\n {isNaN(value) ? 'N/A' : `${asDisplay}${unit}`}\n </Box>\n )}\n </Box>\n );\n}\n"],"names":["React"],"mappings":";;;;;;AA+BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,QAAU,EAAA,UAAA;AAAA,MACV,UAAY,EAAA,CAAA;AAAA,KACd;AAAA,IACA,OAAS,EAAA;AAAA,MACP,QAAU,EAAA,UAAA;AAAA,MACV,GAAK,EAAA,KAAA;AAAA,MACL,IAAM,EAAA,KAAA;AAAA,MACN,SAAW,EAAA,uBAAA;AAAA,MACX,QAAU,EAAA,KAAA,CAAM,UAAW,CAAA,OAAA,CAAQ,EAAE,CAAA;AAAA,MACrC,UAAA,EAAY,MAAM,UAAW,CAAA,cAAA;AAAA,MAC7B,KAAA,EAAO,MAAM,OAAQ,CAAA,YAAA;AAAA,KACvB;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,QAAU,EAAA,KAAA,CAAM,UAAW,CAAA,OAAA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AAQ,CAAA,MAAA;AAAA,KAAA;AAAA,GACrB,EACC,eAAe,UACd,mBAAAA,cAAA,CAAA,aAAA,CAAC,OAAI,SAAW,EAAA,OAAA,CAAQ,WAAc,EAAA,EAAA,WAAY,CAElD,mBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,UAAW,CAAA,OAAA,CAAQ,OAAS,EAAA;AAAA,QACrC,CAAC,OAAA,CAAQ,YAAY,GAAG,IAAS,KAAA,OAAA;AAAA,OAClC,CAAA;AAAA,KAAA;AAAA,IAEA,MAAM,KAAK,CAAA,GAAI,QAAQ,CAAG,EAAA,SAAS,GAAG,IAAI,CAAA,CAAA;AAAA,GAGjD,CAAA,CAAA;AAEJ;;;;"}
package/dist/index.d.ts CHANGED
@@ -933,6 +933,8 @@ type GaugeProps = {
933
933
  size?: 'normal' | 'small';
934
934
  description?: ReactNode;
935
935
  getColor?: GaugePropsGetColor;
936
+ relativeToMax?: boolean;
937
+ decimalDigits?: number;
936
938
  };
937
939
  /** @public */
938
940
  type GaugePropsGetColorOptions = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/core-components",
3
3
  "description": "Core components used by Backstage plugins and apps",
4
- "version": "0.14.8-next.2",
4
+ "version": "0.14.8",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -56,9 +56,9 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@backstage/config": "^1.2.0",
59
- "@backstage/core-plugin-api": "^1.9.3-next.0",
59
+ "@backstage/core-plugin-api": "^1.9.3",
60
60
  "@backstage/errors": "^1.2.4",
61
- "@backstage/theme": "^0.5.6-next.0",
61
+ "@backstage/theme": "^0.5.6",
62
62
  "@backstage/version-bridge": "^1.0.8",
63
63
  "@date-io/core": "^1.3.13",
64
64
  "@material-table/core": "^3.1.0",
@@ -94,10 +94,10 @@
94
94
  "zod": "^3.22.4"
95
95
  },
96
96
  "devDependencies": {
97
- "@backstage/app-defaults": "^1.5.6-next.2",
98
- "@backstage/cli": "^0.26.7-next.3",
99
- "@backstage/core-app-api": "^1.12.6-next.0",
100
- "@backstage/test-utils": "^1.5.6-next.2",
97
+ "@backstage/app-defaults": "^1.5.6",
98
+ "@backstage/cli": "^0.26.7",
99
+ "@backstage/core-app-api": "^1.12.6",
100
+ "@backstage/test-utils": "^1.5.6",
101
101
  "@testing-library/dom": "^10.0.0",
102
102
  "@testing-library/jest-dom": "^6.0.0",
103
103
  "@testing-library/react": "^15.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/core-components",
3
- "version": "0.14.8-next.2",
3
+ "version": "0.14.8",
4
4
  "main": "../dist/testUtils.esm.js",
5
5
  "module": "../dist/testUtils.esm.js",
6
6
  "types": "../dist/testUtils.d.ts"