@dxtmisha/wiki 0.25.1 → 0.39.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.
Files changed (101) hide show
  1. package/package.json +2 -2
  2. package/src/classes/WikiStorybook.ts +92 -1
  3. package/src/classes/WikiStorybookItem.ts +55 -5
  4. package/src/classes/WikiStorybookProp.ts +109 -0
  5. package/src/library.ts +1 -0
  6. package/src/media/descriptions/wikiDescriptions.ts +4 -0
  7. package/src/media/descriptions/wikiDescriptionsAccordion.ts +46 -0
  8. package/src/media/descriptions/wikiDescriptionsActionSheet.ts +53 -0
  9. package/src/media/descriptions/wikiDescriptionsActions.ts +28 -0
  10. package/src/media/descriptions/wikiDescriptionsAnchor.ts +36 -0
  11. package/src/media/descriptions/wikiDescriptionsArrow.ts +33 -0
  12. package/src/media/descriptions/wikiDescriptionsBadge.ts +43 -0
  13. package/src/media/descriptions/wikiDescriptionsBars.ts +33 -0
  14. package/src/media/descriptions/wikiDescriptionsBlock.ts +67 -5
  15. package/src/media/descriptions/wikiDescriptionsButton.ts +32 -0
  16. package/src/media/descriptions/wikiDescriptionsCell.ts +24 -0
  17. package/src/media/descriptions/wikiDescriptionsChip.ts +42 -0
  18. package/src/media/descriptions/wikiDescriptionsChipGroup.ts +45 -14
  19. package/src/media/descriptions/wikiDescriptionsDialog.ts +44 -0
  20. package/src/media/descriptions/wikiDescriptionsField.ts +55 -2
  21. package/src/media/descriptions/wikiDescriptionsFieldCounter.ts +32 -0
  22. package/src/media/descriptions/wikiDescriptionsFieldLabel.ts +22 -0
  23. package/src/media/descriptions/wikiDescriptionsFieldMessage.ts +25 -0
  24. package/src/media/descriptions/wikiDescriptionsIcon.ts +46 -8
  25. package/src/media/descriptions/wikiDescriptionsImage.ts +50 -1
  26. package/src/media/descriptions/wikiDescriptionsInput.ts +56 -0
  27. package/src/media/descriptions/wikiDescriptionsList.ts +31 -0
  28. package/src/media/descriptions/wikiDescriptionsListGroup.ts +57 -0
  29. package/src/media/descriptions/wikiDescriptionsListItem.ts +42 -0
  30. package/src/media/descriptions/wikiDescriptionsListMenu.ts +41 -0
  31. package/src/media/descriptions/wikiDescriptionsMask.ts +42 -0
  32. package/src/media/descriptions/wikiDescriptionsMenu.ts +56 -0
  33. package/src/media/descriptions/wikiDescriptionsModal.ts +61 -6
  34. package/src/media/descriptions/wikiDescriptionsMotionTransform.ts +57 -0
  35. package/src/media/descriptions/wikiDescriptionsPage.ts +155 -0
  36. package/src/media/descriptions/wikiDescriptionsProgress.ts +39 -0
  37. package/src/media/descriptions/wikiDescriptionsRipple.ts +42 -3
  38. package/src/media/descriptions/wikiDescriptionsScrollbar.ts +48 -0
  39. package/src/media/descriptions/wikiDescriptionsSection.ts +152 -0
  40. package/src/media/descriptions/wikiDescriptionsSelect.ts +44 -0
  41. package/src/media/descriptions/wikiDescriptionsSelectValue.ts +29 -0
  42. package/src/media/descriptions/wikiDescriptionsSkeleton.ts +42 -1
  43. package/src/media/descriptions/wikiDescriptionsTextareaAutosize.ts +30 -0
  44. package/src/media/descriptions/wikiDescriptionsTooltip.ts +47 -0
  45. package/src/media/descriptions/wikiDescriptionsWindow.ts +60 -0
  46. package/src/media/functional/functional-basic/functions/getCurrentDate/getCurrentDate.en.mdx +25 -0
  47. package/src/media/functional/functional-basic/functions/getCurrentDate/getCurrentDate.ru.mdx +25 -0
  48. package/src/media/functional/functional-basic/functions/getCurrentDate/getCurrentDate.vi.mdx +25 -0
  49. package/src/media/functional/functional-basic/functions/isEnter/isEnter.en.mdx +30 -0
  50. package/src/media/functional/functional-basic/functions/isEnter/isEnter.ru.mdx +30 -0
  51. package/src/media/functional/functional-basic/functions/isEnter/isEnter.vi.mdx +30 -0
  52. package/src/media/mdx/Image/flag.en.mdx +23 -0
  53. package/src/media/mdx/Image/flag.ru.mdx +23 -0
  54. package/src/media/mdx/Image/image.en.mdx +26 -21
  55. package/src/media/mdx/Image/image.ru.mdx +26 -22
  56. package/src/media/mdx/Image/wikiMdxImage.ts +6 -0
  57. package/src/media/mdx/Page/page.en.mdx +38 -0
  58. package/src/media/mdx/Page/page.ru.mdx +38 -0
  59. package/src/media/mdx/Page/wikiMdxPage.ts +19 -0
  60. package/src/media/mdx/Section/section.en.mdx +38 -0
  61. package/src/media/mdx/Section/section.ru.mdx +38 -0
  62. package/src/media/mdx/Section/wikiMdxSection.ts +19 -0
  63. package/src/media/mdx/expose/expose.clear.en.mdx +1 -1
  64. package/src/media/mdx/wikiMdx.ts +4 -0
  65. package/src/media/props/wiki.ts +2 -0
  66. package/src/media/props/wikiActionsInclude.ts +1 -1
  67. package/src/media/props/wikiAnchor.ts +3 -2
  68. package/src/media/props/wikiAria.ts +21 -0
  69. package/src/media/props/wikiArrowInclude.ts +1 -1
  70. package/src/media/props/wikiAttributes.ts +143 -0
  71. package/src/media/props/wikiBadge.ts +7 -4
  72. package/src/media/props/wikiBars.ts +7 -6
  73. package/src/media/props/wikiBarsInclude.ts +5 -3
  74. package/src/media/props/wikiButton.ts +8 -4
  75. package/src/media/props/wikiChip.ts +4 -2
  76. package/src/media/props/wikiDialog.ts +1 -2
  77. package/src/media/props/wikiField.ts +18 -10
  78. package/src/media/props/wikiFieldCounterInclude.ts +15 -6
  79. package/src/media/props/wikiForm.ts +32 -13
  80. package/src/media/props/wikiIcon.ts +16 -3
  81. package/src/media/props/wikiIconInclude.ts +12 -9
  82. package/src/media/props/wikiImage.ts +26 -1
  83. package/src/media/props/wikiInformation.ts +21 -17
  84. package/src/media/props/wikiList.ts +10 -4
  85. package/src/media/props/wikiListItem.ts +3 -2
  86. package/src/media/props/wikiMask.ts +2 -2
  87. package/src/media/props/wikiMaskInclude.ts +1 -1
  88. package/src/media/props/wikiMenu.ts +1 -1
  89. package/src/media/props/wikiMotionTransform.ts +7 -3
  90. package/src/media/props/wikiOption.ts +250 -7
  91. package/src/media/props/wikiProgress.ts +8 -5
  92. package/src/media/props/wikiScrollbar.ts +6 -6
  93. package/src/media/props/wikiSelect.ts +22 -22
  94. package/src/media/props/wikiStatus.ts +16 -27
  95. package/src/media/props/wikiStyle.ts +43 -275
  96. package/src/media/props/wikiTechnical.ts +77 -2
  97. package/src/media/props/wikiText.ts +110 -0
  98. package/src/media/props/wikiValue.ts +26 -91
  99. package/src/media/props/wikiWindow.ts +27 -17
  100. package/src/shims-mdx.d.ts +5 -0
  101. package/src/types/storybookTypes.ts +22 -0
@@ -0,0 +1,155 @@
1
+ import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
2
+
3
+ /**
4
+ * Descriptions for Page component properties
5
+ *
6
+ * Описания свойств компонента Page
7
+ */
8
+ export const wikiDescriptionsPage: StorybookComponentsDescriptionItem = {
9
+ name: 'Page',
10
+ description: {
11
+ en: 'A top-level semantic container component representing the main content of a document. It uses the <main> tag by default and supports high-level headers and descriptions.',
12
+ ru: 'Семантический компонент-контейнер верхнего уровня, представляющий основное содержимое документа. По умолчанию использует тег <main> и поддерживает заголовки высокого уровня.'
13
+ },
14
+ possibilities: {
15
+ en: [
16
+ 'semantic wrapper for main content using <main> tag',
17
+ 'support for main titles (h1 by default), labels, descriptions, and captions',
18
+ 'customizable layout and spacing',
19
+ 'support for icons',
20
+ 'flexible content organization'
21
+ ],
22
+ ru: [
23
+ 'семантическая обертка для основного контента с использованием тега <main>',
24
+ 'поддержка главных заголовков (h1 по умолчанию), меток, описаний и подписей',
25
+ 'настраиваемый макет и отступы',
26
+ 'поддержка иконок',
27
+ 'гибкая организация контента'
28
+ ]
29
+ },
30
+ import: [],
31
+ render: `
32
+ <DesignComponent v-bind="args">
33
+ <p>
34
+ The Page component is designed to wrap the unique content of a document.
35
+ It defaults to using the <code>&lt;main&gt;</code> HTML tag, ensuring that the primary content is correctly identified by assistive technologies and search engines.
36
+ </p>
37
+ <p>
38
+ It provides a comprehensive set of features for page-level content presentation, including headlines, labels, descriptions, and icons.
39
+ The default tag for the headline is set to <code>&lt;h1&gt;</code>, establishing the top-level heading for the page.
40
+ </p>
41
+ <p>
42
+ Use Page to encapsulate the core content of your view, separating it from repeated elements like navigation bars or footers.
43
+ </p>
44
+ </DesignComponent>
45
+ `,
46
+ stories: [
47
+ {
48
+ id: 'PageBasic',
49
+ name: {
50
+ en: 'Basic',
51
+ ru: 'Базовые'
52
+ },
53
+ template: `
54
+ <div class="wiki-storybook-flex-column">
55
+ <DesignComponent>
56
+ <p>Simple page content wrapper.</p>
57
+ </DesignComponent>
58
+ <DesignComponent label="Documentation" description="Learn how to use the library">
59
+ <p>Welcome to the documentation page.</p>
60
+ </DesignComponent>
61
+ <DesignComponent headline="Dashboard Overview" label="Analytics">
62
+ <div style="height: 100px; background: #f0f0f0; display: flex; align-items: center; justify-content: center;">
63
+ Chart Placeholder
64
+ </div>
65
+ </DesignComponent>
66
+ </div>
67
+ `
68
+ },
69
+ {
70
+ id: 'PageSlots',
71
+ name: {
72
+ en: 'Slots usage',
73
+ ru: 'Использование слотов'
74
+ },
75
+ template: `
76
+ <DesignComponent>
77
+ <template #default>Default slot</template>
78
+ <template #headline>Headline slot</template>
79
+ <template #label>Label slot</template>
80
+ <template #description>Description slot</template>
81
+ <template #caption>Caption slot</template>
82
+ <template #trailing>Trailing slot</template>
83
+ </DesignComponent>
84
+ `
85
+ }
86
+ ],
87
+ documentation: {
88
+ body: `
89
+ <StorybookDescriptions componentName={'Page'} type={'block'}/>
90
+ <Canvas of={Component.PageBasic}/>
91
+ `,
92
+ slots: `
93
+ <Canvas of={Component.PageSlots}/>
94
+ <StorybookDescriptions componentName={'Slot'} type={'default'}/>
95
+ <StorybookDescriptions componentName={'Slot'} type={'headline'}/>
96
+ <StorybookDescriptions componentName={'Slot'} type={'label'}/>
97
+ <StorybookDescriptions componentName={'Slot'} type={'description'}/>
98
+ <StorybookDescriptions componentName={'Slot'} type={'caption'}/>
99
+ <StorybookDescriptions componentName={'Slot'} type={'trailing'}/>
100
+ `,
101
+ expose: `
102
+ <StorybookDescriptions componentName={'Expose'} type={'labelId'}/>
103
+ <StorybookDescriptions componentName={'Expose'} type={'descriptionId'}/>
104
+ `
105
+ },
106
+ ai: {
107
+ render: `
108
+ <div :class="classDemo.item">
109
+ <Page v-bind="args">
110
+ Main page content.
111
+ </Page>
112
+ </div>
113
+ `,
114
+ description: `
115
+ Page is a top-level structural component designed to wrap the main content of a view or document.
116
+ It acts as a semantic container (typically rendering a \`<main>\` tag) and provides a standardized header structure.
117
+ It inherits all functionality from the \`Block\` component.
118
+
119
+ **Key Features:**
120
+ 1. **Semantic Structure:**
121
+ - Represents the main content area of the application.
122
+ - Provides a consistent layout for page headers.
123
+
124
+ 2. **Header Layout:**
125
+ - **Headline:** High-level category or breadcrumb-like text.
126
+ - **Label:** The primary page title.
127
+ - **Description:** Subtitle or page summary.
128
+ - **Icon:** Page icon.
129
+ - **Trailing:** Area for page-level actions (e.g., "Save", "Edit").
130
+
131
+ 3. **Customization:**
132
+ - Supports all \`Block\` props.
133
+ - Flexible content slot (\`#default\`).
134
+
135
+ **When to use:**
136
+ - As the root container for a route or view.
137
+ - To provide a consistent title and action bar for a page.
138
+
139
+ **Usage Examples:**
140
+
141
+ - **Standard Page:**
142
+ \`<Page label="Home" description="Welcome back">
143
+ <DashboardWidgets />
144
+ </Page>\`
145
+
146
+ - **Page with Actions:**
147
+ \`<Page headline="Settings" label="Profile">
148
+ <template #trailing>
149
+ <button>Save Changes</button>
150
+ </template>
151
+ <ProfileForm />
152
+ </Page>\`
153
+ `
154
+ }
155
+ }
@@ -196,5 +196,44 @@ export const wikiDescriptionsProgress: StorybookComponentsDescriptionItem = {
196
196
  <StorybookDescriptions componentName={'Progress'} type={'delays'}/>
197
197
  <Canvas of={Component.ProgressDelays}/>
198
198
  `
199
+ },
200
+ ai: {
201
+ render: `
202
+ <div
203
+ :class="classDemo.item"
204
+ style="position: relative; width: 64px; height: 40px;"
205
+ >
206
+ <Progress v-bind="args"/>
207
+ </div>
208
+ `,
209
+ description: `
210
+ Progress is a component for indicating the status of a process.
211
+ It supports both linear and circular styles and can represent determinate (known percentage) or indeterminate (loading) states.
212
+
213
+ **Key Features:**
214
+ 1. **Type:**
215
+ - \`linear\`: A horizontal bar. Standard for page loading, file uploads, or headers.
216
+ - \`circular\`: A spinner ring. Standard for button actions, block loading, or overlays.
217
+
218
+ 2. **State:**
219
+ - **Determinate:** Set \`value\` (number) and optionally \`max\`. Used when the progress percentage is known.
220
+ - **Indeterminate:** Set \`indeterminate\` ('type1', 'type2', 'type3'). Used when the wait time is unknown.
221
+
222
+ 3. **Positioning (\`position\`):**
223
+ - \`static\` (default): Renders in the normal document flow.
224
+ - \`top\`: Absolutely positioned at the top of the parent container.
225
+ - \`bottom\`: Absolutely positioned at the bottom of the parent container.
226
+
227
+ 4. **Styling:**
228
+ - \`dense\`: Reduces the height/size of the indicator.
229
+ - \`inverse\`: Adjusts colors for dark backgrounds.
230
+ - \`point\`: Adds a pulsing dot at the end of the bar (linear only).
231
+
232
+ **Usage Examples:**
233
+
234
+ - **Linear Indeterminate (Page Load):** \`<Progress linear indeterminate="type1" position="top" visible />\`
235
+ - **Circular Determinate (Upload):** \`<Progress circular :value="45" visible />\`
236
+ - **Button Loading:** \`<Progress circular dense indeterminate="type2" visible />\` (inside a button)
237
+ `
199
238
  }
200
239
  }
@@ -3,16 +3,16 @@ import type { StorybookComponentsDescriptionItem } from '../../types/storybookTy
3
3
  export const wikiDescriptionsRipple: StorybookComponentsDescriptionItem = {
4
4
  name: 'Ripple',
5
5
  description: {
6
- en: 'Component for creating ripple wave effect on click interactions',
6
+ en: 'Component for creating a ripple wave effect on click interactions',
7
7
  ru: 'Компонент для создания эффекта волны при взаимодействии с элементом'
8
8
  },
9
9
  possibilities: {
10
10
  en: [
11
- 'creates ripple wave effect on click',
11
+ 'it creates a ripple wave effect on click',
12
12
  'automatic positioning based on click coordinates',
13
13
  'disabling effect with `disabled` property',
14
14
  'Material Design inspired animation',
15
- 'works with any interactive elements'
15
+ 'it works with any interactive elements'
16
16
  ],
17
17
  ru: [
18
18
  'создает эффект волны при клике',
@@ -33,5 +33,44 @@ export const wikiDescriptionsRipple: StorybookComponentsDescriptionItem = {
33
33
  body: `
34
34
  <StorybookDescriptions componentName={'Ripple'} type={'ripple'}/>
35
35
  `
36
+ },
37
+ ai: {
38
+ render: `
39
+ <div
40
+ :class="classDemo.item"
41
+ style="position: relative; width: 64px; height: 48px;"
42
+ >
43
+ <Ripple v-bind="args"/>
44
+ </div>
45
+ `,
46
+ description: `
47
+ **Note:** This is a low-level decorative component. You should not use it directly.
48
+ It is automatically integrated into interactive components like \`Button\`, \`ListItem\`,
49
+ and \`Card\` to provide feedback. This documentation is for informational purposes.
50
+
51
+ Ripple is a decorative component that adds a Material Design-style wave effect to provide
52
+ visual feedback on user interaction (clicks, taps). It should be placed inside an interactive container.
53
+
54
+ **Key Features:**
55
+ 1. **Placement:** It is designed to be placed as the last child inside a host element
56
+ (like a button, card, or list item). The host element MUST have \`position:
57
+ relative\` and \`overflow: hidden\` for the effect to work correctly.
58
+
59
+ 2. **Automatic Effect:** The ripple animation starts automatically from the point of a \`pointerdown\`
60
+ event (click or tap) on its parent container.
61
+
62
+ 3. **Self-Managing:** The component handles the creation, animation (expansion and fade-out),
63
+ and removal of ripple elements from the DOM automatically.
64
+
65
+ 4. **Styling:** The ripple's color is determined by the CSS \`color\` property of its host element
66
+ (\`currentColor\`). It can be styled by changing the text color of the parent.
67
+
68
+ 5. **Control:** The effect can be completely disabled by passing the \`disabled: true\` prop.
69
+
70
+ **When to Use:**
71
+ - Use inside buttons, cards, list items, or any other clickable surface to provide clear,
72
+ tangible feedback that the user's action was registered.
73
+ - It is purely a visual enhancement and adds no functionality on its own.
74
+ `
36
75
  }
37
76
  }
@@ -66,5 +66,53 @@ export const wikiDescriptionsScrollbar: StorybookComponentsDescriptionItem = {
66
66
  events: `
67
67
  <StorybookDescriptions componentName={'Scrollbar'} type={'emits'}/>
68
68
  `
69
+ },
70
+ ai: {
71
+ render: `
72
+ <div :class="classDemo.item">
73
+ <Scrollbar v-bind="args" style="height: 128px">
74
+ <h3>Modern Web Interfaces and User Experience Design</h3>
75
+ <p>In today's digital landscape, creating high-quality user interfaces has become a critical aspect of web application development. User interface components must not only be functional but also provide intuitive interaction patterns that enhance the overall user experience. The evolution of web technologies has enabled developers to create more sophisticated and engaging interfaces.</p>
76
+
77
+ <p>Scrollbars play a particularly important role in content navigation and information architecture. They allow users to easily navigate through large volumes of information while maintaining context and orientation within the document structure. Modern scrollbars should be adaptive, responsive, and visually appealing while providing consistent behavior across different platforms and devices.</p>
78
+
79
+ <h4>Principles of Effective Design Implementation</h4>
80
+ <p>Effective scrollbar design takes into account multiple factors ranging from performance optimization to accessibility compliance. It's essential to ensure smooth animations, proper handling of various input devices, and comprehensive keyboard navigation support. Cross-browser compatibility remains a top priority, especially when dealing with custom scrollbar implementations that need to work consistently across different rendering engines.</p>
81
+
82
+ <p>Users expect scrollbars to work predictably and uniformly throughout all parts of an application. This requires thorough testing and optimization for various usage scenarios, including mobile devices, desktop computers, and touch-enabled interfaces. The component must handle edge cases gracefully and provide appropriate feedback for user interactions.</p>
83
+ </Scrollbar>
84
+ </div>
85
+ `,
86
+ description: `
87
+ Scrollbar is a structural component that wraps content to provide custom scrolling behavior and visual indicators.
88
+ It is designed to handle overflow content within a fixed-height container, adding dynamic dividers (borders) that indicate scroll position.
89
+
90
+ **Key Features:**
91
+ 1. **Scroll Indicators (Dividers):**
92
+ - Automatically detects scroll position.
93
+ - Displays a top divider when scrolled down.
94
+ - Displays a bottom divider when there is more content below.
95
+ - Configurable via props (e.g., \`divider\`, \`border\`).
96
+
97
+ 2. **Layout:**
98
+ - Renders as a block container (default \`div\`).
99
+ - Must have a defined height or max-height (inherited or set) to enable scrolling.
100
+
101
+ 3. **Usage:**
102
+ - Essential for **Modals**, **Dropdowns**, and **Sidebars** where content length varies.
103
+ - Provides visual cues to users that more content is available.
104
+
105
+ **Usage Examples:**
106
+
107
+ - **Basic Scroll Area:**
108
+ \`<Scrollbar style="height: 200px">
109
+ <p>Long content...</p>
110
+ </Scrollbar>\`
111
+
112
+ - **With Custom Tag:**
113
+ \`<Scrollbar tag="section" class="my-scroll-area">
114
+ <List :list="items" />
115
+ </Scrollbar>\`
116
+ `
69
117
  }
70
118
  }
@@ -0,0 +1,152 @@
1
+ import type { StorybookComponentsDescriptionItem } from '../../types/storybookTypes'
2
+
3
+ /**
4
+ * Descriptions for Section component properties
5
+ *
6
+ * Описания свойств компонента Section
7
+ */
8
+ export const wikiDescriptionsSection: StorybookComponentsDescriptionItem = {
9
+ name: 'Section',
10
+ description: {
11
+ en: 'A semantic container component designed to group related content with support for headers, descriptions, and flexible layout options. It uses the <section> tag by default.',
12
+ ru: 'Семантический компонент-контейнер, предназначенный для группировки связанного контента с поддержкой заголовков, описаний и гибких настроек макета. По умолчанию использует тег <section>.'
13
+ },
14
+ possibilities: {
15
+ en: [
16
+ 'semantic grouping of content using <section> tag',
17
+ 'support for titles (h2 by default), labels, descriptions, and captions',
18
+ 'customizable layout and spacing',
19
+ 'support for icons',
20
+ 'flexible content organization'
21
+ ],
22
+ ru: [
23
+ 'семантическая группировка контента с использованием тега <section>',
24
+ 'поддержка заголовков (h2 по умолчанию), меток, описаний и подписей',
25
+ 'настраиваемый макет и отступы',
26
+ 'поддержка иконок',
27
+ 'гибкая организация контента'
28
+ ]
29
+ },
30
+ import: [],
31
+ render: `
32
+ <DesignComponent v-bind="args">
33
+ <p>
34
+ The Section component is a fundamental building block for structuring web pages.
35
+ It defaults to using the <code>&lt;section&gt;</code> HTML tag, making it semantically appropriate for grouping thematic content.
36
+ </p>
37
+ <p>
38
+ It provides a rich set of features for content presentation, including headlines, labels, descriptions, and icons.
39
+ The default tag for the headline is set to <code>&lt;h2&gt;</code>, which fits the typical document outline structure.
40
+ </p>
41
+ <p>
42
+ Use Section to divide your page into distinct thematic areas, improving both the visual structure and the accessibility of your application.
43
+ </p>
44
+ </DesignComponent>
45
+ `,
46
+ stories: [
47
+ {
48
+ id: 'SectionBasic',
49
+ name: {
50
+ en: 'Basic',
51
+ ru: 'Базовые'
52
+ },
53
+ template: `
54
+ <div class="wiki-storybook-flex-column">
55
+ <DesignComponent>
56
+ <p>Generic section content without header.</p>
57
+ </DesignComponent>
58
+ <DesignComponent label="Contact Information" description="Get in touch with us">
59
+ <p>Email: support@example.com</p>
60
+ <p>Phone: +1 234 567 890</p>
61
+ </DesignComponent>
62
+ <DesignComponent headline="Our Services" label="What we do">
63
+ <ul>
64
+ <li>Web Development</li>
65
+ <li>Mobile Apps</li>
66
+ <li>UI/UX Design</li>
67
+ </ul>
68
+ </DesignComponent>
69
+ </div>
70
+ `
71
+ },
72
+ {
73
+ id: 'SectionSlots',
74
+ name: {
75
+ en: 'Slots usage',
76
+ ru: 'Использование слотов'
77
+ },
78
+ template: `
79
+ <DesignComponent>
80
+ <template #default>Default slot</template>
81
+ <template #headline>Headline slot</template>
82
+ <template #label>Label slot</template>
83
+ <template #description>Description slot</template>
84
+ <template #caption>Caption slot</template>
85
+ <template #trailing>Trailing slot</template>
86
+ </DesignComponent>
87
+ `
88
+ }
89
+ ],
90
+ documentation: {
91
+ body: `
92
+ <StorybookDescriptions componentName={'Section'} type={'block'}/>
93
+ <Canvas of={Component.SectionBasic}/>
94
+ `,
95
+ slots: `
96
+ <Canvas of={Component.SectionSlots}/>
97
+ <StorybookDescriptions componentName={'Slot'} type={'default'}/>
98
+ <StorybookDescriptions componentName={'Slot'} type={'headline'}/>
99
+ <StorybookDescriptions componentName={'Slot'} type={'label'}/>
100
+ <StorybookDescriptions componentName={'Slot'} type={'description'}/>
101
+ <StorybookDescriptions componentName={'Slot'} type={'caption'}/>
102
+ <StorybookDescriptions componentName={'Slot'} type={'trailing'}/>
103
+ `,
104
+ expose: `
105
+ <StorybookDescriptions componentName={'Expose'} type={'labelId'}/>
106
+ <StorybookDescriptions componentName={'Expose'} type={'descriptionId'}/>
107
+ `
108
+ },
109
+ ai: {
110
+ render: `
111
+ <div :class="classDemo.item">
112
+ <Section v-bind="args">
113
+ Content of the section.
114
+ </Section>
115
+ </div>
116
+ `,
117
+ description: `
118
+ Section is a structural component used to divide a page into distinct thematic areas.
119
+ It is a semantic alias for the \`Block\` component, inheriting all its layout and styling capabilities.
120
+
121
+ **Key Features:**
122
+ 1. **Structure:**
123
+ - **Headline:** Top-level category text (\`headline\`).
124
+ - **Header:** Contains Icon, Label (Title), Caption, and Trailing actions.
125
+ - **Description:** Subtitle or explanatory text.
126
+ - **Content:** The main body of the section.
127
+
128
+ 2. **Usage:**
129
+ - Use \`Section\` to group related content within a Page.
130
+ - It provides a consistent header structure for page blocks.
131
+
132
+ 3. **Props & Slots:**
133
+ - Inherits all props from \`Block\` (\`label\`, \`icon\`, \`tag\`, etc.).
134
+ - Supports slots: \`#headline\`, \`#trailing\`, \`#default\`.
135
+
136
+ **Usage Examples:**
137
+
138
+ - **Standard Section:**
139
+ \`<Section headline="Account" label="Profile Settings">
140
+ <ProfileForm />
141
+ </Section>\`
142
+
143
+ - **Section with Actions:**
144
+ \`<Section label="Recent Activity">
145
+ <template #trailing>
146
+ <button>View All</button>
147
+ </template>
148
+ <ActivityList />
149
+ </Section>\`
150
+ `
151
+ }
152
+ }
@@ -205,5 +205,49 @@ export const wikiDescriptionsSelect: StorybookComponentsDescriptionItem = {
205
205
  <StorybookDescriptions componentName={'List'} type={'slot.html'}/>
206
206
  <StorybookDescriptions componentName={'Menu'} type={'slots'}/>
207
207
  `
208
+ },
209
+ ai: {
210
+ description: `
211
+ The select is a comprehensive form component used for choosing one or multiple values from a collection of options.
212
+ It integrates a trigger field, a dropdown menu, and value display logic into a single cohesive control.
213
+
214
+ **Key Features:**
215
+ 1. **Data Handling (\`option\`):**
216
+ - **Static Data:** Accepts an array of objects or strings via the \`option\` prop.
217
+ - **Mapping:** Use \`keyLabel\` and \`keyValue\` to specify which properties to use for display and value (defaults to 'label' and 'value').
218
+ - **Async Data:** Use the \`ajax\` prop to provide a function that returns a Promise with the list of options. Supports caching via \`cache\`.
219
+
220
+ 2. **Selection Modes:**
221
+ - **Single Selection:** Default. Displays the selected item's label as text.
222
+ - **Multiple Selection (\`multiple\`):** Allows selecting multiple items. Displays them as Chips. Use \`max\` to limit the number of selections.
223
+ - **Editable (\`editValue\`):** Allows the user to type into the input field, acting like a Combobox.
224
+
225
+ 3. **Search & Filtering:**
226
+ - **Filter Mode (\`filterMode\`):** Filters the list options in real-time as the user types.
227
+ - **Show Search (\`showSearch\`):** Adds a dedicated search input field inside the dropdown menu (useful for mobile or when \`editValue\` is false).
228
+
229
+ 4. **Appearance & Feedback:**
230
+ - **Field Integration:** Inherits all \`Field\` styling props (\`label\`, \`helperMessage\`, \`validationMessage\`, \`icon\`, \`loading\`).
231
+ - **Placeholder:** Text shown when no value is selected.
232
+ - **Cancel:** The \`cancel\` prop controls the visibility of the clear button ('auto', 'always', 'none').
233
+
234
+ **Usage Examples:**
235
+
236
+ - **Standard Select:**
237
+ \`<Select label="Choose a fruit" :option="['Apple', 'Banana', 'Orange']" />\`
238
+
239
+ - **Multiple Select with Object Data:**
240
+ \`<Select
241
+ label="Assignees"
242
+ multiple
243
+ :option="users"
244
+ key-label="name"
245
+ key-value="id"
246
+ v-model="selectedUserIds"
247
+ />\`
248
+
249
+ - **Searchable Select:**
250
+ \`<Select label="Country" :option="countries" filter-mode />\`
251
+ `
208
252
  }
209
253
  }
@@ -74,5 +74,34 @@ export const wikiDescriptionsSelectValue: StorybookComponentsDescriptionItem = {
74
74
  events: `
75
75
  <StorybookDescriptions componentName={'Event'} type={'click'}/>
76
76
  `
77
+ },
78
+ ai: {
79
+ description: `
80
+ SelectValue is a specialized display component used primarily within Select-like inputs to render the selected value(s).
81
+ It handles the visual representation of selection, switching between a simple text label (single selection) and a group of chips (multiple selection).
82
+
83
+ **Key Features:**
84
+ 1. **Display Modes:**
85
+ - **Single Selection (default):** Renders the label of the first item in the \`value\` array as text.
86
+ - **Multiple Selection (\`multiple\`):** Renders each item in the \`value\` array as a \`Chip\` component.
87
+
88
+ 2. **Data Handling (\`value\`):**
89
+ - Accepts an array of objects: \`[{ label: 'Text', value: 'val', ... }]\`.
90
+ - Even for single selection, it expects an array (uses the first item).
91
+ - If \`value\` is empty, it displays the \`placeholder\`.
92
+
93
+ 3. **Chip Customization (Multiple Mode):**
94
+ - \`chipAttrs\`: Allows passing props to the internal \`Chip\` components (e.g., \`{ outline: true, icon: 'check' }\`).
95
+ - Handles chip removal events automatically if not disabled/readonly.
96
+
97
+ **When to use:**
98
+ - Inside the trigger area of a **Select**, **Combobox**, or **Autocomplete** component.
99
+ - To display a list of selected tags or tokens.
100
+
101
+ **Usage Examples:**
102
+
103
+ - **Multiple Values (Chips):**
104
+ \`<SelectValue multiple :value="[{ label: 'Apple' }, { label: 'Banana' }]" />\`
105
+ `
77
106
  }
78
107
  }
@@ -10,7 +10,7 @@ export const wikiDescriptionsSkeleton: StorybookComponentsDescriptionItem = {
10
10
  en: [
11
11
  'animated loading placeholders for content',
12
12
  'control visibility with `active` property',
13
- 'child elements react to skeleton state via `isSkeleton` property or special classes',
13
+ 'child elements react to the skeleton state via `isSkeleton` property or special classes',
14
14
  'customizable appearance and animation'
15
15
  ],
16
16
  ru: [
@@ -129,5 +129,46 @@ export const wikiDescriptionsSkeleton: StorybookComponentsDescriptionItem = {
129
129
  expose: `
130
130
  <StorybookDescriptions componentName={'Skeleton'} type={'expose.isActive'}/>
131
131
  `
132
+ },
133
+ ai: {
134
+ description: `
135
+ Skeleton is a structural component used to display a loading state (placeholder) for content.
136
+ It creates an animated "ghost" version of the UI to improve perceived performance and prevent layout shifts (CLS).
137
+
138
+ **Key Features:**
139
+ 1. **Activation (\`active\`):**
140
+ - The \`active\` prop controls the visibility of the skeleton effect.
141
+ - When \`true\`, the component applies loading styles and accessibility attributes.
142
+
143
+ 2. **Context & Inheritance:**
144
+ - Uses Vue's \`provide\`/\`inject\` mechanism.
145
+ - Child components (like \`Image\`, \`Field\`, \`Chip\`) automatically detect if they are inside an active \`Skeleton\` and switch to their own skeleton view without needing individual props.
146
+
147
+ 3. **Styling Classes (Slot Props):**
148
+ - The component exposes CSS classes via the default slot to style raw HTML elements.
149
+ - **Text:** \`classText\` (lines), \`classTextVariant\` (headings).
150
+ - **Background:** \`classBackground\` (blocks, images), \`classBackgroundVariant\`.
151
+ - **Border:** \`classBorder\` (outlines).
152
+
153
+ 4. **Accessibility:**
154
+ - Automatically applies \`aria-busy="true"\` and \`aria-live="polite"\` to the wrapper.
155
+
156
+ **Usage Examples:**
157
+
158
+ - **Wrapping Smart Components:**
159
+ \`<Skeleton :active="isLoading">
160
+ <div class="profile">
161
+ <Image :value="user.avatar" /> <!-- Auto-skeleton -->
162
+ <Field :value="user.name" readonly /> <!-- Auto-skeleton -->
163
+ </div>
164
+ </Skeleton>\`
165
+
166
+ - **Manual Structure (using slot classes):**
167
+ \`<Skeleton :active="isLoading" v-slot="{ classes }">
168
+ <div :class="classes.classBackground" style="height: 200px"></div>
169
+ <h3 :class="classes.classTextVariant"></h3>
170
+ <p :class="classes.classText"></p>
171
+ </Skeleton>\`
172
+ `
132
173
  }
133
174
  }
@@ -46,5 +46,35 @@ export const wikiDescriptionsTextareaAutosize: StorybookComponentsDescriptionIte
46
46
  expose: `
47
47
  <StorybookDescriptions componentName={'Expose'} type={'value'}/>
48
48
  `
49
+ },
50
+ ai: {
51
+ description: `
52
+ **Note:** This is a subcomponent of \`Textarea\`. You should generally not use it directly.
53
+ It is automatically integrated into the \`Textarea\` component to provide auto-resizing capabilities.
54
+
55
+ TextareaAutosize is a functional component that renders a \`<textarea>\` element capable of automatically adjusting its height to fit the content.
56
+
57
+ **Key Features:**
58
+ 1. **Auto-Resizing Logic:**
59
+ - It renders a hidden "clone" element (a \`div\`) that mirrors the styles (font, padding, border, width) of the actual textarea.
60
+ - As text is entered, the content is copied to the clone, and the clone's height is measured.
61
+ - The textarea's height is then updated to match the clone's height, ensuring no scrollbars appear and the field grows/shrinks dynamically.
62
+
63
+ 2. **Input Attributes (\`inputAttrs\`):**
64
+ - Standard HTML attributes for the textarea (like \`placeholder\`, \`rows\`, \`disabled\`, \`readonly\`, \`style\`) should be passed via the \`inputAttrs\` prop.
65
+ - This ensures they are applied directly to the native \`<textarea>\` element.
66
+
67
+ 3. **Value Management:**
68
+ - It manages the input value and emits updates, allowing for reactive data binding.
69
+
70
+ **When to use:**
71
+ - This component is designed to be the internal engine for the \`Textarea\` component.
72
+ - Use \`Textarea\` instead for a complete form field with labels, validation, and styling.
73
+
74
+ **Usage Examples:**
75
+
76
+ - **Internal Usage:**
77
+ \`<TextareaAutosize :value="modelValue" :inputAttrs="{ rows: 1 }" />\`
78
+ `
49
79
  }
50
80
  }