@patternfly/react-core 6.5.0-prerelease.25 → 6.5.0-prerelease.27

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 (163) hide show
  1. package/CHANGELOG.md +10 -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/esm/components/Label/Label.js +1 -1
  120. package/dist/esm/components/Label/Label.js.map +1 -1
  121. package/dist/js/components/Label/Label.js +1 -1
  122. package/dist/js/components/Label/Label.js.map +1 -1
  123. package/dist/umd/assets/{output-ClqppqYH.css → output-k590n8-M.css} +18743 -18743
  124. package/dist/umd/react-core.min.js +1 -1
  125. package/helpers/package.json +1 -1
  126. package/layouts/package.json +1 -1
  127. package/next/package.json +1 -1
  128. package/package.json +4 -4
  129. package/src/components/Label/Label.tsx +1 -1
  130. package/src/demos/Banner.md +2 -139
  131. package/src/demos/DateTimePicker.md +2 -86
  132. package/src/demos/JumpLinks.md +2 -129
  133. package/src/demos/ProgressDemo.md +2 -65
  134. package/src/demos/ProgressStepperDemo.md +1 -72
  135. package/src/demos/Tabs.md +6 -417
  136. package/src/demos/examples/Banner/BannerBasicSticky.tsx +55 -0
  137. package/src/demos/examples/Banner/BannerTopBottom.tsx +81 -0
  138. package/src/demos/examples/DateTimePicker/DateTimeRangePicker.tsx +93 -0
  139. package/src/demos/examples/JumpLinks/JumpLinksScrollspy.tsx +125 -0
  140. package/src/demos/examples/JumpLinks/{JumpLinksWithDrawer.js → JumpLinksWithDrawer.tsx} +1 -1
  141. package/src/demos/examples/Progress/ProgressBasic.tsx +32 -0
  142. package/src/demos/examples/Progress/ProgressWithOnlyIncreasing.tsx +33 -0
  143. package/src/demos/examples/ProgressStepper/ProgressStepperBasic.tsx +72 -0
  144. package/src/demos/examples/Tabs/TabsOpen.tsx +185 -0
  145. package/src/demos/examples/Tabs/TabsOpenWithSecondaryTabs.tsx +228 -0
  146. package/src/layouts/Gallery/examples/Gallery.md +8 -99
  147. package/src/layouts/Gallery/examples/GalleryAdjustingMaxWidths.tsx +21 -0
  148. package/src/layouts/Gallery/examples/GalleryAdjustingMinMaxWidths.tsx +25 -0
  149. package/src/layouts/Gallery/examples/GalleryAdjustingMinWidths.tsx +22 -0
  150. package/src/layouts/Gallery/examples/GalleryAlternativeComponents.tsx +11 -0
  151. package/src/layouts/Gallery/examples/GalleryBasic.tsx +14 -0
  152. package/src/layouts/Gallery/examples/GalleryWithGutters.tsx +12 -0
  153. package/src/layouts/Grid/examples/Grid.md +8 -104
  154. package/src/layouts/Grid/examples/GridAlternativeComponents.tsx +11 -0
  155. package/src/layouts/Grid/examples/GridBasic.tsx +22 -0
  156. package/src/layouts/Grid/examples/GridGroupingOrdering.tsx +18 -0
  157. package/src/layouts/Grid/examples/GridResponsiveOrdering.tsx +9 -0
  158. package/src/layouts/Grid/examples/GridStandardOrdering.tsx +9 -0
  159. package/src/layouts/Grid/examples/GridWithGutters.tsx +22 -0
  160. package/src/layouts/Grid/examples/GridWithOverrides.tsx +20 -0
  161. package/src/layouts/Stack/examples/Stack.md +2 -16
  162. package/src/layouts/Stack/examples/StackBasic.tsx +9 -0
  163. package/src/layouts/Stack/examples/StackWithGutter.tsx +9 -0
@@ -0,0 +1,228 @@
1
+ import { useState } from 'react';
2
+ import {
3
+ PageSection,
4
+ PageBreadcrumb,
5
+ Breadcrumb,
6
+ BreadcrumbItem,
7
+ Tabs,
8
+ Tab,
9
+ TabContent,
10
+ TabContentBody,
11
+ TabTitleText,
12
+ Title,
13
+ DescriptionList,
14
+ DescriptionListGroup,
15
+ DescriptionListTerm,
16
+ DescriptionListDescription,
17
+ Label,
18
+ LabelGroup,
19
+ Flex,
20
+ FlexItem
21
+ } from '@patternfly/react-core';
22
+ import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
23
+ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
24
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
25
+ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper';
26
+
27
+ export const TabsOpenWithSecondaryTabs: React.FunctionComponent = () => {
28
+ const [activeTabKey, setActiveTabKey] = useState<number>(0);
29
+ const [activeTabKeySecondary, setActiveTabKeySecondary] = useState<number>(10);
30
+
31
+ // Toggle currently active tab
32
+ const handleTabClick = (_event: React.MouseEvent<HTMLElement>, tabIndex: number) => {
33
+ setActiveTabKey(tabIndex);
34
+ };
35
+
36
+ // Toggle currently active secondary tab
37
+ const handleTabClickSecondary = (_event: React.MouseEvent<HTMLElement>, tabIndex: number) => {
38
+ setActiveTabKeySecondary(tabIndex);
39
+ };
40
+
41
+ const tabsBreadcrumb = (
42
+ <PageBreadcrumb isWidthLimited>
43
+ <Breadcrumb>
44
+ <BreadcrumbItem to="#">Overview</BreadcrumbItem>
45
+ <BreadcrumbItem to="#">Pods</BreadcrumbItem>
46
+ <BreadcrumbItem to="#" isActive>
47
+ Pod details{' '}
48
+ </BreadcrumbItem>
49
+ </Breadcrumb>
50
+ </PageBreadcrumb>
51
+ );
52
+
53
+ const tabContent = (
54
+ <Flex direction={{ default: 'column' }}>
55
+ <FlexItem spacer={{ default: 'spacerLg' }}>
56
+ <Title headingLevel="h2" size="lg" className={spacing.mtSm} id="open-tabs-example-tabs-list-details-title">
57
+ Pod details
58
+ </Title>
59
+ </FlexItem>
60
+ <FlexItem>
61
+ <DescriptionList columnModifier={{ lg: '2Col' }} aria-labelledby="open-tabs-example-tabs-list-details-title">
62
+ <DescriptionListGroup>
63
+ <DescriptionListTerm>Name</DescriptionListTerm>
64
+ <DescriptionListDescription>3scale-control-fccb6ddb9-phyqv9</DescriptionListDescription>
65
+ </DescriptionListGroup>
66
+ <DescriptionListGroup>
67
+ <DescriptionListTerm>Status</DescriptionListTerm>
68
+ <DescriptionListDescription>
69
+ <Flex spacer={{ default: 'spacerLg' }}>
70
+ <FlexItem>
71
+ <CheckCircleIcon />
72
+ </FlexItem>
73
+ <FlexItem>Running</FlexItem>
74
+ </Flex>
75
+ </DescriptionListDescription>
76
+ </DescriptionListGroup>
77
+ <DescriptionListGroup>
78
+ <DescriptionListTerm>Namespace</DescriptionListTerm>
79
+ <DescriptionListDescription>
80
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
81
+ <FlexItem>
82
+ <Label color="teal">NS</Label>
83
+ </FlexItem>
84
+ <FlexItem>
85
+ <a href="#">knative-serving-ingress</a>
86
+ </FlexItem>
87
+ </Flex>
88
+ </DescriptionListDescription>
89
+ </DescriptionListGroup>
90
+ <DescriptionListGroup>
91
+ <DescriptionListTerm>Restart policy</DescriptionListTerm>
92
+ <DescriptionListDescription>Always restart</DescriptionListDescription>
93
+ </DescriptionListGroup>
94
+ <DescriptionListGroup>
95
+ <DescriptionListTerm>Labels</DescriptionListTerm>
96
+ <DescriptionListDescription>
97
+ <LabelGroup>
98
+ <Label>app=3scale-gateway</Label>
99
+ <Label>pod-template-has=6747686899</Label>
100
+ </LabelGroup>
101
+ </DescriptionListDescription>
102
+ </DescriptionListGroup>
103
+ <DescriptionListGroup>
104
+ <DescriptionListTerm>Active deadline seconds</DescriptionListTerm>
105
+ <DescriptionListDescription>Not configured</DescriptionListDescription>
106
+ </DescriptionListGroup>
107
+ <DescriptionListGroup>
108
+ <DescriptionListTerm>Tolerations</DescriptionListTerm>
109
+ <DescriptionListDescription>stuff</DescriptionListDescription>
110
+ </DescriptionListGroup>
111
+ <DescriptionListGroup>
112
+ <DescriptionListTerm>Pod IP</DescriptionListTerm>
113
+ <DescriptionListDescription>10.345.2.197</DescriptionListDescription>
114
+ </DescriptionListGroup>
115
+ <DescriptionListGroup>
116
+ <DescriptionListTerm>Annotations</DescriptionListTerm>
117
+ <DescriptionListDescription>stuff</DescriptionListDescription>
118
+ </DescriptionListGroup>
119
+ <DescriptionListGroup>
120
+ <DescriptionListTerm>Node</DescriptionListTerm>
121
+ <DescriptionListDescription>
122
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
123
+ <FlexItem>
124
+ <Label color="purple">N</Label>
125
+ </FlexItem>
126
+ <FlexItem>ip-10-0-233-118.us-east-2.computer.external</FlexItem>
127
+ </Flex>
128
+ </DescriptionListDescription>
129
+ </DescriptionListGroup>
130
+ <DescriptionListGroup>
131
+ <DescriptionListTerm>Created at</DescriptionListTerm>
132
+ <DescriptionListDescription>
133
+ <time>Oct 15, 1:51 pm</time>
134
+ </DescriptionListDescription>
135
+ </DescriptionListGroup>
136
+ </DescriptionList>
137
+ </FlexItem>
138
+ </Flex>
139
+ );
140
+
141
+ return (
142
+ <DashboardWrapper hasNoBreadcrumb>
143
+ {tabsBreadcrumb}
144
+ <PageSection isWidthLimited aria-label="Pod header">
145
+ <Flex
146
+ spaceItems={{ default: 'spaceItemsMd' }}
147
+ alignItems={{ default: 'alignItemsFlexStart' }}
148
+ flexWrap={{ default: 'noWrap' }}
149
+ >
150
+ <FlexItem>
151
+ <Label color="blue">N</Label>
152
+ </FlexItem>
153
+ <FlexItem>
154
+ <Title headingLevel="h1" size="2xl">
155
+ 3scale-control-fccb6ddb9-phyqv9
156
+ </Title>
157
+ </FlexItem>
158
+ <FlexItem flex={{ default: 'flexNone' }}>
159
+ <Label icon={<InfoCircleIcon />}>Running</Label>
160
+ </FlexItem>
161
+ </Flex>
162
+ </PageSection>
163
+ <PageSection type="tabs" isWidthLimited aria-label="Pod navigation tabs">
164
+ <Tabs activeKey={activeTabKey} onSelect={handleTabClick} usePageInsets id="open-tabs-example-tabs-list">
165
+ <Tab eventKey={0} title={<TabTitleText>Details</TabTitleText>} tabContentId={`tabContent${0}`} />
166
+ <Tab eventKey={1} title={<TabTitleText>YAML</TabTitleText>} tabContentId={`tabContent${1}`} />
167
+ <Tab eventKey={2} title={<TabTitleText>Environment</TabTitleText>} tabContentId={`tabContent${2}`} />
168
+ <Tab eventKey={3} title={<TabTitleText>Events</TabTitleText>} tabContentId={`tabContent${3}`} />
169
+ <Tab eventKey={4} title={<TabTitleText>Terminal</TabTitleText>} tabContentId={`tabContent${4}`} />
170
+ </Tabs>
171
+ </PageSection>
172
+ <PageSection isWidthLimited padding={{ default: 'noPadding' }} aria-label="Pod content">
173
+ <TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
174
+ <TabContentBody>
175
+ <Tabs
176
+ isSecondary
177
+ activeKey={activeTabKeySecondary}
178
+ onSelect={handleTabClickSecondary}
179
+ usePageInsets
180
+ id="open-with-secondary-tabs-example-tabs-list-secondary"
181
+ >
182
+ <Tab
183
+ eventKey={10}
184
+ title={<TabTitleText>Pod information</TabTitleText>}
185
+ tabContentId={`tabContent${10}`}
186
+ />
187
+ <Tab
188
+ eventKey={11}
189
+ title={<TabTitleText>Editable aspects</TabTitleText>}
190
+ tabContentId={`tabContent${11}`}
191
+ />
192
+ </Tabs>
193
+ <TabContent
194
+ key={10}
195
+ eventKey={10}
196
+ id={`tabContent${10}`}
197
+ activeKey={activeTabKeySecondary}
198
+ hidden={10 !== activeTabKeySecondary}
199
+ >
200
+ <TabContentBody hasPadding>{tabContent}</TabContentBody>
201
+ </TabContent>
202
+ <TabContent
203
+ key={11}
204
+ eventKey={11}
205
+ id={`tabContent${11}`}
206
+ activeKey={activeTabKeySecondary}
207
+ hidden={11 !== activeTabKeySecondary}
208
+ >
209
+ <TabContentBody>Editable aspects</TabContentBody>
210
+ </TabContent>
211
+ </TabContentBody>
212
+ </TabContent>
213
+ <TabContent key={1} eventKey={1} id={`tabContent${1}`} activeKey={activeTabKey} hidden={1 !== activeTabKey}>
214
+ <TabContentBody>YAML panel</TabContentBody>
215
+ </TabContent>
216
+ <TabContent key={2} eventKey={2} id={`tabContent${2}`} activeKey={activeTabKey} hidden={2 !== activeTabKey}>
217
+ <TabContentBody>Environment panel</TabContentBody>
218
+ </TabContent>
219
+ <TabContent key={3} eventKey={3} id={`tabContent${3}`} activeKey={activeTabKey} hidden={3 !== activeTabKey}>
220
+ <TabContentBody>Events panel</TabContentBody>
221
+ </TabContent>
222
+ <TabContent key={4} eventKey={4} id={`tabContent${4}`} activeKey={activeTabKey} hidden={4 !== activeTabKey}>
223
+ <TabContentBody>Terminal panel</TabContentBody>
224
+ </TabContent>
225
+ </PageSection>
226
+ </DashboardWrapper>
227
+ );
228
+ };
@@ -12,123 +12,32 @@ import './gallery.css';
12
12
 
13
13
  ### Basic
14
14
 
15
- ```js
16
- import { Gallery, GalleryItem } from '@patternfly/react-core';
17
-
18
- <Gallery>
19
- <GalleryItem>Gallery Item</GalleryItem>
20
- <GalleryItem>Gallery Item</GalleryItem>
21
- <GalleryItem>Gallery Item</GalleryItem>
22
- <GalleryItem>Gallery Item</GalleryItem>
23
- <GalleryItem>Gallery Item</GalleryItem>
24
- <GalleryItem>Gallery Item</GalleryItem>
25
- <GalleryItem>Gallery Item</GalleryItem>
26
- <GalleryItem>Gallery Item</GalleryItem>
27
- </Gallery>;
15
+ ```ts file="GalleryBasic.tsx"
16
+
28
17
  ```
29
18
 
30
19
  ### With gutters
31
20
 
32
- ```js
33
- import { Gallery, GalleryItem } from '@patternfly/react-core';
34
-
35
- <Gallery hasGutter>
36
- <GalleryItem>Gallery Item</GalleryItem>
37
- <GalleryItem>Gallery Item</GalleryItem>
38
- <GalleryItem>Gallery Item</GalleryItem>
39
- <GalleryItem>Gallery Item</GalleryItem>
40
- <GalleryItem>Gallery Item</GalleryItem>
41
- <GalleryItem>Gallery Item</GalleryItem>
42
- </Gallery>;
21
+ ```ts file="GalleryWithGutters.tsx"
43
22
  ```
44
23
 
45
24
  ### Adjusting min widths
46
25
 
47
- ```js
48
- import { Gallery, GalleryItem } from '@patternfly/react-core';
49
-
50
- <Gallery
51
- hasGutter
52
- minWidths={{
53
- md: '100px',
54
- lg: '150px',
55
- xl: '200px',
56
- '2xl': '300px'
57
- }}
58
- >
59
- <GalleryItem>Gallery Item</GalleryItem>
60
- <GalleryItem>Gallery Item</GalleryItem>
61
- <GalleryItem>Gallery Item</GalleryItem>
62
- <GalleryItem>Gallery Item</GalleryItem>
63
- <GalleryItem>Gallery Item</GalleryItem>
64
- <GalleryItem>Gallery Item</GalleryItem>
65
- <GalleryItem>Gallery Item</GalleryItem>
66
- <GalleryItem>Gallery Item</GalleryItem>
67
- </Gallery>;
26
+ ```ts file="GalleryAdjustingMinWidths.tsx"
27
+
68
28
  ```
69
29
 
70
30
  ### Adjusting max widths
71
31
 
72
- ```js
73
- import { Gallery, GalleryItem } from '@patternfly/react-core';
74
-
75
- <Gallery
76
- hasGutter
77
- maxWidths={{
78
- md: '280px',
79
- lg: '320px',
80
- '2xl': '400px'
81
- }}
82
- >
83
- <GalleryItem>Gallery Item</GalleryItem>
84
- <GalleryItem>Gallery Item</GalleryItem>
85
- <GalleryItem>Gallery Item</GalleryItem>
86
- <GalleryItem>Gallery Item</GalleryItem>
87
- <GalleryItem>Gallery Item</GalleryItem>
88
- <GalleryItem>Gallery Item</GalleryItem>
89
- <GalleryItem>Gallery Item</GalleryItem>
90
- <GalleryItem>Gallery Item</GalleryItem>
91
- </Gallery>;
32
+ ```ts file="GalleryAdjustingMaxWidths.tsx"
92
33
  ```
93
34
 
94
35
  ### Adjusting min and max widths
95
36
 
96
- ```js
97
- import { Gallery, GalleryItem } from '@patternfly/react-core';
98
-
99
- <Gallery
100
- hasGutter
101
- minWidths={{
102
- default: '100%',
103
- md: '100px',
104
- xl: '300px'
105
- }}
106
- maxWidths={{
107
- md: '200px',
108
- xl: '1fr'
109
- }}
110
- >
111
- <GalleryItem>Gallery Item</GalleryItem>
112
- <GalleryItem>Gallery Item</GalleryItem>
113
- <GalleryItem>Gallery Item</GalleryItem>
114
- <GalleryItem>Gallery Item</GalleryItem>
115
- <GalleryItem>Gallery Item</GalleryItem>
116
- <GalleryItem>Gallery Item</GalleryItem>
117
- <GalleryItem>Gallery Item</GalleryItem>
118
- <GalleryItem>Gallery Item</GalleryItem>
119
- </Gallery>;
37
+ ```ts file="GalleryAdjustingMinMaxWidths.tsx"
120
38
  ```
121
39
 
122
40
  ### Alternative components
123
41
 
124
- ```js
125
- import { Gallery, GalleryItem } from '@patternfly/react-core';
126
-
127
- <Gallery component="ul">
128
- <GalleryItem component="li">Gallery item</GalleryItem>
129
- <GalleryItem component="li">Gallery item</GalleryItem>
130
- <GalleryItem component="li">Gallery item</GalleryItem>
131
- <GalleryItem component="li">Gallery item</GalleryItem>
132
- <GalleryItem component="li">Gallery item</GalleryItem>
133
- </Gallery>;
42
+ ```ts file="GalleryAlternativeComponents.tsx"
134
43
  ```
@@ -0,0 +1,21 @@
1
+ import { Gallery, GalleryItem } from '@patternfly/react-core';
2
+
3
+ export const GalleryAdjustingMaxWidths: React.FunctionComponent = () => (
4
+ <Gallery
5
+ hasGutter
6
+ maxWidths={{
7
+ md: '280px',
8
+ lg: '320px',
9
+ '2xl': '400px'
10
+ }}
11
+ >
12
+ <GalleryItem>Gallery Item</GalleryItem>
13
+ <GalleryItem>Gallery Item</GalleryItem>
14
+ <GalleryItem>Gallery Item</GalleryItem>
15
+ <GalleryItem>Gallery Item</GalleryItem>
16
+ <GalleryItem>Gallery Item</GalleryItem>
17
+ <GalleryItem>Gallery Item</GalleryItem>
18
+ <GalleryItem>Gallery Item</GalleryItem>
19
+ <GalleryItem>Gallery Item</GalleryItem>
20
+ </Gallery>
21
+ );
@@ -0,0 +1,25 @@
1
+ import { Gallery, GalleryItem } from '@patternfly/react-core';
2
+
3
+ export const GalleryAdjustingMinMaxWidths: React.FunctionComponent = () => (
4
+ <Gallery
5
+ hasGutter
6
+ minWidths={{
7
+ default: '100%',
8
+ md: '100px',
9
+ xl: '300px'
10
+ }}
11
+ maxWidths={{
12
+ md: '200px',
13
+ xl: '1fr'
14
+ }}
15
+ >
16
+ <GalleryItem>Gallery Item</GalleryItem>
17
+ <GalleryItem>Gallery Item</GalleryItem>
18
+ <GalleryItem>Gallery Item</GalleryItem>
19
+ <GalleryItem>Gallery Item</GalleryItem>
20
+ <GalleryItem>Gallery Item</GalleryItem>
21
+ <GalleryItem>Gallery Item</GalleryItem>
22
+ <GalleryItem>Gallery Item</GalleryItem>
23
+ <GalleryItem>Gallery Item</GalleryItem>
24
+ </Gallery>
25
+ );
@@ -0,0 +1,22 @@
1
+ import { Gallery, GalleryItem } from '@patternfly/react-core';
2
+
3
+ export const GalleryAdjustingMinWidths: React.FunctionComponent = () => (
4
+ <Gallery
5
+ hasGutter
6
+ minWidths={{
7
+ md: '100px',
8
+ lg: '150px',
9
+ xl: '200px',
10
+ '2xl': '300px'
11
+ }}
12
+ >
13
+ <GalleryItem>Gallery Item</GalleryItem>
14
+ <GalleryItem>Gallery Item</GalleryItem>
15
+ <GalleryItem>Gallery Item</GalleryItem>
16
+ <GalleryItem>Gallery Item</GalleryItem>
17
+ <GalleryItem>Gallery Item</GalleryItem>
18
+ <GalleryItem>Gallery Item</GalleryItem>
19
+ <GalleryItem>Gallery Item</GalleryItem>
20
+ <GalleryItem>Gallery Item</GalleryItem>
21
+ </Gallery>
22
+ );
@@ -0,0 +1,11 @@
1
+ import { Gallery, GalleryItem } from '@patternfly/react-core';
2
+
3
+ export const GalleryAlternativeComponents: React.FunctionComponent = () => (
4
+ <Gallery component="ul">
5
+ <GalleryItem component="li">Gallery Item</GalleryItem>
6
+ <GalleryItem component="li">Gallery Item</GalleryItem>
7
+ <GalleryItem component="li">Gallery Item</GalleryItem>
8
+ <GalleryItem component="li">Gallery Item</GalleryItem>
9
+ <GalleryItem component="li">Gallery Item</GalleryItem>
10
+ </Gallery>
11
+ );
@@ -0,0 +1,14 @@
1
+ import { Gallery, GalleryItem } from '@patternfly/react-core';
2
+
3
+ export const GalleryBasic: React.FunctionComponent = () => (
4
+ <Gallery>
5
+ <GalleryItem>Gallery Item</GalleryItem>
6
+ <GalleryItem>Gallery Item</GalleryItem>
7
+ <GalleryItem>Gallery Item</GalleryItem>
8
+ <GalleryItem>Gallery Item</GalleryItem>
9
+ <GalleryItem>Gallery Item</GalleryItem>
10
+ <GalleryItem>Gallery Item</GalleryItem>
11
+ <GalleryItem>Gallery Item</GalleryItem>
12
+ <GalleryItem>Gallery Item</GalleryItem>
13
+ </Gallery>
14
+ );
@@ -0,0 +1,12 @@
1
+ import { Gallery, GalleryItem } from '@patternfly/react-core';
2
+
3
+ export const GalleryWithGutters: React.FunctionComponent = () => (
4
+ <Gallery hasGutter>
5
+ <GalleryItem>Gallery Item</GalleryItem>
6
+ <GalleryItem>Gallery Item</GalleryItem>
7
+ <GalleryItem>Gallery Item</GalleryItem>
8
+ <GalleryItem>Gallery Item</GalleryItem>
9
+ <GalleryItem>Gallery Item</GalleryItem>
10
+ <GalleryItem>Gallery Item</GalleryItem>
11
+ </Gallery>
12
+ );
@@ -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
+ );