@elcrm/form 0.0.44 → 0.0.46

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.
@@ -2,8 +2,8 @@ import { TInput } from './type';
2
2
  /**
3
3
  * StringField component
4
4
  *
5
- * @param {string} [value] - Значение поля ввода.
6
- * @param {Function} [onValue] - Колбэк при изменении значения.
5
+ * @param {string} value - Значение поля ввода.
6
+ * @param {Function} onValue - Колбэк при изменении значения.
7
7
  * @param {Function} [onSave] - Колбэк при сохранении значения (например, при потере фокуса).
8
8
  * @param {string} [name] - Имя поля.
9
9
  * @param {string} [placeholder] - Текст-подсказка, отображаемый, когда поле пустое.
@@ -24,4 +24,4 @@ import { TInput } from './type';
24
24
  * @param {boolean} [isReload] - Нужно ли обновлять данные при изменении.
25
25
  * @param {boolean} [spellCheck] - Включить проверку орфографии.
26
26
  */
27
- export default function ({ value, onValue, name, placeholder, title, label, show, hide, edit, active, maxLength, onSave, className, spellCheck, isCopy, isReload, }: TInput): import("react/jsx-runtime").JSX.Element | "";
27
+ export default function ({ value, onValue, name, inputmode, placeholder, title, label, show, hide, edit, active, maxLength, onSave, className, spellCheck, isCopy, isReload, }: TInput): import("react/jsx-runtime").JSX.Element | "";
@@ -1,7 +1,7 @@
1
1
  export type TInput = {
2
2
  value?: string;
3
- onValue?: Function;
4
- onSave?: Function;
3
+ onValue?: (data: TValue) => void | Promise<TValue>;
4
+ onSave?: (data: TValue) => void | Promise<TValue>;
5
5
  name?: string;
6
6
  placeholder?: string;
7
7
  title?: string;
@@ -20,4 +20,10 @@ export type TInput = {
20
20
  maxLength?: number;
21
21
  isReload?: boolean;
22
22
  spellCheck?: boolean;
23
+ inputmode?: "text" | "email" | "none" | "tel" | "url" | "search" | "numeric" | "decimal";
24
+ };
25
+ export type TValue = {
26
+ value?: string;
27
+ name?: string;
28
+ reload?: boolean;
23
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elcrm/form",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "description": "plugin for elCRM",
5
5
  "type": "module",
6
6
  "author": "MaSkal <dev@elcrm.online>",
@@ -1,15 +0,0 @@
1
- export interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- name?: string;
5
- placeholder?: string;
6
- title?: string;
7
- error?: string;
8
- hide?: string;
9
- edit?: Boolean;
10
- active?: Boolean;
11
- after?: string;
12
- show?: Boolean;
13
- view?: string;
14
- className?: string;
15
- }