@kayord/ui 0.4.4 → 0.5.0
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/alert-dialog/alert-dialog-content.svelte +1 -1
- package/dist/components/ui/calendar/calendar-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-day.svelte +3 -3
- package/dist/components/ui/calendar/calendar-head-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-header.svelte +1 -1
- package/dist/components/ui/calendar/calendar-months.svelte +1 -1
- package/dist/components/ui/calendar/calendar.svelte +1 -1
- package/dist/components/ui/carousel/carousel-next.svelte +1 -1
- package/dist/components/ui/carousel/carousel-previous.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +2 -2
- package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
- package/dist/components/ui/command/command-item.svelte +5 -1
- package/dist/components/ui/command/command-item.svelte.d.ts +15 -1
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/components/ui/form/form-button.svelte +1 -1
- package/dist/components/ui/form/form-button.svelte.d.ts +3 -1
- package/dist/components/ui/form/form-description.svelte +3 -3
- package/dist/components/ui/form/form-description.svelte.d.ts +7 -1
- package/dist/components/ui/form/form-element-field.svelte +15 -0
- package/dist/components/ui/form/form-element-field.svelte.d.ts +24 -0
- package/dist/components/ui/form/form-field-errors.svelte +20 -0
- package/dist/components/ui/form/form-field-errors.svelte.d.ts +34 -0
- package/dist/components/ui/form/form-field.svelte +15 -0
- package/dist/components/ui/form/form-field.svelte.d.ts +24 -0
- package/dist/components/ui/form/form-fieldset.svelte +21 -0
- package/dist/components/ui/form/form-fieldset.svelte.d.ts +23 -0
- package/dist/components/ui/form/form-label.svelte +4 -4
- package/dist/components/ui/form/form-label.svelte.d.ts +3 -1
- package/dist/components/ui/form/form-legend.svelte +13 -0
- package/dist/components/ui/form/form-legend.svelte.d.ts +22 -0
- package/dist/components/ui/form/index.d.ts +7 -28
- package/dist/components/ui/form/index.js +8 -24
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/menubar/menubar-checkbox-item.svelte +1 -1
- package/dist/components/ui/menubar/menubar-item.svelte +1 -1
- package/dist/components/ui/menubar/menubar-radio-item.svelte +1 -1
- package/dist/components/ui/menubar/menubar-sub-content.svelte +1 -1
- package/dist/components/ui/menubar/menubar-sub-trigger.svelte +1 -1
- package/dist/components/ui/menubar/menubar-trigger.svelte +1 -1
- package/dist/components/ui/pagination/pagination.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +2 -2
- package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-header.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-months.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar.svelte +1 -1
- package/dist/components/ui/select/select-item.svelte +1 -1
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +7 -3
- package/dist/components/ui/textarea/textarea.svelte +1 -1
- package/package.json +23 -23
- package/dist/components/ui/drawer/drawer-description.svelte.d.ts +0 -16
- package/dist/components/ui/drawer/drawer-title.svelte.d.ts +0 -16
- package/dist/components/ui/drawer/index.d.ts +0 -13
- package/dist/components/ui/form/form-checkbox.svelte +0 -19
- package/dist/components/ui/form/form-checkbox.svelte.d.ts +0 -13
- package/dist/components/ui/form/form-input.svelte +0 -22
- package/dist/components/ui/form/form-input.svelte.d.ts +0 -14
- package/dist/components/ui/form/form-item.svelte +0 -8
- package/dist/components/ui/form/form-item.svelte.d.ts +0 -17
- package/dist/components/ui/form/form-native-select.svelte +0 -17
- package/dist/components/ui/form/form-native-select.svelte.d.ts +0 -17
- package/dist/components/ui/form/form-radio-group.svelte +0 -17
- package/dist/components/ui/form/form-radio-group.svelte.d.ts +0 -17
- package/dist/components/ui/form/form-select-trigger.svelte +0 -11
- package/dist/components/ui/form/form-select-trigger.svelte.d.ts +0 -22
- package/dist/components/ui/form/form-select.svelte +0 -16
- package/dist/components/ui/form/form-select.svelte.d.ts +0 -35
- package/dist/components/ui/form/form-switch.svelte +0 -18
- package/dist/components/ui/form/form-switch.svelte.d.ts +0 -13
- package/dist/components/ui/form/form-textarea.svelte +0 -22
- package/dist/components/ui/form/form-textarea.svelte.d.ts +0 -14
- package/dist/components/ui/form/form-validation.svelte +0 -7
- package/dist/components/ui/form/form-validation.svelte.d.ts +0 -15
- package/dist/components/ui/select/select.svelte +0 -8
- package/dist/components/ui/select/select.svelte.d.ts +0 -16
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as RadioGroupComp from "../radio-group";
|
|
3
|
-
import * as SelectComp from "../select";
|
|
4
|
-
import Item from "./form-item.svelte";
|
|
5
|
-
import Input from "./form-input.svelte";
|
|
6
|
-
import Textarea from "./form-textarea.svelte";
|
|
1
|
+
import * as FormPrimitive from "formsnap";
|
|
7
2
|
import Description from "./form-description.svelte";
|
|
8
3
|
import Label from "./form-label.svelte";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import Select from "./form-select.svelte";
|
|
15
|
-
import SelectTrigger from "./form-select-trigger.svelte";
|
|
4
|
+
import FieldErrors from "./form-field-errors.svelte";
|
|
5
|
+
import Field from "./form-field.svelte";
|
|
6
|
+
import Fieldset from "./form-fieldset.svelte";
|
|
7
|
+
import Legend from "./form-legend.svelte";
|
|
8
|
+
import ElementField from "./form-element-field.svelte";
|
|
16
9
|
import Button from "./form-button.svelte";
|
|
17
|
-
const Root = FormPrimitive.Root;
|
|
18
|
-
const Field = FormPrimitive.Field;
|
|
19
10
|
const Control = FormPrimitive.Control;
|
|
20
|
-
|
|
21
|
-
const NativeRadio = FormPrimitive.Radio;
|
|
22
|
-
const SelectContent = SelectComp.Content;
|
|
23
|
-
const SelectLabel = SelectComp.Label;
|
|
24
|
-
const SelectGroup = SelectComp.Group;
|
|
25
|
-
const SelectItem = SelectComp.Item;
|
|
26
|
-
const SelectSeparator = SelectComp.Separator;
|
|
27
|
-
export { Root, Field, Control, Item, Input, Label, Button, Switch, Select, Checkbox, Textarea, Validation, RadioGroup, RadioItem, Description, SelectContent, SelectLabel, SelectGroup, SelectItem, SelectSeparator, SelectTrigger, NativeSelect, NativeRadio,
|
|
11
|
+
export { Field, Control, Label, Button, FieldErrors, Description, Fieldset, Legend, ElementField,
|
|
28
12
|
//
|
|
29
|
-
|
|
13
|
+
Field as FormField, Control as FormControl, Description as FormDescription, Label as FormLabel, FieldErrors as FormFieldErrors, Fieldset as FormFieldset, Legend as FormLegend, ElementField as FormElementField, Button as FormButton, };
|
|
@@ -14,7 +14,7 @@ export { className as class };
|
|
|
14
14
|
{align}
|
|
15
15
|
{sideOffset}
|
|
16
16
|
class={cn(
|
|
17
|
-
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none
|
|
17
|
+
"z-50 mt-3 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...$$restProps}
|
|
@@ -6,7 +6,7 @@ export { className as class };
|
|
|
6
6
|
|
|
7
7
|
<input
|
|
8
8
|
class={cn(
|
|
9
|
-
"flex h-10 w-full rounded-md border border-input bg-
|
|
9
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
10
|
className
|
|
11
11
|
)}
|
|
12
12
|
bind:value
|
|
@@ -9,7 +9,7 @@ export { className as class };
|
|
|
9
9
|
<MenubarPrimitive.CheckboxItem
|
|
10
10
|
bind:checked
|
|
11
11
|
class={cn(
|
|
12
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[
|
|
12
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
15
15
|
on:click
|
|
@@ -7,7 +7,7 @@ export { className as class };
|
|
|
7
7
|
|
|
8
8
|
<MenubarPrimitive.Item
|
|
9
9
|
class={cn(
|
|
10
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[
|
|
10
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
11
11
|
inset && "pl-8",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
@@ -9,7 +9,7 @@ export { className as class };
|
|
|
9
9
|
<MenubarPrimitive.RadioItem
|
|
10
10
|
{value}
|
|
11
11
|
class={cn(
|
|
12
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[
|
|
12
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
15
15
|
{...$$restProps}
|
|
@@ -9,7 +9,7 @@ export { className as class };
|
|
|
9
9
|
<MenubarPrimitive.SubContent
|
|
10
10
|
{transition}
|
|
11
11
|
{transitionConfig}
|
|
12
|
-
class={cn("z-50 min-w-
|
|
12
|
+
class={cn("z-50 min-w-max rounded-md border bg-popover p-1 text-popover-foreground focus:outline-none", className)}
|
|
13
13
|
{...$$restProps}
|
|
14
14
|
on:focusout
|
|
15
15
|
on:pointermove
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
|
|
9
9
|
<MenubarPrimitive.SubTrigger
|
|
10
10
|
class={cn(
|
|
11
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[
|
|
11
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground data-[disabled]:opacity-50",
|
|
12
12
|
inset && "pl-8",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
@@ -6,7 +6,7 @@ export { className as class };
|
|
|
6
6
|
|
|
7
7
|
<MenubarPrimitive.Trigger
|
|
8
8
|
class={cn(
|
|
9
|
-
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none data-[highlighted]:bg-accent data-[
|
|
9
|
+
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground",
|
|
10
10
|
className
|
|
11
11
|
)}
|
|
12
12
|
on:click
|
|
@@ -21,7 +21,7 @@ $:
|
|
|
21
21
|
asChild
|
|
22
22
|
{...$$restProps}
|
|
23
23
|
>
|
|
24
|
-
<nav {...builder} class={cn("mx-auto flex flex-col
|
|
24
|
+
<nav {...builder} class={cn("mx-auto flex w-full flex-col items-center", className)}>
|
|
25
25
|
<slot {pages} {range} {currentPage} />
|
|
26
26
|
</nav>
|
|
27
27
|
</PaginationPrimitive.Root>
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
<RangeCalendarPrimitive.Cell
|
|
9
9
|
{date}
|
|
10
10
|
class={cn(
|
|
11
|
-
"h-9 w-9 text-center text-sm
|
|
11
|
+
"relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-outside-month])]:bg-accent/50 [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...$$restProps}
|
|
@@ -20,11 +20,11 @@ export { className as class };
|
|
|
20
20
|
// Selection End
|
|
21
21
|
"data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus:bg-primary data-[selection-end]:focus:text-primary-foreground",
|
|
22
22
|
// Outside months
|
|
23
|
-
"data-[outside-month]:text-muted-foreground data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground [&[data-outside-month][data-selected]]:opacity-30
|
|
23
|
+
"data-[outside-month]:pointer-events-none data-[outside-month]:text-muted-foreground data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground [&[data-outside-month][data-selected]]:opacity-30",
|
|
24
24
|
// Disabled
|
|
25
25
|
"data-[disabled]:text-muted-foreground data-[disabled]:opacity-50",
|
|
26
26
|
// Unavailable
|
|
27
|
-
"data-[unavailable]:
|
|
27
|
+
"data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through",
|
|
28
28
|
className
|
|
29
29
|
)}
|
|
30
30
|
{...$$restProps}
|
|
@@ -5,7 +5,7 @@ export { className as class };
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<RangeCalendarPrimitive.HeadCell
|
|
8
|
-
class={cn("
|
|
8
|
+
class={cn("w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground", className)}
|
|
9
9
|
{...$$restProps}
|
|
10
10
|
>
|
|
11
11
|
<slot />
|
|
@@ -5,7 +5,7 @@ export { className as class };
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<RangeCalendarPrimitive.Header
|
|
8
|
-
class={cn("flex justify-between pt-1
|
|
8
|
+
class={cn("relative flex w-full items-center justify-between pt-1", className)}
|
|
9
9
|
{...$$restProps}
|
|
10
10
|
>
|
|
11
11
|
<slot />
|
|
@@ -3,6 +3,6 @@ let className = void 0;
|
|
|
3
3
|
export { className as class };
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
|
-
<div class={cn("flex flex-col
|
|
6
|
+
<div class={cn("mt-4 flex flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0", className)} {...$$restProps}>
|
|
7
7
|
<slot />
|
|
8
8
|
</div>
|
|
@@ -39,7 +39,7 @@ export { className as class };
|
|
|
39
39
|
</RangeCalendar.GridHead>
|
|
40
40
|
<RangeCalendar.GridBody>
|
|
41
41
|
{#each month.weeks as weekDates}
|
|
42
|
-
<RangeCalendar.GridRow class="w-full
|
|
42
|
+
<RangeCalendar.GridRow class="mt-2 w-full">
|
|
43
43
|
{#each weekDates as date}
|
|
44
44
|
<RangeCalendar.Cell {date}>
|
|
45
45
|
<RangeCalendar.Day {date} month={month.value} />
|
|
@@ -13,7 +13,7 @@ export { className as class };
|
|
|
13
13
|
{disabled}
|
|
14
14
|
{label}
|
|
15
15
|
class={cn(
|
|
16
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[
|
|
16
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
19
19
|
{...$$restProps}
|
|
@@ -7,7 +7,7 @@ export { className as class };
|
|
|
7
7
|
|
|
8
8
|
<SelectPrimitive.Trigger
|
|
9
9
|
class={cn(
|
|
10
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-
|
|
10
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
11
11
|
className
|
|
12
12
|
)}
|
|
13
13
|
{...$$restProps}
|
|
@@ -9,11 +9,15 @@ export { className as class };
|
|
|
9
9
|
bind:value
|
|
10
10
|
class={cn("relative flex w-full touch-none select-none items-center", className)}
|
|
11
11
|
{...$$restProps}
|
|
12
|
+
let:thumbs
|
|
12
13
|
>
|
|
13
14
|
<span class="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
|
|
14
15
|
<SliderPrimitive.Range class="absolute h-full bg-primary" />
|
|
15
16
|
</span>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
{#each thumbs as thumb}
|
|
18
|
+
<SliderPrimitive.Thumb
|
|
19
|
+
{thumb}
|
|
20
|
+
class="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
21
|
+
/>
|
|
22
|
+
{/each}
|
|
19
23
|
</SliderPrimitive.Root>
|
|
@@ -6,7 +6,7 @@ export { className as class };
|
|
|
6
6
|
|
|
7
7
|
<textarea
|
|
8
8
|
class={cn(
|
|
9
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-
|
|
9
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
10
|
className
|
|
11
11
|
)}
|
|
12
12
|
bind:value
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -29,46 +29,46 @@
|
|
|
29
29
|
"svelte": "^4.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@internationalized/date": "^3.5.
|
|
33
|
-
"bits-ui": "^0.
|
|
32
|
+
"@internationalized/date": "^3.5.2",
|
|
33
|
+
"bits-ui": "^0.18.1",
|
|
34
34
|
"clsx": "^2.1.0",
|
|
35
35
|
"cmdk-sv": "^0.0.13",
|
|
36
|
-
"embla-carousel-svelte": "8.0.0-
|
|
37
|
-
"formsnap": "^0.
|
|
38
|
-
"lucide-svelte": "^0.
|
|
39
|
-
"mode-watcher": "^0.2.
|
|
40
|
-
"svelte-headless-table": "^0.18.
|
|
41
|
-
"svelte-sonner": "^0.3.
|
|
42
|
-
"sveltekit-superforms": "^
|
|
36
|
+
"embla-carousel-svelte": "8.0.0-rc23",
|
|
37
|
+
"formsnap": "^0.5.0",
|
|
38
|
+
"lucide-svelte": "^0.334.0",
|
|
39
|
+
"mode-watcher": "^0.2.1",
|
|
40
|
+
"svelte-headless-table": "^0.18.2",
|
|
41
|
+
"svelte-sonner": "^0.3.18",
|
|
42
|
+
"sveltekit-superforms": "^2.3.0",
|
|
43
43
|
"tailwind-merge": "^2.2.1",
|
|
44
|
-
"tailwind-variants": "^0.
|
|
45
|
-
"vaul-svelte": "^0.2.
|
|
44
|
+
"tailwind-variants": "^0.2.0",
|
|
45
|
+
"vaul-svelte": "^0.2.3",
|
|
46
46
|
"zod": "^3.22.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@playwright/test": "^1.41.
|
|
49
|
+
"@playwright/test": "^1.41.2",
|
|
50
50
|
"@sveltejs/adapter-auto": "^3.1.1",
|
|
51
51
|
"@sveltejs/kit": "^2.5.0",
|
|
52
52
|
"@sveltejs/package": "^2.2.6",
|
|
53
53
|
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
55
|
-
"@typescript-eslint/parser": "^
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
55
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
56
56
|
"autoprefixer": "^10.4.17",
|
|
57
57
|
"eslint": "^8.56.0",
|
|
58
58
|
"eslint-config-prettier": "^9.1.0",
|
|
59
59
|
"eslint-plugin-svelte": "^2.35.1",
|
|
60
|
-
"postcss": "^8.4.
|
|
61
|
-
"postcss-load-config": "^5.0.
|
|
62
|
-
"prettier": "^3.2.
|
|
63
|
-
"prettier-plugin-svelte": "^3.1
|
|
60
|
+
"postcss": "^8.4.35",
|
|
61
|
+
"postcss-load-config": "^5.0.3",
|
|
62
|
+
"prettier": "^3.2.5",
|
|
63
|
+
"prettier-plugin-svelte": "^3.2.1",
|
|
64
64
|
"publint": "^0.2.7",
|
|
65
|
-
"svelte": "^4.2.
|
|
66
|
-
"svelte-check": "^3.6.
|
|
65
|
+
"svelte": "^4.2.11",
|
|
66
|
+
"svelte-check": "^3.6.4",
|
|
67
67
|
"tailwindcss": "^3.4.1",
|
|
68
68
|
"tslib": "^2.6.2",
|
|
69
69
|
"typescript": "^5.3.3",
|
|
70
|
-
"vite": "^5.
|
|
71
|
-
"vitest": "^1.
|
|
70
|
+
"vite": "^5.1.3",
|
|
71
|
+
"vitest": "^1.3.0"
|
|
72
72
|
},
|
|
73
73
|
"svelte": "./dist/index.js",
|
|
74
74
|
"types": "./dist/index.d.ts",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: import("bits-ui/dist/bits/dialog/types").DescriptionProps;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {
|
|
8
|
-
default: {};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type DrawerDescriptionProps = typeof __propDef.props;
|
|
12
|
-
export type DrawerDescriptionEvents = typeof __propDef.events;
|
|
13
|
-
export type DrawerDescriptionSlots = typeof __propDef.slots;
|
|
14
|
-
export default class DrawerDescription extends SvelteComponent<DrawerDescriptionProps, DrawerDescriptionEvents, DrawerDescriptionSlots> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: import("bits-ui/dist/bits/dialog/types").TitleProps;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {
|
|
8
|
-
default: {};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type DrawerTitleProps = typeof __propDef.props;
|
|
12
|
-
export type DrawerTitleEvents = typeof __propDef.events;
|
|
13
|
-
export type DrawerTitleSlots = typeof __propDef.slots;
|
|
14
|
-
export default class DrawerTitle extends SvelteComponent<DrawerTitleProps, DrawerTitleEvents, DrawerTitleSlots> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="svelte" />
|
|
2
|
-
import { Drawer as DrawerPrimitive } from "vaul-svelte";
|
|
3
|
-
import Root from "./drawer.svelte";
|
|
4
|
-
import Content from "./drawer-content.svelte";
|
|
5
|
-
import Description from "./drawer-description.svelte";
|
|
6
|
-
import Overlay from "./drawer-overlay.svelte";
|
|
7
|
-
import Footer from "./drawer-footer.svelte";
|
|
8
|
-
import Header from "./drawer-header.svelte";
|
|
9
|
-
import Title from "./drawer-title.svelte";
|
|
10
|
-
declare const Trigger: typeof DrawerPrimitive.Content;
|
|
11
|
-
declare const Portal: typeof import("bits-ui/dist/bits/dialog").Portal;
|
|
12
|
-
declare const Close: typeof DrawerPrimitive.Content;
|
|
13
|
-
export { Root, Content, Description, Overlay, Footer, Header, Title, Trigger, Portal, Close, Root as Drawer, Content as DrawerContent, Description as DrawerDescription, Overlay as DrawerOverlay, Footer as DrawerFooter, Header as DrawerHeader, Title as DrawerTitle, Trigger as DrawerTrigger, Portal as DrawerPortal, Close as DrawerClose, };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script>import { getFormField } from "formsnap";
|
|
2
|
-
import { Checkbox } from "../checkbox";
|
|
3
|
-
export let onCheckedChange = void 0;
|
|
4
|
-
const { name, setValue, attrStore, value } = getFormField();
|
|
5
|
-
const { name: nameAttr, value: valueAttr, ...rest } = $attrStore;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<Checkbox
|
|
9
|
-
{...rest}
|
|
10
|
-
checked={typeof $value === "boolean" ? $value : false}
|
|
11
|
-
onCheckedChange={(v) => {
|
|
12
|
-
onCheckedChange?.(v);
|
|
13
|
-
setValue(v);
|
|
14
|
-
}}
|
|
15
|
-
{...$$restProps}
|
|
16
|
-
on:click
|
|
17
|
-
on:keydown
|
|
18
|
-
/>
|
|
19
|
-
<input hidden {name} value={$value} />
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { Checkbox as CheckboxPrimitive } from "bits-ui";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: CheckboxPrimitive.Props;
|
|
5
|
-
slots: {};
|
|
6
|
-
events: CheckboxPrimitive.Events;
|
|
7
|
-
};
|
|
8
|
-
export type FormCheckboxProps = typeof __propDef.props;
|
|
9
|
-
export type FormCheckboxEvents = typeof __propDef.events;
|
|
10
|
-
export type FormCheckboxSlots = typeof __propDef.slots;
|
|
11
|
-
export default class FormCheckbox extends SvelteComponent<FormCheckboxProps, FormCheckboxEvents, FormCheckboxSlots> {
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>import { getFormField } from "formsnap";
|
|
2
|
-
import { Input } from "../input";
|
|
3
|
-
const { attrStore, value } = getFormField();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<Input
|
|
7
|
-
{...$attrStore}
|
|
8
|
-
bind:value={$value}
|
|
9
|
-
{...$$restProps}
|
|
10
|
-
on:blur
|
|
11
|
-
on:change
|
|
12
|
-
on:click
|
|
13
|
-
on:focus
|
|
14
|
-
on:keydown
|
|
15
|
-
on:keypress
|
|
16
|
-
on:keyup
|
|
17
|
-
on:mouseover
|
|
18
|
-
on:mouseenter
|
|
19
|
-
on:mouseleave
|
|
20
|
-
on:paste
|
|
21
|
-
on:input
|
|
22
|
-
/>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { HTMLInputAttributes } from "svelte/elements";
|
|
3
|
-
import { type InputEvents } from "../input";
|
|
4
|
-
declare const __propDef: {
|
|
5
|
-
props: HTMLInputAttributes;
|
|
6
|
-
slots: {};
|
|
7
|
-
events: InputEvents;
|
|
8
|
-
};
|
|
9
|
-
export type FormInputProps = typeof __propDef.props;
|
|
10
|
-
export type FormInputEvents = typeof __propDef.events;
|
|
11
|
-
export type FormInputSlots = typeof __propDef.slots;
|
|
12
|
-
export default class FormInput extends SvelteComponent<FormInputProps, FormInputEvents, FormInputSlots> {
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: HTMLAttributes<HTMLDivElement>;
|
|
5
|
-
events: {
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type FormItemProps = typeof __propDef.props;
|
|
13
|
-
export type FormItemEvents = typeof __propDef.events;
|
|
14
|
-
export type FormItemSlots = typeof __propDef.slots;
|
|
15
|
-
export default class FormItem extends SvelteComponent<FormItemProps, FormItemEvents, FormItemSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>import { Form as FormPrimitive } from "formsnap";
|
|
2
|
-
import { buttonVariants } from "../button";
|
|
3
|
-
import { cn } from "../../../utils";
|
|
4
|
-
import { ChevronDown } from "lucide-svelte";
|
|
5
|
-
let className = void 0;
|
|
6
|
-
export { className as class };
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div class="relative">
|
|
10
|
-
<FormPrimitive.Select
|
|
11
|
-
class={cn(buttonVariants({ variant: "outline" }), "appearance-none bg-transparent font-normal", className)}
|
|
12
|
-
{...$$restProps}
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
15
|
-
</FormPrimitive.Select>
|
|
16
|
-
<ChevronDown class="absolute right-3 top-2.5 h-4 w-4 opacity-50" />
|
|
17
|
-
</div>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { HTMLSelectAttributes } from "svelte/elements";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: HTMLSelectAttributes;
|
|
5
|
-
events: {
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type FormNativeSelectProps = typeof __propDef.props;
|
|
13
|
-
export type FormNativeSelectEvents = typeof __propDef.events;
|
|
14
|
-
export type FormNativeSelectSlots = typeof __propDef.slots;
|
|
15
|
-
export default class FormNativeSelect extends SvelteComponent<FormNativeSelectProps, FormNativeSelectEvents, FormNativeSelectSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>import { getFormField } from "formsnap";
|
|
2
|
-
import * as RadioGroup from "../radio-group";
|
|
3
|
-
const { attrStore, setValue, name, value } = getFormField();
|
|
4
|
-
export let onValueChange = void 0;
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<RadioGroup.Root
|
|
8
|
-
{...$attrStore}
|
|
9
|
-
onValueChange={(v) => {
|
|
10
|
-
onValueChange?.(v);
|
|
11
|
-
setValue(v);
|
|
12
|
-
}}
|
|
13
|
-
{...$$restProps}
|
|
14
|
-
>
|
|
15
|
-
<slot />
|
|
16
|
-
<input hidden {name} value={$value} />
|
|
17
|
-
</RadioGroup.Root>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { RadioGroup as RadioGroupPrimitive } from "bits-ui";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: RadioGroupPrimitive.Props;
|
|
5
|
-
events: {
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type FormRadioGroupProps = typeof __propDef.props;
|
|
13
|
-
export type FormRadioGroupEvents = typeof __propDef.events;
|
|
14
|
-
export type FormRadioGroupSlots = typeof __propDef.slots;
|
|
15
|
-
export default class FormRadioGroup extends SvelteComponent<FormRadioGroupProps, FormRadioGroupEvents, FormRadioGroupSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script>import * as Select from "../select";
|
|
2
|
-
import { getFormField } from "formsnap";
|
|
3
|
-
const { attrStore, value } = getFormField();
|
|
4
|
-
export let placeholder = "";
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<Select.Trigger {...$$restProps} {...$attrStore} on:click on:keydown type="button">
|
|
8
|
-
<slot value={$value}>
|
|
9
|
-
<Select.Value {placeholder} />
|
|
10
|
-
</slot>
|
|
11
|
-
</Select.Trigger>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { Select as SelectPrimitive } from "bits-ui";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
asChild?: boolean | undefined;
|
|
6
|
-
el?: HTMLButtonElement | undefined;
|
|
7
|
-
} & import("svelte/elements").HTMLButtonAttributes & {
|
|
8
|
-
placeholder?: string | undefined;
|
|
9
|
-
};
|
|
10
|
-
slots: {
|
|
11
|
-
default: {
|
|
12
|
-
value: unknown;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
events: SelectPrimitive.TriggerEvents;
|
|
16
|
-
};
|
|
17
|
-
export type FormSelectTriggerProps = typeof __propDef.props;
|
|
18
|
-
export type FormSelectTriggerEvents = typeof __propDef.events;
|
|
19
|
-
export type FormSelectTriggerSlots = typeof __propDef.slots;
|
|
20
|
-
export default class FormSelectTrigger extends SvelteComponent<FormSelectTriggerProps, FormSelectTriggerEvents, FormSelectTriggerSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script>import * as Select from "../select";
|
|
2
|
-
import { getFormField } from "formsnap";
|
|
3
|
-
const { setValue, name, value } = getFormField();
|
|
4
|
-
export let onSelectedChange = void 0;
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<Select.Root
|
|
8
|
-
onSelectedChange={(v) => {
|
|
9
|
-
onSelectedChange?.(v);
|
|
10
|
-
setValue(v ? v.value : undefined);
|
|
11
|
-
}}
|
|
12
|
-
{...$$restProps}
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
15
|
-
<input hidden {name} value={$value} />
|
|
16
|
-
</Select.Root>
|