@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
@@ -136,5 +136,38 @@ export const wikiDescriptionsBars: StorybookComponentsDescriptionItem = {
136
136
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
137
137
  <StorybookDescriptions componentName={'Slot'} type={'description'}/>
138
138
  `
139
+ },
140
+ ai: {
141
+ description: `
142
+ Bars is a structural component used as a header, toolbar, or action bar.
143
+ It typically sits at the top of a page, card, or window to provide context (title) and actions.
144
+
145
+ **Key Features:**
146
+ 1. **Content Structure:**
147
+ - \`label\`: The main title (e.g., page name).
148
+ - \`description\`: Subtitle or additional context.
149
+ - \`backButton\`: Configuration for the navigation button on the left (e.g., arrow back, menu).
150
+
151
+ 2. **Action Buttons (\`bars\`):**
152
+ - Accepts an array of button configurations (props for \`Button\` component).
153
+ - Rendered on the right side.
154
+ - Useful for primary page actions (Search, Filter, Settings).
155
+
156
+ 3. **Action Mode (Contextual State):**
157
+ - Activated via \`action\` prop (boolean).
158
+ - Switches the UI to a specific state (e.g., when items are selected in a list).
159
+ - **Overrides:**
160
+ - \`label\` -> \`actionLabel\`
161
+ - \`description\` -> \`actionDescription\`
162
+ - \`bars\` -> \`actionBars\`
163
+ - The back button usually transforms into a "Close" or "Cancel" action in this mode.
164
+
165
+ **Usage Examples:**
166
+
167
+ - **Standard Header:** \`<Bars label="Dashboard" :bars="[{ icon: 'notifications' }]" />\`
168
+ - **With Back Button:** \`<Bars label="Settings" :back-button="{ icon: 'arrow_back' }" />\`
169
+ - **Contextual Action Bar:**
170
+ \`<Bars :action="selectedCount > 0" :action-label="\`\${selectedCount} selected\`" :action-bars="[{ icon: 'delete' }]" />\`
171
+ `
139
172
  }
140
173
  }
@@ -50,11 +50,19 @@ export const wikiDescriptionsBlock: StorybookComponentsDescriptionItem = {
50
50
  ru: 'Базовые'
51
51
  },
52
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>
53
+ <div class="wiki-storybook-flex-column">
54
+ <DesignComponent>
55
+ Simple content wrapper
56
+ </DesignComponent>
57
+ <DesignComponent label="User Profile" description="Manage your personal information">
58
+ <button class="wiki-storybook-button">Edit Profile</button>
59
+ </DesignComponent>
60
+ <DesignComponent headline="Notifications" label="Settings">
61
+ <label><input type="checkbox" checked> Email Notifications</label>
62
+ </DesignComponent>
63
+ <DesignComponent icon="home" label="Dashboard">
64
+ <p>Welcome to your dashboard overview.</p>
65
+ </DesignComponent>
58
66
  </div>
59
67
  `
60
68
  },
@@ -79,6 +87,7 @@ export const wikiDescriptionsBlock: StorybookComponentsDescriptionItem = {
79
87
  documentation: {
80
88
  body: `
81
89
  <StorybookDescriptions componentName={'Block'} type={'block'}/>
90
+ <Canvas of={Component.BlockBasic}/>
82
91
  `,
83
92
  slots: `
84
93
  <Canvas of={Component.BlockSlots}/>
@@ -93,5 +102,58 @@ export const wikiDescriptionsBlock: StorybookComponentsDescriptionItem = {
93
102
  <StorybookDescriptions componentName={'Expose'} type={'labelId'}/>
94
103
  <StorybookDescriptions componentName={'Expose'} type={'descriptionId'}/>
95
104
  `
105
+ },
106
+ ai: {
107
+ render: `
108
+ <div :class="classDemo.item">
109
+ <Block v-bind="args">
110
+ Main content goes here.
111
+ </Block>
112
+ </div>
113
+ `,
114
+ description: `
115
+ Block is a versatile structural component used to organize content with a standardized layout.
116
+ It acts as a container that automatically arranges headers, labels, descriptions, icons, and body content.
117
+
118
+ **Key Features:**
119
+ 1. **Layout Structure:**
120
+ - **Headline:** Top-most text area (prop \`headline\` or slot \`#headline\`).
121
+ - **Header Area:** Contains the icon, label, caption, and trailing actions.
122
+ - **Description:** Text block below the header.
123
+ - **Content:** The \`#default\` slot allows placing custom content inside the block.
124
+
125
+ 2. **Content Props:**
126
+ - \`label\`: Main title.
127
+ - \`caption\`: Auxiliary text next to or below the label.
128
+ - \`description\`: Detailed text description.
129
+ - \`icon\`: Visual indicator (icon name).
130
+ - \`headline\`: Section heading above the main header.
131
+
132
+ 3. **Customization:**
133
+ - \`tag\`: Changes the root HTML element (e.g., \`section\`, \`article\`, \`div\`).
134
+ - \`#trailing\`: Slot for actions or content on the right side of the header.
135
+
136
+ **When to use:**
137
+ - **Cards:** To structure the header and content of a card.
138
+ - **List Items:** For complex list items with icons and text.
139
+ - **Sections:** To define titled sections within a page or modal.
140
+
141
+ **Usage Examples:**
142
+
143
+ - **Simple Card Header:**
144
+ \`<Block label="Card Title" description="Subtitle text" icon="info" />\`
145
+
146
+ - **Section with Content:**
147
+ \`<Block headline="Section 1" label="Details">
148
+ <p>Custom content...</p>
149
+ </Block>\`
150
+
151
+ - **List Item with Action:**
152
+ \`<Block label="Item Name" caption="Status: Active">
153
+ <template #trailing>
154
+ <button>Edit</button>
155
+ </template>
156
+ </Block>\`
157
+ `
96
158
  }
97
159
  }
@@ -189,5 +189,37 @@ export const wikiDescriptionsButton: StorybookComponentsDescriptionItem = {
189
189
  slots: `
190
190
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
191
191
  `
192
+ },
193
+ ai: {
194
+ description: `
195
+ Button is a fundamental interactive component used for user actions, navigation, and submitting forms.
196
+ It supports various visual styles, states, and content configurations.
197
+
198
+ **Key Features:**
199
+ 1. **Content:**
200
+ - \`label\`: The text displayed inside the button.
201
+ - \`icon\`: Name of the icon to display *before* the label (Material Symbols).
202
+ - \`iconTrailing\`: Name of the icon to display *after* the label.
203
+
204
+ 2. **States:**
205
+ - \`disabled\`: Prevents user interaction and visually grays out the button.
206
+ - \`selected\`: Indicates an active or toggled state.
207
+ - \`loading\`: Replaces content or adds a spinner to indicate processing.
208
+
209
+ 3. **Navigation:**
210
+ - \`to\`: Vue Router path. Renders as an \`<a>\` tag or uses router push.
211
+ - \`href\`: External URL. Renders as an \`<a>\` tag.
212
+
213
+ 4. **Sizing & Layout:**
214
+ - \`adaptive\`: Makes the button fill the container width or adapt to specific breakpoints.
215
+
216
+ **Usage Examples:**
217
+
218
+ - **Main Action:** \`<Button label="Confirm" primary icon="check" />\`
219
+ - **Secondary Action:** \`<Button label="Cancel" secondary />\`
220
+ - **Navigation:** \`<Button label="Read More" to="/details" text iconTrailing="arrow_forward" />\`
221
+ - **Icon Only:** \`<Button icon="menu" text />\` (Ensure aria-label is provided for accessibility)
222
+ - **Loading:** \`<Button label="Saving..." primary loading />\`
223
+ `
192
224
  }
193
225
  }
@@ -110,5 +110,29 @@ export const wikiDescriptionsCell: StorybookComponentsDescriptionItem = {
110
110
  <StorybookDescriptions componentName={'Slot'} type={'description'}/>
111
111
  <StorybookDescriptions componentName={'Cell'} type={'slots'}/>
112
112
  `
113
+ },
114
+ ai: {
115
+ description: `
116
+ Cell is a universal list item component used for building menus, settings panels, and data lists.
117
+ It provides a structured layout with slots for icons, text content, and actions.
118
+
119
+ **Structure:**
120
+ 1. **Icon (Left):** Defined by \`icon\` prop.
121
+ 2. **Context (Center):**
122
+ - **Label:** Main text/title (prop \`label\`).
123
+ - **Caption:** Small text above/below the label (prop \`caption\`).
124
+ - **Description:** Secondary text below the label (prop \`description\`).
125
+ 3. **Trailing (Right):** Slot \`#trailing\` for actions (switch, checkbox, button) or meta-info.
126
+ 4. **Body:** Slot \`#body\` for additional content below the main row.
127
+
128
+ **Key Features:**
129
+ - **Interactive:** Supports \`to\`, \`href\`, and click events with Ripple effect.
130
+ - **States:** Handles \`disabled\`, \`selected\`, and \`loading\` (skeleton) states.
131
+
132
+ **When to use:**
133
+ - **List Items:** For navigation menus or settings.
134
+ - **Data Rows:** To display structured data entities.
135
+ - **Action Items:** Clickable rows with icons and text.
136
+ `
113
137
  }
114
138
  }
@@ -217,5 +217,47 @@ export const wikiDescriptionsChip: StorybookComponentsDescriptionItem = {
217
217
  slots: `
218
218
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
219
219
  `
220
+ },
221
+ ai: {
222
+ description: `
223
+ Chip is a compact interactive element used for inputs, attributes, or actions.
224
+ It allows users to enter information, make selections, filter content, or trigger actions.
225
+
226
+ **Key Features:**
227
+ 1. **Variants:**
228
+ - **Action (Default):** Triggers an action or displays a read-only tag.
229
+ - **Input (\`input\`):** Represents a complex piece of information, such as an entity (person, place, or thing) or text, often used in input fields.
230
+ - **Assistive (\`assistive\`):** Provides suggestions or smart replies to the user.
231
+ - **Filter (via \`selected\`):** Allows users to select multiple options from a set.
232
+
233
+ 2. **Content & Styling:**
234
+ - **Label:** Main text content (prop \`label\` or default slot).
235
+ - **Icon:** Leading icon (prop \`icon\`).
236
+ - **State:** Supports \`selected\` (active/checked) and \`disabled\` states.
237
+
238
+ 3. **Interaction:**
239
+ - Emits \`click\` events with \`value\` and \`detail\` data.
240
+ - Can be used as a toggle button.
241
+
242
+ **When to use:**
243
+ - **Filters:** To allow users to refine search results.
244
+ - **Choice:** To select one or multiple options (like radio buttons or checkboxes but more compact).
245
+ - **Action:** To trigger immediate actions (e.g., "Play", "Save").
246
+ - **Input:** To display tags or contacts in a form.
247
+
248
+ **Usage Examples:**
249
+
250
+ - **Basic Action:**
251
+ \`<Chip icon="settings">Settings</Chip>\`
252
+
253
+ - **Filter Chip (Selected):**
254
+ \`<Chip icon="check" selected>Completed</Chip>\`
255
+
256
+ - **Input Tag:**
257
+ \`<Chip input>Vue.js</Chip>\`
258
+
259
+ - **Assistive Suggestion:**
260
+ \`<Chip assistive icon="lightbulb">Did you mean...?</Chip>\`
261
+ `
220
262
  }
221
263
  }
@@ -8,25 +8,23 @@ import type { StorybookComponentsDescriptionItem } from '../../types/storybookTy
8
8
  export const wikiDescriptionsChipGroup: StorybookComponentsDescriptionItem = {
9
9
  name: 'ChipGroup',
10
10
  description: {
11
- en: 'Container for managing a collection of chips with selection functionality',
12
- ru: 'Контейнер для управления коллекцией чипов с функциональностью выбора'
11
+ en: 'Component for managing a group of interactive chips with support for selection and data binding',
12
+ ru: 'Компонент для управления группой интерактивных чипов с поддержкой выбора и привязки данных'
13
13
  },
14
14
  possibilities: {
15
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'
16
+ 'rendering a list of chips from a data array',
17
+ 'managing selection state (single or multiple)',
18
+ 'customizing the appearance of all chips in the group via chipAttrs',
19
+ 'handling click events and value updates',
20
+ 'controlling icon visibility based on selection'
22
21
  ],
23
22
  ru: [
24
- 'одиночный или множественный выбор чипов',
25
- 'динамический рендеринг списка из данных',
26
- 'настраиваемый внешний вид чипов через chipAttrs',
27
- 'условное отображение иконок в зависимости от состояния выбора',
28
- 'гибкое связывание данных через keyLabel и keyValue',
29
- 'обработка событий для взаимодействия пользователя'
23
+ 'рендеринг списка чипов из массива данных',
24
+ 'управление состоянием выбора (одиночный или множественный)',
25
+ 'настройка внешнего вида всех чипов в группе через chipAttrs',
26
+ 'обработка событий клика и обновлений значений',
27
+ 'управление видимостью иконки в зависимости от выбора'
30
28
  ]
31
29
  },
32
30
  import: [
@@ -164,5 +162,38 @@ export const wikiDescriptionsChipGroup: StorybookComponentsDescriptionItem = {
164
162
  slots: `
165
163
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
166
164
  `
165
+ },
166
+ ai: {
167
+ description: `
168
+ ChipGroup is a wrapper component that manages a collection of Chip elements based on a data list.
169
+ It streamlines the creation of filter sets, choice groups, and tag lists by handling data iteration and selection logic.
170
+
171
+ **Key Features:**
172
+ 1. **Data Binding:**
173
+ - \`list\`: Array of objects defining the chips (e.g., \`[{ label: 'A', value: 'a' }]\`).
174
+ - \`v-model:selected\`: Tracks the selected value(s).
175
+
176
+ 2. **Selection Modes:**
177
+ - Supports single and multiple selection (depending on configuration, typically inferred from the initial value type or explicit props).
178
+
179
+ 3. **Styling & Customization:**
180
+ - \`chipAttrs\`: Object containing props to be passed to every child Chip (e.g., \`{ outline: true, icon: 'check' }\`).
181
+ - \`iconWhenSelected\`: If true, displays the icon only when the chip is selected.
182
+
183
+ **Usage Examples:**
184
+
185
+ - **Basic Selection:**
186
+ \`<ChipGroup
187
+ :list="items"
188
+ v-model:selected="selectedItem"
189
+ />\`
190
+
191
+ - **Filter Group (Multiple):**
192
+ \`<ChipGroup
193
+ :list="filters"
194
+ v-model:selected="activeFilters"
195
+ :chip-attrs="{ outline: true }"
196
+ />\`
197
+ `
167
198
  }
168
199
  }
@@ -178,5 +178,49 @@ export const wikiDescriptionsDialog: StorybookComponentsDescriptionItem = {
178
178
  <StorybookDescriptions componentName={'Slot'} type={'description'}/>
179
179
  <StorybookDescriptions componentName={'Window'} type={'slots'}/>
180
180
  `
181
+ },
182
+ ai: {
183
+ render: `
184
+ <div :class="classDemo.item">
185
+ <Dialog embedded open label="Dialog Title" description="This is a description text." v-bind="args"/>
186
+ </div>
187
+ `,
188
+ description: `
189
+ Dialog is a specialized modal component designed for standard user interactions such as alerts, confirmations, and status messages.
190
+ It extends the functionality of the Modal component by providing a pre-defined layout for icons, titles, descriptions, and action buttons.
191
+
192
+ **Note:** The \`embedded\` prop is used only for documentation examples to render the component inline. Do not use it in production code.
193
+
194
+ **Key Features:**
195
+ 1. **Standardized Layout:**
196
+ - Automatically arranges elements: Icon -> Title (\`label\`) -> Description (\`description\`) -> Content (\`default\`) -> Actions (\`footer\`).
197
+ - Supports positioning the image/icon via \`imagePosition\` (e.g., top or left).
198
+
199
+ 2. **State Presets:**
200
+ - **Success:** Setting the \`success\` prop automatically displays a success icon and applies relevant styling.
201
+ - **Error:** Setting the \`error\` prop automatically displays an error icon and applies relevant styling.
202
+ - **Custom:** You can provide a custom icon via the \`icon\` prop.
203
+
204
+ 3. **Content Props:**
205
+ - \`label\`: The main heading or title of the dialog.
206
+ - \`description\`: Subtitle or explanatory text.
207
+ - \`open\`: Controls visibility (v-model).
208
+
209
+ 4. **Slots:**
210
+ - \`#control\`: Trigger element.
211
+ - \`#default\`: Custom content area.
212
+ - \`#footer\`: Area for action buttons (Cancel, OK).
213
+
214
+ **Usage Examples:**
215
+
216
+ - **Simple Confirmation:**
217
+ \`<Dialog v-model:open="isOpen" label="Confirm Action" description="Are you sure you want to proceed?" />\`
218
+
219
+ - **Success Alert:**
220
+ \`<Dialog success label="Operation Successful" description="Your data has been saved." />\`
221
+
222
+ - **Error Alert:**
223
+ \`<Dialog error label="Error" description="Failed to connect to the server." />\`
224
+ `
181
225
  }
182
226
  }
@@ -34,8 +34,8 @@ export const wikiDescriptionsField: StorybookComponentsDescriptionItem = {
34
34
  import: [],
35
35
  render: `
36
36
  <DesignComponent v-bind="args">
37
- <template v-slot:default="{id, className}">
38
- <input :value="args.value" :id="id" :class="className" readonly/>
37
+ <template v-slot:default="{binds}">
38
+ <input :value="args.value" readonly v-bind="binds"/>
39
39
  </template>
40
40
  </DesignComponent>
41
41
  `,
@@ -234,5 +234,58 @@ export const wikiDescriptionsField: StorybookComponentsDescriptionItem = {
234
234
  <StorybookDescriptions componentName={'Slot'} type={'trailing'} />
235
235
  <StorybookDescriptions componentName={'Field'} type={'slots'} />
236
236
  `
237
+ },
238
+ ai: {
239
+ render: `
240
+ <div :class="classDemo.item">
241
+ <Field label="Field Label" helper-message="Helper text" v-bind="args">
242
+ <template v-slot:default="{binds}">
243
+ <input :value="args.value" readonly v-bind="binds as any"/>
244
+ </template>
245
+ </Field>
246
+ </div>
247
+ `,
248
+ description: `
249
+ Field is the foundational wrapper component for all form inputs.
250
+ It provides the structural layout, styling, and state management for labels, messages, icons, and the input container.
251
+
252
+ **Key Features:**
253
+ 1. **Layout Structure:**
254
+ - **Label:** Displays the field label (\`label\`).
255
+ - **Body:** The main container for the input.
256
+ - **Prefix/Suffix:** Content before/after the input (\`prefix\`, \`suffix\`).
257
+ - **Icons:** Leading (\`icon\`) and trailing (\`iconTrailing\`) icons.
258
+ - **Input Slot:** The \`#default\` slot for the actual form control (input, select, etc.).
259
+ - **Footer:** Displays helper text (\`helperMessage\`), validation errors (\`validationMessage\`), and character counter.
260
+
261
+ 2. **Input Integration:**
262
+ - The \`#default\` slot exposes \`binds\` (id, class, aria-attributes).
263
+ - These \`binds\` **must** be applied to the native \`<input>\` or the focusable element within the slot to ensure proper styling and accessibility.
264
+
265
+ 3. **States & Validation:**
266
+ - **Loading:** \`loading\` prop shows a progress bar.
267
+ - **Validation:** \`validationMessage\` turns the field red and displays the error.
268
+ - **Disabled/Readonly:** \`disabled\`, \`readonly\` props style the wrapper accordingly.
269
+
270
+ **When to use:**
271
+ - When creating a custom form component (e.g., DatePicker, ColorPicker) that needs to match the design system's input style.
272
+ - Do not use for standard text inputs; use \`Input\` instead.
273
+
274
+ **Usage Examples:**
275
+
276
+ - **Custom Input Wrapper:**
277
+ \`<Field label="Username" icon="person">
278
+ <template #default="{ binds }">
279
+ <input v-bind="binds" type="text" />
280
+ </template>
281
+ </Field>\`
282
+
283
+ - **With Validation:**
284
+ \`<Field label="Email" validation-message="Invalid email">
285
+ <template #default="{ binds }">
286
+ <input v-bind="binds" type="email" />
287
+ </template>
288
+ </Field>\`
289
+ `
237
290
  }
238
291
  }
@@ -63,5 +63,37 @@ export const wikiDescriptionsFieldCounter: StorybookComponentsDescriptionItem =
63
63
  <StorybookDescriptions componentName={'FieldCounter'} type={'templates'}/>
64
64
  <Canvas of={Component.FieldCounterTemplate}/>
65
65
  `
66
+ },
67
+ ai: {
68
+ description: `
69
+ **Note:** This is a subcomponent of \`Field\`. You should generally not use it directly.
70
+ It is automatically integrated into components like \`Input\` and \`Textarea\`.
71
+
72
+ FieldCounter is a utility component designed to display character counts and limits for input fields.
73
+ It provides visual feedback to users about the length of their input and includes accessibility features for screen readers.
74
+
75
+ **Key Features:**
76
+ 1. **Display Logic:**
77
+ - **Counter Only:** If \`maxlength\` is not set, displays the current count (e.g., "10").
78
+ - **With Limit:** If \`maxlength\` is set, displays "current / max" (e.g., "10 / 100").
79
+ - **Template:** The \`template\` prop allows custom formatting using placeholders \`[c]\` (counter) and \`[m]\` (max).
80
+
81
+ 2. **Accessibility:**
82
+ - Automatically manages ARIA live regions to announce status to screen readers.
83
+ - \`maxlengthOnce\`: Determines when to start announcing remaining characters (default is 10% of max).
84
+ - Provides specific messages for "remaining characters" and "limit exceeded".
85
+
86
+ 3. **Integration:**
87
+ - Typically used within \`Input\`, \`Textarea\`, or custom form wrappers.
88
+ - Accepts \`counter\` (current length) and \`maxlength\` (limit) as numbers or strings.
89
+
90
+ **Usage Examples:**
91
+
92
+ - **Standard Limit:**
93
+ \`<FieldCounter :counter="currentLength" :maxlength="50" />\`
94
+
95
+ - **Custom Format:**
96
+ \`<FieldCounter :counter="5" :maxlength="10" template="[c] of [m] chars" />\`
97
+ `
66
98
  }
67
99
  }
@@ -34,5 +34,27 @@ export const wikiDescriptionsFieldLabel: StorybookComponentsDescriptionItem = {
34
34
  slots: `
35
35
  <StorybookDescriptions componentName={'Slot'} type={'label'} />
36
36
  `
37
+ },
38
+ ai: {
39
+ description: `
40
+ **Note:** This is a subcomponent of \`Field\`. You should generally not use it directly.
41
+ It is automatically integrated into components like \`Input\` and \`Textarea\`.
42
+
43
+ FieldLabel is a component responsible for rendering the label of a form field.
44
+ It ensures consistent styling, positioning, and accessibility for field labels.
45
+
46
+ **Key Features:**
47
+ 1. **Label Text:**
48
+ - Displays the text provided in the \`label\` prop.
49
+ - Can be customized via the \`#label\` slot.
50
+
51
+ 2. **Required Indicator:**
52
+ - If the \`required\` prop is true, it visually indicates that the field is mandatory (usually with an asterisk).
53
+
54
+ **Usage Examples:**
55
+
56
+ - **Standard Label:**
57
+ \`<FieldLabel label="Username" />\`
58
+ `
37
59
  }
38
60
  }
@@ -59,5 +59,30 @@ export const wikiDescriptionsFieldMessage: StorybookComponentsDescriptionItem =
59
59
  <Canvas of={Component.FieldMessageSlots}/>
60
60
  <StorybookDescriptions componentName={'FieldMessage'} type={'slots'}/>
61
61
  `
62
+ },
63
+ ai: {
64
+ description: `
65
+ **Note:** This component is part of the \`Field\` component and should not be used directly.
66
+
67
+ FieldMessage is a component used to display informational text below form input fields.
68
+ It can show helper text, validation errors, and a character counter.
69
+
70
+ **When to use:**
71
+ 1. **Helper Text:** When a form field needs a hint or an explanation. This is controlled by the \`helperMessage\` prop.
72
+ 2. **Validation Error:** When a form field has an invalid value. This is controlled by the \`validationMessage\` prop. The component will automatically style itself to indicate an error (usually by changing the text color to red). The validation message has priority over the helper message.
73
+ 3. **Character Counter:** When you need to show the user how many characters they have typed, typically in relation to a \`maxlength\`. This is enabled with the \`counter: true\` prop.
74
+
75
+ **Key Features:**
76
+ - **Priority:** \`validationMessage\` is always shown if present. \`helperMessage\` is shown only if there is no validation message.
77
+ - **Styling:** Automatically applies error styling when a \`validationMessage\` is provided.
78
+ - **Counter:** Integrates a character counter that works with the \`maxlength\` prop.
79
+ - **Accessibility:** It's designed to be linked with an input field via ARIA attributes, which is handled automatically when used within components like TextField.
80
+
81
+ **How to identify in a design:**
82
+ - Look for small text directly beneath an input, textarea, or select.
83
+ - If the text is red or has an error-like appearance, it corresponds to the \`validationMessage\` prop.
84
+ - If the text is a neutral color, it corresponds to the \`helperMessage\` prop.
85
+ - If you see a "current/max" number format (e.g., "12/100"), this is the character counter, enabled by the \`counter\` prop.
86
+ `
62
87
  }
63
88
  }
@@ -3,19 +3,23 @@ import type { StorybookComponentsDescriptionItem } from '../../types/storybookTy
3
3
  export const wikiDescriptionsIcon: StorybookComponentsDescriptionItem = {
4
4
  name: 'Icon',
5
5
  description: {
6
- en: 'Component for displaying icons',
7
- ru: 'Компонент для отображения иконок'
6
+ en: 'A component for displaying vector icons with support for state management, automatic directionality adaptation, and design system styling.',
7
+ ru: 'Компонент для отображения векторных иконок с поддержкой управления состоянием, автоматической адаптацией направления и стилизацией дизайн-системы.'
8
8
  },
9
9
  possibilities: {
10
10
  en: [
11
- 'displaying icons by name',
12
- 'switching icons on active state',
13
- 'animation support'
11
+ 'rendering icons by identifier',
12
+ 'toggling between two icons based on the active state',
13
+ 'automatic mirroring for RTL languages',
14
+ 'integration with the color palette and inverse mode',
15
+ 'displaying a skeleton loader placeholder'
14
16
  ],
15
17
  ru: [
16
- 'отображение иконок по имени',
17
- 'переключение иконок в активном состоянии',
18
- 'поддержка анимации'
18
+ 'рендеринг иконок по идентификатору',
19
+ 'переключение между двумя иконками в зависимости от активного состояния',
20
+ 'автоматическое зеркалирование для RTL языков',
21
+ 'интеграция с цветовой палитрой и инверсный режим',
22
+ 'отображение заполнителя (скелетона) при загрузке'
19
23
  ]
20
24
  },
21
25
  import: [],
@@ -136,5 +140,39 @@ export const wikiDescriptionsIcon: StorybookComponentsDescriptionItem = {
136
140
  slots: `
137
141
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
138
142
  `
143
+ },
144
+ ai: {
145
+ description: `
146
+ Icon is a component for displaying vector icons, typically from the Material Symbols library.
147
+ It supports state switching (active/inactive), directionality (RTL), and integration with the design system's palette.
148
+
149
+ **Key Features:**
150
+ 1. **Icon Source:**
151
+ - \`icon\`: The name of the icon to display (e.g., "home", "menu", "arrow_forward").
152
+ Uses the project's icon set (usually Material Symbols).
153
+
154
+ 2. **Interactive States:**
155
+ - \`active\`: Boolean flag to toggle the active state.
156
+ - \`iconActive\`: The icon name to show when \`active\` is \`true\`.
157
+ Ideal for toggle buttons (e.g., "favorite_border" vs "favorite").
158
+
159
+ 3. **Styling:**
160
+ - \`size\`: Controls the dimensions of the icon (e.g., "sm", "md", "lg").
161
+ - \`asPalette\`: Applies the active palette color to the icon.
162
+ - \`inverse\`: Inverts the colors, useful for dark backgrounds or contrast.
163
+
164
+ 4. **Directionality (\`dir\`):**
165
+ - Automatically mirrors the icon for RTL (Right-to-Left) languages if the icon is directional (like arrows).
166
+
167
+ 5. **Loading:**
168
+ - \`isSkeleton\`: Renders a loading placeholder (skeleton) instead of the icon.
169
+
170
+ **Usage Examples:**
171
+
172
+ - **Simple Icon:** \`<Icon icon="search" />\`
173
+ - **Toggle Icon:** \`<Icon icon="visibility_off" iconActive="visibility" :active="isVisible" />\`
174
+ - **Directional Arrow:** \`<Icon icon="arrow_forward" dir />\`
175
+ - **Large Palette Icon:** \`<Icon icon="star" size="xl" asPalette />\`
176
+ `
139
177
  }
140
178
  }