@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,23 @@
|
|
|
1
|
+
## Copy link
|
|
2
|
+
|
|
3
|
+
The `isCopy` property switches the component to anchor link copying mode to clipboard.
|
|
4
|
+
|
|
5
|
+
**Properties:**
|
|
6
|
+
|
|
7
|
+
- `isCopy` — enables link copying mode (default `false`)
|
|
8
|
+
- `iconTag` — icon displayed in copy mode
|
|
9
|
+
- `iconContentCopy` — icon shown after successful copy
|
|
10
|
+
- `delayHide` — delay before hiding notification in milliseconds (default `3072`)
|
|
11
|
+
|
|
12
|
+
When `isCopy` is enabled, clicking the component doesn't scroll to the anchor but copies the full link (including origin and pathname) to clipboard. After copying, a Tooltip with notification automatically opens and closes after the time specified in `delayHide`. The icon changes from `iconTag` to `iconContentCopy` for visual confirmation of the action.
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<template>
|
|
16
|
+
<!-- Basic mode -->
|
|
17
|
+
<Anchor name="section" text="Copy link" isCopy />
|
|
18
|
+
|
|
19
|
+
<!-- With custom icons -->
|
|
20
|
+
<Anchor name="heading" isCopy iconTag="share" iconContentCopy="check" />
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Копирование ссылки
|
|
2
|
+
|
|
3
|
+
Свойство `isCopy` переключает компонент в режим копирования ссылки на якорь в буфер обмена.
|
|
4
|
+
|
|
5
|
+
**Свойства:**
|
|
6
|
+
|
|
7
|
+
- `isCopy` — включает режим копирования ссылки (по умолчанию `false`)
|
|
8
|
+
- `iconTag` — иконка, отображаемая в режиме копирования
|
|
9
|
+
- `iconContentCopy` — иконка, показываемая после успешного копирования
|
|
10
|
+
- `delayHide` — задержка перед скрытием уведомления в миллисекундах (по умолчанию `3072`)
|
|
11
|
+
|
|
12
|
+
При включённом `isCopy` клик по компоненту не выполняет прокрутку к якорю, а копирует полную ссылку (включая origin и pathname) в буфер обмена. После копирования автоматически открывается Tooltip с уведомлением, который закрывается через время, указанное в `delayHide`. Иконка меняется с `iconTag` на `iconContentCopy` для визуального подтверждения действия.
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<template>
|
|
16
|
+
<!-- Базовый режим -->
|
|
17
|
+
<Anchor name="section" text="Скопировать ссылку" isCopy />
|
|
18
|
+
|
|
19
|
+
<!-- С кастомными иконками -->
|
|
20
|
+
<Anchor name="heading" isCopy iconTag="share" iconContentCopy="check" />
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
## Scroll Settings
|
|
2
|
+
|
|
3
|
+
The `behavior`, `block`, `inline`, and `shift` properties control the scrolling behavior to the element when navigating via an anchor.
|
|
4
|
+
|
|
5
|
+
**Properties:**
|
|
6
|
+
|
|
7
|
+
- `behavior` — defines the scroll transition animation (`auto`, `smooth`, `instant`)
|
|
8
|
+
- `block` — vertical alignment of the element (`start`, `center`, `end`, `nearest`)
|
|
9
|
+
- `inline` — horizontal alignment of the element (`start`, `center`, `end`, `nearest`)
|
|
10
|
+
- `shift` — scroll offset from the top edge (in pixels)
|
|
11
|
+
|
|
12
|
+
> **Note:** If the `shift` property is set, the component uses `window.scrollTo` instead of `element.scrollIntoView`. In this case, the `block` and `inline` properties are ignored, and scrolling is always aligned to the top edge of the element with the specified offset.
|
|
13
|
+
|
|
14
|
+
These properties allow you to customize exactly how the page scrolls to the target element. For example, you can enable smooth scrolling or change the positioning of the element on the screen after scrolling.
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<template>
|
|
18
|
+
<Anchor
|
|
19
|
+
href="#target"
|
|
20
|
+
behavior="smooth"
|
|
21
|
+
block="center"
|
|
22
|
+
inline="nearest"
|
|
23
|
+
>
|
|
24
|
+
Go to element
|
|
25
|
+
</Anchor>
|
|
26
|
+
|
|
27
|
+
<Anchor
|
|
28
|
+
href="#target"
|
|
29
|
+
:shift="100"
|
|
30
|
+
>
|
|
31
|
+
Go with offset
|
|
32
|
+
</Anchor>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
## Настройка прокрутки
|
|
2
|
+
|
|
3
|
+
Свойства `behavior`, `block`, `inline` и `shift` управляют поведением прокрутки к элементу при переходе по якорю.
|
|
4
|
+
|
|
5
|
+
**Свойства:**
|
|
6
|
+
|
|
7
|
+
- `behavior` — определяет анимацию прокрутки (`auto`, `smooth`, `instant`)
|
|
8
|
+
- `block` — вертикальное выравнивание элемента (`start`, `center`, `end`, `nearest`)
|
|
9
|
+
- `inline` — горизонтальное выравнивание элемента (`start`, `center`, `end`, `nearest`)
|
|
10
|
+
- `shift` — смещение прокрутки от верхнего края (в пикселях)
|
|
11
|
+
|
|
12
|
+
> **Примечание:** Если задано свойство `shift`, компонент использует `window.scrollTo` вместо `element.scrollIntoView`. В этом случае свойства `block` и `inline` игнорируются, и прокрутка всегда выполняется к верхней границе элемента с учетом указанного смещения.
|
|
13
|
+
|
|
14
|
+
Эти свойства позволяют настроить, как именно страница будет прокручиваться к целевому элементу. Например, можно сделать плавную прокрутку или изменить позиционирование элемента на экране после прокрутки.
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<template>
|
|
18
|
+
<Anchor
|
|
19
|
+
href="#target"
|
|
20
|
+
behavior="smooth"
|
|
21
|
+
block="center"
|
|
22
|
+
inline="nearest"
|
|
23
|
+
>
|
|
24
|
+
Перейти к элементу
|
|
25
|
+
</Anchor>
|
|
26
|
+
|
|
27
|
+
<Anchor
|
|
28
|
+
href="#target"
|
|
29
|
+
:shift="100"
|
|
30
|
+
>
|
|
31
|
+
Перейти со смещением
|
|
32
|
+
</Anchor>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { StorybookComponentsMdxItem } from '../../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
import anchorEn from './anchor.en.mdx'
|
|
4
|
+
import anchorRu from './anchor.ru.mdx'
|
|
5
|
+
import exposeGoEn from './expose.go.en.mdx'
|
|
6
|
+
import exposeGoRu from './expose.go.ru.mdx'
|
|
7
|
+
import hideEn from './hide.en.mdx'
|
|
8
|
+
import hideRu from './hide.ru.mdx'
|
|
9
|
+
import isCopyEn from './isCopy.en.mdx'
|
|
10
|
+
import isCopyRu from './isCopy.ru.mdx'
|
|
11
|
+
import scrollEn from './scroll.en.mdx'
|
|
12
|
+
import scrollRu from './scroll.ru.mdx'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* MDX files for Anchor component
|
|
16
|
+
*
|
|
17
|
+
* MDX файлы для компонента Anchor
|
|
18
|
+
*/
|
|
19
|
+
export const wikiMdxAnchor: StorybookComponentsMdxItem = {
|
|
20
|
+
name: 'Anchor',
|
|
21
|
+
descriptions: {
|
|
22
|
+
'anchor': {
|
|
23
|
+
en: anchorEn,
|
|
24
|
+
ru: anchorRu
|
|
25
|
+
},
|
|
26
|
+
'expose.go': {
|
|
27
|
+
en: exposeGoEn,
|
|
28
|
+
ru: exposeGoRu
|
|
29
|
+
},
|
|
30
|
+
'hide': {
|
|
31
|
+
en: hideEn,
|
|
32
|
+
ru: hideRu
|
|
33
|
+
},
|
|
34
|
+
'isCopy': {
|
|
35
|
+
en: isCopyEn,
|
|
36
|
+
ru: isCopyRu
|
|
37
|
+
},
|
|
38
|
+
'scroll': {
|
|
39
|
+
en: scrollEn,
|
|
40
|
+
ru: scrollRu
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Component for displaying a graphical indicator (arrow) used to visually link floating elements to their target.
|
|
2
|
+
|
|
3
|
+
Arrow provides automatic or manual positioning of the indicator. It is often used within Tooltip, Popover, and Dropdown components to indicate the direction towards the trigger or target element. The component supports adaptation to various sizes and styles, and can dynamically update its position.
|
|
4
|
+
|
|
5
|
+
**Key Features:**
|
|
6
|
+
|
|
7
|
+
- Automatic and manual positioning (top, bottom, left, right)
|
|
8
|
+
- Support for inverted style
|
|
9
|
+
- Binding to a target element (elementTarget)
|
|
10
|
+
- Dynamic position updates
|
|
11
|
+
- Customizable SVG arrow graphics
|
|
12
|
+
- Integration with positioning components
|
|
13
|
+
|
|
14
|
+
**Typical Use Cases:**
|
|
15
|
+
|
|
16
|
+
- Indicators in tooltips
|
|
17
|
+
- Arrows in dropdown menus and popovers
|
|
18
|
+
- Visual links in tour guides
|
|
19
|
+
- Directional indicators in the interface
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<script setup>
|
|
23
|
+
import { Arrow } from 'dxt-ui'
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div class="relative p-4 border rounded">
|
|
28
|
+
Content with arrow
|
|
29
|
+
<Arrow position="top" />
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
```
|
|
33
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Компонент для отображения графического указателя (стрелки), используемого для визуальной связи всплывающих элементов с их целью.
|
|
2
|
+
|
|
3
|
+
Arrow обеспечивает автоматическое или ручное позиционирование указателя. Часто применяется в составе компонентов Tooltip, Popover и Dropdown для указания направления на триггер или целевой элемент. Компонент поддерживает адаптацию под различные размеры и стили, а также может динамически обновлять свое положение.
|
|
4
|
+
|
|
5
|
+
**Основные возможности:**
|
|
6
|
+
|
|
7
|
+
- Автоматическое и ручное позиционирование (top, bottom, left, right)
|
|
8
|
+
- Поддержка инвертированного стиля
|
|
9
|
+
- Привязка к целевому элементу (elementTarget)
|
|
10
|
+
- Динамическое обновление положения
|
|
11
|
+
- Настраиваемая SVG-графика стрелки
|
|
12
|
+
- Интеграция с компонентами позиционирования
|
|
13
|
+
|
|
14
|
+
**Типичные сценарии использования:**
|
|
15
|
+
|
|
16
|
+
- Указатели во всплывающих подсказках
|
|
17
|
+
- Стрелки в выпадающих меню и поповерах
|
|
18
|
+
- Визуальные связи в пошаговых руководствах
|
|
19
|
+
- Индикаторы направления в интерфейсе
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<script setup>
|
|
23
|
+
import { Arrow } from 'dxt-ui'
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div class="relative p-4 border rounded">
|
|
28
|
+
Контент с указателем
|
|
29
|
+
<Arrow position="top" />
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
```
|
|
33
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StorybookComponentsMdxItem } from '../../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
import arrowEn from './arrow.en.mdx'
|
|
4
|
+
import arrowRu from './arrow.ru.mdx'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* MDX files for Arrow component
|
|
8
|
+
*
|
|
9
|
+
* MDX файлы для компонента Arrow
|
|
10
|
+
*/
|
|
11
|
+
export const wikiMdxArrow: StorybookComponentsMdxItem = {
|
|
12
|
+
name: 'Arrow',
|
|
13
|
+
descriptions: {
|
|
14
|
+
arrow: {
|
|
15
|
+
en: arrowEn,
|
|
16
|
+
ru: arrowRu
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
A versatile structural component that serves as a container with support for labels, descriptions, captions, icons, and headlines.
|
|
4
|
+
|
|
5
|
+
Block provides a flexible foundation for building complex interface components, allowing you to combine various information elements into a single unit. The component supports HTML tag customization and provides slots for content customization.
|
|
6
|
+
|
|
7
|
+
**Key Features:**
|
|
8
|
+
|
|
9
|
+
- Display of headline, label, description, and caption
|
|
10
|
+
- Icon support
|
|
11
|
+
- Customizable HTML tag
|
|
12
|
+
- Flexible layout for content organization
|
|
13
|
+
- Slot support for functionality extension
|
|
14
|
+
|
|
15
|
+
**Typical Use Cases:**
|
|
16
|
+
|
|
17
|
+
- Content cards
|
|
18
|
+
- List items
|
|
19
|
+
- Information blocks
|
|
20
|
+
- Sections with headers and descriptions
|
|
21
|
+
- Basic building block for other components
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<script setup>
|
|
25
|
+
import { ref } from 'vue'
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<Block
|
|
30
|
+
headline="Block Headline"
|
|
31
|
+
label="Label"
|
|
32
|
+
description="Block description with detailed information"
|
|
33
|
+
caption="Caption"
|
|
34
|
+
icon="info"
|
|
35
|
+
>
|
|
36
|
+
Main block content
|
|
37
|
+
</Block>
|
|
38
|
+
</template>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> Block is a fundamental component for creating structured interfaces.
|
|
42
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## Описание
|
|
2
|
+
|
|
3
|
+
Универсальный структурный компонент, служащий контейнером с поддержкой меток, описаний, подписей, иконок и заголовков.
|
|
4
|
+
|
|
5
|
+
Block обеспечивает гибкую основу для построения сложных компонентов интерфейса, позволяя комбинировать различные информационные элементы в едином блоке. Компонент поддерживает настройку HTML-тега и предоставляет слоты для кастомизации контента.
|
|
6
|
+
|
|
7
|
+
**Основные возможности:**
|
|
8
|
+
|
|
9
|
+
- Отображение заголовка, метки, описания и подписи
|
|
10
|
+
- Поддержка иконок
|
|
11
|
+
- Настраиваемый HTML-тег
|
|
12
|
+
- Гибкая компоновка для организации контента
|
|
13
|
+
- Поддержка слотов для расширения функциональности
|
|
14
|
+
|
|
15
|
+
**Типичные сценарии использования:**
|
|
16
|
+
|
|
17
|
+
- Карточки контента
|
|
18
|
+
- Элементы списков
|
|
19
|
+
- Информационные блоки
|
|
20
|
+
- Секции с заголовками и описаниями
|
|
21
|
+
- Базовый строительный блок для других компонентов
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<script setup>
|
|
25
|
+
import { ref } from 'vue'
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<Block
|
|
30
|
+
headline="Заголовок блока"
|
|
31
|
+
label="Метка"
|
|
32
|
+
description="Описание блока с подробной информацией"
|
|
33
|
+
caption="Подпись"
|
|
34
|
+
icon="info"
|
|
35
|
+
>
|
|
36
|
+
Основной контент блока
|
|
37
|
+
</Block>
|
|
38
|
+
</template>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> Block является фундаментальным компонентом для создания структурированных интерфейсов.
|
|
42
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StorybookComponentsMdxItem } from '../../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
import blockEn from './block.en.mdx'
|
|
4
|
+
import blockRu from './block.ru.mdx'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* MDX files for Block component
|
|
8
|
+
*
|
|
9
|
+
* MDX файлы для компонента Block
|
|
10
|
+
*/
|
|
11
|
+
export const wikiMdxBlock: StorybookComponentsMdxItem = {
|
|
12
|
+
name: 'Block',
|
|
13
|
+
descriptions: {
|
|
14
|
+
block: {
|
|
15
|
+
en: blockEn,
|
|
16
|
+
ru: blockRu
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Component for managing a collection of chips with selection functionality and flexible data binding.
|
|
2
|
+
|
|
3
|
+
ChipGroup renders multiple Chip components from a data array, handles single or multiple selection states, and provides customization options for each chip. The component supports dynamic list rendering, conditional icon display based on selection, and flexible data structure mapping through key properties.
|
|
4
|
+
|
|
5
|
+
**Key features:**
|
|
6
|
+
|
|
7
|
+
- Single or multiple item selection
|
|
8
|
+
- Dynamic list rendering from data array
|
|
9
|
+
- Customizable chip appearance through chipAttrs
|
|
10
|
+
- Conditional icon display based on selection state
|
|
11
|
+
- Flexible data binding with keyLabel and keyValue
|
|
12
|
+
- Event handling for user interactions
|
|
13
|
+
- Support for complex data structures
|
|
14
|
+
|
|
15
|
+
**Common use cases:**
|
|
16
|
+
|
|
17
|
+
- Filter chips for search and filtering
|
|
18
|
+
- Tag selection in forms
|
|
19
|
+
- Category selection interfaces
|
|
20
|
+
- Multiple choice options
|
|
21
|
+
- Status or type selectors
|
|
22
|
+
- Dynamic lists with selection
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<script setup>
|
|
26
|
+
import { ref } from 'vue'
|
|
27
|
+
|
|
28
|
+
const selected = ref(['option1'])
|
|
29
|
+
|
|
30
|
+
const options = [
|
|
31
|
+
{ value: 'option1', label: 'Option 1', icon: 'star' },
|
|
32
|
+
{ value: 'option2', label: 'Option 2', icon: 'favorite' },
|
|
33
|
+
{ value: 'option3', label: 'Option 3', icon: 'bookmark' }
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
const handleClick = (event) => {
|
|
37
|
+
console.log('Chip clicked:', event)
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<ChipGroup
|
|
43
|
+
v-model:selected="selected"
|
|
44
|
+
:list="options"
|
|
45
|
+
key-value="value"
|
|
46
|
+
key-label="label"
|
|
47
|
+
:icon-when-selected="true"
|
|
48
|
+
@click="handleClick"
|
|
49
|
+
/>
|
|
50
|
+
</template>
|
|
51
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Компонент для управления коллекцией чипов с функциональностью выбора и гибким связыванием данных.
|
|
2
|
+
|
|
3
|
+
ChipGroup отображает множество компонентов Chip из массива данных, управляет одиночным или множественным выбором и предоставляет возможности настройки каждого чипа. Компонент поддерживает динамический рендеринг списка, условное отображение иконок в зависимости от выбора и гибкое сопоставление структуры данных через ключевые свойства.
|
|
4
|
+
|
|
5
|
+
**Основные возможности:**
|
|
6
|
+
|
|
7
|
+
- Одиночный или множественный выбор элементов
|
|
8
|
+
- Динамический рендеринг списка из массива данных
|
|
9
|
+
- Настраиваемый внешний вид чипов через chipAttrs
|
|
10
|
+
- Условное отображение иконок в зависимости от состояния выбора
|
|
11
|
+
- Гибкое связывание данных через keyLabel и keyValue
|
|
12
|
+
- Обработка событий для взаимодействия пользователя
|
|
13
|
+
- Поддержка сложных структур данных
|
|
14
|
+
|
|
15
|
+
**Типичные сценарии использования:**
|
|
16
|
+
|
|
17
|
+
- Фильтр-чипы для поиска и фильтрации
|
|
18
|
+
- Выбор тегов в формах
|
|
19
|
+
- Интерфейсы выбора категорий
|
|
20
|
+
- Варианты множественного выбора
|
|
21
|
+
- Селекторы статусов или типов
|
|
22
|
+
- Динамические списки с выбором
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<script setup>
|
|
26
|
+
import { ref } from 'vue'
|
|
27
|
+
|
|
28
|
+
const selected = ref(['option1'])
|
|
29
|
+
|
|
30
|
+
const options = [
|
|
31
|
+
{ value: 'option1', label: 'Опция 1', icon: 'star' },
|
|
32
|
+
{ value: 'option2', label: 'Опция 2', icon: 'favorite' },
|
|
33
|
+
{ value: 'option3', label: 'Опция 3', icon: 'bookmark' }
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
const handleClick = (event) => {
|
|
37
|
+
console.log('Чип нажат:', event)
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<ChipGroup
|
|
43
|
+
v-model:selected="selected"
|
|
44
|
+
:list="options"
|
|
45
|
+
key-value="value"
|
|
46
|
+
key-label="label"
|
|
47
|
+
:icon-when-selected="true"
|
|
48
|
+
@click="handleClick"
|
|
49
|
+
/>
|
|
50
|
+
</template>
|
|
51
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
## Selection Management
|
|
2
|
+
|
|
3
|
+
Properties `selected` and `iconWhenSelected` are designed for managing chip selection state.
|
|
4
|
+
|
|
5
|
+
**Properties:**
|
|
6
|
+
|
|
7
|
+
- `selected` — identifier(s) of selected item (string, number, array of strings/numbers, or `undefined`)
|
|
8
|
+
- `iconWhenSelected` — shows chip icons only when item is selected (default: icons always visible)
|
|
9
|
+
|
|
10
|
+
The `selected` property determines which chips will be highlighted. Accepts a single value for single selection or an array of values for multiple selection. Values are matched with list items by their index or value if the list contains simple data types.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
|
|
16
|
+
const selected = ref(['option1'])
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<!-- Simple array selection -->
|
|
21
|
+
<ChipGroup
|
|
22
|
+
v-model:selected="selected"
|
|
23
|
+
:list="['Option 1', 'Option 2']"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<!-- Object array with keys -->
|
|
27
|
+
<ChipGroup
|
|
28
|
+
v-model:selected="selected"
|
|
29
|
+
:list="[
|
|
30
|
+
{ id: 'option1', name: 'First Option' },
|
|
31
|
+
{ id: 'option2', name: 'Second Option' }
|
|
32
|
+
]"
|
|
33
|
+
key-value="id"
|
|
34
|
+
key-label="name"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<!-- Icons only when selected -->
|
|
38
|
+
<ChipGroup
|
|
39
|
+
v-model:selected="selected"
|
|
40
|
+
:list="[
|
|
41
|
+
{ id: 'option1', name: 'Option 1', icon: 'check' },
|
|
42
|
+
{ id: 'option2', name: 'Option 2', icon: 'check' }
|
|
43
|
+
]"
|
|
44
|
+
key-value="id"
|
|
45
|
+
key-label="name"
|
|
46
|
+
:icon-when-selected="true"
|
|
47
|
+
/>
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
50
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
## Управление выбором
|
|
2
|
+
|
|
3
|
+
Свойства `selected` и `iconWhenSelected` предназначены для управления состоянием выбора чипов.
|
|
4
|
+
|
|
5
|
+
**Свойства:**
|
|
6
|
+
|
|
7
|
+
- `selected` — идентификатор(ы) выбранного элемента (строка, число, массив строк/чисел или `undefined`)
|
|
8
|
+
- `iconWhenSelected` — показывает иконки чипов только при выборе элемента (по умолчанию: иконки всегда видимы)
|
|
9
|
+
|
|
10
|
+
Свойство `selected` определяет, какие чипы будут выделены. Принимает одно значение для единичного выбора или массив значений для множественного выбора. Значения сопоставляются с элементами списка по их индексу или значению, если список содержит простые типы данных.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
|
|
16
|
+
const selected = ref(['option1'])
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<!-- Выбор из простого массива -->
|
|
21
|
+
<ChipGroup
|
|
22
|
+
v-model:selected="selected"
|
|
23
|
+
:list="['Опция 1', 'Опция 2']"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<!-- Массив объектов с ключами -->
|
|
27
|
+
<ChipGroup
|
|
28
|
+
v-model:selected="selected"
|
|
29
|
+
:list="[
|
|
30
|
+
{ id: 'option1', name: 'Первая опция' },
|
|
31
|
+
{ id: 'option2', name: 'Вторая опция' }
|
|
32
|
+
]"
|
|
33
|
+
key-value="id"
|
|
34
|
+
key-label="name"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<!-- Иконки только при выборе -->
|
|
38
|
+
<ChipGroup
|
|
39
|
+
v-model:selected="selected"
|
|
40
|
+
:list="[
|
|
41
|
+
{ id: 'option1', name: 'Опция 1', icon: 'check' },
|
|
42
|
+
{ id: 'option2', name: 'Опция 2', icon: 'check' }
|
|
43
|
+
]"
|
|
44
|
+
key-value="id"
|
|
45
|
+
key-label="name"
|
|
46
|
+
:icon-when-selected="true"
|
|
47
|
+
/>
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
50
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StorybookComponentsMdxItem } from '../../../types/storybookTypes'
|
|
2
|
+
|
|
3
|
+
import chipGroupEn from './chipGroup.en.mdx'
|
|
4
|
+
import chipGroupRu from './chipGroup.ru.mdx'
|
|
5
|
+
import selectedEn from './selected.en.mdx'
|
|
6
|
+
import selectedRu from './selected.ru.mdx'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* MDX files for ChipGroup component
|
|
10
|
+
*
|
|
11
|
+
* MDX файлы для компонента ChipGroup
|
|
12
|
+
*/
|
|
13
|
+
export const wikiMdxChipGroup: StorybookComponentsMdxItem = {
|
|
14
|
+
name: 'ChipGroup',
|
|
15
|
+
descriptions: {
|
|
16
|
+
chipGroup: {
|
|
17
|
+
en: chipGroupEn,
|
|
18
|
+
ru: chipGroupRu
|
|
19
|
+
},
|
|
20
|
+
selected: {
|
|
21
|
+
en: selectedEn,
|
|
22
|
+
ru: selectedRu
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
## Action buttons
|
|
2
|
+
|
|
3
|
+
Properties `buttonOk`, `buttonClose`, and `actionsList` control action buttons in the dialog window through the built-in Actions component.
|
|
4
|
+
|
|
5
|
+
**Properties:**
|
|
6
|
+
|
|
7
|
+
- `buttonOk` — confirmation button
|
|
8
|
+
- `buttonClose` — close button
|
|
9
|
+
- `clickOkAndClose` — automatic dialog closing when OK button is clicked
|
|
10
|
+
- `actionsList` — direct access to the Actions component button list
|
|
11
|
+
|
|
12
|
+
With `clickOkAndClose="true"` OK button automatically closes the dialog after clicking.
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<script setup>
|
|
16
|
+
import { ref } from 'vue'
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<!-- Basic usage -->
|
|
21
|
+
<Dialog
|
|
22
|
+
buttonOk="Confirm"
|
|
23
|
+
buttonClose="Cancel"
|
|
24
|
+
label="Delete file"
|
|
25
|
+
@ok="handleDelete"
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
<!-- Hide close button -->
|
|
29
|
+
<Dialog
|
|
30
|
+
buttonOk="Got it"
|
|
31
|
+
:buttonClose="null"
|
|
32
|
+
label="Information"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<!-- Using actionsList -->
|
|
36
|
+
<Dialog
|
|
37
|
+
:actionsList="[
|
|
38
|
+
{ label: 'Save', onClick: handleSave },
|
|
39
|
+
{ label: 'Cancel', outline: true, onClick: handleCancel }
|
|
40
|
+
]"
|
|
41
|
+
label="Save"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|
|
44
|
+
```
|
|
45
|
+
|