@patternfly/react-core 5.2.0-prerelease.42 → 5.2.0-prerelease.43
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/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/Modal/package.json +1 -1
- package/dist/dynamic/next/components/package.json +1 -1
- package/dist/esm/components/Checkbox/Checkbox.d.ts +9 -3
- package/dist/esm/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +16 -8
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Radio/Radio.d.ts +7 -5
- package/dist/esm/components/Radio/Radio.d.ts.map +1 -1
- package/dist/esm/components/Radio/Radio.js +13 -20
- package/dist/esm/components/Radio/Radio.js.map +1 -1
- package/dist/js/components/Checkbox/Checkbox.d.ts +9 -3
- package/dist/js/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/js/components/Checkbox/Checkbox.js +16 -8
- package/dist/js/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/js/components/Radio/Radio.d.ts +7 -5
- package/dist/js/components/Radio/Radio.d.ts.map +1 -1
- package/dist/js/components/Radio/Radio.js +13 -20
- package/dist/js/components/Radio/Radio.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/Checkbox/Checkbox.tsx +63 -29
- package/src/components/Checkbox/__tests__/Checkbox.test.tsx +41 -0
- package/src/components/Radio/Radio.tsx +39 -38
- package/src/components/Radio/__tests__/Radio.test.tsx +41 -0
|
@@ -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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","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.2.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.2.0-prerelease.42","private":true}
|
|
@@ -2,10 +2,16 @@ import * as React from 'react';
|
|
|
2
2
|
import { PickOptional } from '../../helpers/typeUtils';
|
|
3
3
|
import { OUIAProps } from '../../helpers';
|
|
4
4
|
export interface CheckboxProps extends Omit<React.HTMLProps<HTMLInputElement>, 'type' | 'onChange' | 'disabled' | 'label'>, OUIAProps {
|
|
5
|
-
/** Additional classes added to the checkbox.
|
|
5
|
+
/** Additional classes added to the checkbox wrapper. This wrapper will be div element by default. It will be a label element if
|
|
6
|
+
* isLabelWrapped is true, or it can be overridden by any element specified in the component prop.
|
|
7
|
+
*/
|
|
6
8
|
className?: string;
|
|
7
|
-
/** Additional
|
|
9
|
+
/** Additional classes added to the checkbox input. */
|
|
8
10
|
inputClassName?: string;
|
|
11
|
+
/** Flag to indicate whether the checkbox wrapper element is a <label> element for the checkbox input. Will not apply if a component prop (with a value other than a "label") is specified. */
|
|
12
|
+
isLabelWrapped?: boolean;
|
|
13
|
+
/** Flag to show if the checkbox label is shown before the checkbox input. */
|
|
14
|
+
isLabelBeforeButton?: boolean;
|
|
9
15
|
/** Flag to show if the checkbox selection is valid or invalid. */
|
|
10
16
|
isValid?: boolean;
|
|
11
17
|
/** Flag to show if the checkbox is disabled. */
|
|
@@ -27,7 +33,7 @@ export interface CheckboxProps extends Omit<React.HTMLProps<HTMLInputElement>, '
|
|
|
27
33
|
description?: React.ReactNode;
|
|
28
34
|
/** Body text of the checkbox */
|
|
29
35
|
body?: React.ReactNode;
|
|
30
|
-
/** Sets the
|
|
36
|
+
/** Sets the checkbox wrapper component to render. Defaults to "div". If set to "label", behaves the same as if isLabelWrapped prop was specified. */
|
|
31
37
|
component?: React.ElementType;
|
|
32
38
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
33
39
|
ouiaId?: number | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkC,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1E,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,EACzF,SAAS;IACX
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkC,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1E,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,EACzF,SAAS;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8LAA8L;IAC9L,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,UA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 'aria-label': ariaLabel, className, inputClassName, onChange, isValid, isDisabled, isRequired, isChecked, label, checked, defaultChecked, description, body, ouiaId, ouiaSafe, component
|
|
20
|
+
const _a = this.props, { 'aria-label': ariaLabel, className, inputClassName, onChange, isLabelWrapped, isLabelBeforeButton, isValid, isDisabled, isRequired, isChecked, label, checked, defaultChecked, description, body, ouiaId, ouiaSafe, component } = _a, props = __rest(_a, ['aria-label', "className", "inputClassName", "onChange", "isLabelWrapped", "isLabelBeforeButton", "isValid", "isDisabled", "isRequired", "isChecked", "label", "checked", "defaultChecked", "description", "body", "ouiaId", "ouiaSafe", "component"]);
|
|
21
21
|
if (!props.id) {
|
|
22
22
|
// eslint-disable-next-line no-console
|
|
23
23
|
console.error('Checkbox:', 'id is required to make input accessible');
|
|
@@ -32,12 +32,20 @@ class Checkbox extends React.Component {
|
|
|
32
32
|
if ([false, true].includes(defaultChecked)) {
|
|
33
33
|
checkedProps.defaultChecked = defaultChecked;
|
|
34
34
|
}
|
|
35
|
+
const inputRendered = (React.createElement("input", Object.assign({}, props, { className: css(styles.checkInput, inputClassName), type: "checkbox", onChange: this.handleChange, "aria-invalid": !isValid, "aria-label": ariaLabel, disabled: isDisabled, required: isRequired, ref: (elem) => elem && (elem.indeterminate = isChecked === null) }, checkedProps, getOUIAProps(Checkbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))));
|
|
36
|
+
const wrapWithLabel = (isLabelWrapped && !component) || component === 'label';
|
|
37
|
+
const Label = wrapWithLabel ? 'span' : 'label';
|
|
38
|
+
const labelRendered = label ? (React.createElement(Label, { className: css(styles.checkLabel, isDisabled && styles.modifiers.disabled), htmlFor: !wrapWithLabel && props.id },
|
|
39
|
+
label,
|
|
40
|
+
isRequired && (React.createElement("span", { className: css(styles.checkLabelRequired), "aria-hidden": "true" }, ASTERISK)))) : null;
|
|
41
|
+
const Component = component !== null && component !== void 0 ? component : (wrapWithLabel ? 'label' : 'div');
|
|
35
42
|
checkedProps.checked = checkedProps.checked === null ? false : checkedProps.checked;
|
|
36
|
-
return (React.createElement(Component, { className: css(styles.check, !label && styles.modifiers.standalone, className) },
|
|
37
|
-
React.createElement(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
return (React.createElement(Component, { className: css(styles.check, !label && styles.modifiers.standalone, className), htmlFor: wrapWithLabel && props.id },
|
|
44
|
+
isLabelBeforeButton ? (React.createElement(React.Fragment, null,
|
|
45
|
+
labelRendered,
|
|
46
|
+
inputRendered)) : (React.createElement(React.Fragment, null,
|
|
47
|
+
inputRendered,
|
|
48
|
+
labelRendered)),
|
|
41
49
|
description && React.createElement("span", { className: css(styles.checkDescription) }, description),
|
|
42
50
|
body && React.createElement("span", { className: css(styles.checkBody) }, body)));
|
|
43
51
|
}
|
|
@@ -45,13 +53,13 @@ class Checkbox extends React.Component {
|
|
|
45
53
|
Checkbox.displayName = 'Checkbox';
|
|
46
54
|
Checkbox.defaultProps = {
|
|
47
55
|
className: '',
|
|
56
|
+
isLabelWrapped: false,
|
|
48
57
|
isValid: true,
|
|
49
58
|
isDisabled: false,
|
|
50
59
|
isRequired: false,
|
|
51
60
|
isChecked: false,
|
|
52
61
|
onChange: defaultOnChange,
|
|
53
|
-
ouiaSafe: true
|
|
54
|
-
component: 'div'
|
|
62
|
+
ouiaSafe: true
|
|
55
63
|
};
|
|
56
64
|
export { Checkbox };
|
|
57
65
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,gEAA4D;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAa,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAA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UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,IAAI;CACf,CAAC;AA6GJ,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -2,17 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { PickOptional } from '../../helpers/typeUtils';
|
|
3
3
|
import { OUIAProps } from '../../helpers';
|
|
4
4
|
export interface RadioProps extends Omit<React.HTMLProps<HTMLInputElement>, 'disabled' | 'label' | 'onChange' | 'type'>, OUIAProps {
|
|
5
|
-
/** Additional classes added to the radio wrapper.
|
|
6
|
-
* isLabelWrapped is true,
|
|
5
|
+
/** Additional classes added to the radio wrapper. This wrapper will be div element by default. It will be a label element if
|
|
6
|
+
* isLabelWrapped is true, or it can be overridden by any element specified in the component prop.
|
|
7
7
|
*/
|
|
8
8
|
className?: string;
|
|
9
|
-
/** Additional
|
|
9
|
+
/** Additional classes added to the radio input. */
|
|
10
10
|
inputClassName?: string;
|
|
11
11
|
/** Id of the radio. */
|
|
12
12
|
id: string;
|
|
13
|
-
/** Flag to
|
|
13
|
+
/** Flag to indicate whether the radio wrapper element is a native label element for the radio input. Will not apply if a component prop (with a value other than a "label") is specified. */
|
|
14
14
|
isLabelWrapped?: boolean;
|
|
15
|
-
/** Flag to show if the radio label is shown before the radio
|
|
15
|
+
/** Flag to show if the radio label is shown before the radio input. */
|
|
16
16
|
isLabelBeforeButton?: boolean;
|
|
17
17
|
/** Flag to show if the radio is checked. */
|
|
18
18
|
checked?: boolean;
|
|
@@ -34,6 +34,8 @@ export interface RadioProps extends Omit<React.HTMLProps<HTMLInputElement>, 'dis
|
|
|
34
34
|
description?: React.ReactNode;
|
|
35
35
|
/** Body of the radio. */
|
|
36
36
|
body?: React.ReactNode;
|
|
37
|
+
/** Sets the radio wrapper component to render. Defaults to "div". If set to "label", behaves the same as if isLabelWrapped prop was specified. */
|
|
38
|
+
component?: React.ElementType;
|
|
37
39
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
38
40
|
ouiaId?: number | string;
|
|
39
41
|
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAgB,SAAS,EAAoB,MAAM,eAAe,CAAC;AAE1E,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC,EACzF,SAAS;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAgB,SAAS,EAAoB,MAAM,eAAe,CAAC;AAE1E,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC,EACzF,SAAS;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,6LAA6L;IAC7L,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uEAAuE;IACvE,mBAAmB,CAAC,EAAE,OAA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const _a = this.props, { 'aria-label': ariaLabel, checked, className, inputClassName, defaultChecked, isLabelWrapped, isLabelBeforeButton, isChecked, isDisabled, isValid, label,
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
-
onChange, description, body, ouiaId, ouiaSafe = true } = _a, props = __rest(_a, ['aria-label', "checked", "className", "inputClassName", "defaultChecked", "isLabelWrapped", "isLabelBeforeButton", "isChecked", "isDisabled", "isValid", "label", "onChange", "description", "body", "ouiaId", "ouiaSafe"]);
|
|
23
|
+
onChange, description, body, ouiaId, ouiaSafe = true, component } = _a, props = __rest(_a, ['aria-label', "checked", "className", "inputClassName", "defaultChecked", "isLabelWrapped", "isLabelBeforeButton", "isChecked", "isDisabled", "isValid", "label", "onChange", "description", "body", "ouiaId", "ouiaSafe", "component"]);
|
|
24
24
|
if (!props.id) {
|
|
25
25
|
// eslint-disable-next-line no-console
|
|
26
26
|
console.error('Radio:', 'id is required to make input accessible');
|
|
27
27
|
}
|
|
28
28
|
const inputRendered = (React.createElement("input", Object.assign({}, props, { className: css(styles.radioInput, inputClassName), type: "radio", onChange: this.handleChange, "aria-invalid": !isValid, disabled: isDisabled, checked: checked || isChecked }, (checked === undefined && { defaultChecked }), (!label && { 'aria-label': ariaLabel }), getOUIAProps(Radio.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))));
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
descRender,
|
|
42
|
-
bodyRender)) : (React.createElement(React.Fragment, null,
|
|
43
|
-
inputRendered,
|
|
44
|
-
labelRendered,
|
|
45
|
-
descRender,
|
|
46
|
-
bodyRender));
|
|
47
|
-
return isLabelWrapped ? (React.createElement("label", { className: css(styles.radio, className), htmlFor: props.id }, childrenRendered)) : (React.createElement("div", { className: css(styles.radio, !label && styles.modifiers.standalone, className) }, childrenRendered));
|
|
29
|
+
const wrapWithLabel = (isLabelWrapped && !component) || component === 'label';
|
|
30
|
+
const Label = wrapWithLabel ? 'span' : 'label';
|
|
31
|
+
const labelRendered = label ? (React.createElement(Label, { className: css(styles.radioLabel, isDisabled && styles.modifiers.disabled), htmlFor: !wrapWithLabel && props.id }, label)) : null;
|
|
32
|
+
const Component = component !== null && component !== void 0 ? component : (wrapWithLabel ? 'label' : 'div');
|
|
33
|
+
return (React.createElement(Component, { className: css(styles.radio, !label && styles.modifiers.standalone, className), htmlFor: wrapWithLabel && props.id },
|
|
34
|
+
isLabelBeforeButton ? (React.createElement(React.Fragment, null,
|
|
35
|
+
labelRendered,
|
|
36
|
+
inputRendered)) : (React.createElement(React.Fragment, null,
|
|
37
|
+
inputRendered,
|
|
38
|
+
labelRendered)),
|
|
39
|
+
description && React.createElement("span", { className: css(styles.radioDescription) }, description),
|
|
40
|
+
body && React.createElement("span", { className: css(styles.radioBody) }, body)));
|
|
48
41
|
}
|
|
49
42
|
}
|
|
50
43
|
Radio.displayName = 'Radio';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,gEAA4D;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAa,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,gEAA4D;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAa,gBAAgB,EAAE,MAAM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CACJ;YACA,WAAW,IAAI,8BAAM,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAG,WAAW,CAAQ;YAClF,IAAI,IAAI,8BAAM,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAG,IAAI,CAAQ,CACpD,CACb,CAAC;IACJ,CAAC;;AAnGM,iBAAW,GAAG,OAAO,CAAC;AACtB,kBAAY,GAA6B;IAC9C,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;CACnB,CAAC;AAgGJ,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -2,10 +2,16 @@ import * as React from 'react';
|
|
|
2
2
|
import { PickOptional } from '../../helpers/typeUtils';
|
|
3
3
|
import { OUIAProps } from '../../helpers';
|
|
4
4
|
export interface CheckboxProps extends Omit<React.HTMLProps<HTMLInputElement>, 'type' | 'onChange' | 'disabled' | 'label'>, OUIAProps {
|
|
5
|
-
/** Additional classes added to the checkbox.
|
|
5
|
+
/** Additional classes added to the checkbox wrapper. This wrapper will be div element by default. It will be a label element if
|
|
6
|
+
* isLabelWrapped is true, or it can be overridden by any element specified in the component prop.
|
|
7
|
+
*/
|
|
6
8
|
className?: string;
|
|
7
|
-
/** Additional
|
|
9
|
+
/** Additional classes added to the checkbox input. */
|
|
8
10
|
inputClassName?: string;
|
|
11
|
+
/** Flag to indicate whether the checkbox wrapper element is a <label> element for the checkbox input. Will not apply if a component prop (with a value other than a "label") is specified. */
|
|
12
|
+
isLabelWrapped?: boolean;
|
|
13
|
+
/** Flag to show if the checkbox label is shown before the checkbox input. */
|
|
14
|
+
isLabelBeforeButton?: boolean;
|
|
9
15
|
/** Flag to show if the checkbox selection is valid or invalid. */
|
|
10
16
|
isValid?: boolean;
|
|
11
17
|
/** Flag to show if the checkbox is disabled. */
|
|
@@ -27,7 +33,7 @@ export interface CheckboxProps extends Omit<React.HTMLProps<HTMLInputElement>, '
|
|
|
27
33
|
description?: React.ReactNode;
|
|
28
34
|
/** Body text of the checkbox */
|
|
29
35
|
body?: React.ReactNode;
|
|
30
|
-
/** Sets the
|
|
36
|
+
/** Sets the checkbox wrapper component to render. Defaults to "div". If set to "label", behaves the same as if isLabelWrapped prop was specified. */
|
|
31
37
|
component?: React.ElementType;
|
|
32
38
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
33
39
|
ouiaId?: number | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkC,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1E,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,EACzF,SAAS;IACX
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkC,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1E,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,EACzF,SAAS;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8LAA8L;IAC9L,c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CA8FP;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -20,7 +20,7 @@ class Checkbox extends React.Component {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
const _a = this.props, { 'aria-label': ariaLabel, className, inputClassName, onChange, isValid, isDisabled, isRequired, isChecked, label, checked, defaultChecked, description, body, ouiaId, ouiaSafe, component
|
|
23
|
+
const _a = this.props, { 'aria-label': ariaLabel, className, inputClassName, onChange, isLabelWrapped, isLabelBeforeButton, isValid, isDisabled, isRequired, isChecked, label, checked, defaultChecked, description, body, ouiaId, ouiaSafe, component } = _a, props = tslib_1.__rest(_a, ['aria-label', "className", "inputClassName", "onChange", "isLabelWrapped", "isLabelBeforeButton", "isValid", "isDisabled", "isRequired", "isChecked", "label", "checked", "defaultChecked", "description", "body", "ouiaId", "ouiaSafe", "component"]);
|
|
24
24
|
if (!props.id) {
|
|
25
25
|
// eslint-disable-next-line no-console
|
|
26
26
|
console.error('Checkbox:', 'id is required to make input accessible');
|
|
@@ -35,12 +35,20 @@ class Checkbox extends React.Component {
|
|
|
35
35
|
if ([false, true].includes(defaultChecked)) {
|
|
36
36
|
checkedProps.defaultChecked = defaultChecked;
|
|
37
37
|
}
|
|
38
|
+
const inputRendered = (React.createElement("input", Object.assign({}, props, { className: (0, react_styles_1.css)(check_1.default.checkInput, inputClassName), type: "checkbox", onChange: this.handleChange, "aria-invalid": !isValid, "aria-label": ariaLabel, disabled: isDisabled, required: isRequired, ref: (elem) => elem && (elem.indeterminate = isChecked === null) }, checkedProps, (0, helpers_1.getOUIAProps)(Checkbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))));
|
|
39
|
+
const wrapWithLabel = (isLabelWrapped && !component) || component === 'label';
|
|
40
|
+
const Label = wrapWithLabel ? 'span' : 'label';
|
|
41
|
+
const labelRendered = label ? (React.createElement(Label, { className: (0, react_styles_1.css)(check_1.default.checkLabel, isDisabled && check_1.default.modifiers.disabled), htmlFor: !wrapWithLabel && props.id },
|
|
42
|
+
label,
|
|
43
|
+
isRequired && (React.createElement("span", { className: (0, react_styles_1.css)(check_1.default.checkLabelRequired), "aria-hidden": "true" }, htmlConstants_1.ASTERISK)))) : null;
|
|
44
|
+
const Component = component !== null && component !== void 0 ? component : (wrapWithLabel ? 'label' : 'div');
|
|
38
45
|
checkedProps.checked = checkedProps.checked === null ? false : checkedProps.checked;
|
|
39
|
-
return (React.createElement(Component, { className: (0, react_styles_1.css)(check_1.default.check, !label && check_1.default.modifiers.standalone, className) },
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
return (React.createElement(Component, { className: (0, react_styles_1.css)(check_1.default.check, !label && check_1.default.modifiers.standalone, className), htmlFor: wrapWithLabel && props.id },
|
|
47
|
+
isLabelBeforeButton ? (React.createElement(React.Fragment, null,
|
|
48
|
+
labelRendered,
|
|
49
|
+
inputRendered)) : (React.createElement(React.Fragment, null,
|
|
50
|
+
inputRendered,
|
|
51
|
+
labelRendered)),
|
|
44
52
|
description && React.createElement("span", { className: (0, react_styles_1.css)(check_1.default.checkDescription) }, description),
|
|
45
53
|
body && React.createElement("span", { className: (0, react_styles_1.css)(check_1.default.checkBody) }, body)));
|
|
46
54
|
}
|
|
@@ -49,12 +57,12 @@ exports.Checkbox = Checkbox;
|
|
|
49
57
|
Checkbox.displayName = 'Checkbox';
|
|
50
58
|
Checkbox.defaultProps = {
|
|
51
59
|
className: '',
|
|
60
|
+
isLabelWrapped: false,
|
|
52
61
|
isValid: true,
|
|
53
62
|
isDisabled: false,
|
|
54
63
|
isRequired: false,
|
|
55
64
|
isChecked: false,
|
|
56
65
|
onChange: defaultOnChange,
|
|
57
|
-
ouiaSafe: true
|
|
58
|
-
component: 'div'
|
|
66
|
+
ouiaSafe: true
|
|
59
67
|
};
|
|
60
68
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,wGAAyE;AACzE,2DAA+C;AAE/C,2CAA0E;AAC1E,+DAAuD;
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,wGAAyE;AACzE,2DAA+C;AAE/C,2CAA0E;AAC1E,+DAAuD;AA4CvD,oCAAoC;AACpC,MAAM,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAMjC,MAAM,QAAS,SAAQ,KAAK,CAAC,SAAuC;IAalE,YAAY,KAAU;QACpB,KAAK,CAAC,KAAK,CAAC,CAAC;QAMP,iBAAY,GAAG,CAAC,KAAwC,EAAQ,EAAE;YACxE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1D,CAAC,CAAC;QAPA,IAAI,CAAC,KAAK,GAAG;YACX,WAAW,EAAE,IAAA,0BAAgB,EAAC,QAAQ,CAAC,WAAW,CAAC;SACpD,CAAC;IACJ,CAAC;IAMD,MAAM;QACJ,MAAM,KAoBF,IAAI,CAAC,KAAK,EApBR,EACJ,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,cAAc,EACd,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,OAAO,EACP,cAAc,EACd,WAAW,EACX,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,SAAS,OAEG,EADT,KAAK,sBAnBJ,sPAoBL,CAAa,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE;YACb,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,yCAAyC,CAAC,CAAC;SACvE;QACD,MAAM,YAAY,GAA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cAAc,EAAE,KAAK;IACrB,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,IAAI;CACf,CAAC"}
|
|
@@ -2,17 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { PickOptional } from '../../helpers/typeUtils';
|
|
3
3
|
import { OUIAProps } from '../../helpers';
|
|
4
4
|
export interface RadioProps extends Omit<React.HTMLProps<HTMLInputElement>, 'disabled' | 'label' | 'onChange' | 'type'>, OUIAProps {
|
|
5
|
-
/** Additional classes added to the radio wrapper.
|
|
6
|
-
* isLabelWrapped is true,
|
|
5
|
+
/** Additional classes added to the radio wrapper. This wrapper will be div element by default. It will be a label element if
|
|
6
|
+
* isLabelWrapped is true, or it can be overridden by any element specified in the component prop.
|
|
7
7
|
*/
|
|
8
8
|
className?: string;
|
|
9
|
-
/** Additional
|
|
9
|
+
/** Additional classes added to the radio input. */
|
|
10
10
|
inputClassName?: string;
|
|
11
11
|
/** Id of the radio. */
|
|
12
12
|
id: string;
|
|
13
|
-
/** Flag to
|
|
13
|
+
/** Flag to indicate whether the radio wrapper element is a native label element for the radio input. Will not apply if a component prop (with a value other than a "label") is specified. */
|
|
14
14
|
isLabelWrapped?: boolean;
|
|
15
|
-
/** Flag to show if the radio label is shown before the radio
|
|
15
|
+
/** Flag to show if the radio label is shown before the radio input. */
|
|
16
16
|
isLabelBeforeButton?: boolean;
|
|
17
17
|
/** Flag to show if the radio is checked. */
|
|
18
18
|
checked?: boolean;
|
|
@@ -34,6 +34,8 @@ export interface RadioProps extends Omit<React.HTMLProps<HTMLInputElement>, 'dis
|
|
|
34
34
|
description?: React.ReactNode;
|
|
35
35
|
/** Body of the radio. */
|
|
36
36
|
body?: React.ReactNode;
|
|
37
|
+
/** Sets the radio wrapper component to render. Defaults to "div". If set to "label", behaves the same as if isLabelWrapped prop was specified. */
|
|
38
|
+
component?: React.ElementType;
|
|
37
39
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
38
40
|
ouiaId?: number | string;
|
|
39
41
|
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAgB,SAAS,EAAoB,MAAM,eAAe,CAAC;AAE1E,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC,EACzF,SAAS;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAgB,SAAS,EAAoB,MAAM,eAAe,CAAC;AAE1E,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC,EACzF,SAAS;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,6LAA6L;IAC7L,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uEAAuE;IACvE,mBAAmB,CAAC,EA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