@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,198 @@
|
|
|
1
|
+
import { h, type VNode } from 'vue'
|
|
2
|
+
import {
|
|
3
|
+
type ConstrOptions,
|
|
4
|
+
type ConstrStyles,
|
|
5
|
+
DesignConstructorAbstract, toBinds
|
|
6
|
+
} from '@dxtmisha/functional'
|
|
7
|
+
|
|
8
|
+
import { SelectValue } from './SelectValue'
|
|
9
|
+
|
|
10
|
+
import type { ChipGroupItem } from '../ChipGroup'
|
|
11
|
+
import {
|
|
12
|
+
type SelectValuePropsBasic
|
|
13
|
+
} from './props'
|
|
14
|
+
import {
|
|
15
|
+
type SelectValueClasses,
|
|
16
|
+
type SelectValueComponents,
|
|
17
|
+
type SelectValueEmits,
|
|
18
|
+
type SelectValueExpose,
|
|
19
|
+
type SelectValueSlots
|
|
20
|
+
} from './types'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* SelectValueDesign
|
|
24
|
+
*/
|
|
25
|
+
export class SelectValueDesign<
|
|
26
|
+
COMP extends SelectValueComponents,
|
|
27
|
+
EXPOSE extends SelectValueExpose,
|
|
28
|
+
CLASSES extends SelectValueClasses,
|
|
29
|
+
P extends SelectValuePropsBasic
|
|
30
|
+
> extends DesignConstructorAbstract<
|
|
31
|
+
HTMLDivElement,
|
|
32
|
+
COMP,
|
|
33
|
+
SelectValueEmits,
|
|
34
|
+
EXPOSE,
|
|
35
|
+
SelectValueSlots,
|
|
36
|
+
CLASSES,
|
|
37
|
+
P
|
|
38
|
+
> {
|
|
39
|
+
protected readonly item: SelectValue
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Constructor
|
|
43
|
+
* @param name class name/ название класса
|
|
44
|
+
* @param props properties/ свойства
|
|
45
|
+
* @param options list of additional parameters/ список дополнительных параметров
|
|
46
|
+
*/
|
|
47
|
+
constructor(
|
|
48
|
+
name: string,
|
|
49
|
+
props: Readonly<P>,
|
|
50
|
+
options?: ConstrOptions<COMP, SelectValueEmits, P>
|
|
51
|
+
) {
|
|
52
|
+
super(
|
|
53
|
+
name,
|
|
54
|
+
props,
|
|
55
|
+
options
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
this.item = new SelectValue(
|
|
59
|
+
this.props,
|
|
60
|
+
this.refs,
|
|
61
|
+
this.element,
|
|
62
|
+
this.getDesign(),
|
|
63
|
+
this.getName(),
|
|
64
|
+
this.components,
|
|
65
|
+
this.slots,
|
|
66
|
+
this.emits
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
this.init()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Initialization of all the necessary properties for work
|
|
74
|
+
*
|
|
75
|
+
* Инициализация всех необходимых свойств для работы.
|
|
76
|
+
*/
|
|
77
|
+
protected initExpose(): EXPOSE {
|
|
78
|
+
return {} as EXPOSE
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Improvement of the obtained list of classes.
|
|
83
|
+
*
|
|
84
|
+
* Доработка полученного списка классов.
|
|
85
|
+
*/
|
|
86
|
+
protected initClasses(): Partial<CLASSES> {
|
|
87
|
+
return {
|
|
88
|
+
main: this.item.classes.value,
|
|
89
|
+
...{
|
|
90
|
+
// :classes [!] System label / Системная метка
|
|
91
|
+
item: this.getSubClass('item'),
|
|
92
|
+
trailing: this.getSubClass('trailing')
|
|
93
|
+
// :classes [!] System label / Системная метка
|
|
94
|
+
}
|
|
95
|
+
} as Partial<CLASSES>
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Refinement of the received list of styles.
|
|
100
|
+
*
|
|
101
|
+
* Доработка полученного списка стилей.
|
|
102
|
+
*/
|
|
103
|
+
protected initStyles(): ConstrStyles {
|
|
104
|
+
return {}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* A method for rendering.
|
|
109
|
+
*
|
|
110
|
+
* Метод для рендеринга.
|
|
111
|
+
*/
|
|
112
|
+
protected initRender(): VNode {
|
|
113
|
+
return h(
|
|
114
|
+
'div',
|
|
115
|
+
{
|
|
116
|
+
...this.getAttrs(),
|
|
117
|
+
class: this.classes?.value.main
|
|
118
|
+
},
|
|
119
|
+
this.renderData()
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Rendering data.
|
|
125
|
+
*
|
|
126
|
+
* Рендеринг данных.
|
|
127
|
+
*/
|
|
128
|
+
protected readonly renderData = (): (VNode | string)[] => {
|
|
129
|
+
if (this.item.isPlaceholder.value) {
|
|
130
|
+
return [String(this.props.placeholder)]
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (this.props.value) {
|
|
134
|
+
if (this.props.multiple) {
|
|
135
|
+
return this.renderList()
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const label = this.props.value[0]?.label
|
|
139
|
+
?? this.props.value[0]?.value
|
|
140
|
+
|
|
141
|
+
if (label) {
|
|
142
|
+
return [String(label)]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return []
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* List rendering.
|
|
151
|
+
*
|
|
152
|
+
* Рендеринг списка.
|
|
153
|
+
*/
|
|
154
|
+
protected readonly renderList = (): VNode[] => {
|
|
155
|
+
const children: any[] = []
|
|
156
|
+
|
|
157
|
+
this.props.value?.forEach((item) => {
|
|
158
|
+
const chip = this.renderItem(item)
|
|
159
|
+
|
|
160
|
+
if (chip) {
|
|
161
|
+
children.push(chip)
|
|
162
|
+
} else {
|
|
163
|
+
children.push(item.label)
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
return children
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Element rendering.
|
|
172
|
+
*
|
|
173
|
+
* Рендеринг элемента.
|
|
174
|
+
* @param item selected element/ выбранный элемент
|
|
175
|
+
*/
|
|
176
|
+
protected readonly renderItem = (item: ChipGroupItem): VNode | undefined => {
|
|
177
|
+
return this.components.renderOne(
|
|
178
|
+
'chip',
|
|
179
|
+
toBinds(
|
|
180
|
+
this.props.chipAttrs,
|
|
181
|
+
{
|
|
182
|
+
'class': this.classes?.value.item,
|
|
183
|
+
'icon': this.props.iconShow && item.icon ? item.icon : undefined,
|
|
184
|
+
'iconTrailing': this.item.iconTrailing.value,
|
|
185
|
+
'label': item.label,
|
|
186
|
+
'data-value': item.index,
|
|
187
|
+
'readonly': true,
|
|
188
|
+
'disabled': this.props.disabled,
|
|
189
|
+
'value': item.value,
|
|
190
|
+
'detail': item.detail,
|
|
191
|
+
'onClick': this.item.onClick
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
undefined,
|
|
195
|
+
item.index
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { computed, type VNode } from 'vue'
|
|
2
|
+
import {
|
|
3
|
+
type ConstrBind,
|
|
4
|
+
DesignComponents,
|
|
5
|
+
getRef,
|
|
6
|
+
type RefOrNormal,
|
|
7
|
+
toBind,
|
|
8
|
+
toBinds
|
|
9
|
+
} from '@dxtmisha/functional'
|
|
10
|
+
|
|
11
|
+
import type { SelectValueComponentInclude, SelectValuePropsInclude } from './basicTypes'
|
|
12
|
+
import type { SelectValueProps } from './props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* SelectValueInclude class provides functionality for conditionally rendering selectValue components
|
|
16
|
+
* within other components. It manages the logic for determining when to display selectValue
|
|
17
|
+
* and configures the appropriate properties.
|
|
18
|
+
*
|
|
19
|
+
* Класс SelectValueInclude предоставляет функциональность для условного рендеринга компонентов
|
|
20
|
+
* selectValue внутри других компонентов. Он управляет логикой определения необходимости
|
|
21
|
+
* отображения selectValue и настраивает соответствующие свойства.
|
|
22
|
+
*/
|
|
23
|
+
export class SelectValueInclude<
|
|
24
|
+
Props extends SelectValuePropsInclude = SelectValuePropsInclude,
|
|
25
|
+
PropsExtra extends ConstrBind<SelectValueProps> = ConstrBind<SelectValueProps>
|
|
26
|
+
> {
|
|
27
|
+
/**
|
|
28
|
+
* Constructor
|
|
29
|
+
* @param props input parameter/ входной параметр
|
|
30
|
+
* @param className class name/ название класса
|
|
31
|
+
* @param components object for working with components/ объект для работы с компонентами
|
|
32
|
+
* @param extra additional parameter or property name/ дополнительный параметр или имя свойства
|
|
33
|
+
* @param index index identifier/ идентификатор индекса
|
|
34
|
+
*/
|
|
35
|
+
constructor(
|
|
36
|
+
protected readonly props: Readonly<Props>,
|
|
37
|
+
protected readonly className: string,
|
|
38
|
+
protected readonly components?: DesignComponents<SelectValueComponentInclude, Props>,
|
|
39
|
+
protected readonly extra?: RefOrNormal<PropsExtra>,
|
|
40
|
+
protected readonly index?: string
|
|
41
|
+
) {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Checks whether selectValue should be displayed/
|
|
46
|
+
* Проверяет, нужно ли отображать selectValue
|
|
47
|
+
*/
|
|
48
|
+
readonly is = computed(() => Boolean(!this.props.disabled && this.components))
|
|
49
|
+
|
|
50
|
+
/** Computed bindings for the selectValue/ Вычисляемые привязки для selectValue */
|
|
51
|
+
readonly binds = computed<PropsExtra>(() => {
|
|
52
|
+
const props = toBinds<PropsExtra>(
|
|
53
|
+
getRef(this.extra),
|
|
54
|
+
this.props.selectValueAttrs,
|
|
55
|
+
{
|
|
56
|
+
class: `${this.className}__select-value`
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
...props,
|
|
62
|
+
disabled: this.props.disabled
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Render the SelectValue component
|
|
68
|
+
*
|
|
69
|
+
* Рендер компонента selectValue
|
|
70
|
+
* @param attrs additional attributes/ дополнительные атрибуты
|
|
71
|
+
* @returns VNode array/ массив VNode
|
|
72
|
+
*/
|
|
73
|
+
readonly render = (
|
|
74
|
+
attrs?: Record<string, any>
|
|
75
|
+
): VNode[] => {
|
|
76
|
+
if (
|
|
77
|
+
this.components
|
|
78
|
+
&& this.is.value
|
|
79
|
+
) {
|
|
80
|
+
return this.components.render(
|
|
81
|
+
'selectValue',
|
|
82
|
+
toBind(
|
|
83
|
+
attrs ?? {},
|
|
84
|
+
this.binds.value
|
|
85
|
+
),
|
|
86
|
+
this.index
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return []
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ConstrBind } from '@dxtmisha/functional'
|
|
2
|
+
|
|
3
|
+
import type { SelectValueProps } from './props'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Type describing selectValue component inclusion/
|
|
7
|
+
* Тип, описывающий включение компонента selectValue
|
|
8
|
+
*/
|
|
9
|
+
export type SelectValueComponentInclude = {
|
|
10
|
+
selectValue?: object
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Interface for selectValue include props/ Интерфейс для свойств включения selectValue */
|
|
14
|
+
export interface SelectValuePropsInclude {
|
|
15
|
+
disabled?: boolean
|
|
16
|
+
selectValueAttrs?: ConstrBind<SelectValueProps>
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ConstrBind, ListList } from '@dxtmisha/functional'
|
|
2
|
+
|
|
3
|
+
import type { IconPropsBasic, IconValue } from '../Icon'
|
|
4
|
+
import type { ChipPropsBasic, ChipPropsInclude } from '../Chip'
|
|
5
|
+
|
|
6
|
+
import type { EnabledProps } from '../../types/enabledTypes'
|
|
7
|
+
|
|
8
|
+
interface SelectValuePropsToken {
|
|
9
|
+
// :type [!] System label / Системная метка
|
|
10
|
+
// :type [!] System label / Системная метка
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SelectValuePropsBasic<
|
|
14
|
+
Icon extends IconPropsBasic = IconPropsBasic,
|
|
15
|
+
Chip extends ChipPropsBasic = ChipPropsBasic
|
|
16
|
+
> extends EnabledProps, ChipPropsInclude<Chip> {
|
|
17
|
+
// Value
|
|
18
|
+
placeholder?: string
|
|
19
|
+
value?: ListList
|
|
20
|
+
|
|
21
|
+
// Style
|
|
22
|
+
multiple?: boolean
|
|
23
|
+
|
|
24
|
+
iconShow?: boolean
|
|
25
|
+
iconAttrs?: ConstrBind<Icon>
|
|
26
|
+
|
|
27
|
+
iconCancel?: IconValue<Icon>
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Type describing incoming properties.
|
|
32
|
+
*
|
|
33
|
+
* Тип, описывающий входящие свойства.
|
|
34
|
+
*/
|
|
35
|
+
export interface SelectValueProps extends SelectValuePropsBasic, SelectValuePropsToken {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Default value for property.
|
|
40
|
+
*
|
|
41
|
+
* Значение по умолчанию для свойства.
|
|
42
|
+
*/
|
|
43
|
+
export const defaultsSelectValue = {
|
|
44
|
+
...{
|
|
45
|
+
// :default [!] System label / Системная метка
|
|
46
|
+
// :default [!] System label / Системная метка
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ConstrClass } from '@dxtmisha/functional'
|
|
2
|
+
import type { ChipComponentInclude } from '../Chip'
|
|
3
|
+
|
|
4
|
+
import type { EventClickEmits } from '../../types/eventClickTypes'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Interface for describing which components need to be connected for work.
|
|
8
|
+
*
|
|
9
|
+
* Интерфейс для описания, какие компоненты надо подключить для работы.
|
|
10
|
+
*/
|
|
11
|
+
export type SelectValueComponents = ChipComponentInclude
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Type describing available events.
|
|
15
|
+
*
|
|
16
|
+
* Тип, описывающий доступные события.
|
|
17
|
+
*/
|
|
18
|
+
export type SelectValueEmits = EventClickEmits
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Type describing available properties.
|
|
22
|
+
*
|
|
23
|
+
* Тип, описывающий доступные свойства.
|
|
24
|
+
*/
|
|
25
|
+
export interface SelectValueExpose {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Type describing available slots.
|
|
30
|
+
*
|
|
31
|
+
* Тип, описывающий доступные слоты.
|
|
32
|
+
*/
|
|
33
|
+
export interface SelectValueSlots {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Type describing subclasses.
|
|
38
|
+
*
|
|
39
|
+
* Тип, описывающий подклассы.
|
|
40
|
+
*/
|
|
41
|
+
export type SelectValueClasses = {
|
|
42
|
+
main: ConstrClass
|
|
43
|
+
// :classes [!] System label / Системная метка
|
|
44
|
+
item: string
|
|
45
|
+
trailing: string
|
|
46
|
+
// :classes [!] System label / Системная метка
|
|
47
|
+
}
|
|
@@ -42,9 +42,7 @@ export class Skeleton {
|
|
|
42
42
|
this.status = inject<ComputedRef<boolean> | undefined>(SKELETON_NAME_STATUS, undefined)
|
|
43
43
|
this.classes = Skeleton.getClassesList(this.className)
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
provide(SKELETON_NAME_STATUS, this.isActive)
|
|
47
|
-
}
|
|
45
|
+
provide(SKELETON_NAME_STATUS, this.isActive)
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
/**
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
DesignConstructorAbstract
|
|
6
6
|
} from '@dxtmisha/functional'
|
|
7
7
|
|
|
8
|
+
import { AriaStaticInclude } from '../../classes/AriaStaticInclude'
|
|
8
9
|
import { Skeleton } from './Skeleton'
|
|
9
10
|
|
|
10
11
|
import {
|
|
@@ -111,7 +112,12 @@ export class SkeletonDesign<
|
|
|
111
112
|
return h('div', {
|
|
112
113
|
...this.getAttrs(),
|
|
113
114
|
ref: this.element,
|
|
114
|
-
class: this.classes?.value.main
|
|
115
|
+
class: this.classes?.value.main,
|
|
116
|
+
...AriaStaticInclude.busy(this.item.isActive.value),
|
|
117
|
+
...AriaStaticInclude.hidden(this.item.isActive.value),
|
|
118
|
+
...AriaStaticInclude.live(
|
|
119
|
+
this.item.isActive.value ? 'polite' : 'off'
|
|
120
|
+
)
|
|
115
121
|
}, children)
|
|
116
122
|
}
|
|
117
123
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"color": {
|
|
3
|
-
"_type": "var"
|
|
4
|
-
},
|
|
5
|
-
"color-opacity": {
|
|
6
|
-
"_type": "var"
|
|
7
|
-
},
|
|
8
|
-
"background-color": {
|
|
9
|
-
"_type": "var"
|
|
10
|
-
},
|
|
11
|
-
"background-opacity": {
|
|
12
|
-
"_type": "var"
|
|
13
|
-
},
|
|
14
|
-
"border-color": {
|
|
15
|
-
"_type": "var"
|
|
16
|
-
},
|
|
17
|
-
"border-opacity": {
|
|
18
|
-
"_type": "var"
|
|
19
|
-
},
|
|
20
|
-
"opacity": {
|
|
21
|
-
"_type": "var"
|
|
22
|
-
},
|
|
23
|
-
"~active": {}
|
|
24
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"color": {
|
|
3
|
+
"_type": "var"
|
|
4
|
+
},
|
|
5
|
+
"color-opacity": {
|
|
6
|
+
"_type": "var"
|
|
7
|
+
},
|
|
8
|
+
"background-color": {
|
|
9
|
+
"_type": "var"
|
|
10
|
+
},
|
|
11
|
+
"background-opacity": {
|
|
12
|
+
"_type": "var"
|
|
13
|
+
},
|
|
14
|
+
"border-color": {
|
|
15
|
+
"_type": "var"
|
|
16
|
+
},
|
|
17
|
+
"border-opacity": {
|
|
18
|
+
"_type": "var"
|
|
19
|
+
},
|
|
20
|
+
"opacity": {
|
|
21
|
+
"_type": "var"
|
|
22
|
+
},
|
|
23
|
+
"~active": {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Ref, ToRefs } from 'vue'
|
|
2
|
+
import { type ConstrEmit, DesignComp } from '@dxtmisha/functional'
|
|
3
|
+
|
|
4
|
+
import { TextareaAutosizeValue } from './TextareaAutosizeValue'
|
|
5
|
+
import { TextareaAutosizeResize } from './TextareaAutosizeResize'
|
|
6
|
+
|
|
7
|
+
import type { TextareaAutosizeComponents, TextareaAutosizeEmits, TextareaAutosizeSlots } from './types'
|
|
8
|
+
import type { TextareaAutosizeProps } from './props'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* TextareaAutosize
|
|
12
|
+
*/
|
|
13
|
+
export class TextareaAutosize {
|
|
14
|
+
readonly value: TextareaAutosizeValue
|
|
15
|
+
readonly resize: TextareaAutosizeResize
|
|
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: TextareaAutosizeProps,
|
|
30
|
+
protected readonly refs: ToRefs<TextareaAutosizeProps>,
|
|
31
|
+
protected readonly element: Ref<HTMLTextAreaElement | undefined>,
|
|
32
|
+
protected readonly classDesign: string,
|
|
33
|
+
protected readonly className: string,
|
|
34
|
+
protected readonly components?: DesignComp<TextareaAutosizeComponents, TextareaAutosizeProps>,
|
|
35
|
+
protected readonly slots?: TextareaAutosizeSlots,
|
|
36
|
+
protected readonly emits?: ConstrEmit<TextareaAutosizeEmits>
|
|
37
|
+
) {
|
|
38
|
+
this.value = new TextareaAutosizeValue(props, refs, emits)
|
|
39
|
+
this.resize = new TextareaAutosizeResize(props, element, this.value)
|
|
40
|
+
}
|
|
41
|
+
}
|