@passui/tanstack 0.2.7 → 0.3.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.
- package/dist/{types/src/auth-shell → auth-shell}/auth-shell.d.ts +3 -3
- package/dist/auth-shell/auth-shell.js +17 -0
- package/dist/auth-shell.d.ts +2 -0
- package/dist/auth-shell.js +1 -0
- package/dist/core.d.ts +3 -0
- package/dist/core.js +3 -0
- package/dist/{types/src/document → document}/compose-viewport.d.ts +11 -11
- package/dist/document/compose-viewport.js +43 -0
- package/dist/document.d.ts +2 -0
- package/dist/document.js +1 -0
- package/dist/form-fields/fields.d.ts +30 -0
- package/dist/form-fields/fields.js +160 -0
- package/dist/form-fields/selection.d.ts +21 -0
- package/dist/form-fields/selection.js +73 -0
- package/dist/form-fields/submit.d.ts +3 -0
- package/dist/form-fields/submit.js +26 -0
- package/dist/form-fields.d.ts +7 -0
- package/dist/form-fields.js +7 -0
- package/dist/forms/contexts.js +4 -0
- package/dist/{types/src/forms → forms}/elements/form-alert.d.ts +4 -4
- package/dist/forms/elements/form-alert.js +19 -0
- package/dist/forms/fields/avatar-picker.d.ts +10 -0
- package/dist/forms/fields/avatar-picker.js +228 -0
- package/dist/forms/fields/avatar.d.ts +30 -0
- package/dist/forms/fields/avatar.js +188 -0
- package/dist/forms/fields/checkbox.d.ts +2 -0
- package/dist/forms/fields/index.d.ts +21 -0
- package/dist/forms/fields/index.js +15 -0
- package/dist/forms/fields/input.d.ts +2 -0
- package/dist/forms/fields/multiselect.d.ts +2 -0
- package/dist/forms/fields/otp.d.ts +2 -0
- package/dist/forms/fields/radio-card.d.ts +2 -0
- package/dist/forms/fields/switch.d.ts +2 -0
- package/dist/forms/fields/textarea.d.ts +2 -0
- package/dist/forms.d.ts +45 -0
- package/dist/forms.js +16 -0
- package/dist/mutation/use-app-mutation.d.ts +23 -0
- package/dist/mutation/use-app-mutation.js +41 -0
- package/dist/mutation.d.ts +3 -0
- package/dist/mutation.js +3 -0
- package/dist/route-boundary/default-boundary.d.ts +2 -0
- package/dist/route-boundary/default-boundary.js +40 -0
- package/dist/route-boundary/default-loader.d.ts +6 -0
- package/dist/route-boundary/default-loader.js +17 -0
- package/dist/{types/src/route-boundary → route-boundary}/not-founder.d.ts +2 -2
- package/dist/route-boundary/not-founder.js +44 -0
- package/dist/route-boundary.d.ts +4 -0
- package/dist/route-boundary.js +4 -0
- package/dist/settings/setting-list.d.ts +51 -0
- package/dist/settings/setting-list.js +122 -0
- package/dist/settings.d.ts +2 -0
- package/dist/settings.js +1 -0
- package/dist/{types/src/shared → shared}/optimistic.d.ts +2 -2
- package/dist/shared/optimistic.js +16 -0
- package/dist/{types/src/shared → shared}/table.d.ts +7 -7
- package/dist/shared/table.js +12 -0
- package/dist/tables/columns.d.ts +3 -0
- package/dist/tables/columns.js +21 -0
- package/dist/tables/data-table.d.ts +76 -0
- package/dist/tables/data-table.js +307 -0
- package/dist/tables/filter-row.js +137 -0
- package/dist/tables/pagination.d.ts +8 -0
- package/dist/tables/pagination.js +86 -0
- package/dist/tables.d.ts +4 -0
- package/dist/tables.js +4 -0
- package/package.json +129 -128
- package/src/styles.css +1 -0
- package/dist/types/src/auth-shell/index.d.ts +0 -1
- package/dist/types/src/document/index.d.ts +0 -1
- package/dist/types/src/form-fields/fields.d.ts +0 -24
- package/dist/types/src/form-fields/index.d.ts +0 -2
- package/dist/types/src/form-fields/selection.d.ts +0 -21
- package/dist/types/src/form-fields/submit.d.ts +0 -3
- package/dist/types/src/forms/contexts.d.ts +0 -1
- package/dist/types/src/forms/elements/submit.d.ts +0 -1
- package/dist/types/src/forms/fields/avatar-picker.d.ts +0 -30
- package/dist/types/src/forms/fields/avatar.d.ts +0 -30
- package/dist/types/src/forms/fields/checkbox.d.ts +0 -1
- package/dist/types/src/forms/fields/index.d.ts +0 -21
- package/dist/types/src/forms/fields/input.d.ts +0 -1
- package/dist/types/src/forms/fields/multiselect.d.ts +0 -1
- package/dist/types/src/forms/fields/otp.d.ts +0 -1
- package/dist/types/src/forms/fields/radio-card.d.ts +0 -1
- package/dist/types/src/forms/fields/switch.d.ts +0 -1
- package/dist/types/src/forms/fields/textarea.d.ts +0 -1
- package/dist/types/src/forms/index.d.ts +0 -41
- package/dist/types/src/mutation/index.d.ts +0 -1
- package/dist/types/src/mutation/use-app-mutation.d.ts +0 -22
- package/dist/types/src/route-boundary/default-boundary.d.ts +0 -2
- package/dist/types/src/route-boundary/default-loader.d.ts +0 -6
- package/dist/types/src/route-boundary/index.d.ts +0 -3
- package/dist/types/src/settings/index.d.ts +0 -1
- package/dist/types/src/settings/setting-list.d.ts +0 -51
- package/dist/types/src/shared/index.d.ts +0 -2
- package/dist/types/src/tables/columns.d.ts +0 -3
- package/dist/types/src/tables/data-table.d.ts +0 -76
- package/dist/types/src/tables/filter-row.d.ts +0 -9
- package/dist/types/src/tables/index.d.ts +0 -3
- package/dist/types/src/tables/pagination.d.ts +0 -8
- package/dist/types/src/tables/utils.d.ts +0 -1
- package/src/auth-shell/auth-shell.tsx +0 -16
- package/src/auth-shell/index.ts +0 -1
- package/src/document/compose-viewport.tsx +0 -80
- package/src/document/index.ts +0 -1
- package/src/form-fields/fields.tsx +0 -147
- package/src/form-fields/index.ts +0 -2
- package/src/form-fields/selection.tsx +0 -109
- package/src/form-fields/submit.tsx +0 -35
- package/src/forms/contexts.ts +0 -4
- package/src/forms/elements/form-alert.tsx +0 -21
- package/src/forms/elements/submit.tsx +0 -1
- package/src/forms/fields/avatar-picker.tsx +0 -319
- package/src/forms/fields/avatar.tsx +0 -269
- package/src/forms/fields/checkbox.tsx +0 -1
- package/src/forms/fields/index.ts +0 -29
- package/src/forms/fields/input.tsx +0 -1
- package/src/forms/fields/multiselect.tsx +0 -1
- package/src/forms/fields/otp.tsx +0 -1
- package/src/forms/fields/radio-card.tsx +0 -1
- package/src/forms/fields/switch.tsx +0 -1
- package/src/forms/fields/textarea.tsx +0 -1
- package/src/forms/index.ts +0 -26
- package/src/mutation/index.ts +0 -1
- package/src/mutation/use-app-mutation.ts +0 -100
- package/src/route-boundary/default-boundary.tsx +0 -46
- package/src/route-boundary/default-loader.tsx +0 -23
- package/src/route-boundary/index.ts +0 -3
- package/src/route-boundary/not-founder.tsx +0 -39
- package/src/settings/index.ts +0 -1
- package/src/settings/setting-list.tsx +0 -223
- package/src/shared/index.ts +0 -2
- package/src/shared/optimistic.ts +0 -19
- package/src/shared/table.ts +0 -12
- package/src/tables/columns.tsx +0 -30
- package/src/tables/data-table.tsx +0 -524
- package/src/tables/filter-row.tsx +0 -196
- package/src/tables/index.ts +0 -3
- package/src/tables/pagination.tsx +0 -85
- package/src/tables/utils.ts +0 -5
package/package.json
CHANGED
|
@@ -1,130 +1,131 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
2
|
+
"name": "@passui/tanstack",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/phe-rus/passui.git",
|
|
9
|
+
"directory": "packages/tanstack"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://passui.pherus.org/docs/installation",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org",
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src/styles.css",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"publish:check": "bun pm pack --dry-run",
|
|
26
|
+
"build": "tsdown"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": "^19.3.0",
|
|
31
|
+
"react-dom": "^19.3.0",
|
|
32
|
+
"@tanstack/react-query": "^5.104.0",
|
|
33
|
+
"tailwindcss": "^4.3.3",
|
|
34
|
+
"@tanstack/react-devtools": "^0.10.13",
|
|
35
|
+
"@tanstack/react-form": "^1.33.5",
|
|
36
|
+
"@tanstack/react-query-devtools": "^5.104.0",
|
|
37
|
+
"@tanstack/react-router": "^1.170.39",
|
|
38
|
+
"@tanstack/react-router-devtools": "^1.167.2",
|
|
39
|
+
"@tanstack/react-table": "^9.2.4",
|
|
40
|
+
"motion": "^13.4.4",
|
|
41
|
+
"@passui/react": "^0.2.0",
|
|
42
|
+
"@passui/icons": "^0.1.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^26.6.6",
|
|
46
|
+
"@types/react": "^19.3.0",
|
|
47
|
+
"@types/react-dom": "^19.3.0",
|
|
48
|
+
"tailwindcss": "^4.3.5",
|
|
49
|
+
"typescript": "^7.0.2",
|
|
50
|
+
"vitest": "5.1.0",
|
|
51
|
+
"vite": "8.3.8",
|
|
52
|
+
"@tanstack/react-devtools": "^0.10.13",
|
|
53
|
+
"@tanstack/react-form": "^1.33.5",
|
|
54
|
+
"@tanstack/react-query-devtools": "^5.104.0",
|
|
55
|
+
"@tanstack/react-router": "^1.170.39",
|
|
56
|
+
"@tanstack/react-router-devtools": "^1.167.2",
|
|
57
|
+
"@tanstack/react-table": "^9.2.4",
|
|
58
|
+
"motion": "14.12.0",
|
|
59
|
+
"@passui/react": "^0.2.0",
|
|
60
|
+
"react": "^19.3.0",
|
|
61
|
+
"react-dom": "^19.3.0",
|
|
62
|
+
"@tanstack/react-query": "^5.104.0",
|
|
63
|
+
"tsdown": "0.23.7",
|
|
64
|
+
"@passui/icons": "^0.1.0"
|
|
65
|
+
},
|
|
66
|
+
"exports": {
|
|
67
|
+
"./auth-shell": "./dist/auth-shell.js",
|
|
68
|
+
"./core": "./dist/core.js",
|
|
69
|
+
"./document": "./dist/document.js",
|
|
70
|
+
"./form-fields": "./dist/form-fields.js",
|
|
71
|
+
"./forms": "./dist/forms.js",
|
|
72
|
+
"./mutation": "./dist/mutation.js",
|
|
73
|
+
"./route-boundary": "./dist/route-boundary.js",
|
|
74
|
+
"./settings": "./dist/settings.js",
|
|
75
|
+
"./tables": "./dist/tables.js",
|
|
76
|
+
"./package.json": "./package.json",
|
|
77
|
+
"./react/forms": "./dist/forms.js",
|
|
78
|
+
"./react/form-fields": "./dist/form-fields.js",
|
|
79
|
+
"./react/tables": "./dist/tables.js",
|
|
80
|
+
"./react/document": "./dist/document.js",
|
|
81
|
+
"./react/auth-shell": "./dist/auth-shell.js",
|
|
82
|
+
"./react/settings": "./dist/settings.js",
|
|
83
|
+
"./react/mutation": "./dist/mutation.js",
|
|
84
|
+
"./react/route-boundary": "./dist/route-boundary.js",
|
|
85
|
+
"./styles.css": "./src/styles.css",
|
|
86
|
+
"./globals.css": "./src/globals.css",
|
|
87
|
+
"./react/styles.css": "./src/styles.css"
|
|
88
|
+
},
|
|
89
|
+
"description": "TanStack form, table and router integrations for Passui.",
|
|
90
|
+
"peerDependenciesMeta": {
|
|
91
|
+
"react": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"react-dom": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"@tanstack/react-query": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"@tanstack/react-devtools": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"@tanstack/react-form": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"@tanstack/react-query-devtools": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
109
|
+
"@tanstack/react-router": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
"@tanstack/react-router-devtools": {
|
|
113
|
+
"optional": true
|
|
114
|
+
},
|
|
115
|
+
"@tanstack/react-table": {
|
|
116
|
+
"optional": true
|
|
117
|
+
},
|
|
118
|
+
"motion": {
|
|
119
|
+
"optional": true
|
|
120
|
+
},
|
|
121
|
+
"@passui/react": {
|
|
122
|
+
"optional": true
|
|
123
|
+
},
|
|
124
|
+
"@passui/icons": {
|
|
125
|
+
"optional": false
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"sideEffects": [
|
|
129
|
+
"**/*.css"
|
|
130
|
+
]
|
|
130
131
|
}
|
package/src/styles.css
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./auth-shell";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./compose-viewport";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type TextFieldProps } from "@passui/react/text-field";
|
|
2
|
-
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
-
export declare const PeachFieldLabels: import("react").Context<{
|
|
4
|
-
show: string;
|
|
5
|
-
hide: string;
|
|
6
|
-
} | undefined>;
|
|
7
|
-
export declare function FieldInput(props: Omit<TextFieldProps, "value" | "onChange" | "onBlur" | "name">): import("react").JSX.Element;
|
|
8
|
-
export declare function FieldCheckbox({ label }: {
|
|
9
|
-
label: string;
|
|
10
|
-
}): import("react").JSX.Element;
|
|
11
|
-
export declare function FieldSwitch({ label, description, disabled, }: {
|
|
12
|
-
label: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
}): import("react").JSX.Element;
|
|
16
|
-
export declare function FieldTextarea({ label, icon, ...props }: ComponentProps<"textarea"> & {
|
|
17
|
-
label: string;
|
|
18
|
-
icon?: ReactNode;
|
|
19
|
-
}): import("react").JSX.Element;
|
|
20
|
-
export declare function FieldOtp({ label, maxLength, onComplete, }: {
|
|
21
|
-
label: string;
|
|
22
|
-
maxLength?: number;
|
|
23
|
-
onComplete?: (value: string) => void;
|
|
24
|
-
}): import("react").JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
type Option = {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
icon?: ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function FieldRadioCard({ label, description, options, disabled, columns, }: {
|
|
10
|
-
label: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
options: Option[];
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
columns?: 1 | 2;
|
|
15
|
-
}): import("react").JSX.Element;
|
|
16
|
-
export declare function FieldMultiselect({ label, description, options, }: {
|
|
17
|
-
label: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
options: Option[];
|
|
20
|
-
}): import("react").JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const fieldContext: import("react").Context<import("@tanstack/react-form").AnyFieldApi>, formContext: import("react").Context<import("@tanstack/react-form").AnyFormApi>, useFieldContext: <TData>() => import("@tanstack/react-form").FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>, useFormContext: () => import("@tanstack/react-form").ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Submit } from "../../form-fields/submit";
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export type AvatarPickerLabels = {
|
|
2
|
-
photo: string;
|
|
3
|
-
photoDescription: string;
|
|
4
|
-
choosePhoto: string;
|
|
5
|
-
takePhoto: string;
|
|
6
|
-
capture: string;
|
|
7
|
-
monogram: string;
|
|
8
|
-
removePhoto: string;
|
|
9
|
-
cancel: string;
|
|
10
|
-
};
|
|
11
|
-
type AvatarPickerProps = {
|
|
12
|
-
open: boolean;
|
|
13
|
-
onOpenChange: (open: boolean) => void;
|
|
14
|
-
label: string;
|
|
15
|
-
image?: string;
|
|
16
|
-
clearable: boolean;
|
|
17
|
-
labels: AvatarPickerLabels;
|
|
18
|
-
onChooseFile: () => void;
|
|
19
|
-
/** A captured frame, still to be framed in Move and Scale. */
|
|
20
|
-
onCapture: (file: File) => void;
|
|
21
|
-
/** A finished image that needs no framing, like a monogram. */
|
|
22
|
-
onChoose: (file: File) => void;
|
|
23
|
-
onRemove: () => void;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* The photo sheet Apple shows for a contact photo: the current photo lit by
|
|
27
|
-
* its own colors, then the ways to change it.
|
|
28
|
-
*/
|
|
29
|
-
export declare function AvatarPicker({ open, onOpenChange, label, image, clearable, labels, onChooseFile, onCapture, onChoose, onRemove, }: AvatarPickerProps): import("react").ReactPortal | null;
|
|
30
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import type { AvatarPickerLabels } from "./avatar-picker";
|
|
3
|
-
export type FieldAvatarValue = File | null | false;
|
|
4
|
-
export type FieldAvatarLabels = AvatarPickerLabels & {
|
|
5
|
-
edit: string;
|
|
6
|
-
remove: string;
|
|
7
|
-
/** Shown under a picked photo until it's kept or dropped. */
|
|
8
|
-
confirmHint: string;
|
|
9
|
-
save: string;
|
|
10
|
-
};
|
|
11
|
-
type FieldAvatarProps = {
|
|
12
|
-
/** Compact identity row for account settings. */
|
|
13
|
-
compact?: boolean;
|
|
14
|
-
existingImage?: string | null;
|
|
15
|
-
label: string;
|
|
16
|
-
accept?: string;
|
|
17
|
-
/** Offer removing the image once there is one. Off by default: a
|
|
18
|
-
* personal avatar usually just gets replaced, not cleared to nothing. */
|
|
19
|
-
clearable?: boolean;
|
|
20
|
-
/** Sit the photo in a surface lit by its own colors, with this under it. */
|
|
21
|
-
caption?: ReactNode;
|
|
22
|
-
/** For a translated UI; English otherwise. */
|
|
23
|
-
labels?: Partial<FieldAvatarLabels>;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* A photo you click to replace: a small menu (choose, take, monogram), then
|
|
27
|
-
* the new image shows in place and Enter keeps it (Esc drops it); no cropping dialog.
|
|
28
|
-
*/
|
|
29
|
-
export declare function FieldAvatar({ compact, existingImage, label, accept, clearable, caption, labels, }: FieldAvatarProps): import("react").JSX.Element;
|
|
30
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FieldCheckbox } from "../../form-fields/fields";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FieldInput, FieldCheckbox, FieldTextarea, FieldSwitch, FieldOtp } from "../../form-fields/fields";
|
|
2
|
-
import { FieldRadioCard, FieldMultiselect } from "../../form-fields/selection";
|
|
3
|
-
import { FieldAvatar } from "./avatar";
|
|
4
|
-
export declare const fields: {
|
|
5
|
-
input: typeof FieldInput;
|
|
6
|
-
checkbox: typeof FieldCheckbox;
|
|
7
|
-
textarea: typeof FieldTextarea;
|
|
8
|
-
switch: typeof FieldSwitch;
|
|
9
|
-
radioCard: typeof FieldRadioCard;
|
|
10
|
-
multiselect: typeof FieldMultiselect;
|
|
11
|
-
avatar: typeof FieldAvatar;
|
|
12
|
-
otp: typeof FieldOtp;
|
|
13
|
-
};
|
|
14
|
-
export * from "./input";
|
|
15
|
-
export * from "./checkbox";
|
|
16
|
-
export * from "./textarea";
|
|
17
|
-
export * from "./switch";
|
|
18
|
-
export * from "./radio-card";
|
|
19
|
-
export * from "./multiselect";
|
|
20
|
-
export * from "./avatar";
|
|
21
|
-
export * from "./otp";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FieldInput } from "../../form-fields/fields";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FieldMultiselect } from "../../form-fields/selection";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FieldOtp } from "../../form-fields/fields";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FieldRadioCard } from "../../form-fields/selection";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FieldSwitch } from "../../form-fields/fields";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FieldTextarea } from "../../form-fields/fields";
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { useSelector, useStore } from "@tanstack/react-form";
|
|
2
|
-
import { Submit } from "./elements/submit";
|
|
3
|
-
export declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/react-form").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
4
|
-
readonly input: typeof import(".").FieldInput;
|
|
5
|
-
readonly checkbox: typeof import(".").FieldCheckbox;
|
|
6
|
-
readonly textarea: typeof import(".").FieldTextarea;
|
|
7
|
-
readonly switch: typeof import(".").FieldSwitch;
|
|
8
|
-
readonly radioCard: typeof import(".").FieldRadioCard;
|
|
9
|
-
readonly multiselect: typeof import(".").FieldMultiselect;
|
|
10
|
-
readonly avatar: typeof import(".").FieldAvatar;
|
|
11
|
-
readonly otp: typeof import(".").FieldOtp;
|
|
12
|
-
}, {
|
|
13
|
-
readonly submit: typeof Submit;
|
|
14
|
-
}>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
15
|
-
readonly input: typeof import(".").FieldInput;
|
|
16
|
-
readonly checkbox: typeof import(".").FieldCheckbox;
|
|
17
|
-
readonly textarea: typeof import(".").FieldTextarea;
|
|
18
|
-
readonly switch: typeof import(".").FieldSwitch;
|
|
19
|
-
readonly radioCard: typeof import(".").FieldRadioCard;
|
|
20
|
-
readonly multiselect: typeof import(".").FieldMultiselect;
|
|
21
|
-
readonly avatar: typeof import(".").FieldAvatar;
|
|
22
|
-
readonly otp: typeof import(".").FieldOtp;
|
|
23
|
-
}, {
|
|
24
|
-
readonly submit: typeof Submit;
|
|
25
|
-
}, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
26
|
-
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
|
|
27
|
-
readonly input: typeof import(".").FieldInput;
|
|
28
|
-
readonly checkbox: typeof import(".").FieldCheckbox;
|
|
29
|
-
readonly textarea: typeof import(".").FieldTextarea;
|
|
30
|
-
readonly switch: typeof import(".").FieldSwitch;
|
|
31
|
-
readonly radioCard: typeof import(".").FieldRadioCard;
|
|
32
|
-
readonly multiselect: typeof import(".").FieldMultiselect;
|
|
33
|
-
readonly avatar: typeof import(".").FieldAvatar;
|
|
34
|
-
readonly otp: typeof import(".").FieldOtp;
|
|
35
|
-
}, {
|
|
36
|
-
readonly submit: typeof Submit;
|
|
37
|
-
}>;
|
|
38
|
-
}>>;
|
|
39
|
-
export { useSelector, useStore };
|
|
40
|
-
export * from "./fields/index";
|
|
41
|
-
export { FormAlert } from "./elements/form-alert";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./use-app-mutation";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { QueryKey, UseMutationOptions } from "@tanstack/react-query";
|
|
2
|
-
type OptimisticUpdate<TOptimisticData, TVariables> = {
|
|
3
|
-
queryKey: QueryKey;
|
|
4
|
-
/** Applied to the cache immediately, before the mutation resolves. Rolled back if it errors. */
|
|
5
|
-
updater: (old: TOptimisticData | undefined, variables: TVariables) => TOptimisticData;
|
|
6
|
-
};
|
|
7
|
-
type MutationContext<TOptimisticData> = {
|
|
8
|
-
previous: TOptimisticData | undefined;
|
|
9
|
-
next: TOptimisticData;
|
|
10
|
-
} | undefined;
|
|
11
|
-
export { shouldRestoreOptimisticSnapshot, restoreOptimisticSnapshot } from "../shared/optimistic";
|
|
12
|
-
type AppMutationOptions<TData, TVariables, TOptimisticData> = Omit<UseMutationOptions<TData, Error, TVariables, MutationContext<TOptimisticData>>, "onSuccess" | "onError" | "onMutate" | "onSettled"> & {
|
|
13
|
-
/** Query keys to invalidate once the mutation settles, win or lose. */
|
|
14
|
-
invalidates?: QueryKey[];
|
|
15
|
-
optimisticUpdate?: OptimisticUpdate<TOptimisticData, TVariables>;
|
|
16
|
-
successMessage?: string | ((data: TData, variables: TVariables) => string);
|
|
17
|
-
successDescription?: string | ((data: TData, variables: TVariables) => string | undefined);
|
|
18
|
-
errorMessage?: string;
|
|
19
|
-
onSuccess?: (data: TData, variables: TVariables) => void;
|
|
20
|
-
onError?: (error: Error, variables: TVariables) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare function useAppMutation<TData, TVariables = void, TOptimisticData = unknown>({ invalidates, optimisticUpdate, successMessage, successDescription, errorMessage, onSuccess, onError, ...options }: AppMutationOptions<TData, TVariables, TOptimisticData>): import("@tanstack/react-query").UseMutationResult<TData, Error, TVariables, MutationContext<TOptimisticData>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type DefaultLoaderProps = {
|
|
2
|
-
/** Translated loading status for assistive technology; never displayed visually. */
|
|
3
|
-
label?: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function DefaultLoader({ label, className }?: DefaultLoaderProps): import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./setting-list";
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type IconButtonSize } from "@passui/react/icon-button";
|
|
2
|
-
import type { LinkProps } from "@tanstack/react-router";
|
|
3
|
-
import type { ReactNode } from "react";
|
|
4
|
-
type SettingListProps = {
|
|
5
|
-
id?: string;
|
|
6
|
-
/** h3 when the list sits inside an Area that already has the h2. */
|
|
7
|
-
as?: "h2" | "h3";
|
|
8
|
-
/** A Glyph beside the heading; rows themselves stay plain. */
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
title?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
/** Right of the heading: an Add button, or a Coming soon badge. */
|
|
13
|
-
action?: ReactNode;
|
|
14
|
-
/** "tile": the rounded, lifted card of the account app's overview. */
|
|
15
|
-
variant?: "inset" | "tile";
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
className?: string;
|
|
18
|
-
};
|
|
19
|
-
type RowProps = {
|
|
20
|
-
icon?: ReactNode;
|
|
21
|
-
title: ReactNode;
|
|
22
|
-
description?: ReactNode;
|
|
23
|
-
/** The current value, muted on the right, like "On" or an email. */
|
|
24
|
-
value?: ReactNode;
|
|
25
|
-
trailing?: ReactNode;
|
|
26
|
-
to?: LinkProps["to"];
|
|
27
|
-
params?: LinkProps["params"];
|
|
28
|
-
hash?: string;
|
|
29
|
-
onClick?: () => void;
|
|
30
|
-
/** Show the chevron without a destination, for a preview row. */
|
|
31
|
-
chevron?: boolean;
|
|
32
|
-
tone?: "default" | "destructive";
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* A titled group of settings in one inset card, hairlines between rows
|
|
36
|
-
* (even rows wrapped in a Preview), a soft highlight under the one you point at.
|
|
37
|
-
*/
|
|
38
|
-
export declare function SettingList({ id, as: Heading, icon, title, description, action, variant, children, className, }: SettingListProps): import("react").JSX.Element;
|
|
39
|
-
export declare namespace SettingList {
|
|
40
|
-
export { Row };
|
|
41
|
-
export { Copy };
|
|
42
|
-
}
|
|
43
|
-
declare function Row({ icon, title, description, value, trailing, to, params, hash, onClick, chevron, tone, }: RowProps): import("react").JSX.Element;
|
|
44
|
-
/** A row's trailing copy button; shows a tick for a moment after copying. */
|
|
45
|
-
declare function Copy({ value, label, size, }: {
|
|
46
|
-
value: string;
|
|
47
|
-
label?: string;
|
|
48
|
-
/** Quiet and row-sized by default; any of Passui's icon sizes. */
|
|
49
|
-
size?: IconButtonSize;
|
|
50
|
-
}): import("react").JSX.Element;
|
|
51
|
-
export {};
|