@nasa-jpl/stellar-svelte 2.0.0-alpha.55 → 2.0.0-alpha.58
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/button/button.svelte +9 -9
- package/dist/components/ui/button/button.svelte.d.ts +2 -2
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/button/index.js +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +1 -1
- package/dist/components/ui/form/form-description.svelte +8 -6
- package/dist/components/ui/form/form-description.svelte.d.ts +5 -2
- package/dist/components/ui/form/form-field-errors.svelte +14 -12
- package/dist/components/ui/form/form-field-errors.svelte.d.ts +3 -1
- package/dist/components/ui/form/form-label.svelte +5 -4
- package/dist/components/ui/form/form-label.svelte.d.ts +7 -2
- package/dist/components/ui/form/form-legend.svelte +8 -6
- package/dist/components/ui/form/form-legend.svelte.d.ts +7 -2
- package/dist/components/ui/form/index.d.ts +24 -10
- package/dist/components/ui/form/index.js +25 -11
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/radio-group/radio-group-item.svelte +14 -14
- package/dist/components/ui/radio-group/radio-group-item.svelte.d.ts +1 -1
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +15 -15
- package/dist/components/ui/slider/slider.svelte.d.ts +1 -1
- package/dist/components/ui/switch/switch.svelte +15 -15
- package/dist/components/ui/switch/switch.svelte.d.ts +1 -1
- package/dist/components/ui/tabs/tabs-content.svelte +9 -9
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +1 -1
- package/dist/components/ui/tabs/tabs-trigger.svelte +10 -10
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +1 -1
- package/dist/components/ui/textarea/textarea.svelte +19 -19
- package/dist/components/ui/textarea/textarea.svelte.d.ts +2 -2
- package/dist/components/ui/toggle/index.d.ts +2 -2
- package/dist/components/ui/toggle/index.js +1 -1
- package/dist/index.css +0 -4
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Button as ButtonPrimitive } from "bits-ui";
|
|
2
3
|
import { buttonVariants } from "./index.js";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let variant = "default";
|
|
6
6
|
export let size = "default";
|
|
@@ -9,12 +9,12 @@ export { className as class };
|
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<ButtonPrimitive.Root
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
{builders}
|
|
13
|
+
class={cn(buttonVariants({ variant, size, className }))}
|
|
14
|
+
type="button"
|
|
15
|
+
{...$$restProps}
|
|
16
|
+
on:click
|
|
17
|
+
on:keydown
|
|
18
18
|
>
|
|
19
|
-
|
|
19
|
+
<slot />
|
|
20
20
|
</ButtonPrimitive.Root>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import { Button as ButtonPrimitive } from
|
|
3
|
-
import { type Props } from
|
|
2
|
+
import { Button as ButtonPrimitive } from 'bits-ui';
|
|
3
|
+
import { type Props } from './index.js';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: Props;
|
|
6
6
|
slots: {
|
|
@@ -22,7 +22,7 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
22
22
|
'icon-lg': string;
|
|
23
23
|
'icon-xl': string;
|
|
24
24
|
};
|
|
25
|
-
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring
|
|
25
|
+
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
|
|
26
26
|
variant: {
|
|
27
27
|
default: string;
|
|
28
28
|
destructive: string;
|
|
@@ -106,7 +106,7 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
106
106
|
'icon-lg': string;
|
|
107
107
|
'icon-xl': string;
|
|
108
108
|
};
|
|
109
|
-
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring
|
|
109
|
+
}, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
|
|
110
110
|
variant: {
|
|
111
111
|
default: string;
|
|
112
112
|
destructive: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
import Root from './button.svelte';
|
|
3
3
|
const buttonVariants = tv({
|
|
4
|
-
base: 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring
|
|
4
|
+
base: 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
7
|
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
@@ -11,7 +11,7 @@ export { className as class };
|
|
|
11
11
|
|
|
12
12
|
<CheckboxPrimitive.Root
|
|
13
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
|
|
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 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',
|
|
15
15
|
checkboxVariants.size[size],
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import * as FormPrimitive from "formsnap";
|
|
3
|
+
import { formVariants } 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
|
<FormPrimitive.Description
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
class={cn('text-muted-foreground', formVariants.size[size].legend, className)}
|
|
11
|
+
{...$$restProps}
|
|
12
|
+
let:descriptionAttrs
|
|
11
13
|
>
|
|
12
|
-
|
|
14
|
+
<slot {descriptionAttrs} />
|
|
13
15
|
</FormPrimitive.Description>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import type { LabelSize } from '../label/index.js';
|
|
3
4
|
declare const __propDef: {
|
|
4
|
-
props: HTMLAttributes<HTMLSpanElement
|
|
5
|
+
props: HTMLAttributes<HTMLSpanElement> & {
|
|
6
|
+
size?: LabelSize;
|
|
7
|
+
};
|
|
5
8
|
events: {
|
|
6
9
|
[evt: string]: CustomEvent<any>;
|
|
7
10
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import * as FormPrimitive from "formsnap";
|
|
3
|
+
import { formVariants } from "./index.js";
|
|
3
4
|
let className = void 0;
|
|
5
|
+
export let size = "default";
|
|
4
6
|
export { className as class };
|
|
5
7
|
export let errorClasses = void 0;
|
|
6
8
|
</script>
|
|
7
9
|
|
|
8
10
|
<FormPrimitive.FieldErrors
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
class={cn('text-destructive', formVariants.size[size].errors, className)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
let:errors
|
|
14
|
+
let:fieldErrorsAttrs
|
|
15
|
+
let:errorAttrs
|
|
14
16
|
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
<slot {errors} {fieldErrorsAttrs} {errorAttrs}>
|
|
18
|
+
{#each errors as error}
|
|
19
|
+
<div {...errorAttrs} class={cn(errorClasses)}>{error}</div>
|
|
20
|
+
{/each}
|
|
21
|
+
</slot>
|
|
20
22
|
</FormPrimitive.FieldErrors>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { LabelSize } from '../label/index.js';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
id?: string;
|
|
5
6
|
asChild?: boolean;
|
|
6
7
|
el?: HTMLDivElement;
|
|
7
|
-
} & import("svelte/elements").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
} & import("svelte/elements.js").HTMLAttributes<HTMLDivElement> & {
|
|
8
9
|
errorClasses?: string | undefined | null;
|
|
10
|
+
size?: LabelSize;
|
|
9
11
|
};
|
|
10
12
|
events: {
|
|
11
13
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { Label } from "../label/index.js";
|
|
2
2
|
import { cn } from "../../../utils.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getFormControl } from "formsnap";
|
|
4
4
|
let className = void 0;
|
|
5
|
+
export let size = "default";
|
|
5
6
|
export { className as class };
|
|
6
7
|
const { labelAttrs } = getFormControl();
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
|
-
<Label {...$labelAttrs} class={cn(
|
|
10
|
-
|
|
10
|
+
<Label {...$labelAttrs} class={cn('data-[fs-error]:text-destructive', className)} {size} {...$$restProps}>
|
|
11
|
+
<slot {labelAttrs} />
|
|
11
12
|
</Label>
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import
|
|
2
|
+
import { type LabelSize } from '../label/index.js';
|
|
3
3
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
4
|
+
props: {
|
|
5
|
+
asChild?: boolean | undefined | undefined;
|
|
6
|
+
el?: HTMLLabelElement | undefined;
|
|
7
|
+
} & import("svelte/elements").HTMLLabelAttributes & {
|
|
8
|
+
size?: LabelSize;
|
|
9
|
+
};
|
|
5
10
|
events: {
|
|
6
11
|
[evt: string]: CustomEvent<any>;
|
|
7
12
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import * as FormPrimitive from "formsnap";
|
|
3
|
+
import { formVariants } 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
|
<FormPrimitive.Legend
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
{...$$restProps}
|
|
11
|
+
class={cn('data-[fs-error]:text-destructive leading-none', formVariants.size[size].legend, className)}
|
|
12
|
+
let:legendAttrs
|
|
11
13
|
>
|
|
12
|
-
|
|
14
|
+
<slot {legendAttrs} />
|
|
13
15
|
</FormPrimitive.Legend>
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import
|
|
2
|
+
import type { LabelSize } from '../label/index.js';
|
|
3
3
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
4
|
+
props: {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
el?: HTMLLegendElement;
|
|
7
|
+
} & import("svelte/elements.js").HTMLAttributes<HTMLLegendElement> & {
|
|
8
|
+
size?: LabelSize;
|
|
9
|
+
};
|
|
5
10
|
events: {
|
|
6
11
|
[evt: string]: CustomEvent<any>;
|
|
7
12
|
};
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import * as FormPrimitive from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import * as FormPrimitive from 'formsnap';
|
|
2
|
+
import Button from './form-button.svelte';
|
|
3
|
+
import Description from './form-description.svelte';
|
|
4
|
+
import ElementField from './form-element-field.svelte';
|
|
5
|
+
import FieldErrors from './form-field-errors.svelte';
|
|
6
|
+
import Field from './form-field.svelte';
|
|
7
|
+
import Fieldset from './form-fieldset.svelte';
|
|
8
|
+
import Label from './form-label.svelte';
|
|
9
|
+
import Legend from './form-legend.svelte';
|
|
10
10
|
declare const Control: typeof FormPrimitive.Control;
|
|
11
|
-
|
|
11
|
+
declare const formVariants: {
|
|
12
|
+
size: {
|
|
13
|
+
default: {
|
|
14
|
+
description: string;
|
|
15
|
+
legend: string;
|
|
16
|
+
errors: string;
|
|
17
|
+
};
|
|
18
|
+
sm: {
|
|
19
|
+
description: string;
|
|
20
|
+
legend: string;
|
|
21
|
+
errors: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export { Button, Control, Description, ElementField, Field, FieldErrors, Fieldset, Button as FormButton, Control as FormControl, Description as FormDescription, ElementField as FormElementField, Field as FormField, FieldErrors as FormFieldErrors, Fieldset as FormFieldset, Label as FormLabel, Legend as FormLegend, formVariants, Label, Legend, };
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
import * as FormPrimitive from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import * as FormPrimitive from 'formsnap';
|
|
2
|
+
import Button from './form-button.svelte';
|
|
3
|
+
import Description from './form-description.svelte';
|
|
4
|
+
import ElementField from './form-element-field.svelte';
|
|
5
|
+
import FieldErrors from './form-field-errors.svelte';
|
|
6
|
+
import Field from './form-field.svelte';
|
|
7
|
+
import Fieldset from './form-fieldset.svelte';
|
|
8
|
+
import Label from './form-label.svelte';
|
|
9
|
+
import Legend from './form-legend.svelte';
|
|
10
10
|
const Control = FormPrimitive.Control;
|
|
11
|
-
|
|
11
|
+
const formVariants = {
|
|
12
|
+
size: {
|
|
13
|
+
default: {
|
|
14
|
+
description: 'text-sm font-medium',
|
|
15
|
+
legend: 'text-sm font-medium',
|
|
16
|
+
errors: 'text-sm font-medium',
|
|
17
|
+
},
|
|
18
|
+
sm: {
|
|
19
|
+
description: 'text-xs font-normal',
|
|
20
|
+
legend: 'text-xs font-normal',
|
|
21
|
+
errors: 'text-xs font-normal',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export { Button, Control, Description, ElementField, Field, FieldErrors, Fieldset, Button as FormButton, Control as FormControl, Description as FormDescription, ElementField as FormElementField,
|
|
12
26
|
//
|
|
13
|
-
Field as FormField,
|
|
27
|
+
Field as FormField, FieldErrors as FormFieldErrors, Fieldset as FormFieldset, Label as FormLabel, Legend as FormLegend, formVariants, Label, Legend, };
|
|
@@ -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
|
|
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',
|
|
14
14
|
inputVariants.size[sizeVariant],
|
|
15
15
|
className,
|
|
16
16
|
)}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "bits-ui";
|
|
2
3
|
import Circle from "lucide-svelte/icons/circle";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
4
|
let className = void 0;
|
|
5
5
|
export let value;
|
|
6
6
|
export { className as class };
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<RadioGroupPrimitive.Item
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
{value}
|
|
11
|
+
class={cn(
|
|
12
|
+
'border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...$$restProps}
|
|
16
|
+
on:click
|
|
17
17
|
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<div class="flex items-center justify-center">
|
|
19
|
+
<RadioGroupPrimitive.ItemIndicator>
|
|
20
|
+
<Circle class="h-2.5 w-2.5 fill-current text-current" />
|
|
21
|
+
</RadioGroupPrimitive.ItemIndicator>
|
|
22
|
+
</div>
|
|
23
23
|
</RadioGroupPrimitive.Item>
|
|
@@ -9,7 +9,7 @@ export { className as class };
|
|
|
9
9
|
|
|
10
10
|
<SelectPrimitive.Trigger
|
|
11
11
|
class={cn(
|
|
12
|
-
'border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex w-full items-center justify-between rounded-md border text-sm focus-visible:outline-none focus-visible:ring-2
|
|
12
|
+
'border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex w-full items-center justify-between rounded-md border text-sm focus-visible:outline-none focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 text-left break-all',
|
|
13
13
|
selectVariants.size[size].trigger,
|
|
14
14
|
className,
|
|
15
15
|
)}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Slider as SliderPrimitive } from "bits-ui";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export let value = [0];
|
|
5
5
|
export { className as class };
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<SliderPrimitive.Root
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
bind:value
|
|
10
|
+
class={cn('relative flex w-full touch-none select-none items-center', className)}
|
|
11
|
+
{...$$restProps}
|
|
12
|
+
let:thumbs
|
|
13
13
|
>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
<span class="bg-secondary relative h-2 w-full grow overflow-hidden rounded-full">
|
|
15
|
+
<SliderPrimitive.Range class="bg-primary absolute h-full" />
|
|
16
|
+
</span>
|
|
17
|
+
{#each thumbs as thumb}
|
|
18
|
+
<SliderPrimitive.Thumb
|
|
19
|
+
{thumb}
|
|
20
|
+
class="border-primary bg-background ring-offset-background focus-visible:ring-ring block h-5 w-5 rounded-full border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50"
|
|
21
|
+
/>
|
|
22
|
+
{/each}
|
|
23
23
|
</SliderPrimitive.Root>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Switch as SwitchPrimitive } from "bits-ui";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export let checked = void 0;
|
|
5
5
|
export { className as class };
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<SwitchPrimitive.Root
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
bind:checked
|
|
10
|
+
class={cn(
|
|
11
|
+
'focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
12
|
+
className,
|
|
13
|
+
)}
|
|
14
|
+
{...$$restProps}
|
|
15
|
+
on:click
|
|
16
|
+
on:keydown
|
|
17
17
|
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<SwitchPrimitive.Thumb
|
|
19
|
+
class={cn(
|
|
20
|
+
'bg-background pointer-events-none block h-5 w-5 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0',
|
|
21
|
+
)}
|
|
22
|
+
/>
|
|
23
23
|
</SwitchPrimitive.Root>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export let value;
|
|
5
5
|
export { className as class };
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<TabsPrimitive.Content
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
class={cn(
|
|
10
|
+
'ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2',
|
|
11
|
+
className,
|
|
12
|
+
)}
|
|
13
|
+
{value}
|
|
14
|
+
{...$$restProps}
|
|
15
15
|
>
|
|
16
|
-
|
|
16
|
+
<slot />
|
|
17
17
|
</TabsPrimitive.Content>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import { cn } from "../../../utils.js";
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export let value;
|
|
5
5
|
export { className as class };
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<TabsPrimitive.Trigger
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
class={cn(
|
|
10
|
+
'ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm',
|
|
11
|
+
className,
|
|
12
|
+
)}
|
|
13
|
+
{value}
|
|
14
|
+
{...$$restProps}
|
|
15
|
+
on:click
|
|
16
16
|
>
|
|
17
|
-
|
|
17
|
+
<slot />
|
|
18
18
|
</TabsPrimitive.Trigger>
|
|
@@ -6,23 +6,23 @@ export let readonly = void 0;
|
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<textarea
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
class={cn(
|
|
10
|
+
'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
11
|
+
className,
|
|
12
|
+
)}
|
|
13
|
+
bind:value
|
|
14
|
+
{readonly}
|
|
15
|
+
on:blur
|
|
16
|
+
on:change
|
|
17
|
+
on:click
|
|
18
|
+
on:focus
|
|
19
|
+
on:keydown
|
|
20
|
+
on:keypress
|
|
21
|
+
on:keyup
|
|
22
|
+
on:mouseover
|
|
23
|
+
on:mouseenter
|
|
24
|
+
on:mouseleave
|
|
25
|
+
on:paste
|
|
26
|
+
on:input
|
|
27
|
+
{...$$restProps}
|
|
28
28
|
></textarea>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { HTMLTextareaAttributes } from
|
|
3
|
-
import type { TextareaEvents } from
|
|
2
|
+
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
3
|
+
import type { TextareaEvents } from './index.js';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: HTMLTextareaAttributes;
|
|
6
6
|
slots: {};
|
|
@@ -11,7 +11,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
|
|
|
11
11
|
lg: string;
|
|
12
12
|
xs: string;
|
|
13
13
|
};
|
|
14
|
-
}, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2
|
|
14
|
+
}, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
|
|
15
15
|
variant: {
|
|
16
16
|
default: string;
|
|
17
17
|
outline: string;
|
|
@@ -55,7 +55,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
|
|
|
55
55
|
lg: string;
|
|
56
56
|
xs: string;
|
|
57
57
|
};
|
|
58
|
-
}, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2
|
|
58
|
+
}, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
|
|
59
59
|
variant: {
|
|
60
60
|
default: string;
|
|
61
61
|
outline: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
import Root from './toggle.svelte';
|
|
3
3
|
export const toggleVariants = tv({
|
|
4
|
-
base: 'ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2
|
|
4
|
+
base: 'ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50',
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
7
|
default: 'bg-transparent',
|
package/dist/index.css
CHANGED
|
@@ -3081,10 +3081,6 @@ body {
|
|
|
3081
3081
|
--tw-ring-offset-width: 1px;
|
|
3082
3082
|
}
|
|
3083
3083
|
|
|
3084
|
-
.focus-visible\:ring-offset-2:focus-visible {
|
|
3085
|
-
--tw-ring-offset-width: 2px;
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
3084
|
.focus-visible\:ring-offset-background:focus-visible {
|
|
3089
3085
|
--tw-ring-offset-color: hsl(var(--background) / 1);
|
|
3090
3086
|
}
|
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.58",
|
|
87
|
+
"gitHead": "b329c68babe1d43f9dae6ce85156b2d9abf5f791"
|
|
88
88
|
}
|