Pārlūkot izejas kodu

feat(dark-theme): Applies dark theme on inline-dialogs, tooltips, flags and more

master
yanas 7 gadus atpakaļ
vecāks
revīzija
e09949be9f

+ 0
- 3
css/_connection-info.scss Parādīt failu

1
 %connection-info {
1
 %connection-info {
2
     font-size: 12px;
2
     font-size: 12px;
3
     font-weight: 400;
3
     font-weight: 400;
4
-    color: $modalTextColor;
5
 
4
 
6
     td {
5
     td {
7
         padding: 2px 0;
6
         padding: 2px 0;
34
     &__download
33
     &__download
35
     {
34
     {
36
         @extend .connection-info__icon;
35
         @extend .connection-info__icon;
37
-        color: $downloadConnectionIconColor;
38
     }
36
     }
39
 
37
 
40
     &__status
38
     &__status
45
     &__upload
43
     &__upload
46
     {
44
     {
47
         @extend .connection-info__icon;
45
         @extend .connection-info__icon;
48
-        color: $uploadConnectionIconColor;
49
     }
46
     }
50
 
47
 
51
     .showmore {
48
     .showmore {

+ 0
- 10
css/_filmstrip.scss Parādīt failu

86
                 width: 100%;
86
                 width: 100%;
87
 
87
 
88
                 & button {
88
                 & button {
89
-                    background: $toolbarBackground;
90
                     flex-grow: 1;
89
                     flex-grow: 1;
91
                     flex-shrink: 1;
90
                     flex-shrink: 1;
92
                     overflow: hidden;
91
                     overflow: hidden;
93
                 }
92
                 }
94
 
93
 
95
                 & > * {
94
                 & > * {
96
-                    color: $toolbarButtonColor;
97
                     flex-grow: 0;
95
                     flex-grow: 0;
98
                     flex-shrink: 0;
96
                     flex-shrink: 0;
99
                     margin-left: 2px;
97
                     margin-left: 2px;
100
                 }
98
                 }
101
-
102
-                /**
103
-                 * Making sure any svg-s in an invite button group will be
104
-                 * colored the way we want.
105
-                 */
106
-                & path {
107
-                    fill: $toolbarButtonColor;
108
-                }
109
             }
99
             }
110
         }
100
         }
111
 
101
 

+ 0
- 2
css/_popup_menu.scss Parādīt failu

19
     // Link Appearance
19
     // Link Appearance
20
     &__link,
20
     &__link,
21
     &__contents {
21
     &__contents {
22
-        color: $modalTextColor;
23
         display: block;
22
         display: block;
24
         box-sizing: border-box;
23
         box-sizing: border-box;
25
         text-decoration: none;
24
         text-decoration: none;
30
         padding: 0 5px;
29
         padding: 0 5px;
31
 
30
 
32
         &.disabled {
31
         &.disabled {
33
-            color: gray !important;
34
             pointer-events: none;
32
             pointer-events: none;
35
         }
33
         }
36
     }
34
     }

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

36
  * Common toolbar styles.
36
  * Common toolbar styles.
37
  */
37
  */
38
 .toolbar {
38
 .toolbar {
39
-    color: $modalTextColor;
40
     height: 100%;
39
     height: 100%;
41
     pointer-events: auto;
40
     pointer-events: auto;
42
     position: relative;
41
     position: relative;
82
         vertical-align: middle;
81
         vertical-align: middle;
83
         width: $defaultToolbarSize;
82
         width: $defaultToolbarSize;
84
 
83
 
85
-        &_hangup {
86
-            color: $hangupColor;
87
-            font-size: $hangupFontSize;
88
-        }
89
-
90
         &[disabled] {
84
         &[disabled] {
91
             opacity: 0.5;
85
             opacity: 0.5;
92
         }
86
         }
93
 
87
 
94
         &:hover, &:active {
88
         &:hover, &:active {
89
+            color: $toolbarButtonColor;
95
             cursor: pointer;
90
             cursor: pointer;
96
             text-decoration: none;
91
             text-decoration: none;
97
         }
92
         }
98
 
93
 
94
+        &_hangup, &_hangup:hover {
95
+            color: $hangupColor;
96
+            font-size: $hangupFontSize;
97
+        }
98
+
99
         &:not(.toggled) {
99
         &:not(.toggled) {
100
             &:hover, &:active {
100
             &:hover, &:active {
101
                 // sum opacity with background layer should give us 0.8
101
                 // sum opacity with background layer should give us 0.8

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

64
 $audioLevelShadow: rgba(9, 36, 77, 0.9);
64
 $audioLevelShadow: rgba(9, 36, 77, 0.9);
65
 $videoStateIndicatorColor: $defaultColor;
65
 $videoStateIndicatorColor: $defaultColor;
66
 $videoStateIndicatorBackground: $toolbarBackground;
66
 $videoStateIndicatorBackground: $toolbarBackground;
67
+$videoStateIndicatorSize: 40px;
67
 
68
 
68
 /**
69
 /**
69
  * Feedback Modal
70
  * Feedback Modal

+ 9
- 0
css/_videolayout_default.scss Parādīt failu

65
             float: left;
65
             float: left;
66
             pointer-events: all;
66
             pointer-events: all;
67
         }
67
         }
68
+
69
+        /**
70
+         * Need to overwrite the background for the top toolbar dark theme div
71
+         * wrapper needed before we're able to move all top toolbar indicators
72
+         * creation to react.
73
+         */
74
+        .ckAJgx {
75
+            background: none;
76
+        }
68
     }
77
     }
69
 
78
 
70
     &__toolbar {
79
     &__toolbar {

+ 4
- 11
css/modals/invite/_invite.scss Parādīt failu

26
             user-select: text;
26
             user-select: text;
27
         }
27
         }
28
 
28
 
29
-        .dial-in-numbers-trigger {
30
-            position: relative;
31
-            width: 100%;
32
-
33
-            .dial-in-numbers-trigger-icon {
34
-                position: absolute;
35
-                right: 10px;
36
-                top: 4px;
37
-            }
38
-        }
39
-
40
         .is-disabled,
29
         .is-disabled,
41
         .is-loading {
30
         .is-loading {
42
             .dial-in-numbers-trigger-icon {
31
             .dial-in-numbers-trigger-icon {
62
         &__input-container {
51
         &__input-container {
63
             flex: 1;
52
             flex: 1;
64
             margin-right: 10px;
53
             margin-right: 10px;
54
+
55
+            .dropdown-button-trigger {
56
+                text-align: left;
57
+            }
65
         }
58
         }
66
     }
59
     }
67
 
60
 

+ 8
- 11
css/modals/video-quality/_video-quality.scss Parādīt failu

1
 .video-quality-dialog {
1
 .video-quality-dialog {
2
-    color: $modalTextColor;
3
 
2
 
4
     .hide-warning {
3
     .hide-warning {
5
         height: 0;
4
         height: 0;
12
 
11
 
13
     .video-quality-dialog-contents {
12
     .video-quality-dialog-contents {
14
         align-items: center;
13
         align-items: center;
15
-        color: $modalTextColor;
16
         display: flex;
14
         display: flex;
17
         flex-direction: column;
15
         flex-direction: column;
18
         padding: 10px;
16
         padding: 10px;
29
             @mixin sliderTrackStyles() {
27
             @mixin sliderTrackStyles() {
30
                 height: 15px;
28
                 height: 15px;
31
                 border-radius: 10px;
29
                 border-radius: 10px;
32
-                background: black;
30
+                background: #0E1624;
33
             }
31
             }
34
 
32
 
35
             &::-ms-track {
33
             &::-ms-track {
79
             transform: translate(-50%, 0%);
77
             transform: translate(-50%, 0%);
80
 
78
 
81
             &::before {
79
             &::before {
82
-                background: rgb(140, 156, 189);
83
                 content: '';
80
                 content: '';
84
                 border-radius: 50%;
81
                 border-radius: 50%;
85
                 left: 0;
82
                 left: 0;
94
         }
91
         }
95
 
92
 
96
         .video-quality-dialog-label-container.active {
93
         .video-quality-dialog-label-container.active {
97
-            color: $toolbarToggleBackground;
94
+            color: $videoQualityActive;
98
 
95
 
99
             &::before {
96
             &::before {
100
-                background: $toolbarToggleBackground;
97
+                background: $videoQualityActive;
101
                 height: 12px;
98
                 height: 12px;
102
                 top: -19px;
99
                 top: -19px;
103
                 width: 12px;
100
                 width: 12px;
117
 
114
 
118
 .video-state-indicator {
115
 .video-state-indicator {
119
     background: $videoStateIndicatorBackground;
116
     background: $videoStateIndicatorBackground;
120
-    color: $videoStateIndicatorColor;
121
     cursor: default;
117
     cursor: default;
122
     font-size: 13px;
118
     font-size: 13px;
123
-    height: 40px;
119
+    height: $videoStateIndicatorSize;
124
     line-height: 20px;
120
     line-height: 20px;
125
     text-align: left;
121
     text-align: left;
126
-    min-width: 40px;
122
+    min-width: $videoStateIndicatorSize;
127
     border-radius: 50%;
123
     border-radius: 50%;
128
     position: absolute;
124
     position: absolute;
129
     box-sizing: border-box;
125
     box-sizing: border-box;
130
 
126
 
131
     i {
127
     i {
132
-        cursor: pointer;
128
+        line-height: $videoStateIndicatorSize;
133
     }
129
     }
134
 
130
 
135
     /**
131
     /**
136
      * Give the label padding so it has more volume and can be easily clicked.
132
      * Give the label padding so it has more volume and can be easily clicked.
137
      */
133
      */
138
     .video-quality-label-status {
134
     .video-quality-label-status {
139
-        padding: 10px 5px;
135
+        line-height: $videoStateIndicatorSize;
136
+        min-width: $videoStateIndicatorSize;
140
         text-align: center;
137
         text-align: center;
141
     }
138
     }
142
 }
139
 }

+ 5
- 6
css/themes/_light.scss Parādīt failu

44
 $filmstripOnlyOverlayBg: #000;
44
 $filmstripOnlyOverlayBg: #000;
45
 $reloadProgressBarBg: #0074E0;
45
 $reloadProgressBarBg: #0074E0;
46
 
46
 
47
-/**
48
-* Connection indicator
49
-**/
50
-$downloadConnectionIconColor: #4abd04;
51
-$uploadConnectionIconColor: #ffa800;
52
-
53
 /**
47
 /**
54
  * Dialog colors
48
  * Dialog colors
55
  **/
49
  **/
111
 $selectBg: $controlBackground;
105
 $selectBg: $controlBackground;
112
 $selectActiveBg: darken($controlBackground, 5%);
106
 $selectActiveBg: darken($controlBackground, 5%);
113
 $selectActiveItemBg: darken($controlBackground, 20%);
107
 $selectActiveItemBg: darken($controlBackground, 20%);
108
+
109
+/**
110
+ * TODO: Replace by themed component.
111
+ */
112
+$videoQualityActive: #4C9AFF;

+ 13
- 9
modules/UI/videolayout/RemoteVideo.js Parādīt failu

5
 import ReactDOM from 'react-dom';
5
 import ReactDOM from 'react-dom';
6
 import { Provider } from 'react-redux';
6
 import { Provider } from 'react-redux';
7
 import { I18nextProvider } from 'react-i18next';
7
 import { I18nextProvider } from 'react-i18next';
8
+import { AtlasKitThemeProvider } from '@atlaskit/theme';
8
 
9
 
9
 import { i18next } from '../../../react/features/base/i18n';
10
 import { i18next } from '../../../react/features/base/i18n';
10
 import {
11
 import {
167
     ReactDOM.render(
168
     ReactDOM.render(
168
         <Provider store = { APP.store }>
169
         <Provider store = { APP.store }>
169
             <I18nextProvider i18n = { i18next }>
170
             <I18nextProvider i18n = { i18next }>
170
-                <RemoteVideoMenuTriggerButton
171
-                    initialVolumeValue = { initialVolumeValue }
172
-                    isAudioMuted = { this.isAudioMuted }
173
-                    isModerator = { isModerator }
174
-                    onMenuDisplay = {this._onRemoteVideoMenuDisplay.bind(this)}
175
-                    onRemoteControlToggle = { onRemoteControlToggle }
176
-                    onVolumeChange = { onVolumeChange }
177
-                    participantID = { participantID }
178
-                    remoteControlState = { remoteControlState } />
171
+                <AtlasKitThemeProvider mode = 'dark'>
172
+                    <RemoteVideoMenuTriggerButton
173
+                        initialVolumeValue = { initialVolumeValue }
174
+                        isAudioMuted = { this.isAudioMuted }
175
+                        isModerator = { isModerator }
176
+                        onMenuDisplay
177
+                            = {this._onRemoteVideoMenuDisplay.bind(this)}
178
+                        onRemoteControlToggle = { onRemoteControlToggle }
179
+                        onVolumeChange = { onVolumeChange }
180
+                        participantID = { participantID }
181
+                        remoteControlState = { remoteControlState } />
182
+                </AtlasKitThemeProvider>
179
             </I18nextProvider>
183
             </I18nextProvider>
180
         </Provider>,
184
         </Provider>,
181
         remoteVideoMenuContainer);
185
         remoteVideoMenuContainer);

+ 29
- 24
modules/UI/videolayout/SmallVideo.js Parādīt failu

4
 import React from 'react';
4
 import React from 'react';
5
 import ReactDOM from 'react-dom';
5
 import ReactDOM from 'react-dom';
6
 import { I18nextProvider } from 'react-i18next';
6
 import { I18nextProvider } from 'react-i18next';
7
+import { AtlasKitThemeProvider } from '@atlaskit/theme';
7
 import { Provider } from 'react-redux';
8
 import { Provider } from 'react-redux';
8
 
9
 
9
 import { i18next } from '../../../react/features/base/i18n';
10
 import { i18next } from '../../../react/features/base/i18n';
780
     const tooltipPosition = interfaceConfig.VERTICAL_FILMSTRIP ? 'left' : 'top';
781
     const tooltipPosition = interfaceConfig.VERTICAL_FILMSTRIP ? 'left' : 'top';
781
 
782
 
782
     ReactDOM.render(
783
     ReactDOM.render(
783
-        <I18nextProvider i18n = { i18next }>
784
-            <div>
785
-                { this._showConnectionIndicator
786
-                    ? <ConnectionIndicator
787
-                        alwaysVisible = { showConnectionIndicator }
788
-                        connectionStatus = { this._connectionStatus }
789
-                        iconSize = { iconSize }
790
-                        isLocalVideo = { this.isLocal }
791
-                        enableStatsDisplay = { !interfaceConfig.filmStripOnly }
792
-                        statsPopoverPosition = { this.statsPopoverLocation }
793
-                        userID = { this.id } />
794
-                    : null }
795
-                { this._showRaisedHand
796
-                    ? <RaisedHandIndicator
797
-                        iconSize = { iconSize }
798
-                        tooltipPosition = { tooltipPosition } />
799
-                    : null }
800
-                { this._showDominantSpeaker
801
-                    ? <DominantSpeakerIndicator
802
-                        iconSize = { iconSize }
803
-                        tooltipPosition = { tooltipPosition } />
804
-                    : null }
805
-            </div>
806
-        </I18nextProvider>,
784
+            <I18nextProvider i18n = { i18next }>
785
+                <div>
786
+                    <AtlasKitThemeProvider mode = 'dark'>
787
+                        { this._showConnectionIndicator
788
+                            ? <ConnectionIndicator
789
+                                alwaysVisible = { showConnectionIndicator }
790
+                                connectionStatus = { this._connectionStatus }
791
+                                iconSize = { iconSize }
792
+                                isLocalVideo = { this.isLocal }
793
+                                enableStatsDisplay
794
+                                    = { !interfaceConfig.filmStripOnly }
795
+                                statsPopoverPosition
796
+                                    = { this.statsPopoverLocation }
797
+                                userID = { this.id } />
798
+                            : null }
799
+                        { this._showRaisedHand
800
+                            ? <RaisedHandIndicator
801
+                                iconSize = { iconSize }
802
+                                tooltipPosition = { tooltipPosition } />
803
+                            : null }
804
+                        { this._showDominantSpeaker
805
+                            ? <DominantSpeakerIndicator
806
+                                iconSize = { iconSize }
807
+                                tooltipPosition = { tooltipPosition } />
808
+                            : null }
809
+                    </AtlasKitThemeProvider>
810
+                </div>
811
+            </I18nextProvider>,
807
         indicatorToolbar
812
         indicatorToolbar
808
     );
813
     );
809
 };
814
 };

+ 17
- 14
package.json Parādīt failu

15
   "author": "",
15
   "author": "",
16
   "readmeFilename": "README.md",
16
   "readmeFilename": "README.md",
17
   "dependencies": {
17
   "dependencies": {
18
-    "@atlaskit/avatar": "4.0.5",
19
-    "@atlaskit/button": "3.0.0",
20
-    "@atlaskit/button-group": "1.1.3",
21
-    "@atlaskit/dropdown-menu": "1.4.0",
22
-    "@atlaskit/field-text": "2.7.0",
23
-    "@atlaskit/flag": "3.0.0",
24
-    "@atlaskit/icon": "7.0.0",
25
-    "@atlaskit/inline-dialog": "3.2.0",
26
-    "@atlaskit/inline-message": "2.1.1",
27
-    "@atlaskit/modal-dialog": "2.1.2",
28
-    "@atlaskit/multi-select": "6.2.0",
29
-    "@atlaskit/spinner": "2.2.3",
30
-    "@atlaskit/tabs": "2.0.0",
31
-    "@atlaskit/toggle": "2.0.4",
18
+    "@atlaskit/avatar": "8.0.5",
19
+    "@atlaskit/button": "5.4.2",
20
+    "@atlaskit/button-group": "1.5.3",
21
+    "@atlaskit/dropdown-menu": "3.10.2",
22
+    "@atlaskit/droplist": "4.11.1",
23
+    "@atlaskit/field-text": "4.0.1",
24
+    "@atlaskit/flag": "6.1.0",
25
+    "@atlaskit/icon": "10.0.0",
26
+    "@atlaskit/inline-dialog": "5.0.2",
27
+    "@atlaskit/inline-message": "3.0.1",
28
+    "@atlaskit/modal-dialog": "2.6.0",
29
+    "@atlaskit/multi-select": "7.1.3",
30
+    "@atlaskit/spinner": "4.0.0",
31
+    "@atlaskit/tabs": "4.0.1",
32
+    "@atlaskit/theme": "2.2.0",
33
+    "@atlaskit/toggle": "2.6.1",
34
+    "@atlaskit/tooltip": "6.0.0",
32
     "@atlassian/aui": "6.0.6",
35
     "@atlassian/aui": "6.0.6",
33
     "autosize": "1.18.13",
36
     "autosize": "1.18.13",
34
     "es6-iterator": "2.0.1",
37
     "es6-iterator": "2.0.1",

+ 6
- 3
react/features/app/components/AbstractApp.js Parādīt failu

4
 import { Provider } from 'react-redux';
4
 import { Provider } from 'react-redux';
5
 import { compose, createStore } from 'redux';
5
 import { compose, createStore } from 'redux';
6
 import Thunk from 'redux-thunk';
6
 import Thunk from 'redux-thunk';
7
+import { AtlasKitThemeProvider } from '@atlaskit/theme';
7
 
8
 
8
 import { i18next } from '../../base/i18n';
9
 import { i18next } from '../../base/i18n';
9
 import {
10
 import {
201
             return (
202
             return (
202
                 <I18nextProvider i18n = { i18next }>
203
                 <I18nextProvider i18n = { i18next }>
203
                     <Provider store = { this._getStore() }>
204
                     <Provider store = { this._getStore() }>
204
-                        {
205
-                            this._createElement(component)
206
-                        }
205
+                        <AtlasKitThemeProvider mode = 'dark'>
206
+                            {
207
+                                this._createElement(component)
208
+                            }
209
+                        </AtlasKitThemeProvider>
207
                     </Provider>
210
                     </Provider>
208
                 </I18nextProvider>
211
                 </I18nextProvider>
209
             );
212
             );

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

1
 import AKButton from '@atlaskit/button';
1
 import AKButton from '@atlaskit/button';
2
 import AKButtonGroup from '@atlaskit/button-group';
2
 import AKButtonGroup from '@atlaskit/button-group';
3
 import ModalDialog from '@atlaskit/modal-dialog';
3
 import ModalDialog from '@atlaskit/modal-dialog';
4
+import { AtlasKitThemeProvider } from '@atlaskit/theme';
4
 import PropTypes from 'prop-types';
5
 import PropTypes from 'prop-types';
5
 import React, { Component } from 'react';
6
 import React, { Component } from 'react';
6
 
7
 
114
      */
115
      */
115
     render() {
116
     render() {
116
         return (
117
         return (
117
-            <div
118
-                onKeyDown = { this._onKeyDown }
119
-                ref = { this._setDialogElement }>
120
-                <ModalDialog
121
-                    footer = { this._renderFooter() }
122
-                    header = { this._renderHeader() }
123
-                    isOpen = { true }
124
-                    onDialogDismissed = { this._onDialogDismissed }
125
-                    width = { this.props.width || 'medium' }>
126
-                    <div>
127
-                        <form
128
-                            className = 'modal-dialog-form'
129
-                            id = 'modal-dialog-form'
130
-                            onSubmit = { this._onSubmit }>
131
-                            { this.props.children }
132
-                        </form>
133
-                    </div>
134
-                </ModalDialog>
135
-            </div>
118
+
119
+            /**
120
+             * Enabled light theme for dialogs until all in-dialog components
121
+             * support dark theme.
122
+             */
123
+            <AtlasKitThemeProvider mode = 'light'>
124
+                <div
125
+                    onKeyDown = { this._onKeyDown }
126
+                    ref = { this._setDialogElement }>
127
+                    <ModalDialog
128
+                        footer = { this._renderFooter() }
129
+                        header = { this._renderHeader() }
130
+                        isOpen = { true }
131
+                        onDialogDismissed = { this._onDialogDismissed }
132
+                        width = { this.props.width || 'medium' }>
133
+                        <div>
134
+                            <form
135
+                                className = 'modal-dialog-form'
136
+                                id = 'modal-dialog-form'
137
+                                onSubmit = { this._onSubmit }>
138
+                                { this.props.children }
139
+                            </form>
140
+                        </div>
141
+                    </ModalDialog>
142
+                </div>
143
+            </AtlasKitThemeProvider>
136
         );
144
         );
137
     }
145
     }
138
 
146
 

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

1
 import AKDropdownMenu from '@atlaskit/dropdown-menu';
1
 import AKDropdownMenu from '@atlaskit/dropdown-menu';
2
-import ExpandIcon from '@atlaskit/icon/glyph/expand';
2
+import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
3
 import PropTypes from 'prop-types';
3
 import PropTypes from 'prop-types';
4
 import React, { Component } from 'react';
4
 import React, { Component } from 'react';
5
 
5
 
116
                 <span className = 'device-selector-trigger-text'>
116
                 <span className = 'device-selector-trigger-text'>
117
                     { triggerText }
117
                     { triggerText }
118
                 </span>
118
                 </span>
119
-                <ExpandIcon
119
+                <ChevronDownIcon
120
                     label = 'expand'
120
                     label = 'expand'
121
                     size = 'large' />
121
                     size = 'large' />
122
             </div>
122
             </div>

+ 14
- 14
react/features/dial-out/components/DialOutNumbersForm.web.js Parādīt failu

1
-import { StatelessDropdownMenu } from '@atlaskit/dropdown-menu';
2
-import AKFieldText, { FieldText } from '@atlaskit/field-text';
3
-import ExpandIcon from '@atlaskit/icon/glyph/expand';
1
+import { DropdownMenuStateless as DropdownMenu } from '@atlaskit/dropdown-menu';
2
+import { FieldTextStateless as TextField } from '@atlaskit/field-text';
3
+import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
4
 import PropTypes from 'prop-types';
4
 import PropTypes from 'prop-types';
5
 import React, { Component } from 'react';
5
 import React, { Component } from 'react';
6
 import { connect } from 'react-redux';
6
 import { connect } from 'react-redux';
149
                 { _dialOutCodes ? this._createDropdownMenu(
149
                 { _dialOutCodes ? this._createDropdownMenu(
150
                         this._formatCountryCodes(_dialOutCodes)) : null }
150
                         this._formatCountryCodes(_dialOutCodes)) : null }
151
                 <div className = 'dial-out-input'>
151
                 <div className = 'dial-out-input'>
152
-                    <AKFieldText
152
+                    <TextField
153
                         autoFocus = { true }
153
                         autoFocus = { true }
154
                         isLabelHidden = { true }
154
                         isLabelHidden = { true }
155
                         label = { 'dial-out-input-field' }
155
                         label = { 'dial-out-input-field' }
164
     }
164
     }
165
 
165
 
166
     /**
166
     /**
167
-     * Creates a {@code StatelessDropdownMenu} instance.
167
+     * Creates a {@code DropdownMenu} instance.
168
      *
168
      *
169
      * @param {Array} items - The content to display within the dropdown.
169
      * @param {Array} items - The content to display within the dropdown.
170
      * @returns {ReactElement}
170
      * @returns {ReactElement}
174
 
174
 
175
         return (
175
         return (
176
             <div className = 'dropdown-container'>
176
             <div className = 'dropdown-container'>
177
-                <StatelessDropdownMenu
177
+                <DropdownMenu
178
                     isOpen = { this.state.isDropdownOpen }
178
                     isOpen = { this.state.isDropdownOpen }
179
                     items = { [ { items } ] }
179
                     items = { [ { items } ] }
180
                     onItemActivated = { this._onSelect }
180
                     onItemActivated = { this._onSelect }
181
                     onOpenChange = { this._onOpenChange }
181
                     onOpenChange = { this._onOpenChange }
182
                     shouldFitContainer = { false }>
182
                     shouldFitContainer = { false }>
183
                     { this._createDropdownTrigger(dialCode, code) }
183
                     { this._createDropdownTrigger(dialCode, code) }
184
-                </StatelessDropdownMenu>
184
+                </DropdownMenu>
185
             </div>
185
             </div>
186
         );
186
         );
187
     }
187
     }
203
                     className = 'dial-out-flag-icon'
203
                     className = 'dial-out-flag-icon'
204
                     countryCode = { `${countryCode}` } />
204
                     countryCode = { `${countryCode}` } />
205
                 { /**
205
                 { /**
206
-                   * FIXME Replace FieldText with AtlasKit Button when an issue
206
+                   * FIXME Replace TextField with AtlasKit Button when an issue
207
                    * with icons shrinking due to button text is fixed.
207
                    * with icons shrinking due to button text is fixed.
208
                    */ }
208
                    */ }
209
-                <FieldText
209
+                <TextField
210
                     className = 'input-control dial-out-code'
210
                     className = 'input-control dial-out-code'
211
                     isLabelHidden = { true }
211
                     isLabelHidden = { true }
212
                     isReadOnly = { true }
212
                     isReadOnly = { true }
215
                     type = 'text'
215
                     type = 'text'
216
                     value = { dialCode || '' } />
216
                     value = { dialCode || '' } />
217
                 <span className = 'dropdown-trigger-icon'>
217
                 <span className = 'dropdown-trigger-icon'>
218
-                    <ExpandIcon
218
+                    <ChevronDownIcon
219
                         label = 'expand'
219
                         label = 'expand'
220
-                        size = 'medium' />
220
+                        size = 'small' />
221
                 </span>
221
                 </span>
222
             </div>
222
             </div>
223
         );
223
         );
225
 
225
 
226
     /**
226
     /**
227
      * Transforms the passed in numbers object into an array of objects that can
227
      * Transforms the passed in numbers object into an array of objects that can
228
-     * be parsed by {@code StatelessDropdownMenu}.
228
+     * be parsed by {@code DropdownMenu}.
229
      *
229
      *
230
      * @param {Object} countryCodes - The list of country codes.
230
      * @param {Object} countryCodes - The list of country codes.
231
      * @private
231
      * @private
259
     }
259
     }
260
 
260
 
261
     /**
261
     /**
262
-     * This is a no-op function used to stub out FieldText's onChange in order
263
-     * to prevent FieldText from printing prop type validation errors. FieldText
262
+     * This is a no-op function used to stub out TextField's onChange in order
263
+     * to prevent TextField from printing prop type validation errors. TextField
264
      * is used as a trigger for the dropdown in {@code DialOutNumbersForm} to
264
      * is used as a trigger for the dropdown in {@code DialOutNumbersForm} to
265
      * get the desired AtlasKit input look for the UI.
265
      * get the desired AtlasKit input look for the UI.
266
      *
266
      *

+ 2
- 2
react/features/display-name/components/DisplayNamePrompt.web.js Parādīt failu

1
-import AKFieldText from '@atlaskit/field-text';
2
 import PropTypes from 'prop-types';
1
 import PropTypes from 'prop-types';
3
 import React, { Component } from 'react';
2
 import React, { Component } from 'react';
4
 import { connect } from 'react-redux';
3
 import { connect } from 'react-redux';
4
+import { FieldTextStateless as TextField } from '@atlaskit/field-text';
5
 
5
 
6
 import { Dialog } from '../../base/dialog';
6
 import { Dialog } from '../../base/dialog';
7
 import { translate } from '../../base/i18n';
7
 import { translate } from '../../base/i18n';
76
                 onSubmit = { this._onSubmit }
76
                 onSubmit = { this._onSubmit }
77
                 titleKey = 'dialog.displayNameRequired'
77
                 titleKey = 'dialog.displayNameRequired'
78
                 width = 'small'>
78
                 width = 'small'>
79
-                <AKFieldText
79
+                <TextField
80
                     autoFocus = { true }
80
                     autoFocus = { true }
81
                     compact = { true }
81
                     compact = { true }
82
                     label = { this.props.t('dialog.enterDisplayName') }
82
                     label = { this.props.t('dialog.enterDisplayName') }

+ 2
- 3
react/features/invite/components/AddPasswordForm.js Parādīt failu

1
 import Button from '@atlaskit/button';
1
 import Button from '@atlaskit/button';
2
-import { FieldText } from '@atlaskit/field-text';
2
+import { FieldTextStateless as TextField } from '@atlaskit/field-text';
3
 import PropTypes from 'prop-types';
3
 import PropTypes from 'prop-types';
4
 import React, { Component } from 'react';
4
 import React, { Component } from 'react';
5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
106
                 onSubmit = { this._onSubmit } >
106
                 onSubmit = { this._onSubmit } >
107
                 <div className = 'form-control__container'>
107
                 <div className = 'form-control__container'>
108
                     <div className = 'form-control__input-container'>
108
                     <div className = 'form-control__input-container'>
109
-                        <FieldText
109
+                        <TextField
110
                             autoFocus = { true }
110
                             autoFocus = { true }
111
                             compact = { true }
111
                             compact = { true }
112
                             id = 'newPasswordInput'
112
                             id = 'newPasswordInput'
123
                         id = 'addPasswordBtn'
123
                         id = 'addPasswordBtn'
124
                         isDisabled = { !this.state.password }
124
                         isDisabled = { !this.state.password }
125
                         onClick = { this._onSubmit }
125
                         onClick = { this._onSubmit }
126
-                        shouldFitContainer = { true }
127
                         type = 'button'>
126
                         type = 'button'>
128
                         { t('dialog.add') }
127
                         { t('dialog.add') }
129
                     </Button>
128
                     </Button>

+ 97
- 126
react/features/invite/components/DialInNumbersForm.js Parādīt failu

1
 import Button from '@atlaskit/button';
1
 import Button from '@atlaskit/button';
2
-import { StatelessDropdownMenu } from '@atlaskit/dropdown-menu';
3
-import { FieldText } from '@atlaskit/field-text';
4
-import ExpandIcon from '@atlaskit/icon/glyph/expand';
2
+import DropdownMenu, {
3
+    DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
5
 import PropTypes from 'prop-types';
4
 import PropTypes from 'prop-types';
6
 import React, { Component } from 'react';
5
 import React, { Component } from 'react';
7
 import { connect } from 'react-redux';
6
 import { connect } from 'react-redux';
95
 
94
 
96
         // Bind event handlers so they are only bound once for every instance.
95
         // Bind event handlers so they are only bound once for every instance.
97
         this._onCopyClick = this._onCopyClick.bind(this);
96
         this._onCopyClick = this._onCopyClick.bind(this);
98
-        this._onDropdownTriggerInputChange
99
-            = this._onDropdownTriggerInputChange.bind(this);
100
         this._onOpenChange = this._onOpenChange.bind(this);
97
         this._onOpenChange = this._onOpenChange.bind(this);
101
         this._onSelect = this._onSelect.bind(this);
98
         this._onSelect = this._onSelect.bind(this);
102
         this._setCopyElement = this._setCopyElement.bind(this);
99
         this._setCopyElement = this._setCopyElement.bind(this);
147
             return null;
144
             return null;
148
         }
145
         }
149
 
146
 
150
-        const items = this._formatNumbers(numbers);
147
+        const items = this._renderDropdownItems(numbers);
151
 
148
 
152
         return (
149
         return (
153
             <div className = 'form-control dial-in-numbers'>
150
             <div className = 'form-control dial-in-numbers'>
158
                     </span>
155
                     </span>
159
                 </label>
156
                 </label>
160
                 <div className = 'form-control__container'>
157
                 <div className = 'form-control__container'>
161
-                    { this._createDropdownMenu(items, selectedNumber.content) }
158
+                    <div className = 'form-control__input-container'>
159
+                        { this._createDropdownMenu(items, selectedNumber) }
160
+                    </div>
162
                     <Button
161
                     <Button
163
                         appearance = 'default'
162
                         appearance = 'default'
164
                         onClick = { this._onCopyClick }
163
                         onClick = { this._onCopyClick }
165
-                        shouldFitContainer = { true }
166
                         type = 'button'>
164
                         type = 'button'>
167
                         { t('dialog.copy') }
165
                         { t('dialog.copy') }
168
                     </Button>
166
                     </Button>
178
     }
176
     }
179
 
177
 
180
     /**
178
     /**
181
-     * Creates a {@code StatelessDropdownMenu} instance.
179
+     * Creates a {@code DropdownMenu} instance.
182
      *
180
      *
183
      * @param {Array} items - The content to display within the dropdown.
181
      * @param {Array} items - The content to display within the dropdown.
184
      * @param {string} triggerText - The text to display within the
182
      * @param {string} triggerText - The text to display within the
187
      */
185
      */
188
     _createDropdownMenu(items, triggerText) {
186
     _createDropdownMenu(items, triggerText) {
189
         return (
187
         return (
190
-            <StatelessDropdownMenu
188
+            <DropdownMenu
191
                 isOpen = { this.state.isDropdownOpen }
189
                 isOpen = { this.state.isDropdownOpen }
192
-                items = { [ { items } ] }
193
-                onItemActivated = { this._onSelect }
194
                 onOpenChange = { this._onOpenChange }
190
                 onOpenChange = { this._onOpenChange }
195
-                shouldFitContainer = { true }>
196
-                { this._createDropdownTrigger(triggerText) }
197
-            </StatelessDropdownMenu>
191
+                shouldFitContainer = { true }
192
+                trigger = { triggerText || '' }
193
+                triggerButtonProps = {{
194
+                    className: 'dropdown-button-trigger',
195
+                    shouldFitContainer: true }}
196
+                triggerType = 'button'>
197
+                <DropdownItemGroup>
198
+                    { items }
199
+                </DropdownItemGroup>
200
+            </DropdownMenu>
198
         );
201
         );
199
     }
202
     }
200
 
203
 
201
     /**
204
     /**
202
-     * Creates a React {@code Component} with a readonly HTMLInputElement as a
203
-     * trigger for displaying the dropdown menu. The {@code Component} will also
204
-     * display the currently selected number.
205
+     * Formats the region and number string.
205
      *
206
      *
206
-     * @param {string} triggerText - Text to display in the HTMLInputElement.
207
+     * @param {string} region - The region string.
208
+     * @param {string} number - The number string.
209
+     * @returns {string} - The new formatted string.
207
      * @private
210
      * @private
208
-     * @returns {ReactElement}
209
-     */
210
-    _createDropdownTrigger(triggerText) {
211
-        return (
212
-            <div className = 'dial-in-numbers-trigger'>
213
-                <div className = 'form-control__input-container'>
214
-                    <FieldText
215
-                        compact = { true }
216
-                        isLabelHidden = { true }
217
-                        isReadOnly = { true }
218
-                        label = 'Select Dial-In Number'
219
-                        onChange = { this._onDropdownTriggerInputChange }
220
-                        ref = { this._setInput }
221
-                        shouldFitContainer = { true }
222
-                        type = 'text'
223
-                        value = { triggerText || '' } />
224
-                </div>
225
-                <span className = 'dial-in-numbers-trigger-icon'>
226
-                    <ExpandIcon
227
-                        label = 'expand'
228
-                        size = 'medium' />
229
-                </span>
230
-            </div>
231
-        );
232
-    }
233
-
234
-    /**
235
-     * Detects whether the response from dialInNumbersUrl returned an array or
236
-     * an object with dial-in numbers and calls the appropriate method to
237
-     * transform the numbers into the format expected by
238
-     * {@code StatelessDropdownMenu}.
239
-     *
240
-     * @param {Array<string>|Object} dialInNumbers - The numbers returned from
241
-     * requesting dialInNumbersUrl.
242
-     * @private
243
-     * @returns {Array<Object>}
244
-     */
245
-    _formatNumbers(dialInNumbers) {
246
-        if (Array.isArray(dialInNumbers)) {
247
-            return this._formatNumbersArray(dialInNumbers);
248
-        }
249
-
250
-        return this._formatNumbersObject(dialInNumbers);
251
-    }
252
-
253
-    /**
254
-     * Transforms the passed in numbers array into an array of objects that can
255
-     * be parsed by {@code StatelessDropdownMenu}.
256
-     *
257
-     * @param {Array<string>} dialInNumbers - An array with dial-in numbers to
258
-     * display and copy.
259
-     * @private
260
-     * @returns {Array<Object>}
261
      */
211
      */
262
-    _formatNumbersArray(dialInNumbers) {
263
-        return dialInNumbers.map(number => {
264
-            return {
265
-                content: number,
266
-                number
267
-            };
268
-        });
269
-    }
270
-
271
-    /**
272
-     * Transforms the passed in numbers object into an array of objects that can
273
-     * be parsed by {@code StatelessDropdownMenu}.
274
-     *
275
-     * @param {Object} dialInNumbers - The numbers object to parse. The
276
-     * expected format is an object with keys being the name of the country
277
-     * and the values being an array of numbers as strings.
278
-     * @private
279
-     * @returns {Array<Object>}
280
-     */
281
-    _formatNumbersObject(dialInNumbers) {
282
-        const phoneRegions = Object.keys(dialInNumbers);
283
-
284
-        if (!phoneRegions.length) {
285
-            return [];
286
-        }
287
-
288
-        const formattedNumbers = phoneRegions.map(region => {
289
-            const numbers = dialInNumbers[region];
290
-
291
-            return numbers.map(number => {
292
-                return {
293
-                    content: `${region}: ${number}`,
294
-                    number
295
-                };
296
-            });
297
-        });
298
-
299
-        return Array.prototype.concat(...formattedNumbers);
212
+    _formatRegionNumber(region, number) {
213
+        return `${region}: ${number}`;
300
     }
214
     }
301
 
215
 
302
     /**
216
     /**
313
         });
227
         });
314
 
228
 
315
         const callNumber = t('invite.callNumber', {
229
         const callNumber = t('invite.callNumber', {
316
-            number: this.state.selectedNumber.number
230
+            number: this.state.selectedNumber
317
         });
231
         });
318
         const stepOne = `1) ${callNumber}`;
232
         const stepOne = `1) ${callNumber}`;
319
 
233
 
343
         }
257
         }
344
     }
258
     }
345
 
259
 
346
-    /**
347
-     * This is a no-op function used to stub out FieldText's onChange in order
348
-     * to prevent FieldText from printing prop type validation errors. FieldText
349
-     * is used as a trigger for the dropdown in {@code DialInNumbersForm} to
350
-     * get the desired AtlasKit input look for the UI.
351
-     *
352
-     * @returns {void}
353
-     */
354
-    _onDropdownTriggerInputChange() {
355
-        // Intentionally left empty.
356
-    }
357
-
358
     /**
260
     /**
359
      * Sets the internal state to either open or close the dropdown. If the
261
      * Sets the internal state to either open or close the dropdown. If the
360
      * dropdown is disabled, the state will always be set to false.
262
      * dropdown is disabled, the state will always be set to false.
380
     _onSelect(selection) {
282
     _onSelect(selection) {
381
         this.setState({
283
         this.setState({
382
             isDropdownOpen: false,
284
             isDropdownOpen: false,
383
-            selectedNumber: selection.item
285
+            selectedNumber: selection
384
         });
286
         });
385
     }
287
     }
386
 
288
 
289
+    /**
290
+     * Renders a DropDownItem for the given id and text.
291
+     *
292
+     * @param {string} id - The key identifier of the DropdownItem.
293
+     * @param {string} text - The text to display in the dropdown item.
294
+     * @returns {React.Component}
295
+     * @private
296
+     */
297
+    _renderDropDownItem(id, text) {
298
+        return (
299
+
300
+            /**
301
+             * Arrow functions are not allowed in props, but I leave this until
302
+             * I figure a better way to implement the same thing.
303
+             */
304
+            /* eslint-disable react/jsx-no-bind */
305
+            <DropdownItem
306
+                key = { id }
307
+                onClick = { () => this._onSelect(text || id) }>
308
+                { text }
309
+            </DropdownItem>
310
+            /* eslint-disable react/jsx-no-bind */
311
+        );
312
+    }
313
+
314
+    /**
315
+     * Detects whether the response from dialInNumbersUrl returned an array or
316
+     * an object with dial-in numbers and calls the appropriate method to
317
+     * transform the numbers into the format expected by
318
+     * {@code DropdownMenu}.
319
+     *
320
+     * @param {Array<string>|Object} dialInNumbers - The numbers returned from
321
+     * requesting dialInNumbersUrl.
322
+     * @private
323
+     * @returns {Array<Object>}
324
+     */
325
+    _renderDropdownItems(dialInNumbers) {
326
+        if (Array.isArray(dialInNumbers)) {
327
+            return dialInNumbers.map(number =>
328
+                this._renderDropDownItem(number)
329
+            );
330
+        }
331
+
332
+        const phoneRegions = Object.keys(dialInNumbers);
333
+
334
+        if (!phoneRegions.length) {
335
+            return [];
336
+        }
337
+
338
+        const dropdownItems = phoneRegions.map(region => {
339
+            const numbers = dialInNumbers[region];
340
+
341
+            return numbers.map(number =>
342
+                this._renderDropDownItem(number,
343
+                    this._formatRegionNumber(region, number))
344
+            );
345
+        });
346
+
347
+        return Array.prototype.concat(...dropdownItems);
348
+    }
349
+
387
     /**
350
     /**
388
      * Sets the internal reference to the DOM/HTML element backing the React
351
      * Sets the internal reference to the DOM/HTML element backing the React
389
      * {@code Component} text area.
352
      * {@code Component} text area.
406
      * @returns {void}
369
      * @returns {void}
407
      */
370
      */
408
     _setDefaultNumber(dialInNumbers) {
371
     _setDefaultNumber(dialInNumbers) {
409
-        const numbers = this._formatNumbers(dialInNumbers);
372
+        let number = '';
373
+
374
+        if (Array.isArray(dialInNumbers)) {
375
+            number = dialInNumbers[0];
376
+        } else if (Object.keys(dialInNumbers).length > 0) {
377
+            const region = Object.keys(dialInNumbers)[0];
378
+
379
+            number = this._formatRegionNumber(region, dialInNumbers[region]);
380
+        }
410
 
381
 
411
         this.setState({
382
         this.setState({
412
-            selectedNumber: numbers[0]
383
+            selectedNumber: number
413
         });
384
         });
414
     }
385
     }
415
 }
386
 }

+ 4
- 6
react/features/invite/components/ShareLinkForm.js Parādīt failu

1
 import Button from '@atlaskit/button';
1
 import Button from '@atlaskit/button';
2
-import { FieldText } from '@atlaskit/field-text';
2
+import { FieldTextStateless as TextField } from '@atlaskit/field-text';
3
 import PropTypes from 'prop-types';
3
 import PropTypes from 'prop-types';
4
 import React, { Component } from 'react';
4
 import React, { Component } from 'react';
5
 
5
 
71
                 </label>
71
                 </label>
72
                 <div className = 'form-control__container'>
72
                 <div className = 'form-control__container'>
73
                     <div className = 'form-control__input-container'>
73
                     <div className = 'form-control__input-container'>
74
-                        <FieldText
75
-                            compact = { true }
74
+                        <TextField
76
                             id = 'inviteLinkRef'
75
                             id = 'inviteLinkRef'
77
                             isLabelHidden = { true }
76
                             isLabelHidden = { true }
78
                             isReadOnly = { true }
77
                             isReadOnly = { true }
86
                     <Button
85
                     <Button
87
                         appearance = 'default'
86
                         appearance = 'default'
88
                         onClick = { this._onClick }
87
                         onClick = { this._onClick }
89
-                        shouldFitContainer = { true }
90
                         type = 'button'>
88
                         type = 'button'>
91
                         { t('dialog.copy') }
89
                         { t('dialog.copy') }
92
                     </Button>
90
                     </Button>
114
     }
112
     }
115
 
113
 
116
     /**
114
     /**
117
-     * This is a no-op function used to stub out FieldText's onChange in order
118
-     * to prevent FieldText from printing prop type validation errors. FieldText
115
+     * This is a no-op function used to stub out TextField's onChange in order
116
+     * to prevent TextField from printing prop type validation errors. TextField
119
      * is used as a trigger for the dropdown in {@code ShareLinkForm} to get the
117
      * is used as a trigger for the dropdown in {@code ShareLinkForm} to get the
120
      * desired AtlasKit input look for the UI.
118
      * desired AtlasKit input look for the UI.
121
      *
119
      *

+ 2
- 3
react/features/room-lock/components/PasswordRequiredPrompt.web.js Parādīt failu

1
 // @flow
1
 // @flow
2
-
3
-import AKFieldText from '@atlaskit/field-text';
4
 import PropTypes from 'prop-types';
2
 import PropTypes from 'prop-types';
5
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
6
 import { connect } from 'react-redux';
4
 import { connect } from 'react-redux';
5
+import { FieldTextStateless as TextField } from '@atlaskit/field-text';
7
 
6
 
8
 import { setPassword } from '../../base/conference';
7
 import { setPassword } from '../../base/conference';
9
 import { Dialog } from '../../base/dialog';
8
 import { Dialog } from '../../base/dialog';
75
     _renderBody() {
74
     _renderBody() {
76
         return (
75
         return (
77
             <div>
76
             <div>
78
-                <AKFieldText
77
+                <TextField
79
                     autoFocus = { true }
78
                     autoFocus = { true }
80
                     compact = { true }
79
                     compact = { true }
81
                     label = { this.props.t('dialog.passwordLabel') }
80
                     label = { this.props.t('dialog.passwordLabel') }

+ 5
- 55
react/features/toolbox/components/ToolbarButton.web.js Parādīt failu

1
 /* @flow */
1
 /* @flow */
2
 
2
 
3
-import AKInlineDialog from '@atlaskit/inline-dialog';
4
-import { Tooltip } from '@atlaskit/tooltip';
3
+import InlineDialog from '@atlaskit/inline-dialog';
4
+import Tooltip from '@atlaskit/tooltip';
5
 import PropTypes from 'prop-types';
5
 import PropTypes from 'prop-types';
6
 import React, { Component } from 'react';
6
 import React, { Component } from 'react';
7
 
7
 
8
 import { translate } from '../../base/i18n';
8
 import { translate } from '../../base/i18n';
9
 
9
 
10
 import { TOOLTIP_TO_POPUP_POSITION } from '../constants';
10
 import { TOOLTIP_TO_POPUP_POSITION } from '../constants';
11
-import { isButtonEnabled } from '../functions';
12
 import StatelessToolbarButton from './StatelessToolbarButton';
11
 import StatelessToolbarButton from './StatelessToolbarButton';
13
 
12
 
14
 declare var APP: Object;
13
 declare var APP: Object;
24
 
23
 
25
     _onClick: Function;
24
     _onClick: Function;
26
 
25
 
27
-    _onMouseOut: Function;
28
-
29
-    _onMouseOver: Function;
30
-
31
-    state: {
32
-
33
-        /**
34
-         * Whether or not the tooltip for the button should be displayed.
35
-         *
36
-         * @type {boolean}
37
-         */
38
-        showTooltip: boolean
39
-    }
40
-
41
     /**
26
     /**
42
      * Toolbar button component's property types.
27
      * Toolbar button component's property types.
43
      *
28
      *
81
     constructor(props: Object) {
66
     constructor(props: Object) {
82
         super(props);
67
         super(props);
83
 
68
 
84
-        this.state = {
85
-            showTooltip: false
86
-        };
87
-
88
         // Bind methods to save the context
69
         // Bind methods to save the context
89
         this._onClick = this._onClick.bind(this);
70
         this._onClick = this._onClick.bind(this);
90
-        this._onMouseOut = this._onMouseOut.bind(this);
91
-        this._onMouseOver = this._onMouseOver.bind(this);
92
     }
71
     }
93
 
72
 
94
     /**
73
     /**
134
         const buttonComponent = ( // eslint-disable-line no-extra-parens
113
         const buttonComponent = ( // eslint-disable-line no-extra-parens
135
             <Tooltip
114
             <Tooltip
136
                 description = { button.tooltipText || t(button.tooltipKey) }
115
                 description = { button.tooltipText || t(button.tooltipKey) }
137
-                onMouseOut = { this._onMouseOut }
138
-                onMouseOver = { this._onMouseOver }
139
-                position = { tooltipPosition }
140
-                visible = { this.state.showTooltip }>
116
+                position = { tooltipPosition }>
141
                 <StatelessToolbarButton { ...props }>
117
                 <StatelessToolbarButton { ...props }>
142
                     { this.props.children }
118
                     { this.props.children }
143
                 </StatelessToolbarButton>
119
                 </StatelessToolbarButton>
151
             const { dataAttr, dataInterpolate, position } = popupConfig;
127
             const { dataAttr, dataInterpolate, position } = popupConfig;
152
 
128
 
153
             children = ( // eslint-disable-line no-extra-parens
129
             children = ( // eslint-disable-line no-extra-parens
154
-                <AKInlineDialog
130
+                <InlineDialog
155
                     content = { t(dataAttr, dataInterpolate) }
131
                     content = { t(dataAttr, dataInterpolate) }
156
                     isOpen = { Boolean(popupConfig) }
132
                     isOpen = { Boolean(popupConfig) }
157
                     position = { position }>
133
                     position = { position }>
158
                     { buttonComponent }
134
                     { buttonComponent }
159
-                </AKInlineDialog>
135
+                </InlineDialog>
160
             );
136
             );
161
         }
137
         }
162
 
138
 
176
      */
152
      */
177
     _onClick(event) {
153
     _onClick(event) {
178
         this.props.onClick(event);
154
         this.props.onClick(event);
179
-        this.setState({ showTooltip: false });
180
     }
155
     }
181
 
156
 
182
     /**
157
     /**
205
             });
180
             });
206
     }
181
     }
207
 
182
 
208
-    /**
209
-     * Hides any displayed tooltip.
210
-     *
211
-     * @private
212
-     * @returns {void}
213
-     */
214
-    _onMouseOut(): void {
215
-        this.setState({ showTooltip: false });
216
-    }
217
-
218
-    /**
219
-     * Hides any displayed tooltip.
220
-     *
221
-     * @private
222
-     * @returns {void}
223
-     */
224
-    _onMouseOver(): void {
225
-        const { button } = this.props;
226
-
227
-        this.setState({
228
-            showTooltip: isButtonEnabled(button.buttonName)
229
-                && !button.unclickable
230
-        });
231
-    }
232
-
233
     /**
183
     /**
234
      * Sets shortcut and tooltip for current toolbar button.
184
      * Sets shortcut and tooltip for current toolbar button.
235
      *
185
      *

Notiek ielāde…
Atcelt
Saglabāt