@elcrm/telegram 0.0.65 → 0.0.67

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,18 @@
1
+ import { default as React } from 'react';
2
+ declare let toggleBottomsheet: () => void;
3
+ type TBottomsheet = {
4
+ children: React.ReactNode;
5
+ title?: string;
6
+ isOverlay?: boolean;
7
+ };
8
+ /**
9
+ * Компонент BottomSheet
10
+ *
11
+ * @param {object} props - параметры компонента
12
+ * @param {React.ReactNode} props.children - Контент внутри шита
13
+ * @param {string} [props.title] - Заголовок окна (опционально)
14
+ * @param {boolean} [props.isOverlay=true] - Показывать ли затемняющую подложку (по умолчанию true)
15
+ */
16
+ declare const BottomSheet: ({ children, title, isOverlay }: TBottomsheet) => import("react/jsx-runtime").JSX.Element;
17
+ export default BottomSheet;
18
+ export { toggleBottomsheet };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,67 @@
1
- import { default as Footer } from './Footer/Footer';
2
- declare const Telegram: any;
1
+ import { default as React } from 'react';
2
+ import { Modal as _Modal } from './Madal/index';
3
+ declare namespace Telegram {
4
+ const WebApp: any;
5
+ const getUser: () => any;
6
+ /**
7
+ * Показывает уведомление с поддержкой тем оформления и хаптик-отклика.
8
+
9
+ * @param {string|object} type - Тип уведомления ('error', 'success', 'warning') или объект: {type, text, thema}.
10
+ * @param {string} [text] - Текст уведомления.
11
+ * @param {boolean} [thema] - Признак применения темы оформния.
12
+ *
13
+ * Пример использования:
14
+ * Telegram.Notice('error', 'Что-то пошло не так');
15
+ * Telegram.Notice({type: 'success', text: 'Операция выполнена', thema: true});
16
+ */
17
+ const Notice: (type: any, text?: any, thema?: any) => void;
18
+ const Header: () => import("react/jsx-runtime").JSX.Element;
19
+ const Footer: ({ actions, children, className, page, setPage, direction, }: import("./Footer").TFooter) => import("react/jsx-runtime").JSX.Element;
20
+ /**
21
+ * Компонент BottomSheet
22
+ *
23
+ * @param {object} props - параметры компонента
24
+ * @param {React.ReactNode} props.children - Контент внутри шита
25
+ * @param {string} [props.title] - Заголовок окна (опционально)
26
+ * @param {boolean} [props.isOverlay=true] - Показывать ли затемняющую подложку (по умолчанию true)
27
+ */
28
+ const Bottomsheet: ({ children, title, isOverlay }: {
29
+ children: React.ReactNode;
30
+ title?: string;
31
+ isOverlay?: boolean;
32
+ }) => import("react/jsx-runtime").JSX.Element;
33
+ const toggleBottomsheet: () => void;
34
+ const Modal: typeof _Modal;
35
+ const MainButton: {
36
+ callback: never[];
37
+ set: (j: MainButton | boolean) => void;
38
+ };
39
+ const BackButton: {
40
+ state: boolean[];
41
+ listen: any;
42
+ router: (j: any) => void;
43
+ set: (j: any) => void;
44
+ };
45
+ }
46
+ type MainButton = {
47
+ text?: string;
48
+ color?: string;
49
+ textColor?: string;
50
+ isActive?: boolean;
51
+ callback?: () => void;
52
+ page: string;
53
+ };
54
+ export declare const Header: () => import("react/jsx-runtime").JSX.Element, Footer: ({ actions, children, className, page, setPage, direction, }: import('./Footer').TFooter) => import("react/jsx-runtime").JSX.Element, toggleBottomsheet: () => void, Modal: typeof _Modal, MainButton: {
55
+ callback: never[];
56
+ set: (j: MainButton | boolean) => void;
57
+ }, BackButton: {
58
+ state: boolean[];
59
+ listen: any;
60
+ router: (j: any) => void;
61
+ set: (j: any) => void;
62
+ }, Bottomsheet: ({ children, title, isOverlay }: {
63
+ children: React.ReactNode;
64
+ title?: string;
65
+ isOverlay?: boolean;
66
+ }) => import("react/jsx-runtime").JSX.Element, WebApp: any, getUser: () => any, Notice: (type: any, text?: any, thema?: any) => void;
3
67
  export default Telegram;
4
- export { Footer };