lutra 0.0.19 → 0.0.33
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/color.css +0 -0
- package/dist/display/Avatar.svelte +1 -1
- package/dist/display/Avatar.svelte.d.ts +18 -22
- package/dist/display/Badge.svelte +2 -4
- package/dist/display/Badge.svelte.d.ts +28 -32
- package/dist/display/Callout.svelte +8 -8
- package/dist/display/Callout.svelte.d.ts +27 -35
- package/dist/display/Close.svelte.d.ts +17 -20
- package/dist/display/Code.svelte +26 -31
- package/dist/display/Code.svelte.d.ts +31 -30
- package/dist/display/ContextTip.svelte +2 -5
- package/dist/display/ContextTip.svelte.d.ts +16 -20
- package/dist/display/DataList.svelte +16 -0
- package/dist/display/DataList.svelte.d.ts +21 -0
- package/dist/display/Details.svelte.d.ts +25 -30
- package/dist/display/Hero.svelte.d.ts +24 -28
- package/dist/display/Icon.svelte +3 -4
- package/dist/display/Icon.svelte.d.ts +18 -23
- package/dist/display/IconButton.svelte +12 -5
- package/dist/display/IconButton.svelte.d.ts +26 -29
- package/dist/display/Image.svelte.d.ts +25 -36
- package/dist/display/Indicator.svelte.d.ts +21 -22
- package/dist/display/Inset.svelte.d.ts +16 -20
- package/dist/display/LineChart.svelte +385 -0
- package/dist/display/LineChart.svelte.d.ts +24 -0
- package/dist/display/LoadingIndicator.svelte +33 -0
- package/dist/display/LoadingIndicator.svelte.d.ts +15 -0
- package/dist/display/Modal.svelte +116 -0
- package/dist/display/Modal.svelte.d.ts +27 -0
- package/dist/display/Notification.svelte.d.ts +22 -41
- package/dist/display/Panel.svelte +23 -0
- package/dist/display/Panel.svelte.d.ts +19 -0
- package/dist/display/Popup.svelte.d.ts +23 -28
- package/dist/{data → display}/Stat.svelte +9 -17
- package/dist/display/Stat.svelte.d.ts +30 -0
- package/dist/display/Table.svelte +14 -10
- package/dist/display/Table.svelte.d.ts +22 -32
- package/dist/display/TablePaginator.svelte +51 -0
- package/dist/display/TablePaginator.svelte.d.ts +21 -0
- package/dist/display/Tag.svelte.d.ts +29 -32
- package/dist/display/Tooltip.svelte +5 -4
- package/dist/display/Tooltip.svelte.d.ts +21 -26
- package/dist/display/chart.d.ts +78 -0
- package/dist/display/chart.js +212 -0
- package/dist/display/index.d.ts +11 -1
- package/dist/display/index.js +11 -1
- package/dist/display/notifications.svelte.d.ts +3 -3
- package/dist/display/notifications.svelte.js +2 -2
- package/dist/form/Button.svelte +7 -2
- package/dist/form/Button.svelte.d.ts +25 -35
- package/dist/form/FieldActions.svelte +25 -3
- package/dist/form/FieldActions.svelte.d.ts +18 -22
- package/dist/form/FieldContainer.svelte +1 -1
- package/dist/form/FieldContainer.svelte.d.ts +17 -22
- package/dist/form/FieldContent.svelte +52 -33
- package/dist/form/FieldContent.svelte.d.ts +28 -56
- package/dist/form/FieldError.svelte.d.ts +17 -20
- package/dist/form/FieldSection.svelte.d.ts +18 -32
- package/dist/form/Fieldset.svelte.d.ts +29 -40
- package/dist/form/Form.svelte +55 -16
- package/dist/form/Form.svelte.d.ts +36 -31
- package/dist/form/ImageUpload.svelte +259 -0
- package/dist/form/ImageUpload.svelte.d.ts +31 -0
- package/dist/form/Input.svelte +192 -153
- package/dist/form/Input.svelte.d.ts +115 -140
- package/dist/form/InputLength.svelte.d.ts +19 -20
- package/dist/form/Label.svelte +21 -4
- package/dist/form/Label.svelte.d.ts +24 -30
- package/dist/form/LogoUpload.svelte +100 -0
- package/dist/form/LogoUpload.svelte.d.ts +29 -0
- package/dist/form/Select.svelte +84 -36
- package/dist/form/Select.svelte.d.ts +69 -96
- package/dist/form/Textarea.svelte +163 -0
- package/dist/form/Textarea.svelte.d.ts +108 -0
- package/dist/form/Toggle.svelte +2 -0
- package/dist/form/Toggle.svelte.d.ts +15 -0
- package/dist/form/client.svelte.d.ts +8 -9
- package/dist/form/client.svelte.js +18 -10
- package/dist/form/form.d.ts +6 -4
- package/dist/form/form.js +23 -9
- package/dist/form/index.d.ts +6 -3
- package/dist/form/index.js +6 -3
- package/dist/form/types.d.ts +11 -1
- package/dist/icons/IconAlert.svelte.d.ts +23 -0
- package/dist/icons/{Copy.svelte → IconCopy.svelte} +1 -1
- package/dist/icons/IconCopy.svelte.d.ts +23 -0
- package/dist/icons/IconDone.svelte.d.ts +23 -0
- package/dist/icons/IconError.svelte.d.ts +23 -0
- package/dist/icons/IconHelp.svelte.d.ts +23 -0
- package/dist/icons/IconHide.svelte.d.ts +23 -0
- package/dist/icons/IconInfo.svelte.d.ts +23 -0
- package/dist/icons/IconLink.svelte.d.ts +23 -0
- package/dist/icons/IconMenuBurger.svelte.d.ts +23 -0
- package/dist/icons/IconMenuDots.svelte.d.ts +23 -0
- package/dist/icons/IconSearch.svelte +3 -0
- package/dist/icons/IconSearch.svelte.d.ts +23 -0
- package/dist/icons/IconShow.svelte.d.ts +23 -0
- package/dist/icons/IconSuccess.svelte.d.ts +23 -0
- package/dist/icons/IconWarning.svelte.d.ts +23 -0
- package/dist/icons/index.d.ts +14 -11
- package/dist/icons/index.js +14 -11
- package/dist/layout/Layout.svelte +7 -5
- package/dist/layout/Layout.svelte.d.ts +19 -22
- package/dist/layout/LayoutFooter.svelte.d.ts +17 -18
- package/dist/layout/LayoutGrid.svelte.d.ts +25 -36
- package/dist/layout/LayoutHeader.svelte +3 -0
- package/dist/layout/LayoutHeader.svelte.d.ts +33 -38
- package/dist/layout/LayoutSideMenu.svelte +18 -17
- package/dist/layout/LayoutSideMenu.svelte.d.ts +18 -22
- package/dist/layout/Overlay.svelte.d.ts +22 -32
- package/dist/layout/OverlayContainer.svelte.d.ts +14 -15
- package/dist/layout/OverlayLayer.svelte +6 -11
- package/dist/layout/OverlayLayer.svelte.d.ts +17 -20
- package/dist/layout/PageContent.svelte +9 -24
- package/dist/layout/PageContent.svelte.d.ts +23 -26
- package/dist/layout/Theme.svelte +19 -4
- package/dist/layout/Theme.svelte.d.ts +17 -22
- package/dist/layout/UIContent.svelte.d.ts +16 -20
- package/dist/layout/index.d.ts +5 -1
- package/dist/layout/index.js +5 -1
- package/dist/layout/overlays.svelte.d.ts +2 -2
- package/dist/nav/Breadcrumb.svelte +1 -1
- package/dist/nav/Breadcrumb.svelte.d.ts +26 -31
- package/dist/nav/Menu.svelte +6 -13
- package/dist/nav/Menu.svelte.d.ts +25 -31
- package/dist/nav/MenuItem.svelte +15 -8
- package/dist/nav/MenuItem.svelte.d.ts +20 -24
- package/dist/nav/MenuTypes.d.ts +7 -7
- package/dist/nav/NavMenu.svelte +7 -9
- package/dist/nav/NavMenu.svelte.d.ts +17 -18
- package/dist/nav/TabbedContent.svelte +1 -1
- package/dist/nav/TabbedContent.svelte.d.ts +21 -22
- package/dist/nav/Tabs.svelte +53 -13
- package/dist/nav/Tabs.svelte.d.ts +24 -25
- package/dist/nav/index.d.ts +2 -1
- package/dist/nav/index.js +2 -1
- package/dist/style.css +176 -79
- package/dist/typo/Clamp.svelte.d.ts +22 -26
- package/dist/typo/H.svelte.d.ts +26 -30
- package/dist/typo/H1.svelte.d.ts +24 -28
- package/dist/typo/H2.svelte.d.ts +24 -28
- package/dist/typo/H3.svelte.d.ts +24 -28
- package/dist/typo/H4.svelte.d.ts +24 -28
- package/dist/typo/H5.svelte.d.ts +24 -28
- package/dist/typo/H6.svelte.d.ts +24 -28
- package/dist/typo/P.svelte.d.ts +24 -28
- package/dist/utils/StringOrComponent.svelte +14 -0
- package/dist/utils/StringOrComponent.svelte.d.ts +19 -0
- package/dist/utils/StringOrSnippet.svelte +11 -0
- package/dist/utils/StringOrSnippet.svelte.d.ts +19 -0
- package/dist/utils/color.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/isSnippet.d.ts +3 -5
- package/dist/utils/isSnippet.js +9 -4
- package/package.json +32 -25
- package/dist/data/Stat.svelte.d.ts +0 -39
- package/dist/data/index.d.ts +0 -1
- package/dist/data/index.js +0 -1
- package/dist/grid/Column.svelte +0 -11
- package/dist/grid/Column.svelte.d.ts +0 -22
- package/dist/grid/Grid.svelte +0 -19
- package/dist/grid/Grid.svelte.d.ts +0 -24
- package/dist/grid/Row.svelte +0 -44
- package/dist/grid/Row.svelte.d.ts +0 -24
- package/dist/icons/Alert.svelte.d.ts +0 -23
- package/dist/icons/Copy.svelte.d.ts +0 -23
- package/dist/icons/Done.svelte.d.ts +0 -23
- package/dist/icons/Error.svelte.d.ts +0 -23
- package/dist/icons/Help.svelte.d.ts +0 -23
- package/dist/icons/Hide.svelte.d.ts +0 -23
- package/dist/icons/Info.svelte.d.ts +0 -23
- package/dist/icons/Link.svelte.d.ts +0 -23
- package/dist/icons/MenuBurger.svelte.d.ts +0 -23
- package/dist/icons/MenuDots.svelte.d.ts +0 -23
- package/dist/icons/Show.svelte.d.ts +0 -23
- package/dist/icons/Success.svelte.d.ts +0 -23
- package/dist/icons/Warning.svelte.d.ts +0 -23
- package/dist/utils/StringOrComponentOrSnippet.svelte +0 -14
- package/dist/utils/StringOrComponentOrSnippet.svelte.d.ts +0 -24
- /package/dist/icons/{Alert.svelte → IconAlert.svelte} +0 -0
- /package/dist/icons/{Done.svelte → IconDone.svelte} +0 -0
- /package/dist/icons/{Error.svelte → IconError.svelte} +0 -0
- /package/dist/icons/{Help.svelte → IconHelp.svelte} +0 -0
- /package/dist/icons/{Hide.svelte → IconHide.svelte} +0 -0
- /package/dist/icons/{Info.svelte → IconInfo.svelte} +0 -0
- /package/dist/icons/{Link.svelte → IconLink.svelte} +0 -0
- /package/dist/icons/{MenuBurger.svelte → IconMenuBurger.svelte} +0 -0
- /package/dist/icons/{MenuDots.svelte → IconMenuDots.svelte} +0 -0
- /package/dist/icons/{Show.svelte → IconShow.svelte} +0 -0
- /package/dist/icons/{Success.svelte → IconSuccess.svelte} +0 -0
- /package/dist/icons/{Warning.svelte → IconWarning.svelte} +0 -0
@@ -4,16 +4,15 @@
|
|
4
4
|
* @returns
|
5
5
|
*/
|
6
6
|
export function useForm(form) {
|
7
|
-
let _form = Object.assign({
|
7
|
+
let _form = Object.assign(form, {
|
8
8
|
originalData: JSON.parse(JSON.stringify(form.data ?? {})),
|
9
9
|
data: form.data ?? {},
|
10
|
-
|
10
|
+
state: 'idle',
|
11
|
+
});
|
11
12
|
// Have to declare a variable separately to use in the return object
|
12
13
|
// as the compiler is looking for a declaration.
|
13
14
|
let __form = $state(_form);
|
14
|
-
return
|
15
|
-
form: __form,
|
16
|
-
};
|
15
|
+
return __form;
|
17
16
|
}
|
18
17
|
/**
|
19
18
|
* Validate a single field.
|
@@ -25,7 +24,7 @@ export function useForm(form) {
|
|
25
24
|
export function fieldValidate(form, name, el, validator) {
|
26
25
|
if (!validator)
|
27
26
|
return;
|
28
|
-
const result = validator.safeParse(el
|
27
|
+
const result = validator.safeParse(getTypedValue(el));
|
29
28
|
if (result.success) {
|
30
29
|
form.issues = (form.issues || []).filter((issue) => issue.name !== name);
|
31
30
|
form.valid = form.issues.length === 0;
|
@@ -63,6 +62,13 @@ export function fieldKeydown(form, name, el, validator, onkeydown) {
|
|
63
62
|
return onkeydown(e);
|
64
63
|
};
|
65
64
|
}
|
65
|
+
function getTypedValue(el) {
|
66
|
+
if (el?.type === 'number')
|
67
|
+
return parseFloat(el.value);
|
68
|
+
if (el?.type === 'checkbox')
|
69
|
+
return el.checked;
|
70
|
+
return el?.value;
|
71
|
+
}
|
66
72
|
/**
|
67
73
|
* Change event handler for a field.
|
68
74
|
* @param {Event} e - The event.
|
@@ -74,10 +80,12 @@ export function fieldKeydown(form, name, el, validator, onkeydown) {
|
|
74
80
|
*/
|
75
81
|
export function fieldChange(form, name, el, validator, onchange) {
|
76
82
|
return async function (e) {
|
77
|
-
if (form) {
|
78
|
-
console.log('fieldChange', name, el()?.value,
|
79
|
-
form
|
80
|
-
form.
|
83
|
+
if (form && form.fields[name]) {
|
84
|
+
console.log('fieldChange', name, el()?.value, form.data[name]);
|
85
|
+
// Update the form data with the new value.
|
86
|
+
form.data[name] = getTypedValue(el());
|
87
|
+
// if the value is the same as the original value, then the field is not tainted
|
88
|
+
form.fields[name].tainted = form.data[name] !== form.originalData[name];
|
81
89
|
fieldValidate(form, name, el(), validator);
|
82
90
|
}
|
83
91
|
if (onchange)
|
package/dist/form/form.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Bodyguard, type BodyguardFormConfig, type BodyguardResult, type GenericIssue, type JSONLike } from "@auth70/bodyguard";
|
2
2
|
import type { RequestEvent } from "@sveltejs/kit";
|
3
3
|
import type { ZodType, infer as Infer } from "zod";
|
4
|
-
import type {
|
4
|
+
import type { LutraForm, FormField, FormIssue, ZodTypes } from "./types.js";
|
5
5
|
export declare const bodyguard: Bodyguard;
|
6
6
|
/**
|
7
7
|
* Get fields from a Zod schema.
|
@@ -13,10 +13,11 @@ export declare function getFieldsFromSchema(schema: ZodType, data?: BodyguardRes
|
|
13
13
|
* Server page load call. Optionally with a default object to populate the form with from locals.
|
14
14
|
* @param {ZodType} schema - The schema to parse the form with.
|
15
15
|
* @param {RequestEvent} event - The event to load the (possible) form from.
|
16
|
+
* @param {JSONLike | string} objOrName - The default object to populate the form with, or the name of the object in locals.
|
16
17
|
* @param {JSONLike} obj - The default object to populate the form with.
|
17
18
|
* @returns {Promise<Form<Z>>} - The form to use.
|
18
19
|
*/
|
19
|
-
export declare function loadForm<Z extends ZodTypes>(schema: Z, event: RequestEvent, obj?: JSONLike): Promise<
|
20
|
+
export declare function loadForm<Z extends ZodTypes>(schema: Z, event: RequestEvent, objOrName?: JSONLike | string, obj?: JSONLike): Promise<LutraForm<Z>>;
|
20
21
|
/**
|
21
22
|
* Parse zod issues into form issues (with a path string).
|
22
23
|
* @param {ZodIssue[]} issues - The issues to parse.
|
@@ -27,10 +28,11 @@ export declare function parseFormIssues(issues: GenericIssue[]): FormIssue[];
|
|
27
28
|
* Parse a form using a schema.
|
28
29
|
* @param {ZodType} schema - The schema to parse the form with.
|
29
30
|
* @param {Request} request - The request to parse.
|
31
|
+
* @param {BodyguardFormConfig | string} optsOrName - The options for the form validation, or the name of the form in locals.
|
30
32
|
* @param {BodyguardFormConfig} opts - The options for the form validation.
|
31
33
|
* @returns {Promise<{ valid: false } | { valid: true, data: Infer<Z> }>} - The result of the form validation.
|
32
34
|
*/
|
33
|
-
export declare function parseForm<Z extends ZodType>(schema: Z, event: RequestEvent, opts?: BodyguardFormConfig): Promise<
|
35
|
+
export declare function parseForm<Z extends ZodType>(schema: Z, event: RequestEvent, optsOrName?: BodyguardFormConfig | string, opts?: BodyguardFormConfig): Promise<LutraForm<Z>>;
|
34
36
|
/**
|
35
37
|
* Convert an array path from a Zod issue to a string path for a form field.
|
36
38
|
* @param {(string | number)[]} path - The path to convert.
|
@@ -49,4 +51,4 @@ export declare function getFromObjWithStringPath(obj: any, path: string): string
|
|
49
51
|
* @param {Form} form - The form to get the validators from.
|
50
52
|
* @returns {Record<keyof Infer<T>, (value: any) => boolean>} - The validators for each field.
|
51
53
|
*/
|
52
|
-
export declare function getIndividualValidators<T extends ZodTypes>(form?:
|
54
|
+
export declare function getIndividualValidators<T extends ZodTypes>(form?: LutraForm<T>): Record<keyof Infer<T>, (value: any) => boolean>;
|
package/dist/form/form.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Bodyguard } from "@auth70/bodyguard";
|
2
|
-
import { ZodArray, ZodNullable, ZodOptional, ZodEffects, ZodObject, ZodDefault, ZodString, ZodNumber, ZodBoolean, ZodDate
|
2
|
+
import { ZodArray, ZodNullable, ZodOptional, ZodEffects, ZodObject, ZodDefault, ZodString, ZodNumber, ZodBoolean, ZodDate } from "zod";
|
3
3
|
import { zerialize, dezerialize } from "@auth70/zodex-esm";
|
4
4
|
export const bodyguard = new Bodyguard();
|
5
5
|
/**
|
@@ -152,13 +152,16 @@ export function getFieldsFromSchema(schema, data, parents) {
|
|
152
152
|
* Server page load call. Optionally with a default object to populate the form with from locals.
|
153
153
|
* @param {ZodType} schema - The schema to parse the form with.
|
154
154
|
* @param {RequestEvent} event - The event to load the (possible) form from.
|
155
|
+
* @param {JSONLike | string} objOrName - The default object to populate the form with, or the name of the object in locals.
|
155
156
|
* @param {JSONLike} obj - The default object to populate the form with.
|
156
157
|
* @returns {Promise<Form<Z>>} - The form to use.
|
157
158
|
*/
|
158
|
-
export async function loadForm(schema, event, obj) {
|
159
|
-
|
160
|
-
|
161
|
-
|
159
|
+
export async function loadForm(schema, event, objOrName = 'form', obj) {
|
160
|
+
let name = typeof objOrName === 'string' ? objOrName : 'form';
|
161
|
+
let _obj = typeof objOrName === 'string' ? obj : objOrName;
|
162
|
+
// If there is a form in locals, it's been passed down from a form action using parseForm. Return it.
|
163
|
+
if (event.locals[name]) {
|
164
|
+
return Promise.resolve(event.locals[name]);
|
162
165
|
}
|
163
166
|
// Serialize the schema to send over the wire.
|
164
167
|
const serializedSchema = zerialize(schema);
|
@@ -167,15 +170,17 @@ export async function loadForm(schema, event, obj) {
|
|
167
170
|
// Create the form object.
|
168
171
|
const form = event.locals.form;
|
169
172
|
return {
|
173
|
+
name,
|
170
174
|
valid: form ? form.valid : (obj ? true : false),
|
171
175
|
tainted: form ? form.tainted : false,
|
172
176
|
schema: serializedSchema,
|
173
177
|
posted: form ? form.posted : false,
|
178
|
+
state: form ? form.state : 'idle',
|
174
179
|
fields,
|
175
180
|
data: Object.assign(Object.fromEntries(Object.entries(fields).map(([key, value]) => {
|
176
181
|
// If the key is in the passed object, use that value. Otherwise, try to use the default value.
|
177
182
|
return [key, value.defaultValue];
|
178
|
-
})),
|
183
|
+
})), _obj ? _obj : {}),
|
179
184
|
};
|
180
185
|
}
|
181
186
|
/**
|
@@ -195,10 +200,13 @@ export function parseFormIssues(issues) {
|
|
195
200
|
* Parse a form using a schema.
|
196
201
|
* @param {ZodType} schema - The schema to parse the form with.
|
197
202
|
* @param {Request} request - The request to parse.
|
203
|
+
* @param {BodyguardFormConfig | string} optsOrName - The options for the form validation, or the name of the form in locals.
|
198
204
|
* @param {BodyguardFormConfig} opts - The options for the form validation.
|
199
205
|
* @returns {Promise<{ valid: false } | { valid: true, data: Infer<Z> }>} - The result of the form validation.
|
200
206
|
*/
|
201
|
-
export async function parseForm(schema, event, opts) {
|
207
|
+
export async function parseForm(schema, event, optsOrName = 'form', opts) {
|
208
|
+
let name = typeof optsOrName === 'string' ? optsOrName : 'form';
|
209
|
+
opts = typeof optsOrName === 'string' ? opts : optsOrName;
|
202
210
|
// Use bodyguard to parse the form.
|
203
211
|
const data = await bodyguard.softForm(event.request, schema.parse, opts);
|
204
212
|
// Get the fields from the schema.
|
@@ -207,8 +215,10 @@ export async function parseForm(schema, event, opts) {
|
|
207
215
|
const serializedSchema = zerialize(schema);
|
208
216
|
// Create the form object.
|
209
217
|
const form = {
|
218
|
+
name: name,
|
210
219
|
valid: data.success,
|
211
220
|
tainted: !data.success,
|
221
|
+
state: data.success ? 'success' : 'error',
|
212
222
|
schema: serializedSchema,
|
213
223
|
posted: true,
|
214
224
|
fields: Object.fromEntries(Object.entries(fields).map(([key, field]) => {
|
@@ -218,11 +228,14 @@ export async function parseForm(schema, event, opts) {
|
|
218
228
|
tainted: data.success ? false : data.value.hasOwnProperty(key),
|
219
229
|
}];
|
220
230
|
})),
|
221
|
-
|
231
|
+
// ensure all fields are present by populating `data` from `fields` instead of trusting `data` to have all fields
|
232
|
+
data: Object.assign(Object.fromEntries(Object.entries(fields).map(([key, value]) => {
|
233
|
+
return [key, value.isArray ? (data.value[key] || []) : (data.value[key] !== undefined ? data.value[key] : (value.defaultValue ?? null))];
|
234
|
+
})), data.value),
|
222
235
|
issues: data.success ? undefined : parseFormIssues(data.error.issues),
|
223
236
|
};
|
224
237
|
// Attach the form to the locals to pass it to the client via loadForm.
|
225
|
-
event.locals
|
238
|
+
event.locals[name] = form;
|
226
239
|
return form;
|
227
240
|
}
|
228
241
|
/**
|
@@ -307,6 +320,7 @@ export function getIndividualValidators(form) {
|
|
307
320
|
return {};
|
308
321
|
const schema = form.schema;
|
309
322
|
const fields = form.fields;
|
323
|
+
//console.log('[lutra] getIndividualValidators:', schema, fields, form)
|
310
324
|
if (!schema || !fields) {
|
311
325
|
console.error('[lutra] getIndividualValidators: Schema or fields not found:', schema, fields);
|
312
326
|
return {};
|
package/dist/form/index.d.ts
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
export { default as Button } from './Button.svelte';
|
2
|
-
export { default as FieldContainer } from './FieldContainer.svelte';
|
3
|
-
export { default as FieldSection } from './FieldSection.svelte';
|
4
2
|
export { default as FieldActions } from './FieldActions.svelte';
|
5
|
-
export { default as
|
3
|
+
export { default as FieldContainer } from './FieldContainer.svelte';
|
6
4
|
export { default as FieldContent } from './FieldContent.svelte';
|
5
|
+
export { default as FieldError } from './FieldError.svelte';
|
6
|
+
export { default as FieldSection } from './FieldSection.svelte';
|
7
7
|
export { default as Fieldset } from './Fieldset.svelte';
|
8
8
|
export { default as Form } from './Form.svelte';
|
9
|
+
export { default as ImageUpload } from './ImageUpload.svelte';
|
9
10
|
export { default as Input } from './Input.svelte';
|
10
11
|
export { default as InputLength } from './InputLength.svelte';
|
11
12
|
export { default as Label } from './Label.svelte';
|
13
|
+
export { default as LogoUpload } from './LogoUpload.svelte';
|
12
14
|
export { default as Select } from './Select.svelte';
|
15
|
+
export { default as Textarea } from './Textarea.svelte';
|
13
16
|
export * from './types.js';
|
14
17
|
export * from './form.js';
|
15
18
|
export * from './client.svelte.js';
|
package/dist/form/index.js
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
export { default as Button } from './Button.svelte';
|
2
|
-
export { default as FieldContainer } from './FieldContainer.svelte';
|
3
|
-
export { default as FieldSection } from './FieldSection.svelte';
|
4
2
|
export { default as FieldActions } from './FieldActions.svelte';
|
5
|
-
export { default as
|
3
|
+
export { default as FieldContainer } from './FieldContainer.svelte';
|
6
4
|
export { default as FieldContent } from './FieldContent.svelte';
|
5
|
+
export { default as FieldError } from './FieldError.svelte';
|
6
|
+
export { default as FieldSection } from './FieldSection.svelte';
|
7
7
|
export { default as Fieldset } from './Fieldset.svelte';
|
8
8
|
export { default as Form } from './Form.svelte';
|
9
|
+
export { default as ImageUpload } from './ImageUpload.svelte';
|
9
10
|
export { default as Input } from './Input.svelte';
|
10
11
|
export { default as InputLength } from './InputLength.svelte';
|
11
12
|
export { default as Label } from './Label.svelte';
|
13
|
+
export { default as LogoUpload } from './LogoUpload.svelte';
|
12
14
|
export { default as Select } from './Select.svelte';
|
15
|
+
export { default as Textarea } from './Textarea.svelte';
|
13
16
|
export * from './types.js';
|
14
17
|
export * from './form.js';
|
15
18
|
export * from './client.svelte.js';
|
package/dist/form/types.d.ts
CHANGED
@@ -3,6 +3,12 @@ import type { ZodType, infer as Infer, ZodTuple, ZodBigInt, ZodNaN, ZodSet, ZodV
|
|
3
3
|
export type Autocomplete = 'on' | 'off' | AutocompleteSingleToken | AutocompleteBilling | AutocompleteShipping;
|
4
4
|
export type AutocompleteBilling = 'billing' | `billing ${AutocompleteSingleToken}`;
|
5
5
|
export type AutocompleteShipping = 'shipping' | `shipping ${AutocompleteSingleToken}`;
|
6
|
+
export type BeforeSubmitFn = (opts: {
|
7
|
+
form: HTMLFormElement;
|
8
|
+
data: FormData;
|
9
|
+
cancel: () => void;
|
10
|
+
}) => void | Promise<void>;
|
11
|
+
export type AddBeforeSubmitFn = (id: string, fn: BeforeSubmitFn) => void;
|
6
12
|
export type AutocompleteSingleToken = `section-${string}` | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo" | "webauthn";
|
7
13
|
export type Modifiers = ZodOptional<ZodTypes> | ZodNullable<ZodTypes> | ZodDefault<ZodTypes>;
|
8
14
|
export type Primitives = ZodString | ZodNumber | ZodNaN | ZodBigInt | ZodBoolean | ZodDate | ZodUndefined | ZodNull | ZodAny | ZodUnknown | ZodNever | ZodVoid;
|
@@ -16,7 +22,9 @@ export type ZTypeName<T extends ZodTypes> = T["_def"]["typeName"];
|
|
16
22
|
export type FormIssue = GenericIssue & {
|
17
23
|
name: string;
|
18
24
|
};
|
19
|
-
export type
|
25
|
+
export type LutraForm<T extends ZodType<any, any>> = {
|
26
|
+
/** The name of the form. */
|
27
|
+
name: string;
|
20
28
|
/** Whether the form is valid. */
|
21
29
|
valid: boolean;
|
22
30
|
/** Whether the user has interacted with the form. */
|
@@ -33,6 +41,8 @@ export type Form<T extends ZodType<any, any>> = {
|
|
33
41
|
originalData?: Infer<T>;
|
34
42
|
/** The issues of the form. */
|
35
43
|
issues?: FormIssue[];
|
44
|
+
/** The state of the form. */
|
45
|
+
state: 'idle' | 'loading' | 'success' | 'error';
|
36
46
|
};
|
37
47
|
export type FormField = {
|
38
48
|
name: string;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconAlert;
|
2
|
+
type IconAlert = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconAlert: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 16 16">
|
2
2
|
<path fill="currentColor" d="M1.714,0.571C0.772,0.571 0,1.344 0,2.286L0,11.429C0,12.371 0.772,13.143 1.714,13.143L3.429,13.143L3.429,13.714C3.429,14.656 4.201,15.429 5.143,15.429L14.286,15.429C15.228,15.429 16,14.656 16,13.714L16,4.571C16,3.629 15.228,2.857 14.286,2.857L12.571,2.857L12.571,2.286C12.571,1.344 11.799,0.571 10.857,0.571L1.714,0.571ZM12.571,4L14.286,4C14.607,4 14.857,4.25 14.857,4.571L14.857,13.714C14.857,14.036 14.607,14.286 14.286,14.286L5.143,14.286C4.821,14.286 4.571,14.036 4.571,13.714L4.571,13.143L10.857,13.143C11.799,13.143 12.571,12.371 12.571,11.429L12.571,4ZM1.714,1.714L10.857,1.714C11.179,1.714 11.429,1.964 11.429,2.286L11.429,11.429C11.429,11.75 11.179,12 10.857,12L1.714,12C1.393,12 1.143,11.75 1.143,11.429L1.143,2.286C1.143,1.964 1.393,1.714 1.714,1.714Z" />
|
3
|
-
</svg>
|
3
|
+
</svg>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconCopy;
|
2
|
+
type IconCopy = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconCopy: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconDone;
|
2
|
+
type IconDone = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconDone: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconError;
|
2
|
+
type IconError = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconError: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconHelp;
|
2
|
+
type IconHelp = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconHelp: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconHide;
|
2
|
+
type IconHide = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconHide: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconInfo;
|
2
|
+
type IconInfo = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconInfo: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconLink;
|
2
|
+
type IconLink = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconLink: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconMenuBurger;
|
2
|
+
type IconMenuBurger = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconMenuBurger: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconMenuDots;
|
2
|
+
type IconMenuDots = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconMenuDots: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 16 16">
|
2
|
+
<path fill="currentColor" d="M10.453,-0C7.395,-0 4.906,2.489 4.906,5.547C4.906,6.852 5.378,8.041 6.139,8.989L0.005,15.124L0.871,16L7.01,9.861C7.959,10.622 9.148,11.094 10.453,11.094C13.51,11.094 16,8.604 16,5.547C16,2.489 13.51,-0 10.453,-0ZM10.453,1.233C12.841,1.233 14.767,3.159 14.767,5.547C14.767,7.935 12.841,9.861 10.453,9.861C8.065,9.861 6.139,7.935 6.139,5.547C6.139,3.159 8.065,1.233 10.453,1.233Z" />
|
3
|
+
</svg>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconSearch;
|
2
|
+
type IconSearch = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconSearch: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconShow;
|
2
|
+
type IconShow = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconShow: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconSuccess;
|
2
|
+
type IconSuccess = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconSuccess: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default IconWarning;
|
2
|
+
type IconWarning = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string | undefined;
|
8
|
+
};
|
9
|
+
declare const IconWarning: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports;
|
22
|
+
z_$$bindings?: Bindings;
|
23
|
+
}
|