@zohodesk/dot 1.0.0-beta.215 → 1.0.0-beta.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/assets/Appearance/dark/mode/dotDarkMode.module.css +10 -0
- package/assets/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +6 -0
- package/assets/Appearance/dark/themes/green/greenDarkDotTheme.module.css +6 -0
- package/assets/Appearance/dark/themes/orange/orangeDarkDotTheme.module.css +6 -0
- package/assets/Appearance/dark/themes/red/redDarkDotTheme.module.css +6 -0
- package/assets/Appearance/dark/themes/yellow/yellowDarkDotTheme.module.css +6 -0
- package/assets/Appearance/default/mode/dotDefaultMode.module.css +10 -0
- package/assets/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +6 -0
- package/assets/Appearance/default/themes/green/greenDefaultDotTheme.module.css +6 -0
- package/assets/Appearance/default/themes/orange/orangeDefaultDotTheme.module.css +6 -0
- package/assets/Appearance/default/themes/red/redDefaultDotTheme.module.css +6 -0
- package/assets/Appearance/default/themes/yellow/yellowDefaultDotTheme.module.css +6 -0
- package/es/ActionButton/ActionButton.module.css +25 -9
- package/es/AlphabeticList/AlphabeticList.module.css +7 -4
- package/es/Attachment/Attachment.module.css +20 -9
- package/es/AttachmentViewer/Attachment.js +17 -0
- package/es/AttachmentViewer/AttachmentImage.js +85 -0
- package/es/AttachmentViewer/AttachmentViewer.js +530 -0
- package/es/AttachmentViewer/AttachmentViewer.module.css +346 -0
- package/es/AttachmentViewer/utils.js +107 -0
- package/es/ChannelIcon/ChannelIcon.module.css +30 -21
- package/es/Drawer/Drawer.module.css +59 -11
- package/es/FlipCard/FlipCard.module.css +14 -5
- package/es/FormAction/FormAction.module.css +34 -9
- package/es/FreezeLayer/FreezeLayer.module.css +6 -2
- package/es/IconButton/IconButton.module.css +1 -1
- package/es/ImportantNotes/ImportantNotes.module.css +7 -2
- package/es/Loader/Loader.module.css +25 -4
- package/es/Message/Message.module.css +42 -9
- package/es/MessageBanner/MessageBanner.module.css +12 -4
- package/es/NewStar/NewStar.module.css +42 -5
- package/es/ToastMessage/ToastMessage.module.css +96 -25
- package/es/Upload/Upload.module.css +27 -8
- package/es/alert/AlertHeader/AlertHeader.module.css +21 -3
- package/es/alert/AlertLookup/AlertLookup.module.css +6 -2
- package/es/avatar/AvatarClose/AvatarClose.module.css +9 -3
- package/es/avatar/AvatarCollision/AvatarCollision.module.css +18 -4
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +3 -4
- package/es/avatar/AvatarStatus/AvatarStatus.module.css +59 -9
- package/es/avatar/AvatarThread/AvatarThread.module.css +55 -5
- package/es/avatar/AvatarUser/AvatarUser.module.css +81 -10
- package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +10 -3
- package/es/common/dot_animation.module.css +27 -0
- package/es/common/dot_common.module.css +4 -0
- package/es/deprecated/SelectDropdown/SelectDropdown.module.css +11 -3
- package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +19 -6
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +12 -4
- package/es/emptystate/EditionPage/EditionPage.css +9 -3
- package/es/errorstate/EmptyStates.module.css +13 -10
- package/es/errorstate/Inconvenience/Inconvenience.module.css +3 -0
- package/es/errorstate/LinkText/LinkText.module.css +1 -1
- package/es/errorstate/PermissionPlay/PermissionPlay.module.css +2 -2
- package/es/errorstate/WillBack/WillBack.module.css +1 -3
- package/es/form/fields/CurrencyField/CurrencyField.js +1 -1
- package/es/form/fields/Fields.module.css +49 -14
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +7 -4
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +19 -7
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +4 -1
- package/es/form/fields/TextEditor/TextEditor.module.css +149 -72
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +13 -2
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +9 -4
- package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +52 -16
- package/es/layout/SubtabLayout/SubtabLayout.module.css +55 -29
- package/es/list/BluePrintStatus/BluePrintStatus.module.css +4 -1
- package/es/list/Comment/Comment.module.css +5 -0
- package/es/list/DotNew/DotNew.module.css +3 -3
- package/es/list/GridStencils/GridStencils.module.css +70 -16
- package/es/list/Icons/Icons.module.css +1 -1
- package/es/list/ListLayout/ListLayout.module.css +22 -14
- package/es/list/ListStencils/ListStencils.module.css +11 -6
- package/es/list/SecondaryText/SecondaryText.module.css +13 -3
- package/es/list/SentimentStatus/SentimentStatus.module.css +4 -1
- package/es/list/TagNew/TagNew.module.css +14 -7
- package/es/list/Thread/Thread.module.css +13 -1
- package/es/list/UserTime/UserTime.module.css +6 -0
- package/es/list/listCommon.module.css +9 -1
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +19 -6
- package/es/list/status/StatusListItem/StatusListItem.module.css +38 -15
- package/es/lookup/Lookup/Lookup.module.css +2 -2
- package/es/lookup/Section/LookupSection.module.css +2 -2
- package/es/lookup/header/Close/LookupClose.module.css +4 -4
- package/es/lookup/header/Search/LookupSearch.module.css +21 -12
- package/es/lookup/header/TicketHeader/TicketHeader.module.css +5 -2
- package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -3
- package/es/lookup/header/lookupHeaderCommon.module.css +16 -6
- package/es/lookup/header/lookupHeaderCommonResponsive.module.css +12 -3
- package/es/setup/header/Button/HeaderButton.module.css +3 -1
- package/es/setup/header/Link/HeaderLink.module.css +7 -1
- package/es/setup/header/Search/Search.module.css +19 -8
- package/es/setup/header/Views/Views.module.css +15 -5
- package/es/setup/helptips/Link/HelpTipsLink.module.css +1 -0
- package/es/setup/helptips/ListGroup/ListGroup.module.css +6 -1
- package/es/setup/table/TableData/SetupTableData.module.css +11 -3
- package/es/setup/table/TableHead/SetupTableHead.module.css +4 -0
- package/es/setup/table/TableRow/SetupTableRow.module.css +6 -2
- package/es/version2/AlertClose/AlertClose.module.css +1 -1
- package/es/version2/GlobalNotification/GlobalNotification.module.css +44 -9
- package/es/version2/lookup/AlertHeader/AlertHeaderNew.module.css +25 -2
- package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +7 -3
- package/es/version2/lookup/alertLookupCommonNew.module.css +8 -1
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +26 -10
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +47 -10
- package/images/audio_thumbnail.png +0 -0
- package/lib/ActionButton/ActionButton.module.css +0 -1
- package/lib/AttachmentViewer/Attachment.js +28 -0
- package/lib/AttachmentViewer/AttachmentImage.js +129 -0
- package/lib/AttachmentViewer/AttachmentViewer.js +613 -0
- package/lib/AttachmentViewer/AttachmentViewer.module.css +346 -0
- package/lib/AttachmentViewer/utils.js +134 -0
- package/lib/FreezeLayer/FreezeLayer.js +31 -4
- package/lib/Provider/Config.js +21 -0
- package/lib/common/dot_animation.module.css +27 -0
- package/lib/common/dot_common.module.css +4 -0
- package/lib/deprecated/utils/General.js +29 -0
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +1 -1
- package/lib/form/fields/CurrencyField/CurrencyField.js +9 -8
- package/lib/form/fields/DateField/DateField.js +1 -1
- package/lib/form/fields/MultiSelectField/MultiSelectField.js +1 -1
- package/lib/form/fields/PhoneField/PhoneField.js +1 -1
- package/lib/form/fields/RadioField/RadioField.js +1 -1
- package/lib/form/fields/SelectField/SelectField.js +1 -1
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +7 -4
- package/lib/form/fields/TextBoxField/TextBoxField.js +1 -1
- package/lib/form/fields/TextEditor/TextEditor.module.css +13 -2
- package/lib/form/fields/TextareaField/TextareaField.js +1 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +44 -37
- package/lib/setup/header/Views/Views.js +2 -2
- package/lib/utils/General.js +0 -24
- package/package.json +15 -13
package/README.md
CHANGED
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.218
|
|
6
|
+
|
|
7
|
+
- AttachmentViewer , AttachmentImage component added
|
|
8
|
+
|
|
9
|
+
# 1.0.0-beta.217
|
|
10
|
+
|
|
11
|
+
- TagsMultiSelect => boxSize prop added.
|
|
12
|
+
|
|
13
|
+
# 1.0.0-beta.216
|
|
14
|
+
|
|
15
|
+
- CurrencyField => formatCurrency call if check fixed (vavlue will formatted when isActive is false)
|
|
16
|
+
|
|
5
17
|
# 1.0.0-beta.215
|
|
6
18
|
|
|
7
19
|
- CheckBoxField, CurrencyField, DateField, MultiSelectField, PhoneField, RadioField, SelectField, TextBoxField, TextareaField, setup/header/Views/Views => Tooltip undefined case solved
|
|
8
20
|
- StatusDropdown => Enter, Down Arrow Shortcut issue solved
|
|
21
|
+
- TextEditor => editor focus issue fix
|
|
9
22
|
|
|
10
23
|
# 1.0.0-beta.214
|
|
11
24
|
|
|
@@ -518,4 +518,14 @@
|
|
|
518
518
|
|
|
519
519
|
/* tagsmultiselect field */
|
|
520
520
|
--zdt_tagsmultiselectField_count_text: var(--dot_cadetblue);
|
|
521
|
+
|
|
522
|
+
/* attachment viewer */
|
|
523
|
+
--zdt_attachmentviewer_title_text: var(--dot_platinum);
|
|
524
|
+
--zdt_attachmentviewer_button_border: var(--dot_tuna);
|
|
525
|
+
--zdt_attachmentviewer_hover_border: var(--zdt_cta_grey_40_border);
|
|
526
|
+
--zdt_attachmentviewer_selected_border: var(--zdt_cta_primary_border);
|
|
527
|
+
--zdt_attachmentviewer_selected_after_bg: var(--dot_white);
|
|
528
|
+
--zdt_attachmentviewer_selected_box_shadow: rgba(0, 0, 0, 0.34);
|
|
529
|
+
--zdt_attachmentviewer_loader_border: #2a2e38;
|
|
530
|
+
--zdt_attachmentviewer_loader_border_top: #f3f3f3;
|
|
521
531
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: var(--dot_butterflyblue);
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #2469ff;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #1b212b;
|
|
13
|
+
--zdt_attachmentviewer_header_border: var(--dot_tuna);
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #1b212b;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(27 33 43 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: #45a159;
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #0e7c1c;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #1b212b;
|
|
13
|
+
--zdt_attachmentviewer_header_border: var(--dot_tuna);
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #1b212b;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(27 33 43 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: var(--dot_cadmiumorange);
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #a85100;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #1b212b;
|
|
13
|
+
--zdt_attachmentviewer_header_border: var(--dot_tuna);
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #1b212b;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(27 33 43 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: #e94f4f;
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #a81111;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #1b212b;
|
|
13
|
+
--zdt_attachmentviewer_header_border: var(--dot_tuna);
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #1b212b;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(27 33 43 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: #d79835;
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #9b6808;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #1b212b;
|
|
13
|
+
--zdt_attachmentviewer_header_border: var(--dot_tuna);
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #1b212b;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(27 33 43 / 40%);
|
|
10
16
|
}
|
|
@@ -518,4 +518,14 @@
|
|
|
518
518
|
|
|
519
519
|
/* tagsmultiselect field */
|
|
520
520
|
--zdt_tagsmultiselectField_count_text: var(--dot_shuttleGrey);
|
|
521
|
+
|
|
522
|
+
/* attachment viewer */
|
|
523
|
+
--zdt_attachmentviewer_title_text: var(--dot_white);
|
|
524
|
+
--zdt_attachmentviewer_button_border: var(--zdt_cta_grey_35_border);
|
|
525
|
+
--zdt_attachmentviewer_hover_border: var(--zdt_cta_grey_40_border);
|
|
526
|
+
--zdt_attachmentviewer_selected_border: var(--zdt_cta_primary_border);
|
|
527
|
+
--zdt_attachmentviewer_selected_after_bg: var(--dot_white);
|
|
528
|
+
--zdt_attachmentviewer_selected_box_shadow: rgba(0, 0, 0, 0.34);
|
|
529
|
+
--zdt_attachmentviewer_loader_border: #2a2e38;
|
|
530
|
+
--zdt_attachmentviewer_loader_border_top: #f3f3f3;
|
|
521
531
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: #6cbbfc;
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #2469ff;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #2c334d;
|
|
13
|
+
--zdt_attachmentviewer_header_border: #42485f;
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #2c334d;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(44 51 77 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: var(--dot_darkmint);
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #0e7526;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #0f2226;
|
|
13
|
+
--zdt_attachmentviewer_header_border: #1a3439;
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #0f2226;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(15 34 38 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: #e57717;
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #b25900;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #241e13;
|
|
13
|
+
--zdt_attachmentviewer_header_border: #2e2b11;
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #241e13;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(36 30 19 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: #ff6363;
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #ab1a18;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #220f1b;
|
|
13
|
+
--zdt_attachmentviewer_header_border: #321f22;
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #220f1b;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(34 15 27 / 40%);
|
|
10
16
|
}
|
|
@@ -7,4 +7,10 @@
|
|
|
7
7
|
--zdt_commonEmptyState_dark_description: var(--dot_white);
|
|
8
8
|
--zdt_commonEmptyState_dark_link: #e8b923;
|
|
9
9
|
--zdt_commonEmptyState_dark_link_hover: #b59100;
|
|
10
|
+
|
|
11
|
+
/* attachment viewer */
|
|
12
|
+
--zdt_attachmentviewer_header_bg: #222412;
|
|
13
|
+
--zdt_attachmentviewer_header_border: rgba(255, 255, 255, 0.08);
|
|
14
|
+
--zdt_attachmentviewer_footer_bg: #222412;
|
|
15
|
+
--zdt_attachmentviewer_arrow_bg_hover: rgb(34 36 18 / 40%);
|
|
10
16
|
}
|
|
@@ -21,9 +21,12 @@
|
|
|
21
21
|
.primaryBtn, .primaryArw {
|
|
22
22
|
border: 1px solid var(--buttonBorder);
|
|
23
23
|
}
|
|
24
|
-
.primaryBtn {
|
|
24
|
+
[dir=ltr] .primaryBtn {
|
|
25
25
|
border-right: none;
|
|
26
26
|
}
|
|
27
|
+
[dir=rtl] .primaryBtn {
|
|
28
|
+
border-left: none;
|
|
29
|
+
}
|
|
27
30
|
.contentBox,
|
|
28
31
|
.arrowWrapper {
|
|
29
32
|
transition: width var(--zd_transition3), padding var(--zd_transition3), background-color var(--zd_transition2), border-color var(--zd_transition2);
|
|
@@ -31,9 +34,12 @@
|
|
|
31
34
|
.clickable {
|
|
32
35
|
cursor: pointer;
|
|
33
36
|
}
|
|
34
|
-
.contentBoxBdr {
|
|
37
|
+
[dir=ltr] .contentBoxBdr {
|
|
35
38
|
border-radius: var(--zd_size4) 0 0 var(--zd_size4);
|
|
36
39
|
}
|
|
40
|
+
[dir=rtl] .contentBoxBdr {
|
|
41
|
+
border-radius: 0 var(--zd_size4) var(--zd_size4) 0;
|
|
42
|
+
}
|
|
37
43
|
.contentBoxBdrRds {
|
|
38
44
|
border-radius: var(--zd_size4);
|
|
39
45
|
}
|
|
@@ -53,8 +59,7 @@
|
|
|
53
59
|
.small_btnBox {
|
|
54
60
|
padding: 0 var(--zd_size8);
|
|
55
61
|
}
|
|
56
|
-
.medium_btnBox,
|
|
57
|
-
.large_btnBox {
|
|
62
|
+
.medium_btnBox, .large_btnBox {
|
|
58
63
|
padding: 0 var(--zd_size10);
|
|
59
64
|
}
|
|
60
65
|
.txt {
|
|
@@ -77,12 +82,20 @@
|
|
|
77
82
|
}
|
|
78
83
|
.arrowWrapper {
|
|
79
84
|
position: relative;
|
|
80
|
-
border-radius: 0 var(--zd_size4) var(--zd_size4) 0;
|
|
81
|
-
cursor: pointer;
|
|
82
85
|
composes: offSelection from '~@zohodesk/components/lib/common/common.module.css';
|
|
86
|
+
cursor: pointer;
|
|
83
87
|
}
|
|
84
|
-
.
|
|
85
|
-
|
|
88
|
+
[dir=ltr] .arrowWrapper {
|
|
89
|
+
border-radius: 0 var(--zd_size4) var(--zd_size4) 0;
|
|
90
|
+
}
|
|
91
|
+
[dir=rtl] .arrowWrapper {
|
|
92
|
+
border-radius: var(--zd_size4) 0 0 var(--zd_size4);
|
|
93
|
+
}
|
|
94
|
+
[dir=ltr] .primaryFilledArw {
|
|
95
|
+
border-left: 1px solid var(--buttonSeparatorBorder);
|
|
96
|
+
}
|
|
97
|
+
[dir=rtl] .primaryFilledArw {
|
|
98
|
+
border-right: 1px solid var(--buttonSeparatorBorder);
|
|
86
99
|
}
|
|
87
100
|
.small_arrowBox {
|
|
88
101
|
width: var(--zd_size20);
|
|
@@ -115,6 +128,9 @@
|
|
|
115
128
|
.iconClr {
|
|
116
129
|
color: var(--buttonText);
|
|
117
130
|
}
|
|
118
|
-
.iconMrgn {
|
|
131
|
+
[dir=ltr] .iconMrgn {
|
|
119
132
|
margin-right: var(--zd_size6);
|
|
120
133
|
}
|
|
134
|
+
[dir=rtl] .iconMrgn {
|
|
135
|
+
margin-left: var(--zd_size6);
|
|
136
|
+
}
|
|
@@ -7,16 +7,19 @@
|
|
|
7
7
|
composes: varClass;
|
|
8
8
|
composes: h100 from '~@zohodesk/components/lib/common/common.module.css';
|
|
9
9
|
list-style: none;
|
|
10
|
+
pointer-events: initial;
|
|
10
11
|
margin: 0;
|
|
11
12
|
padding: 0;
|
|
12
|
-
pointer-events: initial;
|
|
13
13
|
}
|
|
14
14
|
.column .title {
|
|
15
15
|
margin-bottom: var(--zd_size3);
|
|
16
16
|
}
|
|
17
|
-
.row .title {
|
|
17
|
+
[dir=ltr] .row .title {
|
|
18
18
|
margin-right: var(--zd_size3);
|
|
19
19
|
}
|
|
20
|
+
[dir=rtl] .row .title {
|
|
21
|
+
margin-left: var(--zd_size3);
|
|
22
|
+
}
|
|
20
23
|
.row .letter {
|
|
21
24
|
padding: 0 var(--zd_size3);
|
|
22
25
|
}
|
|
@@ -29,10 +32,10 @@
|
|
|
29
32
|
}
|
|
30
33
|
.list {
|
|
31
34
|
font-size: var(--zd_font_size11);
|
|
32
|
-
text-align: center;
|
|
33
35
|
flex-basis: var(--zd_size12);
|
|
34
|
-
cursor: pointer;
|
|
35
36
|
color: var(--textColor);
|
|
37
|
+
text-align: center;
|
|
38
|
+
cursor: pointer;
|
|
36
39
|
}
|
|
37
40
|
.title {
|
|
38
41
|
flex-basis: var(--zd_size15);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.attachment {
|
|
2
|
-
border: 1px solid var(--zdt_attachment_default_border);
|
|
3
|
-
border-radius: 2px;
|
|
4
2
|
position: relative;
|
|
5
3
|
overflow: hidden;
|
|
4
|
+
border: 1px solid var(--zdt_attachment_default_border);
|
|
5
|
+
border-radius: 2px;
|
|
6
6
|
}
|
|
7
7
|
.attachmentHover {
|
|
8
8
|
cursor: pointer;
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
.palette_transparent {
|
|
14
14
|
background-color: var(--zdt_attachment_transparent_bg);
|
|
15
15
|
}
|
|
16
|
-
.attachmentHover:hover,
|
|
17
|
-
.attachmentHover:hover .attachleft {
|
|
16
|
+
.attachmentHover:hover, .attachmentHover:hover .attachleft {
|
|
18
17
|
border-color: var(--zdt_attachment_default_hover_border);
|
|
19
18
|
}
|
|
20
19
|
.attachmentHover:hover .attachleft i {
|
|
@@ -35,9 +34,12 @@
|
|
|
35
34
|
width: var(--zd_size145);
|
|
36
35
|
height: var(--zd_size40);
|
|
37
36
|
}
|
|
38
|
-
.attachleft {
|
|
37
|
+
[dir=ltr] .attachleft {
|
|
39
38
|
border-right: 1px solid var(--zdt_attachment_default_border);
|
|
40
39
|
}
|
|
40
|
+
[dir=rtl] .attachleft {
|
|
41
|
+
border-left: 1px solid var(--zdt_attachment_default_border);
|
|
42
|
+
}
|
|
41
43
|
.medium .attachleft {
|
|
42
44
|
width: var(--zd_size50);
|
|
43
45
|
}
|
|
@@ -45,9 +47,13 @@
|
|
|
45
47
|
width: var(--zd_size40);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
.medium .attachright {
|
|
50
|
+
[dir=ltr] .medium .attachright {
|
|
49
51
|
padding: var(--zd_size5) var(--zd_size25) var(--zd_size5) var(--zd_size10);
|
|
50
52
|
}
|
|
53
|
+
|
|
54
|
+
[dir=rtl] .medium .attachright {
|
|
55
|
+
padding: var(--zd_size5) var(--zd_size10) var(--zd_size5) var(--zd_size25);
|
|
56
|
+
}
|
|
51
57
|
.small .attachright {
|
|
52
58
|
padding: 0 var(--zd_size10) 0 var(--zd_size10);
|
|
53
59
|
}
|
|
@@ -82,10 +88,15 @@
|
|
|
82
88
|
.attachDownload {
|
|
83
89
|
position: absolute;
|
|
84
90
|
top: calc(var(--zd_size1) * -1);
|
|
85
|
-
|
|
91
|
+
display: none;
|
|
86
92
|
background-color: var(--zdt_attachment_download_bg);
|
|
87
93
|
text-align: center;
|
|
88
|
-
|
|
94
|
+
}
|
|
95
|
+
[dir=ltr] .attachDownload {
|
|
96
|
+
right: calc(var(--zd_size1) * -1);
|
|
97
|
+
}
|
|
98
|
+
[dir=rtl] .attachDownload {
|
|
99
|
+
left: calc(var(--zd_size1) * -1);
|
|
89
100
|
}
|
|
90
101
|
.medium .attachDownload {
|
|
91
102
|
height: var(--zd_size25);
|
|
@@ -113,9 +124,9 @@
|
|
|
113
124
|
}
|
|
114
125
|
|
|
115
126
|
.dot {
|
|
116
|
-
background-color: var(--zdt_dot_text);
|
|
117
127
|
height: 2px;
|
|
118
128
|
width: 2px;
|
|
129
|
+
background-color: var(--zdt_dot_text);
|
|
119
130
|
border-radius: 50%;
|
|
120
131
|
margin: 0 var(--zd_size6);
|
|
121
132
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const UNASSIGNED = 'Unassigned';
|
|
2
|
+
const BROWSER_SUPPORTED_FILES = ['pdf', 'text', 'txt', 'css', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'ico', 'sh', 'mp3', 'wav', 'ogg'];
|
|
3
|
+
export function isAudioFile(fileName) {
|
|
4
|
+
const extension = getExtensionFromFileName(fileName);
|
|
5
|
+
return /mp3|wav|ogg/i.test(extension);
|
|
6
|
+
}
|
|
7
|
+
export function getExtensionFromFileName(fileName) {
|
|
8
|
+
if (fileName && fileName.indexOf(".") !== -1) {
|
|
9
|
+
return fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length).toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return "";
|
|
13
|
+
}
|
|
14
|
+
export function isBrowserSupportedFile(fileName) {
|
|
15
|
+
const extension = getExtensionFromFileName(fileName);
|
|
16
|
+
return BROWSER_SUPPORTED_FILES.indexOf(extension) !== -1;
|
|
17
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* eslint-disable css-modules/no-unused-class */
|
|
2
|
+
|
|
3
|
+
/** * Libraries ** */
|
|
4
|
+
import React, { Component } from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
/** * CSS ** */
|
|
7
|
+
|
|
8
|
+
import style from './AttachmentViewer.module.css';
|
|
9
|
+
import Image from '../Image/Image';
|
|
10
|
+
export default class AttachmentImage extends Component {
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(props);
|
|
13
|
+
this.imageEle = /*#__PURE__*/React.createRef();
|
|
14
|
+
this.state = {
|
|
15
|
+
isLoading: true
|
|
16
|
+
};
|
|
17
|
+
this.imgLoad = this.imgLoad.bind(this);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
componentDidMount() {
|
|
21
|
+
const {
|
|
22
|
+
isImage
|
|
23
|
+
} = this.props;
|
|
24
|
+
|
|
25
|
+
if (isImage) {
|
|
26
|
+
const image = this.imageEle.current;
|
|
27
|
+
image.addEventListener('load', this.imgLoad);
|
|
28
|
+
} else {
|
|
29
|
+
this.setState({
|
|
30
|
+
isLoading: false
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
imgLoad() {
|
|
36
|
+
this.setState({
|
|
37
|
+
isLoading: false
|
|
38
|
+
});
|
|
39
|
+
const {
|
|
40
|
+
onLoad
|
|
41
|
+
} = this.props;
|
|
42
|
+
onLoad && onLoad();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
render() {
|
|
46
|
+
const {
|
|
47
|
+
src,
|
|
48
|
+
onClick,
|
|
49
|
+
alt,
|
|
50
|
+
dataId,
|
|
51
|
+
id,
|
|
52
|
+
className,
|
|
53
|
+
isCover
|
|
54
|
+
} = this.props;
|
|
55
|
+
const {
|
|
56
|
+
isLoading
|
|
57
|
+
} = this.state;
|
|
58
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading ? /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: `${style.spinLoad}`
|
|
60
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: style.loader
|
|
62
|
+
})) : null, /*#__PURE__*/React.createElement(Image, {
|
|
63
|
+
htmlId: id,
|
|
64
|
+
eleRef: this.imageEle,
|
|
65
|
+
dataId: dataId,
|
|
66
|
+
src: src,
|
|
67
|
+
onClick: onClick,
|
|
68
|
+
className: `${isLoading ? style.hide : ''} ${className}`,
|
|
69
|
+
alt: alt,
|
|
70
|
+
isCover: isCover
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
AttachmentImage.propTypes = {
|
|
76
|
+
alt: PropTypes.string,
|
|
77
|
+
className: PropTypes.string,
|
|
78
|
+
dataId: PropTypes.string,
|
|
79
|
+
id: PropTypes.string,
|
|
80
|
+
isCover: PropTypes.bool,
|
|
81
|
+
isImage: PropTypes.string,
|
|
82
|
+
onClick: PropTypes.func,
|
|
83
|
+
onLoad: PropTypes.func,
|
|
84
|
+
src: PropTypes.string
|
|
85
|
+
};
|