@patternfly/react-core 5.3.0-prerelease.21 → 5.3.0-prerelease.22
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 +6 -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/Chip/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/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/DragDrop/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/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/Text/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/Tile/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/ApplicationLauncher/package.json +1 -1
- package/dist/dynamic/deprecated/components/ContextSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Dropdown/package.json +1 -1
- package/dist/dynamic/deprecated/components/OptionsMenu/package.json +1 -1
- package/dist/dynamic/deprecated/components/PageHeader/package.json +1 -1
- package/dist/dynamic/deprecated/components/Select/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/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/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/favorites/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/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/next/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/next/components/Modal/package.json +1 -1
- package/dist/dynamic/next/components/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/esm/components/Label/Label.d.ts +2 -0
- package/dist/esm/components/Label/Label.d.ts.map +1 -1
- package/dist/esm/components/Label/Label.js +9 -8
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/js/components/Label/Label.d.ts +2 -0
- package/dist/js/components/Label/Label.d.ts.map +1 -1
- package/dist/js/components/Label/Label.js +9 -8
- package/dist/js/components/Label/Label.js.map +1 -1
- 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/Label/Label.tsx +16 -5
- package/src/components/Label/examples/LabelCompact.tsx +19 -1
- package/src/components/Label/examples/LabelFilled.tsx +106 -16
- package/src/components/Label/examples/LabelOutline.tsx +168 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-wizard-deprecated-dynamic","main":"../../../../js/deprecated/components/Wizard/index.js","module":"../../../../esm/deprecated/components/Wizard/index.js","typings":"../../../../esm/deprecated/components/Wizard/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-wizard-deprecated-dynamic","main":"../../../../js/deprecated/components/Wizard/index.js","module":"../../../../esm/deprecated/components/Wizard/index.js","typings":"../../../../esm/deprecated/components/Wizard/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-components-deprecated-dynamic","main":"../../../js/deprecated/components/index.js","module":"../../../esm/deprecated/components/index.js","typings":"../../../esm/deprecated/components/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-components-deprecated-dynamic","main":"../../../js/deprecated/components/index.js","module":"../../../esm/deprecated/components/index.js","typings":"../../../esm/deprecated/components/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-focustrap.js-dynamic","main":"../../../../js/helpers/FocusTrap/FocusTrap.js","module":"../../../../esm/helpers/FocusTrap/FocusTrap.js","typings":"../../../../esm/helpers/FocusTrap/FocusTrap.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-focustrap.js-dynamic","main":"../../../../js/helpers/FocusTrap/FocusTrap.js","module":"../../../../esm/helpers/FocusTrap/FocusTrap.js","typings":"../../../../esm/helpers/FocusTrap/FocusTrap.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-generateid.js-dynamic","main":"../../../../js/helpers/GenerateId/GenerateId.js","module":"../../../../esm/helpers/GenerateId/GenerateId.js","typings":"../../../../esm/helpers/GenerateId/GenerateId.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-generateid.js-dynamic","main":"../../../../js/helpers/GenerateId/GenerateId.js","module":"../../../../esm/helpers/GenerateId/GenerateId.js","typings":"../../../../esm/helpers/GenerateId/GenerateId.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-keyboardhandler.js-dynamic","main":"../../../js/helpers/KeyboardHandler.js","module":"../../../esm/helpers/KeyboardHandler.js","typings":"../../../esm/helpers/KeyboardHandler.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-keyboardhandler.js-dynamic","main":"../../../js/helpers/KeyboardHandler.js","module":"../../../esm/helpers/KeyboardHandler.js","typings":"../../../esm/helpers/KeyboardHandler.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-ouia.js-dynamic","main":"../../../../js/helpers/OUIA/ouia.js","module":"../../../../esm/helpers/OUIA/ouia.js","typings":"../../../../esm/helpers/OUIA/ouia.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-ouia.js-dynamic","main":"../../../../js/helpers/OUIA/ouia.js","module":"../../../../esm/helpers/OUIA/ouia.js","typings":"../../../../esm/helpers/OUIA/ouia.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-popper.js-dynamic","main":"../../../../js/helpers/Popper/Popper.js","module":"../../../../esm/helpers/Popper/Popper.js","typings":"../../../../esm/helpers/Popper/Popper.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-popper.js-dynamic","main":"../../../../js/helpers/Popper/Popper.js","module":"../../../../esm/helpers/Popper/Popper.js","typings":"../../../../esm/helpers/Popper/Popper.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-constants.js-dynamic","main":"../../../js/helpers/constants.js","module":"../../../esm/helpers/constants.js","typings":"../../../esm/helpers/constants.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-constants.js-dynamic","main":"../../../js/helpers/constants.js","module":"../../../esm/helpers/constants.js","typings":"../../../esm/helpers/constants.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-datetimeutils.js-dynamic","main":"../../../js/helpers/datetimeUtils.js","module":"../../../esm/helpers/datetimeUtils.js","typings":"../../../esm/helpers/datetimeUtils.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-datetimeutils.js-dynamic","main":"../../../js/helpers/datetimeUtils.js","module":"../../../esm/helpers/datetimeUtils.js","typings":"../../../esm/helpers/datetimeUtils.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-favorites.js-dynamic","main":"../../../js/helpers/favorites.js","module":"../../../esm/helpers/favorites.js","typings":"../../../esm/helpers/favorites.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-favorites.js-dynamic","main":"../../../js/helpers/favorites.js","module":"../../../esm/helpers/favorites.js","typings":"../../../esm/helpers/favorites.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-fileutils.js-dynamic","main":"../../../js/helpers/fileUtils.js","module":"../../../esm/helpers/fileUtils.js","typings":"../../../esm/helpers/fileUtils.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-fileutils.js-dynamic","main":"../../../js/helpers/fileUtils.js","module":"../../../esm/helpers/fileUtils.js","typings":"../../../esm/helpers/fileUtils.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-htmlconstants.js-dynamic","main":"../../../js/helpers/htmlConstants.js","module":"../../../esm/helpers/htmlConstants.js","typings":"../../../esm/helpers/htmlConstants.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-htmlconstants.js-dynamic","main":"../../../js/helpers/htmlConstants.js","module":"../../../esm/helpers/htmlConstants.js","typings":"../../../esm/helpers/htmlConstants.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers-dynamic","main":"../../js/helpers/index.js","module":"../../esm/helpers/index.js","typings":"../../esm/helpers/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers-dynamic","main":"../../js/helpers/index.js","module":"../../esm/helpers/index.js","typings":"../../esm/helpers/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-resizeobserver.js-dynamic","main":"../../../js/helpers/resizeObserver.js","module":"../../../esm/helpers/resizeObserver.js","typings":"../../../esm/helpers/resizeObserver.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-resizeobserver.js-dynamic","main":"../../../js/helpers/resizeObserver.js","module":"../../../esm/helpers/resizeObserver.js","typings":"../../../esm/helpers/resizeObserver.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-typeutils.js-dynamic","main":"../../../js/helpers/typeUtils.js","module":"../../../esm/helpers/typeUtils.js","typings":"../../../esm/helpers/typeUtils.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-typeutils.js-dynamic","main":"../../../js/helpers/typeUtils.js","module":"../../../esm/helpers/typeUtils.js","typings":"../../../esm/helpers/typeUtils.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-useinterval.js-dynamic","main":"../../../js/helpers/useInterval.js","module":"../../../esm/helpers/useInterval.js","typings":"../../../esm/helpers/useInterval.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-useinterval.js-dynamic","main":"../../../js/helpers/useInterval.js","module":"../../../esm/helpers/useInterval.js","typings":"../../../esm/helpers/useInterval.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-useisomorphiclayout.js-dynamic","main":"../../../js/helpers/useIsomorphicLayout.js","module":"../../../esm/helpers/useIsomorphicLayout.js","typings":"../../../esm/helpers/useIsomorphicLayout.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-useisomorphiclayout.js-dynamic","main":"../../../js/helpers/useIsomorphicLayout.js","module":"../../../esm/helpers/useIsomorphicLayout.js","typings":"../../../esm/helpers/useIsomorphicLayout.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-useunmounteffect.js-dynamic","main":"../../../js/helpers/useUnmountEffect.js","module":"../../../esm/helpers/useUnmountEffect.js","typings":"../../../esm/helpers/useUnmountEffect.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-useunmounteffect.js-dynamic","main":"../../../js/helpers/useUnmountEffect.js","module":"../../../esm/helpers/useUnmountEffect.js","typings":"../../../esm/helpers/useUnmountEffect.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-util.js-dynamic","main":"../../../js/helpers/util.js","module":"../../../esm/helpers/util.js","typings":"../../../esm/helpers/util.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-util.js-dynamic","main":"../../../js/helpers/util.js","module":"../../../esm/helpers/util.js","typings":"../../../esm/helpers/util.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-bullseye-dynamic","main":"../../../js/layouts/Bullseye/index.js","module":"../../../esm/layouts/Bullseye/index.js","typings":"../../../esm/layouts/Bullseye/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-bullseye-dynamic","main":"../../../js/layouts/Bullseye/index.js","module":"../../../esm/layouts/Bullseye/index.js","typings":"../../../esm/layouts/Bullseye/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-flex-dynamic","main":"../../../js/layouts/Flex/index.js","module":"../../../esm/layouts/Flex/index.js","typings":"../../../esm/layouts/Flex/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-flex-dynamic","main":"../../../js/layouts/Flex/index.js","module":"../../../esm/layouts/Flex/index.js","typings":"../../../esm/layouts/Flex/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-gallery-dynamic","main":"../../../js/layouts/Gallery/index.js","module":"../../../esm/layouts/Gallery/index.js","typings":"../../../esm/layouts/Gallery/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-gallery-dynamic","main":"../../../js/layouts/Gallery/index.js","module":"../../../esm/layouts/Gallery/index.js","typings":"../../../esm/layouts/Gallery/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-grid-dynamic","main":"../../../js/layouts/Grid/index.js","module":"../../../esm/layouts/Grid/index.js","typings":"../../../esm/layouts/Grid/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-grid-dynamic","main":"../../../js/layouts/Grid/index.js","module":"../../../esm/layouts/Grid/index.js","typings":"../../../esm/layouts/Grid/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-level-dynamic","main":"../../../js/layouts/Level/index.js","module":"../../../esm/layouts/Level/index.js","typings":"../../../esm/layouts/Level/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-level-dynamic","main":"../../../js/layouts/Level/index.js","module":"../../../esm/layouts/Level/index.js","typings":"../../../esm/layouts/Level/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-split-dynamic","main":"../../../js/layouts/Split/index.js","module":"../../../esm/layouts/Split/index.js","typings":"../../../esm/layouts/Split/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-split-dynamic","main":"../../../js/layouts/Split/index.js","module":"../../../esm/layouts/Split/index.js","typings":"../../../esm/layouts/Split/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-stack-dynamic","main":"../../../js/layouts/Stack/index.js","module":"../../../esm/layouts/Stack/index.js","typings":"../../../esm/layouts/Stack/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-stack-dynamic","main":"../../../js/layouts/Stack/index.js","module":"../../../esm/layouts/Stack/index.js","typings":"../../../esm/layouts/Stack/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-duallistselector-next-dynamic","main":"../../../../js/next/components/DualListSelector/index.js","module":"../../../../esm/next/components/DualListSelector/index.js","typings":"../../../../esm/next/components/DualListSelector/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-duallistselector-next-dynamic","main":"../../../../js/next/components/DualListSelector/index.js","module":"../../../../esm/next/components/DualListSelector/index.js","typings":"../../../../esm/next/components/DualListSelector/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-modal-next-dynamic","main":"../../../../js/next/components/Modal/index.js","module":"../../../../esm/next/components/Modal/index.js","typings":"../../../../esm/next/components/Modal/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-modal-next-dynamic","main":"../../../../js/next/components/Modal/index.js","module":"../../../../esm/next/components/Modal/index.js","typings":"../../../../esm/next/components/Modal/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-components-next-dynamic","main":"../../../js/next/components/index.js","module":"../../../esm/next/components/index.js","typings":"../../../esm/next/components/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-components-next-dynamic","main":"../../../js/next/components/index.js","module":"../../../esm/next/components/index.js","typings":"../../../esm/next/components/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-styles-dynamic","main":"../../js/styles/index.js","module":"../../esm/styles/index.js","typings":"../../esm/styles/index.d.ts","version":"5.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-styles-dynamic","main":"../../js/styles/index.js","module":"../../esm/styles/index.js","typings":"../../esm/styles/index.d.ts","version":"5.3.0-prerelease.21","private":true}
|
|
@@ -11,6 +11,8 @@ export interface LabelProps extends React.HTMLProps<HTMLSpanElement> {
|
|
|
11
11
|
variant?: 'outline' | 'filled';
|
|
12
12
|
/** Flag indicating the label is compact. */
|
|
13
13
|
isCompact?: boolean;
|
|
14
|
+
/** Flag indicating the label is disabled. Works only on clickable labels, so either href or onClick props must be passed in. */
|
|
15
|
+
isDisabled?: boolean;
|
|
14
16
|
/** @beta Flag indicating the label is editable. */
|
|
15
17
|
isEditable?: boolean;
|
|
16
18
|
/** @beta Additional props passed to the editable label text div. Optionally passing onInput and onBlur callbacks will allow finer custom text input control. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAW,eAAe,EAAE,MAAM,YAAY,CAAC;AAMtD,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,S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AAC,SAAS,CAAC;QACzB,YAAY,EAAE,GAAG,CAAC;KACnB,KAAK,KAAK,CAAC,SAAS,CAAC;CACvB;AAaD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAgQrD,CAAC"}
|
|
@@ -20,7 +20,7 @@ const colorStyles = {
|
|
|
20
20
|
grey: ''
|
|
21
21
|
};
|
|
22
22
|
export const Label = (_a) => {
|
|
23
|
-
var { children, className = '', color = 'grey', variant = 'filled', isCompact = false, isEditable = false, editableProps, textMaxWidth, tooltipPosition, icon, onClose, onClick: onLabelClick, onEditCancel, onEditComplete, closeBtn, closeBtnAriaLabel, closeBtnProps, href, isOverflowLabel, render } = _a, props = __rest(_a, ["children", "className", "color", "variant", "isCompact", "isEditable", "editableProps", "textMaxWidth", "tooltipPosition", "icon", "onClose", "onClick", "onEditCancel", "onEditComplete", "closeBtn", "closeBtnAriaLabel", "closeBtnProps", "href", "isOverflowLabel", "render"]);
|
|
23
|
+
var { children, className = '', color = 'grey', variant = 'filled', isCompact = false, isDisabled = false, isEditable = false, editableProps, textMaxWidth, tooltipPosition, icon, onClose, onClick: onLabelClick, onEditCancel, onEditComplete, closeBtn, closeBtnAriaLabel, closeBtnProps, href, isOverflowLabel, render } = _a, props = __rest(_a, ["children", "className", "color", "variant", "isCompact", "isDisabled", "isEditable", "editableProps", "textMaxWidth", "tooltipPosition", "icon", "onClose", "onClick", "onEditCancel", "onEditComplete", "closeBtn", "closeBtnAriaLabel", "closeBtnProps", "href", "isOverflowLabel", "render"]);
|
|
24
24
|
const [isEditableActive, setIsEditableActive] = useState(false);
|
|
25
25
|
const [currValue, setCurrValue] = useState(children);
|
|
26
26
|
const editableButtonRef = React.useRef();
|
|
@@ -99,10 +99,10 @@ export const Label = (_a) => {
|
|
|
99
99
|
sel.addRange(range);
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
const
|
|
103
|
-
const
|
|
102
|
+
const isClickableDisabled = (href || onLabelClick) && isDisabled;
|
|
103
|
+
const defaultCloseButton = (React.createElement(Button, Object.assign({ type: "button", variant: "plain", onClick: onClose, "aria-label": closeBtnAriaLabel || `Close ${children}` }, (isClickableDisabled && { isDisabled: true }), closeBtnProps),
|
|
104
104
|
React.createElement(TimesIcon, null)));
|
|
105
|
-
const
|
|
105
|
+
const closeButton = React.createElement("span", { className: css(styles.labelActions) }, closeBtn || defaultCloseButton);
|
|
106
106
|
const textRef = React.createRef();
|
|
107
107
|
// ref to apply tooltip when rendered is used
|
|
108
108
|
const componentRef = React.useRef();
|
|
@@ -140,10 +140,10 @@ export const Label = (_a) => {
|
|
|
140
140
|
onClick: onLabelClick
|
|
141
141
|
};
|
|
142
142
|
const isButton = LabelComponentChildElement === 'button';
|
|
143
|
-
const labelComponentChildProps = Object.assign(Object.assign(Object.assign(Object.assign({ className: css(styles.labelContent) }, (isTooltipVisible && { tabIndex: 0 })), (href && { href })), (isButton && clickableLabelProps)), (isEditable && Object.assign({ ref: editableButtonRef, onClick: (e) => {
|
|
143
|
+
const labelComponentChildProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ className: css(styles.labelContent) }, (isTooltipVisible && { tabIndex: 0 })), (href && { href })), (href && isDisabled && { onClick: (event) => event.preventDefault() })), (isButton && clickableLabelProps)), (isEditable && Object.assign({ ref: editableButtonRef, onClick: (e) => {
|
|
144
144
|
setIsEditableActive(true);
|
|
145
145
|
e.stopPropagation();
|
|
146
|
-
} }, editableProps)));
|
|
146
|
+
} }, editableProps))), (isClickableDisabled && isButton && { disabled: true })), (isClickableDisabled && href && { tabindex: -1, 'aria-disabled': true }));
|
|
147
147
|
let labelComponentChild = (React.createElement(LabelComponentChildElement, Object.assign({}, labelComponentChildProps), content));
|
|
148
148
|
if (render) {
|
|
149
149
|
labelComponentChild = (React.createElement(React.Fragment, null,
|
|
@@ -157,9 +157,10 @@ export const Label = (_a) => {
|
|
|
157
157
|
else if (isTooltipVisible) {
|
|
158
158
|
labelComponentChild = (React.createElement(Tooltip, { content: children, position: tooltipPosition }, labelComponentChild));
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
const LabelComponent = (isOverflowLabel ? 'button' : 'span');
|
|
161
|
+
return (React.createElement(LabelComponent, Object.assign({}, props, { className: css(styles.label, isClickableDisabled && styles.modifiers.disabled, colorStyles[color], variant === 'outline' && styles.modifiers.outline, isOverflowLabel && styles.modifiers.overflow, isCompact && styles.modifiers.compact, isEditable && labelGrpStyles.modifiers.editable, isEditableActive && styles.modifiers.editableActive, className), onClick: isOverflowLabel ? onLabelClick : undefined }),
|
|
161
162
|
!isEditableActive && labelComponentChild,
|
|
162
|
-
!isEditableActive && onClose &&
|
|
163
|
+
!isEditableActive && onClose && closeButton,
|
|
163
164
|
isEditableActive && (React.createElement("input", Object.assign({ className: css(styles.labelContent), type: "text", id: "editable-input", ref: editableInputRef, value: currValue, onChange: updateVal }, editableProps)))));
|
|
164
165
|
};
|
|
165
166
|
Label.displayName = 'Label';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/Label/Label.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,MAAM,gEAA4D;AACzE,OAAO,cAAc,sEAAkE;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAmB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,SAAS,MAAM,mDAAmD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,eAAe,MAAM,0DAA0D,CAAC;
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/Label/Label.tsx"],"names":[],"mappings":";AAAA,OAA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AAO,IAAI,WAAW;QAC3C,gBAAgB,IAAI,CACnB,6CACE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,EACnC,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,gBAAgB,EACnB,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,SAAS,IACf,aAAa,EACjB,CACH,CACc,CAClB,CAAC;AACJ,CAAC,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -11,6 +11,8 @@ export interface LabelProps extends React.HTMLProps<HTMLSpanElement> {
|
|
|
11
11
|
variant?: 'outline' | 'filled';
|
|
12
12
|
/** Flag indicating the label is compact. */
|
|
13
13
|
isCompact?: boolean;
|
|
14
|
+
/** Flag indicating the label is disabled. Works only on clickable labels, so either href or onClick props must be passed in. */
|
|
15
|
+
isDisabled?: boolean;
|
|
14
16
|
/** @beta Flag indicating the label is editable. */
|
|
15
17
|
isEditable?: boolean;
|
|
16
18
|
/** @beta Additional props passed to the editable label text div. Optionally passing onInput and onBlur callbacks will allow finer custom text input control. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAW,eAAe,EAAE,MAAM,YAAY,CAAC;AAMtD,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC;IAClE,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAClF,4BAA4B;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ey', variant = 'filled', isCompact = false, isEditable = false, editableProps, textMaxWidth, tooltipPosition, icon, onClose, onClick: onLabelClick, onEditCancel, onEditComplete, closeBtn, closeBtnAriaLabel, closeBtnProps, href, isOverflowLabel, render } = _a, props = tslib_1.__rest(_a, ["children", "className", "color", "variant", "isCompact", "isEditable", "editableProps", "textMaxWidth", "tooltipPosition", "icon", "onClose", "onClick", "onEditCancel", "onEditComplete", "closeBtn", "closeBtnAriaLabel", "closeBtnProps", "href", "isOverflowLabel", "render"]);
|
|
26
|
+
var { children, className = '', color = 'grey', variant = 'filled', isCompact = false, isDisabled = false, isEditable = false, editableProps, textMaxWidth, tooltipPosition, icon, onClose, onClick: onLabelClick, onEditCancel, onEditComplete, closeBtn, closeBtnAriaLabel, closeBtnProps, href, isOverflowLabel, render } = _a, props = tslib_1.__rest(_a, ["children", "className", "color", "variant", "isCompact", "isDisabled", "isEditable", "editableProps", "textMaxWidth", "tooltipPosition", "icon", "onClose", "onClick", "onEditCancel", "onEditComplete", "closeBtn", "closeBtnAriaLabel", "closeBtnProps", "href", "isOverflowLabel", "render"]);
|
|
27
27
|
const [isEditableActive, setIsEditableActive] = (0, react_1.useState)(false);
|
|
28
28
|
const [currValue, setCurrValue] = (0, react_1.useState)(children);
|
|
29
29
|
const editableButtonRef = React.useRef();
|
|
@@ -102,10 +102,10 @@ const Label = (_a) => {
|
|
|
102
102
|
sel.addRange(range);
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
-
const
|
|
106
|
-
const
|
|
105
|
+
const isClickableDisabled = (href || onLabelClick) && isDisabled;
|
|
106
|
+
const defaultCloseButton = (React.createElement(Button_1.Button, Object.assign({ type: "button", variant: "plain", onClick: onClose, "aria-label": closeBtnAriaLabel || `Close ${children}` }, (isClickableDisabled && { isDisabled: true }), closeBtnProps),
|
|
107
107
|
React.createElement(times_icon_1.default, null)));
|
|
108
|
-
const
|
|
108
|
+
const closeButton = React.createElement("span", { className: (0, react_styles_1.css)(label_1.default.labelActions) }, closeBtn || defaultCloseButton);
|
|
109
109
|
const textRef = React.createRef();
|
|
110
110
|
// ref to apply tooltip when rendered is used
|
|
111
111
|
const componentRef = React.useRef();
|
|
@@ -143,10 +143,10 @@ const Label = (_a) => {
|
|
|
143
143
|
onClick: onLabelClick
|
|
144
144
|
};
|
|
145
145
|
const isButton = LabelComponentChildElement === 'button';
|
|
146
|
-
const labelComponentChildProps = Object.assign(Object.assign(Object.assign(Object.assign({ className: (0, react_styles_1.css)(label_1.default.labelContent) }, (isTooltipVisible && { tabIndex: 0 })), (href && { href })), (isButton && clickableLabelProps)), (isEditable && Object.assign({ ref: editableButtonRef, onClick: (e) => {
|
|
146
|
+
const labelComponentChildProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ className: (0, react_styles_1.css)(label_1.default.labelContent) }, (isTooltipVisible && { tabIndex: 0 })), (href && { href })), (href && isDisabled && { onClick: (event) => event.preventDefault() })), (isButton && clickableLabelProps)), (isEditable && Object.assign({ ref: editableButtonRef, onClick: (e) => {
|
|
147
147
|
setIsEditableActive(true);
|
|
148
148
|
e.stopPropagation();
|
|
149
|
-
} }, editableProps)));
|
|
149
|
+
} }, editableProps))), (isClickableDisabled && isButton && { disabled: true })), (isClickableDisabled && href && { tabindex: -1, 'aria-disabled': true }));
|
|
150
150
|
let labelComponentChild = (React.createElement(LabelComponentChildElement, Object.assign({}, labelComponentChildProps), content));
|
|
151
151
|
if (render) {
|
|
152
152
|
labelComponentChild = (React.createElement(React.Fragment, null,
|
|
@@ -160,9 +160,10 @@ const Label = (_a) => {
|
|
|
160
160
|
else if (isTooltipVisible) {
|
|
161
161
|
labelComponentChild = (React.createElement(Tooltip_1.Tooltip, { content: children, position: tooltipPosition }, labelComponentChild));
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
const LabelComponent = (isOverflowLabel ? 'button' : 'span');
|
|
164
|
+
return (React.createElement(LabelComponent, Object.assign({}, props, { className: (0, react_styles_1.css)(label_1.default.label, isClickableDisabled && label_1.default.modifiers.disabled, colorStyles[color], variant === 'outline' && label_1.default.modifiers.outline, isOverflowLabel && label_1.default.modifiers.overflow, isCompact && label_1.default.modifiers.compact, isEditable && label_group_1.default.modifiers.editable, isEditableActive && label_1.default.modifiers.editableActive, className), onClick: isOverflowLabel ? onLabelClick : undefined }),
|
|
164
165
|
!isEditableActive && labelComponentChild,
|
|
165
|
-
!isEditableActive && onClose &&
|
|
166
|
+
!isEditableActive && onClose && closeButton,
|
|
166
167
|
isEditableActive && (React.createElement("input", Object.assign({ className: (0, react_styles_1.css)(label_1.default.labelContent), type: "text", id: "editable-input", ref: editableInputRef, value: currValue, onChange: updateVal }, editableProps)))));
|
|
167
168
|
};
|
|
168
169
|
exports.Label = Label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/Label/Label.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,iCAAiC;AACjC,wGAAyE;AACzE,oHAAuF;AACvF,sCAAmC;AACnC,wCAAsD;AACtD,2DAA+C;AAC/C,0GAA0E;AAC1E,2CAA0D;AAC1D,6HAAuF;
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/Label/Label.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,iCAAiC;AACjC,wGAAyE;AACzE,oHAAuF;AACvF,sCAAmC;AACnC,wCAAsD;AACtD,2DAA+C;AAC/C,0GAA0E;AAC1E,2CAA0D;AAC1D,6HAAuF;AAqEvF,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,eAAM,CAAC,SAAS,CAAC,IAAI;IAC3B,IAAI,EAAE,eAAM,CAAC,SAAS,CAAC,IAAI;IAC3B,KAAK,EAAE,eAAM,CAAC,SAAS,CAAC,KAAK;IAC7B,MAAM,EAAE,eAAM,CAAC,SAAS,CAAC,MAAM;IAC/B,MAAM,EAAE,eAAM,CAAC,SAAS,CAAC,MAAM;IAC/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