@nasa-jpl/stellar-svelte 2.0.0-alpha.58 → 2.0.0-alpha.60
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/components/ui/form/form-description.svelte.d.ts +2 -2
- package/dist/components/ui/form/form-field.svelte +7 -5
- package/dist/components/ui/form/form-field.svelte.d.ts +7 -4
- package/dist/components/ui/form/index.d.ts +2 -0
- package/dist/components/ui/form/index.js +2 -0
- package/dist/index.css +0 -5
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
import type {
|
|
3
|
+
import type { FormSize } from '../../../../../../react/dist/index.js';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: HTMLAttributes<HTMLSpanElement> & {
|
|
6
|
-
size?:
|
|
6
|
+
size?: FormSize;
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
9
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script generics="T extends Record<string, unknown>, U extends FormPath<T>">import
|
|
4
|
-
import
|
|
3
|
+
<script generics="T extends Record<string, unknown>, U extends FormPath<T>">import { cn } from "../../../utils.js";
|
|
4
|
+
import * as FormPrimitive from "formsnap";
|
|
5
|
+
import { formVariants } from "./index.js";
|
|
5
6
|
export let form;
|
|
6
7
|
export let name;
|
|
8
|
+
export let size = "default";
|
|
7
9
|
let className = void 0;
|
|
8
10
|
export { className as class };
|
|
9
11
|
</script>
|
|
10
12
|
|
|
11
13
|
<FormPrimitive.Field {form} {name} let:constraints let:errors let:tainted let:value>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
<div class={cn(formVariants.size[size].field, className)}>
|
|
15
|
+
<slot {constraints} {errors} {tainted} {value} />
|
|
16
|
+
</div>
|
|
15
17
|
</FormPrimitive.Field>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { FormPath } from
|
|
3
|
-
import type {
|
|
4
|
-
import * as FormPrimitive from
|
|
2
|
+
import type { FormPath } from 'sveltekit-superforms';
|
|
3
|
+
import type { FormSize } from '../../../../../../react/dist/index.js';
|
|
4
|
+
import * as FormPrimitive from 'formsnap';
|
|
5
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
6
|
declare class __sveltets_Render<T extends Record<string, unknown>, U extends FormPath<T>> {
|
|
6
|
-
props(): FormPrimitive.FieldProps<T, U> & HTMLAttributes<HTMLElement
|
|
7
|
+
props(): FormPrimitive.FieldProps<T, U> & HTMLAttributes<HTMLElement> & {
|
|
8
|
+
size?: FormSize;
|
|
9
|
+
};
|
|
7
10
|
events(): {} & {
|
|
8
11
|
[evt: string]: CustomEvent<any>;
|
|
9
12
|
};
|
|
@@ -14,11 +14,13 @@ const formVariants = {
|
|
|
14
14
|
description: 'text-sm font-medium',
|
|
15
15
|
legend: 'text-sm font-medium',
|
|
16
16
|
errors: 'text-sm font-medium',
|
|
17
|
+
field: 'space-y-2',
|
|
17
18
|
},
|
|
18
19
|
sm: {
|
|
19
20
|
description: 'text-xs font-normal',
|
|
20
21
|
legend: 'text-xs font-normal',
|
|
21
22
|
errors: 'text-xs font-normal',
|
|
23
|
+
field: 'space-y-1',
|
|
22
24
|
},
|
|
23
25
|
},
|
|
24
26
|
};
|
package/dist/index.css
CHANGED
package/package.json
CHANGED
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
"svelte": "./dist/index.js",
|
|
84
84
|
"type": "module",
|
|
85
85
|
"types": "./dist/index.d.ts",
|
|
86
|
-
"version": "2.0.0-alpha.
|
|
87
|
-
"gitHead": "
|
|
86
|
+
"version": "2.0.0-alpha.60",
|
|
87
|
+
"gitHead": "89a4cde8a43193e235a82f98bc4c6beac14d5f69"
|
|
88
88
|
}
|