UNPKG

@hanzo/ui

Version:

Multi-framework UI library with React, Vue, Svelte, and React Native support. Based on shadcn/ui with comprehensive framework coverage.

48 lines (46 loc) 1.63 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/utils.ts var utils_exports = {}; __export(utils_exports, { absoluteUrl: () => absoluteUrl, cn: () => cn, formatDate: () => formatDate }); module.exports = __toCommonJS(utils_exports); var import_clsx = require("clsx"); var import_tailwind_merge = require("tailwind-merge"); function cn(...inputs) { return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs)); } __name(cn, "cn"); function formatDate(input) { const date = new Date(input); return date.toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }); } __name(formatDate, "formatDate"); function absoluteUrl(path) { return `${process.env.NEXT_PUBLIC_APP_URL || ""}${path}`; } __name(absoluteUrl, "absoluteUrl");