@premieroctet/next-admin
Version:
Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje
108 lines (107 loc) • 4.77 kB
JavaScript
;
var __webpack_require__ = {};
(()=>{
__webpack_require__.n = (module)=>{
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
__webpack_require__.d(getter, {
a: getter
});
return getter;
};
})();
(()=>{
__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__, {
buttonVariants: ()=>buttonVariants,
default: ()=>Button,
Button: ()=>Button_Button
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const react_slot_namespaceObject = require("@radix-ui/react-slot");
const external_class_variance_authority_namespaceObject = require("class-variance-authority");
const external_react_namespaceObject = require("react");
const Spinner_js_namespaceObject = require("../common/Spinner.js");
var Spinner_js_default = /*#__PURE__*/ __webpack_require__.n(Spinner_js_namespaceObject);
const external_clsx_namespaceObject = require("clsx");
var external_clsx_default = /*#__PURE__*/ __webpack_require__.n(external_clsx_namespaceObject);
const external_tailwind_merge_namespaceObject = require("tailwind-merge");
const buttonVariants = (0, external_class_variance_authority_namespaceObject.cva)("inline-flex items-center justify-center rounded-md text-sm font-normal transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background", {
variants: {
variant: {
default: "bg-nextadmin-brand-default text-nextadmin-brand-inverted hover:bg-nextadmin-brand-emphasis",
destructive: "bg-red-600 dark:bg-red-400 text-nextadmin-brand-inverted dark:text-dark-nextadmin-brand-inverted hover:bg-red-700 dark:hover:bg-red-500",
destructiveOutline: "text-red-600 dark:text-red-400 hover:bg-red-100 bg-transparent",
outline: "border border-input hover:bg-accent hover:text-accent-foreground",
secondary: "bg-neutral-700 text-white hover:bg-neutral-600",
ghost: "hover:bg-nextadmin-brand-muted hover:text-nextadmin-content-emphasis dark:hover:bg-dark-nextadmin-brand-muted/20 dark:hover:text-dark-nextadmin-brand-inverted text-nextadmin-brand-color dark:text-dark-nextadmin-brand-muted",
link: "underline-offset-4 hover:underline text-black"
},
size: {
default: "h-10 py-2 px-4",
sm: "h-9 px-3 rounded-md",
lg: "h-11 px-8 rounded-md"
},
icon: {
true: "!px-2",
false: ""
}
},
defaultVariants: {
variant: "default",
size: "default"
}
});
const Button_Button = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, variant, size, asChild = false, children, loading, disabled, icon, ...props }, ref)=>{
const Comp = asChild ? react_slot_namespaceObject.Slot : "button";
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(Comp, {
ref: ref,
disabled: loading || disabled,
...props,
className: (0, external_tailwind_merge_namespaceObject.twMerge)(external_clsx_default()(buttonVariants({
variant,
size,
className,
icon
}))),
children: [
loading && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Spinner_js_default(), {
className: "mr-2 inline h-4 w-4"
}),
children
]
});
});
Button_Button.displayName = "Button";
const Button = Button_Button;
exports.Button = __webpack_exports__.Button;
exports.buttonVariants = __webpack_exports__.buttonVariants;
exports["default"] = __webpack_exports__["default"];
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
"Button",
"buttonVariants",
"default"
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
Object.defineProperty(exports, '__esModule', {
value: true
});