diff --git a/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.d.ts b/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.d.ts index c16f0b6..554c507 100644 --- a/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.d.ts +++ b/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.d.ts @@ -11,6 +11,10 @@ interface AccordionSkeletonProps { * title and chevron. */ align?: 'start' | 'end'; + /** + * Specify the type of list that is rendered, `ul` or `ol`. + */ + as?: 'ul' | 'ol'; /** * Specify an optional className to add. */ @@ -29,13 +33,17 @@ interface AccordionSkeletonProps { */ open?: boolean; } -declare function AccordionSkeleton({ align, className, count, isFlush, open, ...rest }: AccordionSkeletonProps): import("react/jsx-runtime").JSX.Element; +declare function AccordionSkeleton({ align, as, className, count, isFlush, open, ...rest }: AccordionSkeletonProps): import("react/jsx-runtime").JSX.Element; declare namespace AccordionSkeleton { var propTypes: { /** * Specify the alignment of the accordion heading title and chevron. */ align: PropTypes.Requireable; + /** + * Specify the type of list that is rendered, `ul` or `ol`. + */ + as: PropTypes.Requireable; /** * Specify an optional className to add. */ diff --git a/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.js b/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.js index f141639..a33c9ea 100644 --- a/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.js +++ b/node_modules/@carbon/react/es/components/Accordion/Accordion.Skeleton.js @@ -17,6 +17,7 @@ var _SkeletonText, _SkeletonText2, _SkeletonText3; function AccordionSkeleton(_ref) { let { align = 'end', + as = 'ul', className, count = 4, isFlush, @@ -29,9 +30,9 @@ function AccordionSkeleton(_ref) { [`${prefix}--accordion--flush`]: isFlush && align !== 'start' }); const numSkeletonItems = open ? count - 1 : count; - return /*#__PURE__*/React__default.createElement("ul", _extends({ + return /*#__PURE__*/React__default.createElement(as, _extends({ className: classes - }, rest), open && /*#__PURE__*/React__default.createElement("li", { + }, rest), open && /*#__PURE__*/React__default.createElement(as, { className: `${prefix}--accordion__item ${prefix}--accordion__item--active` }, /*#__PURE__*/React__default.createElement("span", { className: `${prefix}--accordion__heading` @@ -58,6 +59,10 @@ AccordionSkeleton.propTypes = { * Specify the alignment of the accordion heading title and chevron. */ align: PropTypes.oneOf(['start', 'end']), + /** + * Specify the type of list that is rendered, `ul` or `ol`. + */ + as: PropTypes.oneOf(['ul', 'ol']), /** * Specify an optional className to add. */ @@ -77,7 +82,7 @@ AccordionSkeleton.propTypes = { }; function AccordionSkeletonItem() { const prefix = usePrefix(); - return /*#__PURE__*/React__default.createElement("li", { + return /*#__PURE__*/React__default.createElement(as, { className: `${prefix}--accordion__item` }, /*#__PURE__*/React__default.createElement("span", { className: `${prefix}--accordion__heading` diff --git a/node_modules/@carbon/react/es/components/Accordion/Accordion.d.ts b/node_modules/@carbon/react/es/components/Accordion/Accordion.d.ts index 4a7153f..aa8ee7b 100644 --- a/node_modules/@carbon/react/es/components/Accordion/Accordion.d.ts +++ b/node_modules/@carbon/react/es/components/Accordion/Accordion.d.ts @@ -12,6 +12,11 @@ interface AccordionProps { * title and chevron. Defaults to `end`. */ align?: 'start' | 'end'; + /** + * Specify the type of list that is rendered, `ul` or `ol`. + * Defaults to `ul`. + */ + as?: 'ul' | 'ol'; /** * Specify an optional className to be applied to * the container node. @@ -33,13 +38,17 @@ interface AccordionProps { */ size?: 'sm' | 'md' | 'lg'; } -declare function Accordion({ align, children, className: customClassName, disabled, isFlush, size, ...rest }: PropsWithChildren): import("react/jsx-runtime").JSX.Element; +declare function Accordion({ align, as, children, className: customClassName, disabled, isFlush, size, ...rest }: PropsWithChildren): import("react/jsx-runtime").JSX.Element; declare namespace Accordion { var propTypes: { /** * Specify the alignment of the accordion heading title and chevron. */ align: PropTypes.Requireable; + /** + * Specify the type of list that is rendered, `ul` or `ol`. + */ + as: PropTypes.Requireable; /** * Pass in the children that will be rendered within the Accordion */ diff --git a/node_modules/@carbon/react/es/components/Accordion/Accordion.js b/node_modules/@carbon/react/es/components/Accordion/Accordion.js index a0b2764..b3b31b4 100644 --- a/node_modules/@carbon/react/es/components/Accordion/Accordion.js +++ b/node_modules/@carbon/react/es/components/Accordion/Accordion.js @@ -15,6 +15,7 @@ import { AccordionProvider } from './AccordionProvider.js'; function Accordion(_ref) { let { align = 'end', + as = 'ul', children, className: customClassName, disabled = false, @@ -32,7 +33,7 @@ function Accordion(_ref) { }); return /*#__PURE__*/React__default.createElement(AccordionProvider, { disabled: disabled - }, /*#__PURE__*/React__default.createElement("ul", _extends({ + }, /*#__PURE__*/React__default.createElement(as, _extends({ className: className }, rest), children)); } @@ -41,6 +42,10 @@ Accordion.propTypes = { * Specify the alignment of the accordion heading title and chevron. */ align: PropTypes.oneOf(['start', 'end']), + /** + * Specify the type of list that is rendered, `ul` or `ol`. + */ + as: PropTypes.oneOf(['ul', 'ol']), /** * Pass in the children that will be rendered within the Accordion */