@snabcentr/vue-ui-lib 4.6.1 → 4.7.0

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.
@@ -0,0 +1,28 @@
1
+ import { Directive } from 'vue';
2
+ /**
3
+ * Тип значения, которое можно скопировать в буфер обмена.
4
+ */
5
+ type CopyValue = string | number | null | undefined;
6
+ /**
7
+ * Директива `v-copy` — копирует переданное значение в буфер обмена.
8
+ *
9
+ * Поведение:
10
+ * - меняет курсор на `pointer`, обозначая интерактивность;
11
+ * - по умолчанию копирует по двойному клику, а на кнопках — по одиночному;
12
+ * - модификаторы `.click` / `.dblclick` принудительно задают тип события;
13
+ * - значение для копирования передаётся в саму директиву и может быть строкой или числом.
14
+ *
15
+ * @example
16
+ * ```vue
17
+ * <!-- Копирование номера заказа по двойному клику. -->
18
+ * <span v-copy="order.id">{{ order.id }}</span>
19
+ *
20
+ * <!-- Копирование по одиночному клику (на кнопке — автоматически). -->
21
+ * <n-button v-copy="order.payment.onlinePaymentLink">Скопировать ссылку</n-button>
22
+ *
23
+ * <!-- Принудительно одиночный клик на не-кнопке. -->
24
+ * <span v-copy.click="order.barcode">{{ order.barcode }}</span>
25
+ * ```
26
+ */
27
+ export declare const vCopy: Directive<HTMLElement, CopyValue>;
28
+ export {};
@@ -1 +1,2 @@
1
+ export * from './copy';
1
2
  export * from './focus-next';
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [],
5
5
  "author": "Sergey S. Smirnov <dev@snabcentr.com>",
6
6
  "type": "module",
7
- "version": "4.6.1",
7
+ "version": "4.7.0",
8
8
  "license": "ISC",
9
9
  "scripts": {
10
10
  "dev": "vite",