@florianke/components 0.0.1
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/avatar.d.mts +23 -0
- package/dist/avatar.d.mts.map +1 -0
- package/dist/avatar.mjs +60 -0
- package/dist/avatar.mjs.map +1 -0
- package/dist/button.d.mts +19 -0
- package/dist/button.d.mts.map +1 -0
- package/dist/button.mjs +26 -0
- package/dist/button.mjs.map +1 -0
- package/dist/card.d.mts +11 -0
- package/dist/card.d.mts.map +1 -0
- package/dist/card.mjs +14 -0
- package/dist/card.mjs.map +1 -0
- package/dist/cn-BpvCVwZv.mjs +10 -0
- package/dist/cn-BpvCVwZv.mjs.map +1 -0
- package/dist/dropdown-menu.d.mts +33 -0
- package/dist/dropdown-menu.d.mts.map +1 -0
- package/dist/dropdown-menu.mjs +42 -0
- package/dist/dropdown-menu.mjs.map +1 -0
- package/dist/hooks/use-initials.d.mts +5 -0
- package/dist/hooks/use-initials.d.mts.map +1 -0
- package/dist/hooks/use-initials.mjs +15 -0
- package/dist/hooks/use-initials.mjs.map +1 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +8 -0
- package/dist/input.d.mts +16 -0
- package/dist/input.d.mts.map +1 -0
- package/dist/input.mjs +19 -0
- package/dist/input.mjs.map +1 -0
- package/dist/select.d.mts +48 -0
- package/dist/select.d.mts.map +1 -0
- package/dist/select.mjs +108 -0
- package/dist/select.mjs.map +1 -0
- package/package.json +84 -0
- package/src/styles.css +63 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
3
|
+
|
|
4
|
+
//#region src/components/avatar/avatar.d.ts
|
|
5
|
+
type AvatarVariant = "rounded" | "squared";
|
|
6
|
+
type AvatarSize = "small" | "base" | "large";
|
|
7
|
+
type AvatarProps = Omit<React.ComponentPropsWithoutRef<typeof Avatar$1.Root>, "children"> & {
|
|
8
|
+
src?: string;
|
|
9
|
+
name: string;
|
|
10
|
+
variant?: AvatarVariant;
|
|
11
|
+
size?: AvatarSize;
|
|
12
|
+
};
|
|
13
|
+
declare function Avatar({
|
|
14
|
+
src,
|
|
15
|
+
name,
|
|
16
|
+
variant,
|
|
17
|
+
size,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: AvatarProps): React.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Avatar };
|
|
23
|
+
//# sourceMappingURL=avatar.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.mts","names":[],"sources":["../src/components/avatar/avatar.tsx"],"mappings":";;;;KAOK,aAAA;AAAA,KACA,UAAA;AAAA,KAEA,WAAA,GAAc,IAAA,CACjB,KAAA,CAAM,wBAAA,QAAgC,QAAA,CAAW,IAAA;EAGjD,GAAA;EACA,IAAA;EACA,OAAA,GAAU,aAAA;EACV,IAAA,GAAO,UAAA;AAAA;AAAA,iBAyBO,MAAA,CAAA;EACd,GAAA;EACA,IAAA;EACA,OAAA;EACA,IAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,WAAA,GAAW,KAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/avatar.mjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-BpvCVwZv.mjs";
|
|
3
|
+
import { useInitials } from "./hooks/use-initials.mjs";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/avatar/avatar.tsx
|
|
8
|
+
const rootSizes = {
|
|
9
|
+
small: "size-7",
|
|
10
|
+
base: "size-8",
|
|
11
|
+
large: "size-10"
|
|
12
|
+
};
|
|
13
|
+
const rootRounding = {
|
|
14
|
+
rounded: {
|
|
15
|
+
small: "rounded-full",
|
|
16
|
+
base: "rounded-full",
|
|
17
|
+
large: "rounded-full"
|
|
18
|
+
},
|
|
19
|
+
squared: {
|
|
20
|
+
small: "rounded-md",
|
|
21
|
+
base: "rounded-md",
|
|
22
|
+
large: "rounded-lg"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const innerSizes = {
|
|
26
|
+
small: "size-6 text-xs font-medium",
|
|
27
|
+
base: "size-7 text-[0.8125rem] font-medium",
|
|
28
|
+
large: "size-9 text-sm font-medium"
|
|
29
|
+
};
|
|
30
|
+
const innerRounding = {
|
|
31
|
+
rounded: {
|
|
32
|
+
small: "rounded-full",
|
|
33
|
+
base: "rounded-full",
|
|
34
|
+
large: "rounded-full"
|
|
35
|
+
},
|
|
36
|
+
squared: {
|
|
37
|
+
small: "rounded",
|
|
38
|
+
base: "rounded",
|
|
39
|
+
large: "rounded-md"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
function Avatar({ src, name, variant = "rounded", size = "base", className, ...props }) {
|
|
43
|
+
const initials = useInitials(name);
|
|
44
|
+
return /* @__PURE__ */ jsxs(Avatar$1.Root, {
|
|
45
|
+
className: cn("flex shrink-0 items-center justify-center overflow-hidden border border-(--border) bg-(--muted)", rootSizes[size], rootRounding[variant][size], className),
|
|
46
|
+
...props,
|
|
47
|
+
children: [src && /* @__PURE__ */ jsx(Avatar$1.Image, {
|
|
48
|
+
src,
|
|
49
|
+
alt: name,
|
|
50
|
+
className: cn("aspect-square object-cover object-center", innerSizes[size], innerRounding[variant][size])
|
|
51
|
+
}), /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
52
|
+
className: cn("pointer-events-none flex select-none items-center justify-center bg-(--accent) text-(--foreground) dark:bg-(--border)", innerSizes[size], innerRounding[variant][size]),
|
|
53
|
+
children: initials
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { Avatar };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=avatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.mjs","names":["BaseAvatar"],"sources":["../src/components/avatar/avatar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Avatar as BaseAvatar } from \"@base-ui/react/avatar\";\nimport { cn } from \"@/lib/cn\";\nimport { useInitials } from \"@/hooks/use-initials\";\n\ntype AvatarVariant = \"rounded\" | \"squared\";\ntype AvatarSize = \"small\" | \"base\" | \"large\";\n\ntype AvatarProps = Omit<\n React.ComponentPropsWithoutRef<typeof BaseAvatar.Root>,\n \"children\"\n> & {\n src?: string;\n name: string;\n variant?: AvatarVariant;\n size?: AvatarSize;\n};\n\nconst rootSizes: Record<AvatarSize, string> = {\n small: \"size-7\",\n base: \"size-8\",\n large: \"size-10\",\n};\n\nconst rootRounding: Record<AvatarVariant, Record<AvatarSize, string>> = {\n rounded: { small: \"rounded-full\", base: \"rounded-full\", large: \"rounded-full\" },\n squared: { small: \"rounded-md\", base: \"rounded-md\", large: \"rounded-lg\" },\n};\n\nconst innerSizes: Record<AvatarSize, string> = {\n small: \"size-6 text-xs font-medium\",\n base: \"size-7 text-[0.8125rem] font-medium\",\n large: \"size-9 text-sm font-medium\",\n};\n\nconst innerRounding: Record<AvatarVariant, Record<AvatarSize, string>> = {\n rounded: { small: \"rounded-full\", base: \"rounded-full\", large: \"rounded-full\" },\n squared: { small: \"rounded\", base: \"rounded\", large: \"rounded-md\" },\n};\n\nexport function Avatar({\n src,\n name,\n variant = \"rounded\",\n size = \"base\",\n className,\n ...props\n}: AvatarProps) {\n const initials = useInitials(name);\n\n return (\n <BaseAvatar.Root\n className={cn(\n \"flex shrink-0 items-center justify-center overflow-hidden border border-(--border) bg-(--muted)\",\n rootSizes[size],\n rootRounding[variant][size],\n className,\n )}\n {...props}\n >\n {src && (\n <BaseAvatar.Image\n src={src}\n alt={name}\n className={cn(\n \"aspect-square object-cover object-center\",\n innerSizes[size],\n innerRounding[variant][size],\n )}\n />\n )}\n <BaseAvatar.Fallback\n className={cn(\n \"pointer-events-none flex select-none items-center justify-center bg-(--accent) text-(--foreground) dark:bg-(--border)\",\n innerSizes[size],\n innerRounding[variant][size],\n )}\n >\n {initials}\n </BaseAvatar.Fallback>\n </BaseAvatar.Root>\n );\n}\n"],"mappings":";;;;;;;AAoBA,MAAM,YAAwC;CAC5C,OAAO;CACP,MAAM;CACN,OAAO;CACR;AAED,MAAM,eAAkE;CACtE,SAAS;EAAE,OAAO;EAAgB,MAAM;EAAgB,OAAO;EAAgB;CAC/E,SAAS;EAAE,OAAO;EAAc,MAAM;EAAc,OAAO;EAAc;CAC1E;AAED,MAAM,aAAyC;CAC7C,OAAO;CACP,MAAM;CACN,OAAO;CACR;AAED,MAAM,gBAAmE;CACvE,SAAS;EAAE,OAAO;EAAgB,MAAM;EAAgB,OAAO;EAAgB;CAC/E,SAAS;EAAE,OAAO;EAAW,MAAM;EAAW,OAAO;EAAc;CACpE;AAED,SAAgB,OAAO,EACrB,KACA,MACA,UAAU,WACV,OAAO,QACP,WACA,GAAG,SACW;CACd,MAAM,WAAW,YAAY,KAAK;AAElC,QACE,qBAACA,SAAW,MAAZ;EACE,WAAW,GACT,mGACA,UAAU,OACV,aAAa,SAAS,OACtB,UACD;EACD,GAAI;YAPN,CASG,OACC,oBAACA,SAAW,OAAZ;GACO;GACL,KAAK;GACL,WAAW,GACT,4CACA,WAAW,OACX,cAAc,SAAS,MACxB;GACD,CAAA,EAEJ,oBAACA,SAAW,UAAZ;GACE,WAAW,GACT,yHACA,WAAW,OACX,cAAc,SAAS,MACxB;aAEA;GACmB,CAAA,CACN"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
|
+
|
|
4
|
+
//#region src/components/button/button.d.ts
|
|
5
|
+
type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "link";
|
|
6
|
+
type ButtonSize = "sm" | "md";
|
|
7
|
+
type ButtonProps = React.ComponentPropsWithoutRef<typeof Button$1> & {
|
|
8
|
+
variant?: ButtonVariant;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
};
|
|
11
|
+
declare function Button({
|
|
12
|
+
className,
|
|
13
|
+
variant,
|
|
14
|
+
size,
|
|
15
|
+
...props
|
|
16
|
+
}: ButtonProps): React.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Button };
|
|
19
|
+
//# sourceMappingURL=button.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.mts","names":[],"sources":["../src/components/button/button.tsx"],"mappings":";;;;KAIK,aAAA;AAAA,KACA,UAAA;AAAA,KAEA,WAAA,GAAc,KAAA,CAAM,wBAAA,QAAgC,QAAA;EACvD,OAAA,GAAU,aAAA;EACV,IAAA,GAAO,UAAA;AAAA;AAAA,iBAqBO,MAAA,CAAA;EACd,SAAA;EACA,OAAA;EACA,IAAA;EAAA,GACG;AAAA,GACF,WAAA,GAAW,KAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/button.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as cn } from "./cn-BpvCVwZv.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
|
+
//#region src/components/button/button.tsx
|
|
6
|
+
const variants = {
|
|
7
|
+
primary: "bg-(--foreground) text-(--background) hover:bg-(--foreground)/85 active:bg-(--foreground)/75",
|
|
8
|
+
secondary: "bg-(--border) text-(--foreground) hover:bg-(--input-border) active:bg-(--input-border)",
|
|
9
|
+
outline: "border border-(--border) bg-transparent text-(--foreground) hover:bg-(--muted) active:bg-(--border)",
|
|
10
|
+
ghost: "text-(--foreground) hover:bg-(--muted) active:bg-(--border)",
|
|
11
|
+
link: "h-auto p-0 text-(--foreground) underline-offset-4 hover:underline"
|
|
12
|
+
};
|
|
13
|
+
const sizes = {
|
|
14
|
+
sm: "h-7 rounded-md px-3 gap-1.5 text-[12px] [&_svg]:size-3.5 [&_svg]:shrink-0",
|
|
15
|
+
md: "h-8 rounded-md px-4 gap-2 text-[14px] [&_svg]:size-4 [&_svg]:shrink-0"
|
|
16
|
+
};
|
|
17
|
+
function Button({ className, variant = "primary", size = "md", ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
19
|
+
className: cn("inline-flex items-center justify-center font-medium transition-colors", "disabled:pointer-events-none disabled:opacity-50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ring)/30", variants[variant], variant !== "link" && sizes[size], className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Button };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.mjs","names":["BaseButton"],"sources":["../src/components/button/button.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Button as BaseButton } from \"@base-ui/react/button\";\nimport { cn } from \"@/lib/cn\";\n\ntype ButtonVariant = \"primary\" | \"secondary\" | \"outline\" | \"ghost\" | \"link\";\ntype ButtonSize = \"sm\" | \"md\";\n\ntype ButtonProps = React.ComponentPropsWithoutRef<typeof BaseButton> & {\n variant?: ButtonVariant;\n size?: ButtonSize;\n};\n\nconst variants: Record<ButtonVariant, string> = {\n primary:\n \"bg-(--foreground) text-(--background) hover:bg-(--foreground)/85 active:bg-(--foreground)/75\",\n secondary:\n \"bg-(--border) text-(--foreground) hover:bg-(--input-border) active:bg-(--input-border)\",\n outline:\n \"border border-(--border) bg-transparent text-(--foreground) hover:bg-(--muted) active:bg-(--border)\",\n ghost:\n \"text-(--foreground) hover:bg-(--muted) active:bg-(--border)\",\n link:\n \"h-auto p-0 text-(--foreground) underline-offset-4 hover:underline\",\n};\n\nconst sizes: Record<ButtonSize, string> = {\n sm: \"h-7 rounded-md px-3 gap-1.5 text-[12px] [&_svg]:size-3.5 [&_svg]:shrink-0\",\n md: \"h-8 rounded-md px-4 gap-2 text-[14px] [&_svg]:size-4 [&_svg]:shrink-0\",\n};\n\nexport function Button({\n className,\n variant = \"primary\",\n size = \"md\",\n ...props\n}: ButtonProps) {\n return (\n <BaseButton\n className={cn(\n \"inline-flex items-center justify-center font-medium transition-colors\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ring)/30\",\n variants[variant],\n variant !== \"link\" && sizes[size],\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;AAYA,MAAM,WAA0C;CAC9C,SACE;CACF,WACE;CACF,SACE;CACF,OACE;CACF,MACE;CACH;AAED,MAAM,QAAoC;CACxC,IAAI;CACJ,IAAI;CACL;AAED,SAAgB,OAAO,EACrB,WACA,UAAU,WACV,OAAO,MACP,GAAG,SACW;AACd,QACE,oBAACA,UAAD;EACE,WAAW,GACT,yEACA,oDACA,kFACA,SAAS,UACT,YAAY,UAAU,MAAM,OAC5B,UACD;EACD,GAAI;EACJ,CAAA"}
|
package/dist/card.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/card/card.d.ts
|
|
4
|
+
type CardProps = React.HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
declare function Card({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: CardProps): React.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Card };
|
|
11
|
+
//# sourceMappingURL=card.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.mts","names":[],"sources":["../src/components/card/card.tsx"],"mappings":";;;KAGK,SAAA,GAAY,KAAA,CAAM,cAAA,CAAe,cAAA;AAAA,iBAEtB,IAAA,CAAA;EAAO,SAAA;EAAA,GAAc;AAAA,GAAS,SAAA,GAAS,KAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/card.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { t as cn } from "./cn-BpvCVwZv.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/card/card.tsx
|
|
5
|
+
function Card({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
className: cn("rounded-xl border border-(--border) bg-(--card) text-(--card-foreground) shadow-xs", className),
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Card };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=card.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.mjs","names":[],"sources":["../src/components/card/card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/lib/cn\";\n\ntype CardProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport function Card({ className, ...props }: CardProps) {\n return (\n <div\n className={cn(\n \"rounded-xl border border-(--border) bg-(--card) text-(--card-foreground) shadow-xs\",\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":";;;;AAKA,SAAgB,KAAK,EAAE,WAAW,GAAG,SAAoB;AACvD,QACE,oBAAC,OAAD;EACE,WAAW,GACT,sFACA,UACD;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn-BpvCVwZv.mjs","names":[],"sources":["../src/lib/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAGA,SAAgB,GAAG,GAAG,QAAsB;AAC1C,QAAO,QAAQ,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Menu } from "@base-ui/react/menu";
|
|
3
|
+
|
|
4
|
+
//#region src/components/dropdown-menu/dropdown-menu.d.ts
|
|
5
|
+
type DropdownMenuProps = React.ComponentPropsWithoutRef<typeof Menu.Root>;
|
|
6
|
+
declare function DropdownMenuRoot(props: DropdownMenuProps): React.JSX.Element;
|
|
7
|
+
type DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<typeof Menu.Trigger>;
|
|
8
|
+
declare function DropdownMenuTrigger({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: DropdownMenuTriggerProps): React.JSX.Element;
|
|
12
|
+
type DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof Menu.Popup> & Pick<React.ComponentPropsWithoutRef<typeof Menu.Positioner>, "side" | "align" | "sideOffset" | "alignOffset">;
|
|
13
|
+
declare function DropdownMenuContent({
|
|
14
|
+
className,
|
|
15
|
+
side,
|
|
16
|
+
align,
|
|
17
|
+
sideOffset,
|
|
18
|
+
alignOffset,
|
|
19
|
+
...props
|
|
20
|
+
}: DropdownMenuContentProps): React.JSX.Element;
|
|
21
|
+
type DropdownMenuItemProps = React.ComponentPropsWithoutRef<typeof Menu.Item>;
|
|
22
|
+
declare function DropdownMenuItem({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: DropdownMenuItemProps): React.JSX.Element;
|
|
26
|
+
declare const DropdownMenu: typeof DropdownMenuRoot & {
|
|
27
|
+
Trigger: typeof DropdownMenuTrigger;
|
|
28
|
+
Content: typeof DropdownMenuContent;
|
|
29
|
+
Item: typeof DropdownMenuItem;
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { DropdownMenu };
|
|
33
|
+
//# sourceMappingURL=dropdown-menu.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.mts","names":[],"sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"mappings":";;;;KAIK,iBAAA,GAAoB,KAAA,CAAM,wBAAA,QAAgC,IAAA,CAAK,IAAA;AAAA,iBAE3D,gBAAA,CAAiB,KAAA,EAAO,iBAAA,GAAiB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAI7C,wBAAA,GAA2B,KAAA,CAAM,wBAAA,QAC7B,IAAA,CAAK,OAAA;AAAA,iBAGL,mBAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,wBAAA,GAAwB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAYtB,wBAAA,GAA2B,KAAA,CAAM,wBAAA,QAC7B,IAAA,CAAK,KAAA,IAEZ,IAAA,CACE,KAAA,CAAM,wBAAA,QAAgC,IAAA,CAAK,UAAA;AAAA,iBAItC,mBAAA,CAAA;EACP,SAAA;EACA,IAAA;EACA,KAAA;EACA,UAAA;EACA,WAAA;EAAA,GACG;AAAA,GACF,wBAAA,GAAwB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KA0BtB,qBAAA,GAAwB,KAAA,CAAM,wBAAA,QAAgC,IAAA,CAAK,IAAA;AAAA,iBAE/D,gBAAA,CAAA;EAAmB,SAAA;EAAA,GAAc;AAAA,GAAS,qBAAA,GAAqB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAc3D,YAAA,SAAY,gBAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { t as cn } from "./cn-BpvCVwZv.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Menu } from "@base-ui/react/menu";
|
|
5
|
+
//#region src/components/dropdown-menu/dropdown-menu.tsx
|
|
6
|
+
function DropdownMenuRoot(props) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Menu.Root, { ...props });
|
|
8
|
+
}
|
|
9
|
+
function DropdownMenuTrigger({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
11
|
+
className: cn("rounded-md outline-none focus-visible:ring-2 focus-visible:ring-(--ring)/30", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function DropdownMenuContent({ className, side, align = "start", sideOffset = 6, alignOffset, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
17
|
+
side,
|
|
18
|
+
align,
|
|
19
|
+
sideOffset,
|
|
20
|
+
alignOffset,
|
|
21
|
+
className: "z-50 outline-none",
|
|
22
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
23
|
+
className: cn("min-w-40 origin-(--transform-origin) scale-100 rounded-lg border border-(--border) bg-(--popover) p-1 text-(--popover-foreground) opacity-100 shadow-lg outline-none", "transition-[scale,opacity] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)]", "data-ending-style:duration-100 data-ending-style:ease-in", "data-starting-style:scale-95 data-starting-style:opacity-0", "data-ending-style:scale-95 data-ending-style:opacity-0", className),
|
|
24
|
+
...props
|
|
25
|
+
})
|
|
26
|
+
}) });
|
|
27
|
+
}
|
|
28
|
+
function DropdownMenuItem({ className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
30
|
+
className: cn("flex cursor-default items-center rounded-md px-2 py-1.5 text-[13px] text-(--popover-foreground) select-none outline-none transition-colors duration-150 ease-out", "data-highlighted:bg-(--accent) data-highlighted:text-(--accent-foreground)", "data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const DropdownMenu = Object.assign(DropdownMenuRoot, {
|
|
35
|
+
Trigger: DropdownMenuTrigger,
|
|
36
|
+
Content: DropdownMenuContent,
|
|
37
|
+
Item: DropdownMenuItem
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DropdownMenu };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=dropdown-menu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.mjs","names":[],"sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Menu } from \"@base-ui/react/menu\";\nimport { cn } from \"@/lib/cn\";\n\ntype DropdownMenuProps = React.ComponentPropsWithoutRef<typeof Menu.Root>;\n\nfunction DropdownMenuRoot(props: DropdownMenuProps) {\n return <Menu.Root {...props} />;\n}\n\ntype DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<\n typeof Menu.Trigger\n>;\n\nfunction DropdownMenuTrigger({\n className,\n ...props\n}: DropdownMenuTriggerProps) {\n return (\n <Menu.Trigger\n className={cn(\n \"rounded-md outline-none focus-visible:ring-2 focus-visible:ring-(--ring)/30\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype DropdownMenuContentProps = React.ComponentPropsWithoutRef<\n typeof Menu.Popup\n> &\n Pick<\n React.ComponentPropsWithoutRef<typeof Menu.Positioner>,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\"\n >;\n\nfunction DropdownMenuContent({\n className,\n side,\n align = \"start\",\n sideOffset = 6,\n alignOffset,\n ...props\n}: DropdownMenuContentProps) {\n return (\n <Menu.Portal>\n <Menu.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n className=\"z-50 outline-none\"\n >\n <Menu.Popup\n className={cn(\n \"min-w-40 origin-(--transform-origin) scale-100 rounded-lg border border-(--border) bg-(--popover) p-1 text-(--popover-foreground) opacity-100 shadow-lg outline-none\",\n \"transition-[scale,opacity] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)]\",\n \"data-ending-style:duration-100 data-ending-style:ease-in\",\n \"data-starting-style:scale-95 data-starting-style:opacity-0\",\n \"data-ending-style:scale-95 data-ending-style:opacity-0\",\n className,\n )}\n {...props}\n />\n </Menu.Positioner>\n </Menu.Portal>\n );\n}\n\ntype DropdownMenuItemProps = React.ComponentPropsWithoutRef<typeof Menu.Item>;\n\nfunction DropdownMenuItem({ className, ...props }: DropdownMenuItemProps) {\n return (\n <Menu.Item\n className={cn(\n \"flex cursor-default items-center rounded-md px-2 py-1.5 text-[13px] text-(--popover-foreground) select-none outline-none transition-colors duration-150 ease-out\",\n \"data-highlighted:bg-(--accent) data-highlighted:text-(--accent-foreground)\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport const DropdownMenu = Object.assign(DropdownMenuRoot, {\n Trigger: DropdownMenuTrigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n});\n"],"mappings":";;;;;AAMA,SAAS,iBAAiB,OAA0B;AAClD,QAAO,oBAAC,KAAK,MAAN,EAAW,GAAI,OAAS,CAAA;;AAOjC,SAAS,oBAAoB,EAC3B,WACA,GAAG,SACwB;AAC3B,QACE,oBAAC,KAAK,SAAN;EACE,WAAW,GACT,+EACA,UACD;EACD,GAAI;EACJ,CAAA;;AAYN,SAAS,oBAAoB,EAC3B,WACA,MACA,QAAQ,SACR,aAAa,GACb,aACA,GAAG,SACwB;AAC3B,QACE,oBAAC,KAAK,QAAN,EAAA,UACE,oBAAC,KAAK,YAAN;EACQ;EACC;EACK;EACC;EACb,WAAU;YAEV,oBAAC,KAAK,OAAN;GACE,WAAW,GACT,wKACA,6EACA,4DACA,8DACA,0DACA,UACD;GACD,GAAI;GACJ,CAAA;EACc,CAAA,EACN,CAAA;;AAMlB,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAgC;AACxE,QACE,oBAAC,KAAK,MAAN;EACE,WAAW,GACT,oKACA,8EACA,8DACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,MAAa,eAAe,OAAO,OAAO,kBAAkB;CAC1D,SAAS;CACT,SAAS;CACT,MAAM;CACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-initials.d.mts","names":[],"sources":["../../src/hooks/use-initials.ts"],"mappings":";iBAIgB,WAAA,CAAY,IAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/hooks/use-initials.ts
|
|
4
|
+
function useInitials(name) {
|
|
5
|
+
return React.useMemo(() => {
|
|
6
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
7
|
+
if (parts.length === 0) return "";
|
|
8
|
+
if (parts.length === 1) return parts[0].charAt(0).toUpperCase();
|
|
9
|
+
return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase();
|
|
10
|
+
}, [name]);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useInitials };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=use-initials.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-initials.mjs","names":[],"sources":["../../src/hooks/use-initials.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nexport function useInitials(name: string): string {\n return React.useMemo(() => {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n\n if (parts.length === 0) return \"\";\n if (parts.length === 1) return parts[0]!.charAt(0).toUpperCase();\n\n return (\n parts[0]!.charAt(0) + parts[parts.length - 1]!.charAt(0)\n ).toUpperCase();\n }, [name]);\n}\n"],"mappings":";;;AAIA,SAAgB,YAAY,MAAsB;AAChD,QAAO,MAAM,cAAc;EACzB,MAAM,QAAQ,KAAK,MAAM,CAAC,MAAM,MAAM,CAAC,OAAO,QAAQ;AAEtD,MAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,MAAI,MAAM,WAAW,EAAG,QAAO,MAAM,GAAI,OAAO,EAAE,CAAC,aAAa;AAEhE,UACE,MAAM,GAAI,OAAO,EAAE,GAAG,MAAM,MAAM,SAAS,GAAI,OAAO,EAAE,EACxD,aAAa;IACd,CAAC,KAAK,CAAC"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Avatar } from "./avatar.mjs";
|
|
2
|
+
import { Button } from "./button.mjs";
|
|
3
|
+
import { Card } from "./card.mjs";
|
|
4
|
+
import { DropdownMenu } from "./dropdown-menu.mjs";
|
|
5
|
+
import { Input } from "./input.mjs";
|
|
6
|
+
import { Select } from "./select.mjs";
|
|
7
|
+
import { useInitials } from "./hooks/use-initials.mjs";
|
|
8
|
+
export { Avatar, Button, Card, DropdownMenu, Input, Select, useInitials };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useInitials } from "./hooks/use-initials.mjs";
|
|
2
|
+
import { Avatar } from "./avatar.mjs";
|
|
3
|
+
import { Button } from "./button.mjs";
|
|
4
|
+
import { Card } from "./card.mjs";
|
|
5
|
+
import { DropdownMenu } from "./dropdown-menu.mjs";
|
|
6
|
+
import { Input } from "./input.mjs";
|
|
7
|
+
import { Select } from "./select.mjs";
|
|
8
|
+
export { Avatar, Button, Card, DropdownMenu, Input, Select, useInitials };
|
package/dist/input.d.mts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Input as Input$1 } from "@base-ui/react/input";
|
|
3
|
+
|
|
4
|
+
//#region src/components/input/input.d.ts
|
|
5
|
+
type InputSize = "sm" | "md";
|
|
6
|
+
type InputProps = Omit<React.ComponentPropsWithoutRef<typeof Input$1>, "size"> & {
|
|
7
|
+
size?: InputSize;
|
|
8
|
+
};
|
|
9
|
+
declare function Input({
|
|
10
|
+
className,
|
|
11
|
+
size,
|
|
12
|
+
...props
|
|
13
|
+
}: InputProps): React.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Input };
|
|
16
|
+
//# sourceMappingURL=input.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.mts","names":[],"sources":["../src/components/input/input.tsx"],"mappings":";;;;KAIK,SAAA;AAAA,KAEA,UAAA,GAAa,IAAA,CAChB,KAAA,CAAM,wBAAA,QAAgC,OAAA;EAGtC,IAAA,GAAO,SAAA;AAAA;AAAA,iBAQO,KAAA,CAAA;EAAQ,SAAA;EAAW,IAAA;EAAA,GAAgB;AAAA,GAAS,UAAA,GAAU,KAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/input.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as cn } from "./cn-BpvCVwZv.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Input as Input$1 } from "@base-ui/react/input";
|
|
5
|
+
//#region src/components/input/input.tsx
|
|
6
|
+
const sizes = {
|
|
7
|
+
sm: "h-7 rounded-md px-1.5 text-[12px]",
|
|
8
|
+
md: "h-8 rounded-md px-2 text-[14px]"
|
|
9
|
+
};
|
|
10
|
+
function Input({ className, size = "md", ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Input$1, {
|
|
12
|
+
className: cn("w-full min-w-0 border bg-(--input) text-(--foreground) outline-none", "placeholder:text-(--muted-foreground)", "selection:bg-(--ring)/30 selection:text-(--foreground)", "border-(--input-border) transition-[border-color,box-shadow] duration-150 ease-out", "hover:bg-(--foreground)/4", "focus-visible:border-(--ring) focus-visible:ring-[3px] focus-visible:ring-(--ring)/20", "disabled:pointer-events-none disabled:opacity-50", "any-pointer-coarse:text-base", sizes[size], className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Input };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.mjs","names":["BaseInput"],"sources":["../src/components/input/input.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Input as BaseInput } from \"@base-ui/react/input\";\nimport { cn } from \"@/lib/cn\";\n\ntype InputSize = \"sm\" | \"md\";\n\ntype InputProps = Omit<\n React.ComponentPropsWithoutRef<typeof BaseInput>,\n \"size\"\n> & {\n size?: InputSize;\n};\n\nconst sizes: Record<InputSize, string> = {\n sm: \"h-7 rounded-md px-1.5 text-[12px]\",\n md: \"h-8 rounded-md px-2 text-[14px]\",\n};\n\nexport function Input({ className, size = \"md\", ...props }: InputProps) {\n return (\n <BaseInput\n className={cn(\n \"w-full min-w-0 border bg-(--input) text-(--foreground) outline-none\",\n \"placeholder:text-(--muted-foreground)\",\n \"selection:bg-(--ring)/30 selection:text-(--foreground)\",\n \"border-(--input-border) transition-[border-color,box-shadow] duration-150 ease-out\",\n \"hover:bg-(--foreground)/4\",\n \"focus-visible:border-(--ring) focus-visible:ring-[3px] focus-visible:ring-(--ring)/20\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"any-pointer-coarse:text-base\",\n sizes[size],\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,QAAmC;CACvC,IAAI;CACJ,IAAI;CACL;AAED,SAAgB,MAAM,EAAE,WAAW,OAAO,MAAM,GAAG,SAAqB;AACtE,QACE,oBAACA,SAAD;EACE,WAAW,GACT,uEACA,yCACA,0DACA,sFACA,6BACA,yFACA,oDACA,gCACA,MAAM,OACN,UACD;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Select as Select$1 } from "@base-ui/react/select";
|
|
3
|
+
|
|
4
|
+
//#region src/components/select/select.d.ts
|
|
5
|
+
type SelectRootProps = React.ComponentProps<typeof Select$1.Root>;
|
|
6
|
+
declare function SelectRoot({
|
|
7
|
+
items,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: SelectRootProps): React.JSX.Element;
|
|
11
|
+
type SelectTriggerProps = React.ComponentPropsWithoutRef<typeof Select$1.Trigger> & {
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
};
|
|
14
|
+
declare function SelectTrigger({
|
|
15
|
+
className,
|
|
16
|
+
placeholder,
|
|
17
|
+
...props
|
|
18
|
+
}: SelectTriggerProps): React.JSX.Element;
|
|
19
|
+
type SelectContentProps = React.ComponentPropsWithoutRef<typeof Select$1.Popup> & Pick<React.ComponentPropsWithoutRef<typeof Select$1.Positioner>, "side" | "align" | "sideOffset" | "alignOffset">;
|
|
20
|
+
declare function SelectContent({
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
side,
|
|
24
|
+
align,
|
|
25
|
+
sideOffset,
|
|
26
|
+
alignOffset,
|
|
27
|
+
...props
|
|
28
|
+
}: SelectContentProps): React.JSX.Element;
|
|
29
|
+
type SelectItemProps = React.ComponentPropsWithoutRef<typeof Select$1.Item>;
|
|
30
|
+
declare function SelectItem({
|
|
31
|
+
className,
|
|
32
|
+
children,
|
|
33
|
+
...props
|
|
34
|
+
}: SelectItemProps): React.JSX.Element;
|
|
35
|
+
type SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof Select$1.Separator>;
|
|
36
|
+
declare function SelectSeparator({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: SelectSeparatorProps): React.JSX.Element;
|
|
40
|
+
declare const Select: typeof SelectRoot & {
|
|
41
|
+
Trigger: typeof SelectTrigger;
|
|
42
|
+
Content: typeof SelectContent;
|
|
43
|
+
Item: typeof SelectItem;
|
|
44
|
+
Separator: typeof SelectSeparator;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Select };
|
|
48
|
+
//# sourceMappingURL=select.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.mts","names":[],"sources":["../src/components/select/select.tsx"],"mappings":";;;;KAMK,eAAA,GAAkB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAW,IAAA;AAAA,iBAuBrD,UAAA,CAAA;EAAa,KAAA;EAAO,QAAA;EAAA,GAAa;AAAA,GAAS,eAAA,GAAe,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAe7D,kBAAA,GAAqB,KAAA,CAAM,wBAAA,QACvB,QAAA,CAAW,OAAA;EAElB,WAAA;AAAA;AAAA,iBAGO,aAAA,CAAA;EACP,SAAA;EACA,WAAA;EAAA,GACG;AAAA,GACF,kBAAA,GAAkB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAoChB,kBAAA,GAAqB,KAAA,CAAM,wBAAA,QACvB,QAAA,CAAW,KAAA,IAElB,IAAA,CACE,KAAA,CAAM,wBAAA,QAAgC,QAAA,CAAW,UAAA;AAAA,iBAI5C,aAAA,CAAA;EACP,SAAA;EACA,QAAA;EACA,IAAA;EACA,KAAA;EACA,UAAA;EACA,WAAA;EAAA,GACG;AAAA,GACF,kBAAA,GAAkB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KA8BhB,eAAA,GAAkB,KAAA,CAAM,wBAAA,QAAgC,QAAA,CAAW,IAAA;AAAA,iBAE/D,UAAA,CAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,eAAA,GAAe,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAgCjE,oBAAA,GAAuB,KAAA,CAAM,wBAAA,QACzB,QAAA,CAAW,SAAA;AAAA,iBAGX,eAAA,CAAA;EAAkB,SAAA;EAAA,GAAc;AAAA,GAAS,oBAAA,GAAoB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cASzD,MAAA,SAAM,UAAA"}
|
package/dist/select.mjs
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-BpvCVwZv.mjs";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Select as Select$1 } from "@base-ui/react/select";
|
|
6
|
+
//#region src/components/select/select.tsx
|
|
7
|
+
function collectItemLabels(children, items) {
|
|
8
|
+
React.Children.forEach(children, (child) => {
|
|
9
|
+
if (!React.isValidElement(child)) return;
|
|
10
|
+
const props = child.props;
|
|
11
|
+
if (child.type === SelectItem) {
|
|
12
|
+
if (props.value != null) items[String(props.value)] = props.children;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (props.children != null) collectItemLabels(props.children, items);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function SelectRoot({ items, children, ...props }) {
|
|
19
|
+
const derivedItems = React.useMemo(() => {
|
|
20
|
+
if (items) return items;
|
|
21
|
+
const map = {};
|
|
22
|
+
collectItemLabels(children, map);
|
|
23
|
+
return map;
|
|
24
|
+
}, [items, children]);
|
|
25
|
+
return /* @__PURE__ */ jsx(Select$1.Root, {
|
|
26
|
+
items: derivedItems,
|
|
27
|
+
...props,
|
|
28
|
+
children
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function SelectTrigger({ className, placeholder, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
33
|
+
className: cn("flex h-8 w-full min-w-40 items-center justify-between gap-2 rounded-md border border-(--input-border) bg-(--input) px-2 text-[14px] text-(--foreground) outline-none", "transition-[border-color,box-shadow] duration-150 ease-out", "hover:not-data-disabled:bg-(--foreground)/4", "focus-visible:border-(--ring) focus-visible:ring-[3px] focus-visible:ring-(--ring)/20", "data-popup-open:border-(--ring) data-popup-open:ring-[3px] data-popup-open:ring-(--ring)/20", "data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: [/* @__PURE__ */ jsx(Select$1.Value, {
|
|
36
|
+
placeholder,
|
|
37
|
+
className: "data-placeholder:text-(--muted-foreground)"
|
|
38
|
+
}), /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
39
|
+
className: "flex shrink-0 items-center text-(--muted-foreground) transition-transform duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] data-popup-open:rotate-180",
|
|
40
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
41
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
+
viewBox: "0 0 24 24",
|
|
43
|
+
fill: "none",
|
|
44
|
+
stroke: "currentColor",
|
|
45
|
+
strokeWidth: "2",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round",
|
|
48
|
+
className: "size-3.5",
|
|
49
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
50
|
+
})
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function SelectContent({ className, children, side = "bottom", align = "start", sideOffset = 6, alignOffset, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
56
|
+
alignItemWithTrigger: false,
|
|
57
|
+
side,
|
|
58
|
+
align,
|
|
59
|
+
sideOffset,
|
|
60
|
+
alignOffset,
|
|
61
|
+
collisionAvoidance: { side: "none" },
|
|
62
|
+
className: "z-50 outline-none",
|
|
63
|
+
children: /* @__PURE__ */ jsx(Select$1.Popup, {
|
|
64
|
+
className: cn("min-w-(--anchor-width) origin-(--transform-origin) scale-100 rounded-lg border border-(--border) bg-(--popover) p-1 text-(--popover-foreground) opacity-100 shadow-lg outline-none", "transition-[scale,opacity] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)]", "data-ending-style:duration-100 data-ending-style:ease-in", "data-starting-style:scale-95 data-starting-style:opacity-0", "data-ending-style:scale-95 data-ending-style:opacity-0", className),
|
|
65
|
+
...props,
|
|
66
|
+
children: /* @__PURE__ */ jsx(Select$1.List, { children })
|
|
67
|
+
})
|
|
68
|
+
}) });
|
|
69
|
+
}
|
|
70
|
+
function SelectItem({ className, children, ...props }) {
|
|
71
|
+
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
72
|
+
className: cn("grid cursor-default grid-cols-[0.875rem_1fr] items-center gap-2 rounded-md py-1.5 pr-2 pl-1.5 text-[13px] text-(--popover-foreground) select-none outline-none transition-colors duration-150 ease-out", "data-highlighted:bg-(--accent)", "data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
73
|
+
...props,
|
|
74
|
+
children: [/* @__PURE__ */ jsx(Select$1.ItemIndicator, {
|
|
75
|
+
className: "col-start-1 text-(--foreground)",
|
|
76
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
77
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
78
|
+
viewBox: "0 0 24 24",
|
|
79
|
+
fill: "none",
|
|
80
|
+
stroke: "currentColor",
|
|
81
|
+
strokeWidth: "2.5",
|
|
82
|
+
strokeLinecap: "round",
|
|
83
|
+
strokeLinejoin: "round",
|
|
84
|
+
className: "size-3.5",
|
|
85
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
86
|
+
})
|
|
87
|
+
}), /* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
88
|
+
className: "col-start-2",
|
|
89
|
+
children
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function SelectSeparator({ className, ...props }) {
|
|
94
|
+
return /* @__PURE__ */ jsx(Select$1.Separator, {
|
|
95
|
+
className: cn("-mx-1 my-1 h-px bg-(--border)", className),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const Select = Object.assign(SelectRoot, {
|
|
100
|
+
Trigger: SelectTrigger,
|
|
101
|
+
Content: SelectContent,
|
|
102
|
+
Item: SelectItem,
|
|
103
|
+
Separator: SelectSeparator
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
export { Select };
|
|
107
|
+
|
|
108
|
+
//# sourceMappingURL=select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.mjs","names":["BaseSelect"],"sources":["../src/components/select/select.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { cn } from \"@/lib/cn\";\n\ntype SelectRootProps = React.ComponentProps<typeof BaseSelect.Root>;\n\nfunction collectItemLabels(\n children: React.ReactNode,\n items: Record<string, React.ReactNode>,\n) {\n React.Children.forEach(children, (child) => {\n if (!React.isValidElement(child)) return;\n\n const props = child.props as {\n value?: unknown;\n children?: React.ReactNode;\n };\n\n if (child.type === SelectItem) {\n if (props.value != null) items[String(props.value)] = props.children;\n return;\n }\n\n if (props.children != null) collectItemLabels(props.children, items);\n });\n}\n\nfunction SelectRoot({ items, children, ...props }: SelectRootProps) {\n const derivedItems = React.useMemo(() => {\n if (items) return items;\n const map: Record<string, React.ReactNode> = {};\n collectItemLabels(children, map);\n return map;\n }, [items, children]);\n\n return (\n <BaseSelect.Root items={derivedItems} {...props}>\n {children}\n </BaseSelect.Root>\n );\n}\n\ntype SelectTriggerProps = React.ComponentPropsWithoutRef<\n typeof BaseSelect.Trigger\n> & {\n placeholder?: string;\n};\n\nfunction SelectTrigger({\n className,\n placeholder,\n ...props\n}: SelectTriggerProps) {\n return (\n <BaseSelect.Trigger\n className={cn(\n \"flex h-8 w-full min-w-40 items-center justify-between gap-2 rounded-md border border-(--input-border) bg-(--input) px-2 text-[14px] text-(--foreground) outline-none\",\n \"transition-[border-color,box-shadow] duration-150 ease-out\",\n \"hover:not-data-disabled:bg-(--foreground)/4\",\n \"focus-visible:border-(--ring) focus-visible:ring-[3px] focus-visible:ring-(--ring)/20\",\n \"data-popup-open:border-(--ring) data-popup-open:ring-[3px] data-popup-open:ring-(--ring)/20\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <BaseSelect.Value\n placeholder={placeholder}\n className=\"data-placeholder:text-(--muted-foreground)\"\n />\n <BaseSelect.Icon className=\"flex shrink-0 items-center text-(--muted-foreground) transition-transform duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] data-popup-open:rotate-180\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"size-3.5\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n );\n}\n\ntype SelectContentProps = React.ComponentPropsWithoutRef<\n typeof BaseSelect.Popup\n> &\n Pick<\n React.ComponentPropsWithoutRef<typeof BaseSelect.Positioner>,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\"\n >;\n\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 6,\n alignOffset,\n ...props\n}: SelectContentProps) {\n return (\n <BaseSelect.Portal>\n <BaseSelect.Positioner\n alignItemWithTrigger={false}\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n collisionAvoidance={{ side: \"none\" }}\n className=\"z-50 outline-none\"\n >\n <BaseSelect.Popup\n className={cn(\n \"min-w-(--anchor-width) origin-(--transform-origin) scale-100 rounded-lg border border-(--border) bg-(--popover) p-1 text-(--popover-foreground) opacity-100 shadow-lg outline-none\",\n \"transition-[scale,opacity] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)]\",\n \"data-ending-style:duration-100 data-ending-style:ease-in\",\n \"data-starting-style:scale-95 data-starting-style:opacity-0\",\n \"data-ending-style:scale-95 data-ending-style:opacity-0\",\n className,\n )}\n {...props}\n >\n <BaseSelect.List>{children}</BaseSelect.List>\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n );\n}\n\ntype SelectItemProps = React.ComponentPropsWithoutRef<typeof BaseSelect.Item>;\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <BaseSelect.Item\n className={cn(\n \"grid cursor-default grid-cols-[0.875rem_1fr] items-center gap-2 rounded-md py-1.5 pr-2 pl-1.5 text-[13px] text-(--popover-foreground) select-none outline-none transition-colors duration-150 ease-out\",\n \"data-highlighted:bg-(--accent)\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <BaseSelect.ItemIndicator className=\"col-start-1 text-(--foreground)\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"size-3.5\"\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </BaseSelect.ItemIndicator>\n <BaseSelect.ItemText className=\"col-start-2\">\n {children}\n </BaseSelect.ItemText>\n </BaseSelect.Item>\n );\n}\n\ntype SelectSeparatorProps = React.ComponentPropsWithoutRef<\n typeof BaseSelect.Separator\n>;\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <BaseSelect.Separator\n className={cn(\"-mx-1 my-1 h-px bg-(--border)\", className)}\n {...props}\n />\n );\n}\n\nexport const Select = Object.assign(SelectRoot, {\n Trigger: SelectTrigger,\n Content: SelectContent,\n Item: SelectItem,\n Separator: SelectSeparator,\n});\n"],"mappings":";;;;;;AAQA,SAAS,kBACP,UACA,OACA;AACA,OAAM,SAAS,QAAQ,WAAW,UAAU;AAC1C,MAAI,CAAC,MAAM,eAAe,MAAM,CAAE;EAElC,MAAM,QAAQ,MAAM;AAKpB,MAAI,MAAM,SAAS,YAAY;AAC7B,OAAI,MAAM,SAAS,KAAM,OAAM,OAAO,MAAM,MAAM,IAAI,MAAM;AAC5D;;AAGF,MAAI,MAAM,YAAY,KAAM,mBAAkB,MAAM,UAAU,MAAM;GACpE;;AAGJ,SAAS,WAAW,EAAE,OAAO,UAAU,GAAG,SAA0B;CAClE,MAAM,eAAe,MAAM,cAAc;AACvC,MAAI,MAAO,QAAO;EAClB,MAAM,MAAuC,EAAE;AAC/C,oBAAkB,UAAU,IAAI;AAChC,SAAO;IACN,CAAC,OAAO,SAAS,CAAC;AAErB,QACE,oBAACA,SAAW,MAAZ;EAAiB,OAAO;EAAc,GAAI;EACvC;EACe,CAAA;;AAUtB,SAAS,cAAc,EACrB,WACA,aACA,GAAG,SACkB;AACrB,QACE,qBAACA,SAAW,SAAZ;EACE,WAAW,GACT,wKACA,8DACA,+CACA,yFACA,+FACA,8DACA,UACD;EACD,GAAI;YAVN,CAYE,oBAACA,SAAW,OAAZ;GACe;GACb,WAAU;GACV,CAAA,EACF,oBAACA,SAAW,MAAZ;GAAiB,WAAU;aACzB,oBAAC,OAAD;IACE,OAAM;IACN,SAAQ;IACR,MAAK;IACL,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf,WAAU;cAEV,oBAAC,QAAD,EAAM,GAAE,gBAAiB,CAAA;IACrB,CAAA;GACU,CAAA,CACC;;;AAYzB,SAAS,cAAc,EACrB,WACA,UACA,OAAO,UACP,QAAQ,SACR,aAAa,GACb,aACA,GAAG,SACkB;AACrB,QACE,oBAACA,SAAW,QAAZ,EAAA,UACE,oBAACA,SAAW,YAAZ;EACE,sBAAsB;EAChB;EACC;EACK;EACC;EACb,oBAAoB,EAAE,MAAM,QAAQ;EACpC,WAAU;YAEV,oBAACA,SAAW,OAAZ;GACE,WAAW,GACT,sLACA,6EACA,4DACA,8DACA,0DACA,UACD;GACD,GAAI;aAEJ,oBAACA,SAAW,MAAZ,EAAkB,UAA2B,CAAA;GAC5B,CAAA;EACG,CAAA,EACN,CAAA;;AAMxB,SAAS,WAAW,EAAE,WAAW,UAAU,GAAG,SAA0B;AACtE,QACE,qBAACA,SAAW,MAAZ;EACE,WAAW,GACT,0MACA,kCACA,8DACA,UACD;EACD,GAAI;YAPN,CASE,oBAACA,SAAW,eAAZ;GAA0B,WAAU;aAClC,oBAAC,OAAD;IACE,OAAM;IACN,SAAQ;IACR,MAAK;IACL,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IACf,WAAU;cAEV,oBAAC,QAAD,EAAM,GAAE,mBAAoB,CAAA;IACxB,CAAA;GACmB,CAAA,EAC3B,oBAACA,SAAW,UAAZ;GAAqB,WAAU;GAC5B;GACmB,CAAA,CACN;;;AAQtB,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA+B;AACtE,QACE,oBAACA,SAAW,WAAZ;EACE,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;EACJ,CAAA;;AAIN,MAAa,SAAS,OAAO,OAAO,YAAY;CAC9C,SAAS;CACT,SAAS;CACT,MAAM;CACN,WAAW;CACZ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@florianke/components",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "./dist/index.mjs",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.mts",
|
|
7
|
+
"private": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"src/styles.css"
|
|
12
|
+
],
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"**/*.css"
|
|
15
|
+
],
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.mts",
|
|
19
|
+
"import": "./dist/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./avatar": {
|
|
22
|
+
"types": "./dist/avatar.d.mts",
|
|
23
|
+
"import": "./dist/avatar.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./button": {
|
|
26
|
+
"types": "./dist/button.d.mts",
|
|
27
|
+
"import": "./dist/button.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./card": {
|
|
30
|
+
"types": "./dist/card.d.mts",
|
|
31
|
+
"import": "./dist/card.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./dropdown-menu": {
|
|
34
|
+
"types": "./dist/dropdown-menu.d.mts",
|
|
35
|
+
"import": "./dist/dropdown-menu.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./input": {
|
|
38
|
+
"types": "./dist/input.d.mts",
|
|
39
|
+
"import": "./dist/input.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./select": {
|
|
42
|
+
"types": "./dist/select.d.mts",
|
|
43
|
+
"import": "./dist/select.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./hooks/use-initials": {
|
|
46
|
+
"types": "./dist/hooks/use-initials.d.mts",
|
|
47
|
+
"import": "./dist/hooks/use-initials.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./styles.css": "./src/styles.css"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
53
|
+
"dev": "ladle serve",
|
|
54
|
+
"build:ladle": "ladle build",
|
|
55
|
+
"build": "tsdown",
|
|
56
|
+
"prepare": "tsdown"
|
|
57
|
+
},
|
|
58
|
+
"keywords": [],
|
|
59
|
+
"author": "",
|
|
60
|
+
"license": "ISC",
|
|
61
|
+
"description": "",
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"react": "^19.0.0",
|
|
64
|
+
"react-dom": "^19.0.0"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@base-ui/react": "^1.6.0",
|
|
68
|
+
"clsx": "^2.1.1",
|
|
69
|
+
"tailwind-merge": "^3.6.0"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@ladle/react": "^5.1.1",
|
|
73
|
+
"@tailwindcss/vite": "^4.3.2",
|
|
74
|
+
"@types/react": "^19.2.17",
|
|
75
|
+
"@types/react-dom": "^19.2.3",
|
|
76
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
77
|
+
"react": "^19.2.7",
|
|
78
|
+
"react-dom": "^19.2.7",
|
|
79
|
+
"tailwindcss": "^4.3.2",
|
|
80
|
+
"tsdown": "^0.21.10",
|
|
81
|
+
"typescript": "^6.0.3",
|
|
82
|
+
"vite": "^8.1.2"
|
|
83
|
+
}
|
|
84
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@source "./";
|
|
3
|
+
@source "../.ladle/";
|
|
4
|
+
|
|
5
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--background: oklch(0.984 0 0);
|
|
9
|
+
--foreground: oklch(0.15 0 0);
|
|
10
|
+
--card: oklch(1 0 0);
|
|
11
|
+
--card-foreground: oklch(0.15 0 0);
|
|
12
|
+
--border: oklch(0.97 0 0);
|
|
13
|
+
--input: oklch(0.98 0 0);
|
|
14
|
+
--input-border: oklch(0.953 0 0);
|
|
15
|
+
--muted: oklch(0.979 0 0);
|
|
16
|
+
--muted-foreground: oklch(0.5 0 0);
|
|
17
|
+
--popover: oklch(1 0 0);
|
|
18
|
+
--popover-foreground: oklch(0.15 0 0);
|
|
19
|
+
--accent: oklch(0.975 0 0);
|
|
20
|
+
--accent-foreground: oklch(0.15 0 0);
|
|
21
|
+
--ring: oklch(0.62 0.19 259);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (prefers-color-scheme: dark) {
|
|
25
|
+
:root:not(.light) {
|
|
26
|
+
--background: oklch(0.145 0.004 264);
|
|
27
|
+
--foreground: oklch(0.97 0.003 264);
|
|
28
|
+
--card: oklch(0.205 0.005 264);
|
|
29
|
+
--card-foreground: oklch(0.97 0.003 264);
|
|
30
|
+
--border: oklch(0.28 0.007 264);
|
|
31
|
+
--input: oklch(0.235 0.005 264);
|
|
32
|
+
--input-border: oklch(0.33 0.008 264);
|
|
33
|
+
--muted: oklch(0.185 0.004 264);
|
|
34
|
+
--muted-foreground: oklch(0.62 0.008 264);
|
|
35
|
+
--popover: oklch(0.185 0.004 264);
|
|
36
|
+
--popover-foreground: oklch(0.97 0.003 264);
|
|
37
|
+
--accent: oklch(0.23 0.006 264);
|
|
38
|
+
--accent-foreground: oklch(0.97 0.003 264);
|
|
39
|
+
--ring: oklch(0.72 0.16 262);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dark {
|
|
44
|
+
--background: oklch(0.145 0.004 264);
|
|
45
|
+
--foreground: oklch(0.97 0.003 264);
|
|
46
|
+
--card: oklch(0.205 0.005 264);
|
|
47
|
+
--card-foreground: oklch(0.97 0.003 264);
|
|
48
|
+
--border: oklch(0.28 0.007 264);
|
|
49
|
+
--input: oklch(0.235 0.005 264);
|
|
50
|
+
--input-border: oklch(0.33 0.008 264);
|
|
51
|
+
--muted: oklch(0.185 0.004 264);
|
|
52
|
+
--muted-foreground: oklch(0.62 0.008 264);
|
|
53
|
+
--popover: oklch(0.185 0.004 264);
|
|
54
|
+
--popover-foreground: oklch(0.97 0.003 264);
|
|
55
|
+
--accent: oklch(0.23 0.006 264);
|
|
56
|
+
--accent-foreground: oklch(0.97 0.003 264);
|
|
57
|
+
--ring: oklch(0.72 0.16 262);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
body {
|
|
61
|
+
background: var(--background);
|
|
62
|
+
color: var(--foreground);
|
|
63
|
+
}
|