@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.
- package/dist/{AriaStaticInclude-CFGewqpn.js → AriaStaticInclude-CAURwJMb.js} +47 -9
- package/dist/{BarsInclude-IM3Gdslg.js → BarsInclude-BOEoY-O4.js} +19 -14
- package/dist/{BlockDesign-D67yDT9N.js → BlockDesign-CwRNJi0I.js} +49 -38
- package/dist/ButtonDesign-DgZNw44L.js +198 -0
- package/dist/CaptionInclude-NzS6EYYj.js +70 -0
- package/dist/{DescriptionInclude-DxWNon_J.js → DescriptionInclude-D4ane9aR.js} +20 -30
- package/dist/{EnabledInclude-DGeuJhOr.js → EnabledInclude-Dk-rP4jp.js} +1 -1
- package/dist/{EventClickInclude-eDWqxK0d.js → EventClickInclude-WHJqxZ1b.js} +13 -3
- package/dist/{FieldCounterInclude-BR6n8WlH.js → FieldCounterInclude-D0oojGWY.js} +2 -2
- package/dist/{FieldEventInclude-zg02dtQi.js → FieldEventInclude-DBRqmzpF.js} +11 -8
- package/dist/{FieldInclude-c6DSD0-y.js → FieldInclude-BKoBWZdj.js} +23 -12
- package/dist/{FieldLabelInclude-B4OGaJ1r.js → FieldLabelInclude-Bkxf6rRw.js} +30 -23
- package/dist/{FieldMatchInclude-Vl2gJUaM.js → FieldMatchInclude-GgyucDC_.js} +35 -19
- package/dist/{FieldMessageInclude-CktVHvWW.js → FieldMessageInclude-BJDnir34.js} +34 -28
- package/dist/{LabelHighlightInclude-Dhj3p9NW.js → LabelHighlightInclude-CLmTvW_6.js} +1 -1
- package/dist/{LabelInclude-BtZrrbCf.js → LabelInclude-D-mLvjK5.js} +32 -50
- package/dist/{LabelNumberInclude-DyifvMnr.js → LabelNumberInclude-Cn0qDEgX.js} +1 -1
- package/dist/{ModalDesignAbstract-CjDr5JaN.js → ModalDesignAbstract-D4A_a_rC.js} +42 -42
- package/dist/{Plugin-DUJ0epm4.js → Plugin-CBNCh_iN.js} +2 -2
- package/dist/{ProgressInclude-UBipdctr.js → ProgressInclude-9MfZWtGP.js} +5 -5
- package/dist/{SuffixInclude-C7JNYCJK.js → SuffixInclude-maZ7235l.js} +48 -20
- package/dist/{TabIndexInclude-d7A_R6KD.js → TabIndexInclude-xcSFV8yP.js} +43 -33
- package/dist/TextInclude--GERRCGj.js +146 -0
- package/dist/{WindowEsc-Dp9AvJt7.js → WindowEsc-DTwn4Vsz.js} +2 -2
- package/dist/{WindowInclude-Is5RhGxt.js → WindowInclude-BWm4-0Gh.js} +24 -20
- package/dist/accordion.js +66 -50
- package/dist/actionSheet.js +2 -4
- package/dist/actions.js +38 -36
- package/dist/anchor.js +63 -60
- package/dist/arrow.js +32 -33
- package/dist/badge.js +40 -35
- package/dist/bars.js +91 -57
- package/dist/block.js +1 -1
- package/dist/button.js +12 -15
- package/dist/cell.js +44 -37
- package/dist/chip.js +1 -1
- package/dist/chipGroup.js +25 -21
- package/dist/classes/AriaStaticInclude.d.ts +28 -0
- package/dist/classes/CaptionInclude.d.ts +64 -1
- package/dist/classes/DescriptionInclude.d.ts +4 -16
- package/dist/classes/EventClickInclude.d.ts +8 -0
- package/dist/classes/Field/FieldInputModeInclude.d.ts +1 -0
- package/dist/classes/LabelInclude.d.ts +4 -17
- package/dist/classes/PrefixInclude.d.ts +9 -1
- package/dist/classes/SuffixInclude.d.ts +9 -1
- package/dist/classes/TabIndexInclude.d.ts +14 -8
- package/dist/classes/TextInclude.d.ts +33 -5
- package/dist/constructors/Accordion/Accordion.d.ts +28 -1
- package/dist/constructors/Actions/Actions.d.ts +2 -1
- package/dist/constructors/Actions/ActionsDesign.d.ts +2 -1
- package/dist/constructors/Actions/props.d.ts +1 -0
- package/dist/constructors/Anchor/Anchor.d.ts +0 -7
- package/dist/constructors/Anchor/AnchorIcon.d.ts +3 -3
- package/dist/constructors/Anchor/props.d.ts +5 -4
- package/dist/constructors/Anchor/types.d.ts +2 -2
- package/dist/constructors/Arrow/Arrow.d.ts +0 -5
- package/dist/constructors/Badge/Badge.d.ts +5 -1
- package/dist/constructors/Badge/BadgeDesign.d.ts +2 -1
- package/dist/constructors/Bars/Bars.d.ts +30 -2
- package/dist/constructors/Bars/BarsAction.d.ts +6 -2
- package/dist/constructors/Bars/BarsDesign.d.ts +2 -1
- package/dist/constructors/Bars/BarsInclude.d.ts +7 -2
- package/dist/constructors/Bars/props.d.ts +2 -3
- package/dist/constructors/Bars/types.d.ts +3 -3
- package/dist/constructors/Block/Block.d.ts +0 -4
- package/dist/constructors/Block/BlockDesign.d.ts +9 -1
- package/dist/constructors/Block/types.d.ts +3 -3
- package/dist/constructors/Button/Button.d.ts +22 -1
- package/dist/constructors/Button/ButtonDesign.d.ts +2 -1
- package/dist/constructors/Button/props.d.ts +3 -5
- package/dist/constructors/Button/types.d.ts +2 -2
- package/dist/constructors/Cell/Cell.d.ts +10 -1
- package/dist/constructors/Cell/CellDesign.d.ts +2 -1
- package/dist/constructors/Cell/types.d.ts +3 -3
- package/dist/constructors/ChipGroup/ChipGroup.d.ts +4 -1
- package/dist/constructors/ChipGroup/ChipGroupDesign.d.ts +2 -1
- package/dist/constructors/Field/Field.d.ts +33 -6
- package/dist/constructors/Field/FieldDesign.d.ts +2 -1
- package/dist/constructors/Field/FieldIcons.d.ts +4 -1
- package/dist/constructors/Field/FieldInclude.d.ts +8 -0
- package/dist/constructors/Field/props.d.ts +2 -1
- package/dist/constructors/FieldCounter/FieldCounter.d.ts +22 -1
- package/dist/constructors/FieldCounter/FieldCounterDesign.d.ts +9 -2
- package/dist/constructors/FieldCounter/props.d.ts +7 -1
- package/dist/constructors/FieldCounter/types.d.ts +1 -0
- package/dist/constructors/FieldLabel/FieldLabel.d.ts +5 -1
- package/dist/constructors/FieldLabel/FieldLabelDesign.d.ts +2 -1
- package/dist/constructors/FieldLabel/FieldLabelInclude.d.ts +7 -5
- package/dist/constructors/FieldLabel/props.d.ts +1 -0
- package/dist/constructors/FieldLabel/types.d.ts +2 -2
- package/dist/constructors/FieldMessage/FieldMessage.d.ts +16 -1
- package/dist/constructors/FieldMessage/FieldMessageDesign.d.ts +2 -1
- package/dist/constructors/FieldMessage/FieldMessageInclude.d.ts +8 -9
- package/dist/constructors/Icon/Icon.d.ts +7 -2
- package/dist/constructors/Icon/props.d.ts +3 -1
- package/dist/constructors/Icon/types.d.ts +3 -2
- package/dist/constructors/Image/Image.d.ts +0 -7
- package/dist/constructors/Input/Input.d.ts +20 -1
- package/dist/constructors/Input/InputDesign.d.ts +2 -1
- package/dist/constructors/Input/InputPassword.d.ts +4 -1
- package/dist/constructors/List/List.d.ts +18 -9
- package/dist/constructors/List/ListDesign.d.ts +2 -1
- package/dist/constructors/List/ListFocus.d.ts +10 -2
- package/dist/constructors/List/ListGo.d.ts +22 -4
- package/dist/constructors/List/props.d.ts +4 -2
- package/dist/constructors/ListGroup/ListGroup.d.ts +2 -1
- package/dist/constructors/ListGroup/ListGroupDesign.d.ts +2 -1
- package/dist/constructors/ListItem/ListItem.d.ts +17 -60
- package/dist/constructors/ListItem/props.d.ts +2 -3
- package/dist/constructors/ListMenu/ListMenu.d.ts +3 -1
- package/dist/constructors/ListMenu/ListMenuDesign.d.ts +2 -1
- package/dist/constructors/Mask/Mask.d.ts +24 -1
- package/dist/constructors/Mask/MaskDesign.d.ts +2 -1
- package/dist/constructors/Menu/Menu.d.ts +10 -1
- package/dist/constructors/Menu/MenuDesign.d.ts +2 -1
- package/dist/constructors/Menu/props.d.ts +2 -1
- package/dist/constructors/Modal/ModalDesign.d.ts +1 -1
- package/dist/constructors/Modal/ModalDesignAbstract.d.ts +3 -2
- package/dist/constructors/MotionTransform/MotionTransform.d.ts +10 -8
- package/dist/constructors/MotionTransform/MotionTransformDesign.d.ts +13 -2
- package/dist/constructors/MotionTransform/MotionTransformEvent.d.ts +14 -0
- package/dist/constructors/MotionTransform/props.d.ts +2 -2
- package/dist/constructors/Progress/Progress.d.ts +20 -0
- package/dist/constructors/Progress/ProgressDesign.d.ts +4 -60
- package/dist/constructors/Progress/props.d.ts +3 -3
- package/dist/constructors/Ripple/RippleDesign.d.ts +2 -1
- package/dist/constructors/Scrollbar/Scrollbar.d.ts +3 -1
- package/dist/constructors/Scrollbar/ScrollbarDesign.d.ts +2 -1
- package/dist/constructors/Select/Select.d.ts +12 -1
- package/dist/constructors/Select/SelectDesign.d.ts +2 -1
- package/dist/constructors/SelectValue/SelectValue.d.ts +4 -1
- package/dist/constructors/SelectValue/SelectValueDesign.d.ts +2 -1
- package/dist/constructors/Skeleton/SkeletonDesign.d.ts +2 -1
- package/dist/constructors/TextareaAutosize/TextareaAutosize.d.ts +3 -1
- package/dist/constructors/TextareaAutosize/TextareaAutosizeDesign.d.ts +2 -1
- package/dist/constructors/Tooltip/Tooltip.d.ts +82 -13
- package/dist/constructors/Tooltip/TooltipEvent.d.ts +5 -1
- package/dist/constructors/Tooltip/TooltipOpen.d.ts +6 -0
- package/dist/constructors/Tooltip/props.d.ts +10 -1
- package/dist/constructors/Window/Window.d.ts +25 -1
- package/dist/constructors/Window/WindowDesign.d.ts +5 -63
- package/dist/constructors/Window/WindowEsc.d.ts +2 -2
- package/dist/constructors/Window/WindowEvent.d.ts +20 -3
- package/dist/constructors/Window/WindowHidden.d.ts +9 -3
- package/dist/constructors/Window/WindowInclude.d.ts +5 -1
- package/dist/constructors/Window/basicTypes.d.ts +5 -1
- package/dist/constructors/Window/props.d.ts +15 -3
- package/dist/dialog.js +4 -4
- package/dist/field.js +161 -126
- package/dist/fieldCounter.js +107 -38
- package/dist/fieldLabel.js +41 -37
- package/dist/fieldMessage.js +87 -65
- package/dist/icon.js +55 -39
- package/dist/image.js +108 -110
- package/dist/input.js +102 -80
- package/dist/library.js +14 -14
- package/dist/list.js +152 -87
- package/dist/listGroup.js +23 -21
- package/dist/listItem.js +116 -100
- package/dist/listMenu.js +26 -20
- package/dist/mask.js +113 -89
- package/dist/menu.js +64 -49
- package/dist/modal.js +9 -9
- package/dist/motionTransform.js +138 -106
- package/dist/page.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/progress.js +65 -38
- package/dist/ripple.js +4 -3
- package/dist/scrollbar.js +23 -20
- package/dist/section.js +1 -1
- package/dist/select.js +105 -90
- package/dist/selectValue.js +29 -25
- package/dist/skeleton.js +20 -22
- package/dist/textareaAutosize.js +26 -23
- package/dist/tooltip.js +140 -91
- package/dist/types/ariaTypes.d.ts +7 -0
- package/dist/types/captionTypes.d.ts +2 -0
- package/dist/types/descriptionTypes.d.ts +2 -10
- package/dist/types/labelTypes.d.ts +0 -7
- package/dist/types/prefixTypes.d.ts +2 -0
- package/dist/types/suffixTypes.d.ts +2 -0
- package/dist/types/textTypes.d.ts +42 -2
- package/dist/window.js +169 -105
- package/package.json +2 -2
- package/src/constructors/Actions/style.scss +0 -1
- package/src/constructors/Bars/style.scss +2 -0
- package/src/constructors/FieldCounter/style.scss +5 -0
- package/src/constructors/Progress/style.scss +2 -0
- package/src/constructors/Tooltip/style.scss +10 -2
- package/src/constructors/Window/style.scss +7 -1
- package/dist/ButtonDesign-DZ7QCmHk.js +0 -169
- package/dist/CaptionInclude-AFVF4qyd.js +0 -52
- package/dist/TextInclude-i1OBAFTG.js +0 -76
package/dist/anchor.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { computed as n, ref as
|
|
5
|
-
import { goScrollSmooth as
|
|
6
|
-
import { L as
|
|
7
|
-
import { T as
|
|
8
|
-
import { T as
|
|
9
|
-
import { g as
|
|
10
|
-
import { A as
|
|
2
|
+
var A = (s, e, t) => e in s ? b(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var i = (s, e, t) => A(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { computed as n, ref as I, onMounted as T, h as l } from "vue";
|
|
5
|
+
import { goScrollSmooth as k, toNumber as w, writeClipboardData as x, DesignConstructorAbstract as D } from "@dxtmisha/functional";
|
|
6
|
+
import { L as H } from "./LabelInclude-D-mLvjK5.js";
|
|
7
|
+
import { T as S } from "./TextInclude--GERRCGj.js";
|
|
8
|
+
import { T as L } from "./TooltipInclude--QRSE83v.js";
|
|
9
|
+
import { g as $ } from "./getClassTagAStatic-BnVYlXHI.js";
|
|
10
|
+
import { A as a } from "./AriaStaticInclude-CAURwJMb.js";
|
|
11
11
|
class B {
|
|
12
12
|
/**
|
|
13
13
|
* Constructor
|
|
14
14
|
* @param props input data / входные данные
|
|
15
15
|
*/
|
|
16
|
-
constructor(
|
|
16
|
+
constructor(e) {
|
|
17
17
|
/** Computed href attribute/ Вычисляемый атрибут href */
|
|
18
|
-
|
|
18
|
+
i(this, "href", n(() => {
|
|
19
19
|
if (this.props.name)
|
|
20
20
|
return `#${this.props.name}`;
|
|
21
21
|
}));
|
|
22
|
-
this.props =
|
|
22
|
+
this.props = e;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Check if href exists
|
|
@@ -53,8 +53,8 @@ class F {
|
|
|
53
53
|
* @param element input element / элемент ввода
|
|
54
54
|
* @param href href handler / обработчик ссылки
|
|
55
55
|
*/
|
|
56
|
-
constructor(
|
|
57
|
-
this.props =
|
|
56
|
+
constructor(e, t, r) {
|
|
57
|
+
this.props = e, this.element = t, this.href = r;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Scroll to element
|
|
@@ -62,14 +62,14 @@ class F {
|
|
|
62
62
|
* Прокрутить к элементу
|
|
63
63
|
*/
|
|
64
64
|
go() {
|
|
65
|
-
this.element.value && (
|
|
65
|
+
this.element.value && (k(
|
|
66
66
|
this.element.value,
|
|
67
67
|
{
|
|
68
68
|
behavior: this.props.behavior,
|
|
69
69
|
block: this.props.block,
|
|
70
70
|
inline: this.props.inline
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
w(this.props.shift)
|
|
73
73
|
), history.replaceState({}, "", this.href.get()));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -81,19 +81,19 @@ class M {
|
|
|
81
81
|
* @param href href handler / обработчик ссылки
|
|
82
82
|
* @param to scroll handler / обработчик прокрутки
|
|
83
83
|
*/
|
|
84
|
-
constructor(
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
constructor(e, t, r, o) {
|
|
85
|
+
i(this, "copy", I());
|
|
86
|
+
i(this, "timeout");
|
|
87
87
|
/**
|
|
88
88
|
* On click handler
|
|
89
89
|
*
|
|
90
90
|
* Обработчик нажатия
|
|
91
91
|
*/
|
|
92
|
-
|
|
92
|
+
i(this, "onClick", (e) => {
|
|
93
93
|
var t;
|
|
94
|
-
|
|
94
|
+
e.preventDefault(), this.props.isCopy ? x(this.href.getLink()).then(() => this.toCopy()) : (t = this.to) == null || t.go();
|
|
95
95
|
});
|
|
96
|
-
this.props =
|
|
96
|
+
this.props = e, this.tooltip = t, this.href = r, this.to = o;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Is copy state
|
|
@@ -109,10 +109,10 @@ class M {
|
|
|
109
109
|
* Запустить состояние копирования
|
|
110
110
|
*/
|
|
111
111
|
toCopy() {
|
|
112
|
-
var
|
|
112
|
+
var e;
|
|
113
113
|
clearTimeout(this.timeout), this.copy.value = !0, this.tooltip.open(), this.timeout = setTimeout(() => {
|
|
114
114
|
this.copy.value = !1, this.tooltip.close();
|
|
115
|
-
}, (
|
|
115
|
+
}, (e = this.props.delayHide) != null ? e : 1024);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
class N {
|
|
@@ -121,19 +121,19 @@ class N {
|
|
|
121
121
|
* @param props input data / входные данные
|
|
122
122
|
* @param event event handler / обработчик событий
|
|
123
123
|
*/
|
|
124
|
-
constructor(
|
|
124
|
+
constructor(e, t) {
|
|
125
125
|
/** Icon to display/ Иконка для отображения */
|
|
126
|
-
|
|
126
|
+
i(this, "icon", n(() => {
|
|
127
127
|
if (!this.props.hide)
|
|
128
128
|
return this.props.isCopy ? this.props.iconTag : this.props.iconLink;
|
|
129
129
|
}));
|
|
130
130
|
/** Binds for the icon/ Привязки для иконки */
|
|
131
|
-
|
|
131
|
+
i(this, "binds", n(() => ({
|
|
132
132
|
icon: this.icon.value,
|
|
133
|
-
iconActive: this.props.iconContentCopy,
|
|
133
|
+
iconActive: this.props.isCopy ? this.props.iconContentCopy : void 0,
|
|
134
134
|
active: this.event.isCopy()
|
|
135
135
|
})));
|
|
136
|
-
this.props =
|
|
136
|
+
this.props = e, this.event = t;
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* Check if the icon is set
|
|
@@ -163,50 +163,51 @@ class E {
|
|
|
163
163
|
* @param TextIncludeConstructor class for working with text/ класс для работы с текстом
|
|
164
164
|
* @param TooltipIncludeConstructor class for working with tooltip/ класс для работы с подсказкой
|
|
165
165
|
*/
|
|
166
|
-
constructor(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
166
|
+
constructor(e, t, r, o, h, c, p, u, m = B, d = F, f = M, v = N, g = H, C = S, y = L) {
|
|
167
|
+
i(this, "label");
|
|
168
|
+
i(this, "text");
|
|
169
|
+
i(this, "tooltip");
|
|
170
|
+
i(this, "href");
|
|
171
|
+
i(this, "to");
|
|
172
|
+
i(this, "event");
|
|
173
|
+
i(this, "icon");
|
|
174
174
|
/** Is hide anchor/ Скрыть якорь */
|
|
175
|
-
|
|
175
|
+
i(this, "isHide", n(() => this.props.hide || !this.label.is.value && !this.props.isCopy));
|
|
176
176
|
/**
|
|
177
177
|
* Go if focus on anchor
|
|
178
178
|
*
|
|
179
179
|
* Перейти, если фокус на якоре
|
|
180
180
|
*/
|
|
181
|
-
|
|
181
|
+
i(this, "goIsFocus", () => {
|
|
182
182
|
location.hash === this.href.get() && this.to.go();
|
|
183
183
|
});
|
|
184
|
-
this.props =
|
|
184
|
+
this.props = e, this.refs = t, this.element = r, this.classDesign = o, this.className = h, this.components = c, this.slots = p, this.emits = u, this.label = new g(e, h, void 0, p), this.text = new C(this.props), this.tooltip = new y(
|
|
185
185
|
this.props,
|
|
186
186
|
this.className,
|
|
187
187
|
this.components,
|
|
188
188
|
n(() => ({
|
|
189
|
-
description: this.text.copiedClipboard.value
|
|
189
|
+
description: this.text.copiedClipboard.value,
|
|
190
|
+
interactive: !1
|
|
190
191
|
}))
|
|
191
|
-
), this.href = new
|
|
192
|
+
), this.href = new m(this.props), this.to = new d(
|
|
192
193
|
this.props,
|
|
193
194
|
this.element,
|
|
194
195
|
this.href
|
|
195
|
-
), this.event = new
|
|
196
|
+
), this.event = new f(
|
|
196
197
|
this.props,
|
|
197
198
|
this.tooltip,
|
|
198
199
|
this.href,
|
|
199
200
|
this.to
|
|
200
|
-
), this.icon = new
|
|
201
|
+
), this.icon = new v(this.props, this.event), T(() => {
|
|
201
202
|
requestAnimationFrame(this.goIsFocus);
|
|
202
203
|
});
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
|
-
const
|
|
206
|
+
const O = {
|
|
206
207
|
shift: 64,
|
|
207
208
|
delayHide: 3072
|
|
208
209
|
};
|
|
209
|
-
class Q extends
|
|
210
|
+
class Q extends D {
|
|
210
211
|
/**
|
|
211
212
|
* Constructor
|
|
212
213
|
* @param name class name/ название класса
|
|
@@ -220,13 +221,13 @@ class Q extends x {
|
|
|
220
221
|
r,
|
|
221
222
|
o
|
|
222
223
|
);
|
|
223
|
-
|
|
224
|
+
i(this, "item");
|
|
224
225
|
/**
|
|
225
226
|
* Rendering the tooltip.
|
|
226
227
|
*
|
|
227
228
|
* Рендеринг подсказки.
|
|
228
229
|
*/
|
|
229
|
-
|
|
230
|
+
i(this, "renderTooltip", () => this.item.tooltip.render(
|
|
230
231
|
{
|
|
231
232
|
control: (t) => this.renderItem(t)
|
|
232
233
|
}
|
|
@@ -237,14 +238,14 @@ class Q extends x {
|
|
|
237
238
|
* Рендеринг основного элемента.
|
|
238
239
|
* @param props additional properties/ дополнительные свойства
|
|
239
240
|
*/
|
|
240
|
-
|
|
241
|
+
i(this, "renderItem", (t) => {
|
|
241
242
|
var o;
|
|
242
243
|
const r = [
|
|
243
244
|
(o = this.classes) == null ? void 0 : o.value.main,
|
|
244
|
-
|
|
245
|
+
$(this.getDesign())
|
|
245
246
|
];
|
|
246
247
|
return t && r.push(t.class), [
|
|
247
|
-
|
|
248
|
+
l("a", {
|
|
248
249
|
...this.getMainProps(),
|
|
249
250
|
class: r
|
|
250
251
|
}, this.renderChildren())
|
|
@@ -255,11 +256,12 @@ class Q extends x {
|
|
|
255
256
|
*
|
|
256
257
|
* Рендеринг скрытого элемента.
|
|
257
258
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
i(this, "renderItemHide", () => [
|
|
260
|
+
l("a", {
|
|
260
261
|
...this.getAttrs(),
|
|
261
262
|
key: "main-hide",
|
|
262
|
-
name: this.props.name
|
|
263
|
+
name: this.props.name,
|
|
264
|
+
...a.hidden()
|
|
263
265
|
})
|
|
264
266
|
]);
|
|
265
267
|
/**
|
|
@@ -267,7 +269,7 @@ class Q extends x {
|
|
|
267
269
|
*
|
|
268
270
|
* Рендеринг иконки, если она задана.
|
|
269
271
|
*/
|
|
270
|
-
|
|
272
|
+
i(this, "renderIcon", () => this.item.icon.is() ? this.components.render(
|
|
271
273
|
"icon",
|
|
272
274
|
this.item.icon.binds.value
|
|
273
275
|
) : []);
|
|
@@ -276,7 +278,7 @@ class Q extends x {
|
|
|
276
278
|
*
|
|
277
279
|
* Рендеринг дочерних элементов.
|
|
278
280
|
*/
|
|
279
|
-
|
|
281
|
+
i(this, "renderChildren", () => {
|
|
280
282
|
const t = [];
|
|
281
283
|
return this.props.hide || t.push(
|
|
282
284
|
...this.renderIcon(),
|
|
@@ -345,14 +347,15 @@ class Q extends x {
|
|
|
345
347
|
onClick: this.item.event.onClick,
|
|
346
348
|
tabindex: 0
|
|
347
349
|
};
|
|
348
|
-
return this.props.isCopy
|
|
350
|
+
return this.props.isCopy ? t : {
|
|
351
|
+
...t,
|
|
349
352
|
href: this.item.href.get(),
|
|
350
|
-
|
|
351
|
-
}
|
|
353
|
+
...a.current("page")
|
|
354
|
+
};
|
|
352
355
|
}
|
|
353
356
|
}
|
|
354
357
|
export {
|
|
355
358
|
E as Anchor,
|
|
356
359
|
Q as AnchorDesign,
|
|
357
|
-
|
|
360
|
+
O as defaultsAnchor
|
|
358
361
|
};
|
package/dist/arrow.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (n, t, e) =>
|
|
4
|
-
import { ref as u, watch as c, computed as l, onMounted as
|
|
5
|
-
import { isFilled as
|
|
6
|
-
import { A as
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var A = (n, t, e) => t in n ? I(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var s = (n, t, e) => A(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ref as u, watch as c, computed as l, onMounted as B, nextTick as f, onUnmounted as S, h as d } from "vue";
|
|
5
|
+
import { isFilled as w, isDomRuntime as p, isString as N, toNumber as E, EventRef as v, EventItem as P, DesignConstructorAbstract as C } from "@dxtmisha/functional";
|
|
6
|
+
import { A as k } from "./AriaStaticInclude-CAURwJMb.js";
|
|
7
7
|
import { A as Y } from "./ArrowInclude-CcpT637l.js";
|
|
8
8
|
class H {
|
|
9
9
|
/**
|
|
@@ -152,8 +152,8 @@ class L {
|
|
|
152
152
|
initElement() {
|
|
153
153
|
var e;
|
|
154
154
|
const t = this.props.elementTarget;
|
|
155
|
-
if (this.props.position === "auto" &&
|
|
156
|
-
return
|
|
155
|
+
if (this.props.position === "auto" && w(t) && p())
|
|
156
|
+
return N(t) ? (e = document.querySelector(t)) != null ? e : void 0 : t;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
class M {
|
|
@@ -222,7 +222,7 @@ class M {
|
|
|
222
222
|
* Получить ширину границы в виде числа.
|
|
223
223
|
*/
|
|
224
224
|
getBorderRadius() {
|
|
225
|
-
return
|
|
225
|
+
return E(this.borderRadius.value);
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Get computed styles of the parent element.
|
|
@@ -338,24 +338,24 @@ class O {
|
|
|
338
338
|
const t = this.elementItem.getRectBorder(), e = this.elementItem.getRectArrowLine();
|
|
339
339
|
if (t && e) {
|
|
340
340
|
const i = `M0,0 L0,${t.height} L${t.width},${t.height} L${t.width},0 Z`;
|
|
341
|
-
let r,
|
|
341
|
+
let r, a, h, m;
|
|
342
342
|
switch (this.direction.value) {
|
|
343
343
|
case o.TOP:
|
|
344
|
-
r = e.left - t.left,
|
|
344
|
+
r = e.left - t.left, a = 0, h = r + e.width, m = e.height;
|
|
345
345
|
break;
|
|
346
346
|
case o.BOTTOM:
|
|
347
|
-
r = e.left - t.left,
|
|
347
|
+
r = e.left - t.left, a = t.height - e.height, h = r + e.width, m = t.height;
|
|
348
348
|
break;
|
|
349
349
|
case o.LEFT:
|
|
350
|
-
r = 0,
|
|
350
|
+
r = 0, a = e.top - t.top, h = e.width, m = a + e.height;
|
|
351
351
|
break;
|
|
352
352
|
case o.RIGHT:
|
|
353
|
-
r = t.width - e.width,
|
|
353
|
+
r = t.width - e.width, a = e.top - t.top, h = t.width, m = a + e.height;
|
|
354
354
|
break;
|
|
355
355
|
default:
|
|
356
356
|
return;
|
|
357
357
|
}
|
|
358
|
-
const g = `M${r},${
|
|
358
|
+
const g = `M${r},${a} L${h},${a} L${h},${m} L${r},${m} Z`;
|
|
359
359
|
return `path('${i} ${g}')`;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
@@ -370,7 +370,7 @@ class W {
|
|
|
370
370
|
* @param parent parent object / объект родителя
|
|
371
371
|
* @param position position object / объект позиции
|
|
372
372
|
*/
|
|
373
|
-
constructor(t, e, i, r,
|
|
373
|
+
constructor(t, e, i, r, a, h) {
|
|
374
374
|
s(this, "eventItem");
|
|
375
375
|
s(this, "eventTarget");
|
|
376
376
|
s(this, "eventBody");
|
|
@@ -392,9 +392,9 @@ class W {
|
|
|
392
392
|
s(this, "makeEvents", () => {
|
|
393
393
|
this.elementTarget.is() ? this.initEvents().startEvents() : this.stopEvents();
|
|
394
394
|
});
|
|
395
|
-
this.props = t, this.refs = e, this.element = i, this.elementTarget = r, this.parent =
|
|
396
|
-
await
|
|
397
|
-
}),
|
|
395
|
+
this.props = t, this.refs = e, this.element = i, this.elementTarget = r, this.parent = a, this.position = h, p() && (B(async () => {
|
|
396
|
+
await f(), c(this.elementTarget.element, this.makeEvents), c([...Object.values(this.refs)], this.update, { immediate: !0 });
|
|
397
|
+
}), S(() => {
|
|
398
398
|
this.stopEvents();
|
|
399
399
|
}));
|
|
400
400
|
}
|
|
@@ -422,7 +422,7 @@ class W {
|
|
|
422
422
|
* Инициализировать события.
|
|
423
423
|
*/
|
|
424
424
|
initEvents() {
|
|
425
|
-
return this.eventItem || (this.eventItem = new
|
|
425
|
+
return this.eventItem || (this.eventItem = new v(this.element, void 0, "resize", this.update)), this.eventTarget || (this.eventTarget = new v(this.elementTarget.element, void 0, "resize", this.update)), this.eventBody || (this.eventBody = new P(window, ["scroll", "resize"], this.update)), this;
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
class x {
|
|
@@ -442,7 +442,7 @@ class x {
|
|
|
442
442
|
* @param ArrowPositionConstructor class for working with the position of the arrow/ класс для работы с позицией стрелки
|
|
443
443
|
* @param ArrowEventConstructor class for working with arrow events/ класс для работы с событиями стрелки
|
|
444
444
|
*/
|
|
445
|
-
constructor(t, e, i, r,
|
|
445
|
+
constructor(t, e, i, r, a, h, m, g, b = H, T = L, y = M, $ = O, R = W) {
|
|
446
446
|
s(this, "elementItem");
|
|
447
447
|
s(this, "elementTarget");
|
|
448
448
|
s(this, "parent");
|
|
@@ -450,7 +450,7 @@ class x {
|
|
|
450
450
|
s(this, "event");
|
|
451
451
|
/** Direction of the arrow/ Направление стрелки */
|
|
452
452
|
s(this, "direction", l(() => {
|
|
453
|
-
if (
|
|
453
|
+
if (w(this.props.position)) {
|
|
454
454
|
const t = this.position.direction.value;
|
|
455
455
|
if (t)
|
|
456
456
|
return t;
|
|
@@ -471,19 +471,19 @@ class x {
|
|
|
471
471
|
};
|
|
472
472
|
return this.parent.isBorder.value && this.position.clipPath.value && (t[`--${this.className}-sys-clipPath`] = this.position.clipPath.value), this.elementTarget.is() && this.position.shift.value && (t[`--${this.className}-sys-shift`] = this.position.shift.value), t;
|
|
473
473
|
}));
|
|
474
|
-
this.props = t, this.refs = e, this.element = i, this.classDesign = r, this.className =
|
|
474
|
+
this.props = t, this.refs = e, this.element = i, this.classDesign = r, this.className = a, this.components = h, this.slots = m, this.emits = g, this.elementItem = new b(
|
|
475
475
|
this.element,
|
|
476
476
|
this.className
|
|
477
|
-
), this.elementTarget = new
|
|
477
|
+
), this.elementTarget = new T(this.props), this.parent = new y(
|
|
478
478
|
this.element,
|
|
479
479
|
this.className,
|
|
480
480
|
this.elementItem
|
|
481
|
-
), this.position = new
|
|
481
|
+
), this.position = new $(
|
|
482
482
|
this.props,
|
|
483
483
|
this.elementItem,
|
|
484
484
|
this.elementTarget,
|
|
485
485
|
this.parent
|
|
486
|
-
), this.event = new
|
|
486
|
+
), this.event = new R(
|
|
487
487
|
this.props,
|
|
488
488
|
this.refs,
|
|
489
489
|
this.element,
|
|
@@ -497,7 +497,7 @@ const D = {
|
|
|
497
497
|
// :default [!] System label / Системная метка
|
|
498
498
|
position: "auto"
|
|
499
499
|
};
|
|
500
|
-
class G extends
|
|
500
|
+
class G extends C {
|
|
501
501
|
/**
|
|
502
502
|
* Constructor
|
|
503
503
|
* @param name class name/ название класса
|
|
@@ -505,7 +505,7 @@ class G extends k {
|
|
|
505
505
|
* @param options list of additional parameters/ список дополнительных параметров
|
|
506
506
|
* @param ItemConstructor arrow item class/ класс элемента стрелки
|
|
507
507
|
*/
|
|
508
|
-
constructor(e, i, r,
|
|
508
|
+
constructor(e, i, r, a = x) {
|
|
509
509
|
super(
|
|
510
510
|
e,
|
|
511
511
|
i,
|
|
@@ -531,7 +531,7 @@ class G extends k {
|
|
|
531
531
|
return `0, ${i} ${e / 2}, 0 ${e}, ${i}`;
|
|
532
532
|
}
|
|
533
533
|
});
|
|
534
|
-
this.item = new
|
|
534
|
+
this.item = new a(
|
|
535
535
|
this.props,
|
|
536
536
|
this.refs,
|
|
537
537
|
this.element,
|
|
@@ -541,7 +541,7 @@ class G extends k {
|
|
|
541
541
|
this.slots,
|
|
542
542
|
this.emits
|
|
543
543
|
), this.init(), c([this.classes], () => {
|
|
544
|
-
|
|
544
|
+
f().then(
|
|
545
545
|
() => requestAnimationFrame(() => {
|
|
546
546
|
this.points.value = this.getRePoints();
|
|
547
547
|
})
|
|
@@ -603,7 +603,7 @@ class G extends k {
|
|
|
603
603
|
ref: this.element,
|
|
604
604
|
class: (i = this.classes) == null ? void 0 : i.value.main,
|
|
605
605
|
style: (r = this.styles) == null ? void 0 : r.value,
|
|
606
|
-
|
|
606
|
+
...k.hidden()
|
|
607
607
|
}, e);
|
|
608
608
|
}
|
|
609
609
|
/**
|
|
@@ -651,8 +651,7 @@ class G extends k {
|
|
|
651
651
|
return [
|
|
652
652
|
d("div", {
|
|
653
653
|
key: "border",
|
|
654
|
-
class: (e = this.classes) == null ? void 0 : e.value.border
|
|
655
|
-
...$.hidden()
|
|
654
|
+
class: (e = this.classes) == null ? void 0 : e.value.border
|
|
656
655
|
})
|
|
657
656
|
];
|
|
658
657
|
}
|
package/dist/badge.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { computed as
|
|
5
|
-
import { isFilled as c, DesignConstructorAbstract as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
class
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var g = (i, t, s) => t in i ? b(i, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[t] = s;
|
|
3
|
+
var e = (i, t, s) => g(i, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { computed as l, h as f } from "vue";
|
|
5
|
+
import { isFilled as c, DesignConstructorAbstract as v } from "@dxtmisha/functional";
|
|
6
|
+
import { A as u } from "./AriaStaticInclude-CAURwJMb.js";
|
|
7
|
+
import { L as I } from "./LabelNumberInclude-Cn0qDEgX.js";
|
|
8
|
+
import { I as A } from "./IconInclude-CLqwI29Q.js";
|
|
9
|
+
class C {
|
|
10
10
|
/**
|
|
11
11
|
* Constructor
|
|
12
12
|
* @param props input data/ входные данные
|
|
@@ -17,16 +17,18 @@ class I {
|
|
|
17
17
|
* @param components object for working with components/ объект для работы с компонентами
|
|
18
18
|
* @param slots object for working with slots/ объект для работы со слотами
|
|
19
19
|
* @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
|
|
20
|
+
* @param LabelNumberIncludeConstructor class for working with label/ класс для работы с меткой
|
|
21
|
+
* @param IconIncludeConstructor class for working with icon/ класс для работы с иконкой
|
|
20
22
|
*/
|
|
21
|
-
constructor(t, s,
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
constructor(t, s, r, n, a, o, h, m, d = I, p = A) {
|
|
24
|
+
e(this, "label");
|
|
25
|
+
e(this, "icon");
|
|
24
26
|
/**
|
|
25
27
|
* Computes if the badge should auto-hide when there is no dot, icon, or label.
|
|
26
28
|
*
|
|
27
29
|
* Вычисляет, должен ли бейдж автоматически скрываться, если нет точки, иконки и текста.
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
e(this, "autoHide", l(
|
|
30
32
|
() => !this.props.dot && !c(this.icon.isIcon.value) && !c(this.label.is.value)
|
|
31
33
|
));
|
|
32
34
|
/**
|
|
@@ -34,42 +36,46 @@ class I {
|
|
|
34
36
|
*
|
|
35
37
|
* Классы для управления видимостью бейджа.
|
|
36
38
|
*/
|
|
37
|
-
|
|
39
|
+
e(this, "classes", l(() => ({
|
|
38
40
|
[`${this.className}--hideAuto`]: this.autoHide.value
|
|
39
41
|
})));
|
|
40
|
-
this
|
|
42
|
+
e(this, "aria", l(() => this.props.ariaLabel ? {
|
|
43
|
+
...u.hidden()
|
|
44
|
+
} : {}));
|
|
45
|
+
this.props = t, this.refs = s, this.element = r, this.classDesign = n, this.className = a, this.components = o, this.slots = h, this.emits = m, this.label = new d(
|
|
41
46
|
t,
|
|
42
|
-
|
|
47
|
+
a,
|
|
43
48
|
void 0,
|
|
44
|
-
|
|
45
|
-
), this.icon = new
|
|
49
|
+
h
|
|
50
|
+
), this.icon = new p(
|
|
46
51
|
t,
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
a,
|
|
53
|
+
o
|
|
49
54
|
);
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
|
-
const
|
|
57
|
+
const H = {
|
|
53
58
|
// :default [!] System label / Системная метка
|
|
54
59
|
overlap: "rectangular",
|
|
55
60
|
vertical: "top",
|
|
56
61
|
horizontal: "right"
|
|
57
62
|
};
|
|
58
|
-
class
|
|
63
|
+
class N extends v {
|
|
59
64
|
/**
|
|
60
65
|
* Constructor
|
|
61
66
|
* @param name class name/ название класса
|
|
62
67
|
* @param props properties/ свойства
|
|
63
68
|
* @param options list of additional parameters/ список дополнительных параметров
|
|
69
|
+
* @param ItemConstructor class for working with the item/ класс для работы с элементом
|
|
64
70
|
*/
|
|
65
|
-
constructor(s,
|
|
71
|
+
constructor(s, r, n, a = C) {
|
|
66
72
|
super(
|
|
67
73
|
s,
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
r,
|
|
75
|
+
n
|
|
70
76
|
);
|
|
71
|
-
|
|
72
|
-
this.item = new
|
|
77
|
+
e(this, "item");
|
|
78
|
+
this.item = new a(
|
|
73
79
|
this.props,
|
|
74
80
|
this.refs,
|
|
75
81
|
this.element,
|
|
@@ -115,22 +121,21 @@ class L extends b {
|
|
|
115
121
|
* Метод для рендеринга.
|
|
116
122
|
*/
|
|
117
123
|
initRender() {
|
|
118
|
-
var
|
|
124
|
+
var r;
|
|
119
125
|
const s = [];
|
|
120
126
|
return this.props.dot || s.push(
|
|
121
|
-
...this.item.label.render(),
|
|
127
|
+
...this.item.label.render(void 0, this.item.aria.value),
|
|
122
128
|
...this.item.icon.renderIcon()
|
|
123
|
-
),
|
|
129
|
+
), f("span", {
|
|
124
130
|
...this.getAttrs(),
|
|
125
131
|
ref: this.element,
|
|
126
|
-
class: (
|
|
127
|
-
...u.role("status"),
|
|
132
|
+
class: (r = this.classes) == null ? void 0 : r.value.main,
|
|
128
133
|
...u.label(this.props.ariaLabel)
|
|
129
134
|
}, s);
|
|
130
135
|
}
|
|
131
136
|
}
|
|
132
137
|
export {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
138
|
+
C as Badge,
|
|
139
|
+
N as BadgeDesign,
|
|
140
|
+
H as defaultsBadge
|
|
136
141
|
};
|