@handled-ai/design-system 0.9.28 → 0.10.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/components/badge.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/compliance-badge.d.ts +10 -0
- package/dist/components/compliance-badge.js +95 -0
- package/dist/components/compliance-badge.js.map +1 -0
- package/dist/components/contact-chip.d.ts +12 -0
- package/dist/components/contact-chip.js +98 -0
- package/dist/components/contact-chip.js.map +1 -0
- package/dist/components/empty-state.d.ts +11 -0
- package/dist/components/empty-state.js +46 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/filter-chip.d.ts +9 -0
- package/dist/components/filter-chip.js +67 -0
- package/dist/components/filter-chip.js.map +1 -0
- package/dist/components/inline-banner.d.ts +10 -0
- package/dist/components/inline-banner.js +97 -0
- package/dist/components/inline-banner.js.map +1 -0
- package/dist/components/kbd-hint.d.ts +5 -0
- package/dist/components/kbd-hint.js +51 -0
- package/dist/components/kbd-hint.js.map +1 -0
- package/dist/components/rich-text-toolbar.d.ts +9 -0
- package/dist/components/rich-text-toolbar.js +103 -0
- package/dist/components/rich-text-toolbar.js.map +1 -0
- package/dist/components/step-timeline.d.ts +19 -0
- package/dist/components/step-timeline.js +134 -0
- package/dist/components/step-timeline.js.map +1 -0
- package/dist/components/sticky-action-bar.d.ts +10 -0
- package/dist/components/sticky-action-bar.js +56 -0
- package/dist/components/sticky-action-bar.js.map +1 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +66 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/variable-autocomplete.d.ts +21 -0
- package/dist/components/variable-autocomplete.js +171 -0
- package/dist/components/variable-autocomplete.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/__tests__/compliance-badge.test.tsx +88 -0
- package/src/components/__tests__/contact-chip.test.tsx +88 -0
- package/src/components/__tests__/empty-state.test.tsx +76 -0
- package/src/components/__tests__/filter-chip.test.tsx +73 -0
- package/src/components/__tests__/inline-banner.test.tsx +110 -0
- package/src/components/__tests__/kbd-hint.test.tsx +29 -0
- package/src/components/__tests__/rich-text-toolbar.test.tsx +92 -0
- package/src/components/__tests__/step-timeline.test.tsx +174 -0
- package/src/components/__tests__/sticky-action-bar.test.tsx +52 -0
- package/src/components/__tests__/switch.test.tsx +39 -0
- package/src/components/__tests__/variable-autocomplete.test.tsx +155 -0
- package/src/components/compliance-badge.tsx +68 -0
- package/src/components/contact-chip.tsx +68 -0
- package/src/components/empty-state.tsx +37 -0
- package/src/components/filter-chip.tsx +37 -0
- package/src/components/inline-banner.tsx +69 -0
- package/src/components/kbd-hint.tsx +21 -0
- package/src/components/rich-text-toolbar.tsx +90 -0
- package/src/components/step-timeline.tsx +149 -0
- package/src/components/sticky-action-bar.tsx +36 -0
- package/src/components/switch.tsx +29 -0
- package/src/components/variable-autocomplete.tsx +178 -0
- package/src/index.ts +12 -1
- package/src/styles/globals.css +60 -0
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const badgeVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" |
|
|
6
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
9
9
|
asChild?: boolean;
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" |
|
|
6
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
7
7
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type ComplianceStatus = "verified" | "pending" | "changed_since_verified" | "never_verified";
|
|
4
|
+
interface ComplianceBadgeProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
|
+
status: ComplianceStatus;
|
|
6
|
+
variant?: "line" | "pill";
|
|
7
|
+
}
|
|
8
|
+
declare function ComplianceBadge({ status, variant, className, ...rest }: ComplianceBadgeProps): React.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { ComplianceBadge, type ComplianceBadgeProps, type ComplianceStatus };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
import { Check, Clock, AlertTriangle, Minus } from "lucide-react";
|
|
37
|
+
import { cn } from "../lib/utils.js";
|
|
38
|
+
const statusConfig = {
|
|
39
|
+
verified: {
|
|
40
|
+
line: { icon: Check, label: "Compliance verified", classes: "text-status-active-fg" },
|
|
41
|
+
pill: { icon: Check, label: "Verified", classes: "bg-status-active-bg text-status-active-fg" }
|
|
42
|
+
},
|
|
43
|
+
pending: {
|
|
44
|
+
line: { icon: Clock, label: "Pending compliance review", classes: "text-status-pending-fg" },
|
|
45
|
+
pill: { icon: AlertTriangle, label: "Pending review", classes: "bg-status-pending-bg text-status-pending-fg" }
|
|
46
|
+
},
|
|
47
|
+
changed_since_verified: {
|
|
48
|
+
line: { icon: AlertTriangle, label: "Changed since last verification", classes: "text-status-warning-fg" },
|
|
49
|
+
pill: { icon: AlertTriangle, label: "Changed", classes: "bg-status-warning-bg text-status-warning-fg" }
|
|
50
|
+
},
|
|
51
|
+
never_verified: {
|
|
52
|
+
line: { icon: Minus, label: "Never verified", classes: "text-muted-foreground" },
|
|
53
|
+
pill: { icon: Minus, label: "Never verified", classes: "bg-muted text-muted-foreground" }
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function ComplianceBadge(_a) {
|
|
57
|
+
var _b = _a, { status, variant = "line", className } = _b, rest = __objRest(_b, ["status", "variant", "className"]);
|
|
58
|
+
const config = statusConfig[status][variant];
|
|
59
|
+
const Icon = config.icon;
|
|
60
|
+
const iconSize = variant === "line" ? 12 : 10;
|
|
61
|
+
if (variant === "pill") {
|
|
62
|
+
return /* @__PURE__ */ jsxs(
|
|
63
|
+
"span",
|
|
64
|
+
__spreadProps(__spreadValues({
|
|
65
|
+
"data-slot": "compliance-badge",
|
|
66
|
+
"data-status": status,
|
|
67
|
+
"data-variant": "pill",
|
|
68
|
+
className: cn("text-[10px] px-2 py-0.5 rounded-full inline-flex w-fit items-center gap-1", config.classes, className)
|
|
69
|
+
}, rest), {
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Icon, { size: iconSize }),
|
|
72
|
+
/* @__PURE__ */ jsx("span", { children: config.label })
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ jsxs(
|
|
78
|
+
"div",
|
|
79
|
+
__spreadProps(__spreadValues({
|
|
80
|
+
"data-slot": "compliance-badge",
|
|
81
|
+
"data-status": status,
|
|
82
|
+
"data-variant": "line",
|
|
83
|
+
className: cn("text-xs inline-flex w-fit items-center gap-1.5", config.classes, className)
|
|
84
|
+
}, rest), {
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ jsx(Icon, { size: iconSize }),
|
|
87
|
+
/* @__PURE__ */ jsx("span", { children: config.label })
|
|
88
|
+
]
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
ComplianceBadge
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=compliance-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/compliance-badge.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Check, Clock, AlertTriangle, Minus } from \"lucide-react\"\n\nimport { cn } from \"../lib/utils\"\n\ntype ComplianceStatus = \"verified\" | \"pending\" | \"changed_since_verified\" | \"never_verified\"\n\ninterface ComplianceBadgeProps extends React.HTMLAttributes<HTMLElement> {\n status: ComplianceStatus\n variant?: \"line\" | \"pill\"\n}\n\nconst statusConfig = {\n verified: {\n line: { icon: Check, label: \"Compliance verified\", classes: \"text-status-active-fg\" },\n pill: { icon: Check, label: \"Verified\", classes: \"bg-status-active-bg text-status-active-fg\" },\n },\n pending: {\n line: { icon: Clock, label: \"Pending compliance review\", classes: \"text-status-pending-fg\" },\n pill: { icon: AlertTriangle, label: \"Pending review\", classes: \"bg-status-pending-bg text-status-pending-fg\" },\n },\n changed_since_verified: {\n line: { icon: AlertTriangle, label: \"Changed since last verification\", classes: \"text-status-warning-fg\" },\n pill: { icon: AlertTriangle, label: \"Changed\", classes: \"bg-status-warning-bg text-status-warning-fg\" },\n },\n never_verified: {\n line: { icon: Minus, label: \"Never verified\", classes: \"text-muted-foreground\" },\n pill: { icon: Minus, label: \"Never verified\", classes: \"bg-muted text-muted-foreground\" },\n },\n}\n\nfunction ComplianceBadge({ status, variant = \"line\", className, ...rest }: ComplianceBadgeProps) {\n const config = statusConfig[status][variant]\n const Icon = config.icon\n const iconSize = variant === \"line\" ? 12 : 10\n\n if (variant === \"pill\") {\n return (\n <span\n data-slot=\"compliance-badge\"\n data-status={status}\n data-variant=\"pill\"\n className={cn(\"text-[10px] px-2 py-0.5 rounded-full inline-flex w-fit items-center gap-1\", config.classes, className)}\n {...rest}\n >\n <Icon size={iconSize} />\n <span>{config.label}</span>\n </span>\n )\n }\n\n return (\n <div\n data-slot=\"compliance-badge\"\n data-status={status}\n data-variant=\"line\"\n className={cn(\"text-xs inline-flex w-fit items-center gap-1.5\", config.classes, className)}\n {...rest}\n >\n <Icon size={iconSize} />\n <span>{config.label}</span>\n </div>\n )\n}\n\nexport { ComplianceBadge, type ComplianceBadgeProps, type ComplianceStatus }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCM,SAOE,KAPF;AArCN,SAAS,OAAO,OAAO,eAAe,aAAa;AAEnD,SAAS,UAAU;AASnB,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,OAAO,OAAO,uBAAuB,SAAS,wBAAwB;AAAA,IACpF,MAAM,EAAE,MAAM,OAAO,OAAO,YAAY,SAAS,4CAA4C;AAAA,EAC/F;AAAA,EACA,SAAS;AAAA,IACP,MAAM,EAAE,MAAM,OAAO,OAAO,6BAA6B,SAAS,yBAAyB;AAAA,IAC3F,MAAM,EAAE,MAAM,eAAe,OAAO,kBAAkB,SAAS,8CAA8C;AAAA,EAC/G;AAAA,EACA,wBAAwB;AAAA,IACtB,MAAM,EAAE,MAAM,eAAe,OAAO,mCAAmC,SAAS,yBAAyB;AAAA,IACzG,MAAM,EAAE,MAAM,eAAe,OAAO,WAAW,SAAS,8CAA8C;AAAA,EACxG;AAAA,EACA,gBAAgB;AAAA,IACd,MAAM,EAAE,MAAM,OAAO,OAAO,kBAAkB,SAAS,wBAAwB;AAAA,IAC/E,MAAM,EAAE,MAAM,OAAO,OAAO,kBAAkB,SAAS,iCAAiC;AAAA,EAC1F;AACF;AAEA,SAAS,gBAAgB,IAAwE;AAAxE,eAAE,UAAQ,UAAU,QAAQ,UAjCrD,IAiCyB,IAA0C,iBAA1C,IAA0C,CAAxC,UAAQ,WAAkB;AACnD,QAAM,SAAS,aAAa,MAAM,EAAE,OAAO;AAC3C,QAAM,OAAO,OAAO;AACpB,QAAM,WAAW,YAAY,SAAS,KAAK;AAE3C,MAAI,YAAY,QAAQ;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,aAAU;AAAA,QACV,eAAa;AAAA,QACb,gBAAa;AAAA,QACb,WAAW,GAAG,6EAA6E,OAAO,SAAS,SAAS;AAAA,SAChH,OALL;AAAA,QAOC;AAAA,8BAAC,QAAK,MAAM,UAAU;AAAA,UACtB,oBAAC,UAAM,iBAAO,OAAM;AAAA;AAAA;AAAA,IACtB;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,eAAa;AAAA,MACb,gBAAa;AAAA,MACb,WAAW,GAAG,kDAAkD,OAAO,SAAS,SAAS;AAAA,OACrF,OALL;AAAA,MAOC;AAAA,4BAAC,QAAK,MAAM,UAAU;AAAA,QACtB,oBAAC,UAAM,iBAAO,OAAM;AAAA;AAAA;AAAA,EACtB;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ContactChipProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
name: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
verified?: boolean;
|
|
7
|
+
onConfirm?: () => void;
|
|
8
|
+
onRemove?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare function ContactChip({ name, email, verified, onConfirm, onRemove, className, ...rest }: ContactChipProps): React.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { ContactChip, type ContactChipProps };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
import { X } from "lucide-react";
|
|
37
|
+
import { cn } from "../lib/utils.js";
|
|
38
|
+
function ContactChip(_a) {
|
|
39
|
+
var _b = _a, {
|
|
40
|
+
name,
|
|
41
|
+
email,
|
|
42
|
+
verified = true,
|
|
43
|
+
onConfirm,
|
|
44
|
+
onRemove,
|
|
45
|
+
className
|
|
46
|
+
} = _b, rest = __objRest(_b, [
|
|
47
|
+
"name",
|
|
48
|
+
"email",
|
|
49
|
+
"verified",
|
|
50
|
+
"onConfirm",
|
|
51
|
+
"onRemove",
|
|
52
|
+
"className"
|
|
53
|
+
]);
|
|
54
|
+
const isVerified = verified !== false;
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
"span",
|
|
57
|
+
__spreadProps(__spreadValues({
|
|
58
|
+
"data-slot": "contact-chip",
|
|
59
|
+
"data-verified": isVerified ? "true" : "false",
|
|
60
|
+
className: cn(
|
|
61
|
+
"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs",
|
|
62
|
+
isVerified ? "border border-border bg-background" : "border border-status-warning-border bg-status-warning-bg",
|
|
63
|
+
className
|
|
64
|
+
)
|
|
65
|
+
}, rest), {
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: name }),
|
|
68
|
+
email && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: email }),
|
|
69
|
+
!isVerified && onConfirm && /* @__PURE__ */ jsx(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
type: "button",
|
|
73
|
+
"data-slot": "contact-chip-confirm",
|
|
74
|
+
onClick: onConfirm,
|
|
75
|
+
"aria-label": `Confirm ${name}`,
|
|
76
|
+
className: "text-[10px] px-1.5 py-0 rounded bg-status-warning-border/50 text-status-warning-fg hover:bg-status-warning-border cursor-pointer font-medium ml-1",
|
|
77
|
+
children: "Confirm"
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
onRemove && /* @__PURE__ */ jsx(
|
|
81
|
+
"button",
|
|
82
|
+
{
|
|
83
|
+
type: "button",
|
|
84
|
+
"data-slot": "contact-chip-remove",
|
|
85
|
+
onClick: onRemove,
|
|
86
|
+
"aria-label": `Remove ${name}`,
|
|
87
|
+
className: "inline-flex size-4 items-center justify-center rounded text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
88
|
+
children: /* @__PURE__ */ jsx(X, { size: 12 })
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
ContactChip
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=contact-chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/contact-chip.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"../lib/utils\"\n\ninterface ContactChipProps extends React.HTMLAttributes<HTMLSpanElement> {\n name: string\n email?: string\n verified?: boolean\n onConfirm?: () => void\n onRemove?: () => void\n}\n\nfunction ContactChip({\n name,\n email,\n verified = true,\n onConfirm,\n onRemove,\n className,\n ...rest\n}: ContactChipProps) {\n const isVerified = verified !== false\n\n return (\n <span\n data-slot=\"contact-chip\"\n data-verified={isVerified ? \"true\" : \"false\"}\n className={cn(\n \"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs\",\n isVerified\n ? \"border border-border bg-background\"\n : \"border border-status-warning-border bg-status-warning-bg\",\n className\n )}\n {...rest}\n >\n <span className=\"font-medium\">{name}</span>\n {email && <span className=\"text-muted-foreground\">{email}</span>}\n {!isVerified && onConfirm && (\n <button\n type=\"button\"\n data-slot=\"contact-chip-confirm\"\n onClick={onConfirm}\n aria-label={`Confirm ${name}`}\n className=\"text-[10px] px-1.5 py-0 rounded bg-status-warning-border/50 text-status-warning-fg hover:bg-status-warning-border cursor-pointer font-medium ml-1\"\n >\n Confirm\n </button>\n )}\n {onRemove && (\n <button\n type=\"button\"\n data-slot=\"contact-chip-remove\"\n onClick={onRemove}\n aria-label={`Remove ${name}`}\n className=\"inline-flex size-4 items-center justify-center rounded text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50\"\n >\n <X size={12} />\n </button>\n )}\n </span>\n )\n}\n\nexport { ContactChip, type ContactChipProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BI,SAYE,KAZF;AAxBJ,SAAS,SAAS;AAElB,SAAS,UAAU;AAUnB,SAAS,YAAY,IAQA;AARA,eACnB;AAAA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,EArBF,IAeqB,IAOhB,iBAPgB,IAOhB;AAAA,IANH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,aAAa,aAAa;AAEhC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,iBAAe,aAAa,SAAS;AAAA,MACrC,WAAW;AAAA,QACT;AAAA,QACA,aACI,uCACA;AAAA,QACJ;AAAA,MACF;AAAA,OACI,OAVL;AAAA,MAYC;AAAA,4BAAC,UAAK,WAAU,eAAe,gBAAK;AAAA,QACnC,SAAS,oBAAC,UAAK,WAAU,yBAAyB,iBAAM;AAAA,QACxD,CAAC,cAAc,aACd;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,aAAU;AAAA,YACV,SAAS;AAAA,YACT,cAAY,WAAW,IAAI;AAAA,YAC3B,WAAU;AAAA,YACX;AAAA;AAAA,QAED;AAAA,QAED,YACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,aAAU;AAAA,YACV,SAAS;AAAA,YACT,cAAY,UAAU,IAAI;AAAA,YAC1B,WAAU;AAAA,YAEV,8BAAC,KAAE,MAAM,IAAI;AAAA;AAAA,QACf;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
description: string;
|
|
7
|
+
action?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function EmptyState({ icon, title, description, action, className, ...rest }: EmptyStateProps): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { EmptyState, type EmptyStateProps };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import { cn } from "../lib/utils.js";
|
|
34
|
+
function EmptyState(_a) {
|
|
35
|
+
var _b = _a, { icon, title, description, action, className } = _b, rest = __objRest(_b, ["icon", "title", "description", "action", "className"]);
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ "data-slot": "empty-state", className: cn("flex flex-col items-center justify-center py-24 gap-3", className) }, rest), { children: [
|
|
37
|
+
icon && /* @__PURE__ */ jsx("div", { "data-slot": "empty-state-icon", className: "text-muted-foreground/30 [&>svg]:w-12 [&>svg]:h-12", children: icon }),
|
|
38
|
+
title && /* @__PURE__ */ jsx("p", { "data-slot": "empty-state-title", className: "text-sm font-medium text-muted-foreground", children: title }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", { "data-slot": "empty-state-description", className: "text-xs text-muted-foreground", children: description }),
|
|
40
|
+
action && /* @__PURE__ */ jsx("div", { "data-slot": "empty-state-action", className: "mt-3", children: action })
|
|
41
|
+
] }));
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
EmptyState
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=empty-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"../lib/utils\"\n\ninterface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {\n icon?: React.ReactNode\n title?: string\n description: string\n action?: React.ReactNode\n}\n\nfunction EmptyState({ icon, title, description, action, className, ...rest }: EmptyStateProps) {\n return (\n <div data-slot=\"empty-state\" className={cn(\"flex flex-col items-center justify-center py-24 gap-3\", className)} {...rest}>\n {icon && (\n <div data-slot=\"empty-state-icon\" className=\"text-muted-foreground/30 [&>svg]:w-12 [&>svg]:h-12\">\n {icon}\n </div>\n )}\n {title && (\n <p data-slot=\"empty-state-title\" className=\"text-sm font-medium text-muted-foreground\">\n {title}\n </p>\n )}\n <p data-slot=\"empty-state-description\" className=\"text-xs text-muted-foreground\">\n {description}\n </p>\n {action && (\n <div data-slot=\"empty-state-action\" className=\"mt-3\">\n {action}\n </div>\n )}\n </div>\n )\n}\n\nexport { EmptyState, type EmptyStateProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaI,SAEI,KAFJ;AAXJ,SAAS,UAAU;AASnB,SAAS,WAAW,IAA2E;AAA3E,eAAE,QAAM,OAAO,aAAa,QAAQ,UAXxD,IAWoB,IAAkD,iBAAlD,IAAkD,CAAhD,QAAM,SAAO,eAAa,UAAQ;AACtD,SACE,qBAAC,sCAAI,aAAU,eAAc,WAAW,GAAG,yDAAyD,SAAS,KAAO,OAAnH,EACE;AAAA,YACC,oBAAC,SAAI,aAAU,oBAAmB,WAAU,sDACzC,gBACH;AAAA,IAED,SACC,oBAAC,OAAE,aAAU,qBAAoB,WAAU,6CACxC,iBACH;AAAA,IAEF,oBAAC,OAAE,aAAU,2BAA0B,WAAU,iCAC9C,uBACH;AAAA,IACC,UACC,oBAAC,SAAI,aAAU,sBAAqB,WAAU,QAC3C,kBACH;AAAA,MAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface FilterChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function FilterChip({ icon, children, onClick, active, className, ...rest }: FilterChipProps): React.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { FilterChip, type FilterChipProps };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
import { Filter, ChevronDown } from "lucide-react";
|
|
37
|
+
import { cn } from "../lib/utils.js";
|
|
38
|
+
function FilterChip(_a) {
|
|
39
|
+
var _b = _a, { icon, children, onClick, active, className } = _b, rest = __objRest(_b, ["icon", "children", "onClick", "active", "className"]);
|
|
40
|
+
return /* @__PURE__ */ jsxs(
|
|
41
|
+
"button",
|
|
42
|
+
__spreadProps(__spreadValues({
|
|
43
|
+
type: "button",
|
|
44
|
+
"data-slot": "filter-chip",
|
|
45
|
+
"data-active": active ? "" : void 0,
|
|
46
|
+
"aria-pressed": active,
|
|
47
|
+
onClick,
|
|
48
|
+
className: cn(
|
|
49
|
+
"text-[11px] px-2.5 py-1 rounded-md border border-border",
|
|
50
|
+
"text-muted-foreground hover:bg-muted/30 cursor-pointer",
|
|
51
|
+
"inline-flex items-center gap-1.5 transition-colors",
|
|
52
|
+
"data-[active]:border-foreground/20 data-[active]:text-foreground",
|
|
53
|
+
className
|
|
54
|
+
)
|
|
55
|
+
}, rest), {
|
|
56
|
+
children: [
|
|
57
|
+
icon != null ? icon : /* @__PURE__ */ jsx(Filter, { size: 10 }),
|
|
58
|
+
children,
|
|
59
|
+
/* @__PURE__ */ jsx(ChevronDown, { size: 10 })
|
|
60
|
+
]
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
FilterChip
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=filter-chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/filter-chip.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Filter, ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"../lib/utils\"\n\ninterface FilterChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n icon?: React.ReactNode\n active?: boolean\n}\n\nfunction FilterChip({ icon, children, onClick, active, className, ...rest }: FilterChipProps) {\n return (\n <button\n type=\"button\"\n data-slot=\"filter-chip\"\n data-active={active ? \"\" : undefined}\n aria-pressed={active}\n onClick={onClick}\n className={cn(\n \"text-[11px] px-2.5 py-1 rounded-md border border-border\",\n \"text-muted-foreground hover:bg-muted/30 cursor-pointer\",\n \"inline-flex items-center gap-1.5 transition-colors\",\n \"data-[active]:border-foreground/20 data-[active]:text-foreground\",\n className\n )}\n {...rest}\n >\n {icon ?? <Filter size={10} />}\n {children}\n <ChevronDown size={10} />\n </button>\n )\n}\n\nexport { FilterChip, type FilterChipProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcI,SAeW,KAfX;AAXJ,SAAS,QAAQ,mBAAmB;AAEpC,SAAS,UAAU;AAOnB,SAAS,WAAW,IAA0E;AAA1E,eAAE,QAAM,UAAU,SAAS,QAAQ,UAZvD,IAYoB,IAAiD,iBAAjD,IAAiD,CAA/C,QAAM,YAAU,WAAS,UAAQ;AACrD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,eAAa,SAAS,KAAK;AAAA,MAC3B,gBAAc;AAAA,MACd;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,OACI,OAbL;AAAA,MAeE;AAAA,8BAAQ,oBAAC,UAAO,MAAM,IAAI;AAAA,QAC1B;AAAA,QACD,oBAAC,eAAY,MAAM,IAAI;AAAA;AAAA;AAAA,EACzB;AAEJ;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface InlineBannerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
variant?: "info" | "warning" | "destructive";
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
onDismiss?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function InlineBanner({ variant, icon, children, onDismiss, className, ...rest }: InlineBannerProps): React.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { InlineBanner, type InlineBannerProps };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
import { Info, AlertTriangle, ShieldAlert, X } from "lucide-react";
|
|
37
|
+
import { cn } from "../lib/utils.js";
|
|
38
|
+
const variantConfig = {
|
|
39
|
+
info: {
|
|
40
|
+
icon: Info,
|
|
41
|
+
classes: "bg-status-info-bg border-status-info-border text-status-info-fg"
|
|
42
|
+
},
|
|
43
|
+
warning: {
|
|
44
|
+
icon: AlertTriangle,
|
|
45
|
+
classes: "bg-status-warning-bg border-status-warning-border text-status-warning-fg"
|
|
46
|
+
},
|
|
47
|
+
destructive: {
|
|
48
|
+
icon: ShieldAlert,
|
|
49
|
+
classes: "bg-status-destructive-bg border-status-destructive-border text-status-destructive-fg"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
function InlineBanner(_a) {
|
|
53
|
+
var _b = _a, {
|
|
54
|
+
variant = "warning",
|
|
55
|
+
icon,
|
|
56
|
+
children,
|
|
57
|
+
onDismiss,
|
|
58
|
+
className
|
|
59
|
+
} = _b, rest = __objRest(_b, [
|
|
60
|
+
"variant",
|
|
61
|
+
"icon",
|
|
62
|
+
"children",
|
|
63
|
+
"onDismiss",
|
|
64
|
+
"className"
|
|
65
|
+
]);
|
|
66
|
+
const config = variantConfig[variant];
|
|
67
|
+
const DefaultIcon = config.icon;
|
|
68
|
+
return /* @__PURE__ */ jsxs(
|
|
69
|
+
"div",
|
|
70
|
+
__spreadProps(__spreadValues({
|
|
71
|
+
"data-slot": "inline-banner",
|
|
72
|
+
"data-variant": variant,
|
|
73
|
+
role: variant === "destructive" || variant === "warning" ? "alert" : "status",
|
|
74
|
+
className: cn("rounded-lg border px-3 py-2 flex items-center gap-2", config.classes, className)
|
|
75
|
+
}, rest), {
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "inline-banner-icon", className: "shrink-0", children: icon != null ? icon : /* @__PURE__ */ jsx(DefaultIcon, { size: 14 }) }),
|
|
78
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "inline-banner-content", className: "flex-1 min-w-0", children }),
|
|
79
|
+
onDismiss && /* @__PURE__ */ jsx(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
"aria-label": "Dismiss",
|
|
84
|
+
"data-slot": "inline-banner-dismiss",
|
|
85
|
+
onClick: onDismiss,
|
|
86
|
+
className: "shrink-0 p-0.5 rounded hover:bg-black/5 transition-colors",
|
|
87
|
+
children: /* @__PURE__ */ jsx(X, { size: 14, className: "opacity-60" })
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
InlineBanner
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=inline-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/inline-banner.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Info, AlertTriangle, ShieldAlert, X } from \"lucide-react\"\n\nimport { cn } from \"../lib/utils\"\n\ninterface InlineBannerProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"info\" | \"warning\" | \"destructive\"\n icon?: React.ReactNode\n onDismiss?: () => void\n}\n\nconst variantConfig = {\n info: {\n icon: Info,\n classes: \"bg-status-info-bg border-status-info-border text-status-info-fg\",\n },\n warning: {\n icon: AlertTriangle,\n classes: \"bg-status-warning-bg border-status-warning-border text-status-warning-fg\",\n },\n destructive: {\n icon: ShieldAlert,\n classes: \"bg-status-destructive-bg border-status-destructive-border text-status-destructive-fg\",\n },\n}\n\nfunction InlineBanner({\n variant = \"warning\",\n icon,\n children,\n onDismiss,\n className,\n ...rest\n}: InlineBannerProps) {\n const config = variantConfig[variant]\n const DefaultIcon = config.icon\n\n return (\n <div\n data-slot=\"inline-banner\"\n data-variant={variant}\n role={variant === \"destructive\" || variant === \"warning\" ? \"alert\" : \"status\"}\n className={cn(\"rounded-lg border px-3 py-2 flex items-center gap-2\", config.classes, className)}\n {...rest}\n >\n <span data-slot=\"inline-banner-icon\" className=\"shrink-0\">\n {icon ?? <DefaultIcon size={14} />}\n </span>\n <div data-slot=\"inline-banner-content\" className=\"flex-1 min-w-0\">\n {children}\n </div>\n {onDismiss && (\n <button\n type=\"button\"\n aria-label=\"Dismiss\"\n data-slot=\"inline-banner-dismiss\"\n onClick={onDismiss}\n className=\"shrink-0 p-0.5 rounded hover:bg-black/5 transition-colors\"\n >\n <X size={14} className=\"opacity-60\" />\n </button>\n )}\n </div>\n )\n}\n\nexport { InlineBanner, type InlineBannerProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCI,SAQa,KARb;AArCJ,SAAS,MAAM,eAAe,aAAa,SAAS;AAEpD,SAAS,UAAU;AAQnB,MAAM,gBAAgB;AAAA,EACpB,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF;AAEA,SAAS,aAAa,IAOA;AAPA,eACpB;AAAA,cAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAjCF,IA4BsB,IAMjB,iBANiB,IAMjB;AAAA,IALH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,SAAS,cAAc,OAAO;AACpC,QAAM,cAAc,OAAO;AAE3B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,gBAAc;AAAA,MACd,MAAM,YAAY,iBAAiB,YAAY,YAAY,UAAU;AAAA,MACrE,WAAW,GAAG,uDAAuD,OAAO,SAAS,SAAS;AAAA,OAC1F,OALL;AAAA,MAOC;AAAA,4BAAC,UAAK,aAAU,sBAAqB,WAAU,YAC5C,gCAAQ,oBAAC,eAAY,MAAM,IAAI,GAClC;AAAA,QACA,oBAAC,SAAI,aAAU,yBAAwB,WAAU,kBAC9C,UACH;AAAA,QACC,aACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,cAAW;AAAA,YACX,aAAU;AAAA,YACV,SAAS;AAAA,YACT,WAAU;AAAA,YAEV,8BAAC,KAAE,MAAM,IAAI,WAAU,cAAa;AAAA;AAAA,QACtC;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
import { jsx } from "react/jsx-runtime";
|
|
30
|
+
import { cn } from "../lib/utils.js";
|
|
31
|
+
function KbdHint(_a) {
|
|
32
|
+
var _b = _a, {
|
|
33
|
+
className
|
|
34
|
+
} = _b, props = __objRest(_b, [
|
|
35
|
+
"className"
|
|
36
|
+
]);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"kbd",
|
|
39
|
+
__spreadValues({
|
|
40
|
+
"data-slot": "kbd-hint",
|
|
41
|
+
className: cn(
|
|
42
|
+
"inline-block text-[10px] leading-none text-muted-foreground/40 font-sans",
|
|
43
|
+
className
|
|
44
|
+
)
|
|
45
|
+
}, props)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
KbdHint
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=kbd-hint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/kbd-hint.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"../lib/utils\"\n\nfunction KbdHint({\n className,\n ...props\n}: React.ComponentProps<\"kbd\">) {\n return (\n <kbd\n data-slot=\"kbd-hint\"\n className={cn(\n \"inline-block text-[10px] leading-none text-muted-foreground/40 font-sans\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { KbdHint }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AASI;AAPJ,SAAS,UAAU;AAEnB,SAAS,QAAQ,IAGe;AAHf,eACf;AAAA;AAAA,EALF,IAIiB,IAEZ,kBAFY,IAEZ;AAAA,IADH;AAAA;AAGA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type RichTextAction = "undo" | "redo" | "font" | "bold" | "italic" | "underline" | "align" | "list" | "delete";
|
|
4
|
+
interface RichTextToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
onAction?: (action: RichTextAction) => void;
|
|
6
|
+
}
|
|
7
|
+
declare function RichTextToolbar({ onAction, className, ...rest }: RichTextToolbarProps): React.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { type RichTextAction, RichTextToolbar, type RichTextToolbarProps };
|