@nasa-jpl/stellar-svelte 2.0.0-alpha.45 → 2.0.0-alpha.47
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/checkbox/checkbox.svelte +23 -20
- package/dist/components/ui/checkbox/checkbox.svelte.d.ts +14 -2
- package/dist/components/ui/checkbox/index.d.ts +9 -2
- package/dist/components/ui/checkbox/index.js +9 -3
- package/dist/components/ui/input/index.d.ts +2 -1
- package/dist/components/ui/input/index.js +1 -0
- package/dist/components/ui/input/input.svelte +2 -2
- package/dist/components/ui/input/input.svelte.d.ts +1 -1
- package/dist/components/ui/label/index.d.ts +9 -2
- package/dist/components/ui/label/index.js +9 -3
- package/dist/components/ui/label/label.svelte +12 -9
- package/dist/components/ui/label/label.svelte.d.ts +8 -2
- package/package.json +4 -7
- package/patches/bits-ui+0.21.16.patch +0 -15
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "bits-ui";
|
|
2
3
|
import Check from "lucide-svelte/icons/check";
|
|
3
4
|
import Minus from "lucide-svelte/icons/minus";
|
|
4
|
-
import {
|
|
5
|
+
import { checkboxVariants } from "./index.js";
|
|
5
6
|
let className = void 0;
|
|
6
7
|
export let checked = false;
|
|
8
|
+
export let size = "default";
|
|
7
9
|
export { className as class };
|
|
8
10
|
</script>
|
|
9
11
|
|
|
10
12
|
<CheckboxPrimitive.Root
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
class={cn(
|
|
14
|
+
'border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer box-content h-4 w-4 shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',
|
|
15
|
+
checkboxVariants.size[size],
|
|
16
|
+
className,
|
|
17
|
+
)}
|
|
18
|
+
bind:checked
|
|
19
|
+
{...$$restProps}
|
|
20
|
+
on:click
|
|
18
21
|
>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
<CheckboxPrimitive.Indicator
|
|
23
|
+
class={cn('flex items-center justify-center text-current', checkboxVariants.size[size])}
|
|
24
|
+
let:isChecked
|
|
25
|
+
let:isIndeterminate
|
|
26
|
+
>
|
|
27
|
+
{#if isChecked}
|
|
28
|
+
<Check class="h-3.5 w-3.5" strokeWidth={3} />
|
|
29
|
+
{:else if isIndeterminate}
|
|
30
|
+
<Minus class="h-3.5 w-3.5" strokeWidth={3} />
|
|
31
|
+
{/if}
|
|
32
|
+
</CheckboxPrimitive.Indicator>
|
|
30
33
|
</CheckboxPrimitive.Root>
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import { Checkbox as CheckboxPrimitive } from
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from 'bits-ui';
|
|
3
|
+
import { type CheckboxSize } from './index.js';
|
|
3
4
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
5
|
+
props: {
|
|
6
|
+
value?: string | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
required?: boolean | undefined;
|
|
10
|
+
checked?: boolean | "indeterminate" | undefined | undefined;
|
|
11
|
+
onCheckedChange?: import("bits-ui/dist/internal/types.js").OnChangeFn<boolean | "indeterminate"> | undefined;
|
|
12
|
+
asChild?: boolean | undefined | undefined;
|
|
13
|
+
el?: HTMLButtonElement | undefined;
|
|
14
|
+
} & import("svelte/elements.js").HTMLButtonAttributes & {
|
|
15
|
+
size?: CheckboxSize;
|
|
16
|
+
};
|
|
5
17
|
slots: {};
|
|
6
18
|
events: CheckboxPrimitive.Events;
|
|
7
19
|
};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import Root from
|
|
2
|
-
export
|
|
1
|
+
import Root from './checkbox.svelte';
|
|
2
|
+
export type CheckboxSize = 'default' | 'sm';
|
|
3
|
+
declare const checkboxVariants: {
|
|
4
|
+
size: {
|
|
5
|
+
default: string;
|
|
6
|
+
sm: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export { Root as Checkbox, checkboxVariants, Root, };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import Root from
|
|
2
|
-
|
|
1
|
+
import Root from './checkbox.svelte';
|
|
2
|
+
const checkboxVariants = {
|
|
3
|
+
size: {
|
|
4
|
+
default: 'h-4 w-4',
|
|
5
|
+
sm: 'h-3 w-3',
|
|
6
|
+
},
|
|
7
|
+
};
|
|
8
|
+
export { Root as Checkbox, checkboxVariants,
|
|
3
9
|
//
|
|
4
|
-
Root
|
|
10
|
+
Root, };
|
|
@@ -20,11 +20,12 @@ export type InputEvents = {
|
|
|
20
20
|
input: FormInputEvent<InputEvent>;
|
|
21
21
|
wheel: FormInputEvent<WheelEvent>;
|
|
22
22
|
};
|
|
23
|
-
export type InputSize = 'default' | 'sm';
|
|
23
|
+
export type InputSize = 'default' | 'sm' | 'xs';
|
|
24
24
|
declare const inputVariants: {
|
|
25
25
|
size: {
|
|
26
26
|
default: string;
|
|
27
27
|
sm: string;
|
|
28
|
+
xs: string;
|
|
28
29
|
};
|
|
29
30
|
};
|
|
30
31
|
export { Root as Input, inputVariants, Root, };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { inputVariants } from "./index.js";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export let value = void 0;
|
|
5
|
-
export let
|
|
5
|
+
export let sizeVariant = "default";
|
|
6
6
|
export { className as class };
|
|
7
7
|
export let readonly = void 0;
|
|
8
8
|
export let el = void 0;
|
|
@@ -11,7 +11,7 @@ export let el = void 0;
|
|
|
11
11
|
<input
|
|
12
12
|
class={cn(
|
|
13
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 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
14
|
-
inputVariants.size[
|
|
14
|
+
inputVariants.size[sizeVariant],
|
|
15
15
|
className,
|
|
16
16
|
)}
|
|
17
17
|
bind:value
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import Root from
|
|
2
|
-
export
|
|
1
|
+
import Root from './label.svelte';
|
|
2
|
+
export type LabelSize = 'default' | 'sm';
|
|
3
|
+
declare const labelVariants: {
|
|
4
|
+
size: {
|
|
5
|
+
default: string;
|
|
6
|
+
sm: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export { Root as Label, labelVariants, Root, };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import Root from
|
|
2
|
-
|
|
1
|
+
import Root from './label.svelte';
|
|
2
|
+
const labelVariants = {
|
|
3
|
+
size: {
|
|
4
|
+
default: 'text-sm font-medium',
|
|
5
|
+
sm: 'text-xs font-normal',
|
|
6
|
+
},
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
3
9
|
//
|
|
4
|
-
Root as Label, };
|
|
10
|
+
Root as Label, labelVariants, Root, };
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Label as LabelPrimitive } from "bits-ui";
|
|
3
|
+
import { labelVariants } from "./index.js";
|
|
3
4
|
let className = void 0;
|
|
5
|
+
export let size = "default";
|
|
4
6
|
export { className as class };
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<LabelPrimitive.Root
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
class={cn(
|
|
11
|
+
'leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
|
12
|
+
labelVariants.size[size],
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...$$restProps}
|
|
16
|
+
on:mousedown
|
|
14
17
|
>
|
|
15
|
-
|
|
18
|
+
<slot />
|
|
16
19
|
</LabelPrimitive.Root>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import { Label as LabelPrimitive } from
|
|
2
|
+
import { Label as LabelPrimitive } from 'bits-ui';
|
|
3
|
+
import { type LabelSize } from './index.js';
|
|
3
4
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
5
|
+
props: {
|
|
6
|
+
asChild?: boolean | undefined | undefined;
|
|
7
|
+
el?: HTMLLabelElement | undefined;
|
|
8
|
+
} & import("svelte/elements.js").HTMLLabelAttributes & {
|
|
9
|
+
size?: LabelSize;
|
|
10
|
+
};
|
|
5
11
|
slots: {
|
|
6
12
|
default: {};
|
|
7
13
|
};
|
package/package.json
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"lucide-svelte": "^0.454.0",
|
|
12
12
|
"mode-watcher": "^0.4.1",
|
|
13
13
|
"paneforge": "^0.0.6",
|
|
14
|
-
"patch-package": "^8.0.0",
|
|
15
14
|
"svelte-sonner": "^0.3.28",
|
|
16
15
|
"sveltekit-superforms": "^2.20.0",
|
|
17
16
|
"tailwind-merge": "^2.3.0",
|
|
@@ -57,8 +56,7 @@
|
|
|
57
56
|
"tailwind.config.ts",
|
|
58
57
|
"src/theme.css",
|
|
59
58
|
"src/font.css",
|
|
60
|
-
"package.json"
|
|
61
|
-
"patches"
|
|
59
|
+
"package.json"
|
|
62
60
|
],
|
|
63
61
|
"license": "ISC",
|
|
64
62
|
"main": "eslint.config.js",
|
|
@@ -80,12 +78,11 @@
|
|
|
80
78
|
"lint": "prettier --check . && eslint .",
|
|
81
79
|
"package": "svelte-kit sync && svelte-package && publint",
|
|
82
80
|
"prepublishOnly": "npm run build",
|
|
83
|
-
"preview": "vite preview"
|
|
84
|
-
"postinstall": "patch-package"
|
|
81
|
+
"preview": "vite preview"
|
|
85
82
|
},
|
|
86
83
|
"svelte": "./dist/index.js",
|
|
87
84
|
"type": "module",
|
|
88
85
|
"types": "./dist/index.d.ts",
|
|
89
|
-
"version": "2.0.0-alpha.
|
|
90
|
-
"gitHead": "
|
|
86
|
+
"version": "2.0.0-alpha.47",
|
|
87
|
+
"gitHead": "1ec15aefb21679e7bad4be51f790f5b01bb3caf8"
|
|
91
88
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/bits-ui/package.json b/node_modules/bits-ui/package.json
|
|
2
|
-
index e529803..457c1af 100644
|
|
3
|
-
--- a/node_modules/bits-ui/package.json
|
|
4
|
-
+++ b/node_modules/bits-ui/package.json
|
|
5
|
-
@@ -10,6 +10,10 @@
|
|
6
|
-
".": {
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"svelte": "./dist/index.js"
|
|
9
|
-
+ },
|
|
10
|
-
+ "./dist/*": {
|
|
11
|
-
+ "types": "./dist/*",
|
|
12
|
-
+ "svelte": "./dist/*"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|