@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
@@ -5,7 +5,7 @@ import type { ProgressComponentInclude } from '../Progress'
5
5
  import type { RippleComponentsInclude } from '../Ripple'
6
6
 
7
7
  import type { EventClickEmits, EventClickExpose } from '../../types/eventClickTypes'
8
- import type { LabelSlots } from '../../types/labelTypes'
8
+ import type { LabelExpose, LabelSlots } from '../../types/labelTypes'
9
9
 
10
10
  /**
11
11
  * Interface for describing which components need to be connected for work.
@@ -29,7 +29,7 @@ export type ButtonEmits = EventClickEmits
29
29
  *
30
30
  * Тип, описывающий доступные свойства.
31
31
  */
32
- export interface ButtonExpose extends EventClickExpose {
32
+ export interface ButtonExpose extends LabelExpose, EventClickExpose {
33
33
  }
34
34
 
35
35
  /**
@@ -4,7 +4,7 @@ import {
4
4
  type ConstrEmit,
5
5
  DesignComp
6
6
  } from '@dxtmisha/functional'
7
- import { getClassTegAStatic } from '../../functions/getClassTegAStatic'
7
+ import { getClassTagAStatic } from '../../functions/getClassTagAStatic'
8
8
 
9
9
  import { LabelInclude } from '../../classes/LabelInclude'
10
10
  import { CaptionInclude } from '../../classes/CaptionInclude'
@@ -19,7 +19,7 @@ import { SkeletonInclude } from '../Skeleton'
19
19
  import { EventClickInclude } from '../../classes/EventClickInclude'
20
20
 
21
21
  import type { CellComponents, CellEmits, CellSlots } from './types'
22
- import type { CellPropsBasic } from './props'
22
+ import type { CellProps } from './props'
23
23
  import type { CellClassesSub } from './basicTypes'
24
24
 
25
25
  /**
@@ -51,12 +51,12 @@ export class Cell {
51
51
  * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
52
52
  */
53
53
  constructor(
54
- protected readonly props: CellPropsBasic,
55
- protected readonly refs: ToRefs<CellPropsBasic>,
54
+ protected readonly props: CellProps,
55
+ protected readonly refs: ToRefs<CellProps>,
56
56
  protected readonly element: Ref<HTMLElement | undefined>,
57
57
  protected readonly classDesign: string,
58
58
  protected readonly className: string,
59
- protected readonly components?: DesignComp<CellComponents, CellPropsBasic>,
59
+ protected readonly components?: DesignComp<CellComponents, CellProps>,
60
60
  protected readonly slots?: CellSlots,
61
61
  protected readonly emits?: ConstrEmit<CellEmits>
62
62
  ) {
@@ -108,9 +108,26 @@ export class Cell {
108
108
  */
109
109
  readonly classes = computed<ConstrClass>(() => ({
110
110
  [`${this.className}--description`]: this.description.is.value,
111
- [getClassTegAStatic(this.classDesign)]: true
111
+ [getClassTagAStatic(this.classDesign)]: true
112
112
  }))
113
113
 
114
+ /**
115
+ * Computed role for the cell component.
116
+ *
117
+ * Вычисляемая роль для компонента ячейки.
118
+ */
119
+ readonly role = computed<string | undefined>(() => {
120
+ if (this.props.role) {
121
+ return this.props.role
122
+ }
123
+
124
+ if (this.props.dynamic) {
125
+ return 'button'
126
+ }
127
+
128
+ return undefined
129
+ })
130
+
114
131
  /**
115
132
  * Returns a list of sub-element CSS classes for the cell component.
116
133
  *
@@ -1,14 +1,15 @@
1
- import { h, type VNode } from 'vue'
1
+ import { computed, h, type VNode } from 'vue'
2
2
  import {
3
3
  type ConstrOptions,
4
4
  type ConstrStyles,
5
5
  DesignConstructorAbstract
6
6
  } from '@dxtmisha/functional'
7
7
 
8
+ import { AriaStaticInclude } from '../../classes/AriaStaticInclude'
8
9
  import { Cell } from './Cell'
9
10
 
10
11
  import {
11
- type CellPropsBasic
12
+ type CellProps
12
13
  } from './props'
13
14
  import {
14
15
  type CellClasses,
@@ -25,16 +26,16 @@ export class CellDesign<
25
26
  COMP extends CellComponents,
26
27
  EXPOSE extends CellExpose,
27
28
  CLASSES extends CellClasses,
28
- P extends CellPropsBasic
29
+ P extends CellProps
29
30
  > extends DesignConstructorAbstract<
30
- HTMLDivElement,
31
- COMP,
32
- CellEmits,
33
- EXPOSE,
34
- CellSlots,
35
- CLASSES,
36
- P
37
- > {
31
+ HTMLDivElement,
32
+ COMP,
33
+ CellEmits,
34
+ EXPOSE,
35
+ CellSlots,
36
+ CLASSES,
37
+ P
38
+ > {
38
39
  protected readonly item: Cell
39
40
 
40
41
  /**
@@ -75,7 +76,9 @@ export class CellDesign<
75
76
  */
76
77
  protected initExpose(): EXPOSE {
77
78
  return {
78
- ...this.item.event.expose
79
+ ...this.item.event.expose,
80
+ ...this.item.label.expose,
81
+ ...this.item.description.expose
79
82
  } as EXPOSE
80
83
  }
81
84
 
@@ -120,13 +123,7 @@ export class CellDesign<
120
123
  protected initRender(): VNode {
121
124
  return h(
122
125
  this.props.tag ?? 'div',
123
- {
124
- ...this.getAttrs(),
125
- 'class': this.classes?.value.main,
126
- 'data-value': this.props.value,
127
- 'data-divider': this.props.divider ? 'active' : undefined,
128
- 'onClick': this.item.event.onClick
129
- },
126
+ this.propsMain.value,
130
127
  [
131
128
  ...this.item.icon.render(),
132
129
  ...this.renderContext(),
@@ -147,7 +144,10 @@ export class CellDesign<
147
144
  return [
148
145
  h(
149
146
  'div',
150
- { class: this.classes?.value.context },
147
+ {
148
+ key: 'context',
149
+ class: this.classes?.value.context
150
+ },
151
151
  [
152
152
  ...this.item.label.render(),
153
153
  ...this.item.caption.render(),
@@ -170,7 +170,10 @@ export class CellDesign<
170
170
  return [
171
171
  h(
172
172
  'div',
173
- { class: this.classes?.value.contextTrailing },
173
+ {
174
+ key: 'trailing',
175
+ class: this.classes?.value.contextTrailing
176
+ },
174
177
  this.initSlot('trailing', undefined, this.item.getClassesSub())
175
178
  )
176
179
  ]
@@ -192,7 +195,10 @@ export class CellDesign<
192
195
  return [
193
196
  h(
194
197
  'div',
195
- { class: this.classes?.value.body },
198
+ {
199
+ key: 'body',
200
+ class: this.classes?.value.body
201
+ },
196
202
  this.initSlot('body', undefined, this.item.getClassesSub())
197
203
  )
198
204
  ]
@@ -200,4 +206,29 @@ export class CellDesign<
200
206
 
201
207
  return []
202
208
  }
209
+
210
+ /**
211
+ * Props for the main element.
212
+ *
213
+ * Свойства для главного элемента.
214
+ */
215
+ protected readonly propsMain = computed(() => {
216
+ const props = {
217
+ ...this.getAttrs(),
218
+ 'class': this.classes?.value.main,
219
+ 'data-value': this.props.value,
220
+ 'data-divider': this.props.divider ? 'active' : undefined,
221
+ 'onClick': this.item.event.onClick,
222
+ ...AriaStaticInclude.role(this.item.role.value)
223
+ }
224
+
225
+ if (this.props.dynamic) {
226
+ return {
227
+ ...props,
228
+ tabindex: '0'
229
+ }
230
+ }
231
+
232
+ return props
233
+ })
203
234
  }
@@ -1,6 +1,39 @@
1
+ import type { LabelAlternativeSlots } from '../../types/labelTypes'
2
+ import type { DescriptionSlots } from '../../types/descriptionTypes'
3
+ import type { CaptionSlots } from '../../types/captionTypes'
4
+
5
+ /**
6
+ * CSS class names for Cell sub-elements/
7
+ * Имена CSS классов для под-элементов Cell
8
+ */
1
9
  export type CellClassesSub = {
10
+ /** Label element class/ Класс элемента метки */
2
11
  label: string
12
+ /** Description element class/ Класс элемента описания */
3
13
  description: string
14
+ /** Caption element class/ Класс элемента подписи */
4
15
  caption: string
16
+ /** Trailing element class/ Класс завершающего элемента */
5
17
  trailing: string
6
18
  }
19
+
20
+ /**
21
+ * Component map for including Cell/
22
+ * Карта компонентов для подключения Cell
23
+ */
24
+ export type CellComponentInclude = {
25
+ /** Cell component key/ Ключ компонента Cell */
26
+ cell: object
27
+ }
28
+
29
+ /**
30
+ * Type describing available slots/
31
+ * Тип, описывающий доступные слоты
32
+ */
33
+ export interface CellSlotsInclude extends LabelAlternativeSlots,
34
+ DescriptionSlots,
35
+ CaptionSlots {
36
+ trailing?(props: CellClassesSub): any
37
+
38
+ body?(props: CellClassesSub): any
39
+ }
@@ -1,52 +1,52 @@
1
- {
2
- "border-width": {
3
- "_type": "var"
4
- },
5
- "border-color": {
6
- "_type": "var"
7
- },
8
- "transition-property": "background-color, background-image, border, box-shadow",
9
- "transition-duration": "{d.sys.transitionDuration.fade.enter}",
10
- "transition-function": "{d.sys.transitionFunction.standard}",
11
- "#context": {},
12
- "#contextTrailing": {},
13
- "#label": {},
14
- "#description": {},
15
- "#caption": {},
16
- "#icon": {},
17
- "#trailing": {},
18
- "#body": {},
19
- "#loading": {},
20
- "~focus": {},
21
- "~selected": {},
22
- "~readonly": {},
23
- "~disabled": {},
24
- "~dynamic": {},
25
- "~dynamicHover": {},
26
- "~divider": {
27
- "_default": true
28
- },
29
- "~dividerLabel": {
30
- "~always": {
31
- "#context": {
32
- "border-bottom-style": "solid",
33
- "border-bottom-width": "{??borderWidth}",
34
- "border-color": "{'??borderColor}"
35
- }
36
- },
37
- "group|adaptive": {
38
- "link|adaptive-dividerLabel": "{??dividerLabel.always}",
39
- "_type": "media-max-group"
40
- },
41
- "group|container": {
42
- "link|adaptive-dividerLabel": "{??dividerLabel.always}",
43
- "_type": "container-max-group"
44
- },
45
- "none": {}
46
- },
47
- "~iconTop": {
48
- "#icon": {
49
- "align-self": "start"
50
- }
51
- }
52
- }
1
+ {
2
+ "border-width": {
3
+ "_type": "var"
4
+ },
5
+ "border-color": {
6
+ "_type": "var"
7
+ },
8
+ "transition-property": "background-color, background-image, border, box-shadow",
9
+ "transition-duration": "{d.sys.transitionDuration.fade.enter}",
10
+ "transition-function": "{d.sys.transitionFunction.standard}",
11
+ "#context": {},
12
+ "#contextTrailing": {},
13
+ "#label": {},
14
+ "#description": {},
15
+ "#caption": {},
16
+ "#icon": {},
17
+ "#trailing": {},
18
+ "#body": {},
19
+ "#loading": {},
20
+ "~focus": {},
21
+ "~selected": {},
22
+ "~readonly": {},
23
+ "~disabled": {},
24
+ "~dynamic": {},
25
+ "~dynamicHover": {},
26
+ "~divider": {
27
+ "_default": true
28
+ },
29
+ "~dividerLabel": {
30
+ "~always": {
31
+ "#context": {
32
+ "border-bottom-style": "solid",
33
+ "border-bottom-width": "{??borderWidth}",
34
+ "border-color": "{'??borderColor}"
35
+ }
36
+ },
37
+ "group|adaptive": {
38
+ "link|adaptive-dividerLabel": "{??dividerLabel.always}",
39
+ "_type": "media-max-group"
40
+ },
41
+ "group|container": {
42
+ "link|adaptive-dividerLabel": "{??dividerLabel.always}",
43
+ "_type": "container-max-group"
44
+ },
45
+ "none": {}
46
+ },
47
+ "~iconTop": {
48
+ "#icon": {
49
+ "align-self": "start"
50
+ }
51
+ }
52
+ }
@@ -8,17 +8,19 @@ import type { EventClickProps } from '../../types/eventClickTypes'
8
8
  import type { IconPropsBasic, IconTrailingPropsInclude } from '../Icon'
9
9
  import type { ProgressPropsBasic, ProgressPropsInclude } from '../Progress'
10
10
 
11
+ import type { AriaRolePropsInclude } from '../../types/ariaTypes'
12
+
11
13
  interface CellPropsToken {
12
- // :type [!] System label / Системная метка
13
- focus?: boolean
14
- selected?: boolean
15
- readonly?: boolean
16
- disabled?: boolean
17
- dynamic?: boolean
18
- dynamicHover?: boolean
19
- divider?: boolean
20
- dividerLabel?: 'always' | 'none'
21
- iconTop?: boolean
14
+ // :type [!] System label / Системная метка
15
+ focus?: boolean
16
+ selected?: boolean
17
+ readonly?: boolean
18
+ disabled?: boolean
19
+ dynamic?: boolean
20
+ dynamicHover?: boolean
21
+ divider?: boolean
22
+ dividerLabel?: 'always' | 'none'
23
+ iconTop?: boolean
22
24
  // :type [!] System label / Системная метка
23
25
  }
24
26
 
@@ -32,7 +34,8 @@ export interface CellPropsBasic<
32
34
  IconTrailingPropsInclude<Icon>,
33
35
  ProgressPropsInclude<Progress>,
34
36
  SkeletonPropsInclude,
35
- EventClickProps {
37
+ EventClickProps,
38
+ AriaRolePropsInclude {
36
39
  // Style
37
40
  tag?: string
38
41
  divider?: boolean
@@ -54,8 +57,8 @@ export interface CellProps extends CellPropsBasic, CellPropsToken {
54
57
  export const defaultsCell = {
55
58
  tag: 'div',
56
59
  ...{
57
- // :default [!] System label / Системная метка
58
- divider: true
60
+ // :default [!] System label / Системная метка
61
+ divider: true
59
62
  // :default [!] System label / Системная метка
60
63
  }
61
64
  }
@@ -38,7 +38,7 @@
38
38
 
39
39
  &__body {
40
40
  flex-basis: 100%;
41
- order: 12;
41
+ order: 1999999;
42
42
  }
43
43
 
44
44
  &:has(&__body) {
@@ -5,8 +5,8 @@ import type { ProgressComponentInclude } from '../Progress'
5
5
  import type { RippleComponentsInclude } from '../Ripple'
6
6
 
7
7
  import type { EventClickEmits, EventClickExpose } from '../../types/eventClickTypes'
8
- import type { LabelSlots } from '../../types/labelTypes'
9
- import type { DescriptionSlots } from '../../types/descriptionTypes'
8
+ import type { LabelExpose, LabelSlots } from '../../types/labelTypes'
9
+ import type { DescriptionExpose, DescriptionSlots } from '../../types/descriptionTypes'
10
10
  import type { CaptionSlots } from '../../types/captionTypes'
11
11
 
12
12
  import type { CellClassesSub } from './basicTypes'
@@ -33,7 +33,7 @@ export type CellEmits = EventClickEmits
33
33
  *
34
34
  * Тип, описывающий доступные свойства.
35
35
  */
36
- export interface CellExpose extends EventClickExpose {
36
+ export interface CellExpose extends LabelExpose, DescriptionExpose, EventClickExpose {
37
37
  }
38
38
 
39
39
  /**
@@ -18,9 +18,9 @@ export class ChipDesign<
18
18
  CLASSES extends ChipClasses,
19
19
  P extends ChipPropsBasic
20
20
  > extends ButtonDesign<
21
- COMP,
22
- EXPOSE,
23
- CLASSES,
24
- P
25
- > {
21
+ COMP,
22
+ EXPOSE,
23
+ CLASSES,
24
+ P
25
+ > {
26
26
  }
@@ -0,0 +1,83 @@
1
+ import { computed, type VNode } from 'vue'
2
+ import { type ConstrBind, DesignComponents, getBind, getRef, type RefOrNormal, toBinds } from '@dxtmisha/functional'
3
+
4
+ import type { ChipComponentInclude, ChipPropsInclude } from './basicTypes'
5
+ import type { ChipPropsBasic } from './props'
6
+
7
+ /**
8
+ * ChipInclude class provides functionality for conditionally rendering chip components
9
+ * within other components. It manages the logic for determining when to display a chip
10
+ * and configures the appropriate properties.
11
+ *
12
+ * Класс ChipInclude предоставляет функциональность для условного рендеринга компонентов
13
+ * чипа внутри других компонентов. Он управляет логикой определения необходимости
14
+ * отображения чипа и настраивает соответствующие свойства.
15
+ *
16
+ * @template Props - Properties interface extending ChipPropsInclude
17
+ */
18
+ export class ChipInclude<Props extends ChipPropsInclude = ChipPropsInclude> {
19
+ /**
20
+ * Constructor
21
+ * @param props input parameter/ входной параметр
22
+ * @param className class name/ название класса
23
+ * @param components object for working with components/ объект для работы с компонентами
24
+ * @param extra additional parameter/ дополнительный параметр
25
+ * @param index index identifier/ идентификатор индекса
26
+ */
27
+ constructor(
28
+ protected readonly props: Readonly<Props>,
29
+ protected readonly className: string,
30
+ protected readonly components?: DesignComponents<ChipComponentInclude, Props>,
31
+ protected readonly extra?: RefOrNormal<ConstrBind<ChipPropsBasic>>,
32
+ protected readonly index?: string
33
+ ) {
34
+ }
35
+
36
+ /**
37
+ * Computed bindings for the chip/ Вычисляемые привязки для чипа
38
+ */
39
+ readonly binds = computed(
40
+ () => toBinds(
41
+ this.props.chipAttrs,
42
+ getBind(
43
+ getRef(this.props),
44
+ getRef(this.extra),
45
+ 'label'
46
+ )
47
+ )
48
+ )
49
+
50
+ /**
51
+ * Renders the chip component with provided properties and configuration.
52
+ * Returns an array of VNode elements representing the rendered chip, or an empty
53
+ * array if the component cannot be rendered.
54
+ *
55
+ * Отрисовывает компонент чипа с предоставленными свойствами и конфигурацией.
56
+ * Возвращает массив VNode элементов, представляющих отрисованный чип, или пустой
57
+ * массив, если компонент не может быть отрисован.
58
+ *
59
+ * @param props additional properties/ дополнительные свойства
60
+ */
61
+ readonly render = (props?: RefOrNormal<ConstrBind<ChipPropsBasic>>): VNode[] => {
62
+ if (
63
+ this.components
64
+ && (
65
+ ('label' in this.binds.value)
66
+ || ('icon' in this.binds.value)
67
+ || ('iconTrailing' in this.binds.value)
68
+ )
69
+ ) {
70
+ return this.components.render(
71
+ 'chip',
72
+ {
73
+ ...this.binds.value,
74
+ ...getRef(props)
75
+ },
76
+ undefined,
77
+ this.index ?? 'chip'
78
+ )
79
+ }
80
+
81
+ return []
82
+ }
83
+ }
@@ -0,0 +1,12 @@
1
+ import type { ConstrBind } from '@dxtmisha/functional'
2
+ import type { ChipPropsBasic } from './props'
3
+
4
+ export type ChipComponentInclude = {
5
+ chip?: object
6
+ }
7
+
8
+ export interface ChipPropsInclude<
9
+ Chip extends ChipPropsBasic = ChipPropsBasic
10
+ > {
11
+ chipAttrs?: ConstrBind<Chip>
12
+ }
@@ -1,4 +1,6 @@
1
+ export * from './Chip'
1
2
  export * from './ChipDesign'
3
+ export * from './ChipInclude'
2
4
  export * from './props'
3
5
  export * from './types'
4
6
  export * from './basicTypes'
@@ -1,3 +1,3 @@
1
- {
2
- "link|button": "{d.button}"
3
- }
1
+ {
2
+ "link|button": "{d.button}"
3
+ }
@@ -44,10 +44,10 @@ export interface ChipSlots extends ButtonSlots {
44
44
  */
45
45
  export type ChipClasses = {
46
46
  main: ConstrClass
47
- // :classes [!] System label / Системная метка
48
- label: string
49
- icon: string
50
- trailing: string
51
- loading: string
47
+ // :classes [!] System label / Системная метка
48
+ label: string
49
+ icon: string
50
+ trailing: string
51
+ loading: string
52
52
  // :classes [!] System label / Системная метка
53
53
  }
@@ -0,0 +1,74 @@
1
+ import { type Ref, type ToRefs } from 'vue'
2
+ import {
3
+ type ConstrEmit,
4
+ DesignComp,
5
+ ListDataRef,
6
+ type ListList,
7
+ type ListSelectedList
8
+ } from '@dxtmisha/functional'
9
+
10
+ import { EventClickInclude } from '../../classes/EventClickInclude'
11
+ import { ModelValueInclude } from '../../classes/ModelValueInclude'
12
+
13
+ import type { ChipGroupComponents, ChipGroupEmits, ChipGroupSlots } from './types'
14
+ import type { ChipGroupProps } from './props'
15
+
16
+ /**
17
+ * ChipGroup
18
+ */
19
+ export class ChipGroup {
20
+ readonly data: ListDataRef
21
+ readonly event: EventClickInclude
22
+ readonly model: ModelValueInclude<ListSelectedList>
23
+
24
+ /**
25
+ * Constructor
26
+ * @param props input data/ входные данные
27
+ * @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
28
+ * @param element input element/ элемент ввода
29
+ * @param classDesign design name/ название дизайна
30
+ * @param className class name/ название класса
31
+ * @param components object for working with components/ объект для работы с компонентами
32
+ * @param slots object for working with slots/ объект для работы со слотами
33
+ * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
34
+ */
35
+ constructor(
36
+ protected readonly props: ChipGroupProps,
37
+ protected readonly refs: ToRefs<ChipGroupProps>,
38
+ protected readonly element: Ref<HTMLElement | undefined>,
39
+ protected readonly classDesign: string,
40
+ protected readonly className: string,
41
+ protected readonly components?: DesignComp<ChipGroupComponents, ChipGroupProps>,
42
+ protected readonly slots?: ChipGroupSlots,
43
+ protected readonly emits?: ConstrEmit<ChipGroupEmits>
44
+ ) {
45
+ this.event = new EventClickInclude(undefined, undefined, this.emits)
46
+ this.model = new ModelValueInclude<ListSelectedList>(
47
+ 'selected',
48
+ this.emits,
49
+ this.event,
50
+ this.refs.selected,
51
+ this.refs.readonly
52
+ )
53
+
54
+ this.data = new ListDataRef(
55
+ this.refs.list,
56
+ undefined,
57
+ undefined,
58
+ undefined,
59
+ undefined,
60
+ this.model.value,
61
+ this.refs.keyValue,
62
+ this.refs.keyLabel
63
+ )
64
+ }
65
+
66
+ /**
67
+ * Get list of items.
68
+ *
69
+ * Получить список элементов.
70
+ */
71
+ getList(): ListList {
72
+ return this.data.fullData.value
73
+ }
74
+ }