@dxtmisha/constructor 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +136 -0
- package/package.json +124 -0
- package/src/classes/CaptionInclude.ts +71 -0
- package/src/classes/DescriptionInclude.ts +70 -0
- package/src/classes/EnabledInclude.ts +56 -0
- package/src/classes/EventClickInclude.ts +138 -0
- package/src/classes/LabelHighlightInclude.ts +90 -0
- package/src/classes/LabelInclude.ts +171 -0
- package/src/classes/LabelNumberInclude.ts +70 -0
- package/src/classes/ModelInclude.ts +49 -0
- package/src/classes/PrefixInclude.ts +71 -0
- package/src/classes/SuffixInclude.ts +71 -0
- package/src/classes/field/FieldAttributesInclude.ts +100 -0
- package/src/classes/field/FieldChangeInclude.ts +52 -0
- package/src/classes/field/FieldCodeInclude.ts +69 -0
- package/src/classes/field/FieldElementInclude.ts +97 -0
- package/src/classes/field/FieldInputCheckInclude.ts +128 -0
- package/src/classes/field/FieldMatchInclude.ts +101 -0
- package/src/classes/field/FieldPatternInclude.ts +42 -0
- package/src/classes/field/FieldTypeInclude.ts +42 -0
- package/src/classes/field/FieldValidationInclude.ts +196 -0
- package/src/classes/field/FieldValueInclude.ts +318 -0
- package/src/classes/field/FieldVisibilityInclude.ts +21 -0
- package/src/constructors/Badge/Badge.ts +73 -0
- package/src/constructors/Badge/BadgeDesign.tsx +127 -0
- package/src/constructors/Badge/BadgeInclude.ts +78 -0
- package/src/constructors/Badge/basicTypes.ts +15 -0
- package/src/constructors/Badge/index.ts +5 -0
- package/src/constructors/Badge/properties.json +36 -0
- package/src/constructors/Badge/props.ts +43 -0
- package/src/constructors/Badge/style.scss +83 -0
- package/src/constructors/Badge/types.ts +47 -0
- package/src/constructors/Bars/Bars.ts +188 -0
- package/src/constructors/Bars/BarsAction.ts +57 -0
- package/src/constructors/Bars/BarsDesign.tsx +229 -0
- package/src/constructors/Bars/BarsInclude.ts +116 -0
- package/src/constructors/Bars/basicTypes.ts +40 -0
- package/src/constructors/Bars/index.ts +6 -0
- package/src/constructors/Bars/properties.json +6 -0
- package/src/constructors/Bars/props.ts +63 -0
- package/src/constructors/Bars/style.scss +18 -0
- package/src/constructors/Bars/types.ts +58 -0
- package/src/constructors/Button/Button.ts +88 -0
- package/src/constructors/Button/ButtonDesign.tsx +136 -0
- package/src/constructors/Button/ButtonInclude.ts +80 -0
- package/src/constructors/Button/basicTypes.ts +12 -0
- package/src/constructors/Button/index.ts +5 -0
- package/src/constructors/Button/properties.json +84 -0
- package/src/constructors/Button/props.ts +55 -0
- package/src/constructors/Button/style.scss +96 -0
- package/src/constructors/Button/types.ts +56 -0
- package/src/constructors/Cell/Cell.ts +127 -0
- package/src/constructors/Cell/CellDesign.tsx +203 -0
- package/src/constructors/Cell/basicTypes.ts +6 -0
- package/src/constructors/Cell/index.ts +5 -0
- package/src/constructors/Cell/properties.json +52 -0
- package/src/constructors/Cell/props.ts +61 -0
- package/src/constructors/Cell/style.scss +80 -0
- package/src/constructors/Cell/types.ts +68 -0
- package/src/constructors/Chip/Chip.ts +33 -0
- package/src/constructors/Chip/ChipDesign.tsx +26 -0
- package/src/constructors/Chip/basicTypes.ts +0 -0
- package/src/constructors/Chip/index.ts +4 -0
- package/src/constructors/Chip/properties.json +3 -0
- package/src/constructors/Chip/props.ts +44 -0
- package/src/constructors/Chip/style.scss +6 -0
- package/src/constructors/Chip/types.ts +53 -0
- package/src/constructors/Field/Field.ts +147 -0
- package/src/constructors/Field/FieldDesign.tsx +372 -0
- package/src/constructors/Field/FieldIcons.ts +99 -0
- package/src/constructors/Field/FieldInclude.ts +72 -0
- package/src/constructors/Field/FieldSize.ts +93 -0
- package/src/constructors/Field/basicTypes.ts +90 -0
- package/src/constructors/Field/index.ts +5 -0
- package/src/constructors/Field/properties.json +86 -0
- package/src/constructors/Field/props.ts +88 -0
- package/src/constructors/Field/style.scss +556 -0
- package/src/constructors/Field/types.ts +78 -0
- package/src/constructors/FieldCounter/FieldCounter.ts +75 -0
- package/src/constructors/FieldCounter/FieldCounterDesign.tsx +122 -0
- package/src/constructors/FieldCounter/FieldCounterInclude.ts +98 -0
- package/src/constructors/FieldCounter/basicTypes.ts +25 -0
- package/src/constructors/FieldCounter/index.ts +6 -0
- package/src/constructors/FieldCounter/properties.json +3 -0
- package/src/constructors/FieldCounter/props.ts +32 -0
- package/src/constructors/FieldCounter/style.scss +4 -0
- package/src/constructors/FieldCounter/types.ts +42 -0
- package/src/constructors/FieldLabel/FieldLabel.ts +93 -0
- package/src/constructors/FieldLabel/FieldLabelDesign.tsx +156 -0
- package/src/constructors/FieldLabel/FieldLabelInclude.ts +91 -0
- package/src/constructors/FieldLabel/basicTypes.ts +34 -0
- package/src/constructors/FieldLabel/index.ts +6 -0
- package/src/constructors/FieldLabel/properties.json +4 -0
- package/src/constructors/FieldLabel/props.ts +40 -0
- package/src/constructors/FieldLabel/style.scss +10 -0
- package/src/constructors/FieldLabel/types.ts +49 -0
- package/src/constructors/FieldMessage/FieldMessage.ts +79 -0
- package/src/constructors/FieldMessage/FieldMessageDesign.tsx +159 -0
- package/src/constructors/FieldMessage/FieldMessageInclude.ts +105 -0
- package/src/constructors/FieldMessage/FieldMessageMessage.ts +54 -0
- package/src/constructors/FieldMessage/basicTypes.ts +27 -0
- package/src/constructors/FieldMessage/index.ts +6 -0
- package/src/constructors/FieldMessage/properties.json +9 -0
- package/src/constructors/FieldMessage/props.ts +40 -0
- package/src/constructors/FieldMessage/style.scss +13 -0
- package/src/constructors/FieldMessage/types.ts +49 -0
- package/src/constructors/Icon/Icon.ts +105 -0
- package/src/constructors/Icon/IconDesign.tsx +157 -0
- package/src/constructors/Icon/IconInclude.ts +64 -0
- package/src/constructors/Icon/IconLiteInclude.ts +121 -0
- package/src/constructors/Icon/IconTrailingInclude.ts +106 -0
- package/src/constructors/Icon/basicTypes.ts +50 -0
- package/src/constructors/Icon/index.ts +8 -0
- package/src/constructors/Icon/properties.json +25 -0
- package/src/constructors/Icon/props.ts +54 -0
- package/src/constructors/Icon/style.scss +106 -0
- package/src/constructors/Icon/types.ts +46 -0
- package/src/constructors/Image/Image.ts +184 -0
- package/src/constructors/Image/ImageAdaptiveGroup.ts +230 -0
- package/src/constructors/Image/ImageAdaptiveItem.ts +295 -0
- package/src/constructors/Image/ImageBackground.ts +127 -0
- package/src/constructors/Image/ImageCalculation.ts +184 -0
- package/src/constructors/Image/ImageCalculationList.ts +61 -0
- package/src/constructors/Image/ImageCoordinator.ts +104 -0
- package/src/constructors/Image/ImageData.ts +99 -0
- package/src/constructors/Image/ImageDesign.tsx +137 -0
- package/src/constructors/Image/ImageFile.ts +137 -0
- package/src/constructors/Image/ImageInclude.ts +53 -0
- package/src/constructors/Image/ImagePdf.ts +44 -0
- package/src/constructors/Image/ImagePosition.ts +49 -0
- package/src/constructors/Image/ImageType.ts +83 -0
- package/src/constructors/Image/basicTypes.ts +70 -0
- package/src/constructors/Image/index.ts +5 -0
- package/src/constructors/Image/properties.json +17 -0
- package/src/constructors/Image/props.ts +66 -0
- package/src/constructors/Image/style.scss +77 -0
- package/src/constructors/Image/types.ts +49 -0
- package/src/constructors/List/List.ts +267 -0
- package/src/constructors/List/ListControl.ts +194 -0
- package/src/constructors/List/ListDesign.tsx +382 -0
- package/src/constructors/List/ListFocus.ts +196 -0
- package/src/constructors/List/ListGo.ts +283 -0
- package/src/constructors/List/ListSearch.ts +113 -0
- package/src/constructors/List/basicTypes.ts +3 -0
- package/src/constructors/List/index.ts +5 -0
- package/src/constructors/List/properties.json +16 -0
- package/src/constructors/List/props.ts +76 -0
- package/src/constructors/List/style.scss +36 -0
- package/src/constructors/List/types.ts +66 -0
- package/src/constructors/ListGroup/ListGroup.ts +53 -0
- package/src/constructors/ListGroup/ListGroupDesign.tsx +180 -0
- package/src/constructors/ListGroup/ListGroupOpen.ts +56 -0
- package/src/constructors/ListGroup/basicTypes.ts +3 -0
- package/src/constructors/ListGroup/index.ts +5 -0
- package/src/constructors/ListGroup/properties.json +15 -0
- package/src/constructors/ListGroup/props.ts +30 -0
- package/src/constructors/ListGroup/style.scss +18 -0
- package/src/constructors/ListGroup/types.ts +51 -0
- package/src/constructors/ListItem/ListItem.ts +115 -0
- package/src/constructors/ListItem/ListItemDesign.tsx +196 -0
- package/src/constructors/ListItem/basicTypes.ts +3 -0
- package/src/constructors/ListItem/index.ts +5 -0
- package/src/constructors/ListItem/properties.json +52 -0
- package/src/constructors/ListItem/props.ts +78 -0
- package/src/constructors/ListItem/style.scss +152 -0
- package/src/constructors/ListItem/types.ts +78 -0
- package/src/constructors/ListMenu/ListMenu.ts +52 -0
- package/src/constructors/ListMenu/ListMenuDesign.tsx +127 -0
- package/src/constructors/ListMenu/basicTypes.ts +3 -0
- package/src/constructors/ListMenu/index.ts +5 -0
- package/src/constructors/ListMenu/properties.json +19 -0
- package/src/constructors/ListMenu/props.ts +34 -0
- package/src/constructors/ListMenu/style.scss +5 -0
- package/src/constructors/ListMenu/types.ts +54 -0
- package/src/constructors/Mask/Mask.ts +321 -0
- package/src/constructors/Mask/MaskBuffer.ts +89 -0
- package/src/constructors/Mask/MaskCharacter.ts +192 -0
- package/src/constructors/Mask/MaskCharacterLength.ts +40 -0
- package/src/constructors/Mask/MaskData.ts +287 -0
- package/src/constructors/Mask/MaskDate.ts +157 -0
- package/src/constructors/Mask/MaskDesign.tsx +217 -0
- package/src/constructors/Mask/MaskEmit.ts +140 -0
- package/src/constructors/Mask/MaskEvent.ts +347 -0
- package/src/constructors/Mask/MaskFocus.ts +49 -0
- package/src/constructors/Mask/MaskFormat.ts +216 -0
- package/src/constructors/Mask/MaskItem.ts +218 -0
- package/src/constructors/Mask/MaskMatch.ts +73 -0
- package/src/constructors/Mask/MaskPattern.ts +123 -0
- package/src/constructors/Mask/MaskRight.ts +43 -0
- package/src/constructors/Mask/MaskRubber.ts +156 -0
- package/src/constructors/Mask/MaskRubberItem.ts +96 -0
- package/src/constructors/Mask/MaskRubberTransition.ts +50 -0
- package/src/constructors/Mask/MaskSelection.ts +208 -0
- package/src/constructors/Mask/MaskSpecial.ts +179 -0
- package/src/constructors/Mask/MaskType.ts +103 -0
- package/src/constructors/Mask/MaskValidation.ts +102 -0
- package/src/constructors/Mask/MaskValue.ts +225 -0
- package/src/constructors/Mask/MaskValueBasic.ts +87 -0
- package/src/constructors/Mask/MaskView.ts +169 -0
- package/src/constructors/Mask/basicTypes.ts +49 -0
- package/src/constructors/Mask/index.ts +5 -0
- package/src/constructors/Mask/properties.json +29 -0
- package/src/constructors/Mask/props.ts +70 -0
- package/src/constructors/Mask/style.scss +104 -0
- package/src/constructors/Mask/types.ts +71 -0
- package/src/constructors/Menu/Menu.ts +179 -0
- package/src/constructors/Menu/MenuDesign.tsx +244 -0
- package/src/constructors/Menu/MenuInclude.ts +110 -0
- package/src/constructors/Menu/MenuRequest.ts +101 -0
- package/src/constructors/Menu/MenuSearch.ts +49 -0
- package/src/constructors/Menu/MenuValue.ts +73 -0
- package/src/constructors/Menu/MenuWindow.ts +89 -0
- package/src/constructors/Menu/basicTypes.ts +41 -0
- package/src/constructors/Menu/index.ts +6 -0
- package/src/constructors/Menu/properties.json +17 -0
- package/src/constructors/Menu/props.ts +79 -0
- package/src/constructors/Menu/style.scss +17 -0
- package/src/constructors/Menu/types.ts +79 -0
- package/src/constructors/MotionTransform/MotionTransform.ts +87 -0
- package/src/constructors/MotionTransform/MotionTransformClassesInclude.ts +38 -0
- package/src/constructors/MotionTransform/MotionTransformDesign.tsx +242 -0
- package/src/constructors/MotionTransform/MotionTransformElement.ts +220 -0
- package/src/constructors/MotionTransform/MotionTransformEvent.ts +118 -0
- package/src/constructors/MotionTransform/MotionTransformGo.ts +47 -0
- package/src/constructors/MotionTransform/MotionTransformInclude.ts +123 -0
- package/src/constructors/MotionTransform/MotionTransformSize.ts +97 -0
- package/src/constructors/MotionTransform/MotionTransformState.ts +250 -0
- package/src/constructors/MotionTransform/basicTypes.ts +121 -0
- package/src/constructors/MotionTransform/index.ts +7 -0
- package/src/constructors/MotionTransform/properties.json +35 -0
- package/src/constructors/MotionTransform/props.ts +50 -0
- package/src/constructors/MotionTransform/style.scss +180 -0
- package/src/constructors/MotionTransform/types.ts +86 -0
- package/src/constructors/Progress/Progress.ts +184 -0
- package/src/constructors/Progress/ProgressDesign.tsx +175 -0
- package/src/constructors/Progress/ProgressInclude.ts +67 -0
- package/src/constructors/Progress/basicTypes.ts +12 -0
- package/src/constructors/Progress/index.ts +6 -0
- package/src/constructors/Progress/properties.json +47 -0
- package/src/constructors/Progress/props.ts +54 -0
- package/src/constructors/Progress/style.scss +374 -0
- package/src/constructors/Progress/types.ts +43 -0
- package/src/constructors/Ripple/Ripple.ts +46 -0
- package/src/constructors/Ripple/RippleDesign.tsx +112 -0
- package/src/constructors/Ripple/RippleInclude.ts +39 -0
- package/src/constructors/Ripple/RippleItem.ts +62 -0
- package/src/constructors/Ripple/basicTypes.ts +3 -0
- package/src/constructors/Ripple/index.ts +6 -0
- package/src/constructors/Ripple/properties.json +9 -0
- package/src/constructors/Ripple/props.ts +28 -0
- package/src/constructors/Ripple/style.scss +62 -0
- package/src/constructors/Ripple/types.ts +41 -0
- package/src/constructors/Scrollbar/Scrollbar.ts +66 -0
- package/src/constructors/Scrollbar/ScrollbarBorder.ts +243 -0
- package/src/constructors/Scrollbar/ScrollbarDesign.tsx +126 -0
- package/src/constructors/Scrollbar/ScrollbarInclude.ts +80 -0
- package/src/constructors/Scrollbar/basicTypes.ts +42 -0
- package/src/constructors/Scrollbar/index.ts +5 -0
- package/src/constructors/Scrollbar/properties.json +33 -0
- package/src/constructors/Scrollbar/props.ts +37 -0
- package/src/constructors/Scrollbar/style.scss +117 -0
- package/src/constructors/Scrollbar/types.ts +52 -0
- package/src/constructors/Skeleton/Skeleton.ts +86 -0
- package/src/constructors/Skeleton/SkeletonDesign.tsx +117 -0
- package/src/constructors/Skeleton/SkeletonInclude.ts +61 -0
- package/src/constructors/Skeleton/basicTypes.ts +16 -0
- package/src/constructors/Skeleton/const.ts +1 -0
- package/src/constructors/Skeleton/index.ts +6 -0
- package/src/constructors/Skeleton/properties.json +24 -0
- package/src/constructors/Skeleton/props.ts +28 -0
- package/src/constructors/Skeleton/style.scss +112 -0
- package/src/constructors/Skeleton/types.ts +46 -0
- package/src/constructors/Window/Window.ts +212 -0
- package/src/constructors/Window/WindowClasses.ts +180 -0
- package/src/constructors/Window/WindowClassesInclude.ts +39 -0
- package/src/constructors/Window/WindowClient.ts +93 -0
- package/src/constructors/Window/WindowCoordinates.ts +257 -0
- package/src/constructors/Window/WindowDesign.tsx +278 -0
- package/src/constructors/Window/WindowElement.ts +84 -0
- package/src/constructors/Window/WindowEmit.ts +52 -0
- package/src/constructors/Window/WindowEvent.ts +157 -0
- package/src/constructors/Window/WindowFlash.ts +70 -0
- package/src/constructors/Window/WindowHook.ts +110 -0
- package/src/constructors/Window/WindowInclude.ts +134 -0
- package/src/constructors/Window/WindowOpen.ts +292 -0
- package/src/constructors/Window/WindowOrigin.ts +85 -0
- package/src/constructors/Window/WindowPersistent.ts +89 -0
- package/src/constructors/Window/WindowPosition.ts +358 -0
- package/src/constructors/Window/WindowStatic.ts +102 -0
- package/src/constructors/Window/WindowStatus.ts +138 -0
- package/src/constructors/Window/WindowStyles.ts +78 -0
- package/src/constructors/Window/WindowVerification.ts +287 -0
- package/src/constructors/Window/basicTypes.ts +186 -0
- package/src/constructors/Window/index.ts +7 -0
- package/src/constructors/Window/properties.json +236 -0
- package/src/constructors/Window/props.ts +88 -0
- package/src/constructors/Window/style.scss +262 -0
- package/src/constructors/Window/types.ts +124 -0
- package/src/functions/getClassTegAStatic.ts +8 -0
- package/src/library.ts +36 -0
- package/src/types/captionTypes.ts +15 -0
- package/src/types/descriptionTypes.ts +15 -0
- package/src/types/enabledTypes.ts +9 -0
- package/src/types/eventClickTypes.ts +51 -0
- package/src/types/fieldTypes.ts +282 -0
- package/src/types/labelTypes.ts +30 -0
- package/src/types/modelTypes.ts +23 -0
- package/src/types/prefixTypes.ts +15 -0
- package/src/types/suffixTypes.ts +15 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
@use "@dxtmisha/styles/properties" as ui;
|
|
2
|
+
|
|
3
|
+
@mixin mixinProgress {
|
|
4
|
+
@include ui.initByCustom('palette', ui.v('??sys.color', ui.v('sys-palette-var', ui.v('??backgroundColor'))));
|
|
5
|
+
@include ui.initByCustom('opacity', ui.v('??sys.opacity', .1));
|
|
6
|
+
@include ui.initByCustom('transitionDuration', 20s);
|
|
7
|
+
|
|
8
|
+
display: none;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
position: absolute;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
z-index: 16;
|
|
13
|
+
|
|
14
|
+
transition-property: background-color;
|
|
15
|
+
animation-fill-mode: forwards;
|
|
16
|
+
|
|
17
|
+
appearance: none;
|
|
18
|
+
|
|
19
|
+
&__circle,
|
|
20
|
+
&__circleSub {
|
|
21
|
+
transition-property: background-color, stroke-dasharray;
|
|
22
|
+
|
|
23
|
+
fill: transparent;
|
|
24
|
+
stroke-dasharray: 1, 200;
|
|
25
|
+
stroke-dashoffset: 0;
|
|
26
|
+
stroke-linecap: round;
|
|
27
|
+
stroke-opacity: 1;
|
|
28
|
+
stroke-width: ui.v('??height');
|
|
29
|
+
@include ui.stroke(ui.v('??palette'));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__point {
|
|
33
|
+
position: absolute;
|
|
34
|
+
right: 0;
|
|
35
|
+
|
|
36
|
+
width: ui.v('??height');
|
|
37
|
+
height: ui.v('??height');
|
|
38
|
+
|
|
39
|
+
@include ui.backgroundColor(ui.v('??palette'), 1);
|
|
40
|
+
border-radius: ui.v('??borderRadius');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&--visible,
|
|
44
|
+
&--hide,
|
|
45
|
+
&--value {
|
|
46
|
+
display: block;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--visible {
|
|
50
|
+
transition-duration: ui.v('d.sys.transitionDuration.fade.enter');
|
|
51
|
+
animation-duration: ui.v('d.sys.transitionDuration.fade.enter');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--hide {
|
|
55
|
+
transition-duration: ui.v('d.sys.transitionDuration.fade.exit');
|
|
56
|
+
animation-duration: ui.v('d.sys.transitionDuration.fade.exit');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--value {
|
|
60
|
+
&::after,
|
|
61
|
+
&::before {
|
|
62
|
+
animation-name: none !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include ui.subclass('circle') {
|
|
66
|
+
animation-name: none !important;
|
|
67
|
+
stroke-dasharray: calc(#{ui.v('??sys.value')} * #{ui.v('??circular.dasharray')}) #{ui.v('??circular.length')} !important;
|
|
68
|
+
stroke-linecap: butt;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&--linear {
|
|
73
|
+
@include ui.paddingX(0);
|
|
74
|
+
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: ui.v('??height');
|
|
77
|
+
|
|
78
|
+
@include ui.backgroundColor(ui.v('??palette'), ui.v('??opacity'));
|
|
79
|
+
|
|
80
|
+
&::after,
|
|
81
|
+
&::before {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
left: 0;
|
|
86
|
+
right: 100%;
|
|
87
|
+
|
|
88
|
+
content: ' ';
|
|
89
|
+
@include ui.backgroundColor(ui.v('??palette'), 1);
|
|
90
|
+
border-radius: ui.v('??borderRadius');
|
|
91
|
+
|
|
92
|
+
transition-property: background-color;
|
|
93
|
+
transition-duration: inherit;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@include ui.state('visible') {
|
|
97
|
+
animation-name: ui.n('??linear-visible');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@include ui.state('hide') {
|
|
101
|
+
animation-name: ui.n('??linear-hidden');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@include ui.state('value') {
|
|
105
|
+
&::after {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&::before {
|
|
110
|
+
right: ui.v('??sys.value');
|
|
111
|
+
transition-property: right;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@include ui.state('position') {
|
|
116
|
+
&--top {
|
|
117
|
+
top: 0;
|
|
118
|
+
transform-origin: top;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&--bottom {
|
|
122
|
+
bottom: 0;
|
|
123
|
+
transform-origin: bottom;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@include ui.state('indeterminate') {
|
|
128
|
+
&--type1 {
|
|
129
|
+
&::after {
|
|
130
|
+
animation-duration: ui.v('??transitionDuration');
|
|
131
|
+
animation-fill-mode: forwards;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@include ui.state('visible') {
|
|
135
|
+
&::after {
|
|
136
|
+
animation-name: #{ui.n('??linear-type1')}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@include ui.state('hide') {
|
|
141
|
+
animation-delay: ui.v('d.sys.transitionDuration.fade.exit');
|
|
142
|
+
|
|
143
|
+
&::after {
|
|
144
|
+
animation-name: #{ui.n('??linear-type1')}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&::before {
|
|
148
|
+
right: 0;
|
|
149
|
+
transition-property: right;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&--type2 {
|
|
155
|
+
&::after {
|
|
156
|
+
animation: #{ui.n('??linear-type3')} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
|
|
157
|
+
animation-delay: 1.15s;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&::before {
|
|
161
|
+
animation: #{ui.n('??linear-type2')} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&--type3 {
|
|
166
|
+
&::after {
|
|
167
|
+
animation: #{ui.n('??linear-type4')} 1.2s linear infinite;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&--circular {
|
|
174
|
+
@include ui.initByCustom('circular.length', #{calc(2 * 3.1415926535 * 20px)});
|
|
175
|
+
@include ui.initByCustom('circular.dasharray', #{calc(ui.v('??circular.length') / 100)});
|
|
176
|
+
|
|
177
|
+
@include ui.inset(ui.v('??inset', 0));
|
|
178
|
+
margin: auto;
|
|
179
|
+
|
|
180
|
+
@include ui.squared(ui.v('??width'));
|
|
181
|
+
max-width: #{calc(100% - 2 * ui.v('??inset', 0))};
|
|
182
|
+
max-height: #{calc(100% - 2 * ui.v('??inset', 0))};
|
|
183
|
+
|
|
184
|
+
@include ui.rotate('-90deg');
|
|
185
|
+
|
|
186
|
+
@include ui.subclass('circleSub') {
|
|
187
|
+
stroke-dasharray: none;
|
|
188
|
+
@include ui.strokeOpacity(ui.v('??opacity'))
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@include ui.state('visible') {
|
|
192
|
+
animation-name: ui.n('??circle-visible');
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@include ui.state('hide') {
|
|
196
|
+
animation-name: ui.n('??circle-hidden');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@include ui.state('dense') {
|
|
200
|
+
@include ui.initByCustom('inset', 0px);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@include ui.state('indeterminate') {
|
|
204
|
+
&--type1 {
|
|
205
|
+
@include ui.subclass('circle') {
|
|
206
|
+
animation-name: ui.n('??circle-type1');
|
|
207
|
+
animation-duration: ui.v('??transitionDuration');
|
|
208
|
+
animation-fill-mode: forwards;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&--type2 {
|
|
213
|
+
@include ui.subclass('circle') {
|
|
214
|
+
transform-origin: center;
|
|
215
|
+
animation: #{ui.n('??circle-type2')} 2s linear infinite, #{ui.n('??circle-type3')} 1.5s ease-in-out infinite;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&--type3 {
|
|
220
|
+
@include ui.subclass('circle') {
|
|
221
|
+
stroke-dasharray: 32, 200;
|
|
222
|
+
stroke-dashoffset: 0;
|
|
223
|
+
transform-origin: center;
|
|
224
|
+
animation: #{ui.n('??circle-type2')} 1.2s linear infinite;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&--position {
|
|
231
|
+
&--static {
|
|
232
|
+
@include ui.initByCustom('width', ui.v('??width-static', var(--sys-line-height)), true);
|
|
233
|
+
|
|
234
|
+
position: relative;
|
|
235
|
+
margin: 0;
|
|
236
|
+
max-height: none;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&--inverse {
|
|
241
|
+
@include ui.initByCustom('palette', ui.v('??sys.color', var(--sys-color, ui.v('??backgroundColor'))));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@keyframes #{ui.n('??linear-visible')} {
|
|
245
|
+
0% {
|
|
246
|
+
transform: scaleY(0)
|
|
247
|
+
}
|
|
248
|
+
100% {
|
|
249
|
+
transform: scaleY(1)
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@keyframes #{ui.n('??linear-hidden')} {
|
|
254
|
+
0% {
|
|
255
|
+
transform: scaleY(1)
|
|
256
|
+
}
|
|
257
|
+
100% {
|
|
258
|
+
transform: scaleY(0)
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@keyframes #{ui.n('??linear-type1')} {
|
|
263
|
+
0% {
|
|
264
|
+
right: 100%
|
|
265
|
+
}
|
|
266
|
+
5% {
|
|
267
|
+
right: 60%
|
|
268
|
+
}
|
|
269
|
+
50% {
|
|
270
|
+
right: 10%
|
|
271
|
+
}
|
|
272
|
+
100% {
|
|
273
|
+
right: 5%
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
@keyframes #{ui.n('??linear-type2')} {
|
|
278
|
+
0% {
|
|
279
|
+
left: -35%;
|
|
280
|
+
right: 100%
|
|
281
|
+
}
|
|
282
|
+
60% {
|
|
283
|
+
left: 100%;
|
|
284
|
+
right: -90%
|
|
285
|
+
}
|
|
286
|
+
100% {
|
|
287
|
+
left: 100%;
|
|
288
|
+
right: -90%
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@keyframes #{ui.n('??linear-type3')} {
|
|
293
|
+
0% {
|
|
294
|
+
left: -200%;
|
|
295
|
+
right: 100%
|
|
296
|
+
}
|
|
297
|
+
60% {
|
|
298
|
+
left: 107%;
|
|
299
|
+
right: -8%
|
|
300
|
+
}
|
|
301
|
+
100% {
|
|
302
|
+
left: 107%;
|
|
303
|
+
right: -8%
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
@keyframes #{ui.n('??linear-type4')} {
|
|
308
|
+
0% {
|
|
309
|
+
left: -25%;
|
|
310
|
+
right: 100%;
|
|
311
|
+
}
|
|
312
|
+
100% {
|
|
313
|
+
left: 100%;
|
|
314
|
+
right: -25%;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@keyframes #{ui.n('??circle-visible')} {
|
|
319
|
+
0% {
|
|
320
|
+
opacity: 0
|
|
321
|
+
}
|
|
322
|
+
100% {
|
|
323
|
+
opacity: 1
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@keyframes #{ui.n('??circle-hidden')} {
|
|
328
|
+
0% {
|
|
329
|
+
opacity: 1
|
|
330
|
+
}
|
|
331
|
+
100% {
|
|
332
|
+
opacity: 0
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@keyframes #{ui.n('??circle-type1')} {
|
|
337
|
+
0% {
|
|
338
|
+
stroke-dasharray: 1.256637061435917 125.66370614359173
|
|
339
|
+
}
|
|
340
|
+
5% {
|
|
341
|
+
stroke-dasharray: 50.265482457436692 125.66370614359173
|
|
342
|
+
}
|
|
343
|
+
50% {
|
|
344
|
+
stroke-dasharray: 113.09733552923253 125.66370614359173
|
|
345
|
+
}
|
|
346
|
+
100% {
|
|
347
|
+
stroke-dasharray: 119.38052083641211 125.66370614359173
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@keyframes #{ui.n('??circle-type2')} {
|
|
352
|
+
0% {
|
|
353
|
+
transform: rotate(0deg)
|
|
354
|
+
}
|
|
355
|
+
100% {
|
|
356
|
+
transform: rotate(360deg)
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@keyframes #{ui.n('??circle-type3')} {
|
|
361
|
+
0% {
|
|
362
|
+
stroke-dasharray: 1, 200;
|
|
363
|
+
stroke-dashoffset: 0
|
|
364
|
+
}
|
|
365
|
+
50% {
|
|
366
|
+
stroke-dasharray: 89, 200;
|
|
367
|
+
stroke-dashoffset: -35
|
|
368
|
+
}
|
|
369
|
+
100% {
|
|
370
|
+
stroke-dasharray: 89, 200;
|
|
371
|
+
stroke-dashoffset: -124
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ConstrClass } from '@dxtmisha/functional'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface for describing which components need to be connected for work.
|
|
5
|
+
*
|
|
6
|
+
* Интерфейс для описания, какие компоненты надо подключить для работы.
|
|
7
|
+
*/
|
|
8
|
+
export type ProgressComponents = {}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Type describing available events.
|
|
12
|
+
*
|
|
13
|
+
* Тип, описывающий доступные события.
|
|
14
|
+
*/
|
|
15
|
+
export type ProgressEmits = {}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Type describing available properties.
|
|
19
|
+
*
|
|
20
|
+
* Тип, описывающий доступные свойства.
|
|
21
|
+
*/
|
|
22
|
+
export interface ProgressExpose {}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Type describing available slots.
|
|
26
|
+
*
|
|
27
|
+
* Тип, описывающий доступные слоты.
|
|
28
|
+
*/
|
|
29
|
+
export interface ProgressSlots {}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Type describing subclasses.
|
|
33
|
+
*
|
|
34
|
+
* Тип, описывающий подклассы.
|
|
35
|
+
*/
|
|
36
|
+
export type ProgressClasses = {
|
|
37
|
+
main: ConstrClass
|
|
38
|
+
// :classes [!] System label / Системная метка
|
|
39
|
+
circle: string
|
|
40
|
+
circleSub: string
|
|
41
|
+
point: string
|
|
42
|
+
// :classes [!] System label / Системная метка
|
|
43
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Ref, ToRefs } from 'vue'
|
|
2
|
+
import { type ConstrEmit, DesignComp } from '@dxtmisha/functional'
|
|
3
|
+
|
|
4
|
+
import { RippleItem } from './RippleItem'
|
|
5
|
+
|
|
6
|
+
import type { RippleComponents, RippleEmits, RippleSlots } from './types'
|
|
7
|
+
import type { RippleProps } from './props'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Base Ripple class for working in Vue.
|
|
11
|
+
*
|
|
12
|
+
* Базовый класс Ripple для работы во Vue.
|
|
13
|
+
*/
|
|
14
|
+
export class Ripple {
|
|
15
|
+
protected readonly item: RippleItem
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Constructor
|
|
19
|
+
* @param props input data/ входные данные
|
|
20
|
+
* @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
|
|
21
|
+
* @param element input element/ элемент ввода
|
|
22
|
+
* @param className class name/ название класса
|
|
23
|
+
* @param components object for working with components/ объект для работы с компонентами
|
|
24
|
+
* @param slots object for working with slots/ объект для работы со слотами
|
|
25
|
+
* @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
|
|
26
|
+
*/
|
|
27
|
+
constructor(
|
|
28
|
+
protected readonly props: RippleProps,
|
|
29
|
+
protected readonly refs: ToRefs<RippleProps>,
|
|
30
|
+
protected readonly element: Ref<HTMLDivElement | undefined>,
|
|
31
|
+
protected readonly className: string,
|
|
32
|
+
protected readonly components?: DesignComp<RippleComponents, RippleProps>,
|
|
33
|
+
protected readonly slots?: RippleSlots,
|
|
34
|
+
protected readonly emits?: ConstrEmit<RippleEmits>
|
|
35
|
+
) {
|
|
36
|
+
this.item = new RippleItem(props, element, className)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The click event adds a wave effect element.
|
|
41
|
+
*
|
|
42
|
+
* Событие клика добавляет элемент эффекта волна.
|
|
43
|
+
* @param event click event/ событие клика
|
|
44
|
+
*/
|
|
45
|
+
readonly onClick = (event: MouseEvent) => this.item.add(event.offsetX, event.offsetY)
|
|
46
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { h, type VNode } from 'vue'
|
|
2
|
+
import {
|
|
3
|
+
type ConstrOptions,
|
|
4
|
+
type ConstrStyles,
|
|
5
|
+
DesignConstructorAbstract
|
|
6
|
+
} from '@dxtmisha/functional'
|
|
7
|
+
|
|
8
|
+
import { Ripple } from './Ripple'
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
type RipplePropsBasic
|
|
12
|
+
} from './props'
|
|
13
|
+
import {
|
|
14
|
+
type RippleClasses,
|
|
15
|
+
type RippleComponents,
|
|
16
|
+
type RippleEmits,
|
|
17
|
+
type RippleExpose,
|
|
18
|
+
type RippleSlots
|
|
19
|
+
} from './types'
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* RippleDesign
|
|
23
|
+
*/
|
|
24
|
+
export class RippleDesign<
|
|
25
|
+
COMP extends RippleComponents,
|
|
26
|
+
EXPOSE extends RippleExpose,
|
|
27
|
+
CLASSES extends RippleClasses,
|
|
28
|
+
P extends RipplePropsBasic
|
|
29
|
+
> extends DesignConstructorAbstract<
|
|
30
|
+
HTMLDivElement,
|
|
31
|
+
COMP,
|
|
32
|
+
RippleEmits,
|
|
33
|
+
EXPOSE,
|
|
34
|
+
RippleSlots,
|
|
35
|
+
CLASSES,
|
|
36
|
+
P
|
|
37
|
+
> {
|
|
38
|
+
protected readonly item: Ripple
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Constructor
|
|
42
|
+
* @param name class name/ название класса
|
|
43
|
+
* @param props properties/ свойства
|
|
44
|
+
* @param options list of additional parameters/ список дополнительных параметров
|
|
45
|
+
*/
|
|
46
|
+
constructor(
|
|
47
|
+
name: string,
|
|
48
|
+
props: Readonly<P>,
|
|
49
|
+
options?: ConstrOptions<COMP, RippleEmits, P>
|
|
50
|
+
) {
|
|
51
|
+
super(
|
|
52
|
+
name,
|
|
53
|
+
props,
|
|
54
|
+
options
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
this.item = new Ripple(
|
|
58
|
+
this.props,
|
|
59
|
+
this.refs,
|
|
60
|
+
this.element,
|
|
61
|
+
this.getName(),
|
|
62
|
+
this.components,
|
|
63
|
+
this.slots,
|
|
64
|
+
this.emits
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
this.init()
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Initialization of all the necessary properties for work<br>
|
|
72
|
+
* Инициализация всех необходимых свойств для работы.
|
|
73
|
+
*/
|
|
74
|
+
protected initExpose(): EXPOSE {
|
|
75
|
+
return {} as EXPOSE
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Improvement of the obtained list of classes.<br>
|
|
80
|
+
* Доработка полученного списка классов.
|
|
81
|
+
*/
|
|
82
|
+
protected initClasses(): Partial<CLASSES> {
|
|
83
|
+
return {
|
|
84
|
+
main: {},
|
|
85
|
+
...{
|
|
86
|
+
// :classes [!] System label / Системная метка
|
|
87
|
+
item: this.getSubClass('item')
|
|
88
|
+
// :classes [!] System label / Системная метка
|
|
89
|
+
}
|
|
90
|
+
} as Partial<CLASSES>
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Refinement of the received list of styles.<br>
|
|
95
|
+
* Доработка полученного списка стилей.
|
|
96
|
+
*/
|
|
97
|
+
protected initStyles(): ConstrStyles {
|
|
98
|
+
return {}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* A method for rendering.<br>
|
|
103
|
+
* Метод для рендеринга.
|
|
104
|
+
*/
|
|
105
|
+
protected initRender(): VNode {
|
|
106
|
+
return h('div', {
|
|
107
|
+
ref: this.element,
|
|
108
|
+
class: this.classes?.value.main,
|
|
109
|
+
onMousedown: this.item.onClick
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { VNode } from 'vue'
|
|
2
|
+
import { DesignComponents } from '@dxtmisha/functional'
|
|
3
|
+
|
|
4
|
+
import { EnabledInclude } from '../../classes/EnabledInclude'
|
|
5
|
+
|
|
6
|
+
import type { RippleComponentsInclude } from './basicTypes'
|
|
7
|
+
import type { RipplePropsBasic } from './props'
|
|
8
|
+
|
|
9
|
+
export class RippleInclude {
|
|
10
|
+
constructor(
|
|
11
|
+
protected readonly className: string,
|
|
12
|
+
protected readonly components?: DesignComponents<RippleComponentsInclude, RipplePropsBasic>,
|
|
13
|
+
protected readonly enabled?: EnabledInclude
|
|
14
|
+
) {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Render Ripple
|
|
19
|
+
*
|
|
20
|
+
* Рендер Ripple
|
|
21
|
+
*/
|
|
22
|
+
readonly render = (): VNode[] => {
|
|
23
|
+
if (
|
|
24
|
+
this.components
|
|
25
|
+
&& this.components.is('ripple')
|
|
26
|
+
&& (
|
|
27
|
+
!this.enabled
|
|
28
|
+
|| this.enabled.isEnabled.value
|
|
29
|
+
)
|
|
30
|
+
) {
|
|
31
|
+
return this.components.render(
|
|
32
|
+
'ripple',
|
|
33
|
+
{ class: `${this.className}__ripple` }
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return []
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type Ref } from 'vue'
|
|
2
|
+
import { createElement } from '@dxtmisha/functional'
|
|
3
|
+
|
|
4
|
+
import type { RippleProps } from './props'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Class for managing the effect element.
|
|
8
|
+
*
|
|
9
|
+
* Класс для управления элементом эффекта.
|
|
10
|
+
*/
|
|
11
|
+
export class RippleItem {
|
|
12
|
+
protected readonly classItem: string
|
|
13
|
+
protected readonly classEnd: string
|
|
14
|
+
|
|
15
|
+
protected readonly styleX: string
|
|
16
|
+
protected readonly styleY: string
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Constructor
|
|
20
|
+
* @param props input data/ входные данные
|
|
21
|
+
* @param element image element for scaling/ элемент изображения для масштабирования
|
|
22
|
+
* @param className list of available classes/ список доступных классов
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
protected readonly props: RippleProps,
|
|
27
|
+
protected readonly element: Ref<HTMLDivElement | undefined>,
|
|
28
|
+
protected readonly className: string
|
|
29
|
+
) {
|
|
30
|
+
this.classItem = `${this.className}__item`
|
|
31
|
+
this.classEnd = `${this.className}--end`
|
|
32
|
+
|
|
33
|
+
this.styleX = `--${this.className}-sys-x`
|
|
34
|
+
this.styleY = `--${this.className}-sys-y`
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Adding a new light element.
|
|
39
|
+
*
|
|
40
|
+
* Добавление нового элемента свечения.
|
|
41
|
+
* @param x x-coordinate/ x-координата
|
|
42
|
+
* @param y y-coordinate/ y-координата
|
|
43
|
+
*/
|
|
44
|
+
add(x: number, y: number): void {
|
|
45
|
+
if (this.props?.disabled) {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const element = this.element.value
|
|
50
|
+
|
|
51
|
+
if (element) {
|
|
52
|
+
createElement<HTMLSpanElement>(element, 'span', (item) => {
|
|
53
|
+
item.onanimationend = () => item.classList.add(this.classEnd)
|
|
54
|
+
item.ontransitionend = () => item.parentElement?.removeChild(item)
|
|
55
|
+
|
|
56
|
+
item.style.setProperty(this.styleX, `${x}px`)
|
|
57
|
+
item.style.setProperty(this.styleY, `${y}px`)
|
|
58
|
+
item.classList.add(this.classItem)
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|