@nasa-jpl/stellar-svelte 2.0.0-alpha.58 → 2.0.0-alpha.61

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
  };
@@ -10,7 +10,7 @@ export let el = void 0;
10
10
 
11
11
  <input
12
12
  class={cn(
13
- 'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex w-full rounded-md border file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50',
13
+ 'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex w-full rounded-md border file:h-full file:leading-none file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50',
14
14
  inputVariants.size[sizeVariant],
15
15
  className,
16
16
  )}
package/dist/index.css CHANGED
@@ -2851,6 +2851,10 @@ body {
2851
2851
 
2852
2852
  /* */
2853
2853
 
2854
+ .file\:h-full::file-selector-button {
2855
+ height: 100%;
2856
+ }
2857
+
2854
2858
  .file\:border-0::file-selector-button {
2855
2859
  border-width: 0px;
2856
2860
  }
@@ -2859,15 +2863,14 @@ body {
2859
2863
  background-color: transparent;
2860
2864
  }
2861
2865
 
2862
- .file\:text-sm::file-selector-button {
2863
- font-size: 0.875rem;
2864
- line-height: 1.25rem;
2865
- }
2866
-
2867
2866
  .file\:font-medium::file-selector-button {
2868
2867
  font-weight: 500;
2869
2868
  }
2870
2869
 
2870
+ .file\:leading-none::file-selector-button {
2871
+ line-height: 1;
2872
+ }
2873
+
2871
2874
  .file\:text-foreground::file-selector-button {
2872
2875
  --tw-text-opacity: 1;
2873
2876
  color: hsl(var(--foreground) / var(--tw-text-opacity, 1));
@@ -3789,11 +3792,6 @@ body {
3789
3792
  font-size: 3.75rem;
3790
3793
  line-height: 1;
3791
3794
  }
3792
-
3793
- .md\:text-sm {
3794
- font-size: 0.875rem;
3795
- line-height: 1.25rem;
3796
- }
3797
3795
  }
3798
3796
 
3799
3797
  @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.61",
87
+ "gitHead": "0f12f8b007b628288b0a13a7f844b95c13cdc169"
88
88
  }