@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,196 @@
|
|
|
1
|
+
import { h, type VNode } from 'vue'
|
|
2
|
+
import {
|
|
3
|
+
type ConstrOptions,
|
|
4
|
+
type ConstrStyles,
|
|
5
|
+
DesignConstructorAbstract
|
|
6
|
+
} from '@dxtmisha/functional'
|
|
7
|
+
|
|
8
|
+
import { ListItem } from './ListItem'
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
type ListItemPropsBasic
|
|
12
|
+
} from './props'
|
|
13
|
+
import {
|
|
14
|
+
type ListItemClasses,
|
|
15
|
+
type ListItemComponents,
|
|
16
|
+
type ListItemEmits,
|
|
17
|
+
type ListItemExpose,
|
|
18
|
+
type ListItemSlots
|
|
19
|
+
} from './types'
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* ListItemDesign
|
|
23
|
+
*/
|
|
24
|
+
export class ListItemDesign<
|
|
25
|
+
COMP extends ListItemComponents,
|
|
26
|
+
EXPOSE extends ListItemExpose,
|
|
27
|
+
CLASSES extends ListItemClasses,
|
|
28
|
+
P extends ListItemPropsBasic
|
|
29
|
+
> extends DesignConstructorAbstract<
|
|
30
|
+
HTMLDivElement,
|
|
31
|
+
COMP,
|
|
32
|
+
ListItemEmits,
|
|
33
|
+
EXPOSE,
|
|
34
|
+
ListItemSlots,
|
|
35
|
+
CLASSES,
|
|
36
|
+
P
|
|
37
|
+
> {
|
|
38
|
+
protected readonly item: ListItem
|
|
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, ListItemEmits, P>
|
|
50
|
+
) {
|
|
51
|
+
super(
|
|
52
|
+
name,
|
|
53
|
+
props,
|
|
54
|
+
options
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
this.item = new ListItem(
|
|
58
|
+
this.props,
|
|
59
|
+
this.refs,
|
|
60
|
+
this.element,
|
|
61
|
+
this.getDesign(),
|
|
62
|
+
this.getName(),
|
|
63
|
+
this.components,
|
|
64
|
+
this.slots,
|
|
65
|
+
this.emits
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
this.init()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Initialization of all the necessary properties for work
|
|
73
|
+
*
|
|
74
|
+
* Инициализация всех необходимых свойств для работы.
|
|
75
|
+
*/
|
|
76
|
+
protected initExpose(): EXPOSE {
|
|
77
|
+
return {
|
|
78
|
+
...this.item.event.expose
|
|
79
|
+
} as EXPOSE
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Improvement of the obtained list of classes.
|
|
84
|
+
*
|
|
85
|
+
* Доработка полученного списка классов.
|
|
86
|
+
*/
|
|
87
|
+
protected initClasses(): Partial<CLASSES> {
|
|
88
|
+
return {
|
|
89
|
+
main: this.item.classes.value,
|
|
90
|
+
...{
|
|
91
|
+
// :classes [!] System label / Системная метка
|
|
92
|
+
body: this.getSubClass('body'),
|
|
93
|
+
context: this.getSubClass('context'),
|
|
94
|
+
label: this.getSubClass('label'),
|
|
95
|
+
highlight: this.getSubClass('highlight'),
|
|
96
|
+
prefix: this.getSubClass('prefix'),
|
|
97
|
+
caption: this.getSubClass('caption'),
|
|
98
|
+
description: this.getSubClass('description'),
|
|
99
|
+
icon: this.getSubClass('icon'),
|
|
100
|
+
trailing: this.getSubClass('trailing'),
|
|
101
|
+
badge: this.getSubClass('badge'),
|
|
102
|
+
input: this.getSubClass('input')
|
|
103
|
+
// :classes [!] System label / Системная метка
|
|
104
|
+
}
|
|
105
|
+
} as Partial<CLASSES>
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Refinement of the received list of styles.
|
|
110
|
+
*
|
|
111
|
+
* Доработка полученного списка стилей.
|
|
112
|
+
*/
|
|
113
|
+
protected initStyles(): ConstrStyles {
|
|
114
|
+
return {}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A method for rendering.
|
|
119
|
+
*
|
|
120
|
+
* Метод для рендеринга.
|
|
121
|
+
*/
|
|
122
|
+
protected initRender(): VNode {
|
|
123
|
+
const children: any[] = []
|
|
124
|
+
|
|
125
|
+
this.initSlot('leading', children)
|
|
126
|
+
children.push(...this.renderBody())
|
|
127
|
+
this.initSlot('trailing', children)
|
|
128
|
+
|
|
129
|
+
children.push(
|
|
130
|
+
...this.item.icon.render(),
|
|
131
|
+
...this.item.progress.render(),
|
|
132
|
+
...this.item.ripple.render()
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
return h(
|
|
136
|
+
this.props.tag ?? 'div',
|
|
137
|
+
{
|
|
138
|
+
...this.getAttrs(),
|
|
139
|
+
'ref': this.element,
|
|
140
|
+
'class': this.classes?.value.main,
|
|
141
|
+
'style': this.styles?.value,
|
|
142
|
+
'data-value': this.props.index ?? this.props.value,
|
|
143
|
+
'data-divider': this.props.divider ? 'active' : undefined,
|
|
144
|
+
'data-parent': this.props.parent,
|
|
145
|
+
'data-list-id': this.props.listId,
|
|
146
|
+
'onClick': this.item.event.onClick
|
|
147
|
+
},
|
|
148
|
+
children
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Method for rendering the main part of the component.
|
|
154
|
+
*
|
|
155
|
+
* Метод для рендеринга основной части компонента.
|
|
156
|
+
*/
|
|
157
|
+
readonly renderBody = (): VNode[] => {
|
|
158
|
+
const children: any[] = [
|
|
159
|
+
...this.renderContext(),
|
|
160
|
+
...this.item.description.render()
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
this.initSlot('body', children)
|
|
164
|
+
|
|
165
|
+
return [
|
|
166
|
+
h(
|
|
167
|
+
'div',
|
|
168
|
+
{ class: this.classes?.value.body },
|
|
169
|
+
children
|
|
170
|
+
)
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Method for rendering the context part of the component.
|
|
176
|
+
* This includes prefix, caption, suffix, badge, and label.
|
|
177
|
+
*
|
|
178
|
+
* Метод для рендеринга контекстной части компонента.
|
|
179
|
+
* Включает в себя префикс, подпись, суффикс, значок и метку.
|
|
180
|
+
*/
|
|
181
|
+
readonly renderContext = (): VNode[] => {
|
|
182
|
+
return [
|
|
183
|
+
h(
|
|
184
|
+
'div',
|
|
185
|
+
{ class: this.classes?.value.context },
|
|
186
|
+
[
|
|
187
|
+
...this.item.prefix.render(),
|
|
188
|
+
...this.item.caption.render(),
|
|
189
|
+
...this.item.suffix.render(),
|
|
190
|
+
...this.item.label.render(),
|
|
191
|
+
...this.item.badge.render()
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"paddingX": {
|
|
3
|
+
"_type": "var"
|
|
4
|
+
},
|
|
5
|
+
"paddingY": {
|
|
6
|
+
"_type": "var"
|
|
7
|
+
},
|
|
8
|
+
"shift": {
|
|
9
|
+
"_type": "var"
|
|
10
|
+
},
|
|
11
|
+
"height": {
|
|
12
|
+
"_type": "var"
|
|
13
|
+
},
|
|
14
|
+
"border-width": {
|
|
15
|
+
"_type": "var"
|
|
16
|
+
},
|
|
17
|
+
"border-color": {
|
|
18
|
+
"_type": "var"
|
|
19
|
+
},
|
|
20
|
+
"transition-property": "background-color, background-image, border, box-shadow",
|
|
21
|
+
"transition-duration": "{d.sys.transitionDuration.fade.enter}",
|
|
22
|
+
"transition-function": "{d.sys.transitionFunction.standard}",
|
|
23
|
+
"#body": {},
|
|
24
|
+
"#context": {},
|
|
25
|
+
"#label": {},
|
|
26
|
+
"#highlight": {},
|
|
27
|
+
"#prefix": {},
|
|
28
|
+
"#caption": {},
|
|
29
|
+
"#description": {},
|
|
30
|
+
"#icon": {},
|
|
31
|
+
"#trailing": {},
|
|
32
|
+
"#badge": {},
|
|
33
|
+
"#input": {},
|
|
34
|
+
"~focus": {},
|
|
35
|
+
"~open": {},
|
|
36
|
+
"~selected": {},
|
|
37
|
+
"~selectedChild": {},
|
|
38
|
+
"~readonly": {},
|
|
39
|
+
"~disabled": {},
|
|
40
|
+
"~iconTop": {},
|
|
41
|
+
"~iconAlign": {
|
|
42
|
+
"~center": {},
|
|
43
|
+
"~edge": {},
|
|
44
|
+
"_default": "center"
|
|
45
|
+
},
|
|
46
|
+
"~fill": {
|
|
47
|
+
"_type": "state",
|
|
48
|
+
"_var": true,
|
|
49
|
+
"_style": true
|
|
50
|
+
},
|
|
51
|
+
"~divider": {}
|
|
52
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { IconPropsBasic, IconTrailingPropsInclude } from '../Icon'
|
|
2
|
+
import type { BadgePropsBasic, BadgePropsInclude } from '../Badge'
|
|
3
|
+
import type { ProgressPropsBasic, ProgressPropsInclude } from '../Progress'
|
|
4
|
+
import type { SkeletonPropsInclude } from '../Skeleton'
|
|
5
|
+
|
|
6
|
+
import type { LabelHighlightProps } from '../../types/labelTypes'
|
|
7
|
+
import type { DescriptionProps } from '../../types/descriptionTypes'
|
|
8
|
+
import type { PrefixProps } from '../../types/prefixTypes'
|
|
9
|
+
import type { CaptionProps } from '../../types/captionTypes'
|
|
10
|
+
import type { SuffixProps } from '../../types/suffixTypes'
|
|
11
|
+
import type { EnabledProps } from '../../types/enabledTypes'
|
|
12
|
+
import type { EventClickProps } from '../../types/eventClickTypes'
|
|
13
|
+
|
|
14
|
+
interface ListItemPropsToken {
|
|
15
|
+
// :type [!] System label / Системная метка
|
|
16
|
+
focus?: boolean
|
|
17
|
+
open?: boolean
|
|
18
|
+
selected?: boolean
|
|
19
|
+
selectedChild?: boolean
|
|
20
|
+
readonly?: boolean
|
|
21
|
+
disabled?: boolean
|
|
22
|
+
iconTop?: boolean
|
|
23
|
+
iconAlign?: 'center' | 'edge'
|
|
24
|
+
fill?: string | 'custom'
|
|
25
|
+
divider?: boolean
|
|
26
|
+
// :type [!] System label / Системная метка
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ListItemPropsBasic<
|
|
30
|
+
Icon extends IconPropsBasic = IconPropsBasic,
|
|
31
|
+
Badge extends BadgePropsBasic = BadgePropsBasic,
|
|
32
|
+
Progress extends ProgressPropsBasic = ProgressPropsBasic
|
|
33
|
+
> extends LabelHighlightProps,
|
|
34
|
+
DescriptionProps,
|
|
35
|
+
PrefixProps,
|
|
36
|
+
CaptionProps,
|
|
37
|
+
SuffixProps,
|
|
38
|
+
IconTrailingPropsInclude<Icon>,
|
|
39
|
+
BadgePropsInclude<Badge>,
|
|
40
|
+
ProgressPropsInclude<Progress>,
|
|
41
|
+
SkeletonPropsInclude,
|
|
42
|
+
EnabledProps,
|
|
43
|
+
EventClickProps {
|
|
44
|
+
// Value
|
|
45
|
+
index?: any
|
|
46
|
+
|
|
47
|
+
// Style
|
|
48
|
+
tag?: 'button' | 'a' | 'span' | 'div' | string
|
|
49
|
+
divider?: boolean
|
|
50
|
+
|
|
51
|
+
// Technical
|
|
52
|
+
type?: string
|
|
53
|
+
parent?: string
|
|
54
|
+
listId?: number
|
|
55
|
+
search?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Type describing incoming properties.
|
|
60
|
+
*
|
|
61
|
+
* Тип, описывающий входящие свойства.
|
|
62
|
+
*/
|
|
63
|
+
export interface ListItemProps extends ListItemPropsBasic, ListItemPropsToken {
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Default value for property.
|
|
68
|
+
*
|
|
69
|
+
* Значение по умолчанию для свойства.
|
|
70
|
+
*/
|
|
71
|
+
export const defaultsListItem = {
|
|
72
|
+
tag: 'div',
|
|
73
|
+
...{
|
|
74
|
+
// :default [!] System label / Системная метка
|
|
75
|
+
iconAlign: 'center'
|
|
76
|
+
// :default [!] System label / Системная метка
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
@use "@dxtmisha/styles/properties" as ui;
|
|
2
|
+
|
|
3
|
+
@mixin mixinListItem {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
padding: 0;
|
|
10
|
+
|
|
11
|
+
--sys-height: #{ui.v('??height', 0)};
|
|
12
|
+
min-height: ui.v('??height', 0);
|
|
13
|
+
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
&__icon,
|
|
17
|
+
&__trailing {
|
|
18
|
+
z-index: 4;
|
|
19
|
+
|
|
20
|
+
@include ui.marginLeft(ui.v('??margin'));
|
|
21
|
+
@include ui.marginRight(ui.v('??margin'));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__icon {
|
|
25
|
+
order: 8;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__body {
|
|
29
|
+
align-self: center;
|
|
30
|
+
flex-grow: 1;
|
|
31
|
+
order: 16;
|
|
32
|
+
z-index: 4;
|
|
33
|
+
|
|
34
|
+
@include ui.paddingX(ui.v('??paddingX', 0));
|
|
35
|
+
@include ui.paddingY(ui.v('??paddingY', 0));
|
|
36
|
+
|
|
37
|
+
& ~ {
|
|
38
|
+
@include ui.subclass('icon') {
|
|
39
|
+
@include ui.marginRight(#{calc(ui.v('??margin') - ui.v('??paddingX', 0) - ui.v('??shift', 0))});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include ui.subclass('trailing') {
|
|
43
|
+
@include ui.marginLeft(#{calc(ui.v('??margin') - ui.v('??paddingX', 0))});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__context {
|
|
49
|
+
@include ui.flexX;
|
|
50
|
+
order: 16;
|
|
51
|
+
|
|
52
|
+
@include ui.subclass('prefix') {
|
|
53
|
+
order: 8;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include ui.subclass('label') {
|
|
57
|
+
order: 16;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@include ui.subclass('caption') {
|
|
61
|
+
@include ui.flexDynamic;
|
|
62
|
+
order: 24;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include ui.subclass('suffix') {
|
|
66
|
+
@include ui.flexDynamic;
|
|
67
|
+
order: 32;
|
|
68
|
+
|
|
69
|
+
@include ui.textAlign('right');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@include ui.subclass('badge') {
|
|
73
|
+
order: 40;
|
|
74
|
+
@include ui.marginLeft(auto);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&__trailing {
|
|
79
|
+
order: 24;
|
|
80
|
+
z-index: 4;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__ripple {
|
|
84
|
+
order: 32;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&--readonly,
|
|
88
|
+
&--disabled,
|
|
89
|
+
&--loading {
|
|
90
|
+
cursor: default;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&--fill {
|
|
94
|
+
&--custom {
|
|
95
|
+
position: relative;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
|
|
98
|
+
&:before {
|
|
99
|
+
position: absolute;
|
|
100
|
+
@include ui.inset();
|
|
101
|
+
z-index: 2;
|
|
102
|
+
|
|
103
|
+
background-color: ui.v('??fill', transparent);
|
|
104
|
+
content: ' ';
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&--iconAlign {
|
|
110
|
+
&--center {
|
|
111
|
+
@include ui.subclass('icon') {
|
|
112
|
+
@include ui.initByCustom('margin', #{calc((ui.v('??height') - ui.v('?icon._width')) / 2)});
|
|
113
|
+
}
|
|
114
|
+
@include ui.subclass('trailing') {
|
|
115
|
+
@include ui.initByCustom('margin', #{calc((ui.v('??height') - ui.v('?icon._width')) / 2)});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&--edge {
|
|
120
|
+
@include ui.subclass('icon') {
|
|
121
|
+
@include ui.initByCustom('margin', #{ui.v('??paddingX')});
|
|
122
|
+
}
|
|
123
|
+
@include ui.subclass('trailing') {
|
|
124
|
+
@include ui.initByCustom('margin', #{ui.v('??paddingX')});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&--iconTop {
|
|
130
|
+
@include ui.state('description') {
|
|
131
|
+
align-items: flex-start;
|
|
132
|
+
|
|
133
|
+
@include ui.subclass('icon') {
|
|
134
|
+
@include ui.translateY(#{calc((ui.v('??paddingY') - ((ui.v('?icon._width') - var(--sys-line-height)) / 2)))});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@include ui.subclass('trailing') {
|
|
138
|
+
@include ui.translateY(#{calc((ui.v('??paddingY') - ((ui.v('?icon._width') - var(--sys-line-height)) / 2)))});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@at-root {
|
|
144
|
+
& + &[data-divider="active"],
|
|
145
|
+
#{ui.c('?listGroup')} + &[data-divider="active"],
|
|
146
|
+
[data-divider="active"] + &[data-divider="active"] {
|
|
147
|
+
border-top-style: solid;
|
|
148
|
+
border-top-width: ui.v('??borderWidth');
|
|
149
|
+
@include ui.borderColor(ui.v('??borderColor'));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ConstrClass } from '@dxtmisha/functional'
|
|
2
|
+
|
|
3
|
+
import type { IconComponentInclude } from '../Icon'
|
|
4
|
+
import type { BadgeComponentInclude } from '../Badge'
|
|
5
|
+
import type { ProgressComponentInclude } from '../Progress'
|
|
6
|
+
import type { RippleComponentsInclude } from '../Ripple'
|
|
7
|
+
|
|
8
|
+
import type { LabelHighlightSlots } from '../../types/labelTypes'
|
|
9
|
+
import type { DescriptionSlots } from '../../types/descriptionTypes'
|
|
10
|
+
import type { PrefixSlots } from '../../types/prefixTypes'
|
|
11
|
+
import type { CaptionSlots } from '../../types/captionTypes'
|
|
12
|
+
import type { SuffixSlots } from '../../types/suffixTypes'
|
|
13
|
+
import type { EventClickEmits, EventClickExpose } from '../../types/eventClickTypes'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Interface for describing which components need to be connected for work.
|
|
17
|
+
*
|
|
18
|
+
* Интерфейс для описания, какие компоненты надо подключить для работы.
|
|
19
|
+
*/
|
|
20
|
+
export type ListItemComponents
|
|
21
|
+
= IconComponentInclude
|
|
22
|
+
& BadgeComponentInclude
|
|
23
|
+
& ProgressComponentInclude
|
|
24
|
+
& RippleComponentsInclude
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Type describing available events.
|
|
28
|
+
*
|
|
29
|
+
* Тип, описывающий доступные события.
|
|
30
|
+
*/
|
|
31
|
+
export type ListItemEmits = EventClickEmits
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Type describing available properties.
|
|
35
|
+
*
|
|
36
|
+
* Тип, описывающий доступные свойства.
|
|
37
|
+
*/
|
|
38
|
+
export interface ListItemExpose extends EventClickExpose {
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Type describing available slots.
|
|
43
|
+
*
|
|
44
|
+
* Тип, описывающий доступные слоты.
|
|
45
|
+
*/
|
|
46
|
+
export interface ListItemSlots extends LabelHighlightSlots,
|
|
47
|
+
DescriptionSlots,
|
|
48
|
+
PrefixSlots,
|
|
49
|
+
CaptionSlots,
|
|
50
|
+
SuffixSlots {
|
|
51
|
+
leading?(props: any): any
|
|
52
|
+
|
|
53
|
+
trailing?(props: any): any
|
|
54
|
+
|
|
55
|
+
body?(props: any): any
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Type describing subclasses.
|
|
60
|
+
*
|
|
61
|
+
* Тип, описывающий подклассы.
|
|
62
|
+
*/
|
|
63
|
+
export type ListItemClasses = {
|
|
64
|
+
main: ConstrClass
|
|
65
|
+
// :classes [!] System label / Системная метка
|
|
66
|
+
body: string
|
|
67
|
+
context: string
|
|
68
|
+
label: string
|
|
69
|
+
highlight: string
|
|
70
|
+
prefix: string
|
|
71
|
+
caption: string
|
|
72
|
+
description: string
|
|
73
|
+
icon: string
|
|
74
|
+
trailing: string
|
|
75
|
+
badge: string
|
|
76
|
+
input: string
|
|
77
|
+
// :classes [!] System label / Системная метка
|
|
78
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { computed, type Ref, type ToRefs } from 'vue'
|
|
2
|
+
import { type ConstrEmit, DesignComp } from '@dxtmisha/functional'
|
|
3
|
+
|
|
4
|
+
import { WindowInclude } from '../Window'
|
|
5
|
+
import { ListGroupOpen } from '../ListGroup/ListGroupOpen'
|
|
6
|
+
|
|
7
|
+
import type { ListMenuComponents, ListMenuEmits, ListMenuSlots } from './types'
|
|
8
|
+
import type { ListMenuProps } from './props'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* ListMenu
|
|
12
|
+
*/
|
|
13
|
+
export class ListMenu {
|
|
14
|
+
readonly open: ListGroupOpen<ListMenuProps>
|
|
15
|
+
readonly window: WindowInclude
|
|
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 classDesign design name/ название дизайна
|
|
23
|
+
* @param className class name/ название класса
|
|
24
|
+
* @param components object for working with components/ объект для работы с компонентами
|
|
25
|
+
* @param slots object for working with slots/ объект для работы со слотами
|
|
26
|
+
* @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
|
|
27
|
+
*/
|
|
28
|
+
constructor(
|
|
29
|
+
protected readonly props: ListMenuProps,
|
|
30
|
+
protected readonly refs: ToRefs<ListMenuProps>,
|
|
31
|
+
protected readonly element: Ref<HTMLElement | undefined>,
|
|
32
|
+
protected readonly classDesign: string,
|
|
33
|
+
protected readonly className: string,
|
|
34
|
+
protected readonly components?: DesignComp<ListMenuComponents, ListMenuProps>,
|
|
35
|
+
protected readonly slots?: ListMenuSlots,
|
|
36
|
+
protected readonly emits?: ConstrEmit<ListMenuEmits>
|
|
37
|
+
) {
|
|
38
|
+
this.open = new ListGroupOpen(this.props)
|
|
39
|
+
|
|
40
|
+
this.window = new WindowInclude(
|
|
41
|
+
this.props,
|
|
42
|
+
this.className,
|
|
43
|
+
this.components,
|
|
44
|
+
this.emits,
|
|
45
|
+
computed(() => ({
|
|
46
|
+
adaptive: 'menu',
|
|
47
|
+
axis: this.props.axis,
|
|
48
|
+
onWindow: this.open.onOpen
|
|
49
|
+
}))
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
}
|