@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
package/README.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.9.11
|
|
6
|
+
|
|
7
|
+
- padding, margin based css properties migrated to padding-inline,padding-block, margin-inline, margin-block
|
|
8
|
+
|
|
9
|
+
- **DotProvider** — Added `excludeFeatures` prop (default `[]`). Accepts an array of feature names to exclude from DotProvider. Supported values: `'theme'`, `'font'`, `'zoom'`. Example: `excludeFeatures={['font', 'zoom']}` skips font/zoom CSS chunk downloads and their variable/attribute application while keeping theme active.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# 1.9.10
|
|
13
|
+
|
|
14
|
+
- **ActionButton**
|
|
15
|
+
- Accessibility improvements:
|
|
16
|
+
- Removed hardcoded `tabIndex='0'` from the content box and arrow button elements.
|
|
17
|
+
- Arrow button now exposes `aria-expanded` and `aria-controls` attributes for screen reader support.
|
|
18
|
+
- Popup is assigned a unique `htmlId` (via `getUniqueId`) linked to `aria-controls` on the arrow button.
|
|
19
|
+
- Added `a11yAttributes` prop.
|
|
20
|
+
|
|
5
21
|
# 1.9.9
|
|
6
22
|
|
|
7
23
|
- PX to variable conversion was not applied due to the CBT migration. The issue has now been fixed.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { defaultProps } from "./props/defaultProps";
|
|
3
5
|
import { propTypes } from "./props/propTypes";
|
|
@@ -7,13 +9,16 @@ import Button from '@zohodesk/components/es/Button/Button';
|
|
|
7
9
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
8
10
|
import ResponsiveDropBox from '@zohodesk/components/es/ResponsiveDropBox/ResponsiveDropBox';
|
|
9
11
|
import CssProvider from '@zohodesk/components/es/Provider/CssProvider';
|
|
12
|
+
import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
|
|
10
13
|
import style from "./ActionButton.module.css";
|
|
11
14
|
import btnStyle from '@zohodesk/components/es/semantic/Button/semanticButton.module.css';
|
|
12
15
|
export class ActionButton extends React.Component {
|
|
13
16
|
constructor(props) {
|
|
14
17
|
super(props);
|
|
18
|
+
this.getElementId = getUniqueId(this);
|
|
15
19
|
this.handleTogglePopup = this.handleTogglePopup.bind(this);
|
|
16
20
|
this.handlePopupOpen = this.handlePopupOpen.bind(this);
|
|
21
|
+
this.popupId = this.getElementId();
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
handlePopupOpen(e) {
|
|
@@ -64,8 +69,12 @@ export class ActionButton extends React.Component {
|
|
|
64
69
|
isAbsolutePositioningNeeded,
|
|
65
70
|
isRestrictScroll,
|
|
66
71
|
positionsOffset,
|
|
67
|
-
targetOffset
|
|
72
|
+
targetOffset,
|
|
73
|
+
a11yAttributes
|
|
68
74
|
} = this.props;
|
|
75
|
+
const {
|
|
76
|
+
splitButton: a11yAttributes_splitButton
|
|
77
|
+
} = a11yAttributes;
|
|
69
78
|
return /*#__PURE__*/React.createElement(Container, {
|
|
70
79
|
alignBox: "row",
|
|
71
80
|
isCover: false,
|
|
@@ -92,8 +101,7 @@ export class ActionButton extends React.Component {
|
|
|
92
101
|
dataId: dataId,
|
|
93
102
|
className: `${btnStyle.buttonReset} ${style.contentBox} ${style[palette + 'Btn']} ${style[size + '_btnBox']} ${children ? style.contentBoxBdr : style.contentBoxBdrRds} ${style.clickable} ${innerClassName} `,
|
|
94
103
|
"data-title": dataTitle,
|
|
95
|
-
tagName: "button"
|
|
96
|
-
tabIndex: "0"
|
|
104
|
+
tagName: "button"
|
|
97
105
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
98
106
|
align: "both"
|
|
99
107
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -113,16 +121,17 @@ export class ActionButton extends React.Component {
|
|
|
113
121
|
}, text) : null)), subText ? /*#__PURE__*/React.createElement(Box, {
|
|
114
122
|
"data-title": removeChildrenTooltip ? null : subText,
|
|
115
123
|
className: style.subTxt
|
|
116
|
-
}, subText) : null)), children ? /*#__PURE__*/React.createElement(Box, {
|
|
124
|
+
}, subText) : null)), children ? /*#__PURE__*/React.createElement(Box, _extends({}, a11yAttributes_splitButton, {
|
|
117
125
|
onClick: onClick && !onHover ? this.handleTogglePopup : this.handlePopupOpen,
|
|
118
126
|
onMouseEnter: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
119
127
|
onMouseLeave: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
120
128
|
className: `${btnStyle.buttonReset} ${style[arrowBoxSize + '_arrowBox']} ${style[palette + 'Arw']} ${style.arrowWrapper} ${isPopupOpen ? style.arrowActive : ''}`,
|
|
121
129
|
dataId: `${dataId}_arrowButton`,
|
|
122
|
-
tabIndex: "0",
|
|
123
130
|
tagName: "button",
|
|
124
|
-
dataSelectorId: `${dataSelectorId}_arrowButton
|
|
125
|
-
|
|
131
|
+
dataSelectorId: `${dataSelectorId}_arrowButton`,
|
|
132
|
+
"aria-expanded": isPopupOpen,
|
|
133
|
+
"aria-controls": this.popupId
|
|
134
|
+
}), /*#__PURE__*/React.createElement(Container, {
|
|
126
135
|
align: "both"
|
|
127
136
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
128
137
|
name: "ZD-down",
|
|
@@ -146,7 +155,8 @@ export class ActionButton extends React.Component {
|
|
|
146
155
|
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
147
156
|
isRestrictScroll: isRestrictScroll,
|
|
148
157
|
positionsOffset: positionsOffset,
|
|
149
|
-
targetOffset: targetOffset
|
|
158
|
+
targetOffset: targetOffset,
|
|
159
|
+
htmlId: this.popupId
|
|
150
160
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
151
161
|
flexible: true,
|
|
152
162
|
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
|
-
}
|