@zohodesk/components 1.0.0-alpha-252 → 1.0.0-alpha-254
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/README.md +6 -0
- package/assets/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/green/greenDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/orange/orangeDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/red/redDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/yellow/yellowDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/green/greenDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/orange/orangeDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/red/redDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/yellow/yellowDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkComponentTheme.module.css +3 -0
- package/css_error.log +0 -0
- package/es/AppContainer/AppContainer.js +1 -0
- package/es/Avatar/Avatar.js +2 -1
- package/es/Button/Button.js +5 -3
- package/es/Card/props/defaultProps.js +0 -1
- package/es/Card/props/propTypes.js +2 -2
- package/es/DateTime/CalendarView.js +4 -2
- package/es/DateTime/DateTime.module.css +1 -0
- package/es/DateTime/DateTimePopupHeader.js +21 -8
- package/es/DateTime/DateWidget.js +4 -2
- package/es/DateTime/DaysRow.js +2 -1
- package/es/DateTime/YearView.js +12 -4
- package/es/DateTime/YearView.module.css +19 -1
- package/es/DropBox/DropBox.js +24 -4
- package/es/DropBox/props/defaultProps.js +2 -1
- package/es/DropBox/props/propTypes.js +1 -0
- package/es/DropDown/DropDownHeading.js +3 -1
- package/es/DropDown/props/propTypes.js +2 -1
- package/es/Label/Label.js +4 -2
- package/es/Layout/props/propTypes.js +3 -3
- package/es/ListItem/ListContainer.js +5 -2
- package/es/MultiSelect/MultiSelect.js +4 -2
- package/es/MultiSelect/Suggestions.js +2 -1
- package/es/Responsive/CustomResponsive.js +7 -3
- package/es/Select/Select.js +7 -4
- package/es/Select/SelectWithIcon.js +2 -1
- package/es/Switch/Switch.js +7 -5
- package/es/Tab/TabContent.js +1 -1
- package/es/Tab/Tabs.js +13 -7
- package/es/Tab/Tabs.module.css +1 -1
- package/es/Tooltip/Tooltip.js +4 -1
- package/es/common/a11y.module.css +4 -0
- package/es/index.js +107 -106
- package/lib/AppContainer/AppContainer.js +1 -0
- package/lib/Avatar/Avatar.js +2 -1
- package/lib/Button/Button.js +5 -3
- package/lib/Card/props/defaultProps.js +0 -1
- package/lib/Card/props/propTypes.js +2 -2
- package/lib/DateTime/CalendarView.js +4 -2
- package/lib/DateTime/DateTime.module.css +1 -0
- package/lib/DateTime/DateTimePopupHeader.js +21 -8
- package/lib/DateTime/DateWidget.js +4 -2
- package/lib/DateTime/DaysRow.js +2 -1
- package/lib/DateTime/YearView.js +12 -4
- package/lib/DateTime/YearView.module.css +19 -1
- package/lib/DropBox/DropBox.js +24 -4
- package/lib/DropBox/props/defaultProps.js +2 -1
- package/lib/DropBox/props/propTypes.js +1 -0
- package/lib/DropDown/DropDownHeading.js +3 -1
- package/lib/DropDown/props/propTypes.js +2 -1
- package/lib/Label/Label.js +4 -2
- package/lib/Layout/props/propTypes.js +3 -3
- package/lib/ListItem/ListContainer.js +5 -2
- package/lib/MultiSelect/MultiSelect.js +4 -2
- package/lib/MultiSelect/Suggestions.js +2 -1
- package/lib/Responsive/CustomResponsive.js +7 -3
- package/lib/Select/Select.js +7 -4
- package/lib/Select/SelectWithIcon.js +2 -1
- package/lib/Switch/Switch.js +7 -5
- package/lib/Tab/TabContent.js +1 -1
- package/lib/Tab/Tabs.js +13 -7
- package/lib/Tab/Tabs.module.css +1 -1
- package/lib/Tooltip/Tooltip.js +4 -1
- package/lib/common/a11y.module.css +4 -0
- package/lib/index.js +1 -842
- package/package.json +14 -7
- package/es/Accordion/docs/Accordion__Demo.docs.js +0 -78
- package/es/Animation/docs/Animation__default.docs.js +0 -32
- package/es/Animation/docs/Animation__fadeIn.docs.js +0 -32
- package/es/Animation/docs/Animation__scaleIn.docs.js +0 -32
- package/es/Animation/docs/Animation__skewIn.docs.js +0 -32
- package/es/Animation/docs/Animation__slideDown.docs.js +0 -32
- package/es/Animation/docs/Animation__slideLeft.docs.js +0 -32
- package/es/Animation/docs/Animation__zoomIn.docs.js +0 -32
- package/es/AppContainer/docs/AppContainer__default.docs.js +0 -18
- package/es/Avatar/docs/Avatar__custom.docs.js +0 -27
- package/es/Avatar/docs/Avatar__default.docs.js +0 -27
- package/es/Avatar/docs/Avatar__palette.docs.js +0 -47
- package/es/Avatar/docs/Avatar__text.docs.js +0 -26
- package/es/AvatarTeam/docs/AvatarTeam__custom.docs.js +0 -71
- package/es/AvatarTeam/docs/AvatarTeam__default.docs.js +0 -29
- package/es/AvatarTeam/docs/AvatarTeam__palette.docs.js +0 -48
- package/es/AvatarTeam/docs/AvatarTeam__size.docs.js +0 -47
- package/es/Button/docs/Button__custom.docs.js +0 -769
- package/es/Button/docs/Button__default.docs.js +0 -534
- package/es/Buttongroup/docs/Buttongroup__custom.docs.js +0 -35
- package/es/Buttongroup/docs/Buttongroup__footer.docs.js +0 -31
- package/es/Buttongroup/docs/Buttongroup__header.docs.js +0 -40
- package/es/Card/docs/Card__Custom.docs.js +0 -32
- package/es/Card/docs/Card__Default.docs.js +0 -35
- package/es/Card/docs/Card__Scroll.docs.js +0 -56
- package/es/CheckBox/docs/CheckBox__custom.docs.js +0 -289
- package/es/CheckBox/docs/CheckBox__default.docs.js +0 -215
- package/es/DateTime/docs/DateTime__default.docs.js +0 -88
- package/es/DateTime/docs/DateWidget__default.docs.js +0 -178
- package/es/DateTime/docs/timezonedata.json +0 -1
- package/es/DropBox/docs/DropBox__custom.docs.js +0 -64
- package/es/DropBox/docs/DropBox__customOrder.docs.js +0 -85
- package/es/DropBox/docs/DropBox__fixedPosition.docs.js +0 -84
- package/es/DropBox/docs/DropBox__position.docs.js +0 -85
- package/es/DropBox/docs/DropBox__size.docs.js +0 -59
- package/es/DropDown/docs/DropDownHeading__custom.docs.js +0 -21
- package/es/DropDown/docs/DropDownHeading__default.docs.js +0 -19
- package/es/Heading/docs/Heading__default.docs.js +0 -19
- package/es/Label/docs/Label__clipped.docs.js +0 -25
- package/es/Label/docs/Label__custom.docs.js +0 -28
- package/es/Label/docs/Label__palette.docs.js +0 -40
- package/es/Label/docs/Label__size.docs.js +0 -27
- package/es/Label/docs/Label__type.docs.js +0 -35
- package/es/Layout/docs/Layout__Hidden.docs.js +0 -76
- package/es/Layout/docs/Layout__default.docs.js +0 -48
- package/es/Layout/docs/Layout__four_Column.docs.js +0 -78
- package/es/Layout/docs/Layout__three_Column.docs.js +0 -75
- package/es/Layout/docs/Layout__two_Column.docs.js +0 -68
- package/es/LightNightMode/Colors.json +0 -497
- package/es/LightNightMode/docs/AlternativeColors.docs.js +0 -92
- package/es/ListItem/docs/ListItemWithAvatar__custom.docs.js +0 -153
- package/es/ListItem/docs/ListItemWithAvatar__default.docs.js +0 -110
- package/es/ListItem/docs/ListItemWithCheckBox__custom.docs.js +0 -89
- package/es/ListItem/docs/ListItemWithCheckBox__default.docs.js +0 -63
- package/es/ListItem/docs/ListItemWithIcon__custom.docs.js +0 -66
- package/es/ListItem/docs/ListItemWithIcon__default.docs.js +0 -60
- package/es/ListItem/docs/ListItemWithRadio__custom.docs.js +0 -89
- package/es/ListItem/docs/ListItemWithRadio__default.docs.js +0 -63
- package/es/ListItem/docs/ListItem__custom.docs.js +0 -112
- package/es/ListItem/docs/ListItem__default.docs.js +0 -80
- package/es/Modal/__docs__/Modal__default.docs.js +0 -42
- package/es/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +0 -118
- package/es/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +0 -108
- package/es/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +0 -137
- package/es/MultiSelect/docs/MultiSelect__default.docs.js +0 -156
- package/es/PopOver/docs/PopOver__default.docs.js +0 -30
- package/es/Provider/docs/Provider_Id__Class.docs.js +0 -28
- package/es/Provider/docs/Provider_Id__Function.docs.js +0 -17
- package/es/Provider/docs/Provider_Zindex__Class.docs.js +0 -31
- package/es/Provider/docs/Provider_Zindex__Function.docs.js +0 -22
- package/es/Provider.js +0 -91
- package/es/Radio/docs/Radio__custom.docs.js +0 -241
- package/es/Radio/docs/Radio__default.docs.js +0 -165
- package/es/Responsive/docs/Responsive__Custom.docs.js +0 -214
- package/es/Responsive/docs/Responsive__default.docs.js +0 -95
- package/es/Responsive/docs/style.module.css +0 -56
- package/es/Ribbon/docs/Ribbon__custom.docs.js +0 -385
- package/es/Ribbon/docs/Ribbon__default.docs.js +0 -341
- package/es/RippleEffect/docs/RippleEffect__default.docs.js +0 -433
- package/es/Select/docs/GroupSelect__default.docs.js +0 -144
- package/es/Select/docs/SelectWithAvatar__default.docs.js +0 -93
- package/es/Select/docs/SelectWithIcon__default.docs.js +0 -134
- package/es/Select/docs/Select__default.docs.js +0 -283
- package/es/Stencils/docs/Stencils__custom.docs.js +0 -43
- package/es/Stencils/docs/Stencils__default.docs.js +0 -48
- package/es/Switch/docs/Switch__custom.docs.js +0 -151
- package/es/Switch/docs/Switch__default.docs.js +0 -105
- package/es/Tab/docs/Tab__default.docs.js +0 -253
- package/es/Tab/docs/tabdocs.module.css +0 -29
- package/es/Tag/docs/Tag__custom.docs.js +0 -366
- package/es/Tag/docs/Tag__default.docs.js +0 -321
- package/es/TextBox/docs/TextBox__custom.docs.js +0 -41
- package/es/TextBox/docs/TextBox__default.docs.js +0 -38
- package/es/TextBox/docs/TextBox__size.docs.js +0 -36
- package/es/TextBox/docs/TextBox__variant.docs.js +0 -36
- package/es/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +0 -87
- package/es/TextBoxIcon/docs/TextBoxIcon__default.docs.js +0 -59
- package/es/Textarea/docs/Textarea__animated.docs.js +0 -39
- package/es/Textarea/docs/Textarea__custom.docs.js +0 -80
- package/es/Textarea/docs/Textarea__default.docs.js +0 -74
- package/es/Textarea/docs/Textarea__disabled.docs.js +0 -27
- package/es/Tooltip/docs/Tooltip__default.docs.js +0 -367
- package/es/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +0 -92
- package/es/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +0 -139
- package/es/common/docStyle.module.css +0 -766
- package/es/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +0 -65
- package/es/semantic/Button/docs/Button__default.docs.js +0 -17
- package/lib/Accordion/docs/Accordion__Demo.docs.js +0 -104
- package/lib/Animation/docs/Animation__default.docs.js +0 -61
- package/lib/Animation/docs/Animation__fadeIn.docs.js +0 -61
- package/lib/Animation/docs/Animation__scaleIn.docs.js +0 -61
- package/lib/Animation/docs/Animation__skewIn.docs.js +0 -61
- package/lib/Animation/docs/Animation__slideDown.docs.js +0 -61
- package/lib/Animation/docs/Animation__slideLeft.docs.js +0 -61
- package/lib/Animation/docs/Animation__zoomIn.docs.js +0 -61
- package/lib/AppContainer/docs/AppContainer__default.docs.js +0 -47
- package/lib/Avatar/docs/Avatar__custom.docs.js +0 -62
- package/lib/Avatar/docs/Avatar__default.docs.js +0 -60
- package/lib/Avatar/docs/Avatar__palette.docs.js +0 -82
- package/lib/Avatar/docs/Avatar__text.docs.js +0 -61
- package/lib/AvatarTeam/docs/AvatarTeam__custom.docs.js +0 -100
- package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +0 -58
- package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +0 -77
- package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +0 -76
- package/lib/Button/docs/Button__custom.docs.js +0 -800
- package/lib/Button/docs/Button__default.docs.js +0 -565
- package/lib/Buttongroup/docs/Buttongroup__custom.docs.js +0 -64
- package/lib/Buttongroup/docs/Buttongroup__footer.docs.js +0 -60
- package/lib/Buttongroup/docs/Buttongroup__header.docs.js +0 -71
- package/lib/Card/docs/Card__Custom.docs.js +0 -63
- package/lib/Card/docs/Card__Default.docs.js +0 -66
- package/lib/Card/docs/Card__Scroll.docs.js +0 -87
- package/lib/CheckBox/docs/CheckBox__custom.docs.js +0 -323
- package/lib/CheckBox/docs/CheckBox__default.docs.js +0 -249
- package/lib/DateTime/docs/DateTime__default.docs.js +0 -119
- package/lib/DateTime/docs/DateWidget__default.docs.js +0 -212
- package/lib/DateTime/docs/timezonedata.json +0 -1
- package/lib/DropBox/docs/DropBox__custom.docs.js +0 -97
- package/lib/DropBox/docs/DropBox__customOrder.docs.js +0 -114
- package/lib/DropBox/docs/DropBox__fixedPosition.docs.js +0 -113
- package/lib/DropBox/docs/DropBox__position.docs.js +0 -118
- package/lib/DropBox/docs/DropBox__size.docs.js +0 -92
- package/lib/DropDown/docs/DropDownHeading__custom.docs.js +0 -50
- package/lib/DropDown/docs/DropDownHeading__default.docs.js +0 -48
- package/lib/Heading/docs/Heading__default.docs.js +0 -50
- package/lib/Label/docs/Label__clipped.docs.js +0 -56
- package/lib/Label/docs/Label__custom.docs.js +0 -59
- package/lib/Label/docs/Label__palette.docs.js +0 -71
- package/lib/Label/docs/Label__size.docs.js +0 -58
- package/lib/Label/docs/Label__type.docs.js +0 -66
- package/lib/Layout/docs/Layout__Hidden.docs.js +0 -105
- package/lib/Layout/docs/Layout__default.docs.js +0 -77
- package/lib/Layout/docs/Layout__four_Column.docs.js +0 -107
- package/lib/Layout/docs/Layout__three_Column.docs.js +0 -104
- package/lib/Layout/docs/Layout__two_Column.docs.js +0 -97
- package/lib/LightNightMode/Colors.json +0 -497
- package/lib/LightNightMode/docs/AlternativeColors.docs.js +0 -128
- package/lib/ListItem/docs/ListItemWithAvatar__custom.docs.js +0 -182
- package/lib/ListItem/docs/ListItemWithAvatar__default.docs.js +0 -139
- package/lib/ListItem/docs/ListItemWithCheckBox__custom.docs.js +0 -118
- package/lib/ListItem/docs/ListItemWithCheckBox__default.docs.js +0 -92
- package/lib/ListItem/docs/ListItemWithIcon__custom.docs.js +0 -95
- package/lib/ListItem/docs/ListItemWithIcon__default.docs.js +0 -89
- package/lib/ListItem/docs/ListItemWithRadio__custom.docs.js +0 -118
- package/lib/ListItem/docs/ListItemWithRadio__default.docs.js +0 -92
- package/lib/ListItem/docs/ListItem__custom.docs.js +0 -141
- package/lib/ListItem/docs/ListItem__default.docs.js +0 -109
- package/lib/Modal/__docs__/Modal__default.docs.js +0 -65
- package/lib/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +0 -154
- package/lib/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +0 -140
- package/lib/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +0 -165
- package/lib/MultiSelect/docs/MultiSelect__default.docs.js +0 -186
- package/lib/PopOver/docs/PopOver__default.docs.js +0 -61
- package/lib/Provider/docs/Provider_Id__Class.docs.js +0 -56
- package/lib/Provider/docs/Provider_Id__Function.docs.js +0 -24
- package/lib/Provider/docs/Provider_Zindex__Class.docs.js +0 -59
- package/lib/Provider/docs/Provider_Zindex__Function.docs.js +0 -29
- package/lib/Provider.js +0 -116
- package/lib/Radio/docs/Radio__custom.docs.js +0 -273
- package/lib/Radio/docs/Radio__default.docs.js +0 -197
- package/lib/Responsive/docs/Responsive__Custom.docs.js +0 -247
- package/lib/Responsive/docs/Responsive__default.docs.js +0 -118
- package/lib/Responsive/docs/style.module.css +0 -56
- package/lib/Ribbon/docs/Ribbon__custom.docs.js +0 -414
- package/lib/Ribbon/docs/Ribbon__default.docs.js +0 -370
- package/lib/RippleEffect/docs/RippleEffect__default.docs.js +0 -462
- package/lib/Select/docs/GroupSelect__default.docs.js +0 -173
- package/lib/Select/docs/SelectWithAvatar__default.docs.js +0 -124
- package/lib/Select/docs/SelectWithIcon__default.docs.js +0 -165
- package/lib/Select/docs/Select__default.docs.js +0 -313
- package/lib/Stencils/docs/Stencils__custom.docs.js +0 -72
- package/lib/Stencils/docs/Stencils__default.docs.js +0 -77
- package/lib/Switch/docs/Switch__custom.docs.js +0 -180
- package/lib/Switch/docs/Switch__default.docs.js +0 -134
- package/lib/Tab/docs/Tab__default.docs.js +0 -283
- package/lib/Tab/docs/tabdocs.module.css +0 -29
- package/lib/Tag/docs/Tag__custom.docs.js +0 -397
- package/lib/Tag/docs/Tag__default.docs.js +0 -352
- package/lib/TextBox/docs/TextBox__custom.docs.js +0 -72
- package/lib/TextBox/docs/TextBox__default.docs.js +0 -69
- package/lib/TextBox/docs/TextBox__size.docs.js +0 -67
- package/lib/TextBox/docs/TextBox__variant.docs.js +0 -67
- package/lib/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +0 -118
- package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +0 -90
- package/lib/Textarea/docs/Textarea__animated.docs.js +0 -70
- package/lib/Textarea/docs/Textarea__custom.docs.js +0 -111
- package/lib/Textarea/docs/Textarea__default.docs.js +0 -105
- package/lib/Textarea/docs/Textarea__disabled.docs.js +0 -58
- package/lib/Tooltip/docs/Tooltip__default.docs.js +0 -402
- package/lib/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +0 -123
- package/lib/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +0 -174
- package/lib/common/docStyle.module.css +0 -766
- package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +0 -111
- package/lib/semantic/Button/docs/Button__default.docs.js +0 -43
|
@@ -19,10 +19,10 @@ var CardContent_propTypes = {
|
|
|
19
19
|
eleRef: _propTypes["default"].func,
|
|
20
20
|
isScrollAttribute: _propTypes["default"].bool,
|
|
21
21
|
onScroll: _propTypes["default"].func,
|
|
22
|
-
scroll: _propTypes["default"].
|
|
22
|
+
scroll: _propTypes["default"].oneOf(['vertical', 'horizontal', 'both', 'none']),
|
|
23
23
|
shrink: _propTypes["default"].bool,
|
|
24
24
|
customClass: _propTypes["default"].string,
|
|
25
|
-
preventParentScroll: _propTypes["default"].
|
|
25
|
+
preventParentScroll: _propTypes["default"].oneOf(['vertical', 'horizontal', 'both'])
|
|
26
26
|
};
|
|
27
27
|
exports.CardContent_propTypes = CardContent_propTypes;
|
|
28
28
|
var Card_propTypes = {
|
|
@@ -170,7 +170,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
170
170
|
}();
|
|
171
171
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_DaysRow["default"], {
|
|
172
172
|
dayNames: dayNames,
|
|
173
|
-
dayNamesShort: dayNamesShort
|
|
173
|
+
dayNamesShort: dayNamesShort,
|
|
174
|
+
ariaLabel: dayNamesShort
|
|
174
175
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
175
176
|
"data-id": "".concat(dataId, "_dateContainer"),
|
|
176
177
|
className: "".concat(_DateTimeModule["default"].dateContainer, " ").concat(needBorder ? _DateTimeModule["default"].separator : '')
|
|
@@ -216,7 +217,8 @@ var Span = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
216
217
|
dataId: dataId,
|
|
217
218
|
className: "".concat(tdclass, " ").concat(isActive ? _DateTimeModule["default"].active : '', " ").concat(isToday ? _DateTimeModule["default"].today : ''),
|
|
218
219
|
key: i,
|
|
219
|
-
onClick: this.handleSelectChild
|
|
220
|
+
onClick: this.handleSelectChild,
|
|
221
|
+
"aria-label": incremday
|
|
220
222
|
}, incremday);
|
|
221
223
|
}
|
|
222
224
|
}]);
|
|
@@ -8,6 +8,7 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _Layout = require("../Layout");
|
|
10
10
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
11
|
+
var _Heading = _interopRequireDefault(require("../Heading/Heading"));
|
|
11
12
|
var _DateTimeModule = _interopRequireDefault(require("./DateTime.module.css"));
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -48,12 +49,15 @@ var Span = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
48
49
|
children = _this$props2.children,
|
|
49
50
|
dataId = _this$props2.dataId,
|
|
50
51
|
_this$props2$classNam = _this$props2.className,
|
|
51
|
-
className = _this$props2$classNam === void 0 ? '' : _this$props2$classNam
|
|
52
|
+
className = _this$props2$classNam === void 0 ? '' : _this$props2$classNam,
|
|
53
|
+
ariaLabel = _this$props2.ariaLabel;
|
|
52
54
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
53
55
|
"data-title": dataTitle,
|
|
54
56
|
dataId: dataId,
|
|
55
57
|
className: "".concat(_DateTimeModule["default"].thArrow, " ").concat(_DateTimeModule["default"].grid, " ").concat(className),
|
|
56
|
-
onClick: this.modifyCalendarChild
|
|
58
|
+
onClick: this.modifyCalendarChild,
|
|
59
|
+
"aria-label": ariaLabel,
|
|
60
|
+
tabindex: "0"
|
|
57
61
|
}, children);
|
|
58
62
|
}
|
|
59
63
|
}]);
|
|
@@ -84,19 +88,26 @@ var DateTimePopupHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
84
88
|
className: _DateTimeModule["default"].dateText,
|
|
85
89
|
dataId: "selectYear",
|
|
86
90
|
onClick: onOpenYearView
|
|
87
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
88
|
-
className: _DateTimeModule["default"].thMonYear
|
|
89
|
-
|
|
91
|
+
}, /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
|
|
92
|
+
className: _DateTimeModule["default"].thMonYear,
|
|
93
|
+
title: showMonthTxt,
|
|
94
|
+
tagName: "h2",
|
|
95
|
+
a11y: {
|
|
96
|
+
tabindex: '0'
|
|
97
|
+
}
|
|
98
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
90
99
|
name: "ZD-GN-dropdown",
|
|
91
100
|
size: "12",
|
|
92
101
|
iconClass: _DateTimeModule["default"].downArrow
|
|
93
|
-
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
102
|
+
}))), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
94
103
|
flexible: true
|
|
95
104
|
}), !isYearView ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Span, {
|
|
96
105
|
dataTitle: prevMonthTitleText,
|
|
97
106
|
dataId: "prevMonth",
|
|
98
107
|
modifyCalendar: onModifyCalendar,
|
|
99
|
-
type: "previousMonth"
|
|
108
|
+
type: "previousMonth",
|
|
109
|
+
ariaLabel: "prevMonth",
|
|
110
|
+
tabindex: "0"
|
|
100
111
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
101
112
|
name: "ZD-arrowLeft3",
|
|
102
113
|
isBold: true
|
|
@@ -105,7 +116,9 @@ var DateTimePopupHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
105
116
|
dataId: "nextMonth",
|
|
106
117
|
modifyCalendar: onModifyCalendar,
|
|
107
118
|
type: "nextMonth",
|
|
108
|
-
className: _DateTimeModule["default"].navigation
|
|
119
|
+
className: _DateTimeModule["default"].navigation,
|
|
120
|
+
ariaLabel: "nextMonth",
|
|
121
|
+
tabindex: "0"
|
|
109
122
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
110
123
|
name: "ZD-arrowRight3",
|
|
111
124
|
isBold: true
|
|
@@ -905,7 +905,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
905
905
|
positionsOffset = _this$props11.positionsOffset,
|
|
906
906
|
targetOffset = _this$props11.targetOffset,
|
|
907
907
|
isRestrictScroll = _this$props11.isRestrictScroll,
|
|
908
|
-
dropBoxPortalId = _this$props11.dropBoxPortalId
|
|
908
|
+
dropBoxPortalId = _this$props11.dropBoxPortalId,
|
|
909
|
+
a11y = _this$props11.a11y;
|
|
909
910
|
var _this$state5 = this.state,
|
|
910
911
|
_this$state5$selected = _this$state5.selected,
|
|
911
912
|
value = _this$state5$selected === void 0 ? '' : _this$state5$selected,
|
|
@@ -954,7 +955,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
954
955
|
},
|
|
955
956
|
iconOnHover: iconOnHover,
|
|
956
957
|
isFocus: isPopupReady,
|
|
957
|
-
autoComplete: false
|
|
958
|
+
autoComplete: false,
|
|
959
|
+
a11y: a11y
|
|
958
960
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
959
961
|
align: "both",
|
|
960
962
|
onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick
|
package/lib/DateTime/DaysRow.js
CHANGED
|
@@ -42,7 +42,8 @@ var DaysRow = /*#__PURE__*/function (_PureComponent) {
|
|
|
42
42
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
43
43
|
key: dayName,
|
|
44
44
|
className: "".concat(_DateTimeModule["default"].daysStr, " ").concat(_DateTimeModule["default"].grid, " ").concat(index === 0 ? _DateTimeModule["default"].sunday : ''),
|
|
45
|
-
"data-title": dayName
|
|
45
|
+
"data-title": dayName,
|
|
46
|
+
"aria-label": dayName
|
|
46
47
|
}, dayNamesShort[index]);
|
|
47
48
|
}));
|
|
48
49
|
}
|
package/lib/DateTime/YearView.js
CHANGED
|
@@ -11,6 +11,7 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
11
11
|
var _virtualizer = require("@zohodesk/virtualizer");
|
|
12
12
|
var _Layout = require("../Layout");
|
|
13
13
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
14
|
+
var _Heading = _interopRequireDefault(require("../Heading/Heading"));
|
|
14
15
|
var _YearViewModule = _interopRequireDefault(require("./YearView.module.css"));
|
|
15
16
|
var _dateFormatUtils = require("./dateFormatUtils");
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -68,9 +69,15 @@ var Year = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
68
69
|
alignBox: "row",
|
|
69
70
|
align: "vertical"
|
|
70
71
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
71
|
-
flexible: true
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
flexible: true
|
|
73
|
+
}, /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
|
|
74
|
+
className: _YearViewModule["default"].yearText,
|
|
75
|
+
title: year,
|
|
76
|
+
a11y: {
|
|
77
|
+
tabindex: '0'
|
|
78
|
+
},
|
|
79
|
+
tagName: "h4"
|
|
80
|
+
})), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
74
81
|
name: "ZD-arrowDownSingle",
|
|
75
82
|
size: "7",
|
|
76
83
|
isBold: true,
|
|
@@ -112,7 +119,8 @@ var Month = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
112
119
|
dataId: "month_".concat(month),
|
|
113
120
|
className: "".concat(_YearViewModule["default"].month, " ").concat(isActive ? _YearViewModule["default"].currentMonth : ''),
|
|
114
121
|
onClick: this.handleClick,
|
|
115
|
-
"data-title": hoverText
|
|
122
|
+
"data-title": hoverText,
|
|
123
|
+
"aria-label": month
|
|
116
124
|
}, displayText);
|
|
117
125
|
}
|
|
118
126
|
}]);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
padding-left: var(--zd_size19);
|
|
6
6
|
padding-right: var(--zd_size19);
|
|
7
7
|
}
|
|
8
|
+
|
|
8
9
|
.month {
|
|
9
10
|
width: 30.333%;
|
|
10
11
|
font-size: var(--zd_font_size12);
|
|
@@ -17,51 +18,66 @@
|
|
|
17
18
|
background-color: var(--zdt_yearview_month_bg);
|
|
18
19
|
border-radius: 20px;
|
|
19
20
|
}
|
|
21
|
+
|
|
20
22
|
.month:hover {
|
|
21
23
|
background-color: var(--zdt_yearview_month_hover_bg);
|
|
22
24
|
}
|
|
25
|
+
|
|
23
26
|
.currentMonth,
|
|
24
27
|
.currentMonth:hover {
|
|
25
28
|
color: var(--zdt_yearview_currentmonth_text);
|
|
26
29
|
}
|
|
30
|
+
|
|
27
31
|
.currentMonth, .currentMonth:hover {
|
|
28
32
|
background-color: var(--zdt_yearview_currentmonth_bg);
|
|
29
33
|
}
|
|
34
|
+
|
|
30
35
|
.yearBox {
|
|
31
36
|
border-bottom: 1px dotted var(--zdt_yearview_yearbox_border);
|
|
32
37
|
}
|
|
38
|
+
|
|
33
39
|
.year {
|
|
34
40
|
padding: var(--zd_size7) 0;
|
|
35
41
|
cursor: pointer;
|
|
36
42
|
}
|
|
43
|
+
|
|
37
44
|
.year:hover .yearText,
|
|
38
45
|
.year:hover .arrow {
|
|
39
46
|
color: var(--zdt_yearview_year_hover_text);
|
|
40
47
|
}
|
|
48
|
+
|
|
41
49
|
.yearText {
|
|
42
50
|
color: var(--zdt_yearview_yeartext_text);
|
|
43
51
|
font-size: var(--zd_font_size11);
|
|
44
52
|
}
|
|
53
|
+
|
|
45
54
|
.arrow {
|
|
46
55
|
color: var(--zdt_yearview_yeartext_text);
|
|
47
56
|
transition: transform var(--zd_transition1);
|
|
48
57
|
}
|
|
58
|
+
|
|
49
59
|
.isActive {
|
|
50
60
|
cursor: default;
|
|
51
61
|
}
|
|
62
|
+
|
|
52
63
|
.isActive .yearText {
|
|
53
64
|
font-family: var(--zd_semibold);
|
|
54
65
|
color: var(--zdt_yearview_year_hover_text);
|
|
66
|
+
font-size: var(--zd_font_size11);
|
|
55
67
|
}
|
|
68
|
+
|
|
56
69
|
.arrowActive {
|
|
57
70
|
color: var(--zdt_yearview_year_hover_text);
|
|
58
71
|
}
|
|
72
|
+
|
|
59
73
|
[dir=ltr] .arrowActive {
|
|
60
74
|
transform: rotate(180deg);
|
|
61
75
|
}
|
|
76
|
+
|
|
62
77
|
[dir=rtl] .arrowActive {
|
|
63
78
|
transform: rotate(-180deg);
|
|
64
79
|
}
|
|
80
|
+
|
|
65
81
|
.container {
|
|
66
82
|
height: 100%;
|
|
67
83
|
overflow-y: auto;
|
|
@@ -69,13 +85,15 @@
|
|
|
69
85
|
composes: boxPadding;
|
|
70
86
|
background-color: var(--zdt_yearview_default_bg);
|
|
71
87
|
}
|
|
88
|
+
|
|
72
89
|
.yearContainer {
|
|
73
90
|
height: var(--zd_size135);
|
|
74
91
|
overflow: hidden;
|
|
75
92
|
transition: height var(--zd_transition1);
|
|
76
93
|
padding-bottom: var(--zd_size5);
|
|
77
94
|
}
|
|
95
|
+
|
|
78
96
|
.toggleYear {
|
|
79
97
|
height: 0;
|
|
80
98
|
padding: 0;
|
|
81
|
-
}
|
|
99
|
+
}
|
package/lib/DropBox/DropBox.js
CHANGED
|
@@ -15,6 +15,7 @@ var _DropBoxPositionMapping = require("./DropBoxPositionMapping.json");
|
|
|
15
15
|
var _ZindexProvider = require("../Provider/ZindexProvider");
|
|
16
16
|
var _Config = require("../Provider/Config");
|
|
17
17
|
var _LibraryContextInit = _interopRequireDefault(require("../Provider/LibraryContextInit"));
|
|
18
|
+
var _FocusScope = _interopRequireDefault(require("@zohodesk/a11y/es/FocusScope/FocusScope"));
|
|
18
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -87,7 +88,8 @@ var DropBoxElement = /*#__PURE__*/function (_React$Component) {
|
|
|
87
88
|
positionsOffset = _this$props2.positionsOffset,
|
|
88
89
|
targetOffset = _this$props2.targetOffset,
|
|
89
90
|
zIndexStyle = _this$props2.zIndexStyle,
|
|
90
|
-
customStyle = _this$props2.customStyle
|
|
91
|
+
customStyle = _this$props2.customStyle,
|
|
92
|
+
subContainerRef = _this$props2.subContainerRef;
|
|
91
93
|
var _ref = this.context || {},
|
|
92
94
|
isReducedMotion = _ref.isReducedMotion;
|
|
93
95
|
if (!isAbsolutePositioningNeeded && size === 'default' && !isActive) {
|
|
@@ -172,9 +174,11 @@ var DropBoxElement = /*#__PURE__*/function (_React$Component) {
|
|
|
172
174
|
"aria-labelledby": ariaLabelledby,
|
|
173
175
|
tabIndex: tabIndex
|
|
174
176
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
|
+
tabIndex: "-1",
|
|
175
178
|
className: "".concat(subContainerClass, " ").concat(_DropBoxModule["default"]["".concat(palette, "Palette")]),
|
|
176
179
|
onClick: onClick,
|
|
177
|
-
"data-id": "".concat(dataId, "_subcontainer")
|
|
180
|
+
"data-id": "".concat(dataId, "_subcontainer"),
|
|
181
|
+
ref: subContainerRef
|
|
178
182
|
}, isModel ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
179
183
|
className: _DropBoxModule["default"].closeBar
|
|
180
184
|
}) : null, isArrow && !isModel && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -198,6 +202,7 @@ var DropBox = /*#__PURE__*/function (_React$Component2) {
|
|
|
198
202
|
_this2 = _super2.call(this, props);
|
|
199
203
|
_this2.getNextIndex = (0, _ZindexProvider.getZIndex)(_assertThisInitialized(_this2));
|
|
200
204
|
_this2.onFreezeClick = _this2.onFreezeClick.bind(_assertThisInitialized(_this2));
|
|
205
|
+
_this2.createRef = /*#__PURE__*/_react["default"].createRef();
|
|
201
206
|
return _this2;
|
|
202
207
|
}
|
|
203
208
|
_createClass(DropBox, [{
|
|
@@ -214,7 +219,9 @@ var DropBox = /*#__PURE__*/function (_React$Component2) {
|
|
|
214
219
|
isActive = _this$props3.isActive,
|
|
215
220
|
isAbsolutePositioningNeeded = _this$props3.isAbsolutePositioningNeeded,
|
|
216
221
|
needAutoZindex = _this$props3.needAutoZindex,
|
|
217
|
-
isRestrictScroll = _this$props3.isRestrictScroll
|
|
222
|
+
isRestrictScroll = _this$props3.isRestrictScroll,
|
|
223
|
+
needFocusScope = _this$props3.needFocusScope,
|
|
224
|
+
onClose = _this$props3.onClose;
|
|
218
225
|
var windowWidth,
|
|
219
226
|
mobileWidth = (0, _Config.getLibraryConfig)('mobileWidth'),
|
|
220
227
|
isModel = false;
|
|
@@ -229,7 +236,20 @@ var DropBox = /*#__PURE__*/function (_React$Component2) {
|
|
|
229
236
|
} : {};
|
|
230
237
|
var _ref2 = this.context || {},
|
|
231
238
|
direction = _ref2.direction;
|
|
232
|
-
var dropBoxEle = /*#__PURE__*/_react["default"].createElement(
|
|
239
|
+
var dropBoxEle = needFocusScope ? /*#__PURE__*/_react["default"].createElement(_FocusScope["default"], {
|
|
240
|
+
focusClose: onClose,
|
|
241
|
+
elementRef: this.createRef,
|
|
242
|
+
autoFocus: true,
|
|
243
|
+
restoreFocus: true,
|
|
244
|
+
focusArrowLoop: true,
|
|
245
|
+
enableEnterAction: true
|
|
246
|
+
}, /*#__PURE__*/_react["default"].createElement(DropBoxElement, _extends({
|
|
247
|
+
isModel: isModel,
|
|
248
|
+
direction: direction
|
|
249
|
+
}, this.props, {
|
|
250
|
+
zIndexStyle: zIndexStyle,
|
|
251
|
+
subContainerRef: this.createRef
|
|
252
|
+
}))) : /*#__PURE__*/_react["default"].createElement(DropBoxElement, _extends({
|
|
233
253
|
isModel: isModel,
|
|
234
254
|
direction: direction
|
|
235
255
|
}, this.props, {
|
|
@@ -29,6 +29,7 @@ var propTypes = {
|
|
|
29
29
|
left: _propTypes["default"].number,
|
|
30
30
|
needResponsive: _propTypes["default"].bool,
|
|
31
31
|
onClick: _propTypes["default"].func,
|
|
32
|
+
needFocusScope: _propTypes["default"].bool,
|
|
32
33
|
right: _propTypes["default"].number,
|
|
33
34
|
size: _propTypes["default"].oneOf(['mini', 'xmini', 'xsmall', 'small', 'medium', 'large', 'mlarge', 'xlarge', 'xxlarge', 'default']),
|
|
34
35
|
top: _propTypes["default"].number,
|
|
@@ -40,12 +40,14 @@ var DropDownHeading = /*#__PURE__*/function (_React$Component) {
|
|
|
40
40
|
htmlId = _this$props.htmlId,
|
|
41
41
|
a11y = _this$props.a11y;
|
|
42
42
|
var role = a11y.role,
|
|
43
|
-
ariaLabelledby = a11y.ariaLabelledby
|
|
43
|
+
ariaLabelledby = a11y.ariaLabelledby,
|
|
44
|
+
ariaLabel = a11y.ariaLabel;
|
|
44
45
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
45
46
|
className: "".concat(_DropDownHeadingModule["default"][palette], " ").concat(customClass),
|
|
46
47
|
"data-title": title,
|
|
47
48
|
role: role,
|
|
48
49
|
"aria-labelledby": ariaLabelledby,
|
|
50
|
+
"aria-label": ariaLabel,
|
|
49
51
|
id: htmlId
|
|
50
52
|
// tabindex='0'
|
|
51
53
|
}, text, children);
|
|
@@ -51,7 +51,8 @@ var DropDownHeading_propTypes = {
|
|
|
51
51
|
htmlId: _propTypes["default"].string,
|
|
52
52
|
a11y: _propTypes["default"].shape({
|
|
53
53
|
role: _propTypes["default"].string,
|
|
54
|
-
ariaLabelledby: _propTypes["default"].string
|
|
54
|
+
ariaLabelledby: _propTypes["default"].string,
|
|
55
|
+
ariaLabel: _propTypes["default"].string
|
|
55
56
|
})
|
|
56
57
|
};
|
|
57
58
|
exports.DropDownHeading_propTypes = DropDownHeading_propTypes;
|
package/lib/Label/Label.js
CHANGED
|
@@ -42,13 +42,15 @@ var Label = /*#__PURE__*/function (_React$Component) {
|
|
|
42
42
|
onClick = _this$props.onClick,
|
|
43
43
|
dataId = _this$props.dataId,
|
|
44
44
|
variant = _this$props.variant,
|
|
45
|
-
customClass = _this$props.customClass
|
|
45
|
+
customClass = _this$props.customClass,
|
|
46
|
+
id = _this$props.id;
|
|
46
47
|
return /*#__PURE__*/_react["default"].createElement("label", {
|
|
47
48
|
className: "".concat(_LabelModule["default"].label, " ").concat(_LabelModule["default"][type], " ").concat(_LabelModule["default"][size], " ").concat(_LabelColorsModule["default"][palette], " ").concat(_LabelModule["default"]["font_".concat(variant)], "\n ").concat(clipped ? _LabelModule["default"].dotted : '', " ").concat(onClick ? _LabelModule["default"].pointer : _LabelModule["default"].cursor, " ").concat(customClass, " "),
|
|
48
49
|
htmlFor: htmlFor,
|
|
49
50
|
"data-title": title,
|
|
50
51
|
"data-id": dataId,
|
|
51
|
-
onClick: onClick
|
|
52
|
+
onClick: onClick,
|
|
53
|
+
id: id
|
|
52
54
|
}, text);
|
|
53
55
|
}
|
|
54
56
|
}]);
|
|
@@ -23,11 +23,11 @@ var BoxProps = {
|
|
|
23
23
|
isFirst: _propTypes["default"].bool,
|
|
24
24
|
isLast: _propTypes["default"].bool,
|
|
25
25
|
isScrollAttribute: _propTypes["default"].bool,
|
|
26
|
-
scroll: _propTypes["default"].
|
|
26
|
+
scroll: _propTypes["default"].oneOf(['vertical', 'horizontal', 'both', 'none']),
|
|
27
27
|
shrink: _propTypes["default"].bool,
|
|
28
28
|
tagName: _propTypes["default"].string,
|
|
29
29
|
tourId: _propTypes["default"].string,
|
|
30
|
-
preventParentScroll: _propTypes["default"].
|
|
30
|
+
preventParentScroll: _propTypes["default"].oneOf(['vertical', 'horizontal', 'both'])
|
|
31
31
|
};
|
|
32
32
|
exports.BoxProps = BoxProps;
|
|
33
33
|
var ContainerProps = {
|
|
@@ -46,6 +46,6 @@ var ContainerProps = {
|
|
|
46
46
|
tagName: _propTypes["default"].string,
|
|
47
47
|
tourId: _propTypes["default"].string,
|
|
48
48
|
wrap: _propTypes["default"].oneOf(['wrap', 'wrap-reverse', 'nowrap']),
|
|
49
|
-
preventParentScroll: _propTypes["default"].
|
|
49
|
+
preventParentScroll: _propTypes["default"].oneOf(['vertical', 'horizontal', 'both'])
|
|
50
50
|
};
|
|
51
51
|
exports.ContainerProps = ContainerProps;
|
|
@@ -53,7 +53,8 @@ var ListContainer = function ListContainer(props) {
|
|
|
53
53
|
mobileToTab = _useResponsiveReceive.mobileToTab,
|
|
54
54
|
isTouchDevice = _useResponsiveReceive.isTouchDevice;
|
|
55
55
|
var role = a11y.role,
|
|
56
|
-
ariaSelected = a11y.ariaSelected
|
|
56
|
+
ariaSelected = a11y.ariaSelected,
|
|
57
|
+
ariaLabel = a11y.ariaLabel;
|
|
57
58
|
var options = {};
|
|
58
59
|
if (isLink) {
|
|
59
60
|
options.href = href;
|
|
@@ -62,12 +63,14 @@ var ListContainer = function ListContainer(props) {
|
|
|
62
63
|
if (active) {
|
|
63
64
|
options['data-selected'] = active;
|
|
64
65
|
}
|
|
65
|
-
if (!isDisabled && !isLink
|
|
66
|
+
if (!isDisabled && !isLink) {
|
|
66
67
|
options.tabindex = '0';
|
|
67
68
|
}
|
|
68
69
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
|
|
69
70
|
role: role,
|
|
71
|
+
"data-a11y-inside-focus": true,
|
|
70
72
|
"aria-selected": ariaSelected,
|
|
73
|
+
"aria-label": ariaLabel,
|
|
71
74
|
isCover: false,
|
|
72
75
|
align: "vertical",
|
|
73
76
|
alignBox: "row",
|
|
@@ -856,7 +856,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
856
856
|
_i18nKeys$searchText = _i18nKeys.searchText,
|
|
857
857
|
searchText = _i18nKeys$searchText === void 0 ? 'Searching...' : _i18nKeys$searchText;
|
|
858
858
|
var _a11y$clearLabel = a11y.clearLabel,
|
|
859
|
-
clearLabel = _a11y$clearLabel === void 0 ? 'Clear all' : _a11y$clearLabel
|
|
859
|
+
clearLabel = _a11y$clearLabel === void 0 ? 'Clear all' : _a11y$clearLabel,
|
|
860
|
+
ariaLabelledby = a11y.ariaLabelledby;
|
|
860
861
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
861
862
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
862
863
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage,
|
|
@@ -934,7 +935,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
934
935
|
ariaExpanded: !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? true : false,
|
|
935
936
|
ariaHaspopup: true,
|
|
936
937
|
ariaRequired: true,
|
|
937
|
-
ariaDescribedby: ariaErrorId
|
|
938
|
+
ariaDescribedby: ariaErrorId,
|
|
939
|
+
ariaLabelledby: ariaLabelledby
|
|
938
940
|
},
|
|
939
941
|
autoComplete: autoComplete
|
|
940
942
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -79,7 +79,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
79
79
|
var isActive = activeId === id || selectedOptions.indexOf(id) >= 0;
|
|
80
80
|
var isHighlight = hoverOption === index || id === hoverId ? true : false;
|
|
81
81
|
var list_a11y = Object.assign({}, a11y, {
|
|
82
|
-
ariaSelected: isActive
|
|
82
|
+
ariaSelected: isActive,
|
|
83
|
+
ariaLabel: value
|
|
83
84
|
});
|
|
84
85
|
var commonProps = {
|
|
85
86
|
isDisabled: isDisabled
|
|
@@ -115,6 +115,7 @@ function useResponsiveReceiver() {
|
|
|
115
115
|
var data = (0, _react.useRef)();
|
|
116
116
|
function updateLatestData() {
|
|
117
117
|
var size = contextData.isParentSize ? contextData.getSize() : validSizeContextData.getSize();
|
|
118
|
+
var prevData = data.current;
|
|
118
119
|
data.current = query({
|
|
119
120
|
isTouchDevice: _sizeObservers.isTouchDevice,
|
|
120
121
|
isParentSize: contextData.isParentSize,
|
|
@@ -136,13 +137,16 @@ function useResponsiveReceiver() {
|
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
139
|
});
|
|
140
|
+
var isSameValues = (0, _shallowCompare["default"])(data.current, prevData);
|
|
141
|
+
if (isSameValues) {
|
|
142
|
+
data.current = prevData;
|
|
143
|
+
}
|
|
144
|
+
return isSameValues;
|
|
139
145
|
}
|
|
140
146
|
resizeHandlerRef.current = updateLatestData;
|
|
141
147
|
(0, _react.useEffect)(function () {
|
|
142
148
|
function handleResize(size) {
|
|
143
|
-
var
|
|
144
|
-
resizeHandlerRef.current(size);
|
|
145
|
-
var isSameValues = (0, _shallowCompare["default"])(data.current, prevData);
|
|
149
|
+
var isSameValues = resizeHandlerRef.current(size);
|
|
146
150
|
!isSameValues && forceUpdate({});
|
|
147
151
|
}
|
|
148
152
|
contextData.resize.subscribe(handleResize);
|
package/lib/Select/Select.js
CHANGED
|
@@ -683,6 +683,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
683
683
|
iconOnHover = _this$props11.iconOnHover,
|
|
684
684
|
customProps = _this$props11.customProps,
|
|
685
685
|
autoComplete = _this$props11.autoComplete,
|
|
686
|
+
ariaLabelledby = _this$props11.ariaLabelledby,
|
|
686
687
|
isLoading = _this$props11.isLoading;
|
|
687
688
|
var _i18nKeys = i18nKeys,
|
|
688
689
|
TextBoxIcon_i18n = _i18nKeys.TextBoxIcon_i18n,
|
|
@@ -718,14 +719,15 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
718
719
|
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId)
|
|
719
720
|
}, needSelectDownIcon ? /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
720
721
|
a11y: {
|
|
721
|
-
role: '
|
|
722
|
+
role: 'Menuitem',
|
|
722
723
|
ariaLabel: TextBox_ally_label,
|
|
723
724
|
ariaControls: setAriaId,
|
|
724
725
|
ariaExpanded: !isReadOnly && !isDisabled && isPopupOpen ? true : false,
|
|
725
726
|
ariaHaspopup: true,
|
|
726
727
|
ariaReadonly: true,
|
|
727
728
|
ariaActivedescendant: selectedId,
|
|
728
|
-
ariaOwns: setAriaId
|
|
729
|
+
ariaOwns: setAriaId,
|
|
730
|
+
ariaLabelledby: ariaLabelledby
|
|
729
731
|
},
|
|
730
732
|
isDisabled: isDisabled,
|
|
731
733
|
iconRotated: isPopupOpen,
|
|
@@ -770,14 +772,15 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
770
772
|
size: "7"
|
|
771
773
|
})))) : /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
|
|
772
774
|
a11y: {
|
|
773
|
-
role: '
|
|
775
|
+
role: 'Menuitem',
|
|
774
776
|
ariaLabel: TextBox_ally_label,
|
|
775
777
|
ariaControls: setAriaId,
|
|
776
778
|
ariaExpanded: !isReadOnly && !isDisabled && isPopupOpen ? true : false,
|
|
777
779
|
ariaHaspopup: true,
|
|
778
780
|
ariaReadonly: true,
|
|
779
781
|
ariaActivedescendant: selectedId,
|
|
780
|
-
ariaOwns: setAriaId
|
|
782
|
+
ariaOwns: setAriaId,
|
|
783
|
+
ariaLabelledby: ariaLabelledby
|
|
781
784
|
},
|
|
782
785
|
isDisabled: isDisabled,
|
|
783
786
|
inputRef: this.valueInputRef,
|
|
@@ -498,7 +498,8 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
498
498
|
getRef: _this5.itemRef,
|
|
499
499
|
a11y: {
|
|
500
500
|
role: 'option',
|
|
501
|
-
ariaSelected: selectedId === options[idKey]
|
|
501
|
+
ariaSelected: selectedId === options[idKey],
|
|
502
|
+
ariaLabel: options[valueKey]
|
|
502
503
|
}
|
|
503
504
|
});
|
|
504
505
|
})) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
package/lib/Switch/Switch.js
CHANGED
|
@@ -82,7 +82,8 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
82
82
|
"data-title": disabled ? disableTitle : title,
|
|
83
83
|
"aria-checked": checked,
|
|
84
84
|
role: "switch",
|
|
85
|
-
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
85
|
+
tabIndex: isReadOnly || disabled ? '-1' : '0',
|
|
86
|
+
onClick: !disabled || !isReadOnly ? this.onChange : null
|
|
86
87
|
}, SwitchProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
87
88
|
className: "".concat(_SwitchModule["default"][size], " ").concat(customSwitchSize)
|
|
88
89
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
@@ -93,8 +94,8 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
93
94
|
value: value,
|
|
94
95
|
checked: checked,
|
|
95
96
|
disabled: disabled,
|
|
96
|
-
readOnly: isReadOnly
|
|
97
|
-
onClick
|
|
97
|
+
readOnly: isReadOnly
|
|
98
|
+
// onClick={!disabled || !isReadOnly ? this.onChange : null}
|
|
98
99
|
}), /*#__PURE__*/_react["default"].createElement("label", {
|
|
99
100
|
htmlFor: id,
|
|
100
101
|
"data-id": dataId,
|
|
@@ -104,8 +105,9 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
104
105
|
palette: labelPalette,
|
|
105
106
|
id: id,
|
|
106
107
|
size: labelSize,
|
|
107
|
-
type: "subtitle"
|
|
108
|
-
onClick
|
|
108
|
+
type: "subtitle"
|
|
109
|
+
// onClick={!disabled || !isReadOnly ? this.onChange : null}
|
|
110
|
+
,
|
|
109
111
|
customClass: customLabel
|
|
110
112
|
}, LabelProps)));
|
|
111
113
|
}
|
package/lib/Tab/TabContent.js
CHANGED