@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.
Files changed (168) hide show
  1. package/README.md +16 -0
  2. package/es/ActionButton/ActionButton.js +18 -8
  3. package/es/ActionButton/ActionButton.module.css +12 -11
  4. package/es/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +47 -60
  5. package/es/ActionButton/props/defaultProps.js +2 -1
  6. package/es/ActionButton/props/propTypes.js +4 -1
  7. package/es/AlphabeticList/AlphabeticList.module.css +7 -8
  8. package/es/Attachment/Attachment.module.css +9 -10
  9. package/es/AttachmentViewer/AttachmentViewer.module.css +24 -45
  10. package/es/AudioPlayer/AudioPlayer.module.css +5 -8
  11. package/es/DotProvider/DotProvider.js +2 -0
  12. package/es/DotProvider/__tests__/DotProvider.spec.js +106 -0
  13. package/es/DotProvider/hooks/useDotProvider.js +4 -2
  14. package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +44 -15
  15. package/es/DotProvider/props/defaultProps.js +2 -0
  16. package/es/DotProvider/props/propTypes.js +1 -0
  17. package/es/Drawer/Drawer.module.css +17 -64
  18. package/es/FormAction/FormAction.module.css +20 -54
  19. package/es/ImportantNotes/ImportantNotes.module.css +2 -9
  20. package/es/Message/Message.module.css +3 -16
  21. package/es/MessageBanner/MessageBanner.module.css +4 -13
  22. package/es/Separator/Separator.module.css +2 -1
  23. package/es/TagWithIcon/TagWithIcon.module.css +5 -8
  24. package/es/ToastMessage/ToastMessage.module.css +16 -30
  25. package/es/Upload/Upload.module.css +7 -9
  26. package/es/alert/AlertHeader/AlertHeader.module.css +11 -25
  27. package/es/alert/AlertLookup/AlertLookup.module.css +9 -10
  28. package/es/avatar/AvatarCollision/AvatarCollision.module.css +1 -1
  29. package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
  30. package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +16 -16
  31. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +7 -9
  32. package/es/emptystate/EditionPage/EditionPage.css +7 -4
  33. package/es/errorstate/EmptyStates.module.css +7 -8
  34. package/es/errorstate/Inconvenience/Inconvenience.module.css +2 -5
  35. package/es/errorstate/NoRequestFound/NoRequestFound.module.css +1 -1
  36. package/es/errorstate/PermissionPlay/PermissionPlay.module.css +5 -4
  37. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +1 -1
  38. package/es/errorstate/UnableToProcess/UnableToProcess.module.css +1 -1
  39. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +1 -1
  40. package/es/errorstate/WillBack/WillBack.module.css +6 -4
  41. package/es/form/fields/Fields.module.css +23 -68
  42. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +11 -16
  43. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +1 -4
  44. package/es/form/fields/TextEditor/TextEditor.module.css +40 -66
  45. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +2 -7
  46. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +4 -3
  47. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +14 -36
  48. package/es/layout/SubtabLayout/SubtabLayout.module.css +33 -46
  49. package/es/list/BluePrintStatus/BluePrintStatus.module.css +1 -4
  50. package/es/list/Comment/Comment.module.css +2 -1
  51. package/es/list/Dot/Dot.module.css +4 -2
  52. package/es/list/GridStencils/GridStencils.module.css +7 -9
  53. package/es/list/ListLayout/ListLayout.module.css +7 -4
  54. package/es/list/ListStencils/ListStencils.module.css +14 -15
  55. package/es/list/SecondaryText/SecondaryText.module.css +4 -13
  56. package/es/list/SentimentStatus/SentimentStatus.module.css +2 -4
  57. package/es/list/TagNew/TagNew.module.css +3 -2
  58. package/es/list/listCommon.module.css +3 -7
  59. package/es/list/status/StatusDropdown/StatusDropdown.module.css +17 -17
  60. package/es/list/status/StatusListItem/StatusListItem.module.css +10 -18
  61. package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -3
  62. package/es/lookup/Lookup/Lookup.module.css +2 -2
  63. package/es/lookup/header/Search/LookupSearch.module.css +10 -23
  64. package/es/lookup/header/TicketHeader/TicketHeader.module.css +3 -2
  65. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -12
  66. package/es/lookup/header/lookupHeaderCommon.module.css +8 -7
  67. package/es/lookup/header/lookupHeaderCommonResponsive.module.css +2 -6
  68. package/es/setup/header/Button/HeaderButton.module.css +2 -4
  69. package/es/setup/header/Link/HeaderLink.module.css +3 -9
  70. package/es/setup/header/Search/Search.module.css +2 -10
  71. package/es/setup/header/Views/Views.module.css +1 -4
  72. package/es/setup/helptips/Description/HelpTipsDescription.module.css +2 -1
  73. package/es/setup/helptips/Link/HelpTipsLink.module.css +2 -2
  74. package/es/setup/helptips/ListGroup/ListGroup.module.css +2 -6
  75. package/es/setup/table/TableData/SetupTableData.module.css +2 -4
  76. package/es/setup/table/TableHead/SetupTableHead.module.css +1 -6
  77. package/es/setup/table/TableRow/SetupTableRow.module.css +2 -7
  78. package/es/version2/GlobalNotification/GlobalNotification.module.css +7 -12
  79. package/es/version2/errorstate/V2_ErrorStates.module.css +5 -5
  80. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +8 -23
  81. package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +9 -10
  82. package/es/version2/lookup/alertLookupCommonNew.module.css +6 -4
  83. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +8 -11
  84. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +10 -22
  85. package/lib/ActionButton/ActionButton.js +17 -8
  86. package/lib/ActionButton/ActionButton.module.css +12 -11
  87. package/lib/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +47 -60
  88. package/lib/ActionButton/props/defaultProps.js +2 -1
  89. package/lib/ActionButton/props/propTypes.js +4 -1
  90. package/lib/AlphabeticList/AlphabeticList.module.css +7 -8
  91. package/lib/Attachment/Attachment.module.css +9 -10
  92. package/lib/AttachmentViewer/AttachmentViewer.module.css +24 -45
  93. package/lib/AudioPlayer/AudioPlayer.module.css +5 -8
  94. package/lib/DotProvider/DotProvider.js +3 -1
  95. package/lib/DotProvider/__tests__/DotProvider.spec.js +216 -0
  96. package/lib/DotProvider/hooks/useDotProvider.js +4 -2
  97. package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +46 -15
  98. package/lib/DotProvider/props/defaultProps.js +3 -0
  99. package/lib/DotProvider/props/propTypes.js +1 -0
  100. package/lib/Drawer/Drawer.module.css +17 -64
  101. package/lib/FormAction/FormAction.module.css +20 -54
  102. package/lib/ImportantNotes/ImportantNotes.module.css +2 -9
  103. package/lib/Message/Message.module.css +3 -16
  104. package/lib/MessageBanner/MessageBanner.module.css +4 -13
  105. package/lib/Separator/Separator.module.css +2 -1
  106. package/lib/TagWithIcon/TagWithIcon.module.css +5 -8
  107. package/lib/ToastMessage/ToastMessage.module.css +16 -30
  108. package/lib/Upload/Upload.module.css +7 -9
  109. package/lib/alert/AlertHeader/AlertHeader.module.css +11 -25
  110. package/lib/alert/AlertLookup/AlertLookup.module.css +9 -10
  111. package/lib/avatar/AvatarCollision/AvatarCollision.module.css +1 -1
  112. package/lib/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
  113. package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +16 -16
  114. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +7 -9
  115. package/lib/emptystate/EditionPage/EditionPage.css +7 -4
  116. package/lib/errorstate/EmptyStates.module.css +7 -8
  117. package/lib/errorstate/Inconvenience/Inconvenience.module.css +2 -5
  118. package/lib/errorstate/NoRequestFound/NoRequestFound.module.css +1 -1
  119. package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +5 -4
  120. package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +1 -1
  121. package/lib/errorstate/UnableToProcess/UnableToProcess.module.css +1 -1
  122. package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +1 -1
  123. package/lib/errorstate/WillBack/WillBack.module.css +6 -4
  124. package/lib/form/fields/Fields.module.css +23 -68
  125. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +11 -16
  126. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +1 -4
  127. package/lib/form/fields/TextEditor/TextEditor.module.css +40 -66
  128. package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +2 -7
  129. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +4 -3
  130. package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +14 -36
  131. package/lib/layout/SubtabLayout/SubtabLayout.module.css +33 -46
  132. package/lib/list/BluePrintStatus/BluePrintStatus.module.css +1 -4
  133. package/lib/list/Comment/Comment.module.css +2 -1
  134. package/lib/list/Dot/Dot.module.css +4 -2
  135. package/lib/list/GridStencils/GridStencils.module.css +7 -9
  136. package/lib/list/ListLayout/ListLayout.module.css +7 -4
  137. package/lib/list/ListStencils/ListStencils.module.css +14 -15
  138. package/lib/list/SecondaryText/SecondaryText.module.css +4 -13
  139. package/lib/list/SentimentStatus/SentimentStatus.module.css +2 -4
  140. package/lib/list/TagNew/TagNew.module.css +3 -2
  141. package/lib/list/listCommon.module.css +3 -7
  142. package/lib/list/status/StatusDropdown/StatusDropdown.module.css +17 -17
  143. package/lib/list/status/StatusListItem/StatusListItem.module.css +10 -18
  144. package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -3
  145. package/lib/lookup/Lookup/Lookup.module.css +2 -2
  146. package/lib/lookup/header/Search/LookupSearch.module.css +10 -23
  147. package/lib/lookup/header/TicketHeader/TicketHeader.module.css +3 -2
  148. package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -12
  149. package/lib/lookup/header/lookupHeaderCommon.module.css +8 -7
  150. package/lib/lookup/header/lookupHeaderCommonResponsive.module.css +2 -6
  151. package/lib/setup/header/Button/HeaderButton.module.css +2 -4
  152. package/lib/setup/header/Link/HeaderLink.module.css +3 -9
  153. package/lib/setup/header/Search/Search.module.css +2 -10
  154. package/lib/setup/header/Views/Views.module.css +1 -4
  155. package/lib/setup/helptips/Description/HelpTipsDescription.module.css +2 -1
  156. package/lib/setup/helptips/Link/HelpTipsLink.module.css +2 -2
  157. package/lib/setup/helptips/ListGroup/ListGroup.module.css +2 -6
  158. package/lib/setup/table/TableData/SetupTableData.module.css +2 -4
  159. package/lib/setup/table/TableHead/SetupTableHead.module.css +1 -6
  160. package/lib/setup/table/TableRow/SetupTableRow.module.css +2 -7
  161. package/lib/version2/GlobalNotification/GlobalNotification.module.css +7 -12
  162. package/lib/version2/errorstate/V2_ErrorStates.module.css +5 -5
  163. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +8 -23
  164. package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +9 -10
  165. package/lib/version2/lookup/alertLookupCommonNew.module.css +6 -4
  166. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +8 -11
  167. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +10 -22
  168. 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
- }, /*#__PURE__*/React.createElement(Container, {
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: 0 var(--zd_size8) ;
92
+ padding-block:0 ;
93
+ padding-inline: var(--zd_size8) ;
93
94
  }
94
95
 
95
- .medium_btnBox, .large_btnBox {
96
- padding: 0 var(--zd_size10) ;
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) 0 ;
178
- margin: var(--zd_size5) 0 ;
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
- [dir=ltr] .iconMrgn {
188
- margin-right: var(--zd_size6) ;
192
+ .iconMrgn {
193
+ margin-inline-end: var(--zd_size6) ;
189
194
  }
190
-
191
- [dir=rtl] .iconMrgn {
192
- margin-left: var(--zd_size6) ;
193
- }