@patternfly/react-core 6.5.0-prerelease.26 → 6.5.0-prerelease.28

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 (137) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/components/package.json +1 -1
  4. package/deprecated/package.json +1 -1
  5. package/dist/dynamic/components/AboutModal/package.json +1 -1
  6. package/dist/dynamic/components/Accordion/package.json +1 -1
  7. package/dist/dynamic/components/ActionList/package.json +1 -1
  8. package/dist/dynamic/components/Alert/package.json +1 -1
  9. package/dist/dynamic/components/Avatar/package.json +1 -1
  10. package/dist/dynamic/components/BackToTop/package.json +1 -1
  11. package/dist/dynamic/components/Backdrop/package.json +1 -1
  12. package/dist/dynamic/components/BackgroundImage/package.json +1 -1
  13. package/dist/dynamic/components/Badge/package.json +1 -1
  14. package/dist/dynamic/components/Banner/package.json +1 -1
  15. package/dist/dynamic/components/Brand/package.json +1 -1
  16. package/dist/dynamic/components/Breadcrumb/package.json +1 -1
  17. package/dist/dynamic/components/Button/package.json +1 -1
  18. package/dist/dynamic/components/CalendarMonth/package.json +1 -1
  19. package/dist/dynamic/components/Card/package.json +1 -1
  20. package/dist/dynamic/components/Checkbox/package.json +1 -1
  21. package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
  22. package/dist/dynamic/components/CodeBlock/package.json +1 -1
  23. package/dist/dynamic/components/Compass/package.json +1 -1
  24. package/dist/dynamic/components/Content/package.json +1 -1
  25. package/dist/dynamic/components/DataList/package.json +1 -1
  26. package/dist/dynamic/components/DatePicker/package.json +1 -1
  27. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  28. package/dist/dynamic/components/Divider/package.json +1 -1
  29. package/dist/dynamic/components/Drawer/package.json +1 -1
  30. package/dist/dynamic/components/Dropdown/package.json +1 -1
  31. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  32. package/dist/dynamic/components/EmptyState/package.json +1 -1
  33. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  34. package/dist/dynamic/components/FileUpload/package.json +1 -1
  35. package/dist/dynamic/components/Form/package.json +1 -1
  36. package/dist/dynamic/components/FormSelect/package.json +1 -1
  37. package/dist/dynamic/components/HelperText/package.json +1 -1
  38. package/dist/dynamic/components/Hero/package.json +1 -1
  39. package/dist/dynamic/components/Hint/package.json +1 -1
  40. package/dist/dynamic/components/Icon/package.json +1 -1
  41. package/dist/dynamic/components/InputGroup/package.json +1 -1
  42. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  43. package/dist/dynamic/components/Label/package.json +1 -1
  44. package/dist/dynamic/components/List/package.json +1 -1
  45. package/dist/dynamic/components/LoginPage/package.json +1 -1
  46. package/dist/dynamic/components/Masthead/package.json +1 -1
  47. package/dist/dynamic/components/Menu/package.json +1 -1
  48. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  49. package/dist/dynamic/components/Modal/package.json +1 -1
  50. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  51. package/dist/dynamic/components/Nav/package.json +1 -1
  52. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  53. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  54. package/dist/dynamic/components/NumberInput/package.json +1 -1
  55. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  56. package/dist/dynamic/components/Page/package.json +1 -1
  57. package/dist/dynamic/components/Pagination/package.json +1 -1
  58. package/dist/dynamic/components/Panel/package.json +1 -1
  59. package/dist/dynamic/components/Popover/package.json +1 -1
  60. package/dist/dynamic/components/Progress/package.json +1 -1
  61. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  62. package/dist/dynamic/components/Radio/package.json +1 -1
  63. package/dist/dynamic/components/SearchInput/package.json +1 -1
  64. package/dist/dynamic/components/Select/package.json +1 -1
  65. package/dist/dynamic/components/Sidebar/package.json +1 -1
  66. package/dist/dynamic/components/SimpleList/package.json +1 -1
  67. package/dist/dynamic/components/Skeleton/package.json +1 -1
  68. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  69. package/dist/dynamic/components/Slider/package.json +1 -1
  70. package/dist/dynamic/components/Spinner/package.json +1 -1
  71. package/dist/dynamic/components/Switch/package.json +1 -1
  72. package/dist/dynamic/components/Tabs/package.json +1 -1
  73. package/dist/dynamic/components/TextArea/package.json +1 -1
  74. package/dist/dynamic/components/TextInput/package.json +1 -1
  75. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  76. package/dist/dynamic/components/TimePicker/package.json +1 -1
  77. package/dist/dynamic/components/Timestamp/package.json +1 -1
  78. package/dist/dynamic/components/Title/package.json +1 -1
  79. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  80. package/dist/dynamic/components/Toolbar/package.json +1 -1
  81. package/dist/dynamic/components/Tooltip/package.json +1 -1
  82. package/dist/dynamic/components/TreeView/package.json +1 -1
  83. package/dist/dynamic/components/Truncate/package.json +1 -1
  84. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  85. package/dist/dynamic/components/Wizard/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
  90. package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
  91. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  92. package/dist/dynamic/deprecated/components/package.json +1 -1
  93. package/dist/dynamic/helpers/AnimationsProvider/AnimationsProvider/package.json +1 -1
  94. package/dist/dynamic/helpers/AnimationsProvider/package.json +1 -1
  95. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  96. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  97. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  98. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  99. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  100. package/dist/dynamic/helpers/constants/package.json +1 -1
  101. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  102. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  103. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  104. package/dist/dynamic/helpers/package.json +1 -1
  105. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  106. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  107. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  108. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  109. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  110. package/dist/dynamic/helpers/util/package.json +1 -1
  111. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  112. package/dist/dynamic/layouts/Flex/package.json +1 -1
  113. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  114. package/dist/dynamic/layouts/Grid/package.json +1 -1
  115. package/dist/dynamic/layouts/Level/package.json +1 -1
  116. package/dist/dynamic/layouts/Split/package.json +1 -1
  117. package/dist/dynamic/layouts/Stack/package.json +1 -1
  118. package/dist/dynamic/styles/package.json +1 -1
  119. package/dist/umd/assets/{output-BOKd1GXO.css → output-Bmv7kLWB.css} +21168 -21168
  120. package/helpers/package.json +1 -1
  121. package/layouts/package.json +1 -1
  122. package/next/package.json +1 -1
  123. package/package.json +4 -4
  124. package/src/demos/DatePicker/DatePicker.md +1 -47
  125. package/src/demos/DatePicker/examples/DatePickerRange.tsx +46 -0
  126. package/src/demos/Wizard/WizardDemo.md +6 -6
  127. package/src/layouts/Grid/examples/Grid.md +8 -104
  128. package/src/layouts/Grid/examples/GridAlternativeComponents.tsx +11 -0
  129. package/src/layouts/Grid/examples/GridBasic.tsx +22 -0
  130. package/src/layouts/Grid/examples/GridGroupingOrdering.tsx +18 -0
  131. package/src/layouts/Grid/examples/GridResponsiveOrdering.tsx +9 -0
  132. package/src/layouts/Grid/examples/GridStandardOrdering.tsx +9 -0
  133. package/src/layouts/Grid/examples/GridWithGutters.tsx +22 -0
  134. package/src/layouts/Grid/examples/GridWithOverrides.tsx +20 -0
  135. package/src/layouts/Stack/examples/Stack.md +2 -16
  136. package/src/layouts/Stack/examples/StackBasic.tsx +9 -0
  137. package/src/layouts/Stack/examples/StackWithGutter.tsx +9 -0
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.5.0-prerelease.25","private":true}
1
+ {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.5.0-prerelease.27","private":true}
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.5.0-prerelease.25","private":true}
1
+ {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.5.0-prerelease.27","private":true}
package/next/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.5.0-prerelease.25","private":true}
1
+ {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.5.0-prerelease.27","private":true}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "6.5.0-prerelease.26",
3
+ "version": "6.5.0-prerelease.28",
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",
@@ -46,8 +46,8 @@
46
46
  "subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
47
47
  },
48
48
  "dependencies": {
49
- "@patternfly/react-icons": "^6.5.0-prerelease.11",
50
- "@patternfly/react-styles": "^6.5.0-prerelease.9",
49
+ "@patternfly/react-icons": "^6.5.0-prerelease.12",
50
+ "@patternfly/react-styles": "^6.5.0-prerelease.10",
51
51
  "@patternfly/react-tokens": "^6.5.0-prerelease.9",
52
52
  "focus-trap": "7.6.6",
53
53
  "react-dropzone": "^14.3.5",
@@ -63,5 +63,5 @@
63
63
  "react": "^17 || ^18 || ^19",
64
64
  "react-dom": "^17 || ^18 || ^19"
65
65
  },
66
- "gitHead": "296178f84f2073ea2034858f812ab6d5dd03f3f0"
66
+ "gitHead": "884ad17d2ec8d71239e2f4f86b5fbc4fd4cc8196"
67
67
  }
@@ -13,53 +13,7 @@ import { Modal as ModalDeprecated, ModalVariant as ModalVariantDeprecated } from
13
13
 
14
14
  This is intended to be used as a filter. After selecting a start date, the next date is automatically selected.
15
15
 
16
- ```js
17
- import { useState } from 'react';
18
- import { Split, SplitItem, DatePicker, isValidDate, yyyyMMddFormat } from '@patternfly/react-core';
19
-
20
- DateRangePicker = () => {
21
- const [from, setFrom] = useState();
22
- const [to, setTo] = useState();
23
-
24
- const toValidator = (date) =>
25
- isValidDate(from) && date >= from ? '' : 'The "to" date must be after the "from" date';
26
-
27
- const onFromChange = (_event, _value, date) => {
28
- setFrom(new Date(date));
29
- if (isValidDate(date)) {
30
- date.setDate(date.getDate() + 1);
31
- setTo(yyyyMMddFormat(date));
32
- } else {
33
- setTo('');
34
- }
35
- };
36
-
37
- const onToChange = (_event, _value, date) => {
38
- if (isValidDate(date)) {
39
- setTo(yyyyMMddFormat(date));
40
- }
41
- };
42
-
43
- return (
44
- <Split>
45
- <SplitItem>
46
- <DatePicker onChange={onFromChange} aria-label="Start date" placeholder="YYYY-MM-DD" />
47
- </SplitItem>
48
- <SplitItem style={{ padding: '6px 12px 0 12px' }}>to</SplitItem>
49
- <SplitItem>
50
- <DatePicker
51
- value={to}
52
- onChange={onToChange}
53
- isDisabled={!isValidDate(from)}
54
- rangeStart={from}
55
- validators={[toValidator]}
56
- aria-label="End date"
57
- placeholder="YYYY-MM-DD"
58
- />
59
- </SplitItem>
60
- </Split>
61
- );
62
- };
16
+ ```ts file="./examples/DatePickerRange.tsx"
63
17
  ```
64
18
 
65
19
  ### Date and time pickers in modal
@@ -0,0 +1,46 @@
1
+ import { useState } from 'react';
2
+ import { Split, SplitItem, DatePicker, isValidDate, yyyyMMddFormat } from '@patternfly/react-core';
3
+
4
+ export const DatePickerRange: React.FunctionComponent = () => {
5
+ const [from, setFrom] = useState<Date | undefined>();
6
+ const [to, setTo] = useState<string>('');
7
+
8
+ const toValidator = (date: Date) =>
9
+ isValidDate(from) && date >= from ? '' : 'The "to" date must be after the "from" date';
10
+
11
+ const onFromChange = (_event: React.MouseEvent<HTMLElement>, _value: string, date: Date) => {
12
+ setFrom(new Date(date));
13
+ if (isValidDate(date)) {
14
+ date.setDate(date.getDate() + 1);
15
+ setTo(yyyyMMddFormat(date));
16
+ } else {
17
+ setTo('');
18
+ }
19
+ };
20
+
21
+ const onToChange = (_event: React.MouseEvent<HTMLElement>, _value: string, date: Date) => {
22
+ if (isValidDate(date)) {
23
+ setTo(yyyyMMddFormat(date));
24
+ }
25
+ };
26
+
27
+ return (
28
+ <Split>
29
+ <SplitItem>
30
+ <DatePicker onChange={onFromChange} aria-label="Start date" placeholder="YYYY-MM-DD" />
31
+ </SplitItem>
32
+ <SplitItem style={{ padding: '6px 12px 0 12px' }}>to</SplitItem>
33
+ <SplitItem>
34
+ <DatePicker
35
+ value={to}
36
+ onChange={onToChange}
37
+ isDisabled={!isValidDate(from)}
38
+ rangeStart={from}
39
+ validators={[toValidator]}
40
+ aria-label="End date"
41
+ placeholder="YYYY-MM-DD"
42
+ />
43
+ </SplitItem>
44
+ </Split>
45
+ );
46
+ };
@@ -14,30 +14,30 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard
14
14
 
15
15
  ### In modal
16
16
 
17
- ```js file="../examples/Wizard/InModal.tsx" isFullscreen
17
+ ```ts file="../examples/Wizard/InModal.tsx" isFullscreen
18
18
  ```
19
19
 
20
20
  ### In modal, with drawer
21
21
 
22
- ```js file="../examples/Wizard/InModalWithDrawer.tsx" isFullscreen
22
+ ```ts file="../examples/Wizard/InModalWithDrawer.tsx" isFullscreen
23
23
  ```
24
24
 
25
25
  ### In modal, with drawer and informational step
26
26
 
27
- ```js file="../examples/Wizard/InModalWithDrawerInformationalStep.tsx" isFullscreen
27
+ ```ts file="../examples/Wizard/InModalWithDrawerInformationalStep.tsx" isFullscreen
28
28
  ```
29
29
 
30
30
  ### In page
31
31
 
32
- ```js file="../examples/Wizard/InPage.tsx" isFullscreen
32
+ ```ts file="../examples/Wizard/InPage.tsx" isFullscreen
33
33
  ```
34
34
 
35
35
  ### In page, with drawer
36
36
 
37
- ```js file="../examples/Wizard/InPageWithDrawer.tsx" isFullscreen
37
+ ```ts file="../examples/Wizard/InPageWithDrawer.tsx" isFullscreen
38
38
  ```
39
39
 
40
40
  ### In page, with drawer and informational step
41
41
 
42
- ```js file="../examples/Wizard/InPageWithDrawerInformationalStep.tsx" isFullscreen
42
+ ```ts file="../examples/Wizard/InPageWithDrawerInformationalStep.tsx" isFullscreen
43
43
  ```
@@ -12,134 +12,38 @@ import './grid.css';
12
12
 
13
13
  ### Basic
14
14
 
15
- ```js
16
- import { Grid, GridItem } from '@patternfly/react-core';
17
-
18
- <Grid>
19
- <GridItem span={8}>span = 8</GridItem>
20
- <GridItem span={4} rowSpan={2}>
21
- span = 4, rowSpan = 2
22
- </GridItem>
23
- <GridItem span={2} rowSpan={3}>
24
- span = 2, rowSpan = 3
25
- </GridItem>
26
- <GridItem span={2}>span = 2</GridItem>
27
- <GridItem span={4}>span = 4</GridItem>
28
- <GridItem span={2}>span = 2</GridItem>
29
- <GridItem span={2}>span = 2</GridItem>
30
- <GridItem span={2}>span = 2</GridItem>
31
- <GridItem span={4}>span = 4</GridItem>
32
- <GridItem span={2}>span = 2</GridItem>
33
- <GridItem span={4}>span = 4</GridItem>
34
- <GridItem span={4}>span = 4</GridItem>
35
- </Grid>;
15
+ ```ts file="GridBasic.tsx"
36
16
  ```
37
17
 
38
18
  ### With gutters
39
19
 
40
- ```js
41
- import { Grid, GridItem } from '@patternfly/react-core';
42
-
43
- <Grid hasGutter>
44
- <GridItem span={8}>span = 8</GridItem>
45
- <GridItem span={4} rowSpan={2}>
46
- span = 4, rowSpan = 2
47
- </GridItem>
48
- <GridItem span={2} rowSpan={3}>
49
- span = 2, rowSpan = 3
50
- </GridItem>
51
- <GridItem span={2}>span = 2</GridItem>
52
- <GridItem span={4}>span = 4</GridItem>
53
- <GridItem span={2}>span = 2</GridItem>
54
- <GridItem span={2}>span = 2</GridItem>
55
- <GridItem span={2}>span = 2</GridItem>
56
- <GridItem span={4}>span = 4</GridItem>
57
- <GridItem span={2}>span = 2</GridItem>
58
- <GridItem span={4}>span = 4</GridItem>
59
- <GridItem span={4}>span = 4</GridItem>
60
- </Grid>;
20
+ ```ts file="GridWithGutters.tsx"
61
21
  ```
62
22
 
63
23
  ### With overrides
64
24
 
65
- ```js
66
- import { Grid, GridItem } from '@patternfly/react-core';
67
-
68
- <Grid sm={6} md={4} lg={3} xl2={1}>
69
- <GridItem span={3} rowSpan={2}>
70
- span = 3 rowSpan= 2
71
- </GridItem>
72
- <GridItem>Grid Item</GridItem>
73
- <GridItem>Grid Item</GridItem>
74
- <GridItem>Grid Item</GridItem>
75
- <GridItem>Grid Item</GridItem>
76
- <GridItem>Grid Item</GridItem>
77
- <GridItem>Grid Item</GridItem>
78
- <GridItem>Grid Item</GridItem>
79
- <GridItem>Grid Item</GridItem>
80
- <GridItem>Grid Item</GridItem>
81
- <GridItem>Grid Item</GridItem>
82
- <GridItem>Grid Item</GridItem>
83
- </Grid>;
25
+ ```ts file="GridWithOverrides.tsx"
84
26
  ```
85
27
 
86
28
  ## Ordering
87
29
 
88
30
  ### Standard ordering
89
31
 
90
- ```js
91
- import { Grid, GridItem } from '@patternfly/react-core';
92
-
93
- <Grid hasGutter span={3}>
94
- <GridItem order={{ default: '2' }}>Item A</GridItem>
95
- <GridItem>Item B</GridItem>
96
- <GridItem order={{ default: '-1' }}>Item C</GridItem>
97
- </Grid>;
32
+ ```ts file="GridStandardOrdering.tsx"
98
33
  ```
99
34
 
100
35
  ### Responsive ordering
101
36
 
102
- ```js
103
- import { Grid, GridItem } from '@patternfly/react-core';
104
-
105
- <Grid hasGutter span={3}>
106
- <GridItem order={{ lg: '2' }}>Item A</GridItem>
107
- <GridItem>Item B</GridItem>
108
- <GridItem order={{ default: '-1', md: '1' }}>Item C</GridItem>
109
- </Grid>;
37
+ ```ts file="GridResponsiveOrdering.tsx"
110
38
  ```
111
39
 
112
40
  ### Grouped ordering
113
41
 
114
- ```js
115
- import { Grid, GridItem } from '@patternfly/react-core';
116
-
117
- <Grid hasGutter span={12}>
118
- <Grid hasGutter span={6} order={{ default: '2' }}>
119
- <GridItem order={{ default: '3' }}>Set 1, Item A</GridItem>
120
- <GridItem order={{ default: '1' }}>Set 1, Item B</GridItem>
121
- <GridItem>Set 1, Item C</GridItem>
122
- <GridItem order={{ default: '2' }}>Set 1, Item D</GridItem>
123
- </Grid>
124
- <Grid hasGutter span={6}>
125
- <GridItem order={{ default: '2' }}>Set 2, Item A</GridItem>
126
- <GridItem order={{ default: '1' }}>Set 2, Item B</GridItem>
127
- <GridItem>Set 2, Item C</GridItem>
128
- <GridItem order={{ default: '2' }}>Set 2, Item D</GridItem>
129
- </Grid>
130
- </Grid>;
42
+ ```ts file="GridGroupingOrdering.tsx"
43
+
131
44
  ```
132
45
 
133
46
  ### Alternative components
134
47
 
135
- ```js
136
- import { Grid, GridItem } from '@patternfly/react-core';
137
-
138
- <Grid component="ul">
139
- <GridItem component="li">Grid item</GridItem>
140
- <GridItem component="li">Grid item</GridItem>
141
- <GridItem component="li">Grid item</GridItem>
142
- <GridItem component="li">Grid item</GridItem>
143
- <GridItem component="li">Grid item</GridItem>
144
- </Grid>;
48
+ ```ts file="GridAlternativeComponents.tsx"
145
49
  ```
@@ -0,0 +1,11 @@
1
+ import { Grid, GridItem } from '@patternfly/react-core';
2
+
3
+ export const GridAlternativeComponents: React.FunctionComponent = () => (
4
+ <Grid component="ul">
5
+ <GridItem component="li">Grid item</GridItem>
6
+ <GridItem component="li">Grid item</GridItem>
7
+ <GridItem component="li">Grid item</GridItem>
8
+ <GridItem component="li">Grid item</GridItem>
9
+ <GridItem component="li">Grid item</GridItem>
10
+ </Grid>
11
+ );
@@ -0,0 +1,22 @@
1
+ import { Grid, GridItem } from '@patternfly/react-core';
2
+
3
+ export const GridBasic: React.FunctionComponent = () => (
4
+ <Grid>
5
+ <GridItem span={8}>span = 8</GridItem>
6
+ <GridItem span={4} rowSpan={2}>
7
+ span = 4, rowSpan = 2
8
+ </GridItem>
9
+ <GridItem span={2} rowSpan={3}>
10
+ span = 2, rowSpan = 3
11
+ </GridItem>
12
+ <GridItem span={2}>span = 2</GridItem>
13
+ <GridItem span={4}>span = 4</GridItem>
14
+ <GridItem span={2}>span = 2</GridItem>
15
+ <GridItem span={2}>span = 2</GridItem>
16
+ <GridItem span={2}>span = 2</GridItem>
17
+ <GridItem span={4}>span = 4</GridItem>
18
+ <GridItem span={2}>span = 2</GridItem>
19
+ <GridItem span={4}>span = 4</GridItem>
20
+ <GridItem span={4}>span = 4</GridItem>
21
+ </Grid>
22
+ );
@@ -0,0 +1,18 @@
1
+ import { Grid, GridItem } from '@patternfly/react-core';
2
+
3
+ export const GridGroupingOrdering: React.FunctionComponent = () => (
4
+ <Grid hasGutter span={12}>
5
+ <Grid hasGutter span={6} order={{ default: '2' }}>
6
+ <GridItem order={{ default: '3' }}>Set 1, Item A</GridItem>
7
+ <GridItem order={{ default: '1' }}>Set 1, Item B</GridItem>
8
+ <GridItem>Set 1, Item C</GridItem>
9
+ <GridItem order={{ default: '2' }}>Set 1, Item D</GridItem>
10
+ </Grid>
11
+ <Grid hasGutter span={6}>
12
+ <GridItem order={{ default: '2' }}>Set 2, Item A</GridItem>
13
+ <GridItem order={{ default: '1' }}>Set 2, Item B</GridItem>
14
+ <GridItem>Set 2, Item C</GridItem>
15
+ <GridItem order={{ default: '2' }}>Set 2, Item D</GridItem>
16
+ </Grid>
17
+ </Grid>
18
+ );
@@ -0,0 +1,9 @@
1
+ import { Grid, GridItem } from '@patternfly/react-core';
2
+
3
+ export const GridResponsiveOrdering: React.FunctionComponent = () => (
4
+ <Grid hasGutter span={3}>
5
+ <GridItem order={{ lg: '2' }}>Item A</GridItem>
6
+ <GridItem>Item B</GridItem>
7
+ <GridItem order={{ default: '-1', md: '1' }}>Item C</GridItem>
8
+ </Grid>
9
+ );
@@ -0,0 +1,9 @@
1
+ import { Grid, GridItem } from '@patternfly/react-core';
2
+
3
+ export const GridStandardOrdering: React.FunctionComponent = () => (
4
+ <Grid hasGutter span={3}>
5
+ <GridItem order={{ default: '2' }}>Item A</GridItem>
6
+ <GridItem>Item B</GridItem>
7
+ <GridItem order={{ default: '-1' }}>Item C</GridItem>
8
+ </Grid>
9
+ );
@@ -0,0 +1,22 @@
1
+ import { Grid, GridItem } from '@patternfly/react-core';
2
+
3
+ export const GridWithGutters: React.FunctionComponent = () => (
4
+ <Grid hasGutter>
5
+ <GridItem span={8}>span = 8</GridItem>
6
+ <GridItem span={4} rowSpan={2}>
7
+ span = 4, rowSpan = 2
8
+ </GridItem>
9
+ <GridItem span={2} rowSpan={3}>
10
+ span = 2, rowSpan = 3
11
+ </GridItem>
12
+ <GridItem span={2}>span = 2</GridItem>
13
+ <GridItem span={4}>span = 4</GridItem>
14
+ <GridItem span={2}>span = 2</GridItem>
15
+ <GridItem span={2}>span = 2</GridItem>
16
+ <GridItem span={2}>span = 2</GridItem>
17
+ <GridItem span={4}>span = 4</GridItem>
18
+ <GridItem span={2}>span = 2</GridItem>
19
+ <GridItem span={4}>span = 4</GridItem>
20
+ <GridItem span={4}>span = 4</GridItem>
21
+ </Grid>
22
+ );
@@ -0,0 +1,20 @@
1
+ import { Grid, GridItem } from '@patternfly/react-core';
2
+
3
+ export const GridWithOverrides: React.FunctionComponent = () => (
4
+ <Grid sm={6} md={4} lg={3} xl2={1}>
5
+ <GridItem span={3} rowSpan={2}>
6
+ span = 3 rowSpan= 2
7
+ </GridItem>
8
+ <GridItem>Grid Item</GridItem>
9
+ <GridItem>Grid Item</GridItem>
10
+ <GridItem>Grid Item</GridItem>
11
+ <GridItem>Grid Item</GridItem>
12
+ <GridItem>Grid Item</GridItem>
13
+ <GridItem>Grid Item</GridItem>
14
+ <GridItem>Grid Item</GridItem>
15
+ <GridItem>Grid Item</GridItem>
16
+ <GridItem>Grid Item</GridItem>
17
+ <GridItem>Grid Item</GridItem>
18
+ <GridItem>Grid Item</GridItem>
19
+ </Grid>
20
+ );
@@ -12,24 +12,10 @@ import './stack.css';
12
12
 
13
13
  ### Basic
14
14
 
15
- ```js
16
- import { Stack, StackItem } from '@patternfly/react-core';
17
-
18
- <Stack>
19
- <StackItem>content</StackItem>
20
- <StackItem isFilled>pf-m-fill</StackItem>
21
- <StackItem>content</StackItem>
22
- </Stack>;
15
+ ```ts file="StackBasic.tsx"
23
16
  ```
24
17
 
25
18
  ### With gutter
26
19
 
27
- ```js
28
- import { Stack, StackItem } from '@patternfly/react-core';
29
-
30
- <Stack hasGutter>
31
- <StackItem>content</StackItem>
32
- <StackItem isFilled>pf-m-fill</StackItem>
33
- <StackItem>content</StackItem>
34
- </Stack>;
20
+ ```ts file="StackWithGutter.tsx"
35
21
  ```
@@ -0,0 +1,9 @@
1
+ import { Stack, StackItem } from '@patternfly/react-core';
2
+
3
+ export const StackBasic: React.FunctionComponent = () => (
4
+ <Stack>
5
+ <StackItem>content</StackItem>
6
+ <StackItem isFilled>pf-m-fill</StackItem>
7
+ <StackItem>content</StackItem>
8
+ </Stack>
9
+ );
@@ -0,0 +1,9 @@
1
+ import { Stack, StackItem } from '@patternfly/react-core';
2
+
3
+ export const StackWithGutter: React.FunctionComponent = () => (
4
+ <Stack hasGutter>
5
+ <StackItem>content</StackItem>
6
+ <StackItem isFilled>pf-m-fill</StackItem>
7
+ <StackItem>content</StackItem>
8
+ </Stack>
9
+ );