@zohodesk/dot 1.9.8 → 1.9.10
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 +13 -0
- package/es/ActionButton/ActionButton.js +18 -8
- package/es/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +47 -60
- package/es/ActionButton/props/defaultProps.js +2 -1
- package/es/ActionButton/props/propTypes.js +4 -1
- package/es/Attachment/Attachment.module.css +3 -3
- package/es/Image/Image.module.css +2 -2
- package/es/Onboarding/css/Onboarding.module.css +1 -1
- package/es/Separator/Separator.module.css +5 -5
- package/es/TagWithIcon/TagWithIcon.module.css +3 -3
- package/es/Upload/Upload.module.css +31 -2
- package/es/form/fields/Fields.module.css +73 -17
- package/es/form/fields/TextEditor/TextEditor.module.css +1 -1
- package/es/list/GridStencils/GridStencils.module.css +12 -2
- package/es/list/TagNew/TagNew.module.css +1 -1
- package/es/list/status/StatusListItem/StatusListItem.module.css +2 -2
- package/es/version2/AlertClose/AlertClose.module.css +1 -1
- package/es/version2/GlobalNotification/GlobalNotification.module.css +1 -1
- package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +8 -2
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +2 -2
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +3 -2
- package/lib/ActionButton/ActionButton.js +17 -8
- package/lib/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +47 -60
- package/lib/ActionButton/props/defaultProps.js +2 -1
- package/lib/ActionButton/props/propTypes.js +4 -1
- package/lib/Attachment/Attachment.module.css +3 -3
- package/lib/Image/Image.module.css +2 -2
- package/lib/Onboarding/css/Onboarding.module.css +1 -1
- package/lib/Separator/Separator.module.css +5 -5
- package/lib/TagWithIcon/TagWithIcon.module.css +3 -3
- package/lib/Upload/Upload.module.css +31 -2
- package/lib/form/fields/Fields.module.css +73 -17
- package/lib/form/fields/TextEditor/TextEditor.module.css +1 -1
- package/lib/list/GridStencils/GridStencils.module.css +12 -2
- package/lib/list/TagNew/TagNew.module.css +1 -1
- package/lib/list/status/StatusListItem/StatusListItem.module.css +2 -2
- package/lib/version2/AlertClose/AlertClose.module.css +1 -1
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +1 -1
- package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +8 -2
- package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +2 -2
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +3 -2
- package/package.json +17 -14
- package/_react-cli.config.js +0 -27
|
@@ -25,12 +25,16 @@ var _ResponsiveDropBox = _interopRequireDefault(require("@zohodesk/components/es
|
|
|
25
25
|
|
|
26
26
|
var _CssProvider = _interopRequireDefault(require("@zohodesk/components/es/Provider/CssProvider"));
|
|
27
27
|
|
|
28
|
+
var _IdProvider = require("@zohodesk/components/es/Provider/IdProvider");
|
|
29
|
+
|
|
28
30
|
var _ActionButtonModule = _interopRequireDefault(require("./ActionButton.module.css"));
|
|
29
31
|
|
|
30
32
|
var _semanticButtonModule = _interopRequireDefault(require("@zohodesk/components/es/semantic/Button/semanticButton.module.css"));
|
|
31
33
|
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
35
|
|
|
36
|
+
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); }
|
|
37
|
+
|
|
34
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
39
|
|
|
36
40
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -62,8 +66,10 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
62
66
|
_classCallCheck(this, ActionButton);
|
|
63
67
|
|
|
64
68
|
_this = _super.call(this, props);
|
|
69
|
+
_this.getElementId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
|
|
65
70
|
_this.handleTogglePopup = _this.handleTogglePopup.bind(_assertThisInitialized(_this));
|
|
66
71
|
_this.handlePopupOpen = _this.handlePopupOpen.bind(_assertThisInitialized(_this));
|
|
72
|
+
_this.popupId = _this.getElementId();
|
|
67
73
|
return _this;
|
|
68
74
|
}
|
|
69
75
|
|
|
@@ -117,7 +123,9 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
117
123
|
isAbsolutePositioningNeeded = _this$props3.isAbsolutePositioningNeeded,
|
|
118
124
|
isRestrictScroll = _this$props3.isRestrictScroll,
|
|
119
125
|
positionsOffset = _this$props3.positionsOffset,
|
|
120
|
-
targetOffset = _this$props3.targetOffset
|
|
126
|
+
targetOffset = _this$props3.targetOffset,
|
|
127
|
+
a11yAttributes = _this$props3.a11yAttributes;
|
|
128
|
+
var a11yAttributes_splitButton = a11yAttributes.splitButton;
|
|
121
129
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
122
130
|
alignBox: "row",
|
|
123
131
|
isCover: false,
|
|
@@ -144,8 +152,7 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
144
152
|
dataId: dataId,
|
|
145
153
|
className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_ActionButtonModule["default"].contentBox, " ").concat(_ActionButtonModule["default"][palette + 'Btn'], " ").concat(_ActionButtonModule["default"][size + '_btnBox'], " ").concat(children ? _ActionButtonModule["default"].contentBoxBdr : _ActionButtonModule["default"].contentBoxBdrRds, " ").concat(_ActionButtonModule["default"].clickable, " ").concat(innerClassName, " "),
|
|
146
154
|
"data-title": dataTitle,
|
|
147
|
-
tagName: "button"
|
|
148
|
-
tabIndex: "0"
|
|
155
|
+
tagName: "button"
|
|
149
156
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
150
157
|
align: "both"
|
|
151
158
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -165,16 +172,17 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
165
172
|
}, text) : null)), subText ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
166
173
|
"data-title": removeChildrenTooltip ? null : subText,
|
|
167
174
|
className: _ActionButtonModule["default"].subTxt
|
|
168
|
-
}, subText) : null)), children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
175
|
+
}, subText) : null)), children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, _extends({}, a11yAttributes_splitButton, {
|
|
169
176
|
onClick: onClick && !onHover ? this.handleTogglePopup : this.handlePopupOpen,
|
|
170
177
|
onMouseEnter: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
171
178
|
onMouseLeave: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
172
179
|
className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_ActionButtonModule["default"][arrowBoxSize + '_arrowBox'], " ").concat(_ActionButtonModule["default"][palette + 'Arw'], " ").concat(_ActionButtonModule["default"].arrowWrapper, " ").concat(isPopupOpen ? _ActionButtonModule["default"].arrowActive : ''),
|
|
173
180
|
dataId: "".concat(dataId, "_arrowButton"),
|
|
174
|
-
tabIndex: "0",
|
|
175
181
|
tagName: "button",
|
|
176
|
-
dataSelectorId: "".concat(dataSelectorId, "_arrowButton")
|
|
177
|
-
|
|
182
|
+
dataSelectorId: "".concat(dataSelectorId, "_arrowButton"),
|
|
183
|
+
"aria-expanded": isPopupOpen,
|
|
184
|
+
"aria-controls": this.popupId
|
|
185
|
+
}), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
178
186
|
align: "both"
|
|
179
187
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
180
188
|
name: "ZD-down",
|
|
@@ -198,7 +206,8 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
198
206
|
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
199
207
|
isRestrictScroll: isRestrictScroll,
|
|
200
208
|
positionsOffset: positionsOffset,
|
|
201
|
-
targetOffset: targetOffset
|
|
209
|
+
targetOffset: targetOffset,
|
|
210
|
+
htmlId: this.popupId
|
|
202
211
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
203
212
|
flexible: true,
|
|
204
213
|
shrink: true,
|