@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,219 @@
|
|
|
1
|
+
import { h, type VNode } from 'vue'
|
|
2
|
+
import {
|
|
3
|
+
type ConstrOptions,
|
|
4
|
+
type ConstrStyles,
|
|
5
|
+
DesignConstructorAbstract
|
|
6
|
+
} from '@dxtmisha/functional'
|
|
7
|
+
|
|
8
|
+
import { AriaStaticInclude } from '../../classes/AriaStaticInclude'
|
|
9
|
+
import { Block } from './Block'
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type BlockPropsBasic
|
|
13
|
+
} from './props'
|
|
14
|
+
import {
|
|
15
|
+
type BlockClasses,
|
|
16
|
+
type BlockComponents,
|
|
17
|
+
type BlockEmits,
|
|
18
|
+
type BlockExpose,
|
|
19
|
+
type BlockSlots
|
|
20
|
+
} from './types'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* BlockDesign
|
|
24
|
+
*/
|
|
25
|
+
export class BlockDesign<
|
|
26
|
+
COMP extends BlockComponents,
|
|
27
|
+
EXPOSE extends BlockExpose,
|
|
28
|
+
CLASSES extends BlockClasses,
|
|
29
|
+
P extends BlockPropsBasic
|
|
30
|
+
> extends DesignConstructorAbstract<
|
|
31
|
+
HTMLDivElement,
|
|
32
|
+
COMP,
|
|
33
|
+
BlockEmits,
|
|
34
|
+
EXPOSE,
|
|
35
|
+
BlockSlots,
|
|
36
|
+
CLASSES,
|
|
37
|
+
P
|
|
38
|
+
> {
|
|
39
|
+
protected readonly item: Block
|
|
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, BlockEmits, P>
|
|
51
|
+
) {
|
|
52
|
+
super(
|
|
53
|
+
name,
|
|
54
|
+
props,
|
|
55
|
+
options
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
this.item = new Block(
|
|
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: {},
|
|
89
|
+
...{
|
|
90
|
+
// :classes [!] System label / Системная метка
|
|
91
|
+
headline: this.getSubClass('headline'),
|
|
92
|
+
header: this.getSubClass('header'),
|
|
93
|
+
label: this.getSubClass('label'),
|
|
94
|
+
description: this.getSubClass('description'),
|
|
95
|
+
caption: this.getSubClass('caption'),
|
|
96
|
+
icon: this.getSubClass('icon'),
|
|
97
|
+
space: this.getSubClass('space'),
|
|
98
|
+
body: this.getSubClass('body')
|
|
99
|
+
// :classes [!] System label / Системная метка
|
|
100
|
+
}
|
|
101
|
+
} as Partial<CLASSES>
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Refinement of the received list of styles.
|
|
106
|
+
*
|
|
107
|
+
* Доработка полученного списка стилей.
|
|
108
|
+
*/
|
|
109
|
+
protected initStyles(): ConstrStyles {
|
|
110
|
+
return {}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A method for rendering.
|
|
115
|
+
*
|
|
116
|
+
* Метод для рендеринга.
|
|
117
|
+
*/
|
|
118
|
+
protected initRender(): VNode {
|
|
119
|
+
const children: any[] = [
|
|
120
|
+
...this.renderHeadline(),
|
|
121
|
+
...this.renderHeader(),
|
|
122
|
+
...this.item.description.render(),
|
|
123
|
+
...this.renderBody()
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
return h(this.item.tag.value, {
|
|
127
|
+
...this.getAttrs(),
|
|
128
|
+
class: this.classes?.value.main
|
|
129
|
+
}, children)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Headline rendering.
|
|
134
|
+
*
|
|
135
|
+
* Рендеринг заголовка.
|
|
136
|
+
*/
|
|
137
|
+
protected readonly renderHeadline = (): VNode[] => {
|
|
138
|
+
if (this.item.isHeadline.value) {
|
|
139
|
+
const children: any[] = []
|
|
140
|
+
|
|
141
|
+
if (this.props.headline) {
|
|
142
|
+
children.push(this.props.headline)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
this.initSlot('headline', children)
|
|
146
|
+
|
|
147
|
+
return [
|
|
148
|
+
h('div', {
|
|
149
|
+
key: 'headline',
|
|
150
|
+
class: this.classes?.value.headline
|
|
151
|
+
}, children)
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return []
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Header rendering.
|
|
160
|
+
*
|
|
161
|
+
* Рендеринг заголовка.
|
|
162
|
+
*/
|
|
163
|
+
protected readonly renderHeader = (): VNode[] => {
|
|
164
|
+
if (this.item.isHeader.value) {
|
|
165
|
+
const children: any[] = [
|
|
166
|
+
...this.item.icon.renderIcon(),
|
|
167
|
+
...this.item.label.render(),
|
|
168
|
+
...this.item.caption.render(),
|
|
169
|
+
...this.renderTrailing()
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
return [
|
|
173
|
+
h('div', {
|
|
174
|
+
key: 'header',
|
|
175
|
+
class: this.classes?.value.header,
|
|
176
|
+
...AriaStaticInclude.labelledby(this.item.label.idElement.value)
|
|
177
|
+
}, children)
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return []
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Trailing rendering.
|
|
186
|
+
*
|
|
187
|
+
* Рендеринг правого контента.
|
|
188
|
+
*/
|
|
189
|
+
protected readonly renderTrailing = (): VNode[] => {
|
|
190
|
+
const children: any[] = []
|
|
191
|
+
|
|
192
|
+
if (this.slots?.trailing) {
|
|
193
|
+
children.push(h('div', {
|
|
194
|
+
key: 'spacer',
|
|
195
|
+
class: this.classes?.value.space
|
|
196
|
+
}))
|
|
197
|
+
|
|
198
|
+
this.initSlot('trailing', children)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return children
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Body rendering.
|
|
206
|
+
*
|
|
207
|
+
* Рендеринг тела.
|
|
208
|
+
*/
|
|
209
|
+
protected readonly renderBody = (): VNode[] => {
|
|
210
|
+
this.initSlot('default')
|
|
211
|
+
|
|
212
|
+
return [
|
|
213
|
+
h('div', {
|
|
214
|
+
key: 'body',
|
|
215
|
+
class: this.classes?.value.body
|
|
216
|
+
}, this.initSlot('default'))
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IconPropsBasic, IconPropsInclude } from '../Icon'
|
|
2
|
+
|
|
3
|
+
import type { LabelProps } from '../../types/labelTypes'
|
|
4
|
+
import type { DescriptionProps } from '../../types/descriptionTypes'
|
|
5
|
+
import type { CaptionProps } from '../../types/captionTypes'
|
|
6
|
+
|
|
7
|
+
interface BlockPropsToken {
|
|
8
|
+
// :type [!] System label / Системная метка
|
|
9
|
+
// :type [!] System label / Системная метка
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface BlockPropsBasic<
|
|
13
|
+
Icon extends IconPropsBasic = IconPropsBasic
|
|
14
|
+
> extends LabelProps,
|
|
15
|
+
DescriptionProps,
|
|
16
|
+
CaptionProps,
|
|
17
|
+
IconPropsInclude<Icon> {
|
|
18
|
+
// Value
|
|
19
|
+
headline?: string
|
|
20
|
+
|
|
21
|
+
// Style
|
|
22
|
+
tag?: string
|
|
23
|
+
tagHeader?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Type describing incoming properties.
|
|
28
|
+
*
|
|
29
|
+
* Тип, описывающий входящие свойства.
|
|
30
|
+
*/
|
|
31
|
+
export interface BlockProps extends BlockPropsBasic, BlockPropsToken {
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Default value for property.
|
|
36
|
+
*
|
|
37
|
+
* Значение по умолчанию для свойства.
|
|
38
|
+
*/
|
|
39
|
+
export const defaultsBlock = {
|
|
40
|
+
tag: 'div',
|
|
41
|
+
tagHeader: 'h3',
|
|
42
|
+
...{
|
|
43
|
+
// :default [!] System label / Системная метка
|
|
44
|
+
// :default [!] System label / Системная метка
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ConstrClass } from '@dxtmisha/functional'
|
|
2
|
+
|
|
3
|
+
import type { LabelAlternativeSlots, LabelExpose } from '../../types/labelTypes'
|
|
4
|
+
import type { DescriptionExpose, DescriptionSlots } from '../../types/descriptionTypes'
|
|
5
|
+
import type { CaptionSlots } from '../../types/captionTypes'
|
|
6
|
+
|
|
7
|
+
import type { IconComponentInclude } from '../Icon'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Interface for describing which components need to be connected for work.
|
|
11
|
+
*
|
|
12
|
+
* Интерфейс для описания, какие компоненты надо подключить для работы.
|
|
13
|
+
*/
|
|
14
|
+
export type BlockComponents = IconComponentInclude
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Type describing available events.
|
|
18
|
+
*
|
|
19
|
+
* Тип, описывающий доступные события.
|
|
20
|
+
*/
|
|
21
|
+
export type BlockEmits = {}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Type describing available properties.
|
|
25
|
+
*
|
|
26
|
+
* Тип, описывающий доступные свойства.
|
|
27
|
+
*/
|
|
28
|
+
export interface BlockExpose extends LabelExpose, DescriptionExpose {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Type describing available slots.
|
|
33
|
+
*
|
|
34
|
+
* Тип, описывающий доступные слоты.
|
|
35
|
+
*/
|
|
36
|
+
export interface BlockSlots extends LabelAlternativeSlots, DescriptionSlots, CaptionSlots {
|
|
37
|
+
/** Slot for trailing content/ Слот для правого контента */
|
|
38
|
+
trailing?(props: any): any
|
|
39
|
+
|
|
40
|
+
/** Slot for headline/ Слот для заголовка */
|
|
41
|
+
headline?(props: any): any
|
|
42
|
+
|
|
43
|
+
/** Default slot/ Слот по умолчанию */
|
|
44
|
+
default?(props: any): any
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Type describing subclasses.
|
|
49
|
+
*
|
|
50
|
+
* Тип, описывающий подклассы.
|
|
51
|
+
*/
|
|
52
|
+
export type BlockClasses = {
|
|
53
|
+
main: ConstrClass
|
|
54
|
+
// :classes [!] System label / Системная метка
|
|
55
|
+
headline: string
|
|
56
|
+
header: string
|
|
57
|
+
label: string
|
|
58
|
+
description: string
|
|
59
|
+
caption: string
|
|
60
|
+
icon: string
|
|
61
|
+
space: string
|
|
62
|
+
body: string
|
|
63
|
+
// :classes [!] System label / Системная метка
|
|
64
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, type Ref, type ToRefs } from 'vue'
|
|
2
2
|
import { type ConstrClass, type ConstrEmit, DesignComp } from '@dxtmisha/functional'
|
|
3
|
-
import {
|
|
3
|
+
import { getClassTagAStatic } from '../../functions/getClassTagAStatic'
|
|
4
4
|
|
|
5
5
|
import { LabelInclude } from '../../classes/LabelInclude'
|
|
6
6
|
import { EnabledInclude } from '../../classes/EnabledInclude'
|
|
@@ -10,8 +10,10 @@ import { ProgressInclude } from '../Progress'
|
|
|
10
10
|
import { RippleInclude } from '../Ripple'
|
|
11
11
|
import { SkeletonInclude } from '../Skeleton'
|
|
12
12
|
|
|
13
|
+
import { AriaStaticInclude } from '../../classes/AriaStaticInclude'
|
|
13
14
|
import { EventClickInclude } from '../../classes/EventClickInclude'
|
|
14
15
|
|
|
16
|
+
import type { AriaList } from '../../types/ariaTypes'
|
|
15
17
|
import type { ButtonComponents, ButtonEmits, ButtonSlots } from './types'
|
|
16
18
|
import type { ButtonPropsBasic } from './props'
|
|
17
19
|
|
|
@@ -82,7 +84,29 @@ export class Button {
|
|
|
82
84
|
/** values for the class/ значения для класса */
|
|
83
85
|
readonly classes = computed<ConstrClass>(() => ({
|
|
84
86
|
[`${this.className}--icon`]: this.icon.isIcon.value,
|
|
85
|
-
[
|
|
87
|
+
[getClassTagAStatic(this.classDesign)]: true,
|
|
86
88
|
...this.skeleton.classes.value
|
|
87
89
|
}))
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* list of aria properties for the button component/
|
|
93
|
+
* список aria свойств для компонента Button
|
|
94
|
+
*/
|
|
95
|
+
readonly aria = computed<AriaList>(() => {
|
|
96
|
+
const aria: AriaList = {
|
|
97
|
+
...this.progress.aria.value,
|
|
98
|
+
...AriaStaticInclude.label(this.props.ariaLabel)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (this.props.tag !== 'button') {
|
|
102
|
+
return {
|
|
103
|
+
tabindex: '0',
|
|
104
|
+
...aria,
|
|
105
|
+
...AriaStaticInclude.role('button'),
|
|
106
|
+
...this.enabled.aria.value
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return aria
|
|
111
|
+
})
|
|
88
112
|
}
|
|
@@ -75,7 +75,8 @@ export class ButtonDesign<
|
|
|
75
75
|
*/
|
|
76
76
|
protected initExpose(): EXPOSE {
|
|
77
77
|
return {
|
|
78
|
-
...this.item.event.expose
|
|
78
|
+
...this.item.event.expose,
|
|
79
|
+
...this.item.label.expose
|
|
79
80
|
} as EXPOSE
|
|
80
81
|
}
|
|
81
82
|
|
|
@@ -117,13 +118,17 @@ export class ButtonDesign<
|
|
|
117
118
|
this.props.tag || 'button',
|
|
118
119
|
{
|
|
119
120
|
...this.getAttrs(),
|
|
120
|
-
ref: this.element,
|
|
121
|
+
'ref': this.element,
|
|
122
|
+
'type': this.props.type,
|
|
121
123
|
|
|
122
|
-
class: this.classes?.value.main,
|
|
123
|
-
style: this.styles?.value,
|
|
124
|
+
'class': this.classes?.value.main,
|
|
125
|
+
'style': this.styles?.value,
|
|
124
126
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
'data-value': this.props.value,
|
|
128
|
+
|
|
129
|
+
'disabled': this.item.enabled.isDisabledOrUndefined.value,
|
|
130
|
+
'onClick': this.item.event.onClick,
|
|
131
|
+
...this.item.aria.value
|
|
127
132
|
},
|
|
128
133
|
[
|
|
129
134
|
...this.item.progress.render(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, type VNode } from 'vue'
|
|
2
|
-
import { type ConstrBind, DesignComponents, getBind, getRef, type RefOrNormal } from '@dxtmisha/functional'
|
|
2
|
+
import { type ConstrBind, DesignComponents, getBind, getRef, type RefOrNormal, toBinds } from '@dxtmisha/functional'
|
|
3
3
|
|
|
4
4
|
import type { ButtonComponentInclude, ButtonPropsInclude } from './basicTypes'
|
|
5
5
|
import type { ButtonPropsBasic } from './props'
|
|
@@ -37,10 +37,13 @@ export class ButtonInclude<Props extends ButtonPropsInclude = ButtonPropsInclude
|
|
|
37
37
|
* Computed bindings for the button/ Вычисляемые привязки для кнопки
|
|
38
38
|
*/
|
|
39
39
|
readonly binds = computed(
|
|
40
|
-
() =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
() => toBinds(
|
|
41
|
+
this.props.buttonAttrs,
|
|
42
|
+
getBind(
|
|
43
|
+
getRef(this.props),
|
|
44
|
+
getRef(this.extra),
|
|
45
|
+
'label'
|
|
46
|
+
)
|
|
44
47
|
)
|
|
45
48
|
)
|
|
46
49
|
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
{
|
|
2
|
-
"padding": {
|
|
3
|
-
"_type": "var"
|
|
4
|
-
},
|
|
5
|
-
"border-radius": "0",
|
|
6
|
-
"transition-property": "grid-template-columns, background-color, background-image, border, box-shadow",
|
|
7
|
-
"transition-duration": "{d.sys.transitionDuration.fade.enter}",
|
|
8
|
-
"transition-function": "{d.sys.transitionFunction.standard}",
|
|
9
|
-
"#label": {},
|
|
10
|
-
"#icon": {},
|
|
11
|
-
"#trailing": {},
|
|
12
|
-
"#loading": {
|
|
13
|
-
"color-opacity": {
|
|
14
|
-
"_type": "var"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"focus": {},
|
|
18
|
-
"hover": {
|
|
19
|
-
"transition-duration": "{d.sys.transitionDuration.sm}"
|
|
20
|
-
},
|
|
21
|
-
"active": {
|
|
22
|
-
"transition-duration": "{d.sys.transitionDuration.sm}"
|
|
23
|
-
},
|
|
24
|
-
"selected": {
|
|
25
|
-
"_type": "state"
|
|
26
|
-
},
|
|
27
|
-
"readonly": {
|
|
28
|
-
"_type": "state"
|
|
29
|
-
},
|
|
30
|
-
"disabled": {
|
|
31
|
-
"transition-duration": "{d.sys.transitionDuration.sm}"
|
|
32
|
-
},
|
|
33
|
-
"~adaptive": {
|
|
34
|
-
"~iconAlways": {
|
|
35
|
-
"justify-content": "flex-start",
|
|
36
|
-
"& > .??__icon": {
|
|
37
|
-
"padding": {
|
|
38
|
-
"value": "calc((var(--sys-height) - {?icon-_width}) / 2)",
|
|
39
|
-
"_important": true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"& > *:not(.??__icon)": {
|
|
43
|
-
"display": "none"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"~block": {
|
|
47
|
-
"width": "100%"
|
|
48
|
-
},
|
|
49
|
-
"~auto": {
|
|
50
|
-
"width": "fit-content"
|
|
51
|
-
},
|
|
52
|
-
"group|icon": {
|
|
53
|
-
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
54
|
-
"_type": "media-group"
|
|
55
|
-
},
|
|
56
|
-
"group|full": {
|
|
57
|
-
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
58
|
-
"_type": "media-max-group"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"container": {
|
|
62
|
-
"group|icon": {
|
|
63
|
-
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
64
|
-
"_type": "container-group"
|
|
65
|
-
},
|
|
66
|
-
"group|full": {
|
|
67
|
-
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
68
|
-
"_type": "container-max-group"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"~inverse": {},
|
|
72
|
-
"~grid": {},
|
|
73
|
-
"~textAlign": {
|
|
74
|
-
"left": {
|
|
75
|
-
"justify-content": "flex-start",
|
|
76
|
-
"text-align": "left"
|
|
77
|
-
},
|
|
78
|
-
"center": {},
|
|
79
|
-
"right": {
|
|
80
|
-
"justify-content": "flex-end",
|
|
81
|
-
"text-align": "right"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"padding": {
|
|
3
|
+
"_type": "var"
|
|
4
|
+
},
|
|
5
|
+
"border-radius": "0",
|
|
6
|
+
"transition-property": "grid-template-columns, background-color, background-image, border, box-shadow",
|
|
7
|
+
"transition-duration": "{d.sys.transitionDuration.fade.enter}",
|
|
8
|
+
"transition-function": "{d.sys.transitionFunction.standard}",
|
|
9
|
+
"#label": {},
|
|
10
|
+
"#icon": {},
|
|
11
|
+
"#trailing": {},
|
|
12
|
+
"#loading": {
|
|
13
|
+
"color-opacity": {
|
|
14
|
+
"_type": "var"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"focus": {},
|
|
18
|
+
"hover": {
|
|
19
|
+
"transition-duration": "{d.sys.transitionDuration.sm}"
|
|
20
|
+
},
|
|
21
|
+
"active": {
|
|
22
|
+
"transition-duration": "{d.sys.transitionDuration.sm}"
|
|
23
|
+
},
|
|
24
|
+
"selected": {
|
|
25
|
+
"_type": "state"
|
|
26
|
+
},
|
|
27
|
+
"readonly": {
|
|
28
|
+
"_type": "state"
|
|
29
|
+
},
|
|
30
|
+
"disabled": {
|
|
31
|
+
"transition-duration": "{d.sys.transitionDuration.sm}"
|
|
32
|
+
},
|
|
33
|
+
"~adaptive": {
|
|
34
|
+
"~iconAlways": {
|
|
35
|
+
"justify-content": "flex-start",
|
|
36
|
+
"& > .??__icon": {
|
|
37
|
+
"padding": {
|
|
38
|
+
"value": "calc((var(--sys-height) - {?icon-_width}) / 2)",
|
|
39
|
+
"_important": true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"& > *:not(.??__icon)": {
|
|
43
|
+
"display": "none"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"~block": {
|
|
47
|
+
"width": "100%"
|
|
48
|
+
},
|
|
49
|
+
"~auto": {
|
|
50
|
+
"width": "fit-content"
|
|
51
|
+
},
|
|
52
|
+
"group|icon": {
|
|
53
|
+
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
54
|
+
"_type": "media-group"
|
|
55
|
+
},
|
|
56
|
+
"group|full": {
|
|
57
|
+
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
58
|
+
"_type": "media-max-group"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"container": {
|
|
62
|
+
"group|icon": {
|
|
63
|
+
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
64
|
+
"_type": "container-group"
|
|
65
|
+
},
|
|
66
|
+
"group|full": {
|
|
67
|
+
"link|adaptive-icon": "{??adaptive.iconAlways}",
|
|
68
|
+
"_type": "container-max-group"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"~inverse": {},
|
|
72
|
+
"~grid": {},
|
|
73
|
+
"~textAlign": {
|
|
74
|
+
"left": {
|
|
75
|
+
"justify-content": "flex-start",
|
|
76
|
+
"text-align": "left"
|
|
77
|
+
},
|
|
78
|
+
"center": {},
|
|
79
|
+
"right": {
|
|
80
|
+
"justify-content": "flex-end",
|
|
81
|
+
"text-align": "right"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -5,6 +5,7 @@ import type { SkeletonPropsInclude } from '../Skeleton'
|
|
|
5
5
|
import type { LabelProps } from '../../types/labelTypes'
|
|
6
6
|
import type { EnabledProps } from '../../types/enabledTypes'
|
|
7
7
|
import type { EventClickProps } from '../../types/eventClickTypes'
|
|
8
|
+
import type { AriaLabelPropsInclude } from '../../types/ariaTypes'
|
|
8
9
|
|
|
9
10
|
interface ButtonPropsToken {
|
|
10
11
|
// :type [!] System label / Системная метка
|
|
@@ -28,9 +29,11 @@ export interface ButtonPropsBasic<
|
|
|
28
29
|
IconTrailingPropsInclude<Icon>,
|
|
29
30
|
ProgressPropsInclude<Progress>,
|
|
30
31
|
SkeletonPropsInclude,
|
|
31
|
-
EventClickProps
|
|
32
|
+
EventClickProps,
|
|
33
|
+
AriaLabelPropsInclude {
|
|
32
34
|
// Style
|
|
33
35
|
tag?: 'button' | 'a' | 'span' | string
|
|
36
|
+
type?: 'button' | 'submit' | 'reset' | string
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
/**
|
|
@@ -48,6 +51,7 @@ export interface ButtonProps extends ButtonPropsBasic, ButtonPropsToken {
|
|
|
48
51
|
*/
|
|
49
52
|
export const defaultsButton = {
|
|
50
53
|
tag: 'button',
|
|
54
|
+
type: 'button',
|
|
51
55
|
...{
|
|
52
56
|
// :default [!] System label / Системная метка
|
|
53
57
|
// :default [!] System label / Системная метка
|