@glob-ui/alert 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +16 -2
- package/dist/index.d.mts +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +154 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +126 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +65 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kevin Martínez E
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @glob-ui/alert
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A callout for information, success, warning or an error, with an icon.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @glob-ui/alert
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Documentation
|
|
12
|
+
|
|
13
|
+
Full docs, examples and the accessibility table: [Alert](https://github.com/kevin-martineze/GlobUI/tree/main/apps/docs/content/docs/components/alert.mdx).
|
|
14
|
+
|
|
15
|
+
## License
|
|
16
|
+
|
|
17
|
+
MIT. See [LICENSE](./LICENSE).
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
type AlertVariant = "default" | "info" | "success" | "warning" | "danger";
|
|
7
|
+
declare const alertVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
interface AlertIconProps {
|
|
11
|
+
variant?: AlertVariant;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/** The variant's icon, coloured. Decorative: hidden from assistive tech. */
|
|
15
|
+
declare function AlertIcon({ variant, className }: AlertIconProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare namespace AlertIcon {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
20
|
+
/** Replaces the variant's default icon. Pass `null` to hide it. */
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
type AlertTitleProps = React.HTMLAttributes<HTMLDivElement>;
|
|
25
|
+
declare const AlertTitle: react.ForwardRefExoticComponent<AlertTitleProps & react.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
type AlertDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
|
|
27
|
+
declare const AlertDescription: react.ForwardRefExoticComponent<AlertDescriptionProps & react.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
|
|
29
|
+
export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, AlertTitle, type AlertTitleProps, type AlertVariant, alertVariants };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
type AlertVariant = "default" | "info" | "success" | "warning" | "danger";
|
|
7
|
+
declare const alertVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
interface AlertIconProps {
|
|
11
|
+
variant?: AlertVariant;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/** The variant's icon, coloured. Decorative: hidden from assistive tech. */
|
|
15
|
+
declare function AlertIcon({ variant, className }: AlertIconProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare namespace AlertIcon {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
20
|
+
/** Replaces the variant's default icon. Pass `null` to hide it. */
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
type AlertTitleProps = React.HTMLAttributes<HTMLDivElement>;
|
|
25
|
+
declare const AlertTitle: react.ForwardRefExoticComponent<AlertTitleProps & react.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
type AlertDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
|
|
27
|
+
declare const AlertDescription: react.ForwardRefExoticComponent<AlertDescriptionProps & react.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
|
|
29
|
+
export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, AlertTitle, type AlertTitleProps, type AlertVariant, alertVariants };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
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
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
|
|
49
|
+
// src/index.ts
|
|
50
|
+
var index_exports = {};
|
|
51
|
+
__export(index_exports, {
|
|
52
|
+
Alert: () => Alert,
|
|
53
|
+
AlertDescription: () => AlertDescription,
|
|
54
|
+
AlertIcon: () => AlertIcon,
|
|
55
|
+
AlertTitle: () => AlertTitle,
|
|
56
|
+
alertVariants: () => alertVariants
|
|
57
|
+
});
|
|
58
|
+
module.exports = __toCommonJS(index_exports);
|
|
59
|
+
|
|
60
|
+
// src/alert.tsx
|
|
61
|
+
var import_react = require("react");
|
|
62
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
63
|
+
var import_utils = require("@glob-ui/utils");
|
|
64
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
65
|
+
var alertVariants = (0, import_class_variance_authority.cva)("relative flex w-full gap-3 rounded-glob-lg border p-4 text-sm text-glob-text", {
|
|
66
|
+
variants: {
|
|
67
|
+
variant: {
|
|
68
|
+
default: "border-glob-border bg-glob-surface",
|
|
69
|
+
info: "border-glob-info/30 bg-glob-info-light",
|
|
70
|
+
success: "border-glob-success/30 bg-glob-success-light",
|
|
71
|
+
warning: "border-glob-warning/30 bg-glob-warning-light",
|
|
72
|
+
danger: "border-glob-danger/30 bg-glob-danger-light"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
defaultVariants: {
|
|
76
|
+
variant: "default"
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
var iconColor = {
|
|
80
|
+
default: "text-glob-text-secondary",
|
|
81
|
+
info: "text-glob-info",
|
|
82
|
+
success: "text-glob-success",
|
|
83
|
+
warning: "text-glob-warning",
|
|
84
|
+
danger: "text-glob-danger"
|
|
85
|
+
};
|
|
86
|
+
var iconPaths = {
|
|
87
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 16v-4M12 8h.01" })
|
|
90
|
+
] }),
|
|
91
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 16v-4M12 8h.01" })
|
|
94
|
+
] }),
|
|
95
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 12l3 3 5-6" })
|
|
98
|
+
] }),
|
|
99
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z" }),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 9v4M12 17h.01" })
|
|
102
|
+
] }),
|
|
103
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 9l-6 6M9 9l6 6" })
|
|
106
|
+
] })
|
|
107
|
+
};
|
|
108
|
+
function AlertIcon({ variant = "default", className }) {
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", className: (0, import_utils.cn)("mt-0.5 flex shrink-0", iconColor[variant], className), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
+
"svg",
|
|
111
|
+
{
|
|
112
|
+
viewBox: "0 0 24 24",
|
|
113
|
+
fill: "none",
|
|
114
|
+
stroke: "currentColor",
|
|
115
|
+
strokeWidth: "2",
|
|
116
|
+
strokeLinecap: "round",
|
|
117
|
+
strokeLinejoin: "round",
|
|
118
|
+
className: "h-4 w-4",
|
|
119
|
+
children: iconPaths[variant]
|
|
120
|
+
}
|
|
121
|
+
) });
|
|
122
|
+
}
|
|
123
|
+
AlertIcon.displayName = "AlertIcon";
|
|
124
|
+
var Alert = (0, import_react.forwardRef)(
|
|
125
|
+
(_a, ref) => {
|
|
126
|
+
var _b = _a, { className, variant, icon, children } = _b, props = __objRest(_b, ["className", "variant", "icon", "children"]);
|
|
127
|
+
const v = variant != null ? variant : "default";
|
|
128
|
+
const role = v === "warning" || v === "danger" ? "alert" : "status";
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", __spreadProps(__spreadValues({ ref, role, className: (0, import_utils.cn)(alertVariants({ variant, className })) }, props), { children: [
|
|
130
|
+
icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertIcon, { variant: v }) : icon !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", className: (0, import_utils.cn)("mt-0.5 flex shrink-0", iconColor[v]), children: icon }),
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children })
|
|
132
|
+
] }));
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
Alert.displayName = "Alert";
|
|
136
|
+
var AlertTitle = (0, import_react.forwardRef)((_a, ref) => {
|
|
137
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", __spreadValues({ ref, className: (0, import_utils.cn)("font-medium leading-5", className) }, props));
|
|
139
|
+
});
|
|
140
|
+
AlertTitle.displayName = "AlertTitle";
|
|
141
|
+
var AlertDescription = (0, import_react.forwardRef)((_a, ref) => {
|
|
142
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", __spreadValues({ ref, className: (0, import_utils.cn)("leading-5 text-glob-text-secondary", className) }, props));
|
|
144
|
+
});
|
|
145
|
+
AlertDescription.displayName = "AlertDescription";
|
|
146
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
147
|
+
0 && (module.exports = {
|
|
148
|
+
Alert,
|
|
149
|
+
AlertDescription,
|
|
150
|
+
AlertIcon,
|
|
151
|
+
AlertTitle,
|
|
152
|
+
alertVariants
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/alert.tsx"],"sourcesContent":["export { Alert, AlertTitle, AlertDescription, AlertIcon, alertVariants } from \"./alert\"\nexport type { AlertProps, AlertTitleProps, AlertDescriptionProps, AlertIconProps, AlertVariant } from \"./alert\"\n","import { forwardRef } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@glob-ui/utils\"\n\nexport type AlertVariant = \"default\" | \"info\" | \"success\" | \"warning\" | \"danger\"\n\nconst alertVariants = cva(\"relative flex w-full gap-3 rounded-glob-lg border p-4 text-sm text-glob-text\", {\n variants: {\n variant: {\n default: \"border-glob-border bg-glob-surface\",\n info: \"border-glob-info/30 bg-glob-info-light\",\n success: \"border-glob-success/30 bg-glob-success-light\",\n warning: \"border-glob-warning/30 bg-glob-warning-light\",\n danger: \"border-glob-danger/30 bg-glob-danger-light\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst iconColor: Record<AlertVariant, string> = {\n default: \"text-glob-text-secondary\",\n info: \"text-glob-info\",\n success: \"text-glob-success\",\n warning: \"text-glob-warning\",\n danger: \"text-glob-danger\",\n}\n\nconst iconPaths: Record<AlertVariant, React.ReactNode> = {\n default: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4M12 8h.01\" />\n </>\n ),\n info: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4M12 8h.01\" />\n </>\n ),\n success: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12l3 3 5-6\" />\n </>\n ),\n warning: (\n <>\n <path d=\"M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z\" />\n <path d=\"M12 9v4M12 17h.01\" />\n </>\n ),\n danger: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M15 9l-6 6M9 9l6 6\" />\n </>\n ),\n}\n\nexport interface AlertIconProps {\n variant?: AlertVariant\n className?: string\n}\n\n/** The variant's icon, coloured. Decorative: hidden from assistive tech. */\nfunction AlertIcon({ variant = \"default\", className }: AlertIconProps) {\n return (\n <span aria-hidden=\"true\" className={cn(\"mt-0.5 flex shrink-0\", iconColor[variant], className)}>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-4 w-4\"\n >\n {iconPaths[variant]}\n </svg>\n </span>\n )\n}\nAlertIcon.displayName = \"AlertIcon\"\n\nexport interface AlertProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof alertVariants> {\n /** Replaces the variant's default icon. Pass `null` to hide it. */\n icon?: React.ReactNode\n}\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>(\n ({ className, variant, icon, children, ...props }, ref) => {\n const v = variant ?? \"default\"\n // Only urgent variants interrupt screen readers; the rest are polite.\n const role = v === \"warning\" || v === \"danger\" ? \"alert\" : \"status\"\n\n return (\n <div ref={ref} role={role} className={cn(alertVariants({ variant, className }))} {...props}>\n {icon === undefined ? (\n <AlertIcon variant={v} />\n ) : (\n icon !== null && (\n <span aria-hidden=\"true\" className={cn(\"mt-0.5 flex shrink-0\", iconColor[v])}>\n {icon}\n </span>\n )\n )}\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">{children}</div>\n </div>\n )\n }\n)\nAlert.displayName = \"Alert\"\n\nexport type AlertTitleProps = React.HTMLAttributes<HTMLDivElement>\n\nconst AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"font-medium leading-5\", className)} {...props} />\n))\nAlertTitle.displayName = \"AlertTitle\"\n\nexport type AlertDescriptionProps = React.HTMLAttributes<HTMLDivElement>\n\nconst AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"leading-5 text-glob-text-secondary\", className)} {...props} />\n))\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription, AlertIcon, alertVariants }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA2B;AAC3B,sCAAuC;AACvC,mBAAmB;AA6Bf;AAzBJ,IAAM,oBAAgB,qCAAI,gFAAgF;AAAA,EACxG,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,EACX;AACF,CAAC;AAED,IAAM,YAA0C;AAAA,EAC9C,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAEA,IAAM,YAAmD;AAAA,EACvD,SACE,4EACE;AAAA,gDAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,IAC/B,4CAAC,UAAK,GAAE,sBAAqB;AAAA,KAC/B;AAAA,EAEF,MACE,4EACE;AAAA,gDAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,IAC/B,4CAAC,UAAK,GAAE,sBAAqB;AAAA,KAC/B;AAAA,EAEF,SACE,4EACE;AAAA,g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EJ;AACF;AACA,MAAM,cAAc;AAIpB,IAAM,iBAAa,yBAA4C,CAAC,IAAyB,QAAK;AAA9B,eAAE,YAxHlE,IAwHgE,IAAgB,kBAAhB,IAAgB,CAAd;AAChE,qDAAC,wBAAI,KAAU,eAAW,iBAAG,yBAAyB,SAAS,KAAO,MAAO;AAAA,CAC9E;AACD,WAAW,cAAc;AAIzB,IAAM,uBAAmB,yBAAkD,CAAC,IAAyB,QAAK;AAA9B,eAAE,YA/H9E,IA+H4E,IAAgB,kBAAhB,IAAgB,CAAd;AAC5E,qDAAC,wBAAI,KAAU,eAAW,iBAAG,sCAAsC,SAAS,KAAO,MAAO;AAAA,CAC3F;AACD,iBAAiB,cAAc;","names":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
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
|
+
|
|
33
|
+
// src/alert.tsx
|
|
34
|
+
import { forwardRef } from "react";
|
|
35
|
+
import { cva } from "class-variance-authority";
|
|
36
|
+
import { cn } from "@glob-ui/utils";
|
|
37
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
38
|
+
var alertVariants = cva("relative flex w-full gap-3 rounded-glob-lg border p-4 text-sm text-glob-text", {
|
|
39
|
+
variants: {
|
|
40
|
+
variant: {
|
|
41
|
+
default: "border-glob-border bg-glob-surface",
|
|
42
|
+
info: "border-glob-info/30 bg-glob-info-light",
|
|
43
|
+
success: "border-glob-success/30 bg-glob-success-light",
|
|
44
|
+
warning: "border-glob-warning/30 bg-glob-warning-light",
|
|
45
|
+
danger: "border-glob-danger/30 bg-glob-danger-light"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
variant: "default"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var iconColor = {
|
|
53
|
+
default: "text-glob-text-secondary",
|
|
54
|
+
info: "text-glob-info",
|
|
55
|
+
success: "text-glob-success",
|
|
56
|
+
warning: "text-glob-warning",
|
|
57
|
+
danger: "text-glob-danger"
|
|
58
|
+
};
|
|
59
|
+
var iconPaths = {
|
|
60
|
+
default: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
62
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })
|
|
63
|
+
] }),
|
|
64
|
+
info: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
65
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
66
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })
|
|
67
|
+
] }),
|
|
68
|
+
success: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
70
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12l3 3 5-6" })
|
|
71
|
+
] }),
|
|
72
|
+
warning: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx("path", { d: "M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z" }),
|
|
74
|
+
/* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01" })
|
|
75
|
+
] }),
|
|
76
|
+
danger: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
77
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
78
|
+
/* @__PURE__ */ jsx("path", { d: "M15 9l-6 6M9 9l6 6" })
|
|
79
|
+
] })
|
|
80
|
+
};
|
|
81
|
+
function AlertIcon({ variant = "default", className }) {
|
|
82
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("mt-0.5 flex shrink-0", iconColor[variant], className), children: /* @__PURE__ */ jsx(
|
|
83
|
+
"svg",
|
|
84
|
+
{
|
|
85
|
+
viewBox: "0 0 24 24",
|
|
86
|
+
fill: "none",
|
|
87
|
+
stroke: "currentColor",
|
|
88
|
+
strokeWidth: "2",
|
|
89
|
+
strokeLinecap: "round",
|
|
90
|
+
strokeLinejoin: "round",
|
|
91
|
+
className: "h-4 w-4",
|
|
92
|
+
children: iconPaths[variant]
|
|
93
|
+
}
|
|
94
|
+
) });
|
|
95
|
+
}
|
|
96
|
+
AlertIcon.displayName = "AlertIcon";
|
|
97
|
+
var Alert = forwardRef(
|
|
98
|
+
(_a, ref) => {
|
|
99
|
+
var _b = _a, { className, variant, icon, children } = _b, props = __objRest(_b, ["className", "variant", "icon", "children"]);
|
|
100
|
+
const v = variant != null ? variant : "default";
|
|
101
|
+
const role = v === "warning" || v === "danger" ? "alert" : "status";
|
|
102
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ ref, role, className: cn(alertVariants({ variant, className })) }, props), { children: [
|
|
103
|
+
icon === void 0 ? /* @__PURE__ */ jsx(AlertIcon, { variant: v }) : icon !== null && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("mt-0.5 flex shrink-0", iconColor[v]), children: icon }),
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children })
|
|
105
|
+
] }));
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
Alert.displayName = "Alert";
|
|
109
|
+
var AlertTitle = forwardRef((_a, ref) => {
|
|
110
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
111
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ ref, className: cn("font-medium leading-5", className) }, props));
|
|
112
|
+
});
|
|
113
|
+
AlertTitle.displayName = "AlertTitle";
|
|
114
|
+
var AlertDescription = forwardRef((_a, ref) => {
|
|
115
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
116
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ ref, className: cn("leading-5 text-glob-text-secondary", className) }, props));
|
|
117
|
+
});
|
|
118
|
+
AlertDescription.displayName = "AlertDescription";
|
|
119
|
+
export {
|
|
120
|
+
Alert,
|
|
121
|
+
AlertDescription,
|
|
122
|
+
AlertIcon,
|
|
123
|
+
AlertTitle,
|
|
124
|
+
alertVariants
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/alert.tsx"],"sourcesContent":["import { forwardRef } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@glob-ui/utils\"\n\nexport type AlertVariant = \"default\" | \"info\" | \"success\" | \"warning\" | \"danger\"\n\nconst alertVariants = cva(\"relative flex w-full gap-3 rounded-glob-lg border p-4 text-sm text-glob-text\", {\n variants: {\n variant: {\n default: \"border-glob-border bg-glob-surface\",\n info: \"border-glob-info/30 bg-glob-info-light\",\n success: \"border-glob-success/30 bg-glob-success-light\",\n warning: \"border-glob-warning/30 bg-glob-warning-light\",\n danger: \"border-glob-danger/30 bg-glob-danger-light\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst iconColor: Record<AlertVariant, string> = {\n default: \"text-glob-text-secondary\",\n info: \"text-glob-info\",\n success: \"text-glob-success\",\n warning: \"text-glob-warning\",\n danger: \"text-glob-danger\",\n}\n\nconst iconPaths: Record<AlertVariant, React.ReactNode> = {\n default: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4M12 8h.01\" />\n </>\n ),\n info: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4M12 8h.01\" />\n </>\n ),\n success: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12l3 3 5-6\" />\n </>\n ),\n warning: (\n <>\n <path d=\"M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z\" />\n <path d=\"M12 9v4M12 17h.01\" />\n </>\n ),\n danger: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M15 9l-6 6M9 9l6 6\" />\n </>\n ),\n}\n\nexport interface AlertIconProps {\n variant?: AlertVariant\n className?: string\n}\n\n/** The variant's icon, coloured. Decorative: hidden from assistive tech. */\nfunction AlertIcon({ variant = \"default\", className }: AlertIconProps) {\n return (\n <span aria-hidden=\"true\" className={cn(\"mt-0.5 flex shrink-0\", iconColor[variant], className)}>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-4 w-4\"\n >\n {iconPaths[variant]}\n </svg>\n </span>\n )\n}\nAlertIcon.displayName = \"AlertIcon\"\n\nexport interface AlertProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof alertVariants> {\n /** Replaces the variant's default icon. Pass `null` to hide it. */\n icon?: React.ReactNode\n}\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>(\n ({ className, variant, icon, children, ...props }, ref) => {\n const v = variant ?? \"default\"\n // Only urgent variants interrupt screen readers; the rest are polite.\n const role = v === \"warning\" || v === \"danger\" ? \"alert\" : \"status\"\n\n return (\n <div ref={ref} role={role} className={cn(alertVariants({ variant, className }))} {...props}>\n {icon === undefined ? (\n <AlertIcon variant={v} />\n ) : (\n icon !== null && (\n <span aria-hidden=\"true\" className={cn(\"mt-0.5 flex shrink-0\", iconColor[v])}>\n {icon}\n </span>\n )\n )}\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">{children}</div>\n </div>\n )\n }\n)\nAlert.displayName = \"Alert\"\n\nexport type AlertTitleProps = React.HTMLAttributes<HTMLDivElement>\n\nconst AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"font-medium leading-5\", className)} {...props} />\n))\nAlertTitle.displayName = \"AlertTitle\"\n\nexport type AlertDescriptionProps = React.HTMLAttributes<HTMLDivElement>\n\nconst AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"leading-5 text-glob-text-secondary\", className)} {...props} />\n))\nAlertDesc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,SAAS,KAAO,MAAO;AAAA,CAC3F;AACD,iBAAiB,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glob-ui/alert",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"default": "./dist/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist/",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^19"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@glob-ui/utils": "0.2.0",
|
|
30
|
+
"class-variance-authority": "^0.7.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"tsup": "^8.5.1"
|
|
34
|
+
},
|
|
35
|
+
"description": "A callout for information, success, warning or an error, with an icon.",
|
|
36
|
+
"keywords": [
|
|
37
|
+
"react",
|
|
38
|
+
"glob-ui",
|
|
39
|
+
"components",
|
|
40
|
+
"accessible",
|
|
41
|
+
"tailwind",
|
|
42
|
+
"alert"
|
|
43
|
+
],
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"author": "Kevin Martínez E",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/kevin-martineze/GlobUI.git",
|
|
49
|
+
"directory": "packages/alert"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/kevin-martineze/GlobUI#readme",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/kevin-martineze/GlobUI/issues"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"provenance": true
|
|
58
|
+
},
|
|
59
|
+
"sideEffects": false,
|
|
60
|
+
"type": "commonjs",
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=18.18"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "tsup",
|
|
66
|
+
"dev": "tsup --watch --no-clean"
|
|
67
|
+
}
|
|
6
68
|
}
|