@q9labsai/chalk-ui 4.0.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.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/dist/assets.d.ts +2 -0
  3. package/dist/assets.d.ts.map +1 -0
  4. package/dist/assets.js +2 -0
  5. package/dist/badge.d.ts +14 -0
  6. package/dist/badge.d.ts.map +1 -0
  7. package/dist/badge.js +73 -0
  8. package/dist/button.d.ts +9 -0
  9. package/dist/button.d.ts.map +1 -0
  10. package/dist/button.js +49 -0
  11. package/dist/card.d.ts +12 -0
  12. package/dist/card.d.ts.map +1 -0
  13. package/dist/card.js +63 -0
  14. package/dist/icon-button.d.ts +9 -0
  15. package/dist/icon-button.d.ts.map +1 -0
  16. package/dist/icon-button.js +37 -0
  17. package/dist/index.d.ts +19 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +897 -0
  20. package/dist/input.d.ts +12 -0
  21. package/dist/input.d.ts.map +1 -0
  22. package/dist/input.js +44 -0
  23. package/dist/lib/theme.d.ts +8 -0
  24. package/dist/lib/theme.d.ts.map +1 -0
  25. package/dist/lib/utils.d.ts +3 -0
  26. package/dist/lib/utils.d.ts.map +1 -0
  27. package/dist/lib/utils.js +9 -0
  28. package/dist/logos/chalk-icon.svg +34 -0
  29. package/dist/logos/chalk-logo-on-dark.svg +35 -0
  30. package/dist/logos/chalk-logo.svg +45 -0
  31. package/dist/progress-bar.d.ts +13 -0
  32. package/dist/progress-bar.d.ts.map +1 -0
  33. package/dist/progress-bar.js +35 -0
  34. package/dist/reactions.d.ts +33 -0
  35. package/dist/reactions.d.ts.map +1 -0
  36. package/dist/reactions.js +179 -0
  37. package/dist/select.d.ts +26 -0
  38. package/dist/select.d.ts.map +1 -0
  39. package/dist/select.js +49 -0
  40. package/dist/skeleton.d.ts +11 -0
  41. package/dist/skeleton.d.ts.map +1 -0
  42. package/dist/skeleton.js +25 -0
  43. package/dist/spinner.d.ts +9 -0
  44. package/dist/spinner.d.ts.map +1 -0
  45. package/dist/spinner.js +26 -0
  46. package/dist/status-badge.d.ts +9 -0
  47. package/dist/status-badge.d.ts.map +1 -0
  48. package/dist/status-badge.js +18 -0
  49. package/dist/styles.css +1461 -0
  50. package/dist/test-utils.d.ts +3 -0
  51. package/dist/test-utils.d.ts.map +1 -0
  52. package/dist/textarea.d.ts +10 -0
  53. package/dist/textarea.d.ts.map +1 -0
  54. package/dist/textarea.js +52 -0
  55. package/dist/toast.d.ts +45 -0
  56. package/dist/toast.d.ts.map +1 -0
  57. package/dist/toast.js +131 -0
  58. package/dist/toggle-group.d.ts +11 -0
  59. package/dist/toggle-group.d.ts.map +1 -0
  60. package/dist/toggle-group.js +101 -0
  61. package/dist/toggle.d.ts +20 -0
  62. package/dist/toggle.d.ts.map +1 -0
  63. package/dist/toggle.js +48 -0
  64. package/dist/tooltip.d.ts +15 -0
  65. package/dist/tooltip.d.ts.map +1 -0
  66. package/dist/tooltip.js +101 -0
  67. package/package.json +199 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Q9Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
20
+ OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ export * from "@q9labsai/chalk-assets";
2
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
package/dist/assets.js ADDED
@@ -0,0 +1,2 @@
1
+ // src/assets.ts
2
+ export * from "@q9labsai/chalk-assets";
@@ -0,0 +1,14 @@
1
+ import { useRender } from "@base-ui/react/use-render";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ type BadgeProps = useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ readonly count?: number;
8
+ readonly max?: number;
9
+ readonly dot?: boolean;
10
+ readonly showZero?: boolean;
11
+ };
12
+ declare function Badge({ className, variant, render, count, max, dot, showZero, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
13
+ export { Badge, badgeVariants };
14
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAEF,KAAK,UAAU,GAAG,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,GAChD,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAYJ,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,MAAM,EAAE,KAAK,EAAE,GAAQ,EAAE,GAAW,EAAE,QAAgB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAqCxI;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
package/dist/badge.js ADDED
@@ -0,0 +1,73 @@
1
+ // src/badge.tsx
2
+ import { mergeProps } from "@base-ui/react/merge-props";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { cva } from "class-variance-authority";
5
+
6
+ // src/lib/utils.ts
7
+ import { clsx } from "clsx";
8
+ import { twMerge } from "tailwind-merge";
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+
13
+ // src/badge.tsx
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ var badgeVariants = cva(
16
+ "h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-xs font-medium transition-colors has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",
17
+ {
18
+ variants: {
19
+ variant: {
20
+ default: "bg-accent text-accent-foreground [a]:hover:bg-accent/80",
21
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
22
+ destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
23
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
24
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
25
+ link: "text-primary underline-offset-4 hover:underline"
26
+ }
27
+ },
28
+ defaultVariants: {
29
+ variant: "default"
30
+ }
31
+ }
32
+ );
33
+ function getBadgeContent(count, max, dot) {
34
+ if (dot) return null;
35
+ if (count !== void 0 && count > max) return `${max}+`;
36
+ return count;
37
+ }
38
+ function CountBadge({ className, variant, dot, content }) {
39
+ return /* @__PURE__ */ jsx("span", { className: cn(badgeVariants({ className, variant }), dot ? "h-2 w-2 p-0" : "min-w-5 px-2", "absolute -top-1 -right-1 translate-x-1/2 -translate-y-1/2 z-10"), children: content });
40
+ }
41
+ function Badge({ className, variant = "default", render, count, max = 99, dot = false, showZero = false, children, ...props }) {
42
+ const hasCount = count !== void 0 || dot;
43
+ const renderedPlain = useRender({
44
+ defaultTagName: "span",
45
+ props: mergeProps(
46
+ {
47
+ className: cn(badgeVariants({ className, variant }))
48
+ },
49
+ { ...props, children }
50
+ ),
51
+ render,
52
+ state: {
53
+ slot: "badge",
54
+ variant
55
+ }
56
+ });
57
+ if (!hasCount) {
58
+ return renderedPlain;
59
+ }
60
+ if (!showZero && count === 0 && !dot) return /* @__PURE__ */ jsx(Fragment, { children });
61
+ const content = getBadgeContent(count, max, dot);
62
+ if (children) {
63
+ return /* @__PURE__ */ jsxs("span", { className: "relative inline-flex overflow-visible", ...props, children: [
64
+ children,
65
+ /* @__PURE__ */ jsx(CountBadge, { className, variant, dot, content })
66
+ ] });
67
+ }
68
+ return /* @__PURE__ */ jsx("span", { className: cn(badgeVariants({ className, variant }), dot ? "h-2 w-2 p-0" : "min-w-5 px-2"), ...props, children: content });
69
+ }
70
+ export {
71
+ Badge,
72
+ badgeVariants
73
+ };
@@ -0,0 +1,9 @@
1
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
5
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react/jsx-runtime").JSX.Element;
8
+ export { Button, buttonVariants };
9
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EA4BnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAE1I;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
package/dist/button.js ADDED
@@ -0,0 +1,49 @@
1
+ // src/button.tsx
2
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
3
+ import { cva } from "class-variance-authority";
4
+
5
+ // src/lib/utils.ts
6
+ import { clsx } from "clsx";
7
+ import { twMerge } from "tailwind-merge";
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+
12
+ // src/button.tsx
13
+ import { jsx } from "react/jsx-runtime";
14
+ var buttonVariants = cva(
15
+ "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
16
+ {
17
+ variants: {
18
+ variant: {
19
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
20
+ outline: "border-border bg-background hover:bg-accent hover:text-accent-foreground",
21
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
22
+ ghost: "hover:bg-accent hover:text-accent-foreground",
23
+ destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
24
+ link: "text-primary underline-offset-4 hover:underline"
25
+ },
26
+ size: {
27
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
28
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
29
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
30
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
31
+ icon: "size-8",
32
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
33
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
34
+ "icon-lg": "size-9"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ variant: "default",
39
+ size: "default"
40
+ }
41
+ }
42
+ );
43
+ function Button({ className, variant = "default", size = "default", ...props }) {
44
+ return /* @__PURE__ */ jsx(ButtonPrimitive, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props });
45
+ }
46
+ export {
47
+ Button,
48
+ buttonVariants
49
+ };
package/dist/card.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
3
+ size?: "default" | "sm";
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
12
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../src/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE,2CAYjH;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAEtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAE5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAEvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAExE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAEvE;AAED,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
package/dist/card.js ADDED
@@ -0,0 +1,63 @@
1
+ // src/card.tsx
2
+ import "react";
3
+
4
+ // src/lib/utils.ts
5
+ import { clsx } from "clsx";
6
+ import { twMerge } from "tailwind-merge";
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+
11
+ // src/card.tsx
12
+ import { jsx } from "react/jsx-runtime";
13
+ function Card({ className, size = "default", ...props }) {
14
+ return /* @__PURE__ */ jsx(
15
+ "div",
16
+ {
17
+ "data-slot": "card",
18
+ "data-size": size,
19
+ className: cn(
20
+ "border-border bg-card text-card-foreground gap-4 overflow-hidden rounded-xl border py-4 text-sm has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",
21
+ className
22
+ ),
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ function CardHeader({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ "data-slot": "card-header",
32
+ className: cn(
33
+ "gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
34
+ className
35
+ ),
36
+ ...props
37
+ }
38
+ );
39
+ }
40
+ function CardTitle({ className, ...props }) {
41
+ return /* @__PURE__ */ jsx("div", { "data-slot": "card-title", className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className), ...props });
42
+ }
43
+ function CardDescription({ className, ...props }) {
44
+ return /* @__PURE__ */ jsx("div", { "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className), ...props });
45
+ }
46
+ function CardAction({ className, ...props }) {
47
+ return /* @__PURE__ */ jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props });
48
+ }
49
+ function CardContent({ className, ...props }) {
50
+ return /* @__PURE__ */ jsx("div", { "data-slot": "card-content", className: cn("px-4 group-data-[size=sm]/card:px-3", className), ...props });
51
+ }
52
+ function CardFooter({ className, ...props }) {
53
+ return /* @__PURE__ */ jsx("div", { "data-slot": "card-footer", className: cn("bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center", className), ...props });
54
+ }
55
+ export {
56
+ Card,
57
+ CardAction,
58
+ CardContent,
59
+ CardDescription,
60
+ CardFooter,
61
+ CardHeader,
62
+ CardTitle
63
+ };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ readonly icon: React.ReactNode;
4
+ readonly size?: "sm" | "md" | "lg";
5
+ readonly variant?: "default" | "ghost" | "outline";
6
+ }
7
+ declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
8
+ export { IconButton };
9
+ //# sourceMappingURL=icon-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../src/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACpF,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CACpD;AAED,QAAA,MAAM,UAAU,2FAoBd,CAAC;AAIH,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,37 @@
1
+ // src/icon-button.tsx
2
+ import * as React from "react";
3
+
4
+ // src/lib/utils.ts
5
+ import { clsx } from "clsx";
6
+ import { twMerge } from "tailwind-merge";
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+
11
+ // src/icon-button.tsx
12
+ import { jsx } from "react/jsx-runtime";
13
+ var IconButton = React.forwardRef(function IconButton2({ icon, size = "md", variant = "default", className, type = "button", ...props }, ref) {
14
+ return /* @__PURE__ */ jsx(
15
+ "button",
16
+ {
17
+ ref,
18
+ type,
19
+ className: cn(
20
+ "inline-flex items-center justify-center rounded-md transition-colors",
21
+ size === "sm" && "h-8 w-8 p-1.5",
22
+ size === "md" && "h-10 w-10 p-2",
23
+ size === "lg" && "h-12 w-12 p-3",
24
+ variant === "default" && "bg-muted text-foreground hover:bg-accent",
25
+ variant === "ghost" && "bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground",
26
+ variant === "outline" && "border border-border bg-transparent text-foreground hover:bg-muted",
27
+ className
28
+ ),
29
+ ...props,
30
+ children: icon
31
+ }
32
+ );
33
+ });
34
+ IconButton.displayName = "IconButton";
35
+ export {
36
+ IconButton
37
+ };
@@ -0,0 +1,19 @@
1
+ export * from "./assets";
2
+ export * from "./badge";
3
+ export * from "./button";
4
+ export * from "./card";
5
+ export * from "./input";
6
+ export * from "./select";
7
+ export * from "./textarea";
8
+ export * from "./spinner";
9
+ export * from "./skeleton";
10
+ export * from "./icon-button";
11
+ export * from "./progress-bar";
12
+ export * from "./lib/utils";
13
+ export * from "./reactions";
14
+ export * from "./status-badge";
15
+ export * from "./toast";
16
+ export * from "./toggle";
17
+ export * from "./toggle-group";
18
+ export * from "./tooltip";
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}