@patternfly/react-core 4.184.0 → 4.184.1

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.184.1 (2022-01-10)
7
+
8
+ **Note:** Version bump only for package @patternfly/react-core
9
+
10
+
11
+
12
+
13
+
6
14
  # 4.184.0 (2022-01-10)
7
15
 
8
16
 
@@ -14862,185 +14862,6 @@ ul.pf-c-list {
14862
14862
  --pf-c-pagination__total-items--Visibility: var(--pf-c-pagination--m-display-full__total-items--Visibility);
14863
14863
  }
14864
14864
  }
14865
- .pf-c-progress {
14866
- --pf-c-progress--GridGap: var(--pf-global--spacer--md);
14867
- --pf-c-progress__bar--before--BackgroundColor: var(--pf-global--primary-color--100);
14868
- --pf-c-progress__bar--Height: var(--pf-global--spacer--md);
14869
- --pf-c-progress__bar--BackgroundColor: var(--pf-global--BackgroundColor--light-100);
14870
- --pf-c-progress__measure--m-static-width--MinWidth: 4.5ch;
14871
- --pf-c-progress__status-icon--Color: var(--pf-global--Color--100);
14872
- --pf-c-progress__status-icon--MarginLeft: var(--pf-global--spacer--sm);
14873
- --pf-c-progress__bar--before--Opacity: .2;
14874
- --pf-c-progress__indicator--Height: var(--pf-c-progress__bar--Height);
14875
- --pf-c-progress__indicator--BackgroundColor: var(--pf-c-progress__bar--before--BackgroundColor);
14876
- --pf-c-progress--m-success__bar--BackgroundColor: var(--pf-global--success-color--100);
14877
- --pf-c-progress--m-warning__bar--BackgroundColor: var(--pf-global--warning-color--100);
14878
- --pf-c-progress--m-danger__bar--BackgroundColor: var(--pf-global--danger-color--100);
14879
- --pf-c-progress--m-success__status-icon--Color: var(--pf-global--success-color--100);
14880
- --pf-c-progress--m-warning__status-icon--Color: var(--pf-global--warning-color--100);
14881
- --pf-c-progress--m-danger__status-icon--Color: var(--pf-global--danger-color--100);
14882
- --pf-c-progress--m-inside__indicator--MinWidth: var(--pf-global--spacer--xl);
14883
- --pf-c-progress--m-inside__measure--Color: var(--pf-global--Color--light-100);
14884
- --pf-c-progress--m-success--m-inside__measure--Color: var(--pf-global--Color--light-100);
14885
- --pf-c-progress--m-warning--m-inside__measure--Color: var(--pf-global--Color--dark-100);
14886
- --pf-c-progress--m-inside__measure--FontSize: var(--pf-global--FontSize--sm);
14887
- --pf-c-progress--m-outside__measure--FontSize: var(--pf-global--FontSize--sm);
14888
- --pf-c-progress--m-sm__bar--Height: var(--pf-global--spacer--sm);
14889
- --pf-c-progress--m-sm__description--FontSize: var(--pf-global--FontSize--sm);
14890
- --pf-c-progress--m-sm__measure--FontSize: var(--pf-global--FontSize--sm);
14891
- --pf-c-progress--m-lg__bar--Height: var(--pf-global--spacer--lg);
14892
- display: grid;
14893
- align-items: end;
14894
- grid-gap: var(--pf-c-progress--GridGap);
14895
- grid-template-columns: auto auto;
14896
- grid-template-rows: 1fr auto;
14897
- }
14898
-
14899
- .pf-c-progress.pf-m-sm {
14900
- --pf-c-progress__bar--Height: var(--pf-c-progress--m-sm__bar--Height);
14901
- }
14902
-
14903
- .pf-c-progress.pf-m-sm .pf-c-progress__description {
14904
- font-size: var(--pf-c-progress--m-sm__description--FontSize);
14905
- }
14906
-
14907
- .pf-c-progress.pf-m-sm .pf-c-progress__measure {
14908
- font-size: var(--pf-c-progress--m-sm__measure--FontSize);
14909
- }
14910
-
14911
- .pf-c-progress.pf-m-lg {
14912
- --pf-c-progress__bar--Height: var(--pf-c-progress--m-lg__bar--Height);
14913
- }
14914
-
14915
- .pf-c-progress.pf-m-inside .pf-c-progress__indicator {
14916
- display: flex;
14917
- align-items: center;
14918
- justify-content: center;
14919
- min-width: var(--pf-c-progress--m-inside__indicator--MinWidth);
14920
- }
14921
-
14922
- .pf-c-progress.pf-m-inside .pf-c-progress__measure {
14923
- font-size: var(--pf-c-progress--m-inside__measure--FontSize);
14924
- color: var(--pf-c-progress--m-inside__measure--Color);
14925
- text-align: center;
14926
- }
14927
-
14928
- .pf-c-progress.pf-m-outside .pf-c-progress__description {
14929
- grid-column: 1/3;
14930
- }
14931
-
14932
- .pf-c-progress.pf-m-outside .pf-c-progress__status {
14933
- grid-column: 2/3;
14934
- grid-row: 2/3;
14935
- align-self: center;
14936
- }
14937
-
14938
- .pf-c-progress.pf-m-outside .pf-c-progress__measure {
14939
- display: inline-block;
14940
- font-size: var(--pf-c-progress--m-outside__measure--FontSize);
14941
- }
14942
-
14943
- .pf-c-progress.pf-m-outside .pf-c-progress__measure.pf-m-static-width {
14944
- min-width: var(--pf-c-progress__measure--m-static-width--MinWidth);
14945
- text-align: left;
14946
- }
14947
-
14948
- .pf-c-progress.pf-m-outside .pf-c-progress__bar,
14949
- .pf-c-progress.pf-m-outside .pf-c-progress__indicator {
14950
- grid-column: 1/2;
14951
- }
14952
-
14953
- .pf-c-progress.pf-m-singleline {
14954
- grid-template-rows: 1fr;
14955
- }
14956
-
14957
- .pf-c-progress.pf-m-singleline .pf-c-progress__description {
14958
- display: none;
14959
- visibility: hidden;
14960
- }
14961
-
14962
- .pf-c-progress.pf-m-singleline .pf-c-progress__bar {
14963
- grid-row: 1/2;
14964
- grid-column: 1/2;
14965
- }
14966
-
14967
- .pf-c-progress.pf-m-singleline .pf-c-progress__status {
14968
- grid-row: 1/2;
14969
- grid-column: 2/3;
14970
- }
14971
-
14972
- .pf-c-progress.pf-m-outside, .pf-c-progress.pf-m-singleline {
14973
- grid-template-columns: 1fr fit-content(50%);
14974
- }
14975
-
14976
- .pf-c-progress.pf-m-success {
14977
- --pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-success__bar--BackgroundColor);
14978
- --pf-c-progress__status-icon--Color: var(--pf-c-progress--m-success__status-icon--Color);
14979
- --pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-success--m-inside__measure--Color);
14980
- }
14981
-
14982
- .pf-c-progress.pf-m-warning {
14983
- --pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-warning__bar--BackgroundColor);
14984
- --pf-c-progress__status-icon--Color: var(--pf-c-progress--m-warning__status-icon--Color);
14985
- --pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-warning--m-inside__measure--Color);
14986
- }
14987
-
14988
- .pf-c-progress.pf-m-danger {
14989
- --pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-danger__bar--BackgroundColor);
14990
- --pf-c-progress__status-icon--Color: var(--pf-c-progress--m-danger__status-icon--Color);
14991
- }
14992
-
14993
- .pf-c-progress__description {
14994
- word-break: break-word;
14995
- grid-column: 1/2;
14996
- }
14997
-
14998
- .pf-c-progress__description.pf-m-truncate {
14999
- overflow: hidden;
15000
- text-overflow: ellipsis;
15001
- white-space: nowrap;
15002
- }
15003
-
15004
- .pf-c-progress__status {
15005
- grid-column: 2/3;
15006
- grid-row: 1/2;
15007
- text-align: right;
15008
- word-break: break-word;
15009
- }
15010
-
15011
- .pf-c-progress__status-icon {
15012
- margin-left: var(--pf-c-progress__status-icon--MarginLeft);
15013
- color: var(--pf-c-progress__status-icon--Color);
15014
- }
15015
-
15016
- .pf-c-progress__bar {
15017
- position: relative;
15018
- grid-column: 1/3;
15019
- grid-row: 2/3;
15020
- align-self: center;
15021
- height: var(--pf-c-progress__bar--Height);
15022
- background-color: var(--pf-c-progress__bar--BackgroundColor);
15023
- }
15024
-
15025
- .pf-c-progress__bar::before {
15026
- position: absolute;
15027
- top: 0;
15028
- left: 0;
15029
- width: 100%;
15030
- height: 100%;
15031
- content: "";
15032
- background-color: var(--pf-c-progress__bar--before--BackgroundColor);
15033
- opacity: var(--pf-c-progress__bar--before--Opacity);
15034
- }
15035
-
15036
- .pf-c-progress__indicator {
15037
- position: absolute;
15038
- top: 0;
15039
- left: 0;
15040
- height: var(--pf-c-progress__indicator--Height);
15041
- background-color: var(--pf-c-progress__indicator--BackgroundColor);
15042
- }
15043
-
15044
14865
  .pf-c-popover {
15045
14866
  --pf-c-popover--FontSize: var(--pf-global--FontSize--sm);
15046
14867
  --pf-c-popover--MinWidth: calc(var(--pf-c-popover__content--PaddingLeft) + var(--pf-c-popover__content--PaddingRight) + 18.75rem);
@@ -15233,6 +15054,185 @@ ul.pf-c-list {
15233
15054
  margin-top: var(--pf-c-popover__footer--MarginTop);
15234
15055
  }
15235
15056
 
15057
+ .pf-c-progress {
15058
+ --pf-c-progress--GridGap: var(--pf-global--spacer--md);
15059
+ --pf-c-progress__bar--before--BackgroundColor: var(--pf-global--primary-color--100);
15060
+ --pf-c-progress__bar--Height: var(--pf-global--spacer--md);
15061
+ --pf-c-progress__bar--BackgroundColor: var(--pf-global--BackgroundColor--light-100);
15062
+ --pf-c-progress__measure--m-static-width--MinWidth: 4.5ch;
15063
+ --pf-c-progress__status-icon--Color: var(--pf-global--Color--100);
15064
+ --pf-c-progress__status-icon--MarginLeft: var(--pf-global--spacer--sm);
15065
+ --pf-c-progress__bar--before--Opacity: .2;
15066
+ --pf-c-progress__indicator--Height: var(--pf-c-progress__bar--Height);
15067
+ --pf-c-progress__indicator--BackgroundColor: var(--pf-c-progress__bar--before--BackgroundColor);
15068
+ --pf-c-progress--m-success__bar--BackgroundColor: var(--pf-global--success-color--100);
15069
+ --pf-c-progress--m-warning__bar--BackgroundColor: var(--pf-global--warning-color--100);
15070
+ --pf-c-progress--m-danger__bar--BackgroundColor: var(--pf-global--danger-color--100);
15071
+ --pf-c-progress--m-success__status-icon--Color: var(--pf-global--success-color--100);
15072
+ --pf-c-progress--m-warning__status-icon--Color: var(--pf-global--warning-color--100);
15073
+ --pf-c-progress--m-danger__status-icon--Color: var(--pf-global--danger-color--100);
15074
+ --pf-c-progress--m-inside__indicator--MinWidth: var(--pf-global--spacer--xl);
15075
+ --pf-c-progress--m-inside__measure--Color: var(--pf-global--Color--light-100);
15076
+ --pf-c-progress--m-success--m-inside__measure--Color: var(--pf-global--Color--light-100);
15077
+ --pf-c-progress--m-warning--m-inside__measure--Color: var(--pf-global--Color--dark-100);
15078
+ --pf-c-progress--m-inside__measure--FontSize: var(--pf-global--FontSize--sm);
15079
+ --pf-c-progress--m-outside__measure--FontSize: var(--pf-global--FontSize--sm);
15080
+ --pf-c-progress--m-sm__bar--Height: var(--pf-global--spacer--sm);
15081
+ --pf-c-progress--m-sm__description--FontSize: var(--pf-global--FontSize--sm);
15082
+ --pf-c-progress--m-sm__measure--FontSize: var(--pf-global--FontSize--sm);
15083
+ --pf-c-progress--m-lg__bar--Height: var(--pf-global--spacer--lg);
15084
+ display: grid;
15085
+ align-items: end;
15086
+ grid-gap: var(--pf-c-progress--GridGap);
15087
+ grid-template-columns: auto auto;
15088
+ grid-template-rows: 1fr auto;
15089
+ }
15090
+
15091
+ .pf-c-progress.pf-m-sm {
15092
+ --pf-c-progress__bar--Height: var(--pf-c-progress--m-sm__bar--Height);
15093
+ }
15094
+
15095
+ .pf-c-progress.pf-m-sm .pf-c-progress__description {
15096
+ font-size: var(--pf-c-progress--m-sm__description--FontSize);
15097
+ }
15098
+
15099
+ .pf-c-progress.pf-m-sm .pf-c-progress__measure {
15100
+ font-size: var(--pf-c-progress--m-sm__measure--FontSize);
15101
+ }
15102
+
15103
+ .pf-c-progress.pf-m-lg {
15104
+ --pf-c-progress__bar--Height: var(--pf-c-progress--m-lg__bar--Height);
15105
+ }
15106
+
15107
+ .pf-c-progress.pf-m-inside .pf-c-progress__indicator {
15108
+ display: flex;
15109
+ align-items: center;
15110
+ justify-content: center;
15111
+ min-width: var(--pf-c-progress--m-inside__indicator--MinWidth);
15112
+ }
15113
+
15114
+ .pf-c-progress.pf-m-inside .pf-c-progress__measure {
15115
+ font-size: var(--pf-c-progress--m-inside__measure--FontSize);
15116
+ color: var(--pf-c-progress--m-inside__measure--Color);
15117
+ text-align: center;
15118
+ }
15119
+
15120
+ .pf-c-progress.pf-m-outside .pf-c-progress__description {
15121
+ grid-column: 1/3;
15122
+ }
15123
+
15124
+ .pf-c-progress.pf-m-outside .pf-c-progress__status {
15125
+ grid-column: 2/3;
15126
+ grid-row: 2/3;
15127
+ align-self: center;
15128
+ }
15129
+
15130
+ .pf-c-progress.pf-m-outside .pf-c-progress__measure {
15131
+ display: inline-block;
15132
+ font-size: var(--pf-c-progress--m-outside__measure--FontSize);
15133
+ }
15134
+
15135
+ .pf-c-progress.pf-m-outside .pf-c-progress__measure.pf-m-static-width {
15136
+ min-width: var(--pf-c-progress__measure--m-static-width--MinWidth);
15137
+ text-align: left;
15138
+ }
15139
+
15140
+ .pf-c-progress.pf-m-outside .pf-c-progress__bar,
15141
+ .pf-c-progress.pf-m-outside .pf-c-progress__indicator {
15142
+ grid-column: 1/2;
15143
+ }
15144
+
15145
+ .pf-c-progress.pf-m-singleline {
15146
+ grid-template-rows: 1fr;
15147
+ }
15148
+
15149
+ .pf-c-progress.pf-m-singleline .pf-c-progress__description {
15150
+ display: none;
15151
+ visibility: hidden;
15152
+ }
15153
+
15154
+ .pf-c-progress.pf-m-singleline .pf-c-progress__bar {
15155
+ grid-row: 1/2;
15156
+ grid-column: 1/2;
15157
+ }
15158
+
15159
+ .pf-c-progress.pf-m-singleline .pf-c-progress__status {
15160
+ grid-row: 1/2;
15161
+ grid-column: 2/3;
15162
+ }
15163
+
15164
+ .pf-c-progress.pf-m-outside, .pf-c-progress.pf-m-singleline {
15165
+ grid-template-columns: 1fr fit-content(50%);
15166
+ }
15167
+
15168
+ .pf-c-progress.pf-m-success {
15169
+ --pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-success__bar--BackgroundColor);
15170
+ --pf-c-progress__status-icon--Color: var(--pf-c-progress--m-success__status-icon--Color);
15171
+ --pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-success--m-inside__measure--Color);
15172
+ }
15173
+
15174
+ .pf-c-progress.pf-m-warning {
15175
+ --pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-warning__bar--BackgroundColor);
15176
+ --pf-c-progress__status-icon--Color: var(--pf-c-progress--m-warning__status-icon--Color);
15177
+ --pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-warning--m-inside__measure--Color);
15178
+ }
15179
+
15180
+ .pf-c-progress.pf-m-danger {
15181
+ --pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-danger__bar--BackgroundColor);
15182
+ --pf-c-progress__status-icon--Color: var(--pf-c-progress--m-danger__status-icon--Color);
15183
+ }
15184
+
15185
+ .pf-c-progress__description {
15186
+ word-break: break-word;
15187
+ grid-column: 1/2;
15188
+ }
15189
+
15190
+ .pf-c-progress__description.pf-m-truncate {
15191
+ overflow: hidden;
15192
+ text-overflow: ellipsis;
15193
+ white-space: nowrap;
15194
+ }
15195
+
15196
+ .pf-c-progress__status {
15197
+ grid-column: 2/3;
15198
+ grid-row: 1/2;
15199
+ text-align: right;
15200
+ word-break: break-word;
15201
+ }
15202
+
15203
+ .pf-c-progress__status-icon {
15204
+ margin-left: var(--pf-c-progress__status-icon--MarginLeft);
15205
+ color: var(--pf-c-progress__status-icon--Color);
15206
+ }
15207
+
15208
+ .pf-c-progress__bar {
15209
+ position: relative;
15210
+ grid-column: 1/3;
15211
+ grid-row: 2/3;
15212
+ align-self: center;
15213
+ height: var(--pf-c-progress__bar--Height);
15214
+ background-color: var(--pf-c-progress__bar--BackgroundColor);
15215
+ }
15216
+
15217
+ .pf-c-progress__bar::before {
15218
+ position: absolute;
15219
+ top: 0;
15220
+ left: 0;
15221
+ width: 100%;
15222
+ height: 100%;
15223
+ content: "";
15224
+ background-color: var(--pf-c-progress__bar--before--BackgroundColor);
15225
+ opacity: var(--pf-c-progress__bar--before--Opacity);
15226
+ }
15227
+
15228
+ .pf-c-progress__indicator {
15229
+ position: absolute;
15230
+ top: 0;
15231
+ left: 0;
15232
+ height: var(--pf-c-progress__indicator--Height);
15233
+ background-color: var(--pf-c-progress__indicator--BackgroundColor);
15234
+ }
15235
+
15236
15236
  .pf-c-progress-stepper {
15237
15237
  --pf-c-progress-stepper--GridAutoFlow: column;
15238
15238
  --pf-c-progress-stepper--GridTemplateRows: auto 1fr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.184.0",
3
+ "version": "4.184.1",
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",
@@ -34,9 +34,9 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.35.0",
38
- "@patternfly/react-styles": "^4.34.0",
39
- "@patternfly/react-tokens": "^4.36.0",
37
+ "@patternfly/react-icons": "^4.35.1",
38
+ "@patternfly/react-styles": "^4.34.1",
39
+ "@patternfly/react-tokens": "^4.36.1",
40
40
  "focus-trap": "6.2.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.8.0 || ^17.0.0",
61
61
  "react-dom": "^16.8.0 || ^17.0.0"
62
62
  },
63
- "gitHead": "ae13291da8a4fedbf55dd1ad900652a31d4c7af6"
63
+ "gitHead": "8ec6b1dd83d1dd57a541811b5336ccede3183192"
64
64
  }
@@ -12,217 +12,20 @@ import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
12
12
 
13
13
  ### Action list single group
14
14
 
15
- ```js
16
- import React from 'react';
17
- import {
18
- ActionList,
19
- ActionListItem,
20
- Button,
21
- Dropdown,
22
- DropdownItem,
23
- DropdownSeparator,
24
- KebabToggle
25
- } from '@patternfly/react-core';
26
-
27
- class BasicActionList extends React.Component {
28
- constructor(props) {
29
- super(props);
30
- this.state = {
31
- isOpen: false
32
- };
33
- this.onToggle = (isOpen, event) => {
34
- event.stopPropagation();
35
- this.setState({
36
- isOpen
37
- });
38
- };
39
- this.onSelect = event => {
40
- event.stopPropagation();
41
- this.setState({
42
- isOpen: !this.state.isOpen
43
- });
44
- };
45
- }
46
-
47
- render() {
48
- const dropdownItems = [
49
- <DropdownItem key="link">Link</DropdownItem>,
50
- <DropdownItem key="action" component="button">
51
- Action
52
- </DropdownItem>,
53
- <DropdownItem key="disabled link" isDisabled>
54
- Disabled Link
55
- </DropdownItem>,
56
- <DropdownItem key="disabled action" isDisabled component="button">
57
- Disabled Action
58
- </DropdownItem>,
59
- <DropdownSeparator key="separator" />,
60
- <DropdownItem key="separated link">Separated Link</DropdownItem>,
61
- <DropdownItem key="separated action" component="button">
62
- Separated Action
63
- </DropdownItem>
64
- ];
65
-
66
- return (
67
- <React.Fragment>
68
- <ActionList>
69
- <ActionListItem>
70
- <Button variant="primary" id="next-button">
71
- Next
72
- </Button>
73
- </ActionListItem>
74
- <ActionListItem>
75
- <Button variant="secondary" id="back-button">
76
- Back
77
- </Button>
78
- </ActionListItem>
79
- </ActionList>
80
- <br />
81
- With kebab
82
- <ActionList>
83
- <ActionListItem>
84
- <Button variant="primary" id="next-button2">
85
- Next
86
- </Button>
87
- </ActionListItem>
88
- <ActionListItem>
89
- <Button variant="secondary" id="back-button2">
90
- Back
91
- </Button>
92
- </ActionListItem>
93
- <ActionListItem>
94
- <Dropdown
95
- onSelect={this.onSelect}
96
- toggle={<KebabToggle onToggle={this.onToggle} />}
97
- isOpen={this.state.isOpen}
98
- isPlain
99
- dropdownItems={dropdownItems}
100
- position="right"
101
- />
102
- </ActionListItem>
103
- </ActionList>
104
- </React.Fragment>
105
- );
106
- }
107
- }
15
+ ```ts file="ActionListSingleGroup.tsx"
108
16
  ```
109
17
 
110
18
  ### Action list with icons
111
19
 
112
- ```js
113
- import React from 'react';
114
- import { ActionList, ActionListItem, Button } from '@patternfly/react-core';
115
- import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
116
- import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
117
-
118
- class IconsActionList extends React.Component {
119
- render() {
120
- return (
121
- <ActionList isIconList>
122
- <ActionListItem>
123
- <Button variant="plain" id="times-button" aria-label="times icon button">
124
- <TimesIcon />
125
- </Button>
126
- </ActionListItem>
127
- <ActionListItem>
128
- <Button variant="plain" id="check-button" aria-label="check icon button">
129
- <CheckIcon />
130
- </Button>
131
- </ActionListItem>
132
- </ActionList>
133
- );
134
- }
135
- }
20
+ ```ts file="./ActionListWithIcons.tsx"
136
21
  ```
137
22
 
138
23
  ### Action list multiple groups
139
24
 
140
- ```js
141
- import React from 'react';
142
- import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core';
143
-
144
- class GroupsActionList extends React.Component {
145
- render() {
146
- return (
147
- <ActionList>
148
- <ActionListGroup>
149
- <ActionListItem>
150
- <Button variant="primary" id="next-button">
151
- Next
152
- </Button>
153
- </ActionListItem>
154
- <ActionListItem>
155
- <Button variant="secondary" id="back-button">
156
- Back
157
- </Button>
158
- </ActionListItem>
159
- </ActionListGroup>
160
- <ActionListGroup>
161
- <ActionListItem>
162
- <Button variant="primary" id="submit-button">
163
- Submit
164
- </Button>
165
- </ActionListItem>
166
- <ActionListItem>
167
- <Button variant="link" id="cancel-button">
168
- Cancel
169
- </Button>
170
- </ActionListItem>
171
- </ActionListGroup>
172
- </ActionList>
173
- );
174
- }
175
- }
25
+ ```ts file="./ActionListMultipleGroups.tsx"
176
26
  ```
177
27
 
178
28
  ### Action list with cancel button
179
29
 
180
- ```js
181
- import React from 'react';
182
- import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core';
183
-
184
- class CancelActionList extends React.Component {
185
- render() {
186
- return (
187
- <React.Fragment>
188
- In modals, forms, data lists
189
- <ActionList>
190
- <ActionListItem>
191
- <Button variant="primary" id="save-button">
192
- Save
193
- </Button>
194
- </ActionListItem>
195
- <ActionListItem>
196
- <Button variant="link" id="cancel-button">
197
- Cancel
198
- </Button>
199
- </ActionListItem>
200
- </ActionList>
201
- <br />
202
- In wizards
203
- <ActionList>
204
- <ActionListGroup>
205
- <ActionListItem>
206
- <Button variant="primary" id="next-button">
207
- Next
208
- </Button>
209
- </ActionListItem>
210
- <ActionListItem>
211
- <Button variant="secondary" id="back-button">
212
- Back
213
- </Button>
214
- </ActionListItem>
215
- </ActionListGroup>
216
- <ActionListGroup>
217
- <ActionListItem>
218
- <Button variant="link" id="cancel-button2">
219
- Cancel
220
- </Button>
221
- </ActionListItem>
222
- </ActionListGroup>
223
- </ActionList>
224
- </React.Fragment>
225
- );
226
- }
227
- }
30
+ ```ts file="./ActionListWithCancelButton.tsx"
228
31
  ```
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core';
3
+
4
+ export const ActionListMultipleGroups: React.FunctionComponent = () => (
5
+ <ActionList>
6
+ <ActionListGroup>
7
+ <ActionListItem>
8
+ <Button variant="primary" id="next-button">
9
+ Next
10
+ </Button>
11
+ </ActionListItem>
12
+ <ActionListItem>
13
+ <Button variant="secondary" id="back-button">
14
+ Back
15
+ </Button>
16
+ </ActionListItem>
17
+ </ActionListGroup>
18
+ <ActionListGroup>
19
+ <ActionListItem>
20
+ <Button variant="primary" id="submit-button">
21
+ Submit
22
+ </Button>
23
+ </ActionListItem>
24
+ <ActionListItem>
25
+ <Button variant="link" id="cancel-button">
26
+ Cancel
27
+ </Button>
28
+ </ActionListItem>
29
+ </ActionListGroup>
30
+ </ActionList>
31
+ );
@@ -0,0 +1,86 @@
1
+ import React from 'react';
2
+ import {
3
+ ActionList,
4
+ ActionListItem,
5
+ Button,
6
+ Dropdown,
7
+ DropdownItem,
8
+ DropdownSeparator,
9
+ KebabToggle
10
+ } from '@patternfly/react-core';
11
+
12
+ export const ActionListSingleGroup: React.FunctionComponent = () => {
13
+ const [isOpen, setIsOpen] = React.useState(false);
14
+
15
+ const onToggle = (
16
+ isOpen: boolean,
17
+ event: MouseEvent | TouchEvent | KeyboardEvent | React.KeyboardEvent<any> | React.MouseEvent<HTMLButtonElement>
18
+ ) => {
19
+ event.stopPropagation();
20
+ setIsOpen(isOpen);
21
+ };
22
+
23
+ const onSelect = (event: React.SyntheticEvent<HTMLDivElement, Event>) => {
24
+ event.stopPropagation();
25
+ setIsOpen(!isOpen);
26
+ };
27
+
28
+ const dropdownItems = [
29
+ <DropdownItem key="link">Link</DropdownItem>,
30
+ <DropdownItem key="action" component="button">
31
+ Action
32
+ </DropdownItem>,
33
+ <DropdownItem key="disabled link" isDisabled>
34
+ Disabled Link
35
+ </DropdownItem>,
36
+ <DropdownItem key="disabled action" isDisabled component="button">
37
+ Disabled Action
38
+ </DropdownItem>,
39
+ <DropdownSeparator key="separator" />,
40
+ <DropdownItem key="separated link">Separated Link</DropdownItem>,
41
+ <DropdownItem key="separated action" component="button">
42
+ Separated Action
43
+ </DropdownItem>
44
+ ];
45
+
46
+ return (
47
+ <React.Fragment>
48
+ <ActionList>
49
+ <ActionListItem>
50
+ <Button variant="primary" id="next-button">
51
+ Next
52
+ </Button>
53
+ </ActionListItem>
54
+ <ActionListItem>
55
+ <Button variant="secondary" id="back-button">
56
+ Back
57
+ </Button>
58
+ </ActionListItem>
59
+ </ActionList>
60
+ <br />
61
+ With kebab
62
+ <ActionList>
63
+ <ActionListItem>
64
+ <Button variant="primary" id="next-button2">
65
+ Next
66
+ </Button>
67
+ </ActionListItem>
68
+ <ActionListItem>
69
+ <Button variant="secondary" id="back-button2">
70
+ Back
71
+ </Button>
72
+ </ActionListItem>
73
+ <ActionListItem>
74
+ <Dropdown
75
+ onSelect={onSelect}
76
+ toggle={<KebabToggle onToggle={onToggle} />}
77
+ isOpen={isOpen}
78
+ isPlain
79
+ dropdownItems={dropdownItems}
80
+ position="right"
81
+ />
82
+ </ActionListItem>
83
+ </ActionList>
84
+ </React.Fragment>
85
+ );
86
+ };
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core';
3
+
4
+ export const ActionListWithCancelButton: React.FunctionComponent = () => (
5
+ <React.Fragment>
6
+ In modals, forms, data lists
7
+ <ActionList>
8
+ <ActionListItem>
9
+ <Button variant="primary" id="save-button">
10
+ Save
11
+ </Button>
12
+ </ActionListItem>
13
+ <ActionListItem>
14
+ <Button variant="link" id="cancel-button">
15
+ Cancel
16
+ </Button>
17
+ </ActionListItem>
18
+ </ActionList>
19
+ <br />
20
+ In wizards
21
+ <ActionList>
22
+ <ActionListGroup>
23
+ <ActionListItem>
24
+ <Button variant="primary" id="next-button">
25
+ Next
26
+ </Button>
27
+ </ActionListItem>
28
+ <ActionListItem>
29
+ <Button variant="secondary" id="back-button">
30
+ Back
31
+ </Button>
32
+ </ActionListItem>
33
+ </ActionListGroup>
34
+ <ActionListGroup>
35
+ <ActionListItem>
36
+ <Button variant="link" id="cancel-button2">
37
+ Cancel
38
+ </Button>
39
+ </ActionListItem>
40
+ </ActionListGroup>
41
+ </ActionList>
42
+ </React.Fragment>
43
+ );
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { ActionList, ActionListItem, Button } from '@patternfly/react-core';
3
+ import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
4
+ import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
5
+
6
+ export const ActionListWithIcons: React.FunctionComponent = () => (
7
+ <ActionList isIconList>
8
+ <ActionListItem>
9
+ <Button variant="plain" id="times-button" aria-label="times icon button">
10
+ <TimesIcon />
11
+ </Button>
12
+ </ActionListItem>
13
+ <ActionListItem>
14
+ <Button variant="plain" id="check-button" aria-label="check icon button">
15
+ <CheckIcon />
16
+ </Button>
17
+ </ActionListItem>
18
+ </ActionList>
19
+ );