brd-ui-kit 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  export declare const dialogOverlayClassNames: readonly ["data-open:animate-in data-closed:animate-out data-closed:fade-out-0", "data-open:fade-in-0 bg-primary-inverse-bg/20 duration-100", "fixed inset-0 isolate z-50"];
2
- export declare const dialogContentClassNames: readonly ["fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%]", "translate-y-[-50%] gap-8 bg-primary-bg p-6 shadow-[0px_10px_40px_0px_rgba(0,0,0,0.15)] duration-200", "rounded-[8px]", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0", "data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"];
2
+ export declare const dialogContentClassNames: readonly ["fixed left-[50%] top-[50%] z-50 grid w-fit translate-x-[-50%]", "translate-y-[-50%] gap-8 bg-primary-bg p-6 shadow-[0px_10px_40px_0px_rgba(0,0,0,0.15)] duration-200", "rounded-[8px]", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0", "data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"];
3
3
  export declare const dialogCloseClassNames: readonly ["absolute cursor-pointer right-6 top-7 inline-flex size-5 items-center justify-center rounded-sm text-secondary-text", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border", "disabled:pointer-events-none"];
4
4
  export declare const dialogHeaderClassNames: readonly ["flex flex-col gap-1.5 pr-10 text-left"];
5
5
  export declare const dialogFooterClassNames: readonly ["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"];
package/dist/index.cjs CHANGED
@@ -143,7 +143,7 @@ has-data-[slot=combobox-chip-remove]:pr-0`,Vw=_e(`text-primary-text placeholder:
143
143
 
144
144
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
145
145
 
146
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},nR="DialogDescriptionWarning",rR=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$f(nR).contentName}}.`;return u.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},oR=If,sR=Pf,iR=Of,zf=_f,Gf=Af,Hf=Mf,Bf=Ff,Wf=Lf;const aR=["data-open:animate-in data-closed:animate-out data-closed:fade-out-0","data-open:fade-in-0 bg-primary-inverse-bg/20 duration-100","fixed inset-0 isolate z-50"],lR=["fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%]","translate-y-[-50%] gap-8 bg-primary-bg p-6 shadow-[0px_10px_40px_0px_rgba(0,0,0,0.15)] duration-200","rounded-[8px]","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"],cR=["absolute cursor-pointer right-6 top-7 inline-flex size-5 items-center justify-center rounded-sm text-secondary-text","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border","disabled:pointer-events-none"],uR=["flex flex-col gap-1.5 pr-10 text-left"],dR=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],fR=["relative pb-3 tracking-normal text-lg font-medium text-primary-text","after:pointer-events-none after:absolute after:bottom-0 after:h-px after:-left-6 after:-right-16 after:bg-delicate-border"],pR=["tracking-normal text-sm font-normal text-secondary-text"],Uf=oR,gR=sR,qf=iR,mR=Wf,Oa=({className:e,...t})=>b.jsx(zf,{className:D(...aR,e),...t});Oa.displayName=zf.displayName;const _a=({className:e,children:t,showCloseButton:n=!0,...r})=>b.jsxs(qf,{children:[b.jsx(Oa,{}),b.jsxs(Gf,{className:D(...lR,e),...r,children:[t,n&&b.jsxs(Wf,{className:D(...cR),children:[b.jsx(Rn,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]});_a.displayName=Gf.displayName;const Aa=({className:e,...t})=>b.jsx("div",{className:D(...uR,e),...t});Aa.displayName="DialogHeader";const Ta=({className:e,...t})=>b.jsx("div",{className:D(...dR,e),...t});Ta.displayName="DialogFooter";const Ma=({className:e,...t})=>b.jsx(Hf,{className:D(...fR,e),...t});Ma.displayName=Hf.displayName;const Kf=({className:e,...t})=>b.jsx(Bf,{className:D(...pR,e),...t});Kf.displayName=Bf.displayName;const hR=_e(["flex h-9 w-full cursor-pointer items-center rounded-xl transition-colors","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{collapsed:{true:"justify-center px-0",false:"justify-start gap-3 px-2"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text hover:bg-primary-inverse-bg
146
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},nR="DialogDescriptionWarning",rR=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$f(nR).contentName}}.`;return u.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},oR=If,sR=Pf,iR=Of,zf=_f,Gf=Af,Hf=Mf,Bf=Ff,Wf=Lf;const aR=["data-open:animate-in data-closed:animate-out data-closed:fade-out-0","data-open:fade-in-0 bg-primary-inverse-bg/20 duration-100","fixed inset-0 isolate z-50"],lR=["fixed left-[50%] top-[50%] z-50 grid w-fit translate-x-[-50%]","translate-y-[-50%] gap-8 bg-primary-bg p-6 shadow-[0px_10px_40px_0px_rgba(0,0,0,0.15)] duration-200","rounded-[8px]","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"],cR=["absolute cursor-pointer right-6 top-7 inline-flex size-5 items-center justify-center rounded-sm text-secondary-text","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inp-focus-border","disabled:pointer-events-none"],uR=["flex flex-col gap-1.5 pr-10 text-left"],dR=["flex flex-col-reverse sm:flex-row sm:justify-end gap-4 [&>*]:flex-1"],fR=["relative pb-3 tracking-normal text-lg font-medium text-primary-text","after:pointer-events-none after:absolute after:bottom-0 after:h-px after:-left-6 after:-right-16 after:bg-delicate-border"],pR=["tracking-normal text-sm font-normal text-secondary-text"],Uf=oR,gR=sR,qf=iR,mR=Wf,Oa=({className:e,...t})=>b.jsx(zf,{className:D(...aR,e),...t});Oa.displayName=zf.displayName;const _a=({className:e,children:t,showCloseButton:n=!0,...r})=>b.jsxs(qf,{children:[b.jsx(Oa,{}),b.jsxs(Gf,{className:D(...lR,e),...r,children:[t,n&&b.jsxs(Wf,{className:D(...cR),children:[b.jsx(Rn,{type:"close",viewBox:"3.2 3.2 17.1 17.1"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]});_a.displayName=Gf.displayName;const Aa=({className:e,...t})=>b.jsx("div",{className:D(...uR,e),...t});Aa.displayName="DialogHeader";const Ta=({className:e,...t})=>b.jsx("div",{className:D(...dR,e),...t});Ta.displayName="DialogFooter";const Ma=({className:e,...t})=>b.jsx(Hf,{className:D(...fR,e),...t});Ma.displayName=Hf.displayName;const Kf=({className:e,...t})=>b.jsx(Bf,{className:D(...pR,e),...t});Kf.displayName=Bf.displayName;const hR=_e(["flex h-9 w-full cursor-pointer items-center rounded-xl transition-colors","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{collapsed:{true:"justify-center px-0",false:"justify-start gap-3 px-2"},active:{true:`bg-primary-inverse-bg text-primary-inverse-text hover:bg-primary-inverse-bg
147
147
  hover:text-primary-inverse-text`,false:"text-secondary-text hover:bg-primary-hover-bg hover:text-primary-text"}},defaultVariants:{collapsed:!1,active:!1}}),bR=qe("body-sm-medium"),Yf=({icon:e,label:t,badge:n,active:r=!1,collapsed:o=!1,disabled:s=!1,onAction:i,className:a,...l})=>{const c=D(hR({active:r,collapsed:o}),s&&"pointer-events-none opacity-50",a),d=b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"shrink-0 text-inherit [&_svg]:size-5 [&_svg]:shrink-0",children:e}),!o&&t&&b.jsx("span",{className:bR,children:t}),!o&&n&&b.jsx("span",{className:"ml-auto shrink-0",children:n})]});if("href"in l&&typeof l.href=="string"){const{href:f,rel:h,target:m,...v}=l,y=m==="_blank"?[h,"noopener","noreferrer"].filter(Boolean).join(" "):h;return b.jsx("a",{href:f,target:m,rel:y,"aria-disabled":s||void 0,tabIndex:s?-1:void 0,className:c,onClick:x=>{if(s){x.preventDefault();return}i?.()},...v,children:d})}const{type:p="button",...g}=l;return b.jsx("button",{type:p,disabled:s,className:c,onClick:()=>i?.(),...g,children:d})},vR=_e("px-2.5 py-3",{variants:{divider:{true:"",false:""}},defaultVariants:{divider:!1}}),xR=[qe("body-xs-medium"),"mb-1 px-2 text-secondary-text uppercase"].join(" "),Xf=({title:e,divider:t=!1,collapsed:n=!1,className:r,children:o,...s})=>b.jsxs("section",{className:D(vR({divider:t}),r),...s,children:[!n&&e&&b.jsx("p",{className:xR,children:e}),b.jsx("div",{className:"space-y-1",children:o})]}),Da=({className:e,...t})=>b.jsx("nav",{role:"navigation","aria-label":"pagination",className:D("mx-auto flex w-full justify-center",e),...t});Da.displayName="Pagination";const Fa=({className:e,ref:t,...n})=>b.jsx("ul",{ref:t,className:D("flex flex-row items-center gap-1",e),...n});Fa.displayName="PaginationContent";const jn=({className:e,ref:t,...n})=>b.jsx("li",{ref:t,className:D("",e),...n});jn.displayName="PaginationItem";const Rr=({className:e,isActive:t,size:n=null,...r})=>b.jsx("a",{"aria-current":t?"page":void 0,className:D(Ti({size:n}),e),...r});Rr.displayName="PaginationLink";const Zf=({className:e,...t})=>b.jsxs(Rr,{"aria-label":"Go to previous page",size:"md",className:D("gap-1 pl-2.5",e),...t,children:[b.jsx(cu,{className:"h-4 w-4"}),b.jsx("span",{children:"Previous"})]});Zf.displayName="PaginationPrevious";const Qf=({className:e,...t})=>b.jsxs(Rr,{"aria-label":"Go to next page",size:"md",className:D("gap-1 pr-2.5",e),...t,children:[b.jsx("span",{children:"Next"}),b.jsx(uu,{className:"h-4 w-4"})]});Qf.displayName="PaginationNext";const Jf=({className:e,...t})=>b.jsxs("span",{"aria-hidden":!0,className:D("flex h-9 w-9 items-center justify-center",e),...t,children:[b.jsx(du,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"More pages"})]});Jf.displayName="PaginationEllipsis";function yR(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const c=p=>{const{scope:g,children:f,...h}=p,m=g?.[e]?.[l]||a,v=u.useMemo(()=>h,Object.values(h));return b.jsx(m.Provider,{value:v,children:f})};c.displayName=s+"Provider";function d(p,g){const f=g?.[e]?.[l]||a,h=u.useContext(f);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=a?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,CR(o,...t)]}function CR(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const p=l(s)[`__scope${c}`];return{...a,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Va="Progress",La=100,[wR]=yR(Va),[SR,RR]=wR(Va),ep=u.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=ER,...i}=e;(o||o===0)&&!yc(o)&&console.error(IR(`${o}`,"Progress"));const a=yc(o)?o:La;r!==null&&!Cc(r,a)&&console.error(kR(`${r}`,"Progress"));const l=Cc(r,a)?r:null,c=Oo(l)?s(l,a):void 0;return b.jsx(SR,{scope:n,value:l,max:a,children:b.jsx(Ko.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Oo(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":rp(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});ep.displayName=Va;var tp="ProgressIndicator",np=u.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=RR(tp,n);return b.jsx(Ko.div,{"data-state":rp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});np.displayName=tp;function ER(e,t){return`${Math.round(e/t*100)}%`}function rp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Oo(e){return typeof e=="number"}function yc(e){return Oo(e)&&!isNaN(e)&&e>0}function Cc(e,t){return Oo(e)&&!isNaN(e)&&e<=t&&e>=0}function IR(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${La}\`.`}function kR(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
148
148
  - a positive number
149
149
  - less than the value passed to \`max\` (or ${La} if no \`max\` prop is set)