@dxtmisha/constructor 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +136 -0
  3. package/package.json +124 -0
  4. package/src/classes/CaptionInclude.ts +71 -0
  5. package/src/classes/DescriptionInclude.ts +70 -0
  6. package/src/classes/EnabledInclude.ts +56 -0
  7. package/src/classes/EventClickInclude.ts +138 -0
  8. package/src/classes/LabelHighlightInclude.ts +90 -0
  9. package/src/classes/LabelInclude.ts +171 -0
  10. package/src/classes/LabelNumberInclude.ts +70 -0
  11. package/src/classes/ModelInclude.ts +49 -0
  12. package/src/classes/PrefixInclude.ts +71 -0
  13. package/src/classes/SuffixInclude.ts +71 -0
  14. package/src/classes/field/FieldAttributesInclude.ts +100 -0
  15. package/src/classes/field/FieldChangeInclude.ts +52 -0
  16. package/src/classes/field/FieldCodeInclude.ts +69 -0
  17. package/src/classes/field/FieldElementInclude.ts +97 -0
  18. package/src/classes/field/FieldInputCheckInclude.ts +128 -0
  19. package/src/classes/field/FieldMatchInclude.ts +101 -0
  20. package/src/classes/field/FieldPatternInclude.ts +42 -0
  21. package/src/classes/field/FieldTypeInclude.ts +42 -0
  22. package/src/classes/field/FieldValidationInclude.ts +196 -0
  23. package/src/classes/field/FieldValueInclude.ts +318 -0
  24. package/src/classes/field/FieldVisibilityInclude.ts +21 -0
  25. package/src/constructors/Badge/Badge.ts +73 -0
  26. package/src/constructors/Badge/BadgeDesign.tsx +127 -0
  27. package/src/constructors/Badge/BadgeInclude.ts +78 -0
  28. package/src/constructors/Badge/basicTypes.ts +15 -0
  29. package/src/constructors/Badge/index.ts +5 -0
  30. package/src/constructors/Badge/properties.json +36 -0
  31. package/src/constructors/Badge/props.ts +43 -0
  32. package/src/constructors/Badge/style.scss +83 -0
  33. package/src/constructors/Badge/types.ts +47 -0
  34. package/src/constructors/Bars/Bars.ts +188 -0
  35. package/src/constructors/Bars/BarsAction.ts +57 -0
  36. package/src/constructors/Bars/BarsDesign.tsx +229 -0
  37. package/src/constructors/Bars/BarsInclude.ts +116 -0
  38. package/src/constructors/Bars/basicTypes.ts +40 -0
  39. package/src/constructors/Bars/index.ts +6 -0
  40. package/src/constructors/Bars/properties.json +6 -0
  41. package/src/constructors/Bars/props.ts +63 -0
  42. package/src/constructors/Bars/style.scss +18 -0
  43. package/src/constructors/Bars/types.ts +58 -0
  44. package/src/constructors/Button/Button.ts +88 -0
  45. package/src/constructors/Button/ButtonDesign.tsx +136 -0
  46. package/src/constructors/Button/ButtonInclude.ts +80 -0
  47. package/src/constructors/Button/basicTypes.ts +12 -0
  48. package/src/constructors/Button/index.ts +5 -0
  49. package/src/constructors/Button/properties.json +84 -0
  50. package/src/constructors/Button/props.ts +55 -0
  51. package/src/constructors/Button/style.scss +96 -0
  52. package/src/constructors/Button/types.ts +56 -0
  53. package/src/constructors/Cell/Cell.ts +127 -0
  54. package/src/constructors/Cell/CellDesign.tsx +203 -0
  55. package/src/constructors/Cell/basicTypes.ts +6 -0
  56. package/src/constructors/Cell/index.ts +5 -0
  57. package/src/constructors/Cell/properties.json +52 -0
  58. package/src/constructors/Cell/props.ts +61 -0
  59. package/src/constructors/Cell/style.scss +80 -0
  60. package/src/constructors/Cell/types.ts +68 -0
  61. package/src/constructors/Chip/Chip.ts +33 -0
  62. package/src/constructors/Chip/ChipDesign.tsx +26 -0
  63. package/src/constructors/Chip/basicTypes.ts +0 -0
  64. package/src/constructors/Chip/index.ts +4 -0
  65. package/src/constructors/Chip/properties.json +3 -0
  66. package/src/constructors/Chip/props.ts +44 -0
  67. package/src/constructors/Chip/style.scss +6 -0
  68. package/src/constructors/Chip/types.ts +53 -0
  69. package/src/constructors/Field/Field.ts +147 -0
  70. package/src/constructors/Field/FieldDesign.tsx +372 -0
  71. package/src/constructors/Field/FieldIcons.ts +99 -0
  72. package/src/constructors/Field/FieldInclude.ts +72 -0
  73. package/src/constructors/Field/FieldSize.ts +93 -0
  74. package/src/constructors/Field/basicTypes.ts +90 -0
  75. package/src/constructors/Field/index.ts +5 -0
  76. package/src/constructors/Field/properties.json +86 -0
  77. package/src/constructors/Field/props.ts +88 -0
  78. package/src/constructors/Field/style.scss +556 -0
  79. package/src/constructors/Field/types.ts +78 -0
  80. package/src/constructors/FieldCounter/FieldCounter.ts +75 -0
  81. package/src/constructors/FieldCounter/FieldCounterDesign.tsx +122 -0
  82. package/src/constructors/FieldCounter/FieldCounterInclude.ts +98 -0
  83. package/src/constructors/FieldCounter/basicTypes.ts +25 -0
  84. package/src/constructors/FieldCounter/index.ts +6 -0
  85. package/src/constructors/FieldCounter/properties.json +3 -0
  86. package/src/constructors/FieldCounter/props.ts +32 -0
  87. package/src/constructors/FieldCounter/style.scss +4 -0
  88. package/src/constructors/FieldCounter/types.ts +42 -0
  89. package/src/constructors/FieldLabel/FieldLabel.ts +93 -0
  90. package/src/constructors/FieldLabel/FieldLabelDesign.tsx +156 -0
  91. package/src/constructors/FieldLabel/FieldLabelInclude.ts +91 -0
  92. package/src/constructors/FieldLabel/basicTypes.ts +34 -0
  93. package/src/constructors/FieldLabel/index.ts +6 -0
  94. package/src/constructors/FieldLabel/properties.json +4 -0
  95. package/src/constructors/FieldLabel/props.ts +40 -0
  96. package/src/constructors/FieldLabel/style.scss +10 -0
  97. package/src/constructors/FieldLabel/types.ts +49 -0
  98. package/src/constructors/FieldMessage/FieldMessage.ts +79 -0
  99. package/src/constructors/FieldMessage/FieldMessageDesign.tsx +159 -0
  100. package/src/constructors/FieldMessage/FieldMessageInclude.ts +105 -0
  101. package/src/constructors/FieldMessage/FieldMessageMessage.ts +54 -0
  102. package/src/constructors/FieldMessage/basicTypes.ts +27 -0
  103. package/src/constructors/FieldMessage/index.ts +6 -0
  104. package/src/constructors/FieldMessage/properties.json +9 -0
  105. package/src/constructors/FieldMessage/props.ts +40 -0
  106. package/src/constructors/FieldMessage/style.scss +13 -0
  107. package/src/constructors/FieldMessage/types.ts +49 -0
  108. package/src/constructors/Icon/Icon.ts +105 -0
  109. package/src/constructors/Icon/IconDesign.tsx +157 -0
  110. package/src/constructors/Icon/IconInclude.ts +64 -0
  111. package/src/constructors/Icon/IconLiteInclude.ts +121 -0
  112. package/src/constructors/Icon/IconTrailingInclude.ts +106 -0
  113. package/src/constructors/Icon/basicTypes.ts +50 -0
  114. package/src/constructors/Icon/index.ts +8 -0
  115. package/src/constructors/Icon/properties.json +25 -0
  116. package/src/constructors/Icon/props.ts +54 -0
  117. package/src/constructors/Icon/style.scss +106 -0
  118. package/src/constructors/Icon/types.ts +46 -0
  119. package/src/constructors/Image/Image.ts +184 -0
  120. package/src/constructors/Image/ImageAdaptiveGroup.ts +230 -0
  121. package/src/constructors/Image/ImageAdaptiveItem.ts +295 -0
  122. package/src/constructors/Image/ImageBackground.ts +127 -0
  123. package/src/constructors/Image/ImageCalculation.ts +184 -0
  124. package/src/constructors/Image/ImageCalculationList.ts +61 -0
  125. package/src/constructors/Image/ImageCoordinator.ts +104 -0
  126. package/src/constructors/Image/ImageData.ts +99 -0
  127. package/src/constructors/Image/ImageDesign.tsx +137 -0
  128. package/src/constructors/Image/ImageFile.ts +137 -0
  129. package/src/constructors/Image/ImageInclude.ts +53 -0
  130. package/src/constructors/Image/ImagePdf.ts +44 -0
  131. package/src/constructors/Image/ImagePosition.ts +49 -0
  132. package/src/constructors/Image/ImageType.ts +83 -0
  133. package/src/constructors/Image/basicTypes.ts +70 -0
  134. package/src/constructors/Image/index.ts +5 -0
  135. package/src/constructors/Image/properties.json +17 -0
  136. package/src/constructors/Image/props.ts +66 -0
  137. package/src/constructors/Image/style.scss +77 -0
  138. package/src/constructors/Image/types.ts +49 -0
  139. package/src/constructors/List/List.ts +267 -0
  140. package/src/constructors/List/ListControl.ts +194 -0
  141. package/src/constructors/List/ListDesign.tsx +382 -0
  142. package/src/constructors/List/ListFocus.ts +196 -0
  143. package/src/constructors/List/ListGo.ts +283 -0
  144. package/src/constructors/List/ListSearch.ts +113 -0
  145. package/src/constructors/List/basicTypes.ts +3 -0
  146. package/src/constructors/List/index.ts +5 -0
  147. package/src/constructors/List/properties.json +16 -0
  148. package/src/constructors/List/props.ts +76 -0
  149. package/src/constructors/List/style.scss +36 -0
  150. package/src/constructors/List/types.ts +66 -0
  151. package/src/constructors/ListGroup/ListGroup.ts +53 -0
  152. package/src/constructors/ListGroup/ListGroupDesign.tsx +180 -0
  153. package/src/constructors/ListGroup/ListGroupOpen.ts +56 -0
  154. package/src/constructors/ListGroup/basicTypes.ts +3 -0
  155. package/src/constructors/ListGroup/index.ts +5 -0
  156. package/src/constructors/ListGroup/properties.json +15 -0
  157. package/src/constructors/ListGroup/props.ts +30 -0
  158. package/src/constructors/ListGroup/style.scss +18 -0
  159. package/src/constructors/ListGroup/types.ts +51 -0
  160. package/src/constructors/ListItem/ListItem.ts +115 -0
  161. package/src/constructors/ListItem/ListItemDesign.tsx +196 -0
  162. package/src/constructors/ListItem/basicTypes.ts +3 -0
  163. package/src/constructors/ListItem/index.ts +5 -0
  164. package/src/constructors/ListItem/properties.json +52 -0
  165. package/src/constructors/ListItem/props.ts +78 -0
  166. package/src/constructors/ListItem/style.scss +152 -0
  167. package/src/constructors/ListItem/types.ts +78 -0
  168. package/src/constructors/ListMenu/ListMenu.ts +52 -0
  169. package/src/constructors/ListMenu/ListMenuDesign.tsx +127 -0
  170. package/src/constructors/ListMenu/basicTypes.ts +3 -0
  171. package/src/constructors/ListMenu/index.ts +5 -0
  172. package/src/constructors/ListMenu/properties.json +19 -0
  173. package/src/constructors/ListMenu/props.ts +34 -0
  174. package/src/constructors/ListMenu/style.scss +5 -0
  175. package/src/constructors/ListMenu/types.ts +54 -0
  176. package/src/constructors/Mask/Mask.ts +321 -0
  177. package/src/constructors/Mask/MaskBuffer.ts +89 -0
  178. package/src/constructors/Mask/MaskCharacter.ts +192 -0
  179. package/src/constructors/Mask/MaskCharacterLength.ts +40 -0
  180. package/src/constructors/Mask/MaskData.ts +287 -0
  181. package/src/constructors/Mask/MaskDate.ts +157 -0
  182. package/src/constructors/Mask/MaskDesign.tsx +217 -0
  183. package/src/constructors/Mask/MaskEmit.ts +140 -0
  184. package/src/constructors/Mask/MaskEvent.ts +347 -0
  185. package/src/constructors/Mask/MaskFocus.ts +49 -0
  186. package/src/constructors/Mask/MaskFormat.ts +216 -0
  187. package/src/constructors/Mask/MaskItem.ts +218 -0
  188. package/src/constructors/Mask/MaskMatch.ts +73 -0
  189. package/src/constructors/Mask/MaskPattern.ts +123 -0
  190. package/src/constructors/Mask/MaskRight.ts +43 -0
  191. package/src/constructors/Mask/MaskRubber.ts +156 -0
  192. package/src/constructors/Mask/MaskRubberItem.ts +96 -0
  193. package/src/constructors/Mask/MaskRubberTransition.ts +50 -0
  194. package/src/constructors/Mask/MaskSelection.ts +208 -0
  195. package/src/constructors/Mask/MaskSpecial.ts +179 -0
  196. package/src/constructors/Mask/MaskType.ts +103 -0
  197. package/src/constructors/Mask/MaskValidation.ts +102 -0
  198. package/src/constructors/Mask/MaskValue.ts +225 -0
  199. package/src/constructors/Mask/MaskValueBasic.ts +87 -0
  200. package/src/constructors/Mask/MaskView.ts +169 -0
  201. package/src/constructors/Mask/basicTypes.ts +49 -0
  202. package/src/constructors/Mask/index.ts +5 -0
  203. package/src/constructors/Mask/properties.json +29 -0
  204. package/src/constructors/Mask/props.ts +70 -0
  205. package/src/constructors/Mask/style.scss +104 -0
  206. package/src/constructors/Mask/types.ts +71 -0
  207. package/src/constructors/Menu/Menu.ts +179 -0
  208. package/src/constructors/Menu/MenuDesign.tsx +244 -0
  209. package/src/constructors/Menu/MenuInclude.ts +110 -0
  210. package/src/constructors/Menu/MenuRequest.ts +101 -0
  211. package/src/constructors/Menu/MenuSearch.ts +49 -0
  212. package/src/constructors/Menu/MenuValue.ts +73 -0
  213. package/src/constructors/Menu/MenuWindow.ts +89 -0
  214. package/src/constructors/Menu/basicTypes.ts +41 -0
  215. package/src/constructors/Menu/index.ts +6 -0
  216. package/src/constructors/Menu/properties.json +17 -0
  217. package/src/constructors/Menu/props.ts +79 -0
  218. package/src/constructors/Menu/style.scss +17 -0
  219. package/src/constructors/Menu/types.ts +79 -0
  220. package/src/constructors/MotionTransform/MotionTransform.ts +87 -0
  221. package/src/constructors/MotionTransform/MotionTransformClassesInclude.ts +38 -0
  222. package/src/constructors/MotionTransform/MotionTransformDesign.tsx +242 -0
  223. package/src/constructors/MotionTransform/MotionTransformElement.ts +220 -0
  224. package/src/constructors/MotionTransform/MotionTransformEvent.ts +118 -0
  225. package/src/constructors/MotionTransform/MotionTransformGo.ts +47 -0
  226. package/src/constructors/MotionTransform/MotionTransformInclude.ts +123 -0
  227. package/src/constructors/MotionTransform/MotionTransformSize.ts +97 -0
  228. package/src/constructors/MotionTransform/MotionTransformState.ts +250 -0
  229. package/src/constructors/MotionTransform/basicTypes.ts +121 -0
  230. package/src/constructors/MotionTransform/index.ts +7 -0
  231. package/src/constructors/MotionTransform/properties.json +35 -0
  232. package/src/constructors/MotionTransform/props.ts +50 -0
  233. package/src/constructors/MotionTransform/style.scss +180 -0
  234. package/src/constructors/MotionTransform/types.ts +86 -0
  235. package/src/constructors/Progress/Progress.ts +184 -0
  236. package/src/constructors/Progress/ProgressDesign.tsx +175 -0
  237. package/src/constructors/Progress/ProgressInclude.ts +67 -0
  238. package/src/constructors/Progress/basicTypes.ts +12 -0
  239. package/src/constructors/Progress/index.ts +6 -0
  240. package/src/constructors/Progress/properties.json +47 -0
  241. package/src/constructors/Progress/props.ts +54 -0
  242. package/src/constructors/Progress/style.scss +374 -0
  243. package/src/constructors/Progress/types.ts +43 -0
  244. package/src/constructors/Ripple/Ripple.ts +46 -0
  245. package/src/constructors/Ripple/RippleDesign.tsx +112 -0
  246. package/src/constructors/Ripple/RippleInclude.ts +39 -0
  247. package/src/constructors/Ripple/RippleItem.ts +62 -0
  248. package/src/constructors/Ripple/basicTypes.ts +3 -0
  249. package/src/constructors/Ripple/index.ts +6 -0
  250. package/src/constructors/Ripple/properties.json +9 -0
  251. package/src/constructors/Ripple/props.ts +28 -0
  252. package/src/constructors/Ripple/style.scss +62 -0
  253. package/src/constructors/Ripple/types.ts +41 -0
  254. package/src/constructors/Scrollbar/Scrollbar.ts +66 -0
  255. package/src/constructors/Scrollbar/ScrollbarBorder.ts +243 -0
  256. package/src/constructors/Scrollbar/ScrollbarDesign.tsx +126 -0
  257. package/src/constructors/Scrollbar/ScrollbarInclude.ts +80 -0
  258. package/src/constructors/Scrollbar/basicTypes.ts +42 -0
  259. package/src/constructors/Scrollbar/index.ts +5 -0
  260. package/src/constructors/Scrollbar/properties.json +33 -0
  261. package/src/constructors/Scrollbar/props.ts +37 -0
  262. package/src/constructors/Scrollbar/style.scss +117 -0
  263. package/src/constructors/Scrollbar/types.ts +52 -0
  264. package/src/constructors/Skeleton/Skeleton.ts +86 -0
  265. package/src/constructors/Skeleton/SkeletonDesign.tsx +117 -0
  266. package/src/constructors/Skeleton/SkeletonInclude.ts +61 -0
  267. package/src/constructors/Skeleton/basicTypes.ts +16 -0
  268. package/src/constructors/Skeleton/const.ts +1 -0
  269. package/src/constructors/Skeleton/index.ts +6 -0
  270. package/src/constructors/Skeleton/properties.json +24 -0
  271. package/src/constructors/Skeleton/props.ts +28 -0
  272. package/src/constructors/Skeleton/style.scss +112 -0
  273. package/src/constructors/Skeleton/types.ts +46 -0
  274. package/src/constructors/Window/Window.ts +212 -0
  275. package/src/constructors/Window/WindowClasses.ts +180 -0
  276. package/src/constructors/Window/WindowClassesInclude.ts +39 -0
  277. package/src/constructors/Window/WindowClient.ts +93 -0
  278. package/src/constructors/Window/WindowCoordinates.ts +257 -0
  279. package/src/constructors/Window/WindowDesign.tsx +278 -0
  280. package/src/constructors/Window/WindowElement.ts +84 -0
  281. package/src/constructors/Window/WindowEmit.ts +52 -0
  282. package/src/constructors/Window/WindowEvent.ts +157 -0
  283. package/src/constructors/Window/WindowFlash.ts +70 -0
  284. package/src/constructors/Window/WindowHook.ts +110 -0
  285. package/src/constructors/Window/WindowInclude.ts +134 -0
  286. package/src/constructors/Window/WindowOpen.ts +292 -0
  287. package/src/constructors/Window/WindowOrigin.ts +85 -0
  288. package/src/constructors/Window/WindowPersistent.ts +89 -0
  289. package/src/constructors/Window/WindowPosition.ts +358 -0
  290. package/src/constructors/Window/WindowStatic.ts +102 -0
  291. package/src/constructors/Window/WindowStatus.ts +138 -0
  292. package/src/constructors/Window/WindowStyles.ts +78 -0
  293. package/src/constructors/Window/WindowVerification.ts +287 -0
  294. package/src/constructors/Window/basicTypes.ts +186 -0
  295. package/src/constructors/Window/index.ts +7 -0
  296. package/src/constructors/Window/properties.json +236 -0
  297. package/src/constructors/Window/props.ts +88 -0
  298. package/src/constructors/Window/style.scss +262 -0
  299. package/src/constructors/Window/types.ts +124 -0
  300. package/src/functions/getClassTegAStatic.ts +8 -0
  301. package/src/library.ts +36 -0
  302. package/src/types/captionTypes.ts +15 -0
  303. package/src/types/descriptionTypes.ts +15 -0
  304. package/src/types/enabledTypes.ts +9 -0
  305. package/src/types/eventClickTypes.ts +51 -0
  306. package/src/types/fieldTypes.ts +282 -0
  307. package/src/types/labelTypes.ts +30 -0
  308. package/src/types/modelTypes.ts +23 -0
  309. package/src/types/prefixTypes.ts +15 -0
  310. package/src/types/suffixTypes.ts +15 -0
  311. package/src/vite-env.d.ts +1 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 dxtmisha
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # @dxtmisha/constructor
2
+
3
+ 🛠️ **Vue component constructors** for DXT UI design system - ready-to-use constructors with TypeScript support and SCSS styling.
4
+
5
+ [![npm version](https://badge.fury.io/js/@dxtmisha%2Fconstructor.svg)](https://www.npmjs.com/package/@dxtmisha/constructor)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)
8
+
9
+ ## 🚀 Installation
10
+
11
+ ```bash
12
+ npm install @dxtmisha/constructor
13
+ ```
14
+
15
+ > **Note:** TypeScript sources are shipped directly. No build step required - use as-is in your Vue projects.
16
+
17
+ ## ✨ Features
18
+
19
+ - 🏗️ **Ready-to-use constructors** - complete Vue component implementations
20
+ - 🎯 **TypeScript first** - full type safety and intellisense support
21
+ - 🔧 **SCSS styling** - modular styles for each constructor
22
+ - 📝 **Comprehensive props** - extensive property interfaces for customization
23
+ - ⚡ **Vue 3 optimized** - built for modern Vue development
24
+ - 🎨 **Design system ready** - consistent API across all constructors
25
+ - 📦 **TypeScript source** - direct source distribution
26
+
27
+ ## 📖 Quick Start
28
+
29
+ ### Basic Usage
30
+
31
+ ```typescript
32
+ import { Button, type ButtonProps } from '@dxtmisha/constructor/Button'
33
+ import '@dxtmisha/constructor/Button/style'
34
+
35
+ // Button props with full TypeScript support
36
+ const buttonProps: ButtonProps = {
37
+ variant: 'primary',
38
+ size: 'md',
39
+ disabled: false,
40
+ loading: false
41
+ }
42
+ ```
43
+
44
+ ### Available Constructors
45
+
46
+ ```typescript
47
+ // UI Components
48
+ import { Badge } from '@dxtmisha/constructor/Badge'
49
+ import { Button } from '@dxtmisha/constructor/Button'
50
+ import { Chip } from '@dxtmisha/constructor/Chip'
51
+ import { Icon } from '@dxtmisha/constructor/Icon'
52
+ import { Image } from '@dxtmisha/constructor/Image'
53
+ import { Progress } from '@dxtmisha/constructor/Progress'
54
+ import { Skeleton } from '@dxtmisha/constructor/Skeleton'
55
+
56
+ // Form Components
57
+ import { Field } from '@dxtmisha/constructor/Field'
58
+ import { FieldLabel } from '@dxtmisha/constructor/FieldLabel'
59
+ import { FieldMessage } from '@dxtmisha/constructor/FieldMessage'
60
+ import { FieldCounter } from '@dxtmisha/constructor/FieldCounter'
61
+ import { Mask } from '@dxtmisha/constructor/Mask'
62
+
63
+ // Layout Components
64
+ import { Cell } from '@dxtmisha/constructor/Cell'
65
+ import { List } from '@dxtmisha/constructor/List'
66
+ import { ListItem } from '@dxtmisha/constructor/ListItem'
67
+ import { ListGroup } from '@dxtmisha/constructor/ListGroup'
68
+ import { Menu } from '@dxtmisha/constructor/Menu'
69
+ import { Window } from '@dxtmisha/constructor/Window'
70
+
71
+ // Interactive Components
72
+ import { Bars } from '@dxtmisha/constructor/Bars'
73
+ import { Ripple } from '@dxtmisha/constructor/Ripple'
74
+ import { Scrollbar } from '@dxtmisha/constructor/Scrollbar'
75
+ import { MotionTransform } from '@dxtmisha/constructor/MotionTransform'
76
+ ```
77
+
78
+ ## 📚 Available constructors
79
+
80
+ ### 🔧 Type System
81
+
82
+ ```typescript
83
+ // Comprehensive type definitions
84
+ import type {
85
+ // Base types
86
+ CaptionProps, DescriptionProps, EnabledProps,
87
+ ModelProps, PrefixProps, SuffixProps,
88
+
89
+ // Event types
90
+ EventClickProps, EventClickEmits, EventClickValue,
91
+
92
+ // Field types
93
+ FieldProps, FieldEmits, FieldSlots,
94
+
95
+ // Component-specific types
96
+ ButtonProps, ListProps, WindowProps
97
+ } from '@dxtmisha/constructor'
98
+
99
+ // Type-safe component props
100
+ interface MyComponentProps extends ButtonProps, CaptionProps {
101
+ customProp?: string
102
+ }
103
+ ```
104
+
105
+ ## 🎯 Constructor Categories
106
+
107
+ | Category | Components | Purpose |
108
+ |----------|------------|---------|
109
+ | **Form** | `Field`, `FieldLabel`, `FieldMessage`, `FieldCounter`, `Mask` | Input handling and validation |
110
+ | **Navigation** | `List`, `ListItem`, `ListGroup`, `Menu` | Navigation and selection |
111
+ | **Feedback** | `Badge`, `Chip`, `Progress`, `Skeleton` | Status and loading states |
112
+ | **Layout** | `Cell`, `Window`, `Scrollbar` | Structure and containers |
113
+ | **Interactive** | `Button`, `Ripple`, `MotionTransform`, `Bars` | User interactions |
114
+ | **Media** | `Icon`, `Image` | Visual content display |
115
+
116
+ ## 📦 Requirements
117
+
118
+ **Core Dependencies:**
119
+ - Node.js ≥18.0.0
120
+ - Vue ≥3.0.0
121
+
122
+ **Peer Dependencies:**
123
+ - `@dxtmisha/functional` ≥1.0.3 - utility functions and classes
124
+ - `vue` ≥3.0.0 - Vue framework
125
+
126
+ ## 📄 License
127
+
128
+ MIT © [dxtmisha](https://github.com/dxtmisha)
129
+
130
+ ## 🐛 Report an issue
131
+
132
+ [GitHub Issues](https://github.com/dxtmisha/dxt-ui/issues)
133
+
134
+ ---
135
+
136
+ ⭐ **Give us a star** if these constructors helped build your UI faster!
package/package.json ADDED
@@ -0,0 +1,124 @@
1
+ {
2
+ "name": "@dxtmisha/constructor",
3
+ "private": false,
4
+ "version": "0.23.0",
5
+ "type": "module",
6
+ "description": "Vue component constructors for DXT UI design system - ready-to-use constructors with TypeScript support and SCSS styling",
7
+ "keywords": [
8
+ "constructor",
9
+ "vue",
10
+ "components",
11
+ "typescript",
12
+ "scss",
13
+ "ui",
14
+ "design-system",
15
+ "dxt",
16
+ "button",
17
+ "field",
18
+ "mask",
19
+ "window",
20
+ "list",
21
+ "menu"
22
+ ],
23
+ "author": "dxtmisha@gmail.com",
24
+ "license": "MIT",
25
+ "homepage": "https://github.com/dxtmisha/dxt-ui/tree/main/packages/constructor",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/dxtmisha/dxt-ui.git",
29
+ "directory": "packages/constructor"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/dxtmisha/dxt-ui/issues"
33
+ },
34
+ "scripts": {
35
+ "dev": "vite",
36
+ "build": "vue-tsc -b && vite build",
37
+ "preview": "vite preview",
38
+ "dxt-library": "dxt-library",
39
+ "dxt-constructor": "dxt-constructor mask"
40
+ },
41
+ "files": [
42
+ "src/",
43
+ "README.md",
44
+ "package.json",
45
+ "LICENSE"
46
+ ],
47
+ "main": "./src/library.ts",
48
+ "module": "./src/library.ts",
49
+ "types": "./src/library.ts",
50
+ "exports": {
51
+ ".": "./src/library.ts",
52
+ "./Badge": "./src/constructors/Badge/index.ts",
53
+ "./Badge/style": "./src/constructors/Badge/style.scss",
54
+ "./Bars": "./src/constructors/Bars/index.ts",
55
+ "./Bars/style": "./src/constructors/Bars/style.scss",
56
+ "./Button": "./src/constructors/Button/index.ts",
57
+ "./Button/style": "./src/constructors/Button/style.scss",
58
+ "./Cell": "./src/constructors/Cell/index.ts",
59
+ "./Cell/style": "./src/constructors/Cell/style.scss",
60
+ "./Chip": "./src/constructors/Chip/index.ts",
61
+ "./Chip/style": "./src/constructors/Chip/style.scss",
62
+ "./Field": "./src/constructors/Field/index.ts",
63
+ "./Field/style": "./src/constructors/Field/style.scss",
64
+ "./FieldCounter": "./src/constructors/FieldCounter/index.ts",
65
+ "./FieldCounter/style": "./src/constructors/FieldCounter/style.scss",
66
+ "./FieldLabel": "./src/constructors/FieldLabel/index.ts",
67
+ "./FieldLabel/style": "./src/constructors/FieldLabel/style.scss",
68
+ "./FieldMessage": "./src/constructors/FieldMessage/index.ts",
69
+ "./FieldMessage/style": "./src/constructors/FieldMessage/style.scss",
70
+ "./Icon": "./src/constructors/Icon/index.ts",
71
+ "./Icon/style": "./src/constructors/Icon/style.scss",
72
+ "./Image": "./src/constructors/Image/index.ts",
73
+ "./Image/style": "./src/constructors/Image/style.scss",
74
+ "./List": "./src/constructors/List/index.ts",
75
+ "./List/style": "./src/constructors/List/style.scss",
76
+ "./ListGroup": "./src/constructors/ListGroup/index.ts",
77
+ "./ListGroup/style": "./src/constructors/ListGroup/style.scss",
78
+ "./ListItem": "./src/constructors/ListItem/index.ts",
79
+ "./ListItem/style": "./src/constructors/ListItem/style.scss",
80
+ "./ListMenu": "./src/constructors/ListMenu/index.ts",
81
+ "./ListMenu/style": "./src/constructors/ListMenu/style.scss",
82
+ "./Mask": "./src/constructors/Mask/index.ts",
83
+ "./Mask/style": "./src/constructors/Mask/style.scss",
84
+ "./Menu": "./src/constructors/Menu/index.ts",
85
+ "./Menu/style": "./src/constructors/Menu/style.scss",
86
+ "./MotionTransform": "./src/constructors/MotionTransform/index.ts",
87
+ "./MotionTransform/style": "./src/constructors/MotionTransform/style.scss",
88
+ "./Motiontransform": "./src/constructors/Motiontransform/index.ts",
89
+ "./Motiontransform/style": "./src/constructors/Motiontransform/style.scss",
90
+ "./Progress": "./src/constructors/Progress/index.ts",
91
+ "./Progress/style": "./src/constructors/Progress/style.scss",
92
+ "./Ripple": "./src/constructors/Ripple/index.ts",
93
+ "./Ripple/style": "./src/constructors/Ripple/style.scss",
94
+ "./Scrollbar": "./src/constructors/Scrollbar/index.ts",
95
+ "./Scrollbar/style": "./src/constructors/Scrollbar/style.scss",
96
+ "./Skeleton": "./src/constructors/Skeleton/index.ts",
97
+ "./Skeleton/style": "./src/constructors/Skeleton/style.scss",
98
+ "./Window": "./src/constructors/Window/index.ts",
99
+ "./Window/style": "./src/constructors/Window/style.scss"
100
+ },
101
+ "buildOptions": {
102
+ "name": "@dxtmisha/constructor",
103
+ "formats": [
104
+ "esm-bundler"
105
+ ]
106
+ },
107
+ "engines": {
108
+ "node": ">=18.0.0"
109
+ },
110
+ "peerDependencies": {
111
+ "@dxtmisha/functional": ">=1.0.3",
112
+ "vue": ">=3.0.0"
113
+ },
114
+ "peerDependenciesMeta": {
115
+ "@dxtmisha/functional": {
116
+ "optional": false
117
+ },
118
+ "vue": {
119
+ "optional": false
120
+ }
121
+ },
122
+ "dependencies": {},
123
+ "sideEffects": false
124
+ }
@@ -0,0 +1,71 @@
1
+ import { computed, type VNode } from 'vue'
2
+ import { isFilled, render } from '@dxtmisha/functional'
3
+
4
+ import { SkeletonInclude } from '../constructors/Skeleton'
5
+
6
+ import type { CaptionProps, CaptionSlots } from '../types/captionTypes'
7
+
8
+ /**
9
+ * Class for working with caption.
10
+ *
11
+ * Класс для работы с caption.
12
+ */
13
+ export class CaptionInclude {
14
+ /**
15
+ * Constructor
16
+ * @param props input property/ входное свойство
17
+ * @param className class name/ название класса
18
+ * @param slots object for working with slots/ объект для работы со слотами
19
+ * @param skeleton optional skeleton for loading state/ необязательный скелетон для состояния загрузки
20
+ */
21
+ constructor(
22
+ protected readonly props: Readonly<CaptionProps>,
23
+ protected readonly className: string,
24
+ protected readonly slots?: CaptionSlots,
25
+ protected readonly skeleton?: SkeletonInclude
26
+ ) {
27
+ }
28
+
29
+ /**
30
+ * Returns true if caption is filled
31
+ *
32
+ * Возвращает true, если caption заполнен
33
+ */
34
+ readonly is = computed(() => Boolean(this.props.caption || this.slots?.caption))
35
+
36
+ /**
37
+ * Renders caption element with content from props or slots.
38
+ *
39
+ * Отображает элемент caption с содержимым из props или slots.
40
+ */
41
+ render(): VNode[] {
42
+ const children: any[] = []
43
+
44
+ if (isFilled(this.props.caption)) {
45
+ children.push(this.props.caption)
46
+ }
47
+
48
+ if (this.slots?.caption) {
49
+ children.push(this.slots.caption?.({}))
50
+ }
51
+
52
+ if (children.length > 0) {
53
+ return [
54
+ render(
55
+ 'div',
56
+ {
57
+ 'class': {
58
+ [`${this.className}__caption`]: true,
59
+ ...this.skeleton?.classes.value
60
+ },
61
+ 'data-event-type': 'caption'
62
+ },
63
+ children,
64
+ 'caption'
65
+ )
66
+ ]
67
+ }
68
+
69
+ return []
70
+ }
71
+ }
@@ -0,0 +1,70 @@
1
+ import { computed, type VNode } from 'vue'
2
+ import { isFilled, render } from '@dxtmisha/functional'
3
+
4
+ import { SkeletonInclude } from '../constructors/Skeleton'
5
+
6
+ import type { DescriptionProps, DescriptionSlots } from '../types/descriptionTypes'
7
+
8
+ /**
9
+ * Use for adding description text
10
+ *
11
+ * Использование для добавления описания текста
12
+ */
13
+ export class DescriptionInclude {
14
+ /**
15
+ * Constructor
16
+ * @param props input property/ входное свойство
17
+ * @param className class name/ название класса
18
+ * @param slots object for working with slots/ объект для работы со слотами
19
+ * @param skeleton optional skeleton for loading state/ необязательный скелетон для состояния загрузки
20
+ */
21
+ constructor(
22
+ protected readonly props: Readonly<DescriptionProps>,
23
+ protected readonly className: string,
24
+ protected readonly slots?: DescriptionSlots,
25
+ protected readonly skeleton?: SkeletonInclude
26
+ ) {
27
+ }
28
+
29
+ /**
30
+ * Check for the presence of a description
31
+ *
32
+ * Проверка наличия описания
33
+ */
34
+ readonly is = computed(() => Boolean(this.props.description || this.slots?.description))
35
+
36
+ /**
37
+ * Render the description
38
+ *
39
+ * Рендер описания
40
+ */
41
+ render(): VNode[] {
42
+ const children: any[] = []
43
+
44
+ if (isFilled(this.props.description)) {
45
+ children.push(this.props.description)
46
+ }
47
+
48
+ if (this.slots?.description) {
49
+ children.push(this.slots.description?.({}))
50
+ }
51
+
52
+ if (children.length > 0) {
53
+ return [
54
+ render(
55
+ 'div',
56
+ {
57
+ class: {
58
+ [`${this.className}__description`]: true,
59
+ ...this.skeleton?.classes.value
60
+ }
61
+ },
62
+ children,
63
+ 'description'
64
+ )
65
+ ]
66
+ }
67
+
68
+ return []
69
+ }
70
+ }
@@ -0,0 +1,56 @@
1
+ import { computed } from 'vue'
2
+ import { ProgressInclude } from '../constructors/Progress'
3
+
4
+ import type { EnabledProps } from '../types/enabledTypes'
5
+
6
+ /**
7
+ * Use to control the activity of the item.
8
+ *
9
+ * Использование для управления активности элемента.
10
+ */
11
+ export class EnabledInclude {
12
+ /**
13
+ * Constructor
14
+ * @param props input property/ входное свойство
15
+ * @param progress object for working with progress/ объект для работы с прогрессами
16
+ */
17
+ constructor(
18
+ protected readonly props: EnabledProps,
19
+ protected readonly progress?: ProgressInclude
20
+ ) {
21
+ }
22
+
23
+ /**
24
+ * Checks if the element is active
25
+ *
26
+ * Проверяет, активен ли элемент
27
+ */
28
+ readonly isEnabled = computed<boolean>(() =>
29
+ !this.props.disabled
30
+ && !this.props.readonly
31
+ && (
32
+ !this.progress
33
+ || !this.progress.is.value
34
+ )
35
+ && Boolean(
36
+ !('dynamic' in this.props)
37
+ || this.props.dynamic
38
+ )
39
+ )
40
+
41
+ /**
42
+ * checks if the read-only status is enabled/ проверяет, включён ли статус "только для чтения"
43
+ */
44
+ readonly isReadonly = computed<boolean>(() => Boolean(this.props.readonly))
45
+
46
+ /**
47
+ * checks if the element is disabled/ проверяет, отключён ли элемент
48
+ */
49
+ readonly isDisabled = computed<boolean>(() => Boolean(this.props.disabled))
50
+
51
+ /**
52
+ * checks if the element is disabled or the value is empty/
53
+ * проверяет, отключён ли элемент или пустое ли значение
54
+ */
55
+ readonly isDisabledOrUndefined = computed<boolean | undefined>(() => this.isDisabled.value || undefined)
56
+ }
@@ -0,0 +1,138 @@
1
+ import { toRefs, type ToRefs } from 'vue'
2
+ import { type ConstrEmit, RouterItem } from '@dxtmisha/functional'
3
+
4
+ import { EnabledInclude } from './EnabledInclude'
5
+
6
+ import type {
7
+ EventClickEmits,
8
+ EventClickExpose,
9
+ EventClickProps,
10
+ EventClickValue
11
+ } from '../types/eventClickTypes'
12
+
13
+ /**
14
+ * Base class for working with button events
15
+ *
16
+ * Базовый класс для работы с событиями кнопки
17
+ */
18
+ export class EventClickInclude {
19
+ protected readonly refs?: ToRefs<EventClickProps>
20
+
21
+ /**
22
+ * Constructor
23
+ * @param props input data/ входные данные
24
+ * @param enabled Object for working with activity status/ Объект для работы со статусом активности
25
+ * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
26
+ */
27
+ constructor(
28
+ protected readonly props?: EventClickProps,
29
+ protected readonly enabled?: EnabledInclude,
30
+ protected readonly emits?: ConstrEmit<EventClickEmits>
31
+ ) {
32
+ this.refs = props ? toRefs(props) : undefined
33
+ }
34
+
35
+ /**
36
+ * Exported values
37
+ *
38
+ * Экспортируемые значения
39
+ */
40
+ get expose(): EventClickExpose {
41
+ return {
42
+ value: this.refs?.value,
43
+ detail: this.refs?.detail
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Event trigger function
49
+ *
50
+ * Функция вызова события
51
+ * @param event event object/ объект события
52
+ * @param options data object/ объект с данными
53
+ */
54
+ readonly onClick = (
55
+ event: MouseEvent,
56
+ options?: EventClickValue
57
+ ) => {
58
+ if (this.emits) {
59
+ if (options) {
60
+ this.emit(event, options)
61
+ } else if (this.toRouter()) {
62
+ event.preventDefault()
63
+ } else if (this.enabled) {
64
+ const optionsItem = this.getOptions(event)
65
+
66
+ if (
67
+ this.enabled.isEnabled.value
68
+ || (
69
+ optionsItem.type === 'icon-trailing'
70
+ && !this.enabled.isDisabled.value
71
+ )
72
+ ) {
73
+ this.emit(event, optionsItem)
74
+ }
75
+ } else {
76
+ this.emit(event, this.getOptions(event))
77
+ }
78
+ }
79
+ }
80
+
81
+ /**
82
+ * Parameters for the event
83
+ *
84
+ * Параметры для события
85
+ */
86
+ protected getOptions(event: MouseEvent): EventClickValue {
87
+ return {
88
+ type: this.getTargetType(event),
89
+ value: this.props?.value,
90
+ detail: this.props?.detail
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Returns the type of the selected item
96
+ *
97
+ * Возвращает тип выбранного элемента
98
+ */
99
+ protected getTargetType(event: MouseEvent) {
100
+ const type = (event.target as HTMLElement)
101
+ ?.closest<HTMLElement>('[data-event-type]')
102
+ ?.dataset
103
+ ?.eventType
104
+
105
+ return type ?? 'click'
106
+ }
107
+
108
+ /**
109
+ * Changing the link through the router
110
+ *
111
+ * Изменение ссылки через router
112
+ */
113
+ protected toRouter(): boolean {
114
+ if (this.props?.to) {
115
+ RouterItem.push(this.props?.to)
116
+ return true
117
+ }
118
+
119
+ return false
120
+ }
121
+
122
+ /**
123
+ * Triggers the click event
124
+ *
125
+ * Вызывает событие клика
126
+ * @param event event object/ объект события
127
+ * @param options data object/ объект с данными
128
+ */
129
+ protected emit(
130
+ event: MouseEvent,
131
+ options: EventClickValue
132
+ ) {
133
+ if (this.emits) {
134
+ this.emits('click', event, options)
135
+ this.emits('clickLite', options)
136
+ }
137
+ }
138
+ }