@retailcrm/embed-ui-v1-components 0.4.1 → 0.4.3

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 (2) hide show
  1. package/README.md +32 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,15 +1,42 @@
1
1
  # `@retailcrm/embed-ui-v1-components`
2
2
 
3
- Компоненты UI для использования в расширениях
3
+ Компоненты UI для использования в JS-расширениях RetailCRM
4
4
 
5
- Установка:
5
+ ## Установка
6
+
7
+ npm:
6
8
 
7
9
  ```bash
8
10
  npm i --save @retailcrm/embed-ui-v1-components
9
11
  ```
10
12
 
11
- или
12
-
13
+ yarn:
13
14
  ```bash
14
15
  yarn add @retailcrm/embed-ui-v1-components
15
- ```
16
+ ```
17
+
18
+ ## Применение в расширениях
19
+
20
+ Все компоненты в расширениях надо импортировать из `@retailcrm/embed-ui-v1-components/remote`
21
+
22
+ Пример импорта и использования кнопки `UiButton`
23
+
24
+ ```html
25
+ <template>
26
+ <UiButton variant="danger">
27
+ <IconDelete /> Удалить
28
+ </UiButton>
29
+ </template>
30
+
31
+ <script lang="ts" setup>
32
+ import IconDelete from '@retailcrm/embed-ui-v1-components/assets/sprites/ui/delete-outlined.svg'
33
+ import { UiButton } from '@retailcrm/embed-ui-v1-components/remote'
34
+ </script>
35
+ ```
36
+
37
+ **⚠ Важно**
38
+
39
+ Расширения используют определения из remote части для передачи системе инструкций, из чего собирать
40
+ интерфейс. Библиотека также содержит `@retailcrm/embed-ui-v1-components/host` &ndash; набор компонентов,
41
+ который будет использовать CRM при интерпретации инструкций от расширений. **_Не используйте_** host компоненты
42
+ как часть кода расширения.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@retailcrm/embed-ui-v1-components",
3
3
  "type": "module",
4
- "version": "0.4.1",
4
+ "version": "0.4.3",
5
5
  "license": "MIT",
6
6
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
7
7
  "repository": "git@github.com:retailcrm/embed-ui.git",