@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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/wiki",
3
3
  "private": false,
4
- "version": "0.25.1",
4
+ "version": "0.39.1",
5
5
  "type": "module",
6
6
  "description": "Wiki documentation and storybook utilities for DXT UI design system",
7
7
  "keywords": [
@@ -43,7 +43,7 @@
43
43
  "./package.json": "./package.json"
44
44
  },
45
45
  "engines": {
46
- "node": ">=18.0.0"
46
+ "node": ">=20.0.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@dxtmisha/functional": "*",
@@ -1,12 +1,14 @@
1
- import { Geo, isObjectNotArray, toCamelCase } from '@dxtmisha/functional'
1
+ import { forEach, Geo, isObjectNotArray, toCamelCase } from '@dxtmisha/functional'
2
2
 
3
3
  import { WikiStorybookItem } from './WikiStorybookItem'
4
+ import { WikiStorybookProp } from './WikiStorybookProp'
4
5
 
5
6
  import {
6
7
  type StorybookArgs,
7
8
  type StorybookArgsToDescription,
8
9
  type StorybookArgsToItem,
9
10
  type StorybookArgsToList,
11
+ type StorybookArgsToPossibilities,
10
12
  type StorybookComponentsDescription,
11
13
  type StorybookComponentsDescriptionItem,
12
14
  type StorybookComponentsDescriptionStory,
@@ -63,6 +65,23 @@ export class WikiStorybook {
63
65
  return this.initPropsWiki()
64
66
  }
65
67
 
68
+ /**
69
+ * Returns the wiki object for the component
70
+ *
71
+ * Возвращает объект wiki для компонента
72
+ * @return The wiki object for the component/ объект wiki для компонента
73
+ */
74
+ getWikiObject(): WikiStorybookProp[] {
75
+ return forEach(
76
+ this.getWiki(),
77
+ (item, name) => {
78
+ if (item) {
79
+ return new WikiStorybookProp(name, item)
80
+ }
81
+ }
82
+ ) as WikiStorybookProp[]
83
+ }
84
+
66
85
  /**
67
86
  * Returns the description of the component from the wiki
68
87
  *
@@ -73,6 +92,16 @@ export class WikiStorybook {
73
92
  return this.toDescriptionText(this.getDescriptionItem()?.description)
74
93
  }
75
94
 
95
+ /**
96
+ * Returns the possibilities of the component from the wiki
97
+ *
98
+ * Возвращает возможности компонента из wiki
99
+ * @return A list of possibilities for the component/ список возможностей для компонента
100
+ */
101
+ getPossibilities(): string[] {
102
+ return this.toPossibilitiesText(this.getDescriptionItem()?.possibilities)
103
+ }
104
+
76
105
  /**
77
106
  * Returns the values of the wiki items
78
107
  *
@@ -89,6 +118,28 @@ export class WikiStorybook {
89
118
  return values
90
119
  }
91
120
 
121
+ /**
122
+ * Returns the filtered values of the wiki items
123
+ *
124
+ * Возвращает отфильтрованные значения элементов wiki
125
+ * @return A list of objects containing the filtered values of the wiki items/
126
+ * список объектов, содержащих отфильтрованные значения элементов wiki
127
+ */
128
+ getFilteredValues(): Record<string, any> {
129
+ const values: Record<string, any> = {}
130
+
131
+ forEach(
132
+ this.getValues(),
133
+ (value, key) => {
134
+ if (value !== undefined) {
135
+ values[key] = value
136
+ }
137
+ }
138
+ )
139
+
140
+ return values
141
+ }
142
+
92
143
  /**
93
144
  * Returns a Storybook item by its ID
94
145
  *
@@ -120,6 +171,24 @@ export class WikiStorybook {
120
171
  )
121
172
  }
122
173
 
174
+ /**
175
+ * Returns the AI render of the component
176
+ *
177
+ * Возвращает AI рендер компонента
178
+ */
179
+ getAiRender(): string | undefined {
180
+ return this.getDescriptionItem()?.ai?.render
181
+ }
182
+
183
+ /**
184
+ * Returns the AI description of the component
185
+ *
186
+ * Возвращает AI описание компонента
187
+ */
188
+ getAiDescription(): string | undefined {
189
+ return this.getDescriptionItem()?.ai?.description
190
+ }
191
+
123
192
  /**
124
193
  * Returns a wiki item by its name
125
194
  *
@@ -196,6 +265,28 @@ export class WikiStorybook {
196
265
  return ''
197
266
  }
198
267
 
268
+ /**
269
+ * Converts the possibilities to text format
270
+ *
271
+ * Преобразует возможности в текстовый формат
272
+ * @param possibilities - The possibilities to convert/ возможности для преобразования
273
+ */
274
+ private toPossibilitiesText(possibilities?: StorybookArgsToPossibilities): string[] {
275
+ if (possibilities) {
276
+ const language = Geo.getLanguage()
277
+
278
+ if (isObjectNotArray(possibilities)) {
279
+ return possibilities?.[language]
280
+ ?? Object.values(possibilities)?.[0]
281
+ ?? []
282
+ }
283
+
284
+ return possibilities
285
+ }
286
+
287
+ return []
288
+ }
289
+
199
290
  /**
200
291
  * Initializes the list of wiki items for the component
201
292
  *
@@ -26,6 +26,15 @@ export class WikiStorybookItem {
26
26
  ) {
27
27
  }
28
28
 
29
+ /**
30
+ * Checks if the item is a demo item.
31
+ *
32
+ * Проверяет, является ли элемент демонстрационным.
33
+ */
34
+ isDemo(): boolean {
35
+ return this.item.isDemo === true
36
+ }
37
+
29
38
  /**
30
39
  * Returns the name of the item in the wiki
31
40
  *
@@ -86,6 +95,8 @@ export class WikiStorybookItem {
86
95
  return 9000
87
96
  case StorybookCategory.option:
88
97
  return 9100
98
+ case StorybookCategory.attributes:
99
+ return 9700
89
100
  case StorybookCategory.text:
90
101
  return 9800
91
102
  case StorybookCategory.aria:
@@ -117,6 +128,40 @@ export class WikiStorybookItem {
117
128
  }
118
129
  }
119
130
 
131
+ /**
132
+ * Returns the demo property if the item is a demo item.
133
+ *
134
+ * Возвращает свойство demo, если элемент является демонстрационным.
135
+ */
136
+ private getDemo(): { isDemo?: boolean, demo?: any, demoOptions?: Record<string, any> } {
137
+ if (this.isDemo()) {
138
+ return {
139
+ isDemo: true,
140
+ demo: this.getDemoValue(),
141
+ demoOptions: this.item.demoOptions
142
+ }
143
+ }
144
+
145
+ return {}
146
+ }
147
+
148
+ /**
149
+ * Returns the demo value.
150
+ *
151
+ * Возвращает демонстрационное значение.
152
+ */
153
+ private getDemoValue(): any {
154
+ if (this.item.demo) {
155
+ return this.item.demo
156
+ }
157
+
158
+ if (this.item.type === StorybookControl.boolean) {
159
+ return true
160
+ }
161
+
162
+ return undefined
163
+ }
164
+
120
165
  /**
121
166
  * Returns the category type of a property
122
167
  *
@@ -247,7 +292,8 @@ export class WikiStorybookItem {
247
292
  ...this.getDefaultValue(),
248
293
  ...this.getType()
249
294
  },
250
- ...this.getDescription()
295
+ ...this.getDescription(),
296
+ ...this.getDemo()
251
297
  }
252
298
  }
253
299
 
@@ -276,7 +322,8 @@ export class WikiStorybookItem {
276
322
  return {
277
323
  control,
278
324
  table,
279
- ...this.getDescription()
325
+ ...this.getDescription(),
326
+ ...this.getDemo()
280
327
  }
281
328
  }
282
329
 
@@ -292,7 +339,8 @@ export class WikiStorybookItem {
292
339
  ...this.getCategory(),
293
340
  ...this.getType()
294
341
  },
295
- ...this.getDescription()
342
+ ...this.getDescription(),
343
+ ...this.getDemo()
296
344
  }
297
345
  }
298
346
 
@@ -310,7 +358,8 @@ export class WikiStorybookItem {
310
358
  ...this.getDefaultValue(),
311
359
  ...this.getType()
312
360
  },
313
- ...this.getDescription()
361
+ ...this.getDescription(),
362
+ ...this.getDemo()
314
363
  }
315
364
  }
316
365
 
@@ -327,7 +376,8 @@ export class WikiStorybookItem {
327
376
  ...this.getDefaultValue(),
328
377
  ...this.getType()
329
378
  },
330
- ...this.getDescription()
379
+ ...this.getDescription(),
380
+ ...this.getDemo()
331
381
  }
332
382
  }
333
383
  }
@@ -0,0 +1,109 @@
1
+ import { isString, toKebabCase } from '@dxtmisha/functional-basic'
2
+ import { type StorybookArgsItem, StorybookControl } from '../types/storybookTypes'
3
+
4
+ /**
5
+ * Class for working with a single Storybook property.
6
+ *
7
+ * Класс для работы с одним свойством Storybook.
8
+ */
9
+ export class WikiStorybookProp {
10
+ /**
11
+ * Constructor
12
+ * @param name property name / имя свойства
13
+ * @param item property configuration / конфигурация свойства
14
+ */
15
+ constructor(
16
+ public readonly name: string,
17
+ protected readonly item: StorybookArgsItem
18
+ ) {
19
+ }
20
+
21
+ /**
22
+ * Checks if the item is a demo item.
23
+ *
24
+ * Проверяет, является ли элемент демонстрационным.
25
+ */
26
+ isDemo(): boolean {
27
+ return this.item.isDemo === true
28
+ }
29
+
30
+ /**
31
+ * Returns the property configuration.
32
+ *
33
+ * Возвращает конфигурацию свойства.
34
+ */
35
+ get(): StorybookArgsItem {
36
+ return this.item
37
+ }
38
+
39
+ /**
40
+ * Returns the property name.
41
+ *
42
+ * Возвращает имя свойства.
43
+ */
44
+ getName(): string {
45
+ return toKebabCase(this.name)
46
+ }
47
+
48
+ /**
49
+ * Returns the default value of the property.
50
+ *
51
+ * Возвращает значение по умолчанию для свойства.
52
+ */
53
+ getDefaultValue(): any {
54
+ return this.item?.table?.defaultValue?.summary
55
+ }
56
+
57
+ /**
58
+ * Returns the property type.
59
+ *
60
+ * Возвращает тип свойства.
61
+ */
62
+ getType(): string {
63
+ if (this.item?.table?.type?.summary) {
64
+ return this.item.table.type.summary
65
+ }
66
+
67
+ if (isString(this.item.control)) {
68
+ return this.item.control
69
+ }
70
+
71
+ return this.item.control?.type ?? StorybookControl.string
72
+ }
73
+
74
+ /**
75
+ * Returns the property description.
76
+ *
77
+ * Возвращает описание свойства.
78
+ */
79
+ getDescription(): string {
80
+ return this.item.description ?? ''
81
+ }
82
+
83
+ /**
84
+ * Returns the property options.
85
+ *
86
+ * Возвращает опции свойства.
87
+ */
88
+ getOptions(): StorybookArgsItem['options'] {
89
+ return this.item.options
90
+ }
91
+
92
+ /**
93
+ * Returns the demo data.
94
+ *
95
+ * Возвращает демонстрационные данные.
96
+ */
97
+ getDemo(): any {
98
+ return this.item.demo
99
+ }
100
+
101
+ /**
102
+ * Returns the additional demo data.
103
+ *
104
+ * Возвращает дополнительные демонстрационные данные.
105
+ */
106
+ getDemoOptions(): Record<string, any> {
107
+ return this.item.demoOptions ?? {}
108
+ }
109
+ }
package/src/library.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  export * from './classes/WikiStorybook'
3
3
  export * from './classes/WikiStorybookDescriptions'
4
4
  export * from './classes/WikiStorybookItem'
5
+ export * from './classes/WikiStorybookProp'
5
6
 
6
7
  // Types
7
8
  export * from './types/storybookTypes'
@@ -28,9 +28,11 @@ import { wikiDescriptionsMask } from './wikiDescriptionsMask'
28
28
  import { wikiDescriptionsMenu } from './wikiDescriptionsMenu'
29
29
  import { wikiDescriptionsModal } from './wikiDescriptionsModal'
30
30
  import { wikiDescriptionsMotionTransform } from './wikiDescriptionsMotionTransform'
31
+ import { wikiDescriptionsPage } from './wikiDescriptionsPage'
31
32
  import { wikiDescriptionsProgress } from './wikiDescriptionsProgress'
32
33
  import { wikiDescriptionsRipple } from './wikiDescriptionsRipple'
33
34
  import { wikiDescriptionsScrollbar } from './wikiDescriptionsScrollbar'
35
+ import { wikiDescriptionsSection } from './wikiDescriptionsSection'
34
36
  import { wikiDescriptionsSelect } from './wikiDescriptionsSelect'
35
37
  import { wikiDescriptionsSelectValue } from './wikiDescriptionsSelectValue'
36
38
  import { wikiDescriptionsSkeleton } from './wikiDescriptionsSkeleton'
@@ -67,9 +69,11 @@ export const wikiDescriptions: StorybookComponentsDescription = [
67
69
  wikiDescriptionsMenu,
68
70
  wikiDescriptionsModal,
69
71
  wikiDescriptionsMotionTransform,
72
+ wikiDescriptionsPage,
70
73
  wikiDescriptionsProgress,
71
74
  wikiDescriptionsRipple,
72
75
  wikiDescriptionsScrollbar,
76
+ wikiDescriptionsSection,
73
77
  wikiDescriptionsSelect,
74
78
  wikiDescriptionsSelectValue,
75
79
  wikiDescriptionsSkeleton,
@@ -154,5 +154,51 @@ export const wikiDescriptionsAccordion: StorybookComponentsDescriptionItem = {
154
154
  <StorybookDescriptions componentName={'Slot'} type={'description'}/>
155
155
  <StorybookDescriptions componentName={'Cell'} type={'slots'}/>
156
156
  `
157
+ },
158
+ ai: {
159
+ render: `
160
+ <div :class="classDemo.item">
161
+ <Accordion :open="true" :auto-close="false" v-bind="args">
162
+ <div class="wiki-storybook-item--padding">
163
+ Hidden content
164
+ </div>
165
+ </Accordion>
166
+ </div>
167
+ `,
168
+ description: `
169
+ Accordion is a vertically stacking interactive component that allows users to reveal or hide content sections.
170
+ It consists of a header (trigger) and a body (content) that expands/collapses with a smooth animation.
171
+
172
+ **Key Features:**
173
+ 1. **Header (Trigger):**
174
+ - Uses the \`Cell\` component structure.
175
+ - Supports \`label\` (title), \`description\` (subtitle), and \`icon\` (leading icon).
176
+ - Includes a rotating arrow indicator (\`iconArrowDown\`) to show state.
177
+
178
+ 2. **Animation:**
179
+ - Uses \`MotionTransform\` for smooth height transitions.
180
+ - Content is unmounted or hidden when collapsed (depending on configuration).
181
+
182
+ 3. **Interaction:**
183
+ - Toggles on click or keyboard interaction (Enter/Space).
184
+ - Controlled via \`v-model:open\`.
185
+
186
+ **Usage Examples:**
187
+
188
+ - **Basic:**
189
+ \`<Accordion label="Settings">
190
+ <p>Settings content...</p>
191
+ </Accordion>\`
192
+
193
+ - **With Description and Icon:**
194
+ \`<Accordion label="Profile" description="Manage your account" icon="person">
195
+ <ProfileForm />
196
+ </Accordion>\`
197
+
198
+ - **Controlled:**
199
+ \`<Accordion v-model:open="isOpen" label="Controlled">
200
+ Content
201
+ </Accordion>\`
202
+ `
157
203
  }
158
204
  }
@@ -207,5 +207,58 @@ export const wikiDescriptionsActionSheet: StorybookComponentsDescriptionItem = {
207
207
  <Canvas of={Component.ActionSheetAllSlots}/>
208
208
  <StorybookDescriptions componentName={'Window'} type={'slots'}/>
209
209
  `
210
+ },
211
+ ai: {
212
+ render: `
213
+ <div :class="classDemo.item" style="min-width: 800px;">
214
+ <ActionSheet embedded open v-bind="args">
215
+ <template #control="{ binds }">
216
+ <button v-bind="binds">Open Menu</button>
217
+ </template>
218
+ <template #default>Content goes here...</template>
219
+ </ActionSheet>
220
+ </div>
221
+ `,
222
+ description: `
223
+ ActionSheet is a mobile-optimized modal component that slides up from the bottom of the screen (Bottom Sheet).
224
+ It is designed to present a set of actions, choices, or secondary content, following standard mobile interface patterns (iOS/Material).
225
+
226
+ **Note:** The \`embedded\` prop is used only for documentation examples to render the component inline. Do not use it in production code.
227
+
228
+ **Key Features:**
229
+ 1. **Positioning & Animation:**
230
+ - Anchored to the bottom of the viewport.
231
+ - Slides up with an animation when opened.
232
+ - Renders a backdrop (overlay) to block background interactions.
233
+
234
+ 2. **Mobile Interactions:**
235
+ - **Touch Close:** Supports swiping down on the header to close the sheet (controlled by the \`touchClose\` prop).
236
+ - **Backdrop:** Clicking the overlay closes the sheet.
237
+ - **Scroll:** Automatically handles internal scrolling if content exceeds height.
238
+
239
+ 3. **Slots Structure:**
240
+ - \`#control\` - The trigger element (e.g., a button). Receives \`binds\` to toggle visibility.
241
+ - \`#title\` - The header area. Often contains the title and the drag handle (indicator).
242
+ - \`#default\` - The main content area.
243
+ - \`#footer\` - The bottom area, typically used for a "Cancel" button or primary actions.
244
+
245
+ **Usage Examples:**
246
+
247
+ - **With Trigger:**
248
+ \`<ActionSheet>
249
+ <template #control="{ binds }">
250
+ <button v-bind="binds">Open Menu</button>
251
+ </template>
252
+ <template #title>Select Option</template>
253
+ <template #default>
254
+ <p>List of options...</p>
255
+ </template>
256
+ </ActionSheet>\`
257
+
258
+ - **Programmatic Control:**
259
+ \`<ActionSheet v-model:open="isOpen" touch-close>
260
+ <template #default>Content</template>
261
+ </ActionSheet>\`
262
+ `
210
263
  }
211
264
  }
@@ -157,5 +157,33 @@ export const wikiDescriptionsActions: StorybookComponentsDescriptionItem = {
157
157
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
158
158
  <StorybookDescriptions componentName={'Slot'} type={'secondary'}/>
159
159
  `
160
+ },
161
+ ai: {
162
+ description: `
163
+ Actions is a layout component for organizing groups of buttons, typically used in dialog footers, card actions, or form controls.
164
+ It manages spacing, alignment, and the separation between primary and secondary action groups.
165
+
166
+ **Key Features:**
167
+ 1. **Groups:**
168
+ - \`list\`: Array of props for the main group of buttons (usually right-aligned or primary).
169
+ - \`listSecondary\`: Array of props for the secondary group (usually left-aligned).
170
+
171
+ 2. **Alignment (\`align\`):**
172
+ - \`left\`: Aligns all buttons to the left.
173
+ - \`center\`: Centers the buttons.
174
+ - \`right\`: Aligns all buttons to the right (default for dialogs).
175
+ - \`block\`: Stretches buttons to fill the width.
176
+
177
+ 3. **Button Configuration:**
178
+ - Items in \`list\` and \`listSecondary\` are passed directly to the \`Button\` component.
179
+ - \`buttonAttrs\`: Common props applied to all buttons in the main list.
180
+ - \`buttonSecondaryAttrs\`: Common props applied to all buttons in the secondary list.
181
+
182
+ **Usage Examples:**
183
+
184
+ - **Dialog Footer:** \`<Actions align="right" :list="[{ label: 'Cancel' }, { label: 'Ok', primary: true }]" />\`
185
+ - **Split Actions:** \`<Actions :list="[{ label: 'Save' }]" :listSecondary="[{ label: 'Delete', text: true }]" />\` (Save on right, Delete on left)
186
+ - **Full Width:** \`<Actions align="block" :list="[{ label: 'Login', primary: true }]" />\`
187
+ `
160
188
  }
161
189
  }
@@ -38,5 +38,41 @@ export const wikiDescriptionsAnchor: StorybookComponentsDescriptionItem = {
38
38
  slots: `
39
39
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
40
40
  `
41
+ },
42
+ ai: {
43
+ render: `
44
+ <div :class="classDemo.item">
45
+ <Anchor href="#" v-bind="args"/>
46
+ </div>
47
+ `,
48
+ description: `
49
+ Anchor is a fundamental navigation component used to create hyperlinks and anchor points.
50
+ It wraps the standard HTML \`<a>\` tag functionality with additional utilities for smooth scrolling and clipboard interactions.
51
+
52
+ **Key Features:**
53
+ 1. **Navigation:**
54
+ - Handles standard navigation via \`href\`.
55
+ - Can be used for both internal (router) and external links.
56
+
57
+ 2. **Smooth Scrolling:**
58
+ - The \`scroll\` prop enables smooth scrolling animation when navigating to an element ID (e.g., \`href="#section"\`).
59
+
60
+ 3. **Clipboard Interaction:**
61
+ - The \`isCopy\` prop turns the component into a trigger that copies the link or value to the clipboard.
62
+
63
+ 4. **Slots:**
64
+ - \`#default\`: The content of the link (text, icons, or other elements).
65
+
66
+ **Usage Examples:**
67
+
68
+ - **Basic Link:**
69
+ \`<Anchor href="/about">About Us</Anchor>\`
70
+
71
+ - **Scroll to Anchor:**
72
+ \`<Anchor href="#contact" scroll>Contact</Anchor>\`
73
+
74
+ - **Copy Link:**
75
+ \`<Anchor href="https://example.com" is-copy>Copy URL</Anchor>\`
76
+ `
41
77
  }
42
78
  }
@@ -177,5 +177,38 @@ export const wikiDescriptionsArrow: StorybookComponentsDescriptionItem = {
177
177
  <StorybookDescriptions componentName={'Arrow'} type={'arrow'}/>
178
178
  <Canvas of={Component.ArrowBasic}/>
179
179
  `
180
+ },
181
+ ai: {
182
+ render: `
183
+ <div :class="classDemo.item" style="position: relative; width: 48px; height: 48px; background-color: oklch(93.2% 0.032 255.585);">
184
+ <Arrow position="top" v-bind="args"/>
185
+ </div>
186
+ `,
187
+ description: `
188
+ Arrow is a functional component that renders a triangular pointer connecting a container (like a tooltip, popover, or dropdown) to a target element.
189
+ It is designed to automatically blend with the parent container's styles (background, border) to create a seamless speech-bubble effect.
190
+
191
+ **Key Features:**
192
+ 1. **Target Linking:** Points to a specific DOM element defined by \`elementTarget\` (selector or HTMLElement).
193
+ 2. **Auto-Positioning:** Automatically calculates the correct placement (top, bottom, left, right) relative to the container and the target.
194
+ 3. **Style Inheritance:** Inherits \`background-color\`, \`border-color\`, and \`border-width\` from the parent element to match the container's visual style perfectly.
195
+ 4. **Reactive Updates:** Updates its position when the target or container moves (often used within \`Window\` or floating UI components).
196
+
197
+ **When to use:**
198
+ - Inside **Tooltips** to point to the hovered element.
199
+ - Inside **Popovers** or **Dropdowns** to indicate the trigger source.
200
+ - For any floating UI that needs a directional indicator.
201
+
202
+ **Usage Examples:**
203
+
204
+ - **Basic Tooltip Arrow:**
205
+ \`<div class="tooltip">
206
+ Message
207
+ <Arrow element-target="#button-id" />
208
+ </div>\`
209
+
210
+ - **With Auto Positioning:**
211
+ \`<Arrow position="auto" element-target=".target-element" />\`
212
+ `
180
213
  }
181
214
  }
@@ -134,5 +134,48 @@ export const wikiDescriptionsBadge: StorybookComponentsDescriptionItem = {
134
134
  slots: `
135
135
  <StorybookDescriptions componentName={'Slot'} type={'default'}/>
136
136
  `
137
+ },
138
+ ai: {
139
+ render: `
140
+ <div :class="classDemo.item" style="min-width: 48px; min-height: 48px;">
141
+ <Badge overlap="static" v-bind="args"/>
142
+ </div>
143
+ `,
144
+ description: `
145
+ Badge is a small visual indicator used to display status, counts, or short labels (tags).
146
+ It is typically positioned over the corner of another element (like an icon or avatar) or used inline.
147
+
148
+ **Key Features:**
149
+ 1. **Content Handling:**
150
+ - **Numeric:** Displays numbers via \`label\`. Use \`labelMax\` to cap the value (e.g., "99+").
151
+ - **Text:** Displays short text strings.
152
+ - **Icon:** Can display an icon via the \`icon\` prop.
153
+ - **Dot:** If \`dot\` is true, renders as a small circle without text (status indicator).
154
+
155
+ 2. **Positioning (\`overlap\`):**
156
+ - \`static\`: Renders inline (default flow).
157
+ - \`rectangular\`: Positioned absolutely over a rectangular parent.
158
+ - \`circular\`: Positioned absolutely over a circular parent (adjusts coordinates).
159
+ - **Alignment:** Controlled by \`vertical\` (top/bottom) and \`horizontal\` (right/left).
160
+
161
+ 3. **Styling:**
162
+ - Supports variants: \`primary\`, \`secondary\`, \`outline\`.
163
+ - \`hide\`: Toggles visibility.
164
+ - \`dot\`: Switches to dot mode.
165
+
166
+ **Usage Examples:**
167
+
168
+ - **Notification Count:**
169
+ \`<div class="relative-container">
170
+ <Icon name="notifications" />
171
+ <Badge label="5" overlap="circular" vertical="top" horizontal="right" />
172
+ </div>\`
173
+
174
+ - **Status Dot:**
175
+ \`<Badge dot primary />\`
176
+
177
+ - **Inline Tag:**
178
+ \`<Badge label="New" overlap="static" />\`
179
+ `
137
180
  }
138
181
  }