@zohodesk/dot 1.2.4 → 1.3.0-temp-158
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/.cli/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +20 -9
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +1 -1
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/IconButton/IconButton.js.html +466 -0
- package/coverage/IconButton/IconButton.module.css.html +151 -0
- package/coverage/IconButton/index.html +131 -0
- package/coverage/IconButton/props/defaultProps.js.html +136 -0
- package/coverage/IconButton/props/index.html +131 -0
- package/coverage/IconButton/props/propTypes.js.html +187 -0
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +16 -12
- package/coverage/coverage-summary.json +17 -13
- package/coverage/index.html +40 -10
- package/es/Drawer/Drawer.js +3 -2
- package/es/IconButton/__tests__/IconButton.spec.js +148 -0
- package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/es/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/es/v1/ActionButton/ActionButton.js +11 -8
- package/es/v1/AlphabeticList/AlphabeticList.js +7 -3
- package/es/v1/Attachment/Attachment.js +79 -76
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -63
- package/es/v1/AttachmentViewer/AttachmentViewer.js +4 -4
- package/es/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/es/v1/Drawer/Drawer.js +6 -6
- package/es/v1/FlipCard/FlipCard.js +4 -4
- package/es/v1/FormAction/FormAction.js +1 -1
- package/es/v1/FreezeLayer/FreezeLayer.js +3 -3
- package/es/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
- package/es/v1/IconButton/IconButton.js +3 -3
- package/es/v1/Image/Image.js +26 -33
- package/es/v1/ImportantNotes/ImportantNotes.js +1 -1
- package/es/v1/Loader/Loader.js +12 -18
- package/es/v1/MessageBanner/MessageBanner.js +1 -1
- package/es/v1/NewStar/NewStar.js +1 -1
- package/es/v1/Separator/Separator.js +41 -48
- package/es/v1/TagWithIcon/TagWithIcon.js +1 -1
- package/es/v1/ToastMessage/ToastMessage.js +4 -4
- package/es/v1/Upload/Upload.js +60 -67
- package/es/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
- package/es/v1/alert/AlertHeader/AlertHeader.js +58 -49
- package/es/v1/alert/AlertLookup/AlertLookup.js +101 -41
- package/es/v1/avatar/AvatarClose/AvatarClose.js +1 -1
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
- package/es/v1/avatar/AvatarThread/AvatarThread.js +1 -1
- package/es/v1/avatar/AvatarUser/AvatarUser.js +1 -1
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
- package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -15
- package/es/v1/errorstate/Inconvenience/Inconvenience.js +53 -80
- package/es/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
- package/es/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
- package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -73
- package/es/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
- package/es/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +102 -118
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +129 -155
- package/es/v1/form/fields/DateField/DateField.js +132 -163
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +52 -57
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +144 -168
- package/es/v1/form/fields/PhoneField/PhoneField.js +129 -157
- package/es/v1/form/fields/RadioField/RadioField.js +91 -99
- package/es/v1/form/fields/SelectField/SelectField.js +141 -156
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
- package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +8 -5
- package/es/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
- package/es/v1/form/fields/TextEditor/TextEditor.js +1 -1
- package/es/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
- package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
- package/es/v1/form/fields/TextareaField/TextareaField.js +3 -3
- package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +155 -198
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +110 -126
- package/es/v1/list/AvatarFlip/AvatarFlip.js +61 -64
- package/es/v1/list/BluePrintStatus/BluePrintStatus.js +11 -18
- package/es/v1/list/Comment/Comment.js +25 -32
- package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +57 -72
- package/es/v1/list/Dot/Dot.js +9 -16
- package/es/v1/list/DotNew/DotNew.js +11 -18
- package/es/v1/list/GridStencils/GridStencils.js +21 -24
- package/es/v1/list/Icons/AddNewIcon.js +19 -22
- package/es/v1/list/Icons/CompleteIcon.js +21 -24
- package/es/v1/list/Icons/DeleteIcon.js +22 -25
- package/es/v1/list/Icons/EditIcon.js +22 -25
- package/es/v1/list/Icons/FloatingIcons.js +12 -19
- package/es/v1/list/Icons/ReadUnreadIcon.js +24 -27
- package/es/v1/list/Icons/SmartIcon.js +20 -23
- package/es/v1/list/ListLayout/ListLayout.js +54 -68
- package/es/v1/list/ListStencils/ListStencils.js +28 -31
- package/es/v1/list/SecondaryText/AccountName.js +1 -1
- package/es/v1/list/SecondaryText/ContactName.js +1 -1
- package/es/v1/list/SecondryPanel/SecondryPanel.js +1 -2
- package/es/v1/list/Thread/Thread.js +1 -1
- package/es/v1/list/UserTime/UserTime.js +1 -1
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +266 -357
- package/es/v1/list/status/StatusListItem/StatusListItem.js +77 -102
- package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
- package/es/v1/lookup/Lookup/Lookup.js +4 -3
- package/es/v1/lookup/Section/Section.js +15 -21
- package/es/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
- package/es/v1/lookup/header/Search/Search.js +3 -3
- package/es/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
- package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
- package/es/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
- package/es/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
- package/es/v1/setup/header/Button/Button.js +1 -1
- package/es/v1/setup/header/Link/Link.js +1 -1
- package/es/v1/setup/header/Search/Search.js +1 -1
- package/es/v1/setup/table/Table/Table.js +1 -1
- package/es/v1/setup/table/TableBody/TableBody.js +1 -1
- package/es/v1/setup/table/TableData/TableData.js +1 -1
- package/es/v1/setup/table/TableHead/TableHead.js +1 -1
- package/es/v1/setup/table/TableRow/TableRow.js +1 -1
- package/es/v1/svg/PlusIcon.js +20 -27
- package/es/v1/svg/SnippetIcon.js +22 -29
- package/es/v1/svg/TemplateIcon.js +23 -30
- package/lib/Drawer/Drawer.js +3 -2
- package/lib/IconButton/__tests__/IconButton.spec.js +156 -0
- package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/lib/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/lib/v1/ActionButton/ActionButton.js +11 -9
- package/lib/v1/AlphabeticList/AlphabeticList.js +8 -6
- package/lib/v1/Attachment/Attachment.js +78 -113
- package/lib/v1/AttachmentViewer/AttachmentImage.js +61 -96
- package/lib/v1/AttachmentViewer/AttachmentViewer.js +4 -4
- package/lib/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/lib/v1/Drawer/Drawer.js +6 -6
- package/lib/v1/FlipCard/FlipCard.js +4 -4
- package/lib/v1/FormAction/FormAction.js +1 -1
- package/lib/v1/FreezeLayer/FreezeLayer.js +3 -3
- package/lib/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
- package/lib/v1/IconButton/IconButton.js +3 -3
- package/lib/v1/Image/Image.js +26 -71
- package/lib/v1/ImportantNotes/ImportantNotes.js +1 -1
- package/lib/v1/Loader/Loader.js +13 -56
- package/lib/v1/MessageBanner/MessageBanner.js +1 -1
- package/lib/v1/NewStar/NewStar.js +1 -1
- package/lib/v1/Separator/Separator.js +45 -86
- package/lib/v1/TagWithIcon/TagWithIcon.js +1 -1
- package/lib/v1/ToastMessage/ToastMessage.js +4 -4
- package/lib/v1/Upload/Upload.js +59 -104
- package/lib/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
- package/lib/v1/alert/AlertHeader/AlertHeader.js +68 -50
- package/lib/v1/alert/AlertLookup/AlertLookup.js +109 -42
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +1 -1
- package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
- package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
- package/lib/v1/avatar/AvatarThread/AvatarThread.js +1 -1
- package/lib/v1/avatar/AvatarUser/AvatarUser.js +1 -1
- package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
- package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -16
- package/lib/v1/errorstate/Inconvenience/Inconvenience.js +53 -115
- package/lib/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
- package/lib/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
- package/lib/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -108
- package/lib/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
- package/lib/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
- package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +108 -160
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +153 -194
- package/lib/v1/form/fields/DateField/DateField.js +141 -207
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +60 -91
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +169 -229
- package/lib/v1/form/fields/PhoneField/PhoneField.js +151 -194
- package/lib/v1/form/fields/RadioField/RadioField.js +93 -139
- package/lib/v1/form/fields/SelectField/SelectField.js +152 -203
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
- package/lib/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -8
- package/lib/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
- package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
- package/lib/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
- package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
- package/lib/v1/form/fields/TextareaField/TextareaField.js +3 -3
- package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
- package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +161 -254
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +109 -208
- package/lib/v1/list/AvatarFlip/AvatarFlip.js +61 -106
- package/lib/v1/list/BluePrintStatus/BluePrintStatus.js +11 -51
- package/lib/v1/list/Comment/Comment.js +24 -69
- package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +67 -122
- package/lib/v1/list/Dot/Dot.js +9 -54
- package/lib/v1/list/DotNew/DotNew.js +11 -56
- package/lib/v1/list/GridStencils/GridStencils.js +21 -62
- package/lib/v1/list/Icons/AddNewIcon.js +19 -60
- package/lib/v1/list/Icons/CompleteIcon.js +21 -62
- package/lib/v1/list/Icons/DeleteIcon.js +22 -63
- package/lib/v1/list/Icons/EditIcon.js +22 -63
- package/lib/v1/list/Icons/FloatingIcons.js +17 -62
- package/lib/v1/list/Icons/ReadUnreadIcon.js +24 -65
- package/lib/v1/list/Icons/SmartIcon.js +20 -65
- package/lib/v1/list/ListLayout/ListLayout.js +53 -116
- package/lib/v1/list/ListStencils/ListStencils.js +33 -72
- package/lib/v1/list/SecondaryText/AccountName.js +1 -1
- package/lib/v1/list/SecondaryText/ContactName.js +1 -1
- package/lib/v1/list/SecondryPanel/SecondryPanel.js +3 -5
- package/lib/v1/list/Thread/Thread.js +1 -1
- package/lib/v1/list/UserTime/UserTime.js +1 -1
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +367 -472
- package/lib/v1/list/status/StatusListItem/StatusListItem.js +83 -139
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
- package/lib/v1/lookup/Lookup/Lookup.js +5 -3
- package/lib/v1/lookup/Section/Section.js +15 -59
- package/lib/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
- package/lib/v1/lookup/header/Search/Search.js +3 -3
- package/lib/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
- package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
- package/lib/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
- package/lib/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
- package/lib/v1/setup/header/Button/Button.js +1 -1
- package/lib/v1/setup/header/Link/Link.js +1 -1
- package/lib/v1/setup/header/Search/Search.js +1 -1
- package/lib/v1/setup/table/Table/Table.js +1 -1
- package/lib/v1/setup/table/TableBody/TableBody.js +1 -1
- package/lib/v1/setup/table/TableData/TableData.js +1 -1
- package/lib/v1/setup/table/TableHead/TableHead.js +1 -1
- package/lib/v1/setup/table/TableRow/TableRow.js +1 -1
- package/lib/v1/svg/PlusIcon.js +20 -65
- package/lib/v1/svg/SnippetIcon.js +22 -67
- package/lib/v1/svg/TemplateIcon.js +23 -68
- package/package.json +10 -10
- package/result.json +1 -1
- package/unittest/index.html +1 -1
- package/es/v1/errorstate/LinkText/LinkText.js +0 -29
- package/es/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -84
- package/es/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -83
- package/es/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -84
- package/es/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -86
- package/es/v1/errorstate/WillBack/WillBack.js +0 -75
- package/es/v1/errorstate/index.js +0 -8
- package/es/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -63
- package/es/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -65
- package/es/v1/version2/index.js +0 -12
- package/es/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -79
- package/es/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -164
- package/lib/v1/errorstate/LinkText/LinkText.js +0 -80
- package/lib/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -135
- package/lib/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -134
- package/lib/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -135
- package/lib/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -137
- package/lib/v1/errorstate/WillBack/WillBack.js +0 -125
- package/lib/v1/errorstate/index.js +0 -71
- package/lib/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -79
- package/lib/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -81
- package/lib/v1/version2/index.js +0 -58
- package/lib/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -104
- package/lib/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -185
- /package/es/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/index.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/index.js +0 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`IconButton Checking the "Children" 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<button
|
|
6
|
+
aria-pressed="false"
|
|
7
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
8
|
+
data-id="iconContainer"
|
|
9
|
+
data-ishtml="false"
|
|
10
|
+
data-selector-id="iconButton"
|
|
11
|
+
data-test-id="iconContainer"
|
|
12
|
+
>
|
|
13
|
+
<span>
|
|
14
|
+
Element 1
|
|
15
|
+
</span>
|
|
16
|
+
<span>
|
|
17
|
+
Element 2
|
|
18
|
+
</span>
|
|
19
|
+
<span>
|
|
20
|
+
Element 3
|
|
21
|
+
</span>
|
|
22
|
+
</button>
|
|
23
|
+
</DocumentFragment>
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
exports[`IconButton eleRef prop is a function 1`] = `
|
|
27
|
+
<DocumentFragment>
|
|
28
|
+
<button
|
|
29
|
+
aria-pressed="false"
|
|
30
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
31
|
+
data-id="iconContainer"
|
|
32
|
+
data-ishtml="false"
|
|
33
|
+
data-selector-id="iconButton"
|
|
34
|
+
data-test-id="iconContainer"
|
|
35
|
+
/>
|
|
36
|
+
</DocumentFragment>
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
exports[`IconButton rendering ally 1`] = `
|
|
40
|
+
<DocumentFragment>
|
|
41
|
+
<button
|
|
42
|
+
aria-controls="ariaControls"
|
|
43
|
+
aria-expanded="true"
|
|
44
|
+
aria-haspopup="true"
|
|
45
|
+
aria-label="ariaLabel"
|
|
46
|
+
aria-labelledby="ariaLabelledby"
|
|
47
|
+
aria-pressed="false"
|
|
48
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
49
|
+
data-id="iconContainer"
|
|
50
|
+
data-ishtml="false"
|
|
51
|
+
data-selector-id="iconButton"
|
|
52
|
+
data-test-id="iconContainer"
|
|
53
|
+
/>
|
|
54
|
+
</DocumentFragment>
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
exports[`IconButton rendering ally 2`] = `
|
|
58
|
+
<DocumentFragment>
|
|
59
|
+
<button
|
|
60
|
+
aria-expanded="false"
|
|
61
|
+
aria-haspopup="false"
|
|
62
|
+
aria-pressed="false"
|
|
63
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
64
|
+
data-id="iconContainer"
|
|
65
|
+
data-ishtml="false"
|
|
66
|
+
data-selector-id="iconButton"
|
|
67
|
+
data-test-id="iconContainer"
|
|
68
|
+
/>
|
|
69
|
+
</DocumentFragment>
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
exports[`IconButton rendering in ClassName 1`] = `
|
|
73
|
+
<DocumentFragment>
|
|
74
|
+
<button
|
|
75
|
+
aria-pressed="false"
|
|
76
|
+
class="buttonReset wrapper IconButtonClass undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
77
|
+
data-id="iconContainer"
|
|
78
|
+
data-ishtml="false"
|
|
79
|
+
data-selector-id="iconButton"
|
|
80
|
+
data-test-id="iconContainer"
|
|
81
|
+
/>
|
|
82
|
+
</DocumentFragment>
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
exports[`IconButton rendering in Icon 1`] = `
|
|
86
|
+
<DocumentFragment>
|
|
87
|
+
<button
|
|
88
|
+
aria-pressed="false"
|
|
89
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
90
|
+
data-id="iconContainer"
|
|
91
|
+
data-ishtml="false"
|
|
92
|
+
data-selector-id="iconButton"
|
|
93
|
+
data-test-id="iconContainer"
|
|
94
|
+
>
|
|
95
|
+
<i
|
|
96
|
+
aria-hidden="true"
|
|
97
|
+
class="zd_font_icons basic icon-infoStroke fbold iconClass "
|
|
98
|
+
data-id="fontIcon"
|
|
99
|
+
data-selector-id="fontIcon"
|
|
100
|
+
data-test-id="fontIcon"
|
|
101
|
+
style="--zd-iconfont-size: var(--zd_font_size13);"
|
|
102
|
+
/>
|
|
103
|
+
</button>
|
|
104
|
+
</DocumentFragment>
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
exports[`IconButton rendering in dataIsHtml is True 1`] = `
|
|
108
|
+
<DocumentFragment>
|
|
109
|
+
<button
|
|
110
|
+
aria-pressed="false"
|
|
111
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
112
|
+
data-id="iconContainer"
|
|
113
|
+
data-ishtml="true"
|
|
114
|
+
data-selector-id="iconButton"
|
|
115
|
+
data-test-id="iconContainer"
|
|
116
|
+
/>
|
|
117
|
+
</DocumentFragment>
|
|
118
|
+
`;
|
|
119
|
+
|
|
120
|
+
exports[`IconButton rendering in isDisabled is True 1`] = `
|
|
121
|
+
<DocumentFragment>
|
|
122
|
+
<button
|
|
123
|
+
aria-pressed="false"
|
|
124
|
+
class="buttonReset wrapper undefined effect default border defaultHover disabled inflex coldir both"
|
|
125
|
+
data-id="iconContainer"
|
|
126
|
+
data-ishtml="false"
|
|
127
|
+
data-selector-id="iconButton"
|
|
128
|
+
data-test-id="iconContainer"
|
|
129
|
+
disabled=""
|
|
130
|
+
/>
|
|
131
|
+
</DocumentFragment>
|
|
132
|
+
`;
|
|
133
|
+
|
|
134
|
+
exports[`IconButton rendering in title 1`] = `
|
|
135
|
+
<DocumentFragment>
|
|
136
|
+
<button
|
|
137
|
+
aria-pressed="false"
|
|
138
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
139
|
+
data-id="iconContainer"
|
|
140
|
+
data-ishtml="false"
|
|
141
|
+
data-selector-id="iconButton"
|
|
142
|
+
data-test-id="iconContainer"
|
|
143
|
+
data-title="IconTitle"
|
|
144
|
+
/>
|
|
145
|
+
</DocumentFragment>
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
exports[`IconButton rendering isNeedEffect is False 1`] = `
|
|
149
|
+
<DocumentFragment>
|
|
150
|
+
<button
|
|
151
|
+
aria-pressed="false"
|
|
152
|
+
class="buttonReset wrapper undefined inflex coldir both"
|
|
153
|
+
data-id="iconContainer"
|
|
154
|
+
data-ishtml="false"
|
|
155
|
+
data-selector-id="iconButton"
|
|
156
|
+
data-test-id="iconContainer"
|
|
157
|
+
/>
|
|
158
|
+
</DocumentFragment>
|
|
159
|
+
`;
|
|
160
|
+
|
|
161
|
+
exports[`IconButton rendering needButtonTag 1`] = `
|
|
162
|
+
<DocumentFragment>
|
|
163
|
+
<div
|
|
164
|
+
aria-pressed="false"
|
|
165
|
+
class="false wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
166
|
+
data-id="iconContainer"
|
|
167
|
+
data-ishtml="false"
|
|
168
|
+
data-selector-id="iconButton"
|
|
169
|
+
data-test-id="iconContainer"
|
|
170
|
+
/>
|
|
171
|
+
</DocumentFragment>
|
|
172
|
+
`;
|
|
173
|
+
|
|
174
|
+
exports[`IconButton rendering the defult props 1`] = `
|
|
175
|
+
<DocumentFragment>
|
|
176
|
+
<button
|
|
177
|
+
aria-pressed="false"
|
|
178
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
179
|
+
data-id="iconContainer"
|
|
180
|
+
data-ishtml="false"
|
|
181
|
+
data-selector-id="iconButton"
|
|
182
|
+
data-test-id="iconContainer"
|
|
183
|
+
/>
|
|
184
|
+
</DocumentFragment>
|
|
185
|
+
`;
|
|
186
|
+
|
|
187
|
+
exports[`IconButton rendering the hovertypes- bg 1`] = `
|
|
188
|
+
<DocumentFragment>
|
|
189
|
+
<button
|
|
190
|
+
aria-pressed="false"
|
|
191
|
+
class="buttonReset wrapper undefined effect default border bgHover hoverEffect inflex coldir both"
|
|
192
|
+
data-id="iconContainer"
|
|
193
|
+
data-ishtml="false"
|
|
194
|
+
data-selector-id="iconButton"
|
|
195
|
+
data-test-id="iconContainer"
|
|
196
|
+
/>
|
|
197
|
+
</DocumentFragment>
|
|
198
|
+
`;
|
|
199
|
+
|
|
200
|
+
exports[`IconButton rendering the hovertypes- border 1`] = `
|
|
201
|
+
<DocumentFragment>
|
|
202
|
+
<button
|
|
203
|
+
aria-pressed="false"
|
|
204
|
+
class="buttonReset wrapper undefined effect default border borderHover hoverEffect inflex coldir both"
|
|
205
|
+
data-id="iconContainer"
|
|
206
|
+
data-ishtml="false"
|
|
207
|
+
data-selector-id="iconButton"
|
|
208
|
+
data-test-id="iconContainer"
|
|
209
|
+
/>
|
|
210
|
+
</DocumentFragment>
|
|
211
|
+
`;
|
|
212
|
+
|
|
213
|
+
exports[`IconButton rendering the hovertypes- default 1`] = `
|
|
214
|
+
<DocumentFragment>
|
|
215
|
+
<button
|
|
216
|
+
aria-pressed="false"
|
|
217
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
218
|
+
data-id="iconContainer"
|
|
219
|
+
data-ishtml="false"
|
|
220
|
+
data-selector-id="iconButton"
|
|
221
|
+
data-test-id="iconContainer"
|
|
222
|
+
/>
|
|
223
|
+
</DocumentFragment>
|
|
224
|
+
`;
|
|
225
|
+
|
|
226
|
+
exports[`IconButton rendering the isActive true with palette of- default 1`] = `
|
|
227
|
+
<DocumentFragment>
|
|
228
|
+
<button
|
|
229
|
+
aria-pressed="false"
|
|
230
|
+
class="buttonReset wrapper undefined effect default border defaultHover active hoverEffect inflex coldir both"
|
|
231
|
+
data-id="iconContainer"
|
|
232
|
+
data-ishtml="false"
|
|
233
|
+
data-selector-id="iconButton"
|
|
234
|
+
data-test-id="iconContainer"
|
|
235
|
+
/>
|
|
236
|
+
</DocumentFragment>
|
|
237
|
+
`;
|
|
238
|
+
|
|
239
|
+
exports[`IconButton rendering the isActive true with palette of- primary 1`] = `
|
|
240
|
+
<DocumentFragment>
|
|
241
|
+
<button
|
|
242
|
+
aria-pressed="false"
|
|
243
|
+
class="buttonReset wrapper primary_active effect primary border defaultHover active hoverEffect inflex coldir both"
|
|
244
|
+
data-id="iconContainer"
|
|
245
|
+
data-ishtml="false"
|
|
246
|
+
data-selector-id="iconButton"
|
|
247
|
+
data-test-id="iconContainer"
|
|
248
|
+
/>
|
|
249
|
+
</DocumentFragment>
|
|
250
|
+
`;
|
|
251
|
+
|
|
252
|
+
exports[`IconButton rendering the isActive true with palette of- primaryFilled 1`] = `
|
|
253
|
+
<DocumentFragment>
|
|
254
|
+
<button
|
|
255
|
+
aria-pressed="false"
|
|
256
|
+
class="buttonReset wrapper primaryFilled_active effect primaryFilled border defaultHover active hoverEffect inflex coldir both"
|
|
257
|
+
data-id="iconContainer"
|
|
258
|
+
data-ishtml="false"
|
|
259
|
+
data-selector-id="iconButton"
|
|
260
|
+
data-test-id="iconContainer"
|
|
261
|
+
/>
|
|
262
|
+
</DocumentFragment>
|
|
263
|
+
`;
|
|
264
|
+
|
|
265
|
+
exports[`IconButton rendering the palette of- default 1`] = `
|
|
266
|
+
<DocumentFragment>
|
|
267
|
+
<button
|
|
268
|
+
aria-pressed="false"
|
|
269
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
270
|
+
data-id="iconContainer"
|
|
271
|
+
data-ishtml="false"
|
|
272
|
+
data-selector-id="iconButton"
|
|
273
|
+
data-test-id="iconContainer"
|
|
274
|
+
/>
|
|
275
|
+
</DocumentFragment>
|
|
276
|
+
`;
|
|
277
|
+
|
|
278
|
+
exports[`IconButton rendering the palette of- primary 1`] = `
|
|
279
|
+
<DocumentFragment>
|
|
280
|
+
<button
|
|
281
|
+
aria-pressed="false"
|
|
282
|
+
class="buttonReset wrapper primary effect primary border defaultHover hoverEffect inflex coldir both"
|
|
283
|
+
data-id="iconContainer"
|
|
284
|
+
data-ishtml="false"
|
|
285
|
+
data-selector-id="iconButton"
|
|
286
|
+
data-test-id="iconContainer"
|
|
287
|
+
/>
|
|
288
|
+
</DocumentFragment>
|
|
289
|
+
`;
|
|
290
|
+
|
|
291
|
+
exports[`IconButton rendering the palette of- primaryFilled 1`] = `
|
|
292
|
+
<DocumentFragment>
|
|
293
|
+
<button
|
|
294
|
+
aria-pressed="false"
|
|
295
|
+
class="buttonReset wrapper primaryFilled effect primaryFilled border defaultHover hoverEffect inflex coldir both"
|
|
296
|
+
data-id="iconContainer"
|
|
297
|
+
data-ishtml="false"
|
|
298
|
+
data-selector-id="iconButton"
|
|
299
|
+
data-test-id="iconContainer"
|
|
300
|
+
/>
|
|
301
|
+
</DocumentFragment>
|
|
302
|
+
`;
|
|
303
|
+
|
|
304
|
+
exports[`IconButton rendering tourId 1`] = `
|
|
305
|
+
<DocumentFragment>
|
|
306
|
+
<button
|
|
307
|
+
aria-pressed="false"
|
|
308
|
+
class="buttonReset wrapper undefined effect default border defaultHover hoverEffect inflex coldir both"
|
|
309
|
+
data-id="iconContainer"
|
|
310
|
+
data-ishtml="false"
|
|
311
|
+
data-selector-id="iconButton"
|
|
312
|
+
data-test-id="iconContainer"
|
|
313
|
+
data-tour="tourId"
|
|
314
|
+
/>
|
|
315
|
+
</DocumentFragment>
|
|
316
|
+
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
export const propTypes = {
|
|
3
3
|
children: PropTypes.node,
|
|
4
|
-
alignContainer: PropTypes.oneOf('vertical', 'baseline'),
|
|
4
|
+
alignContainer: PropTypes.oneOf(['vertical', 'baseline']),
|
|
5
5
|
renderProps: PropTypes.shape({
|
|
6
6
|
start: PropTypes.func,
|
|
7
7
|
middle: PropTypes.func,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defaultProps } from '../../ActionButton/props/defaultProps';
|
|
3
3
|
import { propTypes } from '../../ActionButton/props/propTypes';
|
|
4
|
-
import Popup from '@zohodesk/components/
|
|
4
|
+
import Popup from '@zohodesk/components/es/v1/Popup/Popup';
|
|
5
5
|
import { Icon } from '@zohodesk/icons';
|
|
6
|
-
import Button from '@zohodesk/components/
|
|
7
|
-
import { Container, Box } from '@zohodesk/components/
|
|
8
|
-
import ResponsiveDropBox from '@zohodesk/components/
|
|
9
|
-
import CssProvider from '@zohodesk/components/
|
|
10
|
-
import btnStyle from '@zohodesk/components/
|
|
6
|
+
import Button from '@zohodesk/components/es/v1/Button/Button';
|
|
7
|
+
import { Container, Box } from '@zohodesk/components/es/v1/Layout';
|
|
8
|
+
import ResponsiveDropBox from '@zohodesk/components/es/v1/ResponsiveDropBox/ResponsiveDropBox';
|
|
9
|
+
import CssProvider from '@zohodesk/components/es/v1/Provider/CssProvider';
|
|
10
|
+
import btnStyle from '@zohodesk/components/es/semantic/Button/semanticButton.module.css';
|
|
11
11
|
import style from '../../ActionButton/ActionButton.module.css';
|
|
12
12
|
|
|
13
13
|
function ActionButton(props) {
|
|
@@ -130,8 +130,11 @@ function ActionButton(props) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
ActionButton.defaultProps = defaultProps;
|
|
133
|
-
ActionButton.propTypes = propTypes;
|
|
133
|
+
ActionButton.propTypes = propTypes;
|
|
134
|
+
const ActionButtonComponent = Popup(ActionButton);
|
|
135
|
+
ActionButtonComponent.defaultProps = ActionButton.defaultProps;
|
|
136
|
+
ActionButtonComponent.propTypes = ActionButton.propTypes; // ActionButton.docs = {
|
|
134
137
|
// componentGroup: 'Atom'
|
|
135
138
|
// };
|
|
136
139
|
|
|
137
|
-
export default
|
|
140
|
+
export default ActionButtonComponent;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React, { memo } from 'react';
|
|
3
3
|
import { AlphabeticList_defaultProps, AlphabeticListItem_defaultProps } from '../../AlphabeticList/props/defaultProps';
|
|
4
4
|
import { AlphabeticList_propTypes, AlphabeticListItem_propTypes, AlphabeticCharacters, NumberList, AlphabeticCharactersWithHash } from '../../AlphabeticList/props/propTypes';
|
|
5
|
-
import { Container, Box } from '@zohodesk/components/
|
|
5
|
+
import { Container, Box } from '@zohodesk/components/es/v1/Layout';
|
|
6
6
|
/*** CSS ***/
|
|
7
7
|
|
|
8
8
|
import style from '../../AlphabeticList/AlphabeticList.module.css';
|
|
@@ -60,6 +60,11 @@ function AlphabeticList(props) {
|
|
|
60
60
|
|
|
61
61
|
AlphabeticList.propTypes = AlphabeticList_propTypes;
|
|
62
62
|
AlphabeticList.defaultProps = AlphabeticList_defaultProps;
|
|
63
|
+
const MemoizedAlphabeticList = /*#__PURE__*/memo(AlphabeticList);
|
|
64
|
+
MemoizedAlphabeticList.propTypes = AlphabeticList_propTypes;
|
|
65
|
+
MemoizedAlphabeticList.defaultProps = AlphabeticList_defaultProps;
|
|
66
|
+
MemoizedAlphabeticList.displayName = 'AlphabeticList';
|
|
67
|
+
export default MemoizedAlphabeticList;
|
|
63
68
|
|
|
64
69
|
function AlphabeticListItem(props) {
|
|
65
70
|
let {
|
|
@@ -86,5 +91,4 @@ function AlphabeticListItem(props) {
|
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
AlphabeticListItem.propTypes = AlphabeticListItem_propTypes;
|
|
89
|
-
AlphabeticListItem.defaultProps = AlphabeticListItem_defaultProps;
|
|
90
|
-
export default /*#__PURE__*/memo(AlphabeticList);
|
|
94
|
+
AlphabeticListItem.defaultProps = AlphabeticListItem_defaultProps;
|
|
@@ -1,87 +1,90 @@
|
|
|
1
|
+
/**** Libraries ****/
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { defaultProps } from '../../Attachment/props/defaultProps';
|
|
3
4
|
import { propTypes } from '../../Attachment/props/propTypes';
|
|
4
5
|
import { Icon } from '@zohodesk/icons';
|
|
5
|
-
import { Container, Box } from '@zohodesk/components/
|
|
6
|
+
import { Container, Box } from '@zohodesk/components/es/v1/Layout';
|
|
6
7
|
import Link from '../Link/Link';
|
|
8
|
+
/**** CSS ****/
|
|
9
|
+
|
|
7
10
|
import style from '../../Attachment/Attachment.module.css';
|
|
8
|
-
export default class Attachment extends React.Component {
|
|
9
|
-
render() {
|
|
10
|
-
let {
|
|
11
|
-
onClick,
|
|
12
|
-
dataId,
|
|
13
|
-
size,
|
|
14
|
-
iconName,
|
|
15
|
-
fileName,
|
|
16
|
-
fileSize,
|
|
17
|
-
downloadLink,
|
|
18
|
-
palette,
|
|
19
|
-
tooltip,
|
|
20
|
-
fileInfo,
|
|
21
|
-
i18nKeys,
|
|
22
|
-
dataSelectorId
|
|
23
|
-
} = this.props;
|
|
24
|
-
let {
|
|
25
|
-
downloadTitle = 'Download'
|
|
26
|
-
} = i18nKeys;
|
|
27
|
-
return /*#__PURE__*/React.createElement(Container, {
|
|
28
|
-
isInline: true,
|
|
29
|
-
className: `${style.attachment} ${onClick ? style.attachmentHover : ''} ${style[`palette_${palette}`]} ${style[size]}`,
|
|
30
|
-
onClick: onClick,
|
|
31
|
-
dataId: dataId,
|
|
32
|
-
"data-title": tooltip,
|
|
33
|
-
alignBox: "row",
|
|
34
|
-
isCover: false,
|
|
35
|
-
dataSelectorId: dataSelectorId,
|
|
36
|
-
tabIndex: "0"
|
|
37
|
-
}, iconName ? /*#__PURE__*/React.createElement(Box, {
|
|
38
|
-
className: style.attachleft
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
40
|
-
align: "both"
|
|
41
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
42
|
-
name: iconName,
|
|
43
|
-
iconClass: style.attachIcon
|
|
44
|
-
}))) : null, /*#__PURE__*/React.createElement(Box, {
|
|
45
|
-
flexible: true,
|
|
46
|
-
className: style.attachright
|
|
47
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
48
|
-
align: "horizontal"
|
|
49
|
-
}, fileName ? /*#__PURE__*/React.createElement(Box, {
|
|
50
|
-
className: style.atatchName,
|
|
51
|
-
"data-title": fileName
|
|
52
|
-
}, fileName) : null, /*#__PURE__*/React.createElement(Box, {
|
|
53
|
-
className: style.footer
|
|
54
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
55
|
-
alignBox: "row",
|
|
56
|
-
align: "baseline",
|
|
57
|
-
isCover: false
|
|
58
|
-
}, fileSize ? /*#__PURE__*/React.createElement(Box, {
|
|
59
|
-
className: style.attachSize,
|
|
60
|
-
adjust: true,
|
|
61
|
-
shrink: true,
|
|
62
|
-
"data-title": fileSize
|
|
63
|
-
}, fileSize) : null, fileInfo ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
64
|
-
className: style.dot
|
|
65
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
66
|
-
className: style.attachSize,
|
|
67
|
-
adjust: true,
|
|
68
|
-
shrink: true,
|
|
69
|
-
"data-title": fileInfo
|
|
70
|
-
}, fileInfo)) : null)))), downloadLink ? /*#__PURE__*/React.createElement(Link, {
|
|
71
|
-
target: "_self",
|
|
72
|
-
href: downloadLink,
|
|
73
|
-
className: style.attachDownload,
|
|
74
|
-
title: downloadTitle,
|
|
75
|
-
hasReload: true
|
|
76
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
77
|
-
name: "ZD-downloadNew",
|
|
78
|
-
iconClass: style.downIcon
|
|
79
|
-
})) : null);
|
|
80
|
-
}
|
|
81
11
|
|
|
82
|
-
|
|
12
|
+
const Attachment = props => {
|
|
13
|
+
const {
|
|
14
|
+
onClick,
|
|
15
|
+
dataId,
|
|
16
|
+
size,
|
|
17
|
+
iconName,
|
|
18
|
+
fileName,
|
|
19
|
+
fileSize,
|
|
20
|
+
downloadLink,
|
|
21
|
+
palette,
|
|
22
|
+
tooltip,
|
|
23
|
+
fileInfo,
|
|
24
|
+
i18nKeys,
|
|
25
|
+
dataSelectorId
|
|
26
|
+
} = props;
|
|
27
|
+
let {
|
|
28
|
+
downloadTitle = 'Download'
|
|
29
|
+
} = i18nKeys;
|
|
30
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
31
|
+
isInline: true,
|
|
32
|
+
className: `${style.attachment} ${onClick ? style.attachmentHover : ''} ${style[`palette_${palette}`]} ${style[size]}`,
|
|
33
|
+
onClick: onClick,
|
|
34
|
+
dataId: dataId,
|
|
35
|
+
"data-title": tooltip,
|
|
36
|
+
alignBox: "row",
|
|
37
|
+
isCover: false,
|
|
38
|
+
dataSelectorId: dataSelectorId,
|
|
39
|
+
tabIndex: "0"
|
|
40
|
+
}, iconName ? /*#__PURE__*/React.createElement(Box, {
|
|
41
|
+
className: style.attachleft
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
43
|
+
align: "both"
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
45
|
+
name: iconName,
|
|
46
|
+
iconClass: style.attachIcon
|
|
47
|
+
}))) : null, /*#__PURE__*/React.createElement(Box, {
|
|
48
|
+
flexible: true,
|
|
49
|
+
className: style.attachright
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
51
|
+
align: "horizontal"
|
|
52
|
+
}, fileName ? /*#__PURE__*/React.createElement(Box, {
|
|
53
|
+
className: style.atatchName,
|
|
54
|
+
"data-title": fileName
|
|
55
|
+
}, fileName) : null, /*#__PURE__*/React.createElement(Box, {
|
|
56
|
+
className: style.footer
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
58
|
+
alignBox: "row",
|
|
59
|
+
align: "baseline",
|
|
60
|
+
isCover: false
|
|
61
|
+
}, fileSize ? /*#__PURE__*/React.createElement(Box, {
|
|
62
|
+
className: style.attachSize,
|
|
63
|
+
adjust: true,
|
|
64
|
+
shrink: true,
|
|
65
|
+
"data-title": fileSize
|
|
66
|
+
}, fileSize) : null, fileInfo ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
67
|
+
className: style.dot
|
|
68
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
69
|
+
className: style.attachSize,
|
|
70
|
+
adjust: true,
|
|
71
|
+
shrink: true,
|
|
72
|
+
"data-title": fileInfo
|
|
73
|
+
}, fileInfo)) : null)))), downloadLink ? /*#__PURE__*/React.createElement(Link, {
|
|
74
|
+
target: "_self",
|
|
75
|
+
href: downloadLink,
|
|
76
|
+
className: style.attachDownload,
|
|
77
|
+
title: downloadTitle,
|
|
78
|
+
hasReload: true
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
80
|
+
name: "ZD-downloadNew",
|
|
81
|
+
iconClass: style.downIcon
|
|
82
|
+
})) : null);
|
|
83
|
+
};
|
|
84
|
+
|
|
83
85
|
Attachment.propTypes = propTypes;
|
|
84
|
-
Attachment.defaultProps = defaultProps;
|
|
86
|
+
Attachment.defaultProps = defaultProps;
|
|
87
|
+
export default Attachment; // if (__DOCS__) {
|
|
85
88
|
// Attachment.docs = {
|
|
86
89
|
// componentGroup: 'Attachment'
|
|
87
90
|
// };
|
|
@@ -1,79 +1,60 @@
|
|
|
1
1
|
/* eslint-disable css-modules/no-unused-class */
|
|
2
2
|
|
|
3
3
|
/** * Libraries ** */
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { useRef, useEffect, useState } from 'react';
|
|
5
5
|
import { AttachmentImage_defaultProps } from '../../AttachmentViewer/props/defaultProps';
|
|
6
6
|
import { AttachmentImage_propTypes } from '../../AttachmentViewer/props/propTypes';
|
|
7
7
|
import Image from '../Image/Image';
|
|
8
8
|
/** * CSS ** */
|
|
9
9
|
|
|
10
10
|
import style from '../../AttachmentViewer/AttachmentViewer.module.css';
|
|
11
|
-
export default class AttachmentImage extends Component {
|
|
12
|
-
constructor(props) {
|
|
13
|
-
super(props);
|
|
14
|
-
this.imageEle = /*#__PURE__*/React.createRef();
|
|
15
|
-
this.state = {
|
|
16
|
-
isLoading: true
|
|
17
|
-
};
|
|
18
|
-
this.imgLoad = this.imgLoad.bind(this);
|
|
19
|
-
}
|
|
20
11
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
const AttachmentImage = props => {
|
|
13
|
+
const {
|
|
14
|
+
isImage,
|
|
15
|
+
onLoad,
|
|
16
|
+
src,
|
|
17
|
+
onClick,
|
|
18
|
+
alt,
|
|
19
|
+
dataId,
|
|
20
|
+
id,
|
|
21
|
+
className,
|
|
22
|
+
isCover
|
|
23
|
+
} = props;
|
|
24
|
+
const imageEle = useRef();
|
|
25
|
+
const [isLoading, setLoading] = useState(true);
|
|
25
26
|
|
|
27
|
+
const imgLoad = () => {
|
|
28
|
+
setLoading(false);
|
|
29
|
+
onLoad && onLoad();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
26
33
|
if (isImage) {
|
|
27
|
-
const image =
|
|
28
|
-
image.addEventListener('load',
|
|
34
|
+
const image = imageEle.current;
|
|
35
|
+
image.addEventListener('load', imgLoad);
|
|
29
36
|
} else {
|
|
30
|
-
|
|
31
|
-
isLoading: false
|
|
32
|
-
});
|
|
37
|
+
setLoading(false);
|
|
33
38
|
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
id,
|
|
53
|
-
className,
|
|
54
|
-
isCover
|
|
55
|
-
} = this.props;
|
|
56
|
-
const {
|
|
57
|
-
isLoading
|
|
58
|
-
} = this.state;
|
|
59
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading ? /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: `${style.spinLoad}`,
|
|
61
|
-
"data-id": `${dataId}_loader`,
|
|
62
|
-
"data-test-id": `${dataId}_loader`
|
|
63
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
64
|
-
className: style.loader
|
|
65
|
-
})) : null, /*#__PURE__*/React.createElement(Image, {
|
|
66
|
-
htmlId: id,
|
|
67
|
-
eleRef: this.imageEle,
|
|
68
|
-
dataId: dataId,
|
|
69
|
-
src: src,
|
|
70
|
-
onClick: onClick,
|
|
71
|
-
className: `${isLoading ? style.hide : ''} ${className}`,
|
|
72
|
-
alt: alt,
|
|
73
|
-
isCover: isCover
|
|
74
|
-
}));
|
|
75
|
-
}
|
|
39
|
+
}, []);
|
|
40
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading ? /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: `${style.spinLoad}`,
|
|
42
|
+
"data-id": `${dataId}_loader`,
|
|
43
|
+
"data-test-id": `${dataId}_loader`
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: style.loader
|
|
46
|
+
})) : null, /*#__PURE__*/React.createElement(Image, {
|
|
47
|
+
htmlId: id,
|
|
48
|
+
eleRef: imageEle,
|
|
49
|
+
dataId: dataId,
|
|
50
|
+
src: src,
|
|
51
|
+
onClick: onClick,
|
|
52
|
+
className: `${isLoading ? style.hide : ''} ${className}`,
|
|
53
|
+
alt: alt,
|
|
54
|
+
isCover: isCover
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
76
57
|
|
|
77
|
-
}
|
|
78
58
|
AttachmentImage.propTypes = AttachmentImage_propTypes;
|
|
79
|
-
AttachmentImage.defaultProps = AttachmentImage_defaultProps;
|
|
59
|
+
AttachmentImage.defaultProps = AttachmentImage_defaultProps;
|
|
60
|
+
export default AttachmentImage;
|