@better-nds/react 0.0.13 → 0.0.14
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/navbar.cjs +2 -0
- package/dist/navbar.cjs.map +1 -0
- package/dist/navbar.d.ts +20 -0
- package/dist/navbar.d.ts.map +1 -0
- package/dist/navbar.js +2 -0
- package/dist/navbar.js.map +1 -0
- package/package.json +6 -1
package/dist/navbar.cjs
ADDED
|
@@ -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"}
|
package/dist/navbar.d.ts
ADDED
|
@@ -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.
|
|
3
|
+
"version": "0.0.14",
|
|
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",
|