create-disposabl-app 0.10.0 → 0.10.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.
Files changed (70) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
  4. package/dist/templates/default/bun.lock +16 -1230
  5. package/dist/templates/default/packages/cli/README.md +9 -24
  6. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
  7. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
  8. package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +71 -13
  9. package/dist/templates/default/packages/disposabl-kit/package.json +0 -12
  10. package/package.json +1 -1
  11. package/dist/templates/default/apps/web/src/components/connections/expo-connection.tsx +0 -97
  12. package/dist/templates/default/apps/web/src/components/connections/provider-logo.tsx +0 -44
  13. package/dist/templates/default/apps/web/src/components/connections/use-connection-setup.ts +0 -169
  14. package/dist/templates/default/packages/disposabl-kit/client/components/ui/accordion.tsx +0 -77
  15. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert-dialog.tsx +0 -185
  16. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert.tsx +0 -75
  17. package/dist/templates/default/packages/disposabl-kit/client/components/ui/aspect-ratio.tsx +0 -22
  18. package/dist/templates/default/packages/disposabl-kit/client/components/ui/attachment.tsx +0 -207
  19. package/dist/templates/default/packages/disposabl-kit/client/components/ui/avatar.tsx +0 -106
  20. package/dist/templates/default/packages/disposabl-kit/client/components/ui/badge.tsx +0 -51
  21. package/dist/templates/default/packages/disposabl-kit/client/components/ui/breadcrumb.tsx +0 -121
  22. package/dist/templates/default/packages/disposabl-kit/client/components/ui/bubble.tsx +0 -127
  23. package/dist/templates/default/packages/disposabl-kit/client/components/ui/button-group.tsx +0 -87
  24. package/dist/templates/default/packages/disposabl-kit/client/components/ui/calendar.tsx +0 -241
  25. package/dist/templates/default/packages/disposabl-kit/client/components/ui/carousel.tsx +0 -239
  26. package/dist/templates/default/packages/disposabl-kit/client/components/ui/chart.tsx +0 -368
  27. package/dist/templates/default/packages/disposabl-kit/client/components/ui/checkbox.tsx +0 -27
  28. package/dist/templates/default/packages/disposabl-kit/client/components/ui/code-block.tsx +0 -243
  29. package/dist/templates/default/packages/disposabl-kit/client/components/ui/collapsible.tsx +0 -19
  30. package/dist/templates/default/packages/disposabl-kit/client/components/ui/combobox.tsx +0 -300
  31. package/dist/templates/default/packages/disposabl-kit/client/components/ui/command.tsx +0 -194
  32. package/dist/templates/default/packages/disposabl-kit/client/components/ui/context-menu.tsx +0 -271
  33. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dialog.tsx +0 -156
  34. package/dist/templates/default/packages/disposabl-kit/client/components/ui/direction.tsx +0 -4
  35. package/dist/templates/default/packages/disposabl-kit/client/components/ui/drawer.tsx +0 -224
  36. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dropdown-menu.tsx +0 -269
  37. package/dist/templates/default/packages/disposabl-kit/client/components/ui/empty.tsx +0 -103
  38. package/dist/templates/default/packages/disposabl-kit/client/components/ui/hover-card.tsx +0 -50
  39. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-group.tsx +0 -158
  40. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-otp.tsx +0 -83
  41. package/dist/templates/default/packages/disposabl-kit/client/components/ui/item.tsx +0 -201
  42. package/dist/templates/default/packages/disposabl-kit/client/components/ui/kbd.tsx +0 -26
  43. package/dist/templates/default/packages/disposabl-kit/client/components/ui/marker.tsx +0 -70
  44. package/dist/templates/default/packages/disposabl-kit/client/components/ui/menubar.tsx +0 -284
  45. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message-scroller.tsx +0 -128
  46. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message.tsx +0 -91
  47. package/dist/templates/default/packages/disposabl-kit/client/components/ui/native-select.tsx +0 -64
  48. package/dist/templates/default/packages/disposabl-kit/client/components/ui/navigation-menu.tsx +0 -170
  49. package/dist/templates/default/packages/disposabl-kit/client/components/ui/pagination.tsx +0 -133
  50. package/dist/templates/default/packages/disposabl-kit/client/components/ui/popover.tsx +0 -87
  51. package/dist/templates/default/packages/disposabl-kit/client/components/ui/progress.tsx +0 -82
  52. package/dist/templates/default/packages/disposabl-kit/client/components/ui/questionnaire.tsx +0 -330
  53. package/dist/templates/default/packages/disposabl-kit/client/components/ui/radio-group.tsx +0 -35
  54. package/dist/templates/default/packages/disposabl-kit/client/components/ui/resizable.tsx +0 -49
  55. package/dist/templates/default/packages/disposabl-kit/client/components/ui/scroll-area.tsx +0 -51
  56. package/dist/templates/default/packages/disposabl-kit/client/components/ui/select.tsx +0 -201
  57. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sheet.tsx +0 -132
  58. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sidebar.tsx +0 -723
  59. package/dist/templates/default/packages/disposabl-kit/client/components/ui/skeleton.tsx +0 -13
  60. package/dist/templates/default/packages/disposabl-kit/client/components/ui/slider.tsx +0 -51
  61. package/dist/templates/default/packages/disposabl-kit/client/components/ui/switch.tsx +0 -31
  62. package/dist/templates/default/packages/disposabl-kit/client/components/ui/table.tsx +0 -113
  63. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tabs.tsx +0 -81
  64. package/dist/templates/default/packages/disposabl-kit/client/components/ui/textarea.tsx +0 -17
  65. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toast.tsx +0 -229
  66. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle-group.tsx +0 -87
  67. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle.tsx +0 -42
  68. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tooltip.tsx +0 -65
  69. package/dist/templates/default/packages/disposabl-kit/client/components/ui/trace.tsx +0 -161
  70. package/dist/templates/default/packages/disposabl-kit/client/hooks/use-mobile.ts +0 -21
@@ -1,158 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- import { Button } from "@disposabl/disposabl-kit/client/components/ui/button";
8
- import { Input } from "@disposabl/disposabl-kit/client/components/ui/input";
9
- import { Textarea } from "@disposabl/disposabl-kit/client/components/ui/textarea";
10
-
11
- function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12
- return (
13
- <div
14
- data-slot="input-group"
15
- role="group"
16
- className={cn(
17
- "group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 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-[[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",
18
- className,
19
- )}
20
- {...props}
21
- />
22
- );
23
- }
24
-
25
- const inputGroupAddonVariants = cva(
26
- "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",
27
- {
28
- variants: {
29
- align: {
30
- "inline-start":
31
- "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
32
- "inline-end":
33
- "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
34
- "block-start":
35
- "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
36
- "block-end":
37
- "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
38
- },
39
- },
40
- defaultVariants: {
41
- align: "inline-start",
42
- },
43
- },
44
- );
45
-
46
- function InputGroupAddon({
47
- className,
48
- align = "inline-start",
49
- ...props
50
- }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
51
- return (
52
- <div
53
- role="group"
54
- data-slot="input-group-addon"
55
- data-align={align}
56
- className={cn(inputGroupAddonVariants({ align }), className)}
57
- onClick={(e) => {
58
- if ((e.target as HTMLElement).closest("button")) {
59
- return;
60
- }
61
- e.currentTarget.parentElement?.querySelector("input")?.focus();
62
- }}
63
- {...props}
64
- />
65
- );
66
- }
67
-
68
- const inputGroupButtonVariants = cva(
69
- "flex items-center gap-2 text-sm shadow-none",
70
- {
71
- variants: {
72
- size: {
73
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
74
- sm: "",
75
- "icon-xs":
76
- "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
77
- "icon-sm": "size-8 p-0 has-[>svg]:p-0",
78
- },
79
- },
80
- defaultVariants: {
81
- size: "xs",
82
- },
83
- },
84
- );
85
-
86
- function InputGroupButton({
87
- className,
88
- type = "button",
89
- variant = "ghost",
90
- size = "xs",
91
- ...props
92
- }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> &
93
- VariantProps<typeof inputGroupButtonVariants> & {
94
- type?: "button" | "submit" | "reset";
95
- }) {
96
- return (
97
- <Button
98
- type={type}
99
- data-size={size}
100
- variant={variant}
101
- className={cn(inputGroupButtonVariants({ size }), className)}
102
- {...props}
103
- />
104
- );
105
- }
106
-
107
- function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
108
- return (
109
- <span
110
- className={cn(
111
- "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
112
- className,
113
- )}
114
- {...props}
115
- />
116
- );
117
- }
118
-
119
- function InputGroupInput({
120
- className,
121
- ...props
122
- }: React.ComponentProps<"input">) {
123
- return (
124
- <Input
125
- data-slot="input-group-control"
126
- className={cn(
127
- "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
128
- className,
129
- )}
130
- {...props}
131
- />
132
- );
133
- }
134
-
135
- function InputGroupTextarea({
136
- className,
137
- ...props
138
- }: React.ComponentProps<"textarea">) {
139
- return (
140
- <Textarea
141
- data-slot="input-group-control"
142
- className={cn(
143
- "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
144
- className,
145
- )}
146
- {...props}
147
- />
148
- );
149
- }
150
-
151
- export {
152
- InputGroup,
153
- InputGroupAddon,
154
- InputGroupButton,
155
- InputGroupText,
156
- InputGroupInput,
157
- InputGroupTextarea,
158
- };
@@ -1,83 +0,0 @@
1
- import * as React from "react";
2
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
3
- import { OTPInput, OTPInputContext } from "input-otp";
4
- import { MinusIcon } from "lucide-react";
5
-
6
- function InputOTP({
7
- className,
8
- containerClassName,
9
- ...props
10
- }: React.ComponentProps<typeof OTPInput> & {
11
- containerClassName?: string;
12
- }) {
13
- return (
14
- <OTPInput
15
- data-slot="input-otp"
16
- containerClassName={cn(
17
- "cn-input-otp flex items-center has-disabled:opacity-50",
18
- containerClassName,
19
- )}
20
- spellCheck={false}
21
- className={cn("disabled:cursor-not-allowed", className)}
22
- {...props}
23
- />
24
- );
25
- }
26
-
27
- function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
28
- return (
29
- <div
30
- data-slot="input-otp-group"
31
- className={cn(
32
- "flex items-center rounded-md has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
33
- className,
34
- )}
35
- {...props}
36
- />
37
- );
38
- }
39
-
40
- function InputOTPSlot({
41
- index,
42
- className,
43
- ...props
44
- }: React.ComponentProps<"div"> & {
45
- index: number;
46
- }) {
47
- const inputOTPContext = React.useContext(OTPInputContext);
48
- const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] ?? {};
49
-
50
- return (
51
- <div
52
- data-slot="input-otp-slot"
53
- data-active={isActive}
54
- className={cn(
55
- "relative flex size-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
56
- className,
57
- )}
58
- {...props}
59
- >
60
- {char}
61
- {hasFakeCaret && (
62
- <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
63
- <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
64
- </div>
65
- )}
66
- </div>
67
- );
68
- }
69
-
70
- function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
71
- return (
72
- <div
73
- data-slot="input-otp-separator"
74
- className="flex items-center [&_svg:not([class*='size-'])]:size-4"
75
- role="separator"
76
- {...props}
77
- >
78
- <MinusIcon />
79
- </div>
80
- );
81
- }
82
-
83
- export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -1,201 +0,0 @@
1
- import * as React from "react";
2
- import { mergeProps } from "@base-ui/react/merge-props";
3
- import { useRender } from "@base-ui/react/use-render";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- import { Separator } from "@disposabl/disposabl-kit/client/components/ui/separator";
8
-
9
- function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
10
- return (
11
- <div
12
- role="list"
13
- data-slot="item-group"
14
- className={cn(
15
- "group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
16
- className,
17
- )}
18
- {...props}
19
- />
20
- );
21
- }
22
-
23
- function ItemSeparator({
24
- className,
25
- ...props
26
- }: React.ComponentProps<typeof Separator>) {
27
- return (
28
- <Separator
29
- data-slot="item-separator"
30
- orientation="horizontal"
31
- className={cn("my-2", className)}
32
- {...props}
33
- />
34
- );
35
- }
36
-
37
- const itemVariants = cva(
38
- "group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
39
- {
40
- variants: {
41
- variant: {
42
- default: "border-transparent",
43
- outline: "border-border",
44
- muted: "border-transparent bg-muted/50",
45
- },
46
- size: {
47
- default: "gap-3.5 px-4 py-3.5",
48
- sm: "gap-2.5 px-3 py-2.5",
49
- xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
50
- },
51
- },
52
- defaultVariants: {
53
- variant: "default",
54
- size: "default",
55
- },
56
- },
57
- );
58
-
59
- function Item({
60
- className,
61
- variant = "default",
62
- size = "default",
63
- render,
64
- ...props
65
- }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>) {
66
- return useRender({
67
- defaultTagName: "div",
68
- props: mergeProps<"div">(
69
- {
70
- className: cn(itemVariants({ variant, size, className })),
71
- },
72
- props,
73
- ),
74
- render,
75
- state: {
76
- slot: "item",
77
- variant,
78
- size,
79
- },
80
- });
81
- }
82
-
83
- const itemMediaVariants = cva(
84
- "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
85
- {
86
- variants: {
87
- variant: {
88
- default: "bg-transparent",
89
- icon: "[&_svg:not([class*='size-'])]:size-4",
90
- image:
91
- "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover",
92
- },
93
- },
94
- defaultVariants: {
95
- variant: "default",
96
- },
97
- },
98
- );
99
-
100
- function ItemMedia({
101
- className,
102
- variant = "default",
103
- ...props
104
- }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
105
- return (
106
- <div
107
- data-slot="item-media"
108
- data-variant={variant}
109
- className={cn(itemMediaVariants({ variant, className }))}
110
- {...props}
111
- />
112
- );
113
- }
114
-
115
- function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
116
- return (
117
- <div
118
- data-slot="item-content"
119
- className={cn(
120
- "flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
121
- className,
122
- )}
123
- {...props}
124
- />
125
- );
126
- }
127
-
128
- function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
129
- return (
130
- <div
131
- data-slot="item-title"
132
- className={cn(
133
- "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
134
- className,
135
- )}
136
- {...props}
137
- />
138
- );
139
- }
140
-
141
- function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
142
- return (
143
- <p
144
- data-slot="item-description"
145
- className={cn(
146
- "line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
147
- className,
148
- )}
149
- {...props}
150
- />
151
- );
152
- }
153
-
154
- function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
155
- return (
156
- <div
157
- data-slot="item-actions"
158
- className={cn("flex items-center gap-2", className)}
159
- {...props}
160
- />
161
- );
162
- }
163
-
164
- function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
165
- return (
166
- <div
167
- data-slot="item-header"
168
- className={cn(
169
- "flex basis-full items-center justify-between gap-2",
170
- className,
171
- )}
172
- {...props}
173
- />
174
- );
175
- }
176
-
177
- function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
178
- return (
179
- <div
180
- data-slot="item-footer"
181
- className={cn(
182
- "flex basis-full items-center justify-between gap-2",
183
- className,
184
- )}
185
- {...props}
186
- />
187
- );
188
- }
189
-
190
- export {
191
- Item,
192
- ItemMedia,
193
- ItemContent,
194
- ItemActions,
195
- ItemGroup,
196
- ItemSeparator,
197
- ItemTitle,
198
- ItemDescription,
199
- ItemHeader,
200
- ItemFooter,
201
- };
@@ -1,26 +0,0 @@
1
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
2
-
3
- function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
4
- return (
5
- <kbd
6
- data-slot="kbd"
7
- className={cn(
8
- "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
9
- className,
10
- )}
11
- {...props}
12
- />
13
- );
14
- }
15
-
16
- function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
17
- return (
18
- <kbd
19
- data-slot="kbd-group"
20
- className={cn("inline-flex items-center gap-1", className)}
21
- {...props}
22
- />
23
- );
24
- }
25
-
26
- export { Kbd, KbdGroup };
@@ -1,70 +0,0 @@
1
- import * as React from "react";
2
- import { mergeProps } from "@base-ui/react/merge-props";
3
- import { useRender } from "@base-ui/react/use-render";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- const markerVariants = cva(
8
- "group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",
9
- {
10
- variants: {
11
- variant: {
12
- default: "",
13
- separator:
14
- "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
15
- border: "border-b border-border pb-2",
16
- },
17
- },
18
- },
19
- );
20
-
21
- function Marker({
22
- className,
23
- variant = "default",
24
- render,
25
- ...props
26
- }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>) {
27
- return useRender({
28
- defaultTagName: "div",
29
- props: mergeProps<"div">(
30
- {
31
- className: cn(markerVariants({ variant, className })),
32
- },
33
- props,
34
- ),
35
- render,
36
- state: {
37
- slot: "marker",
38
- variant,
39
- },
40
- });
41
- }
42
-
43
- function MarkerIcon({ className, ...props }: React.ComponentProps<"span">) {
44
- return (
45
- <span
46
- data-slot="marker-icon"
47
- aria-hidden="true"
48
- className={cn(
49
- "size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4",
50
- className,
51
- )}
52
- {...props}
53
- />
54
- );
55
- }
56
-
57
- function MarkerContent({ className, ...props }: React.ComponentProps<"span">) {
58
- return (
59
- <span
60
- data-slot="marker-content"
61
- className={cn(
62
- "min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
63
- className,
64
- )}
65
- {...props}
66
- />
67
- );
68
- }
69
-
70
- export { Marker, MarkerIcon, MarkerContent, markerVariants };