@nucleux/breadcrumb 0.1.0
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/LICENSE +21 -0
- package/dist/index.cjs +79 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nucleux
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var lucideReact = require('lucide-react');
|
|
6
|
+
var utils = require('@nucleux/utils');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
// src/index.tsx
|
|
30
|
+
var Breadcrumb = React__namespace.forwardRef(
|
|
31
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "Breadcrumb", className, ...props, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground", children }) })
|
|
32
|
+
);
|
|
33
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
34
|
+
var BreadcrumbItem = React__namespace.forwardRef(
|
|
35
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: utils.cn("inline-flex items-center gap-1.5", className), ...props })
|
|
36
|
+
);
|
|
37
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
38
|
+
var BreadcrumbLink = React__namespace.forwardRef(
|
|
39
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
"a",
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
className: utils.cn(
|
|
44
|
+
"transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
52
|
+
var BreadcrumbPage = React__namespace.forwardRef(
|
|
53
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
role: "link",
|
|
58
|
+
"aria-disabled": "true",
|
|
59
|
+
"aria-current": "page",
|
|
60
|
+
className: utils.cn("font-medium text-foreground", className),
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
66
|
+
var BreadcrumbSeparator = ({
|
|
67
|
+
className,
|
|
68
|
+
children,
|
|
69
|
+
...props
|
|
70
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx("li", { role: "presentation", "aria-hidden": true, className: utils.cn("[&_svg]:size-3.5", className), ...props, children: children ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, {}) });
|
|
71
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
72
|
+
|
|
73
|
+
exports.Breadcrumb = Breadcrumb;
|
|
74
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
75
|
+
exports.BreadcrumbLink = BreadcrumbLink;
|
|
76
|
+
exports.BreadcrumbPage = BreadcrumbPage;
|
|
77
|
+
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
78
|
+
//# sourceMappingURL=index.cjs.map
|
|
79
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"s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Aa,MAAA;AAAA,MACb,SAAA,EAAWC,QAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA;AAGV;AACA,cAAA,CAAe,WAAA,GAAc,gBAAA;AAEtB,IAAM,sBAAsB,CAAC;AAAA,EAClC,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,oCACG,IAAA,EAAA,EAAG,IAAA,EAAK,cAAA,EAAe,aAAA,EAAW,MAAC,SAAA,EAAWA,QAAA,CAAG,kBAAA,EAAoB,SAAS,GAAI,GAAG,KAAA,EACnF,QAAA,EAAA,QAAA,oBAAYD,cAAA,CAACE,4BAAa,CAAA,EAC7B;AAEF,mBAAA,CAAoB,WAAA,GAAc,qBAAA","file":"index.cjs","sourcesContent":["import * as React from \"react\";\nimport { ChevronRight } from \"lucide-react\";\nimport { cn } from \"@nucleux/utils\";\n\n/** Breadcrumb navigation landmark. Compose with the parts below. */\nexport const Breadcrumb = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, children, ...props }, ref) => (\n <nav ref={ref} aria-label=\"Breadcrumb\" className={className} {...props}>\n <ol className=\"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground\">\n {children}\n </ol>\n </nav>\n ),\n);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nexport const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.LiHTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"inline-flex items-center gap-1.5\", className)} {...props} />\n ),\n);\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nexport const BreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>(\n ({ className, ...props }, ref) => (\n <a\n ref={ref}\n className={cn(\n \"transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n ),\n);\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\n/** The current page — non-interactive, marked with aria-current. */\nexport const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-medium text-foreground\", className)}\n {...props}\n />\n ),\n);\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nexport const BreadcrumbSeparator = ({\n className,\n children,\n ...props\n}: React.HTMLAttributes<HTMLLIElement>) => (\n <li role=\"presentation\" aria-hidden className={cn(\"[&_svg]:size-3.5\", className)} {...props}>\n {children ?? <ChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** Breadcrumb navigation landmark. Compose with the parts below. */
|
|
4
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<React.LiHTMLAttributes<HTMLLIElement> & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
/** The current page — non-interactive, marked with aria-current. */
|
|
8
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
declare const BreadcrumbSeparator: {
|
|
10
|
+
({ className, children, ...props }: React.HTMLAttributes<HTMLLIElement>): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** Breadcrumb navigation landmark. Compose with the parts below. */
|
|
4
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<React.LiHTMLAttributes<HTMLLIElement> & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
/** The current page — non-interactive, marked with aria-current. */
|
|
8
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
declare const BreadcrumbSeparator: {
|
|
10
|
+
({ className, children, ...props }: React.HTMLAttributes<HTMLLIElement>): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ChevronRight } from 'lucide-react';
|
|
4
|
+
import { cn } from '@nucleux/utils';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/index.tsx
|
|
8
|
+
var Breadcrumb = React.forwardRef(
|
|
9
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "Breadcrumb", className, ...props, children: /* @__PURE__ */ jsx("ol", { className: "flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground", children }) })
|
|
10
|
+
);
|
|
11
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
12
|
+
var BreadcrumbItem = React.forwardRef(
|
|
13
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
|
|
14
|
+
);
|
|
15
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
16
|
+
var BreadcrumbLink = React.forwardRef(
|
|
17
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18
|
+
"a",
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
className: cn(
|
|
22
|
+
"transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
30
|
+
var BreadcrumbPage = React.forwardRef(
|
|
31
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
32
|
+
"span",
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
role: "link",
|
|
36
|
+
"aria-disabled": "true",
|
|
37
|
+
"aria-current": "page",
|
|
38
|
+
className: cn("font-medium text-foreground", className),
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
44
|
+
var BreadcrumbSeparator = ({
|
|
45
|
+
className,
|
|
46
|
+
children,
|
|
47
|
+
...props
|
|
48
|
+
}) => /* @__PURE__ */ jsx("li", { role: "presentation", "aria-hidden": true, className: cn("[&_svg]:size-3.5", className), ...props, children: children ?? /* @__PURE__ */ jsx(ChevronRight, {}) });
|
|
49
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
50
|
+
|
|
51
|
+
export { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, Breadcr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AK,MAAA;AAAA,MACL,eAAA,EAAc,MAAA;AAAA,MACd,cAAA,EAAa,MAAA;AAAA,MACb,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA;AAGV;AACA,cAAA,CAAe,WAAA,GAAc,gBAAA;AAEtB,IAAM,sBAAsB,CAAC;AAAA,EAClC,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,yBACG,IAAA,EAAA,EAAG,IAAA,EAAK,cAAA,EAAe,aAAA,EAAW,MAAC,SAAA,EAAW,EAAA,CAAG,kBAAA,EAAoB,SAAS,GAAI,GAAG,KAAA,EACnF,QAAA,EAAA,QAAA,oBAAY,GAAA,CAAC,gBAAa,CAAA,EAC7B;AAEF,mBAAA,CAAoB,WAAA,GAAc,qBAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport { ChevronRight } from \"lucide-react\";\nimport { cn } from \"@nucleux/utils\";\n\n/** Breadcrumb navigation landmark. Compose with the parts below. */\nexport const Breadcrumb = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, children, ...props }, ref) => (\n <nav ref={ref} aria-label=\"Breadcrumb\" className={className} {...props}>\n <ol className=\"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground\">\n {children}\n </ol>\n </nav>\n ),\n);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nexport const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.LiHTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"inline-flex items-center gap-1.5\", className)} {...props} />\n ),\n);\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nexport const BreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>(\n ({ className, ...props }, ref) => (\n <a\n ref={ref}\n className={cn(\n \"transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n ),\n);\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\n/** The current page — non-interactive, marked with aria-current. */\nexport const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-medium text-foreground\", className)}\n {...props}\n />\n ),\n);\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nexport const BreadcrumbSeparator = ({\n className,\n children,\n ...props\n}: React.HTMLAttributes<HTMLLIElement>) => (\n <li role=\"presentation\" aria-hidden className={cn(\"[&_svg]:size-3.5\", className)} {...props}>\n {children ?? <ChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nucleux/breadcrumb",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": ">=18",
|
|
21
|
+
"react-dom": ">=18"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"lucide-react": "^0.469.0",
|
|
25
|
+
"@nucleux/utils": "0.1.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"tsup": "^8.3.5",
|
|
29
|
+
"typescript": "^5.7.2",
|
|
30
|
+
"@types/react": "^18.3.18",
|
|
31
|
+
"react": "^18.3.1"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/intelligaia-open-labs/nucleux.git",
|
|
40
|
+
"directory": "packages/breadcrumb"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/intelligaia-open-labs/nucleux#readme",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup"
|
|
45
|
+
}
|
|
46
|
+
}
|