@soxa-ui/plugins 0.0.0-stage → 0.3.0-beta.1

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 (630) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -2
  3. package/dist/base/base.class.d.ts +54 -0
  4. package/dist/base/base.class.js +69 -0
  5. package/dist/base/bundle.class.d.ts +25 -0
  6. package/dist/base/bundle.class.js +68 -0
  7. package/dist/base/index.d.ts +3 -0
  8. package/dist/base/types.d.ts +147 -0
  9. package/dist/custom/accordion/header.d.ts +19 -0
  10. package/dist/custom/accordion/header.js +38 -0
  11. package/dist/custom/accordion/index.d.ts +2 -0
  12. package/dist/custom/accordion/item-ids/index.d.ts +1 -0
  13. package/dist/custom/accordion/item-ids/item-ids.plugin.d.ts +24 -0
  14. package/dist/custom/accordion/item-ids/item-ids.plugin.js +44 -0
  15. package/dist/custom/action/action.plugin.d.ts +178 -0
  16. package/dist/custom/action/action.plugin.js +339 -0
  17. package/dist/custom/action/index.d.ts +2 -0
  18. package/dist/custom/action/types.d.ts +65 -0
  19. package/dist/custom/calendar/ids/ids.plugin.d.ts +25 -0
  20. package/dist/custom/calendar/ids/ids.plugin.js +44 -0
  21. package/dist/custom/calendar/ids/index.d.ts +1 -0
  22. package/dist/custom/calendar/index.d.ts +5 -0
  23. package/dist/custom/calendar/keyboard/index.d.ts +2 -0
  24. package/dist/custom/calendar/keyboard/keyboard.plugin.d.ts +114 -0
  25. package/dist/custom/calendar/keyboard/keyboard.plugin.js +249 -0
  26. package/dist/custom/calendar/keyboard/types.d.ts +16 -0
  27. package/dist/custom/calendar/names/index.d.ts +1 -0
  28. package/dist/custom/calendar/names/names.plugin.d.ts +24 -0
  29. package/dist/custom/calendar/names/names.plugin.js +45 -0
  30. package/dist/custom/calendar/parts.d.ts +58 -0
  31. package/dist/custom/calendar/parts.js +119 -0
  32. package/dist/custom/calendar/pointer/index.d.ts +2 -0
  33. package/dist/custom/calendar/pointer/pointer.plugin.d.ts +58 -0
  34. package/dist/custom/calendar/pointer/pointer.plugin.js +144 -0
  35. package/dist/custom/calendar/pointer/types.d.ts +6 -0
  36. package/dist/custom/calendar/stop.d.ts +20 -0
  37. package/dist/custom/calendar/stop.js +32 -0
  38. package/dist/custom/calendar/types.d.ts +16 -0
  39. package/dist/custom/clearable/index.d.ts +1 -0
  40. package/dist/custom/clearable/names/index.d.ts +1 -0
  41. package/dist/custom/clearable/names/names.plugin.d.ts +24 -0
  42. package/dist/custom/clearable/names/names.plugin.js +29 -0
  43. package/dist/custom/collection/bundles.plugin.d.ts +55 -0
  44. package/dist/custom/collection/bundles.plugin.js +100 -0
  45. package/dist/custom/collection/collection-bundles-access.plugin.d.ts +29 -0
  46. package/dist/custom/collection/collection-bundles-access.plugin.js +44 -0
  47. package/dist/custom/collection/collection-elements.plugin.d.ts +55 -0
  48. package/dist/custom/collection/collection-elements.plugin.js +100 -0
  49. package/dist/custom/collection/index.d.ts +4 -0
  50. package/dist/custom/collection/leaving-focus.d.ts +119 -0
  51. package/dist/custom/collection/leaving-focus.js +164 -0
  52. package/dist/custom/collection/reachable.d.ts +14 -0
  53. package/dist/custom/collection/reachable.js +18 -0
  54. package/dist/custom/collection/types.d.ts +14 -0
  55. package/dist/custom/component-view/aria.plugin.d.ts +102 -0
  56. package/dist/custom/component-view/aria.plugin.js +190 -0
  57. package/dist/custom/component-view/index.d.ts +2 -0
  58. package/dist/custom/component-view/types.d.ts +62 -0
  59. package/dist/custom/date-input/clipboard/clipboard.plugin.d.ts +41 -0
  60. package/dist/custom/date-input/clipboard/clipboard.plugin.js +98 -0
  61. package/dist/custom/date-input/clipboard/index.d.ts +2 -0
  62. package/dist/custom/date-input/clipboard/types.d.ts +6 -0
  63. package/dist/custom/date-input/ids/ids.plugin.d.ts +21 -0
  64. package/dist/custom/date-input/ids/ids.plugin.js +28 -0
  65. package/dist/custom/date-input/ids/index.d.ts +1 -0
  66. package/dist/custom/date-input/index.d.ts +6 -0
  67. package/dist/custom/date-input/keyboard/index.d.ts +2 -0
  68. package/dist/custom/date-input/keyboard/keyboard.plugin.d.ts +54 -0
  69. package/dist/custom/date-input/keyboard/keyboard.plugin.js +154 -0
  70. package/dist/custom/date-input/keyboard/types.d.ts +9 -0
  71. package/dist/custom/date-input/parts.d.ts +49 -0
  72. package/dist/custom/date-input/parts.js +127 -0
  73. package/dist/custom/date-input/pointer/index.d.ts +2 -0
  74. package/dist/custom/date-input/pointer/pointer.plugin.d.ts +51 -0
  75. package/dist/custom/date-input/pointer/pointer.plugin.js +141 -0
  76. package/dist/custom/date-input/pointer/types.d.ts +6 -0
  77. package/dist/custom/date-input/touch/index.d.ts +2 -0
  78. package/dist/custom/date-input/touch/touch.plugin.d.ts +100 -0
  79. package/dist/custom/date-input/touch/touch.plugin.js +276 -0
  80. package/dist/custom/date-input/touch/types.d.ts +6 -0
  81. package/dist/custom/date-input/types.d.ts +6 -0
  82. package/dist/custom/date-picker/field.d.ts +20 -0
  83. package/dist/custom/date-picker/field.js +27 -0
  84. package/dist/custom/date-picker/focus/focus.plugin.d.ts +56 -0
  85. package/dist/custom/date-picker/focus/focus.plugin.js +81 -0
  86. package/dist/custom/date-picker/focus/index.d.ts +2 -0
  87. package/dist/custom/date-picker/focus/types.d.ts +3 -0
  88. package/dist/custom/date-picker/ids/ids.plugin.d.ts +19 -0
  89. package/dist/custom/date-picker/ids/ids.plugin.js +28 -0
  90. package/dist/custom/date-picker/ids/index.d.ts +1 -0
  91. package/dist/custom/date-picker/index.d.ts +5 -0
  92. package/dist/custom/date-picker/names/index.d.ts +2 -0
  93. package/dist/custom/date-picker/names/names.plugin.d.ts +33 -0
  94. package/dist/custom/date-picker/names/names.plugin.js +80 -0
  95. package/dist/custom/date-picker/names/types.d.ts +12 -0
  96. package/dist/custom/date-picker/trigger/index.d.ts +2 -0
  97. package/dist/custom/date-picker/trigger/trigger.plugin.d.ts +37 -0
  98. package/dist/custom/date-picker/trigger/trigger.plugin.js +69 -0
  99. package/dist/custom/date-picker/trigger/types.d.ts +3 -0
  100. package/dist/custom/dialog/ids/ids.plugin.d.ts +15 -0
  101. package/dist/custom/dialog/ids/ids.plugin.js +28 -0
  102. package/dist/custom/dialog/ids/index.d.ts +1 -0
  103. package/dist/custom/dialog/index.d.ts +3 -0
  104. package/dist/custom/dialog/layout/index.d.ts +3 -0
  105. package/dist/custom/dialog/layout/layout.plugin.d.ts +42 -0
  106. package/dist/custom/dialog/layout/layout.plugin.js +78 -0
  107. package/dist/custom/dialog/layout/offset-event.d.ts +35 -0
  108. package/dist/custom/dialog/layout/offset-event.js +44 -0
  109. package/dist/custom/dialog/layout/types.d.ts +12 -0
  110. package/dist/custom/dialog/names/index.d.ts +1 -0
  111. package/dist/custom/dialog/names/names.plugin.d.ts +13 -0
  112. package/dist/custom/dialog/names/names.plugin.js +17 -0
  113. package/dist/custom/dismiss/dismiss.plugin.d.ts +174 -0
  114. package/dist/custom/dismiss/dismiss.plugin.js +287 -0
  115. package/dist/custom/dismiss/index.d.ts +2 -0
  116. package/dist/custom/dismiss/types.d.ts +59 -0
  117. package/dist/custom/drag-and-drop/drag.plugin.d.ts +87 -0
  118. package/dist/custom/drag-and-drop/drag.plugin.js +310 -0
  119. package/dist/custom/drag-and-drop/index.d.ts +2 -0
  120. package/dist/custom/drag-and-drop/types.d.ts +13 -0
  121. package/dist/custom/drawer/index.d.ts +1 -0
  122. package/dist/custom/drawer/layout/index.d.ts +2 -0
  123. package/dist/custom/drawer/layout/layout.plugin.d.ts +17 -0
  124. package/dist/custom/drawer/layout/layout.plugin.js +22 -0
  125. package/dist/custom/drawer/layout/types.d.ts +3 -0
  126. package/dist/custom/element/element.plugin.d.ts +35 -0
  127. package/dist/custom/element/element.plugin.js +58 -0
  128. package/dist/custom/element/index.d.ts +2 -0
  129. package/dist/custom/element/types.d.ts +18 -0
  130. package/dist/custom/field/ids/ids.plugin.d.ts +64 -0
  131. package/dist/custom/field/ids/ids.plugin.js +126 -0
  132. package/dist/custom/field/ids/index.d.ts +2 -0
  133. package/dist/custom/field/ids/types.d.ts +28 -0
  134. package/dist/custom/field/index.d.ts +1 -0
  135. package/dist/custom/frame/anchor/anchor.plugin.d.ts +483 -0
  136. package/dist/custom/frame/anchor/anchor.plugin.js +820 -0
  137. package/dist/custom/frame/anchor/index.d.ts +2 -0
  138. package/dist/custom/frame/anchor/types.d.ts +83 -0
  139. package/dist/custom/frame/index.d.ts +2 -0
  140. package/dist/custom/frame/layout/index.d.ts +2 -0
  141. package/dist/custom/frame/layout/layout.plugin.d.ts +24 -0
  142. package/dist/custom/frame/layout/layout.plugin.js +65 -0
  143. package/dist/custom/frame/layout/types.d.ts +5 -0
  144. package/dist/custom/icon/index.d.ts +2 -0
  145. package/dist/custom/icon/layout.plugin.d.ts +21 -0
  146. package/dist/custom/icon/layout.plugin.js +51 -0
  147. package/dist/custom/icon/types.d.ts +5 -0
  148. package/dist/custom/id/id.plugin.d.ts +32 -0
  149. package/dist/custom/id/id.plugin.js +42 -0
  150. package/dist/custom/id/index.d.ts +2 -0
  151. package/dist/custom/id/types.d.ts +6 -0
  152. package/dist/custom/index.d.ts +42 -0
  153. package/dist/custom/input/field.d.ts +16 -0
  154. package/dist/custom/input/field.js +27 -0
  155. package/dist/custom/input/index.d.ts +3 -0
  156. package/dist/custom/input/input.plugin.d.ts +12 -0
  157. package/dist/custom/input/input.plugin.js +46 -0
  158. package/dist/custom/input/types.d.ts +2 -0
  159. package/dist/custom/input-bool/index.d.ts +2 -0
  160. package/dist/custom/input-bool/input-bool.plugin.d.ts +30 -0
  161. package/dist/custom/input-bool/input-bool.plugin.js +77 -0
  162. package/dist/custom/input-bool/types.d.ts +5 -0
  163. package/dist/custom/input-control/index.d.ts +2 -0
  164. package/dist/custom/input-control/input-control.plugin.d.ts +12 -0
  165. package/dist/custom/input-control/input-control.plugin.js +40 -0
  166. package/dist/custom/input-control/types.d.ts +2 -0
  167. package/dist/custom/item-group/ids/ids.plugin.d.ts +19 -0
  168. package/dist/custom/item-group/ids/ids.plugin.js +32 -0
  169. package/dist/custom/item-group/ids/index.d.ts +1 -0
  170. package/dist/custom/item-group/index.d.ts +1 -0
  171. package/dist/custom/label/index.d.ts +1 -0
  172. package/dist/custom/label/nested-warn/index.d.ts +1 -0
  173. package/dist/custom/label/nested-warn/nested-warn.plugin.d.ts +21 -0
  174. package/dist/custom/label/nested-warn/nested-warn.plugin.js +41 -0
  175. package/dist/custom/list/height/height.plugin.d.ts +129 -0
  176. package/dist/custom/list/height/height.plugin.js +272 -0
  177. package/dist/custom/list/height/index.d.ts +2 -0
  178. package/dist/custom/list/height/types.d.ts +10 -0
  179. package/dist/custom/list/index.d.ts +7 -0
  180. package/dist/custom/list/item/index.d.ts +2 -0
  181. package/dist/custom/list/item/item.plugin.d.ts +25 -0
  182. package/dist/custom/list/item/item.plugin.js +46 -0
  183. package/dist/custom/list/item/types.d.ts +5 -0
  184. package/dist/custom/list/keyboard/index.d.ts +2 -0
  185. package/dist/custom/list/keyboard/keyboard.plugin.d.ts +133 -0
  186. package/dist/custom/list/keyboard/keyboard.plugin.js +199 -0
  187. package/dist/custom/list/keyboard/types.d.ts +3 -0
  188. package/dist/custom/list/navigation/index.d.ts +2 -0
  189. package/dist/custom/list/navigation/navigation.plugin.d.ts +262 -0
  190. package/dist/custom/list/navigation/navigation.plugin.js +402 -0
  191. package/dist/custom/list/navigation/types.d.ts +25 -0
  192. package/dist/custom/list/newly-selected.d.ts +17 -0
  193. package/dist/custom/list/newly-selected.js +22 -0
  194. package/dist/custom/list/option-ids/index.d.ts +1 -0
  195. package/dist/custom/list/option-ids/option-ids.plugin.d.ts +29 -0
  196. package/dist/custom/list/option-ids/option-ids.plugin.js +43 -0
  197. package/dist/custom/list/row.d.ts +50 -0
  198. package/dist/custom/list/row.js +99 -0
  199. package/dist/custom/list/scroll/index.d.ts +2 -0
  200. package/dist/custom/list/scroll/scroll.plugin.d.ts +132 -0
  201. package/dist/custom/list/scroll/scroll.plugin.js +286 -0
  202. package/dist/custom/list/scroll/types.d.ts +21 -0
  203. package/dist/custom/list/typeahead.d.ts +53 -0
  204. package/dist/custom/list/typeahead.js +58 -0
  205. package/dist/custom/menu/focus/focus.plugin.d.ts +61 -0
  206. package/dist/custom/menu/focus/focus.plugin.js +105 -0
  207. package/dist/custom/menu/focus/index.d.ts +2 -0
  208. package/dist/custom/menu/focus/types.d.ts +2 -0
  209. package/dist/custom/menu/hover/hover.plugin.d.ts +99 -0
  210. package/dist/custom/menu/hover/hover.plugin.js +235 -0
  211. package/dist/custom/menu/hover/index.d.ts +2 -0
  212. package/dist/custom/menu/hover/types.d.ts +2 -0
  213. package/dist/custom/menu/ids/ids.plugin.d.ts +29 -0
  214. package/dist/custom/menu/ids/ids.plugin.js +46 -0
  215. package/dist/custom/menu/ids/index.d.ts +1 -0
  216. package/dist/custom/menu/index.d.ts +11 -0
  217. package/dist/custom/menu/keyboard/index.d.ts +2 -0
  218. package/dist/custom/menu/keyboard/keyboard.plugin.d.ts +41 -0
  219. package/dist/custom/menu/keyboard/keyboard.plugin.js +68 -0
  220. package/dist/custom/menu/keyboard/types.d.ts +2 -0
  221. package/dist/custom/menu/navigation/index.d.ts +2 -0
  222. package/dist/custom/menu/navigation/navigation.plugin.d.ts +116 -0
  223. package/dist/custom/menu/navigation/navigation.plugin.js +222 -0
  224. package/dist/custom/menu/navigation/types.d.ts +2 -0
  225. package/dist/custom/menu/nested-layer.d.ts +13 -0
  226. package/dist/custom/menu/nested-layer.js +20 -0
  227. package/dist/custom/menu/pointer/index.d.ts +2 -0
  228. package/dist/custom/menu/pointer/pointer.plugin.d.ts +45 -0
  229. package/dist/custom/menu/pointer/pointer.plugin.js +95 -0
  230. package/dist/custom/menu/pointer/strategies/context.strategy.d.ts +70 -0
  231. package/dist/custom/menu/pointer/strategies/context.strategy.js +170 -0
  232. package/dist/custom/menu/pointer/strategies/index.d.ts +3 -0
  233. package/dist/custom/menu/pointer/strategies/press.strategy.d.ts +23 -0
  234. package/dist/custom/menu/pointer/strategies/press.strategy.js +33 -0
  235. package/dist/custom/menu/pointer/strategies/types.d.ts +49 -0
  236. package/dist/custom/menu/pointer/types.d.ts +2 -0
  237. package/dist/custom/menu/popover-item-focus/focus.plugin.d.ts +54 -0
  238. package/dist/custom/menu/popover-item-focus/focus.plugin.js +70 -0
  239. package/dist/custom/menu/popover-item-focus/index.d.ts +2 -0
  240. package/dist/custom/menu/popover-item-focus/types.d.ts +10 -0
  241. package/dist/custom/menu/popover-item-keyboard/index.d.ts +2 -0
  242. package/dist/custom/menu/popover-item-keyboard/keyboard.plugin.d.ts +43 -0
  243. package/dist/custom/menu/popover-item-keyboard/keyboard.plugin.js +79 -0
  244. package/dist/custom/menu/popover-item-keyboard/types.d.ts +2 -0
  245. package/dist/custom/menu/popup-ids/ids.plugin.d.ts +27 -0
  246. package/dist/custom/menu/popup-ids/ids.plugin.js +47 -0
  247. package/dist/custom/menu/popup-ids/index.d.ts +1 -0
  248. package/dist/custom/menu/submenu-focus/focus.plugin.d.ts +53 -0
  249. package/dist/custom/menu/submenu-focus/focus.plugin.js +84 -0
  250. package/dist/custom/menu/submenu-focus/index.d.ts +2 -0
  251. package/dist/custom/menu/submenu-focus/types.d.ts +10 -0
  252. package/dist/custom/menu/submenu-keyboard/index.d.ts +2 -0
  253. package/dist/custom/menu/submenu-keyboard/keyboard.plugin.d.ts +43 -0
  254. package/dist/custom/menu/submenu-keyboard/keyboard.plugin.js +74 -0
  255. package/dist/custom/menu/submenu-keyboard/types.d.ts +2 -0
  256. package/dist/custom/number-input/index.d.ts +5 -0
  257. package/dist/custom/number-input/keyboard/index.d.ts +2 -0
  258. package/dist/custom/number-input/keyboard/keyboard.plugin.d.ts +36 -0
  259. package/dist/custom/number-input/keyboard/keyboard.plugin.js +80 -0
  260. package/dist/custom/number-input/keyboard/types.d.ts +3 -0
  261. package/dist/custom/number-input/names/index.d.ts +1 -0
  262. package/dist/custom/number-input/names/names.plugin.d.ts +17 -0
  263. package/dist/custom/number-input/names/names.plugin.js +24 -0
  264. package/dist/custom/number-input/parts.d.ts +21 -0
  265. package/dist/custom/number-input/parts.js +39 -0
  266. package/dist/custom/number-input/stepper/index.d.ts +2 -0
  267. package/dist/custom/number-input/stepper/stepper.plugin.d.ts +59 -0
  268. package/dist/custom/number-input/stepper/stepper.plugin.js +166 -0
  269. package/dist/custom/number-input/stepper/types.d.ts +19 -0
  270. package/dist/custom/number-input/touch/index.d.ts +2 -0
  271. package/dist/custom/number-input/touch/touch.plugin.d.ts +25 -0
  272. package/dist/custom/number-input/touch/touch.plugin.js +53 -0
  273. package/dist/custom/number-input/touch/types.d.ts +3 -0
  274. package/dist/custom/number-input/types.d.ts +8 -0
  275. package/dist/custom/number-input/typing/index.d.ts +2 -0
  276. package/dist/custom/number-input/typing/types.d.ts +6 -0
  277. package/dist/custom/number-input/typing/typing.plugin.d.ts +47 -0
  278. package/dist/custom/number-input/typing/typing.plugin.js +149 -0
  279. package/dist/custom/overlay/focus/focus.plugin.d.ts +150 -0
  280. package/dist/custom/overlay/focus/focus.plugin.js +242 -0
  281. package/dist/custom/overlay/focus/index.d.ts +1 -0
  282. package/dist/custom/overlay/hide-outside/hide-outside.plugin.d.ts +84 -0
  283. package/dist/custom/overlay/hide-outside/hide-outside.plugin.js +187 -0
  284. package/dist/custom/overlay/hide-outside/index.d.ts +2 -0
  285. package/dist/custom/overlay/hide-outside/marks.d.ts +19 -0
  286. package/dist/custom/overlay/hide-outside/marks.js +43 -0
  287. package/dist/custom/overlay/hide-outside/types.d.ts +17 -0
  288. package/dist/custom/overlay/index.d.ts +9 -0
  289. package/dist/custom/overlay/modal-focus/index.d.ts +1 -0
  290. package/dist/custom/overlay/modal-focus/modal-focus.plugin.d.ts +72 -0
  291. package/dist/custom/overlay/modal-focus/modal-focus.plugin.js +109 -0
  292. package/dist/custom/overlay/modal-ids/index.d.ts +1 -0
  293. package/dist/custom/overlay/modal-ids/modal-ids.plugin.d.ts +21 -0
  294. package/dist/custom/overlay/modal-ids/modal-ids.plugin.js +30 -0
  295. package/dist/custom/overlay/modal-layout/index.d.ts +2 -0
  296. package/dist/custom/overlay/modal-layout/modal-layout.plugin.d.ts +66 -0
  297. package/dist/custom/overlay/modal-layout/modal-layout.plugin.js +119 -0
  298. package/dist/custom/overlay/modal-layout/types.d.ts +13 -0
  299. package/dist/custom/overlay/modal-names/index.d.ts +1 -0
  300. package/dist/custom/overlay/modal-names/modal-names.plugin.d.ts +14 -0
  301. package/dist/custom/overlay/modal-names/modal-names.plugin.js +17 -0
  302. package/dist/custom/overlay/open-state.d.ts +12 -0
  303. package/dist/custom/overlay/open-state.js +42 -0
  304. package/dist/custom/overlay/scroll-lock/index.d.ts +2 -0
  305. package/dist/custom/overlay/scroll-lock/lock.d.ts +17 -0
  306. package/dist/custom/overlay/scroll-lock/lock.js +83 -0
  307. package/dist/custom/overlay/scroll-lock/scroll-lock.plugin.d.ts +78 -0
  308. package/dist/custom/overlay/scroll-lock/scroll-lock.plugin.js +134 -0
  309. package/dist/custom/overlay/scroll-lock/types.d.ts +17 -0
  310. package/dist/custom/overlay/swipe/index.d.ts +2 -0
  311. package/dist/custom/overlay/swipe/swipe.plugin.d.ts +150 -0
  312. package/dist/custom/overlay/swipe/swipe.plugin.js +432 -0
  313. package/dist/custom/overlay/swipe/types.d.ts +62 -0
  314. package/dist/custom/overlay/types.d.ts +40 -0
  315. package/dist/custom/pagination/current.d.ts +24 -0
  316. package/dist/custom/pagination/current.js +34 -0
  317. package/dist/custom/pagination/focus/focus.plugin.d.ts +57 -0
  318. package/dist/custom/pagination/focus/focus.plugin.js +106 -0
  319. package/dist/custom/pagination/focus/index.d.ts +2 -0
  320. package/dist/custom/pagination/focus/types.d.ts +8 -0
  321. package/dist/custom/pagination/index.d.ts +3 -0
  322. package/dist/custom/pagination/names/index.d.ts +1 -0
  323. package/dist/custom/pagination/names/names.plugin.d.ts +15 -0
  324. package/dist/custom/pagination/names/names.plugin.js +19 -0
  325. package/dist/custom/popover/focus/focus.plugin.d.ts +69 -0
  326. package/dist/custom/popover/focus/focus.plugin.js +107 -0
  327. package/dist/custom/popover/focus/index.d.ts +2 -0
  328. package/dist/custom/popover/focus/types.d.ts +2 -0
  329. package/dist/custom/popover/ids/ids.plugin.d.ts +18 -0
  330. package/dist/custom/popover/ids/ids.plugin.js +27 -0
  331. package/dist/custom/popover/ids/index.d.ts +1 -0
  332. package/dist/custom/popover/index.d.ts +4 -0
  333. package/dist/custom/popover/names/index.d.ts +1 -0
  334. package/dist/custom/popover/names/names.plugin.d.ts +7 -0
  335. package/dist/custom/popover/names/names.plugin.js +10 -0
  336. package/dist/custom/popover/pointer/index.d.ts +2 -0
  337. package/dist/custom/popover/pointer/pointer.plugin.d.ts +35 -0
  338. package/dist/custom/popover/pointer/pointer.plugin.js +65 -0
  339. package/dist/custom/popover/pointer/types.d.ts +2 -0
  340. package/dist/custom/radio-group/checked/checked.plugin.d.ts +45 -0
  341. package/dist/custom/radio-group/checked/checked.plugin.js +81 -0
  342. package/dist/custom/radio-group/checked/index.d.ts +1 -0
  343. package/dist/custom/radio-group/index.d.ts +3 -0
  344. package/dist/custom/radio-group/name/index.d.ts +1 -0
  345. package/dist/custom/radio-group/name/name.plugin.d.ts +21 -0
  346. package/dist/custom/radio-group/name/name.plugin.js +39 -0
  347. package/dist/custom/radio-group/stop.d.ts +17 -0
  348. package/dist/custom/radio-group/stop.js +30 -0
  349. package/dist/custom/rating/hover/hover.plugin.d.ts +36 -0
  350. package/dist/custom/rating/hover/hover.plugin.js +71 -0
  351. package/dist/custom/rating/hover/index.d.ts +2 -0
  352. package/dist/custom/rating/hover/types.d.ts +7 -0
  353. package/dist/custom/rating/index.d.ts +3 -0
  354. package/dist/custom/rating/names/index.d.ts +1 -0
  355. package/dist/custom/rating/names/names.plugin.d.ts +25 -0
  356. package/dist/custom/rating/names/names.plugin.js +45 -0
  357. package/dist/custom/rating/validity/index.d.ts +2 -0
  358. package/dist/custom/rating/validity/types.d.ts +7 -0
  359. package/dist/custom/rating/validity/validity.plugin.d.ts +48 -0
  360. package/dist/custom/rating/validity/validity.plugin.js +91 -0
  361. package/dist/custom/ready/index.d.ts +1 -0
  362. package/dist/custom/ready/ready.plugin.d.ts +14 -0
  363. package/dist/custom/ready/ready.plugin.js +28 -0
  364. package/dist/custom/scroller/index.d.ts +2 -0
  365. package/dist/custom/scroller/names/index.d.ts +1 -0
  366. package/dist/custom/scroller/names/names.plugin.d.ts +11 -0
  367. package/dist/custom/scroller/names/names.plugin.js +15 -0
  368. package/dist/custom/scroller/viewport/edges.d.ts +34 -0
  369. package/dist/custom/scroller/viewport/edges.js +29 -0
  370. package/dist/custom/scroller/viewport/focus.d.ts +39 -0
  371. package/dist/custom/scroller/viewport/focus.js +61 -0
  372. package/dist/custom/scroller/viewport/index.d.ts +6 -0
  373. package/dist/custom/scroller/viewport/stop.d.ts +24 -0
  374. package/dist/custom/scroller/viewport/stop.js +34 -0
  375. package/dist/custom/scroller/viewport/types.d.ts +31 -0
  376. package/dist/custom/scroller/viewport/viewport.plugin.d.ts +163 -0
  377. package/dist/custom/scroller/viewport/viewport.plugin.js +352 -0
  378. package/dist/custom/select/backspace/backspace.plugin.d.ts +50 -0
  379. package/dist/custom/select/backspace/backspace.plugin.js +125 -0
  380. package/dist/custom/select/backspace/index.d.ts +2 -0
  381. package/dist/custom/select/backspace/types.d.ts +2 -0
  382. package/dist/custom/select/editable/editable.plugin.d.ts +193 -0
  383. package/dist/custom/select/editable/editable.plugin.js +347 -0
  384. package/dist/custom/select/editable/index.d.ts +2 -0
  385. package/dist/custom/select/editable/types.d.ts +6 -0
  386. package/dist/custom/select/ids/ids.plugin.d.ts +22 -0
  387. package/dist/custom/select/ids/ids.plugin.js +31 -0
  388. package/dist/custom/select/ids/index.d.ts +1 -0
  389. package/dist/custom/select/index.d.ts +5 -0
  390. package/dist/custom/select/keyboard/index.d.ts +2 -0
  391. package/dist/custom/select/keyboard/keyboard.plugin.d.ts +125 -0
  392. package/dist/custom/select/keyboard/keyboard.plugin.js +205 -0
  393. package/dist/custom/select/keyboard/strategies/base.strategy.d.ts +37 -0
  394. package/dist/custom/select/keyboard/strategies/base.strategy.js +81 -0
  395. package/dist/custom/select/keyboard/strategies/editable.strategy.d.ts +16 -0
  396. package/dist/custom/select/keyboard/strategies/editable.strategy.js +20 -0
  397. package/dist/custom/select/keyboard/strategies/index.d.ts +4 -0
  398. package/dist/custom/select/keyboard/strategies/select-only.strategy.d.ts +13 -0
  399. package/dist/custom/select/keyboard/strategies/select-only.strategy.js +59 -0
  400. package/dist/custom/select/keyboard/strategies/types.d.ts +29 -0
  401. package/dist/custom/select/keyboard/types.d.ts +18 -0
  402. package/dist/custom/select/pointer/index.d.ts +2 -0
  403. package/dist/custom/select/pointer/pointer.plugin.d.ts +59 -0
  404. package/dist/custom/select/pointer/pointer.plugin.js +104 -0
  405. package/dist/custom/select/pointer/types.d.ts +2 -0
  406. package/dist/custom/skeleton/index.d.ts +2 -0
  407. package/dist/custom/skeleton/layout.plugin.d.ts +18 -0
  408. package/dist/custom/skeleton/layout.plugin.js +47 -0
  409. package/dist/custom/skeleton/types.d.ts +5 -0
  410. package/dist/custom/slide/direction.d.ts +30 -0
  411. package/dist/custom/slide/direction.js +75 -0
  412. package/dist/custom/slide/index.d.ts +4 -0
  413. package/dist/custom/slide/keyboard/index.d.ts +2 -0
  414. package/dist/custom/slide/keyboard/keyboard.plugin.d.ts +46 -0
  415. package/dist/custom/slide/keyboard/keyboard.plugin.js +106 -0
  416. package/dist/custom/slide/keyboard/types.d.ts +6 -0
  417. package/dist/custom/slide/parts.d.ts +7 -0
  418. package/dist/custom/slide/parts.js +26 -0
  419. package/dist/custom/slide/pointer/index.d.ts +2 -0
  420. package/dist/custom/slide/pointer/pointer.plugin.d.ts +100 -0
  421. package/dist/custom/slide/pointer/pointer.plugin.js +268 -0
  422. package/dist/custom/slide/pointer/strategies/base.strategy.d.ts +16 -0
  423. package/dist/custom/slide/pointer/strategies/base.strategy.js +23 -0
  424. package/dist/custom/slide/pointer/strategies/hold.strategy.d.ts +28 -0
  425. package/dist/custom/slide/pointer/strategies/hold.strategy.js +48 -0
  426. package/dist/custom/slide/pointer/strategies/index.d.ts +7 -0
  427. package/dist/custom/slide/pointer/strategies/magnet.strategy.d.ts +11 -0
  428. package/dist/custom/slide/pointer/strategies/magnet.strategy.js +17 -0
  429. package/dist/custom/slide/pointer/strategies/none.strategy.d.ts +7 -0
  430. package/dist/custom/slide/pointer/strategies/none.strategy.js +9 -0
  431. package/dist/custom/slide/pointer/strategies/plateau.strategy.d.ts +24 -0
  432. package/dist/custom/slide/pointer/strategies/plateau.strategy.js +81 -0
  433. package/dist/custom/slide/pointer/strategies/points.d.ts +16 -0
  434. package/dist/custom/slide/pointer/strategies/points.js +32 -0
  435. package/dist/custom/slide/pointer/strategies/settle.strategy.d.ts +11 -0
  436. package/dist/custom/slide/pointer/strategies/settle.strategy.js +17 -0
  437. package/dist/custom/slide/pointer/strategies/types.d.ts +57 -0
  438. package/dist/custom/slide/pointer/types.d.ts +46 -0
  439. package/dist/custom/slide/types.d.ts +14 -0
  440. package/dist/custom/table/column-ids/column-ids.plugin.d.ts +26 -0
  441. package/dist/custom/table/column-ids/column-ids.plugin.js +36 -0
  442. package/dist/custom/table/column-ids/index.d.ts +1 -0
  443. package/dist/custom/table/column-names/column-names.plugin.d.ts +18 -0
  444. package/dist/custom/table/column-names/column-names.plugin.js +24 -0
  445. package/dist/custom/table/column-names/index.d.ts +1 -0
  446. package/dist/custom/table/column-reorder/column-reorder.plugin.d.ts +169 -0
  447. package/dist/custom/table/column-reorder/column-reorder.plugin.js +465 -0
  448. package/dist/custom/table/column-reorder/index.d.ts +2 -0
  449. package/dist/custom/table/column-reorder/types.d.ts +81 -0
  450. package/dist/custom/table/column-resize/column-resize.plugin.d.ts +96 -0
  451. package/dist/custom/table/column-resize/column-resize.plugin.js +271 -0
  452. package/dist/custom/table/column-resize/index.d.ts +2 -0
  453. package/dist/custom/table/column-resize/types.d.ts +38 -0
  454. package/dist/custom/table/grid/grid.plugin.d.ts +119 -0
  455. package/dist/custom/table/grid/grid.plugin.js +356 -0
  456. package/dist/custom/table/grid/index.d.ts +2 -0
  457. package/dist/custom/table/grid/types.d.ts +22 -0
  458. package/dist/custom/table/index.d.ts +8 -0
  459. package/dist/custom/table/layout/index.d.ts +2 -0
  460. package/dist/custom/table/layout/layout.plugin.d.ts +52 -0
  461. package/dist/custom/table/layout/layout.plugin.js +122 -0
  462. package/dist/custom/table/layout/types.d.ts +7 -0
  463. package/dist/custom/table/names/index.d.ts +2 -0
  464. package/dist/custom/table/names/names.plugin.d.ts +18 -0
  465. package/dist/custom/table/names/names.plugin.js +31 -0
  466. package/dist/custom/table/names/types.d.ts +6 -0
  467. package/dist/custom/table/row-ids/index.d.ts +1 -0
  468. package/dist/custom/table/row-ids/row-ids.plugin.d.ts +21 -0
  469. package/dist/custom/table/row-ids/row-ids.plugin.js +28 -0
  470. package/dist/custom/tabs/active-tab/active-tab.plugin.d.ts +42 -0
  471. package/dist/custom/tabs/active-tab/active-tab.plugin.js +103 -0
  472. package/dist/custom/tabs/active-tab/index.d.ts +2 -0
  473. package/dist/custom/tabs/active-tab/types.d.ts +17 -0
  474. package/dist/custom/tabs/content-warn/content-warn.plugin.d.ts +21 -0
  475. package/dist/custom/tabs/content-warn/content-warn.plugin.js +41 -0
  476. package/dist/custom/tabs/content-warn/index.d.ts +1 -0
  477. package/dist/custom/tabs/index.d.ts +7 -0
  478. package/dist/custom/tabs/item-ids/index.d.ts +1 -0
  479. package/dist/custom/tabs/item-ids/item-ids.plugin.d.ts +60 -0
  480. package/dist/custom/tabs/item-ids/item-ids.plugin.js +94 -0
  481. package/dist/custom/tabs/item-names/index.d.ts +1 -0
  482. package/dist/custom/tabs/item-names/item-names.plugin.d.ts +17 -0
  483. package/dist/custom/tabs/item-names/item-names.plugin.js +23 -0
  484. package/dist/custom/tabs/keyboard/index.d.ts +2 -0
  485. package/dist/custom/tabs/keyboard/keyboard.plugin.d.ts +105 -0
  486. package/dist/custom/tabs/keyboard/keyboard.plugin.js +206 -0
  487. package/dist/custom/tabs/keyboard/types.d.ts +6 -0
  488. package/dist/custom/tabs/layout/index.d.ts +2 -0
  489. package/dist/custom/tabs/layout/layout.plugin.d.ts +37 -0
  490. package/dist/custom/tabs/layout/layout.plugin.js +81 -0
  491. package/dist/custom/tabs/layout/types.d.ts +4 -0
  492. package/dist/custom/tabs/parts.d.ts +15 -0
  493. package/dist/custom/tabs/parts.js +21 -0
  494. package/dist/custom/tabs/tab.d.ts +29 -0
  495. package/dist/custom/tabs/tab.js +44 -0
  496. package/dist/custom/tags/index.d.ts +4 -0
  497. package/dist/custom/tags/item-names/index.d.ts +1 -0
  498. package/dist/custom/tags/item-names/item-names.plugin.d.ts +12 -0
  499. package/dist/custom/tags/item-names/item-names.plugin.js +18 -0
  500. package/dist/custom/tags/keyboard/index.d.ts +2 -0
  501. package/dist/custom/tags/keyboard/keyboard.plugin.d.ts +133 -0
  502. package/dist/custom/tags/keyboard/keyboard.plugin.js +253 -0
  503. package/dist/custom/tags/keyboard/types.d.ts +6 -0
  504. package/dist/custom/tags/scroll/index.d.ts +2 -0
  505. package/dist/custom/tags/scroll/scroll.plugin.d.ts +68 -0
  506. package/dist/custom/tags/scroll/scroll.plugin.js +120 -0
  507. package/dist/custom/tags/scroll/types.d.ts +6 -0
  508. package/dist/custom/tags/tag.d.ts +41 -0
  509. package/dist/custom/tags/tag.js +66 -0
  510. package/dist/custom/textarea/autoresize/autoresize.plugin.d.ts +70 -0
  511. package/dist/custom/textarea/autoresize/autoresize.plugin.js +176 -0
  512. package/dist/custom/textarea/autoresize/index.d.ts +2 -0
  513. package/dist/custom/textarea/autoresize/types.d.ts +6 -0
  514. package/dist/custom/textarea/ids/ids.plugin.d.ts +26 -0
  515. package/dist/custom/textarea/ids/ids.plugin.js +44 -0
  516. package/dist/custom/textarea/ids/index.d.ts +1 -0
  517. package/dist/custom/textarea/index.d.ts +3 -0
  518. package/dist/custom/textarea/names/index.d.ts +2 -0
  519. package/dist/custom/textarea/names/names.plugin.d.ts +33 -0
  520. package/dist/custom/textarea/names/names.plugin.js +65 -0
  521. package/dist/custom/textarea/names/types.d.ts +8 -0
  522. package/dist/custom/toasts/cascade/cascade.plugin.d.ts +81 -0
  523. package/dist/custom/toasts/cascade/cascade.plugin.js +214 -0
  524. package/dist/custom/toasts/cascade/index.d.ts +2 -0
  525. package/dist/custom/toasts/cascade/types.d.ts +15 -0
  526. package/dist/custom/toasts/index.d.ts +7 -0
  527. package/dist/custom/toasts/item-names/index.d.ts +1 -0
  528. package/dist/custom/toasts/item-names/item-names.plugin.d.ts +12 -0
  529. package/dist/custom/toasts/item-names/item-names.plugin.js +18 -0
  530. package/dist/custom/toasts/keyboard/index.d.ts +2 -0
  531. package/dist/custom/toasts/keyboard/keyboard.plugin.d.ts +57 -0
  532. package/dist/custom/toasts/keyboard/keyboard.plugin.js +136 -0
  533. package/dist/custom/toasts/keyboard/types.d.ts +6 -0
  534. package/dist/custom/toasts/layout/index.d.ts +2 -0
  535. package/dist/custom/toasts/layout/layout.plugin.d.ts +23 -0
  536. package/dist/custom/toasts/layout/layout.plugin.js +39 -0
  537. package/dist/custom/toasts/layout/types.d.ts +5 -0
  538. package/dist/custom/toasts/names/index.d.ts +1 -0
  539. package/dist/custom/toasts/names/names.plugin.d.ts +10 -0
  540. package/dist/custom/toasts/names/names.plugin.js +13 -0
  541. package/dist/custom/toasts/removal/index.d.ts +2 -0
  542. package/dist/custom/toasts/removal/removal.plugin.d.ts +35 -0
  543. package/dist/custom/toasts/removal/removal.plugin.js +69 -0
  544. package/dist/custom/toasts/removal/types.d.ts +6 -0
  545. package/dist/custom/toasts/timer/index.d.ts +2 -0
  546. package/dist/custom/toasts/timer/timer.plugin.d.ts +71 -0
  547. package/dist/custom/toasts/timer/timer.plugin.js +213 -0
  548. package/dist/custom/toasts/timer/types.d.ts +15 -0
  549. package/dist/custom/tooltip/ids/ids.plugin.d.ts +22 -0
  550. package/dist/custom/tooltip/ids/ids.plugin.js +42 -0
  551. package/dist/custom/tooltip/ids/index.d.ts +1 -0
  552. package/dist/custom/tooltip/index.d.ts +2 -0
  553. package/dist/custom/tooltip/trigger/document-state.d.ts +42 -0
  554. package/dist/custom/tooltip/trigger/document-state.js +50 -0
  555. package/dist/custom/tooltip/trigger/index.d.ts +2 -0
  556. package/dist/custom/tooltip/trigger/trigger.plugin.d.ts +133 -0
  557. package/dist/custom/tooltip/trigger/trigger.plugin.js +271 -0
  558. package/dist/custom/tooltip/trigger/types.d.ts +20 -0
  559. package/dist/custom/virtual/index.d.ts +2 -0
  560. package/dist/custom/virtual/types.d.ts +6 -0
  561. package/dist/custom/virtual/virtual.plugin.d.ts +126 -0
  562. package/dist/custom/virtual/virtual.plugin.js +311 -0
  563. package/dist/index.d.ts +7 -0
  564. package/dist/index.js +149 -0
  565. package/dist/locale/index.d.ts +6 -0
  566. package/dist/locale/locale.d.ts +38 -0
  567. package/dist/locale/locale.js +93 -0
  568. package/dist/locale/locale.plugin.d.ts +26 -0
  569. package/dist/locale/locale.plugin.js +35 -0
  570. package/dist/locale/locales/ar.d.ts +5 -0
  571. package/dist/locale/locales/ar.js +59 -0
  572. package/dist/locale/locales/en.d.ts +7 -0
  573. package/dist/locale/locales/en.js +61 -0
  574. package/dist/locale/locales/es.d.ts +2 -0
  575. package/dist/locale/locales/es.js +56 -0
  576. package/dist/locale/locales/fr.d.ts +2 -0
  577. package/dist/locale/locales/fr.js +56 -0
  578. package/dist/locale/locales/index.d.ts +6 -0
  579. package/dist/locale/locales/ru.d.ts +2 -0
  580. package/dist/locale/locales/ru.js +56 -0
  581. package/dist/locale/locales/zh.d.ts +2 -0
  582. package/dist/locale/locales/zh.js +56 -0
  583. package/dist/locale/names.plugin.d.ts +32 -0
  584. package/dist/locale/names.plugin.js +39 -0
  585. package/dist/locale/source.class.d.ts +22 -0
  586. package/dist/locale/source.class.js +32 -0
  587. package/dist/locale/types.d.ts +197 -0
  588. package/dist/motion/index.d.ts +2 -0
  589. package/dist/motion/motion.d.ts +28 -0
  590. package/dist/motion/motion.js +67 -0
  591. package/dist/motion/types.d.ts +14 -0
  592. package/dist/utils/afterTransitions.d.ts +49 -0
  593. package/dist/utils/afterTransitions.js +79 -0
  594. package/dist/utils/focusFirst.d.ts +13 -0
  595. package/dist/utils/focusFirst.js +24 -0
  596. package/dist/utils/graceArea.d.ts +21 -0
  597. package/dist/utils/graceArea.js +66 -0
  598. package/dist/utils/index.d.ts +18 -0
  599. package/dist/utils/isAboveLayer.d.ts +14 -0
  600. package/dist/utils/isAboveLayer.js +24 -0
  601. package/dist/utils/isAppleTouch.d.ts +10 -0
  602. package/dist/utils/isAppleTouch.js +17 -0
  603. package/dist/utils/isFocusableElement.d.ts +8 -0
  604. package/dist/utils/isFocusableElement.js +13 -0
  605. package/dist/utils/isMeasurableElement.d.ts +11 -0
  606. package/dist/utils/isMeasurableElement.js +16 -0
  607. package/dist/utils/isPrintableKey.d.ts +7 -0
  608. package/dist/utils/isPrintableKey.js +12 -0
  609. package/dist/utils/layerOf.d.ts +12 -0
  610. package/dist/utils/layerOf.js +21 -0
  611. package/dist/utils/nearestShift.d.ts +19 -0
  612. package/dist/utils/nearestShift.js +58 -0
  613. package/dist/utils/positionOrigin.d.ts +34 -0
  614. package/dist/utils/positionOrigin.js +71 -0
  615. package/dist/utils/scrollParent.d.ts +12 -0
  616. package/dist/utils/scrollParent.js +23 -0
  617. package/dist/utils/scrollWindow.d.ts +27 -0
  618. package/dist/utils/scrollWindow.js +50 -0
  619. package/dist/utils/tabStops.d.ts +44 -0
  620. package/dist/utils/tabStops.js +102 -0
  621. package/dist/utils/tabStopsAfter.d.ts +10 -0
  622. package/dist/utils/tabStopsAfter.js +16 -0
  623. package/dist/utils/tabStopsBefore.d.ts +11 -0
  624. package/dist/utils/tabStopsBefore.js +17 -0
  625. package/dist/utils/toCssValue.d.ts +8 -0
  626. package/dist/utils/toCssValue.js +17 -0
  627. package/dist/utils/trapTab.d.ts +16 -0
  628. package/dist/utils/trapTab.js +36 -0
  629. package/dist/utils/types.d.ts +64 -0
  630. package/package.json +43 -4
@@ -0,0 +1,197 @@
1
+ import type { IListenable } from '../base/types';
2
+ /**
3
+ * Строки, которые библиотека рисует сама: имена кнопок без текста — закрытия,
4
+ * разворота, листания, очистки, сортировки, — полей, которым подпись неоткуда
5
+ * взять, и текст кнопок, которые она кладёт в свою разметку («OK» и «Отмена»
6
+ * в подвале панели DatePicker).
7
+ *
8
+ * Разделы — по компоненту, который читает строку. Имён, которые знает только
9
+ * приложение (подпись поля, имя индикатора выполнения), здесь нет: их задают
10
+ * пропсы компонента (`aria_label`, `thumbLabels`).
11
+ *
12
+ * Строки — шаблоны, а не функции: локаль — данные, и её грузят из JSON.
13
+ * Строка с именем части (`tabs.close`, `tags.close`, `field.clear`,
14
+ * `table.sort`) несёт место для имени — `{name}`: порядок слов у каждого
15
+ * языка свой, и склейка «слово + имя» навязала бы всем один (`formatName`).
16
+ */
17
+ export type TTranslations = {
18
+ /** Модальный слой — окно и выезжающая панель */
19
+ readonly modal: {
20
+ /** Имя кнопки закрытия */
21
+ readonly close: string;
22
+ };
23
+ /** Модальное окно */
24
+ readonly dialog: {
25
+ /** Имя кнопки разворота — одно на оба состояния: состояние сообщает `aria-pressed` */
26
+ readonly maximize: string;
27
+ };
28
+ /** Поповер */
29
+ readonly popover: {
30
+ /** Имя кнопки закрытия */
31
+ readonly close: string;
32
+ };
33
+ /** Табы */
34
+ readonly tabs: {
35
+ /** Имя кнопки закрытия таба — шаблон с текстом таба на месте `{name}` */
36
+ readonly close: string;
37
+ };
38
+ /** Теги */
39
+ readonly tags: {
40
+ /** Имя кнопки закрытия тега — шаблон с текстом тега на месте `{name}` */
41
+ readonly close: string;
42
+ };
43
+ /** Всплывающие уведомления */
44
+ readonly toasts: {
45
+ /**
46
+ * Имя региона с тостами — вместе с клавишей, которая ведёт к ним фокус
47
+ * (F8): так её объявляет скринридер, когда пользователь попадает в регион
48
+ */
49
+ readonly region: string;
50
+ /** Имя кнопки закрытия тоста — шаблон с текстом тоста на месте `{name}` */
51
+ readonly close: string;
52
+ };
53
+ /** Лента с кнопками листания */
54
+ readonly scroller: {
55
+ /** Имя кнопки «назад» */
56
+ readonly prev: string;
57
+ /** Имя кнопки «вперёд» */
58
+ readonly next: string;
59
+ };
60
+ /**
61
+ * Постраничная навигация. Своего имени у неё в локали нет: что листают —
62
+ * таблицу, ленту, результаты поиска, — знает только приложение, и имя
63
+ * ряду даёт оно (`aria_label`)
64
+ */
65
+ readonly pagination: {
66
+ /** Имя стрелки «назад» — на предыдущую страницу */
67
+ readonly prev: string;
68
+ /** Имя стрелки «вперёд» — на следующую страницу */
69
+ readonly next: string;
70
+ };
71
+ /** Поле ввода — текстовое, даты и числа */
72
+ readonly field: {
73
+ /** Имя кнопки очистки — шаблон с именем поля на месте `{name}` */
74
+ readonly clear: string;
75
+ };
76
+ /** Поле числа */
77
+ readonly numberInput: {
78
+ /** Имя кнопки шага «больше» — шаблон с именем поля на месте `{name}` */
79
+ readonly increment: string;
80
+ /** Имя кнопки шага «меньше» — шаблон с именем поля на месте `{name}` */
81
+ readonly decrement: string;
82
+ };
83
+ /** Таблица */
84
+ readonly table: {
85
+ /** Имя чекбокса «выбрать все» в шапке колонки выбора */
86
+ readonly selectAll: string;
87
+ /**
88
+ * Имя кнопки сортировки в заголовке колонки — шаблон с подписью колонки
89
+ * на месте `{name}`: текста у кнопки нет, в ней одна стрелка
90
+ */
91
+ readonly sort: string;
92
+ };
93
+ /** Календарь */
94
+ readonly calendar: {
95
+ /** Имя кнопки «предыдущий месяц» */
96
+ readonly prevMonth: string;
97
+ /** Имя кнопки «следующий месяц» */
98
+ readonly nextMonth: string;
99
+ /** Имя стрелки панели выбора месяца и года «предыдущий год» — на уровне месяцев */
100
+ readonly prevYear: string;
101
+ /** Имя стрелки «следующий год» — на уровне месяцев */
102
+ readonly nextYear: string;
103
+ /** Имя стрелки «предыдущие 12 лет» — на уровне лет */
104
+ readonly prevYears: string;
105
+ /** Имя стрелки «следующие 12 лет» — на уровне лет */
106
+ readonly nextYears: string;
107
+ };
108
+ /** Поле даты с календарём в панели */
109
+ readonly datePicker: {
110
+ /** Имя кнопки календаря — оно же имя панели, которую кнопка открывает */
111
+ readonly trigger: string;
112
+ /** Имя поля начала диапазона */
113
+ readonly start: string;
114
+ /** Имя поля конца диапазона */
115
+ readonly end: string;
116
+ /** Текст кнопки подвала панели, которая принимает выбор (`confirmable`) */
117
+ readonly confirm: string;
118
+ /** Текст кнопки подвала панели, которая закрывает её без выбора */
119
+ readonly cancel: string;
120
+ };
121
+ /** Оценка звёздами */
122
+ readonly rating: {
123
+ /**
124
+ * Значение для скринридера (`aria-valuetext`) — шаблон: оценка на месте
125
+ * `{value}`, наибольшая — на месте `{max}`. Без «звёзд»: значок оценки
126
+ * меняет слот, и звёздами он бывает не всегда
127
+ */
128
+ readonly value: string;
129
+ /**
130
+ * Ошибка обязательной оценки, которую не поставили, — сообщение
131
+ * браузера при отправке формы (`setCustomValidity`). Тоже без «звёзд»
132
+ */
133
+ readonly required: string;
134
+ };
135
+ /** Многострочное поле */
136
+ readonly textarea: {
137
+ /**
138
+ * Счётчик символов при пределе `maxlength` — шаблон: набрано на месте
139
+ * `{count}`, предел — на месте `{max}`. Без предела счётчик — одно
140
+ * число, и строки ему не нужно
141
+ */
142
+ readonly counter: string;
143
+ };
144
+ };
145
+ /**
146
+ * Локаль — язык и строки библиотеки одним значением.
147
+ *
148
+ * `tag` — тег BCP 47 для Intl: подписи дат, первый день недели, формат поля
149
+ * даты, формат и разбор поля числа, сравнение строк при сортировке таблицы,
150
+ * цифры номеров страниц пагинации. `translations` — строки, которые
151
+ * библиотека рисует сама. Одно значение, а не два: язык без строк
152
+ * давал бы китайские даты рядом с английскими кнопками.
153
+ *
154
+ * Готовые — шесть языков ООН (`enUS`, `ruRU`, `zhCN`, `frFR`, `esES`,
155
+ * `arEG`); любую другую приложение пишет само или собирает поверх готовой
156
+ * (`extendLocale`).
157
+ */
158
+ export type TLocale = {
159
+ readonly tag: string;
160
+ readonly translations: TTranslations;
161
+ };
162
+ /** Часть строк: любые разделы, в разделе — любые строки. */
163
+ export type TPartialTranslations = {
164
+ readonly [K in keyof TTranslations]?: Partial<TTranslations[K]>;
165
+ };
166
+ /** Правка локали для `extendLocale`: свой тег, свои строки — что задано. */
167
+ export type TLocalePatch = {
168
+ readonly tag?: string;
169
+ readonly translations?: TPartialTranslations;
170
+ };
171
+ /** События источника локали. */
172
+ export type TLocaleSourceEvents = {
173
+ /** change — локаль сменилась: новая уже в `locale` */
174
+ change: (locale: TLocale) => void;
175
+ };
176
+ /**
177
+ * Источник локали монтирования — то, что плагин видит в контексте
178
+ * (`IPluginContext.locale`): текущая локаль и её смена.
179
+ *
180
+ * Только чтение: локаль задаёт тот, кто источник создал, — провайдер адаптера
181
+ * для своего поддерева. Плагин читает её при установке и подписывается на
182
+ * смену.
183
+ */
184
+ export interface ILocaleSource {
185
+ readonly locale: TLocale;
186
+ readonly events: IListenable<TLocaleSourceEvents>;
187
+ }
188
+ /**
189
+ * Что плагину языка нужно от владельца: свойство `locale`.
190
+ *
191
+ * Структурный тип, а не класс: плагин стоит на календаре, поле даты,
192
+ * DatePicker, поле числа, таблице и пагинации, а общего у них только это
193
+ * свойство.
194
+ */
195
+ export interface ILocaleOwner {
196
+ locale: string;
197
+ }
@@ -0,0 +1,2 @@
1
+ export { smoothScrollBehavior, useMotion } from './motion';
2
+ export type { TMotionMode } from './types';
@@ -0,0 +1,28 @@
1
+ import type { TMotionMode } from './types';
2
+ /**
3
+ * Задать режим движения библиотеки — на всё приложение, как тему (`useTheme`)
4
+ * и пакет иконок (`useIcons`): зовут в точке входа.
5
+ *
6
+ * ```ts
7
+ * useMotion('full') // движение и тогда, когда система просит его убрать
8
+ * ```
9
+ *
10
+ * Режим пишется атрибутом `data-so-motion` на корень документа: `full` и
11
+ * `reduce` — как есть, `system` атрибут снимает. Сменить режим можно в любой
12
+ * момент: CSS видит атрибут сам, плагины читают его в момент операции.
13
+ *
14
+ * Без документа (серверная отрисовка) вызов ничего не делает. Серверной
15
+ * разметке, которой нужен свой режим до старта приложения, атрибут ставит
16
+ * само приложение — в шаблоне страницы: `<html data-so-motion="reduce">`.
17
+ */
18
+ export declare function useMotion(mode: TMotionMode): void;
19
+ /**
20
+ * Как прокручивать узел, когда просят плавно: плавно, если движение не
21
+ * убрано, иначе сразу.
22
+ *
23
+ * Плавная прокрутка — движение, и режим решает её здесь, а не плагин: без
24
+ * этой функции у каждого плагина был бы свой опрос среды, и режим приложения
25
+ * до него не доходил бы. Режим читается в момент прокрутки, поэтому подписки
26
+ * на его смену у плагинов нет.
27
+ */
28
+ export declare function smoothScrollBehavior(element: Element): ScrollBehavior;
@@ -0,0 +1,67 @@
1
+ //#region src/motion/motion.ts
2
+ /**
3
+ * Режим движения — атрибут на корне документа, и это единственный его
4
+ * источник: атрибут читают CSS темы (селектором) и плагины (`smoothScrollBehavior`
5
+ * ниже), копии режима в JS нет. Значения — `full` и `reduce`; нет атрибута —
6
+ * `system`. Без атрибута идут и серверная разметка, и кадры до старта
7
+ * приложения: и CSS, и плагины берут тогда настройку системы.
8
+ */
9
+ var ATTRIBUTE = "data-so-motion";
10
+ /** Медиазапрос настройки системы: пользователь просит меньше движения. */
11
+ var SYSTEM_REDUCE = "(prefers-reduced-motion: reduce)";
12
+ /**
13
+ * Режим, который приложение задало поверх системы, → убрано ли движение. Чего
14
+ * в таблице нет (атрибута нет вовсе), решает система.
15
+ */
16
+ var FORCED = /* @__PURE__ */ new Map([["full", false], ["reduce", true]]);
17
+ /**
18
+ * Задать режим движения библиотеки — на всё приложение, как тему (`useTheme`)
19
+ * и пакет иконок (`useIcons`): зовут в точке входа.
20
+ *
21
+ * ```ts
22
+ * useMotion('full') // движение и тогда, когда система просит его убрать
23
+ * ```
24
+ *
25
+ * Режим пишется атрибутом `data-so-motion` на корень документа: `full` и
26
+ * `reduce` — как есть, `system` атрибут снимает. Сменить режим можно в любой
27
+ * момент: CSS видит атрибут сам, плагины читают его в момент операции.
28
+ *
29
+ * Без документа (серверная отрисовка) вызов ничего не делает. Серверной
30
+ * разметке, которой нужен свой режим до старта приложения, атрибут ставит
31
+ * само приложение — в шаблоне страницы: `<html data-so-motion="reduce">`.
32
+ */
33
+ function useMotion(mode) {
34
+ if (typeof document === "undefined") return;
35
+ const root = document.documentElement;
36
+ if (mode === "system") root.removeAttribute(ATTRIBUTE);
37
+ else root.setAttribute(ATTRIBUTE, mode);
38
+ }
39
+ /**
40
+ * Убрано ли движение для узла: режим приложения на корне его документа, а без
41
+ * него — настройка системы у его окна. Документ и окно — узла, а не
42
+ * глобальные: компонент живёт и в `iframe`.
43
+ *
44
+ * Среда без `matchMedia` (jsdom) о движении не просит.
45
+ */
46
+ function isMotionReduced(element) {
47
+ const { documentElement, defaultView } = element.ownerDocument;
48
+ return FORCED.get(documentElement.getAttribute(ATTRIBUTE) ?? "") ?? systemReduces(defaultView);
49
+ }
50
+ /** Просит ли система окна меньше движения. */
51
+ function systemReduces(view) {
52
+ return typeof view?.matchMedia === "function" && view.matchMedia(SYSTEM_REDUCE).matches;
53
+ }
54
+ /**
55
+ * Как прокручивать узел, когда просят плавно: плавно, если движение не
56
+ * убрано, иначе сразу.
57
+ *
58
+ * Плавная прокрутка — движение, и режим решает её здесь, а не плагин: без
59
+ * этой функции у каждого плагина был бы свой опрос среды, и режим приложения
60
+ * до него не доходил бы. Режим читается в момент прокрутки, поэтому подписки
61
+ * на его смену у плагинов нет.
62
+ */
63
+ function smoothScrollBehavior(element) {
64
+ return isMotionReduced(element) ? "instant" : "smooth";
65
+ }
66
+ //#endregion
67
+ export { smoothScrollBehavior, useMotion };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Режим движения библиотеки — один на всё приложение (`useMotion`).
3
+ *
4
+ * - `system` — как просит система: настройка «меньше движения» у
5
+ * пользователя (`prefers-reduced-motion`). Так и без вызова `useMotion` —
6
+ * это режим по умолчанию;
7
+ * - `full` — движение всегда, о чём бы система ни просила: приложение решило,
8
+ * что движение ему нужно;
9
+ * - `reduce` — без движения всегда.
10
+ *
11
+ * Движение — смена места, размера, поворота и формы во времени и плавная
12
+ * прокрутка. Цвет, прозрачность и тень — не движение: их режим не трогает.
13
+ */
14
+ export type TMotionMode = 'system' | 'full' | 'reduce';
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Позвать `done`, когда узел доиграет CSS-переходы, которые идут у него
3
+ * кадром позже. Отдаёт отмену: после неё `done` не позовётся, даже если
4
+ * ожидание кончится потом.
5
+ *
6
+ * Это ожидание конца перехода закрытия. Закрытая панель ещё на экране: тема
7
+ * ведёт её переходом — окно гаснет, выезжающая панель уезжает к краю, — а
8
+ * `display: none` приходит только в конце
9
+ * (`transition-behavior: allow-discrete`). Что меняет вид исчезающей панели,
10
+ * ждёт, пока она доиграет:
11
+ *
12
+ * - замок прокрутки (`TScrollLockPlugin`) отдаёт свой счёт, когда корень
13
+ * доиграл переходы закрытия: вернись полоса прокрутки сразу, область
14
+ * просмотра сузилась бы, и панель `position: fixed` переехала бы вбок, пока
15
+ * исчезает;
16
+ * - ввод Select (`TEditablePlugin`) снимает отбор, когда догасла панель:
17
+ * снятый сразу, он показал бы в гаснущей панели весь список;
18
+ * - привязка к якорю (`TAnchorPlugin`) перестаёт следить за полем, когда
19
+ * корень панели доиграл переходы закрытия: снятое сразу, слежение оставило
20
+ * бы гаснущую панель на месте, пока поле уезжает с прокруткой;
21
+ * - закрытый тост (`TToastsRemovalPlugin`) уходит из коллекции, когда его
22
+ * корень догас: удалённый сразу, он пропал бы из документа посреди
23
+ * исчезания.
24
+ *
25
+ * Живёт в общих утилитах, а не у одного из них: вторая копия ожидания
26
+ * разошлась бы с первой. Чисел темы здесь нет: сколько длится переход, знает
27
+ * сам переход.
28
+ *
29
+ * **Кадр.** Открытость меняется раньше разметки: когда плагин узнаёт о
30
+ * закрытии, адаптер её ещё не перерисовал, и переходов закрытия нет. Кадром
31
+ * позже разметка уже закрыта — на этом же допущении стоят фокус в панели у
32
+ * `TOverlayFocusPlugin` и сброс сдвига у `TSwipePlugin`. Отрисовки кадра
33
+ * ждать не нужно: `getAnimations()` сам применяет отложенные стили, и переход,
34
+ * который начал рендер, виден сразу.
35
+ *
36
+ * **Какие переходы.** Только свои (`getAnimations()` без `subtree`): переходы
37
+ * детей — цвет кнопки под указателем и подобное — исчезанию не принадлежат. И
38
+ * только `CSSTransition`: у перехода конец есть всегда, а бесконечная
39
+ * CSS-анимация узла держала бы ожидание вечно. Класс берётся из окна узла, а не
40
+ * глобальный: компонент живёт и в `iframe`, и объекты его анимаций — из
41
+ * чужого окна.
42
+ *
43
+ * **Конец** — `finished` у каждого перехода. Отменённый переход (`finished`
44
+ * отклонён с `AbortError`: узел снят, переход перебит обратным) — тоже конец,
45
+ * и отклонение обработано здесь же: необработанное ушло бы в
46
+ * `unhandledrejection`. Переходов нет или нет Web Animations вовсе (jsdom) —
47
+ * `done` зовётся в том же кадре.
48
+ */
49
+ export declare function afterTransitions(element: Element, done: () => void): () => void;
@@ -0,0 +1,79 @@
1
+ //#region src/utils/afterTransitions.ts
2
+ /**
3
+ * Позвать `done`, когда узел доиграет CSS-переходы, которые идут у него
4
+ * кадром позже. Отдаёт отмену: после неё `done` не позовётся, даже если
5
+ * ожидание кончится потом.
6
+ *
7
+ * Это ожидание конца перехода закрытия. Закрытая панель ещё на экране: тема
8
+ * ведёт её переходом — окно гаснет, выезжающая панель уезжает к краю, — а
9
+ * `display: none` приходит только в конце
10
+ * (`transition-behavior: allow-discrete`). Что меняет вид исчезающей панели,
11
+ * ждёт, пока она доиграет:
12
+ *
13
+ * - замок прокрутки (`TScrollLockPlugin`) отдаёт свой счёт, когда корень
14
+ * доиграл переходы закрытия: вернись полоса прокрутки сразу, область
15
+ * просмотра сузилась бы, и панель `position: fixed` переехала бы вбок, пока
16
+ * исчезает;
17
+ * - ввод Select (`TEditablePlugin`) снимает отбор, когда догасла панель:
18
+ * снятый сразу, он показал бы в гаснущей панели весь список;
19
+ * - привязка к якорю (`TAnchorPlugin`) перестаёт следить за полем, когда
20
+ * корень панели доиграл переходы закрытия: снятое сразу, слежение оставило
21
+ * бы гаснущую панель на месте, пока поле уезжает с прокруткой;
22
+ * - закрытый тост (`TToastsRemovalPlugin`) уходит из коллекции, когда его
23
+ * корень догас: удалённый сразу, он пропал бы из документа посреди
24
+ * исчезания.
25
+ *
26
+ * Живёт в общих утилитах, а не у одного из них: вторая копия ожидания
27
+ * разошлась бы с первой. Чисел темы здесь нет: сколько длится переход, знает
28
+ * сам переход.
29
+ *
30
+ * **Кадр.** Открытость меняется раньше разметки: когда плагин узнаёт о
31
+ * закрытии, адаптер её ещё не перерисовал, и переходов закрытия нет. Кадром
32
+ * позже разметка уже закрыта — на этом же допущении стоят фокус в панели у
33
+ * `TOverlayFocusPlugin` и сброс сдвига у `TSwipePlugin`. Отрисовки кадра
34
+ * ждать не нужно: `getAnimations()` сам применяет отложенные стили, и переход,
35
+ * который начал рендер, виден сразу.
36
+ *
37
+ * **Какие переходы.** Только свои (`getAnimations()` без `subtree`): переходы
38
+ * детей — цвет кнопки под указателем и подобное — исчезанию не принадлежат. И
39
+ * только `CSSTransition`: у перехода конец есть всегда, а бесконечная
40
+ * CSS-анимация узла держала бы ожидание вечно. Класс берётся из окна узла, а не
41
+ * глобальный: компонент живёт и в `iframe`, и объекты его анимаций — из
42
+ * чужого окна.
43
+ *
44
+ * **Конец** — `finished` у каждого перехода. Отменённый переход (`finished`
45
+ * отклонён с `AbortError`: узел снят, переход перебит обратным) — тоже конец,
46
+ * и отклонение обработано здесь же: необработанное ушло бы в
47
+ * `unhandledrejection`. Переходов нет или нет Web Animations вовсе (jsdom) —
48
+ * `done` зовётся в том же кадре.
49
+ */
50
+ function afterTransitions(element, done) {
51
+ let cancelled = false;
52
+ const finish = () => {
53
+ if (!cancelled) done();
54
+ };
55
+ const frame = requestAnimationFrame(() => {
56
+ const transitions = transitionsOf(element);
57
+ if (transitions.length === 0) {
58
+ finish();
59
+ return;
60
+ }
61
+ Promise.all(transitions.map(ended)).then(finish);
62
+ });
63
+ return () => {
64
+ cancelled = true;
65
+ cancelAnimationFrame(frame);
66
+ };
67
+ }
68
+ /** Идущие CSS-переходы самого узла. */
69
+ function transitionsOf(element) {
70
+ const Transition = element.ownerDocument.defaultView?.CSSTransition;
71
+ if (typeof Transition !== "function" || typeof element.getAnimations !== "function") return [];
72
+ return element.getAnimations().filter((animation) => animation instanceof Transition);
73
+ }
74
+ /** Переход доиграл или его отменили — для ожидания это одно и то же. */
75
+ function ended(transition) {
76
+ return transition.finished.catch(() => void 0);
77
+ }
78
+ //#endregion
79
+ export { afterTransitions };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Ставит фокус на первого кандидата, который его принял, и говорит, нашёлся
3
+ * ли такой. Скрытый, выключенный или отсоединённый элемент фокус не
4
+ * принимает — его пропускают.
5
+ *
6
+ * Живёт в общих утилитах, а не у модели фокуса Popover: кандидатов перебирает
7
+ * весь слой оверлея — база модели фокуса и обе её стратегии, немодальная и
8
+ * модальная. Раскладку перебор не проверяет (в jsdom её нет), решает сам
9
+ * браузер — потому кандидаты и перебираются по очереди.
10
+ *
11
+ * `options` уходят в `focus()` каждого кандидата как есть.
12
+ */
13
+ export declare function focusFirst(candidates: readonly Element[], options?: FocusOptions): boolean;
@@ -0,0 +1,24 @@
1
+ import { isFocusableElement } from "./isFocusableElement.js";
2
+ //#region src/utils/focusFirst.ts
3
+ /**
4
+ * Ставит фокус на первого кандидата, который его принял, и говорит, нашёлся
5
+ * ли такой. Скрытый, выключенный или отсоединённый элемент фокус не
6
+ * принимает — его пропускают.
7
+ *
8
+ * Живёт в общих утилитах, а не у модели фокуса Popover: кандидатов перебирает
9
+ * весь слой оверлея — база модели фокуса и обе её стратегии, немодальная и
10
+ * модальная. Раскладку перебор не проверяет (в jsdom её нет), решает сам
11
+ * браузер — потому кандидаты и перебираются по очереди.
12
+ *
13
+ * `options` уходят в `focus()` каждого кандидата как есть.
14
+ */
15
+ function focusFirst(candidates, options) {
16
+ for (const candidate of candidates) {
17
+ if (!isFocusableElement(candidate)) continue;
18
+ candidate.focus(options);
19
+ if (candidate.ownerDocument.activeElement === candidate) return true;
20
+ }
21
+ return false;
22
+ }
23
+ //#endregion
24
+ export { focusFirst };
@@ -0,0 +1,21 @@
1
+ import type { TPoint } from './positionOrigin';
2
+ import type { TBox } from './types';
3
+ /**
4
+ * Путь указателя к открытой панели — многоугольник от точки, где указатель
5
+ * ушёл со строки, к ближнему краю панели и вокруг неё самой (Radix pointer
6
+ * grace area, Floating UI `safePolygon`).
7
+ *
8
+ * Строка, у которой открыта панель сбоку, — пункт с подменю: к панели
9
+ * указатель идёт наискосок и задевает соседние пункты. Пока он внутри пути,
10
+ * пункты по дороге не перехватывают подсветку, и подменю не закрывается.
11
+ *
12
+ * Сторону пути решает панель, а не направление письма: она встаёт у конца
13
+ * строки, у её начала, если у конца нет места, а в RTL наоборот, — и путь
14
+ * всегда ведёт туда, где она стоит.
15
+ */
16
+ export declare function graceArea(exit: TPoint, panel: TBox): TPoint[];
17
+ /**
18
+ * Внутри ли точка многоугольника — по чётности пересечений луча вправо с его
19
+ * сторонами. Вершины — по порядку обхода, в любую сторону.
20
+ */
21
+ export declare function isPointInPolygon(point: TPoint, polygon: readonly TPoint[]): boolean;
@@ -0,0 +1,66 @@
1
+ //#region src/utils/graceArea.ts
2
+ /**
3
+ * На сколько точка ухода сдвигается назад, к строке, px: указатель, ушедший со
4
+ * строки, стоит уже за её краем, и без запаса граница пути проходила бы через
5
+ * саму точку — первый же ход вдоль неё считался бы уходом с пути.
6
+ */
7
+ var BLEED = 5;
8
+ /**
9
+ * Путь указателя к открытой панели — многоугольник от точки, где указатель
10
+ * ушёл со строки, к ближнему краю панели и вокруг неё самой (Radix pointer
11
+ * grace area, Floating UI `safePolygon`).
12
+ *
13
+ * Строка, у которой открыта панель сбоку, — пункт с подменю: к панели
14
+ * указатель идёт наискосок и задевает соседние пункты. Пока он внутри пути,
15
+ * пункты по дороге не перехватывают подсветку, и подменю не закрывается.
16
+ *
17
+ * Сторону пути решает панель, а не направление письма: она встаёт у конца
18
+ * строки, у её начала, если у конца нет места, а в RTL наоборот, — и путь
19
+ * всегда ведёт туда, где она стоит.
20
+ */
21
+ function graceArea(exit, panel) {
22
+ const toRight = panel.left + panel.width / 2 > exit.x;
23
+ const near = toRight ? panel.left : panel.left + panel.width;
24
+ const far = toRight ? panel.left + panel.width : panel.left;
25
+ const bottom = panel.top + panel.height;
26
+ return [
27
+ {
28
+ x: exit.x + (toRight ? -5 : BLEED),
29
+ y: exit.y
30
+ },
31
+ {
32
+ x: near,
33
+ y: panel.top
34
+ },
35
+ {
36
+ x: far,
37
+ y: panel.top
38
+ },
39
+ {
40
+ x: far,
41
+ y: bottom
42
+ },
43
+ {
44
+ x: near,
45
+ y: bottom
46
+ }
47
+ ];
48
+ }
49
+ /**
50
+ * Внутри ли точка многоугольника — по чётности пересечений луча вправо с его
51
+ * сторонами. Вершины — по порядку обхода, в любую сторону.
52
+ */
53
+ function isPointInPolygon(point, polygon) {
54
+ let inside = false;
55
+ for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
56
+ const a = polygon[i];
57
+ const b = polygon[j];
58
+ if (a.y > point.y !== b.y > point.y) {
59
+ const cross = a.x + (point.y - a.y) * (b.x - a.x) / (b.y - a.y);
60
+ if (point.x < cross) inside = !inside;
61
+ }
62
+ }
63
+ return inside;
64
+ }
65
+ //#endregion
66
+ export { graceArea, isPointInPolygon };
@@ -0,0 +1,18 @@
1
+ export { toCssValue } from './toCssValue';
2
+ export { isMeasurableElement } from './isMeasurableElement';
3
+ export { isFocusableElement } from './isFocusableElement';
4
+ export { isAppleTouch } from './isAppleTouch';
5
+ export { tabStops, closestControl, closestTabStop } from './tabStops';
6
+ export { tabStopsAfter } from './tabStopsAfter';
7
+ export { tabStopsBefore } from './tabStopsBefore';
8
+ export { focusFirst } from './focusFirst';
9
+ export { isPrintableKey } from './isPrintableKey';
10
+ export { trapTab } from './trapTab';
11
+ export { isAboveLayer } from './isAboveLayer';
12
+ export { nearestShift } from './nearestShift';
13
+ export { scrollWindowOf, itemOf } from './scrollWindow';
14
+ export { afterTransitions } from './afterTransitions';
15
+ export { isScrollable, scrollParentOf, type TScrollAxis } from './scrollParent';
16
+ export { graceArea, isPointInPolygon } from './graceArea';
17
+ export type { IDomEventTarget, TBox, TInlineSpan, TNearestShiftOptions } from './types';
18
+ export { positionOriginOf, isPinnedToViewport, type TPoint, type TPositionStrategy, } from './positionOrigin';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Лежит ли узел в слое выше панели — в панели, открытой поверх неё.
3
+ *
4
+ * Слой узла — ближайший предок с `data-layer`, сам узел тоже в счёт: панели
5
+ * лежат в `body` соседями и друг в друга не вложены. Узел без слоя — не выше,
6
+ * и у панели без слоя выше не лежит ничего: сравнивать не с чем.
7
+ *
8
+ * Правило одно на весь слой оверлея. По нему `TDismissPlugin` считает
9
+ * нажатие в список Select, открытый из поповера, нажатием внутри, а
10
+ * `THideOutsidePlugin` оставляет этот список доступным скринридеру, когда
11
+ * прячет фон модального окна. Два правила разошлись бы: панель, в которую
12
+ * можно нажать, оказалась бы немой.
13
+ */
14
+ export declare function isAboveLayer(node: Element, panel: Element | null): boolean;
@@ -0,0 +1,24 @@
1
+ import { layerOf } from "./layerOf.js";
2
+ import { FRAME_LAYER_ATTRIBUTE } from "@soxa-ui/core";
3
+ //#region src/utils/isAboveLayer.ts
4
+ /**
5
+ * Лежит ли узел в слое выше панели — в панели, открытой поверх неё.
6
+ *
7
+ * Слой узла — ближайший предок с `data-layer`, сам узел тоже в счёт: панели
8
+ * лежат в `body` соседями и друг в друга не вложены. Узел без слоя — не выше,
9
+ * и у панели без слоя выше не лежит ничего: сравнивать не с чем.
10
+ *
11
+ * Правило одно на весь слой оверлея. По нему `TDismissPlugin` считает
12
+ * нажатие в список Select, открытый из поповера, нажатием внутри, а
13
+ * `THideOutsidePlugin` оставляет этот список доступным скринридеру, когда
14
+ * прячет фон модального окна. Два правила разошлись бы: панель, в которую
15
+ * можно нажать, оказалась бы немой.
16
+ */
17
+ function isAboveLayer(node, panel) {
18
+ const layer = layerOf(node.closest(`[${FRAME_LAYER_ATTRIBUTE}]`));
19
+ if (layer === null) return false;
20
+ const own = layerOf(panel);
21
+ return own !== null && layer > own;
22
+ }
23
+ //#endregion
24
+ export { isAboveLayer };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Сенсорное устройство Apple — iPhone, iPod или iPad. iPadOS называет себя
3
+ * `MacIntel`, как Mac, и отличает его сенсорный экран: у Mac точек касания нет.
4
+ *
5
+ * Общее у полей, которым VoiceOver на iOS не даёт счётчик (`spinbutton`): там
6
+ * он его не фокусирует, и поле даты и поле числа отдают роль `textbox`.
7
+ * Устройство узнают у документа узла, а не у `globalThis`: поле живёт и в
8
+ * iframe.
9
+ */
10
+ export declare function isAppleTouch(navigator: Navigator | undefined): boolean;