@better-nds/react 0.0.13 → 0.0.15

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.
package/dist/input.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("clsx"),t=r&&r.__esModule?r:{default:r};exports.Input=function({className:r,type:a,size:n="lg",dir:d,addon:o,...s}){return e.jsxs("div",{dir:d,role:"group",className:t.default("after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===n,"h-8":"md"===n}),children:[e.jsx("input",{type:a,"data-slot":"input",className:t.default("bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",r),...s}),o&&e.jsx("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:o})]})};
1
+ Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("clsx"),t=r&&r.__esModule?r:{default:r};exports.Input=function({className:r,type:a,size:n="lg",dir:d,addon:o,...s}){return e.jsxs("div",{dir:d,role:"group","data-has-addon":!!o,className:t.default("after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===n,"h-8":"md"===n}),children:[e.jsx("input",{type:a,"data-slot":"input",className:t.default("bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",r),...s}),o&&e.jsx("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:o})]})};
2
2
  //# sourceMappingURL=input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\"\n\nimport clsx from \"clsx\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n className={clsx(\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n }\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["className","type","size","dir","addon","props","_jsxs","div","role","clsx","_jsx","input","data-slot"],"mappings":"0JAIA,SAAe,CACbA,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAAAA,IAAA,CAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLR,UAAWS,EAAAA,QACT,2kBACA,CACE,OAAQP,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,CACT,aAGFQ,EAAAA,GAAA,CAACC,QAAAA,CACCV,KAAMA,EACNW,YAAU,QACVZ,UAAWS,EAAAA,QACT,+VACAT,GAED,GAAGK,CAAAA,GAELD,GACCM,EAAAA,GAAA,CAACH,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
1
+ {"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\"\n\nimport clsx from \"clsx\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n data-has-addon={!!addon}\n className={clsx(\n \"after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n }\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["className","type","size","dir","addon","props","_jsxs","div","role","data-has-addon","clsx","_jsx","input","data-slot"],"mappings":"0JAIA,SAAe,CACbA,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAAAA,IAAA,CAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLC,iBAAgB,CAAC,CAACL,EAClBJ,UAAWU,EAAAA,QACT,klBACA,CACE,OAAQR,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,CACT,aAGFS,EAAAA,GAAA,CAACC,QAAAA,CACCX,KAAMA,EACNY,YAAU,QACVb,UAAWU,EAAAA,QACT,oaACAV,GAED,GAAGK,CAAAA,GAELD,GACCO,EAAAA,GAAA,CAACJ,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
package/dist/input.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"clsx";function n({className:a,type:o,size:d="lg",dir:i,addon:s,...l}){return e("div",{dir:i,role:"group",className:t("after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===d,"h-8":"md"===d}),children:[r("input",{type:o,"data-slot":"input",className:t("bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",a),...l}),s&&r("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:s})]})}export{n as Input};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import t from"clsx";function a({className:n,type:o,size:d="lg",dir:i,addon:s,...l}){return r("div",{dir:i,role:"group","data-has-addon":!!s,className:t("after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===d,"h-8":"md"===d}),children:[e("input",{type:o,"data-slot":"input",className:t("bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",n),...l}),s&&e("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:s})]})}export{a as Input};
2
2
  //# sourceMappingURL=input.js.map
package/dist/input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\"\n\nimport clsx from \"clsx\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n className={clsx(\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n }\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","size","dir","addon","props","_jsxs","div","role","clsx","_jsx","input","data-slot"],"mappings":"sEAIA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLR,UAAWS,EACT,2kBACA,CACE,OAAQP,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,CACT,aAGFQ,EAACC,QAAAA,CACCV,KAAMA,EACNW,YAAU,QACVZ,UAAWS,EACT,+VACAT,GAED,GAAGK,CAAAA,GAELD,GACCM,EAACH,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
1
+ {"version":3,"file":"input.js","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\"\n\nimport clsx from \"clsx\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n data-has-addon={!!addon}\n className={clsx(\n \"after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n }\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 relative min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","size","dir","addon","props","_jsxs","div","role","data-has-addon","clsx","_jsx","input","data-slot"],"mappings":"sEAIA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLC,iBAAgB,CAAC,CAACL,EAClBJ,UAAWU,EACT,klBACA,CACE,OAAQR,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,CACT,aAGFS,EAACC,QAAAA,CACCX,KAAMA,EACNY,YAAU,QACVb,UAAWU,EACT,oaACAV,GAED,GAAGK,CAAAA,GAELD,GACCO,EAACJ,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("clsx");let l=(r&&r.__esModule?r:{default:r}).default("hover:bg-nds-neutral-100 active:bg-nds-neutral-200 hover:before:bg-nds-neutral-400 active:before:bg-nds-neutral-800 relative flex h-full items-center justify-center gap-1 rounded-sm px-4 py-2 font-medium transition-colors before:absolute before:bottom-0 before:z-1 before:h-1.5 before:w-[calc(100%-1rem)] before:rounded-full before:transition-colors");exports.Navbar=({actions:r,frameworkLink:s,links:t,logo:a})=>e.jsx("header",{className:"bg-nds-white border-nds-neutral-300 sticky top-0 flex h-18 w-full justify-center border-b px-4",children:e.jsxs("div",{className:"flex h-full w-full max-w-7xl items-center justify-between",children:[e.jsxs("div",{className:"flex h-full items-center gap-4",children:[a,e.jsx("nav",{className:"flex h-full items-center max-md:hidden",children:t.map((r,t)=>e.jsx(s,{href:r.href,className:l,children:r.label},`${r.href}-${t}`))})]}),r&&e.jsx("div",{className:"flex h-full items-center",children:r})]})}),exports.triggerStyle=l;
2
+ //# sourceMappingURL=navbar.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navbar.cjs","sources":["../src/blocks/navbar/index.tsx"],"sourcesContent":["import { type ReactNode } from \"react\"\nimport clsx from \"clsx\"\n\nexport const triggerStyle = clsx(\n \"hover:bg-nds-neutral-100 active:bg-nds-neutral-200 hover:before:bg-nds-neutral-400 active:before:bg-nds-neutral-800 relative flex h-full items-center justify-center gap-1 rounded-sm px-4 py-2 font-medium transition-colors before:absolute before:bottom-0 before:z-1 before:h-1.5 before:w-[calc(100%-1rem)] before:rounded-full before:transition-colors\"\n)\n\nexport const Navbar = ({\n actions,\n frameworkLink: Link,\n links,\n logo\n}: {\n actions?: ReactNode\n frameworkLink: (props: {\n href: string\n className?: string\n children: ReactNode\n }) => ReactNode\n links: {\n href: string\n label: string\n }[]\n logo: ReactNode\n}) => {\n return (\n <header className=\"bg-nds-white border-nds-neutral-300 sticky top-0 flex h-18 w-full justify-center border-b px-4\">\n <div className=\"flex h-full w-full max-w-7xl items-center justify-between\">\n <div className=\"flex h-full items-center gap-4\">\n {logo}\n <nav className=\"flex h-full items-center max-md:hidden\">\n {links.map((link, index) => (\n <Link\n key={`${link.href}-${index}`}\n href={link.href}\n className={triggerStyle}\n >\n {link.label}\n </Link>\n ))}\n </nav>\n </div>\n {actions && <div className=\"flex h-full items-center\">{actions}</div>}\n </div>\n </header>\n )\n}\n"],"names":["triggerStyle","clsx","actions","frameworkLink","Link","links","logo","_jsx","header","className","children","_jsxs","div","nav","map","link","index","href","label"],"mappings":"4GAGO,IAAMA,EAAeC,gCAAAA,OAAAA,CAC1B,gXAGoB,CAAC,CACrBC,QAAAA,CAAO,CACPC,cAAeC,CAAI,CACnBC,MAAAA,CAAK,CACLC,KAAAA,CAAI,CAaL,GAEGC,EAAAA,GAAA,CAACC,SAAAA,CAAOC,UAAU,iGAChBC,SAAAC,EAAAA,IAAA,CAACC,MAAAA,CAAIH,UAAU,sEACbE,EAAAA,IAAA,CAACC,MAAAA,CAAIH,UAAU,2CACZH,EACDC,EAAAA,GAAA,CAACM,MAAAA,CAAIJ,UAAU,yCACZJ,SAAAA,EAAMS,GAAG,CAAC,CAACC,EAAMC,IAChBT,EAAAA,GAAA,CAACH,EAAAA,CAECa,KAAMF,EAAKE,IAAI,CACfR,UAAWT,EAEVe,SAAAA,EAAKG,KAAAA,AAJD,EAAA,CAAA,EAAGH,EAAKE,IAAI,CAAC,CAAC,EAAED,EAAAA,CAAO,QASnCd,GAAWK,EAAAA,GAAA,CAACK,MAAAA,CAAIH,UAAU,2BAA4BP,SAAAA"}
@@ -0,0 +1,20 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ declare const triggerStyle: string;
5
+ declare const Navbar: ({ actions, frameworkLink: Link, links, logo }: {
6
+ actions?: ReactNode;
7
+ frameworkLink: (props: {
8
+ href: string;
9
+ className?: string;
10
+ children: ReactNode;
11
+ }) => ReactNode;
12
+ links: {
13
+ href: string;
14
+ label: string;
15
+ }[];
16
+ logo: ReactNode;
17
+ }) => react_jsx_runtime.JSX.Element;
18
+
19
+ export { Navbar, triggerStyle };
20
+ //# sourceMappingURL=navbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navbar.d.ts","sources":["../src/blocks/navbar/index.tsx"],"mappings":";;;AAEA,cAAc,YAAY;AAC1B,cAAc,MAAM;AACpB,cAAc,SAAS;AACvB;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB,MAAM,iBAAiB,CAAC,GAAG,CAAC,OAAO;;;;","names":[]}
package/dist/navbar.js ADDED
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import l from"clsx";let t=l("hover:bg-nds-neutral-100 active:bg-nds-neutral-200 hover:before:bg-nds-neutral-400 active:before:bg-nds-neutral-800 relative flex h-full items-center justify-center gap-1 rounded-sm px-4 py-2 font-medium transition-colors before:absolute before:bottom-0 before:z-1 before:h-1.5 before:w-[calc(100%-1rem)] before:rounded-full before:transition-colors"),a=({actions:l,frameworkLink:a,links:n,logo:s})=>e("header",{className:"bg-nds-white border-nds-neutral-300 sticky top-0 flex h-18 w-full justify-center border-b px-4",children:r("div",{className:"flex h-full w-full max-w-7xl items-center justify-between",children:[r("div",{className:"flex h-full items-center gap-4",children:[s,e("nav",{className:"flex h-full items-center max-md:hidden",children:n.map((r,l)=>e(a,{href:r.href,className:t,children:r.label},`${r.href}-${l}`))})]}),l&&e("div",{className:"flex h-full items-center",children:l})]})});export{a as Navbar,t as triggerStyle};
2
+ //# sourceMappingURL=navbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navbar.js","sources":["../src/blocks/navbar/index.tsx"],"sourcesContent":["import { type ReactNode } from \"react\"\nimport clsx from \"clsx\"\n\nexport const triggerStyle = clsx(\n \"hover:bg-nds-neutral-100 active:bg-nds-neutral-200 hover:before:bg-nds-neutral-400 active:before:bg-nds-neutral-800 relative flex h-full items-center justify-center gap-1 rounded-sm px-4 py-2 font-medium transition-colors before:absolute before:bottom-0 before:z-1 before:h-1.5 before:w-[calc(100%-1rem)] before:rounded-full before:transition-colors\"\n)\n\nexport const Navbar = ({\n actions,\n frameworkLink: Link,\n links,\n logo\n}: {\n actions?: ReactNode\n frameworkLink: (props: {\n href: string\n className?: string\n children: ReactNode\n }) => ReactNode\n links: {\n href: string\n label: string\n }[]\n logo: ReactNode\n}) => {\n return (\n <header className=\"bg-nds-white border-nds-neutral-300 sticky top-0 flex h-18 w-full justify-center border-b px-4\">\n <div className=\"flex h-full w-full max-w-7xl items-center justify-between\">\n <div className=\"flex h-full items-center gap-4\">\n {logo}\n <nav className=\"flex h-full items-center max-md:hidden\">\n {links.map((link, index) => (\n <Link\n key={`${link.href}-${index}`}\n href={link.href}\n className={triggerStyle}\n >\n {link.label}\n </Link>\n ))}\n </nav>\n </div>\n {actions && <div className=\"flex h-full items-center\">{actions}</div>}\n </div>\n </header>\n )\n}\n"],"names":["triggerStyle","clsx","Navbar","actions","frameworkLink","Link","links","logo","_jsx","header","className","children","_jsxs","div","nav","map","link","index","href","label"],"mappings":"sEAGO,IAAMA,EAAeC,EAC1B,iWAGWC,EAAS,CAAC,CACrBC,QAAAA,CAAO,CACPC,cAAeC,CAAI,CACnBC,MAAAA,CAAK,CACLC,KAAAA,CAAI,CAaL,GAEGC,EAACC,SAAAA,CAAOC,UAAU,iGAChBC,SAAAC,EAACC,MAAAA,CAAIH,UAAU,sEACbE,EAACC,MAAAA,CAAIH,UAAU,2CACZH,EACDC,EAACM,MAAAA,CAAIJ,UAAU,yCACZJ,SAAAA,EAAMS,GAAG,CAAC,CAACC,EAAMC,IAChBT,EAACH,EAAAA,CAECa,KAAMF,EAAKE,IAAI,CACfR,UAAWV,EAEVgB,SAAAA,EAAKG,KAAAA,AAJD,EAAA,CAAA,EAAGH,EAAKE,IAAI,CAAC,CAAC,EAAED,EAAAA,CAAO,QASnCd,GAAWK,EAACK,MAAAA,CAAIH,UAAU,2BAA4BP,SAAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-nds/react",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "React component library for better-nds",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -8,6 +8,11 @@
8
8
  ],
9
9
  "type": "module",
10
10
  "exports": {
11
+ "./blocks/*": {
12
+ "types": "./dist/*.d.ts",
13
+ "import": "./dist/*.js",
14
+ "require": "./dist/*.cjs"
15
+ },
11
16
  "./components/*": {
12
17
  "types": "./dist/*.d.ts",
13
18
  "import": "./dist/*.js",