@ui5/webcomponents 1.13.0-rc.2 → 1.13.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 (282) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/Carousel.d.ts +1 -0
  3. package/dist/Carousel.js +1 -0
  4. package/dist/Carousel.js.map +1 -1
  5. package/dist/CheckBox.d.ts +10 -0
  6. package/dist/CheckBox.js +10 -0
  7. package/dist/CheckBox.js.map +1 -1
  8. package/dist/Icon.d.ts +11 -0
  9. package/dist/Icon.js +11 -0
  10. package/dist/Icon.js.map +1 -1
  11. package/dist/Menu.d.ts +21 -0
  12. package/dist/Menu.js +26 -6
  13. package/dist/Menu.js.map +1 -1
  14. package/dist/MenuItem.d.ts +23 -1
  15. package/dist/MenuItem.js +10 -3
  16. package/dist/MenuItem.js.map +1 -1
  17. package/dist/Popup.js +3 -3
  18. package/dist/Popup.js.map +1 -1
  19. package/dist/Tab.d.ts +1 -1
  20. package/dist/Tab.js.map +1 -1
  21. package/dist/TabContainer.d.ts +10 -10
  22. package/dist/TabContainer.js +10 -10
  23. package/dist/TabContainer.js.map +1 -1
  24. package/dist/Title.d.ts +1 -0
  25. package/dist/Title.js +1 -0
  26. package/dist/Title.js.map +1 -1
  27. package/dist/api.json +1 -1
  28. package/dist/assets/Title.3d358ef7.css +1 -0
  29. package/dist/assets/parameters-bundle.css.067142cc.js +1 -0
  30. package/dist/assets/parameters-bundle.css.0d6c19c9.js +1 -0
  31. package/dist/assets/{parameters-bundle.css.f36b416c.js → parameters-bundle.css.217b9808.js} +1 -1
  32. package/dist/assets/parameters-bundle.css.2280ce3e.js +1 -0
  33. package/dist/assets/parameters-bundle.css.3e7079bc.js +1 -0
  34. package/dist/assets/parameters-bundle.css.46b7578e.js +1 -0
  35. package/dist/assets/parameters-bundle.css.472c33c9.js +1 -0
  36. package/dist/assets/parameters-bundle.css.750d2219.js +1 -0
  37. package/dist/assets/parameters-bundle.css.78ee4829.js +1 -0
  38. package/dist/assets/parameters-bundle.css.7bae430d.js +1 -0
  39. package/dist/assets/{parameters-bundle.css.3c25e356.js → parameters-bundle.css.860290a0.js} +1 -1
  40. package/dist/assets/{parameters-bundle.css.4daa1648.js → parameters-bundle.css.8f1d575d.js} +1 -1
  41. package/dist/assets/{parameters-bundle.css.d8251aad.js → parameters-bundle.css.91b4958e.js} +1 -1
  42. package/dist/assets/{parameters-bundle.css.21513a38.js → parameters-bundle.css.9b175fb5.js} +1 -1
  43. package/dist/assets/{parameters-bundle.css.040aa3dd.js → parameters-bundle.css.a68d7143.js} +1 -1
  44. package/dist/assets/parameters-bundle.css.ab21e265.js +1 -0
  45. package/dist/assets/parameters-bundle.css.b7a02c6d.js +1 -0
  46. package/dist/assets/parameters-bundle.css.b8686554.js +1 -0
  47. package/dist/assets/parameters-bundle.css.bdbac4ec.js +1 -0
  48. package/dist/assets/parameters-bundle.css.d6e06337.js +1 -0
  49. package/dist/assets/parameters-bundle.css.d806367c.js +1 -0
  50. package/dist/assets/parameters-bundle.css.ef6e66b9.js +1 -0
  51. package/dist/assets/parameters-bundle.css.f3164b8d.js +1 -0
  52. package/dist/assets/parameters-bundle.css.f65359ec.js +1 -0
  53. package/dist/assets/test/pages/{ComboBox.html.8efde534.js → ComboBox.html.fe2828f4.js} +1 -1
  54. package/dist/assets/test/pages/{Icon.html.2b52be1e.js → Icon.html.d90a42c2.js} +1 -1
  55. package/dist/assets/test/pages/{Label.html.1a32d008.js → Label.html.e24cbd2c.js} +1 -1
  56. package/dist/assets/test/pages/{Popups.html.11aeb74f.js → Popups.html.cc7082c1.js} +1 -1
  57. package/dist/css/themes/CheckBox.css +1 -1
  58. package/dist/css/themes/Link.css +1 -1
  59. package/dist/css/themes/Menu.css +1 -1
  60. package/dist/css/themes/Suggestions.css +1 -1
  61. package/dist/css/themes/TabContainer.css +1 -1
  62. package/dist/css/themes/Title.css +1 -1
  63. package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
  64. package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
  65. package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
  66. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  67. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  68. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  69. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  70. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  71. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  72. package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
  73. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  74. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  75. package/dist/custom-elements.json +1 -1
  76. package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
  77. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  78. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  79. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  80. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  81. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  82. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  83. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  84. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  85. package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
  86. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  87. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  88. package/dist/generated/templates/CheckBoxTemplate.lit.js +1 -1
  89. package/dist/generated/templates/IconTemplate.lit.js +1 -1
  90. package/dist/generated/templates/InputPopoverTemplate.lit.js +1 -1
  91. package/dist/generated/templates/MenuTemplate.lit.js +5 -3
  92. package/dist/generated/themes/CheckBox.css.js +1 -1
  93. package/dist/generated/themes/CheckBox.css.js.map +1 -1
  94. package/dist/generated/themes/Link.css.js +1 -1
  95. package/dist/generated/themes/Link.css.js.map +1 -1
  96. package/dist/generated/themes/Menu.css.js +1 -1
  97. package/dist/generated/themes/Menu.css.js.map +1 -1
  98. package/dist/generated/themes/Suggestions.css.js +1 -1
  99. package/dist/generated/themes/Suggestions.css.js.map +1 -1
  100. package/dist/generated/themes/TabContainer.css.js +1 -1
  101. package/dist/generated/themes/TabContainer.css.js.map +1 -1
  102. package/dist/generated/themes/Title.css.js +1 -1
  103. package/dist/generated/themes/Title.css.js.map +1 -1
  104. package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
  105. package/dist/generated/themes/sap_belize/parameters-bundle.css.js.map +1 -1
  106. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  107. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js.map +1 -1
  108. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  109. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js.map +1 -1
  110. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  111. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  112. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  113. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  114. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  115. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  116. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  117. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  118. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  119. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  120. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  121. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  122. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
  123. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
  124. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  125. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  126. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  127. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  128. package/dist/test/pages/72override.html +1 -1
  129. package/dist/test/pages/AnimanitionOff.html +1 -1
  130. package/dist/test/pages/Avatar.html +1 -1
  131. package/dist/test/pages/AvatarGroup.html +1 -1
  132. package/dist/test/pages/Badge.html +1 -1
  133. package/dist/test/pages/Breadcrumbs.html +1 -1
  134. package/dist/test/pages/BusyIndicator.html +1 -1
  135. package/dist/test/pages/Button.html +1 -1
  136. package/dist/test/pages/Calendar.html +1 -1
  137. package/dist/test/pages/Card.html +1 -1
  138. package/dist/test/pages/Carousel.html +1 -1
  139. package/dist/test/pages/CheckBox.html +1 -1
  140. package/dist/test/pages/ColorPalette.html +1 -1
  141. package/dist/test/pages/ColorPalettePopover.html +1 -1
  142. package/dist/test/pages/ColorPicker.html +1 -1
  143. package/dist/test/pages/ComboBox.html +2 -2
  144. package/dist/test/pages/Components.html +1 -1
  145. package/dist/test/pages/CoreControls.html +1 -1
  146. package/dist/test/pages/CoreControls_exp.html +1 -1
  147. package/dist/test/pages/CustomCSS.html +1 -1
  148. package/dist/test/pages/DatePicker.html +1 -1
  149. package/dist/test/pages/DatePicker_test_page.html +1 -1
  150. package/dist/test/pages/DateRangePicker.html +1 -1
  151. package/dist/test/pages/DateTimePicker.html +1 -1
  152. package/dist/test/pages/DateTimePicker_Timezone.html +1 -1
  153. package/dist/test/pages/DayPicker.html +1 -1
  154. package/dist/test/pages/Dialog.html +1 -1
  155. package/dist/test/pages/DialogLifecycle.html +1 -1
  156. package/dist/test/pages/DialogSemantic.html +1 -1
  157. package/dist/test/pages/Eventing.html +1 -1
  158. package/dist/test/pages/F6Test1.html +1 -1
  159. package/dist/test/pages/F6Test2.html +1 -1
  160. package/dist/test/pages/F6Test3.html +1 -1
  161. package/dist/test/pages/F6Test4.html +1 -1
  162. package/dist/test/pages/F6Test5.html +1 -1
  163. package/dist/test/pages/F6Test6.html +1 -1
  164. package/dist/test/pages/F6Test7.html +1 -1
  165. package/dist/test/pages/FileUploader.html +1 -1
  166. package/dist/test/pages/FormComponents.html +1 -1
  167. package/dist/test/pages/FormSupport.html +1 -1
  168. package/dist/test/pages/HCB.html +1 -1
  169. package/dist/test/pages/Icon.html +2 -2
  170. package/dist/test/pages/Icon_and_theming.html +1 -1
  171. package/dist/test/pages/Icon_custom.html +1 -1
  172. package/dist/test/pages/Input.html +1 -1
  173. package/dist/test/pages/InputFieldLabels.html +1 -1
  174. package/dist/test/pages/InputFieldMinWidth.html +1 -1
  175. package/dist/test/pages/InputIcons.html +1 -1
  176. package/dist/test/pages/Input_quickview.html +1 -1
  177. package/dist/test/pages/InputsAlignment.html +1 -1
  178. package/dist/test/pages/InputsLazyLoading.html +1 -1
  179. package/dist/test/pages/ItemNavigation.html +1 -1
  180. package/dist/test/pages/Kitchen.html +1 -1
  181. package/dist/test/pages/Kitchen.openui5.html +1 -1
  182. package/dist/test/pages/Label.html +2 -2
  183. package/dist/test/pages/Link.html +1 -1
  184. package/dist/test/pages/List.html +1 -1
  185. package/dist/test/pages/ListGrowing_Button.html +1 -1
  186. package/dist/test/pages/ListGrowing_Scroll.html +1 -1
  187. package/dist/test/pages/List_keyboard_support.html +1 -1
  188. package/dist/test/pages/List_test_page.html +1 -1
  189. package/dist/test/pages/LitKeyFunction.html +1 -1
  190. package/dist/test/pages/MemoryLeak.html +1 -1
  191. package/dist/test/pages/Menu.html +3 -3
  192. package/dist/test/pages/MessagePage.html +1 -1
  193. package/dist/test/pages/MessageStrip.html +1 -1
  194. package/dist/test/pages/MultiComboBox.html +1 -1
  195. package/dist/test/pages/MultiInput.html +1 -1
  196. package/dist/test/pages/MultiInput_Suggestions.html +1 -1
  197. package/dist/test/pages/OpenUI5-second.html +1 -1
  198. package/dist/test/pages/OpenUI5.html +1 -1
  199. package/dist/test/pages/Panel.html +1 -1
  200. package/dist/test/pages/Popover.html +1 -1
  201. package/dist/test/pages/PopoverArrowBounds.html +1 -1
  202. package/dist/test/pages/Popups.html +2 -2
  203. package/dist/test/pages/ProgressIndicator.html +1 -1
  204. package/dist/test/pages/RTL.html +1 -1
  205. package/dist/test/pages/RadioButton.html +1 -1
  206. package/dist/test/pages/RangeSlider.html +1 -1
  207. package/dist/test/pages/RatingIndicator.html +1 -1
  208. package/dist/test/pages/ResizeHandler.html +1 -1
  209. package/dist/test/pages/ResponsivePopover.html +1 -1
  210. package/dist/test/pages/SegmentedButton.html +1 -1
  211. package/dist/test/pages/Select.html +1 -1
  212. package/dist/test/pages/Simple.html +1 -1
  213. package/dist/test/pages/Slider.html +1 -1
  214. package/dist/test/pages/SplitButton.html +1 -1
  215. package/dist/test/pages/StepInput.html +1 -1
  216. package/dist/test/pages/Switch.html +1 -1
  217. package/dist/test/pages/TabContainer.html +1 -1
  218. package/dist/test/pages/Table-perf-pure.html +1 -1
  219. package/dist/test/pages/Table-perf.html +1 -1
  220. package/dist/test/pages/Table.html +1 -1
  221. package/dist/test/pages/Table2.html +1 -1
  222. package/dist/test/pages/TableAllPopin.html +1 -1
  223. package/dist/test/pages/TableCustomStyling.html +1 -1
  224. package/dist/test/pages/TableGrouping.html +1 -1
  225. package/dist/test/pages/TableGrowingWithButton.html +1 -1
  226. package/dist/test/pages/TableGrowingWithScroll.html +1 -1
  227. package/dist/test/pages/TableSelection.html +1 -1
  228. package/dist/test/pages/TextArea.html +1 -1
  229. package/dist/test/pages/TimePicker.html +1 -1
  230. package/dist/test/pages/TimeSelection.html +1 -1
  231. package/dist/test/pages/Title.html +38 -15
  232. package/dist/test/pages/Toast.html +1 -1
  233. package/dist/test/pages/ToggleButton.html +1 -1
  234. package/dist/test/pages/Tree.html +1 -1
  235. package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
  236. package/dist/test/pages/base/AriaLabelHelper.html +1 -1
  237. package/dist/test/pages/base/DOMObserver.html +1 -1
  238. package/dist/test/pages/base/IconCollection.html +1 -1
  239. package/dist/test/pages/base/IconCollectionInCustomTheme.html +1 -1
  240. package/dist/test/pages/base/InvisibleMessage.html +1 -1
  241. package/dist/test/pages/form.html +1 -1
  242. package/dist/test/pages/i18n-defaultLang.html +1 -1
  243. package/dist/test/pages/i18n-demo.html +1 -1
  244. package/package.json +7 -7
  245. package/src/CheckBox.hbs +1 -0
  246. package/src/Icon.hbs +1 -0
  247. package/src/InputPopover.hbs +1 -1
  248. package/src/Menu.hbs +12 -1
  249. package/src/themes/CheckBox.css +13 -23
  250. package/src/themes/Link.css +10 -3
  251. package/src/themes/Menu.css +4 -0
  252. package/src/themes/Suggestions.css +12 -0
  253. package/src/themes/TabContainer.css +2 -0
  254. package/src/themes/Title.css +8 -1
  255. package/src/themes/base/Link-parameters.css +2 -0
  256. package/src/themes/sap_horizon/CheckBox-parameters.css +4 -9
  257. package/src/themes/sap_horizon/Link-parameters.css +1 -0
  258. package/src/themes/sap_horizon_dark/CheckBox-parameters.css +4 -9
  259. package/src/themes/sap_horizon_dark/Link-parameters.css +1 -0
  260. package/src/themes/sap_horizon_hcb/CheckBox-parameters.css +2 -7
  261. package/src/themes/sap_horizon_hcb/Link-parameters.css +1 -0
  262. package/src/themes/sap_horizon_hcw/CheckBox-parameters.css +2 -7
  263. package/src/themes/sap_horizon_hcw/Link-parameters.css +1 -0
  264. package/dist/assets/Title.d6aa17aa.css +0 -1
  265. package/dist/assets/parameters-bundle.css.1b6e2478.js +0 -1
  266. package/dist/assets/parameters-bundle.css.2c8496aa.js +0 -1
  267. package/dist/assets/parameters-bundle.css.52765351.js +0 -1
  268. package/dist/assets/parameters-bundle.css.699b96c0.js +0 -1
  269. package/dist/assets/parameters-bundle.css.6db4d34a.js +0 -1
  270. package/dist/assets/parameters-bundle.css.70a65e3a.js +0 -1
  271. package/dist/assets/parameters-bundle.css.71348be9.js +0 -1
  272. package/dist/assets/parameters-bundle.css.71c92b92.js +0 -1
  273. package/dist/assets/parameters-bundle.css.75b9ef28.js +0 -1
  274. package/dist/assets/parameters-bundle.css.7629e56e.js +0 -1
  275. package/dist/assets/parameters-bundle.css.91aaddc5.js +0 -1
  276. package/dist/assets/parameters-bundle.css.9bd22734.js +0 -1
  277. package/dist/assets/parameters-bundle.css.b7a262bf.js +0 -1
  278. package/dist/assets/parameters-bundle.css.b8f73a77.js +0 -1
  279. package/dist/assets/parameters-bundle.css.c565b624.js +0 -1
  280. package/dist/assets/parameters-bundle.css.cbd268df.js +0 -1
  281. package/dist/assets/parameters-bundle.css.f2cd40dd.js +0 -1
  282. package/dist/assets/parameters-bundle.css.f552e9e6.js +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,27 @@
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.13.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.2...v1.13.0-rc.3) (2023-04-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui5-dialog:** always wait for applying of initial focus to complete ([#6912](https://github.com/SAP/ui5-webcomponents/issues/6912)) ([f10c251](https://github.com/SAP/ui5-webcomponents/commit/f10c25147bf919c5c732640e36971c6b027a7fc1)), closes [#6768](https://github.com/SAP/ui5-webcomponents/issues/6768)
12
+ * **ui5-input:** remove double border of input in dialog on phone ([#6946](https://github.com/SAP/ui5-webcomponents/issues/6946)) ([1d3c911](https://github.com/SAP/ui5-webcomponents/commit/1d3c9117b24464bd0be0f83511cc9380e79a16c2)), closes [#6943](https://github.com/SAP/ui5-webcomponents/issues/6943)
13
+ * **ui5-tabcontainer:** correct focus outline ([#6922](https://github.com/SAP/ui5-webcomponents/issues/6922)) ([c68133e](https://github.com/SAP/ui5-webcomponents/commit/c68133eaae691865e47d5e06e636e4eba7b9a605))
14
+
15
+
16
+ ### Features
17
+
18
+ * **ui5-checkbox, ui5-icon:** added new part attribute to the root element ([#6949](https://github.com/SAP/ui5-webcomponents/issues/6949)) ([dc4ace1](https://github.com/SAP/ui5-webcomponents/commit/dc4ace1e6e92f66d518ce97865a735a55cf97874)), closes [#6461](https://github.com/SAP/ui5-webcomponents/issues/6461) [#6474](https://github.com/SAP/ui5-webcomponents/issues/6474)
19
+ * **ui5-checkbox:** adjusted to new Horizon theme specification ([#6951](https://github.com/SAP/ui5-webcomponents/issues/6951)) ([553d0bd](https://github.com/SAP/ui5-webcomponents/commit/553d0bd0b3b9cd564486c410388ad85e79536b06))
20
+ * **ui5-menu:** provide busy indicator display ([#6866](https://github.com/SAP/ui5-webcomponents/issues/6866)) ([deb6685](https://github.com/SAP/ui5-webcomponents/commit/deb66857c47f469cd055dd26c3f63521005f34c9)), closes [#6131](https://github.com/SAP/ui5-webcomponents/issues/6131)
21
+ * **ui5-title:** add custom overstyles when used with Link ([#6932](https://github.com/SAP/ui5-webcomponents/issues/6932)) ([e1b65ef](https://github.com/SAP/ui5-webcomponents/commit/e1b65efe05f8621afaa9b9890ec4d8490114a855)), closes [#6785](https://github.com/SAP/ui5-webcomponents/issues/6785)
22
+
23
+
24
+
25
+
26
+
6
27
  # [1.13.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.1...v1.13.0-rc.2) (2023-04-20)
7
28
 
8
29
 
@@ -301,6 +301,7 @@ declare class Carousel extends UI5Element {
301
301
  get previousPageText(): string;
302
302
  /**
303
303
  * The indices of the currently visible items of the component.
304
+ * @public
304
305
  * @readonly
305
306
  * @since 1.0.0-rc.15
306
307
  * @returns {Integer[]} the indices of the visible items
package/dist/Carousel.js CHANGED
@@ -433,6 +433,7 @@ let Carousel = Carousel_1 = class Carousel extends UI5Element {
433
433
  }
434
434
  /**
435
435
  * The indices of the currently visible items of the component.
436
+ * @public
436
437
  * @readonly
437
438
  * @since 1.0.0-rc.15
438
439
  * @returns {Integer[]} the indices of the visible items
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../src/Carousel.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,OAAO,MAAM,+CAA+C,CAAC;AACpE,OAAO,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,IAAI,EACJ,IAAI,GACJ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,gBAAgB,MAAM,2DAA2D,CAAC;AAEzF,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,aAAa,MAAM,qDAAqD,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,0BAA0B,MAAM,uCAAu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"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisDown,\n\tisUp,\n\tisF7,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ScrollEnablement from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js\";\nimport type { ScrollEnablementEventListenerParam } from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.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 { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport AnimationMode from \"@ui5/webcomponents-base/dist/types/AnimationMode.js\";\nimport { getAnimationMode } from \"@ui5/webcomponents-base/dist/config/AnimationMode.js\";\nimport {\n\tCAROUSEL_OF_TEXT,\n\tCAROUSEL_DOT_TEXT,\n\tCAROUSEL_PREVIOUS_ARROW_TEXT,\n\tCAROUSEL_NEXT_ARROW_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport CarouselArrowsPlacement from \"./types/CarouselArrowsPlacement.js\";\nimport CarouselPageIndicatorStyle from \"./types/CarouselPageIndicatorStyle.js\";\nimport CarouselTemplate from \"./generated/templates/CarouselTemplate.lit.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-left.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n\nimport Button from \"./Button.js\";\nimport Label from \"./Label.js\";\n\n// Styles\nimport CarouselCss from \"./generated/themes/Carousel.css.js\";\n\ntype CarouselNavigateEventDetail = {\n\tselectedIndex: number;\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The Carousel allows the user to browse through a set of items.\n * The component is mostly used for showing a gallery of images, but can hold any other HTML element.\n * <br>\n * There are several ways to perform navigation:\n * <ul>\n * <li>on desktop - the user can navigate using the navigation arrows or with keyboard shorcuts.</li>\n * <li>on mobile - the user can use swipe gestures.</li>\n * </ul>\n *\n * <h3>Usage</h3>\n *\n * <h4>When to use:</h4>\n *\n * <ul>\n * <li>The items you want to display are very different from each other.</li>\n * <li>You want to display the items one after the other.</li>\n * </ul>\n *\n * <h4>When not to use:</h4>\n *\n * <ul>\n * <li>The items you want to display need to be visible at the same time.</li>\n * <li>The items you want to display are uniform and very similar.</li>\n * </ul>\n *\n * <h3>Keyboard Handling</h3>\n *\n * <h4>Basic Navigation</h4>\n * When the <code>ui5-carousel</code> is focused the user can navigate between the items\n * with the following keyboard shortcuts:\n * <br>\n * <ul>\n * <li>[UP/DOWN] - Navigates to previous and next item</li>\n * <li>[LEFT/RIGHT] - Navigates to previous and next item</li>\n * </ul>\n *\n * <h3>Fast Navigation</h3>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\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-carousel</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>content - Used to style the content of the component</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Carousel.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Carousel\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-carousel\n * @since 1.0.0-rc.6\n * @public\n */\n@customElement({\n\ttag: \"ui5-carousel\",\n\tlanguageAware: true,\n\tfastNavigation: true,\n\trenderer: litRender,\n\tstyles: CarouselCss,\n\ttemplate: CarouselTemplate,\n\tdependencies: [\n\t\tButton,\n\t\tLabel,\n\t],\n})\n/**\n * Fired whenever the page changes due to user interaction,\n * when the user clicks on the navigation arrows or while resizing,\n * based on the <code>items-per-page-l</code>, <code>items-per-page-m</code> and <code>items-per-page-s</code> properties.\n *\n * @event sap.ui.webc.main.Carousel#navigate\n * @param {Integer} selectedIndex the current selected index\n * @public\n * @since 1.0.0-rc.7\n */\n@event(\"navigate\", {\n\tdetail: {\n\t\tselectedIndex: { type: Integer },\n\t},\n})\n\nclass Carousel extends UI5Element {\n\t/**\n\t * Defines whether the carousel should loop, i.e show the first page after the last page is reached and vice versa.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.cyclic\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tcyclic!: boolean;\n\n\t/**\n\t * Defines the number of items per page on small size (up to 640px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageS\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageS!: number;\n\n\t/**\n\t * Defines the number of items per page on medium size (from 640px to 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageM\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageM!: number;\n\n\t/**\n\t * Defines the number of items per page on large size (more than 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageL\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageL!: number;\n\n\t/**\n\t * Defines the visibility of the navigation arrows.\n\t * If set to true the navigation arrows will be hidden.\n\t * <br><br>\n\t * <b>Note:</b> The navigation arrows are never displayed on touch devices.\n\t * In this case, the user can swipe to navigate through the items.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hideNavigationArrows\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideNavigationArrows!: boolean;\n\n\t/**\n\t * Defines the visibility of the page indicator.\n\t * If set to true the page indicator will be hidden.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hidePageIndicator\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thidePageIndicator!: boolean;\n\n\t/**\n\t * Defines the style of the page indicator.\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Default</code> - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)</li>\n\t * <li><code>Numeric</code> - The page indicator will display the current page and the total number of pages. (e.g. X of Y)</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CarouselPageIndicatorStyle}\n\t * @name sap.ui.webc.main.Carousel.prototype.pageIndicatorStyle\n\t * @since 1.10\n\t * @defaultvalue \"Default\"\n\t * @public\n\t */\n\t@property({ type: CarouselPageIndicatorStyle, defaultValue: CarouselPageIndicatorStyle.Default })\n\tpageIndicatorStyle!: CarouselPageIndicatorStyle;\n\n\t/**\n\t * Defines the index of the initially selected item.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype._selectedIndex\n\t * @defaultvalue 0\n\t * @private\n\t */\n\t@property({ validator: Integer, defaultValue: 0 })\n\t_selectedIndex!: number;\n\n\t/**\n\t * Defines the position of arrows.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Content</code></li>\n\t * <li><code>Navigation</code></li>\n\t * </ul>\n\t * <br>\n\t * When set to \"Content\", the arrows are placed on the sides of the current page.\n\t * <br>\n\t * When set to \"Navigation\", the arrows are placed on the sides of the page indicator.\n\t * @type {sap.ui.webc.main.types.CarouselArrowsPlacement}\n\t * @name sap.ui.webc.main.Carousel.prototype.arrowsPlacement\n\t * @defaultvalue \"Content\"\n\t * @public\n\t */\n\t@property({ type: CarouselArrowsPlacement, defaultValue: CarouselArrowsPlacement.Content })\n\tarrowsPlacement!: CarouselArrowsPlacement;\n\n\t/**\n\t * Defines the carousel width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_width?: number;\n\n\t/**\n\t * Defines the carousel item width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_itemWidth?: number;\n\n\t/**\n\t * If set to true navigation arrows are shown.\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_visibleNavigationArrows!: boolean;\n\n\t_scrollEnablement: ScrollEnablement;\n\t_onResizeBound: ResizeObserverCallback;\n\t_resizing: boolean;\n\t_lastFocusedElements: Array<HTMLElement>;\n\t_orderOfLastFocusedPages: Array<number>;\n\n\t/**\n\t * Defines the content of the component.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @name sap.ui.webc.main.Carousel.prototype.default\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcontent!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic get pageTypeLimit() {\n\t\treturn 9;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._scrollEnablement = new ScrollEnablement(this);\n\t\tthis._scrollEnablement.attachEvent(\"touchend\", e => {\n\t\t\tthis._updateScrolling(e);\n\t\t});\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._resizing = false; // indicates if the carousel is in process of resizing\n\n\t\tthis._lastFocusedElements = [];\n\t\tthis._orderOfLastFocusedPages = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\n\t\tthis.validateSelectedIndex();\n\t}\n\n\tonAfterRendering() {\n\t\tthis._scrollEnablement.scrollContainer = this.getDomRef()!;\n\t\tthis._resizing = false; // not invalidating\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t}\n\n\tvalidateSelectedIndex() {\n\t\tif (!this.isIndexInRange(this._selectedIndex)) {\n\t\t\tthis._selectedIndex = 0;\n\t\t}\n\t}\n\n\t_onResize() {\n\t\tconst previousItemsPerPage = this.effectiveItemsPerPage;\n\n\t\t// Set the resizing flag to suppress animation while resizing\n\t\tthis._resizing = true;\n\n\t\t// Change transitively effectiveItemsPerPage by modifying _width\n\t\tthis._width = this.offsetWidth;\n\t\tthis._itemWidth = Math.floor(this._width / this.effectiveItemsPerPage);\n\n\t\t// Items per page did not change or the current,\n\t\t// therefore page index does not need to be re-adjusted\n\t\tif (this.effectiveItemsPerPage === previousItemsPerPage) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._selectedIndex > this.pagesCount - 1) {\n\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_updateScrolling(e: ScrollEnablementEventListenerParam) {\n\t\tif (!e) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.isLeft) {\n\t\t\tthis.navigateLeft();\n\t\t} else if (e.isRight) {\n\t\t\tthis.navigateRight();\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tif (isF7(e)) {\n\t\t\tthis._handleF7Key(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target !== this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isLeft(e) || isDown(e)) {\n\t\t\tthis.navigateLeft();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t} else if (isRight(e) || isUp(e)) {\n\t\t\tthis.navigateRight();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (target === this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet pageIndex = -1;\n\t\tfor (let i = 0; i < this.content.length; i++) {\n\t\t\tif (this.content[i].contains(target)) {\n\t\t\t\tpageIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (pageIndex === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Save reference of the last focused element for each page\n\t\tthis._lastFocusedElements[pageIndex] = target;\n\n\t\tconst sortedPageIndex = this._orderOfLastFocusedPages.indexOf(pageIndex);\n\t\tif (sortedPageIndex === -1) {\n\t\t\tthis._orderOfLastFocusedPages.unshift(pageIndex);\n\t\t} else {\n\t\t\tthis._orderOfLastFocusedPages.splice(0, 0, this._orderOfLastFocusedPages.splice(sortedPageIndex, 1)[0]);\n\t\t}\n\t}\n\n\t_onmouseout() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = false;\n\t\t}\n\t}\n\n\t_onmouseover() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\t}\n\n\t_handleF7Key(e: KeyboardEvent) {\n\t\tconst lastFocusedElement = this._lastFocusedElements[this._getLastFocusedActivePageIndex];\n\n\t\tif (e.target === this.getDomRef() && lastFocusedElement) {\n\t\t\tlastFocusedElement.focus();\n\t\t} else {\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\tget _getLastFocusedActivePageIndex() {\n\t\tfor (let i = 0; i < this._orderOfLastFocusedPages.length; i++) {\n\t\t\tconst pageIndex = this._orderOfLastFocusedPages[i];\n\n\t\t\tif (this.isItemInViewport(pageIndex)) {\n\t\t\t\treturn pageIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn this._selectedIndex;\n\t}\n\n\tnavigateLeft() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex - 1 < 0) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\t}\n\t\t} else {\n\t\t\t--this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\tnavigateRight() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex + 1 > this.pagesCount - 1) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = 0;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t++this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_navButtonClick(e: MouseEvent) {\n\t\tconst button = e.target as Button;\n\t\tif (button.hasAttribute(\"arrow-forward\")) {\n\t\t\tthis.navigateRight();\n\t\t} else {\n\t\t\tthis.navigateLeft();\n\t\t}\n\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Changes the currently displayed page.\n\t * @param {Integer} itemIndex The index of the target page\n\t * @since 1.0.0-rc.15\n\t * @method\n\t * @name sap.ui.webc.main.Carousel#navigateTo\n\t * @public\n\t */\n\tnavigateTo(itemIndex: number) {\n\t\tthis._resizing = false;\n\t\tthis._selectedIndex = itemIndex;\n\t}\n\n\t/**\n\t * Assuming that all items have the same width\n\t * @private\n\t */\n\tget items() {\n\t\treturn this.content.map((item, idx) => {\n\t\t\tconst visible = this.isItemInViewport(idx);\n\t\t\treturn {\n\t\t\t\tid: `${this._id}-carousel-item-${idx + 1}`,\n\t\t\t\titem,\n\t\t\t\ttabIndex: visible ? \"0\" : \"-1\",\n\t\t\t\tposinset: `${idx + 1}`,\n\t\t\t\tsetsize: `${this.content.length}`,\n\t\t\t\tstyles: {\n\t\t\t\t\twidth: `${this._itemWidth || 0}px`,\n\t\t\t\t},\n\t\t\t\tclasses: visible ? \"\" : \"ui5-carousel-item--hidden\",\n\t\t\t};\n\t\t});\n\t}\n\n\tget effectiveItemsPerPage(): number {\n\t\tif (!this._width) {\n\t\t\treturn this.itemsPerPageL;\n\t\t}\n\n\t\tif (this._width <= 640) {\n\t\t\treturn this.itemsPerPageS;\n\t\t}\n\n\t\tif (this._width <= 1024) {\n\t\t\treturn this.itemsPerPageM;\n\t\t}\n\n\t\treturn this.itemsPerPageL;\n\t}\n\n\tisItemInViewport(index: number): boolean {\n\t\treturn index >= this._selectedIndex && index <= this._selectedIndex + this.effectiveItemsPerPage - 1;\n\t}\n\n\tisIndexInRange(index: number): boolean {\n\t\treturn index >= 0 && index <= this.pagesCount - 1;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tget renderNavigation() {\n\t\tif (!this.hasManyPages) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.hidePageIndicator) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tget hasManyPages() {\n\t\treturn this.pagesCount > 1;\n\t}\n\n\tget styles() {\n\t\tconst items = this._itemWidth || 0;\n\t\treturn {\n\t\t\tcontent: {\n\t\t\t\ttransform: `translateX(${this._isRTL ? \"\" : \"-\"}${this._selectedIndex * items}px`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tviewport: {\n\t\t\t\t\"ui5-carousel-viewport\": true,\n\t\t\t\t\"ui5-carousel-viewport--single\": this.pagesCount === 1,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-carousel-content\": true,\n\t\t\t\t\"ui5-carousel-content-no-animation\": this.suppressAnimation,\n\t\t\t\t\"ui5-carousel-content-has-navigation\": this.renderNavigation,\n\t\t\t\t\"ui5-carousel-content-has-navigation-and-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavigation: {\n\t\t\t\t\"ui5-carousel-navigation-wrapper\": true,\n\t\t\t\t\"ui5-carousel-navigation-with-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavPrevButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasPrev,\n\t\t\t},\n\t\t\tnavNextButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasNext,\n\t\t\t},\n\t\t};\n\t}\n\n\tget pagesCount() {\n\t\tconst items = this.content.length;\n\t\treturn items > this.effectiveItemsPerPage ? items - this.effectiveItemsPerPage + 1 : 1;\n\t}\n\n\tget isPageTypeDots() {\n\t\tif (this.pageIndicatorStyle === CarouselPageIndicatorStyle.Numeric) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.pagesCount < Carousel.pageTypeLimit;\n\t}\n\n\tget dots() {\n\t\tconst dots = [];\n\t\tconst pages = this.pagesCount;\n\n\t\tfor (let index = 0; index < pages; index++) {\n\t\t\tdots.push({\n\t\t\t\tactive: index === this._selectedIndex,\n\t\t\t\tariaLabel: Carousel.i18nBundle.getText(CAROUSEL_DOT_TEXT, index + 1, pages),\n\t\t\t});\n\t\t}\n\n\t\treturn dots;\n\t}\n\n\tget showArrows() {\n\t\tconst displayArrows = this._visibleNavigationArrows && this.hasManyPages && isDesktop();\n\n\t\treturn {\n\t\t\tcontent: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Content,\n\t\t\tnavigation: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Navigation,\n\t\t};\n\t}\n\n\tget hasPrev() {\n\t\treturn this.cyclic || this._selectedIndex - 1 >= 0;\n\t}\n\n\tget hasNext() {\n\t\treturn this.cyclic || this._selectedIndex + 1 <= this.pagesCount - 1;\n\t}\n\n\tget suppressAnimation() {\n\t\treturn this._resizing || getAnimationMode() === AnimationMode.None;\n\t}\n\n\tget _isRTL() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget selectedIndexToShow() {\n\t\treturn this._isRTL ? this.pagesCount - (this.pagesCount - this._selectedIndex) + 1 : this._selectedIndex + 1;\n\t}\n\n\tget ofText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_OF_TEXT);\n\t}\n\n\tget ariaActiveDescendant() {\n\t\treturn this.content.length ? `${this._id}-carousel-item-${this._selectedIndex + 1}` : undefined;\n\t}\n\n\tget nextPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_NEXT_ARROW_TEXT);\n\t}\n\n\tget previousPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_PREVIOUS_ARROW_TEXT);\n\t}\n\n\t/**\n\t * The indices of the currently visible items of the component.\n\t * @readonly\n\t * @since 1.0.0-rc.15\n\t * @returns {Integer[]} the indices of the visible items\n\t */\n\tget visibleItemsIndices() {\n\t\tconst visibleItemsIndices: Array<number> = [];\n\n\t\tthis.items.forEach((item, index) => {\n\t\t\tif (this.isItemInViewport(index)) {\n\t\t\t\tvisibleItemsIndices.push(index);\n\t\t\t}\n\t\t});\n\n\t\treturn visibleItemsIndices;\n\t}\n\n\tstatic async onDefine() {\n\t\tCarousel.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCarousel.define();\n\nexport default Carousel;\nexport type {\n\tCarouselNavigateEventDetail,\n};\n"]}
1
+ {"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../src/Carousel.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,OAAO,MAAM,+CAA+C,CAAC;AACpE,OAAO,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,IAAI,EACJ,IAAI,GACJ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,gBAAgB,MAAM,2DAA2D,CAAC;AAEzF,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,aAAa,MAAM,qDAAqD,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,0BAA0B,MAAM,uCAAuC,CAAC;AAC/E,OAAO,gBAAgB,M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,OAAO,EAAE,CAAC;mDACA;AAgB5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,YAAY,EAAE,0BAA0B,CAAC,OAAO,EAAE,CAAC;oDACjD;AAUhD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;gDAC1B;AAoBxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,YAAY,EAAE,uBAAuB,CAAC,OAAO,EAAE,CAAC;iDACjD;AAO1C;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;wCACjB;AAOhB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;4CACb;AAQpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DACZ;AAgBnC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;yCACvC;AAtJxB,QAAQ;IA5Bb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE;YACb,MAAM;YACN,KAAK;SACL;KACD,CAAC;IACF;;;;;;;;;OASG;;IACF,KAAK,CAAC,UAAU,EAAE;QAClB,MAAM,EAAE;YACP,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAChC;KACD,CAAC;GAEI,QAAQ,CAgkBb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,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 event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisDown,\n\tisUp,\n\tisF7,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ScrollEnablement from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js\";\nimport type { ScrollEnablementEventListenerParam } from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.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 { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport AnimationMode from \"@ui5/webcomponents-base/dist/types/AnimationMode.js\";\nimport { getAnimationMode } from \"@ui5/webcomponents-base/dist/config/AnimationMode.js\";\nimport {\n\tCAROUSEL_OF_TEXT,\n\tCAROUSEL_DOT_TEXT,\n\tCAROUSEL_PREVIOUS_ARROW_TEXT,\n\tCAROUSEL_NEXT_ARROW_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport CarouselArrowsPlacement from \"./types/CarouselArrowsPlacement.js\";\nimport CarouselPageIndicatorStyle from \"./types/CarouselPageIndicatorStyle.js\";\nimport CarouselTemplate from \"./generated/templates/CarouselTemplate.lit.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-left.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n\nimport Button from \"./Button.js\";\nimport Label from \"./Label.js\";\n\n// Styles\nimport CarouselCss from \"./generated/themes/Carousel.css.js\";\n\ntype CarouselNavigateEventDetail = {\n\tselectedIndex: number;\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The Carousel allows the user to browse through a set of items.\n * The component is mostly used for showing a gallery of images, but can hold any other HTML element.\n * <br>\n * There are several ways to perform navigation:\n * <ul>\n * <li>on desktop - the user can navigate using the navigation arrows or with keyboard shorcuts.</li>\n * <li>on mobile - the user can use swipe gestures.</li>\n * </ul>\n *\n * <h3>Usage</h3>\n *\n * <h4>When to use:</h4>\n *\n * <ul>\n * <li>The items you want to display are very different from each other.</li>\n * <li>You want to display the items one after the other.</li>\n * </ul>\n *\n * <h4>When not to use:</h4>\n *\n * <ul>\n * <li>The items you want to display need to be visible at the same time.</li>\n * <li>The items you want to display are uniform and very similar.</li>\n * </ul>\n *\n * <h3>Keyboard Handling</h3>\n *\n * <h4>Basic Navigation</h4>\n * When the <code>ui5-carousel</code> is focused the user can navigate between the items\n * with the following keyboard shortcuts:\n * <br>\n * <ul>\n * <li>[UP/DOWN] - Navigates to previous and next item</li>\n * <li>[LEFT/RIGHT] - Navigates to previous and next item</li>\n * </ul>\n *\n * <h3>Fast Navigation</h3>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\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-carousel</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>content - Used to style the content of the component</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Carousel.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Carousel\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-carousel\n * @since 1.0.0-rc.6\n * @public\n */\n@customElement({\n\ttag: \"ui5-carousel\",\n\tlanguageAware: true,\n\tfastNavigation: true,\n\trenderer: litRender,\n\tstyles: CarouselCss,\n\ttemplate: CarouselTemplate,\n\tdependencies: [\n\t\tButton,\n\t\tLabel,\n\t],\n})\n/**\n * Fired whenever the page changes due to user interaction,\n * when the user clicks on the navigation arrows or while resizing,\n * based on the <code>items-per-page-l</code>, <code>items-per-page-m</code> and <code>items-per-page-s</code> properties.\n *\n * @event sap.ui.webc.main.Carousel#navigate\n * @param {Integer} selectedIndex the current selected index\n * @public\n * @since 1.0.0-rc.7\n */\n@event(\"navigate\", {\n\tdetail: {\n\t\tselectedIndex: { type: Integer },\n\t},\n})\n\nclass Carousel extends UI5Element {\n\t/**\n\t * Defines whether the carousel should loop, i.e show the first page after the last page is reached and vice versa.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.cyclic\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tcyclic!: boolean;\n\n\t/**\n\t * Defines the number of items per page on small size (up to 640px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageS\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageS!: number;\n\n\t/**\n\t * Defines the number of items per page on medium size (from 640px to 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageM\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageM!: number;\n\n\t/**\n\t * Defines the number of items per page on large size (more than 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageL\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageL!: number;\n\n\t/**\n\t * Defines the visibility of the navigation arrows.\n\t * If set to true the navigation arrows will be hidden.\n\t * <br><br>\n\t * <b>Note:</b> The navigation arrows are never displayed on touch devices.\n\t * In this case, the user can swipe to navigate through the items.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hideNavigationArrows\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideNavigationArrows!: boolean;\n\n\t/**\n\t * Defines the visibility of the page indicator.\n\t * If set to true the page indicator will be hidden.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hidePageIndicator\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thidePageIndicator!: boolean;\n\n\t/**\n\t * Defines the style of the page indicator.\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Default</code> - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)</li>\n\t * <li><code>Numeric</code> - The page indicator will display the current page and the total number of pages. (e.g. X of Y)</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CarouselPageIndicatorStyle}\n\t * @name sap.ui.webc.main.Carousel.prototype.pageIndicatorStyle\n\t * @since 1.10\n\t * @defaultvalue \"Default\"\n\t * @public\n\t */\n\t@property({ type: CarouselPageIndicatorStyle, defaultValue: CarouselPageIndicatorStyle.Default })\n\tpageIndicatorStyle!: CarouselPageIndicatorStyle;\n\n\t/**\n\t * Defines the index of the initially selected item.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype._selectedIndex\n\t * @defaultvalue 0\n\t * @private\n\t */\n\t@property({ validator: Integer, defaultValue: 0 })\n\t_selectedIndex!: number;\n\n\t/**\n\t * Defines the position of arrows.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Content</code></li>\n\t * <li><code>Navigation</code></li>\n\t * </ul>\n\t * <br>\n\t * When set to \"Content\", the arrows are placed on the sides of the current page.\n\t * <br>\n\t * When set to \"Navigation\", the arrows are placed on the sides of the page indicator.\n\t * @type {sap.ui.webc.main.types.CarouselArrowsPlacement}\n\t * @name sap.ui.webc.main.Carousel.prototype.arrowsPlacement\n\t * @defaultvalue \"Content\"\n\t * @public\n\t */\n\t@property({ type: CarouselArrowsPlacement, defaultValue: CarouselArrowsPlacement.Content })\n\tarrowsPlacement!: CarouselArrowsPlacement;\n\n\t/**\n\t * Defines the carousel width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_width?: number;\n\n\t/**\n\t * Defines the carousel item width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_itemWidth?: number;\n\n\t/**\n\t * If set to true navigation arrows are shown.\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_visibleNavigationArrows!: boolean;\n\n\t_scrollEnablement: ScrollEnablement;\n\t_onResizeBound: ResizeObserverCallback;\n\t_resizing: boolean;\n\t_lastFocusedElements: Array<HTMLElement>;\n\t_orderOfLastFocusedPages: Array<number>;\n\n\t/**\n\t * Defines the content of the component.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @name sap.ui.webc.main.Carousel.prototype.default\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcontent!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic get pageTypeLimit() {\n\t\treturn 9;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._scrollEnablement = new ScrollEnablement(this);\n\t\tthis._scrollEnablement.attachEvent(\"touchend\", e => {\n\t\t\tthis._updateScrolling(e);\n\t\t});\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._resizing = false; // indicates if the carousel is in process of resizing\n\n\t\tthis._lastFocusedElements = [];\n\t\tthis._orderOfLastFocusedPages = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\n\t\tthis.validateSelectedIndex();\n\t}\n\n\tonAfterRendering() {\n\t\tthis._scrollEnablement.scrollContainer = this.getDomRef()!;\n\t\tthis._resizing = false; // not invalidating\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t}\n\n\tvalidateSelectedIndex() {\n\t\tif (!this.isIndexInRange(this._selectedIndex)) {\n\t\t\tthis._selectedIndex = 0;\n\t\t}\n\t}\n\n\t_onResize() {\n\t\tconst previousItemsPerPage = this.effectiveItemsPerPage;\n\n\t\t// Set the resizing flag to suppress animation while resizing\n\t\tthis._resizing = true;\n\n\t\t// Change transitively effectiveItemsPerPage by modifying _width\n\t\tthis._width = this.offsetWidth;\n\t\tthis._itemWidth = Math.floor(this._width / this.effectiveItemsPerPage);\n\n\t\t// Items per page did not change or the current,\n\t\t// therefore page index does not need to be re-adjusted\n\t\tif (this.effectiveItemsPerPage === previousItemsPerPage) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._selectedIndex > this.pagesCount - 1) {\n\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_updateScrolling(e: ScrollEnablementEventListenerParam) {\n\t\tif (!e) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.isLeft) {\n\t\t\tthis.navigateLeft();\n\t\t} else if (e.isRight) {\n\t\t\tthis.navigateRight();\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tif (isF7(e)) {\n\t\t\tthis._handleF7Key(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target !== this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isLeft(e) || isDown(e)) {\n\t\t\tthis.navigateLeft();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t} else if (isRight(e) || isUp(e)) {\n\t\t\tthis.navigateRight();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (target === this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet pageIndex = -1;\n\t\tfor (let i = 0; i < this.content.length; i++) {\n\t\t\tif (this.content[i].contains(target)) {\n\t\t\t\tpageIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (pageIndex === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Save reference of the last focused element for each page\n\t\tthis._lastFocusedElements[pageIndex] = target;\n\n\t\tconst sortedPageIndex = this._orderOfLastFocusedPages.indexOf(pageIndex);\n\t\tif (sortedPageIndex === -1) {\n\t\t\tthis._orderOfLastFocusedPages.unshift(pageIndex);\n\t\t} else {\n\t\t\tthis._orderOfLastFocusedPages.splice(0, 0, this._orderOfLastFocusedPages.splice(sortedPageIndex, 1)[0]);\n\t\t}\n\t}\n\n\t_onmouseout() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = false;\n\t\t}\n\t}\n\n\t_onmouseover() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\t}\n\n\t_handleF7Key(e: KeyboardEvent) {\n\t\tconst lastFocusedElement = this._lastFocusedElements[this._getLastFocusedActivePageIndex];\n\n\t\tif (e.target === this.getDomRef() && lastFocusedElement) {\n\t\t\tlastFocusedElement.focus();\n\t\t} else {\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\tget _getLastFocusedActivePageIndex() {\n\t\tfor (let i = 0; i < this._orderOfLastFocusedPages.length; i++) {\n\t\t\tconst pageIndex = this._orderOfLastFocusedPages[i];\n\n\t\t\tif (this.isItemInViewport(pageIndex)) {\n\t\t\t\treturn pageIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn this._selectedIndex;\n\t}\n\n\tnavigateLeft() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex - 1 < 0) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\t}\n\t\t} else {\n\t\t\t--this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\tnavigateRight() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex + 1 > this.pagesCount - 1) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = 0;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t++this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_navButtonClick(e: MouseEvent) {\n\t\tconst button = e.target as Button;\n\t\tif (button.hasAttribute(\"arrow-forward\")) {\n\t\t\tthis.navigateRight();\n\t\t} else {\n\t\t\tthis.navigateLeft();\n\t\t}\n\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Changes the currently displayed page.\n\t * @param {Integer} itemIndex The index of the target page\n\t * @since 1.0.0-rc.15\n\t * @method\n\t * @name sap.ui.webc.main.Carousel#navigateTo\n\t * @public\n\t */\n\tnavigateTo(itemIndex: number) {\n\t\tthis._resizing = false;\n\t\tthis._selectedIndex = itemIndex;\n\t}\n\n\t/**\n\t * Assuming that all items have the same width\n\t * @private\n\t */\n\tget items() {\n\t\treturn this.content.map((item, idx) => {\n\t\t\tconst visible = this.isItemInViewport(idx);\n\t\t\treturn {\n\t\t\t\tid: `${this._id}-carousel-item-${idx + 1}`,\n\t\t\t\titem,\n\t\t\t\ttabIndex: visible ? \"0\" : \"-1\",\n\t\t\t\tposinset: `${idx + 1}`,\n\t\t\t\tsetsize: `${this.content.length}`,\n\t\t\t\tstyles: {\n\t\t\t\t\twidth: `${this._itemWidth || 0}px`,\n\t\t\t\t},\n\t\t\t\tclasses: visible ? \"\" : \"ui5-carousel-item--hidden\",\n\t\t\t};\n\t\t});\n\t}\n\n\tget effectiveItemsPerPage(): number {\n\t\tif (!this._width) {\n\t\t\treturn this.itemsPerPageL;\n\t\t}\n\n\t\tif (this._width <= 640) {\n\t\t\treturn this.itemsPerPageS;\n\t\t}\n\n\t\tif (this._width <= 1024) {\n\t\t\treturn this.itemsPerPageM;\n\t\t}\n\n\t\treturn this.itemsPerPageL;\n\t}\n\n\tisItemInViewport(index: number): boolean {\n\t\treturn index >= this._selectedIndex && index <= this._selectedIndex + this.effectiveItemsPerPage - 1;\n\t}\n\n\tisIndexInRange(index: number): boolean {\n\t\treturn index >= 0 && index <= this.pagesCount - 1;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tget renderNavigation() {\n\t\tif (!this.hasManyPages) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.hidePageIndicator) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tget hasManyPages() {\n\t\treturn this.pagesCount > 1;\n\t}\n\n\tget styles() {\n\t\tconst items = this._itemWidth || 0;\n\t\treturn {\n\t\t\tcontent: {\n\t\t\t\ttransform: `translateX(${this._isRTL ? \"\" : \"-\"}${this._selectedIndex * items}px`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tviewport: {\n\t\t\t\t\"ui5-carousel-viewport\": true,\n\t\t\t\t\"ui5-carousel-viewport--single\": this.pagesCount === 1,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-carousel-content\": true,\n\t\t\t\t\"ui5-carousel-content-no-animation\": this.suppressAnimation,\n\t\t\t\t\"ui5-carousel-content-has-navigation\": this.renderNavigation,\n\t\t\t\t\"ui5-carousel-content-has-navigation-and-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavigation: {\n\t\t\t\t\"ui5-carousel-navigation-wrapper\": true,\n\t\t\t\t\"ui5-carousel-navigation-with-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavPrevButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasPrev,\n\t\t\t},\n\t\t\tnavNextButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasNext,\n\t\t\t},\n\t\t};\n\t}\n\n\tget pagesCount() {\n\t\tconst items = this.content.length;\n\t\treturn items > this.effectiveItemsPerPage ? items - this.effectiveItemsPerPage + 1 : 1;\n\t}\n\n\tget isPageTypeDots() {\n\t\tif (this.pageIndicatorStyle === CarouselPageIndicatorStyle.Numeric) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.pagesCount < Carousel.pageTypeLimit;\n\t}\n\n\tget dots() {\n\t\tconst dots = [];\n\t\tconst pages = this.pagesCount;\n\n\t\tfor (let index = 0; index < pages; index++) {\n\t\t\tdots.push({\n\t\t\t\tactive: index === this._selectedIndex,\n\t\t\t\tariaLabel: Carousel.i18nBundle.getText(CAROUSEL_DOT_TEXT, index + 1, pages),\n\t\t\t});\n\t\t}\n\n\t\treturn dots;\n\t}\n\n\tget showArrows() {\n\t\tconst displayArrows = this._visibleNavigationArrows && this.hasManyPages && isDesktop();\n\n\t\treturn {\n\t\t\tcontent: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Content,\n\t\t\tnavigation: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Navigation,\n\t\t};\n\t}\n\n\tget hasPrev() {\n\t\treturn this.cyclic || this._selectedIndex - 1 >= 0;\n\t}\n\n\tget hasNext() {\n\t\treturn this.cyclic || this._selectedIndex + 1 <= this.pagesCount - 1;\n\t}\n\n\tget suppressAnimation() {\n\t\treturn this._resizing || getAnimationMode() === AnimationMode.None;\n\t}\n\n\tget _isRTL() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget selectedIndexToShow() {\n\t\treturn this._isRTL ? this.pagesCount - (this.pagesCount - this._selectedIndex) + 1 : this._selectedIndex + 1;\n\t}\n\n\tget ofText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_OF_TEXT);\n\t}\n\n\tget ariaActiveDescendant() {\n\t\treturn this.content.length ? `${this._id}-carousel-item-${this._selectedIndex + 1}` : undefined;\n\t}\n\n\tget nextPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_NEXT_ARROW_TEXT);\n\t}\n\n\tget previousPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_PREVIOUS_ARROW_TEXT);\n\t}\n\n\t/**\n\t * The indices of the currently visible items of the component.\n\t * @public\n\t * @readonly\n\t * @since 1.0.0-rc.15\n\t * @returns {Integer[]} the indices of the visible items\n\t */\n\tget visibleItemsIndices() {\n\t\tconst visibleItemsIndices: Array<number> = [];\n\n\t\tthis.items.forEach((item, index) => {\n\t\t\tif (this.isItemInViewport(index)) {\n\t\t\t\tvisibleItemsIndices.push(index);\n\t\t\t}\n\t\t});\n\n\t\treturn visibleItemsIndices;\n\t}\n\n\tstatic async onDefine() {\n\t\tCarousel.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCarousel.define();\n\nexport default Carousel;\nexport type {\n\tCarouselNavigateEventDetail,\n};\n"]}
@@ -31,6 +31,16 @@ import type { IFormElement } from "./features/InputElementsFormSupport.js";
31
31
  * property to <code>true</code>.
32
32
  *
33
33
  * <br><br>
34
+ * <h3>CSS Shadow Parts</h3>
35
+ *
36
+ * <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.
37
+ * <br>
38
+ * The <code>ui5-checkbox</code> exposes the following CSS Shadow Parts:
39
+ * <ul>
40
+ * <li>root - Used to style the outermost wrapper of the <code>ui5-checkbox</code></li>
41
+ * </ul>
42
+ *
43
+ * <br><br>
34
44
  * <h3>Keyboard Handling</h3>
35
45
  *
36
46
  * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.
package/dist/CheckBox.js CHANGED
@@ -55,6 +55,16 @@ let activeCb;
55
55
  * property to <code>true</code>.
56
56
  *
57
57
  * <br><br>
58
+ * <h3>CSS Shadow Parts</h3>
59
+ *
60
+ * <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.
61
+ * <br>
62
+ * The <code>ui5-checkbox</code> exposes the following CSS Shadow Parts:
63
+ * <ul>
64
+ * <li>root - Used to style the outermost wrapper of the <code>ui5-checkbox</code></li>
65
+ * </ul>
66
+ *
67
+ * <br><br>
58
68
  * <h3>Keyboard Handling</h3>
59
69
  *
60
70
  * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.
@@ -1 +1 @@
1
- {"version":3,"file":"CheckBox.js","sourceR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,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;4CACtC;AAiBxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;8CACtC;AAoB5B;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>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,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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AAO,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;4CACtC;AAiBxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;8CACtC;AAoB5B;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"]}
package/dist/Icon.d.ts CHANGED
@@ -73,6 +73,17 @@ import IconDesign from "./types/IconDesign.js";
73
73
  * <code>&lt;ui5-icon name="tnt/antenna">&lt;/ui5-icon></code><br>
74
74
  * <code>&lt;ui5-icon name="business-suite/ab-testing">&lt;/ui5-icon></code>
75
75
  *
76
+ * <br><br>
77
+ * <h3>CSS Shadow Parts</h3>
78
+ *
79
+ * <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.
80
+ * <br>
81
+ * The <code>ui5-icon</code> exposes the following CSS Shadow Parts:
82
+ * <ul>
83
+ * <li>root - Used to style the outermost wrapper of the <code>ui5-icon</code></li>
84
+ * </ul>
85
+ *
86
+ * <br><br>
76
87
  * <h3>Keyboard Handling</h3>
77
88
  *
78
89
  * <ul>
package/dist/Icon.js CHANGED
@@ -91,6 +91,17 @@ const PRESENTATION_ROLE = "presentation";
91
91
  * <code>&lt;ui5-icon name="tnt/antenna">&lt;/ui5-icon></code><br>
92
92
  * <code>&lt;ui5-icon name="business-suite/ab-testing">&lt;/ui5-icon></code>
93
93
  *
94
+ * <br><br>
95
+ * <h3>CSS Shadow Parts</h3>
96
+ *
97
+ * <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.
98
+ * <br>
99
+ * The <code>ui5-icon</code> exposes the following CSS Shadow Parts:
100
+ * <ul>
101
+ * <li>root - Used to style the outermost wrapper of the <code>ui5-icon</code></li>
102
+ * </ul>
103
+ *
104
+ * <br><br>
94
105
  * <h3>Keyboard Handling</h3>
95
106
  *
96
107
  * <ul>
package/dist/Icon.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAY,MAAM,wDAAwD,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,eAAe,MAAM,0DAA0D,CAAC;AACvF,OAAO,YAAY,MAAM,2CAA2C,CAAC;AACrE,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAE/C,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAErD,MAAM,cAAc,GAAG,gBAAgB,CAAC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/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { getIconData, getIconDataSync, IconData } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport IconTemplate from \"./generated/templates/IconTemplate.lit.js\";\nimport IconDesign from \"./types/IconDesign.js\";\n\n// Styles\nimport iconCss from \"./generated/themes/Icon.css.js\";\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\nconst PRESENTATION_ROLE = \"presentation\";\n\n/**\n * @class\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-icon</code> component represents an SVG icon.\n * There are two main scenarios how the <code>ui5-icon</code> component is used:\n * as a purely decorative element, <br>\n * or as an interactive element that can be focused and clicked.\n *\n * <h3>Usage</h3>\n *\n * 1. <b>Get familiar with the icons collections.</b>\n * <br>\n * Before displaying an icon, you need to explore the icons collections to find and import the desired icon.\n * <br>\n * Currently there are 3 icons collection, available as 3 npm packages:\n * <br>\n *\n * <ul>\n * <li>\n * <ui5-link target=\"_blank\" href=\"https://www.npmjs.com/package/@ui5/webcomponents-icons\">@ui5/webcomponents-icons</ui5-link> represents the \"SAP-icons\" collection and includes the following\n * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons\">icons</ui5-link>.\n * </li>\n * <li>\n * <ui5-link target=\"_blank\" href=\"https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt\">@ui5/webcomponents-icons-tnt</ui5-link> represents the \"tnt\" collection and includes the following\n * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT\">icons</ui5-link>.\n * </li>\n * <li>\n * <ui5-link target=\"_blank\" href=\"https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite\">@ui5/webcomponents-icons-icons-business-suite</ui5-link> represents the \"business-suite\" collection and includes the following\n * <ui5-link target=\"_blank\" href=\"https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols\">icons</ui5-link>.\n * </li>\n * </ul>\n *\n * 2. <b>After exploring the icons collections, add one or more of the packages as dependencies to your project.</b>\n * <br>\n * <code>npm i @ui5/webcomponents-icons</code><br>\n * <code>npm i @ui5/webcomponents-icons-tnt</code><br>\n * <code>npm i @ui5/webcomponents-icons-business-suite</code>\n * <br><br>\n *\n * 3. <b>Then, import the desired icon</b>.\n * <br>\n * <code>import \"@ui5/{package_name}/dist/{icon_name}.js\";</code>\n * <br><br>\n *\n * <b>For Example</b>:\n * <br>\n *\n * For the standard \"SAP-icons\" icon collection, import an icon from the <code>@ui5/webcomponents-icons</code> package:\n * <br>\n * <code>import \"@ui5/webcomponents-icons/dist/employee.js\";</code>\n * <br><br>\n *\n * For the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the <code>@ui5/webcomponents-icons-tnt</code> package:\n * <br>\n * <code>import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";</code>\n * <br><br>\n *\n * For the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the <code>@ui5/webcomponents-icons-business-suite</code> package:\n * <br>\n * <code>import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";</code>\n * <br><br>\n *\n * 4. <b>Display the icon using the <code>ui5-icon</code> web component.</b><br>\n * Set the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)<br>\n * and the icon name to the <code>name</code> property.\n * <br><br>\n *\n * <code>&lt;ui5-icon name=\"employee\">&lt;/ui5-icon></code><br>\n * <code>&lt;ui5-icon name=\"tnt/antenna\">&lt;/ui5-icon></code><br>\n * <code>&lt;ui5-icon name=\"business-suite/ab-testing\">&lt;/ui5-icon></code>\n *\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] or [ENTER],[RETURN] is pressed, pressing [SHIFT] releases the ui5-icon without triggering the click event.</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Icon.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Icon\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-icon\n * @implements sap.ui.webc.main.IIcon\n * @public\n */\n@customElement({\n\ttag: \"ui5-icon\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: litRender,\n\ttemplate: IconTemplate,\n\tstyles: iconCss,\n})\n/**\n * Fired on mouseup, <code>SPACE</code> and <code>ENTER</code>.\n * - on mouse click, the icon fires native <code>click</code> event\n * - on <code>SPACE</code> and <code>ENTER</code>, the icon fires custom <code>click</code> event\n * @private\n * @since 1.0.0-rc.8\n */\n@event(\"click\")\nclass Icon extends UI5Element {\n\t/**\n\t * Defines the component semantic design.\n\t *\n\t * <br><br>\n\t * <b>The available values are:</b>\n\t *\n\t * <ul>\n\t * <li><code>Contrast</code></li>\n\t * <li><code>Critical</code></li>\n\t * <li><code>Default</code></li>\n\t * <li><code>Information</code></li>\n\t * <li><code>Negative</code></li>\n\t * <li><code>Neutral</code></li>\n\t * <li><code>NonInteractive</code></li>\n\t * <li><code>Positive</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.IconDesign}\n\t * @name sap.ui.webc.main.Icon.prototype.design\n\t * @defaultvalue \"Default\"\n\t * @public\n\t * @since 1.9.2\n\t */\n\t@property({ type: IconDesign, defaultValue: IconDesign.Default })\n\tdesign!: IconDesign;\n\n\t/**\n\t * Defines if the icon is interactive (focusable and pressable)\n\t * @name sap.ui.webc.main.Icon.prototype.interactive\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t */\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Defines the unique identifier (icon name) of the component.\n\t * <br>\n\t *\n\t * To browse all available icons, see the\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">SAP Icons</ui5-link>,\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT\">SAP Fiori Tools</ui5-link> and\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">SAP Business Suite</ui5-link> collections.\n\t * <br>\n\t *\n\t * Example:\n\t * <br>\n\t * <code>name='add'</code>, <code>name='delete'</code>, <code>name='employee'</code>.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> To use the SAP Fiori Tools icons,\n\t * you need to set the <code>tnt</code> prefix in front of the icon's name.\n\t * <br>\n\t *\n\t * Example:\n\t * <br>\n\t * <code>name='tnt/antenna'</code>, <code>name='tnt/actor'</code>, <code>name='tnt/api'</code>.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> To use the SAP Business Suite icons,\n\t * you need to set the <code>business-suite</code> prefix in front of the icon's name.\n\t * <br>\n\t *\n\t * Example:\n\t * <br>\n\t * <code>name='business-suite/3d'</code>, <code>name='business-suite/1x2-grid-layout'</code>, <code>name='business-suite/4x4-grid-layout'</code>.\n\t * @name sap.ui.webc.main.Icon.prototype.name\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\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 * <br><br>\n\t * <b>Note:</b> Every icon should have a text alternative in order to\n\t * calculate its accessible name.\n\t *\n\t * @name sap.ui.webc.main.Icon.prototype.accessibleName\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component should have a tooltip.\n\t * <br><br>\n\t * <b>Note:</b> The tooltip text should be provided via the <code>accessible-name</code> property.\n\t *\n\t * @name sap.ui.webc.main.Icon.prototype.showTooltip\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip!: boolean;\n\n\t/**\n\t * Defines the accessibility role of the component.\n\t * @name sap.ui.webc.main.Icon.prototype.accessibleRole\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleRole!: string;\n\n\t/**\n\t * Defines the ARIA hidden state of the component.\n\t * Note: If the role is presentation the default value of aria-hidden will be true.\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tariaHidden!: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ multiple: true })\n\tpathData!: Array<string>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object, defaultValue: undefined, noAttribute: true })\n\taccData?: I18nText;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\tinvalid!: boolean;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true, defaultValue: undefined })\n\teffectiveAccessibleName?: string;\n\n\tltr?: boolean;\n\tpackageName?: string;\n\tviewBox?: string;\n\tcustomSvg?: object;\n\n\t_onfocusout?: ((event: FocusEvent) => void);\n\t_onfocusin?: ((event: FocusEvent) => void);\n\n\t_onFocusInHandler() {\n\t\tif (this.interactive) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_onFocusOutHandler() {\n\t\tthis.focused = false;\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 && isSpace(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\t}\n\n\t/**\n\t* Enforce \"ltr\" direction, based on the icons collection metadata.\n\t*/\n\tget _dir() {\n\t\treturn this.ltr ? \"ltr\" : undefined;\n\t}\n\n\tget effectiveAriaHidden() {\n\t\tif (this.ariaHidden === \"\") {\n\t\t\tif (this.isDecorative) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.ariaHidden;\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.interactive ? \"0\" : undefined;\n\t}\n\n\tget isDecorative() {\n\t\treturn this.effectiveAccessibleRole === PRESENTATION_ROLE;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\tif (this.accessibleRole) {\n\t\t\treturn this.accessibleRole;\n\t\t}\n\n\t\tif (this.interactive) {\n\t\t\treturn \"button\";\n\t\t}\n\n\t\treturn this.effectiveAccessibleName ? \"img\" : PRESENTATION_ROLE;\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst name = this.name;\n\t\tif (!name) {\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(\"Icon name property is required\", this);\n\t\t}\n\n\t\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\t\tif (!iconData) {\n\t\t\ticonData = await getIconData(name);\n\t\t}\n\n\t\tif (!iconData) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. Invalid icon name: ${this.name}`);\n\t\t}\n\n\t\tif (iconData === ICON_NOT_FOUND) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. You can either import the icon as a module in order to use it e.g. \"@ui5/webcomponents-icons/dist/${name.replace(\"sap-icon://\", \"\")}.js\", or setup a JSON build step and import \"@ui5/webcomponents-icons/dist/AllIcons.js\".`);\n\t\t}\n\n\t\tthis.viewBox = iconData.viewBox || \"0 0 512 512\";\n\n\t\tif (iconData.customTemplate) {\n\t\t\ticonData.pathData = [];\n\t\t\tthis.customSvg = executeTemplate(iconData.customTemplate, this);\n\t\t}\n\n\t\t// in case a new valid name is set, show the icon\n\t\tthis.invalid = false;\n\t\tthis.pathData = Array.isArray(iconData.pathData) ? iconData.pathData : [iconData.pathData];\n\t\tthis.accData = iconData.accData;\n\t\tthis.ltr = iconData.ltr;\n\t\tthis.packageName = iconData.packageName;\n\n\t\tthis._onfocusout = this.interactive ? this._onFocusOutHandler.bind(this) : undefined;\n\t\tthis._onfocusin = this.interactive ? this._onFocusInHandler.bind(this) : undefined;\n\n\t\tif (this.accessibleName) {\n\t\t\tthis.effectiveAccessibleName = this.accessibleName;\n\t\t} else if (this.accData) {\n\t\t\tconst i18nBundle = await getI18nBundle(this.packageName);\n\t\t\tthis.effectiveAccessibleName = i18nBundle.getText(this.accData) || undefined;\n\t\t} else {\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t}\n\t}\n\n\tget hasIconTooltip() {\n\t\treturn this.showTooltip && this.effectiveAccessibleName;\n\t}\n}\n\nIcon.define();\n\nexport default Icon;\n"]}
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM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AW,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;qDACxB;AAzJ5B,IAAI;IAhBT,aAAa,CAAC;QACd,GAAG,EAAE,UAAU;QACf,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,OAAO;KACf,CAAC;IACF;;;;;;OAMG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,IAAI,CA8RT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { getIconData, getIconDataSync, IconData } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport IconTemplate from \"./generated/templates/IconTemplate.lit.js\";\nimport IconDesign from \"./types/IconDesign.js\";\n\n// Styles\nimport iconCss from \"./generated/themes/Icon.css.js\";\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\nconst PRESENTATION_ROLE = \"presentation\";\n\n/**\n * @class\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-icon</code> component represents an SVG icon.\n * There are two main scenarios how the <code>ui5-icon</code> component is used:\n * as a purely decorative element, <br>\n * or as an interactive element that can be focused and clicked.\n *\n * <h3>Usage</h3>\n *\n * 1. <b>Get familiar with the icons collections.</b>\n * <br>\n * Before displaying an icon, you need to explore the icons collections to find and import the desired icon.\n * <br>\n * Currently there are 3 icons collection, available as 3 npm packages:\n * <br>\n *\n * <ul>\n * <li>\n * <ui5-link target=\"_blank\" href=\"https://www.npmjs.com/package/@ui5/webcomponents-icons\">@ui5/webcomponents-icons</ui5-link> represents the \"SAP-icons\" collection and includes the following\n * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons\">icons</ui5-link>.\n * </li>\n * <li>\n * <ui5-link target=\"_blank\" href=\"https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt\">@ui5/webcomponents-icons-tnt</ui5-link> represents the \"tnt\" collection and includes the following\n * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT\">icons</ui5-link>.\n * </li>\n * <li>\n * <ui5-link target=\"_blank\" href=\"https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite\">@ui5/webcomponents-icons-icons-business-suite</ui5-link> represents the \"business-suite\" collection and includes the following\n * <ui5-link target=\"_blank\" href=\"https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols\">icons</ui5-link>.\n * </li>\n * </ul>\n *\n * 2. <b>After exploring the icons collections, add one or more of the packages as dependencies to your project.</b>\n * <br>\n * <code>npm i @ui5/webcomponents-icons</code><br>\n * <code>npm i @ui5/webcomponents-icons-tnt</code><br>\n * <code>npm i @ui5/webcomponents-icons-business-suite</code>\n * <br><br>\n *\n * 3. <b>Then, import the desired icon</b>.\n * <br>\n * <code>import \"@ui5/{package_name}/dist/{icon_name}.js\";</code>\n * <br><br>\n *\n * <b>For Example</b>:\n * <br>\n *\n * For the standard \"SAP-icons\" icon collection, import an icon from the <code>@ui5/webcomponents-icons</code> package:\n * <br>\n * <code>import \"@ui5/webcomponents-icons/dist/employee.js\";</code>\n * <br><br>\n *\n * For the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the <code>@ui5/webcomponents-icons-tnt</code> package:\n * <br>\n * <code>import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";</code>\n * <br><br>\n *\n * For the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the <code>@ui5/webcomponents-icons-business-suite</code> package:\n * <br>\n * <code>import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";</code>\n * <br><br>\n *\n * 4. <b>Display the icon using the <code>ui5-icon</code> web component.</b><br>\n * Set the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)<br>\n * and the icon name to the <code>name</code> property.\n * <br><br>\n *\n * <code>&lt;ui5-icon name=\"employee\">&lt;/ui5-icon></code><br>\n * <code>&lt;ui5-icon name=\"tnt/antenna\">&lt;/ui5-icon></code><br>\n * <code>&lt;ui5-icon name=\"business-suite/ab-testing\">&lt;/ui5-icon></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-icon</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>root - Used to style the outermost wrapper of the <code>ui5-icon</code></li>\n * </ul>\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] or [ENTER],[RETURN] is pressed, pressing [SHIFT] releases the ui5-icon without triggering the click event.</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Icon.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Icon\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-icon\n * @implements sap.ui.webc.main.IIcon\n * @public\n */\n@customElement({\n\ttag: \"ui5-icon\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: litRender,\n\ttemplate: IconTemplate,\n\tstyles: iconCss,\n})\n/**\n * Fired on mouseup, <code>SPACE</code> and <code>ENTER</code>.\n * - on mouse click, the icon fires native <code>click</code> event\n * - on <code>SPACE</code> and <code>ENTER</code>, the icon fires custom <code>click</code> event\n * @private\n * @since 1.0.0-rc.8\n */\n@event(\"click\")\nclass Icon extends UI5Element {\n\t/**\n\t * Defines the component semantic design.\n\t *\n\t * <br><br>\n\t * <b>The available values are:</b>\n\t *\n\t * <ul>\n\t * <li><code>Contrast</code></li>\n\t * <li><code>Critical</code></li>\n\t * <li><code>Default</code></li>\n\t * <li><code>Information</code></li>\n\t * <li><code>Negative</code></li>\n\t * <li><code>Neutral</code></li>\n\t * <li><code>NonInteractive</code></li>\n\t * <li><code>Positive</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.IconDesign}\n\t * @name sap.ui.webc.main.Icon.prototype.design\n\t * @defaultvalue \"Default\"\n\t * @public\n\t * @since 1.9.2\n\t */\n\t@property({ type: IconDesign, defaultValue: IconDesign.Default })\n\tdesign!: IconDesign;\n\n\t/**\n\t * Defines if the icon is interactive (focusable and pressable)\n\t * @name sap.ui.webc.main.Icon.prototype.interactive\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t */\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Defines the unique identifier (icon name) of the component.\n\t * <br>\n\t *\n\t * To browse all available icons, see the\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">SAP Icons</ui5-link>,\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT\">SAP Fiori Tools</ui5-link> and\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">SAP Business Suite</ui5-link> collections.\n\t * <br>\n\t *\n\t * Example:\n\t * <br>\n\t * <code>name='add'</code>, <code>name='delete'</code>, <code>name='employee'</code>.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> To use the SAP Fiori Tools icons,\n\t * you need to set the <code>tnt</code> prefix in front of the icon's name.\n\t * <br>\n\t *\n\t * Example:\n\t * <br>\n\t * <code>name='tnt/antenna'</code>, <code>name='tnt/actor'</code>, <code>name='tnt/api'</code>.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> To use the SAP Business Suite icons,\n\t * you need to set the <code>business-suite</code> prefix in front of the icon's name.\n\t * <br>\n\t *\n\t * Example:\n\t * <br>\n\t * <code>name='business-suite/3d'</code>, <code>name='business-suite/1x2-grid-layout'</code>, <code>name='business-suite/4x4-grid-layout'</code>.\n\t * @name sap.ui.webc.main.Icon.prototype.name\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\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 * <br><br>\n\t * <b>Note:</b> Every icon should have a text alternative in order to\n\t * calculate its accessible name.\n\t *\n\t * @name sap.ui.webc.main.Icon.prototype.accessibleName\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component should have a tooltip.\n\t * <br><br>\n\t * <b>Note:</b> The tooltip text should be provided via the <code>accessible-name</code> property.\n\t *\n\t * @name sap.ui.webc.main.Icon.prototype.showTooltip\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip!: boolean;\n\n\t/**\n\t * Defines the accessibility role of the component.\n\t * @name sap.ui.webc.main.Icon.prototype.accessibleRole\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleRole!: string;\n\n\t/**\n\t * Defines the ARIA hidden state of the component.\n\t * Note: If the role is presentation the default value of aria-hidden will be true.\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tariaHidden!: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ multiple: true })\n\tpathData!: Array<string>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object, defaultValue: undefined, noAttribute: true })\n\taccData?: I18nText;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\tinvalid!: boolean;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true, defaultValue: undefined })\n\teffectiveAccessibleName?: string;\n\n\tltr?: boolean;\n\tpackageName?: string;\n\tviewBox?: string;\n\tcustomSvg?: object;\n\n\t_onfocusout?: ((event: FocusEvent) => void);\n\t_onfocusin?: ((event: FocusEvent) => void);\n\n\t_onFocusInHandler() {\n\t\tif (this.interactive) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_onFocusOutHandler() {\n\t\tthis.focused = false;\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 && isSpace(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\t}\n\n\t/**\n\t* Enforce \"ltr\" direction, based on the icons collection metadata.\n\t*/\n\tget _dir() {\n\t\treturn this.ltr ? \"ltr\" : undefined;\n\t}\n\n\tget effectiveAriaHidden() {\n\t\tif (this.ariaHidden === \"\") {\n\t\t\tif (this.isDecorative) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.ariaHidden;\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.interactive ? \"0\" : undefined;\n\t}\n\n\tget isDecorative() {\n\t\treturn this.effectiveAccessibleRole === PRESENTATION_ROLE;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\tif (this.accessibleRole) {\n\t\t\treturn this.accessibleRole;\n\t\t}\n\n\t\tif (this.interactive) {\n\t\t\treturn \"button\";\n\t\t}\n\n\t\treturn this.effectiveAccessibleName ? \"img\" : PRESENTATION_ROLE;\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst name = this.name;\n\t\tif (!name) {\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(\"Icon name property is required\", this);\n\t\t}\n\n\t\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\t\tif (!iconData) {\n\t\t\ticonData = await getIconData(name);\n\t\t}\n\n\t\tif (!iconData) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. Invalid icon name: ${this.name}`);\n\t\t}\n\n\t\tif (iconData === ICON_NOT_FOUND) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. You can either import the icon as a module in order to use it e.g. \"@ui5/webcomponents-icons/dist/${name.replace(\"sap-icon://\", \"\")}.js\", or setup a JSON build step and import \"@ui5/webcomponents-icons/dist/AllIcons.js\".`);\n\t\t}\n\n\t\tthis.viewBox = iconData.viewBox || \"0 0 512 512\";\n\n\t\tif (iconData.customTemplate) {\n\t\t\ticonData.pathData = [];\n\t\t\tthis.customSvg = executeTemplate(iconData.customTemplate, this);\n\t\t}\n\n\t\t// in case a new valid name is set, show the icon\n\t\tthis.invalid = false;\n\t\tthis.pathData = Array.isArray(iconData.pathData) ? iconData.pathData : [iconData.pathData];\n\t\tthis.accData = iconData.accData;\n\t\tthis.ltr = iconData.ltr;\n\t\tthis.packageName = iconData.packageName;\n\n\t\tthis._onfocusout = this.interactive ? this._onFocusOutHandler.bind(this) : undefined;\n\t\tthis._onfocusin = this.interactive ? this._onFocusInHandler.bind(this) : undefined;\n\n\t\tif (this.accessibleName) {\n\t\t\tthis.effectiveAccessibleName = this.accessibleName;\n\t\t} else if (this.accData) {\n\t\t\tconst i18nBundle = await getI18nBundle(this.packageName);\n\t\t\tthis.effectiveAccessibleName = i18nBundle.getText(this.accData) || undefined;\n\t\t} else {\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t}\n\t}\n\n\tget hasIconTooltip() {\n\t\treturn this.showTooltip && this.effectiveAccessibleName;\n\t}\n}\n\nIcon.define();\n\nexport default Icon;\n"]}
package/dist/Menu.d.ts CHANGED
@@ -68,6 +68,26 @@ declare class Menu extends UI5Element {
68
68
  * @since 1.10.0
69
69
  */
70
70
  open: boolean;
71
+ /**
72
+ * Defines if a loading indicator would be displayed inside the corresponding ui5-menu popover.
73
+ *
74
+ * @name sap.ui.webc.main.Menu.prototype.busy
75
+ * @type {boolean}
76
+ * @defaultvalue false
77
+ * @public
78
+ * @since 1.13.0
79
+ */
80
+ busy: boolean;
81
+ /**
82
+ * Defines the delay in milliseconds, after which the busy indicator will be displayed inside the corresponding ui5-menu popover..
83
+ *
84
+ * @name sap.ui.webc.main.Menu.prototype.busyDelay
85
+ * @type {sap.ui.webc.base.types.Integer}
86
+ * @defaultValue 1000
87
+ * @public
88
+ * @since 1.13.0
89
+ */
90
+ busyDelay: number;
71
91
  /**
72
92
  * Defines the ID or DOM Reference of the element that the menu is shown at
73
93
  *
@@ -168,6 +188,7 @@ declare class Menu extends UI5Element {
168
188
  _prepareSubMenuDesktopTablet(item: MenuItem, opener: HTMLElement, actionId: string): void;
169
189
  _prepareSubMenuPhone(item: MenuItem): void;
170
190
  _itemMouseOver(e: MouseEvent): void;
191
+ _busyMouseOver(): void;
171
192
  _itemMouseOut(e: MouseEvent): void;
172
193
  _itemKeyDown(e: KeyboardEvent): void;
173
194
  _itemClick(e: CustomEvent<ClickEventDetail>): void;