@native-systems/ui 1.0.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,160 @@
1
+ declare module "@native-systems/ui" {
2
+ type InputFieldProps = {
3
+ id: string;
4
+ label: string;
5
+ register: any;
6
+ type: string;
7
+ required: boolean;
8
+ autoCompleteId?: string;
9
+ isPasswordField?: boolean;
10
+ };
11
+ export function InputField({ id, label, register, type, required, autoCompleteId, isPasswordField, }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
12
+ }
13
+
14
+ declare module "@native-systems/ui" {
15
+ /**
16
+ * function mapText: asks for text based on a component-specific key. This is useful
17
+ * for providing translated strings or parsing template-based strings
18
+ */
19
+ type ISigninFormProps = {
20
+ mapText: (key: string) => string;
21
+ onSubmit: (values: any) => void;
22
+ errorMessage: string | null;
23
+ };
24
+ export const SigninForm: ({ mapText, onSubmit, errorMessage }: ISigninFormProps) => import("react/jsx-runtime").JSX.Element;
25
+ }
26
+
27
+ declare module "@native-systems/ui" {
28
+ /**
29
+ * function mapText: asks for text based on a component-specific key. This is useful
30
+ * for providing translated strings or parsing template-based strings
31
+ */
32
+ interface SigninLayoutProps {
33
+ mapText: (key: string) => string;
34
+ onSubmit: (email: string, password: string) => void;
35
+ errorMessage: string | null;
36
+ }
37
+ export default function SigninLayout({ mapText, onSubmit, errorMessage, }: SigninLayoutProps): import("react/jsx-runtime").JSX.Element;
38
+ }
39
+
40
+ declare module "@native-systems/ui" {
41
+ export { default as SigninLayout };
42
+ }
43
+
44
+ declare module "@native-systems/ui" {
45
+ import { ReactNode } from "react";
46
+ type MainContentFrameProps = {
47
+ children: ReactNode;
48
+ };
49
+ function MainContentFrame({ children }: MainContentFrameProps): import("react/jsx-runtime").JSX.Element;
50
+ export { MainContentFrame };
51
+ }
52
+
53
+ declare module "@native-systems/ui" {
54
+ type PaginationProps = {
55
+ currentPage: number;
56
+ totalPages: number | undefined;
57
+ hasPrevPage: boolean;
58
+ hasNextPage: boolean;
59
+ goToFirstPage: () => void;
60
+ goToPreviousPage: () => void;
61
+ goToNextPage: () => void;
62
+ goToLastPage: (lastPage: number) => void;
63
+ };
64
+ export function Pagination({ currentPage, totalPages, hasPrevPage, hasNextPage, goToFirstPage, goToPreviousPage, goToNextPage, goToLastPage, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
65
+ }
66
+
67
+ declare module "@native-systems/ui" {
68
+ type CancelButtonProps = {
69
+ onClick: () => void;
70
+ };
71
+ function CancelButton({ onClick }: CancelButtonProps): import("react/jsx-runtime").JSX.Element;
72
+ export { CancelButton };
73
+ }
74
+
75
+ declare module "@native-systems/ui" {
76
+ type ErrorDisplayProps = {
77
+ error: string | null;
78
+ };
79
+ function ErrorDisplay({ error }: ErrorDisplayProps): import("react/jsx-runtime").JSX.Element;
80
+ export { ErrorDisplay };
81
+ }
82
+
83
+ declare module "@native-systems/ui" {
84
+ function HowToCloseText(): import("react/jsx-runtime").JSX.Element;
85
+ export { HowToCloseText };
86
+ }
87
+
88
+ declare module "@native-systems/ui" {
89
+ type LoadingSpinnerProps = {
90
+ className?: string;
91
+ innerClassName?: string;
92
+ };
93
+ function LoadingSpinner({ className, innerClassName }: LoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
94
+ export { LoadingSpinner };
95
+ }
96
+
97
+ declare module "@native-systems/ui" {
98
+ type SaveButtonProps = {
99
+ isSaving: boolean;
100
+ onClick: () => void;
101
+ disabled?: boolean;
102
+ };
103
+ function SaveButton({ isSaving, onClick, disabled }: SaveButtonProps): import("react/jsx-runtime").JSX.Element;
104
+ export { SaveButton };
105
+ }
106
+
107
+ declare module "@native-systems/ui" {
108
+ type TextareaProps<T> = {
109
+ value: T;
110
+ onChange: (value: T) => void;
111
+ rows?: number;
112
+ };
113
+ function Textarea<T extends string>({ value, onChange, rows, }: TextareaProps<T>): import("react/jsx-runtime").JSX.Element;
114
+ export { Textarea };
115
+ }
116
+
117
+ declare module "@native-systems/ui" {
118
+ import { type ReactNode } from "react";
119
+ import { type PatternView, type CompileFn } from "@native-systems/utility";
120
+ type TemplateParserContextProps = {
121
+ parse: CompileFn;
122
+ addToTemporaryView: (key: string, value: string) => void;
123
+ };
124
+ export type TemplateParserProviderProps = {
125
+ navigationView: PatternView;
126
+ children: ReactNode;
127
+ };
128
+ export const TemplateParserProvider: (props: TemplateParserProviderProps) => import("react/jsx-runtime").JSX.Element;
129
+ export const useTemplateParser: () => TemplateParserContextProps;
130
+ }
131
+
132
+ declare module "@native-systems/ui" {
133
+ import * as UI from "@native-systems/ui";
134
+ import * as Util from "@native-systems/ui";
135
+ import * as Ctx from "@native-systems/ui";
136
+ const _default: {
137
+ TemplateParserProvider: (props: Ctx.TemplateParserProviderProps) => import("react/jsx-runtime").JSX.Element;
138
+ useTemplateParser: () => {
139
+ parse: import("@native-systems/utility").CompileFn;
140
+ addToTemporaryView: (key: string, value: string) => void;
141
+ };
142
+ MainContentFrame: typeof Util.MainContentFrame;
143
+ Pagination: typeof Util.Pagination;
144
+ CancelButton: typeof Util.CancelButton;
145
+ ErrorDisplay: typeof Util.ErrorDisplay;
146
+ HowToCloseText: typeof Util.HowToCloseText;
147
+ InputField: typeof Util.InputField;
148
+ LoadingSpinner: typeof Util.LoadingSpinner;
149
+ SaveButton: typeof Util.SaveButton;
150
+ Textarea: typeof Util.Textarea;
151
+ SigninLayout: typeof UI.SigninLayout;
152
+ SigninForm: ({ mapText, onSubmit, errorMessage }: {
153
+ mapText: (key: string) => string;
154
+ onSubmit: (values: any) => void;
155
+ errorMessage: string | null;
156
+ }) => import("react/jsx-runtime").JSX.Element;
157
+ };
158
+ export default _default;
159
+ }
160
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/util/views/Input.tsx","src/components/auth/widgets/SigninForm.tsx","src/components/auth/layout/SigninLayout.tsx","src/components/auth/index.ts","src/components/util/layout/MainContentFrame.tsx","src/components/util/widgets/Pagination.tsx","src/components/util/views/CancelButton.tsx","src/components/util/views/ErrorDisplay.tsx","src/components/util/views/HowToCloseText.tsx","src/components/util/views/LoadingSpinner.tsx","src/components/util/views/SaveButton.tsx","src/components/util/views/Textarea.tsx","src/context/TemplateParserContext.tsx","src/index.ts"],"names":[],"mappings":";IAIA,KAAK,eAAe,GAAG;QACrB,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,GAAG,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;IAEF,MAAM,UAAU,UAAU,CAAC,EACzB,EAAE,EACF,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,cAAsB,EACtB,eAAuB,GACxB,EAAE,eAAe,GAAA,OAAA,mBAAA,EAAA,GAAA,CAAA,OAAA,CAuDjB;;;;;;;;ICrED,KAAK,gBAAgB,GAAG;QACtB,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;QACjC,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;QAChC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B,CAAC;IAEF,MAAM,CAAC,MAAM,UAAU,EAAA,CAAA,EAAA,OAAA,EAAA,QAAA,EAAA,YAAA,EAAA,EAAyC,gBAAgB,KAAA,OAAA,mBAAA,EAAA,GAAA,CAAA,OAwD/E,CAAC;;;;;;;;IChEF,UAAU,iBAAiB;QACzB,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;QACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QACpD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,MAAM,CAAC,OAAO,UAAU,YAAY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