@ag.ds-next/breadcrumbs
Advanced tools
Comparing version 4.0.0 to 4.0.1
# @ag.ds-next/breadcrumbs | ||
## 4.0.1 | ||
### Patch Changes | ||
- 135bb87: Updated link components to accept all anchor element HTML attributes | ||
- 66eb7ed: Fix small typescript bug in main component types | ||
- ffa1b11: Ensured consistent API of `aria-label` | ||
- Updated dependencies [135bb87] | ||
- Updated dependencies [c16dbbe] | ||
- Updated dependencies [653709c] | ||
- Updated dependencies [bd36abb] | ||
- Updated dependencies [c3a5ded] | ||
- @ag.ds-next/core@2.1.1 | ||
- @ag.ds-next/text@4.0.1 | ||
- @ag.ds-next/box@4.0.1 | ||
- @ag.ds-next/icon@4.0.1 | ||
## 4.0.0 | ||
@@ -4,0 +21,0 @@ |
@@ -31,31 +31,12 @@ 'use strict'; | ||
const BreadcrumbsContainer = ({ | ||
children | ||
}) => { | ||
return react.jsx("nav", { | ||
"aria-label": "breadcrumb" | ||
}, react.jsx(box.Flex, { | ||
as: "ul", | ||
gap: 0.5, | ||
alignItems: "center" | ||
}, children)); | ||
}; | ||
children, | ||
'aria-label': ariaLabel | ||
}) => react.jsx("nav", { | ||
"aria-label": ariaLabel | ||
}, react.jsx(box.Flex, { | ||
as: "ul", | ||
gap: 0.5, | ||
alignItems: "center" | ||
}, children)); | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
const BreadcrumbsItem = props => { | ||
@@ -68,18 +49,16 @@ const { | ||
as: "li" | ||
}, href ? react.jsx(text.TextLink, _extends({ | ||
href: href | ||
}, props)) : react.jsx(text.Text, null, children)); | ||
}, href ? react.jsx(text.TextLink, props) : react.jsx(text.Text, null, children)); | ||
}; | ||
const Breadcrumbs = ({ | ||
links, | ||
'aria-label': ariaLabel = 'breadcrumb', | ||
links | ||
}) => react.jsx(BreadcrumbsContainer, { | ||
"aria-label": ariaLabel | ||
}, links.map(({ | ||
label, | ||
...props | ||
}) => { | ||
return react.jsx(BreadcrumbsContainer, props, links.map(({ | ||
label, | ||
...props | ||
}, index) => react.jsx(react$1.Fragment, { | ||
key: index | ||
}, index == 0 ? null : react.jsx(BreadcrumbsDivider, null), react.jsx(BreadcrumbsItem, props, label)))); | ||
}; | ||
}, index) => react.jsx(react$1.Fragment, { | ||
key: index | ||
}, index == 0 ? null : react.jsx(BreadcrumbsDivider, null), react.jsx(BreadcrumbsItem, props, label)))); | ||
@@ -86,0 +65,0 @@ exports.Breadcrumbs = Breadcrumbs; |
@@ -24,31 +24,12 @@ 'use strict'; | ||
const BreadcrumbsContainer = ({ | ||
children | ||
}) => { | ||
return react.jsx("nav", { | ||
"aria-label": "breadcrumb" | ||
}, react.jsx(box.Flex, { | ||
as: "ul", | ||
gap: 0.5, | ||
alignItems: "center" | ||
}, children)); | ||
}; | ||
children, | ||
'aria-label': ariaLabel | ||
}) => react.jsx("nav", { | ||
"aria-label": ariaLabel | ||
}, react.jsx(box.Flex, { | ||
as: "ul", | ||
gap: 0.5, | ||
alignItems: "center" | ||
}, children)); | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
const BreadcrumbsItem = props => { | ||
@@ -61,18 +42,16 @@ const { | ||
as: "li" | ||
}, href ? react.jsx(text.TextLink, _extends({ | ||
href: href | ||
}, props)) : react.jsx(text.Text, null, children)); | ||
}, href ? react.jsx(text.TextLink, props) : react.jsx(text.Text, null, children)); | ||
}; | ||
const Breadcrumbs = ({ | ||
links, | ||
'aria-label': ariaLabel = 'breadcrumb', | ||
links | ||
}) => react.jsx(BreadcrumbsContainer, { | ||
"aria-label": ariaLabel | ||
}, links.map(({ | ||
label, | ||
...props | ||
}) => { | ||
return react.jsx(BreadcrumbsContainer, props, links.map(({ | ||
label, | ||
...props | ||
}, index) => react.jsx(react$1.Fragment, { | ||
key: index | ||
}, index == 0 ? null : react.jsx(BreadcrumbsDivider, null), react.jsx(BreadcrumbsItem, props, label)))); | ||
}; | ||
}, index) => react.jsx(react$1.Fragment, { | ||
key: index | ||
}, index == 0 ? null : react.jsx(BreadcrumbsDivider, null), react.jsx(BreadcrumbsItem, props, label)))); | ||
@@ -79,0 +58,0 @@ exports.Breadcrumbs = Breadcrumbs; |
@@ -27,31 +27,12 @@ import { Fragment } from 'react'; | ||
const BreadcrumbsContainer = ({ | ||
children | ||
}) => { | ||
return jsx("nav", { | ||
"aria-label": "breadcrumb" | ||
}, jsx(Flex, { | ||
as: "ul", | ||
gap: 0.5, | ||
alignItems: "center" | ||
}, children)); | ||
}; | ||
children, | ||
'aria-label': ariaLabel | ||
}) => jsx("nav", { | ||
"aria-label": ariaLabel | ||
}, jsx(Flex, { | ||
as: "ul", | ||
gap: 0.5, | ||
alignItems: "center" | ||
}, children)); | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
const BreadcrumbsItem = props => { | ||
@@ -64,19 +45,17 @@ const { | ||
as: "li" | ||
}, href ? jsx(TextLink, _extends({ | ||
href: href | ||
}, props)) : jsx(Text, null, children)); | ||
}, href ? jsx(TextLink, props) : jsx(Text, null, children)); | ||
}; | ||
const Breadcrumbs = ({ | ||
links, | ||
'aria-label': ariaLabel = 'breadcrumb', | ||
links | ||
}) => jsx(BreadcrumbsContainer, { | ||
"aria-label": ariaLabel | ||
}, links.map(({ | ||
label, | ||
...props | ||
}) => { | ||
return jsx(BreadcrumbsContainer, props, links.map(({ | ||
label, | ||
...props | ||
}, index) => jsx(Fragment, { | ||
key: index | ||
}, index == 0 ? null : jsx(BreadcrumbsDivider, null), jsx(BreadcrumbsItem, props, label)))); | ||
}; | ||
}, index) => jsx(Fragment, { | ||
key: index | ||
}, index == 0 ? null : jsx(BreadcrumbsDivider, null), jsx(BreadcrumbsItem, props, label)))); | ||
export { Breadcrumbs, BreadcrumbsContainer, BreadcrumbsDivider, BreadcrumbsItem }; |
import { ReactNode } from 'react'; | ||
import { BreadcrumbsItemProps } from './BreadcrumbsItem'; | ||
export declare type BreadcrumbsProps = { | ||
links: { | ||
href?: string; | ||
'aria-label'?: string; | ||
links: Omit<BreadcrumbsItemProps, 'children'> & { | ||
label: ReactNode; | ||
}[]; | ||
}; | ||
export declare const Breadcrumbs: ({ links, ...props }: BreadcrumbsProps) => JSX.Element; | ||
export declare const Breadcrumbs: ({ "aria-label": ariaLabel, links, }: BreadcrumbsProps) => JSX.Element; |
@@ -1,5 +0,5 @@ | ||
import type { ReactNode } from 'react'; | ||
export declare type BreadcrumbsContainerProps = { | ||
children: ReactNode; | ||
}; | ||
export declare const BreadcrumbsContainer: ({ children, }: BreadcrumbsContainerProps) => JSX.Element; | ||
import type { PropsWithChildren } from 'react'; | ||
export declare type BreadcrumbsContainerProps = PropsWithChildren<{ | ||
'aria-label': string; | ||
}>; | ||
export declare const BreadcrumbsContainer: ({ children, "aria-label": ariaLabel, }: BreadcrumbsContainerProps) => JSX.Element; |
@@ -1,4 +0,3 @@ | ||
import { PropsWithChildren } from 'react'; | ||
export declare const BreadcrumbsItem: (props: PropsWithChildren<{ | ||
href?: string | undefined; | ||
}>) => JSX.Element; | ||
import { LinkProps } from '@ag.ds-next/core'; | ||
export declare type BreadcrumbsItemProps = LinkProps; | ||
export declare const BreadcrumbsItem: (props: LinkProps) => JSX.Element; |
{ | ||
"name": "@ag.ds-next/breadcrumbs", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"main": "dist/ag.ds-next-breadcrumbs.cjs.js", | ||
@@ -8,6 +8,6 @@ "module": "dist/ag.ds-next-breadcrumbs.esm.js", | ||
"peerDependencies": { | ||
"@ag.ds-next/box": "4.0.0", | ||
"@ag.ds-next/core": "2.1.0", | ||
"@ag.ds-next/icon": "4.0.0", | ||
"@ag.ds-next/text": "4.0.0", | ||
"@ag.ds-next/box": "4.0.1", | ||
"@ag.ds-next/core": "2.1.1", | ||
"@ag.ds-next/icon": "4.0.1", | ||
"@ag.ds-next/text": "4.0.1", | ||
"@emotion/react": "^11.7.0", | ||
@@ -14,0 +14,0 @@ "react": "^16.14.0 || ^17.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13770
304