File tree Expand file tree Collapse file tree 7 files changed +43
-19
lines changed Expand file tree Collapse file tree 7 files changed +43
-19
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export default [
31
31
'vite.config.ts' ,
32
32
'stories/' ,
33
33
'**/.storybook/**' ,
34
+ '**/*.test.ts' ,
34
35
] ,
35
36
} ,
36
37
@@ -50,10 +51,12 @@ export default [
50
51
semi : [ 'warn' , 'always' ] ,
51
52
'no-unused-vars' : 'off' , //Let '@typescript-eslint/no-unused-vars' catch the errors to allow unused function parameters (ex: in interfaces)
52
53
'no-var' : 'error' ,
54
+ '@typescript-eslint/no-unsafe-function-type' : 'warn' ,
53
55
'@typescript-eslint/explicit-module-boundary-types' : 'off' ,
54
56
'@typescript-eslint/no-non-null-assertion' : 'off' ,
55
57
'@typescript-eslint/no-explicit-any' : 'off' ,
56
58
'@typescript-eslint/no-inferrable-types' : 'off' ,
59
+ '@typescript-eslint/no-empty-object-type' : 'off' ,
57
60
'@typescript-eslint/ban-ts-comment' : 'off' , //TODO: Remove (maybe)
58
61
'@typescript-eslint/ban-types' : 'off' , //TODO: Remove (maybe)
59
62
'lit/no-useless-template-literals' : 'error' ,
Original file line number Diff line number Diff line change @@ -58,11 +58,13 @@ export const PopoverTargetMixin = <T extends Constructor<LitElement>>(
58
58
) ;
59
59
if ( ! popoverContainerElement ) return ;
60
60
61
- this . #popoverIsOpen
62
- ? // @ts -ignore - This is part of the new popover API, but typescript doesn't recognize it yet.
63
- popoverContainerElement . hidePopover ( )
64
- : // @ts -ignore - This is part of the new popover API, but typescript doesn't recognize it yet.
65
- popoverContainerElement . showPopover ( ) ;
61
+ if ( this . #popoverIsOpen) {
62
+ // @ts -ignore - This is part of the new popover API, but typescript doesn't recognize it yet.
63
+ popoverContainerElement . hidePopover ( ) ;
64
+ } else {
65
+ // @ts -ignore - This is part of the new popover API, but typescript doesn't recognize it yet.
66
+ popoverContainerElement . showPopover ( ) ;
67
+ }
66
68
} ;
67
69
68
70
#popoverListener = ( event : any ) => {
Original file line number Diff line number Diff line change @@ -153,8 +153,10 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
153
153
if ( ! this . selectable ) return ;
154
154
if ( this . deselectable === false ) {
155
155
this . #select( ) ;
156
+ } else if ( this . selected ) {
157
+ this . #deselect( ) ;
156
158
} else {
157
- this . selected ? this . #deselect ( ) : this . #select( ) ;
159
+ this . #select( ) ;
158
160
}
159
161
}
160
162
Original file line number Diff line number Diff line change @@ -210,12 +210,20 @@ export class UUIComboboxListElement extends LitElement {
210
210
switch ( e . key ) {
211
211
case 'ArrowUp' :
212
212
e . preventDefault ( ) ;
213
- e . ctrlKey ? this . _moveIndex ( - 10 ) : this . _moveIndex ( - 1 ) ;
213
+ if ( e . ctrlKey ) {
214
+ this . _moveIndex ( - 10 ) ;
215
+ } else {
216
+ this . _moveIndex ( - 1 ) ;
217
+ }
214
218
break ;
215
219
216
220
case 'ArrowDown' :
217
221
e . preventDefault ( ) ;
218
- e . ctrlKey ? this . _moveIndex ( 10 ) : this . _moveIndex ( 1 ) ;
222
+ if ( e . ctrlKey ) {
223
+ this . _moveIndex ( 10 ) ;
224
+ } else {
225
+ this . _moveIndex ( 1 ) ;
226
+ }
219
227
220
228
break ;
221
229
Original file line number Diff line number Diff line change @@ -94,7 +94,11 @@ export class UUIPopoverElement extends LitElement {
94
94
set open ( newValue ) {
95
95
const oldValue = this . _open ;
96
96
this . _open = newValue ;
97
- newValue ? this . _openPopover ( ) : this . _closePopover ( ) ;
97
+ if ( newValue ) {
98
+ this . _openPopover ( ) ;
99
+ } else {
100
+ this . _closePopover ( ) ;
101
+ }
98
102
this . requestUpdate ( 'open' , oldValue ) ;
99
103
}
100
104
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import '@umbraco-ui/uui-checkbox/lib';
6
6
import '@umbraco-ui/uui-icon/lib' ;
7
7
import '@umbraco-ui/uui-progress-bar/lib' ;
8
8
import '@umbraco-ui/uui-tag/lib' ;
9
+ import '@umbraco-ui/uui-symbol-sort/lib' ;
9
10
10
11
import { UUITextStyles } from '@umbraco-ui/uui-css/lib' ;
11
12
import { css , html , LitElement } from 'lit' ;
@@ -15,7 +16,7 @@ import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
15
16
16
17
interface TableColumn {
17
18
name : string ;
18
- sort : Function ;
19
+ sort : ( items : Array < TableItem > , desc : boolean ) => Array < TableItem > ;
19
20
}
20
21
21
22
interface TableItem {
@@ -224,9 +225,9 @@ export class UUITableWithSelectionExampleElement extends LitElement {
224
225
<uui- table-cell> ${ item . signUpDate } </ uui- table-cell>
225
226
<uui- table-cell> ${ item . email } </ uui- table-cell>
226
227
<uui- table-cell>
227
- <uui- tag color = "${ item . newsletter ? 'positive' : 'secondary ' } " size = "s"
228
- > ${ item . newsletter ? 'Yes' : 'No' } < / uui - tag
229
- >
228
+ <uui- tag color = "${ item . newsletter ? 'positive' : 'danger ' } " >
229
+ ${ item . newsletter ? 'Yes' : 'No' }
230
+ < / uui - tag >
230
231
</ uui- table-cell>
231
232
</ uui- table-row> ` ;
232
233
} ;
Original file line number Diff line number Diff line change @@ -145,9 +145,11 @@ export class UUITabGroupElement extends LitElement {
145
145
el => el . active && el !== linkedElement ,
146
146
) ;
147
147
148
- hasActiveHidden
149
- ? this . _moreButtonElement . classList . add ( 'active-inside' )
150
- : this . _moreButtonElement . classList . remove ( 'active-inside' ) ;
148
+ if ( hasActiveHidden ) {
149
+ this . _moreButtonElement . classList . add ( 'active-inside' ) ;
150
+ } else {
151
+ this . _moreButtonElement . classList . remove ( 'active-inside' ) ;
152
+ }
151
153
}
152
154
} ;
153
155
@@ -250,9 +252,11 @@ export class UUITabGroupElement extends LitElement {
250
252
this . _moreButtonElement . style . display = '' ;
251
253
}
252
254
253
- hasActiveTabInDropdown
254
- ? this . _moreButtonElement . classList . add ( 'active-inside' )
255
- : this . _moreButtonElement . classList . remove ( 'active-inside' ) ;
255
+ if ( hasActiveTabInDropdown ) {
256
+ this . _moreButtonElement . classList . add ( 'active-inside' ) ;
257
+ } else {
258
+ this . _moreButtonElement . classList . remove ( 'active-inside' ) ;
259
+ }
256
260
257
261
this . requestUpdate ( ) ;
258
262
}
You can’t perform that action at this time.
0 commit comments