@handled-ai/design-system 0.18.1 → 0.18.3
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/charts/index.d.ts +0 -1
- package/dist/charts/index.js +0 -1
- package/dist/charts/index.js.map +1 -1
- package/dist/charts/pipeline-overview.d.ts +1 -2
- package/dist/charts/pipeline-overview.js +1 -29
- package/dist/charts/pipeline-overview.js.map +1 -1
- package/dist/components/insights-filter-bar.d.ts +1 -2
- package/dist/components/insights-filter-bar.js +5 -13
- package/dist/components/insights-filter-bar.js.map +1 -1
- package/dist/components/metric-card.d.ts +1 -14
- package/dist/components/metric-card.js +0 -86
- package/dist/components/metric-card.js.map +1 -1
- package/dist/components/timeline-activity.d.ts +16 -1
- package/dist/components/timeline-activity.js +69 -1
- package/dist/components/timeline-activity.js.map +1 -1
- package/dist/index.d.ts +2 -8
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/prototype/prototype-inbox-view.d.ts +11 -1
- package/dist/prototype/prototype-inbox-view.js +101 -33
- package/dist/prototype/prototype-inbox-view.js.map +1 -1
- package/package.json +1 -1
- package/src/charts/index.ts +0 -1
- package/src/charts/pipeline-overview.tsx +1 -38
- package/src/components/__tests__/timeline-activity.test.tsx +137 -0
- package/src/components/insights-filter-bar.tsx +4 -13
- package/src/components/metric-card.tsx +0 -82
- package/src/components/timeline-activity.tsx +112 -1
- package/src/index.ts +0 -5
- package/src/prototype/__tests__/detail-view-attention.test.tsx +2 -2
- package/src/prototype/__tests__/detail-view-timeline-system-events.test.tsx +322 -0
- package/src/prototype/prototype-inbox-view.tsx +131 -30
- package/dist/charts/empty-chart-state.d.ts +0 -11
- package/dist/charts/empty-chart-state.js +0 -70
- package/dist/charts/empty-chart-state.js.map +0 -1
- package/dist/components/days-open-cell.d.ts +0 -16
- package/dist/components/days-open-cell.js +0 -73
- package/dist/components/days-open-cell.js.map +0 -1
- package/dist/components/detail-drawer.d.ts +0 -16
- package/dist/components/detail-drawer.js +0 -45
- package/dist/components/detail-drawer.js.map +0 -1
- package/dist/components/linked-entity-cell.d.ts +0 -14
- package/dist/components/linked-entity-cell.js +0 -96
- package/dist/components/linked-entity-cell.js.map +0 -1
- package/dist/components/pill.d.ts +0 -26
- package/dist/components/pill.js +0 -77
- package/dist/components/pill.js.map +0 -1
- package/dist/components/quick-segment.d.ts +0 -13
- package/dist/components/quick-segment.js +0 -96
- package/dist/components/quick-segment.js.map +0 -1
- package/src/charts/__tests__/insights-charts.test.tsx +0 -62
- package/src/charts/empty-chart-state.tsx +0 -44
- package/src/components/__tests__/insights-primitives.test.tsx +0 -117
- package/src/components/days-open-cell.tsx +0 -50
- package/src/components/detail-drawer.tsx +0 -60
- package/src/components/linked-entity-cell.tsx +0 -74
- package/src/components/pill.tsx +0 -67
- package/src/components/quick-segment.tsx +0 -68
package/src/components/pill.tsx
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../lib/utils"
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Insights-friendly pill convenience wrappers.
|
|
8
|
-
*
|
|
9
|
-
* Pill and StatusPill are small, rounded wrappers for dense Insights surfaces
|
|
10
|
-
* such as tables, KPI strips, and filter summaries. They intentionally wrap the
|
|
11
|
-
* existing Badge/StatusBadge visual language and are not a replacement for all
|
|
12
|
-
* Badge usage across the design system.
|
|
13
|
-
*/
|
|
14
|
-
export type PillStatus = "success" | "warning" | "error" | "neutral" | "info"
|
|
15
|
-
|
|
16
|
-
const pillVariants = cva(
|
|
17
|
-
"inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors [&>svg]:size-3",
|
|
18
|
-
{
|
|
19
|
-
variants: {
|
|
20
|
-
variant: {
|
|
21
|
-
default: "border-transparent bg-primary text-primary-foreground",
|
|
22
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
23
|
-
destructive: "border-transparent bg-destructive text-white dark:bg-destructive/60",
|
|
24
|
-
outline: "border-border bg-background text-foreground",
|
|
25
|
-
ghost: "border-transparent bg-transparent text-muted-foreground",
|
|
26
|
-
success: "border-transparent bg-green-100 text-green-950 dark:bg-green-950 dark:text-green-100",
|
|
27
|
-
warning: "border-transparent bg-yellow-100 text-yellow-950 dark:bg-yellow-950 dark:text-yellow-100",
|
|
28
|
-
error: "border-transparent bg-red-100 text-red-950 dark:bg-red-950 dark:text-red-100",
|
|
29
|
-
neutral: "border-transparent bg-muted text-foreground",
|
|
30
|
-
info: "border-transparent bg-blue-100 text-blue-950 dark:bg-blue-950 dark:text-blue-100",
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
defaultVariants: {
|
|
34
|
-
variant: "neutral",
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
export interface PillProps
|
|
40
|
-
extends React.ComponentProps<"span">,
|
|
41
|
-
VariantProps<typeof pillVariants> {}
|
|
42
|
-
|
|
43
|
-
export function Pill({ className, variant = "neutral", ...props }: PillProps) {
|
|
44
|
-
return (
|
|
45
|
-
<span
|
|
46
|
-
data-slot="pill"
|
|
47
|
-
data-variant={variant}
|
|
48
|
-
className={cn(pillVariants({ variant }), className)}
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface StatusPillProps extends Omit<PillProps, "variant"> {
|
|
55
|
-
status: React.ReactNode
|
|
56
|
-
intent?: PillStatus
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function StatusPill({ status, intent = "neutral", children, ...props }: StatusPillProps) {
|
|
60
|
-
return (
|
|
61
|
-
<Pill data-slot="status-pill" variant={intent} {...props}>
|
|
62
|
-
{children ?? status}
|
|
63
|
-
</Pill>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export { pillVariants }
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
|
|
5
|
-
import { cn } from "../lib/utils"
|
|
6
|
-
|
|
7
|
-
export interface QuickSegmentProps
|
|
8
|
-
extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect" | "value"> {
|
|
9
|
-
label: React.ReactNode
|
|
10
|
-
value: string
|
|
11
|
-
selected?: boolean
|
|
12
|
-
count?: number | string
|
|
13
|
-
description?: React.ReactNode
|
|
14
|
-
onSelect?: (value: string) => void
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function QuickSegment({
|
|
18
|
-
label,
|
|
19
|
-
value,
|
|
20
|
-
selected = false,
|
|
21
|
-
count,
|
|
22
|
-
description,
|
|
23
|
-
onSelect,
|
|
24
|
-
className,
|
|
25
|
-
type = "button",
|
|
26
|
-
...props
|
|
27
|
-
}: QuickSegmentProps) {
|
|
28
|
-
return (
|
|
29
|
-
<button
|
|
30
|
-
data-slot="quick-segment"
|
|
31
|
-
data-selected={selected ? "true" : "false"}
|
|
32
|
-
type={type}
|
|
33
|
-
aria-pressed={selected}
|
|
34
|
-
className={cn(
|
|
35
|
-
"inline-flex min-h-8 items-center gap-2 rounded-full border px-3 py-1.5 text-sm font-medium transition-colors",
|
|
36
|
-
selected
|
|
37
|
-
? "border-primary bg-primary text-primary-foreground shadow-sm"
|
|
38
|
-
: "border-border bg-background text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
39
|
-
className
|
|
40
|
-
)}
|
|
41
|
-
onClick={(event) => {
|
|
42
|
-
props.onClick?.(event)
|
|
43
|
-
if (!event.defaultPrevented) onSelect?.(value)
|
|
44
|
-
}}
|
|
45
|
-
{...props}
|
|
46
|
-
>
|
|
47
|
-
<span data-slot="quick-segment-label">{label}</span>
|
|
48
|
-
{count !== undefined ? (
|
|
49
|
-
<span
|
|
50
|
-
data-slot="quick-segment-count"
|
|
51
|
-
className={cn(
|
|
52
|
-
"rounded-full px-1.5 py-0.5 text-[11px] leading-none",
|
|
53
|
-
selected
|
|
54
|
-
? "bg-primary-foreground/20 text-primary-foreground"
|
|
55
|
-
: "bg-muted text-muted-foreground"
|
|
56
|
-
)}
|
|
57
|
-
>
|
|
58
|
-
{count}
|
|
59
|
-
</span>
|
|
60
|
-
) : null}
|
|
61
|
-
{description ? (
|
|
62
|
-
<span data-slot="quick-segment-description" className="sr-only">
|
|
63
|
-
{description}
|
|
64
|
-
</span>
|
|
65
|
-
) : null}
|
|
66
|
-
</button>
|
|
67
|
-
)
|
|
68
|
-
}
|