UNPKG

@spark-ui/components

Version:

Spark (Leboncoin design system) components.

92 lines (85 loc) 3.35 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; 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/link-box/index.ts var link_box_exports = {}; __export(link_box_exports, { LinkBox: () => LinkBox2 }); module.exports = __toCommonJS(link_box_exports); // src/link-box/LinkBox.tsx var import_class_variance_authority = require("class-variance-authority"); // src/slot/Slot.tsx var import_radix_ui = require("radix-ui"); var import_react = require("react"); var import_jsx_runtime = require("react/jsx-runtime"); var Slottable = import_radix_ui.Slot.Slottable; var Slot = ({ ref, ...props }) => { return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Slot.Root, { ref, ...props }); }; // src/link-box/LinkBox.tsx var import_jsx_runtime2 = require("react/jsx-runtime"); var LinkBox = ({ className, asChild, ref, ...props }) => { const Component = asChild ? Slot : "div"; return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( Component, { ref, "data-spark-component": "link-box", className: (0, import_class_variance_authority.cx)("relative", className), ...props } ); }; LinkBox.displayName = "LinkBox"; // src/link-box/LinkBoxLink.tsx var import_class_variance_authority2 = require("class-variance-authority"); var import_jsx_runtime3 = require("react/jsx-runtime"); var LinkBoxLink = ({ className, asChild, ref, ...props }) => { const Component = asChild ? Slot : "a"; return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)( Component, { ref, "data-spark-component": "link-box-link", className: (0, import_class_variance_authority2.cx)( "before:z-base static before:absolute before:top-0 before:left-0 before:block before:size-full before:content-['']", className ), ...props } ); }; LinkBoxLink.displayName = "LinkBox.Link"; // src/link-box/LinkBoxRaised.tsx var import_class_variance_authority3 = require("class-variance-authority"); var import_jsx_runtime4 = require("react/jsx-runtime"); var LinkBoxRaised = ({ className, ...props }) => { return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Slot, { className: (0, import_class_variance_authority3.cx)("z-raised relative", className), ...props }); }; LinkBoxRaised.displayName = "LinkBox.Raised"; // src/link-box/index.ts var LinkBox2 = Object.assign(LinkBox, { Link: LinkBoxLink, Raised: LinkBoxRaised }); LinkBox2.displayName = "LinkBox"; LinkBox2.Link.displayName = "LinkBox.Link"; LinkBox2.Raised.displayName = "LinkBox.Raised"; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { LinkBox }); //# sourceMappingURL=index.js.map