@odx/websites-react 1.4.1 → 1.5.0
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/web/product/productNBASection/ProductNBASection.d.ts +2 -1
- package/dist/web/product/productNBASection/ProductNBASection.d.ts.map +1 -1
- package/dist/web/product/productNBASection/ProductNBASection.js +3 -12
- package/dist/web/product/productNBASection/ProductNBASection.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type HeadlineProps } from '../../../components/typography/headline';
|
|
3
3
|
export interface ProductNBASectionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
headline
|
|
4
|
+
headline: string;
|
|
5
5
|
headlineActAs?: HeadlineProps['actAs'];
|
|
6
|
+
description?: React.ReactNode;
|
|
6
7
|
}
|
|
7
8
|
declare const ProductNBASection: React.FC<ProductNBASectionProps>;
|
|
8
9
|
export { ProductNBASection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductNBASection.d.ts","sourceRoot":"","sources":["../../../../src/web/product/productNBASection/ProductNBASection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductNBASection.d.ts","sourceRoot":"","sources":["../../../../src/web/product/productNBASection/ProductNBASection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,yCAAyC,CAAC;AAIjD,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAClF,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+BvD,CAAC;AAEF,OAAO,EAAC,iBAAiB,EAAC,CAAC"}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { BlockChildrenWidthContainer } from '../../../components/layout/block';
|
|
4
|
-
import { BlockGrid } from '../../../components/layout/block';
|
|
5
|
-
import { Divider } from '../../../components/structures/divider';
|
|
6
3
|
import { Headline, } from '../../../components/typography/headline';
|
|
4
|
+
import { BodyText } from '../../../components/typography/bodyText';
|
|
7
5
|
import { cn } from '../../../utils';
|
|
8
|
-
const ProductNBASection = ({ children, headline, headlineActAs, ...props }) => {
|
|
9
|
-
|
|
10
|
-
const childElementsWithDivider = React.Children.map(children, (child, index) => {
|
|
11
|
-
const isLastRow = index > childrenCount - 3;
|
|
12
|
-
const isLastItem = index === childrenCount - 1;
|
|
13
|
-
return (_jsxs("div", { children: [child, _jsx(Divider, { className: cn(isLastItem && 'hidden', isLastRow && 'md:hidden', 'mt-2') })] }));
|
|
14
|
-
});
|
|
15
|
-
return (_jsx(BlockGrid, { paddingBottom: 'none', children: _jsx(BlockChildrenWidthContainer, { paddingBottom: 'none', children: _jsxs("div", { ...props, className: "flex flex-col md:items-center", children: [headline && (_jsx(Headline, { headingLevel: "h5", actAs: headlineActAs, children: headline })), _jsx("div", { className: cn(childrenCount > 1 &&
|
|
16
|
-
'grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-2', 'py-2'), children: childElementsWithDivider })] }) }) }));
|
|
6
|
+
const ProductNBASection = ({ children, headline, headlineActAs, description, className, ...props }) => {
|
|
7
|
+
return (_jsxs("div", { ...props, className: cn('grid grid-cols-12 gap-x-6 gap-y-4 lg:gap-y-8 xl:gap-y-6', className), children: [_jsxs("div", { className: "col-span-12 xl:col-span-6", children: [_jsx(Headline, { headingLevel: "h3", actAs: headlineActAs, children: headline }), description && _jsx(BodyText, { children: description })] }), _jsx("div", { className: "col-span-12 flex flex-col xl:col-start-8 xl:col-span-5", children: React.Children.map(children, child => (_jsx("div", { className: "px-6 py-4 border-b border-miscellaneous-divider last:border-b-0", children: child }))) })] }));
|
|
17
8
|
};
|
|
18
9
|
export { ProductNBASection };
|
|
19
10
|
//# sourceMappingURL=ProductNBASection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductNBASection.js","sourceRoot":"","sources":["../../../../src/web/product/productNBASection/ProductNBASection.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"ProductNBASection.js","sourceRoot":"","sources":["../../../../src/web/product/productNBASection/ProductNBASection.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,GAET,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAQlC,MAAM,iBAAiB,GAAqC,CAAC,EAC3D,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,WAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,kBACM,KAAK,EACT,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,SAAS,CACV,aAED,eAAK,SAAS,EAAC,2BAA2B,aACxC,KAAC,QAAQ,IAAC,YAAY,EAAC,IAAI,EAAC,KAAK,EAAE,aAAa,YAC7C,QAAQ,GACA,EACV,WAAW,IAAI,KAAC,QAAQ,cAAE,WAAW,GAAY,IAC9C,EACN,cAAK,SAAS,EAAC,wDAAwD,YACpE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,CACrC,cAAK,SAAS,EAAC,iEAAiE,YAC7E,KAAK,GACF,CACP,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAC,iBAAiB,EAAC,CAAC"}
|
package/package.json
CHANGED