Pārlūkot izejas kodu

feat(ui) update AtlasKit components

master
Steffen Kolmer 4 gadus atpakaļ
vecāks
revīzija
ef7d425859
42 mainītis faili ar 2046 papildinājumiem un 2006 dzēšanām
  1. 16
    38
      css/_atlaskit_overrides.scss
  2. 2
    2
      css/_audio-preview.scss
  3. 2
    10
      css/_base.scss
  4. 15
    17
      css/_chat.scss
  5. 1
    1
      css/_country-picker.scss
  6. 1
    1
      css/_prejoin.scss
  7. 5
    5
      css/_responsive.scss
  8. 13
    11
      css/_toolbars.scss
  9. 1
    1
      css/_video-preview.scss
  10. 6
    4
      css/_videolayout_default.scss
  11. 7
    5
      css/filmstrip/_tile_view.scss
  12. 1
    1
      css/modals/device-selection/_device-selection.scss
  13. 4
    0
      css/modals/settings/_settings.scss
  14. 1
    1
      modules/UI/videolayout/LargeVideoManager.js
  15. 1703
    1803
      package-lock.json
  16. 20
    20
      package.json
  17. 90
    0
      react/features/base/dialog/components/web/ModalHeader.js
  18. 9
    3
      react/features/base/dialog/components/web/StatelessDialog.js
  19. 25
    0
      react/features/base/dialog/components/web/ThemedDialog.js
  20. 2
    2
      react/features/base/popover/components/Popover.web.js
  21. 1
    1
      react/features/base/react/components/web/Button.js
  22. 1
    1
      react/features/base/react/components/web/InlineDialogFailure.js
  23. 9
    2
      react/features/base/react/components/web/Switch.js
  24. 8
    2
      react/features/base/util/react-focus-lock-wrapper.js
  25. 4
    8
      react/features/chat/components/web/Chat.js
  26. 7
    2
      react/features/chat/components/web/ChatDialogHeader.js
  27. 2
    1
      react/features/deep-linking/components/DeepLinkingDesktopPage.web.js
  28. 40
    26
      react/features/device-selection/components/DeviceSelector.web.js
  29. 2
    1
      react/features/e2ee/components/E2EESection.js
  30. 3
    3
      react/features/filmstrip/components/web/Thumbnail.js
  31. 2
    1
      react/features/lobby/components/web/LobbySection.js
  32. 0
    4
      react/features/notifications/components/web/Notification.js
  33. 4
    1
      react/features/notifications/components/web/NotificationsContainer.js
  34. 7
    2
      react/features/recording/components/LiveStream/web/StreamKeyPicker.js
  35. 3
    3
      react/features/remote-video-menu/components/web/RemoteVideoMenuTriggerButton.js
  36. 1
    1
      react/features/settings/components/web/CalendarTab.js
  37. 22
    17
      react/features/settings/components/web/MoreTab.js
  38. 1
    1
      react/features/settings/components/web/ProfileTab.js
  39. 1
    1
      react/features/settings/components/web/audio/AudioSettingsPopup.js
  40. 1
    1
      react/features/settings/components/web/video/VideoSettingsPopup.js
  41. 1
    1
      react/features/toolbox/components/web/OverflowMenuButton.js
  42. 2
    1
      webpack.config.js

+ 16
- 38
css/_atlaskit_overrides.scss Parādīt failu

@@ -2,65 +2,43 @@
2 2
  * Move the @atlaskit/flag container up a little bit so it does not cover the
3 3
  * toolbar with the first notification.
4 4
  */
5
-.jIMojv{
5
+.atlaskit-portal > #notifications-container {
6 6
     bottom: calc(#{$newToolbarSizeWithPadding}) !important;
7 7
 }
8 8
 
9
-/**
10
- * Disable the slide-in animation for @atlaskit/flag due to the animation
11
- * repeating for each queued flag once it becomes the top flag.
12
- */
13
- .mIBKA:first-child {
14
-    animation: cbfRuT 0s !important;
15
-    -webkit-animation: cbfRuT 0s !important;
16
-}
17
-
18 9
 .modal-dialog-form {
19
-    /**
20
-     * Update the @atlaskit/dropdown-menu trigger wrapper to make sure it looks
21
-     * click-able.
22
-     */
23
-    .cjJUnw {
24
-        cursor: pointer;
25
-    }
26
-
27 10
     /**
28 11
      * Override @atlaskit/dropdown-menu styling when in a modal because the
29 12
      * dropdown backgrounds clash with the modal backgrounds.
30 13
      */
31
-    .cksvax[data-role=droplistContent] {
32
-        border: 1px solid #455166;
14
+    .dropdown-menu div[style*="transform"] {
15
+        outline: 1px solid #455166;
33 16
     }
34 17
 }
35 18
 
36 19
 /**
37
- * Override @atlaskit/theme styling for the top toolbar so it displays over
38
- * the video thumbnail while obscuring as little as possible.
20
+ * Override @atlaskit/modal-dialog header styling
39 21
  */
40
-.videocontainer .tOoji {
41
-    background: none;
22
+.atlaskit-portal [role="dialog"] header {
23
+    .jitsi-icon svg {
24
+        fill: #B8C7E0;
25
+        cursor: pointer;
26
+    }
42 27
 }
43 28
 
44 29
 /**
45
- * Override @atlaskit/InlineDialog styling for the overflowmenu so it displays
46
- * with the correct height.
30
+ * Override @atlaskit/theme styling for the top toolbar so it displays over
31
+ * the video thumbnail while obscuring as little as possible.
47 32
  */
48
-.toolbox-button-wth-dialog .eYJELv {
49
-    max-height: initial;
33
+.videocontainer__toptoolbar > div > div {
34
+    background: none;
50 35
 }
51 36
 
52
-/**
53
- * Override @atlaskit/InlineDialog styling for the overflowmenu so it displays
54
- * a scrollable list of elements at small screen widths.
55
- */
56
-.sc-eNQAEJ {
57
-    overflow-y: auto;
58
-}
59 37
 
60 38
 /**
61 39
  * Keep overflow menu within screen vertical bounds and make it scrollable.
62 40
  */
63
-.toolbox-button-wth-dialog .sc-ckVGcZ.fdAqDG > :first-child {
64
-    max-height: calc(100vh - #{$newToolbarSizeWithPadding} - 16px);
41
+ .toolbox-button-wth-dialog > div:nth-child(2) {
42
+    max-height: calc(100vh - #{$newToolbarSizeWithPadding} - 46px);
65 43
     overflow-y: auto;
66
-}
44
+}

+ 2
- 2
css/_audio-preview.scss Parādīt failu

@@ -143,8 +143,8 @@
143 143
         top: 18px;
144 144
     }
145 145
 
146
-   // Override @atlaskit/InlineDialog container which is made with styled components
147
-    & > div > div:nth-child(2) > div > div {
146
+    // Override @atlaskit/InlineDialog container which is made with styled components
147
+    & > div:nth-child(2) {
148 148
         outline: none;
149 149
         padding: 0;
150 150
     }

+ 2
- 10
css/_base.scss Parādīt failu

@@ -45,20 +45,12 @@ body {
45 45
  * pad the modal container in order for the modals to be centered
46 46
  * while also taking the chat size into consideration.
47 47
 */
48
-@media (min-width: 480px + $sidebarWidth) {
49
-    .shift-right [class^="Modal__FillScreen"] {
48
+@media (min-width: 581px) {
49
+    .shift-right .atlaskit-portal > div:not(.Tooltip) {
50 50
         padding-left: $sidebarWidth;
51 51
     }
52 52
 }
53 53
 
54
-/**
55
- * Similarly, we offset the notifications when the chat is open by
56
- * padding the container.
57
-*/
58
-.shift-right [class^="styledFlagGroup-"] {
59
-    padding-left: $sidebarWidth;
60
-}
61
-
62 54
 .jitsi-icon svg {
63 55
     fill: white;
64 56
 }

+ 15
- 17
css/_chat.scss Parādīt failu

@@ -103,25 +103,19 @@
103 103
     position: relative;
104 104
     width: 100%;
105 105
     z-index: 1;
106
+    display: flex;
107
+    justify-content: space-between;
108
+    padding: 16px;
109
+    align-items: center;
110
+    box-sizing: border-box;
111
+    color: #fff;
112
+    font-weight: 600;
113
+    font-size: 24px;
114
+    line-height: 32px;
106 115
 
107
-    .chat-close {
108
-        align-items: center;
109
-        bottom: 8px;
110
-        color: white;
116
+    .jitsi-icon > svg {
111 117
         cursor: pointer;
112
-        display: flex;
113
-        font-size: 18px;
114
-        height: 40px;
115
-        justify-content: center;
116
-        line-height: 15px;
117
-        padding: 4px;
118
-        position: absolute;
119
-        right: 5px;
120
-        width: 40px;
121
-
122
-        &:hover {
123
-            color: rgba(255, 255, 255, 0.8);
124
-        }
118
+        fill: #A4B8D1;
125 119
     }
126 120
 }
127 121
 
@@ -184,6 +178,10 @@
184 178
         text-overflow: ellipsis;
185 179
         overflow: hidden;
186 180
     }
181
+
182
+    @media (max-width: 580px) {
183
+        display: none !important;
184
+    }
187 185
 }
188 186
 
189 187
 .chatmessage {

+ 1
- 1
css/_country-picker.scss Parādīt failu

@@ -69,7 +69,7 @@
69 69
 }
70 70
 
71 71
 // Override @Atlaskit/inline-dialog styles
72
-.cpick-container > div > div:nth-child(2) > div > div {
72
+.cpick-container > div:nth-child(2) {
73 73
     outline: none;
74 74
     padding: 8px 0 0 0;
75 75
 }

+ 1
- 1
css/_prejoin.scss Parādīt failu

@@ -129,7 +129,7 @@
129 129
     }
130 130
 
131 131
     &-dropdown-container {
132
-        & > div > div:nth-child(2) > div > div {
132
+        & > div:nth-child(2) {
133 133
             background: #fff;
134 134
             padding: 0;
135 135
         }

+ 5
- 5
css/_responsive.scss Parādīt failu

@@ -167,23 +167,23 @@
167 167
 }
168 168
 
169 169
 @media (min-width: 480px) and (max-width: 580px) {
170
-    .shift-right [class^="Modal__PositionerAbsolute"] {
170
+    .shift-right .focus-lock > div > div {
171 171
         @include full-size-modal-positioner();
172 172
     }
173 173
 
174
-    .shift-right [class^="Modal__Dialog-"] {
174
+    .shift-right .focus-lock [role="dialog"] {
175 175
         @include full-size-modal-dialog();
176 176
     }
177 177
 }
178 178
 
179 179
 @media (min-width: 580px) and (max-width: 680px) {
180 180
     .mobile-browser {
181
-        &.shift-right [class^="Modal__PositionerAbsolute"] {
181
+        &.shift-right .focus-lock > div > div {
182 182
             @include full-size-modal-positioner();
183 183
         }
184 184
 
185
-        &.shift-right [class^="Modal__Dialog-"] {
185
+        &.shift-right .focus-lock [role="dialog"] {
186 186
             @include full-size-modal-dialog();
187 187
         }
188 188
     }
189
-}
189
+}

+ 13
- 11
css/_toolbars.scss Parādīt failu

@@ -42,9 +42,11 @@
42 42
         display: none;
43 43
     }
44 44
 
45
-    &.shift-right {
46
-        margin-left: $sidebarWidth;
47
-        width: calc(100% - #{$sidebarWidth});
45
+    @media (min-width: 581px) {
46
+        &.shift-right {
47
+            margin-left: $sidebarWidth;
48
+            width: calc(100% - #{$sidebarWidth});
49
+        }
48 50
     }
49 51
 
50 52
     .toolbox-background {
@@ -88,31 +90,31 @@
88 90
                     margin: 0px 4px;
89 91
                     width: 38px;
90 92
                     height: 38px;
91
-        
93
+
92 94
                     &:hover {
93 95
                         background-color: #daebfa;
94 96
                         border: 1px solid #daebfa;
95 97
                     }
96
-        
98
+
97 99
                     &.toggled {
98 100
                         background: #2a3a4b;
99 101
                         border: 1px solid #5e6d7a;
100
-    
102
+
101 103
                         svg {
102 104
                             fill: #fff;
103 105
                         }
104
-        
106
+
105 107
                         &:hover {
106 108
                             background-color: #5e6d7a;
107 109
                         }
108 110
                     }
109
-        
111
+
110 112
                     &.disabled, .disabled & {
111 113
                         cursor: initial;
112 114
                         color: #fff;
113 115
                         background-color: #a4b8d1;
114 116
                     }
115
-    
117
+
116 118
                     svg {
117 119
                         fill: #5e6d7a;
118 120
                     }
@@ -124,7 +126,7 @@
124 126
                         border: 1px solid $hangupColor;
125 127
                         width: 40px;
126 128
                         height: 40px;
127
-                
129
+
128 130
                         &:hover {
129 131
                             background-color: $hangupColor;
130 132
                         }
@@ -262,7 +264,7 @@
262 264
             &:hover, &.toggled {
263 265
                 background: $newToolbarButtonHoverColor;
264 266
             }
265
-    
267
+
266 268
             &.disabled {
267 269
                 cursor: initial !important;
268 270
                 background-color: #a4b8d1 !important;

+ 1
- 1
css/_video-preview.scss Parādīt failu

@@ -63,7 +63,7 @@
63 63
     }
64 64
 
65 65
     // Override @atlaskit/InlineDialog container which is made with styled components
66
-    & > div > div:nth-child(2) > div > div {
66
+    & > div:nth-child(2) {
67 67
         outline: none;
68 68
         padding: 0;
69 69
     }

+ 6
- 4
css/_videolayout_default.scss Parādīt failu

@@ -182,10 +182,12 @@
182 182
         z-index: $zindex2;
183 183
     }
184 184
 
185
-    &.shift-right {
186
-        &#largeVideoContainer {
187
-            margin-left: $sidebarWidth;
188
-            width: calc(100% - #{$sidebarWidth});
185
+    @media (min-width: 581px) {
186
+        &.shift-right {
187
+            &#largeVideoContainer {
188
+                margin-left: $sidebarWidth;
189
+                width: calc(100% - #{$sidebarWidth});
190
+            }
189 191
         }
190 192
     }
191 193
 }

+ 7
- 5
css/filmstrip/_tile_view.scss Parādīt failu

@@ -47,12 +47,14 @@
47 47
         width: 100%;
48 48
         z-index: $filmstripVideosZ;
49 49
 
50
-        &.shift-right {
51
-            margin-left: $sidebarWidth;
52
-            width: calc(100% - #{$sidebarWidth});
50
+        @media (min-width: 581px) {
51
+            &.shift-right {
52
+                margin-left: $sidebarWidth;
53
+                width: calc(100% - #{$sidebarWidth});
53 54
 
54
-            #filmstripRemoteVideos {
55
-                width: calc(100vw - #{$sidebarWidth});
55
+                #filmstripRemoteVideos {
56
+                    width: calc(100vw - #{$sidebarWidth});
57
+                }
56 58
             }
57 59
         }
58 60
     }

+ 1
- 1
css/modals/device-selection/_device-selection.scss Parādīt failu

@@ -39,7 +39,7 @@
39 39
 
40 40
         .device-selector-trigger-text {
41 41
             overflow: hidden;
42
-            margin-left: 8px;
42
+            text-align: center;
43 43
             text-overflow: ellipsis;
44 44
             white-space: nowrap;
45 45
             width: 100%;

+ 4
- 0
css/modals/settings/_settings.scss Parādīt failu

@@ -23,6 +23,10 @@
23 23
         padding: 20px 0px 4px 0px;
24 24
     }
25 25
 
26
+    input[type="checkbox"] + svg + span {
27
+        color: #9FB0CC;
28
+    }
29
+
26 30
     .calendar-tab,
27 31
     .more-tab,
28 32
     .profile-edit {

+ 1
- 1
modules/UI/videolayout/LargeVideoManager.js Parādīt failu

@@ -372,7 +372,7 @@ export default class LargeVideoManager {
372 372
         let widthToUse = this.preferredWidth || window.innerWidth;
373 373
         const { isOpen } = APP.store.getState()['features/chat'];
374 374
 
375
-        if (isOpen) {
375
+        if (isOpen && window.innerWidth > 580) {
376 376
             /**
377 377
              * If chat state is open, we re-compute the container width
378 378
              * by subtracting the default width of the chat.

+ 1703
- 1803
package-lock.json
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 20
- 20
package.json Parādīt failu

@@ -15,23 +15,23 @@
15 15
   "author": "",
16 16
   "readmeFilename": "README.md",
17 17
   "dependencies": {
18
-    "@atlaskit/button": "10.1.1",
19
-    "@atlaskit/checkbox": "5.0.10",
20
-    "@atlaskit/dropdown-menu": "6.1.25",
21
-    "@atlaskit/field-text": "7.0.19",
22
-    "@atlaskit/field-text-area": "4.0.15",
23
-    "@atlaskit/flag": "13.0.0",
24
-    "@atlaskit/icon": "15.0.3",
25
-    "@atlaskit/inline-dialog": "5.3.0",
26
-    "@atlaskit/inline-message": "7.0.10",
27
-    "@atlaskit/lozenge": "6.2.4",
28
-    "@atlaskit/modal-dialog": "8.0.1",
29
-    "@atlaskit/multi-select": "11.0.13",
30
-    "@atlaskit/spinner": "9.0.13",
31
-    "@atlaskit/tabs": "8.0.11",
32
-    "@atlaskit/theme": "7.0.2",
33
-    "@atlaskit/toggle": "5.0.14",
34
-    "@atlaskit/tooltip": "12.1.13",
18
+    "@atlaskit/button": "15.1.4",
19
+    "@atlaskit/checkbox": "12.0.0",
20
+    "@atlaskit/dropdown-menu": "10.1.2",
21
+    "@atlaskit/field-text": "11.0.4",
22
+    "@atlaskit/field-text-area": "8.0.4",
23
+    "@atlaskit/flag": "14.1.0",
24
+    "@atlaskit/icon": "21.2.0",
25
+    "@atlaskit/inline-dialog": "13.0.9",
26
+    "@atlaskit/inline-message": "11.0.8",
27
+    "@atlaskit/lozenge": "10.1.1",
28
+    "@atlaskit/modal-dialog": "11.2.4",
29
+    "@atlaskit/multi-select": "15.0.5",
30
+    "@atlaskit/spinner": "15.0.6",
31
+    "@atlaskit/tabs": "12.1.2",
32
+    "@atlaskit/theme": "11.0.2",
33
+    "@atlaskit/toggle": "12.0.3",
34
+    "@atlaskit/tooltip": "17.1.2",
35 35
     "@jitsi/js-utils": "1.0.5",
36 36
     "@microsoft/microsoft-graph-client": "1.1.0",
37 37
     "@react-native-async-storage/async-storage": "1.13.2",
@@ -49,11 +49,11 @@
49 49
     "i18next": "17.0.6",
50 50
     "i18next-browser-languagedetector": "3.0.1",
51 51
     "i18next-xhr-backend": "3.0.0",
52
-    "jQuery-Impromptu": "github:trentrichardson/jQuery-Impromptu#v6.0.0",
53 52
     "jitsi-meet-logger": "github:jitsi/jitsi-meet-logger#v1.0.0",
54 53
     "jquery": "3.5.1",
55 54
     "jquery-contextmenu": "2.4.5",
56 55
     "jquery-i18next": "1.2.1",
56
+    "jQuery-Impromptu": "github:trentrichardson/jQuery-Impromptu#v6.0.0",
57 57
     "js-md5": "0.6.1",
58 58
     "jwt-decode": "2.2.0",
59 59
     "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#be18ff34bedf38c7475fe4953074c7959000e15f",
@@ -64,8 +64,8 @@
64 64
     "olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
65 65
     "pixelmatch": "5.1.0",
66 66
     "punycode": "2.1.1",
67
-    "react": "16.9",
68
-    "react-dom": "16.9",
67
+    "react": "16.12",
68
+    "react-dom": "16.12",
69 69
     "react-emoji-render": "1.2.4",
70 70
     "react-i18next": "10.11.4",
71 71
     "react-linkify": "1.0.0-alpha",

+ 90
- 0
react/features/base/dialog/components/web/ModalHeader.js Parādīt failu

@@ -0,0 +1,90 @@
1
+// @flow
2
+/* eslint-disable react/no-multi-comp */
3
+import ErrorIcon from '@atlaskit/icon/glyph/error';
4
+import WarningIcon from '@atlaskit/icon/glyph/warning';
5
+import {
6
+    Header,
7
+    Title,
8
+    titleIconWrapperStyles,
9
+    TitleText
10
+} from '@atlaskit/modal-dialog/dist/es2019/styled/Content';
11
+import React from 'react';
12
+
13
+import { Icon, IconClose } from '../../../icons';
14
+
15
+const TitleIcon = ({ appearance }: { appearance?: 'danger' | 'warning' }) => {
16
+    if (!appearance) {
17
+        return null;
18
+    }
19
+
20
+    const IconSymbol = appearance === 'danger' ? ErrorIcon : WarningIcon;
21
+
22
+    return (
23
+        <span css = { titleIconWrapperStyles(appearance) }>
24
+            <IconSymbol label = { `${appearance} icon` } />
25
+        </span>
26
+    );
27
+};
28
+
29
+type Props = {
30
+    id: string,
31
+    appearance?: 'danger' | 'warning',
32
+    heading: string,
33
+    onClose: Function,
34
+    showKeyline: boolean,
35
+    isHeadingMultiline: boolean,
36
+    testId: string,
37
+    t: Function
38
+}
39
+
40
+/**
41
+ * A default header for modal-dialog components
42
+ *
43
+ * @export
44
+ * @class ModalHeader
45
+ * @extends {React.Component<Props>}
46
+ */
47
+export default class ModalHeader extends React.Component<Props> {
48
+    static defaultProps = {
49
+        isHeadingMultiline: true
50
+    };
51
+
52
+    /**
53
+     * Implements React's {@link Component#render()}.
54
+     *
55
+     * @inheritdoc
56
+     * @returns {ReactElement}
57
+     */
58
+    render() {
59
+        const {
60
+            id,
61
+            appearance,
62
+            heading,
63
+            onClose,
64
+            showKeyline,
65
+            isHeadingMultiline,
66
+            testId
67
+        } = this.props;
68
+
69
+        if (!heading) {
70
+            return null;
71
+        }
72
+
73
+        return (
74
+            <Header showKeyline = { showKeyline }>
75
+                <Title>
76
+                    <TitleIcon appearance = { appearance } />
77
+                    <TitleText
78
+                        data-testid = { testId && `${testId}-heading` }
79
+                        id = { id }
80
+                        isHeadingMultiline = { isHeadingMultiline }>
81
+                        {heading}
82
+                    </TitleText>
83
+                </Title>
84
+                <Icon
85
+                    onClick = { onClose }
86
+                    src = { IconClose } />
87
+            </Header>
88
+        );
89
+    }
90
+}

+ 9
- 3
react/features/base/dialog/components/web/StatelessDialog.js Parādīt failu

@@ -1,6 +1,7 @@
1 1
 // @flow
2 2
 
3
-import Button, { ButtonGroup } from '@atlaskit/button';
3
+import ButtonGroup from '@atlaskit/button/button-group';
4
+import Button from '@atlaskit/button/standard-button';
4 5
 import Modal, { ModalFooter } from '@atlaskit/modal-dialog';
5 6
 import _ from 'lodash';
6 7
 import React, { Component } from 'react';
@@ -8,6 +9,8 @@ import React, { Component } from 'react';
8 9
 import { translate } from '../../../i18n/functions';
9 10
 import type { DialogProps } from '../../constants';
10 11
 
12
+import ModalHeader from './ModalHeader';
13
+
11 14
 /**
12 15
  * The ID to be used for the cancel button if enabled.
13 16
  * @type {string}
@@ -127,10 +130,13 @@ class StatelessDialog extends Component<Props> {
127 130
             <Modal
128 131
                 autoFocus = { true }
129 132
                 components = {{
130
-                    Header: customHeader
133
+                    Header: customHeader ? customHeader : props => (
134
+                        <ModalHeader
135
+                            { ...props }
136
+                            heading = { titleString || t(titleKey) } />
137
+                    )
131 138
                 }}
132 139
                 footer = { this._renderFooter }
133
-                heading = { customHeader ? undefined : titleString || t(titleKey) }
134 140
                 i18n = { this.props.i18n }
135 141
                 onClose = { this._onDialogDismissed }
136 142
                 onDialogDismissed = { this._onDialogDismissed }

+ 25
- 0
react/features/base/dialog/components/web/ThemedDialog.js Parādīt failu

@@ -0,0 +1,25 @@
1
+import {
2
+    Dialog,
3
+    FillScreen,
4
+    dialogWidth,
5
+    dialogHeight,
6
+    PositionerAbsolute,
7
+    PositionerRelative
8
+} from '@atlaskit/modal-dialog/dist/es2019/styled/Modal.js';
9
+import { N0, DN50 } from '@atlaskit/theme/colors';
10
+import { themed } from '@atlaskit/theme/components';
11
+import React from 'react';
12
+
13
+const ThemedDialog = props => {
14
+    const style = { backgroundColor: props.isChromeless ? 'transparent' : themed({ light: N0,
15
+        dark: DN50 })({ theme: { mode: 'dark' } }) };
16
+
17
+    return (<Dialog
18
+        { ...props }
19
+        aria-modal = { true }
20
+        style = { style }
21
+        theme = {{ mode: 'dark' }} />);
22
+};
23
+
24
+
25
+export { ThemedDialog as Dialog, FillScreen, dialogWidth, dialogHeight, PositionerAbsolute, PositionerRelative };

+ 2
- 2
react/features/base/popover/components/Popover.web.js Parādīt failu

@@ -28,7 +28,7 @@ const DIALOG_TO_PADDING_POSITION = {
28 28
  * @returns {string}
29 29
  */
30 30
 function _mapPositionToPaddingClass(position = 'left') {
31
-    return DIALOG_TO_PADDING_POSITION[position.split(' ')[0]];
31
+    return DIALOG_TO_PADDING_POSITION[position.split('-')[0]];
32 32
 }
33 33
 
34 34
 /**
@@ -212,7 +212,7 @@ class Popover extends Component<Props, State> {
212 212
                 <InlineDialog
213 213
                     content = { this._renderContent() }
214 214
                     isOpen = { this.state.showDialog }
215
-                    position = { position }>
215
+                    placement = { position }>
216 216
                     { children }
217 217
                 </InlineDialog>
218 218
             </div>

+ 1
- 1
react/features/base/react/components/web/Button.js Parādīt failu

@@ -1,6 +1,6 @@
1 1
 /* @flow */
2 2
 
3
-import Button from '@atlaskit/button';
3
+import Button from '@atlaskit/button/standard-button';
4 4
 import React, { Component } from 'react';
5 5
 
6 6
 type Props = {

+ 1
- 1
react/features/base/react/components/web/InlineDialogFailure.js Parādīt failu

@@ -1,6 +1,6 @@
1 1
 /* @flow */
2 2
 
3
-import Button from '@atlaskit/button';
3
+import Button from '@atlaskit/button/standard-button';
4 4
 import React, { Component } from 'react';
5 5
 
6 6
 import { translate } from '../../../i18n';

+ 9
- 2
react/features/base/react/components/web/Switch.js Parādīt failu

@@ -1,10 +1,15 @@
1 1
 /* @flow */
2 2
 
3
-import { ToggleStateless } from '@atlaskit/toggle';
3
+import Toggle from '@atlaskit/toggle';
4 4
 import React, { Component } from 'react';
5 5
 
6 6
 type Props = {
7 7
 
8
+    /**
9
+     * ID of the toggle
10
+     */
11
+    id: string,
12
+
8 13
     /**
9 14
      * CSS class name.
10 15
      */
@@ -42,6 +47,7 @@ export default class Switch extends Component<Props> {
42 47
             disabled,
43 48
             onValueChange,
44 49
             value,
50
+            id,
45 51
             ...props
46 52
         } = this.props;
47 53
 
@@ -51,7 +57,8 @@ export default class Switch extends Component<Props> {
51 57
 
52 58
         return (
53 59
             <div className = { className }>
54
-                <ToggleStateless
60
+                <Toggle
61
+                    id = { id }
55 62
                     isChecked = { value }
56 63
                     isDisabled = { disabled }
57 64
                     onChange = { onValueChange }

+ 8
- 2
react/features/base/util/react-focus-lock-wrapper.js Parādīt failu

@@ -19,11 +19,17 @@ export default class FocusLockWrapper extends FocusLock<*> {
19 19
 
20 20
         const props = {
21 21
             ...otherProps,
22
-            disabled: true
22
+            crossFrame: false
23 23
         };
24 24
 
25 25
         // MoveFocusInside is added in order to initially bring the focus on the dialog.
26
-        return <FocusLock { ...props } ><MoveFocusInside>{children}</MoveFocusInside></FocusLock>;
26
+        return (
27
+            <FocusLock
28
+                { ...props }
29
+                className = 'focus-lock'>
30
+                <MoveFocusInside>{children}</MoveFocusInside>
31
+            </FocusLock>
32
+        );
27 33
     }
28 34
 }
29 35
 

+ 4
- 8
react/features/chat/components/web/Chat.js Parādīt failu

@@ -3,7 +3,6 @@
3 3
 import React from 'react';
4 4
 
5 5
 import { translate } from '../../../base/i18n';
6
-import { Icon, IconClose } from '../../../base/icons';
7 6
 import { connect } from '../../../base/redux';
8 7
 import AbstractChat, {
9 8
     _mapDispatchToProps,
@@ -12,6 +11,7 @@ import AbstractChat, {
12 11
 } from '../AbstractChat';
13 12
 
14 13
 import ChatDialog from './ChatDialog';
14
+import Header from './ChatDialogHeader';
15 15
 import ChatInput from './ChatInput';
16 16
 import DisplayNameForm from './DisplayNameForm';
17 17
 import MessageContainer from './MessageContainer';
@@ -133,13 +133,9 @@ class Chat extends AbstractChat<Props> {
133 133
      */
134 134
     _renderChatHeader() {
135 135
         return (
136
-            <div className = 'chat-header'>
137
-                <div
138
-                    className = 'chat-close'
139
-                    onClick = { this.props._onToggleChat }>
140
-                    <Icon src = { IconClose } />
141
-                </div>
142
-            </div>
136
+            <Header
137
+                className = 'chat-header'
138
+                onCancel = { this.props._onToggleChat } />
143 139
         );
144 140
     }
145 141
 

+ 7
- 2
react/features/chat/components/web/ChatDialogHeader.js Parādīt failu

@@ -14,6 +14,11 @@ type Props = {
14 14
      */
15 15
     onCancel: Function,
16 16
 
17
+    /**
18
+     * An optional class name.
19
+     */
20
+    className: string,
21
+
17 22
     /**
18 23
      * Invoked to obtain translated strings.
19 24
      */
@@ -25,10 +30,10 @@ type Props = {
25 30
  *
26 31
  * @returns {React$Element<any>}
27 32
  */
28
-function Header({ onCancel, t }: Props) {
33
+function Header({ onCancel, className, t }: Props) {
29 34
     return (
30 35
         <div
31
-            className = 'chat-dialog-header'>
36
+            className = { className || 'chat-dialog-header' }>
32 37
             { t('chat.title') }
33 38
             <Icon
34 39
                 onClick = { onCancel }

+ 2
- 1
react/features/deep-linking/components/DeepLinkingDesktopPage.web.js Parādīt failu

@@ -1,6 +1,7 @@
1 1
 // @flow
2 2
 
3
-import Button, { ButtonGroup } from '@atlaskit/button';
3
+import ButtonGroup from '@atlaskit/button/button-group';
4
+import Button from '@atlaskit/button/standard-button';
4 5
 import { AtlasKitThemeProvider } from '@atlaskit/theme';
5 6
 import React, { Component } from 'react';
6 7
 import type { Dispatch } from 'redux';

+ 40
- 26
react/features/device-selection/components/DeviceSelector.web.js Parādīt failu

@@ -1,7 +1,9 @@
1 1
 /* @flow */
2 2
 
3
-import AKDropdownMenu from '@atlaskit/dropdown-menu';
4
-import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
3
+import DropdownMenu, {
4
+    DropdownItem,
5
+    DropdownItemGroup
6
+} from '@atlaskit/dropdown-menu';
5 7
 import React, { Component } from 'react';
6 8
 
7 9
 import { translate } from '../../base/i18n/functions';
@@ -69,6 +71,7 @@ class DeviceSelector extends Component<Props> {
69 71
         super(props);
70 72
 
71 73
         this._onSelect = this._onSelect.bind(this);
74
+        this._createDropdownItem = this._createDropdownItem.bind(this);
72 75
     }
73 76
 
74 77
     /**
@@ -87,8 +90,8 @@ class DeviceSelector extends Component<Props> {
87 90
         }
88 91
 
89 92
         const items = this.props.devices.map(this._createDropdownItem);
90
-        const defaultSelected = items.find(item =>
91
-            item.value === this.props.selectedDeviceId
93
+        const defaultSelected = this.props.devices.find(item =>
94
+            item.deviceId === this.props.selectedDeviceId
92 95
         );
93 96
 
94 97
         return this._createDropdown({
@@ -111,18 +114,15 @@ class DeviceSelector extends Component<Props> {
111 114
     _createDropdownTrigger(triggerText) {
112 115
         return (
113 116
             <div className = 'device-selector-trigger'>
114
-                <span
115
-                    className = { `device-selector-icon ${this.props.icon}` } />
116 117
                 <span className = 'device-selector-trigger-text'>
117 118
                     { triggerText }
118 119
                 </span>
119
-                <ChevronDownIcon
120
-                    label = 'expand'
121
-                    size = 'large' />
122 120
             </div>
123 121
         );
124 122
     }
125 123
 
124
+    _createDropdownItem: (Object) => void;
125
+
126 126
     /**
127 127
      * Creates an object in the format expected by AKDropdownMenu for an option.
128 128
      *
@@ -132,10 +132,19 @@ class DeviceSelector extends Component<Props> {
132 132
      * format recognized as a valid AKDropdownMenu item.
133 133
      */
134 134
     _createDropdownItem(device) {
135
-        return {
136
-            content: device.label,
137
-            value: device.deviceId
138
-        };
135
+        return (
136
+            <DropdownItem
137
+                key = { device.deviceId }
138
+                // eslint-disable-next-line react/jsx-no-bind
139
+                onClick = {
140
+                    e => {
141
+                        e.stopPropagation();
142
+                        this._onSelect(device.deviceId);
143
+                    }
144
+                }>
145
+                { device.label || device.deviceId }
146
+            </DropdownItem>
147
+        );
139 148
     }
140 149
 
141 150
     /**
@@ -156,11 +165,11 @@ class DeviceSelector extends Component<Props> {
156 165
      */
157 166
     _createDropdown(options) {
158 167
         const triggerText
159
-            = (options.defaultSelected && options.defaultSelected.content)
168
+            = (options.defaultSelected && (options.defaultSelected.label || options.defaultSelected.deviceId))
160 169
                 || options.placeholder;
161 170
         const trigger = this._createDropdownTrigger(triggerText);
162 171
 
163
-        if (options.isDisabled) {
172
+        if (options.isDisabled || !options.items.length) {
164 173
             return (
165 174
                 <div className = 'device-selector-trigger-disabled'>
166 175
                     { trigger }
@@ -169,12 +178,19 @@ class DeviceSelector extends Component<Props> {
169 178
         }
170 179
 
171 180
         return (
172
-            <AKDropdownMenu
173
-                items = { [ { items: options.items || [] } ] }
174
-                onItemActivated = { this._onSelect }
175
-                shouldFitContainer = { true }>
176
-                { trigger }
177
-            </AKDropdownMenu>
181
+            <div className = 'dropdown-menu'>
182
+                <DropdownMenu
183
+                    shouldFitContainer = { true }
184
+                    trigger = { triggerText }
185
+                    triggerButtonProps = {{
186
+                        shouldFitContainer: true
187
+                    }}
188
+                    triggerType = 'button'>
189
+                    <DropdownItemGroup>
190
+                        { options.items }
191
+                    </DropdownItemGroup>
192
+                </DropdownMenu>
193
+            </div>
178 194
         );
179 195
     }
180 196
 
@@ -183,15 +199,13 @@ class DeviceSelector extends Component<Props> {
183 199
     /**
184 200
      * Invokes the passed in callback to notify of selection changes.
185 201
      *
186
-     * @param {Object} selection - Event from choosing a AKDropdownMenu option.
202
+     * @param {Object} newDeviceId - Selected device id from DropdownMenu option.
187 203
      * @private
188 204
      * @returns {void}
189 205
      */
190
-    _onSelect(selection) {
191
-        const newDeviceId = selection.item.value;
192
-
206
+    _onSelect(newDeviceId) {
193 207
         if (this.props.selectedDeviceId !== newDeviceId) {
194
-            this.props.onSelect(selection.item.value);
208
+            this.props.onSelect(newDeviceId);
195 209
         }
196 210
     }
197 211
 

+ 2
- 1
react/features/e2ee/components/E2EESection.js Parādīt failu

@@ -117,10 +117,11 @@ class E2EESection extends Component<Props, State> {
117 117
                         </span>
118 118
                 }
119 119
                 <div className = 'control-row'>
120
-                    <label>
120
+                    <label htmlFor = 'e2ee-section-switch'>
121 121
                         { t('dialog.e2eeLabel') }
122 122
                     </label>
123 123
                     <Switch
124
+                        id = 'e2ee-section-switch'
124 125
                         onValueChange = { this._onToggle }
125 126
                         value = { enabled } />
126 127
                 </div>

+ 3
- 3
react/features/filmstrip/components/web/Thumbnail.js Parādīt failu

@@ -330,15 +330,15 @@ class Thumbnail extends Component<Props, State> {
330 330
 
331 331
         switch (_currentLayout) {
332 332
         case LAYOUTS.TILE_VIEW:
333
-            statsPopoverPosition = 'right top';
333
+            statsPopoverPosition = 'right-start';
334 334
             tooltipPosition = 'right';
335 335
             break;
336 336
         case LAYOUTS.VERTICAL_FILMSTRIP_VIEW:
337
-            statsPopoverPosition = 'left top';
337
+            statsPopoverPosition = 'left-start';
338 338
             tooltipPosition = 'left';
339 339
             break;
340 340
         default:
341
-            statsPopoverPosition = 'top center';
341
+            statsPopoverPosition = 'auto';
342 342
             tooltipPosition = 'top';
343 343
         }
344 344
 

+ 2
- 1
react/features/lobby/components/web/LobbySection.js Parādīt failu

@@ -93,10 +93,11 @@ class LobbySection extends PureComponent<Props, State> {
93 93
                         { t('lobby.enableDialogText') }
94 94
                     </p>
95 95
                     <div className = 'control-row'>
96
-                        <label>
96
+                        <label htmlFor = 'lobby-section-switch'>
97 97
                             { t('lobby.toggleLabel') }
98 98
                         </label>
99 99
                         <Switch
100
+                            id = 'lobby-section-switch'
100 101
                             onValueChange = { this._onToggleLobby }
101 102
                             value = { this.state.lobbyEnabled } />
102 103
                     </div>

+ 0
- 4
react/features/notifications/components/web/Notification.js Parādīt failu

@@ -44,8 +44,6 @@ class Notification extends AbstractNotification<Props> {
44 44
         const {
45 45
             appearance,
46 46
             hideErrorSupportLink,
47
-            isDismissAllowed,
48
-            onDismissed,
49 47
             t,
50 48
             title,
51 49
             titleArguments,
@@ -60,8 +58,6 @@ class Notification extends AbstractNotification<Props> {
60 58
                 description = { this._renderDescription() }
61 59
                 icon = { this._mapAppearanceToIcon() }
62 60
                 id = { uid }
63
-                isDismissAllowed = { isDismissAllowed }
64
-                onDismissed = { onDismissed }
65 61
                 testId = { titleKey }
66 62
                 title = { title || t(titleKey, titleArguments) } />
67 63
         );

+ 4
- 1
react/features/notifications/components/web/NotificationsContainer.js Parādīt failu

@@ -40,7 +40,9 @@ class NotificationsContainer extends AbstractNotificationsContainer<Props> {
40 40
         }
41 41
 
42 42
         return (
43
-            <FlagGroup onDismissed = { this._onDismissed }>
43
+            <FlagGroup
44
+                id = 'notifications-container'
45
+                onDismissed = { this._onDismissed }>
44 46
                 { this._renderFlags() }
45 47
             </FlagGroup>
46 48
         );
@@ -69,6 +71,7 @@ class NotificationsContainer extends AbstractNotificationsContainer<Props> {
69 71
                     { ...props }
70 72
                     id = { uid }
71 73
                     key = { uid }
74
+                    onDismissed = { this._onDismissed }
72 75
                     uid = { uid } />
73 76
 
74 77
             );

+ 7
- 2
react/features/recording/components/LiveStream/web/StreamKeyPicker.js Parādīt failu

@@ -114,7 +114,12 @@ class StreamKeyPicker extends PureComponent<Props, State> {
114 114
                     key = { broadcast.boundStreamID }
115 115
 
116 116
                     // eslint-disable-next-line react/jsx-no-bind
117
-                    onClick = { () => this._onSelect(broadcast.boundStreamID) }>
117
+                    onClick = {
118
+                        e => {
119
+                            e.stopPropagation();
120
+                            this._onSelect(broadcast.boundStreamID);
121
+                        }
122
+                    }>
118 123
                     { broadcast.title }
119 124
                 </DropdownItem>));
120 125
         const selected
@@ -124,7 +129,7 @@ class StreamKeyPicker extends PureComponent<Props, State> {
124 129
             = (selected && selected.title) || t('liveStreaming.choose');
125 130
 
126 131
         return (
127
-            <div className = 'broadcast-dropdown'>
132
+            <div className = 'broadcast-dropdown dropdown-menu'>
128 133
                 <DropdownMenuStateless
129 134
                     isOpen = { this.state.isDropdownOpen }
130 135
                     onItemActivated = { this._onSelect }

+ 3
- 3
react/features/remote-video-menu/components/web/RemoteVideoMenuTriggerButton.js Parādīt failu

@@ -276,13 +276,13 @@ function _mapStateToProps(state, ownProps) {
276 276
 
277 277
     switch (currentLayout) {
278 278
     case LAYOUTS.TILE_VIEW:
279
-        _menuPosition = 'left top';
279
+        _menuPosition = 'left-start';
280 280
         break;
281 281
     case LAYOUTS.VERTICAL_FILMSTRIP_VIEW:
282
-        _menuPosition = 'left bottom';
282
+        _menuPosition = 'left-end';
283 283
         break;
284 284
     default:
285
-        _menuPosition = 'top center';
285
+        _menuPosition = 'auto';
286 286
     }
287 287
 
288 288
     return {

+ 1
- 1
react/features/settings/components/web/CalendarTab.js Parādīt failu

@@ -1,6 +1,6 @@
1 1
 // @flow
2 2
 
3
-import Button from '@atlaskit/button';
3
+import Button from '@atlaskit/button/standard-button';
4 4
 import Spinner from '@atlaskit/spinner';
5 5
 import React, { Component } from 'react';
6 6
 

+ 22
- 17
react/features/settings/components/web/MoreTab.js Parādīt failu

@@ -169,7 +169,11 @@ class MoreTab extends AbstractDialogTab<Props, State> {
169 169
 
170 170
                     // eslint-disable-next-line react/jsx-no-bind
171 171
                     onClick = {
172
-                        () => super._onChange({ currentLanguage: language }) }>
172
+                        e => {
173
+                            e.stopPropagation();
174
+                            super._onChange({ currentLanguage: language });
175
+                        }
176
+                    }>
173 177
                     { t(`languages:${language}`) }
174 178
                 </DropdownItem>));
175 179
 
@@ -180,22 +184,23 @@ class MoreTab extends AbstractDialogTab<Props, State> {
180 184
                 <div className = 'mock-atlaskit-label'>
181 185
                     { t('settings.language') }
182 186
                 </div>
183
-                <DropdownMenu
184
-                    isOpen = { this.state.isLanguageSelectOpen }
185
-                    onOpenChange = { this._onLanguageDropdownOpenChange }
186
-                    shouldFitContainer = { true }
187
-                    trigger = { currentLanguage
188
-                        ? t(`languages:${currentLanguage}`)
189
-                        : '' }
190
-                    triggerButtonProps = {{
191
-                        appearance: 'primary',
192
-                        shouldFitContainer: true
193
-                    }}
194
-                    triggerType = 'button'>
195
-                    <DropdownItemGroup>
196
-                        { languageItems }
197
-                    </DropdownItemGroup>
198
-                </DropdownMenu>
187
+                <div className = 'dropdown-menu'>
188
+                    <DropdownMenu
189
+                        isOpen = { this.state.isLanguageSelectOpen }
190
+                        onOpenChange = { this._onLanguageDropdownOpenChange }
191
+                        shouldFitContainer = { true }
192
+                        trigger = { currentLanguage
193
+                            ? t(`languages:${currentLanguage}`)
194
+                            : '' }
195
+                        triggerButtonProps = {{
196
+                            shouldFitContainer: true
197
+                        }}
198
+                        triggerType = 'button'>
199
+                        <DropdownItemGroup>
200
+                            { languageItems }
201
+                        </DropdownItemGroup>
202
+                    </DropdownMenu>
203
+                </div>
199 204
             </div>
200 205
         );
201 206
     }

+ 1
- 1
react/features/settings/components/web/ProfileTab.js Parādīt failu

@@ -1,6 +1,6 @@
1 1
 // @flow
2 2
 
3
-import Button from '@atlaskit/button';
3
+import Button from '@atlaskit/button/standard-button';
4 4
 import { FieldTextStateless } from '@atlaskit/field-text';
5 5
 import React from 'react';
6 6
 

+ 1
- 1
react/features/settings/components/web/audio/AudioSettingsPopup.js Parādīt failu

@@ -66,7 +66,7 @@ function AudioSettingsPopup({
66 66
                     setAudioOutputDevice = { setAudioOutputDevice } /> }
67 67
                 isOpen = { isOpen }
68 68
                 onClose = { onClose }
69
-                position = 'top left'>
69
+                placement = 'top-start'>
70 70
                 {children}
71 71
             </InlineDialog>
72 72
         </div>

+ 1
- 1
react/features/settings/components/web/video/VideoSettingsPopup.js Parādīt failu

@@ -56,7 +56,7 @@ function VideoSettingsPopup({
56 56
                     videoDeviceIds = { videoDeviceIds } /> }
57 57
                 isOpen = { isOpen }
58 58
                 onClose = { onClose }
59
-                position = 'top right'>
59
+                placement = 'top-end'>
60 60
                 { children }
61 61
             </InlineDialog>
62 62
         </div>

+ 1
- 1
react/features/toolbox/components/web/OverflowMenuButton.js Parādīt failu

@@ -93,7 +93,7 @@ class OverflowMenuButton extends Component<Props> {
93 93
                             content = { children }
94 94
                             isOpen = { isOpen }
95 95
                             onClose = { this._onCloseDialog }
96
-                            position = { 'top right' }>
96
+                            placement = 'top-end'>
97 97
                             {this._renderToolbarButton()}
98 98
                         </InlineDialog>
99 99
                     )

+ 2
- 1
webpack.config.js Parādīt failu

@@ -115,7 +115,8 @@ const config = {
115 115
             test: /\/node_modules\/@atlaskit\/modal-dialog\/.*\.js$/,
116 116
             resolve: {
117 117
                 alias: {
118
-                    'react-focus-lock': `${__dirname}/react/features/base/util/react-focus-lock-wrapper.js`
118
+                    'react-focus-lock': `${__dirname}/react/features/base/util/react-focus-lock-wrapper.js`,
119
+                    '../styled/Modal': `${__dirname}/react/features/base/dialog/components/web/ThemedDialog.js`
119 120
                 }
120 121
             }
121 122
         }, {

Notiek ielāde…
Atcelt
Saglabāt