@dxtmisha/wiki 0.57.6 → 0.59.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.
@@ -2365,8 +2365,8 @@ var e = [
2365
2365
  en: "Two-way binding (v-model)",
2366
2366
  ru: "Двусторонняя привязка (v-model)"
2367
2367
  },
2368
- setup: "\n return {\n radioValue: ref('option1')\n }\n ",
2369
- template: "\n <div class=\"wiki-storybook-flex-column\">\n <div class=\"wiki-storybook-flex\">\n <span>Selected: {{ radioValue }}</span>\n </div>\n <div class=\"wiki-storybook-flex\">\n <button class=\"wiki-storybook-button\" @click=\"radioValue = 'option1'\">Set option1</button>\n <button class=\"wiki-storybook-button\" @click=\"radioValue = 'option2'\">Set option2</button>\n <button class=\"wiki-storybook-button\" @click=\"radioValue = ''\">Set empty</button>\n </div>\n <DesignComponent\n v-model=\"radioValue\"\n value-variant=\"option1\"\n label=\"Option 1\"\n />\n <DesignComponent\n v-model=\"radioValue\"\n value-variant=\"option2\"\n label=\"Option 2\"\n />\n </div>\n "
2368
+ setup: "\n return {\n radioValue: ref('space')\n }\n ",
2369
+ template: "\n <div class=\"wiki-storybook-flex-column\">\n <div class=\"wiki-storybook-flex\">\n <span>Selected path: <strong>{{ radioValue }}</strong></span>\n </div>\n <div class=\"wiki-storybook-flex\">\n <button class=\"wiki-storybook-button\" @click=\"radioValue = 'space'\">To the Stars</button>\n <button class=\"wiki-storybook-button\" @click=\"radioValue = 'ocean'\">Into the Deep</button>\n <button class=\"wiki-storybook-button\" @click=\"radioValue = ''\">Reset choice</button>\n </div>\n <DesignComponent\n v-model:selected=\"radioValue\"\n value-variant=\"space\"\n label=\"Space Exploration\"\n description=\"Journey to the edge of the galaxy\"\n />\n <DesignComponent\n v-model:selected=\"radioValue\"\n value-variant=\"ocean\"\n label=\"Ocean Exploration\"\n description=\"Discover the secrets of the abyss\"\n />\n </div>\n "
2370
2370
  },
2371
2371
  {
2372
2372
  id: "RadioSkeleton",
@@ -2387,7 +2387,7 @@ var e = [
2387
2387
  }
2388
2388
  ],
2389
2389
  documentation: {
2390
- body: "\n<StorybookDescriptions componentName={'Radio'} type={'radio'}/>\n\n<StorybookDescriptions componentName={'Radio'} type={'value'}/>\n<StorybookDescriptions componentName={'Value'} type={'v-model'}/>\n<Canvas of={Component.RadioVModel}/>\n\n<StorybookDescriptions componentName={'Style'} type={'isSkeleton'}/>\n<Canvas of={Component.RadioSkeleton}/>\n ",
2390
+ body: "\n<StorybookDescriptions componentName={'Radio'} type={'radio'}/>\n\n<StorybookDescriptions componentName={'Checkbox'} type={'value'}/>\n<StorybookDescriptions componentName={'Checkbox'} type={'selected'}/>\n<StorybookDescriptions componentName={'Value'} type={'v-model'}/>\n<Canvas of={Component.RadioVModel}/>\n\n<StorybookDescriptions componentName={'Style'} type={'isSkeleton'}/>\n<Canvas of={Component.RadioSkeleton}/>\n ",
2391
2391
  events: "\n<StorybookDescriptions componentName={'Event'} type={'input'}/>\n<StorybookDescriptions componentName={'Event'} type={'change'}/>\n ",
2392
2392
  expose: "\n<StorybookDescriptions componentName={'Expose'} type={'value'}/>\n<StorybookDescriptions componentName={'Expose'} type={'checkValidity'}/>\n<StorybookDescriptions componentName={'Expose'} type={'validationMessage'}/>\n ",
2393
2393
  slots: "\n<Canvas of={Component.RadioSlots}/>\n<StorybookDescriptions componentName={'Slot'} type={'label'}/>\n<StorybookDescriptions componentName={'Slot'} type={'description'}/>\n "
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/wiki",
3
3
  "private": false,
4
- "version": "0.57.6",
4
+ "version": "0.59.1",
5
5
  "type": "module",
6
6
  "description": "Wiki documentation and storybook utilities for DXT UI design system",
7
7
  "keywords": [
@@ -51,11 +51,11 @@
51
51
  "./functional/*": "./src/media/functional/*.mdx",
52
52
  "./media": {
53
53
  "import": "./dist/media.js",
54
- "types": "./dist/media.d.ts"
54
+ "types": "./dist/src/media.d.ts"
55
55
  },
56
56
  "./storybook": {
57
57
  "import": "./dist/storybook.js",
58
- "types": "./dist/storybook.d.ts"
58
+ "types": "./dist/src/storybook.d.ts"
59
59
  },
60
60
  "./storybook/styles": "./src/styles/storybookStyle.scss"
61
61
  },
@@ -0,0 +1,21 @@
1
+ import { Meta } from '@storybook/addon-docs/blocks'
2
+
3
+ <Meta title='@dxtmisha/en/functional-basic/Functions/getFirst - Get the first element'/>
4
+
5
+ # `getFirst`
6
+
7
+ Returns the first element of an array or object. If the value is a primitive, returns the value itself.
8
+
9
+ **Parameters:**
10
+ - `value: T | T[] | Record<string, T>` — input value.
11
+
12
+ **Returns:**
13
+ `T | undefined` — the first element of the array or object, or the value itself.
14
+
15
+ ```typescript
16
+ import { getFirst } from '@dxtmisha/functional-basic'
17
+
18
+ console.log(getFirst([1, 2, 3])) // 1
19
+ console.log(getFirst({ a: 1, b: 2 })) // 1
20
+ console.log(getFirst('string')) // 'string'
21
+ ```
@@ -0,0 +1,21 @@
1
+ import { Meta } from '@storybook/addon-docs/blocks'
2
+
3
+ <Meta title='@dxtmisha/ru/functional-basic/Functions/getFirst - Получение первого элемента'/>
4
+
5
+ # `getFirst`
6
+
7
+ Возвращает первый элемент массива или объекта. Если значение является примитивом, возвращает само значение.
8
+
9
+ **Параметры:**
10
+ - `value: T | T[] | Record<string, T>` — входное значение.
11
+
12
+ **Возвращает:**
13
+ `T | undefined` — первый элемент массива или объекта, или само значение.
14
+
15
+ ```typescript
16
+ import { getFirst } from '@dxtmisha/functional-basic'
17
+
18
+ console.log(getFirst([1, 2, 3])) // 1
19
+ console.log(getFirst({ a: 1, b: 2 })) // 1
20
+ console.log(getFirst('string')) // 'string'
21
+ ```
@@ -0,0 +1,21 @@
1
+ import { Meta } from '@storybook/addon-docs/blocks'
2
+
3
+ <Meta title='@dxtmisha/vi/functional-basic/Functions/getFirst - Lấy phần tử đầu tiên'/>
4
+
5
+ # `getFirst`
6
+
7
+ Trả về phần tử đầu tiên của một mảng hoặc một đối tượng. Nếu giá trị là kiểu nguyên thủy, trả về chính giá trị đó.
8
+
9
+ **Tham số:**
10
+ - `value: T | T[] | Record<string, T>` — giá trị đầu vào.
11
+
12
+ **Trả về:**
13
+ `T | undefined` — phần tử đầu tiên của mảng hoặc đối tượng, hoặc chính giá trị đó.
14
+
15
+ ```typescript
16
+ import { getFirst } from '@dxtmisha/functional-basic'
17
+
18
+ console.log(getFirst([1, 2, 3])) // 1
19
+ console.log(getFirst({ a: 1, b: 2 })) // 1
20
+ console.log(getFirst('string')) // 'string'
21
+ ```