• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SAP / ui5-webcomponents-react / 13699228520

06 Mar 2025 12:58PM CUT coverage: 35.453% (-52.0%) from 87.468%
13699228520

Pull #7047

github

web-flow
Merge 9c10efb9f into 6ababe123
Pull Request #7047: fix(ObjectStatus): screen readers announce "button" only once

802 of 3893 branches covered (20.6%)

1 of 1 new or added line in 1 file covered. (100.0%)

3043 existing lines in 86 files now uncovered.

2074 of 5850 relevant lines covered (35.45%)

529.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
/packages/main/src/components/NumericSideIndicator/index.tsx
1
'use client';
2

3
import { useStylesheet } from '@ui5/webcomponents-react-base';
4
import { clsx } from 'clsx';
5
import { forwardRef } from 'react';
6
import { ValueColor } from '../../enums/index.js';
7
import type { CommonProps } from '../../types/index.js';
8
import { Text } from '../../webComponents/Text/index.js';
9
import { classNames, styleData } from './NumericSideIndicator.module.css.js';
10

11
export interface NumericSideIndicatorPropTypes extends CommonProps {
12
  /**
13
   * The numeric value
14
   */
15
  number: number | string;
16
  /**
17
   * The semantic color which represents the state of the side indicator.
18
   *
19
   * @default `"None"`
20
   */
21
  state?: ValueColor;
22
  /**
23
   * The title of the indicator
24
   */
25
  titleText: string;
26
  /**
27
   * Defines the unit of measurement (scaling prefix) for the numeric value
28
   */
29
  unit?: string;
30
}
31

32
/**
33
 * Holds a set of side indicator attributes used in the AnalyticalCardHeader component.
34
 */
35
export const NumericSideIndicator = forwardRef<HTMLDivElement, NumericSideIndicatorPropTypes>((props, ref) => {
181✔
UNCOV
36
  const { number, state = ValueColor.None, titleText, unit, className, ...rest } = props;
×
37

UNCOV
38
  useStylesheet(styleData, NumericSideIndicator.displayName);
×
39

UNCOV
40
  return (
×
41
    <div ref={ref} className={clsx(classNames.numericSideIndicator, className)} {...rest}>
42
      <span className={classNames.title}>{titleText}</span>
43
      <Text className={clsx(classNames.value, classNames[`state${state}`])}>
44
        {number}
45
        {unit}
46
      </Text>
47
    </div>
48
  );
49
});
50

51
NumericSideIndicator.displayName = 'NumericSideIndicator';
181✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc