@stanfordspezi/spezi-web-design-system
Version:
Stanford Biodesign Digital Health Spezi Web Design System
2 lines (1 loc) • 1.25 kB
JavaScript
;const o=require("react/jsx-runtime"),c=require("./index-DwV9MiDB.js"),p=require("react"),d=require("./index-14SsMENa.js");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const v=f(p);var m="Separator",s="horizontal",x=["horizontal","vertical"],l=v.forwardRef((e,t)=>{const{decorative:r,orientation:a=s,...n}=e,i=O(a)?a:s,u=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return o.jsx(d.Primitive.div,{"data-orientation":i,...u,...n,ref:t})});l.displayName=m;function O(e){return x.includes(e)}var b=l;const N=({className:e,orientation:t="horizontal",decorative:r,children:a,...n})=>o.jsx(b,{decorative:r??!!a,orientation:t,className:c.cn("bg-border relative shrink-0",t==="horizontal"?"h-[1px] w-full":"h -full w-[1px]",e),...n,children:a}),j=({className:e,children:t,...r})=>o.jsx("div",{className:c.cn("flex-center absolute -top-2.5 left-0 w-full text-sm",e),...r,children:o.jsx("div",{className:"bg-surface text-border px-4",children:t})});exports.Separator=N;exports.SeparatorText=j;