@nexus-cross/design-system 1.0.7 → 1.0.9
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/breadcrumb.js +6 -2
- package/dist/breadcrumb.mjs +1 -1
- package/dist/chunks/chunk-DDY7ENHX.mjs +53 -0
- package/dist/chunks/chunk-WATCVNBT.js +76 -0
- package/dist/components/Breadcrumb.d.ts +16 -8
- package/dist/components/Breadcrumb.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.mjs +1 -1
- package/dist/schemas/_all.json +6 -26
- package/dist/schemas/breadcrumb.d.ts +13 -23
- package/dist/schemas/breadcrumb.d.ts.map +1 -1
- package/dist/schemas/breadcrumb.json +6 -26
- package/dist/schemas.js +11 -10
- package/dist/schemas.mjs +11 -10
- package/package.json +2 -2
- package/dist/chunks/chunk-3ZWN66YH.js +0 -53
- package/dist/chunks/chunk-EJY7IVSK.mjs +0 -31
package/dist/breadcrumb.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWATCVNBT_js = require('./chunks/chunk-WATCVNBT.js');
|
|
4
4
|
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
5
|
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
6
|
|
|
@@ -8,5 +8,9 @@ require('./chunks/chunk-JNMCYWGY.js');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "Breadcrumb", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkWATCVNBT_js.Breadcrumb; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "BreadcrumbItem", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkWATCVNBT_js.BreadcrumbItem; }
|
|
12
16
|
});
|
package/dist/breadcrumb.mjs
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { cn } from './chunk-MCKOWMLS.mjs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var ChevronRight = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M6 4l4 4-4 4", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
6
|
+
var BreadcrumbItem = ({ children, className }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx("span", { className, children });
|
|
8
|
+
};
|
|
9
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
10
|
+
var Breadcrumb = Object.assign(
|
|
11
|
+
React.forwardRef(
|
|
12
|
+
({ className, children, separator, maxItems, ...props }, ref) => {
|
|
13
|
+
const items = React.Children.toArray(children).filter(
|
|
14
|
+
(child) => React.isValidElement(child) && child.type?.displayName === "BreadcrumbItem"
|
|
15
|
+
);
|
|
16
|
+
const entries = [];
|
|
17
|
+
if (maxItems && maxItems > 2 && items.length > maxItems) {
|
|
18
|
+
entries.push({ type: "item", element: items[0], isLast: false });
|
|
19
|
+
entries.push({ type: "ellipsis" });
|
|
20
|
+
const tail = items.slice(-(maxItems - 2));
|
|
21
|
+
tail.forEach(
|
|
22
|
+
(el, i) => entries.push({ type: "item", element: el, isLast: i === tail.length - 1 })
|
|
23
|
+
);
|
|
24
|
+
} else {
|
|
25
|
+
items.forEach(
|
|
26
|
+
(el, i) => entries.push({ type: "item", element: el, isLast: i === items.length - 1 })
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
const sep = separator ?? /* @__PURE__ */ jsx(ChevronRight, { className: "nexus-breadcrumb__separator-icon" });
|
|
30
|
+
return /* @__PURE__ */ jsx("nav", { ref, "aria-label": "Breadcrumb", className: cn("nexus-breadcrumb", className), ...props, children: /* @__PURE__ */ jsx("ol", { className: "nexus-breadcrumb__list", children: entries.map((entry, i) => /* @__PURE__ */ jsxs(
|
|
31
|
+
"li",
|
|
32
|
+
{
|
|
33
|
+
className: "nexus-breadcrumb__item",
|
|
34
|
+
...entry.type === "item" && entry.isLast ? { "aria-current": "page" } : void 0,
|
|
35
|
+
children: [
|
|
36
|
+
i > 0 && /* @__PURE__ */ jsx("span", { className: "nexus-breadcrumb__separator", "aria-hidden": "true", children: sep }),
|
|
37
|
+
entry.type === "ellipsis" ? /* @__PURE__ */ jsx("span", { className: "nexus-breadcrumb__ellipsis", children: "\u2026" }) : React.cloneElement(entry.element, {
|
|
38
|
+
className: cn(
|
|
39
|
+
entry.isLast ? "nexus-breadcrumb__current" : void 0,
|
|
40
|
+
entry.element.props.className
|
|
41
|
+
)
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
i
|
|
46
|
+
)) }) });
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
{ Item: BreadcrumbItem }
|
|
50
|
+
);
|
|
51
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
52
|
+
|
|
53
|
+
export { Breadcrumb, BreadcrumbItem };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
+
|
|
27
|
+
var ChevronRight = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 4l4 4-4 4", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
28
|
+
var BreadcrumbItem = ({ children, className }) => {
|
|
29
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, children });
|
|
30
|
+
};
|
|
31
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
32
|
+
var Breadcrumb = Object.assign(
|
|
33
|
+
React__namespace.forwardRef(
|
|
34
|
+
({ className, children, separator, maxItems, ...props }, ref) => {
|
|
35
|
+
const items = React__namespace.Children.toArray(children).filter(
|
|
36
|
+
(child) => React__namespace.isValidElement(child) && child.type?.displayName === "BreadcrumbItem"
|
|
37
|
+
);
|
|
38
|
+
const entries = [];
|
|
39
|
+
if (maxItems && maxItems > 2 && items.length > maxItems) {
|
|
40
|
+
entries.push({ type: "item", element: items[0], isLast: false });
|
|
41
|
+
entries.push({ type: "ellipsis" });
|
|
42
|
+
const tail = items.slice(-(maxItems - 2));
|
|
43
|
+
tail.forEach(
|
|
44
|
+
(el, i) => entries.push({ type: "item", element: el, isLast: i === tail.length - 1 })
|
|
45
|
+
);
|
|
46
|
+
} else {
|
|
47
|
+
items.forEach(
|
|
48
|
+
(el, i) => entries.push({ type: "item", element: el, isLast: i === items.length - 1 })
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
const sep = separator ?? /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { className: "nexus-breadcrumb__separator-icon" });
|
|
52
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "Breadcrumb", className: chunkCZC76ZD5_js.cn("nexus-breadcrumb", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "nexus-breadcrumb__list", children: entries.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
53
|
+
"li",
|
|
54
|
+
{
|
|
55
|
+
className: "nexus-breadcrumb__item",
|
|
56
|
+
...entry.type === "item" && entry.isLast ? { "aria-current": "page" } : void 0,
|
|
57
|
+
children: [
|
|
58
|
+
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-breadcrumb__separator", "aria-hidden": "true", children: sep }),
|
|
59
|
+
entry.type === "ellipsis" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-breadcrumb__ellipsis", children: "\u2026" }) : React__namespace.cloneElement(entry.element, {
|
|
60
|
+
className: chunkCZC76ZD5_js.cn(
|
|
61
|
+
entry.isLast ? "nexus-breadcrumb__current" : void 0,
|
|
62
|
+
entry.element.props.className
|
|
63
|
+
)
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
i
|
|
68
|
+
)) }) });
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
{ Item: BreadcrumbItem }
|
|
72
|
+
);
|
|
73
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
74
|
+
|
|
75
|
+
exports.Breadcrumb = Breadcrumb;
|
|
76
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
interface
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onClick?: () => void;
|
|
2
|
+
interface BreadcrumbItemProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
6
5
|
}
|
|
6
|
+
declare const BreadcrumbItem: {
|
|
7
|
+
({ children, className }: BreadcrumbItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
7
10
|
interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
|
-
|
|
11
|
+
children: React.ReactNode;
|
|
9
12
|
separator?: React.ReactNode;
|
|
10
13
|
maxItems?: number;
|
|
11
14
|
}
|
|
12
|
-
declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>> & {
|
|
16
|
+
Item: {
|
|
17
|
+
({ children, className }: BreadcrumbItemProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export { Breadcrumb, BreadcrumbItem };
|
|
22
|
+
export type { BreadcrumbProps, BreadcrumbItemProps };
|
|
15
23
|
//# sourceMappingURL=Breadcrumb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumb.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumb.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,cAAc;8BAA6B,mBAAmB;;CAEnE,CAAC;AAKF,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD,QAAA,MAAM,UAAU;;kCAjBiC,mBAAmB;;;CAyEnE,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export { Drawer, DrawerRoot, DrawerTrigger, DrawerContent, DrawerClose, DrawerTi
|
|
|
35
35
|
export type { DrawerRootProps, DrawerContentProps, DrawerDirection, } from './components/Drawer';
|
|
36
36
|
export { Button, buttonVariants } from './components/Button';
|
|
37
37
|
export type { ButtonProps } from './components/Button';
|
|
38
|
-
export { Breadcrumb } from './components/Breadcrumb';
|
|
39
|
-
export type { BreadcrumbProps,
|
|
38
|
+
export { Breadcrumb, BreadcrumbItem } from './components/Breadcrumb';
|
|
39
|
+
export type { BreadcrumbProps, BreadcrumbItemProps } from './components/Breadcrumb';
|
|
40
40
|
export { Chip, chipVariants } from './components/Chip';
|
|
41
41
|
export type { ChipProps } from './components/Chip';
|
|
42
42
|
export { Badge, badgeVariants } from './components/Badge';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAG5D,YAAY,EACV,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAGtD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,C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AAuB,CAAA;AAG1D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAG9D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,YAAY,EACV,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,4BAA4B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var chunkNFIPQZ4O_js = require('./chunks/chunk-NFIPQZ4O.js');
|
|
|
15
15
|
var chunkPEIEVKD5_js = require('./chunks/chunk-PEIEVKD5.js');
|
|
16
16
|
var chunkEVOOTSY5_js = require('./chunks/chunk-EVOOTSY5.js');
|
|
17
17
|
var chunkPDJTSQOC_js = require('./chunks/chunk-PDJTSQOC.js');
|
|
18
|
-
var
|
|
18
|
+
var chunkWATCVNBT_js = require('./chunks/chunk-WATCVNBT.js');
|
|
19
19
|
var chunkX3CTJ7TD_js = require('./chunks/chunk-X3CTJ7TD.js');
|
|
20
20
|
var chunkC2DSAJTL_js = require('./chunks/chunk-C2DSAJTL.js');
|
|
21
21
|
var chunkCV4GMFWP_js = require('./chunks/chunk-CV4GMFWP.js');
|
|
@@ -446,7 +446,11 @@ Object.defineProperty(exports, "emptyStateVariants", {
|
|
|
446
446
|
});
|
|
447
447
|
Object.defineProperty(exports, "Breadcrumb", {
|
|
448
448
|
enumerable: true,
|
|
449
|
-
get: function () { return
|
|
449
|
+
get: function () { return chunkWATCVNBT_js.Breadcrumb; }
|
|
450
|
+
});
|
|
451
|
+
Object.defineProperty(exports, "BreadcrumbItem", {
|
|
452
|
+
enumerable: true,
|
|
453
|
+
get: function () { return chunkWATCVNBT_js.BreadcrumbItem; }
|
|
450
454
|
});
|
|
451
455
|
Object.defineProperty(exports, "Stepper", {
|
|
452
456
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ export { Counter } from './chunks/chunk-CA3SOLI3.mjs';
|
|
|
13
13
|
export { DataList } from './chunks/chunk-K2TBLM3F.mjs';
|
|
14
14
|
export { ErrorBoundary } from './chunks/chunk-VIGRCJAE.mjs';
|
|
15
15
|
export { EmptyState, emptyStateVariants } from './chunks/chunk-YO5MSDPX.mjs';
|
|
16
|
-
export { Breadcrumb } from './chunks/chunk-
|
|
16
|
+
export { Breadcrumb, BreadcrumbItem } from './chunks/chunk-DDY7ENHX.mjs';
|
|
17
17
|
export { Stepper, stepperVariants } from './chunks/chunk-MMCA33FW.mjs';
|
|
18
18
|
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuTrigger } from './chunks/chunk-6DBRL6NA.mjs';
|
|
19
19
|
export { ToggleGroup, toggleGroupVariants } from './chunks/chunk-P73MEU7N.mjs';
|
package/dist/schemas/_all.json
CHANGED
|
@@ -289,43 +289,23 @@
|
|
|
289
289
|
"breadcrumbPropsSchema": {
|
|
290
290
|
"type": "object",
|
|
291
291
|
"properties": {
|
|
292
|
-
"
|
|
293
|
-
"
|
|
294
|
-
"items": {
|
|
295
|
-
"type": "object",
|
|
296
|
-
"properties": {
|
|
297
|
-
"label": {
|
|
298
|
-
"description": "Display text or element (ReactNode)"
|
|
299
|
-
},
|
|
300
|
-
"href": {
|
|
301
|
-
"type": "string",
|
|
302
|
-
"description": "Link URL"
|
|
303
|
-
},
|
|
304
|
-
"onClick": {
|
|
305
|
-
"description": "Click handler () => void"
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
"additionalProperties": false
|
|
309
|
-
},
|
|
310
|
-
"description": "Breadcrumb items array (required)"
|
|
292
|
+
"children": {
|
|
293
|
+
"description": "One or more <Breadcrumb.Item> elements"
|
|
311
294
|
},
|
|
312
295
|
"separator": {
|
|
313
|
-
"description": "Custom separator (ReactNode). Default: chevron"
|
|
296
|
+
"description": "Custom separator (ReactNode). Default: chevron icon"
|
|
314
297
|
},
|
|
315
298
|
"maxItems": {
|
|
316
299
|
"type": "number",
|
|
317
|
-
"description": "Max visible items
|
|
300
|
+
"description": "Max visible items. When exceeded, middle items collapse with \"…\""
|
|
318
301
|
},
|
|
319
302
|
"className": {
|
|
320
303
|
"type": "string",
|
|
321
|
-
"description": "Style override"
|
|
304
|
+
"description": "Style override for the root nav element"
|
|
322
305
|
}
|
|
323
306
|
},
|
|
324
|
-
"required": [
|
|
325
|
-
"items"
|
|
326
|
-
],
|
|
327
307
|
"additionalProperties": false,
|
|
328
|
-
"description": "Breadcrumb navigation.
|
|
308
|
+
"description": "Breadcrumb navigation (compound component pattern). Use <Breadcrumb.Item> children instead of items array. Each Item can wrap arbitrary ReactNode (Link, Select, plain text, etc.)."
|
|
329
309
|
}
|
|
330
310
|
},
|
|
331
311
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const breadcrumbItemPropsSchema: z.ZodObject<{
|
|
3
|
+
children: z.ZodAny;
|
|
4
|
+
className: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
children?: any;
|
|
8
|
+
}, {
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
children?: any;
|
|
11
|
+
}>;
|
|
2
12
|
export declare const breadcrumbPropsSchema: z.ZodObject<{
|
|
3
|
-
|
|
4
|
-
label: z.ZodAny;
|
|
5
|
-
href: z.ZodOptional<z.ZodString>;
|
|
6
|
-
onClick: z.ZodOptional<z.ZodAny>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
label?: any;
|
|
9
|
-
onClick?: any;
|
|
10
|
-
href?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
label?: any;
|
|
13
|
-
onClick?: any;
|
|
14
|
-
href?: string | undefined;
|
|
15
|
-
}>, "many">;
|
|
13
|
+
children: z.ZodAny;
|
|
16
14
|
separator: z.ZodOptional<z.ZodAny>;
|
|
17
15
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
18
16
|
className: z.ZodOptional<z.ZodString>;
|
|
19
17
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
items: {
|
|
21
|
-
label?: any;
|
|
22
|
-
onClick?: any;
|
|
23
|
-
href?: string | undefined;
|
|
24
|
-
}[];
|
|
25
18
|
className?: string | undefined;
|
|
19
|
+
children?: any;
|
|
26
20
|
separator?: any;
|
|
27
21
|
maxItems?: number | undefined;
|
|
28
22
|
}, {
|
|
29
|
-
items: {
|
|
30
|
-
label?: any;
|
|
31
|
-
onClick?: any;
|
|
32
|
-
href?: string | undefined;
|
|
33
|
-
}[];
|
|
34
23
|
className?: string | undefined;
|
|
24
|
+
children?: any;
|
|
35
25
|
separator?: any;
|
|
36
26
|
maxItems?: number | undefined;
|
|
37
27
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/schemas/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/schemas/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB;;;;;;;;;EAKoE,CAAC;AAE3G,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAW/B,CAAC"}
|
|
@@ -4,43 +4,23 @@
|
|
|
4
4
|
"breadcrumbPropsSchema": {
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"items": {
|
|
10
|
-
"type": "object",
|
|
11
|
-
"properties": {
|
|
12
|
-
"label": {
|
|
13
|
-
"description": "Display text or element (ReactNode)"
|
|
14
|
-
},
|
|
15
|
-
"href": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Link URL"
|
|
18
|
-
},
|
|
19
|
-
"onClick": {
|
|
20
|
-
"description": "Click handler () => void"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"additionalProperties": false
|
|
24
|
-
},
|
|
25
|
-
"description": "Breadcrumb items array (required)"
|
|
7
|
+
"children": {
|
|
8
|
+
"description": "One or more <Breadcrumb.Item> elements"
|
|
26
9
|
},
|
|
27
10
|
"separator": {
|
|
28
|
-
"description": "Custom separator (ReactNode). Default: chevron"
|
|
11
|
+
"description": "Custom separator (ReactNode). Default: chevron icon"
|
|
29
12
|
},
|
|
30
13
|
"maxItems": {
|
|
31
14
|
"type": "number",
|
|
32
|
-
"description": "Max visible items
|
|
15
|
+
"description": "Max visible items. When exceeded, middle items collapse with \"…\""
|
|
33
16
|
},
|
|
34
17
|
"className": {
|
|
35
18
|
"type": "string",
|
|
36
|
-
"description": "Style override"
|
|
19
|
+
"description": "Style override for the root nav element"
|
|
37
20
|
}
|
|
38
21
|
},
|
|
39
|
-
"required": [
|
|
40
|
-
"items"
|
|
41
|
-
],
|
|
42
22
|
"additionalProperties": false,
|
|
43
|
-
"description": "Breadcrumb navigation.
|
|
23
|
+
"description": "Breadcrumb navigation (compound component pattern). Use <Breadcrumb.Item> children instead of items array. Each Item can wrap arbitrary ReactNode (Link, Select, plain text, etc.)."
|
|
44
24
|
}
|
|
45
25
|
},
|
|
46
26
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
package/dist/schemas.js
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
require('./chunks/chunk-JNMCYWGY.js');
|
|
4
4
|
var zod = require('zod');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
6
|
+
zod.z.object({
|
|
7
|
+
children: zod.z.any().describe("Content to render inside the breadcrumb item (ReactNode). Can be plain text, Link, Select, or any ReactElement."),
|
|
8
|
+
className: zod.z.string().optional().describe("Additional CSS class")
|
|
9
|
+
}).describe("Breadcrumb.Item \u2014 a single breadcrumb segment. Wrap any content (text, Link, Select, etc.).");
|
|
11
10
|
var breadcrumbPropsSchema = zod.z.object({
|
|
12
|
-
|
|
13
|
-
separator: zod.z.any().optional().describe("Custom separator (ReactNode). Default: chevron"),
|
|
14
|
-
maxItems: zod.z.number().optional().describe('Max visible items
|
|
15
|
-
className: zod.z.string().optional().describe("Style override")
|
|
16
|
-
}).describe(
|
|
11
|
+
children: zod.z.any().describe("One or more <Breadcrumb.Item> elements"),
|
|
12
|
+
separator: zod.z.any().optional().describe("Custom separator (ReactNode). Default: chevron icon"),
|
|
13
|
+
maxItems: zod.z.number().optional().describe('Max visible items. When exceeded, middle items collapse with "\u2026"'),
|
|
14
|
+
className: zod.z.string().optional().describe("Style override for the root nav element")
|
|
15
|
+
}).describe(
|
|
16
|
+
"Breadcrumb navigation (compound component pattern). Use <Breadcrumb.Item> children instead of items array. Each Item can wrap arbitrary ReactNode (Link, Select, plain text, etc.)."
|
|
17
|
+
);
|
|
17
18
|
var buttonPropsSchema = zod.z.object({
|
|
18
19
|
semantic: zod.z.enum(["primary", "secondary", "normal", "danger"]).default("primary").describe(
|
|
19
20
|
"Color theme (primary=main, secondary=sub, normal=neutral, danger=danger)"
|
package/dist/schemas.mjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import './chunks/chunk-CVYXRSXT.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
4
|
+
z.object({
|
|
5
|
+
children: z.any().describe("Content to render inside the breadcrumb item (ReactNode). Can be plain text, Link, Select, or any ReactElement."),
|
|
6
|
+
className: z.string().optional().describe("Additional CSS class")
|
|
7
|
+
}).describe("Breadcrumb.Item \u2014 a single breadcrumb segment. Wrap any content (text, Link, Select, etc.).");
|
|
9
8
|
var breadcrumbPropsSchema = z.object({
|
|
10
|
-
|
|
11
|
-
separator: z.any().optional().describe("Custom separator (ReactNode). Default: chevron"),
|
|
12
|
-
maxItems: z.number().optional().describe('Max visible items
|
|
13
|
-
className: z.string().optional().describe("Style override")
|
|
14
|
-
}).describe(
|
|
9
|
+
children: z.any().describe("One or more <Breadcrumb.Item> elements"),
|
|
10
|
+
separator: z.any().optional().describe("Custom separator (ReactNode). Default: chevron icon"),
|
|
11
|
+
maxItems: z.number().optional().describe('Max visible items. When exceeded, middle items collapse with "\u2026"'),
|
|
12
|
+
className: z.string().optional().describe("Style override for the root nav element")
|
|
13
|
+
}).describe(
|
|
14
|
+
"Breadcrumb navigation (compound component pattern). Use <Breadcrumb.Item> children instead of items array. Each Item can wrap arbitrary ReactNode (Link, Select, plain text, etc.)."
|
|
15
|
+
);
|
|
15
16
|
var buttonPropsSchema = z.object({
|
|
16
17
|
semantic: z.enum(["primary", "secondary", "normal", "danger"]).default("primary").describe(
|
|
17
18
|
"Color theme (primary=main, secondary=sub, normal=neutral, danger=danger)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cross/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "NEXUS Design System UI Components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
"typescript": "^5.0.0",
|
|
349
349
|
"vitest": "^1.6.1",
|
|
350
350
|
"zod-to-json-schema": "^3.25.2",
|
|
351
|
-
"@nexus-cross/tokens": "1.0.
|
|
351
|
+
"@nexus-cross/tokens": "1.0.9"
|
|
352
352
|
},
|
|
353
353
|
"scripts": {
|
|
354
354
|
"postinstall": "node scripts/setup-cursor-rules.cjs",
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n.default = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
-
|
|
27
|
-
var ChevronRight = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 4l4 4-4 4", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
28
|
-
var Breadcrumb = React__namespace.forwardRef(
|
|
29
|
-
({ className, items, separator, maxItems, ...props }, ref) => {
|
|
30
|
-
let displayItems = items;
|
|
31
|
-
let collapsed = false;
|
|
32
|
-
if (maxItems && maxItems > 2 && items.length > maxItems) {
|
|
33
|
-
displayItems = [
|
|
34
|
-
items[0],
|
|
35
|
-
{ label: "..." },
|
|
36
|
-
...items.slice(-(maxItems - 2))
|
|
37
|
-
];
|
|
38
|
-
collapsed = true;
|
|
39
|
-
}
|
|
40
|
-
const sep = separator ?? /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { className: "nexus-breadcrumb__separator-icon" });
|
|
41
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "Breadcrumb", className: chunkCZC76ZD5_js.cn("nexus-breadcrumb", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "nexus-breadcrumb__list", children: displayItems.map((item, i) => {
|
|
42
|
-
const isLast = i === displayItems.length - 1;
|
|
43
|
-
const isCollapsed = collapsed && i === 1;
|
|
44
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "nexus-breadcrumb__item", children: [
|
|
45
|
-
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-breadcrumb__separator", "aria-hidden": "true", children: sep }),
|
|
46
|
-
isCollapsed ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-breadcrumb__ellipsis", children: "\u2026" }) : isLast ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-breadcrumb__current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: "nexus-breadcrumb__link", onClick: item.onClick, children: item.label }) : item.onClick ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "nexus-breadcrumb__link nexus-breadcrumb__link--btn", onClick: item.onClick, children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nexus-breadcrumb__link", children: item.label })
|
|
47
|
-
] }, i);
|
|
48
|
-
}) }) });
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
52
|
-
|
|
53
|
-
exports.Breadcrumb = Breadcrumb;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-MCKOWMLS.mjs';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var ChevronRight = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M6 4l4 4-4 4", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
6
|
-
var Breadcrumb = React.forwardRef(
|
|
7
|
-
({ className, items, separator, maxItems, ...props }, ref) => {
|
|
8
|
-
let displayItems = items;
|
|
9
|
-
let collapsed = false;
|
|
10
|
-
if (maxItems && maxItems > 2 && items.length > maxItems) {
|
|
11
|
-
displayItems = [
|
|
12
|
-
items[0],
|
|
13
|
-
{ label: "..." },
|
|
14
|
-
...items.slice(-(maxItems - 2))
|
|
15
|
-
];
|
|
16
|
-
collapsed = true;
|
|
17
|
-
}
|
|
18
|
-
const sep = separator ?? /* @__PURE__ */ jsx(ChevronRight, { className: "nexus-breadcrumb__separator-icon" });
|
|
19
|
-
return /* @__PURE__ */ jsx("nav", { ref, "aria-label": "Breadcrumb", className: cn("nexus-breadcrumb", className), ...props, children: /* @__PURE__ */ jsx("ol", { className: "nexus-breadcrumb__list", children: displayItems.map((item, i) => {
|
|
20
|
-
const isLast = i === displayItems.length - 1;
|
|
21
|
-
const isCollapsed = collapsed && i === 1;
|
|
22
|
-
return /* @__PURE__ */ jsxs("li", { className: "nexus-breadcrumb__item", children: [
|
|
23
|
-
i > 0 && /* @__PURE__ */ jsx("span", { className: "nexus-breadcrumb__separator", "aria-hidden": "true", children: sep }),
|
|
24
|
-
isCollapsed ? /* @__PURE__ */ jsx("span", { className: "nexus-breadcrumb__ellipsis", children: "\u2026" }) : isLast ? /* @__PURE__ */ jsx("span", { className: "nexus-breadcrumb__current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ jsx("a", { href: item.href, className: "nexus-breadcrumb__link", onClick: item.onClick, children: item.label }) : item.onClick ? /* @__PURE__ */ jsx("button", { type: "button", className: "nexus-breadcrumb__link nexus-breadcrumb__link--btn", onClick: item.onClick, children: item.label }) : /* @__PURE__ */ jsx("span", { className: "nexus-breadcrumb__link", children: item.label })
|
|
25
|
-
] }, i);
|
|
26
|
-
}) }) });
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
30
|
-
|
|
31
|
-
export { Breadcrumb };
|