@better-nds/react 0.0.18 → 0.0.19

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=require("./_cn.cjs"),a=r&&r.__esModule?r:{default:r};exports.Input=function({className:r,type:n,size:o="lg",dir:s,...d}){return e.jsx("div",{dir:s,className:t.cn("group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow",{"h-10":"lg"===o,"h-8":"md"===o},"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","before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700","after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5","has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0",r),children:e.jsx("input",{type:n,"data-slot":"input",className:a.default("placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed"),...d})})};
1
+ Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("clsx"),t=require("./_cn.cjs"),a=r&&r.__esModule?r:{default:r};exports.Input=function({className:r,type:n,size:o="lg",dir:s,...d}){return e.jsx("div",{dir:s,className:t.cn("group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow",{"h-10":"lg"===o,"h-8":"md"===o},"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","before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700 before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors","after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5","has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0",r),children:e.jsx("input",{type:n,"data-slot":"input",className:a.default("placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed"),...d})})};
2
2
  //# sourceMappingURL=input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\"\n\nimport clsx from \"clsx\"\n\nimport { cn } from \"../_cn\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n className={cn(\n \"group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n },\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\",\n \"before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700\",\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5\",\n \"has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0\",\n className\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed\"\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport { Input }\n"],"names":["className","type","size","dir","props","_jsx","div","cn","children","input","data-slot","clsx"],"mappings":"iLAMA,SAAe,CACbA,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACH,GAAGC,EAGJ,EACC,OACEC,EAAAA,GAAA,CAACC,MAAAA,CACCH,IAAKA,EACLH,UAAWO,EAAAA,GACT,sGACA,CACE,OAAQL,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAET,gJACA,yQACA,kPACA,0EACAF,GAGFQ,SAAAH,EAAAA,GAAA,CAACI,QAAAA,CACCR,KAAMA,EACNS,YAAU,QACVV,UAAWW,EAAAA,OAAAA,CACT,0KAED,GAAGP,CAAAA,IAIZ"}
1
+ {"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\"\n\nimport clsx from \"clsx\"\n\nimport { cn } from \"../_cn\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n className={cn(\n \"group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n },\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\",\n \"before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700 before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors\",\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5\",\n \"has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0\",\n className\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed\"\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport { Input }\n"],"names":["className","type","size","dir","props","_jsx","div","cn","children","input","data-slot","clsx"],"mappings":"iLAMA,SAAe,CACbA,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACH,GAAGC,EAGJ,EACC,OACEC,EAAAA,GAAA,CAACC,MAAAA,CACCH,IAAKA,EACLH,UAAWO,EAAAA,GACT,sGACA,CACE,OAAQL,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAET,gJACA,yQACA,kPACA,0EACAF,GAGFQ,SAAAH,EAAAA,GAAA,CAACI,QAAAA,CACCR,KAAMA,EACNS,YAAU,QACVV,UAAWW,EAAAA,OAAAA,CACT,0KAED,GAAGP,CAAAA,IAIZ"}
package/dist/input.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import r from"clsx";import{cn as t}from"./_cn.js";function n({className:a,type:o,size:s="lg",dir:d,...i}){return e("div",{dir:d,className:t("group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow",{"h-10":"lg"===s,"h-8":"md"===s},"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","before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700","after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5","has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0",a),children:e("input",{type:o,"data-slot":"input",className:r("placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed"),...i})})}export{n as Input};
1
+ import{jsx as e}from"react/jsx-runtime";import r from"clsx";import{cn as t}from"./_cn.js";function n({className:a,type:o,size:s="lg",dir:d,...i}){return e("div",{dir:d,className:t("group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow",{"h-10":"lg"===s,"h-8":"md"===s},"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","before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700 before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors","after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5","has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0",a),children:e("input",{type:o,"data-slot":"input",className:r("placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed"),...i})})}export{n 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 } from \"react\"\n\nimport clsx from \"clsx\"\n\nimport { cn } from \"../_cn\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n className={cn(\n \"group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n },\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\",\n \"before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700\",\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5\",\n \"has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0\",\n className\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed\"\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","size","dir","props","_jsx","div","cn","children","input","data-slot","clsx"],"mappings":"0FAMA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACH,GAAGC,EAGJ,EACC,OACEC,EAACC,MAAAA,CACCH,IAAKA,EACLH,UAAWO,EACT,sGACA,CACE,OAAQL,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAET,gJACA,yQACA,kPACA,0EACAF,GAGFQ,SAAAH,EAACI,QAAAA,CACCR,KAAMA,EACNS,YAAU,QACVV,UAAWW,EACT,0KAED,GAAGP,CAAAA,IAIZ"}
1
+ {"version":3,"file":"input.js","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\"\n\nimport clsx from \"clsx\"\n\nimport { cn } from \"../_cn\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n className={cn(\n \"group relative flex w-full items-center justify-center overflow-hidden rounded-sm transition-shadow\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n },\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\",\n \"before:border-nds-neutral-400 hover:before:border-nds-neutral-700 active:before:border-nds-neutral-400 has-aria-invalid:before:border-nds-error-700 before:pointer-events-none before:absolute before:inset-0 before:rounded-sm before:border before:transition-colors\",\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5\",\n \"has-disabled:opacity-50 has-disabled:shadow-none has-disabled:after:w-0\",\n className\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"placeholder:text-nds-neutral-500 h-full w-full min-w-0 bg-transparent ps-2 pe-4 text-base ring-0 outline-none disabled:pointer-events-none disabled:cursor-not-allowed\"\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","size","dir","props","_jsx","div","cn","children","input","data-slot","clsx"],"mappings":"0FAMA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACH,GAAGC,EAGJ,EACC,OACEC,EAACC,MAAAA,CACCH,IAAKA,EACLH,UAAWO,EACT,sGACA,CACE,OAAQL,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAET,gJACA,yQACA,kPACA,0EACAF,GAGFQ,SAAAH,EAACI,QAAAA,CACCR,KAAMA,EACNS,YAAU,QACVV,UAAWW,EACT,0KAED,GAAGP,CAAAA,IAIZ"}
package/dist/navbar.cjs CHANGED
@@ -1,2 +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;
1
+ Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("clsx");let t=(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","data-[selected=true]:hover:bg-nds-primary-700 data-[selected=true]:text-nds-white data-[selected=true]:active:bg-nds-primary-900 data-[selected=true]:bg-nds-primary-600 data-[selected=true]:before:bg-nds-primary-400");exports.Navbar=({actions:r,frameworkLink:l,links:s,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:s.map((r,s)=>e.jsx(l,{href:r.href,className:t,children:r.label},`${r.href}-${s}`))})]}),r&&e.jsx("div",{className:"flex h-full items-center",children:r})]})}),exports.triggerStyle=t;
2
2
  //# sourceMappingURL=navbar.cjs.map
@@ -1 +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"}
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 \"data-[selected=true]:hover:bg-nds-primary-700 data-[selected=true]:text-nds-white data-[selected=true]:active:bg-nds-primary-900 data-[selected=true]:bg-nds-primary-600 data-[selected=true]:before:bg-nds-primary-400\"\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,gWAEA,0OAGoB,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"}
package/dist/navbar.js CHANGED
@@ -1,2 +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};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import t from"clsx";let l=t("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","data-[selected=true]:hover:bg-nds-primary-700 data-[selected=true]:text-nds-white data-[selected=true]:active:bg-nds-primary-900 data-[selected=true]:bg-nds-primary-600 data-[selected=true]:before:bg-nds-primary-400"),a=({actions:t,frameworkLink:a,links:s,logo:d})=>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:[d,e("nav",{className:"flex h-full items-center max-md:hidden",children:s.map((r,t)=>e(a,{href:r.href,className:l,children:r.label},`${r.href}-${t}`))})]}),t&&e("div",{className:"flex h-full items-center",children:t})]})});export{a as Navbar,l as triggerStyle};
2
2
  //# sourceMappingURL=navbar.js.map
@@ -1 +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"}
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 \"data-[selected=true]:hover:bg-nds-primary-700 data-[selected=true]:text-nds-white data-[selected=true]:active:bg-nds-primary-900 data-[selected=true]:bg-nds-primary-600 data-[selected=true]:before:bg-nds-primary-400\"\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,gWAEA,2NAGWC,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.18",
3
+ "version": "0.0.19",
4
4
  "description": "React component library for better-nds",
5
5
  "license": "MIT",
6
6
  "sideEffects": [