@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for Anchor component properties
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента Anchor
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsAnchor: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'Anchor',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'Component for creating hyperlinks or anchor points for navigation',
|
|
12
|
+
ru: 'Компонент для создания гиперссылок или якорных точек для навигации'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'creating links to other pages or resources',
|
|
17
|
+
'creating anchor points for internal page navigation',
|
|
18
|
+
'support for icons and text',
|
|
19
|
+
'customizable appearance'
|
|
20
|
+
],
|
|
21
|
+
ru: [
|
|
22
|
+
'создание ссылок на другие страницы или ресурсы',
|
|
23
|
+
'создание якорных точек для внутренней навигации по странице',
|
|
24
|
+
'поддержка иконок и текста',
|
|
25
|
+
'настраиваемый внешний вид'
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
documentation: {
|
|
29
|
+
body: `
|
|
30
|
+
<StorybookDescriptions componentName={'Anchor'} type={'anchor'}/>
|
|
31
|
+
<StorybookDescriptions componentName={'Anchor'} type={'isCopy'}/>
|
|
32
|
+
<StorybookDescriptions componentName={'Anchor'} type={'hide'}/>
|
|
33
|
+
<StorybookDescriptions componentName={'Anchor'} type={'scroll'}/>
|
|
34
|
+
`,
|
|
35
|
+
expose: `
|
|
36
|
+
<StorybookDescriptions componentName={'Anchor'} type={'expose.go'}/>
|
|
37
|
+
`,
|
|
38
|
+
slots: `
|
|
39
|
+
<StorybookDescriptions componentName={'Slot'} type={'default'}/>
|
|
40
|
+
`
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for Arrow component properties
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента Arrow
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsArrow: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'Arrow',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'Component for displaying an arrow or directional indicator',
|
|
12
|
+
ru: 'Компонент для отображения стрелки или индикатора направления'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'displaying directional arrows',
|
|
17
|
+
'customizable size and color',
|
|
18
|
+
'rotation support'
|
|
19
|
+
],
|
|
20
|
+
ru: [
|
|
21
|
+
'отображение направляющих стрелок',
|
|
22
|
+
'настраиваемый размер и цвет',
|
|
23
|
+
'поддержка вращения'
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
import: [
|
|
27
|
+
'import { ref } from \'vue\''
|
|
28
|
+
],
|
|
29
|
+
render: `
|
|
30
|
+
<div class="wiki-storybook-item wiki-storybook-item--rectangle wiki-storybook-item--center">
|
|
31
|
+
<div>
|
|
32
|
+
<div
|
|
33
|
+
style="
|
|
34
|
+
width: 256px;
|
|
35
|
+
margin-bottom: 32px;
|
|
36
|
+
margin-left: 32px;
|
|
37
|
+
"
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
id="id-arrow-target"
|
|
41
|
+
style="
|
|
42
|
+
padding: 8px;
|
|
43
|
+
width: min-content;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
background-color: oklch(90.2% 0.063 306.703);
|
|
46
|
+
"
|
|
47
|
+
>
|
|
48
|
+
Target
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div
|
|
52
|
+
style="
|
|
53
|
+
position: relative;
|
|
54
|
+
width: 256px;
|
|
55
|
+
height: 128px;
|
|
56
|
+
border-radius: 16px;
|
|
57
|
+
background-color: oklch(93.2% 0.032 255.585);
|
|
58
|
+
border: 2px solid oklch(80.9% 0.105 251.813);
|
|
59
|
+
box-shadow: 0 0 8px oklch(0.281 0.092 268.132 / 0.32);
|
|
60
|
+
"
|
|
61
|
+
>
|
|
62
|
+
<DesignComponent v-bind="args"/>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
`,
|
|
67
|
+
stories: [
|
|
68
|
+
{
|
|
69
|
+
id: 'ArrowBasic',
|
|
70
|
+
name: {
|
|
71
|
+
en: 'Basic',
|
|
72
|
+
ru: 'Базовые'
|
|
73
|
+
},
|
|
74
|
+
setup: `
|
|
75
|
+
const elementBasic = ref()
|
|
76
|
+
const elementTarget = ref()
|
|
77
|
+
const elementArray = ref()
|
|
78
|
+
|
|
79
|
+
const x = ref('0px')
|
|
80
|
+
const y = ref('0px')
|
|
81
|
+
|
|
82
|
+
const onClick = (event: PointerEvent) => {
|
|
83
|
+
if (elementBasic.value) {
|
|
84
|
+
const rect = elementBasic.value.getBoundingClientRect()
|
|
85
|
+
let offsetX = 0
|
|
86
|
+
let offsetY = 0
|
|
87
|
+
|
|
88
|
+
if (elementTarget.value) {
|
|
89
|
+
const targetRect = elementTarget.value.getBoundingClientRect()
|
|
90
|
+
offsetX = targetRect.width / 2
|
|
91
|
+
offsetY = targetRect.height / 2
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
x.value = (event.clientX - rect.left - offsetX) + 'px'
|
|
95
|
+
y.value = (event.clientY - rect.top - offsetY) + 'px'
|
|
96
|
+
|
|
97
|
+
requestAnimationFrame(() => elementArray.value?.update())
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
elementBasic,
|
|
103
|
+
elementTarget,
|
|
104
|
+
elementArray,
|
|
105
|
+
x,
|
|
106
|
+
y,
|
|
107
|
+
onClick
|
|
108
|
+
}
|
|
109
|
+
`,
|
|
110
|
+
template: `
|
|
111
|
+
<div
|
|
112
|
+
class="wiki-storybook-item wiki-storybook-item--rectangle wiki-storybook-item--center"
|
|
113
|
+
style="cursor: crosshair;"
|
|
114
|
+
@click="onClick"
|
|
115
|
+
>
|
|
116
|
+
<div>
|
|
117
|
+
<div
|
|
118
|
+
style="
|
|
119
|
+
opacity: 0.5;
|
|
120
|
+
font-size: 14px;
|
|
121
|
+
margin-bottom: 8px;
|
|
122
|
+
text-align: center;
|
|
123
|
+
"
|
|
124
|
+
>
|
|
125
|
+
Click to move target
|
|
126
|
+
</div>
|
|
127
|
+
<div
|
|
128
|
+
ref="elementBasic"
|
|
129
|
+
style="
|
|
130
|
+
position: relative;
|
|
131
|
+
margin-bottom: 96px;
|
|
132
|
+
margin-left: 32px;
|
|
133
|
+
z-index: 32;
|
|
134
|
+
"
|
|
135
|
+
>
|
|
136
|
+
<div
|
|
137
|
+
ref="elementTarget"
|
|
138
|
+
id="id-arrow-target-2"
|
|
139
|
+
style="
|
|
140
|
+
position: absolute;
|
|
141
|
+
padding: 8px;
|
|
142
|
+
width: min-content;
|
|
143
|
+
border-radius: 8px;
|
|
144
|
+
background-color: oklch(90.2% 0.063 306.703);
|
|
145
|
+
text-wrap: nowrap;
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
"
|
|
148
|
+
:style="{left: x, top: y}"
|
|
149
|
+
>
|
|
150
|
+
Target Element Example
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
<div
|
|
154
|
+
style="
|
|
155
|
+
position: relative;
|
|
156
|
+
width: 256px;
|
|
157
|
+
height: 128px;
|
|
158
|
+
border-radius: 16px;
|
|
159
|
+
background-color: oklch(93.2% 0.032 255.585);
|
|
160
|
+
border: 2px solid oklch(80.9% 0.105 251.813);
|
|
161
|
+
box-shadow: 0 0 8px oklch(0.281 0.092 268.132 / 0.32);
|
|
162
|
+
"
|
|
163
|
+
>
|
|
164
|
+
<DesignComponent
|
|
165
|
+
ref="elementArray"
|
|
166
|
+
position="auto"
|
|
167
|
+
element-target="#id-arrow-target-2"
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
`
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
documentation: {
|
|
176
|
+
body: `
|
|
177
|
+
<StorybookDescriptions componentName={'Arrow'} type={'arrow'}/>
|
|
178
|
+
<Canvas of={Component.ArrowBasic}/>
|
|
179
|
+
`
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for Block component properties
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента Block
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsBlock: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'Block',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'A versatile structural component that serves as a container with support for labels, descriptions, captions, icons, and headlines',
|
|
12
|
+
ru: 'Универсальный структурный компонент, служащий контейнером с поддержкой меток, описаний, подписей, иконок и заголовков'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'displaying a headline, label, description, and caption',
|
|
17
|
+
'support for icons',
|
|
18
|
+
'customizable HTML tag',
|
|
19
|
+
'flexible layout for content organization'
|
|
20
|
+
],
|
|
21
|
+
ru: [
|
|
22
|
+
'отображение заголовка, метки, описания и подписи',
|
|
23
|
+
'поддержка иконок',
|
|
24
|
+
'настраиваемый HTML-тег',
|
|
25
|
+
'гибкая компоновка для организации контента'
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
import: [],
|
|
29
|
+
render: `
|
|
30
|
+
<DesignComponent v-bind="args">
|
|
31
|
+
<p>
|
|
32
|
+
The Block component serves as a fundamental building unit for constructing complex user interfaces.
|
|
33
|
+
It provides a flexible container that can host various content elements such as labels, descriptions, and icons.
|
|
34
|
+
</p>
|
|
35
|
+
<p>
|
|
36
|
+
With its versatile design, the Block component adapts seamlessly to different layout requirements.
|
|
37
|
+
Whether you need a simple content wrapper or a detailed card with a headline and caption, this component handles it all.
|
|
38
|
+
</p>
|
|
39
|
+
<p>
|
|
40
|
+
Developers can easily customize the appearance and behavior of the Block using properties and slots.
|
|
41
|
+
This ensures that the component fits perfectly into any design system while maintaining consistency across the application.
|
|
42
|
+
</p>
|
|
43
|
+
</DesignComponent>
|
|
44
|
+
`,
|
|
45
|
+
stories: [
|
|
46
|
+
{
|
|
47
|
+
id: 'BlockBasic',
|
|
48
|
+
name: {
|
|
49
|
+
en: 'Basic',
|
|
50
|
+
ru: 'Базовые'
|
|
51
|
+
},
|
|
52
|
+
template: `
|
|
53
|
+
<div class="wiki-storybook-flex">
|
|
54
|
+
<DesignComponent>Content</DesignComponent>
|
|
55
|
+
<DesignComponent label="Label" description="Description">Content</DesignComponent>
|
|
56
|
+
<DesignComponent headline="Headline" label="Label">Content</DesignComponent>
|
|
57
|
+
<DesignComponent icon="home" label="Label">Content</DesignComponent>
|
|
58
|
+
</div>
|
|
59
|
+
`
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'BlockSlots',
|
|
63
|
+
name: {
|
|
64
|
+
en: 'Slots usage',
|
|
65
|
+
ru: 'Использование слотов'
|
|
66
|
+
},
|
|
67
|
+
template: `
|
|
68
|
+
<DesignComponent>
|
|
69
|
+
<template #default>Default slot</template>
|
|
70
|
+
<template #headline>Headline slot</template>
|
|
71
|
+
<template #label>Label slot</template>
|
|
72
|
+
<template #description>Description slot</template>
|
|
73
|
+
<template #caption>Caption slot</template>
|
|
74
|
+
<template #trailing>Trailing slot</template>
|
|
75
|
+
</DesignComponent>
|
|
76
|
+
`
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
documentation: {
|
|
80
|
+
body: `
|
|
81
|
+
<StorybookDescriptions componentName={'Block'} type={'block'}/>
|
|
82
|
+
`,
|
|
83
|
+
slots: `
|
|
84
|
+
<Canvas of={Component.BlockSlots}/>
|
|
85
|
+
<StorybookDescriptions componentName={'Slot'} type={'default'}/>
|
|
86
|
+
<StorybookDescriptions componentName={'Slot'} type={'headline'}/>
|
|
87
|
+
<StorybookDescriptions componentName={'Slot'} type={'label'}/>
|
|
88
|
+
<StorybookDescriptions componentName={'Slot'} type={'description'}/>
|
|
89
|
+
<StorybookDescriptions componentName={'Slot'} type={'caption'}/>
|
|
90
|
+
<StorybookDescriptions componentName={'Slot'} type={'trailing'}/>
|
|
91
|
+
`,
|
|
92
|
+
expose: `
|
|
93
|
+
<StorybookDescriptions componentName={'Expose'} type={'labelId'}/>
|
|
94
|
+
<StorybookDescriptions componentName={'Expose'} type={'descriptionId'}/>
|
|
95
|
+
`
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -181,7 +181,6 @@ export const wikiDescriptionsButton: StorybookComponentsDescriptionItem = {
|
|
|
181
181
|
`,
|
|
182
182
|
events: `
|
|
183
183
|
<StorybookDescriptions componentName={'Event'} type={'click'}/>
|
|
184
|
-
<StorybookDescriptions componentName={'Event'} type={'clickLite'}/>
|
|
185
184
|
`,
|
|
186
185
|
expose: `
|
|
187
186
|
<StorybookDescriptions componentName={'Expose'} type={'value'}/>
|
|
@@ -96,11 +96,12 @@ export const wikiDescriptionsCell: StorybookComponentsDescriptionItem = {
|
|
|
96
96
|
`,
|
|
97
97
|
events: `
|
|
98
98
|
<StorybookDescriptions componentName={'Event'} type={'click'}/>
|
|
99
|
-
<StorybookDescriptions componentName={'Event'} type={'clickLite'}/>
|
|
100
99
|
`,
|
|
101
100
|
expose: `
|
|
102
101
|
<StorybookDescriptions componentName={'Expose'} type={'value'}/>
|
|
103
102
|
<StorybookDescriptions componentName={'Expose'} type={'detail'}/>
|
|
103
|
+
<StorybookDescriptions componentName={'Expose'} type={'labelId'}/>
|
|
104
|
+
<StorybookDescriptions componentName={'Expose'} type={'descriptionId'}/>
|
|
104
105
|
`,
|
|
105
106
|
slots: `
|
|
106
107
|
<Canvas of={Component.CellSlots}/>
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Descriptions for ChipGroup component properties
|
|
5
|
+
*
|
|
6
|
+
* Описания свойств компонента ChipGroup
|
|
7
|
+
*/
|
|
8
|
+
export const wikiDescriptionsChipGroup: StorybookComponentsDescriptionItem = {
|
|
9
|
+
name: 'ChipGroup',
|
|
10
|
+
description: {
|
|
11
|
+
en: 'Container for managing a collection of chips with selection functionality',
|
|
12
|
+
ru: 'Контейнер для управления коллекцией чипов с функциональностью выбора'
|
|
13
|
+
},
|
|
14
|
+
possibilities: {
|
|
15
|
+
en: [
|
|
16
|
+
'single or multiple chip selection',
|
|
17
|
+
'dynamic list rendering from data',
|
|
18
|
+
'customizable chip appearance through chipAttrs',
|
|
19
|
+
'conditional icon display based on selection state',
|
|
20
|
+
'flexible data binding with keyLabel and keyValue',
|
|
21
|
+
'event handling for user interactions'
|
|
22
|
+
],
|
|
23
|
+
ru: [
|
|
24
|
+
'одиночный или множественный выбор чипов',
|
|
25
|
+
'динамический рендеринг списка из данных',
|
|
26
|
+
'настраиваемый внешний вид чипов через chipAttrs',
|
|
27
|
+
'условное отображение иконок в зависимости от состояния выбора',
|
|
28
|
+
'гибкое связывание данных через keyLabel и keyValue',
|
|
29
|
+
'обработка событий для взаимодействия пользователя'
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
import: [
|
|
33
|
+
'import { ref } from \'vue\''
|
|
34
|
+
],
|
|
35
|
+
stories: [
|
|
36
|
+
{
|
|
37
|
+
id: 'ChipGroupBasic',
|
|
38
|
+
name: {
|
|
39
|
+
en: 'Basic',
|
|
40
|
+
ru: 'Базовые'
|
|
41
|
+
},
|
|
42
|
+
template: `
|
|
43
|
+
<div class="wiki-storybook-flex-column">
|
|
44
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
45
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Default</div>
|
|
46
|
+
<DesignComponent :list="['Option 1', 'Option 2', 'Option 3']"/>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
49
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">With icons</div>
|
|
50
|
+
<DesignComponent
|
|
51
|
+
:list="[
|
|
52
|
+
{ label: 'Home', icon: 'home' },
|
|
53
|
+
{ label: 'Star', icon: 'star' },
|
|
54
|
+
{ label: 'Heart', icon: 'favorite' }
|
|
55
|
+
]"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'ChipGroupSelection',
|
|
63
|
+
name: {
|
|
64
|
+
en: 'Selection States',
|
|
65
|
+
ru: 'Состояния выбора'
|
|
66
|
+
},
|
|
67
|
+
template: `
|
|
68
|
+
<div class="wiki-storybook-flex-column">
|
|
69
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
70
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Single selection</div>
|
|
71
|
+
<DesignComponent :list="['Option 1', 'Option 2', 'Option 3']" selected="2"/>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
74
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Multiple selection</div>
|
|
75
|
+
<DesignComponent :list="['Option 1', 'Option 2', 'Option 3', 'Option 4']" :selected="['2', '3']"/>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
78
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Icon when selected</div>
|
|
79
|
+
<DesignComponent
|
|
80
|
+
:list="[
|
|
81
|
+
{ label: 'Option 1', icon: 'check', value: 'option1' },
|
|
82
|
+
{ label: 'Option 2', icon: 'check', value: 'option2' },
|
|
83
|
+
{ label: 'Option 3', icon: 'check', value: 'option3' }
|
|
84
|
+
]"
|
|
85
|
+
:selected="['option2']"
|
|
86
|
+
:icon-when-selected="true"
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
`
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'ChipGroupVModel',
|
|
94
|
+
name: {
|
|
95
|
+
en: 'Two-way binding (v-model)',
|
|
96
|
+
ru: 'Двусторонняя привязка (v-model)'
|
|
97
|
+
},
|
|
98
|
+
setup: `
|
|
99
|
+
return {
|
|
100
|
+
selectedValue: ref('option2'),
|
|
101
|
+
multipleSelected: ref(['option1', 'option3'])
|
|
102
|
+
}
|
|
103
|
+
`,
|
|
104
|
+
template: `
|
|
105
|
+
<div class="wiki-storybook-flex-column">
|
|
106
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
107
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Selected: {{ selectedValue }}</div>
|
|
108
|
+
<div class="wiki-storybook-flex-column">
|
|
109
|
+
<DesignComponent
|
|
110
|
+
v-model:selected="selectedValue"
|
|
111
|
+
:list="[
|
|
112
|
+
{ label: 'Option 1', value: 'option1' },
|
|
113
|
+
{ label: 'Option 2', value: 'option2' },
|
|
114
|
+
{ label: 'Option 3', value: 'option3' }
|
|
115
|
+
]"
|
|
116
|
+
:readonly="false"
|
|
117
|
+
/>
|
|
118
|
+
<div class="wiki-storybook-flex">
|
|
119
|
+
<button class="wiki-storybook-button" @click="selectedValue = 'option1'">Select 1</button>
|
|
120
|
+
<button class="wiki-storybook-button" @click="selectedValue = 'option2'">Select 2</button>
|
|
121
|
+
<button class="wiki-storybook-button" @click="selectedValue = undefined">Clear</button>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div class="wiki-storybook-item wiki-storybook-item--padding wiki-storybook-item--auto">
|
|
127
|
+
<div class="wiki-storybook-item__label wiki-storybook-item__label--static">Selected: {{ multipleSelected }}</div>
|
|
128
|
+
<div class="wiki-storybook-flex-column">
|
|
129
|
+
<DesignComponent
|
|
130
|
+
v-model:selected="multipleSelected"
|
|
131
|
+
:list="[
|
|
132
|
+
{ label: 'Option 1', value: 'option1', icon: 'check' },
|
|
133
|
+
{ label: 'Option 2', value: 'option2', icon: 'check' },
|
|
134
|
+
{ label: 'Option 3', value: 'option3', icon: 'check' }
|
|
135
|
+
]"
|
|
136
|
+
:readonly="false"
|
|
137
|
+
:icon-when-selected="true"
|
|
138
|
+
/>
|
|
139
|
+
<div class="wiki-storybook-flex">
|
|
140
|
+
<button class="wiki-storybook-button" @click="multipleSelected = ['option1', 'option2']">Select 1,2</button>
|
|
141
|
+
<button class="wiki-storybook-button" @click="multipleSelected = ['option1', 'option2', 'option3']">Add 3</button>
|
|
142
|
+
<button class="wiki-storybook-button" @click="multipleSelected = []">Clear all</button>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
`
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
documentation: {
|
|
151
|
+
body: `
|
|
152
|
+
<StorybookDescriptions componentName={'ChipGroup'} type={'chipGroup'}/>
|
|
153
|
+
<Canvas of={Component.ChipGroupBasic}/>
|
|
154
|
+
|
|
155
|
+
<StorybookDescriptions componentName={'ChipGroup'} type={'selected'}/>
|
|
156
|
+
<Canvas of={Component.ChipGroupSelection}/>
|
|
157
|
+
|
|
158
|
+
<StorybookDescriptions componentName={'Value'} type={'v-model:selected'}/>
|
|
159
|
+
<Canvas of={Component.ChipGroupVModel}/>
|
|
160
|
+
`,
|
|
161
|
+
events: `
|
|
162
|
+
<StorybookDescriptions componentName={'Event'} type={'click'}/>
|
|
163
|
+
`,
|
|
164
|
+
slots: `
|
|
165
|
+
<StorybookDescriptions componentName={'Slot'} type={'default'}/>
|
|
166
|
+
`
|
|
167
|
+
}
|
|
168
|
+
}
|