@availity/mui-breadcrumbs 0.1.0 → 0.1.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.1.2](https://github.com/Availity/element/compare/@availity/mui-breadcrumbs@0.1.1...@availity/mui-breadcrumbs@0.1.2) (2023-07-26)
6
+
7
+ ## [0.1.1](https://github.com/Availity/element/compare/@availity/mui-breadcrumbs@0.1.0...@availity/mui-breadcrumbs@0.1.1) (2023-07-13)
8
+
5
9
  ## 0.1.0 (2023-07-13)
6
10
 
7
11
 
package/dist/index.d.ts CHANGED
@@ -6,11 +6,14 @@ interface Crumb {
6
6
  /** The url for navigating to the ancestor page. */
7
7
  url: string;
8
8
  }
9
- interface BreadcrumbsProps extends Omit<BreadcrumbsProps$1, 'separator'> {
9
+ interface BreadcrumbsProps extends Omit<BreadcrumbsProps$1, 'separator' | 'slotProps' | 'slots'> {
10
10
  /** The name of the active page (the page the user is currently on). */
11
11
  active?: string;
12
12
  children?: React.ReactNode;
13
- /** The ancestor pages. */
13
+ /** The ancestor pages.
14
+ * An array of objects containing the name and url
15
+ * { name: 'Page', url: '#' }
16
+ */
14
17
  crumbs?: Crumb[];
15
18
  /** The value to display when the active page or an ancestor does not have a value.
16
19
  * @default ... */
package/dist/index.js CHANGED
@@ -54,6 +54,8 @@ var Breadcrumbs = ({
54
54
  separator: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_icon.NavigateNextIcon, {
55
55
  fontSize: "small"
56
56
  }),
57
+ slotProps: { collapsedIcon: { className: "breadcrumbs__collapsed-icon" } },
58
+ slots: { CollapsedIcon: import_mui_icon.MoreHorizontalIcon },
57
59
  children: [
58
60
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_link.Link, {
59
61
  "aria-label": "Home",
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/lib/Breadcrumbs.tsx
2
2
  import { Breadcrumbs as MuiBreadcrumbs, Typography } from "@mui/material";
3
- import { NavigateNextIcon } from "@availity/mui-icon";
3
+ import { NavigateNextIcon, MoreHorizontalIcon } from "@availity/mui-icon";
4
4
  import { Link } from "@availity/mui-link";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  var Breadcrumbs = ({
@@ -28,6 +28,8 @@ var Breadcrumbs = ({
28
28
  separator: /* @__PURE__ */ jsx(NavigateNextIcon, {
29
29
  fontSize: "small"
30
30
  }),
31
+ slotProps: { collapsedIcon: { className: "breadcrumbs__collapsed-icon" } },
32
+ slots: { CollapsedIcon: MoreHorizontalIcon },
31
33
  children: [
32
34
  /* @__PURE__ */ jsx(Link, {
33
35
  "aria-label": "Home",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-breadcrumbs",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Availity MUI Breadcrumbs Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -1,5 +1,5 @@
1
1
  import { Breadcrumbs as MuiBreadcrumbs, BreadcrumbsProps as MuiBreadcrumbsProps, Typography } from '@mui/material';
2
- import { NavigateNextIcon } from '@availity/mui-icon';
2
+ import { NavigateNextIcon, MoreHorizontalIcon } from '@availity/mui-icon';
3
3
  import { Link } from '@availity/mui-link';
4
4
 
5
5
  interface Crumb {
@@ -9,11 +9,14 @@ interface Crumb {
9
9
  url: string;
10
10
  }
11
11
 
12
- export interface BreadcrumbsProps extends Omit<MuiBreadcrumbsProps, 'separator'> {
12
+ export interface BreadcrumbsProps extends Omit<MuiBreadcrumbsProps, 'separator' | 'slotProps' | 'slots'> {
13
13
  /** The name of the active page (the page the user is currently on). */
14
14
  active?: string;
15
15
  children?: React.ReactNode;
16
- /** The ancestor pages. */
16
+ /** The ancestor pages.
17
+ * An array of objects containing the name and url
18
+ * { name: 'Page', url: '#' }
19
+ */
17
20
  crumbs?: Crumb[];
18
21
  /** The value to display when the active page or an ancestor does not have a value.
19
22
  * @default ... */
@@ -41,7 +44,12 @@ export const Breadcrumbs = ({
41
44
  };
42
45
 
43
46
  return (
44
- <MuiBreadcrumbs {...rest} separator={<NavigateNextIcon fontSize="small" />}>
47
+ <MuiBreadcrumbs
48
+ {...rest}
49
+ separator={<NavigateNextIcon fontSize="small" />}
50
+ slotProps={{ collapsedIcon: { className: 'breadcrumbs__collapsed-icon' } }}
51
+ slots={{ CollapsedIcon: MoreHorizontalIcon }}
52
+ >
45
53
  <Link aria-label="Home" href={homeUrl}>
46
54
  Home
47
55
  </Link>