@patternfly/react-core 6.5.0-prerelease.65 → 6.5.0-prerelease.66
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 +4 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Compass/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hero/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/SSRSafeIds/SSRSafeIds/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useSSRSafeId/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/dynamic-modules.json +2 -0
- package/dist/esm/components/Label/Label.d.ts +21 -1
- package/dist/esm/components/Label/Label.d.ts.map +1 -1
- package/dist/esm/components/Label/Label.js +37 -15
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts +6 -2
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroup.js +2 -1
- package/dist/esm/components/TextInputGroup/TextInputGroup.js.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js +15 -3
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js.map +1 -1
- package/dist/js/components/Label/Label.d.ts +21 -1
- package/dist/js/components/Label/Label.d.ts.map +1 -1
- package/dist/js/components/Label/Label.js +38 -16
- package/dist/js/components/Label/Label.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts +6 -2
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.js +2 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js +14 -2
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js.map +1 -1
- package/dist/umd/assets/{output-Cf2rQdn-.css → output-BzAdUnEh.css} +20768 -20768
- package/dist/umd/react-core.min.js +1 -1
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +2 -2
- package/src/components/Content/examples/Content.md +1 -1
- package/src/components/Label/Label.tsx +40 -18
- package/src/components/Label/__tests__/Label.test.tsx +6 -6
- package/src/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +36 -0
- package/src/components/Label/examples/LabelCompact.tsx +7 -7
- package/src/components/Label/examples/LabelCustomRender.tsx +2 -2
- package/src/components/Label/examples/LabelEditable.tsx +3 -3
- package/src/components/Label/examples/LabelFilled.tsx +122 -122
- package/src/components/Label/examples/LabelGroupBasic.tsx +3 -3
- package/src/components/Label/examples/LabelGroupCategory.tsx +3 -3
- package/src/components/Label/examples/LabelGroupCategoryRemovable.tsx +2 -2
- package/src/components/Label/examples/LabelGroupEditableAdd.tsx +2 -2
- package/src/components/Label/examples/LabelGroupEditableAddDropdown.tsx +2 -2
- package/src/components/Label/examples/LabelGroupEditableAddModal.tsx +2 -1
- package/src/components/Label/examples/LabelGroupEditableLabels.tsx +5 -5
- package/src/components/Label/examples/LabelGroupOverflow.tsx +6 -6
- package/src/components/Label/examples/LabelGroupVerticalCategoryOverflowRemovable.tsx +2 -2
- package/src/components/Label/examples/LabelOutline.tsx +204 -120
- package/src/components/TextInputGroup/TextInputGroup.tsx +8 -3
- package/src/components/TextInputGroup/TextInputGroupMain.tsx +15 -3
- package/src/components/TextInputGroup/__tests__/TextInputGroup.test.tsx +10 -0
- package/src/components/TextInputGroup/__tests__/TextInputGroupMain.test.tsx +10 -0
- package/src/demos/RTL/examples/PaginatedTable.tsx +5 -4
- package/src/demos/examples/Card/CardHorizontalGrid.tsx +9 -8
- package/src/demos/examples/Card/CardStatus.tsx +6 -5
- package/src/demos/examples/Tabs/TabsOpen.tsx +4 -3
- package/src/demos/examples/Tabs/TabsOpenWithSecondaryTabs.tsx +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
|
-
import { Label } from '@patternfly/react-core';
|
|
2
|
+
import { Label, LabelColor, LabelStatus } from '@patternfly/react-core';
|
|
3
3
|
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
|
|
4
4
|
|
|
5
5
|
export const LabelFilled: React.FunctionComponent = () => {
|
|
@@ -37,36 +37,36 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
37
37
|
</Label>
|
|
38
38
|
<br />
|
|
39
39
|
<br />
|
|
40
|
-
<Label color=
|
|
41
|
-
<Label color=
|
|
40
|
+
<Label color={LabelColor.blue}>Blue</Label>
|
|
41
|
+
<Label color={LabelColor.blue} icon={<CubeIcon />}>
|
|
42
42
|
Blue icon
|
|
43
43
|
</Label>
|
|
44
|
-
<Label color=
|
|
44
|
+
<Label color={LabelColor.blue} onClose={() => Function.prototype}>
|
|
45
45
|
Blue removable
|
|
46
46
|
</Label>
|
|
47
|
-
<Label color=
|
|
47
|
+
<Label color={LabelColor.blue} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
48
48
|
Blue icon removable
|
|
49
49
|
</Label>
|
|
50
|
-
<Label color=
|
|
50
|
+
<Label color={LabelColor.blue} href="#filled">
|
|
51
51
|
Blue link
|
|
52
52
|
</Label>
|
|
53
|
-
<Label color=
|
|
53
|
+
<Label color={LabelColor.blue} href="#filled" onClose={() => Function.prototype}>
|
|
54
54
|
Blue link removable
|
|
55
55
|
</Label>{' '}
|
|
56
|
-
<Label color=
|
|
56
|
+
<Label color={LabelColor.blue} onClick={() => logColor('blue')}>
|
|
57
57
|
Blue clickable
|
|
58
58
|
</Label>
|
|
59
|
-
<Label color=
|
|
59
|
+
<Label color={LabelColor.blue} onClick={() => logColor('blue')} onClose={() => Function.prototype}>
|
|
60
60
|
Blue clickable removable
|
|
61
61
|
</Label>{' '}
|
|
62
|
-
<Label color=
|
|
62
|
+
<Label color={LabelColor.blue} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
63
63
|
Blue label with icon that overflows
|
|
64
64
|
</Label>{' '}
|
|
65
|
-
<Label color=
|
|
65
|
+
<Label color={LabelColor.blue} isDisabled icon={<CubeIcon />} href="#filled" onClose={() => Function.prototype}>
|
|
66
66
|
Blue link removable (disabled)
|
|
67
67
|
</Label>{' '}
|
|
68
68
|
<Label
|
|
69
|
-
color=
|
|
69
|
+
color={LabelColor.blue}
|
|
70
70
|
isDisabled
|
|
71
71
|
icon={<CubeIcon />}
|
|
72
72
|
onClick={() => logColor('blue')}
|
|
@@ -76,36 +76,36 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
76
76
|
</Label>
|
|
77
77
|
<br />
|
|
78
78
|
<br />
|
|
79
|
-
<Label color=
|
|
80
|
-
<Label color=
|
|
79
|
+
<Label color={LabelColor.green}>Green</Label>
|
|
80
|
+
<Label color={LabelColor.green} icon={<CubeIcon />}>
|
|
81
81
|
Green icon
|
|
82
82
|
</Label>
|
|
83
|
-
<Label color=
|
|
83
|
+
<Label color={LabelColor.green} onClose={() => Function.prototype}>
|
|
84
84
|
Green removable
|
|
85
85
|
</Label>
|
|
86
|
-
<Label color=
|
|
86
|
+
<Label color={LabelColor.green} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
87
87
|
Green icon removable
|
|
88
88
|
</Label>
|
|
89
|
-
<Label color=
|
|
89
|
+
<Label color={LabelColor.green} href="#filled">
|
|
90
90
|
Green link
|
|
91
91
|
</Label>
|
|
92
|
-
<Label color=
|
|
92
|
+
<Label color={LabelColor.green} href="#filled" onClose={() => Function.prototype}>
|
|
93
93
|
Green link removable
|
|
94
94
|
</Label>{' '}
|
|
95
|
-
<Label color=
|
|
95
|
+
<Label color={LabelColor.green} onClick={() => logColor('green')}>
|
|
96
96
|
Green clickable
|
|
97
97
|
</Label>
|
|
98
|
-
<Label color=
|
|
98
|
+
<Label color={LabelColor.green} onClick={() => logColor('green')} onClose={() => Function.prototype}>
|
|
99
99
|
Green clickable removable
|
|
100
100
|
</Label>{' '}
|
|
101
|
-
<Label color=
|
|
101
|
+
<Label color={LabelColor.green} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
102
102
|
Green label with icon that overflows
|
|
103
103
|
</Label>{' '}
|
|
104
|
-
<Label color=
|
|
104
|
+
<Label color={LabelColor.green} isDisabled icon={<CubeIcon />} href="#filled" onClose={() => Function.prototype}>
|
|
105
105
|
Green link removable (disabled)
|
|
106
106
|
</Label>{' '}
|
|
107
107
|
<Label
|
|
108
|
-
color=
|
|
108
|
+
color={LabelColor.green}
|
|
109
109
|
isDisabled
|
|
110
110
|
icon={<CubeIcon />}
|
|
111
111
|
onClick={() => logColor('green')}
|
|
@@ -115,36 +115,36 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
115
115
|
</Label>
|
|
116
116
|
<br />
|
|
117
117
|
<br />
|
|
118
|
-
<Label color=
|
|
119
|
-
<Label color=
|
|
118
|
+
<Label color={LabelColor.orange}>Orange</Label>
|
|
119
|
+
<Label color={LabelColor.orange} icon={<CubeIcon />}>
|
|
120
120
|
Orange icon
|
|
121
121
|
</Label>
|
|
122
|
-
<Label color=
|
|
122
|
+
<Label color={LabelColor.orange} onClose={() => Function.prototype}>
|
|
123
123
|
Orange removable
|
|
124
124
|
</Label>
|
|
125
|
-
<Label color=
|
|
125
|
+
<Label color={LabelColor.orange} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
126
126
|
Orange icon removable
|
|
127
127
|
</Label>
|
|
128
|
-
<Label color=
|
|
128
|
+
<Label color={LabelColor.orange} href="#filled">
|
|
129
129
|
Orange link
|
|
130
130
|
</Label>
|
|
131
|
-
<Label color=
|
|
131
|
+
<Label color={LabelColor.orange} href="#filled" onClose={() => Function.prototype}>
|
|
132
132
|
Orange link removable
|
|
133
133
|
</Label>{' '}
|
|
134
|
-
<Label color=
|
|
134
|
+
<Label color={LabelColor.orange} onClick={() => logColor('orange')}>
|
|
135
135
|
Orange clickable
|
|
136
136
|
</Label>
|
|
137
|
-
<Label color=
|
|
137
|
+
<Label color={LabelColor.orange} onClick={() => logColor('orange')} onClose={() => Function.prototype}>
|
|
138
138
|
Orange clickable removable
|
|
139
139
|
</Label>{' '}
|
|
140
|
-
<Label color=
|
|
140
|
+
<Label color={LabelColor.orange} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
141
141
|
Orange label with icon that overflows
|
|
142
142
|
</Label>{' '}
|
|
143
|
-
<Label color=
|
|
143
|
+
<Label color={LabelColor.orange} isDisabled icon={<CubeIcon />} href="#filled" onClose={() => Function.prototype}>
|
|
144
144
|
Orange link removable (disabled)
|
|
145
145
|
</Label>{' '}
|
|
146
146
|
<Label
|
|
147
|
-
color=
|
|
147
|
+
color={LabelColor.orange}
|
|
148
148
|
isDisabled
|
|
149
149
|
icon={<CubeIcon />}
|
|
150
150
|
onClick={() => logColor('orange')}
|
|
@@ -154,36 +154,36 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
154
154
|
</Label>
|
|
155
155
|
<br />
|
|
156
156
|
<br />
|
|
157
|
-
<Label color=
|
|
158
|
-
<Label color=
|
|
157
|
+
<Label color={LabelColor.red}>Red</Label>
|
|
158
|
+
<Label color={LabelColor.red} icon={<CubeIcon />}>
|
|
159
159
|
Red icon
|
|
160
160
|
</Label>
|
|
161
|
-
<Label color=
|
|
161
|
+
<Label color={LabelColor.red} onClose={() => Function.prototype}>
|
|
162
162
|
Red removable
|
|
163
163
|
</Label>
|
|
164
|
-
<Label color=
|
|
164
|
+
<Label color={LabelColor.red} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
165
165
|
Red icon removable
|
|
166
166
|
</Label>
|
|
167
|
-
<Label color=
|
|
167
|
+
<Label color={LabelColor.red} href="#filled">
|
|
168
168
|
Red link
|
|
169
169
|
</Label>
|
|
170
|
-
<Label color=
|
|
170
|
+
<Label color={LabelColor.red} href="#filled" onClose={() => Function.prototype}>
|
|
171
171
|
Red link removable
|
|
172
172
|
</Label>{' '}
|
|
173
|
-
<Label color=
|
|
173
|
+
<Label color={LabelColor.red} onClick={() => logColor('red')}>
|
|
174
174
|
Red clickable
|
|
175
175
|
</Label>
|
|
176
|
-
<Label color=
|
|
176
|
+
<Label color={LabelColor.red} onClick={() => logColor('red')} onClose={() => Function.prototype}>
|
|
177
177
|
Red clickable removable
|
|
178
178
|
</Label>{' '}
|
|
179
|
-
<Label color=
|
|
179
|
+
<Label color={LabelColor.red} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
180
180
|
Red label with icon that overflows
|
|
181
181
|
</Label>{' '}
|
|
182
|
-
<Label color=
|
|
182
|
+
<Label color={LabelColor.red} isDisabled icon={<CubeIcon />} href="#filled" onClose={() => Function.prototype}>
|
|
183
183
|
Red link removable (disabled)
|
|
184
184
|
</Label>{' '}
|
|
185
185
|
<Label
|
|
186
|
-
color=
|
|
186
|
+
color={LabelColor.red}
|
|
187
187
|
isDisabled
|
|
188
188
|
icon={<CubeIcon />}
|
|
189
189
|
onClick={() => logColor('red')}
|
|
@@ -193,63 +193,63 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
193
193
|
</Label>
|
|
194
194
|
<br />
|
|
195
195
|
<br />
|
|
196
|
-
<Label color=
|
|
197
|
-
<Label color=
|
|
196
|
+
<Label color={LabelColor.orangered}>Orange red</Label>
|
|
197
|
+
<Label color={LabelColor.orangered} icon={<CubeIcon />}>
|
|
198
198
|
Orange red icon
|
|
199
199
|
</Label>
|
|
200
|
-
<Label color=
|
|
200
|
+
<Label color={LabelColor.orangered} onClose={() => Function.prototype}>
|
|
201
201
|
Orange red removable
|
|
202
202
|
</Label>
|
|
203
|
-
<Label color=
|
|
203
|
+
<Label color={LabelColor.orangered} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
204
204
|
Orange red icon removable
|
|
205
205
|
</Label>
|
|
206
|
-
<Label color=
|
|
206
|
+
<Label color={LabelColor.orangered} href="#filled">
|
|
207
207
|
Orange red link
|
|
208
208
|
</Label>
|
|
209
|
-
<Label color=
|
|
209
|
+
<Label color={LabelColor.orangered} href="#filled" onClose={() => Function.prototype}>
|
|
210
210
|
Orange red link removable
|
|
211
211
|
</Label>
|
|
212
|
-
<Label color=
|
|
212
|
+
<Label color={LabelColor.orangered} onClick={() => logColor('orangered')}>
|
|
213
213
|
Orange red clickable
|
|
214
214
|
</Label>
|
|
215
|
-
<Label color=
|
|
215
|
+
<Label color={LabelColor.orangered} onClick={() => logColor('orangered')} onClose={() => Function.prototype}>
|
|
216
216
|
Orange red clickable removable
|
|
217
217
|
</Label>
|
|
218
|
-
<Label color=
|
|
218
|
+
<Label color={LabelColor.orangered} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
219
219
|
Orange red label with icon that overflows
|
|
220
220
|
</Label>
|
|
221
221
|
<br />
|
|
222
222
|
<br />
|
|
223
|
-
<Label color=
|
|
224
|
-
<Label color=
|
|
223
|
+
<Label color={LabelColor.purple}>Purple</Label>
|
|
224
|
+
<Label color={LabelColor.purple} icon={<CubeIcon />}>
|
|
225
225
|
Purple icon
|
|
226
226
|
</Label>
|
|
227
|
-
<Label color=
|
|
227
|
+
<Label color={LabelColor.purple} onClose={() => Function.prototype}>
|
|
228
228
|
Purple removable
|
|
229
229
|
</Label>
|
|
230
|
-
<Label color=
|
|
230
|
+
<Label color={LabelColor.purple} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
231
231
|
Purple icon removable
|
|
232
232
|
</Label>
|
|
233
|
-
<Label color=
|
|
233
|
+
<Label color={LabelColor.purple} href="#filled">
|
|
234
234
|
Purple link
|
|
235
235
|
</Label>
|
|
236
|
-
<Label color=
|
|
236
|
+
<Label color={LabelColor.purple} href="#filled" onClose={() => Function.prototype}>
|
|
237
237
|
Purple link removable
|
|
238
238
|
</Label>{' '}
|
|
239
|
-
<Label color=
|
|
239
|
+
<Label color={LabelColor.purple} onClick={() => logColor('purple')}>
|
|
240
240
|
Purple clickable
|
|
241
241
|
</Label>
|
|
242
|
-
<Label color=
|
|
242
|
+
<Label color={LabelColor.purple} onClick={() => logColor('purple')} onClose={() => Function.prototype}>
|
|
243
243
|
Purple clickable removable
|
|
244
244
|
</Label>{' '}
|
|
245
|
-
<Label color=
|
|
245
|
+
<Label color={LabelColor.purple} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
246
246
|
Purple label with icon that overflows
|
|
247
247
|
</Label>{' '}
|
|
248
|
-
<Label color=
|
|
248
|
+
<Label color={LabelColor.purple} isDisabled icon={<CubeIcon />} href="#filled" onClose={() => Function.prototype}>
|
|
249
249
|
Purple link removable (disabled)
|
|
250
250
|
</Label>{' '}
|
|
251
251
|
<Label
|
|
252
|
-
color=
|
|
252
|
+
color={LabelColor.purple}
|
|
253
253
|
isDisabled
|
|
254
254
|
icon={<CubeIcon />}
|
|
255
255
|
onClick={() => logColor('purple')}
|
|
@@ -259,36 +259,36 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
259
259
|
</Label>
|
|
260
260
|
<br />
|
|
261
261
|
<br />
|
|
262
|
-
<Label color=
|
|
263
|
-
<Label color=
|
|
262
|
+
<Label color={LabelColor.teal}>Teal</Label>
|
|
263
|
+
<Label color={LabelColor.teal} icon={<CubeIcon />}>
|
|
264
264
|
Teal icon
|
|
265
265
|
</Label>
|
|
266
|
-
<Label color=
|
|
266
|
+
<Label color={LabelColor.teal} onClose={() => Function.prototype}>
|
|
267
267
|
Teal removable
|
|
268
268
|
</Label>
|
|
269
|
-
<Label color=
|
|
269
|
+
<Label color={LabelColor.teal} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
270
270
|
Teal icon removable
|
|
271
271
|
</Label>
|
|
272
|
-
<Label color=
|
|
272
|
+
<Label color={LabelColor.teal} href="#filled">
|
|
273
273
|
Teal link
|
|
274
274
|
</Label>
|
|
275
|
-
<Label color=
|
|
275
|
+
<Label color={LabelColor.teal} href="#filled" onClose={() => Function.prototype}>
|
|
276
276
|
Teal link removable
|
|
277
277
|
</Label>{' '}
|
|
278
|
-
<Label color=
|
|
278
|
+
<Label color={LabelColor.teal} onClick={() => logColor('teal')}>
|
|
279
279
|
Teal clickable
|
|
280
280
|
</Label>
|
|
281
|
-
<Label color=
|
|
281
|
+
<Label color={LabelColor.teal} onClick={() => logColor('teal')} onClose={() => Function.prototype}>
|
|
282
282
|
Teal clickable removable
|
|
283
283
|
</Label>{' '}
|
|
284
|
-
<Label color=
|
|
284
|
+
<Label color={LabelColor.teal} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
285
285
|
Teal label with icon that overflows
|
|
286
286
|
</Label>{' '}
|
|
287
|
-
<Label color=
|
|
287
|
+
<Label color={LabelColor.teal} isDisabled icon={<CubeIcon />} href="#filled" onClose={() => Function.prototype}>
|
|
288
288
|
Teal link removable (disabled)
|
|
289
289
|
</Label>{' '}
|
|
290
290
|
<Label
|
|
291
|
-
color=
|
|
291
|
+
color={LabelColor.teal}
|
|
292
292
|
isDisabled
|
|
293
293
|
icon={<CubeIcon />}
|
|
294
294
|
onClick={() => logColor('teal')}
|
|
@@ -298,36 +298,36 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
298
298
|
</Label>
|
|
299
299
|
<br />
|
|
300
300
|
<br />
|
|
301
|
-
<Label color=
|
|
302
|
-
<Label color=
|
|
301
|
+
<Label color={LabelColor.yellow}>Yellow</Label>
|
|
302
|
+
<Label color={LabelColor.yellow} icon={<CubeIcon />}>
|
|
303
303
|
Yellow icon
|
|
304
304
|
</Label>
|
|
305
|
-
<Label color=
|
|
305
|
+
<Label color={LabelColor.yellow} onClose={() => Function.prototype}>
|
|
306
306
|
Yellow removable
|
|
307
307
|
</Label>
|
|
308
|
-
<Label color=
|
|
308
|
+
<Label color={LabelColor.yellow} icon={<CubeIcon />} onClose={() => Function.prototype}>
|
|
309
309
|
Yellow icon removable
|
|
310
310
|
</Label>
|
|
311
|
-
<Label color=
|
|
311
|
+
<Label color={LabelColor.yellow} href="#filled">
|
|
312
312
|
Yellow link
|
|
313
313
|
</Label>
|
|
314
|
-
<Label color=
|
|
314
|
+
<Label color={LabelColor.yellow} href="#filled" onClose={() => Function.prototype}>
|
|
315
315
|
Yellow link removable
|
|
316
316
|
</Label>{' '}
|
|
317
|
-
<Label color=
|
|
317
|
+
<Label color={LabelColor.yellow} onClick={() => logColor('yellow')}>
|
|
318
318
|
Yellow clickable
|
|
319
319
|
</Label>
|
|
320
|
-
<Label color=
|
|
320
|
+
<Label color={LabelColor.yellow} onClick={() => logColor('yellow')} onClose={() => Function.prototype}>
|
|
321
321
|
Yellow clickable removable
|
|
322
322
|
</Label>{' '}
|
|
323
|
-
<Label color=
|
|
323
|
+
<Label color={LabelColor.yellow} icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
324
324
|
Yellow label with icon that overflows
|
|
325
325
|
</Label>{' '}
|
|
326
|
-
<Label color=
|
|
326
|
+
<Label color={LabelColor.yellow} isDisabled icon={<CubeIcon />} href="#filled" onClose={() => Function.prototype}>
|
|
327
327
|
Yellow link removable (disabled)
|
|
328
328
|
</Label>{' '}
|
|
329
329
|
<Label
|
|
330
|
-
color=
|
|
330
|
+
color={LabelColor.yellow}
|
|
331
331
|
isDisabled
|
|
332
332
|
icon={<CubeIcon />}
|
|
333
333
|
onClick={() => logColor('yellow')}
|
|
@@ -344,107 +344,107 @@ export const LabelFilled: React.FunctionComponent = () => {
|
|
|
344
344
|
<strong>Status:</strong>
|
|
345
345
|
<br />
|
|
346
346
|
<br />
|
|
347
|
-
<Label status=
|
|
348
|
-
<Label status=
|
|
347
|
+
<Label status={LabelStatus.success}>Success</Label>
|
|
348
|
+
<Label status={LabelStatus.success} onClose={() => Function.prototype}>
|
|
349
349
|
Success removable
|
|
350
350
|
</Label>
|
|
351
|
-
<Label status=
|
|
351
|
+
<Label status={LabelStatus.success} href="#filled">
|
|
352
352
|
Success link
|
|
353
353
|
</Label>
|
|
354
|
-
<Label status=
|
|
354
|
+
<Label status={LabelStatus.success} href="#filled" onClose={() => Function.prototype}>
|
|
355
355
|
Success link removable
|
|
356
356
|
</Label>
|
|
357
|
-
<Label status=
|
|
357
|
+
<Label status={LabelStatus.success} onClick={() => logColor('success')}>
|
|
358
358
|
Success clickable
|
|
359
359
|
</Label>
|
|
360
|
-
<Label status=
|
|
360
|
+
<Label status={LabelStatus.success} onClick={() => logColor('success')} onClose={() => Function.prototype}>
|
|
361
361
|
Success clickable removable
|
|
362
362
|
</Label>
|
|
363
|
-
<Label status=
|
|
363
|
+
<Label status={LabelStatus.success} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
364
364
|
Success label with text that overflows
|
|
365
365
|
</Label>
|
|
366
366
|
<br />
|
|
367
367
|
<br />
|
|
368
|
-
<Label status=
|
|
369
|
-
<Label status=
|
|
368
|
+
<Label status={LabelStatus.warning}>Warning</Label>
|
|
369
|
+
<Label status={LabelStatus.warning} onClose={() => Function.prototype}>
|
|
370
370
|
Warning removable
|
|
371
371
|
</Label>
|
|
372
|
-
<Label status=
|
|
372
|
+
<Label status={LabelStatus.warning} href="#filled">
|
|
373
373
|
Warning link
|
|
374
374
|
</Label>
|
|
375
|
-
<Label status=
|
|
375
|
+
<Label status={LabelStatus.warning} href="#filled" onClose={() => Function.prototype}>
|
|
376
376
|
Warning link removable
|
|
377
377
|
</Label>
|
|
378
|
-
<Label status=
|
|
378
|
+
<Label status={LabelStatus.warning} onClick={() => logColor('warning')}>
|
|
379
379
|
Warning clickable
|
|
380
380
|
</Label>
|
|
381
|
-
<Label status=
|
|
381
|
+
<Label status={LabelStatus.warning} onClick={() => logColor('warning')} onClose={() => Function.prototype}>
|
|
382
382
|
Warning clickable removable
|
|
383
383
|
</Label>
|
|
384
|
-
<Label status=
|
|
384
|
+
<Label status={LabelStatus.warning} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
385
385
|
Warning label with text that overflows
|
|
386
386
|
</Label>
|
|
387
387
|
<br />
|
|
388
388
|
<br />
|
|
389
|
-
<Label status=
|
|
390
|
-
<Label status=
|
|
389
|
+
<Label status={LabelStatus.danger}>Danger</Label>
|
|
390
|
+
<Label status={LabelStatus.danger} onClose={() => Function.prototype}>
|
|
391
391
|
Danger removable
|
|
392
392
|
</Label>
|
|
393
|
-
<Label status=
|
|
393
|
+
<Label status={LabelStatus.danger} href="#filled">
|
|
394
394
|
Danger link
|
|
395
395
|
</Label>
|
|
396
|
-
<Label status=
|
|
396
|
+
<Label status={LabelStatus.danger} href="#filled" onClose={() => Function.prototype}>
|
|
397
397
|
Danger link removable
|
|
398
398
|
</Label>
|
|
399
|
-
<Label status=
|
|
399
|
+
<Label status={LabelStatus.danger} onClick={() => logColor('danger')}>
|
|
400
400
|
Danger clickable
|
|
401
401
|
</Label>
|
|
402
|
-
<Label status=
|
|
402
|
+
<Label status={LabelStatus.danger} onClick={() => logColor('danger')} onClose={() => Function.prototype}>
|
|
403
403
|
Danger clickable removable
|
|
404
404
|
</Label>
|
|
405
|
-
<Label status=
|
|
405
|
+
<Label status={LabelStatus.danger} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
406
406
|
Danger label with text that overflows
|
|
407
407
|
</Label>
|
|
408
408
|
<br />
|
|
409
409
|
<br />
|
|
410
|
-
<Label status=
|
|
411
|
-
<Label status=
|
|
410
|
+
<Label status={LabelStatus.info}>Info</Label>
|
|
411
|
+
<Label status={LabelStatus.info} onClose={() => Function.prototype}>
|
|
412
412
|
Info removable
|
|
413
413
|
</Label>
|
|
414
|
-
<Label status=
|
|
414
|
+
<Label status={LabelStatus.info} href="#filled">
|
|
415
415
|
Info link
|
|
416
416
|
</Label>
|
|
417
|
-
<Label status=
|
|
417
|
+
<Label status={LabelStatus.info} href="#filled" onClose={() => Function.prototype}>
|
|
418
418
|
Info link removable
|
|
419
419
|
</Label>
|
|
420
|
-
<Label status=
|
|
420
|
+
<Label status={LabelStatus.info} onClick={() => logColor('info')}>
|
|
421
421
|
Info clickable
|
|
422
422
|
</Label>
|
|
423
|
-
<Label status=
|
|
423
|
+
<Label status={LabelStatus.info} onClick={() => logColor('info')} onClose={() => Function.prototype}>
|
|
424
424
|
Info clickable removable
|
|
425
425
|
</Label>
|
|
426
|
-
<Label status=
|
|
426
|
+
<Label status={LabelStatus.info} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
427
427
|
Info label with text that overflows
|
|
428
428
|
</Label>
|
|
429
429
|
<br />
|
|
430
430
|
<br />
|
|
431
|
-
<Label status=
|
|
432
|
-
<Label status=
|
|
431
|
+
<Label status={LabelStatus.custom}>Custom</Label>
|
|
432
|
+
<Label status={LabelStatus.custom} onClose={() => Function.prototype}>
|
|
433
433
|
Custom removable
|
|
434
434
|
</Label>
|
|
435
|
-
<Label status=
|
|
435
|
+
<Label status={LabelStatus.custom} href="#filled">
|
|
436
436
|
Custom link
|
|
437
437
|
</Label>
|
|
438
|
-
<Label status=
|
|
438
|
+
<Label status={LabelStatus.custom} href="#filled" onClose={() => Function.prototype}>
|
|
439
439
|
Custom link removable
|
|
440
440
|
</Label>
|
|
441
|
-
<Label status=
|
|
441
|
+
<Label status={LabelStatus.custom} onClick={() => logColor('custom')}>
|
|
442
442
|
Custom clickable
|
|
443
443
|
</Label>
|
|
444
|
-
<Label status=
|
|
444
|
+
<Label status={LabelStatus.custom} onClick={() => logColor('custom')} onClose={() => Function.prototype}>
|
|
445
445
|
Custom clickable removable
|
|
446
446
|
</Label>
|
|
447
|
-
<Label status=
|
|
447
|
+
<Label status={LabelStatus.custom} onClose={() => Function.prototype} textMaxWidth="16ch">
|
|
448
448
|
Custom label with text that overflows
|
|
449
449
|
</Label>
|
|
450
450
|
</Fragment>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Label, LabelGroup } from '@patternfly/react-core';
|
|
1
|
+
import { Label, LabelColor, LabelGroup } from '@patternfly/react-core';
|
|
2
2
|
import RhUiInformationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-information-fill-icon';
|
|
3
3
|
|
|
4
4
|
export const LabelGroupBasic: React.FunctionComponent = () => (
|
|
5
5
|
<LabelGroup>
|
|
6
6
|
<Label icon={<RhUiInformationFillIcon />}>Label 1</Label>
|
|
7
|
-
<Label icon={<RhUiInformationFillIcon />} color=
|
|
7
|
+
<Label icon={<RhUiInformationFillIcon />} color={LabelColor.blue}>
|
|
8
8
|
Label 2
|
|
9
9
|
</Label>
|
|
10
|
-
<Label icon={<RhUiInformationFillIcon />} color=
|
|
10
|
+
<Label icon={<RhUiInformationFillIcon />} color={LabelColor.green}>
|
|
11
11
|
Label 3
|
|
12
12
|
</Label>
|
|
13
13
|
</LabelGroup>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Label, LabelGroup } from '@patternfly/react-core';
|
|
1
|
+
import { Label, LabelColor, LabelGroup } from '@patternfly/react-core';
|
|
2
2
|
import RhUiInformationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-information-fill-icon';
|
|
3
3
|
|
|
4
4
|
export const LabelGroupCategory: React.FunctionComponent = () => (
|
|
5
5
|
<LabelGroup categoryName="Group label">
|
|
6
6
|
<Label icon={<RhUiInformationFillIcon />}>Label 1</Label>
|
|
7
|
-
<Label icon={<RhUiInformationFillIcon />} color=
|
|
7
|
+
<Label icon={<RhUiInformationFillIcon />} color={LabelColor.blue}>
|
|
8
8
|
Label 2
|
|
9
9
|
</Label>
|
|
10
|
-
<Label icon={<RhUiInformationFillIcon />} color=
|
|
10
|
+
<Label icon={<RhUiInformationFillIcon />} color={LabelColor.green}>
|
|
11
11
|
Label 3
|
|
12
12
|
</Label>
|
|
13
13
|
</LabelGroup>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import { Label,
|
|
2
|
+
import { Label, LabelColor, LabelGroup } from '@patternfly/react-core';
|
|
3
3
|
import RhUiInformationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-information-fill-icon';
|
|
4
4
|
|
|
5
5
|
export const LabelGroupCategoryRemovable: React.FunctionComponent = () => {
|
|
@@ -15,7 +15,7 @@ export const LabelGroupCategoryRemovable: React.FunctionComponent = () => {
|
|
|
15
15
|
return (
|
|
16
16
|
<LabelGroup categoryName="Group label" isClosable onClick={deleteCategory}>
|
|
17
17
|
{labels.map(([labelText, labelColor]) => (
|
|
18
|
-
<Label icon={<RhUiInformationFillIcon />} color={labelColor as
|
|
18
|
+
<Label icon={<RhUiInformationFillIcon />} color={labelColor as LabelColor} key={labelText}>
|
|
19
19
|
{labelText}
|
|
20
20
|
</Label>
|
|
21
21
|
))}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import { LabelGroup, Label } from '@patternfly/react-core';
|
|
2
|
+
import { LabelGroup, Label, LabelColor } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
4
|
export const LabelGroupEditableAdd: React.FunctionComponent = () => {
|
|
5
5
|
const [idIndex, setIdIndex] = useState<number>(3);
|
|
@@ -65,7 +65,7 @@ export const LabelGroupEditableAdd: React.FunctionComponent = () => {
|
|
|
65
65
|
<Label
|
|
66
66
|
key={label.id}
|
|
67
67
|
id={label.id}
|
|
68
|
-
color=
|
|
68
|
+
color={LabelColor.blue}
|
|
69
69
|
onClose={() => onClose(label.id)}
|
|
70
70
|
onEditCancel={(_event, prevText) => onEdit(prevText, index)}
|
|
71
71
|
onEditComplete={(_event, newText) => onEdit(newText, index)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { LabelGroup, Label, Menu, MenuContent, MenuList, MenuItem, Popper } from '@patternfly/react-core';
|
|
2
|
+
import { LabelGroup, Label, LabelColor, Menu, MenuContent, MenuList, MenuItem, Popper } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
4
|
export const LabelGroupEditableAddDropdown: React.FunctionComponent = () => {
|
|
5
5
|
const toggleRef = useRef<HTMLDivElement>(undefined);
|
|
@@ -122,7 +122,7 @@ export const LabelGroupEditableAddDropdown: React.FunctionComponent = () => {
|
|
|
122
122
|
<Label
|
|
123
123
|
key={label.id}
|
|
124
124
|
id={label.id}
|
|
125
|
-
color=
|
|
125
|
+
color={LabelColor.blue}
|
|
126
126
|
onClose={() => onClose(label.id)}
|
|
127
127
|
onEditCancel={(_event, prevText) => onEdit(prevText, index)}
|
|
128
128
|
onEditComplete={(_event, newText) => onEdit(newText, index)}
|
|
@@ -2,6 +2,7 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
LabelGroup,
|
|
4
4
|
Label,
|
|
5
|
+
LabelColor,
|
|
5
6
|
Button,
|
|
6
7
|
Form,
|
|
7
8
|
FormGroup,
|
|
@@ -244,7 +245,7 @@ export const LabelGroupEditableAddModal: React.FunctionComponent = () => {
|
|
|
244
245
|
<Label
|
|
245
246
|
key={label.id}
|
|
246
247
|
id={label.id}
|
|
247
|
-
color=
|
|
248
|
+
color={LabelColor.blue}
|
|
248
249
|
onClose={() => onClose(label.id)}
|
|
249
250
|
onEditCancel={(_event, prevText) => onEdit(prevText, index)}
|
|
250
251
|
onEditComplete={(_event, newText) => onEdit(newText, index)}
|