@dxtmisha/wiki 0.24.1 → 0.24.3
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 +3 -2
- package/src/library.ts +7 -7
- package/src/media/descriptions/wikiDescriptionsBars.ts +1 -3
- package/src/media/descriptions/wikiDescriptionsCell.ts +1 -2
- package/src/media/descriptions/wikiDescriptionsChip.ts +0 -1
- package/src/media/descriptions/wikiDescriptionsField.ts +1 -4
- package/src/media/descriptions/wikiDescriptionsFieldCounter.ts +6 -6
- package/src/media/descriptions/wikiDescriptionsFieldMessage.ts +1 -2
- package/src/media/descriptions/wikiDescriptionsImage.ts +2 -2
- package/src/media/descriptions/wikiDescriptionsList.ts +1 -5
- package/src/media/descriptions/wikiDescriptionsListGroup.ts +2 -3
- package/src/media/descriptions/wikiDescriptionsListItem.ts +1 -3
- package/src/media/descriptions/wikiDescriptionsListMenu.ts +2 -9
- package/src/media/descriptions/wikiDescriptionsMask.ts +12 -0
- package/src/media/descriptions/wikiDescriptionsMenu.ts +3 -14
- package/src/media/descriptions/wikiDescriptionsMotionTransform.ts +2 -4
- package/src/media/descriptions/wikiDescriptionsScrollbar.ts +1 -7
- package/src/media/descriptions/wikiDescriptionsSkeleton.ts +1 -0
- package/src/media/descriptions/wikiDescriptionsWindow.ts +5 -22
- package/src/media/functional/en/broadcastMessage.mdx +307 -0
- package/src/media/functional/ru/broadcastMessage.mdx +305 -0
- package/src/media/mdx/Badge/badge.en.mdx +85 -7
- package/src/media/mdx/Badge/badge.ru.mdx +85 -7
- package/src/media/mdx/Badge/dot.en.mdx +16 -12
- package/src/media/mdx/Badge/dot.ru.mdx +16 -12
- package/src/media/mdx/Badge/outline.en.mdx +12 -13
- package/src/media/mdx/Badge/outline.ru.mdx +12 -13
- package/src/media/mdx/Badge/primary.en.mdx +12 -12
- package/src/media/mdx/Badge/primary.ru.mdx +12 -12
- package/src/media/mdx/Badge/secondary.en.mdx +12 -13
- package/src/media/mdx/Badge/secondary.ru.mdx +12 -13
- package/src/media/mdx/Bars/action.en.mdx +72 -28
- package/src/media/mdx/Bars/action.ru.mdx +73 -29
- package/src/media/mdx/Bars/bars.en.mdx +90 -15
- package/src/media/mdx/Bars/bars.ru.mdx +91 -15
- package/src/media/mdx/Bars/slots.en.mdx +33 -0
- package/src/media/mdx/Bars/slots.ru.mdx +33 -0
- package/src/media/mdx/Bars/v-model.en.mdx +23 -14
- package/src/media/mdx/Bars/v-model.ru.mdx +23 -14
- package/src/media/mdx/Bars/wikiMdxBars.ts +5 -11
- package/src/media/mdx/Button/button.en.mdx +89 -1
- package/src/media/mdx/Button/button.ru.mdx +89 -1
- package/src/media/mdx/Button/outline.en.mdx +12 -14
- package/src/media/mdx/Button/outline.ru.mdx +12 -14
- package/src/media/mdx/Button/primary.en.mdx +12 -19
- package/src/media/mdx/Button/primary.ru.mdx +12 -19
- package/src/media/mdx/Button/secondary.en.mdx +12 -17
- package/src/media/mdx/Button/secondary.ru.mdx +12 -17
- package/src/media/mdx/Button/text.en.mdx +12 -11
- package/src/media/mdx/Button/text.ru.mdx +12 -11
- package/src/media/mdx/Cell/cell.en.mdx +50 -9
- package/src/media/mdx/Cell/cell.ru.mdx +50 -9
- package/src/media/mdx/Cell/slots.en.mdx +82 -0
- package/src/media/mdx/Cell/slots.ru.mdx +83 -0
- package/src/media/mdx/Cell/wikiMdxCell.ts +6 -12
- package/src/media/mdx/Chip/assistive.en.mdx +12 -14
- package/src/media/mdx/Chip/assistive.ru.mdx +12 -14
- package/src/media/mdx/Chip/chip.en.mdx +69 -9
- package/src/media/mdx/Chip/chip.ru.mdx +69 -9
- package/src/media/mdx/Chip/input.en.mdx +12 -19
- package/src/media/mdx/Chip/input.ru.mdx +12 -19
- package/src/media/mdx/Field/arrows.en.mdx +67 -17
- package/src/media/mdx/Field/arrows.ru.mdx +67 -17
- package/src/media/mdx/Field/cancel.en.mdx +47 -10
- package/src/media/mdx/Field/cancel.ru.mdx +47 -10
- package/src/media/mdx/Field/field.en.mdx +45 -15
- package/src/media/mdx/Field/field.ru.mdx +45 -15
- package/src/media/mdx/Field/slots.en.mdx +151 -0
- package/src/media/mdx/Field/slots.ru.mdx +151 -0
- package/src/media/mdx/Field/value.en.mdx +49 -28
- package/src/media/mdx/Field/value.ru.mdx +49 -28
- package/src/media/mdx/Field/width.en.mdx +21 -19
- package/src/media/mdx/Field/width.ru.mdx +21 -19
- package/src/media/mdx/Field/wikiMdxField.ts +14 -26
- package/src/media/mdx/FieldCounter/fieldCounter.en.mdx +52 -14
- package/src/media/mdx/FieldCounter/fieldCounter.ru.mdx +55 -14
- package/src/media/mdx/FieldCounter/templates.en.mdx +26 -6
- package/src/media/mdx/FieldCounter/templates.ru.mdx +25 -5
- package/src/media/mdx/FieldLabel/fieldLabel.en.mdx +56 -14
- package/src/media/mdx/FieldLabel/fieldLabel.ru.mdx +56 -14
- package/src/media/mdx/FieldMessage/fieldMessage.en.mdx +58 -14
- package/src/media/mdx/FieldMessage/fieldMessage.ru.mdx +58 -14
- package/src/media/mdx/FieldMessage/slots.en.mdx +45 -0
- package/src/media/mdx/FieldMessage/slots.ru.mdx +45 -0
- package/src/media/mdx/FieldMessage/wikiMdxFieldMessage.ts +6 -12
- package/src/media/mdx/Icon/expose.isActive.en.mdx +2 -10
- package/src/media/mdx/Icon/expose.isActive.ru.mdx +2 -10
- package/src/media/mdx/Icon/icon.en.mdx +43 -9
- package/src/media/mdx/Icon/icon.ru.mdx +27 -28
- package/src/media/mdx/Image/adaptive.en.mdx +63 -20
- package/src/media/mdx/Image/adaptive.ru.mdx +62 -25
- package/src/media/mdx/Image/event.load.en.mdx +37 -2
- package/src/media/mdx/Image/event.load.ru.mdx +34 -7
- package/src/media/mdx/Image/{expose.type.ru.mdx → expose.en.mdx} +11 -1
- package/src/media/mdx/Image/expose.ru.mdx +31 -0
- package/src/media/mdx/Image/image.en.mdx +46 -0
- package/src/media/mdx/Image/image.ru.mdx +47 -0
- package/src/media/mdx/Image/size.en.mdx +19 -19
- package/src/media/mdx/Image/size.ru.mdx +19 -23
- package/src/media/mdx/Image/value.en.mdx +10 -27
- package/src/media/mdx/Image/value.ru.mdx +10 -29
- package/src/media/mdx/Image/wikiMdxImage.ts +11 -11
- package/src/media/mdx/List/event.close.en.mdx +5 -8
- package/src/media/mdx/List/event.close.ru.mdx +5 -8
- package/src/media/mdx/List/list.en.mdx +56 -14
- package/src/media/mdx/List/list.ru.mdx +56 -14
- package/src/media/mdx/List/lite.en.mdx +17 -12
- package/src/media/mdx/List/lite.ru.mdx +17 -12
- package/src/media/mdx/List/slot.html.en.mdx +72 -21
- package/src/media/mdx/List/slot.html.ru.mdx +72 -21
- package/src/media/mdx/ListGroup/listGroup.en.mdx +55 -1
- package/src/media/mdx/ListGroup/listGroup.ru.mdx +55 -1
- package/src/media/mdx/ListGroup/slots.en.mdx +10 -0
- package/src/media/mdx/ListGroup/slots.ru.mdx +10 -0
- package/src/media/mdx/ListGroup/wikiMdxListGroup.ts +6 -12
- package/src/media/mdx/ListItem/basic.en.mdx +47 -10
- package/src/media/mdx/ListItem/basic.ru.mdx +46 -9
- package/src/media/mdx/ListItem/fill.en.mdx +22 -8
- package/src/media/mdx/ListItem/fill.ru.mdx +22 -8
- package/src/media/mdx/ListItem/slots.en.mdx +7 -0
- package/src/media/mdx/ListItem/slots.ru.mdx +7 -0
- package/src/media/mdx/ListItem/wikiMdxListItem.ts +7 -13
- package/src/media/mdx/ListMenu/listMenu.en.mdx +62 -1
- package/src/media/mdx/ListMenu/listMenu.ru.mdx +62 -1
- package/src/media/mdx/Mask/basic.en.mdx +68 -16
- package/src/media/mdx/Mask/basic.ru.mdx +70 -11
- package/src/media/mdx/Mask/dateTypes.en.mdx +82 -68
- package/src/media/mdx/Mask/dateTypes.ru.mdx +82 -68
- package/src/media/mdx/Mask/expose.en.mdx +20 -0
- package/src/media/mdx/Mask/expose.ru.mdx +20 -0
- package/src/media/mdx/Mask/groupSave.en.mdx +13 -46
- package/src/media/mdx/Mask/groupSave.ru.mdx +13 -46
- package/src/media/mdx/Mask/mask.en.mdx +12 -66
- package/src/media/mdx/Mask/mask.ru.mdx +12 -66
- package/src/media/mdx/Mask/match.en.mdx +16 -24
- package/src/media/mdx/Mask/match.ru.mdx +16 -24
- package/src/media/mdx/Mask/numberTypes.en.mdx +64 -52
- package/src/media/mdx/Mask/numberTypes.ru.mdx +64 -52
- package/src/media/mdx/Mask/pattern.en.mdx +63 -75
- package/src/media/mdx/Mask/pattern.ru.mdx +63 -75
- package/src/media/mdx/Mask/special.en.mdx +174 -97
- package/src/media/mdx/Mask/special.ru.mdx +174 -97
- package/src/media/mdx/Mask/type.en.mdx +12 -36
- package/src/media/mdx/Mask/type.ru.mdx +11 -35
- package/src/media/mdx/Mask/visible.en.mdx +33 -41
- package/src/media/mdx/Mask/visible.ru.mdx +32 -40
- package/src/media/mdx/Mask/wikiMdxMask.ts +6 -0
- package/src/media/mdx/Menu/ajax.en.mdx +44 -51
- package/src/media/mdx/Menu/ajax.ru.mdx +44 -52
- package/src/media/mdx/Menu/menu.en.mdx +63 -1
- package/src/media/mdx/Menu/menu.ru.mdx +64 -1
- package/src/media/mdx/Menu/slots.en.mdx +122 -0
- package/src/media/mdx/Menu/slots.ru.mdx +122 -0
- package/src/media/mdx/Menu/wikiMdxMenu.ts +7 -32
- package/src/media/mdx/MotionTransform/animationHeadPosition.en.mdx +10 -22
- package/src/media/mdx/MotionTransform/animationHeadPosition.ru.mdx +10 -22
- package/src/media/mdx/MotionTransform/classes.en.mdx +18 -25
- package/src/media/mdx/MotionTransform/classes.ru.mdx +18 -25
- package/src/media/mdx/MotionTransform/events.en.mdx +31 -43
- package/src/media/mdx/MotionTransform/events.ru.mdx +31 -43
- package/src/media/mdx/MotionTransform/expose.isShow.en.mdx +2 -4
- package/src/media/mdx/MotionTransform/expose.isShow.ru.mdx +2 -4
- package/src/media/mdx/MotionTransform/ignore.en.mdx +22 -24
- package/src/media/mdx/MotionTransform/ignore.ru.mdx +22 -24
- package/src/media/mdx/MotionTransform/motionTransform.en.mdx +44 -15
- package/src/media/mdx/MotionTransform/motionTransform.ru.mdx +44 -15
- package/src/media/mdx/MotionTransform/slots.en.mdx +92 -0
- package/src/media/mdx/MotionTransform/slots.ru.mdx +92 -0
- package/src/media/mdx/MotionTransform/v-model.en.mdx +23 -14
- package/src/media/mdx/MotionTransform/v-model.ru.mdx +23 -14
- package/src/media/mdx/MotionTransform/wikiMdxMotionTransform.ts +5 -17
- package/src/media/mdx/Progress/circular.en.mdx +7 -20
- package/src/media/mdx/Progress/circular.ru.mdx +7 -20
- package/src/media/mdx/Progress/delays.en.mdx +6 -13
- package/src/media/mdx/Progress/delays.ru.mdx +6 -13
- package/src/media/mdx/Progress/linear.en.mdx +9 -23
- package/src/media/mdx/Progress/linear.ru.mdx +9 -23
- package/src/media/mdx/Progress/progress.en.mdx +67 -5
- package/src/media/mdx/Progress/progress.ru.mdx +67 -5
- package/src/media/mdx/Progress/values.en.mdx +6 -28
- package/src/media/mdx/Progress/values.ru.mdx +6 -29
- package/src/media/mdx/Ripple/ripple.en.mdx +34 -40
- package/src/media/mdx/Ripple/ripple.ru.mdx +34 -40
- package/src/media/mdx/Scrollbar/emits-include.en.mdx +38 -0
- package/src/media/mdx/Scrollbar/emits-include.ru.mdx +38 -0
- package/src/media/mdx/Scrollbar/emits.en.mdx +38 -0
- package/src/media/mdx/Scrollbar/emits.ru.mdx +38 -0
- package/src/media/mdx/Scrollbar/scrollbar.en.mdx +38 -2
- package/src/media/mdx/Scrollbar/scrollbar.ru.mdx +38 -2
- package/src/media/mdx/Scrollbar/wikiMdxScrollbar.ts +12 -43
- package/src/media/mdx/Skeleton/classes.en.mdx +13 -0
- package/src/media/mdx/Skeleton/classes.ru.mdx +13 -0
- package/src/media/mdx/Skeleton/expose.isActive.en.mdx +7 -28
- package/src/media/mdx/Skeleton/expose.isActive.ru.mdx +7 -28
- package/src/media/mdx/Skeleton/skeleton.en.mdx +37 -36
- package/src/media/mdx/Skeleton/skeleton.ru.mdx +37 -36
- package/src/media/mdx/Skeleton/wikiMdxSkeleton.ts +7 -0
- package/src/media/mdx/Window/axis.en.mdx +11 -19
- package/src/media/mdx/Window/axis.ru.mdx +11 -19
- package/src/media/mdx/Window/classes.en.mdx +9 -26
- package/src/media/mdx/Window/classes.ru.mdx +9 -26
- package/src/media/mdx/Window/event.window.en.mdx +26 -8
- package/src/media/mdx/Window/event.window.ru.mdx +26 -8
- package/src/media/mdx/Window/expose.en.mdx +44 -0
- package/src/media/mdx/Window/expose.ru.mdx +44 -0
- package/src/media/mdx/Window/hooks.en.mdx +29 -50
- package/src/media/mdx/Window/hooks.ru.mdx +31 -52
- package/src/media/mdx/Window/slots.en.mdx +168 -0
- package/src/media/mdx/Window/slots.ru.mdx +168 -0
- package/src/media/mdx/Window/v-model.en.mdx +20 -11
- package/src/media/mdx/Window/v-model.ru.mdx +19 -11
- package/src/media/mdx/Window/wikiMdxWindow.ts +11 -41
- package/src/media/mdx/Window/window.en.mdx +55 -1
- package/src/media/mdx/Window/window.ru.mdx +55 -1
- package/src/media/mdx/event/events.bars.en.mdx +50 -0
- package/src/media/mdx/event/events.bars.ru.mdx +50 -0
- package/src/media/mdx/event/events.beforeinput.en.mdx +13 -0
- package/src/media/mdx/event/events.beforeinput.ru.mdx +13 -0
- package/src/media/mdx/event/events.click.en.mdx +36 -0
- package/src/media/mdx/event/events.click.ru.mdx +36 -0
- package/src/media/mdx/event/events.focus.en.mdx +13 -0
- package/src/media/mdx/event/events.focus.ru.mdx +13 -0
- package/src/media/mdx/event/events.input.en.mdx +89 -0
- package/src/media/mdx/event/events.input.ru.mdx +90 -0
- package/src/media/mdx/event/events.keyboard.en.mdx +13 -0
- package/src/media/mdx/event/events.keyboard.ru.mdx +13 -0
- package/src/media/mdx/event/events.paste.en.mdx +6 -0
- package/src/media/mdx/event/events.paste.ru.mdx +6 -0
- package/src/media/mdx/event/events.reset.en.mdx +6 -0
- package/src/media/mdx/event/events.reset.ru.mdx +6 -0
- package/src/media/mdx/event/wikiMdxEvent.ts +39 -74
- package/src/media/mdx/expose/expose.clear.en.mdx +3 -0
- package/src/media/mdx/expose/expose.clear.ru.mdx +3 -0
- package/src/media/mdx/expose/expose.detail.en.mdx +5 -0
- package/src/media/mdx/expose/{detail.ru.mdx → expose.detail.ru.mdx} +1 -3
- package/src/media/mdx/expose/expose.open.en.mdx +5 -0
- package/src/media/mdx/expose/expose.open.ru.mdx +5 -0
- package/src/media/mdx/expose/expose.selected.en.mdx +23 -0
- package/src/media/mdx/expose/expose.selected.ru.mdx +23 -0
- package/src/media/mdx/expose/{value.en.mdx → expose.value.en.mdx} +1 -3
- package/src/media/mdx/expose/{value.ru.mdx → expose.value.ru.mdx} +1 -3
- package/src/media/mdx/expose/wikiMdxExpose.ts +25 -31
- package/src/media/mdx/slot/caption.en.mdx +2 -7
- package/src/media/mdx/slot/caption.ru.mdx +2 -7
- package/src/media/mdx/slot/control.en.mdx +4 -5
- package/src/media/mdx/slot/control.ru.mdx +4 -5
- package/src/media/mdx/slot/default.en.mdx +2 -7
- package/src/media/mdx/slot/default.ru.mdx +2 -7
- package/src/media/mdx/slot/description.en.mdx +2 -7
- package/src/media/mdx/slot/description.ru.mdx +2 -7
- package/src/media/mdx/slot/footer.en.mdx +4 -5
- package/src/media/mdx/slot/footer.ru.mdx +4 -5
- package/src/media/mdx/slot/label.en.mdx +2 -8
- package/src/media/mdx/slot/label.ru.mdx +2 -8
- package/src/media/mdx/slot/prefix.en.mdx +1 -4
- package/src/media/mdx/slot/prefix.ru.mdx +1 -4
- package/src/media/mdx/slot/suffix.en.mdx +1 -4
- package/src/media/mdx/slot/suffix.ru.mdx +1 -4
- package/src/media/mdx/slot/wikiMdxSlot.ts +0 -6
- package/src/media/mdx/style/adaptive.en.mdx +6 -16
- package/src/media/mdx/style/adaptive.ru.mdx +6 -16
- package/src/media/mdx/style/asPalette.en.mdx +13 -5
- package/src/media/mdx/style/asPalette.ru.mdx +13 -5
- package/src/media/mdx/style/dir.en.mdx +14 -7
- package/src/media/mdx/style/dir.ru.mdx +14 -7
- package/src/media/mdx/style/isSkeleton.en.mdx +20 -6
- package/src/media/mdx/style/isSkeleton.ru.mdx +19 -5
- package/src/media/mdx/value/highlight.en.mdx +19 -12
- package/src/media/mdx/value/highlight.ru.mdx +19 -12
- package/src/media/mdx/value/labelNumber.en.mdx +39 -20
- package/src/media/mdx/value/labelNumber.ru.mdx +39 -20
- package/src/media/mdx/value/value.en.mdx +6 -12
- package/src/media/mdx/value/value.ru.mdx +6 -12
- package/src/media/styles/color.md +1 -0
- package/src/media/styles/en/about.mdx +79 -0
- package/src/media/styles/en/color.mdx +711 -0
- package/src/media/styles/en/content.mdx +29 -0
- package/src/media/styles/en/dimension.mdx +233 -0
- package/src/media/styles/en/dir.mdx +193 -0
- package/src/media/styles/en/flex.mdx +249 -0
- package/src/media/styles/en/font.mdx +171 -0
- package/src/media/styles/en/margin.mdx +115 -0
- package/src/media/styles/en/media.mdx +133 -0
- package/src/media/styles/en/padding.mdx +115 -0
- package/src/media/styles/en/position.mdx +183 -0
- package/src/media/styles/en/rules.mdx +117 -0
- package/src/media/styles/en/scrollbar.mdx +27 -0
- package/src/media/styles/en/selector.mdx +153 -0
- package/src/media/styles/en/transform.mdx +114 -0
- package/src/media/styles/ru/about.mdx +78 -0
- package/src/media/styles/ru/color.mdx +711 -0
- package/src/media/styles/ru/content.mdx +30 -0
- package/src/media/styles/ru/dimension.mdx +233 -0
- package/src/media/styles/ru/dir.mdx +193 -0
- package/src/media/styles/ru/flex.mdx +249 -0
- package/src/media/styles/ru/font.mdx +171 -0
- package/src/media/styles/ru/margin.mdx +115 -0
- package/src/media/styles/ru/media.mdx +133 -0
- package/src/media/styles/ru/padding.mdx +115 -0
- package/src/media/styles/ru/position.mdx +183 -0
- package/src/media/styles/ru/rules.mdx +117 -0
- package/src/media/styles/ru/scrollbar.mdx +27 -0
- package/src/media/styles/ru/selector.mdx +153 -0
- package/src/media/styles/ru/transform.mdx +114 -0
- package/src/styles/storybookStyle.scss +1 -0
- package/src/media/mdx/Bars/slot.actionBars.en.mdx +0 -12
- package/src/media/mdx/Bars/slot.actionBars.ru.mdx +0 -11
- package/src/media/mdx/Bars/slot.bars.en.mdx +0 -12
- package/src/media/mdx/Bars/slot.bars.ru.mdx +0 -11
- package/src/media/mdx/Cell/slot.body.en.mdx +0 -7
- package/src/media/mdx/Cell/slot.body.ru.mdx +0 -7
- package/src/media/mdx/Cell/slot.trailing.en.mdx +0 -7
- package/src/media/mdx/Cell/slot.trailing.ru.mdx +0 -7
- package/src/media/mdx/Field/slot.default.en.mdx +0 -9
- package/src/media/mdx/Field/slot.default.ru.mdx +0 -9
- package/src/media/mdx/Field/slot.leading.en.mdx +0 -10
- package/src/media/mdx/Field/slot.leading.ru.mdx +0 -10
- package/src/media/mdx/Field/slot.trailing.en.mdx +0 -10
- package/src/media/mdx/Field/slot.trailing.ru.mdx +0 -10
- package/src/media/mdx/FieldMessage/slot.helper.en.mdx +0 -12
- package/src/media/mdx/FieldMessage/slot.helper.ru.mdx +0 -12
- package/src/media/mdx/FieldMessage/slot.validation.en.mdx +0 -12
- package/src/media/mdx/FieldMessage/slot.validation.ru.mdx +0 -12
- package/src/media/mdx/Image/expose.data.en.mdx +0 -13
- package/src/media/mdx/Image/expose.data.ru.mdx +0 -13
- package/src/media/mdx/Image/expose.type.en.mdx +0 -21
- package/src/media/mdx/ListGroup/slot.head.en.mdx +0 -8
- package/src/media/mdx/ListGroup/slot.head.ru.mdx +0 -8
- package/src/media/mdx/ListGroup/slot.list.en.mdx +0 -8
- package/src/media/mdx/ListGroup/slot.list.ru.mdx +0 -8
- package/src/media/mdx/ListItem/slot.body.en.mdx +0 -7
- package/src/media/mdx/ListItem/slot.body.ru.mdx +0 -7
- package/src/media/mdx/ListItem/slot.trailing.en.mdx +0 -7
- package/src/media/mdx/ListItem/slot.trailing.ru.mdx +0 -7
- package/src/media/mdx/Menu/slot.contextBottom.en.mdx +0 -9
- package/src/media/mdx/Menu/slot.contextBottom.ru.mdx +0 -9
- package/src/media/mdx/Menu/slot.contextTop.en.mdx +0 -9
- package/src/media/mdx/Menu/slot.contextTop.ru.mdx +0 -9
- package/src/media/mdx/Menu/slot.control.en.mdx +0 -9
- package/src/media/mdx/Menu/slot.control.ru.mdx +0 -9
- package/src/media/mdx/Menu/slot.footer.en.mdx +0 -9
- package/src/media/mdx/Menu/slot.footer.ru.mdx +0 -9
- package/src/media/mdx/Menu/slot.title.en.mdx +0 -9
- package/src/media/mdx/Menu/slot.title.ru.mdx +0 -9
- package/src/media/mdx/MotionTransform/slot.body.en.mdx +0 -11
- package/src/media/mdx/MotionTransform/slot.body.ru.mdx +0 -11
- package/src/media/mdx/MotionTransform/slot.head.en.mdx +0 -11
- package/src/media/mdx/MotionTransform/slot.head.ru.mdx +0 -11
- package/src/media/mdx/MotionTransform/slot.params.en.mdx +0 -61
- package/src/media/mdx/MotionTransform/slot.params.ru.mdx +0 -61
- package/src/media/mdx/Scrollbar/event.bottom.en.mdx +0 -12
- package/src/media/mdx/Scrollbar/event.bottom.ru.mdx +0 -12
- package/src/media/mdx/Scrollbar/event.edge.en.mdx +0 -14
- package/src/media/mdx/Scrollbar/event.edge.ru.mdx +0 -14
- package/src/media/mdx/Scrollbar/event.leaveBottom.en.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.leaveBottom.ru.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.leaveTop.en.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.leaveTop.ru.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.reachBottom.en.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.reachBottom.ru.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.reachTop.en.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.reachTop.ru.mdx +0 -11
- package/src/media/mdx/Scrollbar/event.top.en.mdx +0 -12
- package/src/media/mdx/Scrollbar/event.top.ru.mdx +0 -12
- package/src/media/mdx/Window/expose.control.en.mdx +0 -15
- package/src/media/mdx/Window/expose.control.ru.mdx +0 -15
- package/src/media/mdx/Window/expose.id.en.mdx +0 -7
- package/src/media/mdx/Window/expose.id.ru.mdx +0 -7
- package/src/media/mdx/Window/expose.open.en.mdx +0 -7
- package/src/media/mdx/Window/expose.open.ru.mdx +0 -7
- package/src/media/mdx/Window/expose.setOpen.en.mdx +0 -7
- package/src/media/mdx/Window/expose.setOpen.ru.mdx +0 -7
- package/src/media/mdx/Window/expose.toClose.en.mdx +0 -7
- package/src/media/mdx/Window/expose.toClose.ru.mdx +0 -7
- package/src/media/mdx/Window/expose.toOpen.en.mdx +0 -7
- package/src/media/mdx/Window/expose.toOpen.ru.mdx +0 -7
- package/src/media/mdx/Window/expose.toggle.en.mdx +0 -7
- package/src/media/mdx/Window/expose.toggle.ru.mdx +0 -7
- package/src/media/mdx/event/bars.en.mdx +0 -17
- package/src/media/mdx/event/bars.ru.mdx +0 -14
- package/src/media/mdx/event/barsBack.en.mdx +0 -14
- package/src/media/mdx/event/barsBack.ru.mdx +0 -16
- package/src/media/mdx/event/barsLite.en.mdx +0 -14
- package/src/media/mdx/event/barsLite.ru.mdx +0 -14
- package/src/media/mdx/event/click.en.mdx +0 -18
- package/src/media/mdx/event/click.ru.mdx +0 -18
- package/src/media/mdx/event/clickLite.en.mdx +0 -18
- package/src/media/mdx/event/clickLite.ru.mdx +0 -18
- package/src/media/mdx/event/scrollbarBottom.en.mdx +0 -13
- package/src/media/mdx/event/scrollbarBottom.ru.mdx +0 -13
- package/src/media/mdx/event/scrollbarEdge.en.mdx +0 -15
- package/src/media/mdx/event/scrollbarEdge.ru.mdx +0 -15
- package/src/media/mdx/event/scrollbarLeaveBottom.en.mdx +0 -12
- package/src/media/mdx/event/scrollbarLeaveBottom.ru.mdx +0 -12
- package/src/media/mdx/event/scrollbarLeaveTop.en.mdx +0 -12
- package/src/media/mdx/event/scrollbarLeaveTop.ru.mdx +0 -12
- package/src/media/mdx/event/scrollbarReachBottom.en.mdx +0 -12
- package/src/media/mdx/event/scrollbarReachBottom.ru.mdx +0 -12
- package/src/media/mdx/event/scrollbarReachTop.en.mdx +0 -12
- package/src/media/mdx/event/scrollbarReachTop.ru.mdx +0 -12
- package/src/media/mdx/event/scrollbarTop.en.mdx +0 -13
- package/src/media/mdx/event/scrollbarTop.ru.mdx +0 -13
- package/src/media/mdx/event/window.en.mdx +0 -20
- package/src/media/mdx/event/window.ru.mdx +0 -20
- package/src/media/mdx/expose/detail.en.mdx +0 -7
- package/src/media/mdx/expose/isSelected.en.mdx +0 -8
- package/src/media/mdx/expose/isSelected.ru.mdx +0 -8
- package/src/media/mdx/expose/selectedList.en.mdx +0 -7
- package/src/media/mdx/expose/selectedList.ru.mdx +0 -7
- package/src/media/mdx/expose/selectedNames.en.mdx +0 -7
- package/src/media/mdx/expose/selectedNames.ru.mdx +0 -7
- package/src/media/mdx/expose/selectedValues.en.mdx +0 -8
- package/src/media/mdx/expose/selectedValues.ru.mdx +0 -8
- package/src/media/mdx/slot/title.en.mdx +0 -9
- package/src/media/mdx/slot/title.ru.mdx +0 -9
|
@@ -1,22 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
Base container for form controls that composes label, messages, counter, icons, and progress into a unified structure.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Field centralizes the visual representation management of input fields, handles focus and validation states, coordinates auxiliary element positioning, and provides a consistent API for building any type of inputs. It serves as the fundamental foundation for creating consistent forms with slot support, control icons, and subcomponent integration.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- **Unified scaffold** — Wrapper template for the input area and helper zones (caption/prefix/suffix)
|
|
7
|
-
- **State styles** — Manages focus, disabled, readonly, selected, block
|
|
8
|
-
- **Slot support** — Integrates caption, prefix, suffix at the container level
|
|
5
|
+
**Core capabilities:**
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
- Subcomponent composition (FieldLabel, FieldMessage, FieldCounter, Progress)
|
|
8
|
+
- State management (focus, disabled, readonly, selected, block)
|
|
9
|
+
- Slot coordination (caption, prefix, suffix, leading, trailing)
|
|
10
|
+
- Validation highlighting based on validationMessage and forceShowMessage
|
|
11
|
+
- Control icons with customizable visibility (cancel, arrows)
|
|
12
|
+
- Flexible counter positioning via counterTop
|
|
13
|
+
- Built-in helpers for sizing and icons (FieldSize, FieldIcons)
|
|
14
|
+
- Loading progress integration and skeleton state
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
- **Character counter** — Position toggle via `counterTop`
|
|
14
|
-
- **Control icons** — Cancel and navigation (arrows) with visibility flags
|
|
15
|
-
- **Sizing helpers** — Built-in FieldSize and FieldIcons
|
|
16
|
-
- **Progress integration** — Compact static progress for loading/status
|
|
16
|
+
**Typical use cases:**
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- Base container for Input, Select, Textarea, and other form controls
|
|
19
|
+
- Building custom form components with unified styling
|
|
20
|
+
- Creating fields with validation and character counters
|
|
21
|
+
- Developing component libraries with consistent UI
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
```html
|
|
24
|
+
<script setup>
|
|
25
|
+
import { ref } from 'vue'
|
|
26
|
+
import { Field } from '@dxtmisha/constructor'
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
const value = ref('')
|
|
29
|
+
|
|
30
|
+
// Field provides structure and management
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<Field
|
|
35
|
+
label="Username"
|
|
36
|
+
helper-message="Enter your name"
|
|
37
|
+
:counter="value.length"
|
|
38
|
+
counter-max="50"
|
|
39
|
+
>
|
|
40
|
+
<template #default="{ id, className }">
|
|
41
|
+
<input
|
|
42
|
+
:id="id"
|
|
43
|
+
:class="className"
|
|
44
|
+
v-model="value"
|
|
45
|
+
maxlength="50"
|
|
46
|
+
/>
|
|
47
|
+
</template>
|
|
48
|
+
</Field>
|
|
49
|
+
</template>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
> Field is a constructor container: it does not handle data input directly, but organizes structure, classes, and auxiliary element display for any type of input fields.
|
|
@@ -1,22 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
Базовый контейнер для полей формы, который композирует метку, сообщения, счётчик, иконки и прогресс в единую структуру.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Field централизует управление визуальным представлением полей ввода, обрабатывает состояния фокуса и валидации, координирует расположение вспомогательных элементов и предоставляет согласованный API для построения любых типов инпутов. Является фундаментальной основой для создания консистентных форм с поддержкой слотов, иконок управления и интеграцией подкомпонентов.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- **Единый каркас** — Шаблон обёртки для поля ввода и вспомогательных зон (caption/prefix/suffix)
|
|
7
|
-
- **Стили состояния** — Управление состояниями: focus, disabled, readonly, selected, block
|
|
8
|
-
- **Поддержка слотов** — Встраивание caption, prefix, suffix на уровне контейнера
|
|
5
|
+
**Основные возможности:**
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
- Композиция подкомпонентов (FieldLabel, FieldMessage, FieldCounter, Progress)
|
|
8
|
+
- Управление состояниями (focus, disabled, readonly, selected, block)
|
|
9
|
+
- Координация слотов (caption, prefix, suffix, leading, trailing)
|
|
10
|
+
- Подсветка валидации на основе validationMessage и forceShowMessage
|
|
11
|
+
- Иконки управления с настраиваемой видимостью (cancel, arrows)
|
|
12
|
+
- Гибкое позиционирование счётчика через counterTop
|
|
13
|
+
- Встроенные помощники для размеров и иконок (FieldSize, FieldIcons)
|
|
14
|
+
- Интеграция прогресса загрузки и скелетон-состояния
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
- **Счетчик символов** — Переключение позиции счётчика через `counterTop`
|
|
14
|
-
- **Иконки управления** — Отмена и навигация (стрелки) с флагами видимости
|
|
15
|
-
- **Интеграция размеров** — Встроенные помощники FieldSize и FieldIcons
|
|
16
|
-
- **Интеграция прогресса** — Компактный статичный прогресс для загрузок/состояний
|
|
16
|
+
**Типичные сценарии использования:**
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- Базовый контейнер для Input, Select, Textarea и других полей ввода
|
|
19
|
+
- Построение кастомных компонентов форм с единым стилем
|
|
20
|
+
- Создание полей с валидацией и счётчиками символов
|
|
21
|
+
- Разработка библиотек компонентов с консистентным UI
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
```html
|
|
24
|
+
<script setup>
|
|
25
|
+
import { ref } from 'vue'
|
|
26
|
+
import { Field } from '@dxtmisha/constructor'
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
const value = ref('')
|
|
29
|
+
|
|
30
|
+
// Field предоставляет структуру и управление
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<Field
|
|
35
|
+
label="Имя пользователя"
|
|
36
|
+
helper-message="Введите ваше имя"
|
|
37
|
+
:counter="value.length"
|
|
38
|
+
counter-max="50"
|
|
39
|
+
>
|
|
40
|
+
<template #default="{ id, className }">
|
|
41
|
+
<input
|
|
42
|
+
:id="id"
|
|
43
|
+
:class="className"
|
|
44
|
+
v-model="value"
|
|
45
|
+
maxlength="50"
|
|
46
|
+
/>
|
|
47
|
+
</template>
|
|
48
|
+
</Field>
|
|
49
|
+
</template>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
> Field — это контейнер-конструктор: он не обрабатывает ввод данных напрямую, а организует структуру, классы и отображение вспомогательных элементов для любых типов полей ввода.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
### `default`
|
|
2
|
+
|
|
3
|
+
Slot for placing the main input element (input, select, textarea, etc.). Required slot.
|
|
4
|
+
|
|
5
|
+
**Parameters:**
|
|
6
|
+
- `props: FieldControl` — object with data for binding the input element
|
|
7
|
+
|
|
8
|
+
### `leading`
|
|
9
|
+
|
|
10
|
+
Slot for placing content at the start of the interactive field area, before the main input element.
|
|
11
|
+
|
|
12
|
+
**Parameters:**
|
|
13
|
+
- `props: FieldControl` — object with data for binding
|
|
14
|
+
|
|
15
|
+
### `trailing`
|
|
16
|
+
|
|
17
|
+
Slot for placing content at the end of the interactive field area, after the main input element.
|
|
18
|
+
|
|
19
|
+
**Parameters:**
|
|
20
|
+
- `props: FieldControl` — object with data for binding
|
|
21
|
+
|
|
22
|
+
## FieldControl
|
|
23
|
+
|
|
24
|
+
`FieldControl` — object passed to Field component slots, containing data for proper integration of input elements.
|
|
25
|
+
|
|
26
|
+
### Type structure
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
type FieldControl = {
|
|
30
|
+
/** Unique element identifier for binding label and input */
|
|
31
|
+
id: string
|
|
32
|
+
|
|
33
|
+
/** CSS classes for the visible input area */
|
|
34
|
+
className: string
|
|
35
|
+
|
|
36
|
+
/** CSS classes for the hidden native input element */
|
|
37
|
+
classHidden: string
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Properties
|
|
42
|
+
|
|
43
|
+
- **`id`** — unique identifier generated by the component to link `<label>` with the input element via the `for` attribute
|
|
44
|
+
- **`className`** — CSS classes for styling the visible input element (applied to input, textarea, select, etc.)
|
|
45
|
+
- **`classHidden`** — CSS classes for the hidden native input (used in custom components like Checkbox, Radio)
|
|
46
|
+
|
|
47
|
+
### Property purposes
|
|
48
|
+
|
|
49
|
+
#### `id`
|
|
50
|
+
Ensures accessibility and proper label functionality:
|
|
51
|
+
- Allows clicking on the label to focus the field
|
|
52
|
+
- Links descriptions with the input element for screen readers
|
|
53
|
+
- Generated automatically, must be used
|
|
54
|
+
|
|
55
|
+
#### `className`
|
|
56
|
+
Applies Field component styles to the input element:
|
|
57
|
+
- Ensures visual consistency
|
|
58
|
+
- Adds states (focus, disabled, validation)
|
|
59
|
+
- Integrates skeleton states
|
|
60
|
+
|
|
61
|
+
#### `classHidden`
|
|
62
|
+
Used for native inputs in custom components:
|
|
63
|
+
- Hides the original input visually
|
|
64
|
+
- Preserves functionality and accessibility
|
|
65
|
+
- Applied in Checkbox, Radio, Switch
|
|
66
|
+
|
|
67
|
+
### Usage example
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<script setup>
|
|
71
|
+
import { ref } from 'vue'
|
|
72
|
+
|
|
73
|
+
const email = ref('')
|
|
74
|
+
const password = ref('')
|
|
75
|
+
const showPassword = ref(false)
|
|
76
|
+
const error = ref('')
|
|
77
|
+
|
|
78
|
+
const validateEmail = (value) => {
|
|
79
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
|
80
|
+
if (!emailRegex.test(value)) {
|
|
81
|
+
error.value = 'Invalid email'
|
|
82
|
+
} else {
|
|
83
|
+
error.value = ''
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<div class="form">
|
|
90
|
+
<!-- Simple field with search icon -->
|
|
91
|
+
<Field label="Email" :validation-message="error">
|
|
92
|
+
<template #leading>
|
|
93
|
+
<Icon name="email" />
|
|
94
|
+
</template>
|
|
95
|
+
<template #default="{ id, className }">
|
|
96
|
+
<input
|
|
97
|
+
:id="id"
|
|
98
|
+
:class="className"
|
|
99
|
+
type="email"
|
|
100
|
+
v-model="email"
|
|
101
|
+
@blur="validateEmail(email)"
|
|
102
|
+
/>
|
|
103
|
+
</template>
|
|
104
|
+
</Field>
|
|
105
|
+
|
|
106
|
+
<!-- Field with password visibility toggle -->
|
|
107
|
+
<Field label="Password">
|
|
108
|
+
<template #default="{ id, className }">
|
|
109
|
+
<input
|
|
110
|
+
:id="id"
|
|
111
|
+
:class="className"
|
|
112
|
+
:type="showPassword ? 'text' : 'password'"
|
|
113
|
+
v-model="password"
|
|
114
|
+
/>
|
|
115
|
+
</template>
|
|
116
|
+
<template #trailing>
|
|
117
|
+
<button
|
|
118
|
+
type="button"
|
|
119
|
+
@click="showPassword = !showPassword"
|
|
120
|
+
aria-label="Show password"
|
|
121
|
+
>
|
|
122
|
+
<Icon :name="showPassword ? 'visibility_off' : 'visibility'" />
|
|
123
|
+
</button>
|
|
124
|
+
</template>
|
|
125
|
+
</Field>
|
|
126
|
+
|
|
127
|
+
<!-- Field with custom element -->
|
|
128
|
+
<Field label="Select option">
|
|
129
|
+
<template #leading>
|
|
130
|
+
<Icon name="tune" />
|
|
131
|
+
</template>
|
|
132
|
+
<template #default="{ id, className }">
|
|
133
|
+
<select :id="id" :class="className" v-model="selectedOption">
|
|
134
|
+
<option value="1">Option 1</option>
|
|
135
|
+
<option value="2">Option 2</option>
|
|
136
|
+
<option value="3">Option 3</option>
|
|
137
|
+
</select>
|
|
138
|
+
</template>
|
|
139
|
+
<template #trailing>
|
|
140
|
+
<Icon name="expand_more" />
|
|
141
|
+
</template>
|
|
142
|
+
</Field>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
In this example:
|
|
148
|
+
- Each field uses `id` and `className` from `FieldControl`
|
|
149
|
+
- `leading` slot adds icons to the left of the input
|
|
150
|
+
- `trailing` slot adds interactive elements to the right
|
|
151
|
+
- All elements are properly integrated into the Field structure
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
### `default`
|
|
2
|
+
|
|
3
|
+
Слот для размещения основного элемента ввода (input, select, textarea и т.д.). Обязательный слот.
|
|
4
|
+
|
|
5
|
+
**Параметры:**
|
|
6
|
+
- `props: FieldControl` — объект с данными для связывания элемента ввода
|
|
7
|
+
|
|
8
|
+
### `leading`
|
|
9
|
+
|
|
10
|
+
Слот для размещения контента в начале интерактивной области поля, перед основным элементом ввода.
|
|
11
|
+
|
|
12
|
+
**Параметры:**
|
|
13
|
+
- `props: FieldControl` — объект с данными для связывания
|
|
14
|
+
|
|
15
|
+
### `trailing`
|
|
16
|
+
|
|
17
|
+
Слот для размещения контента в конце интерактивной области поля, после основного элемента ввода.
|
|
18
|
+
|
|
19
|
+
**Параметры:**
|
|
20
|
+
- `props: FieldControl` — объект с данными для связывания
|
|
21
|
+
|
|
22
|
+
## FieldControl
|
|
23
|
+
|
|
24
|
+
`FieldControl` — объект, передаваемый в слоты компонента Field, содержащий данные для корректной интеграции элементов ввода.
|
|
25
|
+
|
|
26
|
+
### Структура типа
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
type FieldControl = {
|
|
30
|
+
/** Уникальный идентификатор элемента для связывания label и input */
|
|
31
|
+
id: string
|
|
32
|
+
|
|
33
|
+
/** CSS-классы для видимой зоны ввода */
|
|
34
|
+
className: string
|
|
35
|
+
|
|
36
|
+
/** CSS-классы для скрытого нативного элемента ввода */
|
|
37
|
+
classHidden: string
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Свойства
|
|
42
|
+
|
|
43
|
+
- **`id`** — уникальный идентификатор, генерируемый компонентом для связывания `<label>` с элементом ввода через атрибут `for`
|
|
44
|
+
- **`className`** — CSS-классы для стилизации видимого элемента ввода (применяются к input, textarea, select и т.д.)
|
|
45
|
+
- **`classHidden`** — CSS-классы для скрытого нативного input (используется в кастомных компонентах типа Checkbox, Radio)
|
|
46
|
+
|
|
47
|
+
### Назначение свойств
|
|
48
|
+
|
|
49
|
+
#### `id`
|
|
50
|
+
Обеспечивает доступность (accessibility) и корректную работу label:
|
|
51
|
+
- Позволяет кликать на метку для фокуса на поле
|
|
52
|
+
- Связывает описания с элементом ввода для скринридеров
|
|
53
|
+
- Генерируется автоматически, использовать обязательно
|
|
54
|
+
|
|
55
|
+
#### `className`
|
|
56
|
+
Применяет стили компонента Field к элементу ввода:
|
|
57
|
+
- Обеспечивает визуальное единообразие
|
|
58
|
+
- Добавляет состояния (focus, disabled, validation)
|
|
59
|
+
- Интегрирует скелетон-состояния
|
|
60
|
+
|
|
61
|
+
#### `classHidden`
|
|
62
|
+
Используется для нативных input в кастомных компонентах:
|
|
63
|
+
- Скрывает оригинальный input визуально
|
|
64
|
+
- Сохраняет функциональность и доступность
|
|
65
|
+
- Применяется в Checkbox, Radio, Switch
|
|
66
|
+
|
|
67
|
+
### Пример использования
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<script setup>
|
|
71
|
+
import { ref } from 'vue'
|
|
72
|
+
|
|
73
|
+
const email = ref('')
|
|
74
|
+
const password = ref('')
|
|
75
|
+
const showPassword = ref(false)
|
|
76
|
+
const error = ref('')
|
|
77
|
+
|
|
78
|
+
const validateEmail = (value) => {
|
|
79
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
|
80
|
+
if (!emailRegex.test(value)) {
|
|
81
|
+
error.value = 'Некорректный email'
|
|
82
|
+
} else {
|
|
83
|
+
error.value = ''
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<div class="form">
|
|
90
|
+
<!-- Простое поле с иконкой поиска -->
|
|
91
|
+
<Field label="Email" :validation-message="error">
|
|
92
|
+
<template #leading>
|
|
93
|
+
<Icon name="email" />
|
|
94
|
+
</template>
|
|
95
|
+
<template #default="{ id, className }">
|
|
96
|
+
<input
|
|
97
|
+
:id="id"
|
|
98
|
+
:class="className"
|
|
99
|
+
type="email"
|
|
100
|
+
v-model="email"
|
|
101
|
+
@blur="validateEmail(email)"
|
|
102
|
+
/>
|
|
103
|
+
</template>
|
|
104
|
+
</Field>
|
|
105
|
+
|
|
106
|
+
<!-- Поле с переключением видимости пароля -->
|
|
107
|
+
<Field label="Пароль">
|
|
108
|
+
<template #default="{ id, className }">
|
|
109
|
+
<input
|
|
110
|
+
:id="id"
|
|
111
|
+
:class="className"
|
|
112
|
+
:type="showPassword ? 'text' : 'password'"
|
|
113
|
+
v-model="password"
|
|
114
|
+
/>
|
|
115
|
+
</template>
|
|
116
|
+
<template #trailing>
|
|
117
|
+
<button
|
|
118
|
+
type="button"
|
|
119
|
+
@click="showPassword = !showPassword"
|
|
120
|
+
aria-label="Показать пароль"
|
|
121
|
+
>
|
|
122
|
+
<Icon :name="showPassword ? 'visibility_off' : 'visibility'" />
|
|
123
|
+
</button>
|
|
124
|
+
</template>
|
|
125
|
+
</Field>
|
|
126
|
+
|
|
127
|
+
<!-- Поле с кастомным элементом -->
|
|
128
|
+
<Field label="Выберите опцию">
|
|
129
|
+
<template #leading>
|
|
130
|
+
<Icon name="tune" />
|
|
131
|
+
</template>
|
|
132
|
+
<template #default="{ id, className }">
|
|
133
|
+
<select :id="id" :class="className" v-model="selectedOption">
|
|
134
|
+
<option value="1">Опция 1</option>
|
|
135
|
+
<option value="2">Опция 2</option>
|
|
136
|
+
<option value="3">Опция 3</option>
|
|
137
|
+
</select>
|
|
138
|
+
</template>
|
|
139
|
+
<template #trailing>
|
|
140
|
+
<Icon name="expand_more" />
|
|
141
|
+
</template>
|
|
142
|
+
</Field>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
В этом примере:
|
|
148
|
+
- Каждое поле использует `id` и `className` из `FieldControl`
|
|
149
|
+
- Слот `leading` добавляет иконки слева от ввода
|
|
150
|
+
- Слот `trailing` добавляет интерактивные элементы справа
|
|
151
|
+
- Все элементы корректно интегрированы в структуру Field
|
|
@@ -1,28 +1,49 @@
|
|
|
1
|
-
## Value state
|
|
2
|
-
|
|
3
|
-
`
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
## Value state
|
|
2
|
+
|
|
3
|
+
Properties `value` and `isValue` are designed to control the visual filled state of the field independently of the actual content.
|
|
4
|
+
|
|
5
|
+
**Properties:**
|
|
6
|
+
|
|
7
|
+
- `value` — actual field content (string/number) passed to the inner element via slot
|
|
8
|
+
- `isValue` — forcibly activates the visual "filled" state even when the value is empty
|
|
9
|
+
|
|
10
|
+
Properties work together: `Field` reads `value` reactively through `focusValue` for visual purposes (displaying text in scoreboard, caption handling), but does not manage it directly or validate it. If the real value is non-empty, the field automatically receives the visual "filled" state regardless of `isValue`. When the value is empty, the `isValue = true` flag forcibly activates the visual filled mode (floating label, corresponding classes), which is useful for preloads, masks, or delayed data insertion.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
|
|
16
|
+
const value = ref('')
|
|
17
|
+
const isLoading = ref(true)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<!-- Normal behavior -->
|
|
22
|
+
<Field label="Name">
|
|
23
|
+
<template #default="{ id, className }">
|
|
24
|
+
<input :id="id" :class="className" v-model="value" />
|
|
25
|
+
</template>
|
|
26
|
+
</Field>
|
|
27
|
+
|
|
28
|
+
<!-- Forced "filled" state -->
|
|
29
|
+
<Field
|
|
30
|
+
label="Email"
|
|
31
|
+
:value="value"
|
|
32
|
+
:is-value="true"
|
|
33
|
+
>
|
|
34
|
+
<template #default="{ id, className }">
|
|
35
|
+
<input :id="id" :class="className" v-model="value" />
|
|
36
|
+
</template>
|
|
37
|
+
</Field>
|
|
38
|
+
|
|
39
|
+
<!-- Preload with visual state -->
|
|
40
|
+
<Field
|
|
41
|
+
label="Data"
|
|
42
|
+
:is-value="isLoading"
|
|
43
|
+
>
|
|
44
|
+
<template #default="{ id, className }">
|
|
45
|
+
<input :id="id" :class="className" v-model="value" />
|
|
46
|
+
</template>
|
|
47
|
+
</Field>
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
@@ -1,28 +1,49 @@
|
|
|
1
|
-
## Состояние значения
|
|
2
|
-
|
|
3
|
-
`
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
## Состояние значения
|
|
2
|
+
|
|
3
|
+
Свойства `value` и `isValue` предназначены для управления визуальным состоянием заполненности поля независимо от фактического содержимого.
|
|
4
|
+
|
|
5
|
+
**Свойства:**
|
|
6
|
+
|
|
7
|
+
- `value` — фактическое содержимое поля (строка/число), передаваемое во внутренний элемент через слот
|
|
8
|
+
- `isValue` — принудительно активирует визуальное состояние "заполнено" даже при пустом значении
|
|
9
|
+
|
|
10
|
+
Свойства работают совместно: `Field` считывает `value` реактивно через `focusValue` для визуальных целей (отображение текста в scoreboard, работа с caption), но не управляет им напрямую и не валидирует. Если реальное значение непустое, поле автоматически получает визуальное состояние "заполнено" независимо от `isValue`. При пустом значении флаг `isValue = true` принудительно активирует визуальный режим заполненности (плавающая метка, соответствующие классы), что полезно для прелоадов, масок или отложенной подстановки данных.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
|
|
16
|
+
const value = ref('')
|
|
17
|
+
const isLoading = ref(true)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<!-- Обычное поведение -->
|
|
22
|
+
<Field label="Имя">
|
|
23
|
+
<template #default="{ id, className }">
|
|
24
|
+
<input :id="id" :class="className" v-model="value" />
|
|
25
|
+
</template>
|
|
26
|
+
</Field>
|
|
27
|
+
|
|
28
|
+
<!-- Принудительное состояние "заполнено" -->
|
|
29
|
+
<Field
|
|
30
|
+
label="Email"
|
|
31
|
+
:value="value"
|
|
32
|
+
:is-value="true"
|
|
33
|
+
>
|
|
34
|
+
<template #default="{ id, className }">
|
|
35
|
+
<input :id="id" :class="className" v-model="value" />
|
|
36
|
+
</template>
|
|
37
|
+
</Field>
|
|
38
|
+
|
|
39
|
+
<!-- Прелоад с визуальным состоянием -->
|
|
40
|
+
<Field
|
|
41
|
+
label="Данные"
|
|
42
|
+
:is-value="isLoading"
|
|
43
|
+
>
|
|
44
|
+
<template #default="{ id, className }">
|
|
45
|
+
<input :id="id" :class="className" v-model="value" />
|
|
46
|
+
</template>
|
|
47
|
+
</Field>
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
````markdown
|
|
2
|
-
##
|
|
2
|
+
## Field width
|
|
3
3
|
|
|
4
|
-
Property
|
|
4
|
+
Property `width` defines the horizontal size of the Field container.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
- **width** (`string`) — Accept ANY valid CSS value: "320px", "48rem", "50%", "min(100%,320px)", "clamp(240px,40vw,480px)" or a design token (e.g. "sm") if your design system resolves it. The value "custom" is an internal technical marker (normally not used directly).
|
|
6
|
+
**Possible values:**
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- Any explicit value: applied directly (no extra wrapper logic).
|
|
8
|
+
- any valid CSS value (`'320px'`, `'48rem'`, `'50%'`, `'min(100%,320px)'`, `'clamp(240px,40vw,480px)'`)
|
|
9
|
+
- design system tokens (e.g., `'sm'`, `'md'`, `'lg'` if supported)
|
|
10
|
+
- `'custom'` — internal technical marker (not used directly)
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
Controls the fixed or relative width of the field, applying the value directly without additional wrappers. When the property is not set, the width remains flexible and depends on the parent container. When the `block` property is active (set to `true`), the field takes 100% width regardless of the specified `width` value, with block mode taking priority.
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<!-- Automatic width -->
|
|
16
|
+
<Field label="auto" />
|
|
17
|
+
|
|
18
|
+
<!-- Fixed width -->
|
|
19
|
+
<Field width="320px" label="320px" />
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
<!-- Relative width -->
|
|
22
|
+
<Field width="50%" label="50%" />
|
|
23
|
+
|
|
24
|
+
<!-- CSS functions -->
|
|
25
|
+
<Field width="min(100%, 320px)" label="min(...)" />
|
|
26
|
+
<Field width="clamp(240px, 40vw, 480px)" label="clamp(...)" />
|
|
27
|
+
```
|
|
26
28
|
````
|