@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.
@@ -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,4 @@
1
+ import type { AvatarGroupEtcProps } from "./types";
2
+ declare const AvatarGroupEtc: import("svelte").Component<AvatarGroupEtcProps, {}, "ref">;
3
+ type AvatarGroupEtc = ReturnType<typeof AvatarGroupEtc>;
4
+ export default AvatarGroupEtc;
@@ -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,4 @@
1
+ import { Avatar as AvatarPrimitive } from "bits-ui";
2
+ declare const AvatarGroupMember: import("svelte").Component<AvatarPrimitive.RootProps, {}, "ref">;
3
+ type AvatarGroupMember = ReturnType<typeof AvatarGroupMember>;
4
+ export default AvatarGroupMember;
@@ -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,4 @@
1
+ import type { AvatarGroupRootProps } from "./types";
2
+ declare const AvatarGroup: import("svelte").Component<AvatarGroupRootProps, {}, "ref">;
3
+ type AvatarGroup = ReturnType<typeof AvatarGroup>;
4
+ export default AvatarGroup;
@@ -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 styleOpen = ">elyts<".split("").reverse().join("");
11
- const styleClose = ">elyts/<".split("").reverse().join("");
12
- </script>
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
- {#if colorConfig && colorConfig.length}
15
- {@const themeContents = Object.entries(THEMES)
16
- .map(
17
- ([theme, prefix]) => `
18
- ${prefix} [data-chart=${id}] {
19
- ${colorConfig
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 `${styleOpen}
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;
@@ -10,6 +10,6 @@
10
10
  bind:ref
11
11
  data-slot="sidebar-separator"
12
12
  data-sidebar="separator"
13
- class={cn("bg-sidebar-border mx-2 w-auto", className)}
13
+ class={cn("bg-sidebar-border", className)}
14
14
  {...restProps}
15
15
  />
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "1.0.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.5.0",
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.7",
42
+ "mode-watcher": "^1.0.8",
43
43
  "paneforge": "1.0.0-next.5",
44
- "svelte-sonner": "^1.0.4",
45
- "tailwind-merge": "^3.3.0",
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.513.0",
50
+ "@lucide/svelte": "^0.515.0",
51
51
  "@sveltejs/adapter-auto": "^6.0.1",
52
- "@sveltejs/kit": "^2.21.3",
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.8",
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.33.1",
62
- "@typescript-eslint/parser": "^8.33.1",
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.28.0",
65
+ "eslint": "^9.29.0",
66
66
  "eslint-config-prettier": "^10.1.5",
67
- "eslint-plugin-svelte": "^3.9.1",
68
- "happy-dom": "^17.6.3",
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.33.18",
74
+ "svelte": "5.34.3",
75
75
  "svelte-check": "^4.2.1",
76
- "tailwindcss": "^4.1.8",
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.56"
82
+ "zod": "^3.25.64"
83
83
  },
84
84
  "svelte": "./dist/index.js",
85
85
  "types": "./dist/index.d.ts",