@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.
@@ -1,9 +1,9 @@
1
1
  import { SvelteComponent } from "svelte";
2
2
  import type { HTMLAttributes } from 'svelte/elements';
3
- import type { LabelSize } from '../label/index.js';
3
+ import type { FormSize } from '../../../../../../react/dist/index.js';
4
4
  declare const __propDef: {
5
5
  props: HTMLAttributes<HTMLSpanElement> & {
6
- size?: LabelSize;
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 * as FormPrimitive from "formsnap";
4
- import { cn } from "../../../utils.js";
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
- <div class={cn("space-y-2", className)}>
13
- <slot {constraints} {errors} {tainted} {value} />
14
- </div>
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 "sveltekit-superforms";
3
- import type { HTMLAttributes } from "svelte/elements";
4
- import * as FormPrimitive from "formsnap";
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 @@ declare const formVariants: {
14
14
  description: string;
15
15
  legend: string;
16
16
  errors: string;
17
+ field: string;
17
18
  };
18
19
  sm: {
19
20
  description: string;
20
21
  legend: string;
21
22
  errors: string;
23
+ field: string;
22
24
  };
23
25
  };
24
26
  };
@@ -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
@@ -3789,11 +3789,6 @@ body {
3789
3789
  font-size: 3.75rem;
3790
3790
  line-height: 1;
3791
3791
  }
3792
-
3793
- .md\:text-sm {
3794
- font-size: 0.875rem;
3795
- line-height: 1.25rem;
3796
- }
3797
3792
  }
3798
3793
 
3799
3794
  @media (min-width: 1024px) {
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.58",
87
- "gitHead": "b329c68babe1d43f9dae6ce85156b2d9abf5f791"
86
+ "version": "2.0.0-alpha.60",
87
+ "gitHead": "89a4cde8a43193e235a82f98bc4c6beac14d5f69"
88
88
  }