welcome-ui
Version:
Customizable design system with react, typescript, tailwindcss and ariakit.
65 lines (64 loc) • 2.36 kB
JavaScript
"use client";
import './StickyNote.css';
import { jsx as t, jsxs as c } from "react/jsx-runtime";
import { forwardRef as N } from "react";
import { CloseButton as d } from "./CloseButton.js";
import { c as s } from "./index-B6iGEm-i.js";
import { Button as b } from "./Button.js";
import { Icon as f } from "./Icon.js";
import { Text as h } from "./Text.js";
const g = "_root_1wey5_2", k = "_content_1wey5_114", x = "_title_1wey5_42", B = "_action_1wey5_134", i = {
root: g,
"shape-rectangle": "_shape-rectangle_1wey5_27",
"shape-square": "_shape-square_1wey5_31",
"shape-full": "_shape-full_1wey5_35",
"variant-brand": "_variant-brand_1wey5_38",
"title-icon": "_title-icon_1wey5_42",
"variant-blue": "_variant-blue_1wey5_48",
"variant-green": "_variant-green_1wey5_58",
"variant-violet": "_variant-violet_1wey5_68",
"variant-pink": "_variant-pink_1wey5_78",
"variant-orange": "_variant-orange_1wey5_88",
"variant-teal": "_variant-teal_1wey5_98",
"close-button": "_close-button_1wey5_108",
content: k,
title: x,
action: B
}, S = s(i), l = ({ children: e, className: a, ...n }) => /* @__PURE__ */ t(b, { className: S("action", a), ...n, size: "sm", variant: "primary-neutral", children: e });
l.displayName = "StickyNote.Button";
const r = s(i), _ = ({ children: e, icon: a = "lightbulb-alt" }) => /* @__PURE__ */ c(h, { as: "div", className: r("title"), variant: "body-md-strong", children: [
/* @__PURE__ */ t("div", { className: r("title-icon"), children: /* @__PURE__ */ t(f, { name: a }) }),
/* @__PURE__ */ t("span", { children: e })
] });
_.displayName = "StickyNote.Title";
const o = s(i), m = N(
({ children: e, className: a, handleClose: n, isFullWidth: y, shape: p = "square", variant: u = "brand" }, v) => {
const w = !!n;
return /* @__PURE__ */ c(
"div",
{
className: o(
"root",
`variant-${u}`,
`shape-${p}`,
y && "shape-full",
a
),
ref: v,
children: [
w ? /* @__PURE__ */ t(d, { className: o("close-button"), onClick: n, size: "sm" }) : null,
/* @__PURE__ */ t("div", { className: o("content"), children: e })
]
}
);
}
);
m.displayName = "StickyNote";
const O = Object.assign(m, {
Button: l,
Title: _
});
export {
O as StickyNote,
i as stickyNoteClasses
};