@ui5/webcomponents 2.23.0-rc.1 → 2.23.0

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 (288) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/ColorPicker.d.ts +2 -0
  4. package/dist/ColorPicker.js +26 -10
  5. package/dist/ColorPicker.js.map +1 -1
  6. package/dist/ColorPickerTemplate.js +2 -2
  7. package/dist/ColorPickerTemplate.js.map +1 -1
  8. package/dist/DayPicker.d.ts +3 -1
  9. package/dist/DayPicker.js +17 -3
  10. package/dist/DayPicker.js.map +1 -1
  11. package/dist/DayPickerTemplate.js +1 -1
  12. package/dist/DayPickerTemplate.js.map +1 -1
  13. package/dist/ExpandableText.d.ts +2 -0
  14. package/dist/ExpandableText.js +11 -0
  15. package/dist/ExpandableText.js.map +1 -1
  16. package/dist/ExpandableTextTemplate.js +1 -1
  17. package/dist/ExpandableTextTemplate.js.map +1 -1
  18. package/dist/Form.d.ts +1 -1
  19. package/dist/Form.js +1 -1
  20. package/dist/Form.js.map +1 -1
  21. package/dist/FormGroup.d.ts +1 -0
  22. package/dist/FormGroup.js.map +1 -1
  23. package/dist/FormTemplate.js +1 -1
  24. package/dist/FormTemplate.js.map +1 -1
  25. package/dist/ListBoxItemGroupTemplate.js +1 -2
  26. package/dist/ListBoxItemGroupTemplate.js.map +1 -1
  27. package/dist/ListItem.d.ts +2 -2
  28. package/dist/ListItem.js.map +1 -1
  29. package/dist/ListItemBase.d.ts +1 -1
  30. package/dist/ListItemBase.js +1 -2
  31. package/dist/ListItemBase.js.map +1 -1
  32. package/dist/ListItemGroupHeader.d.ts +1 -1
  33. package/dist/ListItemGroupHeader.js.map +1 -1
  34. package/dist/PopoverResize.js +1 -1
  35. package/dist/PopoverResize.js.map +1 -1
  36. package/dist/Popup.js +8 -3
  37. package/dist/Popup.js.map +1 -1
  38. package/dist/RadioButton.d.ts +1 -0
  39. package/dist/RadioButton.js +1 -0
  40. package/dist/RadioButton.js.map +1 -1
  41. package/dist/RadioButtonTemplate.js +1 -1
  42. package/dist/RadioButtonTemplate.js.map +1 -1
  43. package/dist/RangeSlider.d.ts +4 -0
  44. package/dist/RangeSlider.js +32 -8
  45. package/dist/RangeSlider.js.map +1 -1
  46. package/dist/RangeSliderTemplate.js +5 -5
  47. package/dist/RangeSliderTemplate.js.map +1 -1
  48. package/dist/RatingIndicatorTemplate.js +1 -4
  49. package/dist/RatingIndicatorTemplate.js.map +1 -1
  50. package/dist/Select.d.ts +1 -0
  51. package/dist/Select.js +4 -1
  52. package/dist/Select.js.map +1 -1
  53. package/dist/SelectPopoverTemplate.js +3 -3
  54. package/dist/SelectPopoverTemplate.js.map +1 -1
  55. package/dist/Slider.d.ts +2 -0
  56. package/dist/Slider.js +20 -11
  57. package/dist/Slider.js.map +1 -1
  58. package/dist/SliderBase.d.ts +28 -0
  59. package/dist/SliderBase.js +36 -0
  60. package/dist/SliderBase.js.map +1 -1
  61. package/dist/SliderScale.js +3 -0
  62. package/dist/SliderScale.js.map +1 -1
  63. package/dist/SliderTemplate.js +3 -3
  64. package/dist/SliderTemplate.js.map +1 -1
  65. package/dist/Tab.d.ts +0 -1
  66. package/dist/Tab.js +1 -2
  67. package/dist/Tab.js.map +1 -1
  68. package/dist/TabContainer.js +1 -1
  69. package/dist/TabContainer.js.map +1 -1
  70. package/dist/TableGroupRow.d.ts +1 -1
  71. package/dist/TableGroupRow.js +1 -1
  72. package/dist/TableGroupRow.js.map +1 -1
  73. package/dist/Tokenizer.js +10 -6
  74. package/dist/Tokenizer.js.map +1 -1
  75. package/dist/bundle.esm.js +3 -3
  76. package/dist/bundle.esm.js.map +1 -1
  77. package/dist/css/themes/ColorPicker.css +1 -1
  78. package/dist/css/themes/ExpandableText.css +1 -1
  79. package/dist/css/themes/Popover.css +1 -1
  80. package/dist/css/themes/RadioButton.css +1 -1
  81. package/dist/css/themes/RatingIndicator.css +1 -1
  82. package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
  83. package/dist/css/themes/Text.css +1 -1
  84. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  85. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  86. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  87. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  88. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  89. package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +9 -10
  90. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  91. package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +9 -10
  92. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  93. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  94. package/dist/custom-elements-internal.json +184 -312
  95. package/dist/custom-elements.json +152 -14
  96. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
  97. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
  98. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  99. package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
  100. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  101. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  102. package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
  103. package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
  104. package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
  105. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
  106. package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
  107. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
  108. package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
  109. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  110. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  111. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  112. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
  113. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  114. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
  115. package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
  116. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  117. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
  118. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
  119. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
  120. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
  121. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
  122. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  123. package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
  124. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
  125. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
  126. package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
  127. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
  128. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
  129. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
  130. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
  131. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
  132. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
  133. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
  134. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
  135. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
  136. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
  137. package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
  138. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
  139. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
  140. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
  141. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
  142. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
  143. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  144. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  145. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  146. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  147. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  148. package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
  149. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  150. package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
  151. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  152. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  153. package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
  154. package/dist/generated/i18n/i18n-defaults.js +2 -1
  155. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  156. package/dist/generated/themes/ColorPicker.css.d.ts +1 -1
  157. package/dist/generated/themes/ColorPicker.css.js +1 -1
  158. package/dist/generated/themes/ColorPicker.css.js.map +1 -1
  159. package/dist/generated/themes/ExpandableText.css.d.ts +1 -1
  160. package/dist/generated/themes/ExpandableText.css.js +1 -1
  161. package/dist/generated/themes/ExpandableText.css.js.map +1 -1
  162. package/dist/generated/themes/Popover.css.d.ts +1 -1
  163. package/dist/generated/themes/Popover.css.js +1 -1
  164. package/dist/generated/themes/Popover.css.js.map +1 -1
  165. package/dist/generated/themes/RadioButton.css.d.ts +1 -1
  166. package/dist/generated/themes/RadioButton.css.js +1 -1
  167. package/dist/generated/themes/RadioButton.css.js.map +1 -1
  168. package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
  169. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  170. package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
  171. package/dist/generated/themes/ResponsivePopoverCommon.css.d.ts +1 -1
  172. package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
  173. package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
  174. package/dist/generated/themes/Text.css.d.ts +1 -1
  175. package/dist/generated/themes/Text.css.js +1 -1
  176. package/dist/generated/themes/Text.css.js.map +1 -1
  177. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
  178. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  179. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  180. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
  181. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  182. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  183. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
  184. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  185. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  186. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
  187. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  188. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  189. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
  190. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  191. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  192. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
  193. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +9 -10
  194. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
  195. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
  196. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  197. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  198. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
  199. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +9 -10
  200. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
  201. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
  202. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  203. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  204. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
  205. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  206. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  207. package/dist/types/ListItemAccessibleRole.d.ts +0 -5
  208. package/dist/types/ListItemAccessibleRole.js +0 -5
  209. package/dist/types/ListItemAccessibleRole.js.map +1 -1
  210. package/dist/vscode.html-custom-data.json +19 -4
  211. package/dist/web-types.json +30 -6
  212. package/package.json +9 -9
  213. package/src/ColorPickerTemplate.tsx +2 -2
  214. package/src/DayPickerTemplate.tsx +1 -0
  215. package/src/ExpandableTextTemplate.tsx +1 -1
  216. package/src/FormTemplate.tsx +1 -1
  217. package/src/ListBoxItemGroupTemplate.tsx +1 -2
  218. package/src/RadioButtonTemplate.tsx +1 -0
  219. package/src/RangeSliderTemplate.tsx +7 -4
  220. package/src/RatingIndicatorTemplate.tsx +1 -5
  221. package/src/SelectPopoverTemplate.tsx +12 -6
  222. package/src/SliderTemplate.tsx +5 -3
  223. package/src/i18n/messagebundle.properties +3 -0
  224. package/src/i18n/messagebundle_ar.properties +1 -0
  225. package/src/i18n/messagebundle_bg.properties +1 -0
  226. package/src/i18n/messagebundle_ca.properties +1 -0
  227. package/src/i18n/messagebundle_cnr.properties +1 -0
  228. package/src/i18n/messagebundle_cs.properties +1 -0
  229. package/src/i18n/messagebundle_cy.properties +1 -0
  230. package/src/i18n/messagebundle_da.properties +1 -0
  231. package/src/i18n/messagebundle_de.properties +1 -0
  232. package/src/i18n/messagebundle_el.properties +1 -0
  233. package/src/i18n/messagebundle_en.properties +0 -340
  234. package/src/i18n/messagebundle_en_GB.properties +1 -0
  235. package/src/i18n/messagebundle_es.properties +1 -0
  236. package/src/i18n/messagebundle_es_MX.properties +1 -0
  237. package/src/i18n/messagebundle_et.properties +1 -0
  238. package/src/i18n/messagebundle_fi.properties +1 -0
  239. package/src/i18n/messagebundle_fr.properties +1 -0
  240. package/src/i18n/messagebundle_fr_CA.properties +1 -0
  241. package/src/i18n/messagebundle_hi.properties +1 -0
  242. package/src/i18n/messagebundle_hr.properties +2 -1
  243. package/src/i18n/messagebundle_hu.properties +1 -0
  244. package/src/i18n/messagebundle_id.properties +1 -0
  245. package/src/i18n/messagebundle_it.properties +1 -0
  246. package/src/i18n/messagebundle_iw.properties +1 -0
  247. package/src/i18n/messagebundle_ja.properties +1 -0
  248. package/src/i18n/messagebundle_kk.properties +1 -0
  249. package/src/i18n/messagebundle_ko.properties +1 -0
  250. package/src/i18n/messagebundle_lt.properties +1 -0
  251. package/src/i18n/messagebundle_lv.properties +1 -0
  252. package/src/i18n/messagebundle_mk.properties +1 -0
  253. package/src/i18n/messagebundle_ms.properties +1 -0
  254. package/src/i18n/messagebundle_nl.properties +1 -0
  255. package/src/i18n/messagebundle_no.properties +1 -0
  256. package/src/i18n/messagebundle_pl.properties +1 -0
  257. package/src/i18n/messagebundle_pt.properties +1 -0
  258. package/src/i18n/messagebundle_pt_PT.properties +1 -0
  259. package/src/i18n/messagebundle_ro.properties +1 -0
  260. package/src/i18n/messagebundle_ru.properties +1 -0
  261. package/src/i18n/messagebundle_sh.properties +1 -0
  262. package/src/i18n/messagebundle_sk.properties +1 -0
  263. package/src/i18n/messagebundle_sl.properties +1 -0
  264. package/src/i18n/messagebundle_sr.properties +1 -0
  265. package/src/i18n/messagebundle_sv.properties +1 -0
  266. package/src/i18n/messagebundle_th.properties +1 -0
  267. package/src/i18n/messagebundle_tr.properties +1 -0
  268. package/src/i18n/messagebundle_uk.properties +1 -0
  269. package/src/i18n/messagebundle_vi.properties +1 -0
  270. package/src/i18n/messagebundle_zh_CN.properties +1 -0
  271. package/src/i18n/messagebundle_zh_TW.properties +1 -0
  272. package/src/themes/ColorPicker.css +2 -0
  273. package/src/themes/ExpandableText.css +8 -0
  274. package/src/themes/Popover.css +1 -4
  275. package/src/themes/RadioButton.css +17 -14
  276. package/src/themes/RatingIndicator.css +0 -1
  277. package/src/themes/ResponsivePopoverCommon.css +3 -3
  278. package/src/themes/Text.css +4 -9
  279. package/src/themes/base/RadioButton-parameters.css +3 -3
  280. package/src/themes/base/sizes-parameters.css +4 -7
  281. package/src/themes/sap_horizon/CheckBox-parameters.css +5 -5
  282. package/src/themes/sap_horizon/RadioButton-parameters.css +2 -2
  283. package/src/themes/sap_horizon_dark/CheckBox-parameters.css +5 -5
  284. package/src/themes/sap_horizon_dark/RadioButton-parameters.css +2 -2
  285. package/src/themes/sap_horizon_hcb/CheckBox-parameters.css +5 -5
  286. package/src/themes/sap_horizon_hcb/RadioButton-parameters.css +2 -2
  287. package/src/themes/sap_horizon_hcw/CheckBox-parameters.css +5 -5
  288. package/src/themes/sap_horizon_hcw/RadioButton-parameters.css +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverResize.js","sourceRoot":"","sources":["../src/PopoverResize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,4CAA4C,CAAC;AAG/D,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,IAAK,qBAKJ;AALD,WAAK,qBAAqB;IACzB,4CAAmB,CAAA;IACnB,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AAC;IAED;;OAEG;IACK,gBAAgB;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;QAC5B,OAAO,IAAI,CAAC,eAAe,CAAC;QAC5B,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC;QACtB,OAAO,IAAI,CAAC,UAAU,CAAC;QAEvB,IAAI,CAAC,0BAA0B,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACK,0BAA0B;QACjC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACnE,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACK,0BAA0B;QACjC,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtE,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC;CACD;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,eAAe,aAAa,CAAC","sourcesContent":["import clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type Popover from \"./Popover.js\";\nimport { PopoverActualPlacement, PopoverActualHorizontalAlign } from \"./Popover.js\";\nimport PopoverVerticalAlign from \"./types/PopoverVerticalAlign.js\";\n\nenum ResizeHandlePlacement {\n\tTopLeft = \"TopLeft\",\n\tTopRight = \"TopRight\",\n\tBottomLeft = \"BottomLeft\",\n\tBottomRight = \"BottomRight\",\n}\n\n/**\n * Manages resize functionality for Popover components\n * @private\n */\nclass PopoverResize {\n\tprivate _popover: Popover;\n\tprivate _resizeMouseMoveHandler: (e: MouseEvent) => void;\n\tprivate _resizeMouseUpHandler: (e: MouseEvent) => void;\n\n\t_initialClientX?: number;\n\t_initialClientY?: number;\n\t_initialBoundingRect?: DOMRect;\n\t_minWidth?: number;\n\t_minHeight?: number;\n\t_resized = false;\n\n\t_currentDeltaX?: number;\n\t_currentDeltaY?: number;\n\n\t// These variables track the cumulative resize difference throughout the entire resizing process.\n\t// It covers scenarios where: the mouse is pressed down,\n\t// moved, and released; the popover remains open;\n\t// and the mouse is pressed down, moved, and released again.\n\t_totalDeltaX?: number;\n\t_totalDeltaY?: number;\n\n\tconstructor(popover: Popover) {\n\t\tthis._popover = popover;\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\t}\n\n\t/**\n\t * Resets the resize state\n\t */\n\treset() {\n\t\tif (!this._resized) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._resized = false;\n\n\t\tdelete this._currentDeltaX;\n\t\tdelete this._currentDeltaY;\n\n\t\tdelete this._totalDeltaX;\n\t\tdelete this._totalDeltaY;\n\t}\n\n\t/**\n\t * Returns whether the popover has been resized\n\t */\n\tget isResized(): boolean {\n\t\treturn this._resized;\n\t}\n\n\t/*\n\t * Gets the corrected left position considering resize deltas\n\t */\n\tgetCorrectedLeft(left: number): number {\n\t\tif (this.isResized) {\n\t\t\tleft -= this._currentDeltaX || 0;\n\t\t}\n\n\t\treturn left;\n\t}\n\n\t/*\n\t * Gets the corrected top position considering resize deltas\n\t */\n\tgetCorrectedTop(top: number): number {\n\t\tif (this.isResized) {\n\t\t\ttop -= this._currentDeltaY || 0;\n\t\t}\n\n\t\treturn top;\n\t}\n\n\tsetCorrectResizeHandleClass(allClasses: ClassMap) {\n\t\tswitch (this.getResizeHandlePlacement()) {\n\t\tcase ResizeHandlePlacement.BottomLeft:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-bottom-left\"] = true;\n\t\t\tbreak;\n\t\tcase ResizeHandlePlacement.BottomRight:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-bottom-right\"] = true;\n\t\t\tbreak;\n\t\tcase ResizeHandlePlacement.TopLeft:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-top-left\"] = true;\n\t\t\tbreak;\n\t\tcase ResizeHandlePlacement.TopRight:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-top-right\"] = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tgetResizeHandlePlacement() {\n\t\tconst popover = this._popover;\n\n\t\tif (this._resized && popover.resizeHandlePlacement) {\n\t\t\treturn popover.resizeHandlePlacement;\n\t\t}\n\n\t\tconst opener = popover.getOpenerHTMLElement(popover.opener);\n\n\t\tif (!opener) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst offset = 2;\n\t\tconst isRtl = popover.isRtl;\n\n\t\tconst openerRect = opener.getBoundingClientRect();\n\t\tconst popoverWrapperRect = popover.getBoundingClientRect();\n\n\t\tlet openerCX = Math.floor(openerRect.x + openerRect.width / 2);\n\t\tconst openerCY = Math.floor(openerRect.y + openerRect.height / 2);\n\n\t\tlet popoverCX = Math.floor(popoverWrapperRect.x + popoverWrapperRect.width / 2);\n\t\tconst popoverCY = Math.floor(popoverWrapperRect.y + popoverWrapperRect.height / 2);\n\n\t\tconst verticalAlign = popover.verticalAlign;\n\t\tconst actualHorizontalAlign = popover._actualHorizontalAlign;\n\n\t\tconst isPopoverWidthBiggerThanOpener = popoverWrapperRect.width > openerRect.width;\n\t\tconst isPopoverHeightBiggerThanOpener = popoverWrapperRect.height > openerRect.height;\n\n\t\tif (isRtl) {\n\t\t\topenerCX = -openerCX;\n\t\t\tpopoverCX = -popoverCX;\n\t\t}\n\n\t\tswitch (popover.getActualPlacement(openerRect)) {\n\t\tcase PopoverActualPlacement.Left:\n\t\t\tif (isPopoverHeightBiggerThanOpener) {\n\t\t\t\tif (popoverCY > openerCY + offset) {\n\t\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\t\t}\n\n\t\t\tif (verticalAlign === PopoverVerticalAlign.Top) {\n\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\tcase PopoverActualPlacement.Right:\n\t\t\tif (isPopoverHeightBiggerThanOpener) {\n\t\t\t\tif (popoverCY + offset < openerCY) {\n\t\t\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\t\t}\n\n\t\t\tif (verticalAlign === PopoverVerticalAlign.Bottom) {\n\t\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\tcase PopoverActualPlacement.Bottom:\n\t\t\tif (isPopoverWidthBiggerThanOpener) {\n\t\t\t\tif (popoverCX + offset < openerCX) {\n\t\t\t\t\treturn isRtl ? ResizeHandlePlacement.BottomRight : ResizeHandlePlacement.BottomLeft;\n\t\t\t\t}\n\n\t\t\t\treturn isRtl ? ResizeHandlePlacement.BottomLeft : ResizeHandlePlacement.BottomRight;\n\t\t\t}\n\n\t\t\tif (isRtl) {\n\t\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Left) {\n\t\t\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t}\n\n\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Right) {\n\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\tcase PopoverActualPlacement.Top:\n\t\tdefault:\n\t\t\tif (isPopoverWidthBiggerThanOpener) {\n\t\t\t\tif (popoverCX + offset < openerCX) {\n\t\t\t\t\treturn isRtl ? ResizeHandlePlacement.TopRight : ResizeHandlePlacement.TopLeft;\n\t\t\t\t}\n\n\t\t\t\treturn isRtl ? ResizeHandlePlacement.TopLeft : ResizeHandlePlacement.TopRight;\n\t\t\t}\n\n\t\t\tif (isRtl) {\n\t\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Left) {\n\t\t\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\t\t}\n\n\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Right) {\n\t\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t}\n\t}\n\n\t/**\n\t * Handles mouse down event on resize handle\n\t */\n\tonResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._popover.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tthis._resized = true;\n\t\tthis._initialBoundingRect = this._popover.getBoundingClientRect();\n\n\t\tthis._totalDeltaX = this._currentDeltaX;\n\t\tthis._totalDeltaY = this._currentDeltaY;\n\n\t\tconst {\n\t\t\tminWidth,\n\t\t\tminHeight,\n\t\t} = window.getComputedStyle(this._popover);\n\n\t\tconst domRefComputedStyle = window.getComputedStyle(this._popover._getRealDomRef!());\n\n\t\tthis._initialClientX = e.clientX;\n\t\tthis._initialClientY = e.clientY;\n\n\t\tthis._minWidth = Math.max(Number.parseFloat(minWidth), Number.parseFloat(domRefComputedStyle.minWidth));\n\t\tthis._minHeight = Number.parseFloat(minHeight);\n\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t/**\n\t * Handles mouse move event during resize\n\t */\n\tprivate _onResizeMouseMove(e: MouseEvent) {\n\t\tconst popover = this._popover;\n\t\tconst margin = popover._viewportMargin;\n\t\tconst { clientX, clientY } = e;\n\t\tconst resizeHandlePlacement = this.getResizeHandlePlacement();\n\t\tconst initialBoundingRect = this._initialBoundingRect!;\n\t\tconst deltaX = clientX - this._initialClientX!;\n\t\tconst deltaY = clientY - this._initialClientY!;\n\n\t\tlet newWidth,\n\t\t\tnewHeight;\n\n\t\t// Determine if we're resizing from left or right edge\n\t\tconst isResizingFromLeft = resizeHandlePlacement === ResizeHandlePlacement.TopLeft\n\t\t\t|| resizeHandlePlacement === ResizeHandlePlacement.BottomLeft;\n\n\t\tconst isResizingFromTop = resizeHandlePlacement === ResizeHandlePlacement.TopLeft\n\t\t\t|| resizeHandlePlacement === ResizeHandlePlacement.TopRight;\n\n\t\t// Calculate width changes\n\t\tif (isResizingFromLeft) {\n\t\t\t// Resizing from left edge - width increases when moving left (negative delta)\n\t\t\tconst maxWidthFromLeft = initialBoundingRect.x + initialBoundingRect.width - margin;\n\n\t\t\tnewWidth = clamp(\n\t\t\t\tinitialBoundingRect.width - deltaX,\n\t\t\t\tthis._minWidth!,\n\t\t\t\tmaxWidthFromLeft,\n\t\t\t);\n\n\t\t\t// Adjust left position when resizing from left\n\t\t\t// Ensure the left edge respects the viewport margin and the right edge position\n\t\t\tconst newLeft = clamp(\n\t\t\t\tinitialBoundingRect.x + deltaX,\n\t\t\t\tmargin,\n\t\t\t\tinitialBoundingRect.x + initialBoundingRect.width - this._minWidth!,\n\t\t\t);\n\n\t\t\t// Recalculate width based on actual left position to stay within viewport with margin\n\t\t\tnewWidth = Math.min(newWidth, initialBoundingRect.x + initialBoundingRect.width - newLeft);\n\n\t\t\tthis._currentDeltaX = (initialBoundingRect.x - newLeft) / 2;\n\t\t} else {\n\t\t\t// Resizing from right edge - width increases when moving right (positive delta)\n\t\t\tconst maxWidthFromRight = window.innerWidth - initialBoundingRect.x - margin;\n\n\t\t\tnewWidth = clamp(\n\t\t\t\tinitialBoundingRect.width + deltaX,\n\t\t\t\tthis._minWidth!,\n\t\t\t\tmaxWidthFromRight,\n\t\t\t);\n\n\t\t\tthis._currentDeltaX = (initialBoundingRect.width - newWidth) / 2;\n\t\t}\n\n\t\t// Calculate height changes\n\t\tif (isResizingFromTop) {\n\t\t\t// Resizing from top edge - height increases when moving up (negative delta)\n\t\t\tconst maxHeightFromTop = initialBoundingRect.y + initialBoundingRect.height - margin;\n\n\t\t\tnewHeight = clamp(\n\t\t\t\tinitialBoundingRect.height - deltaY,\n\t\t\t\tthis._minHeight!,\n\t\t\t\tmaxHeightFromTop,\n\t\t\t);\n\n\t\t\t// Adjust top position when resizing from top\n\t\t\t// Ensure the top edge respects the viewport margin and the bottom edge position\n\t\t\tconst newTop = clamp(\n\t\t\t\tinitialBoundingRect.y + deltaY,\n\t\t\t\tmargin,\n\t\t\t\tinitialBoundingRect.y + initialBoundingRect.height - this._minHeight!,\n\t\t\t);\n\n\t\t\t// Recalculate height based on actual top position to stay within viewport with margin\n\t\t\tnewHeight = Math.min(newHeight, initialBoundingRect.y + initialBoundingRect.height - newTop);\n\n\t\t\tthis._currentDeltaY = (initialBoundingRect.y - newTop) / 2;\n\t\t} else {\n\t\t\t// Resizing from bottom edge - height increases when moving down (positive delta)\n\t\t\tconst maxHeightFromBottom = window.innerHeight - initialBoundingRect.y - margin;\n\n\t\t\tnewHeight = clamp(\n\t\t\t\tinitialBoundingRect.height + deltaY,\n\t\t\t\tthis._minHeight!,\n\t\t\t\tmaxHeightFromBottom,\n\t\t\t);\n\n\t\t\tthis._currentDeltaY = (initialBoundingRect.height - newHeight) / 2;\n\t\t}\n\n\t\tthis._currentDeltaX += this._totalDeltaX || 0;\n\t\tthis._currentDeltaY += this._totalDeltaY || 0;\n\n\t\tconst placement = this._popover.calcPlacement(this._popover._openerRect!, {\n\t\t\twidth: newWidth,\n\t\t\theight: newHeight,\n\t\t});\n\n\t\tthis._popover.arrowTranslateX = placement.arrow.x;\n\t\tthis._popover.arrowTranslateY = placement.arrow.y;\n\n\t\tObject.assign(this._popover.style, {\n\t\t\tleft: `${placement.left}px`,\n\t\t\ttop: `${placement.top}px`,\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t});\n\t}\n\n\t/**\n\t * Handles mouse up event after resize\n\t */\n\tprivate _onResizeMouseUp() {\n\t\tdelete this._initialClientX;\n\t\tdelete this._initialClientY;\n\t\tdelete this._initialBoundingRect;\n\t\tdelete this._minWidth;\n\t\tdelete this._minHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t/**\n\t * Attaches mouse event handlers for resize\n\t */\n\tprivate _attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n\n\t/**\n\t * Detaches mouse event handlers for resize\n\t */\n\tprivate _detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n}\n\nexport { ResizeHandlePlacement };\n\nexport default PopoverResize;\n"]}
1
+ {"version":3,"file":"PopoverResize.js","sourceRoot":"","sources":["../src/PopoverResize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,4CAA4C,CAAC;AAG/D,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,IAAK,qBAKJ;AALD,WAAK,qBAAqB;IACzB,4CAAmB,CAAA;IACnB,8CAAqB,CAAA;IACrB,kDAAyB,CAAA;IACzB,oDAA2B,CAAA;AAC5B,CAAC,EALI,qBAAqB,KAArB,qBAAqB,QAKzB;AAED;;;GAGG;AACH,MAAM,aAAa;IAsBlB,YAAY,OAAgB;QAZ5B,aAAQ,GAAG,KAAK,CAAC;QAahB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClE,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,KAAK;QACJ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC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,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtE,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC;CACD;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,eAAe,aAAa,CAAC","sourcesContent":["import clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type Popover from \"./Popover.js\";\nimport { PopoverActualPlacement, PopoverActualHorizontalAlign } from \"./Popover.js\";\nimport PopoverVerticalAlign from \"./types/PopoverVerticalAlign.js\";\n\nenum ResizeHandlePlacement {\n\tTopLeft = \"TopLeft\",\n\tTopRight = \"TopRight\",\n\tBottomLeft = \"BottomLeft\",\n\tBottomRight = \"BottomRight\",\n}\n\n/**\n * Manages resize functionality for Popover components\n * @private\n */\nclass PopoverResize {\n\tprivate _popover: Popover;\n\tprivate _resizeMouseMoveHandler: (e: MouseEvent) => void;\n\tprivate _resizeMouseUpHandler: (e: MouseEvent) => void;\n\n\t_initialClientX?: number;\n\t_initialClientY?: number;\n\t_initialBoundingRect?: DOMRect;\n\t_minWidth?: number;\n\t_minHeight?: number;\n\t_resized = false;\n\n\t_currentDeltaX?: number;\n\t_currentDeltaY?: number;\n\n\t// These variables track the cumulative resize difference throughout the entire resizing process.\n\t// It covers scenarios where: the mouse is pressed down,\n\t// moved, and released; the popover remains open;\n\t// and the mouse is pressed down, moved, and released again.\n\t_totalDeltaX?: number;\n\t_totalDeltaY?: number;\n\n\tconstructor(popover: Popover) {\n\t\tthis._popover = popover;\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\t}\n\n\t/**\n\t * Resets the resize state\n\t */\n\treset() {\n\t\tif (!this._resized) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._resized = false;\n\n\t\tdelete this._currentDeltaX;\n\t\tdelete this._currentDeltaY;\n\n\t\tdelete this._totalDeltaX;\n\t\tdelete this._totalDeltaY;\n\t}\n\n\t/**\n\t * Returns whether the popover has been resized\n\t */\n\tget isResized(): boolean {\n\t\treturn this._resized;\n\t}\n\n\t/*\n\t * Gets the corrected left position considering resize deltas\n\t */\n\tgetCorrectedLeft(left: number): number {\n\t\tif (this.isResized) {\n\t\t\tleft -= this._currentDeltaX || 0;\n\t\t}\n\n\t\treturn left;\n\t}\n\n\t/*\n\t * Gets the corrected top position considering resize deltas\n\t */\n\tgetCorrectedTop(top: number): number {\n\t\tif (this.isResized) {\n\t\t\ttop -= this._currentDeltaY || 0;\n\t\t}\n\n\t\treturn top;\n\t}\n\n\tsetCorrectResizeHandleClass(allClasses: ClassMap) {\n\t\tswitch (this.getResizeHandlePlacement()) {\n\t\tcase ResizeHandlePlacement.BottomLeft:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-bottom-left\"] = true;\n\t\t\tbreak;\n\t\tcase ResizeHandlePlacement.BottomRight:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-bottom-right\"] = true;\n\t\t\tbreak;\n\t\tcase ResizeHandlePlacement.TopLeft:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-top-left\"] = true;\n\t\t\tbreak;\n\t\tcase ResizeHandlePlacement.TopRight:\n\t\t\tallClasses.root[\"ui5-popover-resize-handle-top-right\"] = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tgetResizeHandlePlacement() {\n\t\tconst popover = this._popover;\n\n\t\tif (this._resized && popover.resizeHandlePlacement) {\n\t\t\treturn popover.resizeHandlePlacement;\n\t\t}\n\n\t\tconst opener = popover.getOpenerHTMLElement(popover.opener);\n\n\t\tif (!opener) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst offset = 2;\n\t\tconst isRtl = popover.isRtl;\n\n\t\tconst openerRect = opener.getBoundingClientRect();\n\t\tconst popoverWrapperRect = popover.getBoundingClientRect();\n\n\t\tlet openerCX = Math.floor(openerRect.x + openerRect.width / 2);\n\t\tconst openerCY = Math.floor(openerRect.y + openerRect.height / 2);\n\n\t\tlet popoverCX = Math.floor(popoverWrapperRect.x + popoverWrapperRect.width / 2);\n\t\tconst popoverCY = Math.floor(popoverWrapperRect.y + popoverWrapperRect.height / 2);\n\n\t\tconst verticalAlign = popover.verticalAlign;\n\t\tconst actualHorizontalAlign = popover._actualHorizontalAlign;\n\n\t\tconst isPopoverWidthBiggerThanOpener = popoverWrapperRect.width > openerRect.width;\n\t\tconst isPopoverHeightBiggerThanOpener = popoverWrapperRect.height > openerRect.height;\n\n\t\tif (isRtl) {\n\t\t\topenerCX = -openerCX;\n\t\t\tpopoverCX = -popoverCX;\n\t\t}\n\n\t\tswitch (popover.getActualPlacement(openerRect)) {\n\t\tcase PopoverActualPlacement.Left:\n\t\t\tif (isPopoverHeightBiggerThanOpener) {\n\t\t\t\tif (popoverCY > openerCY + offset) {\n\t\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\t\t}\n\n\t\t\tif (verticalAlign === PopoverVerticalAlign.Top) {\n\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\tcase PopoverActualPlacement.Right:\n\t\t\tif (isPopoverHeightBiggerThanOpener) {\n\t\t\t\tif (popoverCY + offset < openerCY) {\n\t\t\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\t\t}\n\n\t\t\tif (verticalAlign === PopoverVerticalAlign.Bottom) {\n\t\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\tcase PopoverActualPlacement.Bottom:\n\t\t\tif (isPopoverWidthBiggerThanOpener) {\n\t\t\t\tif (popoverCX + offset < openerCX) {\n\t\t\t\t\treturn isRtl ? ResizeHandlePlacement.BottomRight : ResizeHandlePlacement.BottomLeft;\n\t\t\t\t}\n\n\t\t\t\treturn isRtl ? ResizeHandlePlacement.BottomLeft : ResizeHandlePlacement.BottomRight;\n\t\t\t}\n\n\t\t\tif (isRtl) {\n\t\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Left) {\n\t\t\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t}\n\n\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Right) {\n\t\t\t\treturn ResizeHandlePlacement.BottomLeft;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.BottomRight;\n\t\tcase PopoverActualPlacement.Top:\n\t\tdefault:\n\t\t\tif (isPopoverWidthBiggerThanOpener) {\n\t\t\t\tif (popoverCX + offset < openerCX) {\n\t\t\t\t\treturn isRtl ? ResizeHandlePlacement.TopRight : ResizeHandlePlacement.TopLeft;\n\t\t\t\t}\n\n\t\t\t\treturn isRtl ? ResizeHandlePlacement.TopLeft : ResizeHandlePlacement.TopRight;\n\t\t\t}\n\n\t\t\tif (isRtl) {\n\t\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Left) {\n\t\t\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t\t\t}\n\n\t\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\t\t}\n\n\t\t\tif (actualHorizontalAlign === PopoverActualHorizontalAlign.Right) {\n\t\t\t\treturn ResizeHandlePlacement.TopLeft;\n\t\t\t}\n\n\t\t\treturn ResizeHandlePlacement.TopRight;\n\t\t}\n\t}\n\n\t/**\n\t * Handles mouse down event on resize handle\n\t */\n\tonResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._popover.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tthis._resized = true;\n\t\tthis._initialBoundingRect = this._popover.getBoundingClientRect();\n\n\t\tthis._totalDeltaX = this._currentDeltaX;\n\t\tthis._totalDeltaY = this._currentDeltaY;\n\n\t\tconst {\n\t\t\tminWidth,\n\t\t\tminHeight,\n\t\t} = window.getComputedStyle(this._popover);\n\n\t\tconst domRefComputedStyle = window.getComputedStyle(this._popover);\n\n\t\tthis._initialClientX = e.clientX;\n\t\tthis._initialClientY = e.clientY;\n\n\t\tthis._minWidth = Math.max(Number.parseFloat(minWidth), Number.parseFloat(domRefComputedStyle.minWidth));\n\t\tthis._minHeight = Number.parseFloat(minHeight);\n\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t/**\n\t * Handles mouse move event during resize\n\t */\n\tprivate _onResizeMouseMove(e: MouseEvent) {\n\t\tconst popover = this._popover;\n\t\tconst margin = popover._viewportMargin;\n\t\tconst { clientX, clientY } = e;\n\t\tconst resizeHandlePlacement = this.getResizeHandlePlacement();\n\t\tconst initialBoundingRect = this._initialBoundingRect!;\n\t\tconst deltaX = clientX - this._initialClientX!;\n\t\tconst deltaY = clientY - this._initialClientY!;\n\n\t\tlet newWidth,\n\t\t\tnewHeight;\n\n\t\t// Determine if we're resizing from left or right edge\n\t\tconst isResizingFromLeft = resizeHandlePlacement === ResizeHandlePlacement.TopLeft\n\t\t\t|| resizeHandlePlacement === ResizeHandlePlacement.BottomLeft;\n\n\t\tconst isResizingFromTop = resizeHandlePlacement === ResizeHandlePlacement.TopLeft\n\t\t\t|| resizeHandlePlacement === ResizeHandlePlacement.TopRight;\n\n\t\t// Calculate width changes\n\t\tif (isResizingFromLeft) {\n\t\t\t// Resizing from left edge - width increases when moving left (negative delta)\n\t\t\tconst maxWidthFromLeft = initialBoundingRect.x + initialBoundingRect.width - margin;\n\n\t\t\tnewWidth = clamp(\n\t\t\t\tinitialBoundingRect.width - deltaX,\n\t\t\t\tthis._minWidth!,\n\t\t\t\tmaxWidthFromLeft,\n\t\t\t);\n\n\t\t\t// Adjust left position when resizing from left\n\t\t\t// Ensure the left edge respects the viewport margin and the right edge position\n\t\t\tconst newLeft = clamp(\n\t\t\t\tinitialBoundingRect.x + deltaX,\n\t\t\t\tmargin,\n\t\t\t\tinitialBoundingRect.x + initialBoundingRect.width - this._minWidth!,\n\t\t\t);\n\n\t\t\t// Recalculate width based on actual left position to stay within viewport with margin\n\t\t\tnewWidth = Math.min(newWidth, initialBoundingRect.x + initialBoundingRect.width - newLeft);\n\n\t\t\tthis._currentDeltaX = (initialBoundingRect.x - newLeft) / 2;\n\t\t} else {\n\t\t\t// Resizing from right edge - width increases when moving right (positive delta)\n\t\t\tconst maxWidthFromRight = window.innerWidth - initialBoundingRect.x - margin;\n\n\t\t\tnewWidth = clamp(\n\t\t\t\tinitialBoundingRect.width + deltaX,\n\t\t\t\tthis._minWidth!,\n\t\t\t\tmaxWidthFromRight,\n\t\t\t);\n\n\t\t\tthis._currentDeltaX = (initialBoundingRect.width - newWidth) / 2;\n\t\t}\n\n\t\t// Calculate height changes\n\t\tif (isResizingFromTop) {\n\t\t\t// Resizing from top edge - height increases when moving up (negative delta)\n\t\t\tconst maxHeightFromTop = initialBoundingRect.y + initialBoundingRect.height - margin;\n\n\t\t\tnewHeight = clamp(\n\t\t\t\tinitialBoundingRect.height - deltaY,\n\t\t\t\tthis._minHeight!,\n\t\t\t\tmaxHeightFromTop,\n\t\t\t);\n\n\t\t\t// Adjust top position when resizing from top\n\t\t\t// Ensure the top edge respects the viewport margin and the bottom edge position\n\t\t\tconst newTop = clamp(\n\t\t\t\tinitialBoundingRect.y + deltaY,\n\t\t\t\tmargin,\n\t\t\t\tinitialBoundingRect.y + initialBoundingRect.height - this._minHeight!,\n\t\t\t);\n\n\t\t\t// Recalculate height based on actual top position to stay within viewport with margin\n\t\t\tnewHeight = Math.min(newHeight, initialBoundingRect.y + initialBoundingRect.height - newTop);\n\n\t\t\tthis._currentDeltaY = (initialBoundingRect.y - newTop) / 2;\n\t\t} else {\n\t\t\t// Resizing from bottom edge - height increases when moving down (positive delta)\n\t\t\tconst maxHeightFromBottom = window.innerHeight - initialBoundingRect.y - margin;\n\n\t\t\tnewHeight = clamp(\n\t\t\t\tinitialBoundingRect.height + deltaY,\n\t\t\t\tthis._minHeight!,\n\t\t\t\tmaxHeightFromBottom,\n\t\t\t);\n\n\t\t\tthis._currentDeltaY = (initialBoundingRect.height - newHeight) / 2;\n\t\t}\n\n\t\tthis._currentDeltaX += this._totalDeltaX || 0;\n\t\tthis._currentDeltaY += this._totalDeltaY || 0;\n\n\t\tconst placement = this._popover.calcPlacement(this._popover._openerRect!, {\n\t\t\twidth: newWidth,\n\t\t\theight: newHeight,\n\t\t});\n\n\t\tthis._popover.arrowTranslateX = placement.arrow.x;\n\t\tthis._popover.arrowTranslateY = placement.arrow.y;\n\n\t\tObject.assign(this._popover.style, {\n\t\t\tleft: `${placement.left}px`,\n\t\t\ttop: `${placement.top}px`,\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t});\n\t}\n\n\t/**\n\t * Handles mouse up event after resize\n\t */\n\tprivate _onResizeMouseUp() {\n\t\tdelete this._initialClientX;\n\t\tdelete this._initialClientY;\n\t\tdelete this._initialBoundingRect;\n\t\tdelete this._minWidth;\n\t\tdelete this._minHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t/**\n\t * Attaches mouse event handlers for resize\n\t */\n\tprivate _attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n\n\t/**\n\t * Detaches mouse event handlers for resize\n\t */\n\tprivate _detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n}\n\nexport { ResizeHandlePlacement };\n\nexport default PopoverResize;\n"]}
package/dist/Popup.js CHANGED
@@ -317,11 +317,16 @@ let Popup = Popup_1 = class Popup extends UI5Element {
317
317
  * @returns Promise that resolves when the focus is applied
318
318
  */
319
319
  async applyFocus() {
320
- // do nothing if the standard HTML autofocus is used
321
- if (this.querySelector("[autofocus]")) {
320
+ await this._waitForDomRef();
321
+ const elementWithAutoFocus = this.querySelector("[autofocus]");
322
+ if (elementWithAutoFocus) {
323
+ // If the "autofocus" is set on UI5Element, focus it manually.
324
+ if ("isUI5Element" in elementWithAutoFocus) {
325
+ elementWithAutoFocus.focus();
326
+ }
327
+ // Otherwise, the browser will focus it automatically.
322
328
  return;
323
329
  }
324
- await this._waitForDomRef();
325
330
  if (this.getRootNode() === this) {
326
331
  return;
327
332
  }
package/dist/Popup.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../src/Popup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,QAAQ,EACR,SAAS,EACT,OAAO,GACP,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAC3H,OAAO,EACN,kBAAkB,EAClB,yBAAyB,EACzB,+BAA+B,EAC/B,mCAAmC,EACnC,oBAAoB,GACpB,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAChH,OA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A6lBnB;AAED,eAAe,KAAK,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport jsxRender from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tisChrome,\n\tisDesktop,\n\tisPhone,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getFirstFocusableElement, getLastFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport {\n\tregisterUI5Element,\n\tgetEffectiveAriaLabelText,\n\tgetEffectiveAriaDescriptionText,\n\tgetAllAccessibleDescriptionRefTexts,\n\tderegisterUI5Element,\n} from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport { hasStyle, createStyle } from \"@ui5/webcomponents-base/dist/ManagedStyles.js\";\nimport { isEnter, isTabPrevious } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getFocusedElement, isFocusedElementWithinNode } from \"@ui5/webcomponents-base/dist/util/PopupUtils.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport MediaRange from \"@ui5/webcomponents-base/dist/MediaRange.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport PopupTemplate from \"./PopupTemplate.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\nimport { addOpenedPopup, removeOpenedPopup } from \"./popup-utils/OpenedPopupsRegistry.js\";\n\n// Styles\nimport popupStlyes from \"./generated/themes/Popup.css.js\";\nimport popupBlockLayerStyles from \"./generated/themes/PopupBlockLayer.css.js\";\nimport globalStyles from \"./generated/themes/PopupGlobal.css.js\";\n\nconst createBlockingStyle = (): void => {\n\tif (!hasStyle(\"data-ui5-popup-scroll-blocker\")) {\n\t\tcreateStyle(globalStyles, \"data-ui5-popup-scroll-blocker\");\n\t}\n};\n\ncreateBlockingStyle();\n\nconst pageScrollingBlockers = new Set<Popup>();\n\ntype PopupScrollEventDetail = {\n\tscrollTop: number;\n\ttargetRef: HTMLElement;\n}\n\ntype PopupBeforeCloseEventDetail = {\n\tescPressed: boolean;\n}\n\n/**\n * @class\n * ### Overview\n * Base class for all popup Web Components.\n *\n * If you need to create your own popup-like custom UI5 Web Components.\n *\n * 1. The Popup class handles modality:\n * - The \"isModal\" getter can be overridden by derivatives to provide their own conditions when they are modal or not\n * - Derivatives may call the \"blockPageScrolling\" and \"unblockPageScrolling\" static methods to temporarily remove scrollbars on the html element\n * - Derivatives may call the \"openPopup\" and \"closePopup\" methods which handle focus, manage the popup registry and for modal popups, manage the blocking layer\n *\n * 2. Provides blocking layer (relevant for modal popups only):\n * - Controlled by the \"open\" and \"close\" methods\n *\n * 3. The Popup class \"traps\" focus:\n * - Derivatives may call the \"applyInitialFocus\" method (usually when opening, to transfer focus inside the popup)\n *\n * 4. The template of this component exposes two inline partials you can override in derivatives:\n * - beforeContent (upper part of the box, useful for header/title/close button)\n * - afterContent (lower part, useful for footer/action buttons)\n * @constructor\n * @extends UI5Element\n * @public\n */\n@customElement({\n\trenderer: jsxRender,\n\tstyles: [popupStlyes, popupBlockLayerStyles],\n\ttemplate: PopupTemplate,\n})\n/**\n * Fired before the component is opened. This event can be cancelled, which will prevent the popup from opening.\n * @public\n */\n@event(\"before-open\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is opened.\n * @public\n */\n@event(\"open\")\n\n/**\n * Fired before the component is closed. This event can be cancelled, which will prevent the popup from closing.\n * @public\n * @param {boolean} escPressed Indicates that `ESC` key has triggered the event.\n */\n@event(\"before-close\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is closed.\n * @public\n */\n@event(\"close\")\n\n/**\n * Fired whenever the popup content area is scrolled\n * @private\n */\n@event(\"scroll\", {\n\tbubbles: true,\n})\nabstract class Popup extends UI5Element {\n\teventDetails!: {\n\t\t\"before-open\": void\n\t\t\"open\": void\n\t\t\"before-close\": PopupBeforeCloseEventDetail\n\t\t\"close\": void\n\t\t\"scroll\": PopupScrollEventDetail\n\t}\n\n\t/**\n\t * Defines the ID of the HTML Element, which will get the initial focus.\n\t *\n\t * **Note:** If an element with `autofocus` attribute is added inside the component,\n\t * `initialFocus` won't take effect.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tinitialFocus?: string;\n\n\t/**\n\t * Defines if the focus should be returned to the previously focused element,\n\t * when the popup closes.\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t*/\n\t@property({ type: Boolean })\n\tpreventFocusRestore = false;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the IDs of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Allows setting a custom role.\n\t * @default \"Dialog\"\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property()\n\taccessibleRole: `${PopupAccessibleRole}` = \"Dialog\";\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that describe the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescriptionRef?: string;\n\n\t/**\n\t * Constantly updated value of texts collected from the associated labels.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_associatedDescriptionRefTexts?: string;\n\n\t/**\n\t * Defines the current media query size.\n\t * @private\n\t */\n\t@property()\n\tmediaRange?: string;\n\n\t/**\n\t * Indicates whether initial focus should be prevented.\n\t * @public\n\t * @default false\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tpreventInitialFocus = false;\n\n\t/**\n\t * Indicates if the element is the top modal popup\n\t *\n\t * This property is calculated automatically\n\t * @private\n\t * @default false\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\tisTopModalPopup = false;\n\n\t/**\n\t * Defines the content of the Popup.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonDesktop = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_shouldFocusRoot?: boolean;\n\t_focusedElementBeforeOpen?: HTMLElement | null;\n\t_opened = false;\n\t_open = false;\n\t_resizeHandlerRegistered = false;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._resizeHandler = this._resize.bind(this);\n\n\t\tthis._getRealDomRef = () => {\n\t\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\"[root-element]\")!;\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.onPhone = isPhone();\n\t\tthis.onDesktop = isDesktop();\n\t}\n\n\tonAfterRendering() {\n\t\trenderFinished().then(() => {\n\t\t\tthis._updateMediaRange();\n\t\t});\n\n\t\tif (this.open) {\n\t\t\tthis._registerResizeHandler();\n\t\t} else {\n\t\t\tthis._deregisterResizeHandler();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"popover\", \"manual\");\n\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tthis.tabIndex = -1;\n\n\t\tthis.handleOpenOnEnterDOM();\n\n\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup-container\", \"true\");\n\t\tregisterUI5Element(this, this._updateAssociatedLabelsTexts.bind(this));\n\t}\n\n\thandleOpenOnEnterDOM() {\n\t\tif (this.open) {\n\t\t\tthis.showPopover();\n\t\t\tthis.openPopup();\n\t\t}\n\t}\n\n\tonExitDOM() {\n\t\tif (this._opened) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tthis._deregisterResizeHandler();\n\t\tthis._detachBrowserEvents();\n\t\tderegisterUI5Element(this);\n\t}\n\n\t/**\n\t * Indicates if the element is open\n\t * @public\n\t * @default false\n\t * @since 1.2.0\n\t */\n\t@property({ type: Boolean })\n\tset open(value: boolean) {\n\t\tif (this._open === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._open = value;\n\n\t\tif (value) {\n\t\t\tthis.openPopup();\n\t\t} else {\n\t\t\tthis.closePopup();\n\t\t}\n\t}\n\n\tget open() : boolean {\n\t\treturn this._open;\n\t}\n\n\tasync openPopup() {\n\t\tif (this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-open\");\n\n\t\tif (prevented) {\n\t\t\tthis.open = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._attachBrowserEvents();\n\n\t\tif (this.isModal) {\n\t\t\tPopup.blockPageScrolling(this);\n\t\t}\n\n\t\tthis._focusedElementBeforeOpen = getFocusedElement();\n\n\t\tthis._show();\n\t\tthis._opened = true;\n\n\t\tif (this.getDomRef()) {\n\t\t\tthis._updateMediaRange();\n\t\t}\n\n\t\tthis._addOpenedPopup();\n\n\t\tthis.classList.add(\"ui5-popup-opening\");\n\t\tsetTimeout(() => {\n\t\t\tthis.classList.remove(\"ui5-popup-opening\");\n\t\t}, 50);\n\n\t\tthis.open = true;\n\n\t\t// initial focus, if focused element is statically created\n\t\tawait this.applyInitialFocus();\n\n\t\tawait renderFinished();\n\n\t\tif (this.isConnected) {\n\t\t\tthis.fireDecoratorEvent(\"open\");\n\t\t}\n\t}\n\n\t_resize() {\n\t\tthis._updateMediaRange();\n\t}\n\n\t/**\n\t * Prevents the user from interacting with the content under the block layer\n\t */\n\t_preventBlockLayerFocus(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\t}\n\n\t_attachBrowserEvents() {\n\n\t}\n\n\t_detachBrowserEvents() {\n\n\t}\n\n\t/**\n\t * Temporarily removes scrollbars from the html element\n\t * @protected\n\t */\n\tstatic blockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.add(popup);\n\n\t\tif (pageScrollingBlockers.size !== 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.add(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t/**\n\t * Restores scrollbars on the html element, if needed\n\t * @protected\n\t */\n\tstatic unblockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.delete(popup);\n\n\t\tif (pageScrollingBlockers.size !== 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.remove(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t_scroll(e: Event) {\n\t\tthis.fireDecoratorEvent(\"scroll\", {\n\t\t\tscrollTop: (e.target as HTMLElement).scrollTop,\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t});\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isTabOutAttempt = e.target === this._root && isTabPrevious(e);\n\t\t// if the popup is closed, focus is already moved, so Enter keydown may result in click on the newly focused element\n\t\tconst isEnterOnClosedPopupChild = isEnter(e) && !this.open;\n\n\t\tif (isTabOutAttempt || isEnterOnClosedPopupChild) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// relatedTarget is the element, which will get focus. If no such element exists, focus the root.\n\t\t// This happens after the mouse is released in order to not interrupt text selection.\n\t\tif (!e.relatedTarget) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tif (this.shadowRoot!.contains(e.target as HTMLElement)) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t} else {\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t_onmouseup() {\n\t\tif (this._shouldFocusRoot) {\n\t\t\tif (isChrome()) {\n\t\t\t\tthis._root.focus();\n\t\t\t}\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToFirst() {\n\t\tconst firstFocusable = await getFirstFocusableElement(this);\n\n\t\tif (firstFocusable) {\n\t\t\tfirstFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToLast() {\n\t\tconst lastFocusable = await getLastFocusableElement(this);\n\n\t\tif (lastFocusable) {\n\t\t\tlastFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Use this method to focus the element denoted by \"initialFocus\", if provided,\n\t * or the first focusable element otherwise.\n\t * @protected\n\t */\n\tasync applyInitialFocus() {\n\t\tif (!this.preventInitialFocus) {\n\t\t\tawait this.applyFocus();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the element denoted by `initialFocus`, if provided,\n\t * or the first focusable element otherwise.\n\t * @public\n\t * @returns Promise that resolves when the focus is applied\n\t */\n\tasync applyFocus(): Promise<void> {\n\t\t// do nothing if the standard HTML autofocus is used\n\t\tif (this.querySelector(\"[autofocus]\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait this._waitForDomRef();\n\n\t\tif (this.getRootNode() === this) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet element;\n\n\t\tif (this.initialFocus) {\n\t\t\telement = (this.getRootNode() as Document).getElementById(this.initialFocus)\n\t\t\t|| document.getElementById(this.initialFocus);\n\t\t}\n\n\t\telement = element || await getFirstFocusableElement(this) || this._root; // in case of no focusable content focus the root\n\n\t\tif (element) {\n\t\t\tif (element === this._root) {\n\t\t\t\telement.tabIndex = -1;\n\t\t\t}\n\t\t\telement.focus();\n\t\t}\n\t}\n\n\tisFocusWithin() {\n\t\treturn isFocusedElementWithinNode(this._root);\n\t}\n\n\t_updateMediaRange() {\n\t\tthis.mediaRange = MediaRange.getCurrentRange(MediaRange.RANGESETS.RANGE_4STEPS, this.getDomRef()!.offsetWidth);\n\t}\n\n\t_updateAssociatedLabelsTexts() {\n\t\tthis._associatedDescriptionRefTexts = getAllAccessibleDescriptionRefTexts(this);\n\t}\n\n\t/**\n\t * Adds the popup to the \"opened popups registry\"\n\t * @protected\n\t */\n\t_addOpenedPopup() {\n\t\taddOpenedPopup(this);\n\t}\n\n\t/**\n\t * Closes the popup.\n\t */\n\tclosePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false): void {\n\t\tif (!this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-close\", { escPressed });\n\t\tif (prevented) {\n\t\t\tthis.open = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._opened = false;\n\n\t\tif (this.isModal) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t}\n\n\t\tthis.hide();\n\t\tthis.open = false;\n\n\t\tthis._detachBrowserEvents();\n\n\t\tif (!preventRegistryUpdate) {\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tif (!this.preventFocusRestore && !preventFocusRestore) {\n\t\t\tthis.resetFocus();\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\t/**\n\t * Removes the popup from the \"opened popups registry\"\n\t * @protected\n\t */\n\t_removeOpenedPopup() {\n\t\tremoveOpenedPopup(this);\n\t}\n\n\t/**\n\t * Returns the focus to the previously focused element\n\t * @protected\n\t */\n\tresetFocus() {\n\t\tthis._focusedElementBeforeOpen?.focus();\n\t\tthis._focusedElementBeforeOpen = null;\n\t}\n\n\t/**\n\t * Sets \"block\" display to the popup. The property can be overriden by derivatives of Popup.\n\t * @protected\n\t */\n\t_show() {\n\t\tif (this.isConnected) {\n\t\t\tthis.setAttribute(\"popover\", \"manual\");\n\t\t\tthis.showPopover();\n\t\t}\n\t}\n\n\t_registerResizeHandler() {\n\t\tif (!this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.register(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = true;\n\t\t}\n\t}\n\n\t_deregisterResizeHandler() {\n\t\tif (this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = false;\n\t\t}\n\t}\n\n\t/**\n\t * Sets \"none\" display to the popup\n\t * @protected\n\t */\n\thide() {\n\t\tthis.isConnected && this.hidePopover();\n\t}\n\n\t/**\n\t * Implement this getter with relevant logic regarding the modality of the popup (e.g. based on a public property)\n\t * @protected\n\t */\n\tabstract get isModal(): boolean\n\n\t/**\n\t * Return the ID of an element in the shadow DOM that is going to label this popup\n\t * @protected\n\t */\n\tabstract get _ariaLabelledBy(): string | undefined\n\n\t/**\n\t * Ensures ariaLabel is never null or empty string\n\t * @protected\n\t */\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget _accInfoAriaDescription() {\n\t\treturn this.ariaDescriptionText || \"\";\n\t}\n\n\tget ariaDescriptionText() {\n\t\treturn this._associatedDescriptionRefTexts || getEffectiveAriaDescriptionText(this);\n\t}\n\n\tget ariaDescriptionTextId() {\n\t\treturn this.ariaDescriptionText ? \"accessibleDescription\" : \"\";\n\t}\n\n\tget ariaDescribedByIds() {\n\t\treturn [\n\t\t\tthis.ariaDescriptionTextId,\n\t\t].filter(Boolean).join(\" \");\n\t}\n\n\tget _root(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-root\")!;\n\t}\n\n\tget _role() {\n\t\treturn (this.accessibleRole === PopupAccessibleRole.None) ? undefined : toLowercaseEnumValue(this.accessibleRole);\n\t}\n\n\tget _ariaModal(): \"true\" | undefined {\n\t\treturn this.accessibleRole === PopupAccessibleRole.None ? undefined : \"true\";\n\t}\n\n\tget contentDOM(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-content\")!;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\troot: {},\n\t\t\tcontent: {},\n\t\t};\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-popup-root\": true,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-popup-content\": true,\n\t\t\t},\n\t\t};\n\t}\n}\n\nexport default Popup;\nexport type { PopupScrollEventDetail, PopupBeforeCloseEventDetail };\n"]}
1
+ {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../src/Popup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,QAAQ,EACR,SAAS,EACT,OAAO,GACP,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAC3H,OAAO,EACN,kBAAkB,EAClB,yBAAyB,EACzB,+BAA+B,EAC/B,mCAAmC,EACnC,oBAAoB,GACpB,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE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CAAC,aAAa,EAAE;QACrB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,MAAM,CAAC;IAEd;;;;OAIG;;IACF,KAAK,CAAC,cAAc,EAAE;QACtB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACa,KAAK,CAkmBnB;AAED,eAAe,KAAK,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport jsxRender from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tisChrome,\n\tisDesktop,\n\tisPhone,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getFirstFocusableElement, getLastFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport {\n\tregisterUI5Element,\n\tgetEffectiveAriaLabelText,\n\tgetEffectiveAriaDescriptionText,\n\tgetAllAccessibleDescriptionRefTexts,\n\tderegisterUI5Element,\n} from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport { hasStyle, createStyle } from \"@ui5/webcomponents-base/dist/ManagedStyles.js\";\nimport { isEnter, isTabPrevious } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getFocusedElement, isFocusedElementWithinNode } from \"@ui5/webcomponents-base/dist/util/PopupUtils.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport MediaRange from \"@ui5/webcomponents-base/dist/MediaRange.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport PopupTemplate from \"./PopupTemplate.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\nimport { addOpenedPopup, removeOpenedPopup } from \"./popup-utils/OpenedPopupsRegistry.js\";\n\n// Styles\nimport popupStlyes from \"./generated/themes/Popup.css.js\";\nimport popupBlockLayerStyles from \"./generated/themes/PopupBlockLayer.css.js\";\nimport globalStyles from \"./generated/themes/PopupGlobal.css.js\";\n\nconst createBlockingStyle = (): void => {\n\tif (!hasStyle(\"data-ui5-popup-scroll-blocker\")) {\n\t\tcreateStyle(globalStyles, \"data-ui5-popup-scroll-blocker\");\n\t}\n};\n\ncreateBlockingStyle();\n\nconst pageScrollingBlockers = new Set<Popup>();\n\ntype PopupScrollEventDetail = {\n\tscrollTop: number;\n\ttargetRef: HTMLElement;\n}\n\ntype PopupBeforeCloseEventDetail = {\n\tescPressed: boolean;\n}\n\n/**\n * @class\n * ### Overview\n * Base class for all popup Web Components.\n *\n * If you need to create your own popup-like custom UI5 Web Components.\n *\n * 1. The Popup class handles modality:\n * - The \"isModal\" getter can be overridden by derivatives to provide their own conditions when they are modal or not\n * - Derivatives may call the \"blockPageScrolling\" and \"unblockPageScrolling\" static methods to temporarily remove scrollbars on the html element\n * - Derivatives may call the \"openPopup\" and \"closePopup\" methods which handle focus, manage the popup registry and for modal popups, manage the blocking layer\n *\n * 2. Provides blocking layer (relevant for modal popups only):\n * - Controlled by the \"open\" and \"close\" methods\n *\n * 3. The Popup class \"traps\" focus:\n * - Derivatives may call the \"applyInitialFocus\" method (usually when opening, to transfer focus inside the popup)\n *\n * 4. The template of this component exposes two inline partials you can override in derivatives:\n * - beforeContent (upper part of the box, useful for header/title/close button)\n * - afterContent (lower part, useful for footer/action buttons)\n * @constructor\n * @extends UI5Element\n * @public\n */\n@customElement({\n\trenderer: jsxRender,\n\tstyles: [popupStlyes, popupBlockLayerStyles],\n\ttemplate: PopupTemplate,\n})\n/**\n * Fired before the component is opened. This event can be cancelled, which will prevent the popup from opening.\n * @public\n */\n@event(\"before-open\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is opened.\n * @public\n */\n@event(\"open\")\n\n/**\n * Fired before the component is closed. This event can be cancelled, which will prevent the popup from closing.\n * @public\n * @param {boolean} escPressed Indicates that `ESC` key has triggered the event.\n */\n@event(\"before-close\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is closed.\n * @public\n */\n@event(\"close\")\n\n/**\n * Fired whenever the popup content area is scrolled\n * @private\n */\n@event(\"scroll\", {\n\tbubbles: true,\n})\nabstract class Popup extends UI5Element {\n\teventDetails!: {\n\t\t\"before-open\": void\n\t\t\"open\": void\n\t\t\"before-close\": PopupBeforeCloseEventDetail\n\t\t\"close\": void\n\t\t\"scroll\": PopupScrollEventDetail\n\t}\n\n\t/**\n\t * Defines the ID of the HTML Element, which will get the initial focus.\n\t *\n\t * **Note:** If an element with `autofocus` attribute is added inside the component,\n\t * `initialFocus` won't take effect.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tinitialFocus?: string;\n\n\t/**\n\t * Defines if the focus should be returned to the previously focused element,\n\t * when the popup closes.\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t*/\n\t@property({ type: Boolean })\n\tpreventFocusRestore = false;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the IDs of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Allows setting a custom role.\n\t * @default \"Dialog\"\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property()\n\taccessibleRole: `${PopupAccessibleRole}` = \"Dialog\";\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that describe the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescriptionRef?: string;\n\n\t/**\n\t * Constantly updated value of texts collected from the associated labels.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_associatedDescriptionRefTexts?: string;\n\n\t/**\n\t * Defines the current media query size.\n\t * @private\n\t */\n\t@property()\n\tmediaRange?: string;\n\n\t/**\n\t * Indicates whether initial focus should be prevented.\n\t * @public\n\t * @default false\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tpreventInitialFocus = false;\n\n\t/**\n\t * Indicates if the element is the top modal popup\n\t *\n\t * This property is calculated automatically\n\t * @private\n\t * @default false\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\tisTopModalPopup = false;\n\n\t/**\n\t * Defines the content of the Popup.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonDesktop = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_shouldFocusRoot?: boolean;\n\t_focusedElementBeforeOpen?: HTMLElement | null;\n\t_opened = false;\n\t_open = false;\n\t_resizeHandlerRegistered = false;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._resizeHandler = this._resize.bind(this);\n\n\t\tthis._getRealDomRef = () => {\n\t\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\"[root-element]\")!;\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.onPhone = isPhone();\n\t\tthis.onDesktop = isDesktop();\n\t}\n\n\tonAfterRendering() {\n\t\trenderFinished().then(() => {\n\t\t\tthis._updateMediaRange();\n\t\t});\n\n\t\tif (this.open) {\n\t\t\tthis._registerResizeHandler();\n\t\t} else {\n\t\t\tthis._deregisterResizeHandler();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"popover\", \"manual\");\n\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tthis.tabIndex = -1;\n\n\t\tthis.handleOpenOnEnterDOM();\n\n\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup-container\", \"true\");\n\t\tregisterUI5Element(this, this._updateAssociatedLabelsTexts.bind(this));\n\t}\n\n\thandleOpenOnEnterDOM() {\n\t\tif (this.open) {\n\t\t\tthis.showPopover();\n\t\t\tthis.openPopup();\n\t\t}\n\t}\n\n\tonExitDOM() {\n\t\tif (this._opened) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tthis._deregisterResizeHandler();\n\t\tthis._detachBrowserEvents();\n\t\tderegisterUI5Element(this);\n\t}\n\n\t/**\n\t * Indicates if the element is open\n\t * @public\n\t * @default false\n\t * @since 1.2.0\n\t */\n\t@property({ type: Boolean })\n\tset open(value: boolean) {\n\t\tif (this._open === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._open = value;\n\n\t\tif (value) {\n\t\t\tthis.openPopup();\n\t\t} else {\n\t\t\tthis.closePopup();\n\t\t}\n\t}\n\n\tget open() : boolean {\n\t\treturn this._open;\n\t}\n\n\tasync openPopup() {\n\t\tif (this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-open\");\n\n\t\tif (prevented) {\n\t\t\tthis.open = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._attachBrowserEvents();\n\n\t\tif (this.isModal) {\n\t\t\tPopup.blockPageScrolling(this);\n\t\t}\n\n\t\tthis._focusedElementBeforeOpen = getFocusedElement();\n\n\t\tthis._show();\n\t\tthis._opened = true;\n\n\t\tif (this.getDomRef()) {\n\t\t\tthis._updateMediaRange();\n\t\t}\n\n\t\tthis._addOpenedPopup();\n\n\t\tthis.classList.add(\"ui5-popup-opening\");\n\t\tsetTimeout(() => {\n\t\t\tthis.classList.remove(\"ui5-popup-opening\");\n\t\t}, 50);\n\n\t\tthis.open = true;\n\n\t\t// initial focus, if focused element is statically created\n\t\tawait this.applyInitialFocus();\n\n\t\tawait renderFinished();\n\n\t\tif (this.isConnected) {\n\t\t\tthis.fireDecoratorEvent(\"open\");\n\t\t}\n\t}\n\n\t_resize() {\n\t\tthis._updateMediaRange();\n\t}\n\n\t/**\n\t * Prevents the user from interacting with the content under the block layer\n\t */\n\t_preventBlockLayerFocus(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\t}\n\n\t_attachBrowserEvents() {\n\n\t}\n\n\t_detachBrowserEvents() {\n\n\t}\n\n\t/**\n\t * Temporarily removes scrollbars from the html element\n\t * @protected\n\t */\n\tstatic blockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.add(popup);\n\n\t\tif (pageScrollingBlockers.size !== 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.add(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t/**\n\t * Restores scrollbars on the html element, if needed\n\t * @protected\n\t */\n\tstatic unblockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.delete(popup);\n\n\t\tif (pageScrollingBlockers.size !== 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.remove(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t_scroll(e: Event) {\n\t\tthis.fireDecoratorEvent(\"scroll\", {\n\t\t\tscrollTop: (e.target as HTMLElement).scrollTop,\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t});\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isTabOutAttempt = e.target === this._root && isTabPrevious(e);\n\t\t// if the popup is closed, focus is already moved, so Enter keydown may result in click on the newly focused element\n\t\tconst isEnterOnClosedPopupChild = isEnter(e) && !this.open;\n\n\t\tif (isTabOutAttempt || isEnterOnClosedPopupChild) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// relatedTarget is the element, which will get focus. If no such element exists, focus the root.\n\t\t// This happens after the mouse is released in order to not interrupt text selection.\n\t\tif (!e.relatedTarget) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tif (this.shadowRoot!.contains(e.target as HTMLElement)) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t} else {\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t_onmouseup() {\n\t\tif (this._shouldFocusRoot) {\n\t\t\tif (isChrome()) {\n\t\t\t\tthis._root.focus();\n\t\t\t}\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToFirst() {\n\t\tconst firstFocusable = await getFirstFocusableElement(this);\n\n\t\tif (firstFocusable) {\n\t\t\tfirstFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToLast() {\n\t\tconst lastFocusable = await getLastFocusableElement(this);\n\n\t\tif (lastFocusable) {\n\t\t\tlastFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Use this method to focus the element denoted by \"initialFocus\", if provided,\n\t * or the first focusable element otherwise.\n\t * @protected\n\t */\n\tasync applyInitialFocus() {\n\t\tif (!this.preventInitialFocus) {\n\t\t\tawait this.applyFocus();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the element denoted by `initialFocus`, if provided,\n\t * or the first focusable element otherwise.\n\t * @public\n\t * @returns Promise that resolves when the focus is applied\n\t */\n\tasync applyFocus(): Promise<void> {\n\t\tawait this._waitForDomRef();\n\n\t\tconst elementWithAutoFocus = this.querySelector(\"[autofocus]\");\n\t\tif (elementWithAutoFocus) {\n\t\t\t// If the \"autofocus\" is set on UI5Element, focus it manually.\n\t\t\tif (\"isUI5Element\" in elementWithAutoFocus) {\n\t\t\t\t(elementWithAutoFocus as UI5Element).focus();\n\t\t\t}\n\t\t\t// Otherwise, the browser will focus it automatically.\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getRootNode() === this) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet element;\n\n\t\tif (this.initialFocus) {\n\t\t\telement = (this.getRootNode() as Document).getElementById(this.initialFocus)\n\t\t\t|| document.getElementById(this.initialFocus);\n\t\t}\n\n\t\telement = element || await getFirstFocusableElement(this) || this._root; // in case of no focusable content focus the root\n\n\t\tif (element) {\n\t\t\tif (element === this._root) {\n\t\t\t\telement.tabIndex = -1;\n\t\t\t}\n\t\t\telement.focus();\n\t\t}\n\t}\n\n\tisFocusWithin() {\n\t\treturn isFocusedElementWithinNode(this._root);\n\t}\n\n\t_updateMediaRange() {\n\t\tthis.mediaRange = MediaRange.getCurrentRange(MediaRange.RANGESETS.RANGE_4STEPS, this.getDomRef()!.offsetWidth);\n\t}\n\n\t_updateAssociatedLabelsTexts() {\n\t\tthis._associatedDescriptionRefTexts = getAllAccessibleDescriptionRefTexts(this);\n\t}\n\n\t/**\n\t * Adds the popup to the \"opened popups registry\"\n\t * @protected\n\t */\n\t_addOpenedPopup() {\n\t\taddOpenedPopup(this);\n\t}\n\n\t/**\n\t * Closes the popup.\n\t */\n\tclosePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false): void {\n\t\tif (!this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-close\", { escPressed });\n\t\tif (prevented) {\n\t\t\tthis.open = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._opened = false;\n\n\t\tif (this.isModal) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t}\n\n\t\tthis.hide();\n\t\tthis.open = false;\n\n\t\tthis._detachBrowserEvents();\n\n\t\tif (!preventRegistryUpdate) {\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tif (!this.preventFocusRestore && !preventFocusRestore) {\n\t\t\tthis.resetFocus();\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\t/**\n\t * Removes the popup from the \"opened popups registry\"\n\t * @protected\n\t */\n\t_removeOpenedPopup() {\n\t\tremoveOpenedPopup(this);\n\t}\n\n\t/**\n\t * Returns the focus to the previously focused element\n\t * @protected\n\t */\n\tresetFocus() {\n\t\tthis._focusedElementBeforeOpen?.focus();\n\t\tthis._focusedElementBeforeOpen = null;\n\t}\n\n\t/**\n\t * Sets \"block\" display to the popup. The property can be overriden by derivatives of Popup.\n\t * @protected\n\t */\n\t_show() {\n\t\tif (this.isConnected) {\n\t\t\tthis.setAttribute(\"popover\", \"manual\");\n\t\t\tthis.showPopover();\n\t\t}\n\t}\n\n\t_registerResizeHandler() {\n\t\tif (!this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.register(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = true;\n\t\t}\n\t}\n\n\t_deregisterResizeHandler() {\n\t\tif (this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = false;\n\t\t}\n\t}\n\n\t/**\n\t * Sets \"none\" display to the popup\n\t * @protected\n\t */\n\thide() {\n\t\tthis.isConnected && this.hidePopover();\n\t}\n\n\t/**\n\t * Implement this getter with relevant logic regarding the modality of the popup (e.g. based on a public property)\n\t * @protected\n\t */\n\tabstract get isModal(): boolean\n\n\t/**\n\t * Return the ID of an element in the shadow DOM that is going to label this popup\n\t * @protected\n\t */\n\tabstract get _ariaLabelledBy(): string | undefined\n\n\t/**\n\t * Ensures ariaLabel is never null or empty string\n\t * @protected\n\t */\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget _accInfoAriaDescription() {\n\t\treturn this.ariaDescriptionText || \"\";\n\t}\n\n\tget ariaDescriptionText() {\n\t\treturn this._associatedDescriptionRefTexts || getEffectiveAriaDescriptionText(this);\n\t}\n\n\tget ariaDescriptionTextId() {\n\t\treturn this.ariaDescriptionText ? \"accessibleDescription\" : \"\";\n\t}\n\n\tget ariaDescribedByIds() {\n\t\treturn [\n\t\t\tthis.ariaDescriptionTextId,\n\t\t].filter(Boolean).join(\" \");\n\t}\n\n\tget _root(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-root\")!;\n\t}\n\n\tget _role() {\n\t\treturn (this.accessibleRole === PopupAccessibleRole.None) ? undefined : toLowercaseEnumValue(this.accessibleRole);\n\t}\n\n\tget _ariaModal(): \"true\" | undefined {\n\t\treturn this.accessibleRole === PopupAccessibleRole.None ? undefined : \"true\";\n\t}\n\n\tget contentDOM(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-content\")!;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\troot: {},\n\t\t\tcontent: {},\n\t\t};\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-popup-root\": true,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-popup-content\": true,\n\t\t\t},\n\t\t};\n\t}\n}\n\nexport default Popup;\nexport type { PopupScrollEventDetail, PopupBeforeCloseEventDetail };\n"]}
@@ -33,6 +33,7 @@ import type WrappingType from "./types/WrappingType.js";
33
33
  * @public
34
34
  * @csspart outer-ring - Used to style the outer ring of the `ui5-radio-button`.
35
35
  * @csspart inner-ring - Used to style the inner ring of the `ui5-radio-button`.
36
+ * @csspart root - Used to style the root DOM element of the component.
36
37
  */
37
38
  declare class RadioButton extends UI5Element implements IFormInputElement {
38
39
  eventDetails: {
@@ -54,6 +54,7 @@ let activeRadio;
54
54
  * @public
55
55
  * @csspart outer-ring - Used to style the outer ring of the `ui5-radio-button`.
56
56
  * @csspart inner-ring - Used to style the inner ring of the `ui5-radio-button`.
57
+ * @csspart root - Used to style the root DOM element of the component.
57
58
  */
58
59
  let RadioButton = RadioButton_1 = class RadioButton extends UI5Element {
59
60
  get formValidityMessage() {
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../src/RadioButton.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAE1G,OAAO,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,MAAM,EACN,IAAI,EACJ,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAGrD,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,OAAO;AACP,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE,IAAI,uBAAuB,GAAG,KAAK,CAAC;AACpC,IAAI,WAAwB,CAAC;AAE7B;;;;;;;;;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AAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,cAAc;KACtB,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,WAAW,CAuWhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisLeft,\n\tisUp,\n\tisRight,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport RadioButtonGroup from \"./RadioButtonGroup.js\";\nimport type WrappingType from \"./types/WrappingType.js\";\n\n// Template\nimport RadioButtonTemplate from \"./RadioButtonTemplate.js\";\n\n// i18n\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n\tVALUE_STATE_INFORMATION,\n\tFORM_SELECTABLE_REQUIRED2,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport radioButtonCss from \"./generated/themes/RadioButton.css.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeRadio: RadioButton;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-radio-button` component enables users to select a single option from a set of options.\n * When a `ui5-radio-button` is selected by the user, the\n * `change` event is fired.\n * When a `ui5-radio-button` that is within a group is selected, the one\n * that was previously selected gets automatically deselected. You can group radio buttons by using the `name` property.\n *\n * **Note:** If `ui5-radio-button` is not part of a group, it can be selected once, but can not be deselected back.\n *\n * ### Keyboard Handling\n *\n * Once the `ui5-radio-button` is on focus, it might be selected by pressing the Space and Enter keys.\n *\n * The Arrow Down/Arrow Up and Arrow Left/Arrow Right keys can be used to change selection between next/previous radio buttons in one group,\n * while TAB and SHIFT + TAB can be used to enter or leave the radio button group.\n *\n * **Note:** On entering radio button group, the focus goes to the currently selected radio button.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/RadioButton\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @csspart outer-ring - Used to style the outer ring of the `ui5-radio-button`.\n * @csspart inner-ring - Used to style the inner ring of the `ui5-radio-button`.\n */\n@customElement({\n\ttag: \"ui5-radio-button\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: jsxRenderer,\n\ttemplate: RadioButtonTemplate,\n\tstyles: radioButtonCss,\n})\n/**\n * Fired when the component checked state changes.\n * @public\n * @since 1.0.0-rc.15\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n\nclass RadioButton extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void,\n\t}\n\t/**\n\t * Defines whether the component is disabled.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t *\n\t * **Note:** A read-only component isn't editable or selectable.\n\t * However, because it's focusable, it still provides visual feedback upon user interaction.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly = false;\n\n\t/**\n\t * Defines whether the component is required.\n\t * @default false\n\t * @public\n\t * @since 1.9.0\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Defines whether the component is checked or not.\n\t *\n\t * **Note:** The property value can be changed with user interaction,\n\t * either by clicking/tapping on the component,\n\t * or by using the Space or Enter key.\n\t *\n\t * **Note:** Only enabled radio buttons can be checked.\n\t * Read-only radio buttons are not selectable, and therefore are always unchecked.\n\t * @default false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tchecked = false;\n\n\t/**\n\t * Defines the text of the component.\n\t * @default undefined\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 * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * Radio buttons with the same `name` will form a radio button group.\n\t *\n\t * **Note:** By this name the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** The selection can be changed with `ARROW_UP/DOWN` and `ARROW_LEFT/RIGHT` keys between radio buttons in same group.\n\t *\n\t * **Note:** Only one radio button can be selected per group.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the form value of the component.\n\t * When a form with a radio button group is submitted, the group's value\n\t * will be the value of the currently selected radio button.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t *\n\t * **Note:** for option \"Normal\" the text will wrap and the words will not be broken based on hyphenation.\n\t * @default \"Normal\"\n\t * @public\n\t */\n\t@property()\n\twrappingType: `${WrappingType}` = \"Normal\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.6.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the IDs of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t@property({ type: Number })\n\t_tabIndex?: number;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines if the component is selected in specific group\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_groupChecked = false;\n\t@property({ type: Boolean, noAttribute: true })\n\t_groupRequired = false;\n\n\t_deactivate: () => void;\n\t_name = \"\";\n\t_checked = false;\n\n\tget formValidityMessage() {\n\t\treturn RadioButton.i18nBundle.getText(FORM_SELECTABLE_REQUIRED2);\n\t}\n\n\tget formValidity(): ValidityStateFlags {\n\t\treturn { valueMissing: this._groupRequired && !this._groupChecked };\n\t}\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.checked ? (this.value || \"on\") : null;\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeRadio) {\n\t\t\t\tactiveRadio.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\tonAfterRendering() {\n\t\tthis.syncGroup();\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tonExitDOM() {\n\t\tthis.syncGroup(true);\n\t}\n\n\tsyncGroup(forceRemove?: boolean) {\n\t\tconst oldGroup = this._name;\n\t\tconst currentGroup = this.name;\n\t\tconst oldChecked = this._checked;\n\t\tconst currentChecked = this.checked;\n\n\t\tif (forceRemove) {\n\t\t\tRadioButtonGroup.removeFromGroup(this, oldGroup);\n\t\t}\n\n\t\tif (currentGroup !== oldGroup) {\n\t\t\tif (oldGroup) {\n\t\t\t\t// remove the control from the previous group\n\t\t\t\tRadioButtonGroup.removeFromGroup(this, oldGroup);\n\t\t\t}\n\n\t\t\tif (currentGroup) {\n\t\t\t\t// add the control to the existing group\n\t\t\t\tRadioButtonGroup.addToGroup(this, currentGroup);\n\t\t\t}\n\t\t} else if (currentGroup && this.isConnected) {\n\t\t\tRadioButtonGroup.enforceSingleSelection(this, currentGroup);\n\t\t}\n\n\t\tif (this.name && currentChecked !== oldChecked) {\n\t\t\tRadioButtonGroup.updateTabOrder(this.name);\n\t\t}\n\n\t\tthis._name = this.name || \"\";\n\t\tthis._checked = this.checked;\n\t}\n\n\t_onclick() {\n\t\treturn this.toggle();\n\t}\n\n\t_handleDown(e: KeyboardEvent) {\n\t\tconst currentGroup = this.name;\n\n\t\tif (!currentGroup) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\t\tRadioButtonGroup.selectNextItem(this, currentGroup);\n\t}\n\n\t_handleUp(e: KeyboardEvent) {\n\t\tconst currentGroup = this.name;\n\n\t\tif (!currentGroup) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\t\tRadioButtonGroup.selectPreviousItem(this, currentGroup);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.active = true;\n\t\t\treturn e.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.active = true;\n\t\t\treturn this.toggle();\n\t\t}\n\n\t\tconst isRTL = this.effectiveDir === \"rtl\";\n\n\t\tif (isDown(e) || (!isRTL && isRight(e)) || (isRTL && isLeft(e))) {\n\t\t\tthis._handleDown(e);\n\t\t}\n\n\t\tif (isUp(e) || (!isRTL && isLeft(e)) || (isRTL && isRight(e))) {\n\t\t\tthis._handleUp(e);\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\t_onmousedown() {\n\t\tthis.active = true;\n\t\tactiveRadio = 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\ttoggle() {\n\t\tif (!this.canToggle()) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (!this.name) {\n\t\t\tthis.checked = !this.checked;\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t\treturn this;\n\t\t}\n\n\t\tRadioButtonGroup.selectItem(this, this.name);\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly || this.checked);\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn (this.disabled || this.readonly) ? true : undefined;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [getEffectiveAriaLabelText(this), this.text].filter(Boolean).join(\" \");\n\t}\n\n\tget effectiveAriaDescribedBy() {\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\tswitch (this.valueState) {\n\t\tcase ValueState.Negative:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_ERROR);\n\t\tcase ValueState.Critical:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_WARNING);\n\t\tcase ValueState.Positive:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_SUCCESS);\n\t\tcase ValueState.Information:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_INFORMATION);\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\n\t\tif (this.disabled) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (this.name) {\n\t\t\treturn this._tabIndex;\n\t\t}\n\n\t\treturn tabindex ? parseInt(tabindex) : 0;\n\t}\n}\n\nRadioButton.define();\n\nexport default RadioButton;\n"]}
1
+ {"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../src/RadioButton.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAE1G,OAAO,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,MAAM,EACN,IAAI,EACJ,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAGrD,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,OAAO;AACP,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE,IAAI,uBAAuB,GAAG,KAAK,CAAC;AACpC,IAAI,WAAwB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAkBH,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,UAAU;IAmJnC,IAAI,mBAAmB;QACtB,OAA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AQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,cAAc;KACtB,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,WAAW,CAuWhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisLeft,\n\tisUp,\n\tisRight,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport RadioButtonGroup from \"./RadioButtonGroup.js\";\nimport type WrappingType from \"./types/WrappingType.js\";\n\n// Template\nimport RadioButtonTemplate from \"./RadioButtonTemplate.js\";\n\n// i18n\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n\tVALUE_STATE_INFORMATION,\n\tFORM_SELECTABLE_REQUIRED2,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport radioButtonCss from \"./generated/themes/RadioButton.css.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeRadio: RadioButton;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-radio-button` component enables users to select a single option from a set of options.\n * When a `ui5-radio-button` is selected by the user, the\n * `change` event is fired.\n * When a `ui5-radio-button` that is within a group is selected, the one\n * that was previously selected gets automatically deselected. You can group radio buttons by using the `name` property.\n *\n * **Note:** If `ui5-radio-button` is not part of a group, it can be selected once, but can not be deselected back.\n *\n * ### Keyboard Handling\n *\n * Once the `ui5-radio-button` is on focus, it might be selected by pressing the Space and Enter keys.\n *\n * The Arrow Down/Arrow Up and Arrow Left/Arrow Right keys can be used to change selection between next/previous radio buttons in one group,\n * while TAB and SHIFT + TAB can be used to enter or leave the radio button group.\n *\n * **Note:** On entering radio button group, the focus goes to the currently selected radio button.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/RadioButton\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @csspart outer-ring - Used to style the outer ring of the `ui5-radio-button`.\n * @csspart inner-ring - Used to style the inner ring of the `ui5-radio-button`.\n * @csspart root - Used to style the root DOM element of the component.\n */\n@customElement({\n\ttag: \"ui5-radio-button\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: jsxRenderer,\n\ttemplate: RadioButtonTemplate,\n\tstyles: radioButtonCss,\n})\n/**\n * Fired when the component checked state changes.\n * @public\n * @since 1.0.0-rc.15\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n\nclass RadioButton extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void,\n\t}\n\t/**\n\t * Defines whether the component is disabled.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t *\n\t * **Note:** A read-only component isn't editable or selectable.\n\t * However, because it's focusable, it still provides visual feedback upon user interaction.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly = false;\n\n\t/**\n\t * Defines whether the component is required.\n\t * @default false\n\t * @public\n\t * @since 1.9.0\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Defines whether the component is checked or not.\n\t *\n\t * **Note:** The property value can be changed with user interaction,\n\t * either by clicking/tapping on the component,\n\t * or by using the Space or Enter key.\n\t *\n\t * **Note:** Only enabled radio buttons can be checked.\n\t * Read-only radio buttons are not selectable, and therefore are always unchecked.\n\t * @default false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tchecked = false;\n\n\t/**\n\t * Defines the text of the component.\n\t * @default undefined\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 * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * Radio buttons with the same `name` will form a radio button group.\n\t *\n\t * **Note:** By this name the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** The selection can be changed with `ARROW_UP/DOWN` and `ARROW_LEFT/RIGHT` keys between radio buttons in same group.\n\t *\n\t * **Note:** Only one radio button can be selected per group.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the form value of the component.\n\t * When a form with a radio button group is submitted, the group's value\n\t * will be the value of the currently selected radio button.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t *\n\t * **Note:** for option \"Normal\" the text will wrap and the words will not be broken based on hyphenation.\n\t * @default \"Normal\"\n\t * @public\n\t */\n\t@property()\n\twrappingType: `${WrappingType}` = \"Normal\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.6.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the IDs of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t@property({ type: Number })\n\t_tabIndex?: number;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines if the component is selected in specific group\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_groupChecked = false;\n\t@property({ type: Boolean, noAttribute: true })\n\t_groupRequired = false;\n\n\t_deactivate: () => void;\n\t_name = \"\";\n\t_checked = false;\n\n\tget formValidityMessage() {\n\t\treturn RadioButton.i18nBundle.getText(FORM_SELECTABLE_REQUIRED2);\n\t}\n\n\tget formValidity(): ValidityStateFlags {\n\t\treturn { valueMissing: this._groupRequired && !this._groupChecked };\n\t}\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.checked ? (this.value || \"on\") : null;\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeRadio) {\n\t\t\t\tactiveRadio.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\tonAfterRendering() {\n\t\tthis.syncGroup();\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tonExitDOM() {\n\t\tthis.syncGroup(true);\n\t}\n\n\tsyncGroup(forceRemove?: boolean) {\n\t\tconst oldGroup = this._name;\n\t\tconst currentGroup = this.name;\n\t\tconst oldChecked = this._checked;\n\t\tconst currentChecked = this.checked;\n\n\t\tif (forceRemove) {\n\t\t\tRadioButtonGroup.removeFromGroup(this, oldGroup);\n\t\t}\n\n\t\tif (currentGroup !== oldGroup) {\n\t\t\tif (oldGroup) {\n\t\t\t\t// remove the control from the previous group\n\t\t\t\tRadioButtonGroup.removeFromGroup(this, oldGroup);\n\t\t\t}\n\n\t\t\tif (currentGroup) {\n\t\t\t\t// add the control to the existing group\n\t\t\t\tRadioButtonGroup.addToGroup(this, currentGroup);\n\t\t\t}\n\t\t} else if (currentGroup && this.isConnected) {\n\t\t\tRadioButtonGroup.enforceSingleSelection(this, currentGroup);\n\t\t}\n\n\t\tif (this.name && currentChecked !== oldChecked) {\n\t\t\tRadioButtonGroup.updateTabOrder(this.name);\n\t\t}\n\n\t\tthis._name = this.name || \"\";\n\t\tthis._checked = this.checked;\n\t}\n\n\t_onclick() {\n\t\treturn this.toggle();\n\t}\n\n\t_handleDown(e: KeyboardEvent) {\n\t\tconst currentGroup = this.name;\n\n\t\tif (!currentGroup) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\t\tRadioButtonGroup.selectNextItem(this, currentGroup);\n\t}\n\n\t_handleUp(e: KeyboardEvent) {\n\t\tconst currentGroup = this.name;\n\n\t\tif (!currentGroup) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\t\tRadioButtonGroup.selectPreviousItem(this, currentGroup);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.active = true;\n\t\t\treturn e.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.active = true;\n\t\t\treturn this.toggle();\n\t\t}\n\n\t\tconst isRTL = this.effectiveDir === \"rtl\";\n\n\t\tif (isDown(e) || (!isRTL && isRight(e)) || (isRTL && isLeft(e))) {\n\t\t\tthis._handleDown(e);\n\t\t}\n\n\t\tif (isUp(e) || (!isRTL && isLeft(e)) || (isRTL && isRight(e))) {\n\t\t\tthis._handleUp(e);\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\t_onmousedown() {\n\t\tthis.active = true;\n\t\tactiveRadio = 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\ttoggle() {\n\t\tif (!this.canToggle()) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (!this.name) {\n\t\t\tthis.checked = !this.checked;\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t\treturn this;\n\t\t}\n\n\t\tRadioButtonGroup.selectItem(this, this.name);\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly || this.checked);\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn (this.disabled || this.readonly) ? true : undefined;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [getEffectiveAriaLabelText(this), this.text].filter(Boolean).join(\" \");\n\t}\n\n\tget effectiveAriaDescribedBy() {\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\tswitch (this.valueState) {\n\t\tcase ValueState.Negative:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_ERROR);\n\t\tcase ValueState.Critical:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_WARNING);\n\t\tcase ValueState.Positive:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_SUCCESS);\n\t\tcase ValueState.Information:\n\t\t\treturn RadioButton.i18nBundle.getText(VALUE_STATE_INFORMATION);\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\n\t\tif (this.disabled) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (this.name) {\n\t\t\treturn this._tabIndex;\n\t\t}\n\n\t\treturn tabindex ? parseInt(tabindex) : 0;\n\t}\n}\n\nRadioButton.define();\n\nexport default RadioButton;\n"]}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@ui5/webcomponents-base/jsx-runtime"
2
2
  import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
3
3
  import Label from "./Label.js";
4
4
  export default function RadioButtonTemplate() {
5
- return (_jsxs("div", { role: "radio", class: "ui5-radio-root", "aria-checked": this.checked, "aria-disabled": this.effectiveAriaDisabled, "aria-describedby": this.effectiveAriaDescribedBy, "aria-label": this.ariaLabelText, tabindex: this.effectiveTabIndex, onClick: this._onclick, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onMouseDown: this._onmousedown, onMouseUp: this._onmouseup, onFocusOut: this._onfocusout, children: [_jsxs("div", { class: {
5
+ return (_jsxs("div", { role: "radio", class: "ui5-radio-root", part: "root", "aria-checked": this.checked, "aria-disabled": this.effectiveAriaDisabled, "aria-describedby": this.effectiveAriaDescribedBy, "aria-label": this.ariaLabelText, tabindex: this.effectiveTabIndex, onClick: this._onclick, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onMouseDown: this._onmousedown, onMouseUp: this._onmouseup, onFocusOut: this._onfocusout, children: [_jsxs("div", { class: {
6
6
  "ui5-radio-inner": true,
7
7
  "ui5-radio-inner--hoverable": !this.disabled && !this.readonly && isDesktop(),
8
8
  }, children: [_jsxs("svg", { class: "ui5-radio-svg", focusable: "false", "aria-hidden": "true", children: [_jsx("circle", { part: "outer-ring", class: "ui5-radio-svg-outer", cx: "50%", cy: "50%", r: "50%" }), _jsx("circle", { part: "inner-ring", class: "ui5-radio-svg-inner", cx: "50%", cy: "50%" })] }), _jsx("input", { type: "radio", required: this.required, checked: this.checked, readonly: this.readonly, disabled: this.disabled, name: this.name, "data-sap-no-tab-ref": true })] }), this.text &&
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButtonTemplate.js","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Q,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,gCAEd,IACG,EAEL,IAAI,CAAC,IAAI;gBACT,KAAC,KAAK,IAAC,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,EAAE,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,YAAG,IAAI,CAAC,IAAI,GAAS,EAG3H,IAAI,CAAC,aAAa;gBAClB,eAAM,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,EAAE,KAAK,EAAC,iBAAiB,YAAE,IAAI,CAAC,cAAc,GAAQ,IAE/E,CACN,CAAC;AACH,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type RadioButton from \"./RadioButton.js\";\nimport Label from \"./Label.js\";\n\nexport default function RadioButtonTemplate(this: RadioButton) {\n\treturn (\n\t\t<div\n\t\t\trole=\"radio\"\n\t\t\tclass=\"ui5-radio-root\"\n\t\t\taria-checked={this.checked}\n\t\t\taria-disabled={this.effectiveAriaDisabled}\n\t\t\taria-describedby={this.effectiveAriaDescribedBy}\n\t\t\taria-label={this.ariaLabelText}\n\t\t\ttabindex={this.effectiveTabIndex}\n\t\t\tonClick={this._onclick}\n\t\t\tonKeyDown={this._onkeydown}\n\t\t\tonKeyUp={this._onkeyup}\n\t\t\tonMouseDown={this._onmousedown}\n\t\t\tonMouseUp={this._onmouseup}\n\t\t\tonFocusOut={this._onfocusout}\n\t\t>\n\t\t\t<div class={{\n\t\t\t\t\"ui5-radio-inner\": true,\n\t\t\t\t\"ui5-radio-inner--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t}}>\n\t\t\t\t<svg class=\"ui5-radio-svg\" focusable=\"false\" aria-hidden=\"true\">\n\t\t\t\t\t<circle part=\"outer-ring\" class=\"ui5-radio-svg-outer\" cx=\"50%\" cy=\"50%\" r=\"50%\" />\n\t\t\t\t\t<circle part=\"inner-ring\" class=\"ui5-radio-svg-inner\" cx=\"50%\" cy=\"50%\" />\n\t\t\t\t</svg>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdata-sap-no-tab-ref\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{this.text &&\n\t\t\t\t<Label id={`${this._id}-label`} class=\"ui5-radio-label\" for={this._id} wrappingType={this.wrappingType}>{this.text}</Label>\n\t\t\t}\n\n\t\t\t{this.hasValueState &&\n\t\t\t\t<span id={`${this._id}-descr`} class=\"ui5-hidden-text\">{this.valueStateText}</span>\n\t\t\t}\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"file":"RadioButtonTemplate.js","sourceRoot":"","sources":["../src/RadioButtonTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,eACC,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,gBAAgB,EACtB,IAAI,EAAC,MAAM,kBACG,IAAI,CAAC,OAAO,mBACX,IAAI,CAAC,qBAAqB,sBACvB,IAAI,CAAC,wBAAwB,gBACnC,IAAI,CAAC,aAAa,EAC9B,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,UAAU,EAAE,IAAI,CAAC,WAAW,aAE5B,eAAK,KAAK,EAAE;oBACX,iBAAiB,EAAE,IAAI;oBACvB,4BAA4B,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE;iBAC7E,aACA,eAAK,KAAK,EAAC,eAAe,EAAC,SAAS,EAAC,OAAO,iBAAa,MAAM,aAC9D,iBAAQ,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,GAAG,EAClF,iBAAQ,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,GAAG,IACrE,EACN,gBACC,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,gCAEd,IACG,EAEL,IAAI,CAAC,IAAI;gBACT,KAAC,KAAK,IAAC,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,EAAE,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,YAAG,IAAI,CAAC,IAAI,GAAS,EAG3H,IAAI,CAAC,aAAa;gBAClB,eAAM,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,EAAE,KAAK,EAAC,iBAAiB,YAAE,IAAI,CAAC,cAAc,GAAQ,IAE/E,CACN,CAAC;AACH,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type RadioButton from \"./RadioButton.js\";\nimport Label from \"./Label.js\";\n\nexport default function RadioButtonTemplate(this: RadioButton) {\n\treturn (\n\t\t<div\n\t\t\trole=\"radio\"\n\t\t\tclass=\"ui5-radio-root\"\n\t\t\tpart=\"root\"\n\t\t\taria-checked={this.checked}\n\t\t\taria-disabled={this.effectiveAriaDisabled}\n\t\t\taria-describedby={this.effectiveAriaDescribedBy}\n\t\t\taria-label={this.ariaLabelText}\n\t\t\ttabindex={this.effectiveTabIndex}\n\t\t\tonClick={this._onclick}\n\t\t\tonKeyDown={this._onkeydown}\n\t\t\tonKeyUp={this._onkeyup}\n\t\t\tonMouseDown={this._onmousedown}\n\t\t\tonMouseUp={this._onmouseup}\n\t\t\tonFocusOut={this._onfocusout}\n\t\t>\n\t\t\t<div class={{\n\t\t\t\t\"ui5-radio-inner\": true,\n\t\t\t\t\"ui5-radio-inner--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t}}>\n\t\t\t\t<svg class=\"ui5-radio-svg\" focusable=\"false\" aria-hidden=\"true\">\n\t\t\t\t\t<circle part=\"outer-ring\" class=\"ui5-radio-svg-outer\" cx=\"50%\" cy=\"50%\" r=\"50%\" />\n\t\t\t\t\t<circle part=\"inner-ring\" class=\"ui5-radio-svg-inner\" cx=\"50%\" cy=\"50%\" />\n\t\t\t\t</svg>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdata-sap-no-tab-ref\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{this.text &&\n\t\t\t\t<Label id={`${this._id}-label`} class=\"ui5-radio-label\" for={this._id} wrappingType={this.wrappingType}>{this.text}</Label>\n\t\t\t}\n\n\t\t\t{this.hasValueState &&\n\t\t\t\t<span id={`${this._id}-descr`} class=\"ui5-hidden-text\">{this.valueStateText}</span>\n\t\t\t}\n\t\t</div>\n\t);\n}\n"]}
@@ -118,6 +118,10 @@ declare class RangeSlider extends SliderBase implements IFormInputElement {
118
118
  */
119
119
  _onDocumentClick(e: MouseEvent): void;
120
120
  get _ariaDisabled(): true | undefined;
121
+ get _isStartTooltipVisible(): boolean;
122
+ get _isEndTooltipVisible(): boolean;
123
+ get _ariaValueTextStart(): string | undefined;
124
+ get _ariaValueTextEnd(): string | undefined;
121
125
  get _ariaLabelledByText(): string;
122
126
  get _ariaHandlesText(): AriaHandlesText;
123
127
  get _ariaValueNow(): number;
@@ -81,7 +81,7 @@ let RangeSlider = RangeSlider_1 = class RangeSlider extends SliderBase {
81
81
  */
82
82
  set startValue(value) {
83
83
  this._startValue = value;
84
- this.tooltipStartValue = value?.toString() ?? "";
84
+ this.tooltipStartValue = this._getCustomLabel(value) || (value?.toString() ?? "");
85
85
  }
86
86
  get startValue() {
87
87
  return this._startValue;
@@ -95,7 +95,7 @@ let RangeSlider = RangeSlider_1 = class RangeSlider extends SliderBase {
95
95
  */
96
96
  set endValue(value) {
97
97
  this._endValue = value;
98
- this.tooltipEndValue = value?.toString() ?? "";
98
+ this.tooltipEndValue = this._getCustomLabel(value) || (value?.toString() ?? "");
99
99
  }
100
100
  get endValue() {
101
101
  return this._endValue;
@@ -152,6 +152,30 @@ let RangeSlider = RangeSlider_1 = class RangeSlider extends SliderBase {
152
152
  get _ariaDisabled() {
153
153
  return this.disabled || undefined;
154
154
  }
155
+ get _isStartTooltipVisible() {
156
+ if (!this._tooltipsOpen) {
157
+ return false;
158
+ }
159
+ if (!this._hasCustomTickmarks) {
160
+ return true;
161
+ }
162
+ return this._getCustomLabel(this.startValue) !== undefined;
163
+ }
164
+ get _isEndTooltipVisible() {
165
+ if (!this._tooltipsOpen) {
166
+ return false;
167
+ }
168
+ if (!this._hasCustomTickmarks) {
169
+ return true;
170
+ }
171
+ return this._getCustomLabel(this.endValue) !== undefined;
172
+ }
173
+ get _ariaValueTextStart() {
174
+ return this._getCustomLabel(this.startValue);
175
+ }
176
+ get _ariaValueTextEnd() {
177
+ return this._getCustomLabel(this.endValue);
178
+ }
155
179
  get _ariaLabelledByText() {
156
180
  return RangeSlider_1.i18nBundle.getText(RANGE_SLIDER_ARIA_DESCRIPTION);
157
181
  }
@@ -323,8 +347,8 @@ let RangeSlider = RangeSlider_1 = class RangeSlider extends SliderBase {
323
347
  const newEndValue = Number(ctor.clipValue(newValueOffset + this.endValue, min, max).toFixed(stepPrecision));
324
348
  this.update(affectedValue, newStartValue, newEndValue);
325
349
  }
326
- this.tooltipStartValue = this.startValue.toString();
327
- this.tooltipEndValue = this.endValue.toString();
350
+ this.tooltipStartValue = this._getCustomLabel(this.startValue) || this.startValue.toString();
351
+ this.tooltipEndValue = this._getCustomLabel(this.endValue) || this.endValue.toString();
328
352
  }
329
353
  /**
330
354
  * Determines affected value (start/end) depending on the currently
@@ -467,8 +491,8 @@ let RangeSlider = RangeSlider_1 = class RangeSlider extends SliderBase {
467
491
  }
468
492
  // Updates UI and state when dragging of the whole selected range
469
493
  this._updateValueOnRangeDrag(e);
470
- this.tooltipStartValue = this.startValue.toString();
471
- this.tooltipEndValue = this.endValue.toString();
494
+ this.tooltipStartValue = this._getCustomLabel(this.startValue) || this.startValue.toString();
495
+ this.tooltipEndValue = this._getCustomLabel(this.endValue) || this.endValue.toString();
472
496
  }
473
497
  /**
474
498
  * Updates UI and state when dragging a single Range Slider handle
@@ -787,8 +811,8 @@ let RangeSlider = RangeSlider_1 = class RangeSlider extends SliderBase {
787
811
  if (!this.startValue || !this.endValue) {
788
812
  return;
789
813
  }
790
- this.tooltipStartValue = this.startValue.toString();
791
- this.tooltipEndValue = this.endValue.toString();
814
+ this.tooltipStartValue = this._getCustomLabel(this.startValue) || this.startValue.toString();
815
+ this.tooltipEndValue = this._getCustomLabel(this.endValue) || this.endValue.toString();
792
816
  }
793
817
  _onTooltipInput(e) {
794
818
  const tooltip = e.target;