@zohodesk/components 1.0.0-temp-214 → 1.0.0-temp-215
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/.cli/propValidation_report.html +1 -1
- package/README.md +16 -0
- package/es/Accordion/Accordion.js +2 -2
- package/es/Accordion/AccordionItem.js +4 -4
- package/es/Accordion/__tests__/Accordion.spec.js +1 -1
- package/es/Accordion/__tests__/AccordionItem.spec.js +1 -1
- package/es/Accordion/index.js +2 -2
- package/es/Animation/Animation.js +3 -3
- package/es/Animation/__tests__/Animation.spec.js +1 -1
- package/es/Animation/utils.js +1 -1
- package/es/AppContainer/AppContainer.js +9 -9
- package/es/AppContainer/__tests__/AppContainer.spec.js +1 -1
- package/es/Avatar/Avatar.js +5 -5
- package/es/Avatar/__tests__/Avatar.spec.js +1 -1
- package/es/AvatarTeam/AvatarTeam.js +4 -4
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +1 -1
- package/es/Button/Button.js +4 -4
- package/es/Button/__tests__/Button.spec.js +1 -1
- package/es/Button/index.js +2 -2
- package/es/Button/props/defaultProps.js +1 -1
- package/es/Buttongroup/Buttongroup.js +3 -3
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +1 -1
- package/es/Card/Card.js +5 -5
- package/es/Card/__tests__/Card.spec.js +1 -1
- package/es/Card/index.js +4 -4
- package/es/CheckBox/CheckBox.js +12 -11
- package/es/CheckBox/CheckBox.module.css +5 -2
- package/es/CheckBox/__tests__/CheckBox.spec.js +1 -1
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
- package/es/DateTime/CalendarView.js +6 -6
- package/es/DateTime/DateTime.js +23 -19
- package/es/DateTime/DateTimePopupFooter.js +5 -5
- package/es/DateTime/DateTimePopupHeader.js +4 -4
- package/es/DateTime/DateWidget.js +25 -18
- package/es/DateTime/DaysRow.js +3 -3
- package/es/DateTime/Time.js +5 -5
- package/es/DateTime/YearView.js +6 -6
- package/es/DateTime/__tests__/CalendarView.spec.js +1 -1
- package/es/DateTime/__tests__/DateTime.spec.js +1 -1
- package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +1 -1
- package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +1 -1
- package/es/DateTime/__tests__/DateWidget.spec.js +1 -1
- package/es/DateTime/__tests__/DaysRow.spec.js +1 -1
- package/es/DateTime/__tests__/Time.spec.js +1 -1
- package/es/DateTime/__tests__/YearView.spec.js +1 -1
- package/es/DateTime/dateFormatUtils/dateFormat.js +4 -4
- package/es/DateTime/dateFormatUtils/dayChange.js +2 -2
- package/es/DateTime/dateFormatUtils/index.js +3 -3
- package/es/DateTime/dateFormatUtils/monthChange.js +2 -2
- package/es/DateTime/dateFormatUtils/timeChange.js +2 -2
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -2
- package/es/DateTime/index.js +1 -1
- package/es/DateTime/props/propTypes.js +6 -1
- package/es/DateTime/validator.js +2 -2
- package/es/DropBox/DropBox.js +9 -9
- package/es/DropBox/DropBoxElement/DropBoxElement.js +7 -6
- package/es/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +1 -1
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +53 -48
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +5 -5
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +1 -1
- package/es/DropBox/__tests__/DropBox.spec.js +1 -1
- package/es/DropBox/css/cssJSLogic.js +1 -1
- package/es/DropBox/props/defaultProps.js +1 -1
- package/es/DropBox/props/propTypes.js +1 -1
- package/es/DropBox/utils/isMobilePopover.js +1 -1
- package/es/DropDown/DropDown.js +4 -4
- package/es/DropDown/DropDownHeading.js +3 -3
- package/es/DropDown/DropDownItem.js +3 -3
- package/es/DropDown/DropDownSearch.js +4 -4
- package/es/DropDown/DropDownSeparator.js +2 -2
- package/es/DropDown/__tests__/DropDown.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownHeading.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownItem.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownSearch.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownSeparator.spec.js +1 -1
- package/es/DropDown/index.js +7 -7
- package/es/DropDown/props/propTypes.js +1 -1
- package/es/Heading/Heading.js +4 -4
- package/es/Heading/__tests__/Heading.spec.js +1 -1
- package/es/Label/Label.js +4 -4
- package/es/Label/__tests__/Label.spec.js +1 -1
- package/es/Layout/Box.js +4 -4
- package/es/Layout/Container.js +4 -4
- package/es/Layout/__tests__/Box.spec.js +1 -1
- package/es/Layout/__tests__/Container.spec.js +1 -1
- package/es/Layout/index.js +2 -2
- package/es/ListItem/ListContainer.js +6 -6
- package/es/ListItem/ListItem.js +5 -5
- package/es/ListItem/ListItemWithAvatar.js +10 -14
- package/es/ListItem/ListItemWithCheckBox.js +6 -6
- package/es/ListItem/ListItemWithIcon.js +5 -5
- package/es/ListItem/ListItemWithRadio.js +6 -6
- package/es/ListItem/__tests__/ListContainer.spec.js +1 -1
- package/es/ListItem/__tests__/ListItem.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithIcon.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithRadio.spec.js +1 -1
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
- package/es/ListItem/index.js +6 -6
- package/es/ListItem/props/propTypes.js +1 -4
- package/es/Modal/Modal.js +3 -3
- package/es/Modal/__tests__/Modal.spec.js +1 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +21 -19
- package/es/MultiSelect/AdvancedMultiSelect.js +21 -19
- package/es/MultiSelect/EmptyState.js +3 -3
- package/es/MultiSelect/MobileHeader/MobileHeader.js +5 -5
- package/es/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +1 -1
- package/es/MultiSelect/MultiSelect.js +24 -22
- package/es/MultiSelect/MultiSelectHeader.js +4 -4
- package/es/MultiSelect/MultiSelectWithAvatar.js +16 -16
- package/es/MultiSelect/SelectedOptions.js +5 -5
- package/es/MultiSelect/Suggestions.js +6 -6
- package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +1 -1
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +1 -1
- package/es/MultiSelect/__tests__/EmptyState.spec.js +1 -1
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +1 -1
- package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +1 -1
- package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +1 -1
- package/es/MultiSelect/__tests__/SelectedOptions.spec.js +1 -1
- package/es/MultiSelect/__tests__/Suggestions.spec.js +1 -1
- package/es/MultiSelect/index.js +4 -4
- package/es/MultiSelect/props/defaultProps.js +1 -1
- package/es/MultiSelect/props/propTypes.js +6 -3
- package/es/PopOver/PopOver.js +6 -6
- package/es/PopOver/__tests__/PopOver.spec.js +1 -1
- package/es/PopOver/index.js +3 -3
- package/es/Popup/Popup.js +150 -31
- package/es/Popup/props/propTypes.js +1 -1
- package/es/Provider/AvatarSize.js +1 -1
- package/es/Provider/CssProvider.js +1 -1
- package/es/Provider/IdProvider.js +2 -2
- package/es/Provider/LibraryContext.js +2 -2
- package/es/Provider/ZindexProvider.js +2 -2
- package/es/Provider/index.js +4 -4
- package/es/Radio/Radio.js +14 -12
- package/es/Radio/Radio.module.css +1 -1
- package/es/Radio/__tests__/Radio.spec.js +1 -1
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
- package/es/Responsive/CustomResponsive.js +7 -7
- package/es/Responsive/ResizeComponent.js +2 -2
- package/es/Responsive/Responsive.js +6 -6
- package/es/Responsive/index.js +3 -3
- package/es/Responsive/utils/index.js +1 -1
- package/es/Responsive/windowResizeObserver.js +1 -1
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
- package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +1 -1
- package/es/ResponsiveDropBox/props/propTypes.js +1 -1
- package/es/Ribbon/Ribbon.js +3 -3
- package/es/Ribbon/__tests__/Ribbon.spec.js +1 -1
- package/es/RippleEffect/RippleEffect.js +4 -4
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +1 -1
- package/es/Select/GroupSelect.js +26 -19
- package/es/Select/Select.js +15 -15
- package/es/Select/SelectWithAvatar.js +17 -17
- package/es/Select/SelectWithIcon.js +13 -13
- package/es/Select/__tests__/GroupSelect.spec.js +1 -1
- package/es/Select/__tests__/Select.spec.js +1 -1
- package/es/Select/__tests__/SelectWithAvatar.spec.js +1 -1
- package/es/Select/__tests__/SelectWithIcon.spec.js +1 -1
- package/es/Select/index.js +4 -4
- package/es/Select/props/defaultProps.js +3 -2
- package/es/Select/props/propTypes.js +5 -1
- package/es/Stencils/Stencils.js +3 -3
- package/es/Stencils/__tests__/Stencils.spec.js +1 -1
- package/es/Switch/Switch.js +5 -5
- package/es/Switch/__tests__/Switch.spec.js +1 -1
- package/es/Tab/Tab.js +5 -5
- package/es/Tab/TabContent.js +4 -4
- package/es/Tab/TabContentWrapper.js +3 -3
- package/es/Tab/TabWrapper.js +3 -3
- package/es/Tab/Tabs.js +13 -13
- package/es/Tab/__tests__/Tab.spec.js +1 -1
- package/es/Tab/__tests__/TabContent.spec.js +1 -1
- package/es/Tab/__tests__/TabContentWrapper.spec.js +1 -1
- package/es/Tab/__tests__/TabWrapper.spec.js +1 -1
- package/es/Tab/__tests__/Tabs.spec.js +1 -1
- package/es/Tab/index.js +5 -5
- package/es/Tag/Tag.js +7 -7
- package/es/Tag/__tests__/Tag.spec.js +1 -1
- package/es/TextBox/TextBox.js +3 -3
- package/es/TextBox/__tests__/TextBox.spec.js +1 -1
- package/es/TextBoxIcon/TextBoxIcon.js +6 -6
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +1 -1
- package/es/TextBoxIcon/props/propTypes.js +1 -1
- package/es/Textarea/Textarea.js +7 -5
- package/es/Textarea/Textarea.module.css +1 -1
- package/es/Textarea/__tests__/Textarea.spec.js +1 -1
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
- package/es/Textarea/props/propTypes.js +2 -1
- package/es/Tooltip/Tooltip.js +6 -6
- package/es/Typography/Typography.js +38 -0
- package/es/Typography/css/Typography.module.css +489 -0
- package/es/Typography/css/cssJSLogic.js +56 -0
- package/es/Typography/props/defaultProps.js +8 -0
- package/es/Typography/props/propTypes.js +27 -0
- package/es/Typography/utils/index.js +50 -0
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
- package/es/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +1 -1
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +1 -1
- package/es/VelocityAnimation/index.js +2 -2
- package/es/css.js +37 -37
- package/es/deprecated/PortalLayer/PortalLayer.js +3 -3
- package/es/index.js +39 -39
- package/es/semantic/Button/Button.js +3 -3
- package/es/semantic/Button/__tests__/Button.spec.js +1 -1
- package/es/semantic/index.js +1 -1
- package/es/utils/Common.js +1 -1
- package/es/utils/ContextOptimizer.js +1 -1
- package/es/utils/cssUtils.js +1 -1
- package/es/utils/datetime/common.js +1 -1
- package/es/utils/dropDownUtils.js +1 -1
- package/es/utils/index.js +1 -1
- package/es/v1/Accordion/Accordion.js +2 -2
- package/es/v1/Accordion/AccordionItem.js +4 -4
- package/es/v1/Accordion/index.js +2 -2
- package/es/v1/Animation/Animation.js +3 -3
- package/es/v1/Animation/utils.js +1 -1
- package/es/v1/AppContainer/AppContainer.js +8 -8
- package/es/v1/Avatar/Avatar.js +5 -5
- package/es/v1/AvatarTeam/AvatarTeam.js +4 -4
- package/es/v1/Button/Button.js +4 -4
- package/es/v1/Button/props/defaultProps.js +1 -1
- package/es/v1/Buttongroup/Buttongroup.js +3 -3
- package/es/v1/Card/Card.js +5 -5
- package/es/v1/Card/index.js +4 -4
- package/es/v1/CheckBox/CheckBox.js +6 -6
- package/es/v1/DateTime/CalendarView.js +7 -7
- package/es/v1/DateTime/DateTime.js +15 -15
- package/es/v1/DateTime/DateTimePopupFooter.js +5 -5
- package/es/v1/DateTime/DateTimePopupHeader.js +4 -4
- package/es/v1/DateTime/DateWidget.js +17 -17
- package/es/v1/DateTime/DaysRow.js +3 -3
- package/es/v1/DateTime/Time.js +5 -5
- package/es/v1/DateTime/YearView.js +6 -6
- package/es/v1/DateTime/index.js +1 -1
- package/es/v1/DateTime/props/propTypes.js +1 -1
- package/es/v1/DropBox/DropBox.js +9 -9
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +6 -6
- package/es/v1/DropBox/props/defaultProps.js +1 -1
- package/es/v1/DropBox/props/propTypes.js +1 -1
- package/es/v1/DropBox/utils/isMobilePopover.js +1 -1
- package/es/v1/DropDown/DropDown.js +4 -4
- package/es/v1/DropDown/DropDownHeading.js +3 -3
- package/es/v1/DropDown/DropDownItem.js +3 -3
- package/es/v1/DropDown/DropDownSearch.js +4 -4
- package/es/v1/DropDown/DropDownSeparator.js +2 -2
- package/es/v1/DropDown/props/propTypes.js +1 -1
- package/es/v1/Heading/Heading.js +4 -4
- package/es/v1/Label/Label.js +4 -4
- package/es/v1/Layout/Box.js +4 -4
- package/es/v1/Layout/Container.js +4 -4
- package/es/v1/Layout/index.js +2 -2
- package/es/v1/ListItem/ListContainer.js +6 -6
- package/es/v1/ListItem/ListItem.js +5 -5
- package/es/v1/ListItem/ListItemWithAvatar.js +7 -7
- package/es/v1/ListItem/ListItemWithCheckBox.js +6 -6
- package/es/v1/ListItem/ListItemWithIcon.js +5 -5
- package/es/v1/ListItem/ListItemWithRadio.js +6 -6
- package/es/v1/ListItem/index.js +6 -6
- package/es/v1/Modal/Modal.js +3 -3
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +17 -17
- package/es/v1/MultiSelect/EmptyState.js +3 -3
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -5
- package/es/v1/MultiSelect/MultiSelect.js +19 -19
- package/es/v1/MultiSelect/MultiSelectHeader.js +4 -4
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +16 -16
- package/es/v1/MultiSelect/SelectedOptions.js +5 -5
- package/es/v1/MultiSelect/Suggestions.js +6 -6
- package/es/v1/MultiSelect/index.js +4 -4
- package/es/v1/MultiSelect/props/defaultProps.js +1 -1
- package/es/v1/PopOver/PopOver.js +6 -6
- package/es/v1/Popup/Popup.js +3 -3
- package/es/v1/Radio/Radio.js +5 -5
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
- package/es/v1/ResponsiveDropBox/props/propTypes.js +1 -1
- package/es/v1/Ribbon/Ribbon.js +3 -3
- package/es/v1/RippleEffect/RippleEffect.js +4 -4
- package/es/v1/Select/GroupSelect.js +16 -16
- package/es/v1/Select/Select.js +15 -15
- package/es/v1/Select/SelectWithAvatar.js +17 -17
- package/es/v1/Select/SelectWithIcon.js +13 -13
- package/es/v1/Select/index.js +4 -4
- package/es/v1/Select/props/defaultProps.js +1 -1
- package/es/v1/Stencils/Stencils.js +3 -3
- package/es/v1/Switch/Switch.js +5 -5
- package/es/v1/Tab/Tab.js +5 -5
- package/es/v1/Tab/TabContent.js +4 -4
- package/es/v1/Tab/TabContentWrapper.js +3 -3
- package/es/v1/Tab/TabWrapper.js +3 -3
- package/es/v1/Tab/Tabs.js +13 -13
- package/es/v1/Tab/index.js +5 -5
- package/es/v1/Tag/Tag.js +7 -7
- package/es/v1/TextBox/TextBox.js +3 -3
- package/es/v1/TextBoxIcon/TextBoxIcon.js +6 -6
- package/es/v1/TextBoxIcon/props/propTypes.js +1 -1
- package/es/v1/Textarea/Textarea.js +3 -3
- package/es/v1/Tooltip/Tooltip.js +6 -6
- package/es/v1/Typography/Typography.js +4 -4
- package/es/v1/Typography/css/cssJSLogic.js +1 -1
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/es/v1/semantic/Button/Button.js +3 -3
- package/es/v1/semantic/index.js +1 -1
- package/lib/CheckBox/CheckBox.js +5 -4
- package/lib/CheckBox/CheckBox.module.css +5 -2
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
- package/lib/DateTime/DateTime.js +11 -5
- package/lib/DateTime/DateWidget.js +8 -1
- package/lib/DateTime/props/propTypes.js +5 -0
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +1 -0
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +53 -48
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +2 -2
- package/lib/ListItem/ListItemWithAvatar.js +4 -8
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
- package/lib/ListItem/props/propTypes.js +1 -4
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +4 -2
- package/lib/MultiSelect/AdvancedMultiSelect.js +4 -2
- package/lib/MultiSelect/MultiSelect.js +4 -2
- package/lib/MultiSelect/props/propTypes.js +8 -6
- package/lib/Popup/Popup.js +184 -64
- package/lib/Popup/props/propTypes.js +1 -1
- package/lib/Radio/Radio.js +10 -7
- package/lib/Radio/Radio.module.css +1 -1
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
- package/lib/Select/GroupSelect.js +12 -5
- package/lib/Select/props/defaultProps.js +2 -1
- package/lib/Select/props/propTypes.js +5 -1
- package/lib/Textarea/Textarea.js +4 -2
- package/lib/Textarea/Textarea.module.css +1 -1
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
- package/lib/Textarea/props/propTypes.js +2 -1
- package/lib/Typography/Typography.js +56 -0
- package/lib/Typography/css/Typography.module.css +489 -0
- package/lib/Typography/css/cssJSLogic.js +48 -0
- package/lib/Typography/props/defaultProps.js +15 -0
- package/lib/Typography/props/propTypes.js +38 -0
- package/lib/Typography/utils/index.js +59 -0
- package/lib/index.js +1 -1
- package/lib/v1/Typography/Typography.js +2 -2
- package/package.json +4 -4
- package/result.json +1 -1
- /package/es/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
- /package/lib/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
package/lib/Popup/Popup.js
CHANGED
|
@@ -23,6 +23,8 @@ var _ResizeObserver = _interopRequireDefault(require("@zohodesk/virtualizer/lib/
|
|
|
23
23
|
|
|
24
24
|
var _intersectionObserver = require("./intersectionObserver");
|
|
25
25
|
|
|
26
|
+
var _DropBoxPositionMapping = require("../DropBox/DropBoxPositionMapping.js");
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
29
|
|
|
28
30
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -161,6 +163,12 @@ var Popup = function Popup(Component) {
|
|
|
161
163
|
_this.handleAddingScrollBlock = _this.handleAddingScrollBlock.bind(_assertThisInitialized(_this));
|
|
162
164
|
_this.handleRemovingScrollBlock = _this.handleRemovingScrollBlock.bind(_assertThisInitialized(_this));
|
|
163
165
|
_this.handleIntersectionObserver = _this.handleIntersectionObserver.bind(_assertThisInitialized(_this));
|
|
166
|
+
_this.updateVisibilityOnIntersection = _this.updateVisibilityOnIntersection.bind(_assertThisInitialized(_this));
|
|
167
|
+
_this.handleAddingScrollToUpdatePosition = _this.handleAddingScrollToUpdatePosition.bind(_assertThisInitialized(_this));
|
|
168
|
+
_this.handleRemovingScrollToUpdatePosition = _this.handleRemovingScrollToUpdatePosition.bind(_assertThisInitialized(_this));
|
|
169
|
+
_this.updatePositionOnScroll = _this.updatePositionOnScroll.bind(_assertThisInitialized(_this));
|
|
170
|
+
_this.setContainerDynamicPositioning = _this.setContainerDynamicPositioning.bind(_assertThisInitialized(_this));
|
|
171
|
+
_this.positionRef = /*#__PURE__*/_react["default"].createRef();
|
|
164
172
|
_this.popupObserver = new _ResizeObserver["default"](_this.handlePopupResize); //dropBoxSize
|
|
165
173
|
|
|
166
174
|
_this.size = null;
|
|
@@ -230,8 +238,10 @@ var Popup = function Popup(Component) {
|
|
|
230
238
|
|
|
231
239
|
if (isPopupReady) {
|
|
232
240
|
this.handleAddingScrollBlock();
|
|
241
|
+
this.handleAddingScrollToUpdatePosition();
|
|
233
242
|
} else {
|
|
234
243
|
this.handleRemovingScrollBlock();
|
|
244
|
+
this.handleRemovingScrollToUpdatePosition();
|
|
235
245
|
}
|
|
236
246
|
}
|
|
237
247
|
}
|
|
@@ -282,9 +292,9 @@ var Popup = function Popup(Component) {
|
|
|
282
292
|
value: function handleAddingScrollBlock() {
|
|
283
293
|
var _this$props = this.props,
|
|
284
294
|
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
285
|
-
|
|
295
|
+
fixedPopupScrollBehavior = _this$props.fixedPopupScrollBehavior;
|
|
286
296
|
|
|
287
|
-
if (
|
|
297
|
+
if (fixedPopupScrollBehavior === 'block' && !isAbsolutePositioningNeeded) {
|
|
288
298
|
(0, _intersectionObserver.addIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
289
299
|
this.addScrollBlockListeners();
|
|
290
300
|
}
|
|
@@ -294,13 +304,96 @@ var Popup = function Popup(Component) {
|
|
|
294
304
|
value: function handleRemovingScrollBlock() {
|
|
295
305
|
var _this$props2 = this.props,
|
|
296
306
|
isAbsolutePositioningNeeded = _this$props2.isAbsolutePositioningNeeded,
|
|
297
|
-
|
|
307
|
+
fixedPopupScrollBehavior = _this$props2.fixedPopupScrollBehavior;
|
|
298
308
|
|
|
299
|
-
if (
|
|
309
|
+
if (fixedPopupScrollBehavior === 'block' && !isAbsolutePositioningNeeded) {
|
|
300
310
|
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
301
311
|
this.removeScrollBlockListeners();
|
|
302
312
|
}
|
|
303
313
|
}
|
|
314
|
+
}, {
|
|
315
|
+
key: "handleAddingScrollToUpdatePosition",
|
|
316
|
+
value: function handleAddingScrollToUpdatePosition() {
|
|
317
|
+
var _this$props3 = this.props,
|
|
318
|
+
isAbsolutePositioningNeeded = _this$props3.isAbsolutePositioningNeeded,
|
|
319
|
+
fixedPopupScrollBehavior = _this$props3.fixedPopupScrollBehavior;
|
|
320
|
+
|
|
321
|
+
if (fixedPopupScrollBehavior === 'scroll' && !isAbsolutePositioningNeeded) {
|
|
322
|
+
(0, _intersectionObserver.addIntersectionObserver)(this.placeHolderElement, this.updateVisibilityOnIntersection);
|
|
323
|
+
document.addEventListener('scroll', this.updatePositionOnScroll, {
|
|
324
|
+
capture: true,
|
|
325
|
+
passive: false
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}, {
|
|
330
|
+
key: "handleRemovingScrollToUpdatePosition",
|
|
331
|
+
value: function handleRemovingScrollToUpdatePosition() {
|
|
332
|
+
var _this$props4 = this.props,
|
|
333
|
+
isAbsolutePositioningNeeded = _this$props4.isAbsolutePositioningNeeded,
|
|
334
|
+
fixedPopupScrollBehavior = _this$props4.fixedPopupScrollBehavior;
|
|
335
|
+
|
|
336
|
+
if (fixedPopupScrollBehavior === 'scroll' && !isAbsolutePositioningNeeded) {
|
|
337
|
+
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.updateVisibilityOnIntersection);
|
|
338
|
+
document.removeEventListener('scroll', this.updatePositionOnScroll, {
|
|
339
|
+
capture: true,
|
|
340
|
+
passive: false
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}, {
|
|
345
|
+
key: "setContainerDynamicPositioning",
|
|
346
|
+
value: function setContainerDynamicPositioning() {
|
|
347
|
+
var _this3 = this;
|
|
348
|
+
|
|
349
|
+
var placeHolderElement = this.placeHolderElement,
|
|
350
|
+
dropElement = this.dropElement,
|
|
351
|
+
defaultPosition = this.defaultPosition;
|
|
352
|
+
|
|
353
|
+
if (!dropElement) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
var needArrow = this.getNeedArrow(this);
|
|
358
|
+
var isAbsolute = this.getIsAbsolutePopup(this);
|
|
359
|
+
var customOrder = this.getCustomPositionOrder(this);
|
|
360
|
+
var styleToApply = {
|
|
361
|
+
top: '',
|
|
362
|
+
left: '',
|
|
363
|
+
right: '',
|
|
364
|
+
bottom: ''
|
|
365
|
+
};
|
|
366
|
+
requestAnimationFrame(function () {
|
|
367
|
+
var betterPosition = _viewPort["default"].betterView(dropElement, placeHolderElement, defaultPosition, '', {
|
|
368
|
+
needArrow: needArrow,
|
|
369
|
+
isAbsolute: isAbsolute,
|
|
370
|
+
customOrder: customOrder
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
var _ref3 = betterPosition || {},
|
|
374
|
+
view = _ref3.view,
|
|
375
|
+
viewsOffset = _ref3.viewsOffset;
|
|
376
|
+
|
|
377
|
+
Object.assign(styleToApply, viewsOffset[view]);
|
|
378
|
+
Object.assign(dropElement.style, {
|
|
379
|
+
inset: "".concat(styleToApply.top !== '' ? "".concat(styleToApply.top, "px") : 'auto', " ").concat(styleToApply.right !== '' ? "".concat(styleToApply.right, "px") : 'auto', " ").concat(styleToApply.bottom !== '' ? "".concat(styleToApply.bottom, "px") : 'auto', " ").concat(styleToApply.left !== '' ? "".concat(styleToApply.left, "px") : 'auto')
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
if (_this3.positionRef.current !== view) {
|
|
383
|
+
dropElement.setAttribute('data-position', "".concat(view));
|
|
384
|
+
dropElement.setAttribute('data-direction', "".concat(_DropBoxPositionMapping.positionMapping[view].direction));
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}, {
|
|
389
|
+
key: "updatePositionOnScroll",
|
|
390
|
+
value: function updatePositionOnScroll(e) {
|
|
391
|
+
if (e.target.contains(this.placeHolderElement)) {
|
|
392
|
+
// Set position for the dropbox
|
|
393
|
+
this.setContainerDynamicPositioning();
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
304
397
|
}, {
|
|
305
398
|
key: "addScrollBlockListeners",
|
|
306
399
|
value: function addScrollBlockListeners() {
|
|
@@ -383,6 +476,19 @@ var Popup = function Popup(Component) {
|
|
|
383
476
|
this.closePopupOnly();
|
|
384
477
|
}
|
|
385
478
|
}
|
|
479
|
+
}, {
|
|
480
|
+
key: "updateVisibilityOnIntersection",
|
|
481
|
+
value: function updateVisibilityOnIntersection(entry) {
|
|
482
|
+
var dropElement = this.dropElement;
|
|
483
|
+
|
|
484
|
+
if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
|
|
485
|
+
dropElement.setAttribute('data-visible', 'hidden');
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
if (entry.isIntersecting === true) {
|
|
489
|
+
dropElement.setAttribute('data-visible', 'visible');
|
|
490
|
+
}
|
|
491
|
+
}
|
|
386
492
|
}, {
|
|
387
493
|
key: "getGroup",
|
|
388
494
|
value: function getGroup() {
|
|
@@ -428,7 +534,7 @@ var Popup = function Popup(Component) {
|
|
|
428
534
|
}, {
|
|
429
535
|
key: "togglePopup",
|
|
430
536
|
value: function togglePopup(e, defaultPosition) {
|
|
431
|
-
var
|
|
537
|
+
var _this4 = this;
|
|
432
538
|
|
|
433
539
|
var group = this.getGroup();
|
|
434
540
|
this.removeClose(e);
|
|
@@ -437,7 +543,7 @@ var Popup = function Popup(Component) {
|
|
|
437
543
|
lastOpenedGroup = !isPopupOpen && lastOpenedGroup.indexOf(group) === -1 ? [group].concat(_toConsumableArray(lastOpenedGroup)) : lastOpenedGroup;
|
|
438
544
|
isPopupOpen && lastOpenedGroup.splice(0, 1);
|
|
439
545
|
groupPopups.forEach(function (popup) {
|
|
440
|
-
if (popup !==
|
|
546
|
+
if (popup !== _this4 && popup.state.isPopupOpen) {
|
|
441
547
|
popup.setState({
|
|
442
548
|
isPopupOpen: false,
|
|
443
549
|
isPopupReady: false
|
|
@@ -592,17 +698,20 @@ var Popup = function Popup(Component) {
|
|
|
592
698
|
}, {
|
|
593
699
|
key: "handlePopupPosition",
|
|
594
700
|
value: function handlePopupPosition() {
|
|
595
|
-
var
|
|
701
|
+
var _this5 = this;
|
|
596
702
|
|
|
597
703
|
var defaultPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottomCenter';
|
|
598
704
|
var isResizeHandling = arguments.length > 1 ? arguments[1] : undefined;
|
|
599
705
|
|
|
600
706
|
// isResizeHandling --->>> Window resize and dropBox resize
|
|
601
|
-
var
|
|
602
|
-
direction =
|
|
707
|
+
var _ref4 = this.context || {},
|
|
708
|
+
direction = _ref4.direction;
|
|
603
709
|
|
|
604
710
|
var placeHolderElement = this.placeHolderElement,
|
|
605
711
|
dropElement = this.dropElement;
|
|
712
|
+
var _this$props5 = this.props,
|
|
713
|
+
fixedPopupScrollBehavior = _this$props5.fixedPopupScrollBehavior,
|
|
714
|
+
isAbsolutePositioningNeeded = _this$props5.isAbsolutePositioningNeeded;
|
|
606
715
|
var needArrow = this.getNeedArrow(this);
|
|
607
716
|
var isAbsolute = this.getIsAbsolutePopup(this);
|
|
608
717
|
var customOrder = this.getCustomPositionOrder(this);
|
|
@@ -623,36 +732,47 @@ var Popup = function Popup(Component) {
|
|
|
623
732
|
|
|
624
733
|
var setPosition = function setPosition() {
|
|
625
734
|
requestAnimationFrame(function () {
|
|
626
|
-
var placeHolderElement =
|
|
627
|
-
dropElement =
|
|
628
|
-
var
|
|
629
|
-
position =
|
|
630
|
-
isPopupReady =
|
|
735
|
+
var placeHolderElement = _this5.placeHolderElement,
|
|
736
|
+
dropElement = _this5.dropElement;
|
|
737
|
+
var _this5$state = _this5.state,
|
|
738
|
+
position = _this5$state.position,
|
|
739
|
+
isPopupReady = _this5$state.isPopupReady;
|
|
631
740
|
var scrollContainer = placeHolderElement.closest('[data-scroll=true]') || document.body;
|
|
632
741
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
742
|
+
if (fixedPopupScrollBehavior === 'scroll' && !isAbsolutePositioningNeeded) {
|
|
743
|
+
if (!isPopupReady) {
|
|
744
|
+
_this5.setState({
|
|
745
|
+
isPopupReady: true,
|
|
746
|
+
isAbsolutePositioningNeeded: isAbsolute
|
|
747
|
+
});
|
|
748
|
+
}
|
|
638
749
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
if (position !== view || !isPopupReady) {
|
|
647
|
-
_this4.setState({
|
|
648
|
-
isPopupReady: true,
|
|
649
|
-
position: view,
|
|
650
|
-
positions: views,
|
|
651
|
-
positionsOffset: viewsOffset,
|
|
652
|
-
targetOffset: targetOffset,
|
|
653
|
-
popupOffset: popupOffset,
|
|
654
|
-
isAbsolutePositioningNeeded: isAbsolute
|
|
750
|
+
_this5.setContainerDynamicPositioning();
|
|
751
|
+
} else {
|
|
752
|
+
var betterPosition = _viewPort["default"].betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
|
|
753
|
+
needArrow: needArrow,
|
|
754
|
+
isAbsolute: isAbsolute,
|
|
755
|
+
customOrder: customOrder
|
|
655
756
|
});
|
|
757
|
+
|
|
758
|
+
var _ref5 = betterPosition || {},
|
|
759
|
+
view = _ref5.view,
|
|
760
|
+
views = _ref5.views,
|
|
761
|
+
viewsOffset = _ref5.viewsOffset,
|
|
762
|
+
targetOffset = _ref5.targetOffset,
|
|
763
|
+
popupOffset = _ref5.popupOffset;
|
|
764
|
+
|
|
765
|
+
if (position !== view || !isPopupReady) {
|
|
766
|
+
_this5.setState({
|
|
767
|
+
isPopupReady: true,
|
|
768
|
+
position: view,
|
|
769
|
+
positions: views,
|
|
770
|
+
positionsOffset: viewsOffset,
|
|
771
|
+
targetOffset: targetOffset,
|
|
772
|
+
popupOffset: popupOffset,
|
|
773
|
+
isAbsolutePositioningNeeded: isAbsolute
|
|
774
|
+
});
|
|
775
|
+
}
|
|
656
776
|
}
|
|
657
777
|
});
|
|
658
778
|
};
|
|
@@ -670,7 +790,7 @@ var Popup = function Popup(Component) {
|
|
|
670
790
|
}, {
|
|
671
791
|
key: "handleOpenPopupPositionChange",
|
|
672
792
|
value: function handleOpenPopupPositionChange() {
|
|
673
|
-
var
|
|
793
|
+
var _this6 = this;
|
|
674
794
|
|
|
675
795
|
Object.keys(popups).forEach(function (groupName) {
|
|
676
796
|
var groupPopups = popups[groupName] || [];
|
|
@@ -687,11 +807,11 @@ var Popup = function Popup(Component) {
|
|
|
687
807
|
if (placeHolderElement && dropElement) {
|
|
688
808
|
var scrollContainer = placeHolderElement.closest('[data-scroll=true]') || document.body;
|
|
689
809
|
requestAnimationFrame(function () {
|
|
690
|
-
var needArrow =
|
|
810
|
+
var needArrow = _this6.getNeedArrow(popup);
|
|
691
811
|
|
|
692
|
-
var isAbsolute =
|
|
812
|
+
var isAbsolute = _this6.getIsAbsolutePopup(popup);
|
|
693
813
|
|
|
694
|
-
var customOrder =
|
|
814
|
+
var customOrder = _this6.getCustomPositionOrder(popup);
|
|
695
815
|
|
|
696
816
|
var betterPosition = _viewPort["default"].betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
|
|
697
817
|
needArrow: needArrow,
|
|
@@ -699,29 +819,29 @@ var Popup = function Popup(Component) {
|
|
|
699
819
|
customOrder: customOrder
|
|
700
820
|
});
|
|
701
821
|
|
|
702
|
-
var
|
|
703
|
-
view =
|
|
704
|
-
views =
|
|
705
|
-
|
|
706
|
-
viewsOffset =
|
|
707
|
-
targetOffset =
|
|
708
|
-
popupOffset =
|
|
709
|
-
|
|
710
|
-
var
|
|
711
|
-
_ref6$left = _ref6.left,
|
|
712
|
-
oldLeft = _ref6$left === void 0 ? '' : _ref6$left,
|
|
713
|
-
_ref6$top = _ref6.top,
|
|
714
|
-
oldTop = _ref6$top === void 0 ? '' : _ref6$top,
|
|
715
|
-
_ref6$bottom = _ref6.bottom,
|
|
716
|
-
oldBottom = _ref6$bottom === void 0 ? '' : _ref6$bottom;
|
|
717
|
-
|
|
718
|
-
var _ref7 = viewsOffset[view] || {},
|
|
822
|
+
var _ref6 = betterPosition || {},
|
|
823
|
+
view = _ref6.view,
|
|
824
|
+
views = _ref6.views,
|
|
825
|
+
_ref6$viewsOffset = _ref6.viewsOffset,
|
|
826
|
+
viewsOffset = _ref6$viewsOffset === void 0 ? {} : _ref6$viewsOffset,
|
|
827
|
+
targetOffset = _ref6.targetOffset,
|
|
828
|
+
popupOffset = _ref6.popupOffset;
|
|
829
|
+
|
|
830
|
+
var _ref7 = positionsOffset[position] || {},
|
|
719
831
|
_ref7$left = _ref7.left,
|
|
720
|
-
|
|
832
|
+
oldLeft = _ref7$left === void 0 ? '' : _ref7$left,
|
|
721
833
|
_ref7$top = _ref7.top,
|
|
722
|
-
|
|
834
|
+
oldTop = _ref7$top === void 0 ? '' : _ref7$top,
|
|
723
835
|
_ref7$bottom = _ref7.bottom,
|
|
724
|
-
|
|
836
|
+
oldBottom = _ref7$bottom === void 0 ? '' : _ref7$bottom;
|
|
837
|
+
|
|
838
|
+
var _ref8 = viewsOffset[view] || {},
|
|
839
|
+
_ref8$left = _ref8.left,
|
|
840
|
+
left = _ref8$left === void 0 ? '' : _ref8$left,
|
|
841
|
+
_ref8$top = _ref8.top,
|
|
842
|
+
top = _ref8$top === void 0 ? '' : _ref8$top,
|
|
843
|
+
_ref8$bottom = _ref8.bottom,
|
|
844
|
+
bottom = _ref8$bottom === void 0 ? '' : _ref8$bottom;
|
|
725
845
|
|
|
726
846
|
var changeState = isAbsolute ? position !== view : oldLeft !== left || oldTop !== top || oldBottom !== bottom; // let isInViewPort = viewPort.isInViewPort(
|
|
727
847
|
// placeHolderElement,
|
|
@@ -785,11 +905,11 @@ var Popup = function Popup(Component) {
|
|
|
785
905
|
var height = popupSize.height,
|
|
786
906
|
width = popupSize.width;
|
|
787
907
|
|
|
788
|
-
var
|
|
789
|
-
|
|
790
|
-
oldHeight =
|
|
791
|
-
|
|
792
|
-
oldWidth =
|
|
908
|
+
var _ref9 = this.size || {},
|
|
909
|
+
_ref9$height = _ref9.height,
|
|
910
|
+
oldHeight = _ref9$height === void 0 ? 0 : _ref9$height,
|
|
911
|
+
_ref9$width = _ref9.width,
|
|
912
|
+
oldWidth = _ref9$width === void 0 ? 0 : _ref9$width;
|
|
793
913
|
|
|
794
914
|
var _this$state = this.state,
|
|
795
915
|
isPopupReady = _this$state.isPopupReady,
|
|
@@ -24,7 +24,7 @@ var PopupPropTypes = {
|
|
|
24
24
|
isArrow: _propTypes["default"].bool,
|
|
25
25
|
isPopupOpen: _propTypes["default"].bool,
|
|
26
26
|
closeOnScroll: _propTypes["default"].bool,
|
|
27
|
-
|
|
27
|
+
fixedPopupScrollBehavior: _propTypes["default"].oneOf(['scroll', 'block', 'none']),
|
|
28
28
|
needResizeHandling: _propTypes["default"].bool,
|
|
29
29
|
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
30
30
|
scrollDebounceTime: _propTypes["default"].number,
|
package/lib/Radio/Radio.js
CHANGED
|
@@ -17,6 +17,8 @@ var _Label = _interopRequireDefault(require("../Label/Label"));
|
|
|
17
17
|
|
|
18
18
|
var _Layout = require("../Layout");
|
|
19
19
|
|
|
20
|
+
var _CssProvider = _interopRequireDefault(require("../Provider/CssProvider"));
|
|
21
|
+
|
|
20
22
|
var _RadioModule = _interopRequireDefault(require("./Radio.module.css"));
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -106,8 +108,9 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
106
108
|
customRadio = _customClass$customRa2 === void 0 ? '' : _customClass$customRa2,
|
|
107
109
|
_customClass$customLa = customClass.customLabel,
|
|
108
110
|
customLabel = _customClass$customLa === void 0 ? '' : _customClass$customLa;
|
|
109
|
-
var accessMode = isReadOnly ? _RadioModule["default"].readonly : disabled ?
|
|
111
|
+
var accessMode = isReadOnly ? _RadioModule["default"].readonly : disabled ? (0, _CssProvider["default"])('isDisabled') : _RadioModule["default"].pointer;
|
|
110
112
|
var toolTip = disabled ? disabledTitle : title ? title : null;
|
|
113
|
+
var isEditable = !(isReadOnly || disabled);
|
|
111
114
|
var ariaHidden = a11y.ariaHidden,
|
|
112
115
|
_a11y$role = a11y.role,
|
|
113
116
|
role = _a11y$role === void 0 ? 'radio' : _a11y$role,
|
|
@@ -117,7 +120,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
117
120
|
ariaLabel = a11y.ariaLabel,
|
|
118
121
|
ariaLabelledby = a11y.ariaLabelledby,
|
|
119
122
|
_a11y$ariaReadonly = a11y.ariaReadonly,
|
|
120
|
-
ariaReadonly = _a11y$ariaReadonly === void 0 ?
|
|
123
|
+
ariaReadonly = _a11y$ariaReadonly === void 0 ? !isEditable ? true : false : _a11y$ariaReadonly;
|
|
121
124
|
var _customProps$Containe = customProps.ContainerProps,
|
|
122
125
|
ContainerProps = _customProps$Containe === void 0 ? {} : _customProps$Containe,
|
|
123
126
|
_customProps$LabelPro = customProps.LabelProps,
|
|
@@ -128,11 +131,11 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
128
131
|
isInline: text ? false : true,
|
|
129
132
|
alignBox: "row",
|
|
130
133
|
align: "both",
|
|
131
|
-
className: "".concat(_RadioModule["default"].container, " ").concat(active && !disabled ? _RadioModule["default"].active : '', " ").concat(accessMode, " ").concat(
|
|
134
|
+
className: "".concat(_RadioModule["default"].container, " ").concat(active && !disabled ? _RadioModule["default"].active : '', " ").concat(accessMode, " ").concat(!isEditable ? '' : _RadioModule["default"].hoverEfffect, " ").concat(checked ? _RadioModule["default"].checked : '', " ").concat(customRadioWrap),
|
|
132
135
|
"data-title": toolTip,
|
|
133
136
|
onClick: !isReadOnly && !disabled ? this.onChange : '',
|
|
134
137
|
"aria-checked": ariaChecked,
|
|
135
|
-
tabindex:
|
|
138
|
+
tabindex: !isEditable || ariaHidden ? '-1' : tabIndex || '0',
|
|
136
139
|
eleRef: this.handleGetRef,
|
|
137
140
|
role: role,
|
|
138
141
|
"aria-Hidden": ariaHidden,
|
|
@@ -140,7 +143,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
140
143
|
"aria-labelledby": ariaLabelledby,
|
|
141
144
|
"aria-readonly": ariaReadonly
|
|
142
145
|
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
143
|
-
className: "".concat(_RadioModule["default"].radio, " ").concat(checked ? "".concat(_RadioModule["default"]["rdBox".concat(palette)]) : '', " \n ").concat(
|
|
146
|
+
className: "".concat(_RadioModule["default"].radio, " ").concat(checked ? "".concat(_RadioModule["default"]["rdBox".concat(palette)]) : '', " \n ").concat(!isEditable ? '' : "".concat(_RadioModule["default"]["hover".concat(palette)]), " ").concat(_RadioModule["default"][size], " ").concat(isFilled ? _RadioModule["default"].filled : '', " ").concat(_RadioModule["default"]["centerPath".concat(palette)], " ").concat(customRadio, " ").concat(!isEditable ? "".concat(_RadioModule["default"].disabled) : '')
|
|
144
147
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
145
148
|
type: "hidden",
|
|
146
149
|
id: id,
|
|
@@ -163,7 +166,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
163
166
|
className: "".concat(_RadioModule["default"].centerPath)
|
|
164
167
|
}) : null))), text && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
165
168
|
flexible: true,
|
|
166
|
-
className: _RadioModule["default"].text
|
|
169
|
+
className: "".concat(_RadioModule["default"].text, " ").concat(disabled ? "".concat(_RadioModule["default"].disabled) : '')
|
|
167
170
|
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
168
171
|
text: text,
|
|
169
172
|
palette: labelPalette,
|
|
@@ -173,7 +176,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
173
176
|
dataId: "".concat(text, "_label"),
|
|
174
177
|
variant: variant,
|
|
175
178
|
title: toolTip ? toolTip : text,
|
|
176
|
-
customClass: "".concat(checked && active ? "".concat(_RadioModule["default"]["".concat(palette, "checkedActive")]) : '', " \n ").concat(_RadioModule["default"]["".concat(palette, "Label")], " ").concat(
|
|
179
|
+
customClass: "".concat(checked && active ? "".concat(_RadioModule["default"]["".concat(palette, "checkedActive")]) : '', " \n ").concat(_RadioModule["default"]["".concat(palette, "Label")], " ").concat(isEditable ? _RadioModule["default"].pointer : '', " ").concat(isReadOnly ? _RadioModule["default"].readonly : '', " ").concat(customLabel)
|
|
177
180
|
}, LabelProps))), children, renderRightPlaceholderNode ? renderRightPlaceholderNode : null);
|
|
178
181
|
}
|
|
179
182
|
}]);
|