@@ -19,28 +19,22 @@ import {
19
19
import announce from "@ui5/webcomponents-base/dist/util/InvisibleMessage.js" ;
20
20
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js" ;
21
21
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js" ;
22
- import "@ui5/webcomponents-icons/dist/alert.js" ;
23
- import "@ui5/webcomponents-icons/dist/decline.js" ;
24
- import "@ui5/webcomponents-icons/dist/error.js" ;
25
- import "@ui5/webcomponents-icons/dist/information.js" ;
26
22
import "@ui5/webcomponents-icons/dist/slim-arrow-down.js" ;
23
+ import "@ui5/webcomponents-icons/dist/error.js" ;
24
+ import "@ui5/webcomponents-icons/dist/alert.js" ;
27
25
import "@ui5/webcomponents-icons/dist/sys-enter-2.js" ;
26
+ import "@ui5/webcomponents-icons/dist/information.js" ;
27
+ import { isPhone } from "@ui5/webcomponents-base/dist/Device.js" ;
28
28
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js" ;
29
29
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js" ;
30
+ import "@ui5/webcomponents-icons/dist/decline.js" ;
30
31
import type { Timeout } from "@ui5/webcomponents-base/dist/types.js" ;
31
32
import Integer from "@ui5/webcomponents-base/dist/types/Integer.js" ;
32
33
import InvisibleMessageMode from "@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js" ;
33
34
import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsScope.js" ;
34
- import { isPhone } from "@ui5/webcomponents-base/dist/Device.js" ;
35
35
import type { IFormInputElement } from "@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js" ;
36
- import Button from "./Button.js" ;
37
- import CustomListItem from "./CustomListItem.js" ;
38
- import Icon from "./Icon.js" ;
39
- import Label from "./Label.js" ;
40
- import type { ListItemClickEventDetail } from "./List.js" ;
41
36
import List from "./List.js" ;
42
- import Popover from "./Popover.js" ;
43
- import ResponsivePopover from "./ResponsivePopover.js" ;
37
+ import type { ListItemClickEventDetail } from "./List.js" ;
44
38
import {
45
39
VALUE_STATE_SUCCESS ,
46
40
VALUE_STATE_INFORMATION ,
@@ -55,16 +49,21 @@ import {
55
49
SELECT_ROLE_DESCRIPTION ,
56
50
FORM_SELECTABLE_REQUIRED ,
57
51
} from "./generated/i18n/i18n-defaults.js" ;
52
+ import Label from "./Label.js" ;
53
+ import ResponsivePopover from "./ResponsivePopover.js" ;
54
+ import Popover from "./Popover.js" ;
55
+ import Icon from "./Icon.js" ;
56
+ import Button from "./Button.js" ;
57
+ import ListItemBase from "./ListItemBase.js" ;
58
58
59
59
// Templates
60
60
import SelectTemplate from "./generated/templates/SelectTemplate.lit.js" ;
61
- import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js" ;
62
- import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js" ;
63
- import SelectPopoverCss from "./generated/themes/SelectPopover.css.js" ;
64
61
65
62
// Styles
66
63
import selectCss from "./generated/themes/Select.css.js" ;
67
- import ListItemBase from "./ListItemBase.js" ;
64
+ import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js" ;
65
+ import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js" ;
66
+ import SelectPopoverCss from "./generated/themes/SelectPopover.css.js" ;
68
67
69
68
type SelectChangeEventDetail = {
70
69
selectedOption : IOption ,
@@ -73,10 +72,17 @@ type SelectLiveChangeEventDetail = {
73
72
selectedOption : IOption ,
74
73
}
75
74
75
+ /**
76
+ * Interface for components that may be slotted inside `ui5-select` as options
77
+ * @public
78
+ */
76
79
type IOption = ListItemBase & {
77
- icon ?: string ,
78
- value ?: string ,
79
- effectiveDisplayText : string
80
+ tooltip : string ,
81
+ icon ?: string | null ,
82
+ value : string ,
83
+ additionalText ?: string ,
84
+ focused ?: boolean ,
85
+ effectiveDisplayText : string ,
80
86
}
81
87
82
88
/**
@@ -137,7 +143,6 @@ type IOption = ListItemBase & {
137
143
ResponsivePopover ,
138
144
Popover ,
139
145
List ,
140
- CustomListItem ,
141
146
Icon ,
142
147
Button ,
143
148
] ,
@@ -340,7 +345,7 @@ class Select extends UI5Element implements IFormInputElement {
340
345
const selectedOption = this . selectedOption ;
341
346
342
347
if ( selectedOption ) {
343
- return selectedOption . hasAttribute ( "value" ) ? selectedOption . value as string : selectedOption . textContent ;
348
+ return selectedOption . hasAttribute ( "value" ) ? selectedOption . value : selectedOption . textContent ;
344
349
}
345
350
346
351
return "" ;
@@ -923,6 +928,7 @@ Select.define();
923
928
924
929
export default Select ;
925
930
export type {
926
- IOption , SelectChangeEventDetail ,
931
+ IOption ,
932
+ SelectChangeEventDetail ,
927
933
SelectLiveChangeEventDetail ,
928
934
} ;
0 commit comments