@common-origin/design-system 1.9.0 → 1.9.2
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/components/molecules/FeatureBlock/FeatureBlock.d.ts +12 -0
- package/dist/components/molecules/FeatureBlock/index.d.ts +1 -0
- package/dist/components/molecules/index.d.ts +1 -1
- package/dist/index.esm.js +47 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +47 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type FeatureBlockProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
excerpt: string;
|
|
5
|
+
labels: string[];
|
|
6
|
+
coverImage: string;
|
|
7
|
+
date: string;
|
|
8
|
+
onReadMore?: () => void;
|
|
9
|
+
readMoreHref?: string;
|
|
10
|
+
readMoreText?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const FeatureBlock: React.FC<FeatureBlockProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FeatureBlock';
|
package/dist/index.esm.js
CHANGED
|
@@ -750,7 +750,7 @@ var AvatarContainer = styled.div.withConfig({
|
|
|
750
750
|
}, function (_a) {
|
|
751
751
|
var $size = _a.$size;
|
|
752
752
|
return tokens.semantic.size.avatar[$size];
|
|
753
|
-
}, tokens.base.border.radius.circle, tokens.semantic.color.background.
|
|
753
|
+
}, tokens.base.border.radius.circle, tokens.semantic.color.background.surface);
|
|
754
754
|
var AvatarImage = styled.img.withConfig({
|
|
755
755
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
756
756
|
return !prop.startsWith('$');
|
|
@@ -2404,16 +2404,19 @@ var CardSmall = function CardSmall(_a) {
|
|
|
2404
2404
|
height: 300
|
|
2405
2405
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
2406
2406
|
direction: "column",
|
|
2407
|
-
gap: "
|
|
2407
|
+
gap: "xs"
|
|
2408
2408
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2409
2409
|
variant: "small"
|
|
2410
|
-
}, title),
|
|
2410
|
+
}, title), /*#__PURE__*/React.createElement(Stack, {
|
|
2411
|
+
direction: "column",
|
|
2412
|
+
gap: "none"
|
|
2413
|
+
}, subtitle && /*#__PURE__*/React.createElement(Typography, {
|
|
2411
2414
|
variant: "label",
|
|
2412
2415
|
color: "subdued"
|
|
2413
2416
|
}, subtitle), meta && /*#__PURE__*/React.createElement(Typography, {
|
|
2414
2417
|
variant: "label",
|
|
2415
2418
|
color: "subdued"
|
|
2416
|
-
}, meta)))));
|
|
2419
|
+
}, meta))))));
|
|
2417
2420
|
};
|
|
2418
2421
|
var templateObject_1$7;
|
|
2419
2422
|
|
|
@@ -2593,68 +2596,64 @@ React.createElement;
|
|
|
2593
2596
|
var _a$1 = tokens.base,
|
|
2594
2597
|
spacing$1 = _a$1.spacing,
|
|
2595
2598
|
border$1 = _a$1.border;
|
|
2596
|
-
var
|
|
2597
|
-
displayName: "
|
|
2598
|
-
componentId: "sc-
|
|
2599
|
+
var FeatureBlockStyled = styled.div.withConfig({
|
|
2600
|
+
displayName: "FeatureBlock__FeatureBlockStyled",
|
|
2601
|
+
componentId: "sc-1mi4lso-0"
|
|
2599
2602
|
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n @media (min-width: ", ") {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n }\n\n @media (min-width: ", ") {\n gap: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n\n &:hover {\n opacity: 0.8;\n }\n }\n\n a {\n text-decoration: none;\n }\n"], ["\n @media (min-width: ", ") {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n }\n\n @media (min-width: ", ") {\n gap: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n\n &:hover {\n opacity: 0.8;\n }\n }\n\n a {\n text-decoration: none;\n }\n"])), tokens.base.breakpoint.md, tokens.base.breakpoint.lg, spacing$1[12], border$1.radius[6]);
|
|
2600
2603
|
var ImageWrapper = styled.div.withConfig({
|
|
2601
|
-
displayName: "
|
|
2602
|
-
componentId: "sc-
|
|
2604
|
+
displayName: "FeatureBlock__ImageWrapper",
|
|
2605
|
+
componentId: "sc-1mi4lso-1"
|
|
2603
2606
|
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"], ["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"])), tokens.base.breakpoint.lg);
|
|
2604
2607
|
var ContentSection = styled.div.withConfig({
|
|
2605
|
-
displayName: "
|
|
2606
|
-
componentId: "sc-
|
|
2608
|
+
displayName: "FeatureBlock__ContentSection",
|
|
2609
|
+
componentId: "sc-1mi4lso-2"
|
|
2607
2610
|
})(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"], ["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"])), spacing$1[6], tokens.base.breakpoint.lg, spacing$1[8], tokens.base.breakpoint.xl, spacing$1[24]);
|
|
2608
2611
|
var ButtonWrapper = styled.div.withConfig({
|
|
2609
|
-
displayName: "
|
|
2610
|
-
componentId: "sc-
|
|
2612
|
+
displayName: "FeatureBlock__ButtonWrapper",
|
|
2613
|
+
componentId: "sc-1mi4lso-3"
|
|
2611
2614
|
})(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n button {\n margin-top: ", ";\n }\n"], ["\n button {\n margin-top: ", ";\n }\n"])), spacing$1[4]);
|
|
2612
2615
|
var ContentWrapper = styled.div.withConfig({
|
|
2613
|
-
displayName: "
|
|
2614
|
-
componentId: "sc-
|
|
2616
|
+
displayName: "FeatureBlock__ContentWrapper",
|
|
2617
|
+
componentId: "sc-1mi4lso-4"
|
|
2615
2618
|
})(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n"])));
|
|
2616
|
-
var
|
|
2619
|
+
var FeatureBlock = function FeatureBlock(_a) {
|
|
2617
2620
|
var title = _a.title,
|
|
2618
2621
|
excerpt = _a.excerpt,
|
|
2619
2622
|
_b = _a.labels,
|
|
2620
2623
|
labels = _b === void 0 ? [] : _b,
|
|
2621
|
-
tag = _a.tag,
|
|
2622
2624
|
coverImage = _a.coverImage,
|
|
2623
2625
|
date = _a.date,
|
|
2624
2626
|
onReadMore = _a.onReadMore,
|
|
2625
2627
|
readMoreHref = _a.readMoreHref,
|
|
2626
2628
|
_c = _a.readMoreText,
|
|
2627
2629
|
readMoreText = _c === void 0 ? "Read more" : _c;
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
}, readMoreText)))))), /*#__PURE__*/React.createElement(Divider, null));
|
|
2656
|
-
}
|
|
2657
|
-
return null;
|
|
2630
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FeatureBlockStyled, null, /*#__PURE__*/React.createElement(ImageWrapper, null, /*#__PURE__*/React.createElement(Picture, {
|
|
2631
|
+
title: title,
|
|
2632
|
+
src: coverImage
|
|
2633
|
+
})), /*#__PURE__*/React.createElement(ContentSection, null, /*#__PURE__*/React.createElement(ContentWrapper, null, /*#__PURE__*/React.createElement(Stack, {
|
|
2634
|
+
direction: "column",
|
|
2635
|
+
gap: "md"
|
|
2636
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2637
|
+
variant: "h3"
|
|
2638
|
+
}, title), /*#__PURE__*/React.createElement(DateFormatter, {
|
|
2639
|
+
dateString: date
|
|
2640
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
2641
|
+
variant: "small"
|
|
2642
|
+
}, excerpt), /*#__PURE__*/React.createElement(Stack, {
|
|
2643
|
+
direction: "row",
|
|
2644
|
+
gap: "xs"
|
|
2645
|
+
}, Array.isArray(labels) && labels.map(function (label, index) {
|
|
2646
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
2647
|
+
key: index,
|
|
2648
|
+
title: label,
|
|
2649
|
+
variant: "default"
|
|
2650
|
+
});
|
|
2651
|
+
})), (onReadMore || readMoreHref) && /*#__PURE__*/React.createElement(ButtonWrapper, null, readMoreHref ? /*#__PURE__*/React.createElement(Button, {
|
|
2652
|
+
purpose: "link",
|
|
2653
|
+
url: readMoreHref
|
|
2654
|
+
}, readMoreText) : /*#__PURE__*/React.createElement(Button, {
|
|
2655
|
+
onClick: onReadMore
|
|
2656
|
+
}, readMoreText)))))), /*#__PURE__*/React.createElement(Divider, null));
|
|
2658
2657
|
};
|
|
2659
2658
|
var templateObject_1$3, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2;
|
|
2660
2659
|
|
|
@@ -3105,5 +3104,5 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
3105
3104
|
};
|
|
3106
3105
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35;
|
|
3107
3106
|
|
|
3108
|
-
export { Avatar, Badge, BooleanChip, Box, Breadcrumbs, Button, CardLarge, CardSmall, Chip, ChipGroup, CodeBlock, Container, DateFormatter,
|
|
3107
|
+
export { Avatar, Badge, BooleanChip, Box, Breadcrumbs, Button, CardLarge, CardSmall, Chip, ChipGroup, CodeBlock, Container, DateFormatter, Divider, Dropdown, FeatureBlock, FilterChip, Grid, GridCol, Icon, IconButton, LegacyChip, PageTitle, Picture, ProgressBar, ResponsiveGrid, Stack, Typography, iconsData, tokens };
|
|
3109
3108
|
//# sourceMappingURL=index.esm.js.map
|