@dxtmisha/constructor 0.23.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +36 -6
- package/src/classes/AriaStaticInclude.ts +269 -0
- package/src/classes/DescriptionInclude.ts +19 -2
- package/src/classes/EnabledInclude.ts +11 -0
- package/src/classes/EventClickInclude.ts +2 -2
- package/src/classes/LabelHighlightInclude.ts +35 -0
- package/src/classes/LabelInclude.ts +40 -5
- package/src/classes/ModelInclude.ts +50 -1
- package/src/classes/ModelValueInclude.ts +73 -0
- package/src/classes/TabIndexInclude.ts +260 -0
- package/src/classes/TextInclude.ts +102 -0
- package/src/classes/TouchEventInclude.ts +284 -0
- package/src/classes/field/FieldArrowInclude.ts +189 -0
- package/src/classes/field/FieldAttributesInclude.ts +87 -28
- package/src/classes/field/FieldChangeInclude.ts +1 -1
- package/src/classes/field/FieldElementInclude.ts +1 -1
- package/src/classes/field/FieldEventInclude.ts +253 -0
- package/src/classes/field/FieldInputModeInclude.ts +48 -0
- package/src/classes/field/FieldMatchInclude.ts +9 -3
- package/src/classes/field/FieldTypeInclude.ts +11 -6
- package/src/classes/field/FieldValidationInclude.ts +1 -4
- package/src/classes/field/FieldValueInclude.ts +10 -0
- package/src/constructors/Accordion/Accordion.ts +68 -0
- package/src/constructors/Accordion/AccordionDesign.tsx +192 -0
- package/src/constructors/Accordion/basicTypes.ts +0 -0
- package/src/constructors/Accordion/index.ts +5 -0
- package/src/constructors/Accordion/properties.json +16 -0
- package/src/constructors/Accordion/props.ts +55 -0
- package/src/constructors/Accordion/style.scss +12 -0
- package/src/constructors/Accordion/types.ts +63 -0
- package/src/constructors/ActionSheet/ActionSheet.ts +78 -0
- package/src/constructors/ActionSheet/ActionSheetDesign.tsx +125 -0
- package/src/constructors/ActionSheet/basicTypes.ts +0 -0
- package/src/constructors/ActionSheet/index.ts +5 -0
- package/src/constructors/ActionSheet/properties.json +14 -0
- package/src/constructors/ActionSheet/props.ts +44 -0
- package/src/constructors/ActionSheet/style.scss +25 -0
- package/src/constructors/ActionSheet/types.ts +54 -0
- package/src/constructors/Actions/Actions.ts +60 -0
- package/src/constructors/Actions/ActionsDesign.tsx +212 -0
- package/src/constructors/Actions/ActionsInclude.ts +109 -0
- package/src/constructors/Actions/basicTypes.ts +40 -0
- package/src/constructors/Actions/index.ts +6 -0
- package/src/constructors/Actions/properties.json +63 -0
- package/src/constructors/Actions/props.ts +42 -0
- package/src/constructors/Actions/style.scss +11 -0
- package/src/constructors/Actions/types.ts +52 -0
- package/src/constructors/Anchor/Anchor.ts +113 -0
- package/src/constructors/Anchor/AnchorDesign.tsx +242 -0
- package/src/constructors/Anchor/AnchorEvent.ts +76 -0
- package/src/constructors/Anchor/AnchorHref.ts +54 -0
- package/src/constructors/Anchor/AnchorIcon.ts +54 -0
- package/src/constructors/Anchor/AnchorTo.ts +46 -0
- package/src/constructors/Anchor/basicTypes.ts +9 -0
- package/src/constructors/Anchor/index.ts +5 -0
- package/src/constructors/Anchor/properties.json +3 -0
- package/src/constructors/Anchor/props.ts +54 -0
- package/src/constructors/Anchor/style.scss +10 -0
- package/src/constructors/Anchor/types.ts +47 -0
- package/src/constructors/Arrow/Arrow.ts +134 -0
- package/src/constructors/Arrow/ArrowDesign.tsx +226 -0
- package/src/constructors/Arrow/ArrowElement.ts +139 -0
- package/src/constructors/Arrow/ArrowElementTarget.ts +72 -0
- package/src/constructors/Arrow/ArrowEvent.ts +126 -0
- package/src/constructors/Arrow/ArrowInclude.ts +85 -0
- package/src/constructors/Arrow/ArrowParent.ts +100 -0
- package/src/constructors/Arrow/ArrowPosition.ts +231 -0
- package/src/constructors/Arrow/basicTypes.ts +50 -0
- package/src/constructors/Arrow/index.ts +6 -0
- package/src/constructors/Arrow/properties.json +23 -0
- package/src/constructors/Arrow/props.ts +31 -0
- package/src/constructors/Arrow/style.scss +133 -0
- package/src/constructors/Arrow/types.ts +54 -0
- package/src/constructors/Badge/BadgeDesign.tsx +4 -1
- package/src/constructors/Badge/properties.json +36 -36
- package/src/constructors/Badge/props.ts +3 -1
- package/src/constructors/Badge/types.ts +3 -3
- package/src/constructors/Bars/Bars.ts +10 -4
- package/src/constructors/Bars/BarsDesign.tsx +17 -11
- package/src/constructors/Bars/BarsInclude.ts +5 -2
- package/src/constructors/Bars/properties.json +6 -6
- package/src/constructors/Bars/props.ts +3 -1
- package/src/constructors/Bars/style.scss +4 -0
- package/src/constructors/Bars/types.ts +3 -3
- package/src/constructors/Block/Block.ts +105 -0
- package/src/constructors/Block/BlockDesign.tsx +219 -0
- package/src/constructors/Block/basicTypes.ts +0 -0
- package/src/constructors/Block/index.ts +5 -0
- package/src/constructors/Block/properties.json +10 -0
- package/src/constructors/Block/props.ts +46 -0
- package/src/constructors/Block/style.scss +11 -0
- package/src/constructors/Block/types.ts +64 -0
- package/src/constructors/Button/Button.ts +26 -2
- package/src/constructors/Button/ButtonDesign.tsx +11 -6
- package/src/constructors/Button/ButtonInclude.ts +8 -5
- package/src/constructors/Button/index.ts +1 -0
- package/src/constructors/Button/properties.json +84 -84
- package/src/constructors/Button/props.ts +5 -1
- package/src/constructors/Button/style.scss +1 -1
- package/src/constructors/Button/types.ts +2 -2
- package/src/constructors/Cell/Cell.ts +23 -6
- package/src/constructors/Cell/CellDesign.tsx +53 -22
- package/src/constructors/Cell/basicTypes.ts +33 -0
- package/src/constructors/Cell/properties.json +52 -52
- package/src/constructors/Cell/props.ts +16 -13
- package/src/constructors/Cell/style.scss +1 -1
- package/src/constructors/Cell/types.ts +3 -3
- package/src/constructors/Chip/ChipDesign.tsx +5 -5
- package/src/constructors/Chip/ChipInclude.ts +83 -0
- package/src/constructors/Chip/basicTypes.ts +12 -0
- package/src/constructors/Chip/index.ts +2 -0
- package/src/constructors/Chip/properties.json +3 -3
- package/src/constructors/Chip/types.ts +5 -5
- package/src/constructors/ChipGroup/ChipGroup.ts +74 -0
- package/src/constructors/ChipGroup/ChipGroupDesign.tsx +162 -0
- package/src/constructors/ChipGroup/basicTypes.ts +6 -0
- package/src/constructors/ChipGroup/index.ts +5 -0
- package/src/constructors/ChipGroup/properties.json +3 -0
- package/src/constructors/ChipGroup/props.ts +50 -0
- package/src/constructors/ChipGroup/style.scss +6 -0
- package/src/constructors/ChipGroup/types.ts +47 -0
- package/src/constructors/Dialog/Dialog.ts +145 -0
- package/src/constructors/Dialog/DialogDesign.tsx +135 -0
- package/src/constructors/Dialog/basicTypes.ts +0 -0
- package/src/constructors/Dialog/index.ts +5 -0
- package/src/constructors/Dialog/properties.json +23 -0
- package/src/constructors/Dialog/props.ts +76 -0
- package/src/constructors/Dialog/style.scss +18 -0
- package/src/constructors/Dialog/types.ts +67 -0
- package/src/constructors/Field/Field.ts +58 -19
- package/src/constructors/Field/FieldDesign.tsx +35 -17
- package/src/constructors/Field/FieldInclude.ts +141 -11
- package/src/constructors/Field/basicTypes.ts +35 -19
- package/src/constructors/Field/properties.json +92 -86
- package/src/constructors/Field/props.ts +6 -3
- package/src/constructors/Field/style.scss +36 -20
- package/src/constructors/Field/types.ts +13 -13
- package/src/constructors/FieldCounter/FieldCounterDesign.tsx +1 -0
- package/src/constructors/FieldCounter/FieldCounterInclude.ts +3 -1
- package/src/constructors/FieldCounter/basicTypes.ts +1 -0
- package/src/constructors/FieldCounter/properties.json +3 -3
- package/src/constructors/FieldCounter/props.ts +5 -2
- package/src/constructors/FieldCounter/types.ts +1 -1
- package/src/constructors/FieldLabel/FieldLabelDesign.tsx +6 -2
- package/src/constructors/FieldLabel/FieldLabelInclude.ts +13 -4
- package/src/constructors/FieldLabel/properties.json +4 -4
- package/src/constructors/FieldLabel/props.ts +2 -2
- package/src/constructors/FieldLabel/types.ts +2 -2
- package/src/constructors/FieldMessage/FieldMessage.ts +19 -0
- package/src/constructors/FieldMessage/FieldMessageDesign.tsx +36 -4
- package/src/constructors/FieldMessage/FieldMessageInclude.ts +11 -1
- package/src/constructors/FieldMessage/basicTypes.ts +15 -1
- package/src/constructors/FieldMessage/properties.json +10 -9
- package/src/constructors/FieldMessage/props.ts +4 -0
- package/src/constructors/FieldMessage/style.scss +16 -1
- package/src/constructors/FieldMessage/types.ts +4 -2
- package/src/constructors/Icon/Icon.ts +37 -2
- package/src/constructors/Icon/IconDesign.tsx +46 -39
- package/src/constructors/Icon/properties.json +25 -25
- package/src/constructors/Icon/props.ts +22 -16
- package/src/constructors/Icon/types.ts +1 -1
- package/src/constructors/Image/Image.ts +68 -10
- package/src/constructors/Image/ImageBackground.ts +15 -2
- package/src/constructors/Image/ImageCoordinator.ts +4 -2
- package/src/constructors/Image/ImageData.ts +4 -0
- package/src/constructors/Image/ImageDesign.tsx +81 -15
- package/src/constructors/Image/ImageFile.ts +2 -13
- package/src/constructors/Image/ImageImg.ts +218 -0
- package/src/constructors/Image/ImagePdf.ts +2 -2
- package/src/constructors/Image/basicTypes.ts +5 -0
- package/src/constructors/Image/properties.json +17 -17
- package/src/constructors/Image/props.ts +34 -7
- package/src/constructors/Image/style.scss +42 -0
- package/src/constructors/Image/types.ts +1 -1
- package/src/constructors/Input/Input.ts +146 -0
- package/src/constructors/Input/InputDesign.tsx +174 -0
- package/src/constructors/Input/InputPassword.ts +54 -0
- package/src/constructors/Input/basicTypes.ts +3 -0
- package/src/constructors/Input/index.ts +5 -0
- package/src/constructors/Input/properties.json +2 -0
- package/src/constructors/Input/props.ts +53 -0
- package/src/constructors/Input/style.scss +5 -0
- package/src/constructors/Input/types.ts +48 -0
- package/src/constructors/List/List.ts +36 -11
- package/src/constructors/List/ListControl.ts +2 -2
- package/src/constructors/List/ListDesign.tsx +59 -38
- package/src/constructors/List/ListGo.ts +5 -3
- package/src/constructors/List/properties.json +16 -16
- package/src/constructors/List/props.ts +7 -0
- package/src/constructors/List/style.scss +14 -0
- package/src/constructors/List/types.ts +9 -9
- package/src/constructors/ListGroup/ListGroupDesign.tsx +8 -3
- package/src/constructors/ListGroup/basicTypes.ts +7 -0
- package/src/constructors/ListGroup/properties.json +15 -15
- package/src/constructors/ListGroup/props.ts +4 -4
- package/src/constructors/ListGroup/types.ts +2 -1
- package/src/constructors/ListItem/ListItem.ts +67 -7
- package/src/constructors/ListItem/ListItemDesign.tsx +13 -10
- package/src/constructors/ListItem/properties.json +52 -52
- package/src/constructors/ListItem/props.ts +24 -15
- package/src/constructors/ListItem/types.ts +12 -12
- package/src/constructors/ListMenu/ListMenu.ts +2 -1
- package/src/constructors/ListMenu/ListMenuDesign.tsx +3 -3
- package/src/constructors/ListMenu/properties.json +19 -19
- package/src/constructors/ListMenu/types.ts +3 -3
- package/src/constructors/Mask/MaskDesign.tsx +33 -28
- package/src/constructors/Mask/MaskEvent.ts +41 -2
- package/src/constructors/Mask/MaskInclude.ts +147 -0
- package/src/constructors/Mask/basicTypes.ts +19 -1
- package/src/constructors/Mask/properties.json +30 -29
- package/src/constructors/Mask/props.ts +1 -1
- package/src/constructors/Mask/style.scss +2 -4
- package/src/constructors/Mask/types.ts +4 -4
- package/src/constructors/Menu/Menu.ts +17 -5
- package/src/constructors/Menu/MenuDesign.tsx +11 -11
- package/src/constructors/Menu/MenuGo.ts +72 -0
- package/src/constructors/Menu/MenuInclude.ts +20 -10
- package/src/constructors/Menu/MenuSearch.ts +20 -1
- package/src/constructors/Menu/MenuValue.ts +7 -3
- package/src/constructors/Menu/MenuWindow.ts +2 -1
- package/src/constructors/Menu/basicTypes.ts +21 -4
- package/src/constructors/Menu/properties.json +17 -17
- package/src/constructors/Menu/props.ts +15 -3
- package/src/constructors/Menu/types.ts +6 -16
- package/src/constructors/Modal/Modal.ts +53 -0
- package/src/constructors/Modal/ModalAbstract.ts +74 -0
- package/src/constructors/Modal/ModalDesign.tsx +63 -0
- package/src/constructors/Modal/ModalDesignAbstract.tsx +226 -0
- package/src/constructors/Modal/basicTypes.ts +0 -0
- package/src/constructors/Modal/index.ts +5 -0
- package/src/constructors/Modal/properties.json +17 -0
- package/src/constructors/Modal/props.ts +45 -0
- package/src/constructors/Modal/style.scss +20 -0
- package/src/constructors/Modal/types.ts +62 -0
- package/src/constructors/MotionTransform/MotionTransform.ts +65 -8
- package/src/constructors/MotionTransform/MotionTransformDesign.tsx +55 -21
- package/src/constructors/MotionTransform/MotionTransformElement.ts +7 -2
- package/src/constructors/MotionTransform/MotionTransformInclude.ts +2 -1
- package/src/constructors/MotionTransform/MotionTransformState.ts +5 -0
- package/src/constructors/MotionTransform/basicTypes.ts +18 -2
- package/src/constructors/MotionTransform/properties.json +35 -35
- package/src/constructors/MotionTransform/props.ts +13 -7
- package/src/constructors/MotionTransform/style.scss +24 -2
- package/src/constructors/MotionTransform/types.ts +7 -7
- package/src/constructors/Progress/Progress.ts +12 -2
- package/src/constructors/Progress/ProgressDesign.tsx +75 -53
- package/src/constructors/Progress/ProgressInclude.ts +13 -1
- package/src/constructors/Progress/properties.json +47 -47
- package/src/constructors/Progress/props.ts +5 -1
- package/src/constructors/Progress/style.scss +2 -2
- package/src/constructors/Progress/types.ts +4 -4
- package/src/constructors/Ripple/Ripple.ts +1 -1
- package/src/constructors/Ripple/RippleDesign.tsx +7 -4
- package/src/constructors/Ripple/RippleItem.ts +1 -1
- package/src/constructors/Ripple/style.scss +4 -0
- package/src/constructors/Ripple/types.ts +2 -2
- package/src/constructors/Scrollbar/Scrollbar.ts +3 -3
- package/src/constructors/Scrollbar/ScrollbarDesign.tsx +1 -1
- package/src/constructors/Scrollbar/properties.json +33 -33
- package/src/constructors/Scrollbar/types.ts +1 -1
- package/src/constructors/Section/Section.ts +33 -0
- package/src/constructors/Section/SectionDesign.tsx +127 -0
- package/src/constructors/Section/basicTypes.ts +0 -0
- package/src/constructors/Section/index.ts +5 -0
- package/src/constructors/Section/properties.json +2 -0
- package/src/constructors/Section/props.ts +29 -0
- package/src/constructors/Section/style.scss +5 -0
- package/src/constructors/Section/types.ts +47 -0
- package/src/constructors/Select/Select.ts +172 -0
- package/src/constructors/Select/SelectDesign.tsx +288 -0
- package/src/constructors/Select/SelectFilter.ts +43 -0
- package/src/constructors/Select/SelectInput.ts +68 -0
- package/src/constructors/Select/basicTypes.ts +0 -0
- package/src/constructors/Select/index.ts +5 -0
- package/src/constructors/Select/properties.json +3 -0
- package/src/constructors/Select/props.ts +63 -0
- package/src/constructors/Select/style.scss +5 -0
- package/src/constructors/Select/types.ts +53 -0
- package/src/constructors/SelectValue/SelectValue.ts +95 -0
- package/src/constructors/SelectValue/SelectValueDesign.tsx +198 -0
- package/src/constructors/SelectValue/SelectValueInclude.ts +92 -0
- package/src/constructors/SelectValue/basicTypes.ts +17 -0
- package/src/constructors/SelectValue/index.ts +6 -0
- package/src/constructors/SelectValue/properties.json +7 -0
- package/src/constructors/SelectValue/props.ts +48 -0
- package/src/constructors/SelectValue/style.scss +14 -0
- package/src/constructors/SelectValue/types.ts +47 -0
- package/src/constructors/Skeleton/Skeleton.ts +1 -3
- package/src/constructors/Skeleton/SkeletonDesign.tsx +7 -1
- package/src/constructors/Skeleton/SkeletonInclude.ts +5 -0
- package/src/constructors/Skeleton/properties.json +24 -24
- package/src/constructors/Skeleton/types.ts +1 -1
- package/src/constructors/TextareaAutosize/TextareaAutosize.ts +41 -0
- package/src/constructors/TextareaAutosize/TextareaAutosizeDesign.tsx +147 -0
- package/src/constructors/TextareaAutosize/TextareaAutosizeResize.ts +109 -0
- package/src/constructors/TextareaAutosize/TextareaAutosizeValue.ts +69 -0
- package/src/constructors/TextareaAutosize/basicTypes.ts +0 -0
- package/src/constructors/TextareaAutosize/index.ts +5 -0
- package/src/constructors/TextareaAutosize/properties.json +6 -0
- package/src/constructors/TextareaAutosize/props.ts +34 -0
- package/src/constructors/TextareaAutosize/style.scss +31 -0
- package/src/constructors/TextareaAutosize/types.ts +50 -0
- package/src/constructors/Tooltip/Tooltip.ts +138 -0
- package/src/constructors/Tooltip/TooltipClasses.ts +90 -0
- package/src/constructors/Tooltip/TooltipDesign.tsx +198 -0
- package/src/constructors/Tooltip/TooltipEvent.ts +103 -0
- package/src/constructors/Tooltip/TooltipInclude.ts +114 -0
- package/src/constructors/Tooltip/TooltipOpen.ts +128 -0
- package/src/constructors/Tooltip/TooltipPosition.ts +92 -0
- package/src/constructors/Tooltip/TooltipStatus.ts +97 -0
- package/src/constructors/Tooltip/TooltipStyle.ts +123 -0
- package/src/constructors/Tooltip/basicTypes.ts +39 -0
- package/src/constructors/Tooltip/index.ts +6 -0
- package/src/constructors/Tooltip/properties.json +14 -0
- package/src/constructors/Tooltip/props.ts +49 -0
- package/src/constructors/Tooltip/style.scss +43 -0
- package/src/constructors/Tooltip/types.ts +58 -0
- package/src/constructors/Window/Window.ts +52 -16
- package/src/constructors/Window/WindowClasses.ts +33 -0
- package/src/constructors/Window/WindowClient.ts +39 -0
- package/src/constructors/Window/WindowDesign.tsx +31 -14
- package/src/constructors/Window/WindowEsc.ts +114 -0
- package/src/constructors/Window/WindowHidden.ts +120 -0
- package/src/constructors/Window/WindowInclude.ts +2 -2
- package/src/constructors/Window/WindowOpen.ts +10 -1
- package/src/constructors/Window/WindowOrigin.ts +5 -1
- package/src/constructors/Window/WindowStatic.ts +3 -1
- package/src/constructors/Window/WindowVerification.ts +8 -5
- package/src/constructors/Window/basicTypes.ts +26 -16
- package/src/constructors/Window/properties.json +239 -236
- package/src/constructors/Window/props.ts +10 -1
- package/src/constructors/Window/style.scss +11 -0
- package/src/constructors/Window/types.ts +2 -2
- package/src/functions/{getClassTegAStatic.ts → getClassTagAStatic.ts} +1 -1
- package/src/library.ts +13 -1
- package/src/types/ariaTypes.ts +366 -0
- package/src/types/descriptionTypes.ts +8 -0
- package/src/types/fieldTypes.ts +120 -16
- package/src/types/labelTypes.ts +39 -0
- package/src/types/modelTypes.ts +16 -0
- package/src/types/roleTypes.ts +88 -0
- package/src/types/textTypes.ts +33 -0
- package/src/types/touchEventTypes.ts +43 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ModalDesignAbstract } from './ModalDesignAbstract'
|
|
2
|
+
import { Modal } from './Modal'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type ModalPropsBasic
|
|
6
|
+
} from './props'
|
|
7
|
+
import {
|
|
8
|
+
type ModalClasses,
|
|
9
|
+
type ModalComponents,
|
|
10
|
+
type ModalEmits,
|
|
11
|
+
type ModalExpose,
|
|
12
|
+
type ModalSlots
|
|
13
|
+
} from './types'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* ModalDesign
|
|
17
|
+
*/
|
|
18
|
+
export class ModalDesign<
|
|
19
|
+
COMP extends ModalComponents,
|
|
20
|
+
EXPOSE extends ModalExpose,
|
|
21
|
+
CLASSES extends ModalClasses,
|
|
22
|
+
P extends ModalPropsBasic
|
|
23
|
+
> extends ModalDesignAbstract<
|
|
24
|
+
COMP,
|
|
25
|
+
ModalEmits,
|
|
26
|
+
EXPOSE,
|
|
27
|
+
ModalSlots,
|
|
28
|
+
CLASSES,
|
|
29
|
+
P,
|
|
30
|
+
Modal
|
|
31
|
+
> {
|
|
32
|
+
protected initItem(): Modal {
|
|
33
|
+
return new Modal(
|
|
34
|
+
this.props,
|
|
35
|
+
this.refs,
|
|
36
|
+
this.element,
|
|
37
|
+
this.getDesign(),
|
|
38
|
+
this.getName(),
|
|
39
|
+
this.components,
|
|
40
|
+
this.slots,
|
|
41
|
+
this.emits
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Improvement of the obtained list of classes.
|
|
47
|
+
*
|
|
48
|
+
* Доработка полученного списка классов.
|
|
49
|
+
*/
|
|
50
|
+
protected initClasses(): Partial<CLASSES> {
|
|
51
|
+
return {
|
|
52
|
+
main: {},
|
|
53
|
+
...{
|
|
54
|
+
// :classes [!] System label / Системная метка
|
|
55
|
+
title: this.getSubClass('title'),
|
|
56
|
+
header: this.getSubClass('header'),
|
|
57
|
+
body: this.getSubClass('body'),
|
|
58
|
+
footer: this.getSubClass('footer')
|
|
59
|
+
// :classes [!] System label / Системная метка
|
|
60
|
+
}
|
|
61
|
+
} as Partial<CLASSES>
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { h, type VNode } from 'vue'
|
|
2
|
+
import {
|
|
3
|
+
type ConstrOptions,
|
|
4
|
+
type ConstrStyles,
|
|
5
|
+
DesignConstructorAbstract,
|
|
6
|
+
toBinds
|
|
7
|
+
} from '@dxtmisha/functional'
|
|
8
|
+
|
|
9
|
+
import type { ModalAbstract } from './ModalAbstract'
|
|
10
|
+
import type { WindowControlItem } from '../Window'
|
|
11
|
+
import {
|
|
12
|
+
type ModalPropsBasic
|
|
13
|
+
} from './props'
|
|
14
|
+
import {
|
|
15
|
+
type ModalClasses,
|
|
16
|
+
type ModalComponents,
|
|
17
|
+
type ModalEmits,
|
|
18
|
+
type ModalExpose,
|
|
19
|
+
type ModalSlots
|
|
20
|
+
} from './types'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* ModalDesign
|
|
24
|
+
*/
|
|
25
|
+
export abstract class ModalDesignAbstract<
|
|
26
|
+
COMP extends ModalComponents,
|
|
27
|
+
EMITS extends ModalEmits,
|
|
28
|
+
EXPOSE extends ModalExpose,
|
|
29
|
+
SLOTS extends ModalSlots,
|
|
30
|
+
CLASSES extends ModalClasses,
|
|
31
|
+
P extends ModalPropsBasic,
|
|
32
|
+
ITEM extends ModalAbstract = ModalAbstract
|
|
33
|
+
> extends DesignConstructorAbstract<
|
|
34
|
+
HTMLDivElement,
|
|
35
|
+
COMP,
|
|
36
|
+
EMITS,
|
|
37
|
+
EXPOSE,
|
|
38
|
+
SLOTS,
|
|
39
|
+
CLASSES,
|
|
40
|
+
P
|
|
41
|
+
> {
|
|
42
|
+
protected readonly item: ITEM
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Constructor
|
|
46
|
+
* @param name class name/ название класса
|
|
47
|
+
* @param props properties/ свойства
|
|
48
|
+
* @param options list of additional parameters/ список дополнительных параметров
|
|
49
|
+
*/
|
|
50
|
+
constructor(
|
|
51
|
+
name: string,
|
|
52
|
+
props: Readonly<P>,
|
|
53
|
+
options?: ConstrOptions<COMP, EMITS, P>
|
|
54
|
+
) {
|
|
55
|
+
super(
|
|
56
|
+
name,
|
|
57
|
+
props,
|
|
58
|
+
options
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
this.item = this.initItem()
|
|
62
|
+
this.init()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Initialization of the main item
|
|
67
|
+
*
|
|
68
|
+
* Инициализация основного элемента
|
|
69
|
+
*/
|
|
70
|
+
protected abstract initItem(): ITEM
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Initialization of all the necessary properties for work
|
|
74
|
+
*
|
|
75
|
+
* Инициализация всех необходимых свойств для работы.
|
|
76
|
+
*/
|
|
77
|
+
protected initExpose(): EXPOSE {
|
|
78
|
+
return {
|
|
79
|
+
...this.item.window.expose
|
|
80
|
+
} as EXPOSE
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Refinement of the received list of styles.
|
|
85
|
+
*
|
|
86
|
+
* Доработка полученного списка стилей.
|
|
87
|
+
*/
|
|
88
|
+
protected initStyles(): ConstrStyles {
|
|
89
|
+
return {}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A method for rendering.
|
|
94
|
+
*
|
|
95
|
+
* Метод для рендеринга.
|
|
96
|
+
*/
|
|
97
|
+
protected initRender(): VNode[] {
|
|
98
|
+
return this.item.window.render(
|
|
99
|
+
{
|
|
100
|
+
control: this.renderControl,
|
|
101
|
+
title: this.renderTitle,
|
|
102
|
+
default: this.renderDefault,
|
|
103
|
+
footer: this.renderFooter
|
|
104
|
+
},
|
|
105
|
+
toBinds(
|
|
106
|
+
{
|
|
107
|
+
class: this.classes?.value.main
|
|
108
|
+
},
|
|
109
|
+
this.getAttrs()
|
|
110
|
+
)
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Generates data for control.<br>
|
|
116
|
+
* Генерирует данные для контроля.
|
|
117
|
+
* @param props data for the transferable property/ данные для передаваемого свойства
|
|
118
|
+
*/
|
|
119
|
+
protected readonly renderControl = (
|
|
120
|
+
props: WindowControlItem
|
|
121
|
+
): VNode | undefined => {
|
|
122
|
+
return this.initSlot('control', undefined, props)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Generates data for the header.
|
|
127
|
+
*
|
|
128
|
+
* Генерирует данные для заголовка.
|
|
129
|
+
* @param props data for the transferable property/ данные для передаваемого свойства
|
|
130
|
+
*/
|
|
131
|
+
protected readonly renderTitle = (
|
|
132
|
+
props: WindowControlItem
|
|
133
|
+
): VNode[] => {
|
|
134
|
+
const children: any[] = []
|
|
135
|
+
|
|
136
|
+
if (this.item.bars.is.value) {
|
|
137
|
+
children.push(...this.item.bars.render())
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (
|
|
141
|
+
this.slots
|
|
142
|
+
&& 'title' in this.slots
|
|
143
|
+
) {
|
|
144
|
+
children.push(
|
|
145
|
+
h(
|
|
146
|
+
'div',
|
|
147
|
+
{ class: this.classes?.value.title },
|
|
148
|
+
this.initSlot('title', undefined, props)
|
|
149
|
+
)
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return children
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Generates bodies.
|
|
158
|
+
*
|
|
159
|
+
* Генерирует тела.
|
|
160
|
+
* @param props data for the transferable property/ данные для передаваемого свойства
|
|
161
|
+
*/
|
|
162
|
+
protected readonly renderDefault = (
|
|
163
|
+
props: WindowControlItem
|
|
164
|
+
): VNode[] => {
|
|
165
|
+
const children: any[] = []
|
|
166
|
+
|
|
167
|
+
if (
|
|
168
|
+
this.slots
|
|
169
|
+
&& 'header' in this.slots
|
|
170
|
+
) {
|
|
171
|
+
children.push(
|
|
172
|
+
h(
|
|
173
|
+
'div',
|
|
174
|
+
{ class: this.classes?.value.header },
|
|
175
|
+
this.initSlot('header', undefined, props)
|
|
176
|
+
)
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (
|
|
181
|
+
this.slots
|
|
182
|
+
&& 'default' in this.slots
|
|
183
|
+
) {
|
|
184
|
+
children.push(
|
|
185
|
+
h(
|
|
186
|
+
'div',
|
|
187
|
+
{ class: this.classes?.value.body },
|
|
188
|
+
this.initSlot('default', undefined, props)
|
|
189
|
+
)
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return children
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Generates data for the required part.
|
|
198
|
+
*
|
|
199
|
+
* Генерирует данные для нужной части.
|
|
200
|
+
* @param props data for the transferable property/ данные для передаваемого свойства
|
|
201
|
+
*/
|
|
202
|
+
protected readonly renderFooter = (
|
|
203
|
+
props: WindowControlItem
|
|
204
|
+
): VNode[] => {
|
|
205
|
+
const children: any[] = []
|
|
206
|
+
|
|
207
|
+
if (this.item.actions.is.value) {
|
|
208
|
+
children.push(...this.item.actions.render())
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (
|
|
212
|
+
this.slots
|
|
213
|
+
&& 'footer' in this.slots
|
|
214
|
+
) {
|
|
215
|
+
children.push(
|
|
216
|
+
h(
|
|
217
|
+
'div',
|
|
218
|
+
{ class: this.classes?.value.footer },
|
|
219
|
+
this.initSlot('footer', undefined, props)
|
|
220
|
+
)
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return children
|
|
225
|
+
}
|
|
226
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { WindowPropsBasic, WindowPropsInclude } from '../Window'
|
|
2
|
+
import type { BarsPropsBasic, BarsPropsInclude } from '../Bars'
|
|
3
|
+
import type { ActionsPropsBasic, ActionsPropsInclude } from '../Actions'
|
|
4
|
+
import type { ImagePropsBasic, ImagePropsInclude } from '../Image'
|
|
5
|
+
|
|
6
|
+
interface ModalPropsToken {
|
|
7
|
+
// :type [!] System label / Системная метка
|
|
8
|
+
imagePosition?: 'top' | 'left'
|
|
9
|
+
// :type [!] System label / Системная метка
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ModalPropsBasic<
|
|
13
|
+
Window extends WindowPropsBasic = WindowPropsBasic,
|
|
14
|
+
Bars extends BarsPropsBasic = BarsPropsBasic,
|
|
15
|
+
Actions extends ActionsPropsBasic = ActionsPropsBasic,
|
|
16
|
+
Image extends ImagePropsBasic = ImagePropsBasic
|
|
17
|
+
> extends WindowPropsInclude<Window>,
|
|
18
|
+
BarsPropsInclude<Bars>,
|
|
19
|
+
ActionsPropsInclude<Actions>,
|
|
20
|
+
ImagePropsInclude<Image> {
|
|
21
|
+
// Status
|
|
22
|
+
open?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Type describing incoming properties.
|
|
27
|
+
*
|
|
28
|
+
* Тип, описывающий входящие свойства.
|
|
29
|
+
*/
|
|
30
|
+
export interface ModalProps extends ModalPropsBasic, ModalPropsToken {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Default value for property.
|
|
35
|
+
*
|
|
36
|
+
* Значение по умолчанию для свойства.
|
|
37
|
+
*/
|
|
38
|
+
export const defaultsModal = {
|
|
39
|
+
barsBackHide: true,
|
|
40
|
+
...{
|
|
41
|
+
// :default [!] System label / Системная метка
|
|
42
|
+
imagePosition: 'top'
|
|
43
|
+
// :default [!] System label / Системная метка
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@use "@dxtmisha/styles/properties" as ui;
|
|
2
|
+
|
|
3
|
+
@mixin mixinModal {
|
|
4
|
+
@include ui.initByCustomDesign('window.iconPaddingX', ui.v('??paddingX'));
|
|
5
|
+
@include ui.initByCustomDesign('window.iconPaddingY', ui.v('??paddingY'));
|
|
6
|
+
|
|
7
|
+
&__title,
|
|
8
|
+
&__header,
|
|
9
|
+
&__body,
|
|
10
|
+
&__footer {
|
|
11
|
+
@include ui.paddingX(ui.v('??paddingX'));
|
|
12
|
+
@include ui.paddingY(ui.v('??paddingY'));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__footer {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ConstrClass } from '@dxtmisha/functional'
|
|
2
|
+
import type {
|
|
3
|
+
WindowComponentInclude,
|
|
4
|
+
WindowControlItem,
|
|
5
|
+
WindowEmitsInclude,
|
|
6
|
+
WindowExposeInclude,
|
|
7
|
+
WindowSlots
|
|
8
|
+
} from '../Window'
|
|
9
|
+
import type { BarsComponentInclude, BarsEmitsInclude } from '../Bars'
|
|
10
|
+
import type { ActionsComponentInclude, ActionsEmitsInclude } from '../Actions'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Interface for describing which components need to be connected for work.
|
|
14
|
+
*
|
|
15
|
+
* Интерфейс для описания, какие компоненты надо подключить для работы.
|
|
16
|
+
*/
|
|
17
|
+
export type ModalComponents
|
|
18
|
+
= WindowComponentInclude
|
|
19
|
+
& BarsComponentInclude
|
|
20
|
+
& ActionsComponentInclude
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Type describing available events.
|
|
24
|
+
*
|
|
25
|
+
* Тип, описывающий доступные события.
|
|
26
|
+
*/
|
|
27
|
+
export type ModalEmits
|
|
28
|
+
= WindowEmitsInclude
|
|
29
|
+
& BarsEmitsInclude
|
|
30
|
+
& ActionsEmitsInclude
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Type describing available properties.
|
|
34
|
+
*
|
|
35
|
+
* Тип, описывающий доступные свойства.
|
|
36
|
+
*/
|
|
37
|
+
export interface ModalExpose extends WindowExposeInclude {
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Type describing available slots.
|
|
42
|
+
*
|
|
43
|
+
* Тип, описывающий доступные слоты.
|
|
44
|
+
*/
|
|
45
|
+
export interface ModalSlots extends WindowSlots {
|
|
46
|
+
header(props: WindowControlItem): any
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Type describing subclasses.
|
|
51
|
+
*
|
|
52
|
+
* Тип, описывающий подклассы.
|
|
53
|
+
*/
|
|
54
|
+
export type ModalClasses = {
|
|
55
|
+
main: ConstrClass
|
|
56
|
+
// :classes [!] System label / Системная метка
|
|
57
|
+
title: string
|
|
58
|
+
header: string
|
|
59
|
+
body: string
|
|
60
|
+
footer: string
|
|
61
|
+
// :classes [!] System label / Системная метка
|
|
62
|
+
}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { onUnmounted, type Ref, type ToRefs, watch } from 'vue'
|
|
1
|
+
import { computed, onUnmounted, type Ref, type ToRefs, watch } from 'vue'
|
|
2
2
|
import { type ConstrEmit, DesignComp } from '@dxtmisha/functional'
|
|
3
3
|
|
|
4
|
+
import { AriaStaticInclude } from '../../classes/AriaStaticInclude'
|
|
5
|
+
import { ModelInclude } from '../../classes/ModelInclude'
|
|
6
|
+
import { TabIndexInclude } from '../../classes/TabIndexInclude'
|
|
7
|
+
|
|
4
8
|
import { MotionTransformElement } from './MotionTransformElement'
|
|
5
9
|
import { MotionTransformSize } from './MotionTransformSize'
|
|
6
10
|
import { MotionTransformState } from './MotionTransformState'
|
|
7
11
|
import { MotionTransformEvent } from './MotionTransformEvent'
|
|
8
12
|
import { MotionTransformGo } from './MotionTransformGo'
|
|
9
13
|
|
|
10
|
-
import
|
|
14
|
+
import { WindowEsc } from '../Window/WindowEsc'
|
|
15
|
+
|
|
16
|
+
import type { RoleType } from '../../types/roleTypes'
|
|
17
|
+
import type {
|
|
18
|
+
MotionTransformComponents,
|
|
19
|
+
MotionTransformEmits,
|
|
20
|
+
MotionTransformSlots
|
|
21
|
+
} from './types'
|
|
11
22
|
import type { MotionTransformProps } from './props'
|
|
12
23
|
import type { MotionTransformControlItem } from './basicTypes'
|
|
13
|
-
import { ModelInclude } from '../../classes/ModelInclude'
|
|
14
24
|
|
|
15
25
|
/**
|
|
16
26
|
* MotionTransform
|
|
@@ -18,6 +28,7 @@ import { ModelInclude } from '../../classes/ModelInclude'
|
|
|
18
28
|
export class MotionTransform {
|
|
19
29
|
/** Reference helper for element interactions/ Вспомогательный класс для работы с элементами */
|
|
20
30
|
readonly element: MotionTransformElement
|
|
31
|
+
readonly tabIndex: TabIndexInclude<HTMLDivElement>
|
|
21
32
|
|
|
22
33
|
/** Size calculation manager/ Менеджер расчёта размеров */
|
|
23
34
|
readonly size: MotionTransformSize
|
|
@@ -29,6 +40,9 @@ export class MotionTransform {
|
|
|
29
40
|
/** Control actions manager/ Менеджер действий управления */
|
|
30
41
|
readonly go: MotionTransformGo
|
|
31
42
|
|
|
43
|
+
/** Window esc manager/ Менеджер esc окна */
|
|
44
|
+
readonly esc: WindowEsc
|
|
45
|
+
|
|
32
46
|
/**
|
|
33
47
|
* Constructor
|
|
34
48
|
* @param props input data/ входные данные
|
|
@@ -58,13 +72,27 @@ export class MotionTransform {
|
|
|
58
72
|
elementContext,
|
|
59
73
|
className
|
|
60
74
|
)
|
|
75
|
+
this.tabIndex = new TabIndexInclude(
|
|
76
|
+
() => this.element.getElementBody()
|
|
77
|
+
)
|
|
61
78
|
|
|
62
79
|
this.size = new MotionTransformSize(this.element)
|
|
63
|
-
this.state = new MotionTransformState(
|
|
80
|
+
this.state = new MotionTransformState(
|
|
81
|
+
props,
|
|
82
|
+
this.element,
|
|
83
|
+
this.tabIndex,
|
|
84
|
+
this.size
|
|
85
|
+
)
|
|
64
86
|
|
|
65
87
|
this.event = new MotionTransformEvent(props, this.element, this.state, emits)
|
|
66
88
|
this.go = new MotionTransformGo(this.state)
|
|
67
89
|
|
|
90
|
+
this.esc = new WindowEsc(
|
|
91
|
+
this.state.open,
|
|
92
|
+
() => this.go.close(),
|
|
93
|
+
() => this.element.isWindow()
|
|
94
|
+
)
|
|
95
|
+
|
|
68
96
|
new ModelInclude('open', this.emits, this.state.open)
|
|
69
97
|
|
|
70
98
|
watch([refs.open], () => this.state.set(Boolean(props.open)))
|
|
@@ -72,16 +100,45 @@ export class MotionTransform {
|
|
|
72
100
|
onUnmounted(() => this.event.stop())
|
|
73
101
|
}
|
|
74
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Computed slot data for managing slots/
|
|
105
|
+
* Вычисляемые данные слотов для управления слотами
|
|
106
|
+
*/
|
|
107
|
+
readonly slotData = computed<MotionTransformControlItem>(() => {
|
|
108
|
+
return {
|
|
109
|
+
isOpen: this.state.isOpen,
|
|
110
|
+
isShow: this.state.isShow,
|
|
111
|
+
classes: MotionTransformElement.getClassesList(this.className),
|
|
112
|
+
idControl: this.element.idControl,
|
|
113
|
+
idBody: this.element.idBody,
|
|
114
|
+
binds: AriaStaticInclude.control(
|
|
115
|
+
this.element.idControl,
|
|
116
|
+
this.element.idBody,
|
|
117
|
+
undefined,
|
|
118
|
+
this.state.isOpen.value
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
|
|
75
123
|
/**
|
|
76
124
|
* Returns data for managing slot data.
|
|
77
125
|
*
|
|
78
126
|
* Возвращает данные для управления данными слотами.
|
|
79
127
|
*/
|
|
80
128
|
getSlotData(): MotionTransformControlItem {
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
129
|
+
return this.slotData.value
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Get the ARIA role.
|
|
134
|
+
*
|
|
135
|
+
* Получить ARIA роль.
|
|
136
|
+
*/
|
|
137
|
+
getRole(): RoleType {
|
|
138
|
+
if (this.element.isWindow()) {
|
|
139
|
+
return 'dialog'
|
|
85
140
|
}
|
|
141
|
+
|
|
142
|
+
return 'region'
|
|
86
143
|
}
|
|
87
144
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { h, ref, Teleport, type VNode } from 'vue'
|
|
1
|
+
import { computed, h, ref, Teleport, type VNode } from 'vue'
|
|
2
2
|
import {
|
|
3
3
|
type ConstrOptions,
|
|
4
4
|
type ConstrStyles,
|
|
5
5
|
DesignConstructorAbstract
|
|
6
6
|
} from '@dxtmisha/functional'
|
|
7
7
|
|
|
8
|
+
import { AriaStaticInclude } from '../../classes/AriaStaticInclude'
|
|
8
9
|
import { MotionTransform } from './MotionTransform'
|
|
9
10
|
|
|
10
11
|
import {
|
|
@@ -155,13 +156,7 @@ export class MotionTransformDesign<
|
|
|
155
156
|
return [
|
|
156
157
|
h(
|
|
157
158
|
'div',
|
|
158
|
-
|
|
159
|
-
...this.getAttrs(),
|
|
160
|
-
ref: this.element,
|
|
161
|
-
key: 'main',
|
|
162
|
-
class: this.classes?.value.main,
|
|
163
|
-
onTransitionend: this.item.event.onTransitionend
|
|
164
|
-
},
|
|
159
|
+
this.propsMain.value,
|
|
165
160
|
[
|
|
166
161
|
...this.renderHead(),
|
|
167
162
|
...this.renderBody()
|
|
@@ -175,15 +170,11 @@ export class MotionTransformDesign<
|
|
|
175
170
|
*
|
|
176
171
|
* Рендеринг заголовка.
|
|
177
172
|
*/
|
|
178
|
-
readonly renderHead = ()
|
|
173
|
+
readonly renderHead = () => {
|
|
179
174
|
return [
|
|
180
175
|
h(
|
|
181
176
|
'div',
|
|
182
|
-
|
|
183
|
-
key: 'head',
|
|
184
|
-
class: this.classes?.value.head,
|
|
185
|
-
onClick: this.item.event.onClick
|
|
186
|
-
},
|
|
177
|
+
this.propsHead.value,
|
|
187
178
|
this.initSlot(
|
|
188
179
|
'head',
|
|
189
180
|
undefined,
|
|
@@ -198,15 +189,15 @@ export class MotionTransformDesign<
|
|
|
198
189
|
*
|
|
199
190
|
* Рендеринг содержимого.
|
|
200
191
|
*/
|
|
201
|
-
readonly renderBody = ()
|
|
202
|
-
if (
|
|
192
|
+
readonly renderBody = () => {
|
|
193
|
+
if (
|
|
194
|
+
this.props.inDom
|
|
195
|
+
|| this.item.state.isShow.value
|
|
196
|
+
) {
|
|
203
197
|
return [
|
|
204
198
|
h(
|
|
205
|
-
'div',
|
|
206
|
-
|
|
207
|
-
key: 'body',
|
|
208
|
-
class: this.classes?.value.body
|
|
209
|
-
},
|
|
199
|
+
this.props.tagBody ?? 'div',
|
|
200
|
+
this.propsBody.value,
|
|
210
201
|
this.initSlot(
|
|
211
202
|
'body',
|
|
212
203
|
undefined,
|
|
@@ -239,4 +230,47 @@ export class MotionTransformDesign<
|
|
|
239
230
|
|
|
240
231
|
return []
|
|
241
232
|
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Props for the main element.
|
|
236
|
+
*
|
|
237
|
+
* Свойства для главного элемента.
|
|
238
|
+
*/
|
|
239
|
+
protected readonly propsMain = computed(() => ({
|
|
240
|
+
...this.getAttrs(),
|
|
241
|
+
ref: this.element,
|
|
242
|
+
key: 'main',
|
|
243
|
+
class: this.classes?.value.main,
|
|
244
|
+
onTransitionend: this.item.event.onTransitionend
|
|
245
|
+
}))
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Props for the head element.
|
|
249
|
+
*
|
|
250
|
+
* Свойства для элемента заголовка.
|
|
251
|
+
*/
|
|
252
|
+
protected readonly propsHead = computed(() => ({
|
|
253
|
+
key: 'head',
|
|
254
|
+
class: this.classes?.value.head,
|
|
255
|
+
onClick: this.item.event.onClick
|
|
256
|
+
}))
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Props for the body element.
|
|
260
|
+
*
|
|
261
|
+
* Свойства для элемента тела.
|
|
262
|
+
*/
|
|
263
|
+
protected readonly propsBody = computed(() => {
|
|
264
|
+
return {
|
|
265
|
+
key: 'body',
|
|
266
|
+
id: this.item.element.idBody,
|
|
267
|
+
class: this.classes?.value.body,
|
|
268
|
+
...AriaStaticInclude.role(this.item.getRole()),
|
|
269
|
+
...AriaStaticInclude.modal(
|
|
270
|
+
this.item.element.isWindow(),
|
|
271
|
+
this.props.ariaLabelledby,
|
|
272
|
+
this.props.ariaDescribedby
|
|
273
|
+
)
|
|
274
|
+
}
|
|
275
|
+
})
|
|
242
276
|
}
|