@playkit-js/moderation 3.2.19 → 3.2.20-canary.0-a00b3eb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
font-weight: 700;
|
|
39
39
|
text-align: left;
|
|
40
40
|
line-height: 32px;
|
|
41
|
+
padding-right: 44px;
|
|
41
42
|
}
|
|
42
43
|
.selectTitle {
|
|
43
44
|
font-size: 14px;
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
font-weight: 700;
|
|
46
47
|
text-align: left;
|
|
47
48
|
margin-top: 24px;
|
|
49
|
+
padding-right: 44px;
|
|
48
50
|
}
|
|
49
51
|
.subtitle {
|
|
50
52
|
margin-top: 16px;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
.popover-container {
|
|
4
4
|
position: relative;
|
|
5
5
|
.popover-component {
|
|
6
|
+
width: fit-content;
|
|
7
|
+
min-width: 280px;
|
|
8
|
+
max-width: 500px;
|
|
6
9
|
z-index: 1;
|
|
7
10
|
background-color: $tone-7-color;
|
|
8
11
|
border-radius: $roundness-1;
|
|
@@ -33,10 +36,14 @@
|
|
|
33
36
|
.popover-menu {
|
|
34
37
|
padding-top: 6px;
|
|
35
38
|
padding-bottom: 6px;
|
|
39
|
+
display: inline-block;
|
|
36
40
|
}
|
|
37
41
|
.popover-menu-item {
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
min-width: 280px;
|
|
45
|
+
max-width: 461px;
|
|
46
|
+
text-align: left;
|
|
40
47
|
padding: 9px 24px 9px 16px;
|
|
41
48
|
white-space: nowrap;
|
|
42
49
|
min-height: 30px;
|
|
@@ -4,6 +4,8 @@ import * as styles from './popover.scss';
|
|
|
4
4
|
|
|
5
5
|
const {ESC, TAB} = KalturaPlayer.ui.utils.KeyMap;
|
|
6
6
|
const {withEventManager} = KalturaPlayer.ui.Event;
|
|
7
|
+
const {Tooltip} = KalturaPlayer.ui.components;
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
export interface PopoverMenuItem {
|
|
9
11
|
label?: string;
|
|
@@ -99,8 +101,23 @@ export class Popover extends Component<PopoverProps> {
|
|
|
99
101
|
cb(byKeyboard);
|
|
100
102
|
};
|
|
101
103
|
|
|
104
|
+
private _createOptionDiv = (el:PopoverMenuItem, index: number) =>{
|
|
105
|
+
return (
|
|
106
|
+
<div
|
|
107
|
+
tabIndex={0}
|
|
108
|
+
aria-label={el.label}
|
|
109
|
+
className={styles.popoverMenuItem}
|
|
110
|
+
ref={node => {
|
|
111
|
+
this._setOptionRef(index, node);
|
|
112
|
+
}}>
|
|
113
|
+
{el.label}
|
|
114
|
+
</div>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
102
118
|
render(props: PopoverProps) {
|
|
103
119
|
const {open} = this.props;
|
|
120
|
+
|
|
104
121
|
return (
|
|
105
122
|
<div className={styles.popoverContainer}>
|
|
106
123
|
<div
|
|
@@ -122,21 +139,18 @@ export class Popover extends Component<PopoverProps> {
|
|
|
122
139
|
className={[styles.reportPopover, styles.popoverComponent, styles.bottom, styles.right].join(' ')}>
|
|
123
140
|
<div role="menu" className={styles.popoverMenu} data-testid="popoverMenu">
|
|
124
141
|
{props.options.map((el, index) => {
|
|
142
|
+
const isTitle = el.label?.length ? el.label?.length > 58 : ''
|
|
125
143
|
return (
|
|
126
144
|
<A11yWrapper
|
|
127
145
|
role="menuitem"
|
|
128
146
|
onClick={this._handleClickOnOption(el.onMenuChosen)}
|
|
129
147
|
onDownKeyPressed={this._handleDownKeyPressed(index)}
|
|
130
148
|
onUpKeyPressed={this._handleUpKeyPressed(index)}>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this._setOptionRef(index, node);
|
|
137
|
-
}}>
|
|
138
|
-
{el.label}
|
|
139
|
-
</div>
|
|
149
|
+
{isTitle?
|
|
150
|
+
(<Tooltip label={el.label}>
|
|
151
|
+
{this._createOptionDiv(el, index)}
|
|
152
|
+
</Tooltip>)
|
|
153
|
+
:(this._createOptionDiv(el, index))}
|
|
140
154
|
</A11yWrapper>
|
|
141
155
|
);
|
|
142
156
|
})}
|