@undp/design-system-react
Version:
React based design system for UNDP
143 lines (142 loc) • 3.07 kB
JavaScript
import { t as e } from "./utils-ca9as9Ye.js";
import { t } from "./dist-CQzJbxrW.js";
import { t as n } from "./dist-jqIPNHDe.js";
import * as r from "react";
import i from "react";
import { jsx as a } from "react/jsx-runtime";
//#region node_modules/@radix-ui/react-separator/dist/index.mjs
var o = Object.defineProperty, s = (e, t) => o(e, "name", {
value: t,
configurable: !0
}), c = "horizontal", l = ["horizontal", "vertical"], u = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ s(function(e, t) {
let { decorative: r, orientation: i = c, ...o } = e, s = d(i) ? i : c, l = r ? { role: "none" } : {
"aria-orientation": s === "vertical" ? s : void 0,
role: "separator"
};
return /* @__PURE__ */ a(n.div, {
"data-orientation": s,
...l,
...o,
ref: t
});
}, "Separator"));
function d(e) {
return l.includes(e);
}
s(d, "isValidOrientation");
var f = u, p = t("", {
variants: {
orientation: {
horizontal: "w-full",
vertical: "h-full"
},
thickness: {
xs: "",
sm: "",
md: "",
lg: "",
xl: "",
"2xl": ""
},
color: {
primary: "bg-primary",
secondary: "bg-secondary",
tertiary: "bg-tertiary",
quaternary: "bg-quaternary",
background: "bg-background",
"background-soft": "bg-background-soft",
foreground: "bg-foreground",
"foreground-soft": "bg-foreground-soft",
surface: "bg-surface",
"surface-2xs": "bg-surface-2xs",
"surface-xs": "bg-surface-xs",
"surface-sm": "bg-surface-sm",
"surface-md": "bg-surface-md",
"surface-lg": "bg-surface-lg",
"surface-xl": "bg-surface-xl",
"surface-2xl": "bg-surface-2xl",
"surface-3xl": "bg-surface-3xl",
"surface-4xl": "bg-surface-4xl"
}
},
compoundVariants: [
{
orientation: "horizontal",
thickness: "xs",
class: "h-[1px]"
},
{
orientation: "horizontal",
thickness: "sm",
class: "h-[2px]"
},
{
orientation: "horizontal",
thickness: "md",
class: "h-[3px]"
},
{
orientation: "horizontal",
thickness: "lg",
class: "h-[4px]"
},
{
orientation: "horizontal",
thickness: "xl",
class: "h-[5px]"
},
{
orientation: "horizontal",
thickness: "2xl",
class: "h-[6px]"
},
{
orientation: "vertical",
thickness: "xs",
class: "w-[1px]"
},
{
orientation: "vertical",
thickness: "sm",
class: "w-[2px]"
},
{
orientation: "vertical",
thickness: "md",
class: "w-[3px]"
},
{
orientation: "vertical",
thickness: "lg",
class: "w-[4px]"
},
{
orientation: "vertical",
thickness: "xl",
class: "w-[5px]"
},
{
orientation: "vertical",
thickness: "2xl",
class: "w-[6px]"
}
],
defaultVariants: {
orientation: "horizontal",
color: "surface",
thickness: "xs"
}
}), m = i.forwardRef(({ className: t, orientation: n, color: r, thickness: i = "xs", ...o }, s) => /* @__PURE__ */ a(f, {
...o,
ref: s,
orientation: n,
className: e(p({
orientation: n,
color: r,
thickness: i
}), t)
}));
m.displayName = f.displayName;
//#endregion
export { m as t };
//# sourceMappingURL=separator-B3USgYl6.js.map