@stampui/blocks 1.1.1 → 2.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.
- package/dist/manifests.js +917 -170
- package/package.json +15 -10
- package/src/components/blocks/animated-counter.tsx +70 -0
- package/src/components/blocks/gradient-text.tsx +39 -0
- package/src/components/blocks/grid-wave.tsx +40 -0
- package/src/components/blocks/loading-card.tsx +48 -0
- package/src/components/blocks/loading-dots.tsx +68 -0
- package/src/components/blocks/orbit-trail.tsx +30 -0
- package/src/components/blocks/progress-ring.tsx +72 -0
- package/src/components/blocks/registry-card.tsx +6 -7
- package/src/components/blocks/signal-arc.tsx +32 -0
- package/src/components/blocks/typewriter-text.tsx +62 -0
- package/src/components/core/alert-dialog.tsx +2 -2
- package/src/components/core/avatar.tsx +8 -4
- package/src/components/core/button.tsx +1 -1
- package/src/components/core/checkbox.tsx +1 -1
- package/src/components/core/combobox.tsx +1 -1
- package/src/components/core/command.tsx +7 -4
- package/src/components/core/date-picker.tsx +1 -1
- package/src/components/core/dialog.tsx +1 -1
- package/src/components/core/drawer.tsx +1 -1
- package/src/components/core/input.tsx +2 -0
- package/src/components/core/label.tsx +1 -1
- package/src/components/core/multi-select.tsx +1 -1
- package/src/components/core/native-select.tsx +1 -1
- package/src/components/core/password-input.tsx +3 -0
- package/src/components/core/radio-group.tsx +1 -1
- package/src/components/core/resizable.tsx +1 -1
- package/src/components/core/select.tsx +1 -1
- package/src/components/core/sheet.tsx +1 -1
- package/src/components/core/slider.tsx +1 -1
- package/src/components/core/status-pulse.tsx +6 -0
- package/src/components/core/switch.tsx +1 -1
- package/src/components/core/table.tsx +7 -2
- package/src/components/core/tabs.tsx +1 -1
- package/src/components/core/toggle.tsx +1 -1
- package/src/components/core/typing-indicator.tsx +41 -27
- package/src/manifests.ts +932 -183
- package/src/components/blocks/ai-chat-shell.tsx +0 -97
- package/src/components/blocks/auth-panel.tsx +0 -203
- package/src/components/blocks/dashboard-shell.tsx +0 -135
- package/src/components/blocks/notification-center.tsx +0 -185
- package/src/components/blocks/onboarding-flow.tsx +0 -230
- package/src/components/blocks/project-command-center.tsx +0 -188
- package/src/components/blocks/prompt-input.tsx +0 -81
- package/src/components/blocks/settings-layout.tsx +0 -178
- package/src/components/blocks/token-stream.tsx +0 -42
- package/src/components/core/carousel.tsx +0 -170
- package/src/components/core/chart.tsx +0 -377
- package/src/components/core/data-table.tsx +0 -173
- package/src/components/core/file-upload.tsx +0 -143
- package/src/components/core/input-otp.tsx +0 -108
- package/src/components/core/stepper.tsx +0 -111
- package/src/components/core/timeline.tsx +0 -81
|
@@ -43,7 +43,7 @@ export function DatePicker({
|
|
|
43
43
|
className={cx(
|
|
44
44
|
"flex h-9 w-full items-center justify-start gap-2 rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm outline-none",
|
|
45
45
|
"hover:border-border-strong transition-colors text-left",
|
|
46
|
-
"focus-visible:ring-1 focus-visible:ring-border-strong
|
|
46
|
+
"focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
47
47
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
48
48
|
!selected && "text-muted-foreground",
|
|
49
49
|
className
|
|
@@ -46,7 +46,7 @@ export const DialogContent = React.forwardRef<
|
|
|
46
46
|
>
|
|
47
47
|
{children}
|
|
48
48
|
{!hideClose && (
|
|
49
|
-
<RadixDialog.Close className="absolute right-4 top-4 rounded-md p-1 text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground outline-none focus-visible:ring-1 focus-visible:ring-border-strong
|
|
49
|
+
<RadixDialog.Close className="absolute right-4 top-4 rounded-md p-1 text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground outline-none focus-visible:ring-1 focus-visible:ring-border-strong ">
|
|
50
50
|
<X className="h-4 w-4" />
|
|
51
51
|
<span className="sr-only">Close</span>
|
|
52
52
|
</RadixDialog.Close>
|
|
@@ -46,7 +46,7 @@ export const DrawerContent = React.forwardRef<
|
|
|
46
46
|
>
|
|
47
47
|
<div className="mx-auto mt-3 mb-2 h-1.5 w-10 shrink-0 rounded-full bg-border" />
|
|
48
48
|
{children}
|
|
49
|
-
<RadixDialog.Close className="absolute right-4 top-4 rounded-md p-1 text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground outline-none focus-visible:ring-1 focus-visible:ring-border-strong
|
|
49
|
+
<RadixDialog.Close className="absolute right-4 top-4 rounded-md p-1 text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground outline-none focus-visible:ring-1 focus-visible:ring-border-strong ">
|
|
50
50
|
<X className="h-4 w-4" />
|
|
51
51
|
<span className="sr-only">Close</span>
|
|
52
52
|
</RadixDialog.Close>
|
|
@@ -11,7 +11,7 @@ export const Label = React.forwardRef<HTMLLabelElement, LabelProps>(
|
|
|
11
11
|
<label
|
|
12
12
|
ref={ref}
|
|
13
13
|
className={cx(
|
|
14
|
-
"text-sm font-medium leading-none text-foreground",
|
|
14
|
+
"block text-sm font-medium leading-none text-foreground",
|
|
15
15
|
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
@@ -67,7 +67,7 @@ export function MultiSelect({
|
|
|
67
67
|
className={cx(
|
|
68
68
|
"flex min-h-9 w-full items-center justify-between gap-2 rounded-lg border border-border bg-surface-2 px-3 py-1.5 text-sm outline-none",
|
|
69
69
|
"hover:border-border-strong transition-colors text-left",
|
|
70
|
-
"focus-visible:ring-1 focus-visible:ring-border-strong
|
|
70
|
+
"focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
71
71
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
72
72
|
className
|
|
73
73
|
)}
|
|
@@ -12,7 +12,7 @@ export const NativeSelect = React.forwardRef<HTMLSelectElement, NativeSelectProp
|
|
|
12
12
|
className={cx(
|
|
13
13
|
"h-9 w-full appearance-none rounded-lg border border-border bg-surface-2 px-3 pr-8 py-2 text-sm text-foreground outline-none",
|
|
14
14
|
"hover:border-border-strong transition-colors",
|
|
15
|
-
"focus-visible:ring-1 focus-visible:ring-border-strong
|
|
15
|
+
"focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
16
16
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
@@ -48,6 +48,9 @@ export const PasswordInput = React.forwardRef<HTMLInputElement, PasswordInputPro
|
|
|
48
48
|
type={visible ? "text" : "password"}
|
|
49
49
|
value={controlled ? value : internalValue}
|
|
50
50
|
onChange={handleChange}
|
|
51
|
+
autoComplete={props.autoComplete || "new-password"}
|
|
52
|
+
data-1p-ignore="true"
|
|
53
|
+
data-lpignore="true"
|
|
51
54
|
className={cx(
|
|
52
55
|
"flex w-full rounded-lg border border-border bg-input px-3 py-2 pr-10 text-sm text-foreground placeholder:text-muted-foreground outline-none transition-colors focus:border-border-strong disabled:cursor-not-allowed disabled:opacity-50",
|
|
53
56
|
className
|
|
@@ -8,7 +8,7 @@ import { cx } from "@/lib/cx"
|
|
|
8
8
|
const radioStyles = cva(
|
|
9
9
|
[
|
|
10
10
|
"peer aspect-square shrink-0 rounded-full border transition-all outline-none",
|
|
11
|
-
"focus-visible:ring-1 focus-visible:ring-border-strong
|
|
11
|
+
"focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
12
12
|
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
13
13
|
"border-border hover:border-border-strong",
|
|
14
14
|
"data-[state=checked]:border-foreground",
|
|
@@ -215,7 +215,7 @@ export function ResizableHandle({
|
|
|
215
215
|
className={cx(
|
|
216
216
|
"relative flex shrink-0 items-center justify-center bg-border transition-colors select-none",
|
|
217
217
|
"hover:bg-border-strong active:bg-border-strong",
|
|
218
|
-
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-strong
|
|
218
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
219
219
|
direction === "horizontal"
|
|
220
220
|
? "w-px h-full cursor-col-resize"
|
|
221
221
|
: "h-px w-full cursor-row-resize",
|
|
@@ -19,7 +19,7 @@ export const SelectTrigger = React.forwardRef<
|
|
|
19
19
|
"flex h-9 w-full items-center justify-between gap-2 rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm outline-none",
|
|
20
20
|
"placeholder:text-muted-foreground",
|
|
21
21
|
"hover:border-border-strong transition-colors",
|
|
22
|
-
"focus-visible:
|
|
22
|
+
"focus-visible:border-border-strong focus-visible:bg-surface-3",
|
|
23
23
|
"data-[placeholder]:text-muted-foreground",
|
|
24
24
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
25
25
|
className
|
|
@@ -77,7 +77,7 @@ export const SheetContent = React.forwardRef<
|
|
|
77
77
|
{...props}
|
|
78
78
|
>
|
|
79
79
|
{children}
|
|
80
|
-
<RadixDialog.Close className="absolute right-4 top-4 rounded-md p-1 text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground outline-none focus-visible:ring-1 focus-visible:ring-border-strong
|
|
80
|
+
<RadixDialog.Close className="absolute right-4 top-4 rounded-md p-1 text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground outline-none focus-visible:ring-1 focus-visible:ring-border-strong ">
|
|
81
81
|
<X className="h-4 w-4" />
|
|
82
82
|
<span className="sr-only">Close</span>
|
|
83
83
|
</RadixDialog.Close>
|
|
@@ -46,7 +46,7 @@ const thumbStyles = cva(
|
|
|
46
46
|
[
|
|
47
47
|
"block rounded-full bg-foreground ring-offset-background",
|
|
48
48
|
"transition-all duration-100",
|
|
49
|
-
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-strong
|
|
49
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
50
50
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
51
51
|
"hover:scale-110",
|
|
52
52
|
],
|
|
@@ -10,6 +10,8 @@ const dotStyles = cva("relative inline-flex rounded-full shrink-0", {
|
|
|
10
10
|
processing: "bg-yellow-400",
|
|
11
11
|
error: "bg-red-500",
|
|
12
12
|
warning: "bg-orange-400",
|
|
13
|
+
unread: "bg-primary",
|
|
14
|
+
success: "bg-green-500",
|
|
13
15
|
},
|
|
14
16
|
size: {
|
|
15
17
|
sm: "h-1.5 w-1.5",
|
|
@@ -28,6 +30,8 @@ const pingStyles = cva("absolute inline-flex h-full w-full rounded-full opacity-
|
|
|
28
30
|
processing: "bg-yellow-400",
|
|
29
31
|
error: "bg-red-500",
|
|
30
32
|
warning: "bg-orange-400",
|
|
33
|
+
unread: "hidden",
|
|
34
|
+
success: "bg-green-500",
|
|
31
35
|
},
|
|
32
36
|
},
|
|
33
37
|
defaultVariants: { status: "online" },
|
|
@@ -39,6 +43,8 @@ const labels: Record<string, string> = {
|
|
|
39
43
|
processing: "Processing",
|
|
40
44
|
error: "Error",
|
|
41
45
|
warning: "Warning",
|
|
46
|
+
unread: "Unread",
|
|
47
|
+
success: "Success",
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
export interface StatusPulseProps
|
|
@@ -9,7 +9,7 @@ const switchStyles = cva(
|
|
|
9
9
|
[
|
|
10
10
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
|
|
11
11
|
"transition-all duration-200 ease-out outline-none",
|
|
12
|
-
"focus-visible:ring-1 focus-visible:ring-border-strong
|
|
12
|
+
"focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
13
13
|
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
14
14
|
"data-[state=unchecked]:bg-surface-3",
|
|
15
15
|
],
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { cx } from "@/lib/cx"
|
|
3
3
|
|
|
4
|
+
export interface TableProps extends React.ComponentPropsWithoutRef<"table"> {
|
|
5
|
+
containerClassName?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
export function Table({
|
|
5
9
|
className,
|
|
10
|
+
containerClassName,
|
|
6
11
|
...props
|
|
7
|
-
}:
|
|
12
|
+
}: TableProps) {
|
|
8
13
|
return (
|
|
9
|
-
<div className="w-full overflow-x-auto rounded-xl border border-border">
|
|
14
|
+
<div className={cx("w-full overflow-x-auto rounded-xl border border-border", containerClassName)}>
|
|
10
15
|
<table
|
|
11
16
|
className={cx("w-full text-sm", className)}
|
|
12
17
|
{...props}
|
|
@@ -46,7 +46,7 @@ export const TabsContent = React.forwardRef<
|
|
|
46
46
|
<RadixTabs.Content
|
|
47
47
|
ref={ref}
|
|
48
48
|
className={cx(
|
|
49
|
-
"mt-4 outline-none focus-visible:ring-1 focus-visible:ring-border-strong
|
|
49
|
+
"mt-4 outline-none focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
50
50
|
className
|
|
51
51
|
)}
|
|
52
52
|
{...props}
|
|
@@ -9,7 +9,7 @@ const toggleVariants = cva(
|
|
|
9
9
|
[
|
|
10
10
|
"inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium",
|
|
11
11
|
"transition-all duration-[150ms] ease-out outline-none",
|
|
12
|
-
"focus-visible:ring-1 focus-visible:ring-border-strong
|
|
12
|
+
"focus-visible:ring-1 focus-visible:ring-border-strong ",
|
|
13
13
|
"disabled:pointer-events-none disabled:opacity-40",
|
|
14
14
|
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
15
15
|
],
|
|
@@ -2,50 +2,64 @@ import * as React from "react"
|
|
|
2
2
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
3
|
import { cx } from "@/lib/cx"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const typingIndicatorVariants = cva(
|
|
6
6
|
"inline-flex items-center gap-1",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
bare: "bg-transparent p-0",
|
|
11
|
+
bubble: "bg-surface-2 border border-border px-3 py-2 rounded-2xl rounded-bl-sm",
|
|
12
12
|
},
|
|
13
|
+
size: {
|
|
14
|
+
sm: "text-xs",
|
|
15
|
+
md: "text-sm",
|
|
16
|
+
lg: "text-base",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "bubble",
|
|
21
|
+
size: "md",
|
|
13
22
|
},
|
|
14
|
-
defaultVariants: { variant: "bubble" },
|
|
15
23
|
}
|
|
16
24
|
)
|
|
17
25
|
|
|
18
|
-
const dotClass = "rounded-full bg-muted-foreground animate-bounce"
|
|
19
|
-
|
|
20
|
-
const dotSizes = { sm: "h-1 w-1", md: "h-1.5 w-1.5", lg: "h-2 w-2" }
|
|
21
|
-
|
|
22
26
|
export interface TypingIndicatorProps
|
|
23
|
-
extends React.HTMLAttributes<
|
|
24
|
-
VariantProps<typeof
|
|
25
|
-
size?: "sm" | "md" | "lg"
|
|
27
|
+
extends React.HTMLAttributes<HTMLSpanElement>,
|
|
28
|
+
VariantProps<typeof typingIndicatorVariants> {
|
|
26
29
|
label?: string
|
|
27
30
|
}
|
|
28
31
|
|
|
29
|
-
export function TypingIndicator({
|
|
32
|
+
export function TypingIndicator({
|
|
33
|
+
className,
|
|
34
|
+
variant,
|
|
35
|
+
size,
|
|
36
|
+
label = "Typing…",
|
|
37
|
+
...props
|
|
38
|
+
}: TypingIndicatorProps) {
|
|
39
|
+
const dotSize = size === "sm" ? "h-1 w-1" : size === "lg" ? "h-2 w-2" : "h-1.5 w-1.5"
|
|
40
|
+
|
|
30
41
|
return (
|
|
31
|
-
<
|
|
42
|
+
<span
|
|
32
43
|
role="status"
|
|
33
44
|
aria-label={label}
|
|
34
|
-
className={cx(
|
|
45
|
+
className={cx(typingIndicatorVariants({ variant, size }), className)}
|
|
35
46
|
{...props}
|
|
36
47
|
>
|
|
37
|
-
<span
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
<span className="flex items-center gap-1 h-3">
|
|
49
|
+
<span
|
|
50
|
+
className={cx("bg-foreground/70 rounded-full animate-bounce shrink-0", dotSize)}
|
|
51
|
+
style={{ animationDelay: "0ms" }}
|
|
52
|
+
/>
|
|
53
|
+
<span
|
|
54
|
+
className={cx("bg-foreground/70 rounded-full animate-bounce shrink-0", dotSize)}
|
|
55
|
+
style={{ animationDelay: "150ms" }}
|
|
56
|
+
/>
|
|
57
|
+
<span
|
|
58
|
+
className={cx("bg-foreground/70 rounded-full animate-bounce shrink-0", dotSize)}
|
|
59
|
+
style={{ animationDelay: "300ms" }}
|
|
60
|
+
/>
|
|
61
|
+
</span>
|
|
62
|
+
{label && <span className="sr-only">{label}</span>}
|
|
63
|
+
</span>
|
|
50
64
|
)
|
|
51
65
|
}
|