@nasa-jpl/stellar-svelte 2.0.0-alpha.44 → 2.0.0-alpha.46
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/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 +3 -5
|
@@ -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, };
|
|
@@ -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",
|
|
@@ -79,12 +78,11 @@
|
|
|
79
78
|
"lint": "prettier --check . && eslint .",
|
|
80
79
|
"package": "svelte-kit sync && svelte-package && publint",
|
|
81
80
|
"prepublishOnly": "npm run build",
|
|
82
|
-
"preview": "vite preview"
|
|
83
|
-
"postinstall": "patch-package"
|
|
81
|
+
"preview": "vite preview"
|
|
84
82
|
},
|
|
85
83
|
"svelte": "./dist/index.js",
|
|
86
84
|
"type": "module",
|
|
87
85
|
"types": "./dist/index.d.ts",
|
|
88
|
-
"version": "2.0.0-alpha.
|
|
89
|
-
"gitHead": "
|
|
86
|
+
"version": "2.0.0-alpha.46",
|
|
87
|
+
"gitHead": "b2429cae1d317d748b5e1be41f679cf25212dfef"
|
|
90
88
|
}
|