@elliemae/ds-breadcrumb 3.16.0-next.2 → 3.16.0-next.4
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/cjs/DSBreadcrumb.js +7 -7
- package/dist/cjs/DSBreadcrumb.js.map +2 -2
- package/dist/cjs/DSBreadcrumbItem.js +11 -11
- package/dist/cjs/DSBreadcrumbItem.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/esm/DSBreadcrumb.js +1 -1
- package/dist/esm/DSBreadcrumb.js.map +1 -1
- package/dist/esm/DSBreadcrumbItem.js +1 -1
- package/dist/esm/DSBreadcrumbItem.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/types/DSBreadcrumb.d.ts +15 -15
- package/dist/types/DSBreadcrumbItem.d.ts +10 -10
- package/package.json +6 -5
package/dist/cjs/DSBreadcrumb.js
CHANGED
|
@@ -33,7 +33,7 @@ module.exports = __toCommonJS(DSBreadcrumb_exports);
|
|
|
33
33
|
var React = __toESM(require("react"));
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
36
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
37
|
var import_DSBreadcrumbItem = __toESM(require("./DSBreadcrumbItem"));
|
|
38
38
|
var import_useKeyboardNavigation = require("./hooks/useKeyboardNavigation");
|
|
39
39
|
var import_styles = require("./styles");
|
|
@@ -76,19 +76,19 @@ const DSBreadcrumb = ({
|
|
|
76
76
|
};
|
|
77
77
|
DSBreadcrumb.Item = import_DSBreadcrumbItem.default;
|
|
78
78
|
const props = {
|
|
79
|
-
containerProps:
|
|
80
|
-
as:
|
|
79
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("props injected to breadcrumb wrapper"),
|
|
80
|
+
as: import_ds_props_helpers.PropTypes.string.description(
|
|
81
81
|
"Type of element you want the main container to be: 'nav', 'div', 'header', 'footer', 'main'"
|
|
82
82
|
),
|
|
83
|
-
isTitle:
|
|
83
|
+
isTitle: import_ds_props_helpers.PropTypes.bool.description(
|
|
84
84
|
"Whether to show the last element of the breadcrumb as a title. Also removes trailing slash to show last element as title"
|
|
85
85
|
),
|
|
86
|
-
label:
|
|
87
|
-
children:
|
|
86
|
+
label: import_ds_props_helpers.PropTypes.string.description("breadcrumb label"),
|
|
87
|
+
children: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.element).isRequired.description("Container items to wrap")
|
|
88
88
|
};
|
|
89
89
|
DSBreadcrumb.propTypes = props;
|
|
90
90
|
DSBreadcrumb.displayName = "DSBreadcrumb";
|
|
91
|
-
const DSBreadcrumbWithSchema = (0,
|
|
91
|
+
const DSBreadcrumbWithSchema = (0, import_ds_props_helpers.describe)(DSBreadcrumb);
|
|
92
92
|
DSBreadcrumbWithSchema.propTypes = props;
|
|
93
93
|
var DSBreadcrumb_default = DSBreadcrumb;
|
|
94
94
|
//# sourceMappingURL=DSBreadcrumb.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSBreadcrumb.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { cloneElement, useMemo } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BjB;AA9BN,mBAA6C;AAC7C,
|
|
4
|
+
"sourcesContent": ["import React, { cloneElement, useMemo } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport DSBreadcrumbItem from './DSBreadcrumbItem';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation';\nimport type { DSBreadcrumbPropsT } from './index.d';\nimport { StyledContainer, StyledList } from './styles';\n\nconst htmlElements = ['nav', 'div', 'header', 'footer', 'main'] as const;\n\nconst DSBreadcrumb = ({\n containerProps = {},\n as = 'nav',\n label = 'Breadcrumb',\n isTitle = false,\n children,\n trailingSlash = true,\n ...rest\n}: DSBreadcrumbPropsT): React.ReactElement => {\n const [addRef, onKeyDown] = useKeyboardNavigation();\n\n const safeElement = useMemo(() => (htmlElements.indexOf(as) > -1 ? as : 'nav'), [as]);\n\n return (\n <StyledContainer\n aria-label={label}\n data-testid=\"breadcrumb-nav-container\"\n {...rest}\n {...containerProps}\n as={safeElement}\n >\n <StyledList data-testid=\"list-container\">\n {React.Children.map(children, (child: React.ReactElement, childIndex) =>\n childIndex < children.length - 1\n ? cloneElement(child, {\n childIndex,\n addRef,\n onKeyDown,\n })\n : cloneElement(child, {\n childIndex,\n addRef,\n onKeyDown,\n trailingSlash,\n isTitle,\n }),\n )}\n </StyledList>\n </StyledContainer>\n );\n};\n\nDSBreadcrumb.Item = DSBreadcrumbItem;\n\nconst props = {\n /** props injected to breadcrumb wrapper */\n containerProps: PropTypes.object.description('props injected to breadcrumb wrapper'),\n /**\n * Type of element you want the main container to be:\n * 'nav', 'div', 'header', 'footer', 'main'\n */\n as: PropTypes.string.description(\n \"Type of element you want the main container to be: 'nav', 'div', 'header', 'footer', 'main'\",\n ),\n /**\n * Whether to show the last element of the breadcrumb as a title\n * Also removes trailing slash to show last element as title\n */\n isTitle: PropTypes.bool.description(\n 'Whether to show the last element of the breadcrumb as a title. Also removes trailing slash to show last element as title',\n ),\n /** breadcrumb label */\n label: PropTypes.string.description('breadcrumb label'),\n /**\n * Container items to wrap\n */\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Container items to wrap'),\n};\n\nDSBreadcrumb.propTypes = props;\nDSBreadcrumb.displayName = 'DSBreadcrumb';\n\nconst DSBreadcrumbWithSchema = describe(DSBreadcrumb);\nDSBreadcrumbWithSchema.propTypes = props;\n\nexport { DSBreadcrumb, DSBreadcrumbWithSchema, htmlElements };\nexport default DSBreadcrumb;\n",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EA,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA,EAItD,UAAU,kCAAU,QAAQ,kCAAU,OAAO,EAAE,WAAW,YAAY,yBAAyB;AACjG;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAE3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React", "DSBreadcrumbItem"]
|
|
7
7
|
}
|
|
@@ -31,7 +31,7 @@ __export(DSBreadcrumbItem_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(DSBreadcrumbItem_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
35
|
var import_styles = require("./styles");
|
|
36
36
|
const DSBreadcrumbItem = ({
|
|
37
37
|
active = false,
|
|
@@ -73,19 +73,19 @@ const DSBreadcrumbItem = ({
|
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
75
|
const props = {
|
|
76
|
-
containerComponent:
|
|
77
|
-
as:
|
|
78
|
-
active:
|
|
79
|
-
href:
|
|
80
|
-
onClick:
|
|
81
|
-
isTitle:
|
|
82
|
-
trailingSlash:
|
|
83
|
-
label:
|
|
84
|
-
color:
|
|
76
|
+
containerComponent: import_ds_props_helpers.PropTypes.string.description("inject props to wrapper"),
|
|
77
|
+
as: import_ds_props_helpers.PropTypes.string.description("render as any html node"),
|
|
78
|
+
active: import_ds_props_helpers.PropTypes.bool.description("active item"),
|
|
79
|
+
href: import_ds_props_helpers.PropTypes.string.description("href link"),
|
|
80
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("on click handler"),
|
|
81
|
+
isTitle: import_ds_props_helpers.PropTypes.bool.description("style item as title"),
|
|
82
|
+
trailingSlash: import_ds_props_helpers.PropTypes.bool.description("add trailing slash"),
|
|
83
|
+
label: import_ds_props_helpers.PropTypes.string.description("item label"),
|
|
84
|
+
color: import_ds_props_helpers.PropTypes.string.description("link color")
|
|
85
85
|
};
|
|
86
86
|
DSBreadcrumbItem.propTypes = props;
|
|
87
87
|
DSBreadcrumbItem.displayName = "DSBreadcrumbItem";
|
|
88
|
-
const DSBreadcrumbItemWithSchema = (0,
|
|
88
|
+
const DSBreadcrumbItemWithSchema = (0, import_ds_props_helpers.describe)(DSBreadcrumbItem);
|
|
89
89
|
DSBreadcrumbItemWithSchema.propTypes = props;
|
|
90
90
|
var DSBreadcrumbItem_default = DSBreadcrumbItem;
|
|
91
91
|
//# sourceMappingURL=DSBreadcrumbItem.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSBreadcrumbItem.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AAzBJ,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport type { DSBreadcrumbItemPropsT } from './index.d';\nimport { StyledLink, StyledCrumbWrapper } from './styles';\n\nconst DSBreadcrumbItem = ({\n active = false,\n as = 'a',\n href = undefined,\n isTitle,\n onClick = () => null,\n label = '',\n color = null,\n addRef,\n childIndex,\n trailingSlash,\n onKeyDown = () => null,\n ...rest\n}: DSBreadcrumbItemPropsT): React.ReactElement => (\n <StyledCrumbWrapper\n aria-current={active ? 'page' : undefined}\n data-testid=\"breadcrumb-item-container\"\n isTitle={isTitle}\n trailingSlash={trailingSlash}\n {...rest}\n >\n <StyledLink\n variant=\"link\"\n component={as}\n href={href}\n onClick={onClick}\n tabIndex={0}\n isActive={active}\n onKeyDown={(e: React.KeyboardEvent) => onKeyDown(e, childIndex, onClick)}\n isTitle={isTitle}\n color={color}\n innerRef={addRef}\n >\n {label}\n </StyledLink>\n </StyledCrumbWrapper>\n);\n\nconst props = {\n /** inject props to wrapper */\n containerComponent: PropTypes.string.description('inject props to wrapper'),\n /** render as any html node */\n as: PropTypes.string.description('render as any html node'),\n /** active item */\n active: PropTypes.bool.description('active item'),\n /** href link */\n href: PropTypes.string.description('href link'),\n /** on click handler */\n onClick: PropTypes.func.description('on click handler'),\n /** style item as title */\n isTitle: PropTypes.bool.description('style item as title'),\n /** add trailing slash */\n trailingSlash: PropTypes.bool.description('add trailing slash'),\n /** item label */\n label: PropTypes.string.description('item label'),\n /** link color */\n color: PropTypes.string.description('link color'),\n};\n\nDSBreadcrumbItem.propTypes = props;\nDSBreadcrumbItem.displayName = 'DSBreadcrumbItem';\n\nconst DSBreadcrumbItemWithSchema = describe(DSBreadcrumbItem);\nDSBreadcrumbItemWithSchema.propTypes = props;\n\nexport { DSBreadcrumbItem, DSBreadcrumbItemWithSchema };\nexport default DSBreadcrumbItem;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AAzBJ,8BAAoC;AAEpC,oBAA+C;AAE/C,MAAM,mBAAmB,CAAC;AAAA,EACxB,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP;AAAA,EACA,UAAU,MAAM;AAAA,EAChB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY,MAAM;AAAA,KACf;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC,gBAAc,SAAS,SAAS;AAAA,IAChC,eAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,UAAU;AAAA,QACV,WAAW,CAAC,MAA2B,UAAU,GAAG,YAAY,OAAO;AAAA,QACvE;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QAET;AAAA;AAAA,IACH;AAAA;AACF;AAGF,MAAM,QAAQ;AAAA,EAEZ,oBAAoB,kCAAU,OAAO,YAAY,yBAAyB;AAAA,EAE1E,IAAI,kCAAU,OAAO,YAAY,yBAAyB;AAAA,EAE1D,QAAQ,kCAAU,KAAK,YAAY,aAAa;AAAA,EAEhD,MAAM,kCAAU,OAAO,YAAY,WAAW;AAAA,EAE9C,SAAS,kCAAU,KAAK,YAAY,kBAAkB;AAAA,EAEtD,SAAS,kCAAU,KAAK,YAAY,qBAAqB;AAAA,EAEzD,eAAe,kCAAU,KAAK,YAAY,oBAAoB;AAAA,EAE9D,OAAO,kCAAU,OAAO,YAAY,YAAY;AAAA,EAEhD,OAAO,kCAAU,OAAO,YAAY,YAAY;AAClD;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AAE/B,MAAM,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;AAGvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSBreadcrumb.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import React2, { cloneElement, useMemo } from "react";
|
|
4
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
4
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import DSBreadcrumbItem from "./DSBreadcrumbItem";
|
|
6
6
|
import { useKeyboardNavigation } from "./hooks/useKeyboardNavigation";
|
|
7
7
|
import { StyledContainer, StyledList } from "./styles";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSBreadcrumb.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { cloneElement, useMemo } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { cloneElement, useMemo } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport DSBreadcrumbItem from './DSBreadcrumbItem';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation';\nimport type { DSBreadcrumbPropsT } from './index.d';\nimport { StyledContainer, StyledList } from './styles';\n\nconst htmlElements = ['nav', 'div', 'header', 'footer', 'main'] as const;\n\nconst DSBreadcrumb = ({\n containerProps = {},\n as = 'nav',\n label = 'Breadcrumb',\n isTitle = false,\n children,\n trailingSlash = true,\n ...rest\n}: DSBreadcrumbPropsT): React.ReactElement => {\n const [addRef, onKeyDown] = useKeyboardNavigation();\n\n const safeElement = useMemo(() => (htmlElements.indexOf(as) > -1 ? as : 'nav'), [as]);\n\n return (\n <StyledContainer\n aria-label={label}\n data-testid=\"breadcrumb-nav-container\"\n {...rest}\n {...containerProps}\n as={safeElement}\n >\n <StyledList data-testid=\"list-container\">\n {React.Children.map(children, (child: React.ReactElement, childIndex) =>\n childIndex < children.length - 1\n ? cloneElement(child, {\n childIndex,\n addRef,\n onKeyDown,\n })\n : cloneElement(child, {\n childIndex,\n addRef,\n onKeyDown,\n trailingSlash,\n isTitle,\n }),\n )}\n </StyledList>\n </StyledContainer>\n );\n};\n\nDSBreadcrumb.Item = DSBreadcrumbItem;\n\nconst props = {\n /** props injected to breadcrumb wrapper */\n containerProps: PropTypes.object.description('props injected to breadcrumb wrapper'),\n /**\n * Type of element you want the main container to be:\n * 'nav', 'div', 'header', 'footer', 'main'\n */\n as: PropTypes.string.description(\n \"Type of element you want the main container to be: 'nav', 'div', 'header', 'footer', 'main'\",\n ),\n /**\n * Whether to show the last element of the breadcrumb as a title\n * Also removes trailing slash to show last element as title\n */\n isTitle: PropTypes.bool.description(\n 'Whether to show the last element of the breadcrumb as a title. Also removes trailing slash to show last element as title',\n ),\n /** breadcrumb label */\n label: PropTypes.string.description('breadcrumb label'),\n /**\n * Container items to wrap\n */\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Container items to wrap'),\n};\n\nDSBreadcrumb.propTypes = props;\nDSBreadcrumb.displayName = 'DSBreadcrumb';\n\nconst DSBreadcrumbWithSchema = describe(DSBreadcrumb);\nDSBreadcrumbWithSchema.propTypes = props;\n\nexport { DSBreadcrumb, DSBreadcrumbWithSchema, htmlElements };\nexport default DSBreadcrumb;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC8BjB;AA9BN,OAAOA,UAAS,cAAc,eAAe;AAC7C,SAAS,WAAW,gBAAgB;AACpC,OAAO,sBAAsB;AAC7B,SAAS,6BAA6B;AAEtC,SAAS,iBAAiB,kBAAkB;AAE5C,MAAM,eAAe,CAAC,OAAO,OAAO,UAAU,UAAU,MAAM;AAE9D,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,UAAU;AAAA,EACV;AAAA,EACA,gBAAgB;AAAA,KACb;AACL,MAA8C;AAC5C,QAAM,CAAC,QAAQ,SAAS,IAAI,sBAAsB;AAElD,QAAM,cAAc,QAAQ,MAAO,aAAa,QAAQ,EAAE,IAAI,KAAK,KAAK,OAAQ,CAAC,EAAE,CAAC;AAEpF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ,eAAY;AAAA,MACX,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,IAAI;AAAA,MAEJ,8BAAC,cAAW,eAAY,kBACrB,UAAAA,OAAM,SAAS;AAAA,QAAI;AAAA,QAAU,CAAC,OAA2B,eACxD,aAAa,SAAS,SAAS,IAC3B,aAAa,OAAO;AAAA,UAClB;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC,IACD,aAAa,OAAO;AAAA,UAClB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACP,GACF;AAAA;AAAA,EACF;AAEJ;AAEA,aAAa,OAAO;AAEpB,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,sCAAsC;AAAA,EAKnF,IAAI,UAAU,OAAO;AAAA,IACnB;AAAA,EACF;AAAA,EAKA,SAAS,UAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA,EAEA,OAAO,UAAU,OAAO,YAAY,kBAAkB;AAAA,EAItD,UAAU,UAAU,QAAQ,UAAU,OAAO,EAAE,WAAW,YAAY,yBAAyB;AACjG;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAE3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { StyledLink, StyledCrumbWrapper } from "./styles";
|
|
5
5
|
const DSBreadcrumbItem = ({
|
|
6
6
|
active = false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSBreadcrumbItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport type { DSBreadcrumbItemPropsT } from './index.d';\nimport { StyledLink, StyledCrumbWrapper } from './styles';\n\nconst DSBreadcrumbItem = ({\n active = false,\n as = 'a',\n href = undefined,\n isTitle,\n onClick = () => null,\n label = '',\n color = null,\n addRef,\n childIndex,\n trailingSlash,\n onKeyDown = () => null,\n ...rest\n}: DSBreadcrumbItemPropsT): React.ReactElement => (\n <StyledCrumbWrapper\n aria-current={active ? 'page' : undefined}\n data-testid=\"breadcrumb-item-container\"\n isTitle={isTitle}\n trailingSlash={trailingSlash}\n {...rest}\n >\n <StyledLink\n variant=\"link\"\n component={as}\n href={href}\n onClick={onClick}\n tabIndex={0}\n isActive={active}\n onKeyDown={(e: React.KeyboardEvent) => onKeyDown(e, childIndex, onClick)}\n isTitle={isTitle}\n color={color}\n innerRef={addRef}\n >\n {label}\n </StyledLink>\n </StyledCrumbWrapper>\n);\n\nconst props = {\n /** inject props to wrapper */\n containerComponent: PropTypes.string.description('inject props to wrapper'),\n /** render as any html node */\n as: PropTypes.string.description('render as any html node'),\n /** active item */\n active: PropTypes.bool.description('active item'),\n /** href link */\n href: PropTypes.string.description('href link'),\n /** on click handler */\n onClick: PropTypes.func.description('on click handler'),\n /** style item as title */\n isTitle: PropTypes.bool.description('style item as title'),\n /** add trailing slash */\n trailingSlash: PropTypes.bool.description('add trailing slash'),\n /** item label */\n label: PropTypes.string.description('item label'),\n /** link color */\n color: PropTypes.string.description('link color'),\n};\n\nDSBreadcrumbItem.propTypes = props;\nDSBreadcrumbItem.displayName = 'DSBreadcrumbItem';\n\nconst DSBreadcrumbItemWithSchema = describe(DSBreadcrumbItem);\nDSBreadcrumbItemWithSchema.propTypes = props;\n\nexport { DSBreadcrumbItem, DSBreadcrumbItemWithSchema };\nexport default DSBreadcrumbItem;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC0BnB;AAzBJ,SAAS,WAAW,gBAAgB;AAEpC,SAAS,YAAY,0BAA0B;AAE/C,MAAM,mBAAmB,CAAC;AAAA,EACxB,SAAS;AAAA,E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ailingSlash, onKeyDown, ...rest }: import("./index.d").DSBreadcrumbItemPropsT): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
8
8
|
propTypes: {
|
|
9
|
-
containerComponent: import("@elliemae/ds-
|
|
10
|
-
as: import("@elliemae/ds-
|
|
11
|
-
active: import("@elliemae/ds-
|
|
12
|
-
href: import("@elliemae/ds-
|
|
13
|
-
onClick: import("@elliemae/ds-
|
|
14
|
-
isTitle: import("@elliemae/ds-
|
|
15
|
-
trailingSlash: import("@elliemae/ds-
|
|
16
|
-
label: import("@elliemae/ds-
|
|
17
|
-
color: import("@elliemae/ds-
|
|
9
|
+
containerComponent: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
10
|
+
as: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
11
|
+
active: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
12
|
+
href: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
13
|
+
onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
14
|
+
isTitle: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
15
|
+
trailingSlash: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
16
|
+
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
17
|
+
color: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
18
|
};
|
|
19
19
|
displayName: string;
|
|
20
20
|
};
|
|
21
21
|
propTypes: {
|
|
22
22
|
/** props injected to breadcrumb wrapper */
|
|
23
|
-
containerProps: import("@elliemae/ds-
|
|
23
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
24
24
|
/**
|
|
25
25
|
* Type of element you want the main container to be:
|
|
26
26
|
* 'nav', 'div', 'header', 'footer', 'main'
|
|
27
27
|
*/
|
|
28
|
-
as: import("@elliemae/ds-
|
|
28
|
+
as: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
29
29
|
/**
|
|
30
30
|
* Whether to show the last element of the breadcrumb as a title
|
|
31
31
|
* Also removes trailing slash to show last element as title
|
|
32
32
|
*/
|
|
33
|
-
isTitle: import("@elliemae/ds-
|
|
33
|
+
isTitle: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
34
34
|
/** breadcrumb label */
|
|
35
|
-
label: import("@elliemae/ds-
|
|
35
|
+
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
36
36
|
/**
|
|
37
37
|
* Container items to wrap
|
|
38
38
|
*/
|
|
39
|
-
children: import("@elliemae/ds-
|
|
39
|
+
children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
40
40
|
};
|
|
41
41
|
displayName: string;
|
|
42
42
|
};
|
|
43
|
-
declare const DSBreadcrumbWithSchema: import("@elliemae/ds-
|
|
43
|
+
declare const DSBreadcrumbWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSBreadcrumbPropsT>;
|
|
44
44
|
export { DSBreadcrumb, DSBreadcrumbWithSchema, htmlElements };
|
|
45
45
|
export default DSBreadcrumb;
|
|
@@ -4,26 +4,26 @@ declare const DSBreadcrumbItem: {
|
|
|
4
4
|
({ active, as, href, isTitle, onClick, label, color, addRef, childIndex, trailingSlash, onKeyDown, ...rest }: DSBreadcrumbItemPropsT): React.ReactElement;
|
|
5
5
|
propTypes: {
|
|
6
6
|
/** inject props to wrapper */
|
|
7
|
-
containerComponent: import("@elliemae/ds-
|
|
7
|
+
containerComponent: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
8
8
|
/** render as any html node */
|
|
9
|
-
as: import("@elliemae/ds-
|
|
9
|
+
as: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
10
10
|
/** active item */
|
|
11
|
-
active: import("@elliemae/ds-
|
|
11
|
+
active: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
12
12
|
/** href link */
|
|
13
|
-
href: import("@elliemae/ds-
|
|
13
|
+
href: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
14
14
|
/** on click handler */
|
|
15
|
-
onClick: import("@elliemae/ds-
|
|
15
|
+
onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
16
16
|
/** style item as title */
|
|
17
|
-
isTitle: import("@elliemae/ds-
|
|
17
|
+
isTitle: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
18
|
/** add trailing slash */
|
|
19
|
-
trailingSlash: import("@elliemae/ds-
|
|
19
|
+
trailingSlash: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
20
|
/** item label */
|
|
21
|
-
label: import("@elliemae/ds-
|
|
21
|
+
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
22
|
/** link color */
|
|
23
|
-
color: import("@elliemae/ds-
|
|
23
|
+
color: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
24
24
|
};
|
|
25
25
|
displayName: string;
|
|
26
26
|
};
|
|
27
|
-
declare const DSBreadcrumbItemWithSchema: import("@elliemae/ds-
|
|
27
|
+
declare const DSBreadcrumbItemWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSBreadcrumbItemPropsT>;
|
|
28
28
|
export { DSBreadcrumbItem, DSBreadcrumbItemWithSchema };
|
|
29
29
|
export default DSBreadcrumbItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-breadcrumb",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Breadcrumb",
|
|
6
6
|
"files": [
|
|
@@ -51,9 +51,10 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-
|
|
55
|
-
"@elliemae/ds-
|
|
56
|
-
"@elliemae/ds-
|
|
54
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.4",
|
|
55
|
+
"@elliemae/ds-system": "3.16.0-next.4",
|
|
56
|
+
"@elliemae/ds-typography": "3.16.0-next.4",
|
|
57
|
+
"@elliemae/ds-utilities": "3.16.0-next.4"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@elliemae/pui-theme": "~2.6.0",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
80
81
|
"dts": "node ../../scripts/dts.mjs",
|
|
81
82
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
82
|
-
"dev:build": "pnpm --filter {.}... build
|
|
83
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
83
84
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
84
85
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
85
86
|
}
|