@webappwiz/arbor 0.0.30 → 0.0.32

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 (120) hide show
  1. package/README.md +2 -2
  2. package/add.d.ts +23 -0
  3. package/age.d.ts +2 -0
  4. package/arbor.d.ts +11 -0
  5. package/attachments.d.ts +36 -0
  6. package/claim.d.ts +11 -0
  7. package/config.d.ts +55 -0
  8. package/config.js +7 -0
  9. package/dev/assets.d.ts +11 -0
  10. package/dev.d.ts +48 -0
  11. package/escalate.d.ts +28 -0
  12. package/exit.d.ts +42 -0
  13. package/git.d.ts +82 -0
  14. package/index.d.ts +2 -0
  15. package/index.js +4763 -0
  16. package/journal.d.ts +29 -0
  17. package/list.d.ts +18 -0
  18. package/load-config.d.ts +15 -0
  19. package/log.d.ts +14 -0
  20. package/merge.d.ts +24 -0
  21. package/package.json +15 -32
  22. package/path.d.ts +13 -0
  23. package/plan.d.ts +83 -0
  24. package/remove.d.ts +19 -0
  25. package/repository.d.ts +25 -0
  26. package/retry.d.ts +17 -0
  27. package/shell.d.ts +17 -0
  28. package/show.d.ts +53 -0
  29. package/snapshot.d.ts +36 -0
  30. package/table.d.ts +5 -0
  31. package/todo.d.ts +202 -0
  32. package/todos.d.ts +75 -0
  33. package/wait.d.ts +22 -0
  34. package/worktree-service.d.ts +51 -0
  35. package/worktree.d.ts +95 -0
  36. package/AGENTS.md +0 -7
  37. package/add.test.ts +0 -125
  38. package/add.ts +0 -192
  39. package/age.ts +0 -11
  40. package/arbor.test.ts +0 -145
  41. package/arbor.ts +0 -429
  42. package/assets.d.ts +0 -9
  43. package/attachments.ts +0 -87
  44. package/build.ts +0 -98
  45. package/claim.test.ts +0 -89
  46. package/claim.ts +0 -73
  47. package/components.json +0 -21
  48. package/config.ts +0 -58
  49. package/dev/api.ts +0 -120
  50. package/dev/app.test.tsx +0 -645
  51. package/dev/app.tsx +0 -80
  52. package/dev/assets.ts +0 -16
  53. package/dev/build/main.txt +0 -68
  54. package/dev/build/shell.txt +0 -21
  55. package/dev/build/styles.txt +0 -2263
  56. package/dev/components/ui/badge.tsx +0 -51
  57. package/dev/components/ui/button.tsx +0 -57
  58. package/dev/components/ui/dialog.tsx +0 -154
  59. package/dev/components/ui/empty.tsx +0 -100
  60. package/dev/components/ui/input-group.tsx +0 -155
  61. package/dev/components/ui/input.tsx +0 -19
  62. package/dev/components/ui/progress.tsx +0 -80
  63. package/dev/components/ui/textarea.tsx +0 -17
  64. package/dev/components/ui/toast.tsx +0 -227
  65. package/dev/feed.ts +0 -69
  66. package/dev/files.tsx +0 -191
  67. package/dev/index.html +0 -21
  68. package/dev/lib/utils.ts +0 -7
  69. package/dev/main.tsx +0 -22
  70. package/dev/markdown.test.tsx +0 -133
  71. package/dev/markdown.tsx +0 -124
  72. package/dev/mentions.tsx +0 -319
  73. package/dev/shadcn.css +0 -649
  74. package/dev/styles.css +0 -107
  75. package/dev/tags.tsx +0 -44
  76. package/dev/tasks.tsx +0 -151
  77. package/dev/todos.tsx +0 -759
  78. package/dev.test.ts +0 -439
  79. package/dev.ts +0 -386
  80. package/e2e.test.ts +0 -256
  81. package/escalate.test.ts +0 -76
  82. package/escalate.ts +0 -112
  83. package/exit.test.ts +0 -71
  84. package/exit.ts +0 -74
  85. package/git.ts +0 -294
  86. package/index.ts +0 -9
  87. package/journal.ts +0 -89
  88. package/list.test.ts +0 -82
  89. package/list.ts +0 -137
  90. package/load-config.test.ts +0 -121
  91. package/load-config.ts +0 -62
  92. package/log.test.ts +0 -65
  93. package/log.ts +0 -40
  94. package/merge.test.ts +0 -332
  95. package/merge.ts +0 -283
  96. package/path.test.ts +0 -35
  97. package/path.ts +0 -38
  98. package/plan.test.ts +0 -318
  99. package/plan.ts +0 -302
  100. package/progress.test.ts +0 -54
  101. package/progress.ts +0 -31
  102. package/remove.test.ts +0 -68
  103. package/remove.ts +0 -88
  104. package/repository.ts +0 -83
  105. package/retry.test.ts +0 -43
  106. package/retry.ts +0 -48
  107. package/shell.ts +0 -44
  108. package/show.test.ts +0 -91
  109. package/show.ts +0 -151
  110. package/snapshot.test.ts +0 -33
  111. package/snapshot.ts +0 -84
  112. package/table.ts +0 -20
  113. package/testing.ts +0 -229
  114. package/todo.test.ts +0 -490
  115. package/todo.ts +0 -834
  116. package/wait.test.ts +0 -61
  117. package/wait.ts +0 -77
  118. package/worktree-service.test.ts +0 -158
  119. package/worktree-service.ts +0 -193
  120. package/worktree.ts +0 -239
@@ -1,51 +0,0 @@
1
- import { mergeProps } from "@base-ui/react/merge-props";
2
- import { useRender } from "@base-ui/react/use-render";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
- import { cn } from "#dev/lib/utils.ts";
5
-
6
- const badgeVariants = cva(
7
- "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
12
- secondary:
13
- "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
14
- destructive:
15
- "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
16
- outline:
17
- "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
18
- ghost:
19
- "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
20
- link: "text-primary underline-offset-4 hover:underline",
21
- },
22
- },
23
- defaultVariants: {
24
- variant: "default",
25
- },
26
- },
27
- );
28
-
29
- function Badge({
30
- className,
31
- variant = "default",
32
- render,
33
- ...props
34
- }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>) {
35
- return useRender({
36
- defaultTagName: "span",
37
- props: mergeProps<"span">(
38
- {
39
- className: cn(badgeVariants({ variant }), className),
40
- },
41
- props,
42
- ),
43
- render,
44
- state: {
45
- slot: "badge",
46
- variant,
47
- },
48
- });
49
- }
50
-
51
- export { Badge, badgeVariants };
@@ -1,57 +0,0 @@
1
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import { cn } from "#dev/lib/utils.ts";
4
-
5
- const buttonVariants = cva(
6
- "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7
- {
8
- variants: {
9
- variant: {
10
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
11
- outline:
12
- "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
13
- secondary:
14
- "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
15
- ghost:
16
- "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
17
- destructive:
18
- "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
19
- link: "text-primary underline-offset-4 hover:underline",
20
- },
21
- size: {
22
- default:
23
- "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
24
- 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",
25
- 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",
26
- lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
27
- icon: "size-8",
28
- "icon-xs":
29
- "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
30
- "icon-sm":
31
- "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
32
- "icon-lg": "size-9",
33
- },
34
- },
35
- defaultVariants: {
36
- variant: "default",
37
- size: "default",
38
- },
39
- },
40
- );
41
-
42
- function Button({
43
- className,
44
- variant = "default",
45
- size = "default",
46
- ...props
47
- }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
48
- return (
49
- <ButtonPrimitive
50
- data-slot="button"
51
- className={cn(buttonVariants({ variant, size, className }))}
52
- {...props}
53
- />
54
- );
55
- }
56
-
57
- export { Button, buttonVariants };
@@ -1,154 +0,0 @@
1
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
2
- import { XIcon } from "lucide-react";
3
- import * as React from "react";
4
-
5
- import { Button } from "#dev/components/ui/button.tsx";
6
- import { cn } from "#dev/lib/utils.ts";
7
-
8
- function Dialog({ ...props }: DialogPrimitive.Root.Props) {
9
- return <DialogPrimitive.Root data-slot="dialog" {...props} />;
10
- }
11
-
12
- function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
13
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
14
- }
15
-
16
- function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
17
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
18
- }
19
-
20
- function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
21
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
22
- }
23
-
24
- function DialogOverlay({
25
- className,
26
- ...props
27
- }: DialogPrimitive.Backdrop.Props) {
28
- return (
29
- <DialogPrimitive.Backdrop
30
- data-slot="dialog-overlay"
31
- className={cn(
32
- "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
33
- className,
34
- )}
35
- {...props}
36
- />
37
- );
38
- }
39
-
40
- function DialogContent({
41
- className,
42
- children,
43
- showCloseButton = true,
44
- ...props
45
- }: DialogPrimitive.Popup.Props & {
46
- showCloseButton?: boolean;
47
- }) {
48
- return (
49
- <DialogPortal>
50
- <DialogOverlay />
51
- <DialogPrimitive.Popup
52
- data-slot="dialog-content"
53
- className={cn(
54
- "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
55
- className,
56
- )}
57
- {...props}
58
- >
59
- {children}
60
- {showCloseButton && (
61
- <DialogPrimitive.Close
62
- data-slot="dialog-close"
63
- render={
64
- <Button
65
- variant="ghost"
66
- className="absolute top-2 right-2"
67
- size="icon-sm"
68
- />
69
- }
70
- >
71
- <XIcon />
72
- <span className="sr-only">Close</span>
73
- </DialogPrimitive.Close>
74
- )}
75
- </DialogPrimitive.Popup>
76
- </DialogPortal>
77
- );
78
- }
79
-
80
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
81
- return (
82
- <div
83
- data-slot="dialog-header"
84
- className={cn("flex flex-col gap-2", className)}
85
- {...props}
86
- />
87
- );
88
- }
89
-
90
- function DialogFooter({
91
- className,
92
- showCloseButton = false,
93
- children,
94
- ...props
95
- }: React.ComponentProps<"div"> & {
96
- showCloseButton?: boolean;
97
- }) {
98
- return (
99
- <div
100
- data-slot="dialog-footer"
101
- className={cn(
102
- "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
103
- className,
104
- )}
105
- {...props}
106
- >
107
- {children}
108
- {showCloseButton && (
109
- <DialogPrimitive.Close render={<Button variant="outline" />}>
110
- Close
111
- </DialogPrimitive.Close>
112
- )}
113
- </div>
114
- );
115
- }
116
-
117
- function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
118
- return (
119
- <DialogPrimitive.Title
120
- data-slot="dialog-title"
121
- className={cn("text-base leading-none font-medium", className)}
122
- {...props}
123
- />
124
- );
125
- }
126
-
127
- function DialogDescription({
128
- className,
129
- ...props
130
- }: DialogPrimitive.Description.Props) {
131
- return (
132
- <DialogPrimitive.Description
133
- data-slot="dialog-description"
134
- className={cn(
135
- "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
136
- className,
137
- )}
138
- {...props}
139
- />
140
- );
141
- }
142
-
143
- export {
144
- Dialog,
145
- DialogClose,
146
- DialogContent,
147
- DialogDescription,
148
- DialogFooter,
149
- DialogHeader,
150
- DialogOverlay,
151
- DialogPortal,
152
- DialogTitle,
153
- DialogTrigger,
154
- };
@@ -1,100 +0,0 @@
1
- import { cva, type VariantProps } from "class-variance-authority";
2
- import { cn } from "#dev/lib/utils.ts";
3
-
4
- function Empty({ className, ...props }: React.ComponentProps<"div">) {
5
- return (
6
- <div
7
- data-slot="empty"
8
- className={cn(
9
- "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
10
- className,
11
- )}
12
- {...props}
13
- />
14
- );
15
- }
16
-
17
- function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
18
- return (
19
- <div
20
- data-slot="empty-header"
21
- className={cn("flex max-w-sm flex-col items-center gap-2", className)}
22
- {...props}
23
- />
24
- );
25
- }
26
-
27
- const emptyMediaVariants = cva(
28
- "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
29
- {
30
- variants: {
31
- variant: {
32
- default: "bg-transparent",
33
- icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
34
- },
35
- },
36
- defaultVariants: {
37
- variant: "default",
38
- },
39
- },
40
- );
41
-
42
- function EmptyMedia({
43
- className,
44
- variant = "default",
45
- ...props
46
- }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
47
- return (
48
- <div
49
- data-slot="empty-icon"
50
- data-variant={variant}
51
- className={cn(emptyMediaVariants({ variant, className }))}
52
- {...props}
53
- />
54
- );
55
- }
56
-
57
- function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
58
- return (
59
- <div
60
- data-slot="empty-title"
61
- className={cn("text-sm font-medium tracking-tight", className)}
62
- {...props}
63
- />
64
- );
65
- }
66
-
67
- function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
68
- return (
69
- <div
70
- data-slot="empty-description"
71
- className={cn(
72
- "text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
73
- className,
74
- )}
75
- {...props}
76
- />
77
- );
78
- }
79
-
80
- function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
81
- return (
82
- <div
83
- data-slot="empty-content"
84
- className={cn(
85
- "flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
86
- className,
87
- )}
88
- {...props}
89
- />
90
- );
91
- }
92
-
93
- export {
94
- Empty,
95
- EmptyContent,
96
- EmptyDescription,
97
- EmptyHeader,
98
- EmptyMedia,
99
- EmptyTitle,
100
- };
@@ -1,155 +0,0 @@
1
- import { cva, type VariantProps } from "class-variance-authority";
2
- import type * as React from "react";
3
- import { Button } from "#dev/components/ui/button.tsx";
4
- import { Input } from "#dev/components/ui/input.tsx";
5
- import { Textarea } from "#dev/components/ui/textarea.tsx";
6
- import { cn } from "#dev/lib/utils.ts";
7
-
8
- function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
9
- return (
10
- <div
11
- data-slot="input-group"
12
- role="group"
13
- className={cn(
14
- "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
15
- className,
16
- )}
17
- {...props}
18
- />
19
- );
20
- }
21
-
22
- const inputGroupAddonVariants = cva(
23
- "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
24
- {
25
- variants: {
26
- align: {
27
- "inline-start":
28
- "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
29
- "inline-end":
30
- "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
31
- "block-start":
32
- "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
33
- "block-end":
34
- "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
35
- },
36
- },
37
- defaultVariants: {
38
- align: "inline-start",
39
- },
40
- },
41
- );
42
-
43
- function InputGroupAddon({
44
- className,
45
- align = "inline-start",
46
- ...props
47
- }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
48
- return (
49
- <div
50
- role="group"
51
- data-slot="input-group-addon"
52
- data-align={align}
53
- className={cn(inputGroupAddonVariants({ align }), className)}
54
- onClick={(e) => {
55
- if ((e.target as HTMLElement).closest("button")) {
56
- return;
57
- }
58
- e.currentTarget.parentElement?.querySelector("input")?.focus();
59
- }}
60
- {...props}
61
- />
62
- );
63
- }
64
-
65
- const inputGroupButtonVariants = cva(
66
- "flex items-center gap-2 text-sm shadow-none",
67
- {
68
- variants: {
69
- size: {
70
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
71
- sm: "",
72
- "icon-xs":
73
- "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
74
- "icon-sm": "size-8 p-0 has-[>svg]:p-0",
75
- },
76
- },
77
- defaultVariants: {
78
- size: "xs",
79
- },
80
- },
81
- );
82
-
83
- function InputGroupButton({
84
- className,
85
- type = "button",
86
- variant = "ghost",
87
- size = "xs",
88
- ...props
89
- }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> &
90
- VariantProps<typeof inputGroupButtonVariants> & {
91
- type?: "button" | "submit" | "reset";
92
- }) {
93
- return (
94
- <Button
95
- type={type}
96
- data-size={size}
97
- variant={variant}
98
- className={cn(inputGroupButtonVariants({ size }), className)}
99
- {...props}
100
- />
101
- );
102
- }
103
-
104
- function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
105
- return (
106
- <span
107
- className={cn(
108
- "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
109
- className,
110
- )}
111
- {...props}
112
- />
113
- );
114
- }
115
-
116
- function InputGroupInput({
117
- className,
118
- ...props
119
- }: React.ComponentProps<"input">) {
120
- return (
121
- <Input
122
- data-slot="input-group-control"
123
- className={cn(
124
- "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
125
- className,
126
- )}
127
- {...props}
128
- />
129
- );
130
- }
131
-
132
- function InputGroupTextarea({
133
- className,
134
- ...props
135
- }: React.ComponentProps<"textarea">) {
136
- return (
137
- <Textarea
138
- data-slot="input-group-control"
139
- className={cn(
140
- "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
141
- className,
142
- )}
143
- {...props}
144
- />
145
- );
146
- }
147
-
148
- export {
149
- InputGroup,
150
- InputGroupAddon,
151
- InputGroupButton,
152
- InputGroupInput,
153
- InputGroupText,
154
- InputGroupTextarea,
155
- };
@@ -1,19 +0,0 @@
1
- import { Input as InputPrimitive } from "@base-ui/react/input";
2
- import type * as React from "react";
3
- import { cn } from "#dev/lib/utils.ts";
4
-
5
- function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
- return (
7
- <InputPrimitive
8
- type={type}
9
- data-slot="input"
10
- className={cn(
11
- "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
12
- className,
13
- )}
14
- {...props}
15
- />
16
- );
17
- }
18
-
19
- export { Input };
@@ -1,80 +0,0 @@
1
- import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
2
- import { cn } from "#dev/lib/utils.ts";
3
-
4
- function Progress({
5
- className,
6
- children,
7
- value,
8
- ...props
9
- }: ProgressPrimitive.Root.Props) {
10
- return (
11
- <ProgressPrimitive.Root
12
- value={value}
13
- data-slot="progress"
14
- className={cn("flex flex-wrap gap-3", className)}
15
- {...props}
16
- >
17
- {children}
18
- <ProgressTrack>
19
- <ProgressIndicator />
20
- </ProgressTrack>
21
- </ProgressPrimitive.Root>
22
- );
23
- }
24
-
25
- function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
26
- return (
27
- <ProgressPrimitive.Track
28
- className={cn(
29
- "relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
30
- className,
31
- )}
32
- data-slot="progress-track"
33
- {...props}
34
- />
35
- );
36
- }
37
-
38
- function ProgressIndicator({
39
- className,
40
- ...props
41
- }: ProgressPrimitive.Indicator.Props) {
42
- return (
43
- <ProgressPrimitive.Indicator
44
- data-slot="progress-indicator"
45
- className={cn("h-full bg-primary transition-all", className)}
46
- {...props}
47
- />
48
- );
49
- }
50
-
51
- function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
52
- return (
53
- <ProgressPrimitive.Label
54
- className={cn("text-sm font-medium", className)}
55
- data-slot="progress-label"
56
- {...props}
57
- />
58
- );
59
- }
60
-
61
- function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
62
- return (
63
- <ProgressPrimitive.Value
64
- className={cn(
65
- "ml-auto text-sm text-muted-foreground tabular-nums",
66
- className,
67
- )}
68
- data-slot="progress-value"
69
- {...props}
70
- />
71
- );
72
- }
73
-
74
- export {
75
- Progress,
76
- ProgressIndicator,
77
- ProgressLabel,
78
- ProgressTrack,
79
- ProgressValue,
80
- };
@@ -1,17 +0,0 @@
1
- import type * as React from "react";
2
- import { cn } from "#dev/lib/utils.ts";
3
-
4
- function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
5
- return (
6
- <textarea
7
- data-slot="textarea"
8
- className={cn(
9
- "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
10
- className,
11
- )}
12
- {...props}
13
- />
14
- );
15
- }
16
-
17
- export { Textarea };