@cratis/scene.primereact 4.18.0 → 4.19.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/data/PrimeDataTable.tsx +18 -4
- package/dist/cjs/data/PrimeDataTable.js +19 -1
- package/dist/cjs/data/PrimeDataTable.js.map +1 -1
- package/dist/cjs/misc/PrimeProgressBar.js +4 -0
- package/dist/cjs/misc/PrimeProgressBar.js.map +1 -1
- package/dist/esm/data/PrimeDataTable.js +20 -2
- package/dist/esm/data/PrimeDataTable.js.map +1 -1
- package/dist/esm/misc/PrimeProgressBar.d.ts.map +1 -1
- package/dist/esm/misc/PrimeProgressBar.js +5 -1
- package/dist/esm/misc/PrimeProgressBar.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/misc/PrimeProgressBar.tsx +5 -2
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { ProgressBar } from 'primereact/progressbar';
|
|
5
5
|
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
-
import { booleanProperty, numberProperty } from '../properties';
|
|
6
|
+
import { booleanProperty, numberProperty, stringProperty } from '../properties';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The `PrimeReact:progressBar` component - determinate or indeterminate progress.
|
|
@@ -16,12 +16,15 @@ import { booleanProperty, numberProperty } from '../properties';
|
|
|
16
16
|
* height belong there rather than on `Root`. `Indicator` renders its children only in determinate mode,
|
|
17
17
|
* which is why the value label can be handed to it unconditionally: an indeterminate bar has no
|
|
18
18
|
* percentage to print and drops it on its own.
|
|
19
|
+
*
|
|
20
|
+
* A progress bar with no accessible name is announced as just "progress bar", so the element's `label` names
|
|
21
|
+
* what is progressing (`Progress` when it says nothing), and screen readers read it with the value.
|
|
19
22
|
*/
|
|
20
23
|
export function PrimeProgressBar({ element }: RegisteredComponentProps) {
|
|
21
24
|
const value = numberProperty(element, 'value');
|
|
22
25
|
return (
|
|
23
26
|
<ProgressBar.Root value={value} mode={value === undefined ? 'indeterminate' : 'determinate'}>
|
|
24
|
-
<ProgressBar.Track data-scene-id={element.id} style={{ height: '1rem' }}>
|
|
27
|
+
<ProgressBar.Track data-scene-id={element.id} aria-label={stringProperty(element, 'label', 'Progress')} style={{ height: '1rem' }}>
|
|
25
28
|
<ProgressBar.Indicator>{booleanProperty(element, 'showValue', true) && <ProgressBar.Value />}</ProgressBar.Indicator>
|
|
26
29
|
</ProgressBar.Track>
|
|
27
30
|
</ProgressBar.Root>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/scene.primereact",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.0",
|
|
4
4
|
"description": "The PrimeReact component package: maps Scene's abstract component names onto real PrimeReact components, and PrimeReact's free themes onto Scene themes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cratis",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"build-storybook": "storybook build"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cratis/scene.engine": "4.
|
|
63
|
-
"@cratis/scene.model": "4.
|
|
64
|
-
"@cratis/scene.react": "4.
|
|
62
|
+
"@cratis/scene.engine": "4.19.0",
|
|
63
|
+
"@cratis/scene.model": "4.19.0",
|
|
64
|
+
"@cratis/scene.react": "4.19.0",
|
|
65
65
|
"@primeuix/themes": "^3.0.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@cratis/scene.engine": "4.
|
|
69
|
-
"@cratis/scene.model": "4.
|
|
70
|
-
"@cratis/scene.react": "4.
|
|
68
|
+
"@cratis/scene.engine": "4.19.0",
|
|
69
|
+
"@cratis/scene.model": "4.19.0",
|
|
70
|
+
"@cratis/scene.react": "4.19.0",
|
|
71
71
|
"@primereact/core": "11.2.0",
|
|
72
72
|
"@primereact/headless": "11.2.0",
|
|
73
73
|
"@primereact/types": "11.2.0",
|