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

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 (508) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/Avatar.d.ts +20 -0
  3. package/dist/Avatar.js +25 -11
  4. package/dist/Avatar.js.map +1 -1
  5. package/dist/CheckBox.js +2 -1
  6. package/dist/CheckBox.js.map +1 -1
  7. package/dist/Dialog.d.ts +8 -0
  8. package/dist/Dialog.js +4 -0
  9. package/dist/Dialog.js.map +1 -1
  10. package/dist/Option.d.ts +1 -0
  11. package/dist/Option.js +1 -0
  12. package/dist/Option.js.map +1 -1
  13. package/dist/Panel.d.ts +15 -0
  14. package/dist/Panel.js +6 -0
  15. package/dist/Panel.js.map +1 -1
  16. package/dist/SliderBase.d.ts +0 -1
  17. package/dist/SliderBase.js +0 -1
  18. package/dist/SliderBase.js.map +1 -1
  19. package/dist/Switch.d.ts +42 -1
  20. package/dist/Switch.js +30 -2
  21. package/dist/Switch.js.map +1 -1
  22. package/dist/TabSeparator.d.ts +1 -0
  23. package/dist/TabSeparator.js +1 -0
  24. package/dist/TabSeparator.js.map +1 -1
  25. package/dist/TimePicker.d.ts +1 -0
  26. package/dist/TimePicker.js +3 -0
  27. package/dist/TimePicker.js.map +1 -1
  28. package/dist/Tokenizer.js +5 -2
  29. package/dist/Tokenizer.js.map +1 -1
  30. package/dist/api.json +1 -1
  31. package/dist/assets/Panel.610c9d97.css +1 -0
  32. package/dist/assets/{Switch.ab07b3d6.css → Switch.201b66b4.css} +1 -1
  33. package/dist/assets/messagebundle_ar.38fc245f.js +1 -0
  34. package/dist/assets/messagebundle_bg.e37d62ed.js +1 -0
  35. package/dist/assets/messagebundle_ca.a3087412.js +1 -0
  36. package/dist/assets/messagebundle_cs.8201ca03.js +1 -0
  37. package/dist/assets/messagebundle_cy.9f3ae845.js +1 -0
  38. package/dist/assets/messagebundle_da.945e42db.js +1 -0
  39. package/dist/assets/messagebundle_de.bb305427.js +1 -0
  40. package/dist/assets/messagebundle_el.a36dfdb0.js +1 -0
  41. package/dist/assets/messagebundle_en.bb633f22.js +1 -0
  42. package/dist/assets/messagebundle_en_GB.76f630be.js +1 -0
  43. package/dist/assets/messagebundle_en_US_sappsd.6f3c36f1.js +1 -0
  44. package/dist/assets/{messagebundle_en_US_saprigi.5ff4c5b6.js → messagebundle_en_US_saprigi.ab2f7752.js} +1 -1
  45. package/dist/assets/messagebundle_en_US_saptrc.3c5c9f29.js +1 -0
  46. package/dist/assets/messagebundle_es.e3a4852e.js +1 -0
  47. package/dist/assets/messagebundle_es_MX.9cca1c08.js +1 -0
  48. package/dist/assets/messagebundle_et.a0ba005f.js +1 -0
  49. package/dist/assets/messagebundle_fi.f63fc946.js +1 -0
  50. package/dist/assets/messagebundle_fr.8e446595.js +1 -0
  51. package/dist/assets/messagebundle_fr_CA.ec2d54be.js +1 -0
  52. package/dist/assets/messagebundle_hi.4d509425.js +1 -0
  53. package/dist/assets/messagebundle_hr.c54f0729.js +1 -0
  54. package/dist/assets/messagebundle_hu.d604f66c.js +1 -0
  55. package/dist/assets/messagebundle_it.8ec36217.js +1 -0
  56. package/dist/assets/messagebundle_iw.977d877f.js +1 -0
  57. package/dist/assets/messagebundle_ja.b8fb62f3.js +1 -0
  58. package/dist/assets/messagebundle_kk.fb530aff.js +1 -0
  59. package/dist/assets/messagebundle_ko.d0e0041a.js +1 -0
  60. package/dist/assets/messagebundle_lt.890220d5.js +1 -0
  61. package/dist/assets/messagebundle_lv.ee598ceb.js +1 -0
  62. package/dist/assets/messagebundle_ms.1287d1a7.js +1 -0
  63. package/dist/assets/messagebundle_nl.08d4eee5.js +1 -0
  64. package/dist/assets/messagebundle_no.7c8de9d3.js +1 -0
  65. package/dist/assets/messagebundle_pl.58636cbe.js +1 -0
  66. package/dist/assets/messagebundle_pt.1a8ac668.js +1 -0
  67. package/dist/assets/messagebundle_pt_PT.58717716.js +1 -0
  68. package/dist/assets/messagebundle_ro.05bb3fb8.js +1 -0
  69. package/dist/assets/messagebundle_ru.f0d249d9.js +1 -0
  70. package/dist/assets/messagebundle_sh.1e6cd04e.js +1 -0
  71. package/dist/assets/messagebundle_sk.a79dfced.js +1 -0
  72. package/dist/assets/messagebundle_sl.b30f0404.js +1 -0
  73. package/dist/assets/messagebundle_sv.17a648bd.js +1 -0
  74. package/dist/assets/messagebundle_th.ed642bdf.js +1 -0
  75. package/dist/assets/messagebundle_tr.313c5258.js +1 -0
  76. package/dist/assets/messagebundle_uk.b372813e.js +1 -0
  77. package/dist/assets/messagebundle_vi.9a2c9ebf.js +1 -0
  78. package/dist/assets/messagebundle_zh_CN.e61c89fe.js +1 -0
  79. package/dist/assets/messagebundle_zh_TW.f9bbb34a.js +1 -0
  80. package/dist/assets/{parameters-bundle.css.38cb80ec.js → parameters-bundle.css.044e02a2.js} +7 -2
  81. package/dist/assets/{parameters-bundle.css.169ca31c.js → parameters-bundle.css.29a89ef5.js} +7 -1
  82. package/dist/assets/{parameters-bundle.css.32fe7583.js → parameters-bundle.css.351dbe3d.js} +6 -1
  83. package/dist/assets/{parameters-bundle.css.3bf8316f.js → parameters-bundle.css.35812cd9.js} +6 -1
  84. package/dist/assets/{parameters-bundle.css.e43900d4.js → parameters-bundle.css.435d2711.js} +8 -1
  85. package/dist/assets/{parameters-bundle.css.13511e8e.js → parameters-bundle.css.841bfc38.js} +7 -1
  86. package/dist/assets/{parameters-bundle.css.c33b3381.js → parameters-bundle.css.94ca9bb3.js} +8 -1
  87. package/dist/assets/{parameters-bundle.css.b8ce3a86.js → parameters-bundle.css.c903b684.js} +8 -1
  88. package/dist/assets/{parameters-bundle.css.b2aa72d6.js → parameters-bundle.css.edefe6fd.js} +7 -1
  89. package/dist/assets/{parameters-bundle.css.7d4be06d.js → parameters-bundle.css.eeb6f2f4.js} +7 -1
  90. package/dist/assets/{parameters-bundle.css.bf7d5006.js → parameters-bundle.css.f08c2cbc.js} +8 -1
  91. package/dist/assets/{parameters-bundle.css.f9f9a3af.js → parameters-bundle.css.f915a8f5.js} +9 -1
  92. package/dist/assets/test/pages/{ComboBox.html.33fbdae5.js → ComboBox.html.1d4ae27d.js} +1 -1
  93. package/dist/assets/test/pages/{Icon.html.1f4abfd7.js → Icon.html.00b0c783.js} +1 -1
  94. package/dist/assets/test/pages/{Label.html.5e12adbd.js → Label.html.cfc87b63.js} +1 -1
  95. package/dist/assets/test/pages/{Popups.html.875a587f.js → Popups.html.74de5ef6.js} +1 -1
  96. package/dist/css/themes/Avatar.css +1 -1
  97. package/dist/css/themes/CheckBox.css +1 -1
  98. package/dist/css/themes/Panel.css +1 -1
  99. package/dist/css/themes/PopupsCommon.css +1 -1
  100. package/dist/css/themes/Switch.css +1 -1
  101. package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
  102. package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
  103. package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
  104. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  105. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  106. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  107. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  108. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  109. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  110. package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
  111. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  112. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  113. package/dist/custom-elements.json +1 -1
  114. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
  115. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
  116. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  117. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  118. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  119. package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
  120. package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
  121. package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
  122. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  123. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
  124. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  125. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  126. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  127. package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
  128. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
  129. package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
  130. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  131. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  132. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  133. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
  134. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  135. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
  136. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  137. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
  138. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
  139. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
  140. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
  141. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
  142. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  143. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
  144. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
  145. package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
  146. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
  147. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
  148. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
  149. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
  150. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
  151. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
  152. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
  153. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
  154. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
  155. package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
  156. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
  157. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
  158. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
  159. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
  160. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
  161. package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
  162. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  163. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  164. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  165. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  166. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  167. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  168. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  169. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  170. package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
  171. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  172. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  173. package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
  174. package/dist/generated/i18n/i18n-defaults.js +2 -1
  175. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  176. package/dist/generated/templates/PanelTemplate.lit.js +1 -1
  177. package/dist/generated/templates/PanelTemplate.lit.js.map +1 -1
  178. package/dist/generated/templates/SwitchTemplate.lit.js +1 -1
  179. package/dist/generated/templates/SwitchTemplate.lit.js.map +1 -1
  180. package/dist/generated/templates/TableRowTemplate.lit.js +1 -1
  181. package/dist/generated/templates/TableRowTemplate.lit.js.map +1 -1
  182. package/dist/generated/themes/Avatar.css.js +1 -1
  183. package/dist/generated/themes/Avatar.css.js.map +1 -1
  184. package/dist/generated/themes/CheckBox.css.js +1 -1
  185. package/dist/generated/themes/CheckBox.css.js.map +1 -1
  186. package/dist/generated/themes/Panel.css.js +1 -1
  187. package/dist/generated/themes/Panel.css.js.map +1 -1
  188. package/dist/generated/themes/PopupsCommon.css.js +1 -1
  189. package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
  190. package/dist/generated/themes/Switch.css.js +1 -1
  191. package/dist/generated/themes/Switch.css.js.map +1 -1
  192. package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
  193. package/dist/generated/themes/sap_belize/parameters-bundle.css.js.map +1 -1
  194. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  195. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js.map +1 -1
  196. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  197. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js.map +1 -1
  198. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  199. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  200. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  201. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  202. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  203. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  204. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  205. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  206. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  207. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  208. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  209. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  210. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
  211. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
  212. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  213. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  214. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  215. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  216. package/dist/i18n/messagebundle.properties +3 -0
  217. package/dist/i18n/messagebundle_ar.properties +2 -0
  218. package/dist/i18n/messagebundle_bg.properties +2 -0
  219. package/dist/i18n/messagebundle_ca.properties +2 -0
  220. package/dist/i18n/messagebundle_cs.properties +2 -0
  221. package/dist/i18n/messagebundle_cy.properties +2 -0
  222. package/dist/i18n/messagebundle_da.properties +2 -0
  223. package/dist/i18n/messagebundle_de.properties +2 -0
  224. package/dist/i18n/messagebundle_el.properties +2 -0
  225. package/dist/i18n/messagebundle_en.properties +2 -0
  226. package/dist/i18n/messagebundle_en_GB.properties +2 -0
  227. package/dist/i18n/messagebundle_en_US_sappsd.properties +2 -0
  228. package/dist/i18n/messagebundle_en_US_saprigi.properties +2 -0
  229. package/dist/i18n/messagebundle_en_US_saptrc.properties +2 -0
  230. package/dist/i18n/messagebundle_es.properties +2 -0
  231. package/dist/i18n/messagebundle_es_MX.properties +2 -0
  232. package/dist/i18n/messagebundle_et.properties +2 -0
  233. package/dist/i18n/messagebundle_fi.properties +2 -0
  234. package/dist/i18n/messagebundle_fr.properties +2 -0
  235. package/dist/i18n/messagebundle_fr_CA.properties +2 -0
  236. package/dist/i18n/messagebundle_hi.properties +2 -0
  237. package/dist/i18n/messagebundle_hr.properties +2 -0
  238. package/dist/i18n/messagebundle_hu.properties +2 -0
  239. package/dist/i18n/messagebundle_id.properties +2 -0
  240. package/dist/i18n/messagebundle_it.properties +2 -0
  241. package/dist/i18n/messagebundle_iw.properties +2 -0
  242. package/dist/i18n/messagebundle_ja.properties +2 -0
  243. package/dist/i18n/messagebundle_kk.properties +2 -0
  244. package/dist/i18n/messagebundle_ko.properties +2 -0
  245. package/dist/i18n/messagebundle_lt.properties +2 -0
  246. package/dist/i18n/messagebundle_lv.properties +2 -0
  247. package/dist/i18n/messagebundle_ms.properties +2 -0
  248. package/dist/i18n/messagebundle_nl.properties +2 -0
  249. package/dist/i18n/messagebundle_no.properties +2 -0
  250. package/dist/i18n/messagebundle_pl.properties +2 -0
  251. package/dist/i18n/messagebundle_pt.properties +2 -0
  252. package/dist/i18n/messagebundle_pt_PT.properties +2 -0
  253. package/dist/i18n/messagebundle_ro.properties +2 -0
  254. package/dist/i18n/messagebundle_ru.properties +2 -0
  255. package/dist/i18n/messagebundle_sh.properties +2 -0
  256. package/dist/i18n/messagebundle_sk.properties +2 -0
  257. package/dist/i18n/messagebundle_sl.properties +2 -0
  258. package/dist/i18n/messagebundle_sv.properties +2 -0
  259. package/dist/i18n/messagebundle_th.properties +2 -0
  260. package/dist/i18n/messagebundle_tr.properties +2 -0
  261. package/dist/i18n/messagebundle_uk.properties +2 -0
  262. package/dist/i18n/messagebundle_vi.properties +2 -0
  263. package/dist/i18n/messagebundle_zh_CN.properties +2 -0
  264. package/dist/i18n/messagebundle_zh_TW.properties +2 -0
  265. package/dist/test/pages/72override.html +1 -1
  266. package/dist/test/pages/AnimanitionOff.html +1 -1
  267. package/dist/test/pages/Avatar.html +17 -1
  268. package/dist/test/pages/AvatarGroup.html +1 -1
  269. package/dist/test/pages/Badge.html +1 -1
  270. package/dist/test/pages/Breadcrumbs.html +1 -1
  271. package/dist/test/pages/BusyIndicator.html +1 -1
  272. package/dist/test/pages/Button.html +1 -1
  273. package/dist/test/pages/Calendar.html +1 -1
  274. package/dist/test/pages/Card.html +1 -1
  275. package/dist/test/pages/Carousel.html +1 -1
  276. package/dist/test/pages/CheckBox.html +23 -3
  277. package/dist/test/pages/ColorPalette.html +1 -1
  278. package/dist/test/pages/ColorPalettePopover.html +1 -1
  279. package/dist/test/pages/ColorPicker.html +1 -1
  280. package/dist/test/pages/ComboBox.html +2 -2
  281. package/dist/test/pages/Components.html +1 -1
  282. package/dist/test/pages/CoreControls.html +1 -1
  283. package/dist/test/pages/CoreControls_exp.html +1 -1
  284. package/dist/test/pages/CustomCSS.html +1 -1
  285. package/dist/test/pages/DatePicker.html +1 -1
  286. package/dist/test/pages/DatePicker_test_page.html +1 -1
  287. package/dist/test/pages/DateRangePicker.html +1 -1
  288. package/dist/test/pages/DateTimePicker.html +1 -1
  289. package/dist/test/pages/DateTimePicker_Timezone.html +1 -1
  290. package/dist/test/pages/DayPicker.html +1 -1
  291. package/dist/test/pages/Dialog.html +1 -1
  292. package/dist/test/pages/DialogLifecycle.html +1 -1
  293. package/dist/test/pages/DialogSemantic.html +1 -1
  294. package/dist/test/pages/Eventing.html +1 -1
  295. package/dist/test/pages/F6Test1.html +1 -1
  296. package/dist/test/pages/F6Test2.html +1 -1
  297. package/dist/test/pages/F6Test3.html +1 -1
  298. package/dist/test/pages/F6Test4.html +1 -1
  299. package/dist/test/pages/F6Test5.html +1 -1
  300. package/dist/test/pages/F6Test6.html +1 -1
  301. package/dist/test/pages/F6Test7.html +1 -1
  302. package/dist/test/pages/FileUploader.html +1 -1
  303. package/dist/test/pages/FontFace.html +1 -1
  304. package/dist/test/pages/FormComponents.html +1 -1
  305. package/dist/test/pages/FormSupport.html +1 -1
  306. package/dist/test/pages/HCB.html +1 -1
  307. package/dist/test/pages/Icon.html +2 -2
  308. package/dist/test/pages/Icon_and_theming.html +1 -1
  309. package/dist/test/pages/Icon_custom.html +5 -14
  310. package/dist/test/pages/Input.html +1 -1
  311. package/dist/test/pages/InputFieldLabels.html +1 -1
  312. package/dist/test/pages/InputFieldMinWidth.html +1 -1
  313. package/dist/test/pages/InputIcons.html +1 -1
  314. package/dist/test/pages/Input_quickview.html +1 -1
  315. package/dist/test/pages/InputsAlignment.html +1 -1
  316. package/dist/test/pages/InputsLazyLoading.html +1 -1
  317. package/dist/test/pages/ItemNavigation.html +1 -1
  318. package/dist/test/pages/Kitchen.html +1 -1
  319. package/dist/test/pages/Kitchen.openui5.html +1 -1
  320. package/dist/test/pages/Label.html +2 -2
  321. package/dist/test/pages/Link.html +1 -1
  322. package/dist/test/pages/List.html +1 -1
  323. package/dist/test/pages/ListGrowing_Button.html +1 -1
  324. package/dist/test/pages/ListGrowing_Scroll.html +1 -1
  325. package/dist/test/pages/List_keyboard_support.html +1 -1
  326. package/dist/test/pages/List_test_page.html +1 -1
  327. package/dist/test/pages/LitKeyFunction.html +1 -1
  328. package/dist/test/pages/MemoryLeak.html +1 -1
  329. package/dist/test/pages/Menu.html +1 -1
  330. package/dist/test/pages/MessagePage.html +1 -1
  331. package/dist/test/pages/MessageStrip.html +1 -1
  332. package/dist/test/pages/MultiComboBox.html +18 -1
  333. package/dist/test/pages/MultiInput.html +20 -2
  334. package/dist/test/pages/MultiInput_Suggestions.html +1 -1
  335. package/dist/test/pages/OpenUI5-second.html +1 -1
  336. package/dist/test/pages/OpenUI5.html +1 -1
  337. package/dist/test/pages/OpenUI5Nightly.html +1 -1
  338. package/dist/test/pages/Panel.html +24 -2
  339. package/dist/test/pages/Popover.html +1 -1
  340. package/dist/test/pages/PopoverArrowBounds.html +1 -1
  341. package/dist/test/pages/Popups.html +2 -2
  342. package/dist/test/pages/ProgressIndicator.html +1 -1
  343. package/dist/test/pages/RTL.html +1 -1
  344. package/dist/test/pages/RadioButton.html +1 -1
  345. package/dist/test/pages/RangeSlider.html +1 -1
  346. package/dist/test/pages/RatingIndicator.html +1 -1
  347. package/dist/test/pages/ResizeHandler.html +1 -1
  348. package/dist/test/pages/ResponsivePopover.html +1 -1
  349. package/dist/test/pages/SegmentedButton.html +1 -1
  350. package/dist/test/pages/Select.html +1 -1
  351. package/dist/test/pages/Simple.html +1 -1
  352. package/dist/test/pages/Slider.html +1 -1
  353. package/dist/test/pages/SplitButton.html +1 -1
  354. package/dist/test/pages/StepInput.html +1 -1
  355. package/dist/test/pages/Switch.html +31 -2
  356. package/dist/test/pages/TabContainer.html +1 -1
  357. package/dist/test/pages/Table-perf-pure.html +1 -1
  358. package/dist/test/pages/Table-perf.html +1 -1
  359. package/dist/test/pages/Table.html +1 -1
  360. package/dist/test/pages/Table2.html +1 -1
  361. package/dist/test/pages/TableAllPopin.html +1 -1
  362. package/dist/test/pages/TableCustomStyling.html +1 -1
  363. package/dist/test/pages/TableGrouping.html +1 -1
  364. package/dist/test/pages/TableGrowingWithButton.html +1 -1
  365. package/dist/test/pages/TableGrowingWithScroll.html +1 -1
  366. package/dist/test/pages/TableSelection.html +1 -1
  367. package/dist/test/pages/TextArea.html +1 -1
  368. package/dist/test/pages/TimePicker.html +4 -1
  369. package/dist/test/pages/TimePickerClock.html +1 -1
  370. package/dist/test/pages/TimeSelection.html +1 -1
  371. package/dist/test/pages/TimeSelectionClocks.html +1 -1
  372. package/dist/test/pages/Title.html +1 -1
  373. package/dist/test/pages/Toast.html +1 -1
  374. package/dist/test/pages/ToggleButton.html +1 -1
  375. package/dist/test/pages/Tokenizer.html +1 -1
  376. package/dist/test/pages/Tree.html +1 -1
  377. package/dist/test/pages/TreeDynamic.html +1 -1
  378. package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
  379. package/dist/test/pages/base/AriaLabelHelper.html +1 -1
  380. package/dist/test/pages/base/DOMObserver.html +1 -1
  381. package/dist/test/pages/base/IconCollection.html +1 -1
  382. package/dist/test/pages/base/IconCollectionInCustomTheme.html +1 -1
  383. package/dist/test/pages/base/IgnoreCustomElements.html +1 -1
  384. package/dist/test/pages/base/InvisibleMessage.html +1 -1
  385. package/dist/test/pages/form.html +1 -1
  386. package/dist/test/pages/i18n-defaultLang.html +1 -1
  387. package/dist/test/pages/i18n-demo.html +1 -1
  388. package/package.json +8 -8
  389. package/src/Panel.hbs +1 -1
  390. package/src/Switch.hbs +2 -0
  391. package/src/TableRow.hbs +0 -1
  392. package/src/i18n/messagebundle.properties +3 -0
  393. package/src/i18n/messagebundle_ar.properties +2 -0
  394. package/src/i18n/messagebundle_bg.properties +2 -0
  395. package/src/i18n/messagebundle_ca.properties +2 -0
  396. package/src/i18n/messagebundle_cs.properties +2 -0
  397. package/src/i18n/messagebundle_cy.properties +2 -0
  398. package/src/i18n/messagebundle_da.properties +2 -0
  399. package/src/i18n/messagebundle_de.properties +2 -0
  400. package/src/i18n/messagebundle_el.properties +2 -0
  401. package/src/i18n/messagebundle_en.properties +2 -0
  402. package/src/i18n/messagebundle_en_GB.properties +2 -0
  403. package/src/i18n/messagebundle_en_US_sappsd.properties +2 -0
  404. package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
  405. package/src/i18n/messagebundle_en_US_saptrc.properties +2 -0
  406. package/src/i18n/messagebundle_es.properties +2 -0
  407. package/src/i18n/messagebundle_es_MX.properties +2 -0
  408. package/src/i18n/messagebundle_et.properties +2 -0
  409. package/src/i18n/messagebundle_fi.properties +2 -0
  410. package/src/i18n/messagebundle_fr.properties +2 -0
  411. package/src/i18n/messagebundle_fr_CA.properties +2 -0
  412. package/src/i18n/messagebundle_hi.properties +2 -0
  413. package/src/i18n/messagebundle_hr.properties +2 -0
  414. package/src/i18n/messagebundle_hu.properties +2 -0
  415. package/src/i18n/messagebundle_id.properties +2 -0
  416. package/src/i18n/messagebundle_it.properties +2 -0
  417. package/src/i18n/messagebundle_iw.properties +2 -0
  418. package/src/i18n/messagebundle_ja.properties +2 -0
  419. package/src/i18n/messagebundle_kk.properties +2 -0
  420. package/src/i18n/messagebundle_ko.properties +2 -0
  421. package/src/i18n/messagebundle_lt.properties +2 -0
  422. package/src/i18n/messagebundle_lv.properties +2 -0
  423. package/src/i18n/messagebundle_ms.properties +2 -0
  424. package/src/i18n/messagebundle_nl.properties +2 -0
  425. package/src/i18n/messagebundle_no.properties +2 -0
  426. package/src/i18n/messagebundle_pl.properties +2 -0
  427. package/src/i18n/messagebundle_pt.properties +2 -0
  428. package/src/i18n/messagebundle_pt_PT.properties +2 -0
  429. package/src/i18n/messagebundle_ro.properties +2 -0
  430. package/src/i18n/messagebundle_ru.properties +2 -0
  431. package/src/i18n/messagebundle_sh.properties +2 -0
  432. package/src/i18n/messagebundle_sk.properties +2 -0
  433. package/src/i18n/messagebundle_sl.properties +2 -0
  434. package/src/i18n/messagebundle_sv.properties +2 -0
  435. package/src/i18n/messagebundle_th.properties +2 -0
  436. package/src/i18n/messagebundle_tr.properties +2 -0
  437. package/src/i18n/messagebundle_uk.properties +2 -0
  438. package/src/i18n/messagebundle_vi.properties +2 -0
  439. package/src/i18n/messagebundle_zh_CN.properties +2 -0
  440. package/src/i18n/messagebundle_zh_TW.properties +2 -0
  441. package/src/themes/Avatar.css +23 -2
  442. package/src/themes/CheckBox.css +4 -2
  443. package/src/themes/Panel.css +15 -0
  444. package/src/themes/PopupsCommon.css +3 -2
  445. package/src/themes/Switch.css +5 -3
  446. package/src/themes/base/Avatar-parameters.css +1 -0
  447. package/src/themes/base/Panel-parameters.css +3 -2
  448. package/src/themes/base/PopupsCommon-parameters.css +3 -0
  449. package/src/themes/sap_belize/PopupsCommon-parameters.css +3 -0
  450. package/src/themes/sap_belize_hcb/Avatar-parameters.css +1 -0
  451. package/src/themes/sap_belize_hcw/Avatar-parameters.css +1 -0
  452. package/src/themes/sap_fiori_3_hcb/Avatar-parameters.css +1 -0
  453. package/src/themes/sap_fiori_3_hcw/Avatar-parameters.css +1 -0
  454. package/src/themes/sap_horizon/Avatar-parameters.css +1 -0
  455. package/src/themes/sap_horizon/Panel-parameters.css +1 -0
  456. package/src/themes/sap_horizon_dark/Avatar-parameters.css +1 -0
  457. package/src/themes/sap_horizon_dark/Panel-parameters.css +1 -0
  458. package/src/themes/sap_horizon_hcb/Avatar-parameters.css +1 -0
  459. package/src/themes/sap_horizon_hcb/Panel-parameters.css +1 -0
  460. package/src/themes/sap_horizon_hcw/Avatar-parameters.css +1 -0
  461. package/src/themes/sap_horizon_hcw/Panel-parameters.css +1 -0
  462. package/dist/assets/Panel.cf4a4802.css +0 -1
  463. package/dist/assets/messagebundle_ar.8f003fc0.js +0 -1
  464. package/dist/assets/messagebundle_bg.9ff1b6f7.js +0 -1
  465. package/dist/assets/messagebundle_ca.466e4a79.js +0 -1
  466. package/dist/assets/messagebundle_cs.36465c55.js +0 -1
  467. package/dist/assets/messagebundle_cy.2fb5cdfe.js +0 -1
  468. package/dist/assets/messagebundle_da.a12b113c.js +0 -1
  469. package/dist/assets/messagebundle_de.be906091.js +0 -1
  470. package/dist/assets/messagebundle_el.71cab461.js +0 -1
  471. package/dist/assets/messagebundle_en.7cee711f.js +0 -1
  472. package/dist/assets/messagebundle_en_GB.82299963.js +0 -1
  473. package/dist/assets/messagebundle_en_US_sappsd.93247166.js +0 -1
  474. package/dist/assets/messagebundle_en_US_saptrc.5c02ea75.js +0 -1
  475. package/dist/assets/messagebundle_es.9ebe094d.js +0 -1
  476. package/dist/assets/messagebundle_es_MX.288df73a.js +0 -1
  477. package/dist/assets/messagebundle_et.9982f6ab.js +0 -1
  478. package/dist/assets/messagebundle_fi.25f7adf5.js +0 -1
  479. package/dist/assets/messagebundle_fr.e156ec79.js +0 -1
  480. package/dist/assets/messagebundle_fr_CA.f1ed7b62.js +0 -1
  481. package/dist/assets/messagebundle_hi.738d393d.js +0 -1
  482. package/dist/assets/messagebundle_hr.cabca13a.js +0 -1
  483. package/dist/assets/messagebundle_hu.c7ad15af.js +0 -1
  484. package/dist/assets/messagebundle_it.c78e0d70.js +0 -1
  485. package/dist/assets/messagebundle_iw.76edb3ae.js +0 -1
  486. package/dist/assets/messagebundle_ja.64f780d2.js +0 -1
  487. package/dist/assets/messagebundle_kk.3f5c2564.js +0 -1
  488. package/dist/assets/messagebundle_ko.6e922d42.js +0 -1
  489. package/dist/assets/messagebundle_lt.042630fb.js +0 -1
  490. package/dist/assets/messagebundle_lv.0ea7d632.js +0 -1
  491. package/dist/assets/messagebundle_ms.33aa74c3.js +0 -1
  492. package/dist/assets/messagebundle_nl.b4d1aee5.js +0 -1
  493. package/dist/assets/messagebundle_no.29655ced.js +0 -1
  494. package/dist/assets/messagebundle_pl.c1c9d156.js +0 -1
  495. package/dist/assets/messagebundle_pt.5b3f9f66.js +0 -1
  496. package/dist/assets/messagebundle_pt_PT.dd525495.js +0 -1
  497. package/dist/assets/messagebundle_ro.2c0a7e52.js +0 -1
  498. package/dist/assets/messagebundle_ru.e4116d50.js +0 -1
  499. package/dist/assets/messagebundle_sh.4c88d9a8.js +0 -1
  500. package/dist/assets/messagebundle_sk.37bc22fd.js +0 -1
  501. package/dist/assets/messagebundle_sl.96cd12a7.js +0 -1
  502. package/dist/assets/messagebundle_sv.60da1ace.js +0 -1
  503. package/dist/assets/messagebundle_th.fcc3f996.js +0 -1
  504. package/dist/assets/messagebundle_tr.0cf52130.js +0 -1
  505. package/dist/assets/messagebundle_uk.c10c1dfd.js +0 -1
  506. package/dist/assets/messagebundle_vi.589ad9cc.js +0 -1
  507. package/dist/assets/messagebundle_zh_CN.cd32cbb8.js +0 -1
  508. package/dist/assets/messagebundle_zh_TW.46975e5a.js +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,46 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.16.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.3...v1.16.0-rc.4) (2023-08-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui5-avatar:** new interaction behavior ([#7374](https://github.com/SAP/ui5-webcomponents/issues/7374)) ([e9011fc](https://github.com/SAP/ui5-webcomponents/commit/e9011fc3b21ffb86cf7d43e57b93b1aa1ebc77d4))
12
+ * **ui5-popup:** fix header background and border for Belize theme ([#7384](https://github.com/SAP/ui5-webcomponents/issues/7384)) ([130848b](https://github.com/SAP/ui5-webcomponents/commit/130848be056d0434eee6dab7255b7fdfb67ced5c)), closes [#7353](https://github.com/SAP/ui5-webcomponents/issues/7353)
13
+
14
+
15
+ ### Features
16
+
17
+ * **framework:** support theme dependent custom icon collections ([#7341](https://github.com/SAP/ui5-webcomponents/issues/7341)) ([33967dd](https://github.com/SAP/ui5-webcomponents/commit/33967dd12e31e17828986c7b40a5471c2936f0b7))
18
+
19
+
20
+
21
+
22
+
23
+ # [1.16.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.2...v1.16.0-rc.3) (2023-07-27)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **ui5-checkbox:** prevent text selection on checkbox ([#7364](https://github.com/SAP/ui5-webcomponents/issues/7364)) ([d6aeb0f](https://github.com/SAP/ui5-webcomponents/commit/d6aeb0fd6871555a1737b02fa18d996b7148751a)), closes [#7236](https://github.com/SAP/ui5-webcomponents/issues/7236)
29
+ * **ui5-checkbox:** trigger form validation when required ([#7363](https://github.com/SAP/ui5-webcomponents/issues/7363)) ([0f90a53](https://github.com/SAP/ui5-webcomponents/commit/0f90a53e2d1e353dc0a6cc66f4bc6afb3e4b86b5)), closes [#7319](https://github.com/SAP/ui5-webcomponents/issues/7319)
30
+ * **ui5-slider:** remove tag name from base class ([#7373](https://github.com/SAP/ui5-webcomponents/issues/7373)) ([7e47744](https://github.com/SAP/ui5-webcomponents/commit/7e47744806ada5be4e724abd3464f659e26c6193))
31
+ * **ui5-switch:** align text/icon properly in switch handle ([#7350](https://github.com/SAP/ui5-webcomponents/issues/7350)) ([5a7f41f](https://github.com/SAP/ui5-webcomponents/commit/5a7f41f3593563ca3ecef5b8006a7a5cef9b63de))
32
+ * **ui5-time-picker:** support relative value "now" ([#7325](https://github.com/SAP/ui5-webcomponents/issues/7325)) ([0b2ef4f](https://github.com/SAP/ui5-webcomponents/commit/0b2ef4fe623090f5034b67e5236b485da87c814a))
33
+
34
+
35
+ ### Features
36
+
37
+ * **ui5-avatar:** add disabled property ([#7335](https://github.com/SAP/ui5-webcomponents/issues/7335)) ([d84fc61](https://github.com/SAP/ui5-webcomponents/commit/d84fc61c7f41c6099c242dfdaad44cb3ebc9e1fa))
38
+ * **ui5-panel:** panel sticky header implementation ([#7313](https://github.com/SAP/ui5-webcomponents/issues/7313)) ([18c0e4f](https://github.com/SAP/ui5-webcomponents/commit/18c0e4fcbf68acb42357f4f3e2941fffb7911a5d))
39
+ * **ui5-switch:** add required property ([#7324](https://github.com/SAP/ui5-webcomponents/issues/7324)) ([0a01918](https://github.com/SAP/ui5-webcomponents/commit/0a019187bfeb52c4a2eacb5385d069034c68d34c))
40
+ * **ui5-tokenizer:** change indicator's text when there are no visible tokens ([#7327](https://github.com/SAP/ui5-webcomponents/issues/7327)) ([27f690e](https://github.com/SAP/ui5-webcomponents/commit/27f690ec159c631c4b58023ed0c1cfd080439fb1))
41
+
42
+
43
+
44
+
45
+
6
46
  # [1.16.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.1...v1.16.0-rc.2) (2023-07-20)
7
47
 
8
48
 
package/dist/Avatar.d.ts CHANGED
@@ -40,8 +40,21 @@ import "@ui5/webcomponents-icons/dist/employee.js";
40
40
  * @public
41
41
  */
42
42
  declare class Avatar extends UI5Element implements ITabbable {
43
+ /**
44
+ * Defines whether the component is disabled.
45
+ * A disabled component can't be pressed or
46
+ * focused, and it is not in the tab chain.
47
+ *
48
+ * @type {boolean}
49
+ * @name sap.ui.webc.main.Avatar.prototype.disabled
50
+ * @defaultvalue false
51
+ * @public
52
+ */
53
+ disabled: boolean;
43
54
  /**
44
55
  * Defines if the avatar is interactive (focusable and pressable).
56
+ * <b>Note:</b> This property won't have effect if the <code>disabled</code>
57
+ * property is set to <code>true</code>.
45
58
  * @type {boolean}
46
59
  * @name sap.ui.webc.main.Avatar.prototype.interactive
47
60
  * @defaultValue false
@@ -53,6 +66,11 @@ declare class Avatar extends UI5Element implements ITabbable {
53
66
  * @private
54
67
  */
55
68
  focused: boolean;
69
+ /**
70
+ * Indicates if the elements is pressed
71
+ * @private
72
+ */
73
+ pressed: boolean;
56
74
  /**
57
75
  * Defines the name of the UI5 Icon, that will be displayed.
58
76
  * <br>
@@ -235,6 +253,7 @@ declare class Avatar extends UI5Element implements ITabbable {
235
253
  get _effectiveBackgroundColor(): string;
236
254
  get _role(): "button" | undefined;
237
255
  get _ariaHasPopup(): string | undefined;
256
+ get _interactive(): boolean;
238
257
  get validInitials(): string | null;
239
258
  get accessibleNameText(): string | undefined;
240
259
  get hasImage(): boolean;
@@ -248,6 +267,7 @@ declare class Avatar extends UI5Element implements ITabbable {
248
267
  _onClickHandler(e: MouseEvent): void;
249
268
  _onkeydown(e: KeyboardEvent): void;
250
269
  _onkeyup(e: KeyboardEvent): void;
270
+ _fireClick(): void;
251
271
  _onfocusout(): void;
252
272
  _onfocusin(): void;
253
273
  _getAriaHasPopup(): string | undefined;
package/dist/Avatar.js CHANGED
@@ -68,7 +68,7 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
68
68
  Avatar_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
69
69
  }
70
70
  get tabindex() {
71
- return this._tabIndex || (this.interactive ? "0" : "-1");
71
+ return this._tabIndex || (this._interactive ? "0" : "-1");
72
72
  }
73
73
  /**
74
74
  * Returns the effective avatar size.
@@ -93,11 +93,14 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
93
93
  return this.getAttribute("color-scheme") || this._colorScheme;
94
94
  }
95
95
  get _role() {
96
- return this.interactive ? "button" : undefined;
96
+ return this._interactive ? "button" : undefined;
97
97
  }
98
98
  get _ariaHasPopup() {
99
99
  return this._getAriaHasPopup();
100
100
  }
101
+ get _interactive() {
102
+ return this.interactive && !this.disabled;
103
+ }
101
104
  get validInitials() {
102
105
  // initials should consist of only 1,2 or 3 latin letters
103
106
  const validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/, areInitialsValid = this.initials && validInitials.test(this.initials);
@@ -120,7 +123,7 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
120
123
  return this.getDomRef().querySelector(".ui5-avatar-initials");
121
124
  }
122
125
  onBeforeRendering() {
123
- this._onclick = this.interactive ? this._onClickHandler.bind(this) : undefined;
126
+ this._onclick = this._interactive ? this._onClickHandler.bind(this) : undefined;
124
127
  }
125
128
  async onAfterRendering() {
126
129
  await renderFinished();
@@ -157,45 +160,55 @@ let Avatar = Avatar_1 = class Avatar extends UI5Element {
157
160
  _onClickHandler(e) {
158
161
  // prevent the native event and fire custom event to ensure the noConfict "ui5-click" is fired
159
162
  e.stopPropagation();
160
- this.fireEvent("click");
163
+ this._fireClick();
161
164
  }
162
165
  _onkeydown(e) {
163
- if (!this.interactive) {
166
+ if (!this._interactive) {
164
167
  return;
165
168
  }
166
169
  if (isEnter(e)) {
167
- this.fireEvent("click");
170
+ this._fireClick();
168
171
  }
169
172
  if (isSpace(e)) {
170
173
  e.preventDefault(); // prevent scrolling
171
174
  }
172
175
  }
173
176
  _onkeyup(e) {
174
- if (this.interactive && !e.shiftKey && isSpace(e)) {
175
- this.fireEvent("click");
177
+ if (this._interactive && !e.shiftKey && isSpace(e)) {
178
+ this._fireClick();
176
179
  }
177
180
  }
181
+ _fireClick() {
182
+ this.fireEvent("click");
183
+ this.pressed = !this.pressed;
184
+ }
178
185
  _onfocusout() {
179
186
  this.focused = false;
180
187
  }
181
188
  _onfocusin() {
182
- if (this.interactive) {
189
+ if (this._interactive) {
183
190
  this.focused = true;
184
191
  }
185
192
  }
186
193
  _getAriaHasPopup() {
187
- if (!this.interactive || this.ariaHaspopup === "") {
194
+ if (!this._interactive || this.ariaHaspopup === "") {
188
195
  return;
189
196
  }
190
197
  return this.ariaHaspopup;
191
198
  }
192
199
  };
200
+ __decorate([
201
+ property({ type: Boolean })
202
+ ], Avatar.prototype, "disabled", void 0);
193
203
  __decorate([
194
204
  property({ type: Boolean })
195
205
  ], Avatar.prototype, "interactive", void 0);
196
206
  __decorate([
197
207
  property({ type: Boolean })
198
208
  ], Avatar.prototype, "focused", void 0);
209
+ __decorate([
210
+ property({ type: Boolean })
211
+ ], Avatar.prototype, "pressed", void 0);
199
212
  __decorate([
200
213
  property()
201
214
  ], Avatar.prototype, "icon", void 0);
@@ -246,7 +259,8 @@ Avatar = Avatar_1 = __decorate([
246
259
  })
247
260
  /**
248
261
  * Fired on mouseup, space and enter if avatar is interactive
249
- *
262
+ * <b>Note:</b> The event will not be fired if the <code>disabled</code>
263
+ * property is set to <code>true</code>.
250
264
  * @event
251
265
  * @private
252
266
  * @since 1.0.0-rc.11
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAG3E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,WAAW;AACX,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,SAAS;AACT,OAA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C9C;AAajC;IADC,QAAQ,EAAE;8CACa;AAUxB;IADC,QAAQ,EAAE;4CACW;AAGtB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;yCACb;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AAmBpB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qCAClB;AA6B3B;IADC,IAAI,EAAE;qCACoB;AAxMtB,MAAM;IAhBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACF;;;;;;MAME;;IACD,KAAK,CAAC,OAAO,CAAC;GACT,MAAM,CA+WX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\n// Template\nimport AvatarTemplate from \"./generated/templates/AvatarTemplate.lit.js\";\n\nimport { AVATAR_TOOLTIP } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarCss from \"./generated/themes/Avatar.css.js\";\n\nimport Icon from \"./Icon.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport AvatarShape from \"./types/AvatarShape.js\";\nimport AvatarColorScheme from \"./types/AvatarColorScheme.js\";\n\n// Icon\nimport \"@ui5/webcomponents-icons/dist/employee.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * An image-like component that has different display options for representing images and icons\n * in different shapes and sizes, depending on the use case.\n *\n * The shape can be circular or square. There are several predefined sizes, as well as an option to\n * set a custom size.\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * <ul>\n * <li>[SPACE, ENTER, RETURN] - Fires the <code>click</code> event if the <code>interactive</code> property is set to true.</li>\n * <li>[SHIFT] - If [SPACE] is pressed, pressing [SHIFT] releases the component without triggering the click event.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Avatar.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Avatar\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-avatar\n * @since 1.0.0-rc.6\n * @implements sap.ui.webc.main.IAvatar\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\tstyles: AvatarCss,\n\ttemplate: AvatarTemplate,\n\tdependencies: [Icon],\n})\n/**\n* Fired on mouseup, space and enter if avatar is interactive\n*\n* @event\n* @private\n* @since 1.0.0-rc.11\n*/\n@event(\"click\")\nclass Avatar extends UI5Element implements ITabbable {\n\t/**\n\t * Defines if the avatar is interactive (focusable and pressable).\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Avatar.prototype.interactive\n\t * @defaultValue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Indicates if the elements is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t * Defines the name of the UI5 Icon, that will be displayed.\n\t * <br>\n\t * <b>Note:</b> If <code>image</code> slot is provided, the property will be ignored.\n\t * <br>\n\t * <b>Note:</b> You should import the desired icon first, then use its name as \"icon\".\n\t * <br><br>\n\t * import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"\n\t * <br>\n\t * <pre>&lt;ui5-avatar icon=\"employee\"></pre>\n\t * <br>\n\t * <b>Note:</b> If no icon or an empty one is provided, by default the \"employee\" icon should be displayed.\n\t *\n\t * See all the available icons in the <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.icon\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ticon!: string;\n\n\t/**\n\t * Defines the displayed initials.\n\t * <br>\n\t * Up to three Latin letters can be displayed as initials.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.initials\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tinitials!: string;\n\n\t/**\n\t * Defines the shape of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Circle</code></li>\n\t * <li><code>Square</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarShape}\n\t * @name sap.ui.webc.main.Avatar.prototype.shape\n\t * @defaultvalue \"Circle\"\n\t * @public\n\t */\n\t@property({ type: AvatarShape, defaultValue: AvatarShape.Circle })\n\tshape!: `${AvatarShape}`;\n\n\t/**\n\t * Defines predefined size of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>XS</code></li>\n\t * <li><code>S</code></li>\n\t * <li><code>M</code></li>\n\t * <li><code>L</code></li>\n\t * <li><code>XL</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarSize}\n\t * @name sap.ui.webc.main.Avatar.prototype.size\n\t * @defaultvalue \"S\"\n\t * @public\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\tsize!: `${AvatarSize}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\t_size!: AvatarSize;\n\n\t/**\n\t * Defines the background color of the desired image.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Accent1</code></li>\n\t * <li><code>Accent2</code></li>\n\t * <li><code>Accent3</code></li>\n\t * <li><code>Accent4</code></li>\n\t * <li><code>Accent5</code></li>\n\t * <li><code>Accent6</code></li>\n\t * <li><code>Accent7</code></li>\n\t * <li><code>Accent8</code></li>\n\t * <li><code>Accent9</code></li>\n\t * <li><code>Accent10</code></li>\n\t * <li><code>Placeholder</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarColorScheme}\n\t * @name sap.ui.webc.main.Avatar.prototype.colorScheme\n\t * @defaultvalue \"Accent6\"\n\t * @public\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\tcolorScheme!: `${AvatarColorScheme}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\t_colorScheme!: AvatarColorScheme;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.7\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines the aria-haspopup value of the component when <code>interactive</code> property is <code>true</code>.\n\t * <br><br>\n\t * @type String\n\t * @since 1.0.0-rc.15\n\t * @protected\n\t */\n\t@property()\n\tariaHaspopup!: string;\n\n\t@property({ noAttribute: true })\n\t_tabIndex!: string;\n\n\t@property({ type: Boolean })\n\t_hasImage!: boolean;\n\n\t/**\n\t * Receives the desired <code>&lt;img&gt;</code> tag\n\t *\n\t * <b>Note:</b> If you experience flickering of the provided image, you can hide the component until it is being defined with the following CSS:\n\t * <br /> <br />\n\t * <code>\n\t *\t\tui5-avatar:not(:defined) { <br />\n\t *\t\t\t&nbsp;visibility: hidden; <br />\n\t *\t\t} <br />\n\t * </code>\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.default\n\t * @slot image\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\timage!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the optional badge that will be used for visual affordance.\n\t * <b>Note:</b> While the slot allows for custom badges, to achieve\n\t * the Fiori design, please use <code>ui5-badge</code> with <code>ui5-icon</code>\n\t * in the corresponding <code>icon</code> slot, without text nodes.\n\t * <br><br>\n\t * Example:\n\t * <br><br>\n\t * &lt;ui5-avatar><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-badge slot=\"badge\"><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-icon slot=\"icon\" name=\"employee\">&lt;/ui5-icon><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/ui5-badge><br>\n\t * &lt;/ui5-avatar>\n\t * <br><br>\n\t * <ui5-avatar initials=\"AB\" color-scheme=\"Accent1\">\n\t * <ui5-badge slot=\"badge\">\n\t * <ui5-icon slot=\"icon\" name=\"accelerated\"></ui5-icon>\n\t * </ui5-badge>\n\t * </ui5-avatar>\n\t *\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.badge\n\t * @slot badge\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@slot()\n\tbadge!: Array<HTMLElement>;\n\n\t_onclick?: (e: MouseEvent) => void;\n\tstatic i18nBundle: I18nBundle;\n\t_handleResizeBound: ResizeObserverCallback;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t}\n\n\tstatic async onDefine() {\n\t\tAvatar.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tget tabindex() {\n\t\treturn this._tabIndex || (this.interactive ? \"0\" : \"-1\");\n\t}\n\n\t/**\n\t * Returns the effective avatar size.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"S\"\n\t * @private\n\t */\n\tget _effectiveSize(): AvatarSize {\n\t\t// we read the attribute, because the \"size\" property will always have a default value\n\t\treturn this.getAttribute(\"size\") as AvatarSize || this._size;\n\t}\n\n\t/**\n\t * Returns the effective background color.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"Accent6\"\n\t * @private\n\t */\n\tget _effectiveBackgroundColor() {\n\t\t// we read the attribute, because the \"background-color\" property will always have a default value\n\t\treturn this.getAttribute(\"color-scheme\") || this._colorScheme;\n\t}\n\n\tget _role() {\n\t\treturn this.interactive ? \"button\" : undefined;\n\t}\n\n\tget _ariaHasPopup() {\n\t\treturn this._getAriaHasPopup();\n\t}\n\n\tget validInitials() {\n\t\t// initials should consist of only 1,2 or 3 latin letters\n\t\tconst validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/,\n\t\t\tareInitialsValid = this.initials && validInitials.test(this.initials);\n\n\t\tif (areInitialsValid) {\n\t\t\treturn this.initials;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget accessibleNameText() {\n\t\tif (this.accessibleName) {\n\t\t\treturn this.accessibleName;\n\t\t}\n\n\t\treturn Avatar.i18nBundle.getText(AVATAR_TOOLTIP) || undefined;\n\t}\n\n\tget hasImage() {\n\t\tthis._hasImage = !!this.image.length;\n\t\treturn this._hasImage;\n\t}\n\n\tget initialsContainer(): HTMLObjectElement | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-initials\");\n\t }\n\n\tonBeforeRendering() {\n\t\tthis._onclick = this.interactive ? this._onClickHandler.bind(this) : undefined;\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.initialsContainer && ResizeHandler.register(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tthis.initialsContainer && ResizeHandler.deregister(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\thandleResize() {\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\t_checkInitials() {\n\t\tconst avatar = this.getDomRef()!,\n\t\t\tavatarInitials = avatar.querySelector(\".ui5-avatar-initials\");\n\t\t// if there aren`t initalts set - the fallBack icon should be shown\n\t\tif (!this.validInitials) {\n\t\t\tavatarInitials!.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\treturn;\n\t\t}\n\t\t// if initials` width is bigger than the avatar, an icon should be shown inside the avatar\n\t\tavatarInitials && avatarInitials.classList.remove(\"ui5-avatar-initials-hidden\");\n\t\tif (this.initials && this.initials.length === 3) {\n\t\t\tif (avatarInitials && avatarInitials.scrollWidth > avatar.scrollWidth) {\n\t\t\t\tavatarInitials.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\t}\n\t\t}\n\t}\n\n\t_onClickHandler(e: MouseEvent) {\n\t\t// prevent the native event and fire custom event to ensure the noConfict \"ui5-click\" is fired\n\t\te.stopPropagation();\n\t\tthis.fireEvent(\"click\");\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (!this.interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.interactive && !e.shiftKey && isSpace(e)) {\n\t\t\tthis.fireEvent(\"click\");\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t_onfocusin() {\n\t\tif (this.interactive) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_getAriaHasPopup() {\n\t\tif (!this.interactive || this.ariaHaspopup === \"\") {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.ariaHaspopup;\n\t}\n}\n\nAvatar.define();\n\nexport default Avatar;\n"]}
1
+ {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAG3E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,WAAW;AACX,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,SAAS;AACT,OAAO,SAAS,MAAM,kCAAkC,CAAC;AAEzD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAE7D,OAAO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,EAAE,CAAC;2CAC1C;AAMrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC;4CAC9C;AAajC;IADC,QAAQ,EAAE;8CACa;AAUxB;IADC,QAAQ,EAAE;4CACW;AAGtB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;yCACb;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AAmBpB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qCAClB;AA6B3B;IADC,IAAI,EAAE;qCACoB;AA9NtB,MAAM;IAjBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACF;;;;;;;MAOE;;IACD,KAAK,CAAC,OAAO,CAAC;GACT,MAAM,CA8YX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\n// Template\nimport AvatarTemplate from \"./generated/templates/AvatarTemplate.lit.js\";\n\nimport { AVATAR_TOOLTIP } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarCss from \"./generated/themes/Avatar.css.js\";\n\nimport Icon from \"./Icon.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport AvatarShape from \"./types/AvatarShape.js\";\nimport AvatarColorScheme from \"./types/AvatarColorScheme.js\";\n\n// Icon\nimport \"@ui5/webcomponents-icons/dist/employee.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * An image-like component that has different display options for representing images and icons\n * in different shapes and sizes, depending on the use case.\n *\n * The shape can be circular or square. There are several predefined sizes, as well as an option to\n * set a custom size.\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * <ul>\n * <li>[SPACE, ENTER, RETURN] - Fires the <code>click</code> event if the <code>interactive</code> property is set to true.</li>\n * <li>[SHIFT] - If [SPACE] is pressed, pressing [SHIFT] releases the component without triggering the click event.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Avatar.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Avatar\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-avatar\n * @since 1.0.0-rc.6\n * @implements sap.ui.webc.main.IAvatar\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\tstyles: AvatarCss,\n\ttemplate: AvatarTemplate,\n\tdependencies: [Icon],\n})\n/**\n* Fired on mouseup, space and enter if avatar is interactive\n* <b>Note:</b> The event will not be fired if the <code>disabled</code>\n* property is set to <code>true</code>.\n* @event\n* @private\n* @since 1.0.0-rc.11\n*/\n@event(\"click\")\nclass Avatar extends UI5Element implements ITabbable {\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Avatar.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines if the avatar is interactive (focusable and pressable).\n\t * <b>Note:</b> This property won't have effect if the <code>disabled</code>\n\t * property is set to <code>true</code>.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Avatar.prototype.interactive\n\t * @defaultValue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Indicates if the elements is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t * Indicates if the elements is pressed\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tpressed!: boolean;\n\n\t/**\n\t * Defines the name of the UI5 Icon, that will be displayed.\n\t * <br>\n\t * <b>Note:</b> If <code>image</code> slot is provided, the property will be ignored.\n\t * <br>\n\t * <b>Note:</b> You should import the desired icon first, then use its name as \"icon\".\n\t * <br><br>\n\t * import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"\n\t * <br>\n\t * <pre>&lt;ui5-avatar icon=\"employee\"></pre>\n\t * <br>\n\t * <b>Note:</b> If no icon or an empty one is provided, by default the \"employee\" icon should be displayed.\n\t *\n\t * See all the available icons in the <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.icon\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ticon!: string;\n\n\t/**\n\t * Defines the displayed initials.\n\t * <br>\n\t * Up to three Latin letters can be displayed as initials.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.initials\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tinitials!: string;\n\n\t/**\n\t * Defines the shape of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Circle</code></li>\n\t * <li><code>Square</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarShape}\n\t * @name sap.ui.webc.main.Avatar.prototype.shape\n\t * @defaultvalue \"Circle\"\n\t * @public\n\t */\n\t@property({ type: AvatarShape, defaultValue: AvatarShape.Circle })\n\tshape!: `${AvatarShape}`;\n\n\t/**\n\t * Defines predefined size of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>XS</code></li>\n\t * <li><code>S</code></li>\n\t * <li><code>M</code></li>\n\t * <li><code>L</code></li>\n\t * <li><code>XL</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarSize}\n\t * @name sap.ui.webc.main.Avatar.prototype.size\n\t * @defaultvalue \"S\"\n\t * @public\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\tsize!: `${AvatarSize}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarSize, defaultValue: AvatarSize.S })\n\t_size!: AvatarSize;\n\n\t/**\n\t * Defines the background color of the desired image.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Accent1</code></li>\n\t * <li><code>Accent2</code></li>\n\t * <li><code>Accent3</code></li>\n\t * <li><code>Accent4</code></li>\n\t * <li><code>Accent5</code></li>\n\t * <li><code>Accent6</code></li>\n\t * <li><code>Accent7</code></li>\n\t * <li><code>Accent8</code></li>\n\t * <li><code>Accent9</code></li>\n\t * <li><code>Accent10</code></li>\n\t * <li><code>Placeholder</code></li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.AvatarColorScheme}\n\t * @name sap.ui.webc.main.Avatar.prototype.colorScheme\n\t * @defaultvalue \"Accent6\"\n\t * @public\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\tcolorScheme!: `${AvatarColorScheme}`;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: AvatarColorScheme, defaultValue: AvatarColorScheme.Accent6 })\n\t_colorScheme!: AvatarColorScheme;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Avatar.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.7\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines the aria-haspopup value of the component when <code>interactive</code> property is <code>true</code>.\n\t * <br><br>\n\t * @type String\n\t * @since 1.0.0-rc.15\n\t * @protected\n\t */\n\t@property()\n\tariaHaspopup!: string;\n\n\t@property({ noAttribute: true })\n\t_tabIndex!: string;\n\n\t@property({ type: Boolean })\n\t_hasImage!: boolean;\n\n\t/**\n\t * Receives the desired <code>&lt;img&gt;</code> tag\n\t *\n\t * <b>Note:</b> If you experience flickering of the provided image, you can hide the component until it is being defined with the following CSS:\n\t * <br /> <br />\n\t * <code>\n\t *\t\tui5-avatar:not(:defined) { <br />\n\t *\t\t\t&nbsp;visibility: hidden; <br />\n\t *\t\t} <br />\n\t * </code>\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.default\n\t * @slot image\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\timage!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the optional badge that will be used for visual affordance.\n\t * <b>Note:</b> While the slot allows for custom badges, to achieve\n\t * the Fiori design, please use <code>ui5-badge</code> with <code>ui5-icon</code>\n\t * in the corresponding <code>icon</code> slot, without text nodes.\n\t * <br><br>\n\t * Example:\n\t * <br><br>\n\t * &lt;ui5-avatar><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-badge slot=\"badge\"><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-icon slot=\"icon\" name=\"employee\">&lt;/ui5-icon><br>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/ui5-badge><br>\n\t * &lt;/ui5-avatar>\n\t * <br><br>\n\t * <ui5-avatar initials=\"AB\" color-scheme=\"Accent1\">\n\t * <ui5-badge slot=\"badge\">\n\t * <ui5-icon slot=\"icon\" name=\"accelerated\"></ui5-icon>\n\t * </ui5-badge>\n\t * </ui5-avatar>\n\t *\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.Avatar.prototype.badge\n\t * @slot badge\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@slot()\n\tbadge!: Array<HTMLElement>;\n\n\t_onclick?: (e: MouseEvent) => void;\n\tstatic i18nBundle: I18nBundle;\n\t_handleResizeBound: ResizeObserverCallback;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t}\n\n\tstatic async onDefine() {\n\t\tAvatar.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tget tabindex() {\n\t\treturn this._tabIndex || (this._interactive ? \"0\" : \"-1\");\n\t}\n\n\t/**\n\t * Returns the effective avatar size.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"S\"\n\t * @private\n\t */\n\tget _effectiveSize(): AvatarSize {\n\t\t// we read the attribute, because the \"size\" property will always have a default value\n\t\treturn this.getAttribute(\"size\") as AvatarSize || this._size;\n\t}\n\n\t/**\n\t * Returns the effective background color.\n\t * @readonly\n\t * @type {string}\n\t * @defaultValue \"Accent6\"\n\t * @private\n\t */\n\tget _effectiveBackgroundColor() {\n\t\t// we read the attribute, because the \"background-color\" property will always have a default value\n\t\treturn this.getAttribute(\"color-scheme\") || this._colorScheme;\n\t}\n\n\tget _role() {\n\t\treturn this._interactive ? \"button\" : undefined;\n\t}\n\n\tget _ariaHasPopup() {\n\t\treturn this._getAriaHasPopup();\n\t}\n\n\tget _interactive() {\n\t\treturn this.interactive && !this.disabled;\n\t}\n\n\tget validInitials() {\n\t\t// initials should consist of only 1,2 or 3 latin letters\n\t\tconst validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/,\n\t\t\tareInitialsValid = this.initials && validInitials.test(this.initials);\n\n\t\tif (areInitialsValid) {\n\t\t\treturn this.initials;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget accessibleNameText() {\n\t\tif (this.accessibleName) {\n\t\t\treturn this.accessibleName;\n\t\t}\n\n\t\treturn Avatar.i18nBundle.getText(AVATAR_TOOLTIP) || undefined;\n\t}\n\n\tget hasImage() {\n\t\tthis._hasImage = !!this.image.length;\n\t\treturn this._hasImage;\n\t}\n\n\tget initialsContainer(): HTMLObjectElement | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-initials\");\n\t }\n\n\tonBeforeRendering() {\n\t\tthis._onclick = this._interactive ? this._onClickHandler.bind(this) : undefined;\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.initialsContainer && ResizeHandler.register(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tthis.initialsContainer && ResizeHandler.deregister(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\thandleResize() {\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\t_checkInitials() {\n\t\tconst avatar = this.getDomRef()!,\n\t\t\tavatarInitials = avatar.querySelector(\".ui5-avatar-initials\");\n\t\t// if there aren`t initalts set - the fallBack icon should be shown\n\t\tif (!this.validInitials) {\n\t\t\tavatarInitials!.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\treturn;\n\t\t}\n\t\t// if initials` width is bigger than the avatar, an icon should be shown inside the avatar\n\t\tavatarInitials && avatarInitials.classList.remove(\"ui5-avatar-initials-hidden\");\n\t\tif (this.initials && this.initials.length === 3) {\n\t\t\tif (avatarInitials && avatarInitials.scrollWidth > avatar.scrollWidth) {\n\t\t\t\tavatarInitials.classList.add(\"ui5-avatar-initials-hidden\");\n\t\t\t}\n\t\t}\n\t}\n\n\t_onClickHandler(e: MouseEvent) {\n\t\t// prevent the native event and fire custom event to ensure the noConfict \"ui5-click\" is fired\n\t\te.stopPropagation();\n\t\tthis._fireClick();\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._fireClick();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._interactive && !e.shiftKey && isSpace(e)) {\n\t\t\tthis._fireClick();\n\t\t}\n\t}\n\n\t_fireClick() {\n\t\tthis.fireEvent(\"click\");\n\t\tthis.pressed = !this.pressed;\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t_onfocusin() {\n\t\tif (this._interactive) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_getAriaHasPopup() {\n\t\tif (!this._interactive || this.ariaHaspopup === \"\") {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.ariaHaspopup;\n\t}\n}\n\nAvatar.define();\n\nexport default Avatar;\n"]}
package/dist/CheckBox.js CHANGED
@@ -104,7 +104,8 @@ let CheckBox = CheckBox_1 = class CheckBox extends UI5Element {
104
104
  const formSupport = getFeature("FormSupport");
105
105
  if (formSupport) {
106
106
  formSupport.syncNativeHiddenInput(this, (element, nativeInput) => {
107
- nativeInput.disabled = element.disabled || !element.checked;
107
+ nativeInput.disabled = !!element.disabled;
108
+ nativeInput.checked = !!element.checked;
108
109
  nativeInput.value = element.checked ? "on" : "";
109
110
  });
110
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../src/CheckBox.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,yCAAyC,CAAC;AACjD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACnB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAI7D,WAAW;AACX,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAE7E,IAAI,uBAAuB,GAAG,KAAK,CAAC;AACpC,IAAI,QAAkB,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAoBH,IAAM,QAAQ,gBAAd,MAAM,QAAS,SAAQ,UAAU;IA+Lh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AAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAWlB;IADC,QAAQ,EAAE;sCACG;AAsBd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;4CACjC;AAiB7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;8CACjC;AAoBjC;IADC,QAAQ,EAAE;sCACG;AAOd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACX;AAUjB;IADC,IAAI,EAAE;6CAC0B;AA1L5B,QAAQ;IAnBb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,KAAK;YACL,IAAI;SACJ;KACD,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,QAAQ,CAsWb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport Icon from \"./Icon.js\";\nimport Label from \"./Label.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport checkboxCss from \"./generated/themes/CheckBox.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\n\n// Template\nimport CheckBoxTemplate from \"./generated/templates/CheckBoxTemplate.lit.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeCb: CheckBox;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * Allows the user to set a binary value, such as true/false or yes/no for an item.\n * <br><br>\n * The <code>ui5-checkbox</code> component consists of a box and a label that describes its purpose.\n * If it's checked, an indicator is displayed inside the box.\n * To check/uncheck the <code>ui5-checkbox</code>, the user has to click or tap the square\n * box or its label.\n * <br><br>\n * The <code>ui5-checkbox</code> component only has 2 states - checked and unchecked.\n * Clicking or tapping toggles the <code>ui5-checkbox</code> between checked and unchecked state.\n *\n * <h3>Usage</h3>\n *\n * You can define the checkbox text with via the <code>text</code> property. If the text exceeds the available width, it is truncated by default.\n * In case you prefer text to wrap, set the <code>wrappingType</code> property to \"Normal\".\n * The touchable area for toggling the <code>ui5-checkbox</code> ends where the text ends.\n * <br><br>\n * You can disable the <code>ui5-checkbox</code> by setting the <code>disabled</code> property to\n * <code>true</code>,\n * or use the <code>ui5-checkbox</code> in read-only mode by setting the <code>readonly</code>\n * property to <code>true</code>.\n *\n * <br><br>\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-checkbox</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>root - Used to style the outermost wrapper of the <code>ui5-checkbox</code></li>\n * </ul>\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.\n * <ul>\n * <li>[SPACE, ENTER] - Toggles between different states: checked, not checked.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CheckBox\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.CheckBox\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-checkbox\n * @public\n */\n@customElement({\n\ttag: \"ui5-checkbox\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CheckBoxTemplate,\n\tstyles: checkboxCss,\n\tdependencies: [\n\t\tLabel,\n\t\tIcon,\n\t],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @event sap.ui.webc.main.CheckBox#change\n */\n@event(\"change\")\n\nclass CheckBox extends UI5Element implements IFormElement {\n\t/**\n\t * Receives id(or many ids) of the elements that label the component\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleNameRef\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @public\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is completely noninteractive.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t * <br><br>\n\t * <b>Note:</b> A read-only component is not editable,\n\t * but still provides visual feedback upon user interaction.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.readonly\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.required\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t* Defines whether the component is displayed as partially checked.\n\t* <br><br>\n\t* <b>Note:</b> The indeterminate state can be set only programmatically and can’t be achieved by user\n\t* interaction and the resulting visual state depends on the values of the <code>indeterminate</code>\n\t* and <code>checked</code> properties:\n\t* <ul>\n\t* <li> If the component is checked and indeterminate, it will be displayed as partially checked\n\t* <li> If the component is checked and it is not indeterminate, it will be displayed as checked\n\t* <li> If the component is not checked, it will be displayed as not checked regardless value of the indeterminate attribute\n\t* </ul>\n\t*\n\t* @type {boolean}\n\t* @name sap.ui.webc.main.CheckBox.prototype.indeterminate\n\t* @defaultvalue false\n\t* @public\n\t* @since 1.0.0-rc.15\n\t*/\n\t@property({ type: Boolean })\n\tindeterminate!: boolean;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking/tapping on the component, or by\n\t * pressing the Enter or Space key.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.checked\n\t * @defaultvalue false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.text\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttext!: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * <br><br>\n\t * <b>Note:</b>\n\t *\n\t * <ul>\n\t * <li><code>Warning</code></li>\n\t * <li><code>Error</code></li>\n\t * <li><code>None</code>(default)</li>\n\t * <li><code>Success</code></li>\n\t * <li><code>Information</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.CheckBox.prototype.valueState\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>None</code> - The text will be truncated with an ellipsis.</li>\n\t * <li><code>Normal</code> - The text will wrap. The words will not be broken based on hyphenation.</li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.WrappingType}\n\t * @name sap.ui.webc.main.CheckBox.prototype.wrappingType\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: WrappingType, defaultValue: WrappingType.None })\n\twrappingType!: `${WrappingType}`;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.name\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @private\n\t */\n\t@slot()\n\tformSupport!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\t_deactivate: () => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeCb) {\n\t\t\t\tactiveCb.active = false;\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._enableFormSupport();\n\t}\n\n\t_enableFormSupport() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport) {\n\t\t\tformSupport.syncNativeHiddenInput(this, (element: IFormElement, nativeInput: HTMLInputElement) => {\n\t\t\t\tnativeInput.disabled = element.disabled || !element.checked;\n\t\t\t\tnativeInput.value = element.checked ? \"on\" : \"\";\n\t\t\t});\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onmousedown() {\n\t\tif (this.readonly || this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = true;\n\t\tactiveCb = this; // eslint-disable-line\n\t}\n\n\t_onmouseup() {\n\t\tthis.active = false;\n\t}\n\n\t_onfocusout() {\n\t\tthis.active = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.active = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.toggle();\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.toggle();\n\t\t}\n\n\t\tthis.active = false;\n\t}\n\n\ttoggle() {\n\t\tif (this.canToggle()) {\n\t\t\tconst lastState = {\n\t\t\t\tchecked: this.checked,\n\t\t\t\tindeterminate: this.indeterminate,\n\t\t\t};\n\t\t\tif (this.indeterminate) {\n\t\t\t\tthis.indeterminate = false;\n\t\t\t\tthis.checked = true;\n\t\t\t} else {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding\n\t\t\tconst valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChagnePrevented) {\n\t\t\t\tthis.checked = lastState.checked;\n\t\t\t\tthis.indeterminate = lastState.indeterminate;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly);\n\t}\n\n\tvalueStateTextMappings() {\n\t\treturn {\n\t\t\t\"Error\": CheckBox.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Warning\": CheckBox.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t\t\"Success\": CheckBox.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t};\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-checkbox--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t},\n\t\t};\n\t}\n\n\tget ariaReadonly() {\n\t\treturn this.readonly ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaChecked() {\n\t\treturn this.indeterminate && this.checked ? \"mixed\" : this.checked;\n\t}\n\n\tget ariaLabelledBy() {\n\t\tif (!this.ariaLabelText) {\n\t\t\treturn this.text ? `${this._id}-label` : undefined;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn this.hasValueState ? `${this._id}-descr` : undefined;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget valueStateText() {\n\t\tif (this.valueState !== ValueState.None && this.valueState !== ValueState.Information) {\n\t\t\treturn this.valueStateTextMappings()[this.valueState];\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\t\treturn this.disabled ? undefined : tabindex || \"0\";\n\t}\n\n\tget isCompletelyChecked() {\n\t\treturn this.checked && !this.indeterminate;\n\t}\n\n\tstatic async onDefine() {\n\t\tCheckBox.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCheckBox.define();\n\nexport default CheckBox;\n"]}
1
+ {"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../src/CheckBox.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,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Q,CAAC;GAEV,QAAQ,CAuWb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport Icon from \"./Icon.js\";\nimport Label from \"./Label.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport checkboxCss from \"./generated/themes/CheckBox.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\n\n// Template\nimport CheckBoxTemplate from \"./generated/templates/CheckBoxTemplate.lit.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeCb: CheckBox;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * Allows the user to set a binary value, such as true/false or yes/no for an item.\n * <br><br>\n * The <code>ui5-checkbox</code> component consists of a box and a label that describes its purpose.\n * If it's checked, an indicator is displayed inside the box.\n * To check/uncheck the <code>ui5-checkbox</code>, the user has to click or tap the square\n * box or its label.\n * <br><br>\n * The <code>ui5-checkbox</code> component only has 2 states - checked and unchecked.\n * Clicking or tapping toggles the <code>ui5-checkbox</code> between checked and unchecked state.\n *\n * <h3>Usage</h3>\n *\n * You can define the checkbox text with via the <code>text</code> property. If the text exceeds the available width, it is truncated by default.\n * In case you prefer text to wrap, set the <code>wrappingType</code> property to \"Normal\".\n * The touchable area for toggling the <code>ui5-checkbox</code> ends where the text ends.\n * <br><br>\n * You can disable the <code>ui5-checkbox</code> by setting the <code>disabled</code> property to\n * <code>true</code>,\n * or use the <code>ui5-checkbox</code> in read-only mode by setting the <code>readonly</code>\n * property to <code>true</code>.\n *\n * <br><br>\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-checkbox</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>root - Used to style the outermost wrapper of the <code>ui5-checkbox</code></li>\n * </ul>\n *\n * <br><br>\n * <h3>Keyboard Handling</h3>\n *\n * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.\n * <ul>\n * <li>[SPACE, ENTER] - Toggles between different states: checked, not checked.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CheckBox\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.CheckBox\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-checkbox\n * @public\n */\n@customElement({\n\ttag: \"ui5-checkbox\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CheckBoxTemplate,\n\tstyles: checkboxCss,\n\tdependencies: [\n\t\tLabel,\n\t\tIcon,\n\t],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @event sap.ui.webc.main.CheckBox#change\n */\n@event(\"change\")\n\nclass CheckBox extends UI5Element implements IFormElement {\n\t/**\n\t * Receives id(or many ids) of the elements that label the component\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleNameRef\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @public\n\t * @name sap.ui.webc.main.CheckBox.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is completely noninteractive.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t * <br><br>\n\t * <b>Note:</b> A read-only component is not editable,\n\t * but still provides visual feedback upon user interaction.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.readonly\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.required\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t* Defines whether the component is displayed as partially checked.\n\t* <br><br>\n\t* <b>Note:</b> The indeterminate state can be set only programmatically and can’t be achieved by user\n\t* interaction and the resulting visual state depends on the values of the <code>indeterminate</code>\n\t* and <code>checked</code> properties:\n\t* <ul>\n\t* <li> If the component is checked and indeterminate, it will be displayed as partially checked\n\t* <li> If the component is checked and it is not indeterminate, it will be displayed as checked\n\t* <li> If the component is not checked, it will be displayed as not checked regardless value of the indeterminate attribute\n\t* </ul>\n\t*\n\t* @type {boolean}\n\t* @name sap.ui.webc.main.CheckBox.prototype.indeterminate\n\t* @defaultvalue false\n\t* @public\n\t* @since 1.0.0-rc.15\n\t*/\n\t@property({ type: Boolean })\n\tindeterminate!: boolean;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking/tapping on the component, or by\n\t * pressing the Enter or Space key.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.CheckBox.prototype.checked\n\t * @defaultvalue false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.text\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttext!: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * <br><br>\n\t * <b>Note:</b>\n\t *\n\t * <ul>\n\t * <li><code>Warning</code></li>\n\t * <li><code>Error</code></li>\n\t * <li><code>None</code>(default)</li>\n\t * <li><code>Success</code></li>\n\t * <li><code>Information</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.CheckBox.prototype.valueState\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>None</code> - The text will be truncated with an ellipsis.</li>\n\t * <li><code>Normal</code> - The text will wrap. The words will not be broken based on hyphenation.</li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.WrappingType}\n\t * @name sap.ui.webc.main.CheckBox.prototype.wrappingType\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: WrappingType, defaultValue: WrappingType.None })\n\twrappingType!: `${WrappingType}`;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.CheckBox.prototype.name\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @private\n\t */\n\t@slot()\n\tformSupport!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\t_deactivate: () => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeCb) {\n\t\t\t\tactiveCb.active = false;\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._enableFormSupport();\n\t}\n\n\t_enableFormSupport() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport) {\n\t\t\tformSupport.syncNativeHiddenInput(this, (element: IFormElement, nativeInput: HTMLInputElement) => {\n\t\t\t\tnativeInput.disabled = !!element.disabled;\n\t\t\t\tnativeInput.checked = !!element.checked;\n\t\t\t\tnativeInput.value = element.checked ? \"on\" : \"\";\n\t\t\t});\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onmousedown() {\n\t\tif (this.readonly || this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = true;\n\t\tactiveCb = this; // eslint-disable-line\n\t}\n\n\t_onmouseup() {\n\t\tthis.active = false;\n\t}\n\n\t_onfocusout() {\n\t\tthis.active = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.active = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.toggle();\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.toggle();\n\t\t}\n\n\t\tthis.active = false;\n\t}\n\n\ttoggle() {\n\t\tif (this.canToggle()) {\n\t\t\tconst lastState = {\n\t\t\t\tchecked: this.checked,\n\t\t\t\tindeterminate: this.indeterminate,\n\t\t\t};\n\t\t\tif (this.indeterminate) {\n\t\t\t\tthis.indeterminate = false;\n\t\t\t\tthis.checked = true;\n\t\t\t} else {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding\n\t\t\tconst valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChagnePrevented) {\n\t\t\t\tthis.checked = lastState.checked;\n\t\t\t\tthis.indeterminate = lastState.indeterminate;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly);\n\t}\n\n\tvalueStateTextMappings() {\n\t\treturn {\n\t\t\t\"Error\": CheckBox.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Warning\": CheckBox.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t\t\"Success\": CheckBox.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t};\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-checkbox--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t},\n\t\t};\n\t}\n\n\tget ariaReadonly() {\n\t\treturn this.readonly ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaChecked() {\n\t\treturn this.indeterminate && this.checked ? \"mixed\" : this.checked;\n\t}\n\n\tget ariaLabelledBy() {\n\t\tif (!this.ariaLabelText) {\n\t\t\treturn this.text ? `${this._id}-label` : undefined;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn this.hasValueState ? `${this._id}-descr` : undefined;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget valueStateText() {\n\t\tif (this.valueState !== ValueState.None && this.valueState !== ValueState.Information) {\n\t\t\treturn this.valueStateTextMappings()[this.valueState];\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\t\treturn this.disabled ? undefined : tabindex || \"0\";\n\t}\n\n\tget isCompletelyChecked() {\n\t\treturn this.checked && !this.indeterminate;\n\t}\n\n\tstatic async onDefine() {\n\t\tCheckBox.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCheckBox.define();\n\nexport default CheckBox;\n"]}
package/dist/Dialog.d.ts CHANGED
@@ -42,6 +42,10 @@ import "@ui5/webcomponents-icons/dist/information.js";
42
42
  * <li>content - Used to style the content of the component</li>
43
43
  * <li>footer - Used to style the footer of the component</li>
44
44
  * </ul>
45
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the header or in the footer, you should remove the default dialog's paddings.
46
+ * <br>
47
+ * For more information see the sample "Bar in Header/Footer".
48
+
45
49
  *
46
50
  * <h3>ES6 Module Import</h3>
47
51
  *
@@ -159,6 +163,8 @@ declare class Dialog extends Popup {
159
163
  /**
160
164
  * Defines the header HTML Element.
161
165
  * <br><br>
166
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the header, you should remove the default dialog's paddings.
167
+ * <br><br>
162
168
  * <b>Note:</b> If <code>header</code> slot is provided, the labelling of the dialog is a responsibility of the application developer.
163
169
  * <code>accessibleName</code> should be used.
164
170
  *
@@ -170,6 +176,8 @@ declare class Dialog extends Popup {
170
176
  header: Array<HTMLElement>;
171
177
  /**
172
178
  * Defines the footer HTML Element.
179
+ * <br><br>
180
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the footer, you should remove the default dialog's paddings.
173
181
  *
174
182
  * @type {HTMLElement[]}
175
183
  * @name sap.ui.webc.main.Dialog.prototype.footer
package/dist/Dialog.js CHANGED
@@ -76,6 +76,10 @@ const ICON_PER_STATE = {
76
76
  * <li>content - Used to style the content of the component</li>
77
77
  * <li>footer - Used to style the footer of the component</li>
78
78
  * </ul>
79
+ * <b>Note:</b> When a <code>ui5-bar</code> is used in the header or in the footer, you should remove the default dialog's paddings.
80
+ * <br>
81
+ * For more information see the sample "Bar in Header/Footer".
82
+
79
83
  *
80
84
  * <h3>ES6 Module Import</h3>
81
85
  *