UNPKG

@arolariu/components

Version:

🎨 60+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

83 lines (82 loc) • 3.47 kB
"use client"; "use strict"; var __webpack_require__ = {}; (()=>{ __webpack_require__.d = (exports1, definition)=>{ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, { enumerable: true, get: definition[key] }); }; })(); (()=>{ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop); })(); (()=>{ __webpack_require__.r = (exports1)=>{ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, { value: 'Module' }); Object.defineProperty(exports1, '__esModule', { value: true }); }; })(); var __webpack_exports__ = {}; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { Alert: ()=>Alert, AlertDescription: ()=>AlertDescription, AlertTitle: ()=>AlertTitle }); const jsx_runtime_namespaceObject = require("react/jsx-runtime"); require("react"); const external_class_variance_authority_namespaceObject = require("class-variance-authority"); const utils_cjs_namespaceObject = require("../../lib/utils.cjs"); const alertVariants = (0, external_class_variance_authority_namespaceObject.cva)("relative w-full rounded-lg border border-neutral-200 px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current dark:border-neutral-800", { variants: { variant: { default: "bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50", destructive: "text-red-500 bg-white [&>svg]:text-current *:data-[slot=alert-description]:text-red-500/90 dark:text-red-900 dark:bg-neutral-950 dark:*:data-[slot=alert-description]:text-red-900/90" } }, defaultVariants: { variant: "default" } }); function Alert({ className, variant, ...props }) { return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", { "data-slot": "alert", role: "alert", className: (0, utils_cjs_namespaceObject.cn)(alertVariants({ variant }), className), ...props }); } function AlertTitle({ className, ...props }) { return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", { "data-slot": "alert-title", className: (0, utils_cjs_namespaceObject.cn)("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className), ...props }); } function AlertDescription({ className, ...props }) { return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", { "data-slot": "alert-description", className: (0, utils_cjs_namespaceObject.cn)("text-neutral-500 col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed dark:text-neutral-400", className), ...props }); } exports.Alert = __webpack_exports__.Alert; exports.AlertDescription = __webpack_exports__.AlertDescription; exports.AlertTitle = __webpack_exports__.AlertTitle; for(var __webpack_i__ in __webpack_exports__)if (-1 === [ "Alert", "AlertDescription", "AlertTitle" ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; Object.defineProperty(exports, '__esModule', { value: true }); //# sourceMappingURL=alert.cjs.map