@ui5/webcomponents 1.16.0-rc.2 → 1.16.0-rc.3

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.
Files changed (265) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/Avatar.d.ts +14 -0
  3. package/dist/Avatar.js +15 -8
  4. package/dist/Avatar.js.map +1 -1
  5. package/dist/CheckBox.js +2 -1
  6. package/dist/CheckBox.js.map +1 -1
  7. package/dist/Dialog.d.ts +8 -0
  8. package/dist/Dialog.js +4 -0
  9. package/dist/Dialog.js.map +1 -1
  10. package/dist/Option.d.ts +1 -0
  11. package/dist/Option.js +1 -0
  12. package/dist/Option.js.map +1 -1
  13. package/dist/Panel.d.ts +15 -0
  14. package/dist/Panel.js +6 -0
  15. package/dist/Panel.js.map +1 -1
  16. package/dist/SliderBase.d.ts +0 -1
  17. package/dist/SliderBase.js +0 -1
  18. package/dist/SliderBase.js.map +1 -1
  19. package/dist/Switch.d.ts +42 -1
  20. package/dist/Switch.js +30 -2
  21. package/dist/Switch.js.map +1 -1
  22. package/dist/TimePicker.d.ts +1 -0
  23. package/dist/TimePicker.js +3 -0
  24. package/dist/TimePicker.js.map +1 -1
  25. package/dist/Tokenizer.js +5 -2
  26. package/dist/Tokenizer.js.map +1 -1
  27. package/dist/api.json +1 -1
  28. package/dist/assets/Panel.610c9d97.css +1 -0
  29. package/dist/assets/{Switch.ab07b3d6.css → Switch.201b66b4.css} +1 -1
  30. package/dist/assets/messagebundle_en_US_sappsd.6f3c36f1.js +1 -0
  31. package/dist/assets/{messagebundle_en_US_saprigi.5ff4c5b6.js → messagebundle_en_US_saprigi.ab2f7752.js} +1 -1
  32. package/dist/assets/messagebundle_en_US_saptrc.3c5c9f29.js +1 -0
  33. package/dist/assets/{parameters-bundle.css.169ca31c.js → parameters-bundle.css.0a2d241f.js} +2 -1
  34. package/dist/assets/{parameters-bundle.css.7d4be06d.js → parameters-bundle.css.1be26543.js} +2 -1
  35. package/dist/assets/{parameters-bundle.css.32fe7583.js → parameters-bundle.css.4676486d.js} +2 -1
  36. package/dist/assets/{parameters-bundle.css.f9f9a3af.js → parameters-bundle.css.4b095b6d.js} +2 -1
  37. package/dist/assets/{parameters-bundle.css.b2aa72d6.js → parameters-bundle.css.5a95995e.js} +2 -1
  38. package/dist/assets/{parameters-bundle.css.13511e8e.js → parameters-bundle.css.73445e49.js} +2 -1
  39. package/dist/assets/{parameters-bundle.css.e43900d4.js → parameters-bundle.css.7e4f2aed.js} +3 -1
  40. package/dist/assets/{parameters-bundle.css.bf7d5006.js → parameters-bundle.css.abb6d70a.js} +3 -1
  41. package/dist/assets/{parameters-bundle.css.c33b3381.js → parameters-bundle.css.b85c34f0.js} +3 -1
  42. package/dist/assets/{parameters-bundle.css.38cb80ec.js → parameters-bundle.css.e49a247e.js} +2 -1
  43. package/dist/assets/{parameters-bundle.css.b8ce3a86.js → parameters-bundle.css.f03ff189.js} +3 -1
  44. package/dist/assets/{parameters-bundle.css.3bf8316f.js → parameters-bundle.css.f214e4a8.js} +2 -1
  45. package/dist/assets/test/pages/{ComboBox.html.33fbdae5.js → ComboBox.html.db203d6d.js} +1 -1
  46. package/dist/assets/test/pages/{Icon.html.1f4abfd7.js → Icon.html.74521bfb.js} +1 -1
  47. package/dist/assets/test/pages/{Label.html.5e12adbd.js → Label.html.90e8a7d2.js} +1 -1
  48. package/dist/assets/test/pages/{Popups.html.875a587f.js → Popups.html.ce42cc37.js} +1 -1
  49. package/dist/css/themes/Avatar.css +1 -1
  50. package/dist/css/themes/CheckBox.css +1 -1
  51. package/dist/css/themes/Panel.css +1 -1
  52. package/dist/css/themes/Switch.css +1 -1
  53. package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
  54. package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
  55. package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
  56. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  57. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  58. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  59. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  60. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  61. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  62. package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
  63. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  64. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  65. package/dist/custom-elements.json +1 -1
  66. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  67. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  68. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  69. package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
  70. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  71. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  72. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  73. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  74. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  75. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  76. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  77. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  78. package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
  79. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  80. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  81. package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
  82. package/dist/generated/i18n/i18n-defaults.js +2 -1
  83. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  84. package/dist/generated/templates/PanelTemplate.lit.js +1 -1
  85. package/dist/generated/templates/PanelTemplate.lit.js.map +1 -1
  86. package/dist/generated/templates/SwitchTemplate.lit.js +1 -1
  87. package/dist/generated/templates/SwitchTemplate.lit.js.map +1 -1
  88. package/dist/generated/themes/Avatar.css.js +1 -1
  89. package/dist/generated/themes/Avatar.css.js.map +1 -1
  90. package/dist/generated/themes/CheckBox.css.js +1 -1
  91. package/dist/generated/themes/CheckBox.css.js.map +1 -1
  92. package/dist/generated/themes/Panel.css.js +1 -1
  93. package/dist/generated/themes/Panel.css.js.map +1 -1
  94. package/dist/generated/themes/Switch.css.js +1 -1
  95. package/dist/generated/themes/Switch.css.js.map +1 -1
  96. package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
  97. package/dist/generated/themes/sap_belize/parameters-bundle.css.js.map +1 -1
  98. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  99. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js.map +1 -1
  100. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  101. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js.map +1 -1
  102. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  103. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  104. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  105. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  106. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  107. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  108. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  109. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  110. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  111. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  112. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  113. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  114. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
  115. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
  116. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  117. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  118. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  119. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  120. package/dist/i18n/messagebundle.properties +3 -0
  121. package/dist/i18n/messagebundle_en_US_sappsd.properties +2 -0
  122. package/dist/i18n/messagebundle_en_US_saprigi.properties +2 -0
  123. package/dist/i18n/messagebundle_en_US_saptrc.properties +2 -0
  124. package/dist/test/pages/72override.html +1 -1
  125. package/dist/test/pages/AnimanitionOff.html +1 -1
  126. package/dist/test/pages/Avatar.html +17 -1
  127. package/dist/test/pages/AvatarGroup.html +1 -1
  128. package/dist/test/pages/Badge.html +1 -1
  129. package/dist/test/pages/Breadcrumbs.html +1 -1
  130. package/dist/test/pages/BusyIndicator.html +1 -1
  131. package/dist/test/pages/Button.html +1 -1
  132. package/dist/test/pages/Calendar.html +1 -1
  133. package/dist/test/pages/Card.html +1 -1
  134. package/dist/test/pages/Carousel.html +1 -1
  135. package/dist/test/pages/CheckBox.html +23 -3
  136. package/dist/test/pages/ColorPalette.html +1 -1
  137. package/dist/test/pages/ColorPalettePopover.html +1 -1
  138. package/dist/test/pages/ColorPicker.html +1 -1
  139. package/dist/test/pages/ComboBox.html +2 -2
  140. package/dist/test/pages/Components.html +1 -1
  141. package/dist/test/pages/CoreControls.html +1 -1
  142. package/dist/test/pages/CoreControls_exp.html +1 -1
  143. package/dist/test/pages/CustomCSS.html +1 -1
  144. package/dist/test/pages/DatePicker.html +1 -1
  145. package/dist/test/pages/DatePicker_test_page.html +1 -1
  146. package/dist/test/pages/DateRangePicker.html +1 -1
  147. package/dist/test/pages/DateTimePicker.html +1 -1
  148. package/dist/test/pages/DateTimePicker_Timezone.html +1 -1
  149. package/dist/test/pages/DayPicker.html +1 -1
  150. package/dist/test/pages/Dialog.html +1 -1
  151. package/dist/test/pages/DialogLifecycle.html +1 -1
  152. package/dist/test/pages/DialogSemantic.html +1 -1
  153. package/dist/test/pages/Eventing.html +1 -1
  154. package/dist/test/pages/F6Test1.html +1 -1
  155. package/dist/test/pages/F6Test2.html +1 -1
  156. package/dist/test/pages/F6Test3.html +1 -1
  157. package/dist/test/pages/F6Test4.html +1 -1
  158. package/dist/test/pages/F6Test5.html +1 -1
  159. package/dist/test/pages/F6Test6.html +1 -1
  160. package/dist/test/pages/F6Test7.html +1 -1
  161. package/dist/test/pages/FileUploader.html +1 -1
  162. package/dist/test/pages/FontFace.html +1 -1
  163. package/dist/test/pages/FormComponents.html +1 -1
  164. package/dist/test/pages/FormSupport.html +1 -1
  165. package/dist/test/pages/HCB.html +1 -1
  166. package/dist/test/pages/Icon.html +2 -2
  167. package/dist/test/pages/Icon_and_theming.html +1 -1
  168. package/dist/test/pages/Icon_custom.html +1 -1
  169. package/dist/test/pages/Input.html +1 -1
  170. package/dist/test/pages/InputFieldLabels.html +1 -1
  171. package/dist/test/pages/InputFieldMinWidth.html +1 -1
  172. package/dist/test/pages/InputIcons.html +1 -1
  173. package/dist/test/pages/Input_quickview.html +1 -1
  174. package/dist/test/pages/InputsAlignment.html +1 -1
  175. package/dist/test/pages/InputsLazyLoading.html +1 -1
  176. package/dist/test/pages/ItemNavigation.html +1 -1
  177. package/dist/test/pages/Kitchen.html +1 -1
  178. package/dist/test/pages/Kitchen.openui5.html +1 -1
  179. package/dist/test/pages/Label.html +2 -2
  180. package/dist/test/pages/Link.html +1 -1
  181. package/dist/test/pages/List.html +1 -1
  182. package/dist/test/pages/ListGrowing_Button.html +1 -1
  183. package/dist/test/pages/ListGrowing_Scroll.html +1 -1
  184. package/dist/test/pages/List_keyboard_support.html +1 -1
  185. package/dist/test/pages/List_test_page.html +1 -1
  186. package/dist/test/pages/LitKeyFunction.html +1 -1
  187. package/dist/test/pages/MemoryLeak.html +1 -1
  188. package/dist/test/pages/Menu.html +1 -1
  189. package/dist/test/pages/MessagePage.html +1 -1
  190. package/dist/test/pages/MessageStrip.html +1 -1
  191. package/dist/test/pages/MultiComboBox.html +18 -1
  192. package/dist/test/pages/MultiInput.html +20 -2
  193. package/dist/test/pages/MultiInput_Suggestions.html +1 -1
  194. package/dist/test/pages/OpenUI5-second.html +1 -1
  195. package/dist/test/pages/OpenUI5.html +1 -1
  196. package/dist/test/pages/OpenUI5Nightly.html +1 -1
  197. package/dist/test/pages/Panel.html +24 -2
  198. package/dist/test/pages/Popover.html +1 -1
  199. package/dist/test/pages/PopoverArrowBounds.html +1 -1
  200. package/dist/test/pages/Popups.html +2 -2
  201. package/dist/test/pages/ProgressIndicator.html +1 -1
  202. package/dist/test/pages/RTL.html +1 -1
  203. package/dist/test/pages/RadioButton.html +1 -1
  204. package/dist/test/pages/RangeSlider.html +1 -1
  205. package/dist/test/pages/RatingIndicator.html +1 -1
  206. package/dist/test/pages/ResizeHandler.html +1 -1
  207. package/dist/test/pages/ResponsivePopover.html +1 -1
  208. package/dist/test/pages/SegmentedButton.html +1 -1
  209. package/dist/test/pages/Select.html +1 -1
  210. package/dist/test/pages/Simple.html +1 -1
  211. package/dist/test/pages/Slider.html +1 -1
  212. package/dist/test/pages/SplitButton.html +1 -1
  213. package/dist/test/pages/StepInput.html +1 -1
  214. package/dist/test/pages/Switch.html +31 -2
  215. package/dist/test/pages/TabContainer.html +1 -1
  216. package/dist/test/pages/Table-perf-pure.html +1 -1
  217. package/dist/test/pages/Table-perf.html +1 -1
  218. package/dist/test/pages/Table.html +1 -1
  219. package/dist/test/pages/Table2.html +1 -1
  220. package/dist/test/pages/TableAllPopin.html +1 -1
  221. package/dist/test/pages/TableCustomStyling.html +1 -1
  222. package/dist/test/pages/TableGrouping.html +1 -1
  223. package/dist/test/pages/TableGrowingWithButton.html +1 -1
  224. package/dist/test/pages/TableGrowingWithScroll.html +1 -1
  225. package/dist/test/pages/TableSelection.html +1 -1
  226. package/dist/test/pages/TextArea.html +1 -1
  227. package/dist/test/pages/TimePicker.html +4 -1
  228. package/dist/test/pages/TimePickerClock.html +1 -1
  229. package/dist/test/pages/TimeSelection.html +1 -1
  230. package/dist/test/pages/TimeSelectionClocks.html +1 -1
  231. package/dist/test/pages/Title.html +1 -1
  232. package/dist/test/pages/Toast.html +1 -1
  233. package/dist/test/pages/ToggleButton.html +1 -1
  234. package/dist/test/pages/Tokenizer.html +1 -1
  235. package/dist/test/pages/Tree.html +1 -1
  236. package/dist/test/pages/TreeDynamic.html +1 -1
  237. package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
  238. package/dist/test/pages/base/AriaLabelHelper.html +1 -1
  239. package/dist/test/pages/base/DOMObserver.html +1 -1
  240. package/dist/test/pages/base/IconCollection.html +1 -1
  241. package/dist/test/pages/base/IconCollectionInCustomTheme.html +1 -1
  242. package/dist/test/pages/base/IgnoreCustomElements.html +1 -1
  243. package/dist/test/pages/base/InvisibleMessage.html +1 -1
  244. package/dist/test/pages/form.html +1 -1
  245. package/dist/test/pages/i18n-defaultLang.html +1 -1
  246. package/dist/test/pages/i18n-demo.html +1 -1
  247. package/package.json +8 -8
  248. package/src/Panel.hbs +1 -1
  249. package/src/Switch.hbs +2 -0
  250. package/src/i18n/messagebundle.properties +3 -0
  251. package/src/i18n/messagebundle_en_US_sappsd.properties +2 -0
  252. package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
  253. package/src/i18n/messagebundle_en_US_saptrc.properties +2 -0
  254. package/src/themes/Avatar.css +5 -1
  255. package/src/themes/CheckBox.css +4 -2
  256. package/src/themes/Panel.css +15 -0
  257. package/src/themes/Switch.css +5 -3
  258. package/src/themes/base/Panel-parameters.css +3 -2
  259. package/src/themes/sap_horizon/Panel-parameters.css +1 -0
  260. package/src/themes/sap_horizon_dark/Panel-parameters.css +1 -0
  261. package/src/themes/sap_horizon_hcb/Panel-parameters.css +1 -0
  262. package/src/themes/sap_horizon_hcw/Panel-parameters.css +1 -0
  263. package/dist/assets/Panel.cf4a4802.css +0 -1
  264. package/dist/assets/messagebundle_en_US_sappsd.93247166.js +0 -1
  265. package/dist/assets/messagebundle_en_US_saptrc.5c02ea75.js +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.16.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.2...v1.16.0-rc.3) (2023-07-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui5-checkbox:** prevent text selection on checkbox ([#7364](https://github.com/SAP/ui5-webcomponents/issues/7364)) ([d6aeb0f](https://github.com/SAP/ui5-webcomponents/commit/d6aeb0fd6871555a1737b02fa18d996b7148751a)), closes [#7236](https://github.com/SAP/ui5-webcomponents/issues/7236)
12
+ * **ui5-checkbox:** trigger form validation when required ([#7363](https://github.com/SAP/ui5-webcomponents/issues/7363)) ([0f90a53](https://github.com/SAP/ui5-webcomponents/commit/0f90a53e2d1e353dc0a6cc66f4bc6afb3e4b86b5)), closes [#7319](https://github.com/SAP/ui5-webcomponents/issues/7319)
13
+ * **ui5-slider:** remove tag name from base class ([#7373](https://github.com/SAP/ui5-webcomponents/issues/7373)) ([7e47744](https://github.com/SAP/ui5-webcomponents/commit/7e47744806ada5be4e724abd3464f659e26c6193))
14
+ * **ui5-switch:** align text/icon properly in switch handle ([#7350](https://github.com/SAP/ui5-webcomponents/issues/7350)) ([5a7f41f](https://github.com/SAP/ui5-webcomponents/commit/5a7f41f3593563ca3ecef5b8006a7a5cef9b63de))
15
+ * **ui5-time-picker:** support relative value "now" ([#7325](https://github.com/SAP/ui5-webcomponents/issues/7325)) ([0b2ef4f](https://github.com/SAP/ui5-webcomponents/commit/0b2ef4fe623090f5034b67e5236b485da87c814a))
16
+
17
+
18
+ ### Features
19
+
20
+ * **ui5-avatar:** add disabled property ([#7335](https://github.com/SAP/ui5-webcomponents/issues/7335)) ([d84fc61](https://github.com/SAP/ui5-webcomponents/commit/d84fc61c7f41c6099c242dfdaad44cb3ebc9e1fa))
21
+ * **ui5-panel:** panel sticky header implementation ([#7313](https://github.com/SAP/ui5-webcomponents/issues/7313)) ([18c0e4f](https://github.com/SAP/ui5-webcomponents/commit/18c0e4fcbf68acb42357f4f3e2941fffb7911a5d))
22
+ * **ui5-switch:** add required property ([#7324](https://github.com/SAP/ui5-webcomponents/issues/7324)) ([0a01918](https://github.com/SAP/ui5-webcomponents/commit/0a019187bfeb52c4a2eacb5385d069034c68d34c))
23
+ * **ui5-tokenizer:** change indicator's text when there are no visible tokens ([#7327](https://github.com/SAP/ui5-webcomponents/issues/7327)) ([27f690e](https://github.com/SAP/ui5-webcomponents/commit/27f690ec159c631c4b58023ed0c1cfd080439fb1))
24
+
25
+
26
+
27
+
28
+
6
29
  # [1.16.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.1...v1.16.0-rc.2) (2023-07-20)
7
30
 
8
31
 
package/dist/Avatar.d.ts CHANGED
@@ -40,8 +40,21 @@ import "@ui5/webcomponents-icons/dist/employee.js";
40
40
  * @public
41
41
  */
42
42
  declare class Avatar extends UI5Element implements ITabbable {
43
+ /**
44
+ * Defines whether the component is disabled.
45
+ * A disabled component can't be pressed or
46
+ * focused, and it is not in the tab chain.
47
+ *
48
+ * @type {boolean}
49
+ * @name sap.ui.webc.main.Avatar.prototype.disabled
50
+ * @defaultvalue false
51
+ * @public
52
+ */
53
+ disabled: boolean;
43
54
  /**
44
55
  * Defines if the avatar is interactive (focusable and pressable).
56
+ * <b>Note:</b> This property won't have effect if the <code>disabled</code>
57
+ * property is set to <code>true</code>.
45
58
  * @type {boolean}
46
59
  * @name sap.ui.webc.main.Avatar.prototype.interactive
47
60
  * @defaultValue false
@@ -235,6 +248,7 @@ declare class Avatar extends UI5Element implements ITabbable {
235
248
  get _effectiveBackgroundColor(): string;
236
249
  get _role(): "button" | undefined;
237
250
  get _ariaHasPopup(): string | undefined;
251
+ get _interactive(): boolean;
238
252
  get validInitials(): string | null;
239
253
  get accessibleNameText(): string | undefined;
240
254
  get hasImage(): boolean;
package/dist/Avatar.js CHANGED
@@ -68,7 +68,7 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
68
68
  Avatar_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
69
69
  }
70
70
  get tabindex() {
71
- return this._tabIndex || (this.interactive ? "0" : "-1");
71
+ return this._tabIndex || (this._interactive ? "0" : "-1");
72
72
  }
73
73
  /**
74
74
  * Returns the effective avatar size.
@@ -93,11 +93,14 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
93
93
  return this.getAttribute("color-scheme") || this._colorScheme;
94
94
  }
95
95
  get _role() {
96
- return this.interactive ? "button" : undefined;
96
+ return this._interactive ? "button" : undefined;
97
97
  }
98
98
  get _ariaHasPopup() {
99
99
  return this._getAriaHasPopup();
100
100
  }
101
+ get _interactive() {
102
+ return this.interactive && !this.disabled;
103
+ }
101
104
  get validInitials() {
102
105
  // initials should consist of only 1,2 or 3 latin letters
103
106
  const validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/, areInitialsValid = this.initials && validInitials.test(this.initials);
@@ -120,7 +123,7 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
120
123
  return this.getDomRef().querySelector(".ui5-avatar-initials");
121
124
  }
122
125
  onBeforeRendering() {
123
- this._onclick = this.interactive ? this._onClickHandler.bind(this) : undefined;
126
+ this._onclick = this._interactive ? this._onClickHandler.bind(this) : undefined;
124
127
  }
125
128
  async onAfterRendering() {
126
129
  await renderFinished();
@@ -160,7 +163,7 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
160
163
  this.fireEvent("click");
161
164
  }
162
165
  _onkeydown(e) {
163
- if (!this.interactive) {
166
+ if (!this._interactive) {
164
167
  return;
165
168
  }
166
169
  if (isEnter(e)) {
@@ -171,7 +174,7 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
171
174
  }
172
175
  }
173
176
  _onkeyup(e) {
174
- if (this.interactive && !e.shiftKey && isSpace(e)) {
177
+ if (this._interactive && !e.shiftKey && isSpace(e)) {
175
178
  this.fireEvent("click");
176
179
  }
177
180
  }
@@ -179,17 +182,20 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
179
182
  this.focused = false;
180
183
  }
181
184
  _onfocusin() {
182
- if (this.interactive) {
185
+ if (this._interactive) {
183
186
  this.focused = true;
184
187
  }
185
188
  }
186
189
  _getAriaHasPopup() {
187
- if (!this.interactive || this.ariaHaspopup === "") {
190
+ if (!this._interactive || this.ariaHaspopup === "") {
188
191
  return;
189
192
  }
190
193
  return this.ariaHaspopup;
191
194
  }
192
195
  };
196
+ __decorate([
197
+ property({ type: Boolean })
198
+ ], Avatar.prototype, "disabled", void 0);
193
199
  __decorate([
194
200
  property({ type: Boolean })
195
201
  ], Avatar.prototype, "interactive", void 0);
@@ -246,7 +252,8 @@ Avatar = Avatar_1 = __decorate([
246
252
  })
247
253
  /**
248
254
  * Fired on mouseup, space and enter if avatar is interactive
249
- *
255
+ * <b>Note:</b> The event will not be fired if the <code>disabled</code>
256
+ * property is set to <code>true</code>.
250
257
  * @event
251
258
  * @private
252
259
  * @since 1.0.0-rc.11
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iD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C,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;oCACpC;AAMvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;qCACxC;AAyBnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC;2CAC1C;AAMrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC;4CAC9C;AAajC;IADC,QAAQ,EAAE;8CACa;AAUxB;IADC,QAAQ,EAAE;4CACW;AAGtB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;yCACb;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AAmBpB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qCAClB;AA6B3B;IADC,IAAI,EAAE;qCACoB;AAxMtB,MAAM;IAhBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACF;;;;;;MAME;;IACD,KAAK,CAAC,OAAO,CAAC;GACT,MAAM,CA+WX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\n// Template\nimport AvatarTemplate from \"./generated/templates/AvatarTemplate.lit.js\";\n\nimport { AVATAR_TOOLTIP } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarCss from \"./generated/themes/Avatar.css.js\";\n\nimport Icon from \"./Icon.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport AvatarShape from \"./types/AvatarShape.js\";\nimport AvatarColorScheme from \"./types/AvatarColorScheme.js\";\n\n// Icon\nimport \"@ui5/webcomponents-icons/dist/employee.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * An image-like component that has different display options for representing images and icons\n * in different shapes and sizes, depending on the use case.\n *\n * The shape can be circular or square. There are several predefined sizes, as well as an option to\n * set a custom size.\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * <ul>\n * <li>[SPACE, ENTER, RETURN] - Fires the <code>click</code> event if the <code>interactive</code> property is set to true.</li>\n * <li>[SHIFT] - If [SPACE] is pressed, pressing [SHIFT] releases the component without triggering the click event.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Avatar.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Avatar\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-avatar\n * @since 1.0.0-rc.6\n * @implements sap.ui.webc.main.IAvatar\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\tstyles: AvatarCss,\n\ttemplate: AvatarTemplate,\n\tdependencies: [Icon],\n})\n/**\n* Fired on mouseup, space and enter if avatar is interactive\n*\n* @event\n* @private\n* @since 1.0.0-rc.11\n*/\n@event(\"click\")\nclass Avatar extends UI5Element implements ITabbable {\n\t/**\n\t * Defines if the avatar is interactive (focusable and pressable).\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Avatar.prototype.interactive\n\t * @defaultValue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Indicates if the elements is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t * Defines the name of the UI5 Icon, that will be displayed.\n\t * <br>\n\t * <b>Note:</b> If <code>image</code> slot is provided, the property will be ignored.\n\t * <br>\n\t * <b>Note:</b> You should import the desired icon first, then use its name as \"icon\".\n\t * <br><br>\n\t * import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"\n\t * <br>\n\t * <pre>&lt;ui5-avatar icon=\"employee\"></pre>\n\t * <br>\n\t * <b>Note:</b> If no icon or an empty one is provided, by default the \"employee\" icon should be displayed.\n\t *\n\t * See all the available icons in the <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.icon\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ticon!: string;\n\n\t/**\n\t * Defines the displayed initials.\n\t * <br>\n\t * Up to three Latin letters can be displayed as initials.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.initials\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tinitials!: string;\n\n\t/**\n\t * Defines the shape of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Circle</code></li>\n\t * <li><code>Square</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarShape}\n\t * @name sap.ui.webc.main.Avatar.prototype.shape\n\t * @defaultvalue \"Circle\"\n\t * @public\n\t */\n\t@property({ type: AvatarShape, defaultValue: AvatarShape.Circle })\n\tshape!: `${AvatarShape}`;\n\n\t/**\n\t * Defines predefined size of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>XS</code></li>\n\t * <li><code>S</code></li>\n\t * <li><code>M</code></li>\n\t * <li><code>L</code></li>\n\t * <li><code>XL</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarSize}\n\t * @name sap.ui.webc.main.Avatar.prototype.size\n\t * @defaultvalue \"S\"\n\t * @public\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\tsize!: `${AvatarSize}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\t_size!: AvatarSize;\n\n\t/**\n\t * Defines the background color of the desired image.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Accent1</code></li>\n\t * <li><code>Accent2</code></li>\n\t * <li><code>Accent3</code></li>\n\t * <li><code>Accent4</code></li>\n\t * <li><code>Accent5</code></li>\n\t * <li><code>Accent6</code></li>\n\t * <li><code>Accent7</code></li>\n\t * <li><code>Accent8</code></li>\n\t * <li><code>Accent9</code></li>\n\t * <li><code>Accent10</code></li>\n\t * <li><code>Placeholder</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarColorScheme}\n\t * @name sap.ui.webc.main.Avatar.prototype.colorScheme\n\t * @defaultvalue \"Accent6\"\n\t * @public\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\tcolorScheme!: `${AvatarColorScheme}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\t_colorScheme!: AvatarColorScheme;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.7\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines the aria-haspopup value of the component when <code>interactive</code> property is <code>true</code>.\n\t * <br><br>\n\t * @type String\n\t * @since 1.0.0-rc.15\n\t * @protected\n\t */\n\t@property()\n\tariaHaspopup!: string;\n\n\t@property({ noAttribute: true })\n\t_tabIndex!: string;\n\n\t@property({ type: Boolean })\n\t_hasImage!: boolean;\n\n\t/**\n\t * Receives the desired <code>&lt;img&gt;</code> tag\n\t *\n\t * <b>Note:</b> If you experience flickering of the provided image, you can hide the component until it is being defined with the following CSS:\n\t * <br /> <br />\n\t * <code>\n\t *\t\tui5-avatar:not(:defined) { <br />\n\t *\t\t\t&nbsp;visibility: hidden; <br />\n\t *\t\t} <br />\n\t * </code>\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.default\n\t * @slot image\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\timage!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the optional badge that will be used for visual affordance.\n\t * <b>Note:</b> While the slot allows for custom badges, to achieve\n\t * the Fiori design, please use <code>ui5-badge</code> with <code>ui5-icon</code>\n\t * in the corresponding <code>icon</code> slot, without text nodes.\n\t * <br><br>\n\t * Example:\n\t * <br><br>\n\t * &lt;ui5-avatar><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-badge slot=\"badge\"><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-icon slot=\"icon\" name=\"employee\">&lt;/ui5-icon><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/ui5-badge><br>\n\t * &lt;/ui5-avatar>\n\t * <br><br>\n\t * <ui5-avatar initials=\"AB\" color-scheme=\"Accent1\">\n\t * <ui5-badge slot=\"badge\">\n\t * <ui5-icon slot=\"icon\" name=\"accelerated\"></ui5-icon>\n\t * </ui5-badge>\n\t * </ui5-avatar>\n\t *\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.badge\n\t * @slot badge\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@slot()\n\tbadge!: Array<HTMLElement>;\n\n\t_onclick?: (e: MouseEvent) => void;\n\tstatic i18nBundle: I18nBundle;\n\t_handleResizeBound: ResizeObserverCallback;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t}\n\n\tstatic async onDefine() {\n\t\tAvatar.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tget tabindex() {\n\t\treturn this._tabIndex || (this.interactive ? \"0\" : \"-1\");\n\t}\n\n\t/**\n\t * Returns the effective avatar size.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"S\"\n\t * @private\n\t */\n\tget _effectiveSize(): AvatarSize {\n\t\t// we read the attribute, because the \"size\" property will always have a default value\n\t\treturn this.getAttribute(\"size\") as AvatarSize || this._size;\n\t}\n\n\t/**\n\t * Returns the effective background color.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"Accent6\"\n\t * @private\n\t */\n\tget _effectiveBackgroundColor() {\n\t\t// we read the attribute, because the \"background-color\" property will always have a default value\n\t\treturn this.getAttribute(\"color-scheme\") || this._colorScheme;\n\t}\n\n\tget _role() {\n\t\treturn this.interactive ? \"button\" : undefined;\n\t}\n\n\tget _ariaHasPopup() {\n\t\treturn this._getAriaHasPopup();\n\t}\n\n\tget validInitials() {\n\t\t// initials should consist of only 1,2 or 3 latin letters\n\t\tconst validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/,\n\t\t\tareInitialsValid = this.initials && validInitials.test(this.initials);\n\n\t\tif (areInitialsValid) {\n\t\t\treturn this.initials;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget accessibleNameText() {\n\t\tif (this.accessibleName) {\n\t\t\treturn this.accessibleName;\n\t\t}\n\n\t\treturn Avatar.i18nBundle.getText(AVATAR_TOOLTIP) || undefined;\n\t}\n\n\tget hasImage() {\n\t\tthis._hasImage = !!this.image.length;\n\t\treturn this._hasImage;\n\t}\n\n\tget initialsContainer(): HTMLObjectElement | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-initials\");\n\t }\n\n\tonBeforeRendering() {\n\t\tthis._onclick = this.interactive ? this._onClickHandler.bind(this) : undefined;\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.initialsContainer && ResizeHandler.register(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tthis.initialsContainer && ResizeHandler.deregister(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\thandleResize() {\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\t_checkInitials() {\n\t\tconst avatar = this.getDomRef()!,\n\t\t\tavatarInitials = avatar.querySelector(\".ui5-avatar-initials\");\n\t\t// if there aren`t initalts set - the fallBack icon should be shown\n\t\tif (!this.validInitials) {\n\t\t\tavatarInitials!.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\treturn;\n\t\t}\n\t\t// if initials` width is bigger than the avatar, an icon should be shown inside the avatar\n\t\tavatarInitials && avatarInitials.classList.remove(\"ui5-avatar-initials-hidden\");\n\t\tif (this.initials && this.initials.length === 3) {\n\t\t\tif (avatarInitials && avatarInitials.scrollWidth > avatar.scrollWidth) {\n\t\t\t\tavatarInitials.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\t}\n\t\t}\n\t}\n\n\t_onClickHandler(e: MouseEvent) {\n\t\t// prevent the native event and fire custom event to ensure the noConfict \"ui5-click\" is fired\n\t\te.stopPropagation();\n\t\tthis.fireEvent(\"click\");\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (!this.interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.interactive && !e.shiftKey && isSpace(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t_onfocusin() {\n\t\tif (this.interactive) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_getAriaHasPopup() {\n\t\tif (!this.interactive || this.ariaHaspopup === \"\") {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.ariaHaspopup;\n\t}\n}\n\nAvatar.define();\n\nexport default Avatar;\n"]}
1
+ {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAG3E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EAAE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AAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;oCACpC;AAMvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;qCACxC;AAyBnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC;2CAC1C;AAMrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC;4CAC9C;AAajC;IADC,QAAQ,EAAE;8CACa;AAUxB;IADC,QAAQ,EAAE;4CACW;AAGtB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;yCACb;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AAmBpB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qCAClB;AA6B3B;IADC,IAAI,EAAE;qCACoB;AAvNtB,MAAM;IAjBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACF;;;;;;;MAOE;;IACD,KAAK,CAAC,OAAO,CAAC;GACT,MAAM,CAkYX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\n// Template\nimport AvatarTemplate from \"./generated/templates/AvatarTemplate.lit.js\";\n\nimport { AVATAR_TOOLTIP } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarCss from \"./generated/themes/Avatar.css.js\";\n\nimport Icon from \"./Icon.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport AvatarShape from \"./types/AvatarShape.js\";\nimport AvatarColorScheme from \"./types/AvatarColorScheme.js\";\n\n// Icon\nimport \"@ui5/webcomponents-icons/dist/employee.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * An image-like component that has different display options for representing images and icons\n * in different shapes and sizes, depending on the use case.\n *\n * The shape can be circular or square. There are several predefined sizes, as well as an option to\n * set a custom size.\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * <ul>\n * <li>[SPACE, ENTER, RETURN] - Fires the <code>click</code> event if the <code>interactive</code> property is set to true.</li>\n * <li>[SHIFT] - If [SPACE] is pressed, pressing [SHIFT] releases the component without triggering the click event.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Avatar.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Avatar\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-avatar\n * @since 1.0.0-rc.6\n * @implements sap.ui.webc.main.IAvatar\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\tstyles: AvatarCss,\n\ttemplate: AvatarTemplate,\n\tdependencies: [Icon],\n})\n/**\n* Fired on mouseup, space and enter if avatar is interactive\n* <b>Note:</b> The event will not be fired if the <code>disabled</code>\n* property is set to <code>true</code>.\n* @event\n* @private\n* @since 1.0.0-rc.11\n*/\n@event(\"click\")\nclass Avatar extends UI5Element implements ITabbable {\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Avatar.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines if the avatar is interactive (focusable and pressable).\n\t * <b>Note:</b> This property won't have effect if the <code>disabled</code>\n\t * property is set to <code>true</code>.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Avatar.prototype.interactive\n\t * @defaultValue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Indicates if the elements is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t * Defines the name of the UI5 Icon, that will be displayed.\n\t * <br>\n\t * <b>Note:</b> If <code>image</code> slot is provided, the property will be ignored.\n\t * <br>\n\t * <b>Note:</b> You should import the desired icon first, then use its name as \"icon\".\n\t * <br><br>\n\t * import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"\n\t * <br>\n\t * <pre>&lt;ui5-avatar icon=\"employee\"></pre>\n\t * <br>\n\t * <b>Note:</b> If no icon or an empty one is provided, by default the \"employee\" icon should be displayed.\n\t *\n\t * See all the available icons in the <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.icon\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ticon!: string;\n\n\t/**\n\t * Defines the displayed initials.\n\t * <br>\n\t * Up to three Latin letters can be displayed as initials.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.initials\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tinitials!: string;\n\n\t/**\n\t * Defines the shape of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Circle</code></li>\n\t * <li><code>Square</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarShape}\n\t * @name sap.ui.webc.main.Avatar.prototype.shape\n\t * @defaultvalue \"Circle\"\n\t * @public\n\t */\n\t@property({ type: AvatarShape, defaultValue: AvatarShape.Circle })\n\tshape!: `${AvatarShape}`;\n\n\t/**\n\t * Defines predefined size of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>XS</code></li>\n\t * <li><code>S</code></li>\n\t * <li><code>M</code></li>\n\t * <li><code>L</code></li>\n\t * <li><code>XL</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarSize}\n\t * @name sap.ui.webc.main.Avatar.prototype.size\n\t * @defaultvalue \"S\"\n\t * @public\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\tsize!: `${AvatarSize}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\t_size!: AvatarSize;\n\n\t/**\n\t * Defines the background color of the desired image.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Accent1</code></li>\n\t * <li><code>Accent2</code></li>\n\t * <li><code>Accent3</code></li>\n\t * <li><code>Accent4</code></li>\n\t * <li><code>Accent5</code></li>\n\t * <li><code>Accent6</code></li>\n\t * <li><code>Accent7</code></li>\n\t * <li><code>Accent8</code></li>\n\t * <li><code>Accent9</code></li>\n\t * <li><code>Accent10</code></li>\n\t * <li><code>Placeholder</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarColorScheme}\n\t * @name sap.ui.webc.main.Avatar.prototype.colorScheme\n\t * @defaultvalue \"Accent6\"\n\t * @public\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\tcolorScheme!: `${AvatarColorScheme}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\t_colorScheme!: AvatarColorScheme;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.7\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines the aria-haspopup value of the component when <code>interactive</code> property is <code>true</code>.\n\t * <br><br>\n\t * @type String\n\t * @since 1.0.0-rc.15\n\t * @protected\n\t */\n\t@property()\n\tariaHaspopup!: string;\n\n\t@property({ noAttribute: true })\n\t_tabIndex!: string;\n\n\t@property({ type: Boolean })\n\t_hasImage!: boolean;\n\n\t/**\n\t * Receives the desired <code>&lt;img&gt;</code> tag\n\t *\n\t * <b>Note:</b> If you experience flickering of the provided image, you can hide the component until it is being defined with the following CSS:\n\t * <br /> <br />\n\t * <code>\n\t *\t\tui5-avatar:not(:defined) { <br />\n\t *\t\t\t&nbsp;visibility: hidden; <br />\n\t *\t\t} <br />\n\t * </code>\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.default\n\t * @slot image\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\timage!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the optional badge that will be used for visual affordance.\n\t * <b>Note:</b> While the slot allows for custom badges, to achieve\n\t * the Fiori design, please use <code>ui5-badge</code> with <code>ui5-icon</code>\n\t * in the corresponding <code>icon</code> slot, without text nodes.\n\t * <br><br>\n\t * Example:\n\t * <br><br>\n\t * &lt;ui5-avatar><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-badge slot=\"badge\"><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-icon slot=\"icon\" name=\"employee\">&lt;/ui5-icon><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/ui5-badge><br>\n\t * &lt;/ui5-avatar>\n\t * <br><br>\n\t * <ui5-avatar initials=\"AB\" color-scheme=\"Accent1\">\n\t * <ui5-badge slot=\"badge\">\n\t * <ui5-icon slot=\"icon\" name=\"accelerated\"></ui5-icon>\n\t * </ui5-badge>\n\t * </ui5-avatar>\n\t *\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.badge\n\t * @slot badge\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@slot()\n\tbadge!: Array<HTMLElement>;\n\n\t_onclick?: (e: MouseEvent) => void;\n\tstatic i18nBundle: I18nBundle;\n\t_handleResizeBound: ResizeObserverCallback;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t}\n\n\tstatic async onDefine() {\n\t\tAvatar.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tget tabindex() {\n\t\treturn this._tabIndex || (this._interactive ? \"0\" : \"-1\");\n\t}\n\n\t/**\n\t * Returns the effective avatar size.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"S\"\n\t * @private\n\t */\n\tget _effectiveSize(): AvatarSize {\n\t\t// we read the attribute, because the \"size\" property will always have a default value\n\t\treturn this.getAttribute(\"size\") as AvatarSize || this._size;\n\t}\n\n\t/**\n\t * Returns the effective background color.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"Accent6\"\n\t * @private\n\t */\n\tget _effectiveBackgroundColor() {\n\t\t// we read the attribute, because the \"background-color\" property will always have a default value\n\t\treturn this.getAttribute(\"color-scheme\") || this._colorScheme;\n\t}\n\n\tget _role() {\n\t\treturn this._interactive ? \"button\" : undefined;\n\t}\n\n\tget _ariaHasPopup() {\n\t\treturn this._getAriaHasPopup();\n\t}\n\n\tget _interactive() {\n\t\treturn this.interactive && !this.disabled;\n\t}\n\n\tget validInitials() {\n\t\t// initials should consist of only 1,2 or 3 latin letters\n\t\tconst validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/,\n\t\t\tareInitialsValid = this.initials && validInitials.test(this.initials);\n\n\t\tif (areInitialsValid) {\n\t\t\treturn this.initials;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget accessibleNameText() {\n\t\tif (this.accessibleName) {\n\t\t\treturn this.accessibleName;\n\t\t}\n\n\t\treturn Avatar.i18nBundle.getText(AVATAR_TOOLTIP) || undefined;\n\t}\n\n\tget hasImage() {\n\t\tthis._hasImage = !!this.image.length;\n\t\treturn this._hasImage;\n\t}\n\n\tget initialsContainer(): HTMLObjectElement | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-initials\");\n\t }\n\n\tonBeforeRendering() {\n\t\tthis._onclick = this._interactive ? this._onClickHandler.bind(this) : undefined;\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.initialsContainer && ResizeHandler.register(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tthis.initialsContainer && ResizeHandler.deregister(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\thandleResize() {\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\t_checkInitials() {\n\t\tconst avatar = this.getDomRef()!,\n\t\t\tavatarInitials = avatar.querySelector(\".ui5-avatar-initials\");\n\t\t// if there aren`t initalts set - the fallBack icon should be shown\n\t\tif (!this.validInitials) {\n\t\t\tavatarInitials!.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\treturn;\n\t\t}\n\t\t// if initials` width is bigger than the avatar, an icon should be shown inside the avatar\n\t\tavatarInitials && avatarInitials.classList.remove(\"ui5-avatar-initials-hidden\");\n\t\tif (this.initials && this.initials.length === 3) {\n\t\t\tif (avatarInitials && avatarInitials.scrollWidth > avatar.scrollWidth) {\n\t\t\t\tavatarInitials.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\t}\n\t\t}\n\t}\n\n\t_onClickHandler(e: MouseEvent) {\n\t\t// prevent the native event and fire custom event to ensure the noConfict \"ui5-click\" is fired\n\t\te.stopPropagation();\n\t\tthis.fireEvent(\"click\");\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (!this._interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._interactive && !e.shiftKey && isSpace(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t_onfocusin() {\n\t\tif (this._interactive) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_getAriaHasPopup() {\n\t\tif (!this._interactive || this.ariaHaspopup === \"\") {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.ariaHaspopup;\n\t}\n}\n\nAvatar.define();\n\nexport default Avatar;\n"]}
package/dist/CheckBox.js CHANGED
@@ -104,7 +104,8 @@ let CheckBox = CheckBox_1 = class CheckBox extends UI5Element {
104
104
  const formSupport = getFeature("FormSupport");
105
105
  if (formSupport) {
106
106
  formSupport.syncNativeHiddenInput(this, (element, nativeInput) => {
107
- nativeInput.disabled = element.disabled || !element.checked;
107
+ nativeInput.disabled = !!element.disabled;
108
+ nativeInput.checked = !!element.checked;
108
109
  nativeInput.value = element.checked ? "on" : "";
109
110
  });
110
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../src/CheckBox.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,yCAAyC,CAAC;AACjD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACnB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAI7D,WAAW;AACX,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAE7E,IAAI,uBAAuB,GAAG,KAAK,CAAC;AACpC,IAAI,QAAkB,CAAC;AAEvB;;;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,OAAO,EAAE,CAAC;0CACT;AAqBnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACJ;AAiBxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAWlB;IADC,QAAQ,EAAE;sCACG;AAsBd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;4CACjC;AAiB7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;8CACjC;AAoBjC;IADC,QAAQ,EAAE;sCACG;AAOd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACX;AAUjB;IADC,IAAI,EAAE;6CAC0B;AA1L5B,QAAQ;IAnBb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,KAAK;YACL,IAAI;SACJ;KACD,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,QAAQ,CAsWb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport Icon from \"./Icon.js\";\nimport Label from \"./Label.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport checkboxCss from \"./generated/themes/CheckBox.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\n\n// Template\nimport CheckBoxTemplate from \"./generated/templates/CheckBoxTemplate.lit.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeCb: CheckBox;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * Allows the user to set a binary value, such as true/false or yes/no for an item.\n * <br><br>\n * The <code>ui5-checkbox</code> component consists of a box and a label that describes its purpose.\n * If it's checked, an indicator is displayed inside the box.\n * To check/uncheck the <code>ui5-checkbox</code>, the user has to click or tap the square\n * box or its label.\n * <br><br>\n * The <code>ui5-checkbox</code> component only has 2 states - checked and unchecked.\n * Clicking or tapping toggles the <code>ui5-checkbox</code> between checked and unchecked state.\n *\n * <h3>Usage</h3>\n *\n * You can define the checkbox text with via the <code>text</code> property. If the text exceeds the available width, it is truncated by default.\n * In case you prefer text to wrap, set the <code>wrappingType</code> property to \"Normal\".\n * The touchable area for toggling the <code>ui5-checkbox</code> ends where the text ends.\n * <br><br>\n * You can disable the <code>ui5-checkbox</code> by setting the <code>disabled</code> property to\n * <code>true</code>,\n * or use the <code>ui5-checkbox</code> in read-only mode by setting the <code>readonly</code>\n * property to <code>true</code>.\n *\n * <br><br>\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-checkbox</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>root - Used to style the outermost wrapper of the <code>ui5-checkbox</code></li>\n * </ul>\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.\n * <ul>\n * <li>[SPACE, ENTER] - Toggles between different states: checked, not checked.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CheckBox\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.CheckBox\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-checkbox\n * @public\n */\n@customElement({\n\ttag: \"ui5-checkbox\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CheckBoxTemplate,\n\tstyles: checkboxCss,\n\tdependencies: [\n\t\tLabel,\n\t\tIcon,\n\t],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @event sap.ui.webc.main.CheckBox#change\n */\n@event(\"change\")\n\nclass CheckBox extends UI5Element implements IFormElement {\n\t/**\n\t * Receives id(or many ids) of the elements that label the component\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleNameRef\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @public\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is completely noninteractive.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t * <br><br>\n\t * <b>Note:</b> A read-only component is not editable,\n\t * but still provides visual feedback upon user interaction.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.readonly\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.required\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t* Defines whether the component is displayed as partially checked.\n\t* <br><br>\n\t* <b>Note:</b> The indeterminate state can be set only programmatically and can’t be achieved by user\n\t* interaction and the resulting visual state depends on the values of the <code>indeterminate</code>\n\t* and <code>checked</code> properties:\n\t* <ul>\n\t* <li> If the component is checked and indeterminate, it will be displayed as partially checked\n\t* <li> If the component is checked and it is not indeterminate, it will be displayed as checked\n\t* <li> If the component is not checked, it will be displayed as not checked regardless value of the indeterminate attribute\n\t* </ul>\n\t*\n\t* @type {boolean}\n\t* @name sap.ui.webc.main.CheckBox.prototype.indeterminate\n\t* @defaultvalue false\n\t* @public\n\t* @since 1.0.0-rc.15\n\t*/\n\t@property({ type: Boolean })\n\tindeterminate!: boolean;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking/tapping on the component, or by\n\t * pressing the Enter or Space key.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.checked\n\t * @defaultvalue false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.text\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttext!: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * <br><br>\n\t * <b>Note:</b>\n\t *\n\t * <ul>\n\t * <li><code>Warning</code></li>\n\t * <li><code>Error</code></li>\n\t * <li><code>None</code>(default)</li>\n\t * <li><code>Success</code></li>\n\t * <li><code>Information</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.CheckBox.prototype.valueState\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>None</code> - The text will be truncated with an ellipsis.</li>\n\t * <li><code>Normal</code> - The text will wrap. The words will not be broken based on hyphenation.</li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.WrappingType}\n\t * @name sap.ui.webc.main.CheckBox.prototype.wrappingType\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: WrappingType, defaultValue: WrappingType.None })\n\twrappingType!: `${WrappingType}`;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.name\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @private\n\t */\n\t@slot()\n\tformSupport!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\t_deactivate: () => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeCb) {\n\t\t\t\tactiveCb.active = false;\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._enableFormSupport();\n\t}\n\n\t_enableFormSupport() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport) {\n\t\t\tformSupport.syncNativeHiddenInput(this, (element: IFormElement, nativeInput: HTMLInputElement) => {\n\t\t\t\tnativeInput.disabled = element.disabled || !element.checked;\n\t\t\t\tnativeInput.value = element.checked ? \"on\" : \"\";\n\t\t\t});\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onmousedown() {\n\t\tif (this.readonly || this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = true;\n\t\tactiveCb = this; // eslint-disable-line\n\t}\n\n\t_onmouseup() {\n\t\tthis.active = false;\n\t}\n\n\t_onfocusout() {\n\t\tthis.active = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.active = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.toggle();\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.toggle();\n\t\t}\n\n\t\tthis.active = false;\n\t}\n\n\ttoggle() {\n\t\tif (this.canToggle()) {\n\t\t\tconst lastState = {\n\t\t\t\tchecked: this.checked,\n\t\t\t\tindeterminate: this.indeterminate,\n\t\t\t};\n\t\t\tif (this.indeterminate) {\n\t\t\t\tthis.indeterminate = false;\n\t\t\t\tthis.checked = true;\n\t\t\t} else {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding\n\t\t\tconst valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChagnePrevented) {\n\t\t\t\tthis.checked = lastState.checked;\n\t\t\t\tthis.indeterminate = lastState.indeterminate;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly);\n\t}\n\n\tvalueStateTextMappings() {\n\t\treturn {\n\t\t\t\"Error\": CheckBox.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Warning\": CheckBox.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t\t\"Success\": CheckBox.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t};\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-checkbox--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t},\n\t\t};\n\t}\n\n\tget ariaReadonly() {\n\t\treturn this.readonly ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaChecked() {\n\t\treturn this.indeterminate && this.checked ? \"mixed\" : this.checked;\n\t}\n\n\tget ariaLabelledBy() {\n\t\tif (!this.ariaLabelText) {\n\t\t\treturn this.text ? `${this._id}-label` : undefined;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn this.hasValueState ? `${this._id}-descr` : undefined;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget valueStateText() {\n\t\tif (this.valueState !== ValueState.None && this.valueState !== ValueState.Information) {\n\t\t\treturn this.valueStateTextMappings()[this.valueState];\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\t\treturn this.disabled ? undefined : tabindex || \"0\";\n\t}\n\n\tget isCompletelyChecked() {\n\t\treturn this.checked && !this.indeterminate;\n\t}\n\n\tstatic async onDefine() {\n\t\tCheckBox.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCheckBox.define();\n\nexport default CheckBox;\n"]}
1
+ {"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../src/CheckBox.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,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,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,KAAK;YACL,IAAI;SACJ;KACD,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,QAAQ,CAuWb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport Icon from \"./Icon.js\";\nimport Label from \"./Label.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport checkboxCss from \"./generated/themes/CheckBox.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\n\n// Template\nimport CheckBoxTemplate from \"./generated/templates/CheckBoxTemplate.lit.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeCb: CheckBox;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * Allows the user to set a binary value, such as true/false or yes/no for an item.\n * <br><br>\n * The <code>ui5-checkbox</code> component consists of a box and a label that describes its purpose.\n * If it's checked, an indicator is displayed inside the box.\n * To check/uncheck the <code>ui5-checkbox</code>, the user has to click or tap the square\n * box or its label.\n * <br><br>\n * The <code>ui5-checkbox</code> component only has 2 states - checked and unchecked.\n * Clicking or tapping toggles the <code>ui5-checkbox</code> between checked and unchecked state.\n *\n * <h3>Usage</h3>\n *\n * You can define the checkbox text with via the <code>text</code> property. If the text exceeds the available width, it is truncated by default.\n * In case you prefer text to wrap, set the <code>wrappingType</code> property to \"Normal\".\n * The touchable area for toggling the <code>ui5-checkbox</code> ends where the text ends.\n * <br><br>\n * You can disable the <code>ui5-checkbox</code> by setting the <code>disabled</code> property to\n * <code>true</code>,\n * or use the <code>ui5-checkbox</code> in read-only mode by setting the <code>readonly</code>\n * property to <code>true</code>.\n *\n * <br><br>\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-checkbox</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>root - Used to style the outermost wrapper of the <code>ui5-checkbox</code></li>\n * </ul>\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.\n * <ul>\n * <li>[SPACE, ENTER] - Toggles between different states: checked, not checked.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CheckBox\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.CheckBox\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-checkbox\n * @public\n */\n@customElement({\n\ttag: \"ui5-checkbox\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CheckBoxTemplate,\n\tstyles: checkboxCss,\n\tdependencies: [\n\t\tLabel,\n\t\tIcon,\n\t],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @event sap.ui.webc.main.CheckBox#change\n */\n@event(\"change\")\n\nclass CheckBox extends UI5Element implements IFormElement {\n\t/**\n\t * Receives id(or many ids) of the elements that label the component\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleNameRef\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @public\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is completely noninteractive.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t * <br><br>\n\t * <b>Note:</b> A read-only component is not editable,\n\t * but still provides visual feedback upon user interaction.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.readonly\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.required\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t* Defines whether the component is displayed as partially checked.\n\t* <br><br>\n\t* <b>Note:</b> The indeterminate state can be set only programmatically and can’t be achieved by user\n\t* interaction and the resulting visual state depends on the values of the <code>indeterminate</code>\n\t* and <code>checked</code> properties:\n\t* <ul>\n\t* <li> If the component is checked and indeterminate, it will be displayed as partially checked\n\t* <li> If the component is checked and it is not indeterminate, it will be displayed as checked\n\t* <li> If the component is not checked, it will be displayed as not checked regardless value of the indeterminate attribute\n\t* </ul>\n\t*\n\t* @type {boolean}\n\t* @name sap.ui.webc.main.CheckBox.prototype.indeterminate\n\t* @defaultvalue false\n\t* @public\n\t* @since 1.0.0-rc.15\n\t*/\n\t@property({ type: Boolean })\n\tindeterminate!: boolean;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking/tapping on the component, or by\n\t * pressing the Enter or Space key.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.checked\n\t * @defaultvalue false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.text\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttext!: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * <br><br>\n\t * <b>Note:</b>\n\t *\n\t * <ul>\n\t * <li><code>Warning</code></li>\n\t * <li><code>Error</code></li>\n\t * <li><code>None</code>(default)</li>\n\t * <li><code>Success</code></li>\n\t * <li><code>Information</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.CheckBox.prototype.valueState\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>None</code> - The text will be truncated with an ellipsis.</li>\n\t * <li><code>Normal</code> - The text will wrap. The words will not be broken based on hyphenation.</li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.WrappingType}\n\t * @name sap.ui.webc.main.CheckBox.prototype.wrappingType\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: WrappingType, defaultValue: WrappingType.None })\n\twrappingType!: `${WrappingType}`;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.name\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @private\n\t */\n\t@slot()\n\tformSupport!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\t_deactivate: () => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeCb) {\n\t\t\t\tactiveCb.active = false;\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._enableFormSupport();\n\t}\n\n\t_enableFormSupport() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport) {\n\t\t\tformSupport.syncNativeHiddenInput(this, (element: IFormElement, nativeInput: HTMLInputElement) => {\n\t\t\t\tnativeInput.disabled = !!element.disabled;\n\t\t\t\tnativeInput.checked = !!element.checked;\n\t\t\t\tnativeInput.value = element.checked ? \"on\" : \"\";\n\t\t\t});\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onmousedown() {\n\t\tif (this.readonly || this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = true;\n\t\tactiveCb = this; // eslint-disable-line\n\t}\n\n\t_onmouseup() {\n\t\tthis.active = false;\n\t}\n\n\t_onfocusout() {\n\t\tthis.active = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.active = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.toggle();\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.toggle();\n\t\t}\n\n\t\tthis.active = false;\n\t}\n\n\ttoggle() {\n\t\tif (this.canToggle()) {\n\t\t\tconst lastState = {\n\t\t\t\tchecked: this.checked,\n\t\t\t\tindeterminate: this.indeterminate,\n\t\t\t};\n\t\t\tif (this.indeterminate) {\n\t\t\t\tthis.indeterminate = false;\n\t\t\t\tthis.checked = true;\n\t\t\t} else {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding\n\t\t\tconst valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChagnePrevented) {\n\t\t\t\tthis.checked = lastState.checked;\n\t\t\t\tthis.indeterminate = lastState.indeterminate;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly);\n\t}\n\n\tvalueStateTextMappings() {\n\t\treturn {\n\t\t\t\"Error\": CheckBox.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Warning\": CheckBox.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t\t\"Success\": CheckBox.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t};\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-checkbox--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t},\n\t\t};\n\t}\n\n\tget ariaReadonly() {\n\t\treturn this.readonly ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaChecked() {\n\t\treturn this.indeterminate && this.checked ? \"mixed\" : this.checked;\n\t}\n\n\tget ariaLabelledBy() {\n\t\tif (!this.ariaLabelText) {\n\t\t\treturn this.text ? `${this._id}-label` : undefined;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn this.hasValueState ? `${this._id}-descr` : undefined;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget valueStateText() {\n\t\tif (this.valueState !== ValueState.None && this.valueState !== ValueState.Information) {\n\t\t\treturn this.valueStateTextMappings()[this.valueState];\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\t\treturn this.disabled ? undefined : tabindex || \"0\";\n\t}\n\n\tget isCompletelyChecked() {\n\t\treturn this.checked && !this.indeterminate;\n\t}\n\n\tstatic async onDefine() {\n\t\tCheckBox.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCheckBox.define();\n\nexport default CheckBox;\n"]}
package/dist/Dialog.d.ts CHANGED
@@ -42,6 +42,10 @@ import "@ui5/webcomponents-icons/dist/information.js";
42
42
  * <li>content - Used to style the content of the component</li>
43
43
  * <li>footer - Used to style the footer of the component</li>
44
44
  * </ul>
45
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the header or in the footer, you should remove the default dialog's paddings.
46
+ * <br>
47
+ * For more information see the sample "Bar in Header/Footer".
48
+
45
49
  *
46
50
  * <h3>ES6 Module Import</h3>
47
51
  *
@@ -159,6 +163,8 @@ declare class Dialog extends Popup {
159
163
  /**
160
164
  * Defines the header HTML Element.
161
165
  * <br><br>
166
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the header, you should remove the default dialog's paddings.
167
+ * <br><br>
162
168
  * <b>Note:</b> If <code>header</code> slot is provided, the labelling of the dialog is a responsibility of the application developer.
163
169
  * <code>accessibleName</code> should be used.
164
170
  *
@@ -170,6 +176,8 @@ declare class Dialog extends Popup {
170
176
  header: Array<HTMLElement>;
171
177
  /**
172
178
  * Defines the footer HTML Element.
179
+ * <br><br>
180
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the footer, you should remove the default dialog's paddings.
173
181
  *
174
182
  * @type {HTMLElement[]}
175
183
  * @name sap.ui.webc.main.Dialog.prototype.footer
package/dist/Dialog.js CHANGED
@@ -76,6 +76,10 @@ const ICON_PER_STATE = {
76
76
  * <li>content - Used to style the content of the component</li>
77
77
  * <li>footer - Used to style the footer of the component</li>
78
78
  * </ul>
79
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the header or in the footer, you should remove the default dialog's paddings.
80
+ * <br>
81
+ * For more information see the sample "Bar in Header/Footer".
82
+
79
83
  *
80
84
  * <h3>ES6 Module Import</h3>
81
85
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../src/Dialog.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eAAe;YACf,SAAS;SACT;QACD,YAAY,EAAE;YACb,IAAI;SACJ;KACD,CAAC;GACI,MAAM,CA2mBX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport {\n\tisUp, isDown, isLeft, isRight,\n\tisUpShift, isDownShift, isLeftShift, isRightShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport Popup from \"./Popup.js\";\nimport type { PopupBeforeCloseEventDetail as DialogBeforeCloseEventDetail } from \"./Popup.js\";\nimport Icon from \"./Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/resize-corner.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\n\nimport {\n\tDIALOG_HEADER_ARIA_ROLE_DESCRIPTION,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport DialogTemplate from \"./generated/templates/DialogTemplate.lit.js\";\n// Styles\nimport browserScrollbarCSS from \"./generated/themes/BrowserScrollbar.css.js\";\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport dialogCSS from \"./generated/themes/Dialog.css.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\n\n/**\n * Defines the step size at which this component would change by when being dragged or resized with the keyboard.\n */\nconst STEP_SIZE = 16;\n\ntype ValueStateWithIcon = ValueState.Error | ValueState.Warning | ValueState.Success | ValueState.Information;\n/**\n * Defines the icons corresponding to the dialog's state.\n */\nconst ICON_PER_STATE: Record<ValueStateWithIcon, string> = {\n\t[ValueState.Error]: \"error\",\n\t[ValueState.Warning]: \"alert\",\n\t[ValueState.Success]: \"sys-enter-2\",\n\t[ValueState.Information]: \"information\",\n};\n\n/**\n * @class\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The <code>ui5-dialog</code> component is used to temporarily display some information in a\n * size-limited window in front of the regular app screen.\n * It is used to prompt the user for an action or a confirmation.\n * The <code>ui5-dialog</code> interrupts the current app processing as it is the only focused UI element and\n * the main screen is dimmed/blocked.\n * The dialog combines concepts known from other technologies where the windows have\n * names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n * <br><br>\n * The <code>ui5-dialog</code> is modal, which means that an user action is required before it is possible to return to the parent window.\n * To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\n * The content of the <code>ui5-dialog</code> is fully customizable.\n *\n * <h3>Structure</h3>\n * A <code>ui5-dialog</code> consists of a header, content, and a footer for action buttons.\n * The <code>ui5-dialog</code> is usually displayed at the center of the screen.\n * Its position can be changed by the user. To enable this, you need to set the property <code>draggable</code> accordingly.\n\n *\n * <h3>Responsive Behavior</h3>\n * The <code>stretch</code> property can be used to stretch the\n * <code>ui5-dialog</code> on full screen.\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-dialog</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>header - Used to style the header of the component</li>\n * <li>content - Used to style the content of the component</li>\n * <li>footer - Used to style the footer of the component</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Dialog\";</code>\n *\n * <b>Note:</b> We don't recommend nesting popup-like components (<code>ui5-dialog</code>, <code>ui5-popover</code>) inside <code>ui5-dialog</code>.\n * Ideally you should create all popups on the same level inside your HTML page and just open them from one another, rather than nesting them.\n *\n * <b>Note:</b> We don't recommend nesting popup-like components (<code>ui5-dialog</code>, <code>ui5-popover</code>) inside other components containing z-index.\n * This might break z-index management.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Dialog\n * @extends sap.ui.webc.main.Popup\n * @tagname ui5-dialog\n * @public\n */\n@customElement({\n\ttag: \"ui5-dialog\",\n\ttemplate: DialogTemplate,\n\tstyles: [\n\t\tbrowserScrollbarCSS,\n\t\tPopupsCommonCss,\n\t\tdialogCSS,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t],\n})\nclass Dialog extends Popup {\n\t/**\n\t * Defines the header text.\n\t * <br><br>\n\t * <b>Note:</b> If <code>header</code> slot is provided, the <code>headerText</code> is ignored.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Dialog.prototype.headerText\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\theaderText!: string;\n\n\t/**\n\t * Determines whether the component should be stretched to fullscreen.\n\t * <br><br>\n\t * <b>Note:</b> The component will be stretched to approximately\n\t * 90% of the viewport.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Dialog.prototype.stretch\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tstretch!: boolean;\n\n\t/**\n\t * Determines whether the component is draggable.\n\t * If this property is set to true, the Dialog will be draggable by its header.\n\t * <br><br>\n\t * <b>Note:</b> The component can be draggable only in desktop mode.\n\t * <br><br>\n\t * <b>Note:</b> This property overrides the default HTML \"draggable\" attribute native behavior.\n\t * When \"draggable\" is set to true, the native browser \"draggable\"\n\t * behavior is prevented and only the Dialog custom logic (\"draggable by its header\") works.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Dialog.prototype.draggable\n\t * @defaultvalue false\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdraggable!: boolean;\n\n\t/**\n\t * Configures the component to be resizable.\n\t * If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.\n\t * In RTL languages, the resize handle will be placed in the bottom left corner.\n\t * <br><br>\n\t * <b>Note:</b> The component can be resizable only in desktop mode.\n\t * <br>\n\t * <b>Note:</b> Upon resizing, externally defined height and width styling will be ignored.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Dialog.prototype.resizable\n\t * @defaultvalue false\n\t * @since 1.0.0-rc.10\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tresizable!: boolean;\n\n\t/**\n\t * Defines the state of the <code>Dialog</code>.\n\t * <br><br>\n\t * Available options are: <code>\"None\"</code> (by default), <code>\"Success\"</code>, <code>\"Warning\"</code>, <code>\"Information\"</code> and <code>\"Error\"</code>.\n\t * <br><br>\n\t * <b>Note:</b> If <code>\"Error\"</code> and <code>\"Warning\"</code> state is set, it will change the\n\t * accessibility role to \"alertdialog\", if the accessibleRole property is set to <code>\"Dialog\"</code>.\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.Dialog.prototype.state\n\t * @defaultvalue \"None\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tstate!: `${ValueState}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone!: boolean;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonDesktop!: boolean;\n\n\t_screenResizeHandler: () => void;\n\t_dragMouseMoveHandler: (e: MouseEvent) => void;\n\t_dragMouseUpHandler: (e: MouseEvent) => void;\n\t_resizeMouseMoveHandler: (e: MouseEvent) => void;\n\t_resizeMouseUpHandler: (e: MouseEvent) => void;\n\t_dragStartHandler: (e: DragEvent) => void;\n\t_y?: number;\n\t_x?: number;\n\t_isRTL?: boolean;\n\t_screenResizeHandlerAttached?: boolean;\n\t_initialX?: number;\n\t_initialY?: number;\n\t_initialWidth?: number;\n\t_initialHeight?: number;\n\t_initialTop?: number;\n\t_initialLeft?: number;\n\t_minWidth?: number;\n\t_cachedMinHeight?: number;\n\t_draggedOrResized = false;\n\n\t/**\n\t * Defines the header HTML Element.\n\t * <br><br>\n\t * <b>Note:</b> If <code>header</code> slot is provided, the labelling of the dialog is a responsibility of the application developer.\n\t * <code>accessibleName</code> should be used.\n\t *\n\t * @type {HTMLElement[]}\n\t * @name sap.ui.webc.main.Dialog.prototype.header\n\t * @slot\n\t * @public\n\t */\n\t@slot()\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t *\n\t * @type {HTMLElement[]}\n\t * @name sap.ui.webc.main.Dialog.prototype.footer\n\t * @slot\n\t * @public\n\t */\n\t@slot()\n\tfooter!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._screenResizeHandler = this._screenResize.bind(this);\n\n\t\tthis._dragMouseMoveHandler = this._onDragMouseMove.bind(this);\n\t\tthis._dragMouseUpHandler = this._onDragMouseUp.bind(this);\n\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\n\t\tthis._dragStartHandler = this._handleDragStart.bind(this);\n\t}\n\n\tstatic async onDefine() {\n\t\tDialog.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tstatic _isHeader(element: HTMLElement) {\n\t\treturn element.classList.contains(\"ui5-popup-header-root\") || element.getAttribute(\"slot\") === \"header\";\n\t}\n\n\t/**\n\t * Shows the dialog.\n\t *\n\t * @param {boolean} [preventInitialFocus=false] Prevents applying the focus inside the popup\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.Dialog#show\n\t * @async\n\t * @returns {Promise} Resolves when the dialog is open\n\t */\n\tasync show(preventInitialFocus = false) {\n\t\tawait super._open(preventInitialFocus);\n\t}\n\n\tget isModal() {\n\t\treturn true;\n\t}\n\n\tget shouldHideBackdrop() {\n\t\treturn false;\n\t}\n\n\tget _ariaLabelledBy() {\n\t\tlet ariaLabelledById;\n\n\t\tif (this.headerText !== \"\" && !this._ariaLabel) {\n\t\t\tariaLabelledById = \"ui5-popup-header-text\";\n\t\t}\n\n\t\treturn ariaLabelledById;\n\t}\n\n\tget ariaRoleDescriptionHeaderText() {\n\t\treturn (this.resizable || this.draggable) ? Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_ROLE_DESCRIPTION) : undefined;\n\t}\n\n\tget effectiveAriaDescribedBy() {\n\t\treturn (this.resizable || this.draggable) ? `${this._id}-descr` : undefined;\n\t}\n\n\tget ariaDescribedByHeaderTextResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggableAndResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);\n\t}\n\n\tget _displayProp() {\n\t\treturn \"flex\";\n\t}\n\n\t/**\n\t * Determines if the header should be shown.\n\t */\n\tget _displayHeader() {\n\t\treturn this.header.length || this.headerText || this.draggable || this.resizable;\n\t}\n\n\tget _movable() {\n\t\treturn !this.stretch && this.onDesktop && (this.draggable || this.resizable);\n\t}\n\n\tget _headerTabIndex() {\n\t\treturn this._movable ? \"0\" : undefined;\n\t}\n\n\tget _showResizeHandle() {\n\t\treturn this.resizable && this.onDesktop;\n\t}\n\n\tget _minHeight() {\n\t\tlet minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);\n\n\t\tconst header = this._root.querySelector<HTMLElement>(\".ui5-popup-header-root\");\n\t\tif (header) {\n\t\t\tminHeight += header.offsetHeight;\n\t\t}\n\n\t\tconst footer = this._root.querySelector<HTMLElement>(\".ui5-popup-footer-root\");\n\t\tif (footer) {\n\t\t\tminHeight += footer.offsetHeight;\n\t\t}\n\n\t\treturn minHeight;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.state !== ValueState.None;\n\t}\n\n\tget _dialogStateIcon() {\n\t\treturn ICON_PER_STATE[this.state as ValueStateWithIcon];\n\t}\n\n\tget _role(): string | undefined {\n\t\tif (this.accessibleRole === PopupAccessibleRole.None) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (this.state === ValueState.Error || this.state === ValueState.Warning) {\n\t\t\treturn PopupAccessibleRole.AlertDialog.toLowerCase();\n\t\t}\n\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\t_show() {\n\t\tsuper._show();\n\t\tthis._center();\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\n\t\tthis._isRTL = this.effectiveDir === \"rtl\";\n\t\tthis.onPhone = isPhone();\n\t\tthis.onDesktop = isDesktop();\n\t}\n\n\tonAfterRendering() {\n\t\tif (!this.isOpen() && this.open) {\n\t\t\tthis.show();\n\t\t} else if (this.isOpen() && !this.open) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tthis._attachScreenResizeHandler();\n\n\t\tthis.addEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\tonExitDOM() {\n\t\tsuper.onExitDOM();\n\t\tthis._detachScreenResizeHandler();\n\n\t\tthis.removeEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (!this._draggedOrResized) {\n\t\t\tthis._center();\n\t\t}\n\t}\n\n\t_screenResize() {\n\t\tthis._center();\n\t}\n\n\t_attachScreenResizeHandler() {\n\t\tif (!this._screenResizeHandlerAttached) {\n\t\t\twindow.addEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = true;\n\t\t}\n\t}\n\n\t_detachScreenResizeHandler() {\n\t\tif (this._screenResizeHandlerAttached) {\n\t\t\twindow.removeEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing\n\t\t}\n\t}\n\n\t_center() {\n\t\tconst height = window.innerHeight - this.offsetHeight,\n\t\t\twidth = window.innerWidth - this.offsetWidth;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${Math.round(height / 2)}px`,\n\t\t\tleft: `${Math.round(width / 2)}px`,\n\t\t});\n\t}\n\n\t_revertSize = () => {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"\",\n\t\t\tleft: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Event handlers\n\t */\n\t_onDragMouseDown(e: DragEvent) {\n\t\t// allow dragging only on the header\n\t\tif (!this._movable || !this.draggable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t} = window.getComputedStyle(this);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t\twidth: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,\n\t\t\theight: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,\n\t\t});\n\n\t\tthis._x = e.clientX;\n\t\tthis._y = e.clientY;\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseDragHandlers();\n\t}\n\n\t_onDragMouseMove(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst { clientX, clientY } = e;\n\t\tconst calcX = this._x! - clientX;\n\t\tconst calcY = this._y! - clientY;\n\t\tconst {\n\t\t\tleft,\n\t\t\ttop,\n\t\t} = this.getBoundingClientRect();\n\n\t\tObject.assign(this.style, {\n\t\t\tleft: `${Math.floor(left - calcX)}px`,\n\t\t\ttop: `${Math.floor(top - calcY)}px`,\n\t\t});\n\n\t\tthis._x = clientX;\n\t\tthis._y = clientY;\n\t}\n\n\t_onDragMouseUp() {\n\t\tdelete this._x;\n\t\tdelete this._y;\n\n\t\tthis._detachMouseDragHandlers();\n\t}\n\n\t_onDragOrResizeKeyDown(e: KeyboardEvent) {\n\t\tif (!this._movable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.draggable && [isUp, isDown, isLeft, isRight].some(key => key(e))) {\n\t\t\tthis._dragWithEvent(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.resizable && [isUpShift, isDownShift, isLeftShift, isRightShift].some(key => key(e))) {\n\t\t\tthis._resizeWithEvent(e);\n\t\t}\n\t}\n\n\t_dragWithEvent(e: KeyboardEvent) {\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t\twidth,\n\t\t\theight,\n\t\t} = this.getBoundingClientRect();\n\n\t\tlet newPos = 0;\n\t\tlet posDirection: \"top\" | \"left\" = \"top\";\n\n\t\tswitch (true) {\n\t\tcase isUp(e):\n\t\t\tnewPos = top - STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isDown(e):\n\t\t\tnewPos = top + STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isLeft(e):\n\t\t\tnewPos = left - STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\tcase isRight(e):\n\t\t\tnewPos = left + STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\t}\n\n\t\tnewPos = clamp(\n\t\t\tnewPos,\n\t\t\t0,\n\t\t\tposDirection === \"left\" ? window.innerWidth - width : window.innerHeight - height,\n\t\t);\n\n\t\tthis.style[posDirection] = `${newPos}px`;\n\t}\n\n\t_resizeWithEvent(e: KeyboardEvent) {\n\t\tthis._draggedOrResized = true;\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\n\t\tconst { top, left } = this.getBoundingClientRect(),\n\t\t\tstyle = window.getComputedStyle(this),\n\t\t\tminWidth = Number.parseFloat(style.minWidth),\n\t\t\tmaxWidth = window.innerWidth - left,\n\t\t\tmaxHeight = window.innerHeight - top;\n\n\t\tlet width = Number.parseFloat(style.width),\n\t\t\theight = Number.parseFloat(style.height);\n\n\t\tswitch (true) {\n\t\tcase isUpShift(e):\n\t\t\theight -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isDownShift(e):\n\t\t\theight += STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isLeftShift(e):\n\t\t\twidth -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isRightShift(e):\n\t\t\twidth += STEP_SIZE;\n\t\t\tbreak;\n\t\t}\n\n\t\twidth = clamp(width, minWidth, maxWidth);\n\t\theight = clamp(height, this._minHeight, maxHeight);\n\n\t\tObject.assign(this.style, {\n\t\t\twidth: `${width}px`,\n\t\t\theight: `${height}px`,\n\t\t});\n\t}\n\n\t_attachMouseDragHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_detachMouseDragHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_onResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._movable || !this.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tminWidth,\n\t\t} = window.getComputedStyle(this);\n\n\t\tthis._initialX = e.clientX;\n\t\tthis._initialY = e.clientY;\n\t\tthis._initialWidth = Number.parseFloat(width);\n\t\tthis._initialHeight = Number.parseFloat(height);\n\t\tthis._initialTop = top;\n\t\tthis._initialLeft = left;\n\t\tthis._minWidth = Number.parseFloat(minWidth);\n\t\tthis._cachedMinHeight = this._minHeight;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t_onResizeMouseMove(e: MouseEvent) {\n\t\tconst { clientX, clientY } = e;\n\n\t\tlet newWidth,\n\t\t\tnewLeft;\n\n\t\tif (this._isRTL) {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! - (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\tthis._initialLeft! + this._initialWidth!,\n\t\t\t);\n\n\t\t\tnewLeft = clamp(\n\t\t\t\tthis._initialLeft! + (clientX - this._initialX!),\n\t\t\t\t0,\n\t\t\t\tthis._initialX! + this._initialWidth! - this._minWidth!,\n\t\t\t);\n\t\t} else {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! + (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\twindow.innerWidth - this._initialLeft!,\n\t\t\t);\n\t\t}\n\n\t\tconst newHeight = clamp(\n\t\t\tthis._initialHeight! + (clientY - this._initialY!),\n\t\t\tthis._cachedMinHeight!,\n\t\t\twindow.innerHeight - this._initialTop!,\n\t\t);\n\n\t\tObject.assign(this.style, {\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t\tleft: newLeft ? `${newLeft}px` : undefined,\n\t\t});\n\t}\n\n\t_onResizeMouseUp() {\n\t\tdelete this._initialX;\n\t\tdelete this._initialY;\n\t\tdelete this._initialWidth;\n\t\tdelete this._initialHeight;\n\t\tdelete this._initialTop;\n\t\tdelete this._initialLeft;\n\t\tdelete this._minWidth;\n\t\tdelete this._cachedMinHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t_handleDragStart(e: DragEvent) {\n\t\tif (this.draggable) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\t}\n\n\t_detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n}\n\nDialog.define();\n\nexport default Dialog;\nexport type {\n\tDialogBeforeCloseEventDetail,\n};\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../src/Dialog.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,4CAA4C,CAAC;AAC/D,OAAO,EACN,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAC7B,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,GACjD,MAAM,sCAAsC,CAAC;AAC9C,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1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B,CAAC,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtE,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC;CACD,CAAA;AAnmBA;IADC,QAAQ,EAAE;0CACS;AAcpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACV;AAkBlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AAiBpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AAgBpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;qCACtC;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACV;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AAoCpB;IADC,IAAI,EAAE;sCACqB;AAa5B;IADC,IAAI,EAAE;sCACqB;AA1IvB,MAAM;IAZX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE;YACP,mBAAmB;YACnB,eAAe;YACf,SAAS;SACT;QACD,YAAY,EAAE;YACb,IAAI;SACJ;KACD,CAAC;GACI,MAAM,CA+mBX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport {\n\tisUp, isDown, isLeft, isRight,\n\tisUpShift, isDownShift, isLeftShift, isRightShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport Popup from \"./Popup.js\";\nimport type { PopupBeforeCloseEventDetail as DialogBeforeCloseEventDetail } from \"./Popup.js\";\nimport Icon from \"./Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/resize-corner.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\n\nimport {\n\tDIALOG_HEADER_ARIA_ROLE_DESCRIPTION,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport DialogTemplate from \"./generated/templates/DialogTemplate.lit.js\";\n// Styles\nimport browserScrollbarCSS from \"./generated/themes/BrowserScrollbar.css.js\";\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport dialogCSS from \"./generated/themes/Dialog.css.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\n\n/**\n * Defines the step size at which this component would change by when being dragged or resized with the keyboard.\n */\nconst STEP_SIZE = 16;\n\ntype ValueStateWithIcon = ValueState.Error | ValueState.Warning | ValueState.Success | ValueState.Information;\n/**\n * Defines the icons corresponding to the dialog's state.\n */\nconst ICON_PER_STATE: Record<ValueStateWithIcon, string> = {\n\t[ValueState.Error]: \"error\",\n\t[ValueState.Warning]: \"alert\",\n\t[ValueState.Success]: \"sys-enter-2\",\n\t[ValueState.Information]: \"information\",\n};\n\n/**\n * @class\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The <code>ui5-dialog</code> component is used to temporarily display some information in a\n * size-limited window in front of the regular app screen.\n * It is used to prompt the user for an action or a confirmation.\n * The <code>ui5-dialog</code> interrupts the current app processing as it is the only focused UI element and\n * the main screen is dimmed/blocked.\n * The dialog combines concepts known from other technologies where the windows have\n * names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n * <br><br>\n * The <code>ui5-dialog</code> is modal, which means that an user action is required before it is possible to return to the parent window.\n * To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\n * The content of the <code>ui5-dialog</code> is fully customizable.\n *\n * <h3>Structure</h3>\n * A <code>ui5-dialog</code> consists of a header, content, and a footer for action buttons.\n * The <code>ui5-dialog</code> is usually displayed at the center of the screen.\n * Its position can be changed by the user. To enable this, you need to set the property <code>draggable</code> accordingly.\n\n *\n * <h3>Responsive Behavior</h3>\n * The <code>stretch</code> property can be used to stretch the\n * <code>ui5-dialog</code> on full screen.\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-dialog</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>header - Used to style the header of the component</li>\n * <li>content - Used to style the content of the component</li>\n * <li>footer - Used to style the footer of the component</li>\n * </ul>\n * <b>Note:</b> When a <code>ui5-bar</code> is used in the header or in the footer, you should remove the default dialog's paddings.\n * <br>\n * For more information see the sample \"Bar in Header/Footer\".\n\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Dialog\";</code>\n *\n * <b>Note:</b> We don't recommend nesting popup-like components (<code>ui5-dialog</code>, <code>ui5-popover</code>) inside <code>ui5-dialog</code>.\n * Ideally you should create all popups on the same level inside your HTML page and just open them from one another, rather than nesting them.\n *\n * <b>Note:</b> We don't recommend nesting popup-like components (<code>ui5-dialog</code>, <code>ui5-popover</code>) inside other components containing z-index.\n * This might break z-index management.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Dialog\n * @extends sap.ui.webc.main.Popup\n * @tagname ui5-dialog\n * @public\n */\n@customElement({\n\ttag: \"ui5-dialog\",\n\ttemplate: DialogTemplate,\n\tstyles: [\n\t\tbrowserScrollbarCSS,\n\t\tPopupsCommonCss,\n\t\tdialogCSS,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t],\n})\nclass Dialog extends Popup {\n\t/**\n\t * Defines the header text.\n\t * <br><br>\n\t * <b>Note:</b> If <code>header</code> slot is provided, the <code>headerText</code> is ignored.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Dialog.prototype.headerText\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\theaderText!: string;\n\n\t/**\n\t * Determines whether the component should be stretched to fullscreen.\n\t * <br><br>\n\t * <b>Note:</b> The component will be stretched to approximately\n\t * 90% of the viewport.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Dialog.prototype.stretch\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tstretch!: boolean;\n\n\t/**\n\t * Determines whether the component is draggable.\n\t * If this property is set to true, the Dialog will be draggable by its header.\n\t * <br><br>\n\t * <b>Note:</b> The component can be draggable only in desktop mode.\n\t * <br><br>\n\t * <b>Note:</b> This property overrides the default HTML \"draggable\" attribute native behavior.\n\t * When \"draggable\" is set to true, the native browser \"draggable\"\n\t * behavior is prevented and only the Dialog custom logic (\"draggable by its header\") works.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Dialog.prototype.draggable\n\t * @defaultvalue false\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdraggable!: boolean;\n\n\t/**\n\t * Configures the component to be resizable.\n\t * If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.\n\t * In RTL languages, the resize handle will be placed in the bottom left corner.\n\t * <br><br>\n\t * <b>Note:</b> The component can be resizable only in desktop mode.\n\t * <br>\n\t * <b>Note:</b> Upon resizing, externally defined height and width styling will be ignored.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Dialog.prototype.resizable\n\t * @defaultvalue false\n\t * @since 1.0.0-rc.10\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tresizable!: boolean;\n\n\t/**\n\t * Defines the state of the <code>Dialog</code>.\n\t * <br><br>\n\t * Available options are: <code>\"None\"</code> (by default), <code>\"Success\"</code>, <code>\"Warning\"</code>, <code>\"Information\"</code> and <code>\"Error\"</code>.\n\t * <br><br>\n\t * <b>Note:</b> If <code>\"Error\"</code> and <code>\"Warning\"</code> state is set, it will change the\n\t * accessibility role to \"alertdialog\", if the accessibleRole property is set to <code>\"Dialog\"</code>.\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.Dialog.prototype.state\n\t * @defaultvalue \"None\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tstate!: `${ValueState}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone!: boolean;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonDesktop!: boolean;\n\n\t_screenResizeHandler: () => void;\n\t_dragMouseMoveHandler: (e: MouseEvent) => void;\n\t_dragMouseUpHandler: (e: MouseEvent) => void;\n\t_resizeMouseMoveHandler: (e: MouseEvent) => void;\n\t_resizeMouseUpHandler: (e: MouseEvent) => void;\n\t_dragStartHandler: (e: DragEvent) => void;\n\t_y?: number;\n\t_x?: number;\n\t_isRTL?: boolean;\n\t_screenResizeHandlerAttached?: boolean;\n\t_initialX?: number;\n\t_initialY?: number;\n\t_initialWidth?: number;\n\t_initialHeight?: number;\n\t_initialTop?: number;\n\t_initialLeft?: number;\n\t_minWidth?: number;\n\t_cachedMinHeight?: number;\n\t_draggedOrResized = false;\n\n\t/**\n\t * Defines the header HTML Element.\n\t * <br><br>\n\t * <b>Note:</b> When a <code>ui5-bar</code> is used in the header, you should remove the default dialog's paddings.\n\t * <br><br>\n\t * <b>Note:</b> If <code>header</code> slot is provided, the labelling of the dialog is a responsibility of the application developer.\n\t * <code>accessibleName</code> should be used.\n\t *\n\t * @type {HTMLElement[]}\n\t * @name sap.ui.webc.main.Dialog.prototype.header\n\t * @slot\n\t * @public\n\t */\n\t@slot()\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t * <br><br>\n\t * <b>Note:</b> When a <code>ui5-bar</code> is used in the footer, you should remove the default dialog's paddings.\n\t *\n\t * @type {HTMLElement[]}\n\t * @name sap.ui.webc.main.Dialog.prototype.footer\n\t * @slot\n\t * @public\n\t */\n\t@slot()\n\tfooter!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._screenResizeHandler = this._screenResize.bind(this);\n\n\t\tthis._dragMouseMoveHandler = this._onDragMouseMove.bind(this);\n\t\tthis._dragMouseUpHandler = this._onDragMouseUp.bind(this);\n\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\n\t\tthis._dragStartHandler = this._handleDragStart.bind(this);\n\t}\n\n\tstatic async onDefine() {\n\t\tDialog.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tstatic _isHeader(element: HTMLElement) {\n\t\treturn element.classList.contains(\"ui5-popup-header-root\") || element.getAttribute(\"slot\") === \"header\";\n\t}\n\n\t/**\n\t * Shows the dialog.\n\t *\n\t * @param {boolean} [preventInitialFocus=false] Prevents applying the focus inside the popup\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.Dialog#show\n\t * @async\n\t * @returns {Promise} Resolves when the dialog is open\n\t */\n\tasync show(preventInitialFocus = false) {\n\t\tawait super._open(preventInitialFocus);\n\t}\n\n\tget isModal() {\n\t\treturn true;\n\t}\n\n\tget shouldHideBackdrop() {\n\t\treturn false;\n\t}\n\n\tget _ariaLabelledBy() {\n\t\tlet ariaLabelledById;\n\n\t\tif (this.headerText !== \"\" && !this._ariaLabel) {\n\t\t\tariaLabelledById = \"ui5-popup-header-text\";\n\t\t}\n\n\t\treturn ariaLabelledById;\n\t}\n\n\tget ariaRoleDescriptionHeaderText() {\n\t\treturn (this.resizable || this.draggable) ? Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_ROLE_DESCRIPTION) : undefined;\n\t}\n\n\tget effectiveAriaDescribedBy() {\n\t\treturn (this.resizable || this.draggable) ? `${this._id}-descr` : undefined;\n\t}\n\n\tget ariaDescribedByHeaderTextResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggableAndResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);\n\t}\n\n\tget _displayProp() {\n\t\treturn \"flex\";\n\t}\n\n\t/**\n\t * Determines if the header should be shown.\n\t */\n\tget _displayHeader() {\n\t\treturn this.header.length || this.headerText || this.draggable || this.resizable;\n\t}\n\n\tget _movable() {\n\t\treturn !this.stretch && this.onDesktop && (this.draggable || this.resizable);\n\t}\n\n\tget _headerTabIndex() {\n\t\treturn this._movable ? \"0\" : undefined;\n\t}\n\n\tget _showResizeHandle() {\n\t\treturn this.resizable && this.onDesktop;\n\t}\n\n\tget _minHeight() {\n\t\tlet minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);\n\n\t\tconst header = this._root.querySelector<HTMLElement>(\".ui5-popup-header-root\");\n\t\tif (header) {\n\t\t\tminHeight += header.offsetHeight;\n\t\t}\n\n\t\tconst footer = this._root.querySelector<HTMLElement>(\".ui5-popup-footer-root\");\n\t\tif (footer) {\n\t\t\tminHeight += footer.offsetHeight;\n\t\t}\n\n\t\treturn minHeight;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.state !== ValueState.None;\n\t}\n\n\tget _dialogStateIcon() {\n\t\treturn ICON_PER_STATE[this.state as ValueStateWithIcon];\n\t}\n\n\tget _role(): string | undefined {\n\t\tif (this.accessibleRole === PopupAccessibleRole.None) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (this.state === ValueState.Error || this.state === ValueState.Warning) {\n\t\t\treturn PopupAccessibleRole.AlertDialog.toLowerCase();\n\t\t}\n\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\t_show() {\n\t\tsuper._show();\n\t\tthis._center();\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\n\t\tthis._isRTL = this.effectiveDir === \"rtl\";\n\t\tthis.onPhone = isPhone();\n\t\tthis.onDesktop = isDesktop();\n\t}\n\n\tonAfterRendering() {\n\t\tif (!this.isOpen() && this.open) {\n\t\t\tthis.show();\n\t\t} else if (this.isOpen() && !this.open) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tthis._attachScreenResizeHandler();\n\n\t\tthis.addEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\tonExitDOM() {\n\t\tsuper.onExitDOM();\n\t\tthis._detachScreenResizeHandler();\n\n\t\tthis.removeEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (!this._draggedOrResized) {\n\t\t\tthis._center();\n\t\t}\n\t}\n\n\t_screenResize() {\n\t\tthis._center();\n\t}\n\n\t_attachScreenResizeHandler() {\n\t\tif (!this._screenResizeHandlerAttached) {\n\t\t\twindow.addEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = true;\n\t\t}\n\t}\n\n\t_detachScreenResizeHandler() {\n\t\tif (this._screenResizeHandlerAttached) {\n\t\t\twindow.removeEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing\n\t\t}\n\t}\n\n\t_center() {\n\t\tconst height = window.innerHeight - this.offsetHeight,\n\t\t\twidth = window.innerWidth - this.offsetWidth;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${Math.round(height / 2)}px`,\n\t\t\tleft: `${Math.round(width / 2)}px`,\n\t\t});\n\t}\n\n\t_revertSize = () => {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"\",\n\t\t\tleft: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Event handlers\n\t */\n\t_onDragMouseDown(e: DragEvent) {\n\t\t// allow dragging only on the header\n\t\tif (!this._movable || !this.draggable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t} = window.getComputedStyle(this);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t\twidth: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,\n\t\t\theight: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,\n\t\t});\n\n\t\tthis._x = e.clientX;\n\t\tthis._y = e.clientY;\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseDragHandlers();\n\t}\n\n\t_onDragMouseMove(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst { clientX, clientY } = e;\n\t\tconst calcX = this._x! - clientX;\n\t\tconst calcY = this._y! - clientY;\n\t\tconst {\n\t\t\tleft,\n\t\t\ttop,\n\t\t} = this.getBoundingClientRect();\n\n\t\tObject.assign(this.style, {\n\t\t\tleft: `${Math.floor(left - calcX)}px`,\n\t\t\ttop: `${Math.floor(top - calcY)}px`,\n\t\t});\n\n\t\tthis._x = clientX;\n\t\tthis._y = clientY;\n\t}\n\n\t_onDragMouseUp() {\n\t\tdelete this._x;\n\t\tdelete this._y;\n\n\t\tthis._detachMouseDragHandlers();\n\t}\n\n\t_onDragOrResizeKeyDown(e: KeyboardEvent) {\n\t\tif (!this._movable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.draggable && [isUp, isDown, isLeft, isRight].some(key => key(e))) {\n\t\t\tthis._dragWithEvent(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.resizable && [isUpShift, isDownShift, isLeftShift, isRightShift].some(key => key(e))) {\n\t\t\tthis._resizeWithEvent(e);\n\t\t}\n\t}\n\n\t_dragWithEvent(e: KeyboardEvent) {\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t\twidth,\n\t\t\theight,\n\t\t} = this.getBoundingClientRect();\n\n\t\tlet newPos = 0;\n\t\tlet posDirection: \"top\" | \"left\" = \"top\";\n\n\t\tswitch (true) {\n\t\tcase isUp(e):\n\t\t\tnewPos = top - STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isDown(e):\n\t\t\tnewPos = top + STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isLeft(e):\n\t\t\tnewPos = left - STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\tcase isRight(e):\n\t\t\tnewPos = left + STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\t}\n\n\t\tnewPos = clamp(\n\t\t\tnewPos,\n\t\t\t0,\n\t\t\tposDirection === \"left\" ? window.innerWidth - width : window.innerHeight - height,\n\t\t);\n\n\t\tthis.style[posDirection] = `${newPos}px`;\n\t}\n\n\t_resizeWithEvent(e: KeyboardEvent) {\n\t\tthis._draggedOrResized = true;\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\n\t\tconst { top, left } = this.getBoundingClientRect(),\n\t\t\tstyle = window.getComputedStyle(this),\n\t\t\tminWidth = Number.parseFloat(style.minWidth),\n\t\t\tmaxWidth = window.innerWidth - left,\n\t\t\tmaxHeight = window.innerHeight - top;\n\n\t\tlet width = Number.parseFloat(style.width),\n\t\t\theight = Number.parseFloat(style.height);\n\n\t\tswitch (true) {\n\t\tcase isUpShift(e):\n\t\t\theight -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isDownShift(e):\n\t\t\theight += STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isLeftShift(e):\n\t\t\twidth -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isRightShift(e):\n\t\t\twidth += STEP_SIZE;\n\t\t\tbreak;\n\t\t}\n\n\t\twidth = clamp(width, minWidth, maxWidth);\n\t\theight = clamp(height, this._minHeight, maxHeight);\n\n\t\tObject.assign(this.style, {\n\t\t\twidth: `${width}px`,\n\t\t\theight: `${height}px`,\n\t\t});\n\t}\n\n\t_attachMouseDragHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_detachMouseDragHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_onResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._movable || !this.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tminWidth,\n\t\t} = window.getComputedStyle(this);\n\n\t\tthis._initialX = e.clientX;\n\t\tthis._initialY = e.clientY;\n\t\tthis._initialWidth = Number.parseFloat(width);\n\t\tthis._initialHeight = Number.parseFloat(height);\n\t\tthis._initialTop = top;\n\t\tthis._initialLeft = left;\n\t\tthis._minWidth = Number.parseFloat(minWidth);\n\t\tthis._cachedMinHeight = this._minHeight;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t_onResizeMouseMove(e: MouseEvent) {\n\t\tconst { clientX, clientY } = e;\n\n\t\tlet newWidth,\n\t\t\tnewLeft;\n\n\t\tif (this._isRTL) {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! - (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\tthis._initialLeft! + this._initialWidth!,\n\t\t\t);\n\n\t\t\tnewLeft = clamp(\n\t\t\t\tthis._initialLeft! + (clientX - this._initialX!),\n\t\t\t\t0,\n\t\t\t\tthis._initialX! + this._initialWidth! - this._minWidth!,\n\t\t\t);\n\t\t} else {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! + (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\twindow.innerWidth - this._initialLeft!,\n\t\t\t);\n\t\t}\n\n\t\tconst newHeight = clamp(\n\t\t\tthis._initialHeight! + (clientY - this._initialY!),\n\t\t\tthis._cachedMinHeight!,\n\t\t\twindow.innerHeight - this._initialTop!,\n\t\t);\n\n\t\tObject.assign(this.style, {\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t\tleft: newLeft ? `${newLeft}px` : undefined,\n\t\t});\n\t}\n\n\t_onResizeMouseUp() {\n\t\tdelete this._initialX;\n\t\tdelete this._initialY;\n\t\tdelete this._initialWidth;\n\t\tdelete this._initialHeight;\n\t\tdelete this._initialTop;\n\t\tdelete this._initialLeft;\n\t\tdelete this._minWidth;\n\t\tdelete this._cachedMinHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t_handleDragStart(e: DragEvent) {\n\t\tif (this.draggable) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\t}\n\n\t_detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n}\n\nDialog.define();\n\nexport default Dialog;\nexport type {\n\tDialogBeforeCloseEventDetail,\n};\n"]}
package/dist/Option.d.ts CHANGED
@@ -11,6 +11,7 @@ import type { IOption } from "./Select.js";
11
11
  * @author SAP SE
12
12
  * @alias sap.ui.webc.main.Option
13
13
  * @extends sap.ui.webc.base.UI5Element
14
+ * @abstract
14
15
  * @tagname ui5-option
15
16
  * @implements sap.ui.webc.main.ISelectOption
16
17
  * @public
package/dist/Option.js CHANGED
@@ -18,6 +18,7 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
18
18
  * @author SAP SE
19
19
  * @alias sap.ui.webc.main.Option
20
20
  * @extends sap.ui.webc.base.UI5Element
21
+ * @abstract
21
22
  * @tagname ui5-option
22
23
  * @implements sap.ui.webc.main.ISelectOption
23
24
  * @public