@dxtmisha/constructor 0.39.7 → 0.52.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 (514) hide show
  1. package/ai-types.txt +4901 -284
  2. package/dist/ActionsInclude-BzyGXlK7.js +23 -0
  3. package/dist/AriaStaticInclude-CS1hPGyK.js +89 -0
  4. package/dist/ArrowInclude-BM_RP5vO.js +14 -0
  5. package/dist/BadgeInclude-DISlNqBJ.js +17 -0
  6. package/dist/BarsInclude-rBLacb0J.js +35 -0
  7. package/dist/BlockDesign-DkbPo-Ey.js +106 -0
  8. package/dist/ButtonDesign-DTihOCBe.js +87 -0
  9. package/dist/ButtonInclude-Bq7DNI-R.js +23 -0
  10. package/dist/CaptionInclude-CunHUsec.js +41 -0
  11. package/dist/DescriptionInclude-B_Xf_j3l.js +36 -0
  12. package/dist/EnabledInclude-CkD_lxMY.js +11 -0
  13. package/dist/EventClickInclude-6I8kuFc9.js +63 -0
  14. package/dist/FieldCounterInclude-l1o0Bm7V.js +22 -0
  15. package/dist/FieldEventInclude-DLX__9aJ.js +257 -0
  16. package/dist/FieldInclude-DCvNorOt.js +87 -0
  17. package/dist/FieldInputCheckInclude-czZ02ymY.js +170 -0
  18. package/dist/FieldLabelInclude-BA5H3kib.js +27 -0
  19. package/dist/FieldMatchInclude-CA716pa4.js +100 -0
  20. package/dist/FieldMessageInclude-6cxMqgIx.js +27 -0
  21. package/dist/HorizontalScrollInclude-BN6p9jjq.js +30 -0
  22. package/dist/IconInclude-BhzGfa3o.js +44 -0
  23. package/dist/IconTrailingInclude-BwoB_AQn.js +23 -0
  24. package/dist/ImageInclude-CP-Q4R20.js +18 -0
  25. package/dist/LabelHighlightInclude-DC9qNAR-.js +30 -0
  26. package/dist/LabelInclude-DoZ7EUYO.js +56 -0
  27. package/dist/LabelNumberInclude-VVGMvwYq.js +15 -0
  28. package/dist/ListGroupOpen-C6J8d4SM.js +12 -0
  29. package/dist/MaskInclude-DuE6XcDZ.js +48 -0
  30. package/dist/MenuInclude-BT27rmFW.js +48 -0
  31. package/dist/ModalDesignAbstract-BaVdtb1N.js +63 -0
  32. package/dist/ModelInclude-D8LkrhPp.js +32 -0
  33. package/dist/ModelValueInclude-CQDkIoal.js +20 -0
  34. package/dist/MotionAxisInclude-DO4t3_lZ.js +18 -0
  35. package/dist/MotionTransformClassesInclude-BN-T4YKS.js +91 -0
  36. package/dist/MotionTransformInclude-CFVVig1F.js +52 -0
  37. package/dist/Plugin-cWn0HZcf.js +205 -0
  38. package/dist/ProgressInclude-BnPBYwJg.js +15 -0
  39. package/dist/RippleInclude-BlC1h0Ya.js +10 -0
  40. package/dist/ScrollToXInclude-yt1sAUrP.js +15 -0
  41. package/dist/ScrollbarInclude-B4_ZIqkW.js +55 -0
  42. package/dist/SkeletonInclude-D8on8xmw.js +39 -0
  43. package/dist/SuffixInclude-VNq8SwAI.js +67 -0
  44. package/dist/TabIndexInclude-DLSfl7-6.js +88 -0
  45. package/dist/TabsNavigationInclude-DU9Nb7hG.js +17 -0
  46. package/dist/TextInclude-OwyVCAbS.js +90 -0
  47. package/dist/TooltipInclude-3iLdbNcH.js +27 -0
  48. package/dist/TouchEventInclude-By_ChOIe.js +84 -0
  49. package/dist/WindowClassesInclude-zm-ITw5d.js +89 -0
  50. package/dist/WindowEsc-vBFI8pVr.js +28 -0
  51. package/dist/WindowInclude-GF4aSfrJ.js +66 -0
  52. package/dist/accordion.js +76 -193
  53. package/dist/actionSheet.js +61 -137
  54. package/dist/actions.js +59 -192
  55. package/dist/anchor.js +134 -360
  56. package/dist/arrow.js +279 -664
  57. package/dist/badge.js +47 -140
  58. package/dist/bars.js +120 -365
  59. package/dist/block.js +2 -10
  60. package/dist/button.js +3 -62
  61. package/dist/cell.js +117 -281
  62. package/dist/checkbox.js +112 -0
  63. package/dist/chip.js +24 -81
  64. package/dist/chipGroup.js +48 -163
  65. package/dist/classes/CaptionInclude.d.ts +4 -4
  66. package/dist/classes/EventClickInclude.d.ts +17 -1
  67. package/dist/classes/Field/FieldAttributesInclude.d.ts +2 -0
  68. package/dist/classes/Field/FieldEventInclude.d.ts +6 -6
  69. package/dist/classes/Plugin/PluginCode.d.ts +0 -8
  70. package/dist/classes/ScrollToXInclude.d.ts +35 -0
  71. package/dist/constructors/Accordion/Accordion.d.ts +9 -1
  72. package/dist/constructors/Accordion/props.d.ts +6 -6
  73. package/dist/constructors/Accordion/types.d.ts +3 -4
  74. package/dist/constructors/ActionSheet/ActionSheet.d.ts +19 -2
  75. package/dist/constructors/ActionSheet/props.d.ts +2 -0
  76. package/dist/constructors/Actions/Actions.d.ts +5 -2
  77. package/dist/constructors/Actions/basicTypes.d.ts +3 -0
  78. package/dist/constructors/Actions/props.d.ts +4 -0
  79. package/dist/constructors/Actions/types.d.ts +2 -0
  80. package/dist/constructors/Anchor/Anchor.d.ts +17 -8
  81. package/dist/constructors/Anchor/basicTypes.d.ts +4 -0
  82. package/dist/constructors/Anchor/index.d.ts +4 -0
  83. package/dist/constructors/Anchor/props.d.ts +10 -0
  84. package/dist/constructors/Anchor/types.d.ts +1 -0
  85. package/dist/constructors/Arrow/Arrow.d.ts +13 -6
  86. package/dist/constructors/Arrow/basicTypes.d.ts +9 -0
  87. package/dist/constructors/Arrow/index.d.ts +5 -0
  88. package/dist/constructors/Arrow/props.d.ts +3 -0
  89. package/dist/constructors/Arrow/types.d.ts +1 -0
  90. package/dist/constructors/Badge/Badge.d.ts +7 -3
  91. package/dist/constructors/Badge/basicTypes.d.ts +11 -0
  92. package/dist/constructors/Badge/index.d.ts +1 -0
  93. package/dist/constructors/Badge/props.d.ts +1 -0
  94. package/dist/constructors/Bars/Bars.d.ts +21 -10
  95. package/dist/constructors/Bars/basicTypes.d.ts +4 -0
  96. package/dist/constructors/Bars/index.d.ts +1 -0
  97. package/dist/constructors/Bars/props.d.ts +14 -0
  98. package/dist/constructors/Bars/types.d.ts +4 -0
  99. package/dist/constructors/Block/Block.d.ts +11 -5
  100. package/dist/constructors/Block/props.d.ts +3 -0
  101. package/dist/constructors/Button/Button.d.ts +17 -8
  102. package/dist/constructors/Button/ButtonInclude.d.ts +6 -4
  103. package/dist/constructors/Button/basicTypes.d.ts +17 -0
  104. package/dist/constructors/Button/props.d.ts +2 -0
  105. package/dist/constructors/Button/types.d.ts +2 -2
  106. package/dist/constructors/Cell/Cell.d.ts +21 -10
  107. package/dist/constructors/Cell/CellDesign.d.ts +7 -5
  108. package/dist/constructors/Cell/basicTypes.d.ts +3 -1
  109. package/dist/constructors/Cell/props.d.ts +4 -0
  110. package/dist/constructors/Cell/types.d.ts +4 -2
  111. package/dist/constructors/Checkbox/Checkbox.d.ts +90 -0
  112. package/dist/constructors/Checkbox/CheckboxDesign.d.ts +73 -0
  113. package/dist/constructors/Checkbox/CheckboxIcon.d.ts +33 -0
  114. package/dist/constructors/Checkbox/basicTypes.d.ts +1 -0
  115. package/dist/constructors/Checkbox/index.d.ts +6 -0
  116. package/dist/constructors/Checkbox/props.d.ts +44 -0
  117. package/dist/constructors/Checkbox/types.d.ts +49 -0
  118. package/dist/constructors/Chip/basicTypes.d.ts +10 -0
  119. package/dist/constructors/ChipGroup/ChipGroup.d.ts +9 -4
  120. package/dist/constructors/ChipGroup/basicTypes.d.ts +3 -0
  121. package/dist/constructors/ChipGroup/props.d.ts +10 -0
  122. package/dist/constructors/ChipGroup/types.d.ts +1 -0
  123. package/dist/constructors/Dialog/Dialog.d.ts +31 -3
  124. package/dist/constructors/Dialog/props.d.ts +11 -0
  125. package/dist/constructors/Dialog/types.d.ts +2 -0
  126. package/dist/constructors/Dummy/Dummy.d.ts +29 -0
  127. package/dist/constructors/Dummy/DummyDesign.d.ts +43 -0
  128. package/dist/constructors/Dummy/basicTypes.d.ts +1 -0
  129. package/dist/constructors/Dummy/index.d.ts +5 -0
  130. package/dist/constructors/Dummy/props.d.ts +15 -0
  131. package/dist/constructors/Dummy/types.d.ts +37 -0
  132. package/dist/constructors/Field/Field.d.ts +29 -14
  133. package/dist/constructors/Field/FieldSize.d.ts +2 -1
  134. package/dist/constructors/Field/basicTypes.d.ts +15 -2
  135. package/dist/constructors/Field/index.d.ts +3 -0
  136. package/dist/constructors/Field/props.d.ts +12 -0
  137. package/dist/constructors/Field/types.d.ts +3 -0
  138. package/dist/constructors/FieldCounter/FieldCounter.d.ts +5 -2
  139. package/dist/constructors/FieldCounter/basicTypes.d.ts +8 -1
  140. package/dist/constructors/FieldCounter/props.d.ts +6 -0
  141. package/dist/constructors/FieldLabel/FieldLabel.d.ts +11 -5
  142. package/dist/constructors/FieldLabel/basicTypes.d.ts +4 -1
  143. package/dist/constructors/FieldLabel/props.d.ts +4 -0
  144. package/dist/constructors/FieldMessage/FieldMessage.d.ts +9 -4
  145. package/dist/constructors/FieldMessage/basicTypes.d.ts +12 -1
  146. package/dist/constructors/FieldMessage/index.d.ts +1 -0
  147. package/dist/constructors/FieldMessage/props.d.ts +9 -0
  148. package/dist/constructors/Grid/Grid.d.ts +29 -0
  149. package/dist/constructors/Grid/GridDesign.d.ts +43 -0
  150. package/dist/constructors/Grid/basicTypes.d.ts +1 -0
  151. package/dist/constructors/Grid/index.d.ts +5 -0
  152. package/dist/constructors/Grid/props.d.ts +15 -0
  153. package/dist/constructors/Grid/types.d.ts +37 -0
  154. package/dist/constructors/GridItem/GridItem.d.ts +29 -0
  155. package/dist/constructors/GridItem/GridItemDesign.d.ts +43 -0
  156. package/dist/constructors/GridItem/basicTypes.d.ts +1 -0
  157. package/dist/constructors/GridItem/index.d.ts +5 -0
  158. package/dist/constructors/GridItem/props.d.ts +19 -0
  159. package/dist/constructors/GridItem/types.d.ts +37 -0
  160. package/dist/constructors/Group/Group.d.ts +6 -0
  161. package/dist/constructors/Group/GroupDesign.d.ts +18 -0
  162. package/dist/constructors/Group/basicTypes.d.ts +1 -0
  163. package/dist/constructors/Group/index.d.ts +5 -0
  164. package/dist/constructors/Group/props.d.ts +20 -0
  165. package/dist/constructors/Group/types.d.ts +44 -0
  166. package/dist/constructors/HorizontalScroll/HorizontalScroll.d.ts +67 -0
  167. package/dist/constructors/HorizontalScroll/HorizontalScrollDesign.d.ts +43 -0
  168. package/dist/constructors/HorizontalScroll/HorizontalScrollInclude.d.ts +67 -0
  169. package/dist/constructors/HorizontalScroll/basicTypes.d.ts +40 -0
  170. package/dist/constructors/HorizontalScroll/index.d.ts +6 -0
  171. package/dist/constructors/HorizontalScroll/props.d.ts +29 -0
  172. package/dist/constructors/HorizontalScroll/types.d.ts +39 -0
  173. package/dist/constructors/Icon/Icon.d.ts +7 -3
  174. package/dist/constructors/Icon/basicTypes.d.ts +33 -0
  175. package/dist/constructors/Icon/index.d.ts +1 -1
  176. package/dist/constructors/Icon/props.d.ts +5 -0
  177. package/dist/constructors/Icon/types.d.ts +4 -2
  178. package/dist/constructors/Image/Image.d.ts +21 -12
  179. package/dist/constructors/Image/ImageInclude.d.ts +3 -3
  180. package/dist/constructors/Image/ImageUint8Array.d.ts +47 -0
  181. package/dist/constructors/Image/basicTypes.d.ts +56 -7
  182. package/dist/constructors/Image/index.d.ts +15 -1
  183. package/dist/constructors/Image/types.d.ts +3 -0
  184. package/dist/constructors/Input/Input.d.ts +37 -18
  185. package/dist/constructors/Input/basicTypes.d.ts +5 -0
  186. package/dist/constructors/Input/index.d.ts +1 -0
  187. package/dist/constructors/List/List.d.ts +21 -12
  188. package/dist/constructors/List/ListControl.d.ts +12 -0
  189. package/dist/constructors/List/basicTypes.d.ts +5 -0
  190. package/dist/constructors/List/index.d.ts +4 -0
  191. package/dist/constructors/List/props.d.ts +31 -0
  192. package/dist/constructors/List/types.d.ts +5 -0
  193. package/dist/constructors/ListGroup/ListGroup.d.ts +5 -2
  194. package/dist/constructors/ListGroup/basicTypes.d.ts +4 -0
  195. package/dist/constructors/ListGroup/index.d.ts +1 -0
  196. package/dist/constructors/ListGroup/props.d.ts +1 -0
  197. package/dist/constructors/ListGroup/types.d.ts +3 -0
  198. package/dist/constructors/ListItem/ListItem.d.ts +34 -18
  199. package/dist/constructors/ListItem/basicTypes.d.ts +5 -0
  200. package/dist/constructors/ListItem/props.d.ts +13 -0
  201. package/dist/constructors/ListItem/types.d.ts +5 -2
  202. package/dist/constructors/ListMenu/ListMenu.d.ts +7 -3
  203. package/dist/constructors/ListMenu/basicTypes.d.ts +5 -0
  204. package/dist/constructors/ListMenu/props.d.ts +3 -1
  205. package/dist/constructors/ListMenu/types.d.ts +2 -0
  206. package/dist/constructors/Mask/Mask.d.ts +49 -24
  207. package/dist/constructors/Mask/basicTypes.d.ts +43 -0
  208. package/dist/constructors/Mask/index.d.ts +24 -0
  209. package/dist/constructors/Mask/props.d.ts +19 -0
  210. package/dist/constructors/Mask/types.d.ts +15 -0
  211. package/dist/constructors/Menu/Menu.d.ts +21 -10
  212. package/dist/constructors/Menu/MenuInclude.d.ts +1 -0
  213. package/dist/constructors/Menu/basicTypes.d.ts +15 -0
  214. package/dist/constructors/Menu/index.d.ts +5 -0
  215. package/dist/constructors/Menu/props.d.ts +26 -0
  216. package/dist/constructors/Menu/types.d.ts +2 -0
  217. package/dist/constructors/Modal/Modal.d.ts +15 -1
  218. package/dist/constructors/Modal/ModalAbstract.d.ts +9 -1
  219. package/dist/constructors/Modal/index.d.ts +2 -0
  220. package/dist/constructors/Modal/props.d.ts +2 -0
  221. package/dist/constructors/Modal/types.d.ts +1 -0
  222. package/dist/constructors/MotionAxis/MotionAxis.d.ts +75 -0
  223. package/dist/constructors/MotionAxis/MotionAxisDesign.d.ts +49 -0
  224. package/dist/constructors/MotionAxis/MotionAxisElement.d.ts +132 -0
  225. package/dist/constructors/MotionAxis/MotionAxisGo.d.ts +103 -0
  226. package/dist/constructors/MotionAxis/MotionAxisInclude.d.ts +49 -0
  227. package/dist/constructors/MotionAxis/MotionAxisPrevious.d.ts +42 -0
  228. package/dist/constructors/MotionAxis/MotionAxisSelected.d.ts +31 -0
  229. package/dist/constructors/MotionAxis/MotionAxisSlides.d.ts +19 -0
  230. package/dist/constructors/MotionAxis/MotionAxisStatus.d.ts +88 -0
  231. package/dist/constructors/MotionAxis/MotionAxisStyles.d.ts +38 -0
  232. package/dist/constructors/MotionAxis/basicTypes.d.ts +42 -0
  233. package/dist/constructors/MotionAxis/index.d.ts +13 -0
  234. package/dist/constructors/MotionAxis/props.d.ts +35 -0
  235. package/dist/constructors/MotionAxis/types.d.ts +64 -0
  236. package/dist/constructors/MotionTransform/MotionTransform.d.ts +19 -9
  237. package/dist/constructors/MotionTransform/MotionTransformDesign.d.ts +3 -3
  238. package/dist/constructors/MotionTransform/basicTypes.d.ts +1 -0
  239. package/dist/constructors/MotionTransform/index.d.ts +6 -1
  240. package/dist/constructors/MotionTransform/props.d.ts +18 -12
  241. package/dist/constructors/MotionTransform/types.d.ts +7 -5
  242. package/dist/constructors/Progress/Progress.d.ts +5 -1
  243. package/dist/constructors/Progress/basicTypes.d.ts +4 -0
  244. package/dist/constructors/Progress/props.d.ts +11 -0
  245. package/dist/constructors/Ripple/Ripple.d.ts +5 -1
  246. package/dist/constructors/Ripple/RippleInclude.d.ts +3 -3
  247. package/dist/constructors/Ripple/basicTypes.d.ts +6 -1
  248. package/dist/constructors/Ripple/index.d.ts +1 -0
  249. package/dist/constructors/Ripple/props.d.ts +1 -0
  250. package/dist/constructors/Scrollbar/Scrollbar.d.ts +7 -3
  251. package/dist/constructors/Scrollbar/ScrollbarInclude.d.ts +3 -3
  252. package/dist/constructors/Scrollbar/basicTypes.d.ts +10 -1
  253. package/dist/constructors/Scrollbar/index.d.ts +2 -0
  254. package/dist/constructors/Scrollbar/props.d.ts +2 -0
  255. package/dist/constructors/Scrollbar/types.d.ts +8 -0
  256. package/dist/constructors/Select/Select.d.ts +25 -12
  257. package/dist/constructors/Select/index.d.ts +2 -0
  258. package/dist/constructors/Select/props.d.ts +9 -0
  259. package/dist/constructors/SelectValue/SelectValue.d.ts +9 -4
  260. package/dist/constructors/SelectValue/basicTypes.d.ts +3 -0
  261. package/dist/constructors/SelectValue/props.d.ts +8 -0
  262. package/dist/constructors/Skeleton/basicTypes.d.ts +13 -0
  263. package/dist/constructors/Skeleton/index.d.ts +2 -1
  264. package/dist/constructors/Skeleton/types.d.ts +2 -0
  265. package/dist/constructors/Snackbar/Snackbar.d.ts +47 -0
  266. package/dist/constructors/Snackbar/SnackbarData.d.ts +104 -0
  267. package/dist/constructors/Snackbar/SnackbarDesign.d.ts +63 -0
  268. package/dist/constructors/Snackbar/SnackbarEvent.d.ts +32 -0
  269. package/dist/constructors/Snackbar/basicTypes.d.ts +17 -0
  270. package/dist/constructors/Snackbar/index.d.ts +7 -0
  271. package/dist/constructors/Snackbar/props.d.ts +27 -0
  272. package/dist/constructors/Snackbar/types.d.ts +54 -0
  273. package/dist/constructors/SnackbarItem/SnackbarItem.d.ts +72 -0
  274. package/dist/constructors/SnackbarItem/SnackbarItemDesign.d.ts +67 -0
  275. package/dist/constructors/SnackbarItem/basicTypes.d.ts +28 -0
  276. package/dist/constructors/SnackbarItem/index.d.ts +5 -0
  277. package/dist/constructors/SnackbarItem/props.d.ts +43 -0
  278. package/dist/constructors/SnackbarItem/types.d.ts +56 -0
  279. package/dist/constructors/TabItem/TabItem.d.ts +120 -0
  280. package/dist/constructors/TabItem/TabItemDesign.d.ts +43 -0
  281. package/dist/constructors/TabItem/basicTypes.d.ts +8 -0
  282. package/dist/constructors/TabItem/index.d.ts +5 -0
  283. package/dist/constructors/TabItem/props.d.ts +40 -0
  284. package/dist/constructors/TabItem/types.d.ts +44 -0
  285. package/dist/constructors/Tabs/Tabs.d.ts +50 -0
  286. package/dist/constructors/Tabs/TabsDesign.d.ts +49 -0
  287. package/dist/constructors/Tabs/TabsSelected.d.ts +39 -0
  288. package/dist/constructors/Tabs/basicTypes.d.ts +1 -0
  289. package/dist/constructors/Tabs/index.d.ts +6 -0
  290. package/dist/constructors/Tabs/props.d.ts +20 -0
  291. package/dist/constructors/Tabs/types.d.ts +39 -0
  292. package/dist/constructors/TabsNavigation/TabsNavigation.d.ts +141 -0
  293. package/dist/constructors/TabsNavigation/TabsNavigationControl.d.ts +85 -0
  294. package/dist/constructors/TabsNavigation/TabsNavigationDesign.d.ts +60 -0
  295. package/dist/constructors/TabsNavigation/TabsNavigationFocus.d.ts +61 -0
  296. package/dist/constructors/TabsNavigation/TabsNavigationIds.d.ts +32 -0
  297. package/dist/constructors/TabsNavigation/TabsNavigationInclude.d.ts +43 -0
  298. package/dist/constructors/TabsNavigation/TabsNavigationIndicator.d.ts +55 -0
  299. package/dist/constructors/TabsNavigation/TabsNavigationSelected.d.ts +39 -0
  300. package/dist/constructors/TabsNavigation/basicTypes.d.ts +27 -0
  301. package/dist/constructors/TabsNavigation/index.d.ts +11 -0
  302. package/dist/constructors/TabsNavigation/props.d.ts +42 -0
  303. package/dist/constructors/TabsNavigation/types.d.ts +47 -0
  304. package/dist/constructors/Textarea/Textarea.d.ts +83 -0
  305. package/dist/constructors/Textarea/TextareaDesign.d.ts +51 -0
  306. package/dist/constructors/Textarea/basicTypes.d.ts +1 -0
  307. package/dist/constructors/Textarea/index.d.ts +5 -0
  308. package/dist/constructors/Textarea/props.d.ts +26 -0
  309. package/dist/constructors/Textarea/types.d.ts +38 -0
  310. package/dist/constructors/TextareaAutosize/TextareaAutosize.d.ts +7 -3
  311. package/dist/constructors/TextareaAutosize/basicTypes.d.ts +20 -1
  312. package/dist/constructors/TextareaAutosize/index.d.ts +2 -0
  313. package/dist/constructors/TextareaAutosize/props.d.ts +7 -2
  314. package/dist/constructors/TextareaAutosize/types.d.ts +2 -0
  315. package/dist/constructors/Tooltip/Tooltip.d.ts +27 -16
  316. package/dist/constructors/Tooltip/{TooltipClasses.d.ts → TooltipClassesData.d.ts} +1 -1
  317. package/dist/constructors/Tooltip/TooltipEvent.d.ts +4 -4
  318. package/dist/constructors/Tooltip/TooltipPosition.d.ts +3 -3
  319. package/dist/constructors/Tooltip/basicTypes.d.ts +15 -0
  320. package/dist/constructors/Tooltip/index.d.ts +6 -0
  321. package/dist/constructors/Tooltip/props.d.ts +9 -0
  322. package/dist/constructors/Tooltip/types.d.ts +4 -0
  323. package/dist/constructors/Window/Window.d.ts +53 -26
  324. package/dist/constructors/Window/{WindowClasses.d.ts → WindowClassesData.d.ts} +1 -1
  325. package/dist/constructors/Window/WindowCoordinates.d.ts +3 -3
  326. package/dist/constructors/Window/WindowElement.d.ts +3 -3
  327. package/dist/constructors/Window/WindowEmit.d.ts +3 -3
  328. package/dist/constructors/Window/WindowFlash.d.ts +3 -3
  329. package/dist/constructors/Window/WindowHidden.d.ts +3 -3
  330. package/dist/constructors/Window/WindowPersistent.d.ts +3 -3
  331. package/dist/constructors/Window/WindowVerification.d.ts +3 -3
  332. package/dist/constructors/Window/basicTypes.d.ts +10 -0
  333. package/dist/constructors/Window/index.d.ts +21 -3
  334. package/dist/constructors/Window/props.d.ts +53 -27
  335. package/dist/constructors/Window/types.d.ts +7 -7
  336. package/dist/defineProperty-hmGKPWdq.js +39 -0
  337. package/dist/dialog.js +89 -210
  338. package/dist/dummy.js +28 -0
  339. package/dist/field.js +220 -549
  340. package/dist/fieldCounter.js +77 -194
  341. package/dist/fieldLabel.js +63 -175
  342. package/dist/fieldMessage.js +82 -234
  343. package/dist/getClassTagAStatic-BPIEWyHY.js +4 -0
  344. package/dist/grid.js +31 -0
  345. package/dist/gridItem.js +31 -0
  346. package/dist/group.js +13 -0
  347. package/dist/horizontalScroll.js +57 -0
  348. package/dist/icon.js +82 -227
  349. package/dist/image.js +648 -1345
  350. package/dist/input.js +82 -363
  351. package/dist/library/checkbox.d.ts +1 -0
  352. package/dist/library/dummy.d.ts +1 -0
  353. package/dist/library/grid.d.ts +1 -0
  354. package/dist/library/gridItem.d.ts +1 -0
  355. package/dist/library/group.d.ts +1 -0
  356. package/dist/library/horizontalScroll.d.ts +1 -0
  357. package/dist/library/motionAxis.d.ts +1 -0
  358. package/dist/library/snackbar.d.ts +1 -0
  359. package/dist/library/snackbarItem.d.ts +1 -0
  360. package/dist/library/tabItem.d.ts +1 -0
  361. package/dist/library/tabs.d.ts +1 -0
  362. package/dist/library/tabsNavigation.d.ts +1 -0
  363. package/dist/library/textarea.d.ts +1 -0
  364. package/dist/library.d.ts +1 -0
  365. package/dist/library.js +21 -58
  366. package/dist/list.js +455 -1062
  367. package/dist/listGroup.js +61 -172
  368. package/dist/listItem.js +113 -318
  369. package/dist/listMenu.js +51 -123
  370. package/dist/mask.js +1015 -2488
  371. package/dist/menu.js +200 -537
  372. package/dist/modal.js +28 -72
  373. package/dist/motionAxis.js +319 -0
  374. package/dist/motionTransform.js +225 -633
  375. package/dist/page.js +11 -28
  376. package/dist/plugin.js +2 -4
  377. package/dist/progress.js +123 -302
  378. package/dist/ripple.js +55 -135
  379. package/dist/scrollbar.js +99 -237
  380. package/dist/section.js +11 -28
  381. package/dist/select.js +163 -423
  382. package/dist/selectValue.js +87 -247
  383. package/dist/skeleton.js +32 -80
  384. package/dist/snackbar.js +143 -0
  385. package/dist/snackbarItem.js +119 -0
  386. package/dist/tabItem.js +64 -0
  387. package/dist/tabs.js +69 -0
  388. package/dist/tabsNavigation.js +212 -0
  389. package/dist/textarea.js +58 -0
  390. package/dist/textareaAutosize.js +83 -237
  391. package/dist/tooltip.js +236 -667
  392. package/dist/types/ariaTypes.d.ts +45 -25
  393. package/dist/types/descriptionTypes.d.ts +3 -0
  394. package/dist/types/eventClickTypes.d.ts +2 -0
  395. package/dist/types/fieldTypes.d.ts +29 -20
  396. package/dist/types/modelTypes.d.ts +30 -0
  397. package/dist/types/pluginTypes.d.ts +5 -1
  398. package/dist/types/roleTypes.d.ts +1 -0
  399. package/dist/types/textTypes.d.ts +18 -0
  400. package/dist/window.js +769 -2037
  401. package/package.json +56 -2
  402. package/src/constructors/Accordion/properties.json +16 -0
  403. package/src/constructors/ActionSheet/properties.json +14 -0
  404. package/src/constructors/Actions/properties.json +66 -0
  405. package/src/constructors/Anchor/properties.json +3 -0
  406. package/src/constructors/Arrow/properties.json +23 -0
  407. package/src/constructors/Badge/properties.json +36 -0
  408. package/src/constructors/Bars/properties.json +5 -0
  409. package/src/constructors/Block/properties.json +10 -0
  410. package/src/constructors/Button/properties.json +84 -0
  411. package/src/constructors/Cell/properties.json +52 -0
  412. package/src/constructors/Cell/style.scss +8 -3
  413. package/src/constructors/Checkbox/properties.json +65 -0
  414. package/src/constructors/Checkbox/style.scss +99 -0
  415. package/src/constructors/Chip/properties.json +3 -0
  416. package/src/constructors/ChipGroup/properties.json +3 -0
  417. package/src/constructors/Dialog/properties.json +23 -0
  418. package/src/constructors/Dummy/properties.json +2 -0
  419. package/src/constructors/Dummy/style.scss +5 -0
  420. package/src/constructors/Field/properties.json +92 -0
  421. package/src/constructors/Field/style.scss +2 -0
  422. package/src/constructors/FieldCounter/properties.json +4 -0
  423. package/src/constructors/FieldLabel/properties.json +4 -0
  424. package/src/constructors/FieldMessage/properties.json +10 -0
  425. package/src/constructors/Grid/properties.json +6 -0
  426. package/src/constructors/Grid/style.scss +8 -0
  427. package/src/constructors/GridItem/properties.json +40 -0
  428. package/src/constructors/GridItem/style.scss +5 -0
  429. package/src/constructors/Group/properties.json +3 -0
  430. package/src/constructors/Group/style.scss +6 -0
  431. package/src/constructors/HorizontalScroll/properties.json +26 -0
  432. package/src/constructors/HorizontalScroll/style.scss +27 -0
  433. package/src/constructors/Icon/properties.json +25 -0
  434. package/src/constructors/Image/properties.json +17 -0
  435. package/src/constructors/Input/properties.json +2 -0
  436. package/src/constructors/List/properties.json +16 -0
  437. package/src/constructors/ListGroup/properties.json +15 -0
  438. package/src/constructors/ListItem/properties.json +52 -0
  439. package/src/constructors/ListItem/style.scss +2 -0
  440. package/src/constructors/ListMenu/properties.json +19 -0
  441. package/src/constructors/Mask/properties.json +30 -0
  442. package/src/constructors/Mask/style.scss +6 -2
  443. package/src/constructors/Menu/properties.json +17 -0
  444. package/src/constructors/Modal/properties.json +17 -0
  445. package/src/constructors/MotionAxis/properties.json +15 -0
  446. package/src/constructors/MotionAxis/style.scss +110 -0
  447. package/src/constructors/MotionTransform/properties.json +35 -0
  448. package/src/constructors/Page/properties.json +3 -0
  449. package/src/constructors/Progress/properties.json +47 -0
  450. package/src/constructors/Ripple/properties.json +9 -0
  451. package/src/constructors/Scrollbar/properties.json +33 -0
  452. package/src/constructors/Section/properties.json +3 -0
  453. package/src/constructors/Select/properties.json +3 -0
  454. package/src/constructors/SelectValue/properties.json +7 -0
  455. package/src/constructors/Skeleton/properties.json +24 -0
  456. package/src/constructors/Snackbar/properties.json +95 -0
  457. package/src/constructors/Snackbar/style.scss +58 -0
  458. package/src/constructors/SnackbarItem/properties.json +12 -0
  459. package/src/constructors/SnackbarItem/style.scss +30 -0
  460. package/src/constructors/TabItem/properties.json +49 -0
  461. package/src/constructors/TabItem/style.scss +64 -0
  462. package/src/constructors/Tabs/properties.json +3 -0
  463. package/src/constructors/Tabs/style.scss +5 -0
  464. package/src/constructors/TabsNavigation/properties.json +10 -0
  465. package/src/constructors/TabsNavigation/style.scss +5 -0
  466. package/src/constructors/Textarea/properties.json +2 -0
  467. package/src/constructors/Textarea/style.scss +5 -0
  468. package/src/constructors/TextareaAutosize/properties.json +9 -0
  469. package/src/constructors/TextareaAutosize/style.scss +9 -6
  470. package/src/constructors/Tooltip/properties.json +18 -0
  471. package/src/constructors/Window/properties.json +240 -0
  472. package/src/library/style.scss +13 -0
  473. package/dist/ActionsInclude-H5ZWeXJj.js +0 -64
  474. package/dist/AriaStaticInclude-CAURwJMb.js +0 -257
  475. package/dist/ArrowInclude-CcpT637l.js +0 -47
  476. package/dist/BarsInclude-BOEoY-O4.js +0 -74
  477. package/dist/BlockDesign-CwRNJi0I.js +0 -244
  478. package/dist/ButtonDesign-DgZNw44L.js +0 -198
  479. package/dist/CaptionInclude-NzS6EYYj.js +0 -70
  480. package/dist/DescriptionInclude-D4ane9aR.js +0 -55
  481. package/dist/EnabledInclude-Dk-rP4jp.js +0 -46
  482. package/dist/EventClickInclude-WHJqxZ1b.js +0 -103
  483. package/dist/FieldCounterInclude-D0oojGWY.js +0 -59
  484. package/dist/FieldEventInclude-DBRqmzpF.js +0 -718
  485. package/dist/FieldInclude-BKoBWZdj.js +0 -145
  486. package/dist/FieldInputCheckInclude-CjNYyGTb.js +0 -79
  487. package/dist/FieldLabelInclude-Bkxf6rRw.js +0 -71
  488. package/dist/FieldMatchInclude-GgyucDC_.js +0 -318
  489. package/dist/FieldMessageInclude-BJDnir34.js +0 -77
  490. package/dist/IconInclude-CLqwI29Q.js +0 -123
  491. package/dist/IconTrailingInclude-CdsOcDxv.js +0 -83
  492. package/dist/LabelHighlightInclude-CLmTvW_6.js +0 -75
  493. package/dist/LabelInclude-D-mLvjK5.js +0 -114
  494. package/dist/LabelNumberInclude-Cn0qDEgX.js +0 -46
  495. package/dist/ListGroupOpen-Bl_HIQoV.js +0 -43
  496. package/dist/MenuInclude-DfGCfr_I.js +0 -94
  497. package/dist/ModalDesignAbstract-D4A_a_rC.js +0 -179
  498. package/dist/ModelInclude-BiYm_iCQ.js +0 -73
  499. package/dist/ModelValueInclude-CJmm5go9.js +0 -48
  500. package/dist/MotionTransformClassesInclude-B23RIq0Q.js +0 -214
  501. package/dist/MotionTransformInclude-P_oRs3JZ.js +0 -97
  502. package/dist/Plugin-CBNCh_iN.js +0 -628
  503. package/dist/ProgressInclude-9MfZWtGP.js +0 -56
  504. package/dist/RippleInclude-Du5yIzX_.js +0 -21
  505. package/dist/SkeletonInclude-BIUzAO2s.js +0 -105
  506. package/dist/SuffixInclude-maZ7235l.js +0 -125
  507. package/dist/TabIndexInclude-xcSFV8yP.js +0 -177
  508. package/dist/TextInclude--GERRCGj.js +0 -146
  509. package/dist/TooltipInclude--QRSE83v.js +0 -76
  510. package/dist/TouchEventInclude-DctYCjt8.js +0 -186
  511. package/dist/WindowClassesInclude-B56usxgx.js +0 -213
  512. package/dist/WindowEsc-DTwn4Vsz.js +0 -72
  513. package/dist/WindowInclude-BWm4-0Gh.js +0 -121
  514. package/dist/getClassTagAStatic-BnVYlXHI.js +0 -4
package/dist/window.js CHANGED
@@ -1,2038 +1,770 @@
1
- var V = Object.defineProperty;
2
- var G = (h, t, e) => t in h ? V(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
- var i = (h, t, e) => G(h, typeof t != "symbol" ? t + "" : t, e);
4
- import { h as p, computed as m, ref as v, watch as f, onMounted as K, onUnmounted as j, Teleport as Z } from "vue";
5
- import { toBind as z, getBind as J, getRef as Q, executePromise as y, getElement as k, isDomRuntime as B, EventItem as I, setRef as tt, frame as et, isEnter as st, getMouseClientX as it, getMouseClientY as nt, DesignConstructorAbstract as ot } from "@dxtmisha/functional";
6
- import { A as w } from "./AriaStaticInclude-CAURwJMb.js";
7
- import { M as rt } from "./ModelInclude-BiYm_iCQ.js";
8
- import { T as ht } from "./TabIndexInclude-xcSFV8yP.js";
9
- import { T as at } from "./TextInclude--GERRCGj.js";
10
- import { a as c, _ as b, b as lt } from "./WindowClassesInclude-B56usxgx.js";
11
- import { W as _t } from "./WindowClassesInclude-B56usxgx.js";
12
- import { W as ct } from "./WindowEsc-DTwn4Vsz.js";
13
- import { W as Ut } from "./WindowInclude-BWm4-0Gh.js";
14
- class dt {
15
- /**
16
- * Constructor
17
- * @param props input parameter/ входной параметр
18
- * @param className class name/ название класса
19
- * @param components object for working with components/ объект для работы с компонентами
20
- * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
21
- */
22
- constructor(t, e, s, n) {
23
- this.props = t, this.className = e, this.components = s, this.emits = n;
24
- }
25
- /**
26
- * Renders scrollbar component or fallback element
27
- * Рендерит компонент скроллбара или элемент по умолчанию
28
- */
29
- render(t, e, s) {
30
- var n;
31
- if (this.components) {
32
- const o = this.components.renderOne(
33
- "scrollbar",
34
- z(
35
- {
36
- tag: t,
37
- class: `${this.className}__scrollbar`,
38
- ...e != null ? e : {},
39
- ...this.getScrollbarEvents()
40
- },
41
- (n = this.props.scrollbarAttrs) != null ? n : {}
42
- ),
43
- s
44
- );
45
- if (o)
46
- return [o];
47
- }
48
- return [p(t, e, s)];
49
- }
50
- /**
51
- * Returns event handlers for scrollbar
52
- * Возвращает обработчики событий для скроллбара
53
- */
54
- getScrollbarEvents() {
55
- return {
56
- onTop: (t) => {
57
- var e;
58
- return (e = this.emits) == null ? void 0 : e.call(this, "scrollbarTop", t);
59
- },
60
- onReachTop: () => {
61
- var t;
62
- return (t = this.emits) == null ? void 0 : t.call(this, "scrollbarReachTop");
63
- },
64
- onLeaveTop: () => {
65
- var t;
66
- return (t = this.emits) == null ? void 0 : t.call(this, "scrollbarLeaveTop");
67
- },
68
- onBottom: (t) => {
69
- var e;
70
- return (e = this.emits) == null ? void 0 : e.call(this, "scrollbarBottom", t);
71
- },
72
- onReachBottom: () => {
73
- var t;
74
- return (t = this.emits) == null ? void 0 : t.call(this, "scrollbarReachBottom");
75
- },
76
- onLeaveBottom: () => {
77
- var t;
78
- return (t = this.emits) == null ? void 0 : t.call(this, "scrollbarLeaveBottom");
79
- },
80
- onEdge: (t, e, s) => {
81
- var n;
82
- return (n = this.emits) == null ? void 0 : n.call(this, "scrollbarEdge", t, e, s);
83
- }
84
- };
85
- }
86
- }
87
- class ut {
88
- /**
89
- * Constructor for working with images.
90
- *
91
- * Конструктор для работы с изображениями.
92
- * @param props input parameter/ входной параметр
93
- * @param components object for working with components/ объект для работы с компонентами
94
- * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
95
- * @param extra additional parameter/ дополнительный параметр
96
- */
97
- constructor(t, e, s, n) {
98
- /**
99
- * Проверяет, есть ли изображение/ Checks if an image exists
100
- */
101
- i(this, "isImage", m(() => !!this.props.image));
102
- /**
103
- * Возвращает данные для передачи компоненту/ Returns data to pass to the component
104
- */
105
- i(this, "bind", m(() => J(this.props.image, Q(this.extra), "value")));
106
- this.props = t, this.components = e, this.emits = s, this.extra = n;
107
- }
108
- render() {
109
- return this.components && this.isImage.value ? this.components.render("image", this.bind.value) : [];
110
- }
111
- onLoad(t) {
112
- var e;
113
- (e = this.emits) == null || e.call(this, "load", t);
114
- }
115
- }
116
- const g = -1;
117
- class pt {
118
- constructor(t) {
119
- i(this, "x", g);
120
- i(this, "y", g);
121
- this.element = t;
122
- }
123
- /**
124
- * Checks if the button was pressed.
125
- *
126
- * Проверяет, было ли нажатие на кнопку.
127
- */
128
- is() {
129
- return this.x !== g && this.y !== g;
130
- }
131
- /**
132
- * Checks if the coordinates are at the origin (0,0).
133
- *
134
- * Проверяет, находятся ли координаты в начале координат (0,0).
135
- */
136
- isZero() {
137
- return this.x === 0 && this.y === 0;
138
- }
139
- /**
140
- * Returns the X coordinate.
141
- *
142
- * Возвращает координату X.
143
- */
144
- getX() {
145
- return this.x;
146
- }
147
- /**
148
- * Returns the Y coordinate.
149
- *
150
- * Возвращает координату Y.
151
- */
152
- getY() {
153
- return this.y;
154
- }
155
- /**
156
- * Returns the shift along the X coordinate.
157
- *
158
- * Возвращает сдвиг по координате X.
159
- */
160
- getShiftX(t) {
161
- return this.x - t;
162
- }
163
- /**
164
- * Returns the shift along the Y coordinate.
165
- *
166
- * Возвращает сдвиг по координате Y.
167
- */
168
- getShiftY(t) {
169
- return this.y - t;
170
- }
171
- /**
172
- * Changes the coordinates.
173
- *
174
- * Изменяет координаты.
175
- * @param x value of X/ значение X
176
- * @param y value of Y/ значение Y
177
- */
178
- set(t, e) {
179
- return this.x = t, this.y = e, this;
180
- }
181
- /**
182
- * Resets all data to initial values.
183
- *
184
- * Сбрасывает все данные к начальным значениям.
185
- */
186
- reset() {
187
- return this.x = g, this.y = g, this;
188
- }
189
- /**
190
- * The method updates the current position.
191
- *
192
- * Метод обновляет текущее положение.
193
- */
194
- update() {
195
- if (this.is() && this.isZero()) {
196
- const t = this.element.getControlRect();
197
- t && this.set(
198
- t.left + t.width / 2,
199
- t.top + t.height / 2
200
- );
201
- }
202
- return this;
203
- }
204
- }
205
- class gt {
206
- /**
207
- * Constructor
208
- * @param props input data/ входные данные
209
- */
210
- constructor(t) {
211
- this.props = t;
212
- }
213
- /**
214
- * Hook for preparing elements before opening/closing.
215
- *
216
- * Хук для подготовки элементов перед открытием/закрытием.
217
- */
218
- async preparation() {
219
- this.props.preparation && await y(this.props.preparation);
220
- }
221
- /**
222
- * Hook before opening/closing.
223
- *
224
- * Хук перед открытием/закрытием.
225
- * @param open current state of the window/ текущее состояние окна
226
- */
227
- async before(t) {
228
- return t ? await this.beforeOpening() : await this.beforeClosing();
229
- }
230
- /**
231
- * Hook before opening.
232
- *
233
- * Хук перед открытием.
234
- */
235
- async beforeOpening() {
236
- return this.props.beforeOpening ? await y(this.props.beforeOpening) : !0;
237
- }
238
- /**
239
- * Hook before closing.
240
- *
241
- * Хук перед закрытием.
242
- */
243
- async beforeClosing() {
244
- return this.props.beforeClosing ? await y(this.props.beforeClosing) : !0;
245
- }
246
- /**
247
- * Hook after opening/closing.
248
- *
249
- * Хук после открытия/закрытия.
250
- * @param open current state of the window/ текущее состояние окна
251
- */
252
- async after(t) {
253
- return t ? await this.opening() : await this.closing();
254
- }
255
- /**
256
- * Hook after opening.
257
- *
258
- * Хук после открытия.
259
- */
260
- async opening() {
261
- return this.props.opening ? await y(this.props.opening) : !1;
262
- }
263
- /**
264
- * Hook after closing.
265
- *
266
- * Хук после закрытия.
267
- */
268
- async closing() {
269
- return this.props.closing ? await y(this.props.closing) : !1;
270
- }
271
- }
272
- class mt {
273
- /**
274
- * Constructor
275
- * @param classes an object for working with classes and searching for elements/ объект для работы с классами и поиском элементов
276
- * @param element the element of the window itself/ элемент самого окна
277
- */
278
- constructor(t, e) {
279
- this.classes = t, this.element = e;
280
- }
281
- /**
282
- * Checks if the main element exists.
283
- *
284
- * Проверяет, есть ли главный элемент.
285
- */
286
- isMain() {
287
- return !!this.element.value;
288
- }
289
- /**
290
- * Returns the main element.
291
- *
292
- * Возвращает главного элемента.
293
- */
294
- getMain() {
295
- return this.element.value;
296
- }
297
- /**
298
- * Returns the control element of the current component.
299
- *
300
- * Возвращает элемент управления текущего компонента.
301
- */
302
- getControl() {
303
- return this.classes.findControl();
304
- }
305
- /**
306
- * Returns the dimensions of the control element.
307
- *
308
- * Возвращает размеры элемента управления.
309
- */
310
- getControlRect() {
311
- var t;
312
- return ((t = this.getControl()) == null ? void 0 : t.getBoundingClientRect()) || void 0;
313
- }
314
- /**
315
- * Returns the body element of the window.
316
- *
317
- * Возвращает элемент тела окна.
318
- */
319
- getBody() {
320
- return this.classes.findBody();
321
- }
322
- /**
323
- * Returns the dimensions of the window's body element.
324
- *
325
- * Возвращает размеры элемента тела окна.
326
- */
327
- getBodyRect() {
328
- var t;
329
- return ((t = this.getBody()) == null ? void 0 : t.getBoundingClientRect()) || void 0;
330
- }
331
- /**
332
- * Returns the window context element.
333
- *
334
- * Возвращает элемент контекста окна.
335
- */
336
- getBodyContext() {
337
- return this.classes.findBodyContext();
338
- }
339
- }
340
- class ft {
341
- /**
342
- * Constructor
343
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
344
- */
345
- constructor(t) {
346
- i(this, "item", v(c.close));
347
- this.element = t;
348
- }
349
- /**
350
- * Checks if the current status is closed (hide).
351
- *
352
- * Проверяет, является ли текущий статус закрытым (hide).
353
- */
354
- isHide() {
355
- return this.item.value === c.hide;
356
- }
357
- /**
358
- * Checks if the current status is open (open/flash).
359
- *
360
- * Проверяет, является ли текущий статус открытым (open/flash).
361
- */
362
- isOpen() {
363
- return this.item.value === c.open || this.item.value === c.flash;
364
- }
365
- /**
366
- * Change the current status.
367
- *
368
- * Изменить текущий статус.
369
- * @param value value/ значение
370
- */
371
- set(t) {
372
- return this.item.value = t, this.update(), this;
373
- }
374
- /**
375
- * Translates status to display.
376
- *
377
- * Переводит статус в display.
378
- */
379
- toDisplay() {
380
- return this.set(c.display), this;
381
- }
382
- /**
383
- * Translates status to preparation.
384
- *
385
- * Переводит статус в preparation.
386
- */
387
- toPreparation() {
388
- return this.set(c.preparation), this;
389
- }
390
- /**
391
- * Translates status to flash.
392
- *
393
- * Переводит статус в flash.
394
- */
395
- toFlash() {
396
- return this.set(c.flash), this;
397
- }
398
- /**
399
- * Translates status to open.
400
- *
401
- * Переводит статус в open.
402
- */
403
- toOpen() {
404
- return this.set(c.open), this;
405
- }
406
- /**
407
- * Translates status to hide.
408
- *
409
- * Переводит статус в hide.
410
- */
411
- toHide() {
412
- return this.set(c.hide), this;
413
- }
414
- /**
415
- * Translates status to close.
416
- *
417
- * Переводит статус в close.
418
- */
419
- toClose() {
420
- return this.set(c.close), this;
421
- }
422
- /**
423
- * Updates the data-status attribute on the main element and teleport element.
424
- *
425
- * Обновляет атрибут data-status на основном элементе и элементе телепорта.
426
- */
427
- update() {
428
- const t = this.element.getMain();
429
- if (t) {
430
- const e = t.parentElement;
431
- t.dataset.status = this.item.value, e && e.dataset.windowTeleport && (e.dataset.status = this.item.value);
432
- }
433
- }
434
- }
435
- class yt {
436
- /**
437
- * Constructor
438
- * @param props input data/ входные данные
439
- * @param classes an object for working with classes and searching for elements/ объект для работы с классами и поиском элементов
440
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
441
- */
442
- constructor(t, e, s) {
443
- i(this, "item", v(!1));
444
- /**
445
- * Event of the animation end of the closing prohibition.
446
- *
447
- * Событие окончания анимации запрета на закрытие.
448
- */
449
- i(this, "onTransitionend", () => {
450
- this.removeEvent(), this.disabled();
451
- });
452
- this.props = t, this.classes = e, this.element = s, f(this.item, (n) => {
453
- const o = this.element.getMain();
454
- o && (n ? (this.removeEvent(), o.classList.add(this.classes.list.persistent), o.addEventListener("animationend", this.onTransitionend)) : o.classList.remove(this.classes.list.persistent));
455
- });
456
- }
457
- /**
458
- * Request to enable animation.
459
- *
460
- * Запрос на включение анимации.
461
- */
462
- on() {
463
- return this.props.persistent ? (this.item.value = !0, !0) : !1;
464
- }
465
- /**
466
- * Request to disable animation.
467
- *
468
- * Запрос на выключение анимации.
469
- */
470
- disabled() {
471
- return this.item.value && (this.item.value = !1), this;
472
- }
473
- /**
474
- * Removes the event of the end of the animation.
475
- *
476
- * Удаляет событие окончания анимации.
477
- */
478
- removeEvent() {
479
- var t;
480
- (t = this.element.getMain()) == null || t.removeEventListener("animationend", this.onTransitionend);
481
- }
482
- }
483
- class wt {
484
- /**
485
- * Constructor
486
- * @param props input data/ входные данные
487
- * @param classes an object for working with classes and searching for elements/ объект для работы с классами и поиском элементов
488
- */
489
- constructor(t, e) {
490
- i(this, "control", !1);
491
- this.props = t, this.classes = e;
492
- }
493
- /**
494
- * Is the flash property active.
495
- *
496
- * Активно ли свойство flash.
497
- */
498
- is() {
499
- return !!this.props.flash;
500
- }
501
- /**
502
- * Checks whether the animation needs to be disabled.
503
- *
504
- * Проверяет, надо ли отключить анимацию.
505
- */
506
- isOpen() {
507
- return this.is() || this.control;
508
- }
509
- /**
510
- * Checks whether the animation needs to be disabled when closing.
511
- *
512
- * Проверяет, надо ли отключить анимацию при закрытии.
513
- */
514
- isClose() {
515
- return this.is() || !!document.querySelector(`.${this.classes.getClassStatus(c.hide)}`);
516
- }
517
- /**
518
- * Change the value of the control parameter.
519
- *
520
- * Изменить значение параметра control.
521
- * @param target the element that gets focus on click/ элемент, который получает фокус при клике
522
- */
523
- setControl(t) {
524
- var e;
525
- return this.control = ((e = t == null ? void 0 : t.closest(`.${this.classes.list.control}`)) == null ? void 0 : e.dataset.window) === this.classes.getId(), this;
526
- }
527
- }
528
- class vt {
529
- /**
530
- * Constructor
531
- * @param classes an object for working with classes and searching for elements/ объект для работы с классами и поиском элементов
532
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
533
- */
534
- constructor(t, e) {
535
- i(this, "top", 0);
536
- i(this, "right", 0);
537
- i(this, "bottom", 0);
538
- i(this, "left", 0);
539
- i(this, "width", 0);
540
- i(this, "height", 0);
541
- i(this, "innerWidth", 0);
542
- i(this, "innerHeight", 0);
543
- i(this, "controlWidth", 0);
544
- i(this, "controlHeight", 0);
545
- i(this, "padding", 0);
546
- i(this, "location", "");
547
- this.classes = t, this.element = e;
548
- }
549
- /**
550
- * Returns the distance from the top point.
551
- *
552
- * Возвращает расстояние от верхней точки.
553
- */
554
- getTop() {
555
- return this.top;
556
- }
557
- /**
558
- * Returns the distance from the right point.
559
- *
560
- * Возвращает расстояние от правой точки.
561
- */
562
- getRight() {
563
- return this.right;
564
- }
565
- /**
566
- * Returns the distance from the lower point.
567
- *
568
- * Возвращает расстояние от нижней точки.
569
- */
570
- getBottom() {
571
- return this.bottom;
572
- }
573
- /**
574
- * Returns the distance from the left point.
575
- *
576
- * Возвращает расстояние от левой точки.
577
- */
578
- getLeft() {
579
- return this.left;
580
- }
581
- /**
582
- * Returns the width of the element.
583
- *
584
- * Возвращает ширину элемента.
585
- */
586
- getWidth() {
587
- return this.width;
588
- }
589
- /**
590
- * Returns the height of the element.
591
- *
592
- * Возвращает высоту элемента.
593
- */
594
- getHeight() {
595
- return this.height;
596
- }
597
- /**
598
- * Returns the width of the window.
599
- *
600
- * Возвращает ширину окна.
601
- */
602
- getInnerWidth() {
603
- return this.innerWidth;
604
- }
605
- /**
606
- * Returns the height of the window.
607
- *
608
- * Возвращает высоту окна.
609
- */
610
- getInnerHeight() {
611
- return this.innerHeight;
612
- }
613
- /**
614
- * Returns the width of the control element.
615
- *
616
- * Возвращает ширину элемента управления.
617
- */
618
- getControlWidth() {
619
- return this.controlWidth;
620
- }
621
- /**
622
- * Returns the height of the control element.
623
- *
624
- * Возвращает высоту элемента управления.
625
- */
626
- getControlHeight() {
627
- return this.controlHeight;
628
- }
629
- /**
630
- * Returns the margins of the element.
631
- *
632
- * Возвращает отступы у элемента.
633
- */
634
- getPadding() {
635
- return this.padding;
636
- }
637
- /**
638
- * Returns the values of the element's position.
639
- *
640
- * Возвращает значения положения элемента.
641
- */
642
- getLocation() {
643
- return this.location;
644
- }
645
- /**
646
- * Returns the maximum height of the body.
647
- *
648
- * Возвращает максимальную высоту у body.
649
- */
650
- getMaxHeight() {
651
- return window.innerHeight - this.padding * 2;
652
- }
653
- /**
654
- * Data updates.
655
- *
656
- * Обновления данных.
657
- */
658
- update() {
659
- const t = this.element.getMain(), e = this.element.getControlRect();
660
- return t && e && (this.top !== e.top || this.right !== e.right || this.bottom !== e.bottom || this.left !== e.left || this.width !== t.offsetWidth || this.height !== t.offsetHeight || this.innerWidth !== window.innerWidth || this.innerHeight !== window.innerHeight) ? (this.top = e.top, this.right = e.right, this.bottom = e.bottom, this.left = e.left, this.width = t.offsetWidth, this.height = t.offsetHeight, this.innerWidth = window.innerWidth, this.innerHeight = window.innerHeight, this.controlWidth = e.width, this.controlHeight = e.height, this.padding = this.initPadding(), this.location = this.initLocation(e.top + e.height / 2), !0) : !1;
661
- }
662
- /**
663
- * Resets all data to initial values.
664
- *
665
- * Сбрасывает все данные к начальным значениям.
666
- */
667
- reset() {
668
- return this.top = 0, this.right = 0, this.bottom = 0, this.left = 0, this.width = 0, this.height = 0, this.innerWidth = 0, this.innerHeight = 0, this;
669
- }
670
- /**
671
- * Initializes padding value from computed styles.
672
- *
673
- * Инициализирует значение отступов из вычисленных стилей.
674
- */
675
- initPadding() {
676
- const t = this.element.getMain();
677
- let e = 0;
678
- if (t) {
679
- const s = getComputedStyle(t), n = s.paddingTop.replace(/[^0-9]+/g, ""), o = s.paddingBottom.replace(/[^0-9]+/g, "");
680
- e = (parseInt(n) + parseInt(o)) / 2;
681
- }
682
- return e > 0 ? e : 16;
683
- }
684
- /**
685
- * Calculates control position values.
686
- *
687
- * Вычисляет значения положения контроля.
688
- * @param top position of an element/ положение элемента
689
- */
690
- initLocation(t) {
691
- var r, a;
692
- const e = (a = (r = this.element.getBody()) == null ? void 0 : r.offsetHeight) != null ? a : 0, s = e / 2, n = this.innerHeight - this.padding * 2 - e, o = t - s - this.padding;
693
- return o < this.padding ? "0px" : t + s >= this.innerHeight - this.padding ? `${n}px` : `${o}px`;
694
- }
695
- }
696
- class bt {
697
- /**
698
- * Constructor
699
- * @param props input data/ входные данные
700
- * @param client object for working with mouse pointer coordinates/ объект для работы с координатами указателя мыши
701
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
702
- * @param coordinates object for working with coordinates/ объект для работы с координатами
703
- */
704
- constructor(t, e, s, n) {
705
- i(this, "x", 0);
706
- i(this, "y", 0);
707
- this.props = t, this.client = e, this.element = s, this.coordinates = n;
708
- }
709
- /**
710
- * Checks if the alignment type is above the element.
711
- *
712
- * Проверяет, является ли тип выравнивания над элементом.
713
- */
714
- isOver() {
715
- return this.props.axis === "on";
716
- }
717
- /**
718
- * Returns the X position.
719
- *
720
- * Возвращает позицию X.
721
- */
722
- getX() {
723
- return this.x;
724
- }
725
- /**
726
- * Returns the Y position.
727
- *
728
- * Возвращает позицию Y.
729
- */
730
- getY() {
731
- return this.y;
732
- }
733
- /**
734
- * Returns the X position for styles.
735
- *
736
- * Возвращает позицию X для стилей.
737
- */
738
- getStyleX() {
739
- return `${this.x}px`;
740
- }
741
- /**
742
- * Returns the Y position for styles.
743
- *
744
- * Возвращает позицию Y для стилей.
745
- */
746
- getStyleY() {
747
- return `${this.y}px`;
748
- }
749
- /**
750
- * Update of the element's position coordinates.
751
- *
752
- * Обновление координаты положения элемента.
753
- */
754
- update() {
755
- return this.coordinates.update() ? (this.setX(), this.setY(), !0) : !1;
756
- }
757
- /**
758
- * Updates the scroll position if an element is selected.
759
- *
760
- * Обновляет место скрола, если выбран элемент.
761
- */
762
- updateScroll() {
763
- var e, s, n;
764
- const t = this.element.getBodyContext();
765
- if (this.isOver() && this.props.overElement && t && t.scrollHeight > t.offsetHeight) {
766
- const o = (e = k(this.props.overElement)) == null ? void 0 : e.getBoundingClientRect(), r = (s = this.element.getBody()) == null ? void 0 : s.getBoundingClientRect(), a = t == null ? void 0 : t.getBoundingClientRect(), l = (n = this.element.getControl()) == null ? void 0 : n.getBoundingClientRect();
767
- if (t && o && r && a) {
768
- const d = o.height / 2, u = o.top - a.top;
769
- if (l && this.coordinates.getMaxHeight() === r.height) {
770
- if (l.top + d < r.top) {
771
- t.scrollTop += u;
772
- return;
773
- }
774
- if (l.bottom - d > r.bottom) {
775
- t.scrollTop += u - a.height + o.height;
776
- return;
777
- }
778
- t.scrollTop += u - (l.top - a.top) - l.height / 2 + d;
779
- return;
780
- }
781
- t.scrollTop += u - a.height / 2 + d;
782
- }
783
- }
784
- }
785
- /**
786
- * Updates the scroll display status of the element.
787
- *
788
- * Обновляет статус отображения скролла у элемента.
789
- */
790
- updateBody() {
791
- if (B()) {
792
- const t = document.body, e = t.offsetHeight > window.innerHeight ? "scroll" : "none";
793
- t.dataset.scroll !== e && (t.dataset.scroll = e);
794
- }
795
- }
796
- /**
797
- * Returns the axis alignment values.
798
- *
799
- * Возвращает значения оси выравнивания.
800
- */
801
- getAxis() {
802
- var t, e;
803
- return this.isOver() ? "y" : (e = (t = this.props) == null ? void 0 : t.axis) != null ? e : "y";
804
- }
805
- /**
806
- * Returns the margins from the control element.
807
- *
808
- * Возвращает отступы от элемента управления.
809
- * @param axis the axis of alignment of the element/ ось выравнивания элемента
810
- */
811
- getIndent(t) {
812
- var e;
813
- return this.getAxis() === t ? (e = this.props.indent) != null ? e : 4 : 0;
814
- }
815
- /**
816
- * Calculation of the position for window alignment.
817
- *
818
- * Вычисление места положения для выравнивания окна.
819
- * @param rectTop high control coordinates/ высокие координаты контрола
820
- * @param rectBottom lower control coordinates/ нижние координаты контрола
821
- */
822
- getOverHeight(t, e) {
823
- var o, r;
824
- const s = (e - t) / 2;
825
- if (this.props.overElement) {
826
- const a = (o = k(this.props.overElement)) == null ? void 0 : o.getBoundingClientRect(), l = (r = this.element.getBody()) == null ? void 0 : r.getBoundingClientRect();
827
- if (a && l) {
828
- const d = a.top - l.top, u = a.height / 2;
829
- return e - d - u - s;
830
- }
831
- }
832
- const n = this.coordinates.getHeight() / 2;
833
- return e - s - n;
834
- }
835
- /**
836
- * Changes in position along the X coordinate.
837
- *
838
- * Изменения положения по координате X.
839
- */
840
- setX() {
841
- const t = this.element.getMain();
842
- if (t) {
843
- const e = this.getIndent("x"), s = this.props.contextmenu ? this.client.getX() : this.coordinates.getRight() + e, n = this.props.contextmenu ? this.client.getX() : this.coordinates.getLeft() - e, o = [];
844
- this.getAxis() === "x" ? o.push(s, n) : o.push(n, s), this.x = this.calculationInner(
845
- o[0],
846
- o[1],
847
- t.offsetWidth,
848
- window.innerWidth,
849
- this.coordinates.getWidth()
850
- );
851
- }
852
- return this;
853
- }
854
- /**
855
- * Changes in position along the Y coordinate.
856
- *
857
- * Изменения положения по координате Y.
858
- */
859
- setY() {
860
- const t = this.element.getMain();
861
- if (t) {
862
- const e = this.getIndent("y"), s = this.props.contextmenu ? this.client.getY() : this.coordinates.getTop() - e, n = this.props.contextmenu ? this.client.getY() : this.coordinates.getBottom() + e, o = [];
863
- if (this.isOver())
864
- return this.y = this.calculationOver(
865
- this.getOverHeight(s, n),
866
- s,
867
- n,
868
- t.offsetHeight,
869
- window.innerHeight
870
- ), this;
871
- this.getAxis() !== "x" ? o.push(n, s) : o.push(s, n), this.y = this.calculationInner(
872
- o[0],
873
- o[1],
874
- t.offsetHeight,
875
- window.innerHeight,
876
- this.coordinates.getHeight()
877
- );
878
- }
879
- return this;
880
- }
881
- /**
882
- * Calculation of the element's position.
883
- *
884
- * Вычисление положения элемента.
885
- * @param inValue initial values/ начальные значения
886
- * @param outValue final values/ конечные значения
887
- * @param length length of the object/ длина объекта
888
- * @param innerLength length of the indentation/ длина отступа
889
- * @param maxSize maximum length/ максимальная длина
890
- */
891
- calculationInner(t, e, s, n, o) {
892
- const r = this.coordinates.getPadding();
893
- return t + s <= n - r ? t : e - s > r ? e - s : n / 2 - o / 2;
894
- }
895
- /**
896
- * Calculation of the element's position.
897
- *
898
- * Вычисление положения над элемента.
899
- * @param value initial values/ начальные значения
900
- * @param top high control coordinates/ высокие координаты контрола
901
- * @param bottom lower control coordinates/ нижние координаты контрола
902
- * @param length length of the object/ длина объекта
903
- * @param innerLength length of the indentation/ длина отступа
904
- */
905
- calculationOver(t, e, s, n, o) {
906
- const r = this.coordinates.getPadding();
907
- if (s < r)
908
- return s;
909
- if (e > o - r) {
910
- const a = e - n - r;
911
- return a < r ? r : a;
912
- }
913
- return t < r ? r : t + n <= o - r ? t : o - n - r;
914
- }
915
- }
916
- class Ct {
917
- /**
918
- * Constructor
919
- * @param client object for working with mouse pointer coordinates/ объект для работы с координатами указателя мыши
920
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
921
- * @param position object for working with the position of the element/ объект для работы с положением элемента
922
- */
923
- constructor(t, e, s) {
924
- i(this, "x", null);
925
- i(this, "y", null);
926
- this.client = t, this.element = e, this.position = s;
927
- }
928
- /**
929
- * Returns the initial X point for the start of the animation.
930
- *
931
- * Возвращает начальную точку X для начала анимации.
932
- */
933
- getStyleX() {
934
- return this.x !== null ? `${this.x}px` : null;
935
- }
936
- /**
937
- * Returns the initial Y point for the start of the animation.
938
- *
939
- * Возвращает начальную точку Y для начала анимации.
940
- */
941
- getStyleY() {
942
- return this.y !== null ? `${this.y}px` : null;
943
- }
944
- /**
945
- * Updating the initial position of the element for the animation.
946
- *
947
- * Обновление начального положения элемента для анимации.
948
- */
949
- update() {
950
- const t = this.element.getMain();
951
- if (this.client.update(), !this.client.is())
952
- this.x = 0, this.y = 0;
953
- else if (t && getComputedStyle(t).getPropertyValue(b).includes("--MENU--")) {
954
- const e = this.element.getBodyRect();
955
- e && (this.x = this.client.getShiftX(e.left), this.y = this.client.getShiftY(e.top));
956
- } else
957
- this.x = this.client.getShiftX(this.position.getX()), this.y = this.client.getShiftY(this.position.getY());
958
- return this;
959
- }
960
- /**
961
- * Resets all data to initial values.
962
- *
963
- * Сбрасывает все данные к начальным значениям.
964
- */
965
- reset() {
966
- return this.x = null, this.y = null, this;
967
- }
968
- }
969
- class xt {
970
- /**
971
- * Constructor
972
- * @param props input data/ входные данные
973
- * @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
974
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
975
- */
976
- constructor(t, e, s) {
977
- i(this, "event");
978
- i(this, "item", v(!1));
979
- /**
980
- * The function called when an event is triggered.
981
- *
982
- * Вызываемая функция при срабатывании события.
983
- */
984
- i(this, "listener", () => {
985
- tt(this.item, this.isStatic());
986
- });
987
- /**
988
- * Performs status check and activates events when turned on.
989
- *
990
- * Выполняет проверку статуса и активизирует события при включении.
991
- */
992
- i(this, "make", () => {
993
- this.isStaticMod() ? (this.start(), requestAnimationFrame(this.listener)) : this.stop();
994
- });
995
- this.props = t, this.element = s, f([e.staticMode], this.make, { immediate: !0 });
996
- }
997
- /**
998
- * Checks if the static mode is enabled.
999
- *
1000
- * Проверяет, включен ли режим статичности.
1001
- */
1002
- isStaticMod() {
1003
- return !!this.props.staticMode;
1004
- }
1005
- /**
1006
- * Starts the status tracking event.
1007
- *
1008
- * Стартует событие слежения за статусами.
1009
- */
1010
- start() {
1011
- this.event || (this.event = new I(window, ["resize"], this.listener)), this.event.start();
1012
- }
1013
- /**
1014
- * Restores the data to its previous state.
1015
- *
1016
- * Восстанавливает данные в прежнее состояние.
1017
- */
1018
- stop() {
1019
- this.event && (this.event.stop(), this.event = void 0);
1020
- }
1021
- /**
1022
- * Checks if the static window is active.
1023
- *
1024
- * Проверяет, активно ли статичное окно.
1025
- */
1026
- isStatic() {
1027
- const t = this.element.getMain();
1028
- return !!(t && getComputedStyle(t).getPropertyValue(b).includes("--STATIC--"));
1029
- }
1030
- }
1031
- class Bt {
1032
- /**
1033
- * Constructor
1034
- * @param classes an object for working with classes and searching for elements/ объект для работы с классами и поиском элементов
1035
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
1036
- * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
1037
- */
1038
- constructor(t, e, s) {
1039
- this.classes = t, this.element = e, this.emits = s;
1040
- }
1041
- /**
1042
- * Perform events.
1043
- *
1044
- * Выполнить события.
1045
- * @param open current state of the window/ текущее состояние окна
1046
- */
1047
- on(t) {
1048
- var e;
1049
- (e = this.emits) == null || e.call(this, "window", this.getEmitOptions(t));
1050
- }
1051
- /**
1052
- * Returns an object for calling the event handler.
1053
- *
1054
- * Возвращает объект для вызова обработчика события.
1055
- * @param open current state of the window/ текущее состояние окна
1056
- */
1057
- getEmitOptions(t) {
1058
- return {
1059
- id: this.classes.getId(),
1060
- element: this.element.getMain(),
1061
- control: this.element.getControl(),
1062
- open: t
1063
- };
1064
- }
1065
- }
1066
- class Mt {
1067
- /**
1068
- * Constructor
1069
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
1070
- * @param coordinates object for working with coordinates/ объект для работы с координатами
1071
- * @param position object for working with the position of the element/ объект для работы с положением элемента
1072
- * @param origin the object for work is in the initial position upon opening/ объект для работы в начальной позиции при открытии
1073
- * @param className class name/ название класса
1074
- */
1075
- constructor(t, e, s, n, o) {
1076
- this.element = t, this.coordinates = e, this.position = s, this.origin = n, this.className = o, f(this.element.element, () => this.update());
1077
- }
1078
- /**
1079
- * Data update.
1080
- *
1081
- * Обновление данных.
1082
- */
1083
- update() {
1084
- const t = this.element.getMain();
1085
- t && (t.style.setProperty(`--${this.className}-sys-inset-x`, this.position.getStyleX()), t.style.setProperty(`--${this.className}-sys-inset-y`, this.position.getStyleY()), t.style.setProperty(`--${this.className}-origin-x`, this.origin.getStyleX()), t.style.setProperty(`--${this.className}-origin-y`, this.origin.getStyleY()), t.style.setProperty(`--${this.className}-sys-control-width`, `${this.coordinates.getControlWidth()}px`), t.style.setProperty(`--${this.className}-sys-control-height`, `${this.coordinates.getControlHeight()}px`), t.style.setProperty(`--${this.className}-sys-location`, this.coordinates.getLocation()));
1086
- }
1087
- /**
1088
- * Updates the window type (menu or modal).
1089
- *
1090
- * Обновляет тип окна (меню или модальное).
1091
- * @param isMenu whether the window is a menu/ является ли окно меню
1092
- */
1093
- updateType(t) {
1094
- const e = this.element.getMain();
1095
- if (e && (t && e.dataset.windowMenu !== "menu" || !t && e.dataset.windowMenu === "menu")) {
1096
- const s = e.parentElement;
1097
- e.dataset.windowMenu = t ? "menu" : "modal", s && s.dataset.windowTeleport && (s.dataset.windowMenu = e.dataset.windowMenu);
1098
- }
1099
- }
1100
- }
1101
- class kt {
1102
- /**
1103
- * Constructor
1104
- * @param props input data/ входные данные
1105
- * @param client object for working with mouse pointer coordinates/ объект для работы с координатами указателя мыши
1106
- * @param hook object for working with hooks/ объект для работы с хуками
1107
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
1108
- * @param tabIndex class object for working with tab indices/ объект класса для работы с табуляцией
1109
- * @param status object for working with statuses/ объект для работы со статусами
1110
- * @param flash class object for working with fast window opening/ объект класса для работы с быстрым открытием окна
1111
- * @param coordinates object for working with coordinates/ объект для работы с координатами
1112
- * @param position object for working with the position of the element/ объект для работы с положением элемента
1113
- * @param origin the object for work is in the initial position upon opening/ объект для работы в начальной позиции при открытии
1114
- * @param emit the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
1115
- * @param styles an object for working with the styles of an element/ объект для работы со стилями элемента
1116
- */
1117
- constructor(t, e, s, n, o, r, a, l, d, u, C, x) {
1118
- i(this, "item", v(!1));
1119
- i(this, "first", v(!1));
1120
- i(this, "clicks", 0);
1121
- /**
1122
- * Checks whether the element should be kept in the DOM.
1123
- *
1124
- * Проверяет, надо ли элемент оставить в DOM.
1125
- */
1126
- i(this, "inDom", m(() => this.item.value || this.props.staticMode || !!this.props.inDom && this.first.value));
1127
- /**
1128
- * Changes the current state.
1129
- *
1130
- * Изменяет текущее состояние.
1131
- * @param open the value of the current state/ значение текущего состояния
1132
- */
1133
- i(this, "set", async (t) => {
1134
- this.item.value !== !!t && await this.toggle();
1135
- });
1136
- /**
1137
- * Opens the window.
1138
- *
1139
- * Открывает окно.
1140
- */
1141
- i(this, "open", async () => this.set(!0));
1142
- /**
1143
- * Closes the window.
1144
- *
1145
- * Закрывает окно.
1146
- */
1147
- i(this, "close", async () => this.set(!1));
1148
- /**
1149
- * Switches the state, that is, opens or closes the window, depending on the value of item.
1150
- *
1151
- * Переключает состояние, то есть открывает или закрывает окно, в зависимости от значения item.
1152
- */
1153
- i(this, "toggle", async () => {
1154
- if (this.clicks > 1)
1155
- return;
1156
- const t = !this.item.value;
1157
- await this.hook.before(t) && (t ? (this.reset(), this.status.toDisplay(), await this.setOpen(t), requestAnimationFrame(async () => {
1158
- this.status.update(), await this.hook.preparation(), await this.watchPosition(), this.styles.updateType(!0), requestAnimationFrame(async () => {
1159
- this.position.updateScroll(), this.status.toPreparation(), requestAnimationFrame(async () => {
1160
- this.flash.isClose() ? this.status.toFlash() : this.status.toOpen(), requestAnimationFrame(() => {
1161
- this.hook.opening(), this.resetClicks(), this.props.embedded || this.tabIndex.goTo();
1162
- }), this.emit.on(this.item.value);
1163
- });
1164
- });
1165
- })) : (this.client.reset(), this.flash.isOpen() ? this.toClose() : requestAnimationFrame(() => {
1166
- this.status.toHide(), this.resetClicks();
1167
- })));
1168
- });
1169
- this.props = t, this.client = e, this.hook = s, this.element = n, this.tabIndex = o, this.status = r, this.flash = a, this.coordinates = l, this.position = d, this.origin = u, this.emit = C, this.styles = x;
1170
- }
1171
- /**
1172
- * Checks if the window is open.
1173
- *
1174
- * Проверяет, открыто ли окно.
1175
- */
1176
- isClicks() {
1177
- return this.clicks > 0;
1178
- }
1179
- /**
1180
- * Close handler on animation end.
1181
- *
1182
- * Обработчик закрытия по окончании анимации.
1183
- */
1184
- closeForEvent() {
1185
- this.status.isHide() ? this.toClose() : this.status.isOpen() || this.hook.closing().then();
1186
- }
1187
- /**
1188
- * Resets all data to initial values.
1189
- *
1190
- * Сбрасывает все данные к начальным значениям.
1191
- */
1192
- reset() {
1193
- return this.coordinates.reset(), this.origin.reset(), this;
1194
- }
1195
- /**
1196
- * The method increases the number of clicks.
1197
- *
1198
- * Метод увеличивает количество кликов.
1199
- */
1200
- pressed() {
1201
- return this.clicks++, setTimeout(() => this.resetClicks(), 128), this;
1202
- }
1203
- /**
1204
- * The method resets the number of clicks.
1205
- *
1206
- * Метод сбрасывает количество кликов.
1207
- */
1208
- resetClicks() {
1209
- return this.clicks = 0, this;
1210
- }
1211
- /**
1212
- * The method updates the current position.
1213
- *
1214
- * Метод обновляет текущее положение.
1215
- */
1216
- async watchPosition() {
1217
- this.item.value && this.element.isMain() ? (this.position.update(), this.position.updateBody(), this.styles.update(), this.origin.update(), this.styles.update(), this.watchCoordinates()) : this.reset();
1218
- }
1219
- /**
1220
- * Changes values and triggers events.
1221
- *
1222
- * Изменяет значения и вызывает события.
1223
- * @param open the value of the current state/ значение текущего состояния
1224
- */
1225
- async setOpen(t) {
1226
- return this.item.value = t, t && !this.first.value && (this.first.value = !0), this;
1227
- }
1228
- /**
1229
- * Changing the location of the menu window.
1230
- *
1231
- * Изменение расположения окна меню.
1232
- */
1233
- watchCoordinates() {
1234
- return et(
1235
- () => {
1236
- const t = this.element.getMain();
1237
- if (t) {
1238
- const e = getComputedStyle(t).getPropertyValue(b).includes("--MENU--");
1239
- e && this.position.update() && this.styles.update(), this.styles.updateType(e);
1240
- }
1241
- },
1242
- () => this.item.value && !this.status.isHide()
1243
- ), this;
1244
- }
1245
- /**
1246
- * Transition to the closing state.
1247
- *
1248
- * Переход в состояние закрытия.
1249
- */
1250
- toClose() {
1251
- setTimeout(async () => {
1252
- await this.setOpen(!1), await this.hook.closing(), this.resetClicks(), this.tabIndex.reset(), this.emit.on(this.item.value);
1253
- }, 48), this.status.toClose();
1254
- }
1255
- }
1256
- class It {
1257
- /**
1258
- * Constructor
1259
- * @param props input data/ входные данные
1260
- * @param persistent object for working with the animation before turning off the window/ объект для работы с анимацией перед выключением окна
1261
- * @param classes an object for working with classes and searching for elements/ объект для работы с классами и поиском элементов
1262
- * @param element an object of the class for working with elements/ объект класса для работы с элементами
1263
- * @param staticMode class object for working with static status/ объект класса для работы со статическим статусом
1264
- * @param open the class object for working with the status of closing or opening the window/ объект класса для работы со статусом закрытия или открытия окна
1265
- */
1266
- constructor(t, e, s, n, o, r) {
1267
- i(this, "target");
1268
- i(this, "focus");
1269
- this.props = t, this.persistent = e, this.classes = s, this.element = n, this.staticMode = o, this.open = r;
1270
- }
1271
- /**
1272
- * Updates the window opening status.
1273
- *
1274
- * Обновления статус открытия окно.
1275
- * @param target the selected window/ выбранное окно
1276
- */
1277
- async update(t) {
1278
- if (!this.open.isClicks() && (this.target = t, this.focus = this.getFocus(), !!B() && this.isTargetInBody() && !this.staticMode.item.value))
1279
- if (this.open.pressed(), this.open.item.value) {
1280
- if (this.isOpenOnly() || this.isBlockOther())
1281
- return;
1282
- this.isContextmenu() ? await this.open.reset().watchPosition() : this.focus ? this.isFocus() ? this.isTarget() ? this.isNotBlockChildren() && (this.persistent.on() || await this.open.toggle()) : (this.isClose() || this.isAutoClose() || !this.isChildren()) && await this.open.toggle() : this.isNotBlock() && (this.isChildren() ? setTimeout(() => {
1283
- requestAnimationFrame(async () => {
1284
- var e;
1285
- ["open", "flash"].indexOf(((e = this.focus) == null ? void 0 : e.dataset.status) || "") === -1 && this.isMenu() && await this.open.toggle();
1286
- });
1287
- }, 40) : await this.open.toggle()) : await this.open.toggle();
1288
- } else this.isEnabled() && await this.open.toggle();
1289
- }
1290
- /**
1291
- * Returns the element in focus.
1292
- *
1293
- * Возвращает элемент в фокусе.
1294
- */
1295
- getFocus() {
1296
- return this.classes.findMain(this.getTarget());
1297
- }
1298
- getTarget() {
1299
- var t, e;
1300
- return (e = (t = this.target) != null ? t : this.element.getMain()) != null ? e : document.body;
1301
- }
1302
- /**
1303
- * Checks if the selected element is in focus.
1304
- *
1305
- * Проверяет, находится ли выбранный элемент в фокусе.
1306
- */
1307
- isFocus() {
1308
- return this.element.getMain() === this.focus;
1309
- }
1310
- /**
1311
- * Checks if the target element is the window itself.
1312
- *
1313
- * Проверяет, является ли элемент-цель самим окном.
1314
- */
1315
- isTarget() {
1316
- return this.element.getMain() === this.target;
1317
- }
1318
- isTargetInBody() {
1319
- var t;
1320
- return !!((t = this.target) != null && t.closest("body"));
1321
- }
1322
- /**
1323
- * Checks if the selected window is under other windows.
1324
- *
1325
- * Проверяет, находится ли выбранное окно под другими окнами.
1326
- * @param target the selected window/ выбранное окно
1327
- */
1328
- isChildren(t = this.getTarget()) {
1329
- const e = this.classes.findMain(t);
1330
- if (e) {
1331
- if (e.dataset.window === this.classes.getId())
1332
- return !0;
1333
- const s = this.classes.findControlByElement(e);
1334
- if (s)
1335
- return this.isChildren(s);
1336
- }
1337
- return !1;
1338
- }
1339
- /**
1340
- * Checks if the window is enabled or if the conditions for opening the window are met.
1341
- *
1342
- * Проверяет, включено ли окно или подходят ли условия для открытия окна.
1343
- */
1344
- isEnabled() {
1345
- return !this.props.disabled && !this.getTarget().closest(`.${this.classes.list.controlStatic}`);
1346
- }
1347
- /**
1348
- * Checks if the window needs to be closed automatically.
1349
- *
1350
- * Проверяет, нужно ли автоматически закрывать окно.
1351
- */
1352
- isAutoClose() {
1353
- return !!this.props.autoClose && !this.getTarget().closest(`.${this.classes.list.static}, .${this.classes.getId()} .${this.classes.list.control}`);
1354
- }
1355
- /**
1356
- * Checks if the change of the opening status of the window is blocked.
1357
- *
1358
- * Проверяет, заблокировано ли изменение статуса открытия окна.
1359
- */
1360
- isNotBlock() {
1361
- return this.isNotBlockItem(this.focus);
1362
- }
1363
- /**
1364
- * Checks if the change of the opening status of the window is blocked.
1365
- *
1366
- * Проверяет, заблокировано ли изменение статуса открытия окна.
1367
- * @param item element for testing/ элемент для проверки
1368
- */
1369
- isNotBlockItem(t) {
1370
- var s;
1371
- const e = this.getTarget();
1372
- return (!this.isMenu(e) || !this.classes.isWindow(e)) && !((s = this.classes.findControlByElement(t)) != null && s.closest(`.${this.classes.list.block}`));
1373
- }
1374
- /**
1375
- * Checks if there is an element with a close lock.
1376
- *
1377
- * Проверяет, есть ли элемент с блокировкой закрытия.
1378
- */
1379
- isNotBlockChildren() {
1380
- var t, e;
1381
- return !((t = this.classes.findBody()) != null && t.querySelector(`.${this.classes.list.blockChildren}`)) && !((e = this.classes.findBody()) != null && e.querySelector('[data-window-open="open"]'));
1382
- }
1383
- /**
1384
- * Checks if there is a blocking element from other windows.
1385
- *
1386
- * Проверяет, есть ли блокирующий элемент от других окон.
1387
- */
1388
- isBlockOther() {
1389
- return !!this.classes.findBodyOther(`.${this.classes.list.blockOther}`);
1390
- }
1391
- /**
1392
- * Checks if it needs to be opened when the right button is pressed.
1393
- *
1394
- * Проверяет, нужно ли открывать при нажатии правой кнопки.
1395
- */
1396
- isContextmenu() {
1397
- return !!(this.props.contextmenu && this.getTarget().closest(this.classes.getSelectorControl()));
1398
- }
1399
- /**
1400
- * Checks if the window can be closed.
1401
- *
1402
- * Проверяет, можно ли закрыть окно.
1403
- */
1404
- isClose() {
1405
- return !!this.getTarget().closest(`.${this.classes.list.close}:not(.${this.classes.list.static})`);
1406
- }
1407
- /**
1408
- * Checks if the element is a menu.
1409
- *
1410
- * Проверяет, является ли элемент меню.
1411
- */
1412
- isMenu(t = this.element.getMain()) {
1413
- if (t) {
1414
- const s = getComputedStyle(t).getPropertyValue(b);
1415
- return s.includes("--MENU--") || s.includes("--MENU-WINDOW--");
1416
- }
1417
- return !1;
1418
- }
1419
- /**
1420
- * Checks if the element should only open.
1421
- *
1422
- * Проверяет, должен ли элемент только открываться.
1423
- */
1424
- isOpenOnly() {
1425
- return !!this.getTarget().closest(`.${this.classes.list.controlOpenOnly}`);
1426
- }
1427
- }
1428
- class St {
1429
- /**
1430
- * Constructor
1431
- * @param props input data/ входные данные
1432
- * @param tabIndex class object for working with tab indices/ объект класса для работы с табуляцией
1433
- * @param status object for working with statuses/ объект для работы со статусами
1434
- * @param client object for working with mouse pointer coordinates/ объект для работы с координатами указателя мыши
1435
- * @param flash class object for working with fast window opening/ объект класса для работы с быстрым открытием окна
1436
- * @param open the class object for working with the status of closing or opening the window/ объект класса для работы со статусом закрытия или открытия окна
1437
- * @param verification an object for working with the check for changing the status of opening or closing/ объект для работы с проверкой изменения статуса открытия или закрытия
1438
- */
1439
- constructor(t, e, s, n, o, r, a) {
1440
- i(this, "event");
1441
- /**
1442
- * Events of pressing a control element.
1443
- *
1444
- * События нажатия на элемент управления.
1445
- * @param event event object/ объект события
1446
- */
1447
- i(this, "onClick", async (t) => {
1448
- this.props.contextmenu || await this.on(t);
1449
- });
1450
- /**
1451
- * Events of pressing a key.
1452
- *
1453
- * События нажатия на клавишу.
1454
- * @param event event object/ объект события
1455
- */
1456
- i(this, "onKeydown", async (t) => {
1457
- (st(t) || this.isArrowDown(t)) && (t.preventDefault(), await this.onClick(t));
1458
- });
1459
- /**
1460
- * Events of pressing the right mouse button on a control element.
1461
- *
1462
- * События нажатия на правую кнопку мыши на элемент управления.
1463
- * @param event event object/ объект события
1464
- */
1465
- i(this, "onContextmenu", async (t) => {
1466
- this.props.contextmenu && (t.preventDefault(), await this.on(t));
1467
- });
1468
- /**
1469
- * Event of animation end when closing the window.
1470
- *
1471
- * Событие окончания анимации при закрытии окна.
1472
- */
1473
- i(this, "onTransition", () => this.open.closeForEvent());
1474
- /**
1475
- * Callback of the event when pressing any area for checking and changing the opening state.
1476
- *
1477
- * Callback события при нажатии на любую область для проверки и изменения состояния открытия.
1478
- * @param event event instance/ экземпляр события
1479
- */
1480
- i(this, "onGlobal", async (t) => {
1481
- (!t || t.type === "click" && (!this.props.contextmenu || this.open.item.value) || t.type === "contextmenu" && this.props.contextmenu) && (this.open.item.value ? (this.flash.setControl(t == null ? void 0 : t.target), await this.verification.update(t == null ? void 0 : t.target)) : this.event.stop());
1482
- });
1483
- this.props = t, this.tabIndex = e, this.status = s, this.client = n, this.flash = o, this.open = r, this.verification = a, this.event = new I(
1484
- "body",
1485
- ["click", "contextmenu"],
1486
- this.onGlobal
1487
- ), f(
1488
- [
1489
- this.open.item,
1490
- this.status.item
1491
- ],
1492
- () => this.toggle()
1493
- );
1494
- }
1495
- /**
1496
- * Starts listening to global events.
1497
- *
1498
- * Стартует прослушивание глобальных событий.
1499
- */
1500
- start() {
1501
- return this.props.embedded || this.event.start(), this;
1502
- }
1503
- /**
1504
- * Stop the global event.
1505
- *
1506
- * Остановить глобальное событие.
1507
- */
1508
- stop() {
1509
- return this.event.stop(), this;
1510
- }
1511
- /**
1512
- * Changes the event listening status depending on the window's open status.
1513
- *
1514
- * Изменяет статус прослушивания события в зависимости от статуса открытия окна.
1515
- */
1516
- toggle() {
1517
- return this.open.item.value && this.status.isOpen() ? this.start() : this.stop(), this;
1518
- }
1519
- /**
1520
- * Checks if the down arrow key is pressed.
1521
- *
1522
- * Проверяет, нажата ли стрелка вниз.
1523
- * @param event event object/ объект события
1524
- */
1525
- isArrowDown(t) {
1526
- return !!(this.props.openOnArrowDown && (t.code === "ArrowDown" || t.key === "ArrowDown" || t.key === "Down" || t.keyCode === 40));
1527
- }
1528
- /**
1529
- * Event activation.
1530
- *
1531
- * Активация события.
1532
- * @param event event object/ объект события
1533
- */
1534
- async on(t) {
1535
- this.tabIndex.updateOldElement(), this.client.set(
1536
- it(t),
1537
- nt(t)
1538
- ), await this.verification.update(t.target);
1539
- }
1540
- }
1541
- class Wt {
1542
- /**
1543
- * Constructor
1544
- * @param props input data / входные данные
1545
- * @param classes an object for working with class names / объект для работы с названиями классов
1546
- * @param staticMode class object for working with static status / объект класса для работы со статическим статусом
1547
- * @param open an object for working with the open state of the window / объект для работы с состоянием открытия окна
1548
- */
1549
- constructor(t, e, s, n) {
1550
- i(this, "elements", []);
1551
- this.props = t, this.classes = e, this.staticMode = s, this.open = n, f(
1552
- this.open.item,
1553
- (o) => {
1554
- this.props.embedded || this.staticMode.item.value || (o ? this.toHidden() : this.toShow());
1555
- },
1556
- {
1557
- immediate: !0
1558
- }
1559
- );
1560
- }
1561
- /**
1562
- * Returns the aria attribute data for hiding elements.
1563
- *
1564
- * Возвращает данные aria-атрибута для скрытия элементов.
1565
- */
1566
- getAriaData() {
1567
- const t = w.hidden(), e = Object.keys(t)[0], s = Object.values(t)[0];
1568
- return {
1569
- key: e,
1570
- value: s
1571
- };
1572
- }
1573
- /**
1574
- * Finds all elements outside the window that need to be hidden.
1575
- *
1576
- * Находит все элементы вне окна, которые нужно скрыть.
1577
- */
1578
- findElements() {
1579
- if (B()) {
1580
- const t = this.classes.getId();
1581
- return document.querySelectorAll(
1582
- `body > *:not([data-window-teleport="${t}"]):not(.${t}):not(script):not(style)`
1583
- );
1584
- }
1585
- }
1586
- /**
1587
- * Hides elements outside the window by adding aria-hidden attribute.
1588
- *
1589
- * Скрывает элементы вне окна, добавляя атрибут aria-hidden.
1590
- */
1591
- toHidden() {
1592
- const t = this.findElements();
1593
- if (t) {
1594
- const e = this.getAriaData();
1595
- this.elements = [], t.forEach((s) => {
1596
- s.hasAttribute(e.key) || s.hasAttribute("inert") || (s.setAttribute(e.key, e.value), this.classes.isWindowOrTeleport(s) || s.setAttribute("inert", ""), this.elements.push(s));
1597
- });
1598
- } else
1599
- this.elements = [];
1600
- }
1601
- /**
1602
- * Shows previously hidden elements by removing aria-hidden attribute.
1603
- *
1604
- * Показывает ранее скрытые элементы, удаляя атрибут aria-hidden.
1605
- */
1606
- toShow() {
1607
- const t = this.getAriaData();
1608
- this.elements.forEach((e) => {
1609
- e.removeAttribute(t.key), e.removeAttribute("inert");
1610
- }), this.elements = [];
1611
- }
1612
- }
1613
- class Tt {
1614
- /**
1615
- * Constructor
1616
- * @param props input data/ входные данные
1617
- * @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
1618
- * @param element input element/ элемент ввода
1619
- * @param classDesign design name/ название дизайна
1620
- * @param className class name/ название класса
1621
- * @param components object for working with components/ объект для работы с компонентами
1622
- * @param slots object for working with slots/ объект для работы со слотами
1623
- * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
1624
- * @param WindowClassesConstructor class for working with window classes/ класс для работы с классами окна
1625
- * @param WindowClientConstructor class for working with window client/ класс для работы с клиентом окна
1626
- * @param WindowCoordinatesConstructor class for working with coordinates/ класс для работы с координатами
1627
- * @param WindowElementConstructor class for working with window elements/ класс для работы с элементами окна
1628
- * @param WindowEmitConstructor class for working with emits/ класс для работы с событиями
1629
- * @param WindowEscConstructor class for working with escape key/ класс для работы с клавишей Escape
1630
- * @param WindowEventConstructor class for working with events/ класс для работы с событиями
1631
- * @param WindowFlashConstructor class for working with flash animation/ класс для работы с анимацией вспышки
1632
- * @param WindowHiddenConstructor class for working with hidden elements/ класс для работы со скрытыми элементами
1633
- * @param WindowHookConstructor class for working with window hooks/ класс для работы с хуками окна
1634
- * @param WindowOpenConstructor class for working with open state/ класс для работы с состоянием открытия
1635
- * @param WindowOriginConstructor class for working with origin/ класс для работы с точкой начала
1636
- * @param WindowPersistentConstructor class for working with persistent state/ класс для работы с постоянным состоянием
1637
- * @param WindowPositionConstructor class for working with position/ класс для работы с позицией
1638
- * @param WindowStaticConstructor class for working with static mode/ класс для работы со статическим режимом
1639
- * @param WindowStatusConstructor class for working with window status/ класс для работы со статусом окна
1640
- * @param WindowStylesConstructor class for working with styles/ класс для работы со стилями
1641
- * @param WindowVerificationConstructor class for working with verification/ класс для работы с проверкой
1642
- * @param ImageConstructor class for working with image/ класс для работы с изображением
1643
- * @param ModelConstructor class for working with model/ класс для работы с моделью
1644
- * @param ScrollbarConstructor class for working with scrollbar/ класс для работы со скроллбаром
1645
- * @param TabIndexConstructor class for working with tab index/ класс для работы с индексом табуляции
1646
- * @param TextConstructor class for working with text/ класс для работы с текстом
1647
- */
1648
- constructor(t, e, s, n, o, r, a, l, d = lt, u = pt, C = vt, x = mt, S = Bt, W = ct, T = St, O = wt, E = Wt, H = gt, A = kt, D = Ct, $ = yt, N = bt, P = xt, R = ft, L = Mt, Y = It, F = ut, X = rt, _ = dt, q = ht, U = at) {
1649
- /** Client instance for window management/ Экземпляр клиента для управления окном */
1650
- i(this, "client");
1651
- /** Hook instance for window events/ Экземпляр хука для событий окна */
1652
- i(this, "hook");
1653
- /** Class manager for window styles/ Менеджер классов для стилей окна */
1654
- i(this, "classes");
1655
- /** Element manager for window DOM element/ Менеджер элементов для DOM элемента окна */
1656
- i(this, "element");
1657
- i(this, "tabIndex");
1658
- /** Status manager for window state/ Менеджер статуса для состояния окна */
1659
- i(this, "status");
1660
- /** Persistent manager for window data/ Менеджер постоянных данных для окна */
1661
- i(this, "persistent");
1662
- /** Flash manager for window animations/ Менеджер анимаций для окна */
1663
- i(this, "flash");
1664
- /** Coordinates manager for window positioning/ Менеджер координат для позиционирования окна */
1665
- i(this, "coordinates");
1666
- /** Position manager for window placement/ Менеджер позиции для размещения окна */
1667
- i(this, "position");
1668
- /** Origin manager for window transformations/ Менеджер начальной точки для трансформаций окна */
1669
- i(this, "origin");
1670
- /** Static mode manager for window behavior/ Менеджер статического режима для поведения окна */
1671
- i(this, "staticMode");
1672
- /** Emit manager for window events/ Менеджер событий для окна */
1673
- i(this, "emit");
1674
- /** Styles manager for window appearance/ Менеджер стилей для внешнего вида окна */
1675
- i(this, "styles");
1676
- /** Open manager for window visibility/ Менеджер открытия для видимости окна */
1677
- i(this, "open");
1678
- /** Verification manager for window state validation/ Менеджер проверки для валидации состояния окна */
1679
- i(this, "verification");
1680
- /** Event manager for window interactions/ Менеджер событий для взаимодействий с окном */
1681
- i(this, "event");
1682
- /** Scrollbar manager for window content/ Менеджер скроллбара для содержимого окна */
1683
- i(this, "scrollbar");
1684
- /** Image manager for window content/ Менеджер изображений для содержимого окна */
1685
- i(this, "image");
1686
- /** Escape key manager for window closing/ Менеджер клавиши Escape для закрытия окна */
1687
- i(this, "esc");
1688
- i(this, "text");
1689
- /** Hidden manager for hiding elements outside the window when open/ Менеджер скрытия элементов вне окна при открытии */
1690
- i(this, "hidden");
1691
- /** Returns data for managing slot data/ Возвращает данные для управления данными слотами */
1692
- i(this, "slotData", m(() => ({
1693
- classesWindow: this.classes.list,
1694
- class: this.classes.list.controlId,
1695
- open: this.open.item,
1696
- onclick: this.event.onClick,
1697
- onKeydown: this.event.onKeydown,
1698
- oncontextmenu: this.event.onContextmenu,
1699
- binds: {
1700
- class: this.classes.list.controlId,
1701
- onclick: this.event.onClick,
1702
- onKeydown: this.event.onKeydown,
1703
- oncontextmenu: this.event.onContextmenu,
1704
- ...w.control(
1705
- this.classes.getControlId(),
1706
- this.open.inDom.value ? this.classes.getId() : void 0,
1707
- this.props.ariaHaspopup,
1708
- this.open.item.value
1709
- )
1710
- }
1711
- })));
1712
- /**
1713
- * Returns the list of available classes.
1714
- *
1715
- * Возвращает список доступных классов.
1716
- */
1717
- i(this, "classesList", m(() => ({
1718
- [this.classes.getId()]: !0,
1719
- [`${this.className}--staticMode`]: this.staticMode.item.value,
1720
- [`${this.className}--embedded`]: !!this.props.embedded
1721
- })));
1722
- /**
1723
- * Restores the data to its previous state.
1724
- *
1725
- * Восстанавливает данные в прежнее состояние.
1726
- */
1727
- i(this, "stop", () => {
1728
- this.event.stop(), this.staticMode.stop();
1729
- });
1730
- this.props = t, this.refs = e, this.classDesign = n, this.className = o, this.components = r, this.slots = a, this.emits = l, this.hook = new H(t), this.classes = new d(o), this.element = new x(this.classes, s), this.client = new u(this.element), this.tabIndex = new q(
1731
- () => this.element.getBody(),
1732
- void 0,
1733
- () => !!this.props.autoTabIndex
1734
- ), this.status = new R(this.element), this.persistent = new $(t, this.classes, this.element), this.flash = new O(t, this.classes), this.coordinates = new C(this.classes, this.element), this.position = new N(t, this.client, this.element, this.coordinates), this.origin = new D(this.client, this.element, this.position), this.staticMode = new P(t, e, this.element), this.emit = new S(this.classes, this.element, l), this.styles = new L(
1735
- this.element,
1736
- this.coordinates,
1737
- this.position,
1738
- this.origin,
1739
- o
1740
- ), this.open = new A(
1741
- t,
1742
- this.client,
1743
- this.hook,
1744
- this.element,
1745
- this.tabIndex,
1746
- this.status,
1747
- this.flash,
1748
- this.coordinates,
1749
- this.position,
1750
- this.origin,
1751
- this.emit,
1752
- this.styles
1753
- ), this.verification = new Y(
1754
- t,
1755
- this.persistent,
1756
- this.classes,
1757
- this.element,
1758
- this.staticMode,
1759
- this.open
1760
- ), this.event = new T(
1761
- t,
1762
- this.tabIndex,
1763
- this.status,
1764
- this.client,
1765
- this.flash,
1766
- this.open,
1767
- this.verification
1768
- ), this.scrollbar = new _(
1769
- t,
1770
- o,
1771
- r,
1772
- l
1773
- ), this.image = new F(
1774
- t,
1775
- r,
1776
- l
1777
- ), this.esc = new W(
1778
- this.open.item,
1779
- () => this.open.close(),
1780
- () => {
1781
- var M;
1782
- return !this.props.persistent && ((M = this.props.closeOnEsc) != null ? M : !0);
1783
- }
1784
- ), this.text = new U(this.props), this.hidden = new E(
1785
- this.props,
1786
- this.classes,
1787
- this.staticMode,
1788
- this.open
1789
- ), new X("open", this.emits, this.open.item), K(() => {
1790
- f([e.open], () => this.open.set(t.open), { immediate: !0 });
1791
- }), j(this.stop);
1792
- }
1793
- /** Checks if the role is a menu/ Проверяет, является ли роль меню */
1794
- isMenu() {
1795
- return this.props.role === "menu" || this.props.role === "menuitemcheckbox" || this.props.role === "menuitemradio";
1796
- }
1797
- }
1798
- const Lt = {
1799
- indent: 4,
1800
- ariaHaspopup: "dialog",
1801
- role: "dialog",
1802
- autoTabIndex: !0,
1803
- closeOnEsc: !0,
1804
- // :default [!] System label / Системная метка
1805
- axis: "y",
1806
- imagePosition: "top",
1807
- overscroll: !0
1808
- };
1809
- class Yt extends ot {
1810
- /**
1811
- * Constructor
1812
- * @param name class name/ название класса
1813
- * @param props properties/ свойства
1814
- * @param options list of additional parameters/ список дополнительных параметров
1815
- * @param ItemConstructor window item class/ класс элемента окна
1816
- */
1817
- constructor(e, s, n, o = Tt) {
1818
- super(
1819
- e,
1820
- s,
1821
- n
1822
- );
1823
- i(this, "item");
1824
- /**
1825
- * Render main window element.
1826
- *
1827
- * Рендер главного элемента окна.
1828
- */
1829
- i(this, "renderMain", () => p(
1830
- "div",
1831
- this.propsMain.value,
1832
- this.renderBody()
1833
- ));
1834
- /**
1835
- * Render body element.
1836
- *
1837
- * Рендер элемента тела.
1838
- */
1839
- i(this, "renderBody", () => {
1840
- var e, s;
1841
- return p(
1842
- "div",
1843
- {
1844
- key: "body",
1845
- ...this.getAttrs(),
1846
- class: {
1847
- [String((e = this.classes) == null ? void 0 : e.value.body)]: !0,
1848
- ...this.toClass((s = this.attrs) == null ? void 0 : s.class)
1849
- }
1850
- },
1851
- [
1852
- ...this.renderBodyImage(),
1853
- ...this.renderBodyClose(),
1854
- ...this.renderBodyGroup()
1855
- ]
1856
- );
1857
- });
1858
- /**
1859
- * Generates an element to group the displayed data.
1860
- *
1861
- * Генерирует элемент для группировки выводимых данных.
1862
- */
1863
- i(this, "renderBodyGroup", () => {
1864
- var s;
1865
- const e = [];
1866
- return this.initSlot("title", e, this.item.slotData.value), e.push(this.renderBodyContext()), this.initSlot("footer", e, this.item.slotData.value), [
1867
- p("div", {
1868
- key: "group",
1869
- class: (s = this.classes) == null ? void 0 : s.value.bodyGroup
1870
- }, e)
1871
- ];
1872
- });
1873
- /**
1874
- * Render context element.
1875
- *
1876
- * Рендер элемента контекста.
1877
- */
1878
- i(this, "renderBodyContext", () => {
1879
- var e;
1880
- return this.item.scrollbar.render(
1881
- "div",
1882
- {
1883
- key: "bodyContext",
1884
- class: (e = this.classes) == null ? void 0 : e.value.bodyContext,
1885
- divider: this.props.divider,
1886
- "data-window-body": "1"
1887
- },
1888
- () => this.initSlot("default", void 0, this.item.slotData.value)
1889
- );
1890
- });
1891
- /**
1892
- * Generates an element to display the image.
1893
- *
1894
- * Генерирует элемент для вывода изображения
1895
- */
1896
- i(this, "renderBodyImage", () => {
1897
- var e;
1898
- return this.props.image ? [p(
1899
- "div",
1900
- {
1901
- key: "image",
1902
- class: (e = this.classes) == null ? void 0 : e.value.image
1903
- },
1904
- this.item.image.render()
1905
- )] : [];
1906
- });
1907
- /**
1908
- * Generates an element to display the close button.
1909
- *
1910
- * Генерирует элемент для вывода кнопки закрытия.
1911
- */
1912
- i(this, "renderBodyClose", () => {
1913
- var e;
1914
- return this.props.closeButton ? this.components.render(
1915
- "button",
1916
- {
1917
- key: "button-close",
1918
- class: [
1919
- (e = this.classes) == null ? void 0 : e.value.close,
1920
- this.item.classes.list.close
1921
- ],
1922
- icon: this.props.iconClose,
1923
- ...w.label(this.item.text.close.value)
1924
- }
1925
- ) : [];
1926
- });
1927
- /**
1928
- * Props for the main element.
1929
- *
1930
- * Свойства для главного элемента.
1931
- */
1932
- i(this, "propsMain", m(() => {
1933
- var s, n;
1934
- const e = {
1935
- key: "main",
1936
- ref: this.element,
1937
- class: (s = this.classes) == null ? void 0 : s.value.main,
1938
- style: (n = this.styles) == null ? void 0 : n.value,
1939
- "data-window": this.item.classes.getId(),
1940
- onTransitionend: this.item.event.onTransition
1941
- };
1942
- return this.item.staticMode.isStaticMod() ? e : {
1943
- ...e,
1944
- ...w.role(this.props.role),
1945
- ...w.modal(
1946
- !0,
1947
- this.props.ariaLabelledby,
1948
- this.props.ariaDescribedby
1949
- )
1950
- };
1951
- }));
1952
- this.item = new o(
1953
- this.props,
1954
- this.refs,
1955
- this.element,
1956
- this.getDesign(),
1957
- this.getName(),
1958
- this.components,
1959
- this.slots,
1960
- this.emits
1961
- ), this.init();
1962
- }
1963
- /**
1964
- * Initialization of all the necessary properties for work
1965
- *
1966
- * Инициализация всех необходимых свойств для работы.
1967
- */
1968
- initExpose() {
1969
- return {
1970
- id: this.item.classes.getId(),
1971
- open: this.item.open.item,
1972
- setOpen: this.item.open.set,
1973
- toOpen: this.item.open.open,
1974
- toClose: this.item.open.close,
1975
- toggle: this.item.open.toggle,
1976
- control: this.item.slotData
1977
- };
1978
- }
1979
- /**
1980
- * Improvement of the obtained list of classes.
1981
- *
1982
- * Доработка полученного списка классов.
1983
- */
1984
- initClasses() {
1985
- return {
1986
- main: this.item.classesList.value,
1987
- // :classes [!] System label / Системная метка
1988
- body: this.getSubClass("body"),
1989
- bodyGroup: this.getSubClass("body__group"),
1990
- bodyContext: this.getSubClass("body__context"),
1991
- control: this.getSubClass("control"),
1992
- image: this.getSubClass("image"),
1993
- close: this.getSubClass("close"),
1994
- teleport: this.getSubClass("teleport")
1995
- };
1996
- }
1997
- /**
1998
- * Refinement of the received list of styles.
1999
- *
2000
- * Доработка полученного списка стилей.
2001
- */
2002
- initStyles() {
2003
- return {};
2004
- }
2005
- /**
2006
- * A method for rendering.
2007
- *
2008
- * Метод для рендеринга.
2009
- */
2010
- initRender() {
2011
- var s;
2012
- const e = [];
2013
- return this.initSlot("control", e, this.item.slotData.value), this.item.open.inDom.value && (this.item.staticMode.item.value || this.props.embedded ? e.push(this.renderMain()) : e.push(
2014
- p(
2015
- Z,
2016
- {
2017
- key: "teleport",
2018
- to: "body"
2019
- },
2020
- p(
2021
- "div",
2022
- {
2023
- class: (s = this.classes) == null ? void 0 : s.value.teleport,
2024
- "data-window-teleport": this.item.classes.getId()
2025
- },
2026
- this.renderMain()
2027
- )
2028
- )
2029
- )), e;
2030
- }
2031
- }
2032
- export {
2033
- Tt as Window,
2034
- _t as WindowClassesInclude,
2035
- Yt as WindowDesign,
2036
- Ut as WindowInclude,
2037
- Lt as defaultsWindow
1
+ import { t as e } from "./AriaStaticInclude-CS1hPGyK.js";
2
+ import { t } from "./defineProperty-hmGKPWdq.js";
3
+ import { t as n } from "./TextInclude-OwyVCAbS.js";
4
+ import { t as r } from "./ModelInclude-D8LkrhPp.js";
5
+ import { t as i } from "./TabIndexInclude-DLSfl7-6.js";
6
+ import { t as a } from "./WindowEsc-vBFI8pVr.js";
7
+ import { t as o } from "./ScrollbarInclude-B4_ZIqkW.js";
8
+ import { t as s } from "./ImageInclude-CP-Q4R20.js";
9
+ import { a as c, i as l, n as u, r as d, t as f } from "./WindowClassesInclude-zm-ITw5d.js";
10
+ import { t as p } from "./WindowInclude-GF4aSfrJ.js";
11
+ import { Teleport as m, computed as h, h as g, onMounted as _, onUnmounted as v, ref as y, watch as b } from "vue";
12
+ import { DesignConstructorAbstract as x, EventItem as S, executePromise as C, frame as w, getElement as T, getMouseClientX as E, getMouseClientY as D, isDomRuntime as O, isEnter as k, setRef as A } from "@dxtmisha/functional";
13
+ //#region src/constructors/Window/WindowClient.ts
14
+ var j = -1, M = class {
15
+ constructor(e) {
16
+ t(this, "x", j), t(this, "y", j), this.element = e;
17
+ }
18
+ is() {
19
+ return this.x !== j && this.y !== j;
20
+ }
21
+ isZero() {
22
+ return this.x === 0 && this.y === 0;
23
+ }
24
+ getX() {
25
+ return this.x;
26
+ }
27
+ getY() {
28
+ return this.y;
29
+ }
30
+ getShiftX(e) {
31
+ return this.x - e;
32
+ }
33
+ getShiftY(e) {
34
+ return this.y - e;
35
+ }
36
+ set(e, t) {
37
+ return this.x = e, this.y = t, this;
38
+ }
39
+ reset() {
40
+ return this.x = j, this.y = j, this;
41
+ }
42
+ update() {
43
+ if (this.is() && this.isZero()) {
44
+ let e = this.element.getControlRect();
45
+ e && this.set(e.left + e.width / 2, e.top + e.height / 2);
46
+ }
47
+ return this;
48
+ }
49
+ }, N = class {
50
+ constructor(e) {
51
+ this.props = e;
52
+ }
53
+ async preparation() {
54
+ this.props.preparation && await C(this.props.preparation);
55
+ }
56
+ async before(e) {
57
+ return e ? await this.beforeOpening() : await this.beforeClosing();
58
+ }
59
+ async beforeOpening() {
60
+ return this.props.beforeOpening ? await C(this.props.beforeOpening) : !0;
61
+ }
62
+ async beforeClosing() {
63
+ return this.props.beforeClosing ? await C(this.props.beforeClosing) : !0;
64
+ }
65
+ async after(e) {
66
+ return e ? await this.opening() : await this.closing();
67
+ }
68
+ async opening() {
69
+ return this.props.opening ? await C(this.props.opening) : !1;
70
+ }
71
+ async closing() {
72
+ return this.props.closing ? await C(this.props.closing) : !1;
73
+ }
74
+ }, P = class {
75
+ constructor(e, t) {
76
+ this.classes = e, this.element = t;
77
+ }
78
+ isMain() {
79
+ return !!this.element.value;
80
+ }
81
+ getMain() {
82
+ return this.element.value;
83
+ }
84
+ getControl() {
85
+ return this.classes.findControl();
86
+ }
87
+ getControlRect() {
88
+ var e;
89
+ return ((e = this.getControl()) == null ? void 0 : e.getBoundingClientRect()) || void 0;
90
+ }
91
+ getBody() {
92
+ return this.classes.findBody();
93
+ }
94
+ getBodyRect() {
95
+ var e;
96
+ return ((e = this.getBody()) == null ? void 0 : e.getBoundingClientRect()) || void 0;
97
+ }
98
+ getBodyContext() {
99
+ return this.classes.findBodyContext();
100
+ }
101
+ }, F = class {
102
+ constructor(e) {
103
+ t(this, "item", y(l.close)), this.element = e;
104
+ }
105
+ isHide() {
106
+ return this.item.value === l.hide;
107
+ }
108
+ isOpen() {
109
+ return this.item.value === l.open || this.item.value === l.flash;
110
+ }
111
+ set(e) {
112
+ return this.item.value = e, this.update(), this;
113
+ }
114
+ toDisplay() {
115
+ return this.set(l.display), this;
116
+ }
117
+ toPreparation() {
118
+ return this.set(l.preparation), this;
119
+ }
120
+ toFlash() {
121
+ return this.set(l.flash), this;
122
+ }
123
+ toOpen() {
124
+ return this.set(l.open), this;
125
+ }
126
+ toHide() {
127
+ return this.set(l.hide), this;
128
+ }
129
+ toClose() {
130
+ return this.set(l.close), this;
131
+ }
132
+ update() {
133
+ let e = this.element.getMain();
134
+ if (e) {
135
+ let t = e.parentElement;
136
+ e.dataset.status = this.item.value, t && t.dataset.windowTeleport && (t.dataset.status = this.item.value);
137
+ }
138
+ }
139
+ }, I = class {
140
+ constructor(e, n, r) {
141
+ t(this, "item", y(!1)), t(this, "onTransitionend", () => {
142
+ this.removeEvent(), this.disabled();
143
+ }), this.props = e, this.classes = n, this.element = r, b(this.item, (e) => {
144
+ let t = this.element.getMain();
145
+ t && (e ? (this.removeEvent(), t.classList.add(this.classes.list.persistent), t.addEventListener("animationend", this.onTransitionend)) : t.classList.remove(this.classes.list.persistent));
146
+ });
147
+ }
148
+ on() {
149
+ return this.props.persistent ? (this.item.value = !0, !0) : !1;
150
+ }
151
+ disabled() {
152
+ return this.item.value && (this.item.value = !1), this;
153
+ }
154
+ removeEvent() {
155
+ var e;
156
+ (e = this.element.getMain()) == null || e.removeEventListener("animationend", this.onTransitionend);
157
+ }
158
+ }, L = class {
159
+ constructor(e, n) {
160
+ t(this, "control", !1), this.props = e, this.classes = n;
161
+ }
162
+ is() {
163
+ return !!this.props.flash;
164
+ }
165
+ isOpen() {
166
+ return this.is() || this.control;
167
+ }
168
+ isClose() {
169
+ return this.is() || !!document.querySelector(`.${this.classes.getClassStatus(l.hide)}`);
170
+ }
171
+ setControl(e) {
172
+ var t;
173
+ return this.control = (e == null || (t = e.closest(`.${this.classes.list.control}`)) == null ? void 0 : t.dataset.window) === this.classes.getId(), this;
174
+ }
175
+ }, R = class {
176
+ constructor(e, n) {
177
+ t(this, "top", 0), t(this, "right", 0), t(this, "bottom", 0), t(this, "left", 0), t(this, "width", 0), t(this, "height", 0), t(this, "innerWidth", 0), t(this, "innerHeight", 0), t(this, "controlWidth", 0), t(this, "controlHeight", 0), t(this, "padding", 0), t(this, "location", ""), this.classes = e, this.element = n;
178
+ }
179
+ getTop() {
180
+ return this.top;
181
+ }
182
+ getRight() {
183
+ return this.right;
184
+ }
185
+ getBottom() {
186
+ return this.bottom;
187
+ }
188
+ getLeft() {
189
+ return this.left;
190
+ }
191
+ getWidth() {
192
+ return this.width;
193
+ }
194
+ getHeight() {
195
+ return this.height;
196
+ }
197
+ getInnerWidth() {
198
+ return this.innerWidth;
199
+ }
200
+ getInnerHeight() {
201
+ return this.innerHeight;
202
+ }
203
+ getControlWidth() {
204
+ return this.controlWidth;
205
+ }
206
+ getControlHeight() {
207
+ return this.controlHeight;
208
+ }
209
+ getPadding() {
210
+ return this.padding;
211
+ }
212
+ getLocation() {
213
+ return this.location;
214
+ }
215
+ getMaxHeight() {
216
+ return window.innerHeight - this.padding * 2;
217
+ }
218
+ update() {
219
+ let e = this.element.getMain(), t = this.element.getControlRect();
220
+ return e && t && (this.top !== t.top || this.right !== t.right || this.bottom !== t.bottom || this.left !== t.left || this.width !== e.offsetWidth || this.height !== e.offsetHeight || this.innerWidth !== window.innerWidth || this.innerHeight !== window.innerHeight) ? (this.top = t.top, this.right = t.right, this.bottom = t.bottom, this.left = t.left, this.width = e.offsetWidth, this.height = e.offsetHeight, this.innerWidth = window.innerWidth, this.innerHeight = window.innerHeight, this.controlWidth = t.width, this.controlHeight = t.height, this.padding = this.initPadding(), this.location = this.initLocation(t.top + t.height / 2), !0) : !1;
221
+ }
222
+ reset() {
223
+ return this.top = 0, this.right = 0, this.bottom = 0, this.left = 0, this.width = 0, this.height = 0, this.innerWidth = 0, this.innerHeight = 0, this;
224
+ }
225
+ initPadding() {
226
+ let e = this.element.getMain(), t = 0;
227
+ if (e) {
228
+ let n = getComputedStyle(e), r = n.paddingTop.replace(/[^0-9]+/g, ""), i = n.paddingBottom.replace(/[^0-9]+/g, "");
229
+ t = (parseInt(r) + parseInt(i)) / 2;
230
+ }
231
+ return t > 0 ? t : 16;
232
+ }
233
+ initLocation(e) {
234
+ var t, n;
235
+ let r = (t = (n = this.element.getBody()) == null ? void 0 : n.offsetHeight) == null ? 0 : t, i = r / 2, a = this.innerHeight - this.padding * 2 - r, o = e - i - this.padding;
236
+ return o < this.padding ? "0px" : e + i >= this.innerHeight - this.padding ? `${a}px` : `${o}px`;
237
+ }
238
+ }, z = class {
239
+ constructor(e, n, r, i) {
240
+ t(this, "x", 0), t(this, "y", 0), this.props = e, this.client = n, this.element = r, this.coordinates = i;
241
+ }
242
+ isOver() {
243
+ return this.props.axis === "on";
244
+ }
245
+ getX() {
246
+ return this.x;
247
+ }
248
+ getY() {
249
+ return this.y;
250
+ }
251
+ getStyleX() {
252
+ return `${this.x}px`;
253
+ }
254
+ getStyleY() {
255
+ return `${this.y}px`;
256
+ }
257
+ update() {
258
+ return this.coordinates.update() ? (this.setX(), this.setY(), !0) : !1;
259
+ }
260
+ updateScroll() {
261
+ let e = this.element.getBodyContext();
262
+ if (this.isOver() && this.props.overElement && e && e.scrollHeight > e.offsetHeight) {
263
+ var t, n, r;
264
+ let i = (t = T(this.props.overElement)) == null ? void 0 : t.getBoundingClientRect(), a = (n = this.element.getBody()) == null ? void 0 : n.getBoundingClientRect(), o = e == null ? void 0 : e.getBoundingClientRect(), s = (r = this.element.getControl()) == null ? void 0 : r.getBoundingClientRect();
265
+ if (e && i && a && o) {
266
+ let t = i.height / 2, n = i.top - o.top;
267
+ if (s && this.coordinates.getMaxHeight() === a.height) {
268
+ if (s.top + t < a.top) {
269
+ e.scrollTop += n;
270
+ return;
271
+ }
272
+ if (s.bottom - t > a.bottom) {
273
+ e.scrollTop += n - o.height + i.height;
274
+ return;
275
+ }
276
+ e.scrollTop += n - (s.top - o.top) - s.height / 2 + t;
277
+ return;
278
+ }
279
+ e.scrollTop += n - o.height / 2 + t;
280
+ }
281
+ }
282
+ }
283
+ updateBody() {
284
+ if (O()) {
285
+ let e = document.body, t = e.offsetHeight > window.innerHeight ? "scroll" : "none";
286
+ e.dataset.scroll !== t && (e.dataset.scroll = t);
287
+ }
288
+ }
289
+ getAxis() {
290
+ var e, t;
291
+ return this.isOver() || (e = (t = this.props) == null ? void 0 : t.axis) == null ? "y" : e;
292
+ }
293
+ getIndent(e) {
294
+ var t;
295
+ return this.getAxis() === e ? (t = this.props.indent) == null ? 4 : t : 0;
296
+ }
297
+ getOverHeight(e, t) {
298
+ let n = (t - e) / 2;
299
+ if (this.props.overElement) {
300
+ var r, i;
301
+ let e = (r = T(this.props.overElement)) == null ? void 0 : r.getBoundingClientRect(), a = (i = this.element.getBody()) == null ? void 0 : i.getBoundingClientRect();
302
+ if (e && a) {
303
+ let r = e.top - a.top, i = e.height / 2;
304
+ return t - r - i - n;
305
+ }
306
+ }
307
+ let a = this.coordinates.getHeight() / 2;
308
+ return t - n - a;
309
+ }
310
+ setX() {
311
+ let e = this.element.getMain();
312
+ if (e) {
313
+ let t = this.getIndent("x"), n = this.props.contextmenu ? this.client.getX() : this.coordinates.getRight() + t, r = this.props.contextmenu ? this.client.getX() : this.coordinates.getLeft() - t, i = [];
314
+ this.getAxis() === "x" ? i.push(n, r) : i.push(r, n), this.x = this.calculationInner(i[0], i[1], e.offsetWidth, window.innerWidth, this.coordinates.getWidth());
315
+ }
316
+ return this;
317
+ }
318
+ setY() {
319
+ let e = this.element.getMain();
320
+ if (e) {
321
+ let t = this.getIndent("y"), n = this.props.contextmenu ? this.client.getY() : this.coordinates.getTop() - t, r = this.props.contextmenu ? this.client.getY() : this.coordinates.getBottom() + t, i = [];
322
+ if (this.isOver()) return this.y = this.calculationOver(this.getOverHeight(n, r), n, r, e.offsetHeight, window.innerHeight), this;
323
+ this.getAxis() === "x" ? i.push(n, r) : i.push(r, n), this.y = this.calculationInner(i[0], i[1], e.offsetHeight, window.innerHeight, this.coordinates.getHeight());
324
+ }
325
+ return this;
326
+ }
327
+ calculationInner(e, t, n, r, i) {
328
+ let a = this.coordinates.getPadding();
329
+ return e + n <= r - a ? e : t - n > a ? t - n : r / 2 - i / 2;
330
+ }
331
+ calculationOver(e, t, n, r, i) {
332
+ let a = this.coordinates.getPadding();
333
+ if (n < a) return n;
334
+ if (t > i - a) {
335
+ let e = t - r - a;
336
+ return e < a ? a : e;
337
+ }
338
+ return e < a ? a : e + r <= i - a ? e : i - r - a;
339
+ }
340
+ }, B = class {
341
+ constructor(e, n, r) {
342
+ t(this, "x", null), t(this, "y", null), this.client = e, this.element = n, this.position = r;
343
+ }
344
+ getStyleX() {
345
+ return this.x === null ? null : `${this.x}px`;
346
+ }
347
+ getStyleY() {
348
+ return this.y === null ? null : `${this.y}px`;
349
+ }
350
+ update() {
351
+ let e = this.element.getMain();
352
+ if (this.client.update(), !this.client.is()) this.x = 0, this.y = 0;
353
+ else if (e && getComputedStyle(e).getPropertyValue("--sys-type-body").includes("--MENU--")) {
354
+ let e = this.element.getBodyRect();
355
+ e && (this.x = this.client.getShiftX(e.left), this.y = this.client.getShiftY(e.top));
356
+ } else this.x = this.client.getShiftX(this.position.getX()), this.y = this.client.getShiftY(this.position.getY());
357
+ return this;
358
+ }
359
+ reset() {
360
+ return this.x = null, this.y = null, this;
361
+ }
362
+ }, V = class {
363
+ constructor(e, n, r) {
364
+ t(this, "event", void 0), t(this, "item", y(!1)), t(this, "listener", () => {
365
+ A(this.item, this.isStatic());
366
+ }), t(this, "make", () => {
367
+ this.isStaticMod() ? (this.start(), requestAnimationFrame(this.listener)) : this.stop();
368
+ }), this.props = e, this.element = r, b([n.staticMode], this.make, { immediate: !0 });
369
+ }
370
+ isStaticMod() {
371
+ return !!this.props.staticMode;
372
+ }
373
+ start() {
374
+ this.event || (this.event = new S(window, ["resize"], this.listener)), this.event.start();
375
+ }
376
+ stop() {
377
+ this.event && (this.event.stop(), this.event = void 0);
378
+ }
379
+ isStatic() {
380
+ let e = this.element.getMain();
381
+ return !!(e && getComputedStyle(e).getPropertyValue("--sys-type-body").includes("--STATIC--"));
382
+ }
383
+ }, H = class {
384
+ constructor(e, t, n) {
385
+ this.classes = e, this.element = t, this.emits = n;
386
+ }
387
+ on(e) {
388
+ var t;
389
+ (t = this.emits) == null || t.call(this, "window", this.getEmitOptions(e));
390
+ }
391
+ getEmitOptions(e) {
392
+ return {
393
+ id: this.classes.getId(),
394
+ element: this.element.getMain(),
395
+ control: this.element.getControl(),
396
+ open: e
397
+ };
398
+ }
399
+ }, U = class {
400
+ constructor(e, t, n, r, i) {
401
+ this.element = e, this.coordinates = t, this.position = n, this.origin = r, this.className = i, b(this.element.element, () => this.update());
402
+ }
403
+ update() {
404
+ let e = this.element.getMain();
405
+ e && (e.style.setProperty(`--${this.className}-sys-inset-x`, this.position.getStyleX()), e.style.setProperty(`--${this.className}-sys-inset-y`, this.position.getStyleY()), e.style.setProperty(`--${this.className}-origin-x`, this.origin.getStyleX()), e.style.setProperty(`--${this.className}-origin-y`, this.origin.getStyleY()), e.style.setProperty(`--${this.className}-sys-control-width`, `${this.coordinates.getControlWidth()}px`), e.style.setProperty(`--${this.className}-sys-control-height`, `${this.coordinates.getControlHeight()}px`), e.style.setProperty(`--${this.className}-sys-location`, this.coordinates.getLocation()));
406
+ }
407
+ updateType(e) {
408
+ let t = this.element.getMain();
409
+ if (t && (e && t.dataset.windowMenu !== "menu" || !e && t.dataset.windowMenu === "menu")) {
410
+ let n = t.parentElement;
411
+ t.dataset.windowMenu = e ? "menu" : "modal", n && n.dataset.windowTeleport && (n.dataset.windowMenu = t.dataset.windowMenu);
412
+ }
413
+ }
414
+ }, W = class {
415
+ constructor(e, n, r, i, a, o, s, c, l, u, d, f) {
416
+ t(this, "item", y(!1)), t(this, "first", y(!1)), t(this, "clicks", 0), t(this, "inDom", h(() => this.item.value || this.props.staticMode || !!this.props.inDom && this.first.value)), t(this, "set", async (e) => {
417
+ this.item.value !== !!e && await this.toggle();
418
+ }), t(this, "open", async () => this.set(!0)), t(this, "close", async () => this.set(!1)), t(this, "toggle", async () => {
419
+ if (this.clicks > 1) return;
420
+ let e = !this.item.value;
421
+ await this.hook.before(e) && (e ? (this.reset(), this.status.toDisplay(), await this.setOpen(e), requestAnimationFrame(async () => {
422
+ this.status.update(), await this.hook.preparation(), await this.watchPosition(), this.styles.updateType(!0), requestAnimationFrame(async () => {
423
+ this.position.updateScroll(), this.status.toPreparation(), requestAnimationFrame(async () => {
424
+ this.flash.isClose() ? this.status.toFlash() : this.status.toOpen(), requestAnimationFrame(() => {
425
+ this.hook.opening(), this.resetClicks(), this.props.embedded || this.tabIndex.goTo();
426
+ }), this.emit.on(this.item.value);
427
+ });
428
+ });
429
+ })) : (this.client.reset(), this.flash.isOpen() ? this.toClose() : requestAnimationFrame(() => {
430
+ this.status.toHide(), this.resetClicks();
431
+ })));
432
+ }), this.props = e, this.client = n, this.hook = r, this.element = i, this.tabIndex = a, this.status = o, this.flash = s, this.coordinates = c, this.position = l, this.origin = u, this.emit = d, this.styles = f;
433
+ }
434
+ isClicks() {
435
+ return this.clicks > 0;
436
+ }
437
+ closeForEvent() {
438
+ this.status.isHide() ? this.toClose() : this.status.isOpen() || this.hook.closing().then();
439
+ }
440
+ reset() {
441
+ return this.coordinates.reset(), this.origin.reset(), this;
442
+ }
443
+ pressed() {
444
+ return this.clicks++, setTimeout(() => this.resetClicks(), 128), this;
445
+ }
446
+ resetClicks() {
447
+ return this.clicks = 0, this;
448
+ }
449
+ async watchPosition() {
450
+ this.item.value && this.element.isMain() ? (this.position.update(), this.position.updateBody(), this.styles.update(), this.origin.update(), this.styles.update(), this.watchCoordinates()) : this.reset();
451
+ }
452
+ async setOpen(e) {
453
+ return this.item.value = e, e && !this.first.value && (this.first.value = !0), this;
454
+ }
455
+ watchCoordinates() {
456
+ return w(() => {
457
+ let e = this.element.getMain();
458
+ if (e) {
459
+ let t = getComputedStyle(e).getPropertyValue(c).includes("--MENU--");
460
+ t && this.position.update() && this.styles.update(), this.styles.updateType(t);
461
+ }
462
+ }, () => this.item.value && !this.status.isHide()), this;
463
+ }
464
+ toClose() {
465
+ setTimeout(async () => {
466
+ await this.setOpen(!1), await this.hook.closing(), this.resetClicks(), this.tabIndex.reset(), this.emit.on(this.item.value);
467
+ }, 48), this.status.toClose();
468
+ }
469
+ }, G = class {
470
+ constructor(e, n, r, i, a, o) {
471
+ t(this, "target", void 0), t(this, "focus", void 0), this.props = e, this.persistent = n, this.classes = r, this.element = i, this.staticMode = a, this.open = o;
472
+ }
473
+ async update(e) {
474
+ if (!this.open.isClicks() && (this.target = e, this.focus = this.getFocus(), O() && this.isTargetInBody() && !this.staticMode.item.value)) if (this.open.pressed(), this.open.item.value) {
475
+ if (this.isOpenOnly() || this.isBlockOther()) return;
476
+ this.isContextmenu() ? await this.open.reset().watchPosition() : this.focus ? this.isFocus() ? this.isTarget() ? this.isNotBlockChildren() && (this.persistent.on() || await this.open.toggle()) : (this.isClose() || this.isAutoClose() || !this.isChildren()) && await this.open.toggle() : this.isNotBlock() && (this.isChildren() ? setTimeout(() => {
477
+ requestAnimationFrame(async () => {
478
+ var e;
479
+ ["open", "flash"].indexOf(((e = this.focus) == null ? void 0 : e.dataset.status) || "") === -1 && this.isMenu() && await this.open.toggle();
480
+ });
481
+ }, 40) : await this.open.toggle()) : await this.open.toggle();
482
+ } else this.isEnabled() && await this.open.toggle();
483
+ }
484
+ getFocus() {
485
+ return this.classes.findMain(this.getTarget());
486
+ }
487
+ getTarget() {
488
+ var e, t;
489
+ return (e = (t = this.target) == null ? this.element.getMain() : t) == null ? document.body : e;
490
+ }
491
+ isFocus() {
492
+ return this.element.getMain() === this.focus;
493
+ }
494
+ isTarget() {
495
+ return this.element.getMain() === this.target;
496
+ }
497
+ isTargetInBody() {
498
+ var e;
499
+ return !!((e = this.target) != null && e.closest("body"));
500
+ }
501
+ isChildren(e = this.getTarget()) {
502
+ let t = this.classes.findMain(e);
503
+ if (t) {
504
+ if (t.dataset.window === this.classes.getId()) return !0;
505
+ let e = this.classes.findControlByElement(t);
506
+ if (e) return this.isChildren(e);
507
+ }
508
+ return !1;
509
+ }
510
+ isEnabled() {
511
+ return !this.props.disabled && !this.getTarget().closest(`.${this.classes.list.controlStatic}`);
512
+ }
513
+ isAutoClose() {
514
+ return !!this.props.autoClose && !this.getTarget().closest(`.${this.classes.list.static}, .${this.classes.getId()} .${this.classes.list.control}`);
515
+ }
516
+ isNotBlock() {
517
+ return this.isNotBlockItem(this.focus);
518
+ }
519
+ isNotBlockItem(e) {
520
+ var t;
521
+ let n = this.getTarget();
522
+ return (!this.isMenu(n) || !this.classes.isWindow(n)) && !((t = this.classes.findControlByElement(e)) != null && t.closest(`.${this.classes.list.block}`));
523
+ }
524
+ isNotBlockChildren() {
525
+ var e, t;
526
+ return !((e = this.classes.findBody()) != null && e.querySelector(`.${this.classes.list.blockChildren}`)) && !((t = this.classes.findBody()) != null && t.querySelector("[data-window-open=\"open\"]"));
527
+ }
528
+ isBlockOther() {
529
+ if (this.target) {
530
+ var e;
531
+ let t = this.classes.findMain(this.target);
532
+ if (t && (t === this.element.getMain() || (e = this.classes.findControl()) != null && e.closest(`[data-window="${t.dataset.window}"]`))) return !1;
533
+ }
534
+ return !!this.classes.findBodyOther(`.${this.classes.list.blockOther}`);
535
+ }
536
+ isContextmenu() {
537
+ return !!(this.props.contextmenu && this.getTarget().closest(this.classes.getSelectorControl()));
538
+ }
539
+ isClose() {
540
+ return !!this.getTarget().closest(`.${this.classes.list.close}:not(.${this.classes.list.static})`);
541
+ }
542
+ isMenu(e = this.element.getMain()) {
543
+ if (e) {
544
+ let t = getComputedStyle(e).getPropertyValue(c);
545
+ return t.includes("--MENU--") || t.includes("--MENU-WINDOW--");
546
+ }
547
+ return !1;
548
+ }
549
+ isOpenOnly() {
550
+ return !!this.getTarget().closest(`.${this.classes.list.controlOpenOnly}`);
551
+ }
552
+ }, K = class {
553
+ constructor(e, n, r, i, a, o, s) {
554
+ t(this, "event", void 0), t(this, "onClick", async (e) => {
555
+ this.props.contextmenu || await this.on(e);
556
+ }), t(this, "onKeydown", async (e) => {
557
+ (k(e, !1) || this.isArrowDown(e)) && (e.preventDefault(), await this.onClick(e));
558
+ }), t(this, "onContextmenu", async (e) => {
559
+ this.props.contextmenu && (e.preventDefault(), await this.on(e));
560
+ }), t(this, "onTransition", () => this.open.closeForEvent()), t(this, "onGlobal", async (e) => {
561
+ (!e || e.type === "click" && (!this.props.contextmenu || this.open.item.value) || e.type === "contextmenu" && this.props.contextmenu) && (this.open.item.value ? (this.flash.setControl(e == null ? void 0 : e.target), await this.verification.update(e == null ? void 0 : e.target)) : this.event.stop());
562
+ }), this.props = e, this.tabIndex = n, this.status = r, this.client = i, this.flash = a, this.open = o, this.verification = s, this.event = new S("body", ["click", "contextmenu"], this.onGlobal), b([this.open.item, this.status.item], () => this.toggle());
563
+ }
564
+ start() {
565
+ return this.props.embedded || this.event.start(), this;
566
+ }
567
+ stop() {
568
+ return this.event.stop(), this;
569
+ }
570
+ toggle() {
571
+ return this.open.item.value && this.status.isOpen() ? this.start() : this.stop(), this;
572
+ }
573
+ isArrowDown(e) {
574
+ return !!(this.props.openOnArrowDown && (e.code === "ArrowDown" || e.key === "ArrowDown" || e.key === "Down" || e.keyCode === 40));
575
+ }
576
+ async on(e) {
577
+ this.tabIndex.updateOldElement(), this.client.set(E(e), D(e)), await this.verification.update(e.target);
578
+ }
579
+ }, q = 0, J = class {
580
+ constructor(e, n, r, i) {
581
+ t(this, "elements", []), this.props = e, this.classes = n, this.staticMode = r, this.open = i, b(this.open.item, (e) => {
582
+ !this.props.inert || this.props.embedded || this.staticMode.item.value || (e ? this.toHidden() : this.toShow());
583
+ }, { immediate: !0 });
584
+ }
585
+ getAriaData() {
586
+ let t = e.hidden();
587
+ return {
588
+ key: Object.keys(t)[0],
589
+ value: Object.values(t)[0]
590
+ };
591
+ }
592
+ findElements() {
593
+ if (O()) {
594
+ let e = this.classes.getId();
595
+ return document.querySelectorAll(`body > *:not([data-window-teleport="${e}"]):not(.${e}):not(script):not(style)`);
596
+ }
597
+ }
598
+ toHidden() {
599
+ q++;
600
+ let e = this.findElements();
601
+ if (e) {
602
+ let t = this.getAriaData();
603
+ this.elements = [], e.forEach((e) => {
604
+ e.hasAttribute(t.key) || e.hasAttribute("inert") || (e.setAttribute(t.key, t.value), this.classes.isWindowOrTeleport(e) || e.setAttribute("inert", ""), this.elements.push(e));
605
+ });
606
+ } else this.elements = [];
607
+ }
608
+ toShow() {
609
+ if (--q > 0) return;
610
+ let e = this.getAriaData();
611
+ this.elements.forEach((t) => {
612
+ t.removeAttribute(e.key), t.removeAttribute("inert");
613
+ }), this.elements = [];
614
+ }
615
+ }, Y = class {
616
+ constructor(c, l, d, f, p, m, g, y, x) {
617
+ t(this, "client", void 0), t(this, "hook", void 0), t(this, "classes", void 0), t(this, "element", void 0), t(this, "tabIndex", void 0), t(this, "status", void 0), t(this, "persistent", void 0), t(this, "flash", void 0), t(this, "coordinates", void 0), t(this, "position", void 0), t(this, "origin", void 0), t(this, "staticMode", void 0), t(this, "emit", void 0), t(this, "styles", void 0), t(this, "open", void 0), t(this, "verification", void 0), t(this, "event", void 0), t(this, "scrollbar", void 0), t(this, "image", void 0), t(this, "esc", void 0), t(this, "text", void 0), t(this, "hidden", void 0), t(this, "slotData", h(() => ({
618
+ classesWindow: this.classes.list,
619
+ class: this.classes.list.controlId,
620
+ open: this.open.item,
621
+ onclick: this.event.onClick,
622
+ onKeydown: this.event.onKeydown,
623
+ oncontextmenu: this.event.onContextmenu,
624
+ binds: {
625
+ class: this.classes.list.controlId,
626
+ onclick: this.event.onClick,
627
+ onKeydown: this.event.onKeydown,
628
+ oncontextmenu: this.event.onContextmenu,
629
+ ...e.control(this.classes.getControlId(), this.open.inDom.value ? this.classes.getId() : void 0, this.props.ariaHaspopup, this.open.item.value)
630
+ }
631
+ }))), t(this, "classesList", h(() => ({
632
+ [this.classes.getId()]: !0,
633
+ [`${this.className}--staticMode`]: this.staticMode.item.value,
634
+ [`${this.className}--embedded`]: !!this.props.embedded
635
+ }))), t(this, "stop", () => {
636
+ this.event.stop(), this.staticMode.stop();
637
+ }), this.props = c, this.refs = l, this.classDesign = f, this.className = p, this.components = m, this.slots = g, this.emits = y;
638
+ let { ImageConstructor: S = s, ModelConstructor: C = r, ScrollbarConstructor: w = o, TabIndexConstructor: T = i, TextConstructor: E = n, WindowClassesConstructor: D = u, WindowClientConstructor: O = M, WindowCoordinatesConstructor: k = R, WindowElementConstructor: A = P, WindowEmitConstructor: j = H, WindowEscConstructor: q = a, WindowEventConstructor: Y = K, WindowFlashConstructor: X = L, WindowHiddenConstructor: Z = J, WindowHookConstructor: Q = N, WindowOpenConstructor: $ = W, WindowOriginConstructor: ee = B, WindowPersistentConstructor: te = I, WindowPositionConstructor: ne = z, WindowStaticConstructor: re = V, WindowStatusConstructor: ie = F, WindowStylesConstructor: ae = U, WindowVerificationConstructor: oe = G } = x == null ? {} : x;
639
+ this.hook = new Q(c), this.classes = new D(p), this.element = new A(this.classes, d), this.client = new O(this.element), this.tabIndex = new T(() => this.element.getBody(), void 0, () => !!this.props.autoTabIndex), this.status = new ie(this.element), this.persistent = new te(c, this.classes, this.element), this.flash = new X(c, this.classes), this.coordinates = new k(this.classes, this.element), this.position = new ne(c, this.client, this.element, this.coordinates), this.origin = new ee(this.client, this.element, this.position), this.staticMode = new re(c, l, this.element), this.emit = new j(this.classes, this.element, y), this.styles = new ae(this.element, this.coordinates, this.position, this.origin, p), this.open = new $(c, this.client, this.hook, this.element, this.tabIndex, this.status, this.flash, this.coordinates, this.position, this.origin, this.emit, this.styles), this.verification = new oe(c, this.persistent, this.classes, this.element, this.staticMode, this.open), this.event = new Y(c, this.tabIndex, this.status, this.client, this.flash, this.open, this.verification), this.scrollbar = new w(c, p, m, y), this.image = new S(c, m, y), this.esc = new q(this.open.item, () => this.open.close(), () => {
640
+ var e;
641
+ return !this.props.persistent && ((e = this.props.closeOnEsc) == null ? !0 : e);
642
+ }), this.text = new E(this.props), this.hidden = new Z(this.props, this.classes, this.staticMode, this.open), new C("open", this.emits, this.open.item), _(() => {
643
+ b([l.open], () => this.open.set(c.open), { immediate: !0 });
644
+ }), v(this.stop);
645
+ }
646
+ isMenu() {
647
+ return this.props.role === "menu" || this.props.role === "menuitemcheckbox" || this.props.role === "menuitemradio";
648
+ }
649
+ }, X = {
650
+ indent: 4,
651
+ ariaHaspopup: "dialog",
652
+ role: "dialog",
653
+ inert: !0,
654
+ autoTabIndex: !0,
655
+ closeOnEsc: !0,
656
+ axis: "y",
657
+ imagePosition: "top",
658
+ overscroll: !0
659
+ }, Z = class extends x {
660
+ constructor(n, r, i, a = Y) {
661
+ super(n, r, i), t(this, "item", void 0), t(this, "renderMain", () => g("div", this.propsMain.value, this.renderBody())), t(this, "renderBody", () => {
662
+ var e, t;
663
+ return g("div", {
664
+ key: "body",
665
+ ...this.getAttrs(),
666
+ class: {
667
+ [String((e = this.classes) == null ? void 0 : e.value.body)]: !0,
668
+ ...this.toClass((t = this.attrs) == null ? void 0 : t.class)
669
+ }
670
+ }, [
671
+ ...this.renderBodyImage(),
672
+ ...this.renderBodyClose(),
673
+ ...this.renderBodyGroup()
674
+ ]);
675
+ }), t(this, "renderBodyGroup", () => {
676
+ var e;
677
+ let t = [];
678
+ return this.initSlot("title", t, this.item.slotData.value), t.push(this.renderBodyContext()), this.initSlot("footer", t, this.item.slotData.value), [g("div", {
679
+ key: "group",
680
+ class: (e = this.classes) == null ? void 0 : e.value.bodyGroup
681
+ }, t)];
682
+ }), t(this, "renderBodyContext", () => {
683
+ var e;
684
+ return this.item.scrollbar.render("div", {
685
+ key: "bodyContext",
686
+ class: (e = this.classes) == null ? void 0 : e.value.bodyContext,
687
+ divider: this.props.divider,
688
+ "data-window-body": "1"
689
+ }, () => this.initSlot("default", void 0, this.item.slotData.value));
690
+ }), t(this, "renderBodyImage", () => {
691
+ if (this.props.image) {
692
+ var e;
693
+ return [g("div", {
694
+ key: "image",
695
+ class: (e = this.classes) == null ? void 0 : e.value.image
696
+ }, this.item.image.render())];
697
+ }
698
+ return [];
699
+ }), t(this, "renderBodyClose", () => {
700
+ if (this.props.closeButton) {
701
+ var t;
702
+ return this.components.render("button", {
703
+ key: "button-close",
704
+ class: [(t = this.classes) == null ? void 0 : t.value.close, this.item.classes.list.close],
705
+ icon: this.props.iconClose,
706
+ ...e.label(this.item.text.close.value)
707
+ });
708
+ }
709
+ return [];
710
+ }), t(this, "propsMain", h(() => {
711
+ var t, n;
712
+ let r = {
713
+ key: "main",
714
+ ref: this.element,
715
+ class: (t = this.classes) == null ? void 0 : t.value.main,
716
+ style: (n = this.styles) == null ? void 0 : n.value,
717
+ "data-window": this.item.classes.getId(),
718
+ onTransitionend: this.item.event.onTransition
719
+ };
720
+ return this.item.staticMode.isStaticMod() ? r : {
721
+ ...r,
722
+ ...e.role(this.props.role),
723
+ ...e.modal(!0, this.props.ariaLabelledby, this.props.ariaDescribedby)
724
+ };
725
+ })), this.item = new a(this.props, this.refs, this.element, this.getDesign(), this.getName(), this.components, this.slots, this.emits), this.init();
726
+ }
727
+ initExpose() {
728
+ return {
729
+ id: this.item.classes.getId(),
730
+ open: this.item.open.item,
731
+ setOpen: this.item.open.set,
732
+ toOpen: this.item.open.open,
733
+ toClose: this.item.open.close,
734
+ toggle: this.item.open.toggle,
735
+ control: this.item.slotData
736
+ };
737
+ }
738
+ initClasses() {
739
+ return {
740
+ main: this.item.classesList.value,
741
+ body: this.getSubClass("body"),
742
+ bodyGroup: this.getSubClass("body__group"),
743
+ bodyContext: this.getSubClass("body__context"),
744
+ control: this.getSubClass("control"),
745
+ image: this.getSubClass("image"),
746
+ close: this.getSubClass("close"),
747
+ teleport: this.getSubClass("teleport")
748
+ };
749
+ }
750
+ initStyles() {
751
+ return {};
752
+ }
753
+ initRender() {
754
+ let e = [];
755
+ if (this.initSlot("control", e, this.item.slotData.value), this.item.open.inDom.value) if (this.item.staticMode.item.value || this.props.embedded) e.push(this.renderMain());
756
+ else {
757
+ var t;
758
+ e.push(g(m, {
759
+ key: "teleport",
760
+ to: "body"
761
+ }, g("div", {
762
+ class: (t = this.classes) == null ? void 0 : t.value.teleport,
763
+ "data-window-teleport": this.item.classes.getId()
764
+ }, this.renderMain())));
765
+ }
766
+ return e;
767
+ }
2038
768
  };
769
+ //#endregion
770
+ export { Y as Window, u as WindowClassesData, f as WindowClassesInclude, M as WindowClient, R as WindowCoordinates, Z as WindowDesign, P as WindowElement, H as WindowEmit, a as WindowEsc, K as WindowEvent, L as WindowFlash, J as WindowHidden, N as WindowHook, p as WindowInclude, W as WindowOpen, B as WindowOrigin, I as WindowPersistent, z as WindowPosition, V as WindowStatic, F as WindowStatus, d as WindowStatusControlItem, l as WindowStatusItem, U as WindowStyles, G as WindowVerification, c as __WINDOW_TYPE_BODY_NAME, X as defaultsWindow };