@ckeditor/ckeditor5-ui 41.3.1 → 41.4.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 (392) hide show
  1. package/dist/index-content.css +4 -0
  2. package/dist/index-editor.css +497 -0
  3. package/dist/index.css +942 -0
  4. package/dist/index.css.map +1 -0
  5. package/dist/index.js +14343 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/translations/af.d.ts +8 -0
  8. package/dist/translations/af.js +5 -0
  9. package/dist/translations/af.umd.js +11 -0
  10. package/dist/translations/ar.d.ts +8 -0
  11. package/dist/translations/ar.js +5 -0
  12. package/dist/translations/ar.umd.js +11 -0
  13. package/dist/translations/ast.d.ts +8 -0
  14. package/dist/translations/ast.js +5 -0
  15. package/dist/translations/ast.umd.js +11 -0
  16. package/dist/translations/az.d.ts +8 -0
  17. package/dist/translations/az.js +5 -0
  18. package/dist/translations/az.umd.js +11 -0
  19. package/dist/translations/bg.d.ts +8 -0
  20. package/dist/translations/bg.js +5 -0
  21. package/dist/translations/bg.umd.js +11 -0
  22. package/dist/translations/bn.d.ts +8 -0
  23. package/dist/translations/bn.js +5 -0
  24. package/dist/translations/bn.umd.js +11 -0
  25. package/dist/translations/bs.d.ts +8 -0
  26. package/dist/translations/bs.js +5 -0
  27. package/dist/translations/bs.umd.js +11 -0
  28. package/dist/translations/ca.d.ts +8 -0
  29. package/dist/translations/ca.js +5 -0
  30. package/dist/translations/ca.umd.js +11 -0
  31. package/dist/translations/cs.d.ts +8 -0
  32. package/dist/translations/cs.js +5 -0
  33. package/dist/translations/cs.umd.js +11 -0
  34. package/dist/translations/da.d.ts +8 -0
  35. package/dist/translations/da.js +5 -0
  36. package/dist/translations/da.umd.js +11 -0
  37. package/dist/translations/de-ch.d.ts +8 -0
  38. package/dist/translations/de-ch.js +5 -0
  39. package/dist/translations/de-ch.umd.js +11 -0
  40. package/dist/translations/de.d.ts +8 -0
  41. package/dist/translations/de.js +5 -0
  42. package/dist/translations/de.umd.js +11 -0
  43. package/dist/translations/el.d.ts +8 -0
  44. package/dist/translations/el.js +5 -0
  45. package/dist/translations/el.umd.js +11 -0
  46. package/dist/translations/en-au.d.ts +8 -0
  47. package/dist/translations/en-au.js +5 -0
  48. package/dist/translations/en-au.umd.js +11 -0
  49. package/dist/translations/en-gb.d.ts +8 -0
  50. package/dist/translations/en-gb.js +5 -0
  51. package/dist/translations/en-gb.umd.js +11 -0
  52. package/dist/translations/en.d.ts +8 -0
  53. package/dist/translations/en.js +5 -0
  54. package/dist/translations/en.umd.js +11 -0
  55. package/dist/translations/eo.d.ts +8 -0
  56. package/dist/translations/eo.js +5 -0
  57. package/dist/translations/eo.umd.js +11 -0
  58. package/dist/translations/es-co.d.ts +8 -0
  59. package/dist/translations/es-co.js +5 -0
  60. package/dist/translations/es-co.umd.js +11 -0
  61. package/dist/translations/es.d.ts +8 -0
  62. package/dist/translations/es.js +5 -0
  63. package/dist/translations/es.umd.js +11 -0
  64. package/dist/translations/et.d.ts +8 -0
  65. package/dist/translations/et.js +5 -0
  66. package/dist/translations/et.umd.js +11 -0
  67. package/dist/translations/eu.d.ts +8 -0
  68. package/dist/translations/eu.js +5 -0
  69. package/dist/translations/eu.umd.js +11 -0
  70. package/dist/translations/fa.d.ts +8 -0
  71. package/dist/translations/fa.js +5 -0
  72. package/dist/translations/fa.umd.js +11 -0
  73. package/dist/translations/fi.d.ts +8 -0
  74. package/dist/translations/fi.js +5 -0
  75. package/dist/translations/fi.umd.js +11 -0
  76. package/dist/translations/fr.d.ts +8 -0
  77. package/dist/translations/fr.js +5 -0
  78. package/dist/translations/fr.umd.js +11 -0
  79. package/dist/translations/gl.d.ts +8 -0
  80. package/dist/translations/gl.js +5 -0
  81. package/dist/translations/gl.umd.js +11 -0
  82. package/dist/translations/he.d.ts +8 -0
  83. package/dist/translations/he.js +5 -0
  84. package/dist/translations/he.umd.js +11 -0
  85. package/dist/translations/hi.d.ts +8 -0
  86. package/dist/translations/hi.js +5 -0
  87. package/dist/translations/hi.umd.js +11 -0
  88. package/dist/translations/hr.d.ts +8 -0
  89. package/dist/translations/hr.js +5 -0
  90. package/dist/translations/hr.umd.js +11 -0
  91. package/dist/translations/hu.d.ts +8 -0
  92. package/dist/translations/hu.js +5 -0
  93. package/dist/translations/hu.umd.js +11 -0
  94. package/dist/translations/id.d.ts +8 -0
  95. package/dist/translations/id.js +5 -0
  96. package/dist/translations/id.umd.js +11 -0
  97. package/dist/translations/it.d.ts +8 -0
  98. package/dist/translations/it.js +5 -0
  99. package/dist/translations/it.umd.js +11 -0
  100. package/dist/translations/ja.d.ts +8 -0
  101. package/dist/translations/ja.js +5 -0
  102. package/dist/translations/ja.umd.js +11 -0
  103. package/dist/translations/jv.d.ts +8 -0
  104. package/dist/translations/jv.js +5 -0
  105. package/dist/translations/jv.umd.js +11 -0
  106. package/dist/translations/km.d.ts +8 -0
  107. package/dist/translations/km.js +5 -0
  108. package/dist/translations/km.umd.js +11 -0
  109. package/dist/translations/kn.d.ts +8 -0
  110. package/dist/translations/kn.js +5 -0
  111. package/dist/translations/kn.umd.js +11 -0
  112. package/dist/translations/ko.d.ts +8 -0
  113. package/dist/translations/ko.js +5 -0
  114. package/dist/translations/ko.umd.js +11 -0
  115. package/dist/translations/ku.d.ts +8 -0
  116. package/dist/translations/ku.js +5 -0
  117. package/dist/translations/ku.umd.js +11 -0
  118. package/dist/translations/lt.d.ts +8 -0
  119. package/dist/translations/lt.js +5 -0
  120. package/dist/translations/lt.umd.js +11 -0
  121. package/dist/translations/lv.d.ts +8 -0
  122. package/dist/translations/lv.js +5 -0
  123. package/dist/translations/lv.umd.js +11 -0
  124. package/dist/translations/ms.d.ts +8 -0
  125. package/dist/translations/ms.js +5 -0
  126. package/dist/translations/ms.umd.js +11 -0
  127. package/dist/translations/nb.d.ts +8 -0
  128. package/dist/translations/nb.js +5 -0
  129. package/dist/translations/nb.umd.js +11 -0
  130. package/dist/translations/ne.d.ts +8 -0
  131. package/dist/translations/ne.js +5 -0
  132. package/dist/translations/ne.umd.js +11 -0
  133. package/dist/translations/nl.d.ts +8 -0
  134. package/dist/translations/nl.js +5 -0
  135. package/dist/translations/nl.umd.js +11 -0
  136. package/dist/translations/no.d.ts +8 -0
  137. package/dist/translations/no.js +5 -0
  138. package/dist/translations/no.umd.js +11 -0
  139. package/dist/translations/pl.d.ts +8 -0
  140. package/dist/translations/pl.js +5 -0
  141. package/dist/translations/pl.umd.js +11 -0
  142. package/dist/translations/pt-br.d.ts +8 -0
  143. package/dist/translations/pt-br.js +5 -0
  144. package/dist/translations/pt-br.umd.js +11 -0
  145. package/dist/translations/pt.d.ts +8 -0
  146. package/dist/translations/pt.js +5 -0
  147. package/dist/translations/pt.umd.js +11 -0
  148. package/dist/translations/ro.d.ts +8 -0
  149. package/dist/translations/ro.js +5 -0
  150. package/dist/translations/ro.umd.js +11 -0
  151. package/dist/translations/ru.d.ts +8 -0
  152. package/dist/translations/ru.js +5 -0
  153. package/dist/translations/ru.umd.js +11 -0
  154. package/dist/translations/sk.d.ts +8 -0
  155. package/dist/translations/sk.js +5 -0
  156. package/dist/translations/sk.umd.js +11 -0
  157. package/dist/translations/sl.d.ts +8 -0
  158. package/dist/translations/sl.js +5 -0
  159. package/dist/translations/sl.umd.js +11 -0
  160. package/dist/translations/sq.d.ts +8 -0
  161. package/dist/translations/sq.js +5 -0
  162. package/dist/translations/sq.umd.js +11 -0
  163. package/dist/translations/sr-latn.d.ts +8 -0
  164. package/dist/translations/sr-latn.js +5 -0
  165. package/dist/translations/sr-latn.umd.js +11 -0
  166. package/dist/translations/sr.d.ts +8 -0
  167. package/dist/translations/sr.js +5 -0
  168. package/dist/translations/sr.umd.js +11 -0
  169. package/dist/translations/sv.d.ts +8 -0
  170. package/dist/translations/sv.js +5 -0
  171. package/dist/translations/sv.umd.js +11 -0
  172. package/dist/translations/th.d.ts +8 -0
  173. package/dist/translations/th.js +5 -0
  174. package/dist/translations/th.umd.js +11 -0
  175. package/dist/translations/ti.d.ts +8 -0
  176. package/dist/translations/ti.js +5 -0
  177. package/dist/translations/ti.umd.js +11 -0
  178. package/dist/translations/tk.d.ts +8 -0
  179. package/dist/translations/tk.js +5 -0
  180. package/dist/translations/tk.umd.js +11 -0
  181. package/dist/translations/tr.d.ts +8 -0
  182. package/dist/translations/tr.js +5 -0
  183. package/dist/translations/tr.umd.js +11 -0
  184. package/dist/translations/tt.d.ts +8 -0
  185. package/dist/translations/tt.js +5 -0
  186. package/dist/translations/tt.umd.js +11 -0
  187. package/dist/translations/ug.d.ts +8 -0
  188. package/dist/translations/ug.js +5 -0
  189. package/dist/translations/ug.umd.js +11 -0
  190. package/dist/translations/uk.d.ts +8 -0
  191. package/dist/translations/uk.js +5 -0
  192. package/dist/translations/uk.umd.js +11 -0
  193. package/dist/translations/ur.d.ts +8 -0
  194. package/dist/translations/ur.js +5 -0
  195. package/dist/translations/ur.umd.js +11 -0
  196. package/dist/translations/uz.d.ts +8 -0
  197. package/dist/translations/uz.js +5 -0
  198. package/dist/translations/uz.umd.js +11 -0
  199. package/dist/translations/vi.d.ts +8 -0
  200. package/dist/translations/vi.js +5 -0
  201. package/dist/translations/vi.umd.js +11 -0
  202. package/dist/translations/zh-cn.d.ts +8 -0
  203. package/dist/translations/zh-cn.js +5 -0
  204. package/dist/translations/zh-cn.umd.js +11 -0
  205. package/dist/translations/zh.d.ts +8 -0
  206. package/dist/translations/zh.js +5 -0
  207. package/dist/translations/zh.umd.js +11 -0
  208. package/dist/types/arialiveannouncer.d.ts +113 -0
  209. package/dist/types/augmentation.d.ts +92 -0
  210. package/dist/types/autocomplete/autocompleteview.d.ts +85 -0
  211. package/dist/types/bindings/addkeyboardhandlingforgrid.d.ts +31 -0
  212. package/dist/types/bindings/clickoutsidehandler.d.ts +32 -0
  213. package/dist/types/bindings/csstransitiondisablermixin.d.ts +44 -0
  214. package/dist/types/bindings/draggableviewmixin.d.ts +50 -0
  215. package/dist/types/bindings/injectcsstransitiondisabler.d.ts +63 -0
  216. package/dist/types/bindings/preventdefault.d.ts +37 -0
  217. package/dist/types/bindings/submithandler.d.ts +61 -0
  218. package/dist/types/button/button.d.ts +185 -0
  219. package/dist/types/button/buttonlabel.d.ts +38 -0
  220. package/dist/types/button/buttonlabelview.d.ts +35 -0
  221. package/dist/types/button/buttonview.d.ts +189 -0
  222. package/dist/types/button/filedialogbuttonview.d.ts +84 -0
  223. package/dist/types/button/switchbuttonview.d.ts +49 -0
  224. package/dist/types/collapsible/collapsibleview.d.ts +74 -0
  225. package/dist/types/colorgrid/colorgridview.d.ts +136 -0
  226. package/dist/types/colorgrid/colortileview.d.ts +32 -0
  227. package/dist/types/colorgrid/utils.d.ts +51 -0
  228. package/dist/types/colorpicker/colorpickerview.d.ts +177 -0
  229. package/dist/types/colorpicker/utils.d.ts +52 -0
  230. package/dist/types/colorselector/colorgridsfragmentview.d.ts +199 -0
  231. package/dist/types/colorselector/colorpickerfragmentview.d.ts +137 -0
  232. package/dist/types/colorselector/colorselectorview.d.ts +246 -0
  233. package/dist/types/colorselector/documentcolorcollection.d.ts +74 -0
  234. package/dist/types/componentfactory.d.ts +85 -0
  235. package/dist/types/dialog/dialog.d.ts +277 -0
  236. package/dist/types/dialog/dialogactionsview.d.ts +73 -0
  237. package/dist/types/dialog/dialogcontentview.d.ts +31 -0
  238. package/dist/types/dialog/dialogview.d.ts +260 -0
  239. package/dist/types/dropdown/button/dropdownbutton.d.ts +29 -0
  240. package/dist/types/dropdown/button/dropdownbuttonview.d.ts +52 -0
  241. package/dist/types/dropdown/button/splitbuttonview.d.ts +166 -0
  242. package/dist/types/dropdown/dropdownpanelfocusable.d.ts +25 -0
  243. package/dist/types/dropdown/dropdownpanelview.d.ts +66 -0
  244. package/dist/types/dropdown/dropdownview.d.ts +319 -0
  245. package/dist/types/dropdown/utils.d.ts +239 -0
  246. package/dist/types/editableui/editableuiview.d.ts +76 -0
  247. package/dist/types/editableui/inline/inlineeditableuiview.d.ts +44 -0
  248. package/dist/types/editorui/accessibilityhelp/accessibilityhelp.d.ts +55 -0
  249. package/dist/types/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +39 -0
  250. package/dist/types/editorui/bodycollection.d.ts +59 -0
  251. package/dist/types/editorui/boxed/boxededitoruiview.d.ts +44 -0
  252. package/dist/types/editorui/editorui.d.ts +292 -0
  253. package/dist/types/editorui/editoruiview.d.ts +43 -0
  254. package/dist/types/editorui/poweredby.d.ts +75 -0
  255. package/dist/types/focuscycler.d.ts +249 -0
  256. package/dist/types/formheader/formheaderview.d.ts +63 -0
  257. package/dist/types/highlightedtext/highlightedtextview.d.ts +42 -0
  258. package/dist/types/icon/iconview.d.ts +92 -0
  259. package/dist/types/iframe/iframeview.d.ts +54 -0
  260. package/dist/types/index.d.ts +87 -0
  261. package/dist/types/input/inputbase.d.ts +123 -0
  262. package/dist/types/input/inputview.d.ts +40 -0
  263. package/dist/types/inputnumber/inputnumberview.d.ts +53 -0
  264. package/dist/types/inputtext/inputtextview.d.ts +22 -0
  265. package/dist/types/label/labelview.d.ts +40 -0
  266. package/dist/types/labeledfield/labeledfieldview.d.ts +191 -0
  267. package/dist/types/labeledfield/utils.d.ts +127 -0
  268. package/dist/types/labeledinput/labeledinputview.d.ts +129 -0
  269. package/dist/types/list/listitemgroupview.d.ts +63 -0
  270. package/dist/types/list/listitemview.d.ts +40 -0
  271. package/dist/types/list/listseparatorview.d.ts +22 -0
  272. package/dist/types/list/listview.d.ts +128 -0
  273. package/dist/types/menubar/menubarmenubuttonview.d.ts +39 -0
  274. package/dist/types/menubar/menubarmenulistitembuttonview.d.ts +25 -0
  275. package/dist/types/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +27 -0
  276. package/dist/types/menubar/menubarmenulistitemview.d.ts +29 -0
  277. package/dist/types/menubar/menubarmenulistview.d.ts +28 -0
  278. package/dist/types/menubar/menubarmenupanelview.d.ts +57 -0
  279. package/dist/types/menubar/menubarmenuview.d.ts +113 -0
  280. package/dist/types/menubar/menubarview.d.ts +168 -0
  281. package/dist/types/menubar/utils.d.ts +443 -0
  282. package/dist/types/model.d.ts +26 -0
  283. package/dist/types/notification/notification.d.ts +215 -0
  284. package/dist/types/panel/balloon/balloonpanelview.d.ts +689 -0
  285. package/dist/types/panel/balloon/contextualballoon.d.ts +303 -0
  286. package/dist/types/panel/sticky/stickypanelview.d.ts +160 -0
  287. package/dist/types/search/filteredview.d.ts +35 -0
  288. package/dist/types/search/searchinfoview.d.ts +49 -0
  289. package/dist/types/search/searchresultsview.d.ts +58 -0
  290. package/dist/types/search/text/searchtextqueryview.d.ts +80 -0
  291. package/dist/types/search/text/searchtextview.d.ts +223 -0
  292. package/dist/types/spinner/spinnerview.d.ts +29 -0
  293. package/dist/types/template.d.ts +946 -0
  294. package/dist/types/textarea/textareaview.d.ts +108 -0
  295. package/dist/types/toolbar/balloon/balloontoolbar.d.ts +121 -0
  296. package/dist/types/toolbar/block/blockbuttonview.d.ts +39 -0
  297. package/dist/types/toolbar/block/blocktoolbar.d.ts +157 -0
  298. package/dist/types/toolbar/normalizetoolbarconfig.d.ts +44 -0
  299. package/dist/types/toolbar/toolbarlinebreakview.d.ts +22 -0
  300. package/dist/types/toolbar/toolbarseparatorview.d.ts +22 -0
  301. package/dist/types/toolbar/toolbarview.d.ts +271 -0
  302. package/dist/types/tooltipmanager.d.ts +199 -0
  303. package/dist/types/view.d.ts +426 -0
  304. package/dist/types/viewcollection.d.ts +143 -0
  305. package/lang/contexts.json +2 -1
  306. package/lang/translations/af.po +4 -0
  307. package/lang/translations/ar.po +4 -0
  308. package/lang/translations/ast.po +4 -0
  309. package/lang/translations/az.po +4 -0
  310. package/lang/translations/bg.po +4 -0
  311. package/lang/translations/bn.po +4 -0
  312. package/lang/translations/bs.po +4 -0
  313. package/lang/translations/ca.po +4 -0
  314. package/lang/translations/cs.po +4 -0
  315. package/lang/translations/da.po +4 -0
  316. package/lang/translations/de-ch.po +4 -0
  317. package/lang/translations/de.po +4 -0
  318. package/lang/translations/el.po +4 -0
  319. package/lang/translations/en-au.po +4 -0
  320. package/lang/translations/en-gb.po +4 -0
  321. package/lang/translations/en.po +4 -0
  322. package/lang/translations/eo.po +4 -0
  323. package/lang/translations/es-co.po +4 -0
  324. package/lang/translations/es.po +4 -0
  325. package/lang/translations/et.po +4 -0
  326. package/lang/translations/eu.po +4 -0
  327. package/lang/translations/fa.po +4 -0
  328. package/lang/translations/fi.po +4 -0
  329. package/lang/translations/fr.po +4 -0
  330. package/lang/translations/gl.po +4 -0
  331. package/lang/translations/he.po +4 -0
  332. package/lang/translations/hi.po +4 -0
  333. package/lang/translations/hr.po +4 -0
  334. package/lang/translations/hu.po +4 -0
  335. package/lang/translations/id.po +4 -0
  336. package/lang/translations/it.po +4 -0
  337. package/lang/translations/ja.po +4 -0
  338. package/lang/translations/jv.po +4 -0
  339. package/lang/translations/km.po +4 -0
  340. package/lang/translations/kn.po +4 -0
  341. package/lang/translations/ko.po +4 -0
  342. package/lang/translations/ku.po +4 -0
  343. package/lang/translations/lt.po +4 -0
  344. package/lang/translations/lv.po +4 -0
  345. package/lang/translations/ms.po +4 -0
  346. package/lang/translations/nb.po +4 -0
  347. package/lang/translations/ne.po +4 -0
  348. package/lang/translations/nl.po +4 -0
  349. package/lang/translations/no.po +4 -0
  350. package/lang/translations/pl.po +4 -0
  351. package/lang/translations/pt-br.po +4 -0
  352. package/lang/translations/pt.po +4 -0
  353. package/lang/translations/ro.po +4 -0
  354. package/lang/translations/ru.po +4 -0
  355. package/lang/translations/sk.po +4 -0
  356. package/lang/translations/sl.po +4 -0
  357. package/lang/translations/sq.po +4 -0
  358. package/lang/translations/sr-latn.po +4 -0
  359. package/lang/translations/sr.po +4 -0
  360. package/lang/translations/sv.po +4 -0
  361. package/lang/translations/th.po +4 -0
  362. package/lang/translations/ti.po +214 -0
  363. package/lang/translations/tk.po +4 -0
  364. package/lang/translations/tr.po +4 -0
  365. package/lang/translations/tt.po +4 -0
  366. package/lang/translations/ug.po +4 -0
  367. package/lang/translations/uk.po +4 -0
  368. package/lang/translations/ur.po +4 -0
  369. package/lang/translations/uz.po +4 -0
  370. package/lang/translations/vi.po +4 -0
  371. package/lang/translations/zh-cn.po +4 -0
  372. package/lang/translations/zh.po +4 -0
  373. package/package.json +4 -3
  374. package/src/arialiveannouncer.d.ts +34 -23
  375. package/src/arialiveannouncer.js +80 -30
  376. package/src/colorgrid/colortileview.d.ts +1 -1
  377. package/src/colorgrid/colortileview.js +3 -1
  378. package/src/colorpicker/colorpickerview.d.ts +32 -1
  379. package/src/colorpicker/colorpickerview.js +62 -13
  380. package/src/colorselector/colorpickerfragmentview.d.ts +4 -0
  381. package/src/colorselector/colorpickerfragmentview.js +13 -5
  382. package/src/colorselector/colorselectorview.js +1 -0
  383. package/src/index.d.ts +4 -4
  384. package/src/index.js +3 -2
  385. package/src/menubar/utils.d.ts +8 -1
  386. package/src/menubar/utils.js +26 -2
  387. package/src/toolbar/toolbarview.js +2 -3
  388. package/theme/components/arialiveannouncer/arialiveannouncer.css +4 -0
  389. package/theme/components/tooltip/tooltip.css +4 -0
  390. package/theme/globals/globals.css +0 -1
  391. package/theme/mixins/_mediacolors.css +20 -0
  392. package/theme/globals/_reset.css +0 -13
@@ -0,0 +1,689 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module ui/panel/balloon/balloonpanelview
11
+ */
12
+ import View from '../../view.js';
13
+ import type ViewCollection from '../../viewcollection.js';
14
+ import { type Locale, type PositionOptions, type PositioningFunction } from '@ckeditor/ckeditor5-utils';
15
+ import '../../../theme/components/panel/balloonpanel.css';
16
+ /**
17
+ * The balloon panel view class.
18
+ *
19
+ * A floating container which can
20
+ * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#pin pin} to any
21
+ * {@link module:utils/dom/position~Options#target target} in the DOM and remain in that position
22
+ * e.g. when the web page is scrolled.
23
+ *
24
+ * The balloon panel can be used to display contextual, non-blocking UI like forms, toolbars and
25
+ * the like in its {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#content} view
26
+ * collection.
27
+ *
28
+ * There is a number of {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}
29
+ * that the balloon can use, automatically switching from one to another when the viewport space becomes
30
+ * scarce to keep the balloon visible to the user as long as it is possible. The balloon will also
31
+ * accept any custom position set provided by the user compatible with the
32
+ * {@link module:utils/dom/position~Options options}.
33
+ *
34
+ * ```ts
35
+ * const panel = new BalloonPanelView( locale );
36
+ * const childView = new ChildView();
37
+ * const positions = BalloonPanelView.defaultPositions;
38
+ *
39
+ * panel.render();
40
+ *
41
+ * // Add a child view to the panel's content collection.
42
+ * panel.content.add( childView );
43
+ *
44
+ * // Start pinning the panel to an element with the "target" id DOM.
45
+ * // The balloon will remain pinned until unpin() is called.
46
+ * panel.pin( {
47
+ * target: document.querySelector( '#target' ),
48
+ * positions: [
49
+ * positions.northArrowSouth,
50
+ * positions.southArrowNorth
51
+ * ]
52
+ * } );
53
+ * ```
54
+ */
55
+ export default class BalloonPanelView extends View {
56
+ /**
57
+ * A collection of the child views that creates the balloon panel contents.
58
+ */
59
+ readonly content: ViewCollection;
60
+ /**
61
+ * The absolute top position of the balloon panel in pixels.
62
+ *
63
+ * @observable
64
+ * @default 0
65
+ */
66
+ top: number;
67
+ /**
68
+ * The absolute left position of the balloon panel in pixels.
69
+ *
70
+ * @observable
71
+ * @default 0
72
+ */
73
+ left: number;
74
+ /**
75
+ * The balloon panel's current position. The position name is reflected in the CSS class set
76
+ * to the balloon, i.e. `.ck-balloon-panel_arrow_nw` for the "arrow_nw" position. The class
77
+ * controls the minor aspects of the balloon's visual appearance like the placement
78
+ * of an {@link #withArrow arrow}. To support a new position, an additional CSS must be created.
79
+ *
80
+ * Default position names correspond with
81
+ * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.
82
+ *
83
+ * See the {@link #attachTo} and {@link #pin} methods to learn about custom balloon positions.
84
+ *
85
+ * @observable
86
+ * @default 'arrow_nw'
87
+ */
88
+ position: 'arrow_nw' | 'arrow_ne' | 'arrow_sw' | 'arrow_se';
89
+ /**
90
+ * Controls whether the balloon panel is visible or not.
91
+ *
92
+ * @observable
93
+ * @default false
94
+ */
95
+ isVisible: boolean;
96
+ /**
97
+ * Controls whether the balloon panel has an arrow. The presence of the arrow
98
+ * is reflected in the `ck-balloon-panel_with-arrow` CSS class.
99
+ *
100
+ * @observable
101
+ * @default true
102
+ */
103
+ withArrow: boolean;
104
+ /**
105
+ * An additional CSS class added to the {@link #element}.
106
+ *
107
+ * @observable
108
+ */
109
+ class: string | undefined;
110
+ /**
111
+ * A callback that starts pinning the panel when {@link #isVisible} gets
112
+ * `true`. Used by {@link #pin}.
113
+ *
114
+ * @private
115
+ */
116
+ private _pinWhenIsVisibleCallback;
117
+ /**
118
+ * @inheritDoc
119
+ */
120
+ constructor(locale?: Locale);
121
+ /**
122
+ * Shows the panel.
123
+ *
124
+ * See {@link #isVisible}.
125
+ */
126
+ show(): void;
127
+ /**
128
+ * Hides the panel.
129
+ *
130
+ * See {@link #isVisible}.
131
+ */
132
+ hide(): void;
133
+ /**
134
+ * Attaches the panel to a specified {@link module:utils/dom/position~Options#target} with a
135
+ * smart positioning heuristics that chooses from available positions to make sure the panel
136
+ * is visible to the user i.e. within the limits of the viewport.
137
+ *
138
+ * This method accepts configuration {@link module:utils/dom/position~Options options}
139
+ * to set the `target`, optional `limiter` and `positions` the balloon should choose from.
140
+ *
141
+ * ```ts
142
+ * const panel = new BalloonPanelView( locale );
143
+ * const positions = BalloonPanelView.defaultPositions;
144
+ *
145
+ * panel.render();
146
+ *
147
+ * // Attach the panel to an element with the "target" id DOM.
148
+ * panel.attachTo( {
149
+ * target: document.querySelector( '#target' ),
150
+ * positions: [
151
+ * positions.northArrowSouth,
152
+ * positions.southArrowNorth
153
+ * ]
154
+ * } );
155
+ * ```
156
+ *
157
+ * **Note**: Attaching the panel will also automatically {@link #show} it.
158
+ *
159
+ * **Note**: An attached panel will not follow its target when the window is scrolled or resized.
160
+ * See the {@link #pin} method for a more permanent positioning strategy.
161
+ *
162
+ * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.
163
+ * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.
164
+ */
165
+ attachTo(options: Partial<PositionOptions>): void;
166
+ /**
167
+ * Works the same way as the {@link #attachTo} method except that the position of the panel is
168
+ * continuously updated when:
169
+ *
170
+ * * any ancestor of the {@link module:utils/dom/position~Options#target}
171
+ * or {@link module:utils/dom/position~Options#limiter} is scrolled,
172
+ * * the browser window gets resized or scrolled.
173
+ *
174
+ * Thanks to that, the panel always sticks to the {@link module:utils/dom/position~Options#target}
175
+ * and is immune to the changing environment.
176
+ *
177
+ * ```ts
178
+ * const panel = new BalloonPanelView( locale );
179
+ * const positions = BalloonPanelView.defaultPositions;
180
+ *
181
+ * panel.render();
182
+ *
183
+ * // Pin the panel to an element with the "target" id DOM.
184
+ * panel.pin( {
185
+ * target: document.querySelector( '#target' ),
186
+ * positions: [
187
+ * positions.northArrowSouth,
188
+ * positions.southArrowNorth
189
+ * ]
190
+ * } );
191
+ * ```
192
+ *
193
+ * To leave the pinned state, use the {@link #unpin} method.
194
+ *
195
+ * **Note**: Pinning the panel will also automatically {@link #show} it.
196
+ *
197
+ * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.
198
+ * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.
199
+ */
200
+ pin(options: Partial<PositionOptions>): void;
201
+ /**
202
+ * Stops pinning the panel, as set up by {@link #pin}.
203
+ */
204
+ unpin(): void;
205
+ /**
206
+ * Starts managing the pinned state of the panel. See {@link #pin}.
207
+ *
208
+ * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.
209
+ */
210
+ private _startPinning;
211
+ /**
212
+ * Stops managing the pinned state of the panel. See {@link #pin}.
213
+ */
214
+ private _stopPinning;
215
+ /**
216
+ * A side offset of the arrow tip from the edge of the balloon. Controlled by CSS.
217
+ *
218
+ * ```
219
+ * ┌───────────────────────┐
220
+ * │ │
221
+ * │ Balloon │
222
+ * │ Content │
223
+ * │ │
224
+ * └──+ +───────────────┘
225
+ * | \ /
226
+ * | \/
227
+ * >┼─────┼< ─────────────────────── side offset
228
+ *
229
+ * ```
230
+ *
231
+ * @default 25
232
+ */
233
+ static arrowSideOffset: number;
234
+ /**
235
+ * A height offset of the arrow from the edge of the balloon. Controlled by CSS.
236
+ *
237
+ * ```
238
+ * ┌───────────────────────┐
239
+ * │ │
240
+ * │ Balloon │
241
+ * │ Content │ ╱-- arrow height offset
242
+ * │ │ V
243
+ * └──+ +───────────────┘ --- ─┼───────
244
+ * \ / │
245
+ * \/ │
246
+ * ────────────────────────────────┼───────
247
+ * ^
248
+ *
249
+ *
250
+ * >┼────┼< arrow height offset
251
+ * │ │
252
+ * │ ┌────────────────────────┐
253
+ * │ │ │
254
+ * │ ╱ │
255
+ * │ ╱ Balloon │
256
+ * │ ╲ Content │
257
+ * │ ╲ │
258
+ * │ │ │
259
+ * │ └────────────────────────┘
260
+ * ```
261
+ *
262
+ * @default 10
263
+ */
264
+ static arrowHeightOffset: number;
265
+ /**
266
+ * A vertical offset of the balloon panel from the edge of the viewport if sticky.
267
+ * It helps in accessing toolbar buttons underneath the balloon panel.
268
+ *
269
+ * ```
270
+ * ┌───────────────────────────────────────────────────┐
271
+ * │ Target │
272
+ * │ │
273
+ * │ /── vertical offset │
274
+ * ┌─────────────────────────────V─────────────────────────┐
275
+ * │ Toolbar ┌─────────────┐ │
276
+ * ├────────────────────│ Balloon │────────────────────┤
277
+ * │ │ └─────────────┘ │ │
278
+ * │ │ │ │
279
+ * │ │ │ │
280
+ * │ │ │ │
281
+ * │ └───────────────────────────────────────────────────┘ │
282
+ * │ Viewport │
283
+ * └───────────────────────────────────────────────────────┘
284
+ * ```
285
+ *
286
+ * @default 20
287
+ */
288
+ static stickyVerticalOffset: number;
289
+ /**
290
+ * Function used to calculate the optimal position for the balloon.
291
+ */
292
+ private static _getOptimalPosition;
293
+ /**
294
+ * A default set of positioning functions used by the balloon panel view
295
+ * when attaching using the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo} method.
296
+ *
297
+ * The available positioning functions are as follows:
298
+ *
299
+ * **North west**
300
+ *
301
+ * * `northWestArrowSouthWest`
302
+ *
303
+ * ```
304
+ * +-----------------+
305
+ * | Balloon |
306
+ * +-----------------+
307
+ * V
308
+ * [ Target ]
309
+ * ```
310
+ *
311
+ * * `northWestArrowSouthMiddleWest`
312
+ *
313
+ * ```
314
+ * +-----------------+
315
+ * | Balloon |
316
+ * +-----------------+
317
+ * V
318
+ * [ Target ]
319
+ * ```
320
+ *
321
+ * * `northWestArrowSouth`
322
+ *
323
+ * ```
324
+ * +-----------------+
325
+ * | Balloon |
326
+ * +-----------------+
327
+ * V
328
+ * [ Target ]
329
+ * ```
330
+ *
331
+ * * `northWestArrowSouthMiddleEast`
332
+ *
333
+ * ```
334
+ * +-----------------+
335
+ * | Balloon |
336
+ * +-----------------+
337
+ * V
338
+ * [ Target ]
339
+ * ```
340
+ *
341
+ * * `northWestArrowSouthEast`
342
+ *
343
+ * ```
344
+ * +-----------------+
345
+ * | Balloon |
346
+ * +-----------------+
347
+ * V
348
+ * [ Target ]
349
+ * ```
350
+ *
351
+ * **North**
352
+ *
353
+ * * `northArrowSouthWest`
354
+ *
355
+ * ```
356
+ * +-----------------+
357
+ * | Balloon |
358
+ * +-----------------+
359
+ * V
360
+ * [ Target ]
361
+ * ```
362
+ *
363
+ * * `northArrowSouthMiddleWest`
364
+ *
365
+ * ```
366
+ * +-----------------+
367
+ * | Balloon |
368
+ * +-----------------+
369
+ * V
370
+ * [ Target ]
371
+ * ```
372
+ * * `northArrowSouth`
373
+ *
374
+ * ```
375
+ * +-----------------+
376
+ * | Balloon |
377
+ * +-----------------+
378
+ * V
379
+ * [ Target ]
380
+ * ```
381
+ *
382
+ * * `northArrowSouthMiddleEast`
383
+ *
384
+ * ```
385
+ * +-----------------+
386
+ * | Balloon |
387
+ * +-----------------+
388
+ * V
389
+ * [ Target ]
390
+ * ```
391
+ *
392
+ * * `northArrowSouthEast`
393
+ *
394
+ * ```
395
+ * +-----------------+
396
+ * | Balloon |
397
+ * +-----------------+
398
+ * V
399
+ * [ Target ]
400
+ * ```
401
+ *
402
+ * **North east**
403
+ *
404
+ * * `northEastArrowSouthWest`
405
+ *
406
+ * ```
407
+ * +-----------------+
408
+ * | Balloon |
409
+ * +-----------------+
410
+ * V
411
+ * [ Target ]
412
+ * ```
413
+ *
414
+ * * `northEastArrowSouthMiddleWest`
415
+ *
416
+ * ```
417
+ * +-----------------+
418
+ * | Balloon |
419
+ * +-----------------+
420
+ * V
421
+ * [ Target ]
422
+ * ```
423
+ *
424
+ * * `northEastArrowSouth`
425
+ *
426
+ * ```
427
+ * +-----------------+
428
+ * | Balloon |
429
+ * +-----------------+
430
+ * V
431
+ * [ Target ]
432
+ * ```
433
+ *
434
+ * * `northEastArrowSouthMiddleEast`
435
+ *
436
+ * ```
437
+ * +-----------------+
438
+ * | Balloon |
439
+ * +-----------------+
440
+ * V
441
+ * [ Target ]
442
+ * ```
443
+ *
444
+ * * `northEastArrowSouthEast`
445
+ *
446
+ * ```
447
+ * +-----------------+
448
+ * | Balloon |
449
+ * +-----------------+
450
+ * V
451
+ * [ Target ]
452
+ * ```
453
+ *
454
+ * **South**
455
+ *
456
+ * * `southArrowNorthWest`
457
+ *
458
+ * ```
459
+ * [ Target ]
460
+ * ^
461
+ * +-----------------+
462
+ * | Balloon |
463
+ * +-----------------+
464
+ * ```
465
+ *
466
+ * * `southArrowNorthMiddleWest`
467
+ *
468
+ * ```
469
+ * [ Target ]
470
+ * ^
471
+ * +-----------------+
472
+ * | Balloon |
473
+ * +-----------------+
474
+ * ```
475
+ *
476
+ * * `southArrowNorth`
477
+ *
478
+ * ```
479
+ * [ Target ]
480
+ * ^
481
+ * +-----------------+
482
+ * | Balloon |
483
+ * +-----------------+
484
+ * ```
485
+ *
486
+ * * `southArrowNorthMiddleEast`
487
+ *
488
+ * ```
489
+ * [ Target ]
490
+ * ^
491
+ * +-----------------+
492
+ * | Balloon |
493
+ * +-----------------+
494
+ * ```
495
+ *
496
+ * * `southArrowNorthEast`
497
+ *
498
+ * ```
499
+ * [ Target ]
500
+ * ^
501
+ * +-----------------+
502
+ * | Balloon |
503
+ * +-----------------+
504
+ * ```
505
+ *
506
+ * **South west**
507
+ *
508
+ * * `southWestArrowNorthWest`
509
+ *
510
+ *
511
+ * ```
512
+ * [ Target ]
513
+ * ^
514
+ * +-----------------+
515
+ * | Balloon |
516
+ * +-----------------+
517
+ * ```
518
+ *
519
+ * * `southWestArrowNorthMiddleWest`
520
+ *
521
+ * ```
522
+ * [ Target ]
523
+ * ^
524
+ * +-----------------+
525
+ * | Balloon |
526
+ * +-----------------+
527
+ * ```
528
+ *
529
+ * * `southWestArrowNorth`
530
+ *
531
+ * ```
532
+ * [ Target ]
533
+ * ^
534
+ * +-----------------+
535
+ * | Balloon |
536
+ * +-----------------+
537
+ * ```
538
+ *
539
+ * * `southWestArrowNorthMiddleEast`
540
+ *
541
+ * ```
542
+ * [ Target ]
543
+ * ^
544
+ * +-----------------+
545
+ * | Balloon |
546
+ * +-----------------+
547
+ * ```
548
+ *
549
+ * * `southWestArrowNorthEast`
550
+ *
551
+ * ```
552
+ * [ Target ]
553
+ * ^
554
+ * +-----------------+
555
+ * | Balloon |
556
+ * +-----------------+
557
+ * ```
558
+ *
559
+ * **South east**
560
+ *
561
+ * * `southEastArrowNorthWest`
562
+ *
563
+ * ```
564
+ * [ Target ]
565
+ * ^
566
+ * +-----------------+
567
+ * | Balloon |
568
+ * +-----------------+
569
+ * ```
570
+ *
571
+ * * `southEastArrowNorthMiddleWest`
572
+ *
573
+ * ```
574
+ * [ Target ]
575
+ * ^
576
+ * +-----------------+
577
+ * | Balloon |
578
+ * +-----------------+
579
+ * ```
580
+ *
581
+ * * `southEastArrowNorth`
582
+ *
583
+ * ```
584
+ * [ Target ]
585
+ * ^
586
+ * +-----------------+
587
+ * | Balloon |
588
+ * +-----------------+
589
+ * ```
590
+ *
591
+ * * `southEastArrowNorthMiddleEast`
592
+ *
593
+ * ```
594
+ * [ Target ]
595
+ * ^
596
+ * +-----------------+
597
+ * | Balloon |
598
+ * +-----------------+
599
+ * ```
600
+ *
601
+ * * `southEastArrowNorthEast`
602
+ *
603
+ * ```
604
+ * [ Target ]
605
+ * ^
606
+ * +-----------------+
607
+ * | Balloon |
608
+ * +-----------------+
609
+ * ```
610
+ *
611
+ * **West**
612
+ *
613
+ * * `westArrowEast`
614
+ *
615
+ * ```
616
+ * +-----------------+
617
+ * | Balloon |>[ Target ]
618
+ * +-----------------+
619
+ * ```
620
+ *
621
+ * **East**
622
+ *
623
+ * * `eastArrowWest`
624
+ *
625
+ * ```
626
+ * +-----------------+
627
+ * [ Target ]<| Balloon |
628
+ * +-----------------+
629
+ * ```
630
+ *
631
+ * **Sticky**
632
+ *
633
+ * * `viewportStickyNorth`
634
+ *
635
+ * ```
636
+ * +---------------------------+
637
+ * | [ Target ] |
638
+ * | |
639
+ * +-----------------------------------+
640
+ * | | +-----------------+ | |
641
+ * | | | Balloon | | |
642
+ * | | +-----------------+ | |
643
+ * | | | |
644
+ * | | | |
645
+ * | | | |
646
+ * | | | |
647
+ * | +---------------------------+ |
648
+ * | Viewport |
649
+ * +-----------------------------------+
650
+ * ```
651
+ *
652
+ * See {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo}.
653
+ *
654
+ * Positioning functions must be compatible with {@link module:utils/dom/position~DomPoint}.
655
+ *
656
+ * Default positioning functions with customized offsets can be generated using
657
+ * {@link module:ui/panel/balloon/balloonpanelview~generatePositions}.
658
+ *
659
+ * The name that the position function returns will be reflected in the balloon panel's class that
660
+ * controls the placement of the "arrow". See {@link #position} to learn more.
661
+ */
662
+ static defaultPositions: Record<string, PositioningFunction>;
663
+ }
664
+ /**
665
+ * Returns available {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}
666
+ * {@link module:utils/dom/position~PositioningFunction positioning functions} adjusted by the specific offsets.
667
+ *
668
+ * @internal
669
+ * @param options Options to generate positions. If not specified, this helper will simply return
670
+ * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.
671
+ * @param options.sideOffset A custom side offset (in pixels) of each position. If
672
+ * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowSideOffset the default value}
673
+ * will be used.
674
+ * @param options.heightOffset A custom height offset (in pixels) of each position. If
675
+ * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowHeightOffset the default value}
676
+ * will be used.
677
+ * @param options.stickyVerticalOffset A custom offset (in pixels) of the `viewportStickyNorth` positioning function.
678
+ * If not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.stickyVerticalOffset the default value}
679
+ * will be used.
680
+ * @param options.config Additional configuration of the balloon balloon panel view.
681
+ * Currently only {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#withArrow} is supported. Learn more
682
+ * about {@link module:utils/dom/position~PositioningFunction positioning functions}.
683
+ */
684
+ export declare function generatePositions(options?: {
685
+ sideOffset?: number;
686
+ heightOffset?: number;
687
+ stickyVerticalOffset?: number;
688
+ config?: object;
689
+ }): Record<string, PositioningFunction>;