@elliemae/ds-breadcrumb 3.57.0-next.47 → 3.57.0-next.48
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
CHANGED
|
@@ -93,7 +93,7 @@ const props = {
|
|
|
93
93
|
*/
|
|
94
94
|
isTitle: import_ds_props_helpers.PropTypes.bool.description(
|
|
95
95
|
"Whether to show the last element of the breadcrumb as a title. Also removes trailing slash to show last element as title"
|
|
96
|
-
)
|
|
96
|
+
),
|
|
97
97
|
/** breadcrumb label */
|
|
98
98
|
label: import_ds_props_helpers.PropTypes.string.description("breadcrumb label"),
|
|
99
99
|
/**
|
|
@@ -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 { PropTypes, describe, useMemoMergePropsWithDefault, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport React, { cloneElement, useMemo } from 'react';\nimport DSBreadcrumbItem from './DSBreadcrumbItem.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbT } from './react-desc-prop-types.js';\nimport { defaultProps } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledList } from './styles.js';\n\nconst htmlElements = ['nav', 'div'] as const;\n\ntype ContainerProps = Omit<DSBreadcrumbT.InternalProps, 'isTitle' | 'trailingSlash'>;\n\nconst NavContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer aria-label={label} {...rest} {...containerProps} as={as}>\n <StyledList>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DivContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer {...rest} {...containerProps} as={as}>\n <StyledList aria-label={label}>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DSBreadcrumb = (props: DSBreadcrumbT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBreadcrumbT.InternalProps>(props, defaultProps);\n const { containerProps, as, label, trailingSlash, isTitle, children, ...rest } = propsWithDefaults;\n const [addRef, onKeyDown] = useKeyboardNavigation({ isTitle });\n\n const safeElement = useMemo(() => (htmlElements.indexOf(as) > -1 ? as : 'nav'), [as]);\n\n const Container = as === 'nav' ? NavContainer : DivContainer;\n\n return (\n <Container label={label} {...rest} containerProps={containerProps} as={safeElement}>\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 </Container>\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'\n */\n as: PropTypes.oneOf(['nav', 'div'])\n .description(\"Type of element you want the main container to be: 'nav' or 'div'. Defaults to 'nav'.\")\n .defaultValue('nav'),\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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAjBN,8BAAsF;AACtF,mBAA6C;AAC7C,8BAA6B;AAC7B,mCAAsC;AAEtC,mCAA6B;AAC7B,oBAA4C;AAE5C,MAAM,eAAe,CAAC,OAAO,KAAK;AAIlC,MAAM,eAAe,CAACA,WAA0B;AAC9C,QAAM,EAAE,OAAO,gBAAgB,IAAI,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AAC,EAC/B,YAAY,uFAAuF,EACnG,aAAa,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,SAAS,kCAAU,
|
|
4
|
+
"sourcesContent": ["import { PropTypes, describe, useMemoMergePropsWithDefault, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport React, { cloneElement, useMemo } from 'react';\nimport DSBreadcrumbItem from './DSBreadcrumbItem.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbT } from './react-desc-prop-types.js';\nimport { defaultProps } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledList } from './styles.js';\n\nconst htmlElements = ['nav', 'div'] as const;\n\ntype ContainerProps = Omit<DSBreadcrumbT.InternalProps, 'isTitle' | 'trailingSlash'>;\n\nconst NavContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer aria-label={label} {...rest} {...containerProps} as={as}>\n <StyledList>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DivContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer {...rest} {...containerProps} as={as}>\n <StyledList aria-label={label}>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DSBreadcrumb = (props: DSBreadcrumbT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBreadcrumbT.InternalProps>(props, defaultProps);\n const { containerProps, as, label, trailingSlash, isTitle, children, ...rest } = propsWithDefaults;\n const [addRef, onKeyDown] = useKeyboardNavigation({ isTitle });\n\n const safeElement = useMemo(() => (htmlElements.indexOf(as) > -1 ? as : 'nav'), [as]);\n\n const Container = as === 'nav' ? NavContainer : DivContainer;\n\n return (\n <Container label={label} {...rest} containerProps={containerProps} as={safeElement}>\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 </Container>\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'\n */\n as: PropTypes.oneOf(['nav', 'div'])\n .description(\"Type of element you want the main container to be: 'nav' or 'div'. Defaults to 'nav'.\")\n .defaultValue('nav'),\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 trailingSlash: PropTypes.bool\n .description('Whether to show trailing slash on all items except the last one')\n .defaultValue(true),\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Container items to wrap'),\n};\n\nDSBreadcrumb.displayName = 'DSBreadcrumb';\nconst DSBreadcrumbWithSchema = describe(DSBreadcrumb);\nDSBreadcrumbWithSchema.propTypes = props as ValidationMap<unknown>;\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;ADiBjB;AAjBN,8BAAsF;AACtF,mBAA6C;AAC7C,8BAA6B;AAC7B,mCAAsC;AAEtC,mCAA6B;AAC7B,oBAA4C;AAE5C,MAAM,eAAe,CAAC,OAAO,KAAK;AAIlC,MAAM,eAAe,CAACA,WAA0B;AAC9C,QAAM,EAAE,OAAO,gBAAgB,IAAI,UAAU,GAAG,KAAK,IAAIA;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,EACnG,aAAa,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,SAAS,kCAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA;AAAA,EAEA,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA;AAAA;AAAA,EAItD,eAAe,kCAAU,KACtB,YAAY,iEAAiE,EAC7E,aAAa,IAAI;AAAA,EACpB,UAAU,kCAAU,QAAQ,kCAAU,OAAO,EAAE,WAAW,YAAY,yBAAyB;AACjG;AAEA,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["props", "React", "DSBreadcrumbItem"]
|
|
7
7
|
}
|
package/dist/esm/DSBreadcrumb.js
CHANGED
|
@@ -57,7 +57,7 @@ const props = {
|
|
|
57
57
|
*/
|
|
58
58
|
isTitle: PropTypes.bool.description(
|
|
59
59
|
"Whether to show the last element of the breadcrumb as a title. Also removes trailing slash to show last element as title"
|
|
60
|
-
)
|
|
60
|
+
),
|
|
61
61
|
/** breadcrumb label */
|
|
62
62
|
label: PropTypes.string.description("breadcrumb label"),
|
|
63
63
|
/**
|
|
@@ -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 { PropTypes, describe, useMemoMergePropsWithDefault, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport React, { cloneElement, useMemo } from 'react';\nimport DSBreadcrumbItem from './DSBreadcrumbItem.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbT } from './react-desc-prop-types.js';\nimport { defaultProps } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledList } from './styles.js';\n\nconst htmlElements = ['nav', 'div'] as const;\n\ntype ContainerProps = Omit<DSBreadcrumbT.InternalProps, 'isTitle' | 'trailingSlash'>;\n\nconst NavContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer aria-label={label} {...rest} {...containerProps} as={as}>\n <StyledList>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DivContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer {...rest} {...containerProps} as={as}>\n <StyledList aria-label={label}>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DSBreadcrumb = (props: DSBreadcrumbT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBreadcrumbT.InternalProps>(props, defaultProps);\n const { containerProps, as, label, trailingSlash, isTitle, children, ...rest } = propsWithDefaults;\n const [addRef, onKeyDown] = useKeyboardNavigation({ isTitle });\n\n const safeElement = useMemo(() => (htmlElements.indexOf(as) > -1 ? as : 'nav'), [as]);\n\n const Container = as === 'nav' ? NavContainer : DivContainer;\n\n return (\n <Container label={label} {...rest} containerProps={containerProps} as={safeElement}>\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 </Container>\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'\n */\n as: PropTypes.oneOf(['nav', 'div'])\n .description(\"Type of element you want the main container to be: 'nav' or 'div'. Defaults to 'nav'.\")\n .defaultValue('nav'),\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: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AAA,MACA;AAAA,IACF,CAAC,IACD,aAAa,OAAO;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACP,GACF;AAEJ;AAEA,aAAa,OAAO;AAEpB,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,sCAAsC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnF,IAAI,UAAU,MAAM,CAAC,OAAO,KAAK,CAAC,EAC/B,YAAY,uFAAuF,EACnG,aAAa,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,SAAS,UAAU,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, describe, useMemoMergePropsWithDefault, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport React, { cloneElement, useMemo } from 'react';\nimport DSBreadcrumbItem from './DSBreadcrumbItem.js';\nimport { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';\nimport type { DSBreadcrumbT } from './react-desc-prop-types.js';\nimport { defaultProps } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledList } from './styles.js';\n\nconst htmlElements = ['nav', 'div'] as const;\n\ntype ContainerProps = Omit<DSBreadcrumbT.InternalProps, 'isTitle' | 'trailingSlash'>;\n\nconst NavContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer aria-label={label} {...rest} {...containerProps} as={as}>\n <StyledList>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DivContainer = (props: ContainerProps) => {\n const { label, containerProps, as, children, ...rest } = props;\n return (\n // @ts-expect-error - styled components are not correctly supporting the alias in typescript\n <StyledContainer {...rest} {...containerProps} as={as}>\n <StyledList aria-label={label}>{children}</StyledList>\n </StyledContainer>\n );\n};\n\nconst DSBreadcrumb = (props: DSBreadcrumbT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBreadcrumbT.InternalProps>(props, defaultProps);\n const { containerProps, as, label, trailingSlash, isTitle, children, ...rest } = propsWithDefaults;\n const [addRef, onKeyDown] = useKeyboardNavigation({ isTitle });\n\n const safeElement = useMemo(() => (htmlElements.indexOf(as) > -1 ? as : 'nav'), [as]);\n\n const Container = as === 'nav' ? NavContainer : DivContainer;\n\n return (\n <Container label={label} {...rest} containerProps={containerProps} as={safeElement}>\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 </Container>\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'\n */\n as: PropTypes.oneOf(['nav', 'div'])\n .description(\"Type of element you want the main container to be: 'nav' or 'div'. Defaults to 'nav'.\")\n .defaultValue('nav'),\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 trailingSlash: PropTypes.bool\n .description('Whether to show trailing slash on all items except the last one')\n .defaultValue(true),\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Container items to wrap'),\n};\n\nDSBreadcrumb.displayName = 'DSBreadcrumb';\nconst DSBreadcrumbWithSchema = describe(DSBreadcrumb);\nDSBreadcrumbWithSchema.propTypes = props as ValidationMap<unknown>;\n\nexport { DSBreadcrumb, DSBreadcrumbWithSchema, htmlElements };\nexport default DSBreadcrumb;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiBjB;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AAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACP,GACF;AAEJ;AAEA,aAAa,OAAO;AAEpB,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,sCAAsC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnF,IAAI,UAAU,MAAM,CAAC,OAAO,KAAK,CAAC,EAC/B,YAAY,uFAAuF,EACnG,aAAa,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,SAAS,UAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA;AAAA,EAEA,OAAO,UAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA;AAAA;AAAA,EAItD,eAAe,UAAU,KACtB,YAAY,iEAAiE,EAC7E,aAAa,IAAI;AAAA,EACpB,UAAU,UAAU,QAAQ,UAAU,OAAO,EAAE,WAAW,YAAY,yBAAyB;AACjG;AAEA,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React", "props"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-breadcrumb",
|
|
3
|
-
"version": "3.57.0-next.
|
|
3
|
+
"version": "3.57.0-next.48",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Breadcrumb",
|
|
6
6
|
"files": [
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@elliemae/ds-props-helpers": "3.57.0-next.
|
|
49
|
-
"@elliemae/ds-system": "3.57.0-next.
|
|
50
|
-
"@elliemae/ds-typography": "3.57.0-next.
|
|
48
|
+
"@elliemae/ds-props-helpers": "3.57.0-next.48",
|
|
49
|
+
"@elliemae/ds-system": "3.57.0-next.48",
|
|
50
|
+
"@elliemae/ds-typography": "3.57.0-next.48"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@elliemae/ds-monorepo-devops": "3.57.0-next.
|
|
54
|
-
"@elliemae/ds-test-utils": "3.57.0-next.
|
|
53
|
+
"@elliemae/ds-monorepo-devops": "3.57.0-next.48",
|
|
54
|
+
"@elliemae/ds-test-utils": "3.57.0-next.48",
|
|
55
55
|
"@elliemae/pui-cli": "catalog:",
|
|
56
56
|
"@elliemae/pui-theme": "catalog:",
|
|
57
57
|
"jest": "catalog:",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"access": "public",
|
|
68
68
|
"typeSafety": true
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "f37bff64caf2e9781247f79eeeaaa3e00ff0405c"
|
|
71
71
|
}
|