@dxtmisha/constructor 0.39.5 → 0.39.7

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 (193) hide show
  1. package/dist/{AriaStaticInclude-CFGewqpn.js → AriaStaticInclude-CAURwJMb.js} +47 -9
  2. package/dist/{BarsInclude-IM3Gdslg.js → BarsInclude-BOEoY-O4.js} +19 -14
  3. package/dist/{BlockDesign-D67yDT9N.js → BlockDesign-CwRNJi0I.js} +49 -38
  4. package/dist/ButtonDesign-DgZNw44L.js +198 -0
  5. package/dist/CaptionInclude-NzS6EYYj.js +70 -0
  6. package/dist/{DescriptionInclude-DxWNon_J.js → DescriptionInclude-D4ane9aR.js} +20 -30
  7. package/dist/{EnabledInclude-DGeuJhOr.js → EnabledInclude-Dk-rP4jp.js} +1 -1
  8. package/dist/{EventClickInclude-eDWqxK0d.js → EventClickInclude-WHJqxZ1b.js} +13 -3
  9. package/dist/{FieldCounterInclude-BR6n8WlH.js → FieldCounterInclude-D0oojGWY.js} +2 -2
  10. package/dist/{FieldEventInclude-zg02dtQi.js → FieldEventInclude-DBRqmzpF.js} +11 -8
  11. package/dist/{FieldInclude-c6DSD0-y.js → FieldInclude-BKoBWZdj.js} +23 -12
  12. package/dist/{FieldLabelInclude-B4OGaJ1r.js → FieldLabelInclude-Bkxf6rRw.js} +30 -23
  13. package/dist/{FieldMatchInclude-Vl2gJUaM.js → FieldMatchInclude-GgyucDC_.js} +35 -19
  14. package/dist/{FieldMessageInclude-CktVHvWW.js → FieldMessageInclude-BJDnir34.js} +34 -28
  15. package/dist/{LabelHighlightInclude-Dhj3p9NW.js → LabelHighlightInclude-CLmTvW_6.js} +1 -1
  16. package/dist/{LabelInclude-BtZrrbCf.js → LabelInclude-D-mLvjK5.js} +32 -50
  17. package/dist/{LabelNumberInclude-DyifvMnr.js → LabelNumberInclude-Cn0qDEgX.js} +1 -1
  18. package/dist/{ModalDesignAbstract-CjDr5JaN.js → ModalDesignAbstract-D4A_a_rC.js} +42 -42
  19. package/dist/{Plugin-DUJ0epm4.js → Plugin-CBNCh_iN.js} +2 -2
  20. package/dist/{ProgressInclude-UBipdctr.js → ProgressInclude-9MfZWtGP.js} +5 -5
  21. package/dist/{SuffixInclude-C7JNYCJK.js → SuffixInclude-maZ7235l.js} +48 -20
  22. package/dist/{TabIndexInclude-d7A_R6KD.js → TabIndexInclude-xcSFV8yP.js} +43 -33
  23. package/dist/TextInclude--GERRCGj.js +146 -0
  24. package/dist/{WindowEsc-Dp9AvJt7.js → WindowEsc-DTwn4Vsz.js} +2 -2
  25. package/dist/{WindowInclude-Is5RhGxt.js → WindowInclude-BWm4-0Gh.js} +24 -20
  26. package/dist/accordion.js +66 -50
  27. package/dist/actionSheet.js +2 -4
  28. package/dist/actions.js +38 -36
  29. package/dist/anchor.js +63 -60
  30. package/dist/arrow.js +32 -33
  31. package/dist/badge.js +40 -35
  32. package/dist/bars.js +91 -57
  33. package/dist/block.js +1 -1
  34. package/dist/button.js +12 -15
  35. package/dist/cell.js +44 -37
  36. package/dist/chip.js +1 -1
  37. package/dist/chipGroup.js +25 -21
  38. package/dist/classes/AriaStaticInclude.d.ts +28 -0
  39. package/dist/classes/CaptionInclude.d.ts +64 -1
  40. package/dist/classes/DescriptionInclude.d.ts +4 -16
  41. package/dist/classes/EventClickInclude.d.ts +8 -0
  42. package/dist/classes/Field/FieldInputModeInclude.d.ts +1 -0
  43. package/dist/classes/LabelInclude.d.ts +4 -17
  44. package/dist/classes/PrefixInclude.d.ts +9 -1
  45. package/dist/classes/SuffixInclude.d.ts +9 -1
  46. package/dist/classes/TabIndexInclude.d.ts +14 -8
  47. package/dist/classes/TextInclude.d.ts +33 -5
  48. package/dist/constructors/Accordion/Accordion.d.ts +28 -1
  49. package/dist/constructors/Actions/Actions.d.ts +2 -1
  50. package/dist/constructors/Actions/ActionsDesign.d.ts +2 -1
  51. package/dist/constructors/Actions/props.d.ts +1 -0
  52. package/dist/constructors/Anchor/Anchor.d.ts +0 -7
  53. package/dist/constructors/Anchor/AnchorIcon.d.ts +3 -3
  54. package/dist/constructors/Anchor/props.d.ts +5 -4
  55. package/dist/constructors/Anchor/types.d.ts +2 -2
  56. package/dist/constructors/Arrow/Arrow.d.ts +0 -5
  57. package/dist/constructors/Badge/Badge.d.ts +5 -1
  58. package/dist/constructors/Badge/BadgeDesign.d.ts +2 -1
  59. package/dist/constructors/Bars/Bars.d.ts +30 -2
  60. package/dist/constructors/Bars/BarsAction.d.ts +6 -2
  61. package/dist/constructors/Bars/BarsDesign.d.ts +2 -1
  62. package/dist/constructors/Bars/BarsInclude.d.ts +7 -2
  63. package/dist/constructors/Bars/props.d.ts +2 -3
  64. package/dist/constructors/Bars/types.d.ts +3 -3
  65. package/dist/constructors/Block/Block.d.ts +0 -4
  66. package/dist/constructors/Block/BlockDesign.d.ts +9 -1
  67. package/dist/constructors/Block/types.d.ts +3 -3
  68. package/dist/constructors/Button/Button.d.ts +22 -1
  69. package/dist/constructors/Button/ButtonDesign.d.ts +2 -1
  70. package/dist/constructors/Button/props.d.ts +3 -5
  71. package/dist/constructors/Button/types.d.ts +2 -2
  72. package/dist/constructors/Cell/Cell.d.ts +10 -1
  73. package/dist/constructors/Cell/CellDesign.d.ts +2 -1
  74. package/dist/constructors/Cell/types.d.ts +3 -3
  75. package/dist/constructors/ChipGroup/ChipGroup.d.ts +4 -1
  76. package/dist/constructors/ChipGroup/ChipGroupDesign.d.ts +2 -1
  77. package/dist/constructors/Field/Field.d.ts +33 -6
  78. package/dist/constructors/Field/FieldDesign.d.ts +2 -1
  79. package/dist/constructors/Field/FieldIcons.d.ts +4 -1
  80. package/dist/constructors/Field/FieldInclude.d.ts +8 -0
  81. package/dist/constructors/Field/props.d.ts +2 -1
  82. package/dist/constructors/FieldCounter/FieldCounter.d.ts +22 -1
  83. package/dist/constructors/FieldCounter/FieldCounterDesign.d.ts +9 -2
  84. package/dist/constructors/FieldCounter/props.d.ts +7 -1
  85. package/dist/constructors/FieldCounter/types.d.ts +1 -0
  86. package/dist/constructors/FieldLabel/FieldLabel.d.ts +5 -1
  87. package/dist/constructors/FieldLabel/FieldLabelDesign.d.ts +2 -1
  88. package/dist/constructors/FieldLabel/FieldLabelInclude.d.ts +7 -5
  89. package/dist/constructors/FieldLabel/props.d.ts +1 -0
  90. package/dist/constructors/FieldLabel/types.d.ts +2 -2
  91. package/dist/constructors/FieldMessage/FieldMessage.d.ts +16 -1
  92. package/dist/constructors/FieldMessage/FieldMessageDesign.d.ts +2 -1
  93. package/dist/constructors/FieldMessage/FieldMessageInclude.d.ts +8 -9
  94. package/dist/constructors/Icon/Icon.d.ts +7 -2
  95. package/dist/constructors/Icon/props.d.ts +3 -1
  96. package/dist/constructors/Icon/types.d.ts +3 -2
  97. package/dist/constructors/Image/Image.d.ts +0 -7
  98. package/dist/constructors/Input/Input.d.ts +20 -1
  99. package/dist/constructors/Input/InputDesign.d.ts +2 -1
  100. package/dist/constructors/Input/InputPassword.d.ts +4 -1
  101. package/dist/constructors/List/List.d.ts +18 -9
  102. package/dist/constructors/List/ListDesign.d.ts +2 -1
  103. package/dist/constructors/List/ListFocus.d.ts +10 -2
  104. package/dist/constructors/List/ListGo.d.ts +22 -4
  105. package/dist/constructors/List/props.d.ts +4 -2
  106. package/dist/constructors/ListGroup/ListGroup.d.ts +2 -1
  107. package/dist/constructors/ListGroup/ListGroupDesign.d.ts +2 -1
  108. package/dist/constructors/ListItem/ListItem.d.ts +17 -60
  109. package/dist/constructors/ListItem/props.d.ts +2 -3
  110. package/dist/constructors/ListMenu/ListMenu.d.ts +3 -1
  111. package/dist/constructors/ListMenu/ListMenuDesign.d.ts +2 -1
  112. package/dist/constructors/Mask/Mask.d.ts +24 -1
  113. package/dist/constructors/Mask/MaskDesign.d.ts +2 -1
  114. package/dist/constructors/Menu/Menu.d.ts +10 -1
  115. package/dist/constructors/Menu/MenuDesign.d.ts +2 -1
  116. package/dist/constructors/Menu/props.d.ts +2 -1
  117. package/dist/constructors/Modal/ModalDesign.d.ts +1 -1
  118. package/dist/constructors/Modal/ModalDesignAbstract.d.ts +3 -2
  119. package/dist/constructors/MotionTransform/MotionTransform.d.ts +10 -8
  120. package/dist/constructors/MotionTransform/MotionTransformDesign.d.ts +13 -2
  121. package/dist/constructors/MotionTransform/MotionTransformEvent.d.ts +14 -0
  122. package/dist/constructors/MotionTransform/props.d.ts +2 -2
  123. package/dist/constructors/Progress/Progress.d.ts +20 -0
  124. package/dist/constructors/Progress/ProgressDesign.d.ts +4 -60
  125. package/dist/constructors/Progress/props.d.ts +3 -3
  126. package/dist/constructors/Ripple/RippleDesign.d.ts +2 -1
  127. package/dist/constructors/Scrollbar/Scrollbar.d.ts +3 -1
  128. package/dist/constructors/Scrollbar/ScrollbarDesign.d.ts +2 -1
  129. package/dist/constructors/Select/Select.d.ts +12 -1
  130. package/dist/constructors/Select/SelectDesign.d.ts +2 -1
  131. package/dist/constructors/SelectValue/SelectValue.d.ts +4 -1
  132. package/dist/constructors/SelectValue/SelectValueDesign.d.ts +2 -1
  133. package/dist/constructors/Skeleton/SkeletonDesign.d.ts +2 -1
  134. package/dist/constructors/TextareaAutosize/TextareaAutosize.d.ts +3 -1
  135. package/dist/constructors/TextareaAutosize/TextareaAutosizeDesign.d.ts +2 -1
  136. package/dist/constructors/Tooltip/Tooltip.d.ts +82 -13
  137. package/dist/constructors/Tooltip/TooltipEvent.d.ts +5 -1
  138. package/dist/constructors/Tooltip/TooltipOpen.d.ts +6 -0
  139. package/dist/constructors/Tooltip/props.d.ts +10 -1
  140. package/dist/constructors/Window/Window.d.ts +25 -1
  141. package/dist/constructors/Window/WindowDesign.d.ts +5 -63
  142. package/dist/constructors/Window/WindowEsc.d.ts +2 -2
  143. package/dist/constructors/Window/WindowEvent.d.ts +20 -3
  144. package/dist/constructors/Window/WindowHidden.d.ts +9 -3
  145. package/dist/constructors/Window/WindowInclude.d.ts +5 -1
  146. package/dist/constructors/Window/basicTypes.d.ts +5 -1
  147. package/dist/constructors/Window/props.d.ts +15 -3
  148. package/dist/dialog.js +4 -4
  149. package/dist/field.js +161 -126
  150. package/dist/fieldCounter.js +107 -38
  151. package/dist/fieldLabel.js +41 -37
  152. package/dist/fieldMessage.js +87 -65
  153. package/dist/icon.js +55 -39
  154. package/dist/image.js +108 -110
  155. package/dist/input.js +102 -80
  156. package/dist/library.js +14 -14
  157. package/dist/list.js +152 -87
  158. package/dist/listGroup.js +23 -21
  159. package/dist/listItem.js +116 -100
  160. package/dist/listMenu.js +26 -20
  161. package/dist/mask.js +113 -89
  162. package/dist/menu.js +64 -49
  163. package/dist/modal.js +9 -9
  164. package/dist/motionTransform.js +138 -106
  165. package/dist/page.js +1 -1
  166. package/dist/plugin.js +1 -1
  167. package/dist/progress.js +65 -38
  168. package/dist/ripple.js +4 -3
  169. package/dist/scrollbar.js +23 -20
  170. package/dist/section.js +1 -1
  171. package/dist/select.js +105 -90
  172. package/dist/selectValue.js +29 -25
  173. package/dist/skeleton.js +20 -22
  174. package/dist/textareaAutosize.js +26 -23
  175. package/dist/tooltip.js +140 -91
  176. package/dist/types/ariaTypes.d.ts +7 -0
  177. package/dist/types/captionTypes.d.ts +2 -0
  178. package/dist/types/descriptionTypes.d.ts +2 -10
  179. package/dist/types/labelTypes.d.ts +0 -7
  180. package/dist/types/prefixTypes.d.ts +2 -0
  181. package/dist/types/suffixTypes.d.ts +2 -0
  182. package/dist/types/textTypes.d.ts +42 -2
  183. package/dist/window.js +169 -105
  184. package/package.json +2 -2
  185. package/src/constructors/Actions/style.scss +0 -1
  186. package/src/constructors/Bars/style.scss +2 -0
  187. package/src/constructors/FieldCounter/style.scss +5 -0
  188. package/src/constructors/Progress/style.scss +2 -0
  189. package/src/constructors/Tooltip/style.scss +10 -2
  190. package/src/constructors/Window/style.scss +7 -1
  191. package/dist/ButtonDesign-DZ7QCmHk.js +0 -169
  192. package/dist/CaptionInclude-AFVF4qyd.js +0 -52
  193. package/dist/TextInclude-i1OBAFTG.js +0 -76
@@ -1,21 +1,21 @@
1
- var f = Object.defineProperty;
2
- var v = (n, e, t) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var s = (n, e, t) => v(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { watch as m, ref as d, computed as a, onUnmounted as w, h as l, Teleport as x } from "vue";
5
- import { EventItem as S, DesignConstructorAbstract as b } from "@dxtmisha/functional";
6
- import { A as p } from "./AriaStaticInclude-CFGewqpn.js";
7
- import { M as k } from "./ModelInclude-BiYm_iCQ.js";
8
- import { T as C } from "./TabIndexInclude-d7A_R6KD.js";
1
+ var H = Object.defineProperty;
2
+ var T = (h, t, e) => t in h ? H(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
+ var s = (h, t, e) => T(h, typeof t != "symbol" ? t + "" : t, e);
4
+ import { watch as m, ref as d, computed as a, onUnmounted as M, h as l, Teleport as P } from "vue";
5
+ import { EventItem as W, isEnter as B, DesignConstructorAbstract as E } from "@dxtmisha/functional";
6
+ import { A as p } from "./AriaStaticInclude-CAURwJMb.js";
7
+ import { M as O } from "./ModelInclude-BiYm_iCQ.js";
8
+ import { T as z } from "./TabIndexInclude-xcSFV8yP.js";
9
9
  import { a as u } from "./MotionTransformClassesInclude-B23RIq0Q.js";
10
- import { M as L, _ as G } from "./MotionTransformClassesInclude-B23RIq0Q.js";
11
- import { W as H } from "./WindowEsc-Dp9AvJt7.js";
12
- import { M as U } from "./MotionTransformInclude-P_oRs3JZ.js";
13
- class T {
10
+ import { M as X, _ as Z } from "./MotionTransformClassesInclude-B23RIq0Q.js";
11
+ import { W as I } from "./WindowEsc-DTwn4Vsz.js";
12
+ import { M as et } from "./MotionTransformInclude-P_oRs3JZ.js";
13
+ class D {
14
14
  /**
15
15
  * Constructor
16
16
  * @param element class object for managing an element/ объект класса для управления элементом
17
17
  */
18
- constructor(e) {
18
+ constructor(t) {
19
19
  /** Top offset for transform/ Верхнее смещение для трансформации */
20
20
  s(this, "top", null);
21
21
  /** Left offset for transform/ Левое смещение для трансформации */
@@ -36,7 +36,7 @@ class T {
36
36
  s(this, "headScale", null);
37
37
  /** Body height value/ Высота тела */
38
38
  s(this, "bodyHeight", null);
39
- this.element = e;
39
+ this.element = t;
40
40
  }
41
41
  /**
42
42
  * Update all sizes.
@@ -44,11 +44,11 @@ class T {
44
44
  * Обновить все размеры.
45
45
  */
46
46
  update() {
47
- var t;
48
- const e = this.element.getRect();
49
- if (e) {
50
- const i = this.element.getElementHead(), o = this.element.getElementBody(), h = 1 / window.innerWidth * e.width, r = 1 / e.width * window.innerWidth;
51
- this.top = `${e.top - h * e.top / (h - 1)}px`, this.left = `${e.left - h * e.left / (h - 1)}px`, this.height = `${100 / window.innerHeight * e.height * r}%`, this.scale = h.toString(), this.contextWidth = `${e.width}px`, this.contextHeight = `${e.height}px`, i && (this.headWidth = `${e.width}px`, this.headHeight = `${(t = i.offsetHeight) != null ? t : "0"}px`, this.headScale = r.toString(), o && (this.bodyHeight = `${o.offsetHeight + (this.element.isSection() ? i.offsetHeight : 0)}px`));
47
+ var e;
48
+ const t = this.element.getRect();
49
+ if (t) {
50
+ const i = this.element.getElementHead(), o = this.element.getElementBody(), n = 1 / window.innerWidth * t.width, r = 1 / t.width * window.innerWidth;
51
+ this.top = `${t.top - n * t.top / (n - 1)}px`, this.left = `${t.left - n * t.left / (n - 1)}px`, this.height = `${100 / window.innerHeight * t.height * r}%`, this.scale = n.toString(), this.contextWidth = `${t.width}px`, this.contextHeight = `${t.height}px`, i && (this.headWidth = `${t.width}px`, this.headHeight = `${(e = i.offsetHeight) != null ? e : "0"}px`, this.headScale = r.toString(), o && (this.bodyHeight = `${o.offsetHeight + (this.element.isSection() ? i.offsetHeight : 0)}px`));
52
52
  }
53
53
  }
54
54
  /**
@@ -60,7 +60,7 @@ class T {
60
60
  this.top = null, this.left = null, this.height = null, this.scale = null, this.contextWidth = null, this.contextHeight = null, this.headWidth = null, this.headHeight = null, this.headScale = null, this.bodyHeight = null;
61
61
  }
62
62
  }
63
- class M {
63
+ class A {
64
64
  /**
65
65
  * Constructor.
66
66
  *
@@ -70,7 +70,7 @@ class M {
70
70
  * @param tabIndex class object for managing tab indices/ объект класса для управления табуляцией
71
71
  * @param size class object for managing sizes/ объект класса для управления размерами
72
72
  */
73
- constructor(e, t, i, o) {
73
+ constructor(t, e, i, o) {
74
74
  /** Open state flag/ Флаг состояния открытия */
75
75
  s(this, "open", d(!1));
76
76
  /** Temporary show state for animation/ Временный флаг показа для анимации */
@@ -87,8 +87,8 @@ class M {
87
87
  * Обновление класса показа.
88
88
  */
89
89
  s(this, "makeShow", () => {
90
- const e = this.element.getElement();
91
- e && (e.dataset.show = this.show.value ? "show" : "none");
90
+ const t = this.element.getElement();
91
+ t && (t.dataset.show = this.show.value ? "show" : "none");
92
92
  });
93
93
  /**
94
94
  * Update of the opening class.
@@ -96,8 +96,8 @@ class M {
96
96
  * Обновление класса открытия.
97
97
  */
98
98
  s(this, "makeOpen", () => {
99
- const e = this.element.getElement();
100
- e && (e.dataset.open = this.open.value ? "open" : "none");
99
+ const t = this.element.getElement();
100
+ t && (t.dataset.open = this.open.value ? "open" : "none");
101
101
  });
102
102
  /**
103
103
  * Update of the teleport class.
@@ -105,11 +105,11 @@ class M {
105
105
  * Обновление класса телепорта.
106
106
  */
107
107
  s(this, "makeTeleport", () => {
108
- const e = this.element.getElement();
109
- e && (e.dataset.teleport = this.teleport.value ? "teleport" : "none");
108
+ const t = this.element.getElement();
109
+ t && (t.dataset.teleport = this.teleport.value ? "teleport" : "none");
110
110
  });
111
- this.element = t, this.tabIndex = i, this.size = o, m([this.element.element, this.show], this.makeShow), m([this.element.element, this.open], this.makeOpen), m([this.element.element, this.teleport], this.makeTeleport), e.open && requestAnimationFrame(() => {
112
- this.open.value = !!e.open, this.calculations();
111
+ this.element = e, this.tabIndex = i, this.size = o, m([this.element.element, this.show], this.makeShow), m([this.element.element, this.open], this.makeOpen), m([this.element.element, this.teleport], this.makeTeleport), t.open && requestAnimationFrame(() => {
112
+ this.open.value = !!t.open, this.calculations();
113
113
  });
114
114
  }
115
115
  /**
@@ -127,12 +127,12 @@ class M {
127
127
  * @param open opening status/ статус открытия
128
128
  * @param animation opening with animation/ открытие с анимацией
129
129
  */
130
- set(e, t = !0) {
131
- this.open.value !== e && (t && this.element.isAnimation() ? (this.show.value = !0, requestAnimationFrame(() => {
130
+ set(t, e = !0) {
131
+ this.open.value !== t && (t && this.tabIndex.updateOldElement(), e && this.element.isAnimation() ? (this.show.value = !0, requestAnimationFrame(() => {
132
132
  this.calculations(), this.make(), requestAnimationFrame(() => {
133
- this.open.value = e;
133
+ this.open.value = t;
134
134
  });
135
- })) : (this.open.value = e, this.calculations()), setTimeout(() => this.reset(), 480));
135
+ })) : (this.open.value = t, this.calculations()), setTimeout(() => this.reset(), 480));
136
136
  }
137
137
  /**
138
138
  * Status switching.
@@ -180,10 +180,10 @@ class M {
180
180
  * Обновляет список стилей для главного элемента.
181
181
  */
182
182
  makeMain() {
183
- const e = this.element.getElement();
184
- if (e) {
185
- const t = this.element.style;
186
- this.show.value ? (e.style.setProperty(t.top, this.size.top), e.style.setProperty(t.left, this.size.left), e.style.setProperty(t.height, this.size.height), e.style.setProperty(t.scale, this.size.scale), e.style.setProperty(t.headWidth, this.size.headWidth), e.style.setProperty(t.headHeight, this.size.headHeight), e.style.setProperty(t.headScale, this.size.headScale), e.style.setProperty(t.bodyHeight, this.size.bodyHeight)) : (e.style.removeProperty(t.top), e.style.removeProperty(t.left), e.style.removeProperty(t.height), e.style.removeProperty(t.scale), e.style.removeProperty(t.headWidth), e.style.removeProperty(t.headHeight), e.style.removeProperty(t.headScale), e.style.removeProperty(t.bodyHeight));
183
+ const t = this.element.getElement();
184
+ if (t) {
185
+ const e = this.element.style;
186
+ this.show.value ? (t.style.setProperty(e.top, this.size.top), t.style.setProperty(e.left, this.size.left), t.style.setProperty(e.height, this.size.height), t.style.setProperty(e.scale, this.size.scale), t.style.setProperty(e.headWidth, this.size.headWidth), t.style.setProperty(e.headHeight, this.size.headHeight), t.style.setProperty(e.headScale, this.size.headScale), t.style.setProperty(e.bodyHeight, this.size.bodyHeight)) : (t.style.removeProperty(e.top), t.style.removeProperty(e.left), t.style.removeProperty(e.height), t.style.removeProperty(e.scale), t.style.removeProperty(e.headWidth), t.style.removeProperty(e.headHeight), t.style.removeProperty(e.headScale), t.style.removeProperty(e.bodyHeight));
187
187
  }
188
188
  }
189
189
  /**
@@ -192,14 +192,14 @@ class M {
192
192
  * Обновляет список стилей для элемента контекста.
193
193
  */
194
194
  makeContext() {
195
- const e = this.element.getElementContext();
196
- if (e) {
197
- const t = this.element.style;
198
- this.element.isWindow() && this.isShow.value ? (e.style.setProperty(t.contextWidth, this.size.contextWidth), e.style.setProperty(t.contextHeight, this.size.contextHeight)) : (e.style.removeProperty(t.contextWidth), e.style.removeProperty(t.contextHeight));
195
+ const t = this.element.getElementContext();
196
+ if (t) {
197
+ const e = this.element.style;
198
+ this.element.isWindow() && this.isShow.value ? (t.style.setProperty(e.contextWidth, this.size.contextWidth), t.style.setProperty(e.contextHeight, this.size.contextHeight)) : (t.style.removeProperty(e.contextWidth), t.style.removeProperty(e.contextHeight));
199
199
  }
200
200
  }
201
201
  }
202
- class P {
202
+ class N {
203
203
  /**
204
204
  * Constructor.
205
205
  *
@@ -209,7 +209,7 @@ class P {
209
209
  * @param state class object for status management/ объект класса для управления статусом
210
210
  * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
211
211
  */
212
- constructor(e, t, i, o) {
212
+ constructor(t, e, i, o) {
213
213
  s(this, "item");
214
214
  /**
215
215
  * Click event on the title.
@@ -217,8 +217,17 @@ class P {
217
217
  * Событие клика на заголовок.
218
218
  * @param event event object/ объект события
219
219
  */
220
- s(this, "onClick", (e) => {
221
- this.props.clickOpen && this.element.isClick(e.target) && (this.emit(e, "head"), this.state.toggle());
220
+ s(this, "onClick", (t) => {
221
+ this.isTrigger(t.target) && (this.emit(t, "head"), this.state.toggle());
222
+ });
223
+ /**
224
+ * Events of pressing a key.
225
+ *
226
+ * События нажатия на клавишу.
227
+ * @param event event object/ объект события
228
+ */
229
+ s(this, "onKeydown", async (t) => {
230
+ B(t) && this.isTrigger(t.target) && (t.preventDefault(), this.emit(t, "head"), this.state.toggle());
222
231
  });
223
232
  /**
224
233
  * End of animation event.
@@ -226,14 +235,19 @@ class P {
226
235
  * Событие окончания анимации.
227
236
  * @param event event object/ объект события
228
237
  */
229
- s(this, "onTransitionend", (e) => {
230
- this.element.getElement() === e.target && e.propertyName === "height" && this.state.reset();
238
+ s(this, "onTransitionend", (t) => {
239
+ this.element.getElement() === t.target && t.propertyName === "height" && this.state.reset();
231
240
  });
232
- s(this, "listener", (e) => {
233
- const t = e.target;
234
- this.state.open.value && this.element.isClickGlobal(t) && (this.element.isClose(t) || this.props.autoClose && this.element.isOutside(t) && this.element.isIgnore(t)) && (this.emit(e, "body"), this.state.set(!1));
241
+ s(this, "listener", (t) => {
242
+ const e = t.target;
243
+ this.state.open.value && this.element.isClickGlobal(e) && (this.element.isClose(e) || this.props.autoClose && this.element.isOutside(e) && this.element.isIgnore(e)) && (this.emit(t, "body"), this.state.set(!1));
235
244
  });
236
- this.props = e, this.element = t, this.state = i, this.emits = o, this.item = new S(document.body, "click", this.listener), m(this.state.open, () => this.item.toggle(this.state.open.value));
245
+ this.props = t, this.element = e, this.state = i, this.emits = o, this.item = new W(document.body, "click", this.listener), m(
246
+ this.state.open,
247
+ () => {
248
+ this.props.autoClose && this.state.open.value, this.item.toggle(this.state.open.value);
249
+ }
250
+ );
237
251
  }
238
252
  /**
239
253
  * Stopping event listening.
@@ -250,23 +264,32 @@ class P {
250
264
  * @param event event object/ объект события
251
265
  * @param type event type/ тип события
252
266
  */
253
- emit(e, t) {
254
- var o, h;
267
+ emit(t, e) {
268
+ var o, n;
255
269
  const i = {
256
- type: t,
270
+ type: e,
257
271
  open: !this.state.open.value
258
272
  };
259
- (o = this.emits) == null || o.call(this, "transform", e, i), (h = this.emits) == null || h.call(this, "transformLite", i);
273
+ (o = this.emits) == null || o.call(this, "transform", t, i), (n = this.emits) == null || n.call(this, "transformLite", i);
274
+ }
275
+ /**
276
+ * Checks if the event target is a trigger for opening.
277
+ *
278
+ * Проверяет, является ли цель события триггером для открытия.
279
+ * @param target event target/ цель события
280
+ */
281
+ isTrigger(t) {
282
+ return !!(this.props.clickOpen && this.element.isClick(t));
260
283
  }
261
284
  }
262
- class W {
285
+ class $ {
263
286
  /**
264
287
  * Constructor.
265
288
  *
266
289
  * Конструктор.
267
290
  * @param state class object for status management/ объект класса для управления статусом
268
291
  */
269
- constructor(e) {
292
+ constructor(t) {
270
293
  /**
271
294
  * Opens.
272
295
  *
@@ -278,7 +301,9 @@ class W {
278
301
  *
279
302
  * Закрывает.
280
303
  */
281
- s(this, "close", () => this.state.set(!1));
304
+ s(this, "close", () => {
305
+ this.state.set(!1);
306
+ });
282
307
  /**
283
308
  * Switching.
284
309
  *
@@ -291,11 +316,11 @@ class W {
291
316
  * Изменение состояния.
292
317
  * @param open opening status/ статус открытия
293
318
  */
294
- s(this, "to", (e) => this.state.set(e));
295
- this.state = e;
319
+ s(this, "to", (t) => this.state.set(t));
320
+ this.state = t;
296
321
  }
297
322
  }
298
- class z {
323
+ class _ {
299
324
  /**
300
325
  * Constructor
301
326
  * @param props input data/ входные данные
@@ -307,8 +332,16 @@ class z {
307
332
  * @param components object for working with components/ объект для работы с компонентами
308
333
  * @param slots object for working with slots/ объект для работы со слотами
309
334
  * @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
335
+ * @param MotionTransformElementConstructor class for working with elements/ класс для работы с элементами
336
+ * @param MotionTransformSizeConstructor class for working with size/ класс для работы с размером
337
+ * @param MotionTransformStateConstructor class for working with state/ класс для работы с состоянием
338
+ * @param MotionTransformEventConstructor class for working with events/ класс для работы с событиями
339
+ * @param MotionTransformGoConstructor class for working with go/ класс для работы с переходом
340
+ * @param TabIndexIncludeConstructor class for working with tab index/ класс для работы с индексом табуляции
341
+ * @param WindowEscConstructor class for working with esc/ класс для работы с esc
342
+ * @param ModelIncludeConstructor class for working with model/ класс для работы с моделью
310
343
  */
311
- constructor(e, t, i, o, h, r, g, y, c) {
344
+ constructor(t, e, i, o, n, r, g, y, c, f = u, v = D, w = A, x = N, S = $, b = z, k = I, C = O) {
312
345
  /** Reference helper for element interactions/ Вспомогательный класс для работы с элементами */
313
346
  s(this, "element");
314
347
  s(this, "tabIndex");
@@ -339,23 +372,24 @@ class z {
339
372
  this.state.isOpen.value
340
373
  )
341
374
  })));
342
- this.props = e, this.refs = t, this.classDesign = h, this.className = r, this.components = g, this.slots = y, this.emits = c, this.element = new u(
343
- e,
375
+ this.props = t, this.refs = e, this.classDesign = n, this.className = r, this.components = g, this.slots = y, this.emits = c, this.element = new f(
376
+ t,
344
377
  i,
345
378
  o,
346
379
  r
347
- ), this.tabIndex = new C(
348
- () => this.element.getElementBody()
349
- ), this.size = new T(this.element), this.state = new M(
350
- e,
380
+ ), this.tabIndex = new b(
381
+ () => this.element.getElementBody(),
382
+ () => this.element.isWindow()
383
+ ), this.size = new v(this.element), this.state = new w(
384
+ t,
351
385
  this.element,
352
386
  this.tabIndex,
353
387
  this.size
354
- ), this.event = new P(e, this.element, this.state, c), this.go = new W(this.state), this.esc = new H(
388
+ ), this.event = new x(t, this.element, this.state, c), this.go = new S(this.state), this.esc = new k(
355
389
  this.state.open,
356
390
  () => this.go.close(),
357
- () => this.element.isWindow()
358
- ), new k("open", this.emits, this.state.open), m([t.open], () => this.state.set(!!e.open)), w(() => this.event.stop());
391
+ () => !!this.props.clickOpen
392
+ ), new C("open", this.emits, this.state.open), m([e.open], () => this.state.set(!!t.open)), M(() => this.event.stop());
359
393
  }
360
394
  /**
361
395
  * Returns data for managing slot data.
@@ -365,16 +399,8 @@ class z {
365
399
  getSlotData() {
366
400
  return this.slotData.value;
367
401
  }
368
- /**
369
- * Get the ARIA role.
370
- *
371
- * Получить ARIA роль.
372
- */
373
- getRole() {
374
- return this.element.isWindow() ? "dialog" : "region";
375
- }
376
402
  }
377
- const _ = {
403
+ const j = {
378
404
  clickOpen: !0,
379
405
  autoClose: !0,
380
406
  animationShow: !0,
@@ -382,16 +408,17 @@ const _ = {
382
408
  // :default [!] System label / Системная метка
383
409
  animationHeadPosition: "top"
384
410
  };
385
- class R extends b {
411
+ class J extends E {
386
412
  /**
387
413
  * Constructor
388
414
  * @param name class name/ название класса
389
415
  * @param props properties/ свойства
390
416
  * @param options list of additional parameters/ список дополнительных параметров
417
+ * @param ItemConstructor class for working with the item/ класс для работы с элементом
391
418
  */
392
- constructor(t, i, o) {
419
+ constructor(e, i, o, n = _) {
393
420
  super(
394
- t,
421
+ e,
395
422
  i,
396
423
  o
397
424
  );
@@ -434,10 +461,10 @@ class R extends b {
434
461
  * Рендеринг содержимого.
435
462
  */
436
463
  s(this, "renderBody", () => {
437
- var t;
464
+ var e;
438
465
  return this.props.inDom || this.item.state.isShow.value ? [
439
466
  l(
440
- (t = this.props.tagBody) != null ? t : "div",
467
+ (e = this.props.tagBody) != null ? e : "div",
441
468
  this.propsBody.value,
442
469
  this.initSlot(
443
470
  "body",
@@ -453,13 +480,13 @@ class R extends b {
453
480
  * Рендеринг задника.
454
481
  */
455
482
  s(this, "renderScrim", () => {
456
- var t;
483
+ var e;
457
484
  return this.item.state.teleport.value ? [
458
485
  l(
459
486
  "div",
460
487
  {
461
488
  key: "scrim",
462
- class: (t = this.classes) == null ? void 0 : t.value.scrim
489
+ class: (e = this.classes) == null ? void 0 : e.value.scrim
463
490
  }
464
491
  )
465
492
  ] : [];
@@ -470,12 +497,12 @@ class R extends b {
470
497
  * Свойства для главного элемента.
471
498
  */
472
499
  s(this, "propsMain", a(() => {
473
- var t;
500
+ var e;
474
501
  return {
475
502
  ...this.getAttrs(),
476
503
  ref: this.element,
477
504
  key: "main",
478
- class: (t = this.classes) == null ? void 0 : t.value.main,
505
+ class: (e = this.classes) == null ? void 0 : e.value.main,
479
506
  onTransitionend: this.item.event.onTransitionend
480
507
  };
481
508
  }));
@@ -485,12 +512,17 @@ class R extends b {
485
512
  * Свойства для элемента заголовка.
486
513
  */
487
514
  s(this, "propsHead", a(() => {
488
- var t;
489
- return {
515
+ var i;
516
+ const e = {
490
517
  key: "head",
491
- class: (t = this.classes) == null ? void 0 : t.value.head,
518
+ class: (i = this.classes) == null ? void 0 : i.value.head,
492
519
  onClick: this.item.event.onClick
493
520
  };
521
+ return this.props.clickOpen ? {
522
+ ...e,
523
+ onKeydown: this.item.event.onKeydown,
524
+ ...this.item.slotData.value.binds
525
+ } : e;
494
526
  }));
495
527
  /**
496
528
  * Props for the body element.
@@ -498,20 +530,20 @@ class R extends b {
498
530
  * Свойства для элемента тела.
499
531
  */
500
532
  s(this, "propsBody", a(() => {
501
- var t;
533
+ var e;
502
534
  return {
503
535
  key: "body",
504
536
  id: this.item.element.idBody,
505
- class: (t = this.classes) == null ? void 0 : t.value.body,
506
- ...p.role(this.item.getRole()),
537
+ class: (e = this.classes) == null ? void 0 : e.value.body,
538
+ ...p.role("region"),
507
539
  ...p.modal(
508
- this.item.element.isWindow(),
540
+ !1,
509
541
  this.props.ariaLabelledby,
510
542
  this.props.ariaDescribedby
511
543
  )
512
544
  };
513
545
  }));
514
- this.item = new z(
546
+ this.item = new n(
515
547
  this.props,
516
548
  this.refs,
517
549
  this.element,
@@ -570,7 +602,7 @@ class R extends b {
570
602
  */
571
603
  initRender() {
572
604
  var i;
573
- const t = [
605
+ const e = [
574
606
  ...this.renderMain(),
575
607
  ...this.renderScrim()
576
608
  ];
@@ -581,22 +613,22 @@ class R extends b {
581
613
  class: (i = this.classes) == null ? void 0 : i.value.context
582
614
  },
583
615
  l(
584
- x,
616
+ P,
585
617
  {
586
618
  key: "teleport",
587
619
  disabled: !this.item.state.teleport.value,
588
620
  to: "body"
589
621
  },
590
- t
622
+ e
591
623
  )
592
624
  );
593
625
  }
594
626
  }
595
627
  export {
596
- z as MotionTransform,
597
- L as MotionTransformClassesInclude,
598
- R as MotionTransformDesign,
599
- U as MotionTransformInclude,
600
- G as __MOTION_TRANSFORM_TYPE_BODY_NAME,
601
- _ as defaultsMotionTransform
628
+ _ as MotionTransform,
629
+ X as MotionTransformClassesInclude,
630
+ J as MotionTransformDesign,
631
+ et as MotionTransformInclude,
632
+ Z as __MOTION_TRANSFORM_TYPE_BODY_NAME,
633
+ j as defaultsMotionTransform
602
634
  };
package/dist/page.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as r, a as c } from "./BlockDesign-D67yDT9N.js";
1
+ import { B as r, a as c } from "./BlockDesign-CwRNJi0I.js";
2
2
  import "@dxtmisha/functional";
3
3
  class g extends r {
4
4
  }
package/dist/plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P } from "./Plugin-DUJ0epm4.js";
1
+ import { P } from "./Plugin-CBNCh_iN.js";
2
2
  export {
3
3
  P as Plugin
4
4
  };