@karakuri-ui/react 0.2.3 → 0.2.4
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/README.md +0 -1
- package/dist/components/ui/accordion.d.mts +49 -0
- package/dist/components/ui/accordion.d.ts +49 -0
- package/dist/components/ui/accordion.js +220 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/accordion.mjs +181 -0
- package/dist/components/ui/accordion.mjs.map +1 -0
- package/dist/components/ui/alert.d.mts +47 -0
- package/dist/components/ui/alert.d.ts +47 -0
- package/dist/components/ui/alert.js +223 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/alert.mjs +185 -0
- package/dist/components/ui/alert.mjs.map +1 -0
- package/dist/components/ui/avatar.d.mts +232 -0
- package/dist/components/ui/avatar.d.ts +232 -0
- package/dist/components/ui/avatar.js +250 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/avatar.mjs +209 -0
- package/dist/components/ui/avatar.mjs.map +1 -0
- package/dist/components/ui/badge.d.mts +31 -0
- package/dist/components/ui/badge.d.ts +31 -0
- package/dist/components/ui/badge.js +205 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/badge.mjs +170 -0
- package/dist/components/ui/badge.mjs.map +1 -0
- package/dist/components/ui/breadcrumb.d.mts +57 -0
- package/dist/components/ui/breadcrumb.d.ts +57 -0
- package/dist/components/ui/breadcrumb.js +209 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/breadcrumb.mjs +168 -0
- package/dist/components/ui/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/button-group.d.mts +22 -0
- package/dist/components/ui/button-group.d.ts +22 -0
- package/dist/components/ui/button-group.js +107 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button-group.mjs +72 -0
- package/dist/components/ui/button-group.mjs.map +1 -0
- package/dist/components/ui/button.d.mts +31 -0
- package/dist/components/ui/button.d.ts +31 -0
- package/dist/components/ui/button.js +176 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/button.mjs +141 -0
- package/dist/components/ui/button.mjs.map +1 -0
- package/dist/components/ui/card.d.mts +77 -0
- package/dist/components/ui/card.d.ts +77 -0
- package/dist/components/ui/card.js +370 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/card.mjs +328 -0
- package/dist/components/ui/card.mjs.map +1 -0
- package/dist/{chart.js → components/ui/chart.js} +29 -39
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/{chart.mjs → components/ui/chart.mjs} +21 -31
- package/dist/components/ui/chart.mjs.map +1 -0
- package/dist/components/ui/checkbox.d.mts +24 -0
- package/dist/components/ui/checkbox.d.ts +24 -0
- package/dist/components/ui/checkbox.js +173 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/checkbox.mjs +138 -0
- package/dist/components/ui/checkbox.mjs.map +1 -0
- package/dist/components/ui/divider.d.mts +27 -0
- package/dist/components/ui/divider.d.ts +27 -0
- package/dist/components/ui/divider.js +147 -0
- package/dist/components/ui/divider.js.map +1 -0
- package/dist/components/ui/divider.mjs +112 -0
- package/dist/components/ui/divider.mjs.map +1 -0
- package/dist/components/ui/drawer.d.mts +51 -0
- package/dist/components/ui/drawer.d.ts +51 -0
- package/dist/components/ui/drawer.js +225 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/drawer.mjs +178 -0
- package/dist/components/ui/drawer.mjs.map +1 -0
- package/dist/components/ui/dropdown.d.mts +59 -0
- package/dist/components/ui/dropdown.d.ts +59 -0
- package/dist/components/ui/dropdown.js +310 -0
- package/dist/components/ui/dropdown.js.map +1 -0
- package/dist/components/ui/dropdown.mjs +263 -0
- package/dist/components/ui/dropdown.mjs.map +1 -0
- package/dist/components/ui/field.d.mts +33 -0
- package/dist/components/ui/field.d.ts +33 -0
- package/dist/components/ui/field.js +146 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/field.mjs +108 -0
- package/dist/components/ui/field.mjs.map +1 -0
- package/dist/components/ui/icon-button.d.mts +20 -0
- package/dist/components/ui/icon-button.d.ts +20 -0
- package/dist/components/ui/icon-button.js +147 -0
- package/dist/components/ui/icon-button.js.map +1 -0
- package/dist/components/ui/icon-button.mjs +112 -0
- package/dist/components/ui/icon-button.mjs.map +1 -0
- package/dist/components/ui/index.d.mts +55 -0
- package/dist/components/ui/index.d.ts +55 -0
- package/dist/components/ui/index.js +476 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/index.mjs +246 -0
- package/dist/components/ui/index.mjs.map +1 -0
- package/dist/components/ui/input.d.mts +20 -0
- package/dist/components/ui/input.d.ts +20 -0
- package/dist/components/ui/input.js +250 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/input.mjs +215 -0
- package/dist/components/ui/input.mjs.map +1 -0
- package/dist/components/ui/metric-card.d.mts +53 -0
- package/dist/components/ui/metric-card.d.ts +53 -0
- package/dist/components/ui/metric-card.js +258 -0
- package/dist/components/ui/metric-card.js.map +1 -0
- package/dist/components/ui/metric-card.mjs +217 -0
- package/dist/components/ui/metric-card.mjs.map +1 -0
- package/dist/components/ui/modal.d.mts +77 -0
- package/dist/components/ui/modal.d.ts +77 -0
- package/dist/components/ui/modal.js +396 -0
- package/dist/components/ui/modal.js.map +1 -0
- package/dist/components/ui/modal.mjs +338 -0
- package/dist/components/ui/modal.mjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.mts +139 -0
- package/dist/components/ui/navigation-menu.d.ts +139 -0
- package/dist/components/ui/navigation-menu.js +531 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/navigation-menu.mjs +488 -0
- package/dist/components/ui/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/pagination.d.mts +130 -0
- package/dist/components/ui/pagination.d.ts +130 -0
- package/dist/components/ui/pagination.js +495 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/pagination.mjs +449 -0
- package/dist/components/ui/pagination.mjs.map +1 -0
- package/dist/components/ui/popover.d.mts +41 -0
- package/dist/components/ui/popover.d.ts +41 -0
- package/dist/components/ui/popover.js +175 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/popover.mjs +133 -0
- package/dist/components/ui/popover.mjs.map +1 -0
- package/dist/components/ui/progress.d.mts +35 -0
- package/dist/components/ui/progress.d.ts +35 -0
- package/dist/components/ui/progress.js +194 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/progress.mjs +159 -0
- package/dist/components/ui/progress.mjs.map +1 -0
- package/dist/components/ui/radio-group.d.mts +40 -0
- package/dist/components/ui/radio-group.d.ts +40 -0
- package/dist/components/ui/radio-group.js +177 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/radio-group.mjs +140 -0
- package/dist/components/ui/radio-group.mjs.map +1 -0
- package/dist/components/ui/segmented.d.mts +30 -0
- package/dist/components/ui/segmented.d.ts +30 -0
- package/dist/components/ui/segmented.js +241 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/segmented.mjs +204 -0
- package/dist/components/ui/segmented.mjs.map +1 -0
- package/dist/components/ui/select.d.mts +31 -0
- package/dist/components/ui/select.d.ts +31 -0
- package/dist/components/ui/select.js +317 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/select.mjs +276 -0
- package/dist/components/ui/select.mjs.map +1 -0
- package/dist/components/ui/skeleton.d.mts +26 -0
- package/dist/components/ui/skeleton.d.ts +26 -0
- package/dist/components/ui/skeleton.js +144 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/skeleton.mjs +109 -0
- package/dist/components/ui/skeleton.mjs.map +1 -0
- package/dist/components/ui/slider.d.mts +38 -0
- package/dist/components/ui/slider.d.ts +38 -0
- package/dist/components/ui/slider.js +180 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/slider.mjs +145 -0
- package/dist/components/ui/slider.mjs.map +1 -0
- package/dist/components/ui/spinner.d.mts +23 -0
- package/dist/components/ui/spinner.d.ts +23 -0
- package/dist/components/ui/spinner.js +471 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/spinner.mjs +436 -0
- package/dist/components/ui/spinner.mjs.map +1 -0
- package/dist/components/ui/switch.d.mts +22 -0
- package/dist/components/ui/switch.d.ts +22 -0
- package/dist/components/ui/switch.js +173 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/switch.mjs +138 -0
- package/dist/components/ui/switch.mjs.map +1 -0
- package/dist/components/ui/table.d.mts +74 -0
- package/dist/components/ui/table.d.ts +74 -0
- package/dist/components/ui/table.js +240 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/table.mjs +199 -0
- package/dist/components/ui/table.mjs.map +1 -0
- package/dist/components/ui/tabs.d.mts +40 -0
- package/dist/components/ui/tabs.d.ts +40 -0
- package/dist/components/ui/tabs.js +238 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/tabs.mjs +199 -0
- package/dist/components/ui/tabs.mjs.map +1 -0
- package/dist/components/ui/textarea.d.mts +19 -0
- package/dist/components/ui/textarea.d.ts +19 -0
- package/dist/components/ui/textarea.js +181 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/textarea.mjs +146 -0
- package/dist/components/ui/textarea.mjs.map +1 -0
- package/dist/components/ui/toast.d.mts +93 -0
- package/dist/components/ui/toast.d.ts +93 -0
- package/dist/components/ui/toast.js +429 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toast.mjs +393 -0
- package/dist/components/ui/toast.mjs.map +1 -0
- package/dist/components/ui/toggle-group.d.mts +47 -0
- package/dist/components/ui/toggle-group.d.ts +47 -0
- package/dist/components/ui/toggle-group.js +186 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle-group.mjs +149 -0
- package/dist/components/ui/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggle.d.mts +19 -0
- package/dist/components/ui/toggle.d.ts +19 -0
- package/dist/components/ui/toggle.js +194 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/toggle.mjs +159 -0
- package/dist/components/ui/toggle.mjs.map +1 -0
- package/dist/components/ui/tooltip.d.mts +37 -0
- package/dist/components/ui/tooltip.d.ts +37 -0
- package/dist/components/ui/tooltip.js +137 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/tooltip.mjs +96 -0
- package/dist/components/ui/tooltip.mjs.map +1 -0
- package/dist/lib/utils.d.mts +10 -0
- package/dist/lib/utils.d.ts +10 -0
- package/dist/lib/utils.js +33 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +9 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/package.json +11 -11
- package/dist/chart.js.map +0 -1
- package/dist/chart.mjs.map +0 -1
- package/dist/index.d.mts +0 -1636
- package/dist/index.d.ts +0 -1636
- package/dist/index.js +0 -7291
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -7048
- package/dist/index.mjs.map +0 -1
- /package/dist/{chart.d.mts → components/ui/chart.d.mts} +0 -0
- /package/dist/{chart.d.ts → components/ui/chart.d.ts} +0 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var alert_exports = {};
|
|
31
|
+
__export(alert_exports, {
|
|
32
|
+
Alert: () => Alert,
|
|
33
|
+
AlertDescription: () => AlertDescription,
|
|
34
|
+
AlertRoot: () => AlertRoot,
|
|
35
|
+
AlertTitle: () => AlertTitle,
|
|
36
|
+
alertVariants: () => alertVariants
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(alert_exports);
|
|
39
|
+
var React = __toESM(require("react"));
|
|
40
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
41
|
+
var import_utils = require("../../lib/utils");
|
|
42
|
+
const InfoIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("path", { d: "M12 16v-4" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8h.01" }));
|
|
43
|
+
const SuccessIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("path", { d: "m9 12 2 2 4-4" }));
|
|
44
|
+
const WarningIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }), /* @__PURE__ */ React.createElement("path", { d: "M12 9v4" }), /* @__PURE__ */ React.createElement("path", { d: "M12 17h.01" }));
|
|
45
|
+
const ErrorIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8v5" }), /* @__PURE__ */ React.createElement("path", { d: "M12 16h.01" }));
|
|
46
|
+
const DefaultCloseIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }));
|
|
47
|
+
const STATUS_ICONS = {
|
|
48
|
+
info: InfoIcon,
|
|
49
|
+
success: SuccessIcon,
|
|
50
|
+
warning: WarningIcon,
|
|
51
|
+
error: ErrorIcon
|
|
52
|
+
};
|
|
53
|
+
const colorMap = {
|
|
54
|
+
info: {
|
|
55
|
+
default: "bg-info-tint text-text-info border-info/20",
|
|
56
|
+
outline: "bg-transparent text-text-info border-info",
|
|
57
|
+
filled: "bg-info text-info-foreground border-transparent"
|
|
58
|
+
},
|
|
59
|
+
success: {
|
|
60
|
+
default: "bg-success-tint text-text-success border-success/20",
|
|
61
|
+
outline: "bg-transparent text-text-success border-success",
|
|
62
|
+
filled: "bg-success text-success-foreground border-transparent"
|
|
63
|
+
},
|
|
64
|
+
warning: {
|
|
65
|
+
default: "bg-warning-tint text-text-warning border-warning/20",
|
|
66
|
+
outline: "bg-transparent text-text-warning border-warning",
|
|
67
|
+
filled: "bg-warning text-warning-foreground border-transparent"
|
|
68
|
+
},
|
|
69
|
+
error: {
|
|
70
|
+
default: "bg-error-tint text-text-error border-error/20",
|
|
71
|
+
outline: "bg-transparent text-text-error border-error",
|
|
72
|
+
filled: "bg-error text-error-foreground border-transparent"
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const alertVariants = (0, import_class_variance_authority.cva)(
|
|
76
|
+
"group relative flex items-center border w-full [&:has([data-alert-description])]:items-start",
|
|
77
|
+
{
|
|
78
|
+
variants: {
|
|
79
|
+
size: {
|
|
80
|
+
sm: "gap-2 p-3 text-sm",
|
|
81
|
+
default: "gap-2.5 p-4 text-md",
|
|
82
|
+
lg: "gap-3 p-5 text-md"
|
|
83
|
+
},
|
|
84
|
+
radius: {
|
|
85
|
+
none: "rounded-none",
|
|
86
|
+
sm: "rounded-sm",
|
|
87
|
+
base: "rounded",
|
|
88
|
+
md: "rounded-md",
|
|
89
|
+
lg: "rounded-lg",
|
|
90
|
+
xl: "rounded-xl",
|
|
91
|
+
"2xl": "rounded-2xl",
|
|
92
|
+
"3xl": "rounded-3xl",
|
|
93
|
+
full: "rounded-full"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
defaultVariants: {
|
|
97
|
+
size: "default",
|
|
98
|
+
radius: "lg"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
const ICON_SIZE_MAP = {
|
|
103
|
+
sm: "icon-sm",
|
|
104
|
+
// 16px
|
|
105
|
+
default: "w-[18px] h-[18px]",
|
|
106
|
+
// 18px — TOKEN-EXCEPTION: no 18px icon token
|
|
107
|
+
lg: "icon-md"
|
|
108
|
+
// 20px
|
|
109
|
+
};
|
|
110
|
+
const TITLE_SIZE_MAP = {
|
|
111
|
+
sm: "text-sm font-semibold leading-4 tracking-tight",
|
|
112
|
+
default: "font-semibold leading-[18px] tracking-tight",
|
|
113
|
+
lg: "text-base font-semibold leading-5 tracking-tight"
|
|
114
|
+
};
|
|
115
|
+
const DESC_SIZE_MAP = {
|
|
116
|
+
sm: "text-xs mt-0.5",
|
|
117
|
+
default: "text-sm mt-1",
|
|
118
|
+
lg: "text-md mt-1.5"
|
|
119
|
+
};
|
|
120
|
+
const AlertContext = React.createContext({
|
|
121
|
+
variant: "default",
|
|
122
|
+
color: "info",
|
|
123
|
+
size: "default"
|
|
124
|
+
});
|
|
125
|
+
function useAlertContext() {
|
|
126
|
+
return React.useContext(AlertContext);
|
|
127
|
+
}
|
|
128
|
+
const AlertRoot = React.forwardRef(
|
|
129
|
+
({
|
|
130
|
+
className,
|
|
131
|
+
variant = "default",
|
|
132
|
+
color = "info",
|
|
133
|
+
size = "default",
|
|
134
|
+
radius,
|
|
135
|
+
closable = false,
|
|
136
|
+
onClose,
|
|
137
|
+
closeIcon,
|
|
138
|
+
icon,
|
|
139
|
+
hideIcon = false,
|
|
140
|
+
children,
|
|
141
|
+
...props
|
|
142
|
+
}, ref) => {
|
|
143
|
+
const role = color === "error" ? "alert" : "status";
|
|
144
|
+
const colorClasses = colorMap[color][variant];
|
|
145
|
+
const StatusIcon = STATUS_ICONS[color];
|
|
146
|
+
return /* @__PURE__ */ React.createElement(AlertContext.Provider, { value: { variant, color, size } }, /* @__PURE__ */ React.createElement(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
ref,
|
|
150
|
+
role,
|
|
151
|
+
className: (0, import_utils.cn)(
|
|
152
|
+
alertVariants({ size, radius }),
|
|
153
|
+
colorClasses,
|
|
154
|
+
className
|
|
155
|
+
),
|
|
156
|
+
...props
|
|
157
|
+
},
|
|
158
|
+
!hideIcon && /* @__PURE__ */ React.createElement("span", { className: "shrink-0" }, icon || /* @__PURE__ */ React.createElement(StatusIcon, { className: ICON_SIZE_MAP[size] })),
|
|
159
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex-1 min-w-0" }, children),
|
|
160
|
+
closable && /* @__PURE__ */ React.createElement(
|
|
161
|
+
"button",
|
|
162
|
+
{
|
|
163
|
+
type: "button",
|
|
164
|
+
className: (0, import_utils.cn)(
|
|
165
|
+
"shrink-0 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus-visible:focus-ring",
|
|
166
|
+
"group-has-[[data-alert-description]]:absolute",
|
|
167
|
+
size === "sm" ? "group-has-[[data-alert-description]]:top-2 group-has-[[data-alert-description]]:right-2" : "group-has-[[data-alert-description]]:top-3 group-has-[[data-alert-description]]:right-3"
|
|
168
|
+
),
|
|
169
|
+
onClick: onClose,
|
|
170
|
+
"aria-label": "Close"
|
|
171
|
+
},
|
|
172
|
+
closeIcon || /* @__PURE__ */ React.createElement(DefaultCloseIcon, { className: "icon-sm" })
|
|
173
|
+
)
|
|
174
|
+
));
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
AlertRoot.displayName = "AlertRoot";
|
|
178
|
+
const AlertTitle = React.forwardRef(
|
|
179
|
+
({ className, ...props }, ref) => {
|
|
180
|
+
const { size } = useAlertContext();
|
|
181
|
+
return /* @__PURE__ */ React.createElement(
|
|
182
|
+
"h5",
|
|
183
|
+
{
|
|
184
|
+
ref,
|
|
185
|
+
className: (0, import_utils.cn)(TITLE_SIZE_MAP[size], className),
|
|
186
|
+
...props
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
AlertTitle.displayName = "AlertTitle";
|
|
192
|
+
const AlertDescription = React.forwardRef(
|
|
193
|
+
({ className, ...props }, ref) => {
|
|
194
|
+
const { variant, size } = useAlertContext();
|
|
195
|
+
return /* @__PURE__ */ React.createElement(
|
|
196
|
+
"p",
|
|
197
|
+
{
|
|
198
|
+
ref,
|
|
199
|
+
"data-alert-description": "",
|
|
200
|
+
className: (0, import_utils.cn)(
|
|
201
|
+
DESC_SIZE_MAP[size],
|
|
202
|
+
variant === "filled" ? "opacity-90" : "opacity-80",
|
|
203
|
+
className
|
|
204
|
+
),
|
|
205
|
+
...props
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
AlertDescription.displayName = "AlertDescription";
|
|
211
|
+
const Alert = Object.assign(AlertRoot, {
|
|
212
|
+
Title: AlertTitle,
|
|
213
|
+
Description: AlertDescription
|
|
214
|
+
});
|
|
215
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
216
|
+
0 && (module.exports = {
|
|
217
|
+
Alert,
|
|
218
|
+
AlertDescription,
|
|
219
|
+
AlertRoot,
|
|
220
|
+
AlertTitle,
|
|
221
|
+
alertVariants
|
|
222
|
+
});
|
|
223
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/alert.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\n// ─── Built-in status icons (no external dependency) ──────────────\n// All icons: Lucide-compatible 24×24 viewBox, strokeWidth=2, rounded caps/joins\n// Info = circle + \"i\" | Success = circle + check | Warning = triangle + \"!\" | Error = circle + small ×\nconst InfoIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n)\n\nconst SuccessIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n)\n\nconst WarningIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n)\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 8v5\" />\n <path d=\"M12 16h.01\" />\n </svg>\n)\n\nconst DefaultCloseIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n)\n\n// ─── Status icon mapping ─────────────────────────────────────────\nconst STATUS_ICONS: Record<AlertColor, React.FC<{ className?: string }>> = {\n info: InfoIcon,\n success: SuccessIcon,\n warning: WarningIcon,\n error: ErrorIcon,\n}\n\n// ─── Color × Variant class mapping ──────────────────────────────\n// Uses semantic tokens (*.tint, text-text-*) — same pattern as Badge\nconst colorMap = {\n info: {\n default: 'bg-info-tint text-text-info border-info/20',\n outline: 'bg-transparent text-text-info border-info',\n filled: 'bg-info text-info-foreground border-transparent',\n },\n success: {\n default: 'bg-success-tint text-text-success border-success/20',\n outline: 'bg-transparent text-text-success border-success',\n filled: 'bg-success text-success-foreground border-transparent',\n },\n warning: {\n default: 'bg-warning-tint text-text-warning border-warning/20',\n outline: 'bg-transparent text-text-warning border-warning',\n filled: 'bg-warning text-warning-foreground border-transparent',\n },\n error: {\n default: 'bg-error-tint text-text-error border-error/20',\n outline: 'bg-transparent text-text-error border-error',\n filled: 'bg-error text-error-foreground border-transparent',\n },\n} as const\n\n// ─── Alert variants ──────────────────────────────────────────────\nconst alertVariants = cva(\n 'group relative flex items-center border w-full [&:has([data-alert-description])]:items-start',\n {\n variants: {\n size: {\n sm: 'gap-2 p-3 text-sm',\n default: 'gap-2.5 p-4 text-md',\n lg: 'gap-3 p-5 text-md',\n },\n radius: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n base: 'rounded',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n },\n defaultVariants: {\n size: 'default',\n radius: 'lg',\n },\n }\n)\n\n// ─── Size-dependent class maps ──────────────────────────────────\nconst ICON_SIZE_MAP = {\n sm: 'icon-sm', // 16px\n default: 'w-[18px] h-[18px]', // 18px — TOKEN-EXCEPTION: no 18px icon token\n lg: 'icon-md', // 20px\n} as const\n\nconst TITLE_SIZE_MAP = {\n sm: 'text-sm font-semibold leading-4 tracking-tight',\n default: 'font-semibold leading-[18px] tracking-tight',\n lg: 'text-base font-semibold leading-5 tracking-tight',\n} as const\n\nconst DESC_SIZE_MAP = {\n sm: 'text-xs mt-0.5',\n default: 'text-sm mt-1',\n lg: 'text-md mt-1.5',\n} as const\n\n// ─── Types ───────────────────────────────────────────────────────\nexport type AlertVariant = 'default' | 'outline' | 'filled'\nexport type AlertColor = 'info' | 'success' | 'warning' | 'error'\nexport type AlertSize = 'sm' | 'default' | 'lg'\n\n// ─── Context ─────────────────────────────────────────────────────\ninterface AlertContextValue {\n variant: AlertVariant\n color: AlertColor\n size: AlertSize\n}\n\nconst AlertContext = React.createContext<AlertContextValue>({\n variant: 'default',\n color: 'info',\n size: 'default',\n})\n\nfunction useAlertContext() {\n return React.useContext(AlertContext)\n}\n\n// ═══════════════════════════════════════════════════════════════════\n// Alert\n// ═══════════════════════════════════════════════════════════════════\n\n// ─── AlertRoot ───────────────────────────────────────────────────\nexport interface AlertRootProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof alertVariants> {\n /** Visual style */\n variant?: AlertVariant\n /** Semantic color (determines icon, colors, and ARIA role) */\n color?: AlertColor\n /** Size */\n size?: AlertSize\n /** Closable — shows close button */\n closable?: boolean\n /** Close callback */\n onClose?: () => void\n /** Custom close icon */\n closeIcon?: React.ReactNode\n /** Custom status icon (overrides default) */\n icon?: React.ReactNode\n /** Hide the status icon entirely */\n hideIcon?: boolean\n}\n\nconst AlertRoot = React.forwardRef<HTMLDivElement, AlertRootProps>(\n ({\n className,\n variant = 'default',\n color = 'info',\n size = 'default',\n radius,\n closable = false,\n onClose,\n closeIcon,\n icon,\n hideIcon = false,\n children,\n ...props\n }, ref) => {\n // error → role=\"alert\" (assertive), others → role=\"status\" (polite)\n const role = color === 'error' ? 'alert' : 'status'\n const colorClasses = colorMap[color][variant]\n const StatusIcon = STATUS_ICONS[color]\n\n return (\n <AlertContext.Provider value={{ variant, color, size }}>\n <div\n ref={ref}\n role={role}\n className={cn(\n alertVariants({ size, radius }),\n colorClasses,\n className,\n )}\n {...props}\n >\n {/* Icon */}\n {!hideIcon && (\n <span className=\"shrink-0\">\n {icon || <StatusIcon className={ICON_SIZE_MAP[size]} />}\n </span>\n )}\n\n {/* Content area */}\n <div className=\"flex-1 min-w-0\">\n {children}\n </div>\n\n {/* Close button */}\n {closable && (\n <button\n type=\"button\"\n className={cn(\n 'shrink-0 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus-visible:focus-ring',\n 'group-has-[[data-alert-description]]:absolute',\n size === 'sm'\n ? 'group-has-[[data-alert-description]]:top-2 group-has-[[data-alert-description]]:right-2'\n : 'group-has-[[data-alert-description]]:top-3 group-has-[[data-alert-description]]:right-3',\n )}\n onClick={onClose}\n aria-label=\"Close\"\n >\n {closeIcon || <DefaultCloseIcon className=\"icon-sm\" />}\n </button>\n )}\n </div>\n </AlertContext.Provider>\n )\n }\n)\nAlertRoot.displayName = 'AlertRoot'\n\n// ─── AlertTitle ──────────────────────────────────────────────────\nexport interface AlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst AlertTitle = React.forwardRef<HTMLHeadingElement, AlertTitleProps>(\n ({ className, ...props }, ref) => {\n const { size } = useAlertContext()\n return (\n <h5\n ref={ref}\n className={cn(TITLE_SIZE_MAP[size], className)}\n {...props}\n />\n )\n }\n)\nAlertTitle.displayName = 'AlertTitle'\n\n// ─── AlertDescription ────────────────────────────────────────────\nexport interface AlertDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst AlertDescription = React.forwardRef<HTMLParagraphElement, AlertDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { variant, size } = useAlertContext()\n return (\n <p\n ref={ref}\n data-alert-description=\"\"\n className={cn(\n DESC_SIZE_MAP[size],\n variant === 'filled' ? 'opacity-90' : 'opacity-80',\n className,\n )}\n {...props}\n />\n )\n }\n)\nAlertDescription.displayName = 'AlertDescription'\n\n// ─── Namespace: Alert ────────────────────────────────────────────\nconst Alert = Object.assign(AlertRoot, {\n Title: AlertTitle,\n Description: AlertDescription,\n})\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nnamespace Alert {\n export type RootProps = AlertRootProps\n export type TitleProps = AlertTitleProps\n export type DescriptionProps = AlertDescriptionProps\n}\n\n// ─── Exports ─────────────────────────────────────────────────────\nexport {\n Alert,\n AlertRoot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EACvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,UAAM,EAAE,KAAK,IAAI,gBAAgB;AACjC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,iBAAG,eAAe,IAAI,GAAG,SAAS;AAAA,QAC5C,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;AAKzB,MAAM,mBAAmB,MAAM;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,UAAM,EAAE,SAAS,KAAK,IAAI,gBAAgB;AAC1C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,0BAAuB;AAAA,QACvB,eAAW;AAAA,UACT,cAAc,IAAI;AAAA,UAClB,YAAY,WAAW,eAAe;AAAA,UACtC;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,iBAAiB,cAAc;AAG/B,MAAM,QAAQ,OAAO,OAAO,WAAW;AAAA,EACrC,OAAO;AAAA,EACP,aAAa;AACf,CAAC;","names":[]}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
const InfoIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("path", { d: "M12 16v-4" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8h.01" }));
|
|
6
|
+
const SuccessIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("path", { d: "m9 12 2 2 4-4" }));
|
|
7
|
+
const WarningIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }), /* @__PURE__ */ React.createElement("path", { d: "M12 9v4" }), /* @__PURE__ */ React.createElement("path", { d: "M12 17h.01" }));
|
|
8
|
+
const ErrorIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8v5" }), /* @__PURE__ */ React.createElement("path", { d: "M12 16h.01" }));
|
|
9
|
+
const DefaultCloseIcon = ({ className }) => /* @__PURE__ */ React.createElement("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }));
|
|
10
|
+
const STATUS_ICONS = {
|
|
11
|
+
info: InfoIcon,
|
|
12
|
+
success: SuccessIcon,
|
|
13
|
+
warning: WarningIcon,
|
|
14
|
+
error: ErrorIcon
|
|
15
|
+
};
|
|
16
|
+
const colorMap = {
|
|
17
|
+
info: {
|
|
18
|
+
default: "bg-info-tint text-text-info border-info/20",
|
|
19
|
+
outline: "bg-transparent text-text-info border-info",
|
|
20
|
+
filled: "bg-info text-info-foreground border-transparent"
|
|
21
|
+
},
|
|
22
|
+
success: {
|
|
23
|
+
default: "bg-success-tint text-text-success border-success/20",
|
|
24
|
+
outline: "bg-transparent text-text-success border-success",
|
|
25
|
+
filled: "bg-success text-success-foreground border-transparent"
|
|
26
|
+
},
|
|
27
|
+
warning: {
|
|
28
|
+
default: "bg-warning-tint text-text-warning border-warning/20",
|
|
29
|
+
outline: "bg-transparent text-text-warning border-warning",
|
|
30
|
+
filled: "bg-warning text-warning-foreground border-transparent"
|
|
31
|
+
},
|
|
32
|
+
error: {
|
|
33
|
+
default: "bg-error-tint text-text-error border-error/20",
|
|
34
|
+
outline: "bg-transparent text-text-error border-error",
|
|
35
|
+
filled: "bg-error text-error-foreground border-transparent"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const alertVariants = cva(
|
|
39
|
+
"group relative flex items-center border w-full [&:has([data-alert-description])]:items-start",
|
|
40
|
+
{
|
|
41
|
+
variants: {
|
|
42
|
+
size: {
|
|
43
|
+
sm: "gap-2 p-3 text-sm",
|
|
44
|
+
default: "gap-2.5 p-4 text-md",
|
|
45
|
+
lg: "gap-3 p-5 text-md"
|
|
46
|
+
},
|
|
47
|
+
radius: {
|
|
48
|
+
none: "rounded-none",
|
|
49
|
+
sm: "rounded-sm",
|
|
50
|
+
base: "rounded",
|
|
51
|
+
md: "rounded-md",
|
|
52
|
+
lg: "rounded-lg",
|
|
53
|
+
xl: "rounded-xl",
|
|
54
|
+
"2xl": "rounded-2xl",
|
|
55
|
+
"3xl": "rounded-3xl",
|
|
56
|
+
full: "rounded-full"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
size: "default",
|
|
61
|
+
radius: "lg"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
const ICON_SIZE_MAP = {
|
|
66
|
+
sm: "icon-sm",
|
|
67
|
+
// 16px
|
|
68
|
+
default: "w-[18px] h-[18px]",
|
|
69
|
+
// 18px — TOKEN-EXCEPTION: no 18px icon token
|
|
70
|
+
lg: "icon-md"
|
|
71
|
+
// 20px
|
|
72
|
+
};
|
|
73
|
+
const TITLE_SIZE_MAP = {
|
|
74
|
+
sm: "text-sm font-semibold leading-4 tracking-tight",
|
|
75
|
+
default: "font-semibold leading-[18px] tracking-tight",
|
|
76
|
+
lg: "text-base font-semibold leading-5 tracking-tight"
|
|
77
|
+
};
|
|
78
|
+
const DESC_SIZE_MAP = {
|
|
79
|
+
sm: "text-xs mt-0.5",
|
|
80
|
+
default: "text-sm mt-1",
|
|
81
|
+
lg: "text-md mt-1.5"
|
|
82
|
+
};
|
|
83
|
+
const AlertContext = React.createContext({
|
|
84
|
+
variant: "default",
|
|
85
|
+
color: "info",
|
|
86
|
+
size: "default"
|
|
87
|
+
});
|
|
88
|
+
function useAlertContext() {
|
|
89
|
+
return React.useContext(AlertContext);
|
|
90
|
+
}
|
|
91
|
+
const AlertRoot = React.forwardRef(
|
|
92
|
+
({
|
|
93
|
+
className,
|
|
94
|
+
variant = "default",
|
|
95
|
+
color = "info",
|
|
96
|
+
size = "default",
|
|
97
|
+
radius,
|
|
98
|
+
closable = false,
|
|
99
|
+
onClose,
|
|
100
|
+
closeIcon,
|
|
101
|
+
icon,
|
|
102
|
+
hideIcon = false,
|
|
103
|
+
children,
|
|
104
|
+
...props
|
|
105
|
+
}, ref) => {
|
|
106
|
+
const role = color === "error" ? "alert" : "status";
|
|
107
|
+
const colorClasses = colorMap[color][variant];
|
|
108
|
+
const StatusIcon = STATUS_ICONS[color];
|
|
109
|
+
return /* @__PURE__ */ React.createElement(AlertContext.Provider, { value: { variant, color, size } }, /* @__PURE__ */ React.createElement(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
ref,
|
|
113
|
+
role,
|
|
114
|
+
className: cn(
|
|
115
|
+
alertVariants({ size, radius }),
|
|
116
|
+
colorClasses,
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
...props
|
|
120
|
+
},
|
|
121
|
+
!hideIcon && /* @__PURE__ */ React.createElement("span", { className: "shrink-0" }, icon || /* @__PURE__ */ React.createElement(StatusIcon, { className: ICON_SIZE_MAP[size] })),
|
|
122
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex-1 min-w-0" }, children),
|
|
123
|
+
closable && /* @__PURE__ */ React.createElement(
|
|
124
|
+
"button",
|
|
125
|
+
{
|
|
126
|
+
type: "button",
|
|
127
|
+
className: cn(
|
|
128
|
+
"shrink-0 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus-visible:focus-ring",
|
|
129
|
+
"group-has-[[data-alert-description]]:absolute",
|
|
130
|
+
size === "sm" ? "group-has-[[data-alert-description]]:top-2 group-has-[[data-alert-description]]:right-2" : "group-has-[[data-alert-description]]:top-3 group-has-[[data-alert-description]]:right-3"
|
|
131
|
+
),
|
|
132
|
+
onClick: onClose,
|
|
133
|
+
"aria-label": "Close"
|
|
134
|
+
},
|
|
135
|
+
closeIcon || /* @__PURE__ */ React.createElement(DefaultCloseIcon, { className: "icon-sm" })
|
|
136
|
+
)
|
|
137
|
+
));
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
AlertRoot.displayName = "AlertRoot";
|
|
141
|
+
const AlertTitle = React.forwardRef(
|
|
142
|
+
({ className, ...props }, ref) => {
|
|
143
|
+
const { size } = useAlertContext();
|
|
144
|
+
return /* @__PURE__ */ React.createElement(
|
|
145
|
+
"h5",
|
|
146
|
+
{
|
|
147
|
+
ref,
|
|
148
|
+
className: cn(TITLE_SIZE_MAP[size], className),
|
|
149
|
+
...props
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
AlertTitle.displayName = "AlertTitle";
|
|
155
|
+
const AlertDescription = React.forwardRef(
|
|
156
|
+
({ className, ...props }, ref) => {
|
|
157
|
+
const { variant, size } = useAlertContext();
|
|
158
|
+
return /* @__PURE__ */ React.createElement(
|
|
159
|
+
"p",
|
|
160
|
+
{
|
|
161
|
+
ref,
|
|
162
|
+
"data-alert-description": "",
|
|
163
|
+
className: cn(
|
|
164
|
+
DESC_SIZE_MAP[size],
|
|
165
|
+
variant === "filled" ? "opacity-90" : "opacity-80",
|
|
166
|
+
className
|
|
167
|
+
),
|
|
168
|
+
...props
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
AlertDescription.displayName = "AlertDescription";
|
|
174
|
+
const Alert = Object.assign(AlertRoot, {
|
|
175
|
+
Title: AlertTitle,
|
|
176
|
+
Description: AlertDescription
|
|
177
|
+
});
|
|
178
|
+
export {
|
|
179
|
+
Alert,
|
|
180
|
+
AlertDescription,
|
|
181
|
+
AlertRoot,
|
|
182
|
+
AlertTitle,
|
|
183
|
+
alertVariants
|
|
184
|
+
};
|
|
185
|
+
//# sourceMappingURL=alert.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/alert.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\n// ─── Built-in status icons (no external dependency) ──────────────\n// All icons: Lucide-compatible 24×24 viewBox, strokeWidth=2, rounded caps/joins\n// Info = circle + \"i\" | Success = circle + check | Warning = triangle + \"!\" | Error = circle + small ×\nconst InfoIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n)\n\nconst SuccessIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n)\n\nconst WarningIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n)\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 8v5\" />\n <path d=\"M12 16h.01\" />\n </svg>\n)\n\nconst DefaultCloseIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n)\n\n// ─── Status icon mapping ─────────────────────────────────────────\nconst STATUS_ICONS: Record<AlertColor, React.FC<{ className?: string }>> = {\n info: InfoIcon,\n success: SuccessIcon,\n warning: WarningIcon,\n error: ErrorIcon,\n}\n\n// ─── Color × Variant class mapping ──────────────────────────────\n// Uses semantic tokens (*.tint, text-text-*) — same pattern as Badge\nconst colorMap = {\n info: {\n default: 'bg-info-tint text-text-info border-info/20',\n outline: 'bg-transparent text-text-info border-info',\n filled: 'bg-info text-info-foreground border-transparent',\n },\n success: {\n default: 'bg-success-tint text-text-success border-success/20',\n outline: 'bg-transparent text-text-success border-success',\n filled: 'bg-success text-success-foreground border-transparent',\n },\n warning: {\n default: 'bg-warning-tint text-text-warning border-warning/20',\n outline: 'bg-transparent text-text-warning border-warning',\n filled: 'bg-warning text-warning-foreground border-transparent',\n },\n error: {\n default: 'bg-error-tint text-text-error border-error/20',\n outline: 'bg-transparent text-text-error border-error',\n filled: 'bg-error text-error-foreground border-transparent',\n },\n} as const\n\n// ─── Alert variants ──────────────────────────────────────────────\nconst alertVariants = cva(\n 'group relative flex items-center border w-full [&:has([data-alert-description])]:items-start',\n {\n variants: {\n size: {\n sm: 'gap-2 p-3 text-sm',\n default: 'gap-2.5 p-4 text-md',\n lg: 'gap-3 p-5 text-md',\n },\n radius: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n base: 'rounded',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n },\n defaultVariants: {\n size: 'default',\n radius: 'lg',\n },\n }\n)\n\n// ─── Size-dependent class maps ──────────────────────────────────\nconst ICON_SIZE_MAP = {\n sm: 'icon-sm', // 16px\n default: 'w-[18px] h-[18px]', // 18px — TOKEN-EXCEPTION: no 18px icon token\n lg: 'icon-md', // 20px\n} as const\n\nconst TITLE_SIZE_MAP = {\n sm: 'text-sm font-semibold leading-4 tracking-tight',\n default: 'font-semibold leading-[18px] tracking-tight',\n lg: 'text-base font-semibold leading-5 tracking-tight',\n} as const\n\nconst DESC_SIZE_MAP = {\n sm: 'text-xs mt-0.5',\n default: 'text-sm mt-1',\n lg: 'text-md mt-1.5',\n} as const\n\n// ─── Types ───────────────────────────────────────────────────────\nexport type AlertVariant = 'default' | 'outline' | 'filled'\nexport type AlertColor = 'info' | 'success' | 'warning' | 'error'\nexport type AlertSize = 'sm' | 'default' | 'lg'\n\n// ─── Context ─────────────────────────────────────────────────────\ninterface AlertContextValue {\n variant: AlertVariant\n color: AlertColor\n size: AlertSize\n}\n\nconst AlertContext = React.createContext<AlertContextValue>({\n variant: 'default',\n color: 'info',\n size: 'default',\n})\n\nfunction useAlertContext() {\n return React.useContext(AlertContext)\n}\n\n// ═══════════════════════════════════════════════════════════════════\n// Alert\n// ═══════════════════════════════════════════════════════════════════\n\n// ─── AlertRoot ───────────────────────────────────────────────────\nexport interface AlertRootProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof alertVariants> {\n /** Visual style */\n variant?: AlertVariant\n /** Semantic color (determines icon, colors, and ARIA role) */\n color?: AlertColor\n /** Size */\n size?: AlertSize\n /** Closable — shows close button */\n closable?: boolean\n /** Close callback */\n onClose?: () => void\n /** Custom close icon */\n closeIcon?: React.ReactNode\n /** Custom status icon (overrides default) */\n icon?: React.ReactNode\n /** Hide the status icon entirely */\n hideIcon?: boolean\n}\n\nconst AlertRoot = React.forwardRef<HTMLDivElement, AlertRootProps>(\n ({\n className,\n variant = 'default',\n color = 'info',\n size = 'default',\n radius,\n closable = false,\n onClose,\n closeIcon,\n icon,\n hideIcon = false,\n children,\n ...props\n }, ref) => {\n // error → role=\"alert\" (assertive), others → role=\"status\" (polite)\n const role = color === 'error' ? 'alert' : 'status'\n const colorClasses = colorMap[color][variant]\n const StatusIcon = STATUS_ICONS[color]\n\n return (\n <AlertContext.Provider value={{ variant, color, size }}>\n <div\n ref={ref}\n role={role}\n className={cn(\n alertVariants({ size, radius }),\n colorClasses,\n className,\n )}\n {...props}\n >\n {/* Icon */}\n {!hideIcon && (\n <span className=\"shrink-0\">\n {icon || <StatusIcon className={ICON_SIZE_MAP[size]} />}\n </span>\n )}\n\n {/* Content area */}\n <div className=\"flex-1 min-w-0\">\n {children}\n </div>\n\n {/* Close button */}\n {closable && (\n <button\n type=\"button\"\n className={cn(\n 'shrink-0 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus-visible:focus-ring',\n 'group-has-[[data-alert-description]]:absolute',\n size === 'sm'\n ? 'group-has-[[data-alert-description]]:top-2 group-has-[[data-alert-description]]:right-2'\n : 'group-has-[[data-alert-description]]:top-3 group-has-[[data-alert-description]]:right-3',\n )}\n onClick={onClose}\n aria-label=\"Close\"\n >\n {closeIcon || <DefaultCloseIcon className=\"icon-sm\" />}\n </button>\n )}\n </div>\n </AlertContext.Provider>\n )\n }\n)\nAlertRoot.displayName = 'AlertRoot'\n\n// ─── AlertTitle ──────────────────────────────────────────────────\nexport interface AlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nconst AlertTitle = React.forwardRef<HTMLHeadingElement, AlertTitleProps>(\n ({ className, ...props }, ref) => {\n const { size } = useAlertContext()\n return (\n <h5\n ref={ref}\n className={cn(TITLE_SIZE_MAP[size], className)}\n {...props}\n />\n )\n }\n)\nAlertTitle.displayName = 'AlertTitle'\n\n// ─── AlertDescription ────────────────────────────────────────────\nexport interface AlertDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {}\n\nconst AlertDescription = React.forwardRef<HTMLParagraphElement, AlertDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { variant, size } = useAlertContext()\n return (\n <p\n ref={ref}\n data-alert-description=\"\"\n className={cn(\n DESC_SIZE_MAP[size],\n variant === 'filled' ? 'opacity-90' : 'opacity-80',\n className,\n )}\n {...props}\n />\n )\n }\n)\nAlertDescription.displayName = 'AlertDescription'\n\n// ─── Namespace: Alert ────────────────────────────────────────────\nconst Alert = Object.assign(AlertRoot, {\n Title: AlertTitle,\n Description: AlertDescription,\n})\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nnamespace Alert {\n export type RootProps = AlertRootProps\n export type TitleProps = AlertTitleProps\n export type DescriptionProps = AlertDescriptionProps\n}\n\n// ─── Exports ─────────────────────────────────────────────────────\nexport {\n Alert,\n AlertRoot,\n AlertTitle,\n AlertDescription,\n alertVariants,\n}\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,SAAS,WAA8B;AACvC,SAAS,UAAU;AAKnB,MAAM,WAAW,CAAC,EAAE,UAAU,MAC5B,oCAAC,SAAI,WAAsB,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAa,GAAG,eAAc,SAAQ,gBAAe,SAAQ,eAAY,UACxJ,oCAAC,Y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