@elliemae/ds-breadcrumb 3.22.0-next.22 → 3.22.0-next.24
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.map +2 -2
- package/dist/cjs/DSBreadcrumbItem.js +1 -3
- package/dist/cjs/DSBreadcrumbItem.js.map +2 -2
- package/dist/cjs/{index.d.js → react-desc-prop-types.js} +3 -3
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/styles.js.map +1 -1
- package/dist/esm/DSBreadcrumb.js.map +2 -2
- package/dist/esm/DSBreadcrumbItem.js +1 -3
- package/dist/esm/DSBreadcrumbItem.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +2 -0
- package/dist/esm/styles.js.map +1 -1
- package/dist/types/DSBreadcrumb.d.ts +17 -15
- package/dist/types/DSBreadcrumbItem.d.ts +17 -24
- package/dist/types/{index.d.d.ts → react-desc-prop-types.d.ts} +5 -5
- package/dist/types/styles.d.ts +1 -1
- package/package.json +5 -5
- package/dist/cjs/index.d.js.map +0 -7
- package/dist/esm/index.d.js +0 -2
- /package/dist/esm/{index.d.js.map → react-desc-prop-types.js.map} +0 -0
|
@@ -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-props-helpers';\nimport DSBreadcrumbItem from './DSBreadcrumbItem.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbPropsT } from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BjB;AA9BN,mBAA6C;AAC7C,8BAAoC;AACpC,8BAA6B;AAC7B,mCAAsC;AAEtC,oBAA4C;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,EAChB,GAAG;AACL,
|
|
4
|
+
"sourcesContent": ["import React, { cloneElement, useMemo } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport DSBreadcrumbItem from './DSBreadcrumbItem.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbPropsT } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledList } from './styles.js';\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) => {\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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BjB;AA9BN,mBAA6C;AAC7C,8BAAoC;AACpC,8BAA6B;AAC7B,mCAAsC;AAEtC,oBAA4C;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,EAChB,GAAG;AACL,MAA0B;AACxB,QAAM,CAAC,QAAQ,SAAS,QAAI,oDAAsB;AAElD,QAAM,kBAAc,sBAAQ,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,sDAAC,4BAAW,eAAY,kBACrB,uBAAAA,QAAM,SAAS;AAAA,QAAI;AAAA,QAAU,CAAC,OAA2B,eACxD,aAAa,SAAS,SAAS,QAC3B,2BAAa,OAAO;AAAA,UAClB;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC,QACD,2BAAa,OAAO;AAAA,UAClB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACP,GACF;AAAA;AAAA,EACF;AAEJ;AAEA,aAAa,OAAO,wBAAAC;AAEpB,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,kCAAU,OAAO,YAAY,sCAAsC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnF,IAAI,kCAAU,OAAO;AAAA,IACnB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS,kCAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA;AAAA,EAEA,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA;AAAA;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
|
}
|
|
@@ -44,7 +44,7 @@ const DSBreadcrumbItem = ({
|
|
|
44
44
|
isTitle,
|
|
45
45
|
onClick = () => null,
|
|
46
46
|
label = "",
|
|
47
|
-
color =
|
|
47
|
+
color = void 0,
|
|
48
48
|
addRef,
|
|
49
49
|
childIndex,
|
|
50
50
|
trailingSlash,
|
|
@@ -77,8 +77,6 @@ const DSBreadcrumbItem = ({
|
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
const props = {
|
|
80
|
-
/** inject props to wrapper */
|
|
81
|
-
containerComponent: import_ds_props_helpers.PropTypes.string.description("inject props to wrapper"),
|
|
82
80
|
/** render as any html node */
|
|
83
81
|
as: import_ds_props_helpers.PropTypes.string.description("render as any html node"),
|
|
84
82
|
/** active item */
|
|
@@ -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-props-helpers';\nimport type { DSBreadcrumbItemPropsT } from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AAzBJ,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe, type DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport type { DSBreadcrumbItemPropsT } from './react-desc-prop-types.js';\nimport { StyledLink, StyledCrumbWrapper } from './styles.js';\n\nconst DSBreadcrumbItem = ({\n active = false,\n as = 'a',\n href = undefined,\n isTitle,\n onClick = () => null,\n label = '',\n color = undefined,\n addRef,\n childIndex,\n trailingSlash,\n onKeyDown = () => null,\n ...rest\n}: DSBreadcrumbItemPropsT) => (\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: DSPropTypesSchema<DSBreadcrumbItemPropsT> = {\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,8BAA4D;AAE5D,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,EAClB,GAAG;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,QAAmD;AAAA;AAAA,EAEvD,IAAI,kCAAU,OAAO,YAAY,yBAAyB;AAAA;AAAA,EAE1D,QAAQ,kCAAU,KAAK,YAAY,aAAa;AAAA;AAAA,EAEhD,MAAM,kCAAU,OAAO,YAAY,WAAW;AAAA;AAAA,EAE9C,SAAS,kCAAU,KAAK,YAAY,kBAAkB;AAAA;AAAA,EAEtD,SAAS,kCAAU,KAAK,YAAY,qBAAqB;AAAA;AAAA,EAEzD,eAAe,kCAAU,KAAK,YAAY,oBAAoB;AAAA;AAAA,EAE9D,OAAO,kCAAU,OAAO,YAAY,YAAY;AAAA;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
|
}
|
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
var
|
|
26
|
-
module.exports = __toCommonJS(
|
|
25
|
+
var react_desc_prop_types_exports = {};
|
|
26
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
27
27
|
var React = __toESM(require("react"));
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type React from 'react';\nimport type { htmlElements } from './DSBreadcrumb.js';\n\ntype SafeComponentsT = (typeof htmlElements)[number];\n\ntype SafeItemComponentT = 'a' | 'button' | 'div' | 'span' | 'p';\n\ninterface DSBreadcrumbPropsT {\n containerProps?: Record<string, unknown>;\n as?: SafeComponentsT;\n label?: string;\n isTitle?: boolean;\n trailingSlash?: boolean;\n children: React.ReactElement[];\n}\n\ninterface DSBreadcrumbItemPropsT {\n active?: boolean;\n isActive?: boolean;\n as?: SafeItemComponentT;\n href?: string;\n isTitle?: boolean;\n trailingSlash?: boolean;\n addRef?: React.RefObject<HTMLElement>;\n onKeyDown?: (e: React.KeyboardEvent, componentRefIndex: number, onClick: () => void) => void;\n onClick?: () => void;\n label?: string;\n childIndex?: number;\n color?: string;\n}\n\nexport type { DSBreadcrumbPropsT, DSBreadcrumbItemPropsT, SafeComponentsT, SafeItemComponentT };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/styles.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { Theme } from '@elliemae/pui-theme';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport type { DSBreadcrumbItemPropsT } from './
|
|
4
|
+
"sourcesContent": ["import type { Theme } from '@elliemae/pui-theme';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport type { DSBreadcrumbItemPropsT } from './react-desc-prop-types';\n\nconst handleColor = (theme: Theme, isActive: boolean, color: string, isTitle: boolean): string => {\n if (isActive) return theme.colors.neutral[800];\n if (color) return color;\n if (isTitle) return theme.colors.neutral[700];\n return theme.colors.brand[600];\n};\n\nconst StyledList = styled.ol`\n width: 100%;\n list-style: none;\n display: flex;\n padding: 0;\n margin: 0;\n li:first-child * {\n margin-left: 0;\n }\n`;\n\nconst StyledCrumbWrapper = styled.li<Partial<DSBreadcrumbItemPropsT>>`\n display: inline-flex;\n align-items: center;\n flex-shrink: 20;\n transition: flex-shrink 0.1s cubic-bezier(0.64, 0, 0.35, 1);\n min-height: 1.231rem;\n min-width: 10px;\n &:hover {\n flex-shrink: 0;\n }\n ${({ theme, isTitle, trailingSlash }) =>\n isTitle || !trailingSlash\n ? `&:not(:last-child):after {\n display: inline-block;\n content: '/';\n color: ${theme.colors.neutral[700]};\n }\n `\n : `&:after {\n display: inline-block;\n content: '/';\n color: ${theme.colors.neutral[700]};\n }\n `}\n`;\n\nconst StyledContainer = styled.nav`\n display: flex;\n align-items: center;\n padding: 0;\n`;\n\nconst StyledLink = styled(DSTypography)<Partial<DSBreadcrumbItemPropsT>>`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-decoration: none;\n outline: none;\n margin: 0 2px;\n border: 2px solid transparent;\n -webkit-text-stroke: 0.4px transparent;\n line-height: 20px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme, isActive, color = '', isTitle }) => handleColor(theme, !!isActive, color, !!isTitle)};\n &:hover {\n color: ${({ theme, color }) => color || theme.colors.brand[800]};\n cursor: pointer;\n ${({ theme, color }) => `-webkit-text-stroke: 0.4px ${color || theme.colors.brand[800]}`};\n }\n &:focus {\n ${({ theme }) => `border: 2px solid ${theme.colors.brand[700]};`}\n border-radius: 2px;\n }\n`;\n\nexport { StyledList, StyledCrumbWrapper, StyledContainer, StyledLink };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAuB;AACvB,2BAA6B;AAG7B,MAAM,cAAc,CAAC,OAAc,UAAmB,OAAe,YAA6B;AAChG,MAAI;AAAU,WAAO,MAAM,OAAO,QAAQ,GAAG;AAC7C,MAAI;AAAO,WAAO;AAClB,MAAI;AAAS,WAAO,MAAM,OAAO,QAAQ,GAAG;AAC5C,SAAO,MAAM,OAAO,MAAM,GAAG;AAC/B;AAEA,MAAM,aAAa,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1B,MAAM,qBAAqB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAU9B,CAAC,EAAE,OAAO,SAAS,cAAc,MACjC,WAAW,CAAC,gBACR;AAAA;AAAA;AAAA,aAGK,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA,MAG7B;AAAA;AAAA;AAAA,aAGK,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA;AAKrC,MAAM,kBAAkB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAM/B,MAAM,iBAAa,yBAAO,iCAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAUrB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,WACvC,CAAC,EAAE,OAAO,UAAU,QAAQ,IAAI,QAAQ,MAAM,YAAY,OAAO,CAAC,CAAC,UAAU,OAAO,CAAC,CAAC,OAAO;AAAA;AAAA,aAE3F,CAAC,EAAE,OAAO,MAAM,MAAM,SAAS,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA,MAE5D,CAAC,EAAE,OAAO,MAAM,MAAM,8BAA8B,SAAS,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,MAGnF,CAAC,EAAE,MAAM,MAAM,qBAAqB,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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-props-helpers';\nimport DSBreadcrumbItem from './DSBreadcrumbItem.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbPropsT } from './
|
|
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,EAChB,GAAG;AACL,
|
|
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.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbPropsT } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledList } from './styles.js';\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) => {\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
|
+
"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,EAChB,GAAG;AACL,MAA0B;AACxB,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;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,sCAAsC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnF,IAAI,UAAU,OAAO;AAAA,IACnB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS,UAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA;AAAA,EAEA,OAAO,UAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA;AAAA;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
|
}
|
|
@@ -9,7 +9,7 @@ const DSBreadcrumbItem = ({
|
|
|
9
9
|
isTitle,
|
|
10
10
|
onClick = () => null,
|
|
11
11
|
label = "",
|
|
12
|
-
color =
|
|
12
|
+
color = void 0,
|
|
13
13
|
addRef,
|
|
14
14
|
childIndex,
|
|
15
15
|
trailingSlash,
|
|
@@ -42,8 +42,6 @@ const DSBreadcrumbItem = ({
|
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
const props = {
|
|
45
|
-
/** inject props to wrapper */
|
|
46
|
-
containerComponent: PropTypes.string.description("inject props to wrapper"),
|
|
47
45
|
/** render as any html node */
|
|
48
46
|
as: PropTypes.string.description("render as any html node"),
|
|
49
47
|
/** active item */
|
|
@@ -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-props-helpers';\nimport type { DSBreadcrumbItemPropsT } from './
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC0BnB;AAzBJ,SAAS,WAAW,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe, type DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport type { DSBreadcrumbItemPropsT } from './react-desc-prop-types.js';\nimport { StyledLink, StyledCrumbWrapper } from './styles.js';\n\nconst DSBreadcrumbItem = ({\n active = false,\n as = 'a',\n href = undefined,\n isTitle,\n onClick = () => null,\n label = '',\n color = undefined,\n addRef,\n childIndex,\n trailingSlash,\n onKeyDown = () => null,\n ...rest\n}: DSBreadcrumbItemPropsT) => (\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: DSPropTypesSchema<DSBreadcrumbItemPropsT> = {\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
|
+
"mappings": "AAAA,YAAY,WAAW;AC0BnB;AAzBJ,SAAS,WAAW,gBAAwC;AAE5D,SAAS,YAAY,0BAA0B;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,EAClB,GAAG;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,QAAmD;AAAA;AAAA,EAEvD,IAAI,UAAU,OAAO,YAAY,yBAAyB;AAAA;AAAA,EAE1D,QAAQ,UAAU,KAAK,YAAY,aAAa;AAAA;AAAA,EAEhD,MAAM,UAAU,OAAO,YAAY,WAAW;AAAA;AAAA,EAE9C,SAAS,UAAU,KAAK,YAAY,kBAAkB;AAAA;AAAA,EAEtD,SAAS,UAAU,KAAK,YAAY,qBAAqB;AAAA;AAAA,EAEzD,eAAe,UAAU,KAAK,YAAY,oBAAoB;AAAA;AAAA,EAE9D,OAAO,UAAU,OAAO,YAAY,YAAY;AAAA;AAAA,EAEhD,OAAO,UAAU,OAAO,YAAY,YAAY;AAClD;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AAE/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;AAGvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styles.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { Theme } from '@elliemae/pui-theme';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport type { DSBreadcrumbItemPropsT } from './
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { Theme } from '@elliemae/pui-theme';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport type { DSBreadcrumbItemPropsT } from './react-desc-prop-types';\n\nconst handleColor = (theme: Theme, isActive: boolean, color: string, isTitle: boolean): string => {\n if (isActive) return theme.colors.neutral[800];\n if (color) return color;\n if (isTitle) return theme.colors.neutral[700];\n return theme.colors.brand[600];\n};\n\nconst StyledList = styled.ol`\n width: 100%;\n list-style: none;\n display: flex;\n padding: 0;\n margin: 0;\n li:first-child * {\n margin-left: 0;\n }\n`;\n\nconst StyledCrumbWrapper = styled.li<Partial<DSBreadcrumbItemPropsT>>`\n display: inline-flex;\n align-items: center;\n flex-shrink: 20;\n transition: flex-shrink 0.1s cubic-bezier(0.64, 0, 0.35, 1);\n min-height: 1.231rem;\n min-width: 10px;\n &:hover {\n flex-shrink: 0;\n }\n ${({ theme, isTitle, trailingSlash }) =>\n isTitle || !trailingSlash\n ? `&:not(:last-child):after {\n display: inline-block;\n content: '/';\n color: ${theme.colors.neutral[700]};\n }\n `\n : `&:after {\n display: inline-block;\n content: '/';\n color: ${theme.colors.neutral[700]};\n }\n `}\n`;\n\nconst StyledContainer = styled.nav`\n display: flex;\n align-items: center;\n padding: 0;\n`;\n\nconst StyledLink = styled(DSTypography)<Partial<DSBreadcrumbItemPropsT>>`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-decoration: none;\n outline: none;\n margin: 0 2px;\n border: 2px solid transparent;\n -webkit-text-stroke: 0.4px transparent;\n line-height: 20px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme, isActive, color = '', isTitle }) => handleColor(theme, !!isActive, color, !!isTitle)};\n &:hover {\n color: ${({ theme, color }) => color || theme.colors.brand[800]};\n cursor: pointer;\n ${({ theme, color }) => `-webkit-text-stroke: 0.4px ${color || theme.colors.brand[800]}`};\n }\n &:focus {\n ${({ theme }) => `border: 2px solid ${theme.colors.brand[700]};`}\n border-radius: 2px;\n }\n`;\n\nexport { StyledList, StyledCrumbWrapper, StyledContainer, StyledLink };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAG7B,MAAM,cAAc,CAAC,OAAc,UAAmB,OAAe,YAA6B;AAChG,MAAI;AAAU,WAAO,MAAM,OAAO,QAAQ,GAAG;AAC7C,MAAI;AAAO,WAAO;AAClB,MAAI;AAAS,WAAO,MAAM,OAAO,QAAQ,GAAG;AAC5C,SAAO,MAAM,OAAO,MAAM,GAAG;AAC/B;AAEA,MAAM,aAAa,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1B,MAAM,qBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAU9B,CAAC,EAAE,OAAO,SAAS,cAAc,MACjC,WAAW,CAAC,gBACR;AAAA;AAAA;AAAA,aAGK,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA,MAG7B;AAAA;AAAA;AAAA,aAGK,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA;AAKrC,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAM/B,MAAM,aAAa,OAAO,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAUrB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,WACvC,CAAC,EAAE,OAAO,UAAU,QAAQ,IAAI,QAAQ,MAAM,YAAY,OAAO,CAAC,CAAC,UAAU,OAAO,CAAC,CAAC,OAAO;AAAA;AAAA,aAE3F,CAAC,EAAE,OAAO,MAAM,MAAM,SAAS,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA,MAE5D,CAAC,EAAE,OAAO,MAAM,MAAM,8BAA8B,SAAS,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,MAGnF,CAAC,EAAE,MAAM,MAAM,qBAAqB,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { DSBreadcrumbPropsT } from './index.d';
|
|
1
|
+
import type { DSBreadcrumbPropsT } from './react-desc-prop-types.js';
|
|
3
2
|
declare const htmlElements: readonly ["nav", "div", "header", "footer", "main"];
|
|
4
3
|
declare const DSBreadcrumb: {
|
|
5
|
-
({ containerProps, as, label, isTitle, children, trailingSlash, ...rest }: DSBreadcrumbPropsT):
|
|
4
|
+
({ containerProps, as, label, isTitle, children, trailingSlash, ...rest }: DSBreadcrumbPropsT): import("react/jsx-runtime.js").JSX.Element;
|
|
6
5
|
Item: {
|
|
7
|
-
({ active, as, href, isTitle, onClick, label, color, addRef, childIndex, trailingSlash, onKeyDown, ...rest }: import("./
|
|
8
|
-
propTypes: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
href
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
({ active, as, href, isTitle, onClick, label, color, addRef, childIndex, trailingSlash, onKeyDown, ...rest }: import("./react-desc-prop-types.js").DSBreadcrumbItemPropsT): import("react/jsx-runtime.js").JSX.Element;
|
|
7
|
+
propTypes: Required<{
|
|
8
|
+
active?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
9
|
+
isActive?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
10
|
+
as?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
11
|
+
href?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
12
|
+
isTitle?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
13
|
+
trailingSlash?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
14
|
+
addRef?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
15
|
+
onKeyDown?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
16
|
+
onClick?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
17
|
+
label?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
18
|
+
childIndex?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
19
|
+
color?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
20
|
+
}>;
|
|
19
21
|
displayName: string;
|
|
20
22
|
};
|
|
21
23
|
propTypes: {
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { DSBreadcrumbItemPropsT } from './index.d';
|
|
1
|
+
import type { DSBreadcrumbItemPropsT } from './react-desc-prop-types.js';
|
|
3
2
|
declare const DSBreadcrumbItem: {
|
|
4
|
-
({ active, as, href, isTitle, onClick, label, color, addRef, childIndex, trailingSlash, onKeyDown, ...rest }: DSBreadcrumbItemPropsT):
|
|
5
|
-
propTypes: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
trailingSlash: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
|
-
/** item label */
|
|
21
|
-
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
|
-
/** link color */
|
|
23
|
-
color: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
24
|
-
};
|
|
3
|
+
({ active, as, href, isTitle, onClick, label, color, addRef, childIndex, trailingSlash, onKeyDown, ...rest }: DSBreadcrumbItemPropsT): import("react/jsx-runtime.js").JSX.Element;
|
|
4
|
+
propTypes: Required<{
|
|
5
|
+
active?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
6
|
+
isActive?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
7
|
+
as?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
8
|
+
href?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
9
|
+
isTitle?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
10
|
+
trailingSlash?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
11
|
+
addRef?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
12
|
+
onKeyDown?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
13
|
+
onClick?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
14
|
+
label?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
15
|
+
childIndex?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
16
|
+
color?: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT | undefined;
|
|
17
|
+
}>;
|
|
25
18
|
displayName: string;
|
|
26
19
|
};
|
|
27
|
-
declare const DSBreadcrumbItemWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSBreadcrumbItemPropsT>;
|
|
20
|
+
declare const DSBreadcrumbItemWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSBreadcrumbItemPropsT>;
|
|
28
21
|
export { DSBreadcrumbItem, DSBreadcrumbItemWithSchema };
|
|
29
22
|
export default DSBreadcrumbItem;
|
|
@@ -3,7 +3,7 @@ import type { htmlElements } from './DSBreadcrumb.js';
|
|
|
3
3
|
type SafeComponentsT = (typeof htmlElements)[number];
|
|
4
4
|
type SafeItemComponentT = 'a' | 'button' | 'div' | 'span' | 'p';
|
|
5
5
|
interface DSBreadcrumbPropsT {
|
|
6
|
-
containerProps?: unknown
|
|
6
|
+
containerProps?: Record<string, unknown>;
|
|
7
7
|
as?: SafeComponentsT;
|
|
8
8
|
label?: string;
|
|
9
9
|
isTitle?: boolean;
|
|
@@ -17,11 +17,11 @@ interface DSBreadcrumbItemPropsT {
|
|
|
17
17
|
href?: string;
|
|
18
18
|
isTitle?: boolean;
|
|
19
19
|
trailingSlash?: boolean;
|
|
20
|
-
addRef
|
|
21
|
-
onKeyDown
|
|
20
|
+
addRef?: React.RefObject<HTMLElement>;
|
|
21
|
+
onKeyDown?: (e: React.KeyboardEvent, componentRefIndex: number, onClick: () => void) => void;
|
|
22
22
|
onClick?: () => void;
|
|
23
23
|
label?: string;
|
|
24
|
-
childIndex
|
|
25
|
-
color?: string
|
|
24
|
+
childIndex?: number;
|
|
25
|
+
color?: string;
|
|
26
26
|
}
|
|
27
27
|
export type { DSBreadcrumbPropsT, DSBreadcrumbItemPropsT, SafeComponentsT, SafeItemComponentT };
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { DSBreadcrumbItemPropsT } from './
|
|
2
|
+
import type { DSBreadcrumbItemPropsT } from './react-desc-prop-types';
|
|
3
3
|
declare const StyledList: import("styled-components").StyledComponent<"ol", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
4
4
|
declare const StyledCrumbWrapper: import("styled-components").StyledComponent<"li", import("@elliemae/ds-system").Theme, Partial<DSBreadcrumbItemPropsT> & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
5
5
|
declare const StyledContainer: import("styled-components").StyledComponent<"nav", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-breadcrumb",
|
|
3
|
-
"version": "3.22.0-next.
|
|
3
|
+
"version": "3.22.0-next.24",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Breadcrumb",
|
|
6
6
|
"files": [
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-props-helpers": "3.22.0-next.
|
|
55
|
-
"@elliemae/ds-
|
|
56
|
-
"@elliemae/ds-
|
|
54
|
+
"@elliemae/ds-props-helpers": "3.22.0-next.24",
|
|
55
|
+
"@elliemae/ds-typography": "3.22.0-next.24",
|
|
56
|
+
"@elliemae/ds-system": "3.22.0-next.24"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@elliemae/pui-cli": "~9.0.0-next.22",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@testing-library/user-event": "~13.5.0",
|
|
64
64
|
"jest-axe": "^7.0.1",
|
|
65
65
|
"styled-components": "~5.3.9",
|
|
66
|
-
"@elliemae/ds-monorepo-devops": "3.22.0-next.
|
|
66
|
+
"@elliemae/ds-monorepo-devops": "3.22.0-next.24"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@elliemae/pui-theme": "^2.6.0",
|
package/dist/cjs/index.d.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.d.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react';\nimport type { htmlElements } from './DSBreadcrumb.js';\n\ntype SafeComponentsT = (typeof htmlElements)[number];\n\ntype SafeItemComponentT = 'a' | 'button' | 'div' | 'span' | 'p';\n\ninterface DSBreadcrumbPropsT {\n containerProps?: unknown;\n as?: SafeComponentsT;\n label?: string;\n isTitle?: boolean;\n trailingSlash?: boolean;\n children: React.ReactElement[];\n}\n\ninterface DSBreadcrumbItemPropsT {\n active?: boolean;\n isActive?: boolean;\n as?: SafeItemComponentT;\n href?: string;\n isTitle?: boolean;\n trailingSlash?: boolean;\n addRef: (ref: HTMLElement) => void;\n onKeyDown: (e: React.KeyboardEvent, componentRefIndex: number, onClick: () => void) => void;\n onClick?: () => void;\n label?: string;\n childIndex: number;\n color?: string | null;\n}\n\nexport type { DSBreadcrumbPropsT, DSBreadcrumbItemPropsT, SafeComponentsT, SafeItemComponentT };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/index.d.js
DELETED
|
File without changes
|