@zohodesk/dot 1.0.0-temp-141 → 1.0.0-temp-142
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 +1232 -1218
- package/assets/Appearance/dark/mode/dotDarkMode.module.css +305 -300
- package/assets/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +9 -9
- package/assets/Appearance/dark/themes/green/greenDarkDotTheme.module.css +9 -9
- package/assets/Appearance/dark/themes/orange/orangeDarkDotTheme.module.css +9 -9
- package/assets/Appearance/dark/themes/red/redDarkDotTheme.module.css +9 -9
- package/assets/Appearance/dark/themes/yellow/yellowDarkDotTheme.module.css +9 -9
- package/assets/Appearance/default/mode/dotDefaultMode.module.css +300 -295
- package/assets/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +9 -9
- package/assets/Appearance/default/themes/green/greenDefaultDotTheme.module.css +9 -9
- package/assets/Appearance/default/themes/orange/orangeDefaultDotTheme.module.css +9 -9
- package/assets/Appearance/default/themes/red/redDefaultDotTheme.module.css +9 -9
- package/assets/Appearance/default/themes/yellow/yellowDefaultDotTheme.module.css +9 -9
- package/assets/Appearance/pureDark/mode/dotPureDarkMode.module.css +308 -303
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkDotTheme.module.css +9 -9
- package/assets/Appearance/pureDark/themes/green/greenPureDarkDotTheme.module.css +9 -9
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkDotTheme.module.css +9 -9
- package/assets/Appearance/pureDark/themes/red/redPureDarkDotTheme.module.css +9 -9
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkDotTheme.module.css +9 -9
- package/css_error.log +1 -0
- package/dubFinder.js +96 -96
- package/es/ActionButton/ActionButton.module.css +139 -139
- package/es/AlphabeticList/AlphabeticList.module.css +57 -57
- package/es/Attachment/Attachment.module.css +157 -157
- package/es/AttachmentViewer/AttachmentViewer.module.css +353 -354
- package/es/ChannelIcon/ChannelIcon.module.css +217 -217
- package/es/Drawer/Drawer.js +0 -0
- package/es/Drawer/Drawer.module.css +189 -150
- package/es/ExternalLink/ExternalLink.js +0 -0
- package/es/ExternalLink/ExternalLink.module.css +3 -3
- package/es/ExternalLink/__tests__/ExternalLink.spec.js +0 -0
- package/es/FlipCard/FlipCard.module.css +44 -44
- package/es/FormAction/FormAction.module.css +82 -82
- package/es/FreezeLayer/FreezeLayer.js +2 -7
- package/es/FreezeLayer/css/FreezeLayer.module.css +42 -42
- package/es/IconButton/IconButton.module.css +22 -22
- package/es/Image/Image.module.css +10 -10
- package/es/ImportantNotes/ImportantNotes.module.css +20 -20
- package/es/Link/Link.js +0 -0
- package/es/Link/Link.module.css +3 -3
- package/es/Loader/Loader.module.css +46 -46
- package/es/Message/Message.module.css +102 -102
- package/es/MessageBanner/MessageBanner.module.css +46 -46
- package/es/NewStar/NewStar.module.css +175 -175
- package/es/PlusIcon/PlusIcon.js +0 -0
- package/es/PlusIcon/PlusIcon.module.css +19 -16
- package/es/Separator/Separator.module.css +34 -34
- package/es/ToastMessage/ToastMessage.js +0 -0
- package/es/ToastMessage/ToastMessage.module.css +329 -328
- package/es/Upload/Upload.module.css +125 -125
- package/es/alert/AlertHeader/AlertHeader.module.css +80 -80
- package/es/alert/AlertLookup/AlertLookup.module.css +26 -26
- package/es/avatar/AvatarClose/AvatarClose.module.css +37 -37
- package/es/avatar/AvatarCollision/AvatarCollision.module.css +69 -69
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/es/avatar/AvatarStatus/AvatarStatus.js +0 -0
- package/es/avatar/AvatarStatus/AvatarStatus.module.css +146 -146
- package/es/avatar/AvatarThread/AvatarThread.module.css +166 -166
- package/es/avatar/AvatarUser/AvatarUser.js +0 -0
- package/es/avatar/AvatarUser/AvatarUser.module.css +171 -171
- package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +23 -23
- package/es/common/dot_animation.module.css +26 -26
- package/es/common/dot_boxShadow.module.css +38 -0
- package/es/common/dot_common.module.css +3 -3
- package/es/common/dot_docStyle.module.css +35 -0
- package/es/deprecated/FreezeLayer/_FreezeLayer.module.css +42 -42
- package/es/deprecated/SelectDropdown/SelectDropdown.module.css +56 -56
- package/es/deprecated/utils/KeyboardApi.js +25 -25
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +14 -3
- package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +100 -101
- package/es/dropdown/ToggleDropDown/props/defaultProps.js +3 -1
- package/es/dropdown/ToggleDropDown/props/propTypes.js +6 -1
- package/es/emptystate/CommonEmptyState/CommonEmptyState.js +0 -0
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +85 -85
- package/es/emptystate/EditionPage/EditionPage.css +43 -43
- package/es/errorstate/EmptyStates.module.css +87 -87
- package/es/errorstate/Inconvenience/Inconvenience.module.css +7 -7
- package/es/errorstate/LinkText/LinkText.module.css +6 -6
- package/es/errorstate/NoRequestFound/NoRequestFound.module.css +3 -3
- package/es/errorstate/PermissionPlay/PermissionPlay.module.css +34 -34
- package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +3 -3
- package/es/errorstate/UnableToProcess/UnableToProcess.module.css +3 -3
- package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +3 -3
- package/es/errorstate/WillBack/WillBack.module.css +34 -34
- package/es/form/fields/CheckBoxField/CheckBoxField.js +0 -0
- package/es/form/fields/Fields.module.css +183 -183
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +107 -107
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +9 -9
- package/es/form/fields/TextEditor/TextEditor.module.css +764 -666
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +36 -36
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/es/form/layout/Field/Field.js +0 -0
- package/es/form/layout/Field/Field.module.css +22 -22
- package/es/form/layout/Section/ModuleFormSection.module.css +3 -3
- package/es/form/layout/Section/Section.js +0 -0
- package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +152 -152
- package/es/layout/SubtabLayout/SubtabLayout.module.css +165 -146
- package/es/list/AvatarFlip/AvatarFlip.module.css +3 -3
- package/es/list/BluePrintStatus/BluePrintStatus.module.css +17 -17
- package/es/list/Comment/Comment.module.css +29 -29
- package/es/list/DepartmentDropDown/DepartmentDropDown.module.css +9 -9
- package/es/list/Dot/Dot.module.css +15 -15
- package/es/list/DotNew/DotNew.module.css +25 -22
- package/es/list/GridStencils/GridStencils.module.css +146 -146
- package/es/list/Icons/Icons.module.css +16 -16
- package/es/list/ListLayout/ListLayout.module.css +57 -57
- package/es/list/ListStencils/ListStencils.module.css +67 -67
- package/es/list/SecondaryText/SecondaryText.module.css +136 -136
- package/es/list/SecondaryText/Website.js +0 -0
- package/es/list/SecondryPanel/SecondryPanel.js +0 -0
- package/es/list/SecondryPanel/SecondryPanel.module.css +5 -5
- package/es/list/SentimentStatus/SentimentStatus.module.css +12 -12
- package/es/list/Subject/Subject.module.css +27 -27
- package/es/list/TagNew/TagNew.module.css +117 -115
- package/es/list/Thread/Thread.module.css +42 -42
- package/es/list/UserTime/UserTime.module.css +58 -58
- package/es/list/listCommon.module.css +60 -60
- package/es/list/status/StatusDropdown/StatusDropdown.js +3 -1
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +92 -92
- package/es/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/es/list/status/StatusDropdown/props/propTypes.js +2 -1
- package/es/list/status/StatusListItem/StatusListItem.js +4 -3
- package/es/list/status/StatusListItem/StatusListItem.module.css +109 -104
- package/es/list/status/StatusListItem/props/defaultProps.js +2 -1
- package/es/list/status/StatusListItem/props/propTypes.js +1 -0
- package/es/lookup/EmptyPage/EmptyPage.js +0 -0
- package/es/lookup/EmptyPage/LookupEmptyPage.module.css +12 -12
- package/es/lookup/Lookup/Lookup.js +0 -0
- package/es/lookup/Lookup/Lookup.module.css +26 -33
- package/es/lookup/Section/LookupSection.module.css +8 -8
- package/es/lookup/Section/Section.js +0 -1
- package/es/lookup/header/Close/LookupClose.module.css +15 -15
- package/es/lookup/header/Search/LookupSearch.module.css +57 -57
- package/es/lookup/header/TicketHeader/TicketHeader.module.css +22 -22
- package/es/lookup/header/Title/LookupTitle.module.css +20 -20
- package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +50 -50
- package/es/lookup/header/lookupHeaderCommon.module.css +41 -41
- package/es/lookup/header/lookupHeaderCommonResponsive.module.css +24 -24
- package/es/setup/header/Button/HeaderButton.module.css +5 -5
- package/es/setup/header/Link/HeaderLink.module.css +21 -21
- package/es/setup/header/Search/Search.module.css +68 -68
- package/es/setup/header/Views/Views.module.css +37 -37
- package/es/setup/helptips/Description/HelpTipsDescription.module.css +6 -6
- package/es/setup/helptips/Link/HelpTipsLink.module.css +7 -7
- package/es/setup/helptips/Link/Link.js +0 -0
- package/es/setup/helptips/ListGroup/ListGroup.module.css +22 -22
- package/es/setup/helptips/Title/HelpTipsTitle.module.css +5 -5
- package/es/setup/helptips/Title/Title.js +0 -0
- package/es/setup/table/TableData/SetupTableData.module.css +44 -44
- package/es/setup/table/TableData/Tablehover.module.css +6 -6
- package/es/setup/table/TableHead/SetupTableHead.module.css +12 -12
- package/es/setup/table/TableRow/SetupTableRow.module.css +14 -14
- package/es/setup/table/Text/TableText.module.css +37 -37
- package/es/setup/table/Text/Text.js +0 -0
- package/es/svg/PlusIcon.js +1 -1
- package/es/svg/SnippetIcon.js +2 -2
- package/es/version2/AlertClose/AlertClose.module.css +42 -42
- package/es/version2/GlobalNotification/GlobalNotification.module.css +127 -124
- package/es/version2/alertIcons/AlertIcons.module.css +67 -67
- package/es/version2/errorstate/V2_ErrorStates.module.css +46 -46
- package/es/version2/lookup/AlertHeader/AlertHeader.js +1 -2
- package/es/version2/lookup/AlertHeader/AlertHeaderNew.module.css +86 -88
- package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +43 -43
- package/es/version2/lookup/alertLookupCommonNew.module.css +32 -32
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +127 -106
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +136 -136
- package/install.md +12 -12
- package/lib/ActionButton/ActionButton.module.css +139 -139
- package/lib/AlphabeticList/AlphabeticList.module.css +57 -57
- package/lib/Attachment/Attachment.module.css +157 -157
- package/lib/AttachmentViewer/AttachmentViewer.module.css +353 -354
- package/lib/ChannelIcon/ChannelIcon.module.css +217 -217
- package/lib/Drawer/Drawer.js +0 -0
- package/lib/Drawer/Drawer.module.css +189 -150
- package/lib/ExternalLink/ExternalLink.js +0 -0
- package/lib/ExternalLink/ExternalLink.module.css +3 -3
- package/lib/ExternalLink/__tests__/ExternalLink.spec.js +0 -0
- package/lib/FlipCard/FlipCard.module.css +44 -44
- package/lib/FormAction/FormAction.module.css +82 -82
- package/lib/FreezeLayer/FreezeLayer.js +2 -10
- package/lib/FreezeLayer/css/FreezeLayer.module.css +42 -42
- package/lib/IconButton/IconButton.module.css +22 -22
- package/lib/Image/Image.module.css +10 -10
- package/lib/ImportantNotes/ImportantNotes.module.css +20 -20
- package/lib/Link/Link.js +0 -0
- package/lib/Link/Link.module.css +3 -3
- package/lib/Loader/Loader.module.css +46 -46
- package/lib/Message/Message.module.css +102 -102
- package/lib/MessageBanner/MessageBanner.module.css +46 -46
- package/lib/NewStar/NewStar.module.css +175 -175
- package/lib/PlusIcon/PlusIcon.js +0 -0
- package/lib/PlusIcon/PlusIcon.module.css +19 -16
- package/lib/Separator/Separator.module.css +34 -34
- package/lib/ToastMessage/ToastMessage.js +0 -0
- package/lib/ToastMessage/ToastMessage.module.css +329 -328
- package/lib/Upload/Upload.module.css +125 -125
- package/lib/alert/AlertHeader/AlertHeader.module.css +80 -80
- package/lib/alert/AlertLookup/AlertLookup.module.css +26 -26
- package/lib/avatar/AvatarClose/AvatarClose.module.css +37 -37
- package/lib/avatar/AvatarCollision/AvatarCollision.module.css +69 -69
- package/lib/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/lib/avatar/AvatarStatus/AvatarStatus.js +0 -0
- package/lib/avatar/AvatarStatus/AvatarStatus.module.css +146 -146
- package/lib/avatar/AvatarThread/AvatarThread.module.css +166 -166
- package/lib/avatar/AvatarUser/AvatarUser.js +0 -0
- package/lib/avatar/AvatarUser/AvatarUser.module.css +171 -171
- package/lib/avatar/AvatarWithTeam/AvatarWithTeam.module.css +23 -23
- package/lib/common/dot_animation.module.css +26 -26
- package/lib/common/dot_boxShadow.module.css +38 -0
- package/lib/common/dot_common.module.css +3 -3
- package/lib/common/dot_docStyle.module.css +35 -0
- package/lib/deprecated/FreezeLayer/_FreezeLayer.module.css +42 -42
- package/lib/deprecated/SelectDropdown/SelectDropdown.module.css +56 -56
- package/lib/deprecated/utils/KeyboardApi.js +25 -25
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +14 -3
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +100 -101
- package/lib/dropdown/ToggleDropDown/props/defaultProps.js +3 -1
- package/lib/dropdown/ToggleDropDown/props/propTypes.js +6 -1
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.js +0 -0
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +85 -85
- package/lib/emptystate/EditionPage/EditionPage.css +43 -43
- package/lib/errorstate/EmptyStates.module.css +87 -87
- package/lib/errorstate/Inconvenience/Inconvenience.module.css +7 -7
- package/lib/errorstate/LinkText/LinkText.module.css +6 -6
- package/lib/errorstate/NoRequestFound/NoRequestFound.module.css +3 -3
- package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +34 -34
- package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.module.css +3 -3
- package/lib/errorstate/UnableToProcess/UnableToProcess.module.css +3 -3
- package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.module.css +3 -3
- package/lib/errorstate/WillBack/WillBack.module.css +34 -34
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +0 -0
- package/lib/form/fields/Fields.module.css +183 -183
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +107 -107
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +9 -9
- package/lib/form/fields/TextEditor/TextEditor.module.css +764 -666
- package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +36 -36
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/lib/form/layout/Field/Field.js +0 -0
- package/lib/form/layout/Field/Field.module.css +22 -22
- package/lib/form/layout/Section/ModuleFormSection.module.css +3 -3
- package/lib/form/layout/Section/Section.js +0 -0
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +152 -152
- package/lib/layout/SubtabLayout/SubtabLayout.module.css +165 -146
- package/lib/list/AvatarFlip/AvatarFlip.module.css +3 -3
- package/lib/list/BluePrintStatus/BluePrintStatus.module.css +17 -17
- package/lib/list/Comment/Comment.module.css +29 -29
- package/lib/list/DepartmentDropDown/DepartmentDropDown.module.css +9 -9
- package/lib/list/Dot/Dot.module.css +15 -15
- package/lib/list/DotNew/DotNew.module.css +25 -22
- package/lib/list/GridStencils/GridStencils.module.css +146 -146
- package/lib/list/Icons/Icons.module.css +16 -16
- package/lib/list/ListLayout/ListLayout.module.css +57 -57
- package/lib/list/ListStencils/ListStencils.module.css +67 -67
- package/lib/list/SecondaryText/SecondaryText.module.css +136 -136
- package/lib/list/SecondaryText/Website.js +0 -0
- package/lib/list/SecondryPanel/SecondryPanel.js +0 -0
- package/lib/list/SecondryPanel/SecondryPanel.module.css +5 -5
- package/lib/list/SentimentStatus/SentimentStatus.module.css +12 -12
- package/lib/list/Subject/Subject.module.css +27 -27
- package/lib/list/TagNew/TagNew.module.css +117 -115
- package/lib/list/Thread/Thread.module.css +42 -42
- package/lib/list/UserTime/UserTime.module.css +58 -58
- package/lib/list/listCommon.module.css +60 -60
- package/lib/list/status/StatusDropdown/StatusDropdown.js +3 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +92 -92
- package/lib/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/lib/list/status/StatusListItem/StatusListItem.js +4 -3
- package/lib/list/status/StatusListItem/StatusListItem.module.css +109 -104
- package/lib/list/status/StatusListItem/props/defaultProps.js +2 -1
- package/lib/list/status/StatusListItem/props/propTypes.js +1 -0
- package/lib/lookup/EmptyPage/EmptyPage.js +0 -0
- package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +12 -12
- package/lib/lookup/Lookup/Lookup.js +0 -0
- package/lib/lookup/Lookup/Lookup.module.css +26 -33
- package/lib/lookup/Section/LookupSection.module.css +8 -8
- package/lib/lookup/Section/Section.js +0 -1
- package/lib/lookup/header/Close/LookupClose.module.css +15 -15
- package/lib/lookup/header/Search/LookupSearch.module.css +57 -57
- package/lib/lookup/header/TicketHeader/TicketHeader.module.css +22 -22
- package/lib/lookup/header/Title/LookupTitle.module.css +20 -20
- package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +50 -50
- package/lib/lookup/header/lookupHeaderCommon.module.css +41 -41
- package/lib/lookup/header/lookupHeaderCommonResponsive.module.css +24 -24
- package/lib/setup/header/Button/HeaderButton.module.css +5 -5
- package/lib/setup/header/Link/HeaderLink.module.css +21 -21
- package/lib/setup/header/Search/Search.module.css +68 -68
- package/lib/setup/header/Views/Views.module.css +37 -37
- package/lib/setup/helptips/Description/HelpTipsDescription.module.css +6 -6
- package/lib/setup/helptips/Link/HelpTipsLink.module.css +7 -7
- package/lib/setup/helptips/Link/Link.js +0 -0
- package/lib/setup/helptips/ListGroup/ListGroup.module.css +22 -22
- package/lib/setup/helptips/Title/HelpTipsTitle.module.css +5 -5
- package/lib/setup/helptips/Title/Title.js +0 -0
- package/lib/setup/table/TableData/SetupTableData.module.css +44 -44
- package/lib/setup/table/TableData/Tablehover.module.css +6 -6
- package/lib/setup/table/TableHead/SetupTableHead.module.css +12 -12
- package/lib/setup/table/TableRow/SetupTableRow.module.css +14 -14
- package/lib/setup/table/Text/TableText.module.css +37 -37
- package/lib/setup/table/Text/Text.js +0 -0
- package/lib/svg/PlusIcon.js +1 -1
- package/lib/svg/SnippetIcon.js +2 -2
- package/lib/version2/AlertClose/AlertClose.module.css +42 -42
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +127 -124
- package/lib/version2/alertIcons/AlertIcons.module.css +67 -67
- package/lib/version2/errorstate/V2_ErrorStates.module.css +46 -46
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +1 -2
- package/lib/version2/lookup/AlertHeader/AlertHeaderNew.module.css +86 -88
- package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +43 -43
- package/lib/version2/lookup/alertLookupCommonNew.module.css +32 -32
- package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +127 -106
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +136 -136
- package/package.json +98 -106
- package/es/lookup/Lookup/DraggerUtil.js +0 -31
- package/es/lookup/Lookup/useDragger.js +0 -65
- package/lib/lookup/Lookup/DraggerUtil.js +0 -63
- package/lib/lookup/Lookup/useDragger.js +0 -70
package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css
CHANGED
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
.varClass {
|
|
2
|
-
--commonalert_border_color: var(--zdt_commonalert_default_border);
|
|
3
|
-
}
|
|
4
|
-
.container {
|
|
5
|
-
composes: varClass;
|
|
6
|
-
min-height: var(--zd_size54);
|
|
7
|
-
position: relative;
|
|
8
|
-
color: var(--zdt_desktopnotification_text);
|
|
9
|
-
background-color: var(--alert_lookup_bg_color);
|
|
10
|
-
border-style: solid;
|
|
11
|
-
border-color: var(--commonalert_border_color);
|
|
12
|
-
border-width: 2px 0 0 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.title {
|
|
16
|
-
font-size: var(--zd_font_size18);
|
|
17
|
-
line-height: var(--zd_size22);
|
|
18
|
-
font-family: var(--zd_bold);
|
|
19
|
-
composes: ftsmooth wbreak from '~@zohodesk/components/lib/common/common.module.css';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
[dir=ltr] .title {
|
|
23
|
-
margin: 0 var(--zd_size5) 0 var(--zd_size10);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[dir=rtl] .title {
|
|
27
|
-
margin: 0 var(--zd_size10) 0 var(--zd_size5);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.infoText {
|
|
31
|
-
font-size: var(--zd_font_size14);
|
|
32
|
-
max-width: 100%;
|
|
33
|
-
composes: wbreak from '~@zohodesk/components/lib/common/common.module.css';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Palette */
|
|
37
|
-
|
|
38
|
-
.success {
|
|
39
|
-
--commonalert_border_color: var(--zdt_commonalert_success_border);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.info,.notification,.alarm {
|
|
43
|
-
--commonalert_border_color: var(--zdt_commonalert_info_border);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.danger {
|
|
47
|
-
--commonalert_border_color: var(--zdt_commonalert_danger_border);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.error {
|
|
51
|
-
--commonalert_border_color: var(--zdt_commonalert_error_border);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.warning {
|
|
55
|
-
--commonalert_border_color: var(--zdt_commonalert_warning_border);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/* Primary Header */
|
|
60
|
-
[dir=ltr] .primary {
|
|
61
|
-
padding: var(--zd_size15) var(--zd_size45) 0 var(--zd_size20);
|
|
62
|
-
}
|
|
63
|
-
[dir=rtl] .primary {
|
|
64
|
-
padding: var(--zd_size15) var(--zd_size20) 0 var(--zd_size45);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.primary .iconContainer {
|
|
68
|
-
height: var(--zd_size51);
|
|
69
|
-
width: var(--zd_size51);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.primary .infoText {
|
|
73
|
-
line-height: var(--zd_size18);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.primary .close {
|
|
77
|
-
position: absolute;
|
|
78
|
-
top: var(--zd_size12);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
[dir=ltr] .primary .close {
|
|
82
|
-
right: var(--zd_size12);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
[dir=rtl] .primary .close {
|
|
86
|
-
left: var(--zd_size12);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Secondary Header */
|
|
90
|
-
.secondary {
|
|
91
|
-
composes: wbreak from '~@zohodesk/components/lib/common/common.module.css';
|
|
92
|
-
border-radius: 0 0 var(--zd_size10) var(--zd_size10);
|
|
93
|
-
}
|
|
94
|
-
[dir=ltr] .secondary {
|
|
95
|
-
padding: var(--zd_size18) var(--zd_size70) var(--zd_size19) var(--zd_size75);
|
|
96
|
-
}
|
|
97
|
-
[dir=rtl] .secondary {
|
|
98
|
-
padding: var(--zd_size18) var(--zd_size75) var(--zd_size19) var(--zd_size70);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.secondary .infoText {
|
|
102
|
-
line-height: var(--zd_size20);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.secondary .iconContainer {
|
|
106
|
-
height: var(--zd_size44);
|
|
107
|
-
width: var(--zd_size44);
|
|
108
|
-
position: absolute;
|
|
109
|
-
top: 0;
|
|
110
|
-
bottom: 0;
|
|
111
|
-
margin: auto 0;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
[dir=ltr] .secondary .iconContainer {
|
|
115
|
-
left: var(--zd_size18);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
[dir=rtl] .secondary .iconContainer {
|
|
119
|
-
right: var(--zd_size18);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.secondary .close {
|
|
123
|
-
position: absolute;
|
|
124
|
-
top: 0;
|
|
125
|
-
bottom: 0;
|
|
126
|
-
height: var(--zd_size25);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
[dir=ltr] .secondary .close {
|
|
130
|
-
right: var(--zd_size12);
|
|
131
|
-
margin: auto 0 auto var(--zd_size25);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
[dir=rtl] .secondary .close {
|
|
135
|
-
left: var(--zd_size12);
|
|
136
|
-
margin: auto var(--zd_size25) auto 0;
|
|
1
|
+
.varClass {
|
|
2
|
+
--commonalert_border_color: var(--zdt_commonalert_default_border);
|
|
3
|
+
}
|
|
4
|
+
.container {
|
|
5
|
+
composes: varClass;
|
|
6
|
+
min-height: var(--zd_size54);
|
|
7
|
+
position: relative;
|
|
8
|
+
color: var(--zdt_desktopnotification_text);
|
|
9
|
+
background-color: var(--alert_lookup_bg_color);
|
|
10
|
+
border-style: solid;
|
|
11
|
+
border-color: var(--commonalert_border_color);
|
|
12
|
+
border-width: 2px 0 0 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.title {
|
|
16
|
+
font-size: var(--zd_font_size18);
|
|
17
|
+
line-height: var(--zd_size22);
|
|
18
|
+
font-family: var(--zd_bold);
|
|
19
|
+
composes: ftsmooth wbreak from '~@zohodesk/components/lib/common/common.module.css';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[dir=ltr] .title {
|
|
23
|
+
margin: 0 var(--zd_size5) 0 var(--zd_size10);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[dir=rtl] .title {
|
|
27
|
+
margin: 0 var(--zd_size10) 0 var(--zd_size5);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.infoText {
|
|
31
|
+
font-size: var(--zd_font_size14);
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
composes: wbreak from '~@zohodesk/components/lib/common/common.module.css';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Palette */
|
|
37
|
+
|
|
38
|
+
.success {
|
|
39
|
+
--commonalert_border_color: var(--zdt_commonalert_success_border);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.info,.notification,.alarm {
|
|
43
|
+
--commonalert_border_color: var(--zdt_commonalert_info_border);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.danger {
|
|
47
|
+
--commonalert_border_color: var(--zdt_commonalert_danger_border);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.error {
|
|
51
|
+
--commonalert_border_color: var(--zdt_commonalert_error_border);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.warning {
|
|
55
|
+
--commonalert_border_color: var(--zdt_commonalert_warning_border);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/* Primary Header */
|
|
60
|
+
[dir=ltr] .primary {
|
|
61
|
+
padding: var(--zd_size15) var(--zd_size45) 0 var(--zd_size20);
|
|
62
|
+
}
|
|
63
|
+
[dir=rtl] .primary {
|
|
64
|
+
padding: var(--zd_size15) var(--zd_size20) 0 var(--zd_size45);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.primary .iconContainer {
|
|
68
|
+
height: var(--zd_size51);
|
|
69
|
+
width: var(--zd_size51);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.primary .infoText {
|
|
73
|
+
line-height: var(--zd_size18);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.primary .close {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: var(--zd_size12);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[dir=ltr] .primary .close {
|
|
82
|
+
right: var(--zd_size12);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[dir=rtl] .primary .close {
|
|
86
|
+
left: var(--zd_size12);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Secondary Header */
|
|
90
|
+
.secondary {
|
|
91
|
+
composes: wbreak from '~@zohodesk/components/lib/common/common.module.css';
|
|
92
|
+
border-radius: 0 0 var(--zd_size10) var(--zd_size10);
|
|
93
|
+
}
|
|
94
|
+
[dir=ltr] .secondary {
|
|
95
|
+
padding: var(--zd_size18) var(--zd_size70) var(--zd_size19) var(--zd_size75);
|
|
96
|
+
}
|
|
97
|
+
[dir=rtl] .secondary {
|
|
98
|
+
padding: var(--zd_size18) var(--zd_size75) var(--zd_size19) var(--zd_size70);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.secondary .infoText {
|
|
102
|
+
line-height: var(--zd_size20);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.secondary .iconContainer {
|
|
106
|
+
height: var(--zd_size44);
|
|
107
|
+
width: var(--zd_size44);
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 0;
|
|
110
|
+
bottom: 0;
|
|
111
|
+
margin: auto 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[dir=ltr] .secondary .iconContainer {
|
|
115
|
+
left: var(--zd_size18);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[dir=rtl] .secondary .iconContainer {
|
|
119
|
+
right: var(--zd_size18);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.secondary .close {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 0;
|
|
125
|
+
bottom: 0;
|
|
126
|
+
height: var(--zd_size25);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
[dir=ltr] .secondary .close {
|
|
130
|
+
right: var(--zd_size12);
|
|
131
|
+
margin: auto 0 auto var(--zd_size25);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[dir=rtl] .secondary .close {
|
|
135
|
+
left: var(--zd_size12);
|
|
136
|
+
margin: auto var(--zd_size25) auto 0;
|
|
137
137
|
}
|
package/package.json
CHANGED
|
@@ -1,107 +1,99 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
4
|
-
"main": "lib/index",
|
|
5
|
-
"module": "es/index.js",
|
|
6
|
-
"private": false,
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
9
|
-
},
|
|
10
|
-
"author": "Z Team",
|
|
11
|
-
"homepage": "https://www.npmjs.com/search?q=@zohodesk",
|
|
12
|
-
"license": "ISC",
|
|
13
|
-
"keywords": [
|
|
14
|
-
"DOT",
|
|
15
|
-
"ZOHODESK",
|
|
16
|
-
"ZTEAM",
|
|
17
|
-
"LIBRARY"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"clean": "react-cli clean lib es coverage",
|
|
21
|
-
"dubCheck": "node dubFinder node_modules/@zohodesk/components/lib node_modules/@zohodesk/icons/lib node_modules/@zohodesk/variables/lib",
|
|
22
|
-
"build": "react-cli build:component:cmjs",
|
|
23
|
-
"buildlocal": " react-cli build:component:cmjs && npm run rtl",
|
|
24
|
-
"build:es": "react-cli build:library:es",
|
|
25
|
-
"build:dev": "npm run build:variables && npm run build && npm run build:es --module:mode=dev -- -w",
|
|
26
|
-
"rtl:watch": "react-cli rtl ./src ./es -w",
|
|
27
|
-
"rtl": "react-cli rtl ./src ./lib && react-cli rtl ./src ./es",
|
|
28
|
-
"prepare": "npm run init && npm run build && npm run build:es && npm run rtl",
|
|
29
|
-
"init": "npm run clean && npm run build:variables",
|
|
30
|
-
"build:variables": "node ./preprocess/index",
|
|
31
|
-
"lint": "react-cli lint",
|
|
32
|
-
"lintAll": "react-cli lint ./src",
|
|
33
|
-
"lintAllFix": "npm run lintAll --eslint:fix=true",
|
|
34
|
-
"test": "react-cli test",
|
|
35
|
-
"sstest": "react-cli sstest",
|
|
36
|
-
"common_package_build": "cd ../common && npm run build && cd ../dot",
|
|
37
|
-
"docs": "npm run dubCheck && react-cli docs",
|
|
38
|
-
"postpublish": "react-cli postpublish",
|
|
39
|
-
"download": "rm package-lock.json && rm -rf node_modules/ && npm install",
|
|
40
|
-
"expublish": "npm publish --tag experimental-version"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"velocity-react": "1.4.3",
|
|
45
|
-
"@zohodesk/variables": "1.0.0-beta.30",
|
|
46
|
-
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
47
|
-
"@zohodesk/components": "1.0.0-
|
|
48
|
-
"@zohodesk/icons": "1.0.0-beta.119",
|
|
49
|
-
"@zohodesk/svg": "1.0.0-
|
|
50
|
-
"@zohodesk/virtualizer": "1.0.3",
|
|
51
|
-
"react-sortable-hoc": "^0.8.3",
|
|
52
|
-
"@zohodesk/a11y": "1.3.7"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"velocity-react": "1.4.3",
|
|
56
|
-
"@zohodesk/variables": "1.0.0-beta.30",
|
|
57
|
-
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
58
|
-
"@zohodesk/components": "1.0.0-
|
|
59
|
-
"@zohodesk/icons": "1.0.0-beta.119",
|
|
60
|
-
"@zohodesk/svg": "1.0.0-
|
|
61
|
-
"@zohodesk/virtualizer": "1.0.3",
|
|
62
|
-
"react-sortable-hoc": "^0.8.3",
|
|
63
|
-
"@zohodesk/a11y": "1.3.7"
|
|
64
|
-
},
|
|
65
|
-
"react-cli": {
|
|
66
|
-
"preprocess": {
|
|
67
|
-
"runner": "./preprocess/index.js"
|
|
68
|
-
},
|
|
69
|
-
"css": {
|
|
70
|
-
"plugins": {
|
|
71
|
-
"hasRTL": true
|
|
72
|
-
},
|
|
73
|
-
"exclude": {
|
|
74
|
-
"rtl": [
|
|
75
|
-
"@zohodesk/icons",
|
|
76
|
-
"@zohodesk/variables",
|
|
77
|
-
"@zohodesk/components",
|
|
78
|
-
"/jsapps/components/lib"
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"docs": {
|
|
83
|
-
"disableES5Transpile": true,
|
|
84
|
-
"componentFolder": "./src",
|
|
85
|
-
"cssUniqueness": "false",
|
|
86
|
-
"plugins": {
|
|
87
|
-
"hasRTL": true
|
|
88
|
-
},
|
|
89
|
-
"exclude": {
|
|
90
|
-
"rtl": [
|
|
91
|
-
"@zohodesk/icons",
|
|
92
|
-
"@zohodesk/variables",
|
|
93
|
-
"@zohodesk/components",
|
|
94
|
-
"/jsapps/components/lib"
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"data-mode"
|
|
100
|
-
],
|
|
101
|
-
"after": [
|
|
102
|
-
"data-desk-mode"
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@zohodesk/dot",
|
|
3
|
+
"version": "1.0.0-temp-142",
|
|
4
|
+
"main": "lib/index",
|
|
5
|
+
"module": "es/index.js",
|
|
6
|
+
"private": false,
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"author": "Z Team",
|
|
11
|
+
"homepage": "https://www.npmjs.com/search?q=@zohodesk",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"DOT",
|
|
15
|
+
"ZOHODESK",
|
|
16
|
+
"ZTEAM",
|
|
17
|
+
"LIBRARY"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"clean": "react-cli clean lib es coverage assets && mkdir assets",
|
|
21
|
+
"dubCheck": "node dubFinder node_modules/@zohodesk/components/lib node_modules/@zohodesk/icons/lib node_modules/@zohodesk/variables/lib",
|
|
22
|
+
"build": "react-cli build:component:cmjs",
|
|
23
|
+
"buildlocal": " react-cli build:component:cmjs && npm run rtl",
|
|
24
|
+
"build:es": "react-cli build:library:es",
|
|
25
|
+
"build:dev": "npm run build:variables && npm run build && npm run build:es --module:mode=dev -- -w",
|
|
26
|
+
"rtl:watch": "react-cli rtl ./src ./es -w",
|
|
27
|
+
"rtl": "react-cli rtl ./src ./lib && react-cli rtl ./src ./es",
|
|
28
|
+
"prepare": "npm run init && npm run build && npm run build:es && npm run rtl",
|
|
29
|
+
"init": "npm run clean && npm run build:variables",
|
|
30
|
+
"build:variables": "node ./preprocess/index",
|
|
31
|
+
"lint": "react-cli lint",
|
|
32
|
+
"lintAll": "react-cli lint ./src",
|
|
33
|
+
"lintAllFix": "npm run lintAll --eslint:fix=true",
|
|
34
|
+
"test": "react-cli test",
|
|
35
|
+
"sstest": "react-cli sstest",
|
|
36
|
+
"common_package_build": "cd ../common && npm run build && cd ../dot",
|
|
37
|
+
"docs": "npm run dubCheck && react-cli docs",
|
|
38
|
+
"postpublish": "react-cli postpublish",
|
|
39
|
+
"download": "rm package-lock.json && rm -rf node_modules/ && npm install",
|
|
40
|
+
"expublish": "npm publish --tag experimental-version"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"velocity-react": "1.4.3",
|
|
45
|
+
"@zohodesk/variables": "1.0.0-beta.30",
|
|
46
|
+
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
47
|
+
"@zohodesk/components": "1.0.0-temp-147",
|
|
48
|
+
"@zohodesk/icons": "1.0.0-beta.119",
|
|
49
|
+
"@zohodesk/svg": "1.0.0-temp.52",
|
|
50
|
+
"@zohodesk/virtualizer": "1.0.3",
|
|
51
|
+
"react-sortable-hoc": "^0.8.3",
|
|
52
|
+
"@zohodesk/a11y": "1.3.7"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"velocity-react": "1.4.3",
|
|
56
|
+
"@zohodesk/variables": "1.0.0-beta.30",
|
|
57
|
+
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
58
|
+
"@zohodesk/components": "1.0.0-temp-147",
|
|
59
|
+
"@zohodesk/icons": "1.0.0-beta.119",
|
|
60
|
+
"@zohodesk/svg": "1.0.0-temp.52",
|
|
61
|
+
"@zohodesk/virtualizer": "1.0.3",
|
|
62
|
+
"react-sortable-hoc": "^0.8.3",
|
|
63
|
+
"@zohodesk/a11y": "1.3.7"
|
|
64
|
+
},
|
|
65
|
+
"react-cli": {
|
|
66
|
+
"preprocess": {
|
|
67
|
+
"runner": "./preprocess/index.js"
|
|
68
|
+
},
|
|
69
|
+
"css": {
|
|
70
|
+
"plugins": {
|
|
71
|
+
"hasRTL": true
|
|
72
|
+
},
|
|
73
|
+
"exclude": {
|
|
74
|
+
"rtl": [
|
|
75
|
+
"@zohodesk/icons",
|
|
76
|
+
"@zohodesk/variables",
|
|
77
|
+
"@zohodesk/components",
|
|
78
|
+
"/jsapps/components/lib"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"docs": {
|
|
83
|
+
"disableES5Transpile": true,
|
|
84
|
+
"componentFolder": "./src",
|
|
85
|
+
"cssUniqueness": "false",
|
|
86
|
+
"plugins": {
|
|
87
|
+
"hasRTL": true
|
|
88
|
+
},
|
|
89
|
+
"exclude": {
|
|
90
|
+
"rtl": [
|
|
91
|
+
"@zohodesk/icons",
|
|
92
|
+
"@zohodesk/variables",
|
|
93
|
+
"@zohodesk/components",
|
|
94
|
+
"/jsapps/components/lib"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
107
99
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export function DragPosCalc(_ref) {
|
|
2
|
-
let {
|
|
3
|
-
x,
|
|
4
|
-
y,
|
|
5
|
-
elmnt,
|
|
6
|
-
dragwrpper
|
|
7
|
-
} = _ref;
|
|
8
|
-
if (x < 0) {
|
|
9
|
-
x = 0;
|
|
10
|
-
}
|
|
11
|
-
if (x > dragwrpper.offsetWidth - elmnt.offsetWidth) {
|
|
12
|
-
x = dragwrpper.offsetWidth - elmnt.offsetWidth;
|
|
13
|
-
}
|
|
14
|
-
console.log(dragwrpper.offsetHeight, elmnt.offsetHeight, 'y');
|
|
15
|
-
if (y < 0) {
|
|
16
|
-
y = 0;
|
|
17
|
-
}
|
|
18
|
-
if (y > dragwrpper.offsetHeight - elmnt.offsetHeight) {
|
|
19
|
-
y = dragwrpper.offsetHeight - elmnt.offsetHeight;
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
x,
|
|
23
|
-
y
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export const elementFinder = async (Parent, selector) => {
|
|
27
|
-
while (Parent && Parent.querySelector(selector) === null) {
|
|
28
|
-
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
29
|
-
}
|
|
30
|
-
return Parent && Parent.querySelector(selector);
|
|
31
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
2
|
-
import { elementFinder, DragPosCalc } from "./DraggerUtil";
|
|
3
|
-
export default function useDragger(_ref) {
|
|
4
|
-
let {
|
|
5
|
-
ParentRef = null
|
|
6
|
-
} = _ref;
|
|
7
|
-
let dragableEle = useRef(null); //To set the Dragable Element
|
|
8
|
-
let parentEle = useRef(null); // Eo set the Parent Boundary Element
|
|
9
|
-
let offset = useRef({
|
|
10
|
-
x: 0,
|
|
11
|
-
y: 0
|
|
12
|
-
}); //To set the x and y Positions
|
|
13
|
-
let dragable = useRef(false); // To get track of dragable
|
|
14
|
-
|
|
15
|
-
const elementDrag = e => {
|
|
16
|
-
e = e || window.event;
|
|
17
|
-
e.preventDefault();
|
|
18
|
-
if (dragable.current) {
|
|
19
|
-
const left = offset.current.x + e.clientX;
|
|
20
|
-
const top = offset.current.y + e.clientY;
|
|
21
|
-
if (parentEle.current) {
|
|
22
|
-
const calcValue = DragPosCalc({
|
|
23
|
-
x: left,
|
|
24
|
-
y: top,
|
|
25
|
-
dragwrpper: parentEle.current,
|
|
26
|
-
elmnt: dragableEle.current
|
|
27
|
-
});
|
|
28
|
-
dragableEle.current.style.left = calcValue.x + "px";
|
|
29
|
-
dragableEle.current.style.top = calcValue.y + "px";
|
|
30
|
-
} else {
|
|
31
|
-
dragableEle.current.style.left = left + "px";
|
|
32
|
-
dragableEle.current.style.top = top + "px";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const closeDragElement = () => {
|
|
37
|
-
document.removeEventListener("mouseup", closeDragElement);
|
|
38
|
-
document.removeEventListener("mousemove", elementDrag);
|
|
39
|
-
};
|
|
40
|
-
const dragMouseDown = e => {
|
|
41
|
-
//Initial position
|
|
42
|
-
requestAnimationFrame(() => {
|
|
43
|
-
let dragableEleRect = dragableEle.current.getBoundingClientRect();
|
|
44
|
-
e = e || window.event;
|
|
45
|
-
// e.preventDefault();
|
|
46
|
-
dragableEle.current.style.top = dragableEleRect.top + "px";
|
|
47
|
-
dragableEle.current.style.left = dragableEleRect.left + "px";
|
|
48
|
-
dragableEle.current.style.width = dragableEleRect.width + "px";
|
|
49
|
-
dragableEle.current.style.position = "fixed";
|
|
50
|
-
offset.current.x = dragableEle.current.offsetLeft - e.clientX;
|
|
51
|
-
offset.current.y = dragableEle.current.offsetTop - e.clientY;
|
|
52
|
-
dragable.current = true;
|
|
53
|
-
document.addEventListener("mouseup", closeDragElement);
|
|
54
|
-
document.addEventListener("mousemove", elementDrag);
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
elementFinder(ParentRef.current, "[isdraggable=true]").then(dragableElement => {
|
|
59
|
-
dragableEle.current = dragableElement;
|
|
60
|
-
parentEle.current = ParentRef.current;
|
|
61
|
-
let dragController = dragableEle.current && dragableEle.current.querySelector("[isdrag-header=true]") ? dragableEle.current.querySelector("[isdrag-header=true]") : dragableEle.current;
|
|
62
|
-
dragController && dragController.addEventListener("mousedown", dragMouseDown);
|
|
63
|
-
});
|
|
64
|
-
}, [ParentRef.current]);
|
|
65
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.DragPosCalc = DragPosCalc;
|
|
8
|
-
exports.elementFinder = void 0;
|
|
9
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
10
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
11
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
12
|
-
function DragPosCalc(_ref) {
|
|
13
|
-
var x = _ref.x,
|
|
14
|
-
y = _ref.y,
|
|
15
|
-
elmnt = _ref.elmnt,
|
|
16
|
-
dragwrpper = _ref.dragwrpper;
|
|
17
|
-
if (x < 0) {
|
|
18
|
-
x = 0;
|
|
19
|
-
}
|
|
20
|
-
if (x > dragwrpper.offsetWidth - elmnt.offsetWidth) {
|
|
21
|
-
x = dragwrpper.offsetWidth - elmnt.offsetWidth;
|
|
22
|
-
}
|
|
23
|
-
console.log(dragwrpper.offsetHeight, elmnt.offsetHeight, 'y');
|
|
24
|
-
if (y < 0) {
|
|
25
|
-
y = 0;
|
|
26
|
-
}
|
|
27
|
-
if (y > dragwrpper.offsetHeight - elmnt.offsetHeight) {
|
|
28
|
-
y = dragwrpper.offsetHeight - elmnt.offsetHeight;
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
x: x,
|
|
32
|
-
y: y
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
var elementFinder = /*#__PURE__*/function () {
|
|
36
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(Parent, selector) {
|
|
37
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38
|
-
while (1) switch (_context.prev = _context.next) {
|
|
39
|
-
case 0:
|
|
40
|
-
if (!(Parent && Parent.querySelector(selector) === null)) {
|
|
41
|
-
_context.next = 5;
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
_context.next = 3;
|
|
45
|
-
return new Promise(function (resolve) {
|
|
46
|
-
return requestAnimationFrame(resolve);
|
|
47
|
-
});
|
|
48
|
-
case 3:
|
|
49
|
-
_context.next = 0;
|
|
50
|
-
break;
|
|
51
|
-
case 5:
|
|
52
|
-
return _context.abrupt("return", Parent && Parent.querySelector(selector));
|
|
53
|
-
case 6:
|
|
54
|
-
case "end":
|
|
55
|
-
return _context.stop();
|
|
56
|
-
}
|
|
57
|
-
}, _callee);
|
|
58
|
-
}));
|
|
59
|
-
return function elementFinder(_x, _x2) {
|
|
60
|
-
return _ref2.apply(this, arguments);
|
|
61
|
-
};
|
|
62
|
-
}();
|
|
63
|
-
exports.elementFinder = elementFinder;
|