@kayord/ui 0.12.4 → 0.12.6
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/input-otp/index.d.ts +5 -0
- package/dist/components/ui/input-otp/index.js +5 -0
- package/dist/components/ui/input-otp/input-otp-group.svelte +16 -0
- package/dist/components/ui/input-otp/input-otp-group.svelte.d.ts +4 -0
- package/dist/components/ui/input-otp/input-otp-separator.svelte +15 -0
- package/dist/components/ui/input-otp/input-otp-separator.svelte.d.ts +4 -0
- package/dist/components/ui/input-otp/input-otp-slot.svelte +30 -0
- package/dist/components/ui/input-otp/input-otp-slot.svelte.d.ts +16 -0
- package/dist/components/ui/input-otp/input-otp.svelte +19 -0
- package/dist/components/ui/input-otp/input-otp.svelte.d.ts +7 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +2 -2
- package/package.json +13 -13
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Root from "./input-otp.svelte";
|
|
2
|
+
import Group from "./input-otp-group.svelte";
|
|
3
|
+
import Slot from "./input-otp-slot.svelte";
|
|
4
|
+
import Separator from "./input-otp-separator.svelte";
|
|
5
|
+
export { Root, Group, Slot, Separator, Root as InputOTP, Group as InputOTPGroup, Slot as InputOTPSlot, Separator as InputOTPSeparator, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Root from "./input-otp.svelte";
|
|
2
|
+
import Group from "./input-otp-group.svelte";
|
|
3
|
+
import Slot from "./input-otp-slot.svelte";
|
|
4
|
+
import Separator from "./input-otp-separator.svelte";
|
|
5
|
+
export { Root, Group, Slot, Separator, Root as InputOTP, Group as InputOTPGroup, Slot as InputOTPSlot, Separator as InputOTPSeparator, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div bind:this={ref} class={cn("flex items-center", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import Dot from "lucide-svelte/icons/dot";
|
|
5
|
+
|
|
6
|
+
let { ref = $bindable(null), children, ...restProps }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div bind:this={ref} role="separator" {...restProps}>
|
|
10
|
+
{#if children}
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
{:else}
|
|
13
|
+
<Dot />
|
|
14
|
+
{/if}
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { PinInput as InputOTPPrimitive } from "bits-ui";
|
|
3
|
+
import type { ComponentProps } from "svelte";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
cell,
|
|
9
|
+
class: className,
|
|
10
|
+
...restProps
|
|
11
|
+
}: ComponentProps<typeof InputOTPPrimitive.Cell> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputOTPPrimitive.Cell
|
|
15
|
+
{cell}
|
|
16
|
+
bind:ref
|
|
17
|
+
class={cn(
|
|
18
|
+
"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
19
|
+
cell.isActive && "z-10 ring-2 ring-ring ring-offset-background",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
>
|
|
24
|
+
{cell.char}
|
|
25
|
+
{#if cell.hasFakeCaret}
|
|
26
|
+
<div class="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
27
|
+
<div class="animate-caret-blink h-4 w-px bg-foreground duration-1000"></div>
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
30
|
+
</InputOTPPrimitive.Cell>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const InputOtpSlot: import("svelte").Component<Omit<{
|
|
2
|
+
cell: import("bits-ui").PinInputCell;
|
|
3
|
+
}, "child" | "children"> & {
|
|
4
|
+
child?: import("svelte").Snippet<[{
|
|
5
|
+
props: Record<string, unknown>;
|
|
6
|
+
}]> | undefined;
|
|
7
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
8
|
+
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
9
|
+
ref?: HTMLElement | null | undefined;
|
|
10
|
+
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").PinInputCellPropsWithoutHTML> & {
|
|
11
|
+
$$events?: {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
} | undefined;
|
|
14
|
+
$$slots?: {} | undefined;
|
|
15
|
+
}, {}, "ref">;
|
|
16
|
+
export default InputOtpSlot;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { PinInput as InputOTPPrimitive } from "bits-ui";
|
|
3
|
+
import type { ComponentProps } from "svelte";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
value = $bindable(""),
|
|
10
|
+
...restProps
|
|
11
|
+
}: ComponentProps<typeof InputOTPPrimitive.Root> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputOTPPrimitive.Root
|
|
15
|
+
bind:ref
|
|
16
|
+
bind:value
|
|
17
|
+
class={cn("flex items-center gap-2 has-[:disabled]:opacity-50 [&_input]:disabled:cursor-not-allowed", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const InputOtp: import("svelte").Component<import("bits-ui").PinInputRootPropsWithoutHTML & import("bits-ui").Without<import("bits-ui").BitsPrimitiveInputAttributes, import("bits-ui").PinInputRootPropsWithoutHTML> & {
|
|
2
|
+
$$events?: {
|
|
3
|
+
[evt: string]: CustomEvent<any>;
|
|
4
|
+
} | undefined;
|
|
5
|
+
$$slots?: {} | undefined;
|
|
6
|
+
}, {}, "ref" | "value">;
|
|
7
|
+
export default InputOtp;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
{orientation}
|
|
17
17
|
class={cn(
|
|
18
18
|
"flex touch-none select-none transition-colors",
|
|
19
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-
|
|
20
|
-
orientation === "horizontal" && "h-2.5
|
|
19
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
|
|
20
|
+
orientation === "horizontal" && "h-2.5 w-full border-t border-t-transparent p-px",
|
|
21
21
|
className
|
|
22
22
|
)}
|
|
23
23
|
{...restProps}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.6",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -33,15 +33,17 @@
|
|
|
33
33
|
"zod": "^3.23.8"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"clsx": "^2.1.1",
|
|
37
|
-
"tailwind-merge": "^2.5.4",
|
|
38
|
-
"tailwind-variants": "^0.2.1",
|
|
39
36
|
"@internationalized/date": "^3.5.6",
|
|
40
|
-
"
|
|
37
|
+
"bits-ui": "1.0.0-next.30",
|
|
38
|
+
"clsx": "^2.1.1",
|
|
39
|
+
"embla-carousel-svelte": "8.3.1",
|
|
41
40
|
"formsnap": "2.0.0-next.0",
|
|
42
41
|
"mode-watcher": "^0.4.1",
|
|
43
42
|
"paneforge": "1.0.0-next.1",
|
|
44
|
-
"svelte-sonner": "^0.3.28"
|
|
43
|
+
"svelte-sonner": "^0.3.28",
|
|
44
|
+
"tailwind-merge": "^2.5.4",
|
|
45
|
+
"tailwind-variants": "^0.2.1",
|
|
46
|
+
"vaul-svelte": "1.0.0-next.1"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@sveltejs/adapter-auto": "^3.3.1",
|
|
@@ -50,28 +52,26 @@
|
|
|
50
52
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
51
53
|
"@testing-library/jest-dom": "^6.6.2",
|
|
52
54
|
"@testing-library/svelte": "^5.2.4",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
54
|
-
"@typescript-eslint/parser": "^8.
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^8.12.1",
|
|
56
|
+
"@typescript-eslint/parser": "^8.12.1",
|
|
55
57
|
"autoprefixer": "^10.4.20",
|
|
56
|
-
"bits-ui": "1.0.0-next.30",
|
|
57
58
|
"eslint": "^9.13.0",
|
|
58
59
|
"eslint-config-prettier": "^9.1.0",
|
|
59
60
|
"eslint-plugin-svelte": "^2.46.0",
|
|
60
61
|
"happy-dom": "^15.7.4",
|
|
61
|
-
"lucide-svelte": "^0.
|
|
62
|
+
"lucide-svelte": "^0.454.0",
|
|
62
63
|
"postcss": "^8.4.47",
|
|
63
64
|
"prettier": "^3.3.3",
|
|
64
65
|
"prettier-plugin-svelte": "^3.2.7",
|
|
65
66
|
"prettier-plugin-tailwindcss": "^0.6.8",
|
|
66
67
|
"publint": "^0.2.12",
|
|
67
|
-
"svelte": "^5.1.
|
|
68
|
+
"svelte": "^5.1.4",
|
|
68
69
|
"svelte-check": "^4.0.5",
|
|
69
70
|
"tailwindcss": "^3.4.14",
|
|
70
71
|
"tslib": "^2.8.0",
|
|
71
72
|
"typescript": "^5.6.3",
|
|
72
|
-
"vaul-svelte": "1.0.0-next.1",
|
|
73
73
|
"vite": "^5.4.10",
|
|
74
|
-
"vitest": "^2.1.
|
|
74
|
+
"vitest": "^2.1.4",
|
|
75
75
|
"zod": "^3.23.8"
|
|
76
76
|
},
|
|
77
77
|
"svelte": "./dist/index.js",
|