@kayord/ui 1.0.0 → 1.0.2
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/custom/avatar-group/avatar-group-etc.svelte +17 -0
- package/dist/components/custom/avatar-group/avatar-group-etc.svelte.d.ts +4 -0
- package/dist/components/custom/avatar-group/avatar-group-member.svelte +9 -0
- package/dist/components/custom/avatar-group/avatar-group-member.svelte.d.ts +4 -0
- package/dist/components/custom/avatar-group/avatar-group.svelte +24 -0
- package/dist/components/custom/avatar-group/avatar-group.svelte.d.ts +4 -0
- package/dist/components/custom/avatar-group/index.d.ts +6 -0
- package/dist/components/custom/avatar-group/index.js +5 -0
- package/dist/components/custom/avatar-group/types.d.ts +13 -0
- package/dist/components/custom/avatar-group/types.js +1 -0
- package/dist/components/custom/data-table/DataTable.svelte +1 -0
- package/dist/components/custom/index.d.ts +1 -0
- package/dist/components/custom/index.js +1 -0
- package/dist/components/ui/chart/chart-style.svelte +21 -21
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/components/ui/sidebar/sidebar-separator.svelte +1 -1
- package/package.json +16 -16
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
import type { AvatarGroupEtcProps } from "./types";
|
|
4
|
+
|
|
5
|
+
let { ref = $bindable(null), plus, class: className, ...rest }: AvatarGroupEtcProps = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div
|
|
9
|
+
{...rest}
|
|
10
|
+
bind:this={ref}
|
|
11
|
+
class={cn(
|
|
12
|
+
"bg-accent ring-background relative flex size-8 items-center justify-center rounded-full text-xs ring-2",
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
>
|
|
16
|
+
<span>+{plus}</span>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Avatar } from "../../..";
|
|
3
|
+
import { Avatar as AvatarPrimitive } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let { ref = $bindable(null), class: className, ...restProps }: AvatarPrimitive.RootProps = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<Avatar.Root bind:ref class={cn("bg-accent ring-background ring-2", className)} {...restProps} />
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
import type { AvatarGroupRootProps } from "./types";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
orientation = "horizontal",
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}: AvatarGroupRootProps = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
data-orientation={orientation}
|
|
17
|
+
class={cn(
|
|
18
|
+
'group/avatar-group flex items-center data-[orientation="horizontal"]:flex-row data-[orientation="horizontal"]:-space-x-2 data-[orientation="vertical"]:flex-col data-[orientation="vertical"]:-space-y-2',
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...rest}
|
|
22
|
+
>
|
|
23
|
+
{@render children?.()}
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Root from "./avatar-group.svelte";
|
|
2
|
+
import Member from "./avatar-group-member.svelte";
|
|
3
|
+
import Etc from "./avatar-group-etc.svelte";
|
|
4
|
+
import { Fallback, Image } from "../../ui/avatar";
|
|
5
|
+
export { Root, Member, Etc, Image as MemberImage, Fallback as MemberFallback };
|
|
6
|
+
export type * from "./types";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Root from "./avatar-group.svelte";
|
|
2
|
+
import Member from "./avatar-group-member.svelte";
|
|
3
|
+
import Etc from "./avatar-group-etc.svelte";
|
|
4
|
+
import { Fallback, Image } from "../../ui/avatar";
|
|
5
|
+
export { Root, Member, Etc, Image as MemberImage, Fallback as MemberFallback };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Avatar as AvatarPrimitive, WithChildren, WithoutChildren } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
export type AvatarGroupRootPropsWithoutHTML = WithChildren<{
|
|
4
|
+
ref?: HTMLElement | null;
|
|
5
|
+
orientation?: "vertical" | "horizontal";
|
|
6
|
+
}>;
|
|
7
|
+
export type AvatarGroupRootProps = AvatarGroupRootPropsWithoutHTML & WithoutChildren<HTMLAttributes<HTMLDivElement>>;
|
|
8
|
+
export type AvatarGroupMemberProps = AvatarPrimitive.RootProps;
|
|
9
|
+
export type AvatarGroupEtcPropsWithoutHTML = WithChildren<{
|
|
10
|
+
ref?: HTMLElement | null;
|
|
11
|
+
plus: number;
|
|
12
|
+
}>;
|
|
13
|
+
export type AvatarGroupEtcProps = AvatarGroupEtcPropsWithoutHTML & WithoutChildren<HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
<Table.Row data-state={row.getIsSelected() && "selected"}>
|
|
139
139
|
{#each row.getVisibleCells() as cell}
|
|
140
140
|
<Table.Cell
|
|
141
|
+
class={cell.column.columnDef.meta?.className}
|
|
141
142
|
style={`width: ${cell.column.getSize()}px; min-width:${cell.column.columnDef.minSize}px; max-width:${cell.column.columnDef.maxSize}px`}
|
|
142
143
|
>
|
|
143
144
|
<FlexRender content={cell.column.columnDef.cell} context={cell.getContext()} />
|
|
@@ -8,3 +8,4 @@ export * as TreeView from "./tree-view/index.js";
|
|
|
8
8
|
export { ThemeSelector } from "./theme-selector/index.js";
|
|
9
9
|
export { LightSwitch } from "./light-switch.svelte/index.js";
|
|
10
10
|
export * from "./animations/index.js";
|
|
11
|
+
export * as AvatarGroup from "./avatar-group/index.js";
|
|
@@ -8,3 +8,4 @@ export * as TreeView from "./tree-view/index.js";
|
|
|
8
8
|
export { ThemeSelector } from "./theme-selector/index.js";
|
|
9
9
|
export { LightSwitch } from "./light-switch.svelte/index.js";
|
|
10
10
|
export * from "./animations/index.js";
|
|
11
|
+
export * as AvatarGroup from "./avatar-group/index.js";
|
|
@@ -7,30 +7,30 @@
|
|
|
7
7
|
config ? Object.entries(config).filter(([, config]) => config.theme || config.color) : null
|
|
8
8
|
);
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const themeContents = $derived.by(() => {
|
|
11
|
+
if (!colorConfig || !colorConfig.length) return;
|
|
12
|
+
|
|
13
|
+
const themeContents = [];
|
|
14
|
+
for (let [_theme, prefix] of Object.entries(THEMES)) {
|
|
15
|
+
let content = `${prefix} [data-chart=${id}] {\n`;
|
|
16
|
+
const color = colorConfig.map(([key, itemConfig]) => {
|
|
17
|
+
const theme = _theme as keyof typeof itemConfig.theme;
|
|
18
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
19
|
+
return color ? `\t--color-${key}: ${color};` : null;
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
content += color.join("\n") + "\n}";
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.map(([key, itemConfig]) => {
|
|
21
|
-
const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;
|
|
22
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
23
|
-
})
|
|
24
|
-
.join("\n")}
|
|
25
|
-
}
|
|
26
|
-
`
|
|
27
|
-
)
|
|
28
|
-
.join("\n")}
|
|
24
|
+
themeContents.push(content);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return themeContents.join("\n");
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
29
30
|
|
|
31
|
+
{#if themeContents}
|
|
30
32
|
{#key id}
|
|
31
33
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
|
32
|
-
{@html
|
|
33
|
-
${themeContents}
|
|
34
|
-
${styleClose}`}
|
|
34
|
+
{@html `<style>${themeContents}</style>`}
|
|
35
35
|
{/key}
|
|
36
36
|
{/if}
|
|
@@ -15,6 +15,7 @@ declare const Sub: import("svelte").Component<import("bits-ui").ContextMenuSubPr
|
|
|
15
15
|
declare const Root: import("svelte").Component<{
|
|
16
16
|
open?: boolean;
|
|
17
17
|
onOpenChange?: import("bits-ui/dist/internal/types").OnChangeFn<boolean>;
|
|
18
|
+
onOpenChangeComplete?: import("bits-ui/dist/internal/types").OnChangeFn<boolean>;
|
|
18
19
|
dir?: import("bits-ui").Direction;
|
|
19
20
|
} & {
|
|
20
21
|
children?: import("svelte").Snippet | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -35,51 +35,51 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@internationalized/date": "^3.8.2",
|
|
38
|
-
"bits-ui": "2.
|
|
38
|
+
"bits-ui": "2.8.0",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"embla-carousel-svelte": "8.6.0",
|
|
41
41
|
"formsnap": "2.0.1",
|
|
42
|
-
"mode-watcher": "^1.0.
|
|
42
|
+
"mode-watcher": "^1.0.8",
|
|
43
43
|
"paneforge": "1.0.0-next.5",
|
|
44
|
-
"svelte-sonner": "^1.0.
|
|
45
|
-
"tailwind-merge": "^3.3.
|
|
44
|
+
"svelte-sonner": "^1.0.5",
|
|
45
|
+
"tailwind-merge": "^3.3.1",
|
|
46
46
|
"tailwind-variants": "^1.0.0",
|
|
47
47
|
"vaul-svelte": "1.0.0-next.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@lucide/svelte": "^0.
|
|
50
|
+
"@lucide/svelte": "^0.515.0",
|
|
51
51
|
"@sveltejs/adapter-auto": "^6.0.1",
|
|
52
|
-
"@sveltejs/kit": "^2.21.
|
|
52
|
+
"@sveltejs/kit": "^2.21.5",
|
|
53
53
|
"@sveltejs/package": "^2.3.11",
|
|
54
54
|
"@sveltejs/vite-plugin-svelte": "^5.1.0",
|
|
55
|
-
"@tailwindcss/vite": "^4.1.
|
|
55
|
+
"@tailwindcss/vite": "^4.1.10",
|
|
56
56
|
"@testing-library/jest-dom": "^6.6.3",
|
|
57
57
|
"@testing-library/svelte": "^5.2.8",
|
|
58
58
|
"@testing-library/user-event": "^14.6.1",
|
|
59
59
|
"@types/d3-scale": "^4.0.9",
|
|
60
60
|
"@types/d3-shape": "^3.1.7",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
62
|
-
"@typescript-eslint/parser": "^8.
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
62
|
+
"@typescript-eslint/parser": "^8.34.0",
|
|
63
63
|
"d3-scale": "^4.0.2",
|
|
64
64
|
"d3-shape": "^3.2.0",
|
|
65
|
-
"eslint": "^9.
|
|
65
|
+
"eslint": "^9.29.0",
|
|
66
66
|
"eslint-config-prettier": "^10.1.5",
|
|
67
|
-
"eslint-plugin-svelte": "^3.9.
|
|
68
|
-
"happy-dom": "^
|
|
67
|
+
"eslint-plugin-svelte": "^3.9.2",
|
|
68
|
+
"happy-dom": "^18.0.1",
|
|
69
69
|
"layerchart": "2.0.0-next.6",
|
|
70
70
|
"prettier": "^3.5.3",
|
|
71
71
|
"prettier-plugin-svelte": "^3.4.0",
|
|
72
72
|
"prettier-plugin-tailwindcss": "^0.6.12",
|
|
73
73
|
"publint": "^0.3.12",
|
|
74
|
-
"svelte": "5.
|
|
74
|
+
"svelte": "5.34.3",
|
|
75
75
|
"svelte-check": "^4.2.1",
|
|
76
|
-
"tailwindcss": "^4.1.
|
|
76
|
+
"tailwindcss": "^4.1.10",
|
|
77
77
|
"tslib": "^2.8.1",
|
|
78
78
|
"tw-animate-css": "1.3.4",
|
|
79
79
|
"typescript": "^5.8.3",
|
|
80
80
|
"vite": "^6.3.5",
|
|
81
81
|
"vitest": "^3.2.3",
|
|
82
|
-
"zod": "^3.25.
|
|
82
|
+
"zod": "^3.25.64"
|
|
83
83
|
},
|
|
84
84
|
"svelte": "./dist/index.js",
|
|
85
85
|
"types": "./dist/index.d.ts",
|