UNPKG

@explita/daily-toolset-components

Version:

A lightweight and versatile collection of TypeScript utility functions and form components, inspired by ShadCN UI, designed for seamless everyday development. Enhance your Node.js, React, and Next.js projects with a well-structured suite of helpers for st

73 lines (72 loc) 4.7 kB
"use client"; "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.DialogDescription = exports.DialogTitle = exports.DialogFooter = exports.DialogHeader = exports.DialogContent = exports.DialogClose = exports.DialogTrigger = exports.DialogOverlay = exports.DialogPortal = exports.Dialog = void 0; const React = __importStar(require("react")); const DialogPrimitive = __importStar(require("@radix-ui/react-dialog")); const lu_1 = require("react-icons/lu"); const Dialog = DialogPrimitive.Root; exports.Dialog = Dialog; const DialogTrigger = DialogPrimitive.Trigger; exports.DialogTrigger = DialogTrigger; const DialogPortal = DialogPrimitive.Portal; exports.DialogPortal = DialogPortal; const DialogClose = DialogPrimitive.Close; exports.DialogClose = DialogClose; const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (React.createElement(DialogPrimitive.Overlay, { ref: ref, className: `explita-dialog-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ${className || ""}`, ...props }))); exports.DialogOverlay = DialogOverlay; DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (React.createElement(DialogPortal, null, React.createElement(DialogOverlay, null), React.createElement(DialogPrimitive.Content, { ref: ref, className: `explita-dialog-content data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] ${className || ""}`, ...props }, children, React.createElement(DialogPrimitive.Close, { className: "explita-dialog-close" }, React.createElement(lu_1.LuX, { className: "explita-icon-size" }), React.createElement("span", { className: "explitdts:sr-only" }, "Close")))))); exports.DialogContent = DialogContent; DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, ...props }) => (React.createElement("div", { className: `explita-dialog-header ${className || ""}`, ...props })); exports.DialogHeader = DialogHeader; DialogHeader.displayName = "DialogHeader"; const DialogFooter = ({ className, ...props }) => (React.createElement("div", { className: `explita-dialog-footer ${className || ""}`, ...props })); exports.DialogFooter = DialogFooter; DialogFooter.displayName = "DialogFooter"; const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (React.createElement(DialogPrimitive.Title, { ref: ref, className: `explita-dialog-title ${className || ""}`, ...props }))); exports.DialogTitle = DialogTitle; DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (React.createElement(DialogPrimitive.Description, { ref: ref, className: `explita-dialog-description ${className || ""}`, ...props }))); exports.DialogDescription = DialogDescription; DialogDescription.displayName = DialogPrimitive.Description.displayName;