@patternfly/react-core 4.174.2 → 4.175.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/esm/components/Card/Card.d.ts +6 -0
  3. package/dist/esm/components/Card/Card.d.ts.map +1 -1
  4. package/dist/esm/components/Card/Card.js +2 -2
  5. package/dist/esm/components/Card/Card.js.map +1 -1
  6. package/dist/esm/components/Panel/Panel.d.ts +13 -0
  7. package/dist/esm/components/Panel/Panel.d.ts.map +1 -0
  8. package/dist/esm/components/Panel/Panel.js +10 -0
  9. package/dist/esm/components/Panel/Panel.js.map +1 -0
  10. package/dist/esm/components/Panel/PanelFooter.d.ts +9 -0
  11. package/dist/esm/components/Panel/PanelFooter.d.ts.map +1 -0
  12. package/dist/esm/components/Panel/PanelFooter.js +10 -0
  13. package/dist/esm/components/Panel/PanelFooter.js.map +1 -0
  14. package/dist/esm/components/Panel/PanelHeader.d.ts +9 -0
  15. package/dist/esm/components/Panel/PanelHeader.d.ts.map +1 -0
  16. package/dist/esm/components/Panel/PanelHeader.js +10 -0
  17. package/dist/esm/components/Panel/PanelHeader.js.map +1 -0
  18. package/dist/esm/components/Panel/PanelMain.d.ts +11 -0
  19. package/dist/esm/components/Panel/PanelMain.d.ts.map +1 -0
  20. package/dist/esm/components/Panel/PanelMain.js +10 -0
  21. package/dist/esm/components/Panel/PanelMain.js.map +1 -0
  22. package/dist/esm/components/Panel/PanelMainBody.d.ts +9 -0
  23. package/dist/esm/components/Panel/PanelMainBody.d.ts.map +1 -0
  24. package/dist/esm/components/Panel/PanelMainBody.js +10 -0
  25. package/dist/esm/components/Panel/PanelMainBody.js.map +1 -0
  26. package/dist/esm/components/Panel/index.d.ts +6 -0
  27. package/dist/esm/components/Panel/index.d.ts.map +1 -0
  28. package/dist/esm/components/Panel/index.js +6 -0
  29. package/dist/esm/components/Panel/index.js.map +1 -0
  30. package/dist/esm/components/index.d.ts +1 -0
  31. package/dist/esm/components/index.d.ts.map +1 -1
  32. package/dist/esm/components/index.js +1 -0
  33. package/dist/esm/components/index.js.map +1 -1
  34. package/dist/js/components/Card/Card.d.ts +6 -0
  35. package/dist/js/components/Card/Card.d.ts.map +1 -1
  36. package/dist/js/components/Card/Card.js +2 -2
  37. package/dist/js/components/Card/Card.js.map +1 -1
  38. package/dist/js/components/Panel/Panel.d.ts +13 -0
  39. package/dist/js/components/Panel/Panel.d.ts.map +1 -0
  40. package/dist/js/components/Panel/Panel.js +14 -0
  41. package/dist/js/components/Panel/Panel.js.map +1 -0
  42. package/dist/js/components/Panel/PanelFooter.d.ts +9 -0
  43. package/dist/js/components/Panel/PanelFooter.d.ts.map +1 -0
  44. package/dist/js/components/Panel/PanelFooter.js +14 -0
  45. package/dist/js/components/Panel/PanelFooter.js.map +1 -0
  46. package/dist/js/components/Panel/PanelHeader.d.ts +9 -0
  47. package/dist/js/components/Panel/PanelHeader.d.ts.map +1 -0
  48. package/dist/js/components/Panel/PanelHeader.js +14 -0
  49. package/dist/js/components/Panel/PanelHeader.js.map +1 -0
  50. package/dist/js/components/Panel/PanelMain.d.ts +11 -0
  51. package/dist/js/components/Panel/PanelMain.d.ts.map +1 -0
  52. package/dist/js/components/Panel/PanelMain.js +14 -0
  53. package/dist/js/components/Panel/PanelMain.js.map +1 -0
  54. package/dist/js/components/Panel/PanelMainBody.d.ts +9 -0
  55. package/dist/js/components/Panel/PanelMainBody.d.ts.map +1 -0
  56. package/dist/js/components/Panel/PanelMainBody.js +14 -0
  57. package/dist/js/components/Panel/PanelMainBody.js.map +1 -0
  58. package/dist/js/components/Panel/index.d.ts +6 -0
  59. package/dist/js/components/Panel/index.d.ts.map +1 -0
  60. package/dist/js/components/Panel/index.js +9 -0
  61. package/dist/js/components/Panel/index.js.map +1 -0
  62. package/dist/js/components/index.d.ts +1 -0
  63. package/dist/js/components/index.d.ts.map +1 -1
  64. package/dist/js/components/index.js +1 -0
  65. package/dist/js/components/index.js.map +1 -1
  66. package/dist/umd/react-core.css +83 -0
  67. package/dist/umd/react-core.js +930 -882
  68. package/dist/umd/react-core.min.css +152 -69
  69. package/dist/umd/react-core.min.js +4 -4
  70. package/package.json +5 -5
  71. package/src/components/Card/Card.tsx +15 -3
  72. package/src/components/Card/__tests__/Card.test.tsx +24 -0
  73. package/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap +11 -1
  74. package/src/components/Card/examples/Card.md +133 -26
  75. package/src/components/Panel/Panel.tsx +37 -0
  76. package/src/components/Panel/PanelFooter.tsx +22 -0
  77. package/src/components/Panel/PanelHeader.tsx +22 -0
  78. package/src/components/Panel/PanelMain.tsx +29 -0
  79. package/src/components/Panel/PanelMainBody.tsx +22 -0
  80. package/src/components/Panel/__tests__/Panel.test.tsx +62 -0
  81. package/src/components/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +83 -0
  82. package/src/components/Panel/examples/Panel.md +203 -0
  83. package/src/components/Panel/index.ts +5 -0
  84. package/src/components/index.ts +1 -0
@@ -0,0 +1,203 @@
1
+ ---
2
+ id: Panel
3
+ section: components
4
+ cssPrefix: pf-c-panel
5
+ propComponents: [Panel, PanelMain, PanelMainBody, PanelHeader, PanelFooter]
6
+ beta: true
7
+ ---
8
+
9
+ ## Examples
10
+
11
+ ### Basic
12
+
13
+ ```js
14
+ import React from 'react';
15
+ import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
16
+
17
+ const BasicPanel = () => (
18
+ <Panel>
19
+ <PanelMain>
20
+ <PanelMainBody>Main content</PanelMainBody>
21
+ </PanelMain>
22
+ </Panel>
23
+ );
24
+ ```
25
+
26
+ ### Header
27
+
28
+ ```js
29
+ import React from 'react';
30
+ import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider } from '@patternfly/react-core';
31
+
32
+ const HeaderPanel = () => (
33
+ <Panel>
34
+ <PanelHeader>Header content</PanelHeader>
35
+ <Divider />
36
+ <PanelMain>
37
+ <PanelMainBody>Main content</PanelMainBody>
38
+ </PanelMain>
39
+ </Panel>
40
+ );
41
+ ```
42
+
43
+ ### Footer
44
+
45
+ ```js
46
+ import React from 'react';
47
+ import { Panel, PanelMain, PanelMainBody, PanelFooter } from '@patternfly/react-core';
48
+
49
+ const FooterPanel = () => (
50
+ <Panel>
51
+ <PanelMain>
52
+ <PanelMainBody>Main content</PanelMainBody>
53
+ </PanelMain>
54
+ <PanelFooter>Footer content</PanelFooter>
55
+ </Panel>
56
+ );
57
+ ```
58
+
59
+ ### Header and footer
60
+
61
+ ```js
62
+ import React from 'react';
63
+ import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider, PanelFooter } from '@patternfly/react-core';
64
+
65
+ const HeaderFooterPanel = () => (
66
+ <Panel>
67
+ <PanelHeader>Header content</PanelHeader>
68
+ <Divider />
69
+ <PanelMain>
70
+ <PanelMainBody>Main content</PanelMainBody>
71
+ </PanelMain>
72
+ <PanelFooter>Footer content</PanelFooter>
73
+ </Panel>
74
+ );
75
+ ```
76
+
77
+ ### No body
78
+
79
+ ```js
80
+ import React from 'react';
81
+ import { Panel, PanelMain } from '@patternfly/react-core';
82
+
83
+ const NoBodyPanel = () => (
84
+ <Panel>
85
+ <PanelMain>Main content</PanelMain>
86
+ </Panel>
87
+ );
88
+ ```
89
+
90
+ ### Raised
91
+
92
+ ```js
93
+ import React from 'react';
94
+ import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
95
+
96
+ const RaisedPanel = () => (
97
+ <Panel variant="raised">
98
+ <PanelMain>
99
+ <PanelMainBody>Main content</PanelMainBody>
100
+ </PanelMain>
101
+ </Panel>
102
+ );
103
+ ```
104
+
105
+ ### Bordered
106
+
107
+ ```js
108
+ import React from 'react';
109
+ import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
110
+
111
+ const BorderedPanel = () => (
112
+ <Panel variant="bordered">
113
+ <PanelMain>
114
+ <PanelMainBody>Main content</PanelMainBody>
115
+ </PanelMain>
116
+ </Panel>
117
+ );
118
+ ```
119
+
120
+ ### Scrollable
121
+
122
+ ```js
123
+ import React from 'react';
124
+ import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
125
+
126
+ const ScrollablePanel = () => (
127
+ <Panel isScrollable>
128
+ <PanelMain tabIndex={0}>
129
+ <PanelMainBody>
130
+ Main content
131
+ <br />
132
+ <br />
133
+ Main content
134
+ <br />
135
+ <br />
136
+ Main content
137
+ <br />
138
+ <br />
139
+ Main content
140
+ <br />
141
+ <br />
142
+ Main content
143
+ <br />
144
+ <br />
145
+ Main content
146
+ <br />
147
+ <br />
148
+ Main content
149
+ <br />
150
+ <br />
151
+ Main content
152
+ <br />
153
+ <br />
154
+ Main content
155
+ </PanelMainBody>
156
+ </PanelMain>
157
+ </Panel>
158
+ );
159
+ ```
160
+
161
+ ### Scrollable with header and footer
162
+
163
+ ```js
164
+ import React from 'react';
165
+ import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider, PanelFooter } from '@patternfly/react-core';
166
+
167
+ const ScrollableHeaderFooterPanel = () => (
168
+ <Panel isScrollable>
169
+ <PanelHeader>Header content</PanelHeader>
170
+ <Divider />
171
+ <PanelMain tabIndex={0}>
172
+ <PanelMainBody>
173
+ Main content
174
+ <br />
175
+ <br />
176
+ Main content
177
+ <br />
178
+ <br />
179
+ Main content
180
+ <br />
181
+ <br />
182
+ Main content
183
+ <br />
184
+ <br />
185
+ Main content
186
+ <br />
187
+ <br />
188
+ Main content
189
+ <br />
190
+ <br />
191
+ Main content
192
+ <br />
193
+ <br />
194
+ Main content
195
+ <br />
196
+ <br />
197
+ Main content
198
+ </PanelMainBody>
199
+ </PanelMain>
200
+ <PanelFooter>Footer content</PanelFooter>
201
+ </Panel>
202
+ );
203
+ ```
@@ -0,0 +1,5 @@
1
+ export * from './Panel';
2
+ export * from './PanelMain';
3
+ export * from './PanelMainBody';
4
+ export * from './PanelHeader';
5
+ export * from './PanelFooter';
@@ -80,3 +80,4 @@ export * from './TreeView';
80
80
  export * from './Wizard';
81
81
  export * from './DragDrop';
82
82
  export * from './TextInputGroup';
83
+ export * from './Panel';