@patternfly/react-core 4.236.9 → 4.236.10

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
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 4.236.10 (2022-09-07)
7
+
8
+ **Note:** Version bump only for package @patternfly/react-core
9
+
10
+
11
+
12
+
13
+
6
14
  ## 4.236.9 (2022-09-07)
7
15
 
8
16
  **Note:** Version bump only for package @patternfly/react-core
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.236.9",
3
+ "version": "4.236.10",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -44,9 +44,9 @@
44
44
  "generate": "node scripts/copyStyles.js"
45
45
  },
46
46
  "dependencies": {
47
- "@patternfly/react-icons": "^4.87.9",
48
- "@patternfly/react-styles": "^4.86.9",
49
- "@patternfly/react-tokens": "^4.88.9",
47
+ "@patternfly/react-icons": "^4.87.10",
48
+ "@patternfly/react-styles": "^4.86.10",
49
+ "@patternfly/react-tokens": "^4.88.10",
50
50
  "focus-trap": "6.9.2",
51
51
  "react-dropzone": "9.0.0",
52
52
  "tippy.js": "5.1.2",
@@ -70,5 +70,5 @@
70
70
  "react": "^16.8.0 || ^17.0.0",
71
71
  "react-dom": "^16.8.0 || ^17.0.0"
72
72
  },
73
- "gitHead": "af946599c755b320f313aa394a460c31ddf000c9"
73
+ "gitHead": "fb205f92e45be059fa7d0d3fa636e101a66a46aa"
74
74
  }
@@ -6,37 +6,74 @@ propComponents: ['Alert', 'AlertGroup', 'AlertActionCloseButton', 'AlertActionLi
6
6
  ---
7
7
 
8
8
  ## Examples
9
- ### Static alert group
10
- These alerts appear on page load and are discoverable from within the normal page content flow, and will not be announced individually/explicitly to assistive technology.
9
+
10
+ ### Variants
11
+
12
+ Alert groups can be one of the following variants:
13
+
14
+ | Variant | Description |
15
+ | --- | --- |
16
+ | Static inline | Static inline alert groups contain alerts that appear when the page loads, and are seen within the normal page content flow. These groups should not contain alerts that will dynamically appear or update. |
17
+ | Toast | Toast alert groups contain alerts that typically appear in response to an asynchronous event or user action. These groups are positioned on top of other content at the top right of the page.|
18
+ | Dynamic | Dynamic alert groups contain alerts that typically appear in response to a user action, and are seen within the normal page content flow.|
19
+
20
+ Dynamic alerts that are generated after the page initially loads must be appended to either a toast or dynamic `AlertGroup`, both of which must use the `isLiveRegion` property. New alerts appended to a toast or dynamic group will be announced by assistive technologies the moment the change happens. For information about customizing this announcement, read the [aria-atomic and aria-relevant](/components/alert-group/accessibility#aria-atomic-and-aria-relevant) section of the alert group accessibility documentation.
21
+
22
+ ### Static inline alert group
23
+
24
+ All alert group variants may combine multiple [alert variants](/components/alert) For example, the following static inline alert group includes one "success" alert and one "info" alert.
25
+
11
26
  ```ts file="./AlertGroupStatic.tsx"
12
27
  ```
13
28
 
14
29
  ### Toast alert group
15
- Alerts asynchronously appended into dynamic AlertGroups with `isLiveRegion` will be announced to assistive technology at the moment the change happens, following the strategy used for aria-atomic, which defaults to false. This means only changes of type "addition" will be announced.
30
+
31
+ Toast alert groups are created by passing in the `isToast` and `isLiveRegion` properties.
32
+
33
+ Click the buttons in the example below to add alerts to a toast group.
34
+
16
35
  ```ts file="./AlertGroupToast.tsx"
17
36
  ```
18
37
 
19
38
  ### Toast alert group with overflow capture
20
- After a specified number of alerts displayed is reached, we will see an overflow message instead of new alerts. Alerts asynchronously appended into dynamic AlertGroups with `isLiveRegion` will be announced to assistive technology at the moment the change happens. When the overflow message appears or is updated in AlertGroups with `isLiveRegion`, the `View 1 more alert` text will be read, but the alert message will not be read. screen reader user or keyboard user will need a way to navigate to and reveal the hidden alerts before they disappear. Alternatively, there should be a place that notifications or alerts are collected to be viewed or read later. In this example we are showing a max of 4 alerts.
39
+
40
+ Users will see an overflow message once a predefined number of alerts are displayed. They will not see any alerts beyond the display limit, which must be explicitly set.
41
+
42
+ In the following example, an overflow message will appear when more than 4 alerts would be shown. When a 5th alert would appear, an overflow message is shown instead.
43
+
44
+ When an overflow message appears in an `AlertGroup` using the `isLiveRegion` property, the "view 1 more alert" text label will be announced, but the alert message will not.
45
+
46
+ Users navigating via keyboard or another assistive technology will need a way to navigate to and reveal hidden alerts before they disappear. Alternatively, there should be a place where notifications or alerts are collected to be viewed or read later.
47
+
21
48
  ```ts file="AlertGroupToastOverflowCapture.tsx" isBeta
22
49
  ```
23
50
 
24
- ### Singular dynamic alert group
25
- This alert will appear in the page, most likely in response to a user action.
51
+ ### Asynchronous alert groups
52
+
53
+ The following example shows how alerts can be triggered by an asynchronous event in the application. You can customize how an alert will be announced to assistive technology by adjusting the value of the `aria-live` property. Click the "start async" alert button below and then click the buttons in the above toast examples to demonstrate how asynchronous events add alerts to a group. Click the "stop async alerts" button to halt this behavior.
54
+
55
+ See the [alert group accessibility tab](/components/alert-group/accessibility) for more information on customizing this behavior.
56
+
57
+ ```ts file="./AlertGroupAsync.tsx"
58
+ ```
59
+
60
+ ### Dynamic alert groups
61
+
62
+ Click the buttons in the example below to add dynamic alerts to a group.
63
+
26
64
  ```ts file="./AlertGroupSingularDynamic.tsx"
27
65
  ```
28
66
 
29
- ### Singular dynamic alert group with overflow message
30
- This alert will appear in the page, most likely in response to a user action. In this example we are showing a max of 4 alerts.
67
+ ### Dynamic alert group with overflow message
68
+
69
+ In the following example, there can be a maximum of 4 alerts shown at once.
70
+
31
71
  ```ts file="AlertGroupSingularDynamicOverflow.tsx" isBeta
32
72
  ```
33
73
 
34
- ### Multiple dynamic alert group
35
- These alerts will appear in the page, most likely in response to a user action.
36
- ```ts file="./AlertGroupMultipleDynamic.tsx"
37
- ```
74
+ ### Multiple dynamic alert groups
38
75
 
39
- ### Async alert group
40
- This shows how an alert could be triggered by an asynchronous event in the application. Note how you can customize how the alert will be announced to assistive technology. See the alert group accessibility tab for more information.
41
- ```ts file="./AlertGroupAsync.tsx"
76
+ You may add multiple alerts to an alert group at once. Click the "add alert collection" button in the example below to add a batch of 3 toast alerts to a group.
77
+
78
+ ```ts file="./AlertGroupMultipleDynamic.tsx"
42
79
  ```