@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
@@ -0,0 +1,556 @@
1
+ @use "@dxtmisha/styles/properties" as ui;
2
+
3
+ @mixin borderFull($this) {
4
+ @include ui.initByCustom('sys.border.width', ui.v('??borderWidth'));
5
+ @include ui.initByCustom('sys.border.color', ui.v('??borderColor'));
6
+ @include ui.initByCustom('sys.border.opacity', ui.v('??borderOpacity'));
7
+
8
+ @include ui.subclass('body') {
9
+ &__title {
10
+ &::before,
11
+ &::after,
12
+ &__label::after {
13
+ border-top-width: ui.v('??sys.border.width');
14
+ @include ui.borderColor(ui.v('??sys.border.color'));
15
+ @include ui.borderOpacity(ui.v('??sys.border.opacity', 1));
16
+ }
17
+
18
+ &::before {
19
+ border-left-width: ui.v('??sys.border.width');
20
+ }
21
+
22
+ &::after {
23
+ border-right-width: ui.v('??sys.border.width');
24
+ }
25
+ }
26
+
27
+ &__border {
28
+ border-top-width: 0;
29
+ border-right-width: ui.v('??sys.border.width', 0);
30
+ border-bottom-width: ui.v('??sys.border.width', 0);
31
+ border-left-width: ui.v('??sys.border.width', 0);
32
+ @include ui.borderColor(ui.v('??sys.border.color'));
33
+ @include ui.borderOpacity(ui.v('??sys.border.opacity', 1));
34
+ }
35
+ }
36
+
37
+ @include ui.active($this) {
38
+ @include ui.initByCustom('sys.border.width', ui.v('??focusWithin.borderWidth'));
39
+ @include ui.initByCustom('sys.border.color', ui.v('??focusWithin.borderColor'));
40
+ @include ui.initByCustom('sys.border.opacity', ui.v('??focusWithin.borderOpacity'));
41
+ }
42
+
43
+ @include ui.focus($this) {
44
+ @include ui.initByCustom('sys.border.width', ui.v('??focusWithin.borderWidth'));
45
+ @include ui.initByCustom('sys.border.color', ui.v('??focusWithin.borderColor'));
46
+ @include ui.initByCustom('sys.border.opacity', ui.v('??focusWithin.borderOpacity'));
47
+ }
48
+ }
49
+
50
+ @mixin shiftMixin($this) {
51
+ @include ui.subclass('body') {
52
+ &__input:placeholder-shown ~ *,
53
+ &__input:autofill ~ *,
54
+ &__input:-webkit-autofill ~ * {
55
+ @content;
56
+ }
57
+ }
58
+
59
+ @include ui.state('isValue') {
60
+ @content;
61
+ }
62
+
63
+ @include ui.active($this) {
64
+ @content;
65
+ }
66
+
67
+ @include ui.focus($this) {
68
+ @content;
69
+ }
70
+ }
71
+
72
+ @mixin textHide {
73
+ @include ui.subclass('body') {
74
+ &__title {
75
+ &__label {
76
+ &__text {
77
+ opacity: 0;
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ @mixin mixinField {
85
+ $this: &;
86
+
87
+ @include ui.initByCustom('sys.shift', 0px);
88
+ @include ui.initByCustom('sys.half', calc(ui.v('??height') / 2));
89
+ @include ui.initByCustom('sys.title.half', calc(ui.v('??height') / 4));
90
+ @include ui.initByCustom('sys.title.translateX', calc(ui.v('??sys.title') - ui.v('??padding') - ui.v('??space')));
91
+ @include ui.initByCustom('sys.title.translateY', ui.v('??sys.title.half'));
92
+
93
+ box-sizing: border-box;
94
+ display: block;
95
+
96
+ border-radius: ui.v('??borderRadius', 0);
97
+
98
+ transition: none;
99
+
100
+ &__body {
101
+ display: block;
102
+ position: relative;
103
+ overflow: hidden;
104
+
105
+ max-width: 100%;
106
+
107
+ border-radius: inherit;
108
+
109
+ transition-timing-function: inherit;
110
+ transition-duration: inherit;
111
+
112
+ &__input {
113
+ position: relative;
114
+ box-sizing: border-box;
115
+ order: 4;
116
+ z-index: 12;
117
+
118
+ @include ui.paddingTop(calc(ui.v('??sys.half') - ui.v('??sys.title.half') + ui.v('??sys.shift')));
119
+ @include ui.paddingRight(calc((ui.v('??sys.right') * ui.isDirLeft()) + (ui.v('??sys.left') * ui.isDirRight())));
120
+ @include ui.paddingBottom(calc(ui.v('??sys.half') - ui.v('??sys.title.half') - ui.v('??sys.shift')));
121
+ @include ui.paddingLeft(calc((ui.v('??sys.left') * ui.isDirLeft()) + (ui.v('??sys.right') * ui.isDirRight())));
122
+
123
+ width: 100%;
124
+ min-height: ui.v('??height');
125
+
126
+ font: inherit;
127
+ line-height: calc((#{ui.v('??sys.half') - ui.v('??sys.title.half')}) * 2);
128
+
129
+ background-color: transparent;
130
+ border: none;
131
+ border-radius: inherit;
132
+
133
+ &::-webkit-clear-button,
134
+ &::-webkit-outer-spin-button,
135
+ &::-webkit-inner-spin-button,
136
+ &::-webkit-search-cancel-button {
137
+ -webkit-appearance: none;
138
+ }
139
+
140
+ &:focus {
141
+ outline: none;
142
+ }
143
+ }
144
+
145
+ &__hidden {
146
+ display: none;
147
+ }
148
+
149
+ &__title {
150
+ display: flex;
151
+ @include ui.absoluteTop;
152
+ order: 8;
153
+ z-index: 4;
154
+
155
+ height: ui.v('??sys.half');
156
+
157
+ border-radius: inherit;
158
+
159
+ transition-timing-function: inherit;
160
+ transition-duration: inherit;
161
+
162
+ &::before,
163
+ &::after {
164
+ content: " ";
165
+ flex-basis: ui.v('??padding');
166
+ min-width: ui.v('??padding');
167
+
168
+ transition-timing-function: inherit;
169
+ transition-duration: inherit;
170
+ }
171
+
172
+ &::before {
173
+ border-top-left-radius: calc(var(--d-dir-left) * #{ui.v('??borderRadius')});
174
+ border-top-right-radius: calc(var(--d-dir-right) * #{ui.v('??borderRadius')});
175
+ }
176
+
177
+ &::after {
178
+ border-top-left-radius: calc(var(--d-dir-right) * #{ui.v('??borderRadius')});
179
+ border-top-right-radius: calc(var(--d-dir-left) * #{ui.v('??borderRadius')});
180
+ flex-grow: 1;
181
+ }
182
+
183
+ &__label {
184
+ @include ui.flexX;
185
+ position: relative;
186
+ @include ui.paddingX(ui.v('??space'));
187
+
188
+ max-width: calc(100% - (#{ui.v('??padding')} * 2) - #{ui.v('??sys.right')});
189
+
190
+ transition-timing-function: inherit;
191
+ transition-duration: inherit;
192
+
193
+ &::after {
194
+ @include ui.absoluteTop;
195
+
196
+ content: " ";
197
+
198
+ transition-timing-function: inherit;
199
+ transition-duration: inherit;
200
+ }
201
+
202
+ &__text {
203
+ opacity: ui.v('??sys.title.opacity', 1);
204
+
205
+ max-width: 100%;
206
+
207
+ @include ui.truncate;
208
+
209
+ @include ui.translateX(calc(ui.v('??sys.title.translateX') * #{ui.isDir()}));
210
+ @include ui.translateY(calc(ui.v('??sys.title.translateY') - ui.v('??sys.title.shift', 0px)));
211
+ @include ui.scale(ui.v('??sys.title.scale', 1));
212
+ transform-origin: var(--d-dir-text-left);
213
+ }
214
+ }
215
+ }
216
+
217
+ &__scoreboard {
218
+ @include ui.flexX;
219
+ position: absolute;
220
+ top: 0;
221
+ order: 12;
222
+ z-index: 16;
223
+ gap: ui.v('??space');
224
+ @include ui.paddingX(calc(ui.v('??padding')));
225
+
226
+ width: 100%;
227
+ height: 0;
228
+
229
+ @include ui.translateY(ui.v('??sys.half'));
230
+
231
+ &__left {
232
+ order: 12;
233
+ }
234
+
235
+ &__space {
236
+ @include ui.flexX;
237
+ flex-grow: 1;
238
+ flex-shrink: 1;
239
+ order: 48;
240
+
241
+ @include ui.marginX(ui.v('??space'));
242
+ @include ui.textSelectNone;
243
+
244
+ pointer-events: none;
245
+ }
246
+
247
+ &__right {
248
+ order: 84;
249
+ }
250
+
251
+ &__input {
252
+ visibility: hidden;
253
+ opacity: 0;
254
+ @include ui.truncate;
255
+ }
256
+ }
257
+
258
+ &__border {
259
+ @include ui.absolute;
260
+ top: var(--d1-field-sys-half);
261
+ order: 16;
262
+ z-index: 8;
263
+
264
+ border-bottom-right-radius: inherit;
265
+ border-bottom-left-radius: inherit;
266
+
267
+ transition-timing-function: inherit;
268
+ transition-duration: inherit;
269
+ }
270
+ }
271
+
272
+ &__required::after {
273
+ content: '*';
274
+ }
275
+
276
+ &__previous {
277
+ order: 4;
278
+ }
279
+
280
+ &__icon {
281
+ order: 8;
282
+ }
283
+
284
+ &__prefix,
285
+ &__suffix {
286
+ opacity: 0;
287
+ @include ui.translateY(ui.v('??sys.shift'));
288
+
289
+ pointer-events: none;
290
+ }
291
+
292
+ &__prefix {
293
+ order: 16;
294
+ }
295
+
296
+ &__suffix {
297
+ order: 80;
298
+ }
299
+
300
+ &__caption {
301
+ @include ui.truncate;
302
+ @include ui.translateY(ui.v('??sys.shift'));
303
+ flex-grow: 1;
304
+ flex-shrink: 1;
305
+ opacity: 0;
306
+ pointer-events: none;
307
+ }
308
+
309
+ &__cancel {
310
+ order: 88;
311
+ }
312
+
313
+ &__loading {
314
+ order: 90;
315
+ }
316
+
317
+ &__trailing {
318
+ order: 92;
319
+
320
+ cursor: pointer;
321
+ }
322
+
323
+ &__next {
324
+ order: 96;
325
+ }
326
+
327
+ &--isValue,
328
+ &--classic,
329
+ &__body__input:placeholder-shown ~ * {
330
+ @include ui.subclass('prefix') {
331
+ opacity: 1;
332
+ }
333
+
334
+ @include ui.subclass('caption') {
335
+ opacity: 1;
336
+ }
337
+ }
338
+
339
+ &--isValue,
340
+ &__body__input:placeholder-shown ~ * {
341
+ @include ui.subclass('suffix') {
342
+ opacity: 1;
343
+ }
344
+ }
345
+
346
+ @include ui.active($this) {
347
+ @include ui.subclass('body') {
348
+ &__title {
349
+ @include ui.color(ui.v('??focusWithin.color'), ui.v('??focusWithin.colorOpacity'));
350
+ }
351
+ }
352
+
353
+ @extend #{$this}--isValue;
354
+ }
355
+
356
+ @include ui.focus($this) {
357
+ @include ui.subclass('body') {
358
+ &__title {
359
+ @include ui.color(ui.v('??focusWithin.color'), ui.v('??focusWithin.colorOpacity'));
360
+ }
361
+ }
362
+
363
+ @extend #{$this}--isValue;
364
+
365
+ @include ui.subclass('caption') {
366
+ opacity: ui.v('??focusWithin.caption.opacity', initial);
367
+ }
368
+ }
369
+
370
+ &--show {
371
+ transition-timing-function: linear;
372
+ transition-duration: ui.v('d.sys.transitionDuration.standard');
373
+
374
+ @include ui.subclass('body') {
375
+ &__title {
376
+ &__label {
377
+ &__text {
378
+ transition-timing-function: ui.v('d.ref.transitionFunction.e40i80');
379
+ transition-duration: inherit;
380
+ transition-property: font-size, opacity, transform, translate, scale;
381
+ }
382
+ }
383
+ }
384
+ }
385
+ }
386
+
387
+ &--validation {
388
+ @include ui.initByCustom('focusWithin.color', ui.v('??validation.color'), true);
389
+ @include ui.initByCustom('focusWithin.colorOpacity', ui.v('??validation.colorOpacity'), true);
390
+
391
+ @include ui.initByCustom('borderColor', ui.v('??validation.borderColor'), true);
392
+ @include ui.initByCustom('borderOpacity', ui.v('??validation.borderOpacity'), true);
393
+ @include ui.initByCustom('focusWithin.borderColor', ui.v('??validation.borderColor'), true);
394
+ @include ui.initByCustom('focusWithin.borderOpacity', ui.v('??validation.borderOpacity'), true);
395
+ }
396
+
397
+ &--basic {
398
+ @include shiftMixin($this) {
399
+ @include textHide;
400
+ }
401
+
402
+ @include borderFull($this);
403
+ }
404
+
405
+ &--boxed {
406
+ @include shiftMixin($this) {
407
+ @include textHide;
408
+ }
409
+
410
+ @include borderFull($this);
411
+ }
412
+
413
+ &--classic {
414
+ @include textHide;
415
+
416
+ @include borderFull($this);
417
+ }
418
+
419
+ &--tonal {
420
+ @include ui.initByCustom('borderWidth', 0px);
421
+ @include shiftMixin($this) {
422
+ @include textHide;
423
+ }
424
+
425
+ @include borderFull($this);
426
+ }
427
+
428
+ &--filled {
429
+ @include ui.initByCustom('sys.shift', calc(ui.v('??sys.half') / 3));
430
+ @include shiftMixin($this) {
431
+ @include ui.initByCustom('sys.title.shift', ui.v('??sys.shift'));
432
+ @include ui.initByCustom('sys.title.scale', .875);
433
+ }
434
+ border-bottom-left-radius: 0;
435
+ border-bottom-right-radius: 0;
436
+
437
+ @include ui.subclass('body') {
438
+ overflow: visible;
439
+
440
+ &__border {
441
+ &::before,
442
+ &::after {
443
+ @include ui.absoluteBottom;
444
+ content: " ";
445
+ }
446
+
447
+ &::before {
448
+ height: ui.v('??borderWidth');
449
+ @include ui.backgroundColor(ui.v('??borderColor'), ui.v('??borderOpacity'));
450
+ }
451
+
452
+ &::after {
453
+ clip-path: inset(0 50%);
454
+ z-index: 4;
455
+
456
+ height: ui.v('??focusWithin.borderWidth');
457
+ @include ui.backgroundColor(ui.v('??focusWithin.borderColor'), ui.v('??focusWithin.borderOpacity'));
458
+
459
+ transition-duration: inherit;
460
+ transition-property: clip-path;
461
+ }
462
+ }
463
+ }
464
+
465
+ @include ui.active($this) {
466
+ @include ui.subclass('body') {
467
+ &__border {
468
+ &::after {
469
+ clip-path: inset(0 0);
470
+ }
471
+ }
472
+ }
473
+ }
474
+
475
+ @include ui.focus($this) {
476
+ @include ui.subclass('body') {
477
+ &__border {
478
+ &::after {
479
+ clip-path: inset(0 0);
480
+ }
481
+ }
482
+ }
483
+ }
484
+ }
485
+
486
+ &--outlined {
487
+ @include shiftMixin($this) {
488
+ @include ui.initByCustom('sys.title.shift', ui.v('??sys.half'));
489
+ @include ui.initByCustom('sys.title.translateX', 0px);
490
+
491
+ @include ui.subclass('body') {
492
+ &__title {
493
+ &__label {
494
+ &::after {
495
+ @include ui.borderOpacity(0);
496
+ transition: none;
497
+ }
498
+
499
+ &__text {
500
+ font-size: 0.9em;
501
+ }
502
+ }
503
+ }
504
+ }
505
+ }
506
+ @include borderFull($this);
507
+
508
+ @include ui.subclass('body') {
509
+ overflow: visible;
510
+ }
511
+ }
512
+
513
+ &--block {
514
+ width: 100%;
515
+ }
516
+
517
+ &--right {
518
+ @include ui.subclass('body') {
519
+ &__scoreboard {
520
+ &__space {
521
+ @include ui.marginRight(0);
522
+ }
523
+ }
524
+ }
525
+
526
+ @include ui.subclass('body') {
527
+ &__input {
528
+ text-align: right;
529
+ }
530
+ }
531
+ }
532
+
533
+ &--align {
534
+ &--right {
535
+ @include ui.subclass('previous') {
536
+ order: 94;
537
+ }
538
+ }
539
+
540
+ &--left {
541
+ @include ui.subclass('next') {
542
+ order: 6;
543
+ }
544
+ }
545
+
546
+ &--center {
547
+ @include ui.state('arrow') {
548
+ @include ui.subclass('body') {
549
+ &__input {
550
+ text-align: center;
551
+ }
552
+ }
553
+ }
554
+ }
555
+ }
556
+ }
@@ -0,0 +1,78 @@
1
+ import type { ConstrClass } from '@dxtmisha/functional'
2
+
3
+ import type { CaptionSlots } from '../../types/captionTypes'
4
+ import type { PrefixSlots } from '../../types/prefixTypes'
5
+ import type { SuffixSlots } from '../../types/suffixTypes'
6
+ import type { EventClickEmits } from '../../types/eventClickTypes'
7
+
8
+ import type { IconComponentInclude } from '../Icon'
9
+ import type { FieldLabelComponentInclude, FieldLabelSlotsInclude } from '../FieldLabel'
10
+ import type { FieldMessageComponentInclude } from '../FieldMessage'
11
+ import type { ProgressComponentInclude } from '../Progress'
12
+
13
+ import type { FieldControl } from './basicTypes'
14
+
15
+ /**
16
+ * Interface for describing which components need to be connected for work.
17
+ *
18
+ * Интерфейс для описания, какие компоненты надо подключить для работы.
19
+ */
20
+ export type FieldComponents
21
+ = IconComponentInclude
22
+ & FieldLabelComponentInclude
23
+ & FieldMessageComponentInclude
24
+ & ProgressComponentInclude
25
+
26
+ /**
27
+ * Type describing available events.
28
+ *
29
+ * Тип, описывающий доступные события.
30
+ */
31
+ export type FieldEmits = EventClickEmits
32
+
33
+ /**
34
+ * Type describing available properties.
35
+ *
36
+ * Тип, описывающий доступные свойства.
37
+ */
38
+ export interface FieldExpose {
39
+ }
40
+
41
+ /**
42
+ * Type describing available slots.
43
+ *
44
+ * Тип, описывающий доступные слоты.
45
+ */
46
+ export interface FieldSlots extends CaptionSlots,
47
+ PrefixSlots,
48
+ SuffixSlots,
49
+ FieldLabelSlotsInclude {
50
+ leading?(props: FieldControl): any
51
+
52
+ trailing?(props: FieldControl): any
53
+
54
+ default?(props: FieldControl): any
55
+ }
56
+
57
+ /**
58
+ * Type describing subclasses.
59
+ *
60
+ * Тип, описывающий подклассы.
61
+ */
62
+ export type FieldClasses = {
63
+ main: ConstrClass
64
+ // :classes [!] System label / Системная метка
65
+ body: string
66
+ bodyInput: string
67
+ bodyTitle: string
68
+ bodyTitleLabel: string
69
+ bodyTitleLabelText: string
70
+ bodyScoreboard: string
71
+ bodyScoreboardLeft: string
72
+ bodyScoreboardRight: string
73
+ bodyScoreboardSpace: string
74
+ bodyScoreboardInput: string
75
+ bodyBorder: string
76
+ required: string
77
+ // :classes [!] System label / Системная метка
78
+ }
@@ -0,0 +1,75 @@
1
+ import { computed, type Ref, type ToRefs } from 'vue'
2
+ import { type ConstrEmit, DesignComp, isFilled, toNumber } from '@dxtmisha/functional'
3
+
4
+ import type { FieldCounterComponents, FieldCounterEmits, FieldCounterSlots } from './types'
5
+ import type { FieldCounterProps } from './props'
6
+
7
+ /**
8
+ * FieldCounter
9
+ */
10
+ export class FieldCounter {
11
+ /**
12
+ * Constructor
13
+ * @param props input data/ входные данные
14
+ * @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
15
+ * @param element input element/ элемент ввода
16
+ * @param classDesign design name/ название дизайна
17
+ * @param className class name/ название класса
18
+ * @param components object for working with components/ объект для работы с компонентами
19
+ * @param slots object for working with slots/ объект для работы со слотами
20
+ * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
21
+ */
22
+ constructor(
23
+ protected readonly props: FieldCounterProps,
24
+ protected readonly refs: ToRefs<FieldCounterProps>,
25
+ protected readonly element: Ref<HTMLElement | undefined>,
26
+ protected readonly classDesign: string,
27
+ protected readonly className: string,
28
+ protected readonly components?: DesignComp<FieldCounterComponents, FieldCounterProps>,
29
+ protected readonly slots?: FieldCounterSlots,
30
+ protected readonly emits?: ConstrEmit<FieldCounterEmits>
31
+ ) {
32
+ }
33
+
34
+ /** Checks if it is necessary to display the number of input characters/ Проверяет, надо ли выводить количество вводимых символов */
35
+ readonly is = computed<boolean>(() => this.props.counter !== undefined || this.isMax.value)
36
+
37
+ /** Checks if it is necessary to display the maximum available number of characters/ Проверяет, надо ли выводить максимальное доступное количество символов */
38
+ readonly isMax = computed<boolean>(() => this.getMax() > 0)
39
+
40
+ /** Returns text for output/ Возвращает текст для вывода */
41
+ readonly item = computed<string>(() => {
42
+ const counter = this.getCounter().toString()
43
+ const max = this.getMax().toString()
44
+
45
+ if (isFilled(this.props.template)) {
46
+ return this.props.template
47
+ .replace('[c]', counter)
48
+ .replace('[m]', max)
49
+ }
50
+
51
+ if (this.isMax.value) {
52
+ return `${counter} / ${max}`
53
+ }
54
+
55
+ return counter
56
+ })
57
+
58
+ /**
59
+ * Returns the number of input characters.
60
+ *
61
+ * Возвращает количество вводимых символов.
62
+ */
63
+ getCounter(): number {
64
+ return toNumber(this.props.counter ?? 0)
65
+ }
66
+
67
+ /**
68
+ * Returns the maximum available input number.
69
+ *
70
+ * Возвращает максимально доступное вводимое число.
71
+ */
72
+ getMax(): number {
73
+ return toNumber(this.props.maxlength ?? 0)
74
+ }
75
+ }