@huin-core/react-breadcrumb 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +38 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +87 -0
- package/dist/index.mjs.map +7 -0
- package/package.json +6 -6
package/dist/index.d.mts
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import React__default from 'react';
|
3
|
+
|
4
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
5
|
+
separator?: React.ReactNode;
|
6
|
+
} & React.RefAttributes<HTMLElement>>;
|
7
|
+
|
8
|
+
declare const BreadcrumbList: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React__default.RefAttributes<HTMLOListElement>>;
|
9
|
+
|
10
|
+
declare const BreadcrumbItem: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React__default.RefAttributes<HTMLLIElement>>;
|
11
|
+
|
12
|
+
declare const BreadcrumbLink: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
13
|
+
ref?: ((instance: HTMLAnchorElement | null) => void) | React__default.RefObject<HTMLAnchorElement> | null | undefined;
|
14
|
+
} & {
|
15
|
+
asChild?: boolean | undefined;
|
16
|
+
}, "ref"> & {
|
17
|
+
asChild?: boolean | undefined;
|
18
|
+
} & React__default.RefAttributes<HTMLAnchorElement>>;
|
19
|
+
|
20
|
+
declare const BreadcrumbPage: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
21
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React__default.RefObject<HTMLSpanElement> | null | undefined;
|
22
|
+
} & {
|
23
|
+
asChild?: boolean | undefined;
|
24
|
+
}, "ref"> & React__default.RefAttributes<HTMLSpanElement>>;
|
25
|
+
|
26
|
+
declare const BreadcrumbSeparator: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
27
|
+
ref?: ((instance: HTMLLIElement | null) => void) | React__default.RefObject<HTMLLIElement> | null | undefined;
|
28
|
+
} & {
|
29
|
+
asChild?: boolean | undefined;
|
30
|
+
}, "ref"> & React__default.RefAttributes<HTMLLIElement>>;
|
31
|
+
|
32
|
+
declare const BreadcrumbEllipsis: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
33
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React__default.RefObject<HTMLSpanElement> | null | undefined;
|
34
|
+
} & {
|
35
|
+
asChild?: boolean | undefined;
|
36
|
+
}, "ref"> & React__default.RefAttributes<HTMLSpanElement>>;
|
37
|
+
|
38
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import React__default from 'react';
|
3
|
+
|
4
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
5
|
+
separator?: React.ReactNode;
|
6
|
+
} & React.RefAttributes<HTMLElement>>;
|
7
|
+
|
8
|
+
declare const BreadcrumbList: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React__default.RefAttributes<HTMLOListElement>>;
|
9
|
+
|
10
|
+
declare const BreadcrumbItem: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React__default.RefAttributes<HTMLLIElement>>;
|
11
|
+
|
12
|
+
declare const BreadcrumbLink: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
13
|
+
ref?: ((instance: HTMLAnchorElement | null) => void) | React__default.RefObject<HTMLAnchorElement> | null | undefined;
|
14
|
+
} & {
|
15
|
+
asChild?: boolean | undefined;
|
16
|
+
}, "ref"> & {
|
17
|
+
asChild?: boolean | undefined;
|
18
|
+
} & React__default.RefAttributes<HTMLAnchorElement>>;
|
19
|
+
|
20
|
+
declare const BreadcrumbPage: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
21
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React__default.RefObject<HTMLSpanElement> | null | undefined;
|
22
|
+
} & {
|
23
|
+
asChild?: boolean | undefined;
|
24
|
+
}, "ref"> & React__default.RefAttributes<HTMLSpanElement>>;
|
25
|
+
|
26
|
+
declare const BreadcrumbSeparator: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
27
|
+
ref?: ((instance: HTMLLIElement | null) => void) | React__default.RefObject<HTMLLIElement> | null | undefined;
|
28
|
+
} & {
|
29
|
+
asChild?: boolean | undefined;
|
30
|
+
}, "ref"> & React__default.RefAttributes<HTMLLIElement>>;
|
31
|
+
|
32
|
+
declare const BreadcrumbEllipsis: React__default.ForwardRefExoticComponent<Omit<Omit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
33
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React__default.RefObject<HTMLSpanElement> | null | undefined;
|
34
|
+
} & {
|
35
|
+
asChild?: boolean | undefined;
|
36
|
+
}, "ref"> & React__default.RefAttributes<HTMLSpanElement>>;
|
37
|
+
|
38
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
package/dist/index.js
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
"use strict";
|
2
|
+
"use client";
|
3
|
+
var __create = Object.create;
|
4
|
+
var __defProp = Object.defineProperty;
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
9
|
+
var __export = (target, all) => {
|
10
|
+
for (var name in all)
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
12
|
+
};
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
15
|
+
for (let key of __getOwnPropNames(from))
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
18
|
+
}
|
19
|
+
return to;
|
20
|
+
};
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
27
|
+
mod
|
28
|
+
));
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
30
|
+
|
31
|
+
// packages/react/breadcrumb/src/index.ts
|
32
|
+
var src_exports = {};
|
33
|
+
__export(src_exports, {
|
34
|
+
Breadcrumb: () => Breadcrumb,
|
35
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
36
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
37
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
38
|
+
BreadcrumbList: () => BreadcrumbList,
|
39
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
40
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator
|
41
|
+
});
|
42
|
+
module.exports = __toCommonJS(src_exports);
|
43
|
+
|
44
|
+
// packages/react/breadcrumb/src/Breadcrumb.tsx
|
45
|
+
var React = __toESM(require("react"));
|
46
|
+
var import_react_primitive = require("@huin-core/react-primitive");
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
48
|
+
var ROOT_NAME = "Breadcrumb";
|
49
|
+
var Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.nav, { ref, "aria-label": "breadcrumb", ...props }));
|
50
|
+
Breadcrumb.displayName = ROOT_NAME;
|
51
|
+
|
52
|
+
// packages/react/breadcrumb/src/BreadcrumbList.tsx
|
53
|
+
var import_react = __toESM(require("react"));
|
54
|
+
var import_react_primitive2 = require("@huin-core/react-primitive");
|
55
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
56
|
+
var LIST_NAME = "BreadcrumbList";
|
57
|
+
var BreadcrumbList = import_react.default.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_primitive2.Primitive.ol, { ref, ...props }));
|
58
|
+
BreadcrumbList.displayName = LIST_NAME;
|
59
|
+
|
60
|
+
// packages/react/breadcrumb/src/BreadcrumbItem.tsx
|
61
|
+
var import_react2 = __toESM(require("react"));
|
62
|
+
var import_react_primitive3 = require("@huin-core/react-primitive");
|
63
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
64
|
+
var ITEM_NAME = "BreadcrumbItem";
|
65
|
+
var BreadcrumbItem = import_react2.default.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_primitive3.Primitive.li, { ref, ...props }));
|
66
|
+
BreadcrumbItem.displayName = ITEM_NAME;
|
67
|
+
|
68
|
+
// packages/react/breadcrumb/src/BreadcrumbLink.tsx
|
69
|
+
var import_react3 = __toESM(require("react"));
|
70
|
+
var import_react_slot = require("@huin-core/react-slot");
|
71
|
+
var import_react_primitive4 = require("@huin-core/react-primitive");
|
72
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
73
|
+
var LINK_NAME = "BreadcrumbLink";
|
74
|
+
var BreadcrumbLink = import_react3.default.forwardRef(({ asChild, ...props }, ref) => {
|
75
|
+
const Comp = asChild ? import_react_slot.Slot : import_react_primitive4.Primitive.a;
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Comp, { ref, ...props });
|
77
|
+
});
|
78
|
+
BreadcrumbLink.displayName = LINK_NAME;
|
79
|
+
|
80
|
+
// packages/react/breadcrumb/src/BreadcrumbPage.tsx
|
81
|
+
var import_react_primitive5 = require("@huin-core/react-primitive");
|
82
|
+
var import_react4 = __toESM(require("react"));
|
83
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
84
|
+
var PAGE_NAME = "BreadcrumbPage";
|
85
|
+
var BreadcrumbPage = import_react4.default.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
86
|
+
import_react_primitive5.Primitive.span,
|
87
|
+
{
|
88
|
+
ref,
|
89
|
+
role: "link",
|
90
|
+
"aria-disabled": "true",
|
91
|
+
"aria-current": "page",
|
92
|
+
...props
|
93
|
+
}
|
94
|
+
));
|
95
|
+
BreadcrumbPage.displayName = PAGE_NAME;
|
96
|
+
|
97
|
+
// packages/react/breadcrumb/src/BreadcrumbSeparator.tsx
|
98
|
+
var import_react_primitive6 = require("@huin-core/react-primitive");
|
99
|
+
var import_react5 = __toESM(require("react"));
|
100
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
101
|
+
var SEPARATOR_NAME = "BreadcrumbSeparator";
|
102
|
+
var BreadcrumbSeparator = import_react5.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_primitive6.Primitive.li, { role: "presentation", ref, "aria-hidden": "true", ...props }));
|
103
|
+
BreadcrumbSeparator.displayName = SEPARATOR_NAME;
|
104
|
+
|
105
|
+
// packages/react/breadcrumb/src/BreadcrumbEllipsis.tsx
|
106
|
+
var import_react_primitive7 = require("@huin-core/react-primitive");
|
107
|
+
var import_react6 = __toESM(require("react"));
|
108
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
109
|
+
var ELLIPSISNAME = "BreadcrumbElipssis";
|
110
|
+
var BreadcrumbEllipsis = import_react6.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
111
|
+
import_react_primitive7.Primitive.span,
|
112
|
+
{
|
113
|
+
role: "presentation",
|
114
|
+
"aria-hidden": "true",
|
115
|
+
...props
|
116
|
+
}
|
117
|
+
));
|
118
|
+
BreadcrumbEllipsis.displayName = ELLIPSISNAME;
|
119
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/index.ts", "../src/Breadcrumb.tsx", "../src/BreadcrumbList.tsx", "../src/BreadcrumbItem.tsx", "../src/BreadcrumbLink.tsx", "../src/BreadcrumbPage.tsx", "../src/BreadcrumbSeparator.tsx", "../src/BreadcrumbEllipsis.tsx"],
|
4
|
+
"sourcesContent": ["\"use client\";\nexport { Breadcrumb } from \"./Breadcrumb\";\nexport { BreadcrumbList } from \"./BreadcrumbList\";\nexport { BreadcrumbItem } from \"./BreadcrumbItem\";\nexport { BreadcrumbLink } from \"./BreadcrumbLink\";\nexport { BreadcrumbPage } from \"./BreadcrumbPage\";\nexport { BreadcrumbSeparator } from \"./BreadcrumbSeparator\";\nexport { BreadcrumbEllipsis } from \"./BreadcrumbEllipsis\";\n\nexport type {} from \"./Breadcrumb\";\n", "import * as React from \"react\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\n/* -------------------------------------------------------------------------------------------------\n * Breadcrumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = \"Breadcrumb\";\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => (\n <Primitive.nav ref={ref} aria-label=\"breadcrumb\" {...props} />\n));\nBreadcrumb.displayName = ROOT_NAME;\n\nexport { Breadcrumb };\n", "import React from \"react\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\nconst LIST_NAME = \"BreadcrumbList\";\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ ...props }, ref) => <Primitive.ol ref={ref} {...props} />);\nBreadcrumbList.displayName = LIST_NAME;\n\nexport { BreadcrumbList };\n", "import React from \"react\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\nconst ITEM_NAME = \"BreadcrumbItem\";\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ ...props }, ref) => <Primitive.li ref={ref} {...props} />);\nBreadcrumbItem.displayName = ITEM_NAME;\n\nexport { BreadcrumbItem };\n", "import React from \"react\";\nimport { Slot } from \"@huin-core/react-slot\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\nconst LINK_NAME = \"BreadcrumbLink\";\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<typeof Primitive.a> & {\n asChild?: boolean;\n }\n>(({ asChild, ...props }, ref) => {\n const Comp = asChild ? Slot : Primitive.a;\n\n return <Comp ref={ref} {...props} />;\n});\nBreadcrumbLink.displayName = LINK_NAME;\n\nexport { BreadcrumbLink };\n", "import { Primitive } from \"@huin-core/react-primitive\";\nimport React from \"react\";\n\nconst PAGE_NAME = \"BreadcrumbPage\";\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<typeof Primitive.span>\n>(({ ...props }, ref) => (\n <Primitive.span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n {...props}\n />\n));\nBreadcrumbPage.displayName = PAGE_NAME;\n\nexport { BreadcrumbPage };\n", "import { Primitive } from \"@huin-core/react-primitive\";\nimport React from \"react\";\n\nconst SEPARATOR_NAME = \"BreadcrumbSeparator\";\nconst BreadcrumbSeparator = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<typeof Primitive.li>\n>(({ children, ...props }, ref) => (\n <Primitive.li role=\"presentation\" ref={ref} aria-hidden=\"true\" {...props} />\n));\n\nBreadcrumbSeparator.displayName = SEPARATOR_NAME;\n\nexport { BreadcrumbSeparator };\n", "import { Primitive } from \"@huin-core/react-primitive\";\nimport React from \"react\";\n\nconst ELLIPSISNAME = \"BreadcrumbElipssis\";\nconst BreadcrumbEllipsis = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<typeof Primitive.span>\n>(({ className, ...props }, ref) => (\n <Primitive.span\n role=\"presentation\"\n aria-hidden=\"true\"\n {...props}\n />\n \n \n));\n\nBreadcrumbEllipsis.displayName = ELLIPSISNAME;\n\nexport { BreadcrumbEllipsis };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,IACZ,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAAc;;;AChB7B,IAAAC,0BAA0B;AAC1B,IAAAC,gBAAkB;AAOhB,IAAAC,sBAAA;AALF,IAAM,iBAAiB;AACvB,IAAM,sBAAsB,cAAAC,QAAM,WAGhC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QACzB,6CAAC,kCAAU,IAAV,EAAa,MAAK,gBAAe,KAAU,eAAY,QAAQ,GAAG,OAAO,CAC3E;AAED,oBAAoB,cAAc;;;ACXlC,IAAAC,0BAA0B;AAC1B,IAAAC,gBAAkB;AAOhB,IAAAC,sBAAA;AALF,IAAM,eAAe;AACrB,IAAM,qBAAqB,cAAAC,QAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,kCAAU;AAAA,EAAV;AAAA,IACC,MAAK;AAAA,IACL,eAAY;AAAA,IACX,GAAG;AAAA;AACN,CAGD;AAED,mBAAmB,cAAc;",
|
6
|
+
"names": ["import_react_primitive", "import_jsx_runtime", "React", "import_react", "import_react_primitive", "import_jsx_runtime", "React", "import_react", "import_react_primitive", "import_jsx_runtime", "React", "import_react_primitive", "import_react", "import_jsx_runtime", "React", "import_react_primitive", "import_react", "import_jsx_runtime", "React", "import_react_primitive", "import_react", "import_jsx_runtime", "React"]
|
7
|
+
}
|
package/dist/index.mjs
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
"use client";
|
2
|
+
|
3
|
+
// packages/react/breadcrumb/src/Breadcrumb.tsx
|
4
|
+
import * as React from "react";
|
5
|
+
import { Primitive } from "@huin-core/react-primitive";
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
7
|
+
var ROOT_NAME = "Breadcrumb";
|
8
|
+
var Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(Primitive.nav, { ref, "aria-label": "breadcrumb", ...props }));
|
9
|
+
Breadcrumb.displayName = ROOT_NAME;
|
10
|
+
|
11
|
+
// packages/react/breadcrumb/src/BreadcrumbList.tsx
|
12
|
+
import React2 from "react";
|
13
|
+
import { Primitive as Primitive2 } from "@huin-core/react-primitive";
|
14
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
15
|
+
var LIST_NAME = "BreadcrumbList";
|
16
|
+
var BreadcrumbList = React2.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx2(Primitive2.ol, { ref, ...props }));
|
17
|
+
BreadcrumbList.displayName = LIST_NAME;
|
18
|
+
|
19
|
+
// packages/react/breadcrumb/src/BreadcrumbItem.tsx
|
20
|
+
import React3 from "react";
|
21
|
+
import { Primitive as Primitive3 } from "@huin-core/react-primitive";
|
22
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
23
|
+
var ITEM_NAME = "BreadcrumbItem";
|
24
|
+
var BreadcrumbItem = React3.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx3(Primitive3.li, { ref, ...props }));
|
25
|
+
BreadcrumbItem.displayName = ITEM_NAME;
|
26
|
+
|
27
|
+
// packages/react/breadcrumb/src/BreadcrumbLink.tsx
|
28
|
+
import React4 from "react";
|
29
|
+
import { Slot } from "@huin-core/react-slot";
|
30
|
+
import { Primitive as Primitive4 } from "@huin-core/react-primitive";
|
31
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
32
|
+
var LINK_NAME = "BreadcrumbLink";
|
33
|
+
var BreadcrumbLink = React4.forwardRef(({ asChild, ...props }, ref) => {
|
34
|
+
const Comp = asChild ? Slot : Primitive4.a;
|
35
|
+
return /* @__PURE__ */ jsx4(Comp, { ref, ...props });
|
36
|
+
});
|
37
|
+
BreadcrumbLink.displayName = LINK_NAME;
|
38
|
+
|
39
|
+
// packages/react/breadcrumb/src/BreadcrumbPage.tsx
|
40
|
+
import { Primitive as Primitive5 } from "@huin-core/react-primitive";
|
41
|
+
import React5 from "react";
|
42
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
43
|
+
var PAGE_NAME = "BreadcrumbPage";
|
44
|
+
var BreadcrumbPage = React5.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx5(
|
45
|
+
Primitive5.span,
|
46
|
+
{
|
47
|
+
ref,
|
48
|
+
role: "link",
|
49
|
+
"aria-disabled": "true",
|
50
|
+
"aria-current": "page",
|
51
|
+
...props
|
52
|
+
}
|
53
|
+
));
|
54
|
+
BreadcrumbPage.displayName = PAGE_NAME;
|
55
|
+
|
56
|
+
// packages/react/breadcrumb/src/BreadcrumbSeparator.tsx
|
57
|
+
import { Primitive as Primitive6 } from "@huin-core/react-primitive";
|
58
|
+
import React6 from "react";
|
59
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
60
|
+
var SEPARATOR_NAME = "BreadcrumbSeparator";
|
61
|
+
var BreadcrumbSeparator = React6.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx6(Primitive6.li, { role: "presentation", ref, "aria-hidden": "true", ...props }));
|
62
|
+
BreadcrumbSeparator.displayName = SEPARATOR_NAME;
|
63
|
+
|
64
|
+
// packages/react/breadcrumb/src/BreadcrumbEllipsis.tsx
|
65
|
+
import { Primitive as Primitive7 } from "@huin-core/react-primitive";
|
66
|
+
import React7 from "react";
|
67
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
68
|
+
var ELLIPSISNAME = "BreadcrumbElipssis";
|
69
|
+
var BreadcrumbEllipsis = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
70
|
+
Primitive7.span,
|
71
|
+
{
|
72
|
+
role: "presentation",
|
73
|
+
"aria-hidden": "true",
|
74
|
+
...props
|
75
|
+
}
|
76
|
+
));
|
77
|
+
BreadcrumbEllipsis.displayName = ELLIPSISNAME;
|
78
|
+
export {
|
79
|
+
Breadcrumb,
|
80
|
+
BreadcrumbEllipsis,
|
81
|
+
BreadcrumbItem,
|
82
|
+
BreadcrumbLink,
|
83
|
+
BreadcrumbList,
|
84
|
+
BreadcrumbPage,
|
85
|
+
BreadcrumbSeparator
|
86
|
+
};
|
87
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/Breadcrumb.tsx", "../src/BreadcrumbList.tsx", "../src/BreadcrumbItem.tsx", "../src/BreadcrumbLink.tsx", "../src/BreadcrumbPage.tsx", "../src/BreadcrumbSeparator.tsx", "../src/BreadcrumbEllipsis.tsx"],
|
4
|
+
"sourcesContent": ["import * as React from \"react\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\n/* -------------------------------------------------------------------------------------------------\n * Breadcrumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = \"Breadcrumb\";\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => (\n <Primitive.nav ref={ref} aria-label=\"breadcrumb\" {...props} />\n));\nBreadcrumb.displayName = ROOT_NAME;\n\nexport { Breadcrumb };\n", "import React from \"react\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\nconst LIST_NAME = \"BreadcrumbList\";\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ ...props }, ref) => <Primitive.ol ref={ref} {...props} />);\nBreadcrumbList.displayName = LIST_NAME;\n\nexport { BreadcrumbList };\n", "import React from \"react\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\nconst ITEM_NAME = \"BreadcrumbItem\";\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ ...props }, ref) => <Primitive.li ref={ref} {...props} />);\nBreadcrumbItem.displayName = ITEM_NAME;\n\nexport { BreadcrumbItem };\n", "import React from \"react\";\nimport { Slot } from \"@huin-core/react-slot\";\nimport { Primitive } from \"@huin-core/react-primitive\";\n\nconst LINK_NAME = \"BreadcrumbLink\";\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<typeof Primitive.a> & {\n asChild?: boolean;\n }\n>(({ asChild, ...props }, ref) => {\n const Comp = asChild ? Slot : Primitive.a;\n\n return <Comp ref={ref} {...props} />;\n});\nBreadcrumbLink.displayName = LINK_NAME;\n\nexport { BreadcrumbLink };\n", "import { Primitive } from \"@huin-core/react-primitive\";\nimport React from \"react\";\n\nconst PAGE_NAME = \"BreadcrumbPage\";\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<typeof Primitive.span>\n>(({ ...props }, ref) => (\n <Primitive.span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n {...props}\n />\n));\nBreadcrumbPage.displayName = PAGE_NAME;\n\nexport { BreadcrumbPage };\n", "import { Primitive } from \"@huin-core/react-primitive\";\nimport React from \"react\";\n\nconst SEPARATOR_NAME = \"BreadcrumbSeparator\";\nconst BreadcrumbSeparator = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<typeof Primitive.li>\n>(({ children, ...props }, ref) => (\n <Primitive.li role=\"presentation\" ref={ref} aria-hidden=\"true\" {...props} />\n));\n\nBreadcrumbSeparator.displayName = SEPARATOR_NAME;\n\nexport { BreadcrumbSeparator };\n", "import { Primitive } from \"@huin-core/react-primitive\";\nimport React from \"react\";\n\nconst ELLIPSISNAME = \"BreadcrumbElipssis\";\nconst BreadcrumbEllipsis = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<typeof Primitive.span>\n>(({ className, ...props }, ref) => (\n <Primitive.span\n role=\"presentation\"\n aria-hidden=\"true\"\n {...props}\n />\n \n \n));\n\nBreadcrumbEllipsis.displayName = ELLIPSISNAME;\n\nexport { BreadcrumbEllipsis };\n"],
|
5
|
+
"mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAaxB;AAPF,IAAM,YAAY;AAClB,IAAM,aAAmB,iBAKvB,CAAC,EAAE,GAAG,MAAM,GAAG,Q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,gBAAAC,YAAA;AALF,IAAM,iBAAiB;AACvB,IAAM,sBAAsBD,OAAM,WAGhC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QACzB,gBAAAC,KAACF,WAAU,IAAV,EAAa,MAAK,gBAAe,KAAU,eAAY,QAAQ,GAAG,OAAO,CAC3E;AAED,oBAAoB,cAAc;;;ACXlC,SAAS,aAAAG,kBAAiB;AAC1B,OAAOC,YAAW;AAOhB,gBAAAC,YAAA;AALF,IAAM,eAAe;AACrB,IAAM,qBAAqBD,OAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAC;AAAA,EAACF,WAAU;AAAA,EAAV;AAAA,IACC,MAAK;AAAA,IACL,eAAY;AAAA,IACX,GAAG;AAAA;AACN,CAGD;AAED,mBAAmB,cAAc;",
|
6
|
+
"names": ["React", "Primitive", "jsx", "React", "Primitive", "jsx", "React", "Primitive", "jsx", "Primitive", "React", "jsx", "Primitive", "React", "jsx", "Primitive", "React", "jsx"]
|
7
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@huin-core/react-breadcrumb",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.3",
|
4
4
|
"license": "MIT",
|
5
5
|
"exports": {
|
6
6
|
".": {
|
@@ -28,11 +28,11 @@
|
|
28
28
|
"version": "yarn version"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@huin-core/primitive": "
|
32
|
-
"@huin-core/react-compose-refs": "
|
33
|
-
"@huin-core/react-context": "
|
34
|
-
"@huin-core/react-primitive": "
|
35
|
-
"@huin-core/react-slot": "
|
31
|
+
"@huin-core/primitive": "latest",
|
32
|
+
"@huin-core/react-compose-refs": "latest",
|
33
|
+
"@huin-core/react-context": "latest",
|
34
|
+
"@huin-core/react-primitive": "latest",
|
35
|
+
"@huin-core/react-slot": "latest"
|
36
36
|
},
|
37
37
|
"peerDependencies": {
|
38
38
|
"@types/react": "*",
|