@dxtmisha/constructor 0.23.0 → 0.30.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 (343) hide show
  1. package/package.json +36 -6
  2. package/src/classes/AriaStaticInclude.ts +269 -0
  3. package/src/classes/DescriptionInclude.ts +19 -2
  4. package/src/classes/EnabledInclude.ts +11 -0
  5. package/src/classes/EventClickInclude.ts +2 -2
  6. package/src/classes/LabelHighlightInclude.ts +35 -0
  7. package/src/classes/LabelInclude.ts +40 -5
  8. package/src/classes/ModelInclude.ts +50 -1
  9. package/src/classes/ModelValueInclude.ts +73 -0
  10. package/src/classes/TabIndexInclude.ts +260 -0
  11. package/src/classes/TextInclude.ts +102 -0
  12. package/src/classes/TouchEventInclude.ts +284 -0
  13. package/src/classes/field/FieldArrowInclude.ts +189 -0
  14. package/src/classes/field/FieldAttributesInclude.ts +87 -28
  15. package/src/classes/field/FieldChangeInclude.ts +1 -1
  16. package/src/classes/field/FieldElementInclude.ts +1 -1
  17. package/src/classes/field/FieldEventInclude.ts +253 -0
  18. package/src/classes/field/FieldInputModeInclude.ts +48 -0
  19. package/src/classes/field/FieldMatchInclude.ts +9 -3
  20. package/src/classes/field/FieldTypeInclude.ts +11 -6
  21. package/src/classes/field/FieldValidationInclude.ts +1 -4
  22. package/src/classes/field/FieldValueInclude.ts +10 -0
  23. package/src/constructors/Accordion/Accordion.ts +68 -0
  24. package/src/constructors/Accordion/AccordionDesign.tsx +192 -0
  25. package/src/constructors/Accordion/basicTypes.ts +0 -0
  26. package/src/constructors/Accordion/index.ts +5 -0
  27. package/src/constructors/Accordion/properties.json +16 -0
  28. package/src/constructors/Accordion/props.ts +55 -0
  29. package/src/constructors/Accordion/style.scss +12 -0
  30. package/src/constructors/Accordion/types.ts +63 -0
  31. package/src/constructors/ActionSheet/ActionSheet.ts +78 -0
  32. package/src/constructors/ActionSheet/ActionSheetDesign.tsx +125 -0
  33. package/src/constructors/ActionSheet/basicTypes.ts +0 -0
  34. package/src/constructors/ActionSheet/index.ts +5 -0
  35. package/src/constructors/ActionSheet/properties.json +14 -0
  36. package/src/constructors/ActionSheet/props.ts +44 -0
  37. package/src/constructors/ActionSheet/style.scss +25 -0
  38. package/src/constructors/ActionSheet/types.ts +54 -0
  39. package/src/constructors/Actions/Actions.ts +60 -0
  40. package/src/constructors/Actions/ActionsDesign.tsx +212 -0
  41. package/src/constructors/Actions/ActionsInclude.ts +109 -0
  42. package/src/constructors/Actions/basicTypes.ts +40 -0
  43. package/src/constructors/Actions/index.ts +6 -0
  44. package/src/constructors/Actions/properties.json +63 -0
  45. package/src/constructors/Actions/props.ts +42 -0
  46. package/src/constructors/Actions/style.scss +11 -0
  47. package/src/constructors/Actions/types.ts +52 -0
  48. package/src/constructors/Anchor/Anchor.ts +113 -0
  49. package/src/constructors/Anchor/AnchorDesign.tsx +242 -0
  50. package/src/constructors/Anchor/AnchorEvent.ts +76 -0
  51. package/src/constructors/Anchor/AnchorHref.ts +54 -0
  52. package/src/constructors/Anchor/AnchorIcon.ts +54 -0
  53. package/src/constructors/Anchor/AnchorTo.ts +46 -0
  54. package/src/constructors/Anchor/basicTypes.ts +9 -0
  55. package/src/constructors/Anchor/index.ts +5 -0
  56. package/src/constructors/Anchor/properties.json +3 -0
  57. package/src/constructors/Anchor/props.ts +54 -0
  58. package/src/constructors/Anchor/style.scss +10 -0
  59. package/src/constructors/Anchor/types.ts +47 -0
  60. package/src/constructors/Arrow/Arrow.ts +134 -0
  61. package/src/constructors/Arrow/ArrowDesign.tsx +226 -0
  62. package/src/constructors/Arrow/ArrowElement.ts +139 -0
  63. package/src/constructors/Arrow/ArrowElementTarget.ts +72 -0
  64. package/src/constructors/Arrow/ArrowEvent.ts +126 -0
  65. package/src/constructors/Arrow/ArrowInclude.ts +85 -0
  66. package/src/constructors/Arrow/ArrowParent.ts +100 -0
  67. package/src/constructors/Arrow/ArrowPosition.ts +231 -0
  68. package/src/constructors/Arrow/basicTypes.ts +50 -0
  69. package/src/constructors/Arrow/index.ts +6 -0
  70. package/src/constructors/Arrow/properties.json +23 -0
  71. package/src/constructors/Arrow/props.ts +31 -0
  72. package/src/constructors/Arrow/style.scss +133 -0
  73. package/src/constructors/Arrow/types.ts +54 -0
  74. package/src/constructors/Badge/BadgeDesign.tsx +4 -1
  75. package/src/constructors/Badge/properties.json +36 -36
  76. package/src/constructors/Badge/props.ts +3 -1
  77. package/src/constructors/Badge/types.ts +3 -3
  78. package/src/constructors/Bars/Bars.ts +10 -4
  79. package/src/constructors/Bars/BarsDesign.tsx +17 -11
  80. package/src/constructors/Bars/BarsInclude.ts +5 -2
  81. package/src/constructors/Bars/properties.json +6 -6
  82. package/src/constructors/Bars/props.ts +3 -1
  83. package/src/constructors/Bars/style.scss +4 -0
  84. package/src/constructors/Bars/types.ts +3 -3
  85. package/src/constructors/Block/Block.ts +105 -0
  86. package/src/constructors/Block/BlockDesign.tsx +219 -0
  87. package/src/constructors/Block/basicTypes.ts +0 -0
  88. package/src/constructors/Block/index.ts +5 -0
  89. package/src/constructors/Block/properties.json +10 -0
  90. package/src/constructors/Block/props.ts +46 -0
  91. package/src/constructors/Block/style.scss +11 -0
  92. package/src/constructors/Block/types.ts +64 -0
  93. package/src/constructors/Button/Button.ts +26 -2
  94. package/src/constructors/Button/ButtonDesign.tsx +11 -6
  95. package/src/constructors/Button/ButtonInclude.ts +8 -5
  96. package/src/constructors/Button/index.ts +1 -0
  97. package/src/constructors/Button/properties.json +84 -84
  98. package/src/constructors/Button/props.ts +5 -1
  99. package/src/constructors/Button/style.scss +1 -1
  100. package/src/constructors/Button/types.ts +2 -2
  101. package/src/constructors/Cell/Cell.ts +23 -6
  102. package/src/constructors/Cell/CellDesign.tsx +53 -22
  103. package/src/constructors/Cell/basicTypes.ts +33 -0
  104. package/src/constructors/Cell/properties.json +52 -52
  105. package/src/constructors/Cell/props.ts +16 -13
  106. package/src/constructors/Cell/style.scss +1 -1
  107. package/src/constructors/Cell/types.ts +3 -3
  108. package/src/constructors/Chip/ChipDesign.tsx +5 -5
  109. package/src/constructors/Chip/ChipInclude.ts +83 -0
  110. package/src/constructors/Chip/basicTypes.ts +12 -0
  111. package/src/constructors/Chip/index.ts +2 -0
  112. package/src/constructors/Chip/properties.json +3 -3
  113. package/src/constructors/Chip/types.ts +5 -5
  114. package/src/constructors/ChipGroup/ChipGroup.ts +74 -0
  115. package/src/constructors/ChipGroup/ChipGroupDesign.tsx +162 -0
  116. package/src/constructors/ChipGroup/basicTypes.ts +6 -0
  117. package/src/constructors/ChipGroup/index.ts +5 -0
  118. package/src/constructors/ChipGroup/properties.json +3 -0
  119. package/src/constructors/ChipGroup/props.ts +50 -0
  120. package/src/constructors/ChipGroup/style.scss +6 -0
  121. package/src/constructors/ChipGroup/types.ts +47 -0
  122. package/src/constructors/Dialog/Dialog.ts +145 -0
  123. package/src/constructors/Dialog/DialogDesign.tsx +135 -0
  124. package/src/constructors/Dialog/basicTypes.ts +0 -0
  125. package/src/constructors/Dialog/index.ts +5 -0
  126. package/src/constructors/Dialog/properties.json +23 -0
  127. package/src/constructors/Dialog/props.ts +76 -0
  128. package/src/constructors/Dialog/style.scss +18 -0
  129. package/src/constructors/Dialog/types.ts +67 -0
  130. package/src/constructors/Field/Field.ts +58 -19
  131. package/src/constructors/Field/FieldDesign.tsx +35 -17
  132. package/src/constructors/Field/FieldInclude.ts +141 -11
  133. package/src/constructors/Field/basicTypes.ts +35 -19
  134. package/src/constructors/Field/properties.json +92 -86
  135. package/src/constructors/Field/props.ts +6 -3
  136. package/src/constructors/Field/style.scss +36 -20
  137. package/src/constructors/Field/types.ts +13 -13
  138. package/src/constructors/FieldCounter/FieldCounterDesign.tsx +1 -0
  139. package/src/constructors/FieldCounter/FieldCounterInclude.ts +3 -1
  140. package/src/constructors/FieldCounter/basicTypes.ts +1 -0
  141. package/src/constructors/FieldCounter/properties.json +3 -3
  142. package/src/constructors/FieldCounter/props.ts +5 -2
  143. package/src/constructors/FieldCounter/types.ts +1 -1
  144. package/src/constructors/FieldLabel/FieldLabelDesign.tsx +6 -2
  145. package/src/constructors/FieldLabel/FieldLabelInclude.ts +13 -4
  146. package/src/constructors/FieldLabel/properties.json +4 -4
  147. package/src/constructors/FieldLabel/props.ts +2 -2
  148. package/src/constructors/FieldLabel/types.ts +2 -2
  149. package/src/constructors/FieldMessage/FieldMessage.ts +19 -0
  150. package/src/constructors/FieldMessage/FieldMessageDesign.tsx +36 -4
  151. package/src/constructors/FieldMessage/FieldMessageInclude.ts +11 -1
  152. package/src/constructors/FieldMessage/basicTypes.ts +15 -1
  153. package/src/constructors/FieldMessage/properties.json +10 -9
  154. package/src/constructors/FieldMessage/props.ts +4 -0
  155. package/src/constructors/FieldMessage/style.scss +16 -1
  156. package/src/constructors/FieldMessage/types.ts +4 -2
  157. package/src/constructors/Icon/Icon.ts +37 -2
  158. package/src/constructors/Icon/IconDesign.tsx +46 -39
  159. package/src/constructors/Icon/properties.json +25 -25
  160. package/src/constructors/Icon/props.ts +22 -16
  161. package/src/constructors/Icon/types.ts +1 -1
  162. package/src/constructors/Image/Image.ts +68 -10
  163. package/src/constructors/Image/ImageBackground.ts +15 -2
  164. package/src/constructors/Image/ImageCoordinator.ts +4 -2
  165. package/src/constructors/Image/ImageData.ts +4 -0
  166. package/src/constructors/Image/ImageDesign.tsx +81 -15
  167. package/src/constructors/Image/ImageFile.ts +2 -13
  168. package/src/constructors/Image/ImageImg.ts +218 -0
  169. package/src/constructors/Image/ImagePdf.ts +2 -2
  170. package/src/constructors/Image/basicTypes.ts +5 -0
  171. package/src/constructors/Image/properties.json +17 -17
  172. package/src/constructors/Image/props.ts +34 -7
  173. package/src/constructors/Image/style.scss +42 -0
  174. package/src/constructors/Image/types.ts +1 -1
  175. package/src/constructors/Input/Input.ts +146 -0
  176. package/src/constructors/Input/InputDesign.tsx +174 -0
  177. package/src/constructors/Input/InputPassword.ts +54 -0
  178. package/src/constructors/Input/basicTypes.ts +3 -0
  179. package/src/constructors/Input/index.ts +5 -0
  180. package/src/constructors/Input/properties.json +2 -0
  181. package/src/constructors/Input/props.ts +53 -0
  182. package/src/constructors/Input/style.scss +5 -0
  183. package/src/constructors/Input/types.ts +48 -0
  184. package/src/constructors/List/List.ts +36 -11
  185. package/src/constructors/List/ListControl.ts +2 -2
  186. package/src/constructors/List/ListDesign.tsx +59 -38
  187. package/src/constructors/List/ListGo.ts +5 -3
  188. package/src/constructors/List/properties.json +16 -16
  189. package/src/constructors/List/props.ts +7 -0
  190. package/src/constructors/List/style.scss +14 -0
  191. package/src/constructors/List/types.ts +9 -9
  192. package/src/constructors/ListGroup/ListGroupDesign.tsx +8 -3
  193. package/src/constructors/ListGroup/basicTypes.ts +7 -0
  194. package/src/constructors/ListGroup/properties.json +15 -15
  195. package/src/constructors/ListGroup/props.ts +4 -4
  196. package/src/constructors/ListGroup/types.ts +2 -1
  197. package/src/constructors/ListItem/ListItem.ts +67 -7
  198. package/src/constructors/ListItem/ListItemDesign.tsx +13 -10
  199. package/src/constructors/ListItem/properties.json +52 -52
  200. package/src/constructors/ListItem/props.ts +24 -15
  201. package/src/constructors/ListItem/types.ts +12 -12
  202. package/src/constructors/ListMenu/ListMenu.ts +2 -1
  203. package/src/constructors/ListMenu/ListMenuDesign.tsx +3 -3
  204. package/src/constructors/ListMenu/properties.json +19 -19
  205. package/src/constructors/ListMenu/types.ts +3 -3
  206. package/src/constructors/Mask/MaskDesign.tsx +33 -28
  207. package/src/constructors/Mask/MaskEvent.ts +41 -2
  208. package/src/constructors/Mask/MaskInclude.ts +147 -0
  209. package/src/constructors/Mask/basicTypes.ts +19 -1
  210. package/src/constructors/Mask/properties.json +30 -29
  211. package/src/constructors/Mask/props.ts +1 -1
  212. package/src/constructors/Mask/style.scss +2 -4
  213. package/src/constructors/Mask/types.ts +4 -4
  214. package/src/constructors/Menu/Menu.ts +17 -5
  215. package/src/constructors/Menu/MenuDesign.tsx +11 -11
  216. package/src/constructors/Menu/MenuGo.ts +72 -0
  217. package/src/constructors/Menu/MenuInclude.ts +20 -10
  218. package/src/constructors/Menu/MenuSearch.ts +20 -1
  219. package/src/constructors/Menu/MenuValue.ts +7 -3
  220. package/src/constructors/Menu/MenuWindow.ts +2 -1
  221. package/src/constructors/Menu/basicTypes.ts +21 -4
  222. package/src/constructors/Menu/properties.json +17 -17
  223. package/src/constructors/Menu/props.ts +15 -3
  224. package/src/constructors/Menu/types.ts +6 -16
  225. package/src/constructors/Modal/Modal.ts +53 -0
  226. package/src/constructors/Modal/ModalAbstract.ts +74 -0
  227. package/src/constructors/Modal/ModalDesign.tsx +63 -0
  228. package/src/constructors/Modal/ModalDesignAbstract.tsx +226 -0
  229. package/src/constructors/Modal/basicTypes.ts +0 -0
  230. package/src/constructors/Modal/index.ts +5 -0
  231. package/src/constructors/Modal/properties.json +17 -0
  232. package/src/constructors/Modal/props.ts +45 -0
  233. package/src/constructors/Modal/style.scss +20 -0
  234. package/src/constructors/Modal/types.ts +62 -0
  235. package/src/constructors/MotionTransform/MotionTransform.ts +65 -8
  236. package/src/constructors/MotionTransform/MotionTransformDesign.tsx +55 -21
  237. package/src/constructors/MotionTransform/MotionTransformElement.ts +7 -2
  238. package/src/constructors/MotionTransform/MotionTransformInclude.ts +2 -1
  239. package/src/constructors/MotionTransform/MotionTransformState.ts +5 -0
  240. package/src/constructors/MotionTransform/basicTypes.ts +18 -2
  241. package/src/constructors/MotionTransform/properties.json +35 -35
  242. package/src/constructors/MotionTransform/props.ts +13 -7
  243. package/src/constructors/MotionTransform/style.scss +24 -2
  244. package/src/constructors/MotionTransform/types.ts +7 -7
  245. package/src/constructors/Progress/Progress.ts +12 -2
  246. package/src/constructors/Progress/ProgressDesign.tsx +75 -53
  247. package/src/constructors/Progress/ProgressInclude.ts +13 -1
  248. package/src/constructors/Progress/properties.json +47 -47
  249. package/src/constructors/Progress/props.ts +5 -1
  250. package/src/constructors/Progress/style.scss +2 -2
  251. package/src/constructors/Progress/types.ts +4 -4
  252. package/src/constructors/Ripple/Ripple.ts +1 -1
  253. package/src/constructors/Ripple/RippleDesign.tsx +7 -4
  254. package/src/constructors/Ripple/RippleItem.ts +1 -1
  255. package/src/constructors/Ripple/style.scss +4 -0
  256. package/src/constructors/Ripple/types.ts +2 -2
  257. package/src/constructors/Scrollbar/Scrollbar.ts +3 -3
  258. package/src/constructors/Scrollbar/ScrollbarDesign.tsx +1 -1
  259. package/src/constructors/Scrollbar/properties.json +33 -33
  260. package/src/constructors/Scrollbar/types.ts +1 -1
  261. package/src/constructors/Section/Section.ts +33 -0
  262. package/src/constructors/Section/SectionDesign.tsx +127 -0
  263. package/src/constructors/Section/basicTypes.ts +0 -0
  264. package/src/constructors/Section/index.ts +5 -0
  265. package/src/constructors/Section/properties.json +2 -0
  266. package/src/constructors/Section/props.ts +29 -0
  267. package/src/constructors/Section/style.scss +5 -0
  268. package/src/constructors/Section/types.ts +47 -0
  269. package/src/constructors/Select/Select.ts +172 -0
  270. package/src/constructors/Select/SelectDesign.tsx +288 -0
  271. package/src/constructors/Select/SelectFilter.ts +43 -0
  272. package/src/constructors/Select/SelectInput.ts +68 -0
  273. package/src/constructors/Select/basicTypes.ts +0 -0
  274. package/src/constructors/Select/index.ts +5 -0
  275. package/src/constructors/Select/properties.json +3 -0
  276. package/src/constructors/Select/props.ts +63 -0
  277. package/src/constructors/Select/style.scss +5 -0
  278. package/src/constructors/Select/types.ts +53 -0
  279. package/src/constructors/SelectValue/SelectValue.ts +95 -0
  280. package/src/constructors/SelectValue/SelectValueDesign.tsx +198 -0
  281. package/src/constructors/SelectValue/SelectValueInclude.ts +92 -0
  282. package/src/constructors/SelectValue/basicTypes.ts +17 -0
  283. package/src/constructors/SelectValue/index.ts +6 -0
  284. package/src/constructors/SelectValue/properties.json +7 -0
  285. package/src/constructors/SelectValue/props.ts +48 -0
  286. package/src/constructors/SelectValue/style.scss +14 -0
  287. package/src/constructors/SelectValue/types.ts +47 -0
  288. package/src/constructors/Skeleton/Skeleton.ts +1 -3
  289. package/src/constructors/Skeleton/SkeletonDesign.tsx +7 -1
  290. package/src/constructors/Skeleton/SkeletonInclude.ts +5 -0
  291. package/src/constructors/Skeleton/properties.json +24 -24
  292. package/src/constructors/Skeleton/types.ts +1 -1
  293. package/src/constructors/TextareaAutosize/TextareaAutosize.ts +41 -0
  294. package/src/constructors/TextareaAutosize/TextareaAutosizeDesign.tsx +147 -0
  295. package/src/constructors/TextareaAutosize/TextareaAutosizeResize.ts +109 -0
  296. package/src/constructors/TextareaAutosize/TextareaAutosizeValue.ts +69 -0
  297. package/src/constructors/TextareaAutosize/basicTypes.ts +0 -0
  298. package/src/constructors/TextareaAutosize/index.ts +5 -0
  299. package/src/constructors/TextareaAutosize/properties.json +6 -0
  300. package/src/constructors/TextareaAutosize/props.ts +34 -0
  301. package/src/constructors/TextareaAutosize/style.scss +31 -0
  302. package/src/constructors/TextareaAutosize/types.ts +50 -0
  303. package/src/constructors/Tooltip/Tooltip.ts +138 -0
  304. package/src/constructors/Tooltip/TooltipClasses.ts +90 -0
  305. package/src/constructors/Tooltip/TooltipDesign.tsx +198 -0
  306. package/src/constructors/Tooltip/TooltipEvent.ts +103 -0
  307. package/src/constructors/Tooltip/TooltipInclude.ts +114 -0
  308. package/src/constructors/Tooltip/TooltipOpen.ts +128 -0
  309. package/src/constructors/Tooltip/TooltipPosition.ts +92 -0
  310. package/src/constructors/Tooltip/TooltipStatus.ts +97 -0
  311. package/src/constructors/Tooltip/TooltipStyle.ts +123 -0
  312. package/src/constructors/Tooltip/basicTypes.ts +39 -0
  313. package/src/constructors/Tooltip/index.ts +6 -0
  314. package/src/constructors/Tooltip/properties.json +14 -0
  315. package/src/constructors/Tooltip/props.ts +49 -0
  316. package/src/constructors/Tooltip/style.scss +43 -0
  317. package/src/constructors/Tooltip/types.ts +58 -0
  318. package/src/constructors/Window/Window.ts +52 -16
  319. package/src/constructors/Window/WindowClasses.ts +33 -0
  320. package/src/constructors/Window/WindowClient.ts +39 -0
  321. package/src/constructors/Window/WindowDesign.tsx +31 -14
  322. package/src/constructors/Window/WindowEsc.ts +114 -0
  323. package/src/constructors/Window/WindowHidden.ts +120 -0
  324. package/src/constructors/Window/WindowInclude.ts +2 -2
  325. package/src/constructors/Window/WindowOpen.ts +10 -1
  326. package/src/constructors/Window/WindowOrigin.ts +5 -1
  327. package/src/constructors/Window/WindowStatic.ts +3 -1
  328. package/src/constructors/Window/WindowVerification.ts +8 -5
  329. package/src/constructors/Window/basicTypes.ts +26 -16
  330. package/src/constructors/Window/properties.json +239 -236
  331. package/src/constructors/Window/props.ts +10 -1
  332. package/src/constructors/Window/style.scss +11 -0
  333. package/src/constructors/Window/types.ts +2 -2
  334. package/src/functions/{getClassTegAStatic.ts → getClassTagAStatic.ts} +1 -1
  335. package/src/library.ts +13 -1
  336. package/src/types/ariaTypes.ts +366 -0
  337. package/src/types/descriptionTypes.ts +8 -0
  338. package/src/types/fieldTypes.ts +120 -16
  339. package/src/types/labelTypes.ts +39 -0
  340. package/src/types/modelTypes.ts +16 -0
  341. package/src/types/roleTypes.ts +88 -0
  342. package/src/types/textTypes.ts +33 -0
  343. package/src/types/touchEventTypes.ts +43 -0
@@ -0,0 +1,146 @@
1
+ import { computed, type Ref, type ToRefs } from 'vue'
2
+ import { type ConstrEmit, DesignComp } from '@dxtmisha/functional'
3
+
4
+ import { FieldChangeInclude } from '../../classes/field/FieldChangeInclude'
5
+ import { FieldVisibilityInclude } from '../../classes/field/FieldVisibilityInclude'
6
+ import { FieldTypeInclude } from '../../classes/field/FieldTypeInclude'
7
+ import { FieldPatternInclude } from '../../classes/field/FieldPatternInclude'
8
+ import { FieldAttributesInclude } from '../../classes/field/FieldAttributesInclude'
9
+
10
+ import { FieldElementInclude } from '../../classes/field/FieldElementInclude'
11
+
12
+ import { FieldValueInclude } from '../../classes/field/FieldValueInclude'
13
+ import { FieldArrowInclude } from '../../classes/field/FieldArrowInclude'
14
+ import { InputPassword } from './InputPassword'
15
+ import { FieldMatchInclude } from '../../classes/field/FieldMatchInclude'
16
+
17
+ import { FieldInputModeInclude } from '../../classes/field/FieldInputModeInclude'
18
+ import { FieldCodeInclude } from '../../classes/field/FieldCodeInclude'
19
+ import { FieldValidationInclude } from '../../classes/field/FieldValidationInclude'
20
+ import { FieldEventInclude } from '../../classes/field/FieldEventInclude'
21
+
22
+ import { FieldInclude } from '../Field/FieldInclude'
23
+ import { MaskInclude } from '../Mask/MaskInclude'
24
+
25
+ import type { FieldElementInput } from '../../types/fieldTypes'
26
+ import type { InputComponents, InputEmits, InputSlots } from './types'
27
+ import type { InputProps } from './props'
28
+
29
+ /**
30
+ * Input
31
+ */
32
+ export class Input {
33
+ readonly visibility: FieldVisibilityInclude
34
+ readonly type: FieldTypeInclude
35
+ readonly pattern: FieldPatternInclude
36
+ readonly inputMode: FieldInputModeInclude
37
+ readonly attributes: FieldAttributesInclude
38
+
39
+ readonly elementItem: FieldElementInclude
40
+ readonly change: FieldChangeInclude
41
+
42
+ readonly value: FieldValueInclude
43
+ readonly arrow: FieldArrowInclude
44
+ readonly password: InputPassword
45
+ readonly match: FieldMatchInclude
46
+
47
+ readonly code: FieldCodeInclude
48
+ readonly validation: FieldValidationInclude
49
+ readonly event: FieldEventInclude
50
+
51
+ readonly field: FieldInclude
52
+ readonly mask: MaskInclude
53
+
54
+ /**
55
+ * Constructor
56
+ * @param props input data/ входные данные
57
+ * @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
58
+ * @param element input element/ элемент ввода
59
+ * @param classDesign design name/ название дизайна
60
+ * @param className class name/ название класса
61
+ * @param components object for working with components/ объект для работы с компонентами
62
+ * @param slots object for working with slots/ объект для работы со слотами
63
+ * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
64
+ */
65
+ constructor(
66
+ protected readonly props: InputProps,
67
+ protected readonly refs: ToRefs<InputProps>,
68
+ protected readonly element: Ref<FieldElementInput>,
69
+ protected readonly classDesign: string,
70
+ protected readonly className: string,
71
+ protected readonly components?: DesignComp<InputComponents, InputProps>,
72
+ protected readonly slots?: InputSlots,
73
+ protected readonly emits?: ConstrEmit<InputEmits>
74
+ ) {
75
+ this.change = new FieldChangeInclude(this.props)
76
+ this.visibility = new FieldVisibilityInclude()
77
+ this.type = new FieldTypeInclude(this.props, this.visibility)
78
+ this.pattern = new FieldPatternInclude(this.props, this.type)
79
+ this.inputMode = new FieldInputModeInclude(this.props, this.type)
80
+ this.attributes = new FieldAttributesInclude(
81
+ this.props,
82
+ this.type,
83
+ this.pattern,
84
+ this.inputMode
85
+ )
86
+
87
+ this.elementItem = new FieldElementInclude(
88
+ this.props,
89
+ this.element
90
+ )
91
+
92
+ this.value = new FieldValueInclude(
93
+ this.props,
94
+ this.refs,
95
+ this.elementItem
96
+ )
97
+ this.arrow = new FieldArrowInclude(this.props, this.value, this.type)
98
+ this.password = new InputPassword(this.props, this.visibility)
99
+ this.match = new FieldMatchInclude(
100
+ this.props,
101
+ this.elementItem,
102
+ this.value
103
+ )
104
+
105
+ this.code = new FieldCodeInclude(this.props)
106
+ this.validation = new FieldValidationInclude(
107
+ this.props,
108
+ this.attributes,
109
+ this.value,
110
+ this.change,
111
+ this.code,
112
+ this.match
113
+ )
114
+ this.event = new FieldEventInclude(
115
+ this.props,
116
+ this.change,
117
+ this.value,
118
+ this.validation,
119
+ this.emits
120
+ )
121
+
122
+ this.field = new FieldInclude(
123
+ this.props,
124
+ this.value,
125
+ this.components,
126
+ this.event,
127
+ this.arrow,
128
+ undefined,
129
+ () => this.password.toggle(),
130
+ undefined,
131
+ undefined,
132
+ computed(() => ({
133
+ iconTrailing: this.password.icon.value ?? this.props.iconTrailing,
134
+ maxlength: this.props.maxlength ?? this.props.max
135
+ }))
136
+ )
137
+ this.mask = new MaskInclude(
138
+ this.props,
139
+ this.className,
140
+ this.value,
141
+ '',
142
+ this.components,
143
+ this.type
144
+ )
145
+ }
146
+ }
@@ -0,0 +1,174 @@
1
+ import { h, type VNode } from 'vue'
2
+ import {
3
+ type ConstrOptions,
4
+ type ConstrStyles,
5
+ DesignConstructorAbstract,
6
+ toBinds
7
+ } from '@dxtmisha/functional'
8
+
9
+ import { Input } from './Input'
10
+
11
+ import type { FieldControl } from '../Field'
12
+ import {
13
+ type InputPropsBasic
14
+ } from './props'
15
+ import {
16
+ type InputClasses,
17
+ type InputComponents,
18
+ type InputEmits,
19
+ type InputExpose,
20
+ type InputSlots
21
+ } from './types'
22
+
23
+ /**
24
+ * InputDesign
25
+ */
26
+ export class InputDesign<
27
+ COMP extends InputComponents,
28
+ EXPOSE extends InputExpose,
29
+ CLASSES extends InputClasses,
30
+ P extends InputPropsBasic
31
+ > extends DesignConstructorAbstract<
32
+ HTMLDivElement,
33
+ COMP,
34
+ InputEmits,
35
+ EXPOSE,
36
+ InputSlots,
37
+ CLASSES,
38
+ P
39
+ > {
40
+ protected readonly item: Input
41
+
42
+ /**
43
+ * Constructor
44
+ * @param name class name/ название класса
45
+ * @param props properties/ свойства
46
+ * @param options list of additional parameters/ список дополнительных параметров
47
+ */
48
+ constructor(
49
+ name: string,
50
+ props: Readonly<P>,
51
+ options?: ConstrOptions<COMP, InputEmits, P>
52
+ ) {
53
+ super(
54
+ name,
55
+ props,
56
+ options
57
+ )
58
+
59
+ this.item = new Input(
60
+ this.props,
61
+ this.refs,
62
+ this.element,
63
+ this.getDesign(),
64
+ this.getName(),
65
+ this.components,
66
+ this.slots,
67
+ this.emits
68
+ )
69
+
70
+ this.init()
71
+ }
72
+
73
+ /**
74
+ * Initialization of all the necessary properties for work
75
+ *
76
+ * Инициализация всех необходимых свойств для работы.
77
+ */
78
+ protected initExpose(): EXPOSE {
79
+ return {
80
+ value: this.item.value.item,
81
+ checkValidity: this.item.validation.checkValidity,
82
+ validationMessage: this.item.validation.message
83
+ } as EXPOSE
84
+ }
85
+
86
+ /**
87
+ * Improvement of the obtained list of classes.
88
+ *
89
+ * Доработка полученного списка классов.
90
+ */
91
+ protected initClasses(): Partial<CLASSES> {
92
+ return {
93
+ main: {},
94
+ ...{
95
+ // :classes [!] System label / Системная метка
96
+ // :classes [!] System label / Системная метка
97
+ }
98
+ } as Partial<CLASSES>
99
+ }
100
+
101
+ /**
102
+ * Refinement of the received list of styles.
103
+ *
104
+ * Доработка полученного списка стилей.
105
+ */
106
+ protected initStyles(): ConstrStyles {
107
+ return {}
108
+ }
109
+
110
+ /**
111
+ * A method for rendering.
112
+ *
113
+ * Метод для рендеринга.
114
+ */
115
+ protected initRender(): VNode[] {
116
+ return this.item.field.render(
117
+ {
118
+ default: this.renderInput
119
+ },
120
+ {
121
+ ...this.getAttrs(),
122
+ class: this.classes?.value.main,
123
+ validationMessage: this.item.validation.message.value
124
+ }
125
+ )
126
+ }
127
+
128
+ /**
129
+ * Rendering the input element.
130
+ *
131
+ * Рендер элемент input.
132
+ * @param input data for the input element/ данные для элемента ввода
133
+ */
134
+ protected readonly renderInput = (input: FieldControl): VNode[] => {
135
+ if (this.item.mask.isActive()) {
136
+ return this.renderMask(input)
137
+ }
138
+
139
+ return [h(
140
+ 'input',
141
+ toBinds(
142
+ this.item.attributes.listForInput.value,
143
+ input.binds,
144
+ {
145
+ ref: this.element,
146
+ value: this.item.value.item.value,
147
+ onBlur: this.item.event.onBlur,
148
+ onInput: this.item.event.onInput,
149
+ onChange: this.item.event.onChange
150
+ }
151
+ )
152
+ )]
153
+ }
154
+
155
+ /**
156
+ * Rendering mask element.
157
+ *
158
+ * Рендеринг элемента маски.
159
+ * @param input data for the input element/ данные для элемента ввода
160
+ */
161
+ protected readonly renderMask = (input: FieldControl): VNode[] => {
162
+ return this.item.mask.render({
163
+ ref: this.element,
164
+ class: input.className,
165
+ align: this.props.align,
166
+ inputAttrs: toBinds(
167
+ this.item.attributes.listForInput.value,
168
+ input.binds
169
+ ),
170
+ onBlur: this.item.event.onBlur,
171
+ onInput: this.item.event.onInput
172
+ })
173
+ }
174
+ }
@@ -0,0 +1,54 @@
1
+ import { computed } from 'vue'
2
+ import { FieldVisibilityInclude } from '../../classes/field/FieldVisibilityInclude'
3
+
4
+ import type { IconProps } from '../Icon'
5
+ import type { InputProps } from './props'
6
+
7
+ /**
8
+ * Class for retrieving data to manage the password type.
9
+ *
10
+ * Класс для получения данных для управления типом пароля.
11
+ */
12
+ export class InputPassword {
13
+ protected visible: boolean = false
14
+
15
+ /**
16
+ * Constructor
17
+ * @param props input data/ входные данные
18
+ * @param visibility object for working with visualization/ объект для работы с визуализацией
19
+ */
20
+
21
+ constructor(
22
+ protected readonly props: InputProps,
23
+ protected readonly visibility: FieldVisibilityInclude
24
+ ) {
25
+ }
26
+
27
+ /** Checks if the type is a password/ Проверяет, является ли тип паролем. */
28
+ readonly is = computed<boolean>(() => this.props.type === 'password')
29
+
30
+ /** Returns the icon value/ Возвращает значение иконки */
31
+ readonly icon = computed<IconProps | undefined>(() => {
32
+ if (this.is.value) {
33
+ return {
34
+ active: this.visibility.item.value,
35
+ icon: this.props.iconVisibilityOff,
36
+ iconActive: this.props.iconVisibility,
37
+ dynamic: true
38
+ }
39
+ }
40
+
41
+ return undefined
42
+ })
43
+
44
+ /**
45
+ * Toggle value.
46
+ *
47
+ * Переключение значения.
48
+ */
49
+ toggle() {
50
+ if (this.is.value) {
51
+ this.visibility.toggle()
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,3 @@
1
+ export type InputComponentInclude = {
2
+ input?: object
3
+ }
@@ -0,0 +1,5 @@
1
+ export * from './Input'
2
+ export * from './InputDesign'
3
+ export * from './props'
4
+ export * from './types'
5
+ export * from './basicTypes'
@@ -0,0 +1,2 @@
1
+ {
2
+ }
@@ -0,0 +1,53 @@
1
+ import type { NumberOrString } from '@dxtmisha/functional'
2
+
3
+ import type { MaskPropsBasic, MaskPropsInclude } from '../Mask'
4
+ import type { IconPropsBasic } from '../Icon'
5
+ import type { FieldPropsBasic, FieldPropsInclude } from '../Field'
6
+ import type { FieldLabelPropsBasic } from '../FieldLabel'
7
+ import type { FieldMessagePropsBasic } from '../FieldMessage'
8
+ import type { FieldCounterPropsBasic } from '../FieldCounter'
9
+ import type { ProgressPropsBasic } from '../Progress'
10
+
11
+ import type { FieldInputProps } from '../../types/fieldTypes'
12
+
13
+ interface InputPropsToken {
14
+ // :type [!] System label / Системная метка
15
+ // :type [!] System label / Системная метка
16
+ }
17
+
18
+ export interface InputPropsBasic<
19
+ Mask extends MaskPropsBasic = MaskPropsBasic,
20
+ Icon extends IconPropsBasic = IconPropsBasic,
21
+ Field extends FieldPropsBasic = FieldPropsBasic,
22
+ FieldLabel extends FieldLabelPropsBasic = FieldLabelPropsBasic,
23
+ FieldMessage extends FieldMessagePropsBasic = FieldMessagePropsBasic,
24
+ FieldCounter extends FieldCounterPropsBasic = FieldCounterPropsBasic,
25
+ Progress extends ProgressPropsBasic = ProgressPropsBasic
26
+ > extends MaskPropsInclude<Mask>,
27
+ FieldPropsInclude<Icon, Field, FieldLabel, FieldMessage, FieldCounter, Progress>,
28
+ FieldInputProps<NumberOrString> {
29
+ }
30
+
31
+ /**
32
+ * Type describing incoming properties.
33
+ *
34
+ * Тип, описывающий входящие свойства.
35
+ */
36
+ export interface InputProps extends InputPropsBasic, InputPropsToken {
37
+ }
38
+
39
+ /**
40
+ * Default value for property.
41
+ *
42
+ * Значение по умолчанию для свойства.
43
+ */
44
+ export const defaultsInput = {
45
+ type: 'text',
46
+ autocomplete: 'off',
47
+ arrow: 'auto',
48
+ maskVisible: true,
49
+ ...{
50
+ // :default [!] System label / Системная метка
51
+ // :default [!] System label / Системная метка
52
+ }
53
+ }
@@ -0,0 +1,5 @@
1
+ @use "@dxtmisha/styles/properties" as ui;
2
+
3
+ @mixin mixinInput {
4
+
5
+ }
@@ -0,0 +1,48 @@
1
+ import type { ConstrClass } from '@dxtmisha/functional'
2
+ import type { MaskComponentInclude } from '../Mask'
3
+ import type { FieldComponentInclude, FieldSlotsInclude } from '../Field'
4
+
5
+ import type { FieldBasicEmits, FieldBasicExpose } from '../../types/fieldTypes'
6
+
7
+ /**
8
+ * Interface for describing which components need to be connected for work.
9
+ *
10
+ * Интерфейс для описания, какие компоненты надо подключить для работы.
11
+ */
12
+ export type InputComponents
13
+ = MaskComponentInclude
14
+ & FieldComponentInclude
15
+
16
+ /**
17
+ * Type describing available events.
18
+ *
19
+ * Тип, описывающий доступные события.
20
+ */
21
+ export type InputEmits = FieldBasicEmits
22
+
23
+ /**
24
+ * Type describing available properties.
25
+ *
26
+ * Тип, описывающий доступные свойства.
27
+ */
28
+ export interface InputExpose extends FieldBasicExpose {
29
+ }
30
+
31
+ /**
32
+ * Type describing available slots.
33
+ *
34
+ * Тип, описывающий доступные слоты.
35
+ */
36
+ export interface InputSlots extends FieldSlotsInclude {
37
+ }
38
+
39
+ /**
40
+ * Type describing subclasses.
41
+ *
42
+ * Тип, описывающий подклассы.
43
+ */
44
+ export type InputClasses = {
45
+ main: ConstrClass
46
+ // :classes [!] System label / Системная метка
47
+ // :classes [!] System label / Системная метка
48
+ }
@@ -3,10 +3,11 @@ import {
3
3
  type ConstrBind,
4
4
  type ConstrEmit,
5
5
  DesignComp,
6
- ListData,
6
+ ListDataRef,
7
7
  type ListDataItem,
8
8
  type ListList,
9
- toBinds
9
+ toBinds,
10
+ type ConstrClass
10
11
  } from '@dxtmisha/functional'
11
12
 
12
13
  import { EventClickInclude } from '../../classes/EventClickInclude'
@@ -21,6 +22,7 @@ import { ListControl } from './ListControl'
21
22
  import type { ListComponents, ListEmits, ListSlots } from './types'
22
23
  import type { ListProps } from './props'
23
24
  import type { IconValue } from '../Icon'
25
+ import type { ListGroupSlotsPropsInclude } from '../ListGroup'
24
26
 
25
27
  /** Maximum number of lists/ Максимальное количество списков */
26
28
  let listIdMax = 1
@@ -32,7 +34,7 @@ export class List {
32
34
  readonly search: ListSearch
33
35
  readonly focus: ListFocus
34
36
 
35
- readonly data: ListData
37
+ readonly data: ListDataRef
36
38
  readonly event: EventClickInclude
37
39
 
38
40
  readonly go: ListGo
@@ -67,15 +69,18 @@ export class List {
67
69
  this.search = new ListSearch(this.props)
68
70
  this.focus = new ListFocus(this.props, this.element, this.id)
69
71
 
70
- this.data = new ListData(
72
+ this.data = new ListDataRef(
71
73
  toRef(this.props, 'list'),
72
74
  this.focus.focus,
73
75
  this.search.highlight,
74
76
  this.refs.highlightLengthStart,
77
+ this.refs.filterMode,
75
78
  this.refs.selected,
76
79
  this.refs.keyValue,
77
80
  this.refs.keyLabel,
78
- this.refs.liteThreshold
81
+ this.refs.liteThreshold,
82
+ undefined,
83
+ this.refs.max
79
84
  )
80
85
 
81
86
  this.go = new ListGo(this.props, this.focus, this.data, this.emits)
@@ -98,6 +103,15 @@ export class List {
98
103
  return this.data.fullData.value
99
104
  })
100
105
 
106
+ /**
107
+ * Computed CSS classes for the cell component.
108
+ *
109
+ * Вычисляемые CSS классы для компонента ячейки.
110
+ */
111
+ readonly classes = computed<ConstrClass>(() => ({
112
+ [`${this.className}--highlightActive`]: Boolean(this.props.filterMode) && this.data.isHighlight()
113
+ }))
114
+
101
115
  /**
102
116
  * Computed binding properties for list items/
103
117
  * Вычисляемые привязочные свойства для элементов списка
@@ -140,7 +154,10 @@ export class List {
140
154
  return toBinds(
141
155
  this.itemBinds.value,
142
156
  item,
143
- { key: item.value }
157
+ {
158
+ key: item.value,
159
+ role: this.props.roleItem
160
+ }
144
161
  )
145
162
  }
146
163
 
@@ -189,15 +206,19 @@ export class List {
189
206
  *
190
207
  * Получает привязочные свойства для элемента управления группой со стрелкой вниз
191
208
  * @param item List item data/ данные элемента списка
192
- * @param open Whether the group is open/ открыта ли группа
209
+ * @param props additional properties/ дополнительные свойства
193
210
  */
194
211
  getItemManagementFormGroup(
195
212
  item: ConstrBind<ListDataItem>,
196
- open: boolean
213
+ props: ListGroupSlotsPropsInclude
197
214
  ): ConstrBind<ListDataItem> {
198
215
  return this.getItemManagement(
199
- item,
200
- open,
216
+ {
217
+ ...item,
218
+ ...props,
219
+ filterMode: false
220
+ },
221
+ props.open,
201
222
  this.props.iconArrowDown
202
223
  )
203
224
  }
@@ -214,7 +235,11 @@ export class List {
214
235
  open: boolean
215
236
  ): ConstrBind<ListDataItem> {
216
237
  return this.getItemManagement(
217
- item,
238
+ {
239
+ ...item,
240
+ filterMode: false,
241
+ isMenu: true
242
+ },
218
243
  open,
219
244
  this.props.iconArrowRight
220
245
  )
@@ -1,5 +1,5 @@
1
1
  import { computed, onUnmounted, watch } from 'vue'
2
- import { EventItem, isDomRuntime, ListData } from '@dxtmisha/functional'
2
+ import { EventItem, isDomRuntime, ListDataRef } from '@dxtmisha/functional'
3
3
 
4
4
  import { ListSearch } from './ListSearch'
5
5
  import { ListGo } from './ListGo'
@@ -28,7 +28,7 @@ export class ListControl {
28
28
  constructor(
29
29
  protected readonly props: ListProps,
30
30
  protected readonly search: ListSearch,
31
- protected readonly data: ListData,
31
+ protected readonly data: ListDataRef,
32
32
  protected readonly go: ListGo
33
33
  ) {
34
34
  watch(