@webority/ui-react 0.30.0 → 0.31.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/theme": "0.30.0",
33
- "@webority/ui-elements": "0.30.0"
32
+ "@webority/theme": "0.31.0",
33
+ "@webority/ui-elements": "0.31.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@webority/analytics": "^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0",
@@ -1,31 +0,0 @@
1
- /**
2
- * A bar chart of categories, each measured against its own maximum ("18 of 25"), such as the
3
- * parts of a total score. Every bar fills toward its own `max`, so bars with different maxima
4
- * compare as how complete each one is; the printed value carries the magnitude. Values are
5
- * labelled directly on every bar, so there is no legend and no tooltip to discover. Each bar is
6
- * a keyboard-focusable `role="meter"` inside a list, named by its label and value ("GST and tax, 11 of 15").
7
- *
8
- * @param {object} props
9
- * @param {{ label: string, value: number, max: number }[]} props.data One entry per bar, in order.
10
- * Labels must be unique. `value` is clamped into 0 to `max`.
11
- * @param {(value: number) => string} [props.formatValue] Formats each value and maximum.
12
- * Defaults to `String(value)`.
13
- * @param {'horizontal'|'vertical'} [props.orientation='horizontal'] Horizontal stacks a row per
14
- * bar (label and value above each bar) and reads best on a phone; vertical stands the bars
15
- * side by side with the labels beneath.
16
- * @param {string} [props.title] A visible caption above the chart; also names it for assistive tech.
17
- * @param {string} [props.ariaLabel] Names the chart when there is no visible `title`.
18
- * @param {string} [props.className]
19
- */
20
- export default function AppBarChart({ data, formatValue, orientation, title, ariaLabel, className, ...rest }: {
21
- data: {
22
- label: string;
23
- value: number;
24
- max: number;
25
- }[];
26
- formatValue?: (value: number) => string;
27
- orientation?: 'horizontal' | 'vertical';
28
- title?: string;
29
- ariaLabel?: string;
30
- className?: string;
31
- }): import("react").JSX.Element;
@@ -1,50 +0,0 @@
1
- /**
2
- * A line chart: one numeric series over categorical x labels (months, quarters, attempts).
3
- * Hand-drawn SVG, no chart library. The x axis is laid out in percentages and the y axis in
4
- * pixels, so the chart fills any width without a resize observer and without scaling its text.
5
- * Each point is a focusable button that shows its value on hover and focus; a visually hidden
6
- * table carries every value, the band and reference labels included, for screen readers.
7
- *
8
- * @param {object} props
9
- * @param {{ label: string, value: number | null }[]} props.data The series, in x order. Labels must
10
- * be unique. A `null` value leaves a gap in the line.
11
- * @param {string} [props.name] The series name, read before each point's value ("Score, Mar: 72").
12
- * @param {number} [props.yMin] Fixes the bottom of the y axis. Omitted: taken from the data,
13
- * rounded down to a whole tick.
14
- * @param {number} [props.yMax] Fixes the top of the y axis. Omitted: taken from the data,
15
- * rounded up to a whole tick.
16
- * @param {{ from: number, to: number, label?: string, tone?: 'neutral'|'info'|'success'|'warning'|'danger' }[]} [props.bands]
17
- * Shaded y ranges behind the line, such as rating bands, each labelled at its top right.
18
- * @param {{ value: number, label?: string }[]} [props.referenceLines] Dashed horizontal lines,
19
- * such as a target or a threshold, each labelled at its right end.
20
- * @param {(value: number) => string} [props.formatValue] Formats every value the chart prints:
21
- * ticks, tooltips, the data table. Defaults to `String(value)`.
22
- * @param {number} [props.height=240] Height of the plot area in px, x labels excluded.
23
- * @param {string} [props.title] A visible caption above the chart; also names it for assistive tech.
24
- * @param {string} [props.ariaLabel] Names the chart when there is no visible `title`.
25
- * @param {string} [props.className]
26
- */
27
- export default function AppLineChart({ data, name, yMin, yMax, bands, referenceLines, formatValue, height, title, ariaLabel, className, ...rest }: {
28
- data: {
29
- label: string;
30
- value: number | null;
31
- }[];
32
- name?: string;
33
- yMin?: number;
34
- yMax?: number;
35
- bands?: {
36
- from: number;
37
- to: number;
38
- label?: string;
39
- tone?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
40
- }[];
41
- referenceLines?: {
42
- value: number;
43
- label?: string;
44
- }[];
45
- formatValue?: (value: number) => string;
46
- height?: number;
47
- title?: string;
48
- ariaLabel?: string;
49
- className?: string;
50
- }): import("react").JSX.Element;