@dxtmisha/wiki 0.24.3 → 0.25.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 +7 -7
- package/src/classes/WikiStorybookItem.ts +24 -0
- package/src/media/descriptions/wikiDescriptions.ts +28 -0
- package/src/media/descriptions/wikiDescriptionsAccordion.ts +158 -0
- package/src/media/descriptions/wikiDescriptionsActionSheet.ts +211 -0
- package/src/media/descriptions/wikiDescriptionsActions.ts +161 -0
- package/src/media/descriptions/wikiDescriptionsAnchor.ts +42 -0
- package/src/media/descriptions/wikiDescriptionsArrow.ts +181 -0
- package/src/media/descriptions/wikiDescriptionsBlock.ts +97 -0
- package/src/media/descriptions/wikiDescriptionsButton.ts +0 -1
- package/src/media/descriptions/wikiDescriptionsCell.ts +2 -1
- package/src/media/descriptions/wikiDescriptionsChipGroup.ts +168 -0
- package/src/media/descriptions/wikiDescriptionsDialog.ts +182 -0
- package/src/media/descriptions/wikiDescriptionsField.ts +2 -0
- package/src/media/descriptions/wikiDescriptionsImage.ts +41 -6
- package/src/media/descriptions/wikiDescriptionsInput.ts +257 -0
- package/src/media/descriptions/wikiDescriptionsMenu.ts +123 -0
- package/src/media/descriptions/wikiDescriptionsModal.ts +145 -0
- package/src/media/descriptions/wikiDescriptionsMotionTransform.ts +2 -6
- package/src/media/descriptions/wikiDescriptionsSelect.ts +209 -0
- package/src/media/descriptions/wikiDescriptionsSelectValue.ts +78 -0
- package/src/media/descriptions/wikiDescriptionsTextareaAutosize.ts +50 -0
- package/src/media/descriptions/wikiDescriptionsTooltip.ts +89 -0
- package/src/media/functional/en/conversions.mdx +67 -0
- package/src/media/functional/en/dataUtils.mdx +25 -0
- package/src/media/functional/en/datetimeRef.mdx +1 -1
- package/src/media/functional/en/eventRef.mdx +1 -1
- package/src/media/functional/en/executionUtils.mdx +58 -0
- package/src/media/functional/en/geoFlagRef.mdx +1 -1
- package/src/media/functional/en/geoIntlRef.mdx +1 -1
- package/src/media/functional/en/geoRef.mdx +2 -2
- package/src/media/functional/en/meta.mdx +1206 -0
- package/src/media/functional/en/metaManager.mdx +376 -0
- package/src/media/functional/en/metaOg.mdx +694 -0
- package/src/media/functional/en/metaTwitter.mdx +853 -0
- package/src/media/functional/en/reactive.mdx +40 -0
- package/src/media/functional/en/refTypes.mdx +1 -1
- package/src/media/functional/en/useApiRef.mdx +5 -5
- package/src/media/functional/en/useMeta.mdx +431 -0
- package/src/media/functional/en/validationUtils.mdx +11 -0
- package/src/media/functional/ru/conversions.mdx +67 -0
- package/src/media/functional/ru/dataUtils.mdx +25 -0
- package/src/media/functional/ru/datetimeRef.mdx +2 -2
- package/src/media/functional/ru/eventRef.mdx +1 -1
- package/src/media/functional/ru/executionUtils.mdx +58 -0
- package/src/media/functional/ru/geoFlagRef.mdx +1 -1
- package/src/media/functional/ru/geoIntl.mdx +2 -2
- package/src/media/functional/ru/geoIntlRef.mdx +1 -1
- package/src/media/functional/ru/geoRef.mdx +2 -2
- package/src/media/functional/ru/listTypes.mdx +1 -1
- package/src/media/functional/ru/meta.mdx +1330 -0
- package/src/media/functional/ru/metaManager.mdx +376 -0
- package/src/media/functional/ru/metaOg.mdx +694 -0
- package/src/media/functional/ru/metaTwitter.mdx +853 -0
- package/src/media/functional/ru/reactive.mdx +40 -0
- package/src/media/functional/ru/refTypes.mdx +2 -2
- package/src/media/functional/ru/useApiRef.mdx +5 -5
- package/src/media/functional/ru/useMeta.mdx +431 -0
- package/src/media/functional/ru/validationUtils.mdx +11 -0
- package/src/media/mdx/Accordion/accordion.en.mdx +59 -0
- package/src/media/mdx/Accordion/accordion.ru.mdx +59 -0
- package/src/media/mdx/Accordion/slots.en.mdx +6 -0
- package/src/media/mdx/Accordion/slots.ru.mdx +6 -0
- package/src/media/mdx/Accordion/wikiMdxAccordion.ts +25 -0
- package/src/media/mdx/ActionSheet/actionSheet.en.mdx +61 -0
- package/src/media/mdx/ActionSheet/actionSheet.ru.mdx +61 -0
- package/src/media/mdx/ActionSheet/touchClose.en.mdx +21 -0
- package/src/media/mdx/ActionSheet/touchClose.ru.mdx +21 -0
- package/src/media/mdx/ActionSheet/wikiMdxActionSheet.ts +25 -0
- package/src/media/mdx/Actions/actions.en.mdx +48 -0
- package/src/media/mdx/Actions/actions.ru.mdx +48 -0
- package/src/media/mdx/Actions/flexible.en.mdx +19 -0
- package/src/media/mdx/Actions/flexible.ru.mdx +19 -0
- package/src/media/mdx/Actions/list.en.mdx +50 -0
- package/src/media/mdx/Actions/list.ru.mdx +50 -0
- package/src/media/mdx/Actions/wikiMdxActions.ts +31 -0
- package/src/media/mdx/Anchor/anchor.en.mdx +34 -0
- package/src/media/mdx/Anchor/anchor.ru.mdx +34 -0
- package/src/media/mdx/Anchor/expose.go.en.mdx +6 -0
- package/src/media/mdx/Anchor/expose.go.ru.mdx +6 -0
- package/src/media/mdx/Anchor/hide.en.mdx +28 -0
- package/src/media/mdx/Anchor/hide.ru.mdx +28 -0
- package/src/media/mdx/Anchor/isCopy.en.mdx +23 -0
- package/src/media/mdx/Anchor/isCopy.ru.mdx +23 -0
- package/src/media/mdx/Anchor/scroll.en.mdx +34 -0
- package/src/media/mdx/Anchor/scroll.ru.mdx +35 -0
- package/src/media/mdx/Anchor/wikiMdxAnchor.ts +43 -0
- package/src/media/mdx/Arrow/arrow.en.mdx +33 -0
- package/src/media/mdx/Arrow/arrow.ru.mdx +33 -0
- package/src/media/mdx/Arrow/wikiMdxArrow.ts +19 -0
- package/src/media/mdx/Block/block.en.mdx +42 -0
- package/src/media/mdx/Block/block.ru.mdx +42 -0
- package/src/media/mdx/Block/wikiMdxBlock.ts +19 -0
- package/src/media/mdx/ChipGroup/chipGroup.en.mdx +51 -0
- package/src/media/mdx/ChipGroup/chipGroup.ru.mdx +51 -0
- package/src/media/mdx/ChipGroup/selected.en.mdx +50 -0
- package/src/media/mdx/ChipGroup/selected.ru.mdx +50 -0
- package/src/media/mdx/ChipGroup/wikiMdxChipGroup.ts +25 -0
- package/src/media/mdx/Dialog/buttons.en.mdx +45 -0
- package/src/media/mdx/Dialog/buttons.ru.mdx +45 -0
- package/src/media/mdx/Dialog/dialog.en.mdx +66 -0
- package/src/media/mdx/Dialog/dialog.ru.mdx +65 -0
- package/src/media/mdx/Dialog/events.en.mdx +63 -0
- package/src/media/mdx/Dialog/events.ru.mdx +63 -0
- package/src/media/mdx/Dialog/states.en.mdx +58 -0
- package/src/media/mdx/Dialog/states.ru.mdx +57 -0
- package/src/media/mdx/Dialog/wikiMdxDialog.ts +37 -0
- package/src/media/mdx/Field/arrows.en.mdx +22 -6
- package/src/media/mdx/Field/arrows.ru.mdx +22 -6
- package/src/media/mdx/Field/slots.en.mdx +0 -13
- package/src/media/mdx/Field/slots.ru.mdx +0 -13
- package/src/media/mdx/Image/img-tag.en.mdx +105 -0
- package/src/media/mdx/Image/img-tag.ru.mdx +105 -0
- package/src/media/mdx/Image/wikiMdxImage.ts +6 -0
- package/src/media/mdx/Input/currency.en.mdx +38 -0
- package/src/media/mdx/Input/currency.ru.mdx +38 -0
- package/src/media/mdx/Input/date.en.mdx +53 -0
- package/src/media/mdx/Input/date.ru.mdx +53 -0
- package/src/media/mdx/Input/input.en.mdx +143 -0
- package/src/media/mdx/Input/input.ru.mdx +71 -0
- package/src/media/mdx/Input/mask.en.mdx +30 -0
- package/src/media/mdx/Input/mask.ru.mdx +30 -0
- package/src/media/mdx/Input/number.en.mdx +41 -0
- package/src/media/mdx/Input/number.ru.mdx +41 -0
- package/src/media/mdx/Input/type.en.mdx +26 -0
- package/src/media/mdx/Input/type.ru.mdx +26 -0
- package/src/media/mdx/Input/wikiMdxInput.ts +49 -0
- package/src/media/mdx/Menu/event.updateValue.en.mdx +29 -0
- package/src/media/mdx/Menu/event.updateValue.ru.mdx +30 -0
- package/src/media/mdx/Menu/expose.navigation.en.mdx +12 -0
- package/src/media/mdx/Menu/expose.navigation.ru.mdx +12 -0
- package/src/media/mdx/Menu/navigation.en.mdx +56 -0
- package/src/media/mdx/Menu/navigation.ru.mdx +56 -0
- package/src/media/mdx/Menu/slots.control.en.mdx +65 -0
- package/src/media/mdx/Menu/slots.control.ru.mdx +65 -0
- package/src/media/mdx/Menu/slots.en.mdx +2 -24
- package/src/media/mdx/Menu/slots.ru.mdx +2 -24
- package/src/media/mdx/Menu/wikiMdxMenu.ts +27 -3
- package/src/media/mdx/Modal/differences.en.mdx +130 -0
- package/src/media/mdx/Modal/differences.ru.mdx +65 -0
- package/src/media/mdx/Modal/modal.en.mdx +63 -0
- package/src/media/mdx/Modal/modal.ru.mdx +63 -0
- package/src/media/mdx/Modal/wikiMdxModal.ts +25 -0
- package/src/media/mdx/MotionTransform/expose.motionTransformElement.en.mdx +13 -0
- package/src/media/mdx/MotionTransform/expose.motionTransformElement.ru.mdx +14 -0
- package/src/media/mdx/MotionTransform/wikiMdxMotionTransform.ts +6 -0
- package/src/media/mdx/Select/select.en.mdx +69 -0
- package/src/media/mdx/Select/select.ru.mdx +69 -0
- package/src/media/mdx/Select/wikiMdxSelect.ts +19 -0
- package/src/media/mdx/SelectValue/selectValue.en.mdx +64 -0
- package/src/media/mdx/SelectValue/selectValue.ru.mdx +64 -0
- package/src/media/mdx/SelectValue/wikiMdxSelectValue.ts +19 -0
- package/src/media/mdx/TextareaAutosize/textarea-autosize.en.mdx +65 -0
- package/src/media/mdx/TextareaAutosize/textarea-autosize.ru.mdx +65 -0
- package/src/media/mdx/TextareaAutosize/wikiMdxTextareaAutosize.ts +19 -0
- package/src/media/mdx/Tooltip/event.tooltip.en.mdx +7 -0
- package/src/media/mdx/Tooltip/event.tooltip.ru.mdx +8 -0
- package/src/media/mdx/Tooltip/slot.control.en.mdx +14 -0
- package/src/media/mdx/Tooltip/slot.control.ru.mdx +14 -0
- package/src/media/mdx/Tooltip/tooltip.en.mdx +34 -0
- package/src/media/mdx/Tooltip/tooltip.ru.mdx +34 -0
- package/src/media/mdx/Tooltip/wikiMdxTooltip.ts +31 -0
- package/src/media/mdx/Window/classes.ru.mdx +1 -1
- package/src/media/mdx/event/events.actions.en.mdx +44 -0
- package/src/media/mdx/event/events.actions.ru.mdx +44 -0
- package/src/media/mdx/event/events.inputStandard.en.mdx +6 -0
- package/src/media/mdx/event/events.inputStandard.ru.mdx +6 -0
- package/src/media/mdx/event/wikiMdxEvent.ts +20 -8
- package/src/media/mdx/expose/expose.descriptionId.en.mdx +6 -0
- package/src/media/mdx/expose/expose.descriptionId.ru.mdx +6 -0
- package/src/media/mdx/expose/expose.id.en.mdx +6 -0
- package/src/media/mdx/expose/expose.id.ru.mdx +6 -0
- package/src/media/mdx/expose/expose.labelId.en.mdx +6 -0
- package/src/media/mdx/expose/expose.labelId.ru.mdx +6 -0
- package/src/media/mdx/expose/wikiMdxExpose.ts +18 -0
- package/src/media/mdx/slot/body.en.mdx +6 -0
- package/src/media/mdx/slot/body.ru.mdx +6 -0
- package/src/media/mdx/slot/headline.en.mdx +7 -0
- package/src/media/mdx/slot/headline.ru.mdx +6 -0
- package/src/media/mdx/slot/leading.en.mdx +7 -0
- package/src/media/mdx/slot/leading.ru.mdx +7 -0
- package/src/media/mdx/slot/secondary.en.mdx +5 -0
- package/src/media/mdx/slot/secondary.ru.mdx +5 -0
- package/src/media/mdx/slot/trailing.en.mdx +7 -0
- package/src/media/mdx/slot/trailing.ru.mdx +7 -0
- package/src/media/mdx/slot/wikiMdxSlot.ts +30 -0
- package/src/media/mdx/style/isSkeleton.en.mdx +2 -2
- package/src/media/mdx/style/isSkeleton.ru.mdx +2 -2
- package/src/media/mdx/value/v-model-selected.en.mdx +28 -0
- package/src/media/mdx/value/v-model-selected.ru.mdx +28 -0
- package/src/media/mdx/value/v-model.en.mdx +26 -0
- package/src/media/mdx/value/v-model.ru.mdx +26 -0
- package/src/media/mdx/value/wikiMdxValue.ts +24 -3
- package/src/media/mdx/wikiMdx.ts +29 -1
- package/src/media/props/wiki.ts +42 -0
- package/src/media/props/wikiActions.ts +43 -0
- package/src/media/props/wikiActionsInclude.ts +62 -0
- package/src/media/props/wikiAnchor.ts +84 -0
- package/src/media/props/wikiAria.ts +102 -0
- package/src/media/props/wikiArrow.ts +24 -0
- package/src/media/props/wikiArrowInclude.ts +45 -0
- package/src/media/props/wikiBarsInclude.ts +80 -0
- package/src/media/props/wikiChipGroup.ts +39 -0
- package/src/media/props/wikiDialog.ts +34 -0
- package/src/media/props/wikiField.ts +0 -21
- package/src/media/props/wikiFieldCounterInclude.ts +78 -0
- package/src/media/props/wikiForm.ts +248 -0
- package/src/media/props/wikiHook.ts +20 -0
- package/src/media/props/wikiIcon.ts +3 -3
- package/src/media/props/wikiIconInclude.ts +319 -0
- package/src/media/props/wikiImage.ts +71 -19
- package/src/media/props/wikiInformation.ts +160 -0
- package/src/media/props/wikiInput.ts +34 -0
- package/src/media/props/wikiListItem.ts +20 -0
- package/src/media/props/wikiMask.ts +0 -10
- package/src/media/props/wikiMaskInclude.ts +54 -0
- package/src/media/props/wikiMenu.ts +0 -10
- package/src/media/props/wikiMotionTransform.ts +0 -10
- package/src/media/props/wikiOption.ts +113 -0
- package/src/media/props/wikiSelect.ts +68 -0
- package/src/media/props/wikiSelectValue.ts +30 -0
- package/src/media/props/wikiStatus.ts +29 -41
- package/src/media/props/wikiStyle.ts +154 -243
- package/src/media/props/wikiTechnical.ts +65 -0
- package/src/media/props/wikiText.ts +57 -0
- package/src/media/props/wikiTooltip.ts +53 -0
- package/src/media/props/wikiValue.ts +14 -203
- package/src/media/props/wikiWindow.ts +0 -31
- package/src/styles/storybookStyle.scss +3 -1
- package/src/types/storybookTypes.ts +26 -4
|
@@ -29,6 +29,9 @@ export const wikiDescriptionsMenu: StorybookComponentsDescriptionItem = {
|
|
|
29
29
|
'настройка атрибутов пунктов и списка (itemAttrs, listAttrs)'
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
|
+
import: [
|
|
33
|
+
'import { ref } from \'vue\''
|
|
34
|
+
],
|
|
32
35
|
render: `
|
|
33
36
|
<DesignComponent v-bind="args">
|
|
34
37
|
<template #control="{binds}">
|
|
@@ -37,6 +40,75 @@ export const wikiDescriptionsMenu: StorybookComponentsDescriptionItem = {
|
|
|
37
40
|
</DesignComponent>
|
|
38
41
|
`,
|
|
39
42
|
stories: [
|
|
43
|
+
{
|
|
44
|
+
id: 'MenuNavigation',
|
|
45
|
+
name: {
|
|
46
|
+
en: 'Navigation with previous/next',
|
|
47
|
+
ru: 'Навигация с previous/next'
|
|
48
|
+
},
|
|
49
|
+
setup: `
|
|
50
|
+
return {
|
|
51
|
+
selectedValue: ref('color2'),
|
|
52
|
+
colors: ref([
|
|
53
|
+
{label: '[1]Red', value: 'color1', icon: 'palette'},
|
|
54
|
+
{label: '[2]Green', value: 'color2', icon: 'palette'},
|
|
55
|
+
{label: '[3]Blue', value: 'color3', icon: 'palette'},
|
|
56
|
+
{label: '[4]Yellow', value: 'color4', icon: 'palette'},
|
|
57
|
+
{label: '[5]Purple', value: 'color5', icon: 'palette'},
|
|
58
|
+
{label: '[6]Orange', value: 'color6', icon: 'palette'}
|
|
59
|
+
]),
|
|
60
|
+
step: ref(1)
|
|
61
|
+
}
|
|
62
|
+
`,
|
|
63
|
+
template: `
|
|
64
|
+
<div class="wiki-storybook-flex-column">
|
|
65
|
+
<div class="wiki-storybook-item wiki-storybook-item--auto wiki-storybook-item--padding">
|
|
66
|
+
<div class="wiki-storybook-item__label">Step size:</div>
|
|
67
|
+
<div class="wiki-storybook-flex">
|
|
68
|
+
<button class="wiki-storybook-button" @click="step = 1">1 item</button>
|
|
69
|
+
<button class="wiki-storybook-button" @click="step = 2">2 items</button>
|
|
70
|
+
<button class="wiki-storybook-button" @click="step = 3">3 items</button>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<DesignComponent
|
|
75
|
+
v-model:selected="selectedValue"
|
|
76
|
+
:list="colors"
|
|
77
|
+
:step="step"
|
|
78
|
+
is-selected-by-value
|
|
79
|
+
>
|
|
80
|
+
<template #control="{previous, next, selectedNames, open}">
|
|
81
|
+
<div class="wiki-storybook-item wiki-storybook-item--auto wiki-storybook-item--padding">
|
|
82
|
+
<div class="wiki-storybook-flex">
|
|
83
|
+
<button
|
|
84
|
+
class="wiki-storybook-button"
|
|
85
|
+
@click="previous"
|
|
86
|
+
style="padding: 4px 12px;"
|
|
87
|
+
>
|
|
88
|
+
◀ Previous
|
|
89
|
+
</button>
|
|
90
|
+
<div style="flex: 1; text-align: center; font-weight: 500;">
|
|
91
|
+
{{ selectedNames.value[0] || 'None' }}
|
|
92
|
+
</div>
|
|
93
|
+
<button
|
|
94
|
+
class="wiki-storybook-button"
|
|
95
|
+
@click="next"
|
|
96
|
+
style="padding: 4px 12px;"
|
|
97
|
+
>
|
|
98
|
+
Next ▶
|
|
99
|
+
</button>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
|
+
</DesignComponent>
|
|
104
|
+
|
|
105
|
+
<div class="wiki-storybook-item wiki-storybook-item--auto wiki-storybook-item--padding">
|
|
106
|
+
<div>Selected: {{ selectedValue }}</div>
|
|
107
|
+
<div>Step: {{ step }}</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
`
|
|
111
|
+
},
|
|
40
112
|
{
|
|
41
113
|
id: 'MenuAjax',
|
|
42
114
|
name: {
|
|
@@ -62,25 +134,76 @@ export const wikiDescriptionsMenu: StorybookComponentsDescriptionItem = {
|
|
|
62
134
|
</template>
|
|
63
135
|
</DesignComponent>
|
|
64
136
|
`
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'MenuVModel',
|
|
140
|
+
name: {
|
|
141
|
+
en: 'Two-way binding (v-model)',
|
|
142
|
+
ru: 'Двусторонняя привязка (v-model)'
|
|
143
|
+
},
|
|
144
|
+
setup: `
|
|
145
|
+
return {
|
|
146
|
+
selectedValue: ref('settings'),
|
|
147
|
+
menuItems: ref([
|
|
148
|
+
{label: 'Dashboard', value: 'dashboard', icon: 'dashboard'},
|
|
149
|
+
{label: 'Users', value: 'users', icon: 'people'},
|
|
150
|
+
{label: 'Settings', value: 'settings', icon: 'settings'},
|
|
151
|
+
{label: 'Reports', value: 'reports', icon: 'assessment'},
|
|
152
|
+
{label: 'Help', value: 'help', icon: 'help'}
|
|
153
|
+
])
|
|
154
|
+
}
|
|
155
|
+
`,
|
|
156
|
+
template: `
|
|
157
|
+
<div class="wiki-storybook-flex-column">
|
|
158
|
+
<div class="wiki-storybook-flex">
|
|
159
|
+
<button class="wiki-storybook-button" @click="selectedValue = 'dashboard'">Select Dashboard</button>
|
|
160
|
+
<button class="wiki-storybook-button" @click="selectedValue = 'reports'">Select Reports</button>
|
|
161
|
+
<button class="wiki-storybook-button" @click="selectedValue = ''">Clear</button>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="wiki-storybook-flex">
|
|
164
|
+
<DesignComponent
|
|
165
|
+
v-model:selected="selectedValue"
|
|
166
|
+
:list="menuItems"
|
|
167
|
+
is-selected-by-value
|
|
168
|
+
>
|
|
169
|
+
<template #control="{binds}">
|
|
170
|
+
<button class="wiki-storybook-button" v-bind="binds">
|
|
171
|
+
Open Menu
|
|
172
|
+
</button>
|
|
173
|
+
</template>
|
|
174
|
+
</DesignComponent>
|
|
175
|
+
</div>
|
|
176
|
+
<div>Selected value: {{ selectedValue }}</div>
|
|
177
|
+
</div>
|
|
178
|
+
`
|
|
65
179
|
}
|
|
66
180
|
],
|
|
67
181
|
documentation: {
|
|
68
182
|
body: `
|
|
69
183
|
<StorybookDescriptions componentName={'Menu'} type={'menu'}/>
|
|
70
184
|
|
|
185
|
+
<StorybookDescriptions componentName={'Menu'} type={'navigation'}/>
|
|
186
|
+
<Canvas of={Component.MenuNavigation}/>
|
|
187
|
+
|
|
71
188
|
<StorybookDescriptions componentName={'Menu'} type={'ajax'}/>
|
|
72
189
|
<Canvas of={Component.MenuAjax}/>
|
|
190
|
+
|
|
191
|
+
<StorybookDescriptions componentName={'Value'} type={'v-model'}/>
|
|
192
|
+
<Canvas of={Component.MenuVModel}/>
|
|
73
193
|
`,
|
|
74
194
|
events: `
|
|
75
195
|
<StorybookDescriptions componentName={'Event'} type={'click'}/>
|
|
76
196
|
<StorybookDescriptions componentName={'Event'} type={'bars'}/>
|
|
197
|
+
<StorybookDescriptions componentName={'Menu'} type={'event.updateValue'}/>
|
|
77
198
|
<StorybookDescriptions componentName={'Window'} type={'event.window'}/>
|
|
78
199
|
`,
|
|
79
200
|
expose: `
|
|
80
201
|
<StorybookDescriptions componentName={'Expose'} type={'selected'}/>
|
|
202
|
+
<StorybookDescriptions componentName={'Menu'} type={'expose.navigation'}/>
|
|
81
203
|
`,
|
|
82
204
|
slots: `
|
|
83
205
|
<StorybookDescriptions componentName={'List'} type={'slot.html'}/>
|
|
206
|
+
<StorybookDescriptions componentName={'Menu'} type={'slotsControl'}/>
|
|
84
207
|
<StorybookDescriptions componentName={'Menu'} type={'slots'}/>
|
|
85
208
|
`
|
|
86
209
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for Modal component properties
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента Modal
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsModal: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'Modal',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'Simplified wrapper over Window component for creating centered modal dialogs',
|
|
12
|
+
ru: 'Упрощенная обертка над компонентом Window для создания центрированных модальных диалогов'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'pre-configured modal window with centered positioning',
|
|
17
|
+
'overlay backdrop with background blocking',
|
|
18
|
+
'close on ESC key and click outside',
|
|
19
|
+
'integration with scrollbar for long content',
|
|
20
|
+
'slots for title, content and footer customization',
|
|
21
|
+
'lifecycle events (preparation, opening, closing)',
|
|
22
|
+
'close button with customizable icon',
|
|
23
|
+
'programmatic control via v-model:open',
|
|
24
|
+
'focus management and keyboard navigation',
|
|
25
|
+
'responsive design with mobile optimization'
|
|
26
|
+
],
|
|
27
|
+
ru: [
|
|
28
|
+
'предварительно настроенное модальное окно с центрированием',
|
|
29
|
+
'оверлей с блокировкой фона',
|
|
30
|
+
'закрытие по ESC и клику вне области',
|
|
31
|
+
'интеграция со скроллбаром для длинного контента',
|
|
32
|
+
'слоты для настройки заголовка, содержимого и подвала',
|
|
33
|
+
'события жизненного цикла (preparation, opening, closing)',
|
|
34
|
+
'кнопка закрытия с настраиваемой иконкой',
|
|
35
|
+
'программное управление через v-model:open',
|
|
36
|
+
'управление фокусом и клавиатурная навигация',
|
|
37
|
+
'адаптивный дизайн с оптимизацией для мобильных'
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
import: [
|
|
41
|
+
'import { ref } from \'vue\''
|
|
42
|
+
],
|
|
43
|
+
render: `
|
|
44
|
+
<DesignComponent v-bind="args">
|
|
45
|
+
<template #control="{binds}">
|
|
46
|
+
<button class="wiki-storybook-button" v-bind="binds">Open Modal</button>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<template #default>
|
|
50
|
+
<h4>Modal Component Overview</h4>
|
|
51
|
+
<p>Modal is a specialized wrapper around the Window component with preset adaptive mode set to 'modal'. It provides a simplified API for creating centered modal dialogs without needing to configure positioning and adaptive behavior manually.</p>
|
|
52
|
+
|
|
53
|
+
<p>The component automatically handles common modal dialog scenarios including confirmations, forms, alerts, and content previews. It manages focus, scroll behavior, and keyboard navigation to ensure accessibility and optimal user experience across different devices and screen sizes.</p>
|
|
54
|
+
|
|
55
|
+
<h4>Best Practices</h4>
|
|
56
|
+
<p>Use modals sparingly and only for content that genuinely requires immediate attention. Ensure modals have clear actions (confirm/cancel), provide easy ways to dismiss them, and avoid nesting modals within modals. The component should be large enough to display content comfortably but not so large that it overwhelms the screen.</p>
|
|
57
|
+
|
|
58
|
+
<h4>Relationship with Window</h4>
|
|
59
|
+
<p>Modal is essentially Window with <code>adaptive="modal"</code> preset, simplifying the usage for standard dialog scenarios. All Window properties, slots, and events are available in Modal component.</p>
|
|
60
|
+
</template>
|
|
61
|
+
</DesignComponent>
|
|
62
|
+
`,
|
|
63
|
+
stories: [
|
|
64
|
+
{
|
|
65
|
+
id: 'ModalVModel',
|
|
66
|
+
name: {
|
|
67
|
+
en: 'Two-way binding (v-model)',
|
|
68
|
+
ru: 'Двусторонняя привязка (v-model)'
|
|
69
|
+
},
|
|
70
|
+
setup: `
|
|
71
|
+
return {
|
|
72
|
+
open: ref(false)
|
|
73
|
+
}
|
|
74
|
+
`,
|
|
75
|
+
template: `
|
|
76
|
+
<button class="wiki-storybook-button" @click="open = true">Open via v-model ({{ open }})</button>
|
|
77
|
+
|
|
78
|
+
<DesignComponent v-model:open="open">
|
|
79
|
+
<div class="wiki-storybook-item--padding">Your content here</div>
|
|
80
|
+
</DesignComponent>
|
|
81
|
+
`
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'ModalAllSlots',
|
|
85
|
+
name: {
|
|
86
|
+
en: 'All slots demonstration',
|
|
87
|
+
ru: 'Демонстрация всех слотов'
|
|
88
|
+
},
|
|
89
|
+
template: `
|
|
90
|
+
<DesignComponent>
|
|
91
|
+
<template #control="{binds}">
|
|
92
|
+
<button class="wiki-storybook-button" v-bind="binds">Open Modal with All Slots</button>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<template #title>
|
|
96
|
+
Modal Title Slot
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<template #default>
|
|
100
|
+
<h4>Default Slot Content</h4>
|
|
101
|
+
<p>This is the main content area of the modal. You can place any content here including text, forms, images, or other components.</p>
|
|
102
|
+
|
|
103
|
+
<div class="wiki-storybook-info">
|
|
104
|
+
<strong>Available slots:</strong>
|
|
105
|
+
<ul>
|
|
106
|
+
<li><code>#control</code> - trigger button or element</li>
|
|
107
|
+
<li><code>#title</code> - modal header/title area</li>
|
|
108
|
+
<li><code>#default</code> - main content area</li>
|
|
109
|
+
<li><code>#footer</code> - footer with actions</li>
|
|
110
|
+
</ul>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<p>Each slot receives control props that allow you to interact with the modal programmatically, such as closing it or accessing window classes.</p>
|
|
114
|
+
</template>
|
|
115
|
+
|
|
116
|
+
<template #footer="{classesWindow}">
|
|
117
|
+
<button :class="classesWindow.close" class="wiki-storybook-button wiki-storybook-button--text">Cancel</button>
|
|
118
|
+
<button class="wiki-storybook-button">Confirm</button>
|
|
119
|
+
</template>
|
|
120
|
+
</DesignComponent>
|
|
121
|
+
`
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
documentation: {
|
|
125
|
+
body: `
|
|
126
|
+
<StorybookDescriptions componentName={'Modal'} type={'modal'}/>
|
|
127
|
+
<StorybookDescriptions componentName={'Window'} type={'v-model'}/>
|
|
128
|
+
<Canvas of={Component.ModalVModel}/>
|
|
129
|
+
|
|
130
|
+
<StorybookDescriptions componentName={'Modal'} type={'differences'}/>
|
|
131
|
+
`,
|
|
132
|
+
events: `
|
|
133
|
+
<StorybookDescriptions componentName={'Window'} type={'event.window'}/>
|
|
134
|
+
<StorybookDescriptions componentName={'Event'} type={'bars'}/>
|
|
135
|
+
<StorybookDescriptions componentName={'Event'} type={'actions'}/>
|
|
136
|
+
`,
|
|
137
|
+
expose: `
|
|
138
|
+
<StorybookDescriptions componentName={'Window'} type={'expose'}/>
|
|
139
|
+
`,
|
|
140
|
+
slots: `
|
|
141
|
+
<Canvas of={Component.ModalAllSlots}/>
|
|
142
|
+
<StorybookDescriptions componentName={'Window'} type={'slots'}/>
|
|
143
|
+
`
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -30,7 +30,7 @@ export const wikiDescriptionsMotionTransform: StorybookComponentsDescriptionItem
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
render: `
|
|
33
|
-
<DesignComponent
|
|
33
|
+
<DesignComponent v-bind="args">
|
|
34
34
|
<template #head>
|
|
35
35
|
<div class="wiki-storybook-item--padding">
|
|
36
36
|
<h3>MotionTransform Demo</h3>
|
|
@@ -203,11 +203,7 @@ export const wikiDescriptionsMotionTransform: StorybookComponentsDescriptionItem
|
|
|
203
203
|
`,
|
|
204
204
|
expose: `
|
|
205
205
|
<StorybookDescriptions componentName={'MotionTransform'} type={'expose.isShow'}/>
|
|
206
|
-
<StorybookDescriptions componentName={'Window'} type={'expose
|
|
207
|
-
<StorybookDescriptions componentName={'Window'} type={'expose.setOpen'}/>
|
|
208
|
-
<StorybookDescriptions componentName={'Window'} type={'expose.toOpen'}/>
|
|
209
|
-
<StorybookDescriptions componentName={'Window'} type={'expose.toClose'}/>
|
|
210
|
-
<StorybookDescriptions componentName={'Window'} type={'expose.toggle'}/>
|
|
206
|
+
<StorybookDescriptions componentName={'Window'} type={'expose'}/>
|
|
211
207
|
`,
|
|
212
208
|
slots: `
|
|
213
209
|
<StorybookDescriptions componentName={'MotionTransform'} type={'slots'}/>
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for Select component properties
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента Select
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsSelect: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'Select',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'Complete select dropdown control combining Field, Menu, SelectValue and Input for sophisticated selection interface',
|
|
12
|
+
ru: 'Полнофункциональный элемент выбора из выпадающего списка, объединяющий Field, Menu, SelectValue и Input для продвинутого интерфейса выбора'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'single or multiple value selection',
|
|
17
|
+
'built-in search and filtering capabilities',
|
|
18
|
+
'editable selected value mode (editValue)',
|
|
19
|
+
'AJAX data loading with caching support',
|
|
20
|
+
'filter mode for real-time option filtering',
|
|
21
|
+
'validation with standard Field features',
|
|
22
|
+
'keyboard navigation and accessibility',
|
|
23
|
+
'custom option list via slots or data',
|
|
24
|
+
'icon support for dropdown arrow and search',
|
|
25
|
+
'auto-close control for multiple selection',
|
|
26
|
+
'integration with all Field component features (label, counter, messages, icons)'
|
|
27
|
+
],
|
|
28
|
+
ru: [
|
|
29
|
+
'выбор одиночного или множественных значений',
|
|
30
|
+
'встроенный поиск и возможности фильтрации',
|
|
31
|
+
'режим редактирования выбранного значения (editValue)',
|
|
32
|
+
'AJAX загрузка данных с поддержкой кеширования',
|
|
33
|
+
'режим фильтрации для реального времени',
|
|
34
|
+
'валидация со стандартными функциями Field',
|
|
35
|
+
'клавиатурная навигация и доступность',
|
|
36
|
+
'пользовательский список опций через слоты или данные',
|
|
37
|
+
'поддержка иконок для стрелки выпадающего списка и поиска',
|
|
38
|
+
'управление автозакрытием для множественного выбора',
|
|
39
|
+
'интеграция со всеми возможностями компонента Field (подпись, счётчик, сообщения, иконки)'
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
import: [
|
|
43
|
+
'import { ref } from \'vue\''
|
|
44
|
+
],
|
|
45
|
+
render: `
|
|
46
|
+
<DesignComponent v-bind="args" />
|
|
47
|
+
`,
|
|
48
|
+
stories: [
|
|
49
|
+
{
|
|
50
|
+
id: 'SelectBasic',
|
|
51
|
+
name: {
|
|
52
|
+
en: 'Basic',
|
|
53
|
+
ru: 'Базовые'
|
|
54
|
+
},
|
|
55
|
+
setup: `
|
|
56
|
+
const options = ref([
|
|
57
|
+
{label: 'JavaScript', value: 'js'},
|
|
58
|
+
{label: 'TypeScript', value: 'ts'},
|
|
59
|
+
{label: 'Python', value: 'py'},
|
|
60
|
+
{label: 'Java', value: 'java'},
|
|
61
|
+
{label: 'C++', value: 'cpp'},
|
|
62
|
+
{label: 'Ruby', value: 'rb'},
|
|
63
|
+
{label: 'Go', value: 'go'},
|
|
64
|
+
{label: 'PHP', value: 'php'}
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
return { options }
|
|
68
|
+
`,
|
|
69
|
+
template: `
|
|
70
|
+
<div class="wiki-storybook-flex-column">
|
|
71
|
+
<DesignComponent
|
|
72
|
+
type="select"
|
|
73
|
+
label="Standard select"
|
|
74
|
+
placeholder="Select option"
|
|
75
|
+
:option="options"
|
|
76
|
+
/>
|
|
77
|
+
<DesignComponent
|
|
78
|
+
type="select"
|
|
79
|
+
label="With search"
|
|
80
|
+
placeholder="Search..."
|
|
81
|
+
showSearch
|
|
82
|
+
:option="options"
|
|
83
|
+
/>
|
|
84
|
+
<DesignComponent
|
|
85
|
+
type="select"
|
|
86
|
+
label="With filter"
|
|
87
|
+
placeholder="Type to filter"
|
|
88
|
+
showSearch
|
|
89
|
+
filterMode
|
|
90
|
+
:option="options"
|
|
91
|
+
/>
|
|
92
|
+
<DesignComponent
|
|
93
|
+
type="select"
|
|
94
|
+
label="Edit value"
|
|
95
|
+
placeholder="Select or type"
|
|
96
|
+
editValue
|
|
97
|
+
filterMode
|
|
98
|
+
:option="options"
|
|
99
|
+
/>
|
|
100
|
+
<DesignComponent
|
|
101
|
+
type="select"
|
|
102
|
+
label="With arrows"
|
|
103
|
+
placeholder="Select option"
|
|
104
|
+
arrow="carousel"
|
|
105
|
+
:option="options"
|
|
106
|
+
/>
|
|
107
|
+
</div>
|
|
108
|
+
`
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'SelectVModel',
|
|
112
|
+
name: {
|
|
113
|
+
en: 'Two-way binding (v-model)',
|
|
114
|
+
ru: 'Двусторонняя привязка (v-model)'
|
|
115
|
+
},
|
|
116
|
+
setup: `
|
|
117
|
+
return {
|
|
118
|
+
singleValue: ref('option2'),
|
|
119
|
+
multipleValue: ref(['option1', 'option3'])
|
|
120
|
+
}
|
|
121
|
+
`,
|
|
122
|
+
template: `
|
|
123
|
+
<div class="wiki-storybook-flex-column">
|
|
124
|
+
<DesignComponent
|
|
125
|
+
v-model="singleValue"
|
|
126
|
+
type="select"
|
|
127
|
+
label="Single select"
|
|
128
|
+
arrow="carousel"
|
|
129
|
+
:option="[
|
|
130
|
+
{label: 'First option', value: 'option1'},
|
|
131
|
+
{label: 'Second option', value: 'option2'},
|
|
132
|
+
{label: 'Third option', value: 'option3'}
|
|
133
|
+
]"
|
|
134
|
+
/>
|
|
135
|
+
<div>Selected: {{ singleValue }}</div>
|
|
136
|
+
|
|
137
|
+
<DesignComponent
|
|
138
|
+
v-model="multipleValue"
|
|
139
|
+
type="select"
|
|
140
|
+
label="Multiple select"
|
|
141
|
+
multiple
|
|
142
|
+
:option="[
|
|
143
|
+
{label: 'First option', value: 'option1'},
|
|
144
|
+
{label: 'Second option', value: 'option2'},
|
|
145
|
+
{label: 'Third option', value: 'option3'}
|
|
146
|
+
]"
|
|
147
|
+
/>
|
|
148
|
+
<div>Selected: {{ multipleValue }}</div>
|
|
149
|
+
</div>
|
|
150
|
+
`
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: 'SelectSkeleton',
|
|
154
|
+
name: {
|
|
155
|
+
en: 'Skeleton',
|
|
156
|
+
ru: 'Скелетон'
|
|
157
|
+
},
|
|
158
|
+
components: ['Skeleton'],
|
|
159
|
+
template: `
|
|
160
|
+
<DesignSkeleton :active="true" style="max-width:320px">
|
|
161
|
+
<div class="wiki-storybook-flex-column">
|
|
162
|
+
<DesignComponent
|
|
163
|
+
isSkeleton
|
|
164
|
+
type="select"
|
|
165
|
+
label="Loading select"
|
|
166
|
+
helperMessage="Options are loading..."
|
|
167
|
+
:option="[
|
|
168
|
+
{label: 'First option', value: 'option1'},
|
|
169
|
+
{label: 'Second option', value: 'option2'},
|
|
170
|
+
{label: 'Third option', value: 'option3'}
|
|
171
|
+
]"
|
|
172
|
+
/>
|
|
173
|
+
</div>
|
|
174
|
+
</DesignSkeleton>
|
|
175
|
+
`
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
documentation: {
|
|
179
|
+
body: `
|
|
180
|
+
<StorybookDescriptions componentName={'Select'} type={'select'}/>
|
|
181
|
+
<Canvas of={Component.SelectBasic}/>
|
|
182
|
+
|
|
183
|
+
<StorybookDescriptions componentName={'Value'} type={'value'}/>
|
|
184
|
+
<StorybookDescriptions componentName={'Value'} type={'v-model'}/>
|
|
185
|
+
<Canvas of={Component.SelectVModel}/>
|
|
186
|
+
|
|
187
|
+
<StorybookDescriptions componentName={'Style'} type={'isSkeleton'}/>
|
|
188
|
+
<Canvas of={Component.SelectSkeleton}/>
|
|
189
|
+
`,
|
|
190
|
+
events: `
|
|
191
|
+
<StorybookDescriptions componentName={'Event'} type={'input'}/>
|
|
192
|
+
<StorybookDescriptions componentName={'Event'} type={'change'}/>
|
|
193
|
+
`,
|
|
194
|
+
expose: `
|
|
195
|
+
<StorybookDescriptions componentName={'Expose'} type={'selected'}/>
|
|
196
|
+
<StorybookDescriptions componentName={'Expose'} type={'validation'}/>
|
|
197
|
+
`,
|
|
198
|
+
slots: `
|
|
199
|
+
<StorybookDescriptions componentName={'Slot'} type={'label'} />
|
|
200
|
+
<StorybookDescriptions componentName={'Slot'} type={'prefix'} />
|
|
201
|
+
<StorybookDescriptions componentName={'Slot'} type={'suffix'} />
|
|
202
|
+
<StorybookDescriptions componentName={'Slot'} type={'caption'} />
|
|
203
|
+
<StorybookDescriptions componentName={'Slot'} type={'leading'} />
|
|
204
|
+
<StorybookDescriptions componentName={'Slot'} type={'trailing'} />
|
|
205
|
+
<StorybookDescriptions componentName={'List'} type={'slot.html'}/>
|
|
206
|
+
<StorybookDescriptions componentName={'Menu'} type={'slots'}/>
|
|
207
|
+
`
|
|
208
|
+
}
|
|
209
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for SelectValue component properties
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента SelectValue
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsSelectValue: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'SelectValue',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'Display component for selected values in select controls, showing chips for multiple selection or single text value',
|
|
12
|
+
ru: 'Компонент отображения выбранных значений в элементах выбора, показывающий чипы для множественного выбора или одиночное текстовое значение'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'single or multiple value display modes',
|
|
17
|
+
'automatic chip rendering for multiple selections',
|
|
18
|
+
'placeholder support for empty state',
|
|
19
|
+
'cancel icon for clearing individual selections',
|
|
20
|
+
'customizable chip appearance via chipAttrs',
|
|
21
|
+
'optional icon display in chips',
|
|
22
|
+
'responsive handling of selected items',
|
|
23
|
+
'disabled and readonly states support'
|
|
24
|
+
],
|
|
25
|
+
ru: [
|
|
26
|
+
'режимы отображения одиночного или множественного значения',
|
|
27
|
+
'автоматический рендеринг чипов для множественного выбора',
|
|
28
|
+
'поддержка плейсхолдера для пустого состояния',
|
|
29
|
+
'иконка отмены для очистки отдельных выборов',
|
|
30
|
+
'настраиваемый внешний вид чипов через chipAttrs',
|
|
31
|
+
'опциональное отображение иконок в чипах',
|
|
32
|
+
'адаптивная обработка выбранных элементов',
|
|
33
|
+
'поддержка состояний disabled и readonly'
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
import: [],
|
|
37
|
+
stories: [
|
|
38
|
+
{
|
|
39
|
+
id: 'SelectValueBasic',
|
|
40
|
+
name: {
|
|
41
|
+
en: 'Basic',
|
|
42
|
+
ru: 'Базовые'
|
|
43
|
+
},
|
|
44
|
+
template: `
|
|
45
|
+
<div class="wiki-storybook-flex-column">
|
|
46
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
47
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Placeholder</div>
|
|
48
|
+
<DesignComponent placeholder="Select option"/>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
51
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Single value</div>
|
|
52
|
+
<DesignComponent :value="[{ label: 'Option 1', value: '1' }]"/>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
55
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Multiple values</div>
|
|
56
|
+
<DesignComponent
|
|
57
|
+
:multiple="true"
|
|
58
|
+
:value="[
|
|
59
|
+
{ label: 'Option 1', value: '1', index: '1' },
|
|
60
|
+
{ label: 'Option 2', value: '2', index: '2' },
|
|
61
|
+
{ label: 'Option 3', value: '3', index: '3' }
|
|
62
|
+
]"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
`
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
documentation: {
|
|
70
|
+
body: `
|
|
71
|
+
<StorybookDescriptions componentName={'SelectValue'} type={'selectValue'}/>
|
|
72
|
+
<Canvas of={Component.SelectValueBasic}/>
|
|
73
|
+
`,
|
|
74
|
+
events: `
|
|
75
|
+
<StorybookDescriptions componentName={'Event'} type={'click'}/>
|
|
76
|
+
`
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for TextareaAutosize component
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента TextareaAutosize
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsTextareaAutosize: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'TextareaAutosize',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'Textarea component that automatically adjusts its height based on content',
|
|
12
|
+
ru: 'Компонент текстового поля, которое автоматически подстраивает свою высоту под содержимое'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'automatic height adjustment based on content',
|
|
17
|
+
'clone element for precise height calculation',
|
|
18
|
+
'respects padding and styling from the original textarea',
|
|
19
|
+
'smooth height transitions on content change',
|
|
20
|
+
'supports all standard textarea attributes via inputAttrs',
|
|
21
|
+
'optional autosize toggle for flexibility',
|
|
22
|
+
'reactive value binding with input event emission'
|
|
23
|
+
],
|
|
24
|
+
ru: [
|
|
25
|
+
'автоматическая подстройка высоты под содержимое',
|
|
26
|
+
'элемент-клон для точного расчёта высоты',
|
|
27
|
+
'учитывает отступы и стили исходного textarea',
|
|
28
|
+
'плавные переходы высоты при изменении содержимого',
|
|
29
|
+
'поддержка всех стандартных атрибутов textarea через inputAttrs',
|
|
30
|
+
'опциональное отключение autosize для гибкости',
|
|
31
|
+
'реактивная привязка значения с генерацией события input'
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
import: [],
|
|
35
|
+
render: `
|
|
36
|
+
<DesignComponent v-bind="args" :inputAttrs="{style: 'width: 240px; border: 1px solid #90A1B9FF'}" />
|
|
37
|
+
`,
|
|
38
|
+
stories: [],
|
|
39
|
+
documentation: {
|
|
40
|
+
body: `
|
|
41
|
+
<StorybookDescriptions componentName={'TextareaAutosize'} type={'textarea-autosize'}/>
|
|
42
|
+
`,
|
|
43
|
+
events: `
|
|
44
|
+
<StorybookDescriptions componentName={'Event'} type={'input-standard'}/>
|
|
45
|
+
`,
|
|
46
|
+
expose: `
|
|
47
|
+
<StorybookDescriptions componentName={'Expose'} type={'value'}/>
|
|
48
|
+
`
|
|
49
|
+
}
|
|
50
|
+
}
|