@zohodesk/dot 1.9.9 → 1.9.11
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 +16 -0
- package/es/ActionButton/ActionButton.js +18 -8
- package/es/ActionButton/ActionButton.module.css +12 -11
- 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/AlphabeticList/AlphabeticList.module.css +7 -8
- package/es/Attachment/Attachment.module.css +9 -10
- package/es/AttachmentViewer/AttachmentViewer.module.css +24 -45
- package/es/AudioPlayer/AudioPlayer.module.css +5 -8
- package/es/DotProvider/DotProvider.js +2 -0
- package/es/DotProvider/__tests__/DotProvider.spec.js +106 -0
- package/es/DotProvider/hooks/useDotProvider.js +4 -2
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +44 -15
- package/es/DotProvider/props/defaultProps.js +2 -0
- package/es/DotProvider/props/propTypes.js +1 -0
- package/es/Drawer/Drawer.module.css +17 -64
- package/es/FormAction/FormAction.module.css +20 -54
- package/es/ImportantNotes/ImportantNotes.module.css +2 -9
- package/es/Message/Message.module.css +3 -16
- package/es/MessageBanner/MessageBanner.module.css +4 -13
- package/es/Separator/Separator.module.css +2 -1
- package/es/TagWithIcon/TagWithIcon.module.css +5 -8
- package/es/ToastMessage/ToastMessage.module.css +16 -30
- package/es/Upload/Upload.module.css +7 -9
- package/es/alert/AlertHeader/AlertHeader.module.css +11 -25
- package/es/alert/AlertLookup/AlertLookup.module.css +9 -10
- package/es/avatar/AvatarCollision/AvatarCollision.module.css +1 -1
- package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
- package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +16 -16
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +7 -9
- package/es/emptystate/EditionPage/EditionPage.css +7 -4
- package/es/errorstate/EmptyStates.module.css +7 -8
- package/es/errorstate/Inconvenience/Inconvenience.module.css +2 -5
- package/es/errorstate/NoRequestFound/NoRequestFound.module.css +1 -1
- package/es/errorstate/PermissionPlay/PermissionPlay.module.css +5 -4
- package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +1 -1
- package/es/errorstate/UnableToProcess/UnableToProcess.module.css +1 -1
- package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +1 -1
- package/es/errorstate/WillBack/WillBack.module.css +6 -4
- package/es/form/fields/Fields.module.css +23 -68
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +11 -16
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +1 -4
- package/es/form/fields/TextEditor/TextEditor.module.css +40 -66
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +2 -7
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +4 -3
- package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +14 -36
- package/es/layout/SubtabLayout/SubtabLayout.module.css +33 -46
- package/es/list/BluePrintStatus/BluePrintStatus.module.css +1 -4
- package/es/list/Comment/Comment.module.css +2 -1
- package/es/list/Dot/Dot.module.css +4 -2
- package/es/list/GridStencils/GridStencils.module.css +7 -9
- package/es/list/ListLayout/ListLayout.module.css +7 -4
- package/es/list/ListStencils/ListStencils.module.css +14 -15
- package/es/list/SecondaryText/SecondaryText.module.css +4 -13
- package/es/list/SentimentStatus/SentimentStatus.module.css +2 -4
- package/es/list/TagNew/TagNew.module.css +3 -2
- package/es/list/listCommon.module.css +3 -7
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +17 -17
- package/es/list/status/StatusListItem/StatusListItem.module.css +10 -18
- package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -3
- package/es/lookup/Lookup/Lookup.module.css +2 -2
- package/es/lookup/header/Search/LookupSearch.module.css +10 -23
- package/es/lookup/header/TicketHeader/TicketHeader.module.css +3 -2
- package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -12
- package/es/lookup/header/lookupHeaderCommon.module.css +8 -7
- package/es/lookup/header/lookupHeaderCommonResponsive.module.css +2 -6
- package/es/setup/header/Button/HeaderButton.module.css +2 -4
- package/es/setup/header/Link/HeaderLink.module.css +3 -9
- package/es/setup/header/Search/Search.module.css +2 -10
- package/es/setup/header/Views/Views.module.css +1 -4
- package/es/setup/helptips/Description/HelpTipsDescription.module.css +2 -1
- package/es/setup/helptips/Link/HelpTipsLink.module.css +2 -2
- package/es/setup/helptips/ListGroup/ListGroup.module.css +2 -6
- package/es/setup/table/TableData/SetupTableData.module.css +2 -4
- package/es/setup/table/TableHead/SetupTableHead.module.css +1 -6
- package/es/setup/table/TableRow/SetupTableRow.module.css +2 -7
- package/es/version2/GlobalNotification/GlobalNotification.module.css +7 -12
- package/es/version2/errorstate/V2_ErrorStates.module.css +5 -5
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +8 -23
- package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +9 -10
- package/es/version2/lookup/alertLookupCommonNew.module.css +6 -4
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +8 -11
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +10 -22
- package/lib/ActionButton/ActionButton.js +17 -8
- package/lib/ActionButton/ActionButton.module.css +12 -11
- 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/AlphabeticList/AlphabeticList.module.css +7 -8
- package/lib/Attachment/Attachment.module.css +9 -10
- package/lib/AttachmentViewer/AttachmentViewer.module.css +24 -45
- package/lib/AudioPlayer/AudioPlayer.module.css +5 -8
- package/lib/DotProvider/DotProvider.js +3 -1
- package/lib/DotProvider/__tests__/DotProvider.spec.js +216 -0
- package/lib/DotProvider/hooks/useDotProvider.js +4 -2
- package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +46 -15
- package/lib/DotProvider/props/defaultProps.js +3 -0
- package/lib/DotProvider/props/propTypes.js +1 -0
- package/lib/Drawer/Drawer.module.css +17 -64
- package/lib/FormAction/FormAction.module.css +20 -54
- package/lib/ImportantNotes/ImportantNotes.module.css +2 -9
- package/lib/Message/Message.module.css +3 -16
- package/lib/MessageBanner/MessageBanner.module.css +4 -13
- package/lib/Separator/Separator.module.css +2 -1
- package/lib/TagWithIcon/TagWithIcon.module.css +5 -8
- package/lib/ToastMessage/ToastMessage.module.css +16 -30
- package/lib/Upload/Upload.module.css +7 -9
- package/lib/alert/AlertHeader/AlertHeader.module.css +11 -25
- package/lib/alert/AlertLookup/AlertLookup.module.css +9 -10
- package/lib/avatar/AvatarCollision/AvatarCollision.module.css +1 -1
- package/lib/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +16 -16
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +7 -9
- package/lib/emptystate/EditionPage/EditionPage.css +7 -4
- package/lib/errorstate/EmptyStates.module.css +7 -8
- package/lib/errorstate/Inconvenience/Inconvenience.module.css +2 -5
- package/lib/errorstate/NoRequestFound/NoRequestFound.module.css +1 -1
- package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +5 -4
- package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +1 -1
- package/lib/errorstate/UnableToProcess/UnableToProcess.module.css +1 -1
- package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +1 -1
- package/lib/errorstate/WillBack/WillBack.module.css +6 -4
- package/lib/form/fields/Fields.module.css +23 -68
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +11 -16
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +1 -4
- package/lib/form/fields/TextEditor/TextEditor.module.css +40 -66
- package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +2 -7
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +4 -3
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +14 -36
- package/lib/layout/SubtabLayout/SubtabLayout.module.css +33 -46
- package/lib/list/BluePrintStatus/BluePrintStatus.module.css +1 -4
- package/lib/list/Comment/Comment.module.css +2 -1
- package/lib/list/Dot/Dot.module.css +4 -2
- package/lib/list/GridStencils/GridStencils.module.css +7 -9
- package/lib/list/ListLayout/ListLayout.module.css +7 -4
- package/lib/list/ListStencils/ListStencils.module.css +14 -15
- package/lib/list/SecondaryText/SecondaryText.module.css +4 -13
- package/lib/list/SentimentStatus/SentimentStatus.module.css +2 -4
- package/lib/list/TagNew/TagNew.module.css +3 -2
- package/lib/list/listCommon.module.css +3 -7
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +17 -17
- package/lib/list/status/StatusListItem/StatusListItem.module.css +10 -18
- package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -3
- package/lib/lookup/Lookup/Lookup.module.css +2 -2
- package/lib/lookup/header/Search/LookupSearch.module.css +10 -23
- package/lib/lookup/header/TicketHeader/TicketHeader.module.css +3 -2
- package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -12
- package/lib/lookup/header/lookupHeaderCommon.module.css +8 -7
- package/lib/lookup/header/lookupHeaderCommonResponsive.module.css +2 -6
- package/lib/setup/header/Button/HeaderButton.module.css +2 -4
- package/lib/setup/header/Link/HeaderLink.module.css +3 -9
- package/lib/setup/header/Search/Search.module.css +2 -10
- package/lib/setup/header/Views/Views.module.css +1 -4
- package/lib/setup/helptips/Description/HelpTipsDescription.module.css +2 -1
- package/lib/setup/helptips/Link/HelpTipsLink.module.css +2 -2
- package/lib/setup/helptips/ListGroup/ListGroup.module.css +2 -6
- package/lib/setup/table/TableData/SetupTableData.module.css +2 -4
- package/lib/setup/table/TableHead/SetupTableHead.module.css +1 -6
- package/lib/setup/table/TableRow/SetupTableRow.module.css +2 -7
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +7 -12
- package/lib/version2/errorstate/V2_ErrorStates.module.css +5 -5
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +8 -23
- package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +9 -10
- package/lib/version2/lookup/alertLookupCommonNew.module.css +6 -4
- package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +8 -11
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +10 -22
- package/package.json +18 -18
|
@@ -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,
|
|
@@ -89,11 +89,14 @@
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.small_btnBox {
|
|
92
|
-
padding:
|
|
92
|
+
padding-block:0 ;
|
|
93
|
+
padding-inline: var(--zd_size8) ;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
.medium_btnBox,
|
|
96
|
-
|
|
96
|
+
.medium_btnBox,
|
|
97
|
+
.large_btnBox {
|
|
98
|
+
padding-block:0 ;
|
|
99
|
+
padding-inline: var(--zd_size10) ;
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
.txt {
|
|
@@ -174,8 +177,10 @@
|
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
.popupWrapper {
|
|
177
|
-
padding: var(--zd_size10)
|
|
178
|
-
|
|
180
|
+
padding-block: var(--zd_size10) ;
|
|
181
|
+
padding-inline:0 ;
|
|
182
|
+
margin-block: var(--zd_size5) ;
|
|
183
|
+
margin-inline:0 ;
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
.arrow,
|
|
@@ -184,10 +189,6 @@
|
|
|
184
189
|
color: var(--buttonText);
|
|
185
190
|
}
|
|
186
191
|
|
|
187
|
-
|
|
188
|
-
margin-
|
|
192
|
+
.iconMrgn {
|
|
193
|
+
margin-inline-end: var(--zd_size6) ;
|
|
189
194
|
}
|
|
190
|
-
|
|
191
|
-
[dir=rtl] .iconMrgn {
|
|
192
|
-
margin-left: var(--zd_size6) ;
|
|
193
|
-
}
|