@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/list.js CHANGED
@@ -1,1063 +1,456 @@
1
- var w = Object.defineProperty;
2
- var S = (h, t, e) => t in h ? w(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
- var i = (h, t, e) => S(h, typeof t != "symbol" ? t + "" : t, e);
4
- import { ref as m, computed as l, watch as B, onUnmounted as E, toRef as M, onMounted as A, nextTick as L, h as o } from "vue";
5
- import { isFilled as C, goScroll as D, isSelected as F, isDomRuntime as p, EventItem as G, ListDataRef as T, toBinds as u, DesignConstructorAbstract as P, isObject as O } from "@dxtmisha/functional";
6
- import { E as N } from "./EventClickInclude-WHJqxZ1b.js";
7
- import { A as c } from "./AriaStaticInclude-CAURwJMb.js";
8
- import { W as H } from "./WindowClassesInclude-B56usxgx.js";
9
- class R {
10
- /**
11
- * Constructor
12
- * @param props input data/ входные данные
13
- */
14
- constructor(t) {
15
- i(this, "item", m());
16
- i(this, "timeout");
17
- /** Current search string/ Текущая строка поиска */
18
- i(this, "highlight", l(() => {
19
- var t;
20
- return (t = this.item.value) != null ? t : this.props.highlight;
21
- }));
22
- this.props = t;
23
- }
24
- /**
25
- * Adds a new character to the search.
26
- *
27
- * Добавляет новый символ к поиску.
28
- * @param char new character/ новый символ
29
- */
30
- add(t) {
31
- this.addChar(t).makeReset();
32
- }
33
- /**
34
- * Sets the search string.
35
- *
36
- * Устанавливает строку поиска.
37
- * @param value new value/ новое значение
38
- */
39
- set(t) {
40
- const e = this.getValue(t);
41
- this.item.value !== e && (this.item.value = e);
42
- }
43
- /**
44
- * Resets the search string.
45
- *
46
- * Сбрасывает строку поиска.
47
- */
48
- reset() {
49
- return this.set(), this;
50
- }
51
- /**
52
- * Returns a processed value.
53
- *
54
- * Возвращает обработанное значение.
55
- * @param value source value/ исходное значение
56
- */
57
- getValue(t) {
58
- if (C(t))
59
- return t.trim();
60
- }
61
- /**
62
- * Appends a character to the search string.
63
- *
64
- * Добавляет символ к строке поиска.
65
- * @param char new character/ новый символ
66
- */
67
- addChar(t) {
68
- return this.item.value && this.timeout ? this.item.value += t : this.item.value = t, this;
69
- }
70
- /**
71
- * Schedules reset to the initial state after a delay.
72
- *
73
- * Планирует сброс к исходному состоянию после задержки.
74
- */
75
- makeReset() {
76
- return this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(
77
- () => this.timeout = void 0,
78
- 2e3
79
- ), this;
80
- }
81
- }
82
- const _ = 24;
83
- class V {
84
- /**
85
- * Constructor
86
- * @param props input data/ входные данные
87
- * @param element input element/ элемент ввода
88
- * @param listId unique list identifier/ уникальный идентификатор списка
89
- */
90
- constructor(t, e, s) {
91
- /** Active item/ Активный элемент */
92
- i(this, "item", m());
93
- /** Returns the value of the selected element/ Возвращает значение выбранного элемента */
94
- i(this, "focus", l(() => {
95
- var t, e;
96
- return (e = (t = this.item.value) == null ? void 0 : t.index) != null ? e : this.props.focus;
97
- }));
98
- this.props = t, this.element = e, this.listId = s;
99
- }
100
- /**
101
- * Checks if the element exists.
102
- *
103
- * Проверяет, существует ли элемент.
104
- * @param index element index/ индекс элемента
105
- */
106
- isElement(t) {
107
- return !!this.getElement(t);
108
- }
109
- /**
110
- * Checks if the element is an item.
111
- *
112
- * Проверяет, является ли элемент элементом.
113
- */
114
- isItem() {
115
- var t;
116
- return ((t = this.item.value) == null ? void 0 : t.type) === "item";
117
- }
118
- /**
119
- * Checks if the element is a group.
120
- *
121
- * Проверяет, является ли элемент группой.
122
- */
123
- isGroup() {
124
- var t;
125
- return ((t = this.item.value) == null ? void 0 : t.type) === "group";
126
- }
127
- /**
128
- * Checks if the element is a menu.
129
- *
130
- * Проверяет, является ли элемент меню.
131
- */
132
- isMenu() {
133
- var t;
134
- return ((t = this.item.value) == null ? void 0 : t.type) === "menu";
135
- }
136
- /**
137
- * Checks if the group or menu is open.
138
- *
139
- * Проверяет, открыта ли группа или меню.
140
- */
141
- isOpen() {
142
- const t = this.getElement();
143
- return t && (this.isGroup() || this.isMenu()) ? t.dataset.status === "open" : !1;
144
- }
145
- /**
146
- * Returns the selected element.
147
- *
148
- * Возвращает выбранный элемент.
149
- */
150
- get() {
151
- return this.item.value;
152
- }
153
- /**
154
- * Returns the selector for the desired element by its index.
155
- *
156
- * Возвращает селектор нужного элемента по его индексу.
157
- * @param index element index/ индекс элемента
158
- */
159
- getSelector(t) {
160
- var e;
161
- return `[data-list-id="${this.listId}"][data-value="${t != null ? t : (e = this.item.value) == null ? void 0 : e.index}"]`;
162
- }
163
- /**
164
- * Returns the HTML element of the selected item.
165
- *
166
- * Возвращает HTML элемент выбранного элемента.
167
- * @param index element index/ индекс элемента
168
- */
169
- getElement(t) {
170
- var e;
171
- return (e = document.querySelector(this.getSelector(t))) != null ? e : void 0;
172
- }
173
- /**
174
- * Changes the selected element.
175
- *
176
- * Изменяет выбранный элемент.
177
- * @param item new value/ новое значение
178
- */
179
- set(t) {
180
- return this.item.value !== t && (this.item.value = t, this.toFocus()), this;
181
- }
182
- /**
183
- * Resets the selected element.
184
- *
185
- * Сбрасывает выбранный элемент.
186
- */
187
- reset() {
188
- return this.set(void 0), this;
189
- }
190
- /**
191
- * Performs a click on the selected element.
192
- *
193
- * Выполняет клик на выбранном элементе.
194
- */
195
- click() {
196
- var t;
197
- (t = this.getElement()) == null || t.click();
198
- }
199
- /**
200
- * Moves to the value in focus.
201
- *
202
- * Перемещает к значению в фокусе.
203
- */
204
- toElementFocus() {
205
- return !!(this.item.value && this.getElement());
206
- }
207
- /**
208
- * Scrolls to the desired element by its index.
209
- *
210
- * Скроллирует к нужному элементу по его индексу.
211
- * @param index element index/ индекс элемента
212
- */
213
- toElementSelected(t) {
214
- return this.toElement(this.getElement(t)), this;
215
- }
216
- /**
217
- * Scrolls to the desired element.
218
- *
219
- * Скроллирует к нужному элементу.
220
- * @param element the element to scroll to/ элемент, до которого надо проскроллить
221
- */
222
- toElement(t) {
223
- const e = "*[data-window-body]";
224
- t && t.closest(e) && (D(e, t), this.toFocus());
225
- }
226
- /**
227
- * Sets focus to the element.
228
- *
229
- * Устанавливает фокус на элемент.
230
- * @param max maximum number of attempts/ максимальное количество попыток
231
- */
232
- toFocus(t = _) {
233
- var e;
234
- if (t > 0 && this.element.value) {
235
- const s = this.getElement();
236
- s ? s.focus() : ((e = document.activeElement) == null || e.blur(), setTimeout(() => {
237
- this.toFocus(t - 1);
238
- }, 128));
239
- }
240
- }
241
- }
242
- class $ {
243
- /**
244
- * Constructor
245
- * @param props input data/ входные данные
246
- * @param focus object of the class for working with focus/ объект класса для работы с фокусировкой
247
- * @param data object of the class for working with the list/ объект класса для работы со списком
248
- * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
249
- */
250
- constructor(t, e, s, r) {
251
- i(this, "index", -1);
252
- this.props = t, this.focus = e, this.data = s, this.emits = r;
253
- }
254
- /**
255
- * Changing the index in focus by the number in the array.
256
- *
257
- * Изменение значения в фокусе по номеру в массиве.
258
- * @param index number in the array/ номер в массиве
259
- */
260
- set(t) {
261
- return this.index !== t ? (t < 0 ? this.reset() : this.setByIndex(t), !0) : !1;
262
- }
263
- /**
264
- * Changes the selected element.
265
- *
266
- * Изменяет выбранный элемент.
267
- * @param value new value/ новое значение
268
- */
269
- preparation(t) {
270
- const e = this.data.map.value, s = e.findIndex((r) => F(r.index, t));
271
- this.reset(), s >= 0 && (this.index = s, e != null && e[s] && this.focus.toElementSelected(e[s].index));
272
- }
273
- /**
274
- * Scrolls the element to the selected element
275
- *
276
- * Прокрутить элемент до выбранного элемента
277
- */
278
- preparationBySelected() {
279
- this.props.selected && requestAnimationFrame(() => this.preparation(this.props.selected));
280
- }
281
- /**
282
- * Moves the selected value back.
283
- *
284
- * Перемещает выбранное значение назад.
285
- */
286
- previous() {
287
- this.isFirstByParent() || (this.setByIndex(this.index - 1), this.focus.toElementFocus() || this.previous());
288
- }
289
- /**
290
- * Moves the selected value forward.
291
- *
292
- * Перемещает выбранное значение вперед.
293
- */
294
- next() {
295
- this.isLastByParent() || (this.setByIndex(this.index + 1), this.focus.toElementFocus() || this.next());
296
- }
297
- /**
298
- * Moves to the first element.
299
- *
300
- * Перемещает к первому элементу.
301
- */
302
- first() {
303
- const t = this.getParentId(), e = this.data.getFirstItemByParent(t);
304
- e && (this.preparation(e.index), this.focus.set(e));
305
- }
306
- /**
307
- * Moves to the last element.
308
- *
309
- * Перемещает к последнему элементу.
310
- */
311
- last() {
312
- const t = this.getParentId(), e = this.data.getLastItemByParent(t);
313
- e && (this.preparation(e.index), this.focus.set(e));
314
- }
315
- /**
316
- * Reset all records to the initial state.
317
- *
318
- * Сброс всех записей до начального состояния.
319
- */
320
- reset() {
321
- this.index = -1, this.focus.reset();
322
- }
323
- /**
324
- * Opens the window if the element is in it.
325
- *
326
- * Открывает окно, если элемент в нем.
327
- */
328
- open() {
329
- this.focus.isItem() ? this.focus.click() : (this.focus.isGroup() || this.focus.isMenu()) && (this.focus.click(), this.nextByType());
330
- }
331
- /**
332
- * Closes the window if the element is in it.
333
- *
334
- * Закрывает окно, если элемент в нем.
335
- */
336
- close() {
337
- var e;
338
- const t = this.getMainItem();
339
- if (t) {
340
- t.click();
341
- const s = this.data.getItemByIndex(t.dataset.value);
342
- s && (this.set(s.key), this.focus.set(s.item));
343
- } else
344
- (e = this.emits) == null || e.call(this, "close");
345
- }
346
- /**
347
- * Stops the event.
348
- *
349
- * Останавливает событие.
350
- */
351
- stop() {
352
- this.focus.reset();
353
- }
354
- /**
355
- * Checks if the current element is the first in the parent group.
356
- *
357
- * Проверяет, является ли текущий элемент первым в родительской группе.
358
- */
359
- isFirstByParent() {
360
- var e, s;
361
- const t = this.getParentId();
362
- return t && this.focus.isElement() ? ((e = this.data.getFirstItemByParent(t)) == null ? void 0 : e.index) === ((s = this.focus.item.value) == null ? void 0 : s.index) : !1;
363
- }
364
- /**
365
- * Checks if the current element is the last in the parent group.
366
- *
367
- * Проверяет, является ли текущий элемент последним в родительской группе.
368
- */
369
- isLastByParent() {
370
- var e, s;
371
- const t = this.getParentId();
372
- return t && this.focus.isElement() ? ((e = this.data.getLastItemByParent(t)) == null ? void 0 : e.index) === ((s = this.focus.item.value) == null ? void 0 : s.index) : !1;
373
- }
374
- /**
375
- * Checks if the element is in a window.
376
- *
377
- * Проверяет, находится ли элемент в окне.
378
- */
379
- getMainItem() {
380
- const t = this.getParentId();
381
- if (t && !this.focus.isOpen())
382
- return this.focus.getElement(t);
383
- }
384
- /**
385
- * Returns the parent identifier.
386
- *
387
- * Возвращает идентификатор родителя.
388
- */
389
- getParentId() {
390
- var t;
391
- return (t = this.focus.item.value) == null ? void 0 : t.parent;
392
- }
393
- /**
394
- * Changing the index in focus by the number in the array.
395
- *
396
- * Изменение значения в фокусе по номеру в массиве.
397
- * @param index number in the array/ номер в массиве
398
- */
399
- setByIndex(t) {
400
- const e = this.data.getLengthByMap();
401
- t >= e ? this.index = 0 : t < 0 ? this.index = e - 1 : this.index = t;
402
- const s = this.data.map.value[this.index];
403
- s && (s.type === "item" || s.type === "group" || s.type === "menu") ? this.focus.set(s) : this.focus.reset();
404
- }
405
- /**
406
- * Moves the selected value forward by type.
407
- *
408
- * Перемещает выбранное значение вперед по типу.
409
- */
410
- nextByType() {
411
- this.setByIndex(this.index + 1), !(this.focus.isItem() || this.focus.isGroup() || this.focus.isMenu()) && this.nextByType();
412
- }
413
- }
414
- class U {
415
- /**
416
- * Creates an instance of ListControl for managing keyboard navigation and events.
417
- *
418
- * Создает экземпляр ListControl для управления навигацией с клавиатуры и событиями.
419
- * @param props input data/ входные данные
420
- * @param search search functionality controller / контроллер функциональности поиска
421
- * @param data list data manager / менеджер данных списка
422
- * @param go navigation controller / контроллер навигации
423
- */
424
- constructor(t, e, s, r) {
425
- i(this, "event");
426
- /**
427
- * Checks if the menu is active.
428
- *
429
- * Проверяет, активное ли меню.
430
- */
431
- i(this, "isActive", l(() => !!this.props.control));
432
- /**
433
- * Method for tracking keys when a window is open.
434
- *
435
- * Метод для отслеживания нажатий при открытом окне.
436
- * @param event event object/ объект события
437
- */
438
- i(this, "on", (t) => {
439
- if (this.isNotInput(t.target) && this.data.getLength())
440
- if (t.type === "keypress")
441
- this.updateSearch(t);
442
- else
443
- switch (t.code || t.key || t.keyCode) {
444
- case "Backspace":
445
- case 8:
446
- this.updateSearch(t);
447
- break;
448
- case "ArrowUp":
449
- case 38:
450
- t.preventDefault(), this.go.previous();
451
- break;
452
- case "ArrowDown":
453
- case 40:
454
- t.preventDefault(), this.go.next();
455
- break;
456
- case "Enter":
457
- case "ArrowRight":
458
- case " ":
459
- case 13:
460
- case 39:
461
- t.preventDefault(), this.go.open();
462
- break;
463
- case "ArrowLeft":
464
- case "Escape":
465
- case "Esc":
466
- case 27:
467
- case 37:
468
- t.preventDefault(), this.go.close();
469
- break;
470
- case "Home":
471
- case 36:
472
- t.preventDefault(), this.go.first();
473
- break;
474
- case "End":
475
- case 35:
476
- t.preventDefault(), this.go.last();
477
- break;
478
- case "Space":
479
- case 32:
480
- this.getActiveElement() || (t.preventDefault(), this.go.open());
481
- break;
482
- }
483
- });
484
- this.props = t, this.search = e, this.data = s, this.go = r, B(
485
- this.isActive,
486
- (a) => {
487
- a ? this.start() : this.stop();
488
- },
489
- { immediate: !0 }
490
- ), E(() => this.stop());
491
- }
492
- /**
493
- * Checks if the event target is not an input.
494
- *
495
- * Проверяет, не является ли цель события input.
496
- * @param target selected element/ выбранный элемент
497
- */
498
- isNotInput(t) {
499
- return ["INPUT", "TEXTAREA"].indexOf(t.nodeName) === -1 || !!this.getActiveElement();
500
- }
501
- /**
502
- * Gets the currently active input element with menu control.
503
- *
504
- * Получает текущий активный элемент input с управлением меню.
505
- * @returns active input element or undefined / активный элемент input или undefined
506
- */
507
- getActiveElement() {
508
- var t;
509
- if (p()) {
510
- const e = document.activeElement;
511
- if (e && ((t = e.dataset) == null ? void 0 : t.menuControl) === "1")
512
- return e;
513
- }
514
- }
515
- /**
516
- * Starts the event.
517
- *
518
- * Запускает событие.
519
- */
520
- start() {
521
- p() && (this.event || (this.event = new G(
522
- document.body,
523
- ["keydown", "keypress"],
524
- this.on
525
- )), this.go.reset(), this.event.start());
526
- }
527
- /**
528
- * Stops the event.
529
- *
530
- * Останавливает событие.
531
- */
532
- stop() {
533
- this.event && (this.event.stop(), this.event = void 0, this.go.stop());
534
- }
535
- /**
536
- * Updates the search value based on keyboard input.
537
- *
538
- * Обновляет значение поиска на основе ввода с клавиатуры.
539
- * @param event keyboard event / событие клавиатуры
540
- */
541
- updateSearch(t) {
542
- const e = this.getActiveElement();
543
- e ? requestAnimationFrame(() => this.search.set(e.value)) : this.search.add(t.key);
544
- }
545
- }
546
- let q = 1;
547
- class X {
548
- /**
549
- * Constructor
550
- * @param props input data/ входные данные
551
- * @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
552
- * @param element input element/ элемент ввода
553
- * @param classDesign design name/ название дизайна
554
- * @param className class name/ название класса
555
- * @param components object for working with components/ объект для работы с компонентами
556
- * @param slots object for working with slots/ объект для работы со слотами
557
- * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
558
- * @param ListSearchConstructor class for working with search/ класс для работы с поиском
559
- * @param ListFocusConstructor class for working with focus/ класс для работы с фокусом
560
- * @param ListDataRefConstructor class for working with data list/ класс для работы со списком данных
561
- * @param ListGoConstructor class for working with navigation/ класс для работы с навигацией
562
- * @param ListControlConstructor class for working with control/ класс для работы с управлением
563
- * @param EventClickIncludeConstructor class for working with click event/ класс для работы с событием клика
564
- * @param WindowClassesIncludeConstructor class for working with window classes/ класс для работы с классами окна
565
- */
566
- constructor(t, e, s, r, a, n, g, d, f = R, v = V, I = T, y = $, b = U, k = N, x = H) {
567
- i(this, "search");
568
- i(this, "focus");
569
- i(this, "data");
570
- i(this, "event");
571
- i(this, "go");
572
- i(this, "control");
573
- i(this, "windowClasses");
574
- /** Unique list identifier/ Уникальный идентификатор списка */
575
- i(this, "id", ++q);
576
- /**
577
- * Computed list data
578
- *
579
- * Вычисляемые данные списка
580
- * */
581
- i(this, "list", l(() => this.props.lite ? this.data.liteData.value : this.data.fullData.value));
582
- /**
583
- * Computed CSS classes for the cell component.
584
- *
585
- * Вычисляемые CSS классы для компонента ячейки.
586
- */
587
- i(this, "classes", l(() => ({
588
- [`${this.className}--highlightActive`]: !!this.props.filterMode && this.data.isHighlight()
589
- })));
590
- /**
591
- * Computed binding properties for list items/
592
- * Вычисляемые привязочные свойства для элементов списка
593
- * */
594
- i(this, "itemBinds", l(() => {
595
- var t;
596
- return {
597
- tag: this.props.tag,
598
- divider: this.props.divider,
599
- onClick: this.event.onClick,
600
- ...(t = this.props.itemAttrs) != null ? t : {},
601
- listId: this.id
602
- };
603
- }));
604
- this.props = t, this.refs = e, this.element = s, this.classDesign = r, this.className = a, this.components = n, this.slots = g, this.emits = d, this.search = new f(this.props), this.focus = new v(this.props, this.element, this.id), this.data = new I(
605
- M(this.props, "list"),
606
- this.focus.focus,
607
- this.search.highlight,
608
- this.refs.highlightLengthStart,
609
- this.refs.filterMode,
610
- this.refs.selected,
611
- this.refs.keyValue,
612
- this.refs.keyLabel,
613
- this.refs.liteThreshold,
614
- void 0,
615
- this.refs.max
616
- ), this.go = new y(this.props, this.focus, this.data, this.emits), this.control = new b(this.props, this.search, this.data, this.go), this.event = new k(void 0, void 0, d), this.windowClasses = new x(r), A(async () => {
617
- await L(), this.go.preparationBySelected();
618
- });
619
- }
620
- /**
621
- * Returns information about the opening status of a group item.
622
- *
623
- * Возвращает информацию о статусе открытия группового элемента.
624
- * @param item List item data/ данные элемента списка
625
- */
626
- isOpenGroup(t) {
627
- const e = this.data.getSubList(t);
628
- return e.isSelected.value || e.isFocus() || e.isHighlight();
629
- }
630
- /**
631
- * Gets binding properties for a list item
632
- *
633
- * Получает привязочные свойства для элемента списка
634
- * @param item List item data/ данные элемента списка
635
- */
636
- getItem(t) {
637
- return u(
638
- this.itemBinds.value,
639
- t,
640
- {
641
- key: t.value,
642
- role: this.props.roleItem
643
- }
644
- );
645
- }
646
- /**
647
- * Gets binding properties for a group item in the list
648
- *
649
- * Получает привязочные свойства для группового элемента в списке
650
- * @param item List item data/ данные элемента списка
651
- */
652
- getItemGroup(t) {
653
- return u(
654
- this.itemBinds.value,
655
- this.props.itemGroupAttrs,
656
- t,
657
- {
658
- key: t.value,
659
- class: `${this.className}__group`
660
- }
661
- );
662
- }
663
- /**
664
- * Gets binding properties for a menu item in the list
665
- *
666
- * Получает привязочные свойства для элемента меню в списке
667
- * @param item List item data/ данные элемента списка
668
- */
669
- getItemMenu(t) {
670
- return u(
671
- this.itemBinds.value,
672
- this.props.itemMenuAttrs,
673
- t,
674
- {
675
- key: t.value,
676
- class: `${this.className}__menu`
677
- }
678
- );
679
- }
680
- /**
681
- * Gets binding properties for a group management item with down arrow
682
- *
683
- * Получает привязочные свойства для элемента управления группой со стрелкой вниз
684
- * @param item List item data/ данные элемента списка
685
- * @param props additional properties/ дополнительные свойства
686
- */
687
- getItemManagementFormGroup(t, e) {
688
- return this.getItemManagement(
689
- {
690
- ...t,
691
- ...e,
692
- filterMode: !1,
693
- ...c.haspopup("listbox")
694
- },
695
- e.open,
696
- this.props.iconArrowDown
697
- );
698
- }
699
- /**
700
- * Gets binding properties for a menu management item with right arrow
701
- *
702
- * Получает привязочные свойства для элемента управления меню со стрелкой вправо
703
- * @param item List item data/ данные элемента списка
704
- * @param open Whether the menu is open/ открыто ли меню
705
- */
706
- getItemManagementFormMenu(t, e) {
707
- return this.getItemManagement(
708
- {
709
- ...t,
710
- filterMode: !1
711
- },
712
- e,
713
- this.props.iconArrowRight
714
- );
715
- }
716
- /**
717
- * Returns a sublist for a group item.
718
- *
719
- * Возвращает подсписок для группового элемента.
720
- * @param item List item data/ данные элемента списка
721
- */
722
- getList(t) {
723
- return this.data.getSubList(t).fullData.value;
724
- }
725
- /**
726
- * Internal method to create management item binding properties
727
- *
728
- * Внутренний метод для создания привязочных свойств элемента управления
729
- * @param item List item data/ данные элемента списка
730
- * @param open Whether the item is open/ открыт ли элемент
731
- * @param icon Icon to display/ иконка для отображения
732
- */
733
- getItemManagement(t, e, s) {
734
- return u(
735
- this.itemBinds.value,
736
- this.props.itemManagementAttrs,
737
- t,
738
- {
739
- class: [
740
- `${this.className}__management`,
741
- this.windowClasses.get().static
742
- ],
743
- focus: (t == null ? void 0 : t.index) === this.focus.focus.value,
744
- selectedChild: this.isOpenGroup(t),
745
- open: e,
746
- iconTurn: e,
747
- iconTrailing: s,
748
- iconTrailingTurnOnly: !0,
749
- "data-status": e ? "open" : "close"
750
- }
751
- );
752
- }
753
- }
754
- const Y = {
755
- keyLabel: "label",
756
- keyValue: "value",
757
- tag: "div",
758
- role: "listbox",
759
- // :default [!] System label / Системная метка
760
- axis: "y"
761
- };
762
- class Z extends P {
763
- /**
764
- * Constructor
765
- * @param name class name/ название класса
766
- * @param props properties/ свойства
767
- * @param options list of additional parameters/ список дополнительных параметров
768
- * @param ItemConstructor class for working with the item/ класс для работы с элементом
769
- */
770
- constructor(e, s, r, a = X) {
771
- super(
772
- e,
773
- s,
774
- r
775
- );
776
- i(this, "item");
777
- /**
778
- * Generates all elements from the list.
779
- *
780
- * Генерирует все элементы из списка.
781
- */
782
- i(this, "renderData", () => this.renderDataByItem("item", this.item.list.value, !0));
783
- /**
784
- * Generates an element.
785
- *
786
- * Генерирует элемент.
787
- * @param type type of list/ тип списка
788
- * @param item selected element/ выбранный элемент
789
- */
790
- i(this, "renderItem", (e, s) => this.components.renderOne(
791
- "listItem",
792
- this.getItemAttrs(e, s)
793
- ));
794
- /**
795
- * Generates a group element.
796
- *
797
- * Генерирует групповой элемент.
798
- * @param item selected element/ выбранный элемент
799
- * @param props data for working with the group/ данные для работы с группой
800
- */
801
- i(this, "renderItemGroup", (e, s) => this.components.renderOne(
802
- "listItem",
803
- this.item.getItemManagementFormGroup(e, s)
804
- ));
805
- /**
806
- * Generates a menu element.
807
- *
808
- * Генерирует элемент меню.
809
- * @param item selected element/ выбранный элемент
810
- * @param props data for working with the menu/ данные для работы с меню
811
- */
812
- i(this, "renderItemMenu", (e, s) => this.components.renderOne(
813
- "listItem",
814
- u(
815
- this.item.getItemManagementFormMenu(e, !!s.open.value),
816
- s.binds
817
- )
818
- ));
819
- /**
820
- * Generates a break between elements.
821
- *
822
- * Генерирует разрыв между элементами.
823
- * @param item selected element/ выбранный элемент
824
- */
825
- i(this, "renderSpace", (e) => {
826
- var s;
827
- return o("div", {
828
- key: e.value,
829
- class: [
830
- (s = this.classes) == null ? void 0 : s.value.space,
831
- this.item.windowClasses.get().static
832
- ],
833
- ...c.role("separator")
834
- });
835
- });
836
- /**
837
- * Generates a dividing line.
838
- *
839
- * Генерирует линию разделения.
840
- * @param item selected element/ выбранный элемент
841
- */
842
- i(this, "renderLine", (e) => {
843
- var s;
844
- return o("div", {
845
- key: e.value,
846
- class: [
847
- (s = this.classes) == null ? void 0 : s.value.line,
848
- this.item.windowClasses.get().static
849
- ],
850
- ...c.role("separator")
851
- });
852
- });
853
- /**
854
- * Generates a subtitle.
855
- *
856
- * Генерирует подзаголовок.
857
- * @param item selected element/ выбранный элемент
858
- */
859
- i(this, "renderSubtitle", (e) => {
860
- var s;
861
- return o("div", {
862
- key: e.value,
863
- class: [
864
- (s = this.classes) == null ? void 0 : s.value.subtitle,
865
- this.item.windowClasses.get().static
866
- ],
867
- ...c.role("separator")
868
- }, e.label);
869
- });
870
- /**
871
- * Generates HTML code by the slot name or the value of the `label` field.
872
- *
873
- * Генерирует HTML-код по названию слота или значению поля `label`.
874
- * @param item selected element/ выбранный элемент
875
- */
876
- i(this, "renderHtml", (e) => {
877
- var r;
878
- const s = {
879
- key: e.label && O(e.value) ? e.label : e.value,
880
- class: [
881
- (r = this.classes) == null ? void 0 : r.value.html,
882
- this.item.windowClasses.get().static
883
- ]
884
- };
885
- return this.slots && e.value in this.slots ? o("div", s, this.initSlot(e.value)) : o("div", {
886
- ...s,
887
- innerHTML: e.label
888
- });
889
- });
890
- /**
891
- * Generates a group of lists.
892
- *
893
- * Генерирует группу списков.
894
- * @param item selected element/ выбранный элемент
895
- */
896
- i(this, "renderGroup", (e) => this.components.renderOne(
897
- "listGroup",
898
- {
899
- open: this.item.isOpenGroup(e),
900
- divider: this.props.divider,
901
- disabled: e.disabled
902
- },
903
- {
904
- head: (s) => this.renderItemGroup(e, s),
905
- list: () => this.renderDataByItem("group", this.item.getList(e))
906
- }
907
- ));
908
- /**
909
- * Generates a menu of lists.
910
- *
911
- * Генерирует меню списков.
912
- * @param item selected element/ выбранный элемент
913
- * @param first is the first element/ является ли первым элементом
914
- */
915
- i(this, "renderMenu", (e, s) => this.components.renderOne(
916
- "listMenu",
917
- {
918
- divider: this.props.divider,
919
- axis: s && this.props.axis === "x" ? "y" : "x",
920
- disabled: e.disabled
921
- },
922
- {
923
- head: (r) => this.renderItemMenu(e, r),
924
- list: () => this.renderDataByItem("menu", this.item.getList(e))
925
- }
926
- ));
927
- this.item = new a(
928
- this.props,
929
- this.refs,
930
- this.element,
931
- this.getDesign(),
932
- this.getName(),
933
- this.components,
934
- this.slots,
935
- this.emits
936
- ), this.init();
937
- }
938
- /**
939
- * Initialization of all the necessary properties for work
940
- *
941
- * Инициализация всех необходимых свойств для работы.
942
- */
943
- initExpose() {
944
- return {
945
- isSelected: this.item.data.isSelected,
946
- selectedList: this.item.data.selectedList,
947
- selectedNames: this.item.data.selectedNames,
948
- selectedValues: this.item.data.selectedValues
949
- };
950
- }
951
- /**
952
- * Improvement of the obtained list of classes.
953
- *
954
- * Доработка полученного списка классов.
955
- */
956
- initClasses() {
957
- return {
958
- main: this.item.classes.value,
959
- // :classes [!] System label / Системная метка
960
- space: this.getSubClass("space"),
961
- line: this.getSubClass("line"),
962
- subtitle: this.getSubClass("subtitle"),
963
- html: this.getSubClass("html"),
964
- management: this.getSubClass("management"),
965
- group: this.getSubClass("group"),
966
- menu: this.getSubClass("menu"),
967
- menuGroup: this.getSubClass("menuGroup")
968
- };
969
- }
970
- /**
971
- * Refinement of the received list of styles.
972
- *
973
- * Доработка полученного списка стилей.
974
- */
975
- initStyles() {
976
- return {};
977
- }
978
- /**
979
- * A method for rendering.
980
- *
981
- * Метод для рендеринга.
982
- */
983
- initRender() {
984
- var e;
985
- return o(
986
- "div",
987
- {
988
- ...this.getAttrs(),
989
- ref: this.element,
990
- class: (e = this.classes) == null ? void 0 : e.value.main,
991
- ...c.role(this.props.role)
992
- },
993
- this.renderData()
994
- );
995
- }
996
- /**
997
- * Generates all elements from the list.
998
- *
999
- * Генерирует все элементы из списка.
1000
- * @param type type of list/ тип списка
1001
- * @param data selected element/ выбранный элемент
1002
- * @param first is the first element/ является ли первым элементом
1003
- */
1004
- renderDataByItem(e, s, r = !1) {
1005
- const a = [];
1006
- return s.forEach((n) => {
1007
- switch (n.type) {
1008
- case "space":
1009
- a.push(this.renderSpace(n));
1010
- break;
1011
- case "line":
1012
- a.push(this.renderLine(n));
1013
- break;
1014
- case "subtitle":
1015
- a.push(this.renderSubtitle(n));
1016
- break;
1017
- case "html":
1018
- a.push(this.renderHtml(n));
1019
- break;
1020
- case "group":
1021
- this.isHighlight(n) && a.push(this.renderGroup(n));
1022
- break;
1023
- case "menu":
1024
- this.isHighlight(n) && a.push(this.renderMenu(n, r));
1025
- break;
1026
- default:
1027
- a.push(this.renderItem(e, n));
1028
- break;
1029
- }
1030
- }), a.push(o("div")), a;
1031
- }
1032
- /**
1033
- * Determines if highlighting is required.
1034
- *
1035
- * Определяет, требуется ли выделение.
1036
- * @param item selected element/ выбранный элемент
1037
- */
1038
- isHighlight(e) {
1039
- return this.props.filterMode ? this.item.data.getSubList(e).isHighlightActive() : !0;
1040
- }
1041
- /**
1042
- * Returns binding properties for the item.
1043
- *
1044
- * Возвращает привязочные свойства для элемента.
1045
- * @param type type of list/ тип списка
1046
- * @param item selected element/ выбранный элемент
1047
- */
1048
- getItemAttrs(e, s) {
1049
- switch (e) {
1050
- case "group":
1051
- return this.item.getItemGroup(s);
1052
- case "menu":
1053
- return this.item.getItemMenu(s);
1054
- default:
1055
- return this.item.getItem(s);
1056
- }
1057
- }
1058
- }
1059
- export {
1060
- X as List,
1061
- Z as ListDesign,
1062
- Y as defaultsList
1
+ import { t as e } from "./AriaStaticInclude-CS1hPGyK.js";
2
+ import { t } from "./defineProperty-hmGKPWdq.js";
3
+ import { t as n } from "./EventClickInclude-6I8kuFc9.js";
4
+ import { t as r } from "./WindowClassesInclude-zm-ITw5d.js";
5
+ import { computed as i, h as a, nextTick as o, onMounted as s, onUnmounted as c, ref as l, toRef as u, watch as d } from "vue";
6
+ import { DesignConstructorAbstract as f, EventItem as p, ListDataRef as m, goScroll as h, isDomRuntime as g, isFilled as _, isObject as v, isSelected as y, toBinds as b } from "@dxtmisha/functional";
7
+ //#region src/constructors/List/ListSearch.ts
8
+ var x = class {
9
+ constructor(e) {
10
+ t(this, "item", l()), t(this, "timeout", void 0), t(this, "highlight", i(() => {
11
+ var e;
12
+ return (e = this.item.value) == null ? this.props.highlight : e;
13
+ })), this.props = e;
14
+ }
15
+ add(e) {
16
+ this.addChar(e).makeReset();
17
+ }
18
+ set(e) {
19
+ let t = this.getValue(e);
20
+ this.item.value !== t && (this.item.value = t);
21
+ }
22
+ reset() {
23
+ return this.set(), this;
24
+ }
25
+ getValue(e) {
26
+ if (_(e)) return e.trim();
27
+ }
28
+ addChar(e) {
29
+ return this.item.value && this.timeout ? this.item.value += e : this.item.value = e, this;
30
+ }
31
+ makeReset() {
32
+ return this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => this.timeout = void 0, 2e3), this;
33
+ }
34
+ }, S = 24, C = class {
35
+ constructor(e, n, r) {
36
+ t(this, "item", l()), t(this, "focus", i(() => {
37
+ var e, t;
38
+ return (e = (t = this.item.value) == null ? void 0 : t.index) == null ? this.props.focus : e;
39
+ })), this.props = e, this.element = n, this.listId = r;
40
+ }
41
+ isElement(e) {
42
+ return !!this.getElement(e);
43
+ }
44
+ isItem() {
45
+ var e;
46
+ return ((e = this.item.value) == null ? void 0 : e.type) === "item";
47
+ }
48
+ isGroup() {
49
+ var e;
50
+ return ((e = this.item.value) == null ? void 0 : e.type) === "group";
51
+ }
52
+ isMenu() {
53
+ var e;
54
+ return ((e = this.item.value) == null ? void 0 : e.type) === "menu";
55
+ }
56
+ isOpen() {
57
+ let e = this.getElement();
58
+ return e && (this.isGroup() || this.isMenu()) ? e.dataset.status === "open" : !1;
59
+ }
60
+ get() {
61
+ return this.item.value;
62
+ }
63
+ getSelector(e) {
64
+ var t;
65
+ return `[data-list-id="${this.listId}"][data-value="${e == null ? (t = this.item.value) == null ? void 0 : t.index : e}"]`;
66
+ }
67
+ getElement(e) {
68
+ var t;
69
+ return (t = document.querySelector(this.getSelector(e))) == null ? void 0 : t;
70
+ }
71
+ set(e) {
72
+ return this.item.value !== e && (this.item.value = e, this.toFocus()), this;
73
+ }
74
+ reset() {
75
+ return this.set(void 0), this;
76
+ }
77
+ click() {
78
+ var e;
79
+ (e = this.getElement()) == null || e.click();
80
+ }
81
+ toElementFocus() {
82
+ return !!(this.item.value && this.getElement());
83
+ }
84
+ toElementSelected(e) {
85
+ return this.toElement(this.getElement(e)), this;
86
+ }
87
+ toElement(e) {
88
+ let t = "*[data-window-body]";
89
+ e && e.closest(t) && (h(t, e), this.toFocus());
90
+ }
91
+ toFocus(e = S) {
92
+ if (e > 0 && this.element.value && this.props.control) {
93
+ let n = this.getElement();
94
+ if (n) n.focus();
95
+ else {
96
+ var t;
97
+ (t = document.activeElement) == null || t.blur(), setTimeout(() => {
98
+ this.toFocus(e - 1);
99
+ }, 128);
100
+ }
101
+ }
102
+ }
103
+ }, w = class {
104
+ constructor(e, n, r, i) {
105
+ t(this, "index", -1), this.props = e, this.focus = n, this.data = r, this.emits = i;
106
+ }
107
+ set(e) {
108
+ return this.index === e ? !1 : (e < 0 ? this.reset() : this.setByIndex(e), !0);
109
+ }
110
+ preparation(e) {
111
+ let t = this.data.map.value, n = t.findIndex((t) => y(t.index, e));
112
+ this.reset(), n >= 0 && (this.index = n, t != null && t[n] && this.focus.toElementSelected(t[n].index));
113
+ }
114
+ preparationBySelected() {
115
+ this.props.selected && requestAnimationFrame(() => this.preparation(this.props.selected));
116
+ }
117
+ previous() {
118
+ this.isFirstByParent() || (this.setByIndex(this.index - 1), this.focus.toElementFocus() || this.previous());
119
+ }
120
+ next() {
121
+ this.isLastByParent() || (this.setByIndex(this.index + 1), this.focus.toElementFocus() || this.next());
122
+ }
123
+ first() {
124
+ let e = this.getParentId(), t = this.data.getFirstItemByParent(e);
125
+ t && (this.preparation(t.index), this.focus.set(t));
126
+ }
127
+ last() {
128
+ let e = this.getParentId(), t = this.data.getLastItemByParent(e);
129
+ t && (this.preparation(t.index), this.focus.set(t));
130
+ }
131
+ reset() {
132
+ this.index = -1, this.focus.reset();
133
+ }
134
+ open() {
135
+ this.focus.isItem() ? this.focus.click() : (this.focus.isGroup() || this.focus.isMenu()) && (this.focus.click(), this.nextByType());
136
+ }
137
+ close() {
138
+ let e = this.getMainItem();
139
+ if (e) {
140
+ e.click();
141
+ let t = this.data.getItemByIndex(e.dataset.value);
142
+ t && (this.set(t.key), this.focus.set(t.item));
143
+ } else {
144
+ var t;
145
+ (t = this.emits) == null || t.call(this, "close");
146
+ }
147
+ }
148
+ stop() {
149
+ this.focus.reset();
150
+ }
151
+ isFirstByParent() {
152
+ let e = this.getParentId();
153
+ if (e && this.focus.isElement()) {
154
+ var t, n;
155
+ return ((t = this.data.getFirstItemByParent(e)) == null ? void 0 : t.index) === ((n = this.focus.item.value) == null ? void 0 : n.index);
156
+ }
157
+ return !1;
158
+ }
159
+ isLastByParent() {
160
+ let e = this.getParentId();
161
+ if (e && this.focus.isElement()) {
162
+ var t, n;
163
+ return ((t = this.data.getLastItemByParent(e)) == null ? void 0 : t.index) === ((n = this.focus.item.value) == null ? void 0 : n.index);
164
+ }
165
+ return !1;
166
+ }
167
+ getMainItem() {
168
+ let e = this.getParentId();
169
+ if (e && !this.focus.isOpen()) return this.focus.getElement(e);
170
+ }
171
+ getParentId() {
172
+ var e;
173
+ return (e = this.focus.item.value) == null ? void 0 : e.parent;
174
+ }
175
+ setByIndex(e) {
176
+ let t = this.data.getLengthByMap();
177
+ e >= t ? this.index = 0 : e < 0 ? this.index = t - 1 : this.index = e;
178
+ let n = this.data.map.value[this.index];
179
+ n && (n.type === "item" || n.type === "group" || n.type === "menu") ? this.focus.set(n) : this.focus.reset();
180
+ }
181
+ nextByType() {
182
+ this.setByIndex(this.index + 1), !(this.focus.isItem() || this.focus.isGroup() || this.focus.isMenu()) && this.nextByType();
183
+ }
184
+ }, T = class {
185
+ constructor(e, n, r, a) {
186
+ t(this, "event", void 0), t(this, "isActive", i(() => !!this.props.control)), t(this, "onFocus", () => {
187
+ this.props.control || this.start();
188
+ }), t(this, "onBlur", () => {
189
+ this.props.control || this.stop();
190
+ }), t(this, "on", (e) => {
191
+ if (this.isNotInput(e.target) && this.data.getLength()) if (e.type === "keypress") this.updateSearch(e);
192
+ else switch (e.code || e.key || e.keyCode) {
193
+ case "Backspace":
194
+ case 8:
195
+ this.updateSearch(e);
196
+ break;
197
+ case "ArrowUp":
198
+ case 38:
199
+ e.preventDefault(), this.go.previous();
200
+ break;
201
+ case "ArrowDown":
202
+ case 40:
203
+ e.preventDefault(), this.go.next();
204
+ break;
205
+ case "Enter":
206
+ case "ArrowRight":
207
+ case " ":
208
+ case 13:
209
+ case 39:
210
+ e.preventDefault(), this.go.open();
211
+ break;
212
+ case "ArrowLeft":
213
+ case "Escape":
214
+ case "Esc":
215
+ case 27:
216
+ case 37:
217
+ e.preventDefault(), this.go.close();
218
+ break;
219
+ case "Home":
220
+ case 36:
221
+ e.preventDefault(), this.go.first();
222
+ break;
223
+ case "End":
224
+ case 35:
225
+ e.preventDefault(), this.go.last();
226
+ break;
227
+ case "Space":
228
+ case 32:
229
+ this.getActiveElement() || (e.preventDefault(), this.go.open());
230
+ break;
231
+ }
232
+ }), this.props = e, this.search = n, this.data = r, this.go = a, d(this.isActive, (e) => {
233
+ e ? this.start() : this.stop();
234
+ }, { immediate: !0 }), c(() => this.stop());
235
+ }
236
+ isNotInput(e) {
237
+ return ["INPUT", "TEXTAREA"].indexOf(e.nodeName) === -1 || !!this.getActiveElement();
238
+ }
239
+ getActiveElement() {
240
+ if (g()) {
241
+ var e;
242
+ let t = document.activeElement;
243
+ if (t && ((e = t.dataset) == null ? void 0 : e.menuControl) === "1") return t;
244
+ }
245
+ }
246
+ start() {
247
+ g() && (this.event || (this.event = new p(document.body, ["keydown", "keypress"], this.on)), this.go.reset(), this.event.start());
248
+ }
249
+ stop() {
250
+ this.event && (this.event.stop(), this.event = void 0, this.go.stop());
251
+ }
252
+ updateSearch(e) {
253
+ let t = this.getActiveElement();
254
+ t ? requestAnimationFrame(() => this.search.set(t.value)) : this.search.add(e.key);
255
+ }
256
+ }, E = 1, D = class {
257
+ constructor(e, a, c, l, d, f, p, h, g) {
258
+ t(this, "search", void 0), t(this, "focus", void 0), t(this, "data", void 0), t(this, "event", void 0), t(this, "go", void 0), t(this, "control", void 0), t(this, "windowClasses", void 0), t(this, "id", ++E), t(this, "list", i(() => this.props.lite ? this.data.liteData.value : this.data.fullData.value)), t(this, "classes", i(() => ({ [`${this.className}--highlightActive`]: !!this.props.filterMode && this.data.isHighlight() }))), t(this, "itemBinds", i(() => {
259
+ var e;
260
+ return {
261
+ tag: this.props.tag,
262
+ divider: this.props.divider,
263
+ onClick: this.event.onClick,
264
+ ...(e = this.props.itemAttrs) == null ? {} : e,
265
+ listId: this.id
266
+ };
267
+ })), this.props = e, this.refs = a, this.element = c, this.classDesign = l, this.className = d, this.components = f, this.slots = p, this.emits = h;
268
+ let { EventClickIncludeConstructor: _ = n, ListControlConstructor: v = T, ListDataRefConstructor: y = m, ListFocusConstructor: b = C, ListGoConstructor: S = w, ListSearchConstructor: D = x, WindowClassesIncludeConstructor: O = r } = g == null ? {} : g;
269
+ this.search = new D(this.props), this.focus = new b(this.props, this.element, this.id), this.data = new y(u(this.props, "list"), this.focus.focus, this.search.highlight, this.refs.highlightLengthStart, this.refs.filterMode, this.refs.selected, this.refs.keyValue, this.refs.keyLabel, this.refs.liteThreshold, void 0, this.refs.max), this.go = new S(this.props, this.focus, this.data, this.emits), this.control = new v(this.props, this.search, this.data, this.go), this.event = new _(void 0, void 0, h), this.windowClasses = new O(l), this.props.control && s(async () => {
270
+ await o(), this.go.preparationBySelected();
271
+ });
272
+ }
273
+ isOpenGroup(e) {
274
+ let t = this.data.getSubList(e);
275
+ return t.isSelected.value || t.isFocus() || t.isHighlight();
276
+ }
277
+ getItem(e) {
278
+ return b(this.itemBinds.value, e, {
279
+ key: e.value,
280
+ role: this.props.roleItem
281
+ });
282
+ }
283
+ getItemGroup(e) {
284
+ return b(this.itemBinds.value, this.props.itemGroupAttrs, e, {
285
+ key: e.value,
286
+ class: `${this.className}__group`
287
+ });
288
+ }
289
+ getItemMenu(e) {
290
+ return b(this.itemBinds.value, this.props.itemMenuAttrs, e, {
291
+ key: e.value,
292
+ class: `${this.className}__menu`
293
+ });
294
+ }
295
+ getItemManagementFormGroup(t, n) {
296
+ return this.getItemManagement({
297
+ ...t,
298
+ ...n,
299
+ filterMode: !1,
300
+ ...e.haspopup("listbox")
301
+ }, n.open, this.props.iconArrowDown);
302
+ }
303
+ getItemManagementFormMenu(e, t) {
304
+ return this.getItemManagement({
305
+ ...e,
306
+ filterMode: !1
307
+ }, t, this.props.iconArrowRight);
308
+ }
309
+ getList(e) {
310
+ return this.data.getSubList(e).fullData.value;
311
+ }
312
+ getItemManagement(e, t, n) {
313
+ return b(this.itemBinds.value, this.props.itemManagementAttrs, e, {
314
+ class: [`${this.className}__management`, this.windowClasses.get().static],
315
+ focus: (e == null ? void 0 : e.index) === this.focus.focus.value,
316
+ selectedChild: this.isOpenGroup(e),
317
+ open: t,
318
+ iconTurn: t,
319
+ iconTrailing: n,
320
+ iconTrailingTurnOnly: !0,
321
+ "data-status": t ? "open" : "close"
322
+ });
323
+ }
324
+ }, O = {
325
+ keyLabel: "label",
326
+ keyValue: "value",
327
+ tag: "div",
328
+ role: "listbox",
329
+ tabindex: 0,
330
+ axis: "y"
331
+ }, k = class extends f {
332
+ constructor(n, r, i, o = D) {
333
+ super(n, r, i), t(this, "item", void 0), t(this, "renderData", () => this.renderDataByItem("item", this.item.list.value, !0)), t(this, "renderItem", (e, t) => this.components.renderOne("listItem", this.getItemAttrs(e, t))), t(this, "renderItemGroup", (e, t) => this.components.renderOne("listItem", this.item.getItemManagementFormGroup(e, t))), t(this, "renderItemMenu", (e, t) => this.components.renderOne("listItem", b(this.item.getItemManagementFormMenu(e, !!t.open.value), t.binds))), t(this, "renderSpace", (t) => {
334
+ var n;
335
+ return a("div", {
336
+ key: t.value,
337
+ class: [(n = this.classes) == null ? void 0 : n.value.space, this.item.windowClasses.get().static],
338
+ ...e.role("separator")
339
+ });
340
+ }), t(this, "renderLine", (t) => {
341
+ var n;
342
+ return a("div", {
343
+ key: t.value,
344
+ class: [(n = this.classes) == null ? void 0 : n.value.line, this.item.windowClasses.get().static],
345
+ ...e.role("separator")
346
+ });
347
+ }), t(this, "renderSubtitle", (t) => {
348
+ var n;
349
+ return a("div", {
350
+ key: t.value,
351
+ class: [(n = this.classes) == null ? void 0 : n.value.subtitle, this.item.windowClasses.get().static],
352
+ ...e.role("separator")
353
+ }, t.label);
354
+ }), t(this, "renderHtml", (e) => {
355
+ var t;
356
+ let n = {
357
+ key: e.label && v(e.value) ? e.label : e.value,
358
+ class: [(t = this.classes) == null ? void 0 : t.value.html, this.item.windowClasses.get().static]
359
+ };
360
+ return this.slots && e.value in this.slots ? a("div", n, this.initSlot(e.value)) : a("div", {
361
+ ...n,
362
+ innerHTML: e.label
363
+ });
364
+ }), t(this, "renderGroup", (e) => this.components.renderOne("listGroup", {
365
+ open: this.item.isOpenGroup(e),
366
+ divider: this.props.divider,
367
+ disabled: e.disabled
368
+ }, {
369
+ head: (t) => this.renderItemGroup(e, t),
370
+ list: () => this.renderDataByItem("group", this.item.getList(e))
371
+ })), t(this, "renderMenu", (e, t) => this.components.renderOne("listMenu", {
372
+ divider: this.props.divider,
373
+ axis: t && this.props.axis === "x" ? "y" : "x",
374
+ disabled: e.disabled
375
+ }, {
376
+ head: (t) => this.renderItemMenu(e, t),
377
+ list: () => this.renderDataByItem("menu", this.item.getList(e))
378
+ })), this.item = new o(this.props, this.refs, this.element, this.getDesign(), this.getName(), this.components, this.slots, this.emits), this.init();
379
+ }
380
+ initExpose() {
381
+ return {
382
+ isSelected: this.item.data.isSelected,
383
+ selectedList: this.item.data.selectedList,
384
+ selectedNames: this.item.data.selectedNames,
385
+ selectedValues: this.item.data.selectedValues
386
+ };
387
+ }
388
+ initClasses() {
389
+ return {
390
+ main: this.item.classes.value,
391
+ space: this.getSubClass("space"),
392
+ line: this.getSubClass("line"),
393
+ subtitle: this.getSubClass("subtitle"),
394
+ html: this.getSubClass("html"),
395
+ management: this.getSubClass("management"),
396
+ group: this.getSubClass("group"),
397
+ menu: this.getSubClass("menu"),
398
+ menuGroup: this.getSubClass("menuGroup")
399
+ };
400
+ }
401
+ initStyles() {
402
+ return {};
403
+ }
404
+ initRender() {
405
+ var t;
406
+ return a("div", {
407
+ ...this.getAttrs(),
408
+ ref: this.element,
409
+ class: (t = this.classes) == null ? void 0 : t.value.main,
410
+ ...e.role(this.props.role),
411
+ tabindex: this.props.control ? void 0 : this.props.tabindex,
412
+ onFocus: this.item.control.onFocus,
413
+ onBlur: this.item.control.onBlur
414
+ }, this.renderData());
415
+ }
416
+ renderDataByItem(e, t, n = !1) {
417
+ let r = [];
418
+ return t.forEach((t) => {
419
+ switch (t.type) {
420
+ case "space":
421
+ r.push(this.renderSpace(t));
422
+ break;
423
+ case "line":
424
+ r.push(this.renderLine(t));
425
+ break;
426
+ case "subtitle":
427
+ r.push(this.renderSubtitle(t));
428
+ break;
429
+ case "html":
430
+ r.push(this.renderHtml(t));
431
+ break;
432
+ case "group":
433
+ this.isHighlight(t) && r.push(this.renderGroup(t));
434
+ break;
435
+ case "menu":
436
+ this.isHighlight(t) && r.push(this.renderMenu(t, n));
437
+ break;
438
+ default:
439
+ r.push(this.renderItem(e, t));
440
+ break;
441
+ }
442
+ }), r.push(a("div")), r;
443
+ }
444
+ isHighlight(e) {
445
+ return this.props.filterMode ? this.item.data.getSubList(e).isHighlightActive() : !0;
446
+ }
447
+ getItemAttrs(e, t) {
448
+ switch (e) {
449
+ case "group": return this.item.getItemGroup(t);
450
+ case "menu": return this.item.getItemMenu(t);
451
+ default: return this.item.getItem(t);
452
+ }
453
+ }
1063
454
  };
455
+ //#endregion
456
+ export { D as List, T as ListControl, k as ListDesign, C as ListFocus, w as ListGo, x as ListSearch, O as defaultsList };