@common-origin/design-system 1.1.0 → 1.3.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/README.md +1 -1
- package/dist/components/atoms/DateFormatter/DateFormatter.d.ts +10 -0
- package/dist/components/atoms/DateFormatter/index.d.ts +1 -0
- package/dist/components/atoms/{CoverImage/CoverImage.d.ts → Picture/Picture.d.ts} +4 -3
- package/dist/components/atoms/Picture/index.d.ts +1 -0
- package/dist/components/atoms/index.d.ts +2 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/molecules/ArtCard/ArtCard.d.ts +3 -2
- package/dist/components/molecules/DesignCard/DesignCard.d.ts +3 -1
- package/dist/index.esm.js +869 -166
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +876 -165
- package/dist/index.js.map +1 -1
- package/dist/tokens/index.esm.js +623 -0
- package/dist/tokens/index.esm.js.map +1 -0
- package/dist/tokens/index.js +628 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/tokens.d.ts +616 -0
- package/package.json +3 -3
- package/dist/components/atoms/CoverImage/index.d.ts +0 -1
- package/dist/components/dateFormatter.d.ts +0 -7
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var styled = require('styled-components');
|
|
5
5
|
var Link = require('next/link');
|
|
6
|
-
var Image = require('next/image');
|
|
7
6
|
var dateFns = require('date-fns');
|
|
7
|
+
var Image = require('next/image');
|
|
8
8
|
|
|
9
9
|
function _extends() {
|
|
10
10
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -33,6 +33,17 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
33
33
|
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
var __assign = function() {
|
|
37
|
+
__assign = Object.assign || function __assign(t) {
|
|
38
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
+
s = arguments[i];
|
|
40
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
44
|
+
return __assign.apply(this, arguments);
|
|
45
|
+
};
|
|
46
|
+
|
|
36
47
|
function __rest(s, e) {
|
|
37
48
|
var t = {};
|
|
38
49
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -45,6 +56,44 @@ function __rest(s, e) {
|
|
|
45
56
|
return t;
|
|
46
57
|
}
|
|
47
58
|
|
|
59
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
60
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
61
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
62
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
63
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
64
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
65
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function __generator(thisArg, body) {
|
|
70
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
71
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
72
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
73
|
+
function step(op) {
|
|
74
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
75
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
76
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
77
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
78
|
+
switch (op[0]) {
|
|
79
|
+
case 0: case 1: t = op; break;
|
|
80
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
81
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
82
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
83
|
+
default:
|
|
84
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
85
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
86
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
87
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
88
|
+
if (t[2]) _.ops.pop();
|
|
89
|
+
_.trys.pop(); continue;
|
|
90
|
+
}
|
|
91
|
+
op = body.call(thisArg, _);
|
|
92
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
93
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
48
97
|
function __makeTemplateObject(cooked, raw) {
|
|
49
98
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
50
99
|
return cooked;
|
|
@@ -672,11 +721,14 @@ var tokens = {
|
|
|
672
721
|
semantic: semantic$1
|
|
673
722
|
};
|
|
674
723
|
|
|
724
|
+
React.createElement;
|
|
675
725
|
var AvatarContainer = styled.div.withConfig({
|
|
676
726
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
677
|
-
return !
|
|
678
|
-
}
|
|
679
|
-
|
|
727
|
+
return !prop.startsWith('$');
|
|
728
|
+
},
|
|
729
|
+
displayName: "Avatar__AvatarContainer",
|
|
730
|
+
componentId: "sc-ezn4ax-0"
|
|
731
|
+
})(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"])), function (_a) {
|
|
680
732
|
var $size = _a.$size;
|
|
681
733
|
return tokens.semantic.size.avatar[$size];
|
|
682
734
|
}, function (_a) {
|
|
@@ -685,14 +737,18 @@ var AvatarContainer = styled.div.withConfig({
|
|
|
685
737
|
}, tokens.base.border.radius.circle, tokens.semantic.color.background.subtle);
|
|
686
738
|
var AvatarImage = styled.img.withConfig({
|
|
687
739
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
688
|
-
return !
|
|
689
|
-
}
|
|
690
|
-
|
|
740
|
+
return !prop.startsWith('$');
|
|
741
|
+
},
|
|
742
|
+
displayName: "Avatar__AvatarImage",
|
|
743
|
+
componentId: "sc-ezn4ax-1"
|
|
744
|
+
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"])), tokens.base.border.radius.circle);
|
|
691
745
|
var AvatarInitials = styled.span.withConfig({
|
|
692
746
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
693
|
-
return !
|
|
694
|
-
}
|
|
695
|
-
|
|
747
|
+
return !prop.startsWith('$');
|
|
748
|
+
},
|
|
749
|
+
displayName: "Avatar__AvatarInitials",
|
|
750
|
+
componentId: "sc-ezn4ax-2"
|
|
751
|
+
})(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: 1;\n text-transform: uppercase;\n user-select: none;\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: 1;\n text-transform: uppercase;\n user-select: none;\n"
|
|
696
752
|
// Helper function to get initials from name
|
|
697
753
|
])), tokens.base.fontFamily.body, tokens.base.fontWeight[3], function (_a) {
|
|
698
754
|
var $size = _a.$size;
|
|
@@ -755,24 +811,27 @@ var Avatar = function Avatar(_a) {
|
|
|
755
811
|
"aria-hidden": "true"
|
|
756
812
|
}, initials));
|
|
757
813
|
};
|
|
758
|
-
var templateObject_1$
|
|
814
|
+
var templateObject_1$k, templateObject_2$8, templateObject_3$6;
|
|
759
815
|
|
|
816
|
+
React.createElement;
|
|
760
817
|
var StyledBox = styled.div.withConfig({
|
|
761
818
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
762
819
|
return !prop.startsWith('$');
|
|
763
|
-
}
|
|
820
|
+
},
|
|
821
|
+
displayName: "Box__StyledBox",
|
|
822
|
+
componentId: "sc-aj0jhd-0"
|
|
764
823
|
})(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"], ["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"
|
|
765
824
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
766
825
|
])), function (props) {
|
|
767
|
-
return props.$display && styled.css(templateObject_1$
|
|
826
|
+
return props.$display && styled.css(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
768
827
|
}, function (props) {
|
|
769
|
-
return props.$flexDirection && styled.css(templateObject_2$
|
|
828
|
+
return props.$flexDirection && styled.css(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
770
829
|
}, function (props) {
|
|
771
|
-
return props.$justifyContent && styled.css(templateObject_3$
|
|
830
|
+
return props.$justifyContent && styled.css(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
772
831
|
}, function (props) {
|
|
773
|
-
return props.$alignItems && styled.css(templateObject_4$
|
|
832
|
+
return props.$alignItems && styled.css(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
774
833
|
}, function (props) {
|
|
775
|
-
return props.$flexWrap && styled.css(templateObject_5$
|
|
834
|
+
return props.$flexWrap && styled.css(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
776
835
|
}, function (props) {
|
|
777
836
|
return props.$gap && styled.css(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), tokens.semantic.spacing.layout[props.$gap]);
|
|
778
837
|
}, function (props) {
|
|
@@ -954,7 +1013,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
954
1013
|
}, rest), children);
|
|
955
1014
|
};
|
|
956
1015
|
var Box = BoxTransform;
|
|
957
|
-
var templateObject_1$
|
|
1016
|
+
var templateObject_1$j, templateObject_2$7, templateObject_3$5, templateObject_4$4, templateObject_5$3, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1, templateObject_19$1, templateObject_20$1, templateObject_21$1, templateObject_22$1, templateObject_23$1, templateObject_24$1, templateObject_25$1, templateObject_26$1, templateObject_27$1, templateObject_28$1, templateObject_29$1, templateObject_30$1, templateObject_31$1, templateObject_32$1, templateObject_33$1, templateObject_34$1, templateObject_35$1, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42, templateObject_43;
|
|
958
1017
|
|
|
959
1018
|
var add = {
|
|
960
1019
|
path: "M13 11H19V13H13V19H11V13H5V11H11V5H13V11Z",
|
|
@@ -1049,11 +1108,14 @@ var iconsData = {
|
|
|
1049
1108
|
userBox: userBox
|
|
1050
1109
|
};
|
|
1051
1110
|
|
|
1111
|
+
React.createElement;
|
|
1052
1112
|
var IconStyled = styled.span.withConfig({
|
|
1053
1113
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1054
1114
|
return !prop.startsWith('$');
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1115
|
+
},
|
|
1116
|
+
displayName: "Icon__IconStyled",
|
|
1117
|
+
componentId: "sc-1105czq-0"
|
|
1118
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"])), function (_a) {
|
|
1057
1119
|
var $size = _a.$size;
|
|
1058
1120
|
return tokens.semantic.size.icon[$size];
|
|
1059
1121
|
}, function (_a) {
|
|
@@ -1117,19 +1179,20 @@ var Icon = function Icon(_a) {
|
|
|
1117
1179
|
d: iconData.path
|
|
1118
1180
|
})));
|
|
1119
1181
|
};
|
|
1120
|
-
var templateObject_1$
|
|
1182
|
+
var templateObject_1$i;
|
|
1121
1183
|
|
|
1184
|
+
React.createElement;
|
|
1122
1185
|
var button = tokens.component.button,
|
|
1123
1186
|
semantic = tokens.semantic;
|
|
1124
1187
|
// Base styles shared between button and link
|
|
1125
1188
|
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokens.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic.motion.hover, ";\n white-space: nowrap;\n user-select: none;\n \n &:focus {\n outline: ").concat(button.focus.outline, ";\n outline-offset: ").concat(button.focus.outlineOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n");
|
|
1126
1189
|
// Dynamic variant styles using component tokens
|
|
1127
|
-
var getVariantStyles
|
|
1190
|
+
var getVariantStyles = function getVariantStyles(_a) {
|
|
1128
1191
|
var $variant = _a.$variant;
|
|
1129
1192
|
return "\n background-color: ".concat($variant === 'primary' ? button.primary.backgroundColor : $variant === 'secondary' ? button.variants.secondary.backgroundColor : button.variants.naked.backgroundColor, ";\n color: ").concat($variant === 'primary' ? button.primary.textColor : $variant === 'secondary' ? button.variants.secondary.textColor : button.variants.naked.textColor, ";\n \n &:hover:not(:disabled) {\n background-color: ").concat($variant === 'primary' ? button.hover.backgroundColor : $variant === 'secondary' ? button.variants.secondary.hover.backgroundColor : button.variants.naked.hover.backgroundColor, ";\n }\n\n &:active:not(:disabled) {\n background-color: ").concat($variant === 'primary' ? button.active.backgroundColor : $variant === 'secondary' ? button.variants.secondary.active.backgroundColor : button.variants.naked.active.backgroundColor, ";\n }\n\n &:disabled {\n background-color: ").concat($variant === 'primary' ? button.disabled.backgroundColor : $variant === 'secondary' ? button.variants.secondary.disabled.backgroundColor : button.variants.naked.disabled.backgroundColor, ";\n color: ").concat($variant === 'primary' ? button.disabled.textColor : $variant === 'secondary' ? button.variants.secondary.disabled.textColor : button.variants.naked.disabled.textColor, ";\n }\n");
|
|
1130
1193
|
};
|
|
1131
1194
|
// Dynamic size styles using component tokens
|
|
1132
|
-
var getSizeStyles
|
|
1195
|
+
var getSizeStyles = function getSizeStyles(_a) {
|
|
1133
1196
|
var $size = _a.$size;
|
|
1134
1197
|
switch ($size) {
|
|
1135
1198
|
case 'small':
|
|
@@ -1144,16 +1207,20 @@ var getSizeStyles$1 = function getSizeStyles(_a) {
|
|
|
1144
1207
|
};
|
|
1145
1208
|
var StyledButton = styled.button.withConfig({
|
|
1146
1209
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1147
|
-
return !
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1210
|
+
return !prop.startsWith('$');
|
|
1211
|
+
},
|
|
1212
|
+
displayName: "Button__StyledButton",
|
|
1213
|
+
componentId: "sc-1eiuum9-0"
|
|
1214
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles);
|
|
1150
1215
|
var StyledLink = styled.a.withConfig({
|
|
1151
1216
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1152
|
-
return !
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1217
|
+
return !prop.startsWith('$');
|
|
1218
|
+
},
|
|
1219
|
+
displayName: "Button__StyledLink",
|
|
1220
|
+
componentId: "sc-1eiuum9-1"
|
|
1221
|
+
})(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
1155
1222
|
// Helper function to get icon size based on button size
|
|
1156
|
-
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles
|
|
1223
|
+
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles);
|
|
1157
1224
|
// Helper function to get icon size based on button size
|
|
1158
1225
|
var getIconSize = function getIconSize(buttonSize) {
|
|
1159
1226
|
switch (buttonSize) {
|
|
@@ -1244,73 +1311,92 @@ var Button = function Button(_a) {
|
|
|
1244
1311
|
"data-testid": dataTestId
|
|
1245
1312
|
}, buttonProps), renderButtonContent(children, iconName, size));
|
|
1246
1313
|
};
|
|
1247
|
-
var templateObject_1$
|
|
1314
|
+
var templateObject_1$h, templateObject_2$6;
|
|
1248
1315
|
|
|
1316
|
+
React.createElement;
|
|
1249
1317
|
var chip = tokens.component.chip;
|
|
1250
|
-
//
|
|
1251
|
-
var
|
|
1252
|
-
var variant = _a.variant;
|
|
1318
|
+
// Helper functions to get styles as objects for CSS custom properties
|
|
1319
|
+
var getVariantStylesAsObject = function getVariantStylesAsObject(variant) {
|
|
1253
1320
|
switch (variant) {
|
|
1254
1321
|
case 'emphasis':
|
|
1255
|
-
return
|
|
1322
|
+
return {
|
|
1323
|
+
backgroundColor: chip.variants.emphasis.backgroundColor,
|
|
1324
|
+
color: chip.variants.emphasis.textColor
|
|
1325
|
+
};
|
|
1256
1326
|
case 'subtle':
|
|
1257
|
-
return
|
|
1327
|
+
return {
|
|
1328
|
+
backgroundColor: chip.variants.subtle.backgroundColor,
|
|
1329
|
+
color: chip.variants.subtle.textColor
|
|
1330
|
+
};
|
|
1258
1331
|
case 'interactive':
|
|
1259
|
-
return
|
|
1332
|
+
return {
|
|
1333
|
+
backgroundColor: chip.variants.interactive.backgroundColor,
|
|
1334
|
+
color: chip.variants.interactive.textColor
|
|
1335
|
+
};
|
|
1260
1336
|
case 'default':
|
|
1261
1337
|
default:
|
|
1262
|
-
return
|
|
1338
|
+
return {
|
|
1339
|
+
backgroundColor: chip["default"].backgroundColor,
|
|
1340
|
+
color: chip["default"].textColor
|
|
1341
|
+
};
|
|
1263
1342
|
}
|
|
1264
1343
|
};
|
|
1265
|
-
|
|
1266
|
-
var getSizeStyles = function getSizeStyles(_a) {
|
|
1267
|
-
var size = _a.size;
|
|
1344
|
+
var getSizeStylesAsObject = function getSizeStylesAsObject(size) {
|
|
1268
1345
|
switch (size) {
|
|
1269
1346
|
case 'small':
|
|
1270
|
-
return
|
|
1347
|
+
return {
|
|
1348
|
+
font: chip.sizes.small.font,
|
|
1349
|
+
padding: chip.sizes.small.padding
|
|
1350
|
+
};
|
|
1271
1351
|
case 'large':
|
|
1272
|
-
return
|
|
1352
|
+
return {
|
|
1353
|
+
font: chip.sizes.large.font,
|
|
1354
|
+
padding: chip.sizes.large.padding
|
|
1355
|
+
};
|
|
1273
1356
|
case 'medium':
|
|
1274
1357
|
default:
|
|
1275
|
-
return
|
|
1358
|
+
return {
|
|
1359
|
+
font: chip.sizes.medium.font,
|
|
1360
|
+
padding: chip.sizes.medium.padding
|
|
1361
|
+
};
|
|
1276
1362
|
}
|
|
1277
1363
|
};
|
|
1278
|
-
// Base styled component
|
|
1364
|
+
// Base styled component using CSS variables to avoid prop leaking
|
|
1279
1365
|
var BaseChip = styled.span.withConfig({
|
|
1280
1366
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
})(templateObject_1$
|
|
1286
|
-
// Wrapper component that
|
|
1287
|
-
])), chip["default"].borderRadius, tokens.semantic.motion.interactive,
|
|
1288
|
-
|
|
1289
|
-
disabled = _a.disabled;
|
|
1290
|
-
if (disabled) {
|
|
1291
|
-
return "\n opacity: 0.6;\n cursor: not-allowed;\n ";
|
|
1292
|
-
}
|
|
1293
|
-
if (clickable) {
|
|
1294
|
-
return "\n cursor: pointer;\n \n &:hover {\n opacity: 0.8;\n }\n \n &:active {\n opacity: 0.9;\n }\n ";
|
|
1295
|
-
}
|
|
1296
|
-
return '';
|
|
1297
|
-
}, chip.variants.interactive.backgroundColor);
|
|
1298
|
-
// Wrapper component that handles prop filtering
|
|
1367
|
+
return !prop.startsWith('$');
|
|
1368
|
+
},
|
|
1369
|
+
displayName: "Chip__BaseChip",
|
|
1370
|
+
componentId: "sc-fvu2t0-0"
|
|
1371
|
+
})(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n \n /* Use CSS custom properties set by wrapper */\n background-color: var(--chip-bg-color);\n color: var(--chip-text-color);\n font: var(--chip-font);\n padding: var(--chip-padding);\n opacity: var(--chip-opacity, 1);\n cursor: var(--chip-cursor, default);\n \n &:hover {\n opacity: var(--chip-hover-opacity, var(--chip-opacity, 1));\n }\n \n &:active {\n opacity: var(--chip-active-opacity, var(--chip-opacity, 1));\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n \n /* Use CSS custom properties set by wrapper */\n background-color: var(--chip-bg-color);\n color: var(--chip-text-color);\n font: var(--chip-font);\n padding: var(--chip-padding);\n opacity: var(--chip-opacity, 1);\n cursor: var(--chip-cursor, default);\n \n &:hover {\n opacity: var(--chip-hover-opacity, var(--chip-opacity, 1));\n }\n \n &:active {\n opacity: var(--chip-active-opacity, var(--chip-opacity, 1));\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"
|
|
1372
|
+
// Wrapper component that applies styles via CSS custom properties
|
|
1373
|
+
])), chip["default"].borderRadius, tokens.semantic.motion.interactive, chip.variants.interactive.backgroundColor);
|
|
1374
|
+
// Wrapper component that applies styles via CSS custom properties
|
|
1299
1375
|
var StyledChip = function StyledChip(_a) {
|
|
1300
|
-
var variant = _a
|
|
1301
|
-
size = _a
|
|
1302
|
-
disabled = _a
|
|
1303
|
-
clickable = _a
|
|
1376
|
+
var $variant = _a.$variant,
|
|
1377
|
+
$size = _a.$size,
|
|
1378
|
+
$disabled = _a.$disabled,
|
|
1379
|
+
$clickable = _a.$clickable,
|
|
1304
1380
|
children = _a.children,
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1381
|
+
style = _a.style,
|
|
1382
|
+
htmlProps = __rest(_a, ["$variant", "$size", "$disabled", "$clickable", "children", "style"]);
|
|
1383
|
+
// Get styles for variant and size
|
|
1384
|
+
var variantStyles = getVariantStylesAsObject($variant);
|
|
1385
|
+
var sizeStyles = getSizeStylesAsObject($size);
|
|
1386
|
+
// Create CSS custom properties object
|
|
1387
|
+
var cssProps = {
|
|
1388
|
+
'--chip-bg-color': variantStyles.backgroundColor,
|
|
1389
|
+
'--chip-text-color': variantStyles.color,
|
|
1390
|
+
'--chip-font': sizeStyles.font,
|
|
1391
|
+
'--chip-padding': sizeStyles.padding,
|
|
1392
|
+
'--chip-opacity': $disabled ? '0.6' : '1',
|
|
1393
|
+
'--chip-cursor': $disabled ? 'not-allowed' : $clickable ? 'pointer' : 'default',
|
|
1394
|
+
'--chip-hover-opacity': $disabled ? '0.6' : $clickable ? '0.8' : '1',
|
|
1395
|
+
'--chip-active-opacity': $disabled ? '0.6' : $clickable ? '0.9' : '1'
|
|
1396
|
+
};
|
|
1308
1397
|
return /*#__PURE__*/React.createElement(BaseChip, _extends({
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
disabled: disabled,
|
|
1312
|
-
clickable: clickable
|
|
1313
|
-
}, cleanHtmlProps), children);
|
|
1398
|
+
style: __assign(__assign({}, cssProps), style)
|
|
1399
|
+
}, htmlProps), children);
|
|
1314
1400
|
};
|
|
1315
1401
|
var Chip = function Chip(_a) {
|
|
1316
1402
|
var children = _a.children,
|
|
@@ -1352,10 +1438,10 @@ var Chip = function Chip(_a) {
|
|
|
1352
1438
|
}
|
|
1353
1439
|
};
|
|
1354
1440
|
return /*#__PURE__*/React.createElement(StyledChip, _extends({
|
|
1355
|
-
variant: normalizedVariant,
|
|
1356
|
-
size: size,
|
|
1357
|
-
disabled: disabled,
|
|
1358
|
-
clickable: isClickable,
|
|
1441
|
+
$variant: normalizedVariant,
|
|
1442
|
+
$size: size,
|
|
1443
|
+
$disabled: disabled || undefined,
|
|
1444
|
+
$clickable: isClickable || undefined,
|
|
1359
1445
|
onClick: isClickable ? handleClick : undefined,
|
|
1360
1446
|
onKeyDown: isClickable ? handleKeyDown : undefined,
|
|
1361
1447
|
tabIndex: isClickable ? 0 : undefined,
|
|
@@ -1377,7 +1463,7 @@ var LegacyChip = function LegacyChip(_a) {
|
|
|
1377
1463
|
variant: newVariant
|
|
1378
1464
|
}, title);
|
|
1379
1465
|
};
|
|
1380
|
-
var templateObject_1$
|
|
1466
|
+
var templateObject_1$g;
|
|
1381
1467
|
|
|
1382
1468
|
// Breakpoints using base tokens
|
|
1383
1469
|
var breakpoints$1 = {
|
|
@@ -1398,53 +1484,96 @@ var media$1 = {
|
|
|
1398
1484
|
'2xl': "@media (min-width: ".concat(breakpoints$1['2xl'], ")")
|
|
1399
1485
|
};
|
|
1400
1486
|
|
|
1401
|
-
|
|
1402
|
-
var
|
|
1487
|
+
React.createElement;
|
|
1488
|
+
var spacing$3 = tokens.semantic.spacing;
|
|
1489
|
+
var StyledContainer = styled.div.withConfig({
|
|
1490
|
+
displayName: "Container__StyledContainer",
|
|
1491
|
+
componentId: "sc-17dbj6n-0"
|
|
1492
|
+
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: 640px;\n }\n \n ", " {\n max-width: 768px;\n }\n \n ", " {\n max-width: 1024px;\n }\n \n ", " {\n max-width: 1280px;\n }\n \n ", " {\n max-width: 1536px;\n }\n"], ["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: 640px;\n }\n \n ", " {\n max-width: 768px;\n }\n \n ", " {\n max-width: 1024px;\n }\n \n ", " {\n max-width: 1280px;\n }\n \n ", " {\n max-width: 1536px;\n }\n"])), spacing$3.layout['2xl'], spacing$3.layout['2xl'], media$1.sm, media$1.md, media$1.lg, media$1.xl, media$1['2xl']);
|
|
1403
1493
|
var Container = function Container(_a) {
|
|
1404
1494
|
var children = _a.children,
|
|
1405
1495
|
props = __rest(_a, ["children"]);
|
|
1406
1496
|
return /*#__PURE__*/React.createElement(StyledContainer, props, children);
|
|
1407
1497
|
};
|
|
1408
|
-
var templateObject_1$
|
|
1498
|
+
var templateObject_1$f;
|
|
1409
1499
|
|
|
1500
|
+
React.createElement;
|
|
1410
1501
|
var base = tokens.base;
|
|
1411
|
-
var
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1502
|
+
var PictureWrapper = styled.div.withConfig({
|
|
1503
|
+
displayName: "Picture__PictureWrapper",
|
|
1504
|
+
componentId: "sc-11d9tei-0"
|
|
1505
|
+
})(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"], ["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"])), media$1.sm);
|
|
1506
|
+
var ImageLink = styled.a.withConfig({
|
|
1507
|
+
displayName: "Picture__ImageLink",
|
|
1508
|
+
componentId: "sc-11d9tei-1"
|
|
1509
|
+
})(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n display: block;\n cursor: pointer;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"], ["\n display: block;\n cursor: pointer;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"])), base.duration.normal, base.easing.easeInOut);
|
|
1510
|
+
var ImageButton = styled.button.withConfig({
|
|
1511
|
+
displayName: "Picture__ImageButton",
|
|
1512
|
+
componentId: "sc-11d9tei-2"
|
|
1513
|
+
})(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n display: block;\n width: 100%;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"], ["\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n display: block;\n width: 100%;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"])), base.duration.normal, base.easing.easeInOut);
|
|
1514
|
+
var StyledImage = styled.img.withConfig({
|
|
1515
|
+
displayName: "Picture__StyledImage",
|
|
1516
|
+
componentId: "sc-11d9tei-3"
|
|
1517
|
+
})(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n width: 100%;\n height: auto;\n border-radius: ", ";\n display: block;\n"], ["\n width: 100%;\n height: auto;\n border-radius: ", ";\n display: block;\n"])), base.border.radius[2]);
|
|
1518
|
+
var Picture = function Picture(_a) {
|
|
1415
1519
|
var title = _a.title,
|
|
1416
1520
|
src = _a.src,
|
|
1417
|
-
slug = _a.slug,
|
|
1418
1521
|
_b = _a.width,
|
|
1419
1522
|
width = _b === void 0 ? 1300 : _b,
|
|
1420
1523
|
_c = _a.height,
|
|
1421
1524
|
height = _c === void 0 ? 630 : _c,
|
|
1525
|
+
onClick = _a.onClick,
|
|
1526
|
+
href = _a.href,
|
|
1422
1527
|
dataTestId = _a["data-testid"];
|
|
1423
1528
|
var image = /*#__PURE__*/React.createElement(StyledImage, {
|
|
1424
1529
|
src: src,
|
|
1425
1530
|
alt: "Cover Image for ".concat(title),
|
|
1426
1531
|
width: width,
|
|
1427
|
-
height: height
|
|
1428
|
-
placeholder: "blur",
|
|
1429
|
-
blurDataURL: src,
|
|
1430
|
-
priority: !!slug
|
|
1532
|
+
height: height
|
|
1431
1533
|
});
|
|
1432
|
-
return /*#__PURE__*/React.createElement(
|
|
1534
|
+
return /*#__PURE__*/React.createElement(PictureWrapper, {
|
|
1433
1535
|
"data-testid": dataTestId
|
|
1434
|
-
},
|
|
1435
|
-
href:
|
|
1536
|
+
}, href ? /*#__PURE__*/React.createElement(ImageLink, {
|
|
1537
|
+
href: href,
|
|
1538
|
+
"aria-label": "Read more about ".concat(title)
|
|
1539
|
+
}, image) : onClick ? /*#__PURE__*/React.createElement(ImageButton, {
|
|
1540
|
+
onClick: onClick,
|
|
1436
1541
|
"aria-label": "Read more about ".concat(title)
|
|
1437
1542
|
}, image) : image);
|
|
1438
1543
|
};
|
|
1439
|
-
var templateObject_1$
|
|
1544
|
+
var templateObject_1$e, templateObject_2$5, templateObject_3$4, templateObject_4$3;
|
|
1545
|
+
|
|
1546
|
+
React.createElement;
|
|
1547
|
+
var _a$5 = tokens.semantic,
|
|
1548
|
+
typography$2 = _a$5.typography,
|
|
1549
|
+
color$3 = _a$5.color;
|
|
1550
|
+
var TimeStyled = styled.time.withConfig({
|
|
1551
|
+
displayName: "DateFormatter__TimeStyled",
|
|
1552
|
+
componentId: "sc-5464cc-0"
|
|
1553
|
+
})(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography$2.label, color$3.text.subdued);
|
|
1554
|
+
var DateFormatter = function DateFormatter(_a) {
|
|
1555
|
+
var dateString = _a.dateString,
|
|
1556
|
+
_b = _a.formatString,
|
|
1557
|
+
formatString = _b === void 0 ? 'yyyy' : _b,
|
|
1558
|
+
dataTestId = _a["data-testid"];
|
|
1559
|
+
var date = dateFns.parseISO(dateString);
|
|
1560
|
+
return /*#__PURE__*/React.createElement(TimeStyled, {
|
|
1561
|
+
dateTime: dateString,
|
|
1562
|
+
"data-testid": dataTestId
|
|
1563
|
+
}, dateFns.format(date, formatString));
|
|
1564
|
+
};
|
|
1565
|
+
var templateObject_1$d;
|
|
1440
1566
|
|
|
1567
|
+
React.createElement;
|
|
1441
1568
|
var motion = tokens.semantic.motion,
|
|
1442
1569
|
iconButton = tokens.component.iconButton;
|
|
1443
1570
|
var IconButtonStyled = styled.button.withConfig({
|
|
1444
1571
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1445
|
-
return !
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1572
|
+
return !prop.startsWith('$');
|
|
1573
|
+
},
|
|
1574
|
+
displayName: "IconButton__IconButtonStyled",
|
|
1575
|
+
componentId: "sc-k8b14t-0"
|
|
1576
|
+
})(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n background-color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"], ["\n background-color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"])), function (_a) {
|
|
1448
1577
|
var $variant = _a.$variant;
|
|
1449
1578
|
switch ($variant) {
|
|
1450
1579
|
case 'primary':
|
|
@@ -1555,13 +1684,16 @@ var IconButton = function IconButton(_a) {
|
|
|
1555
1684
|
"aria-hidden": "true" // Hide icon from screen readers since button has aria-label
|
|
1556
1685
|
}));
|
|
1557
1686
|
};
|
|
1558
|
-
var templateObject_1$
|
|
1687
|
+
var templateObject_1$c;
|
|
1559
1688
|
|
|
1689
|
+
React.createElement;
|
|
1560
1690
|
var StyledSeparator = styled.div.withConfig({
|
|
1561
1691
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1562
|
-
return !
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1692
|
+
return !prop.startsWith('$');
|
|
1693
|
+
},
|
|
1694
|
+
displayName: "SectionSeparator__StyledSeparator",
|
|
1695
|
+
componentId: "sc-ynv482-0"
|
|
1696
|
+
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n border: none;\n border-top: 1px solid;\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles */\n ", "\n"], ["\n border: none;\n border-top: 1px solid;\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles */\n ", "\n"
|
|
1565
1697
|
/**
|
|
1566
1698
|
* SectionSeparator is an atomic component that provides visual separation between content sections.
|
|
1567
1699
|
*
|
|
@@ -1640,30 +1772,18 @@ var SectionSeparator = function SectionSeparator(_a) {
|
|
|
1640
1772
|
"aria-orientation": "horizontal"
|
|
1641
1773
|
});
|
|
1642
1774
|
};
|
|
1643
|
-
var templateObject_1$
|
|
1775
|
+
var templateObject_1$b;
|
|
1644
1776
|
|
|
1777
|
+
React.createElement;
|
|
1645
1778
|
var StyledStack = styled.div.withConfig({
|
|
1646
1779
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1647
|
-
return !
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1780
|
+
return !prop.startsWith('$');
|
|
1781
|
+
},
|
|
1782
|
+
displayName: "Stack__StyledStack",
|
|
1783
|
+
componentId: "sc-1ehkxgy-0"
|
|
1784
|
+
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"], ["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"
|
|
1650
1785
|
// Helper function to convert gap prop to CSS value
|
|
1651
|
-
]))
|
|
1652
|
-
var $direction = _a.$direction;
|
|
1653
|
-
return $direction;
|
|
1654
|
-
}, function (_a) {
|
|
1655
|
-
var $alignItems = _a.$alignItems;
|
|
1656
|
-
return $alignItems || 'initial';
|
|
1657
|
-
}, function (_a) {
|
|
1658
|
-
var $justifyContent = _a.$justifyContent;
|
|
1659
|
-
return $justifyContent || 'initial';
|
|
1660
|
-
}, function (_a) {
|
|
1661
|
-
var $gap = _a.$gap;
|
|
1662
|
-
return $gap;
|
|
1663
|
-
}, function (_a) {
|
|
1664
|
-
var $wrap = _a.$wrap;
|
|
1665
|
-
return $wrap ? 'wrap' : 'nowrap';
|
|
1666
|
-
});
|
|
1786
|
+
])));
|
|
1667
1787
|
// Helper function to convert gap prop to CSS value
|
|
1668
1788
|
var getGapValue = function getGapValue(gap) {
|
|
1669
1789
|
// Get semantic layout spacing token
|
|
@@ -1686,20 +1806,25 @@ var Stack = function Stack(_a) {
|
|
|
1686
1806
|
wrap = _d === void 0 ? false : _d,
|
|
1687
1807
|
dataTestId = _a["data-testid"];
|
|
1688
1808
|
var gapValue = getGapValue(gap);
|
|
1809
|
+
// Create CSS custom properties object with proper typing
|
|
1810
|
+
var cssProps = {
|
|
1811
|
+
'--stack-direction': direction,
|
|
1812
|
+
'--stack-align-items': alignItems || 'initial',
|
|
1813
|
+
'--stack-justify-content': justifyContent || 'initial',
|
|
1814
|
+
'--stack-gap': gapValue,
|
|
1815
|
+
'--stack-wrap': wrap ? 'wrap' : 'nowrap'
|
|
1816
|
+
};
|
|
1689
1817
|
return /*#__PURE__*/React.createElement(StyledStack, {
|
|
1690
|
-
|
|
1691
|
-
$gap: gapValue,
|
|
1692
|
-
$alignItems: alignItems,
|
|
1693
|
-
$justifyContent: justifyContent,
|
|
1694
|
-
$wrap: wrap,
|
|
1818
|
+
style: cssProps,
|
|
1695
1819
|
"data-testid": dataTestId
|
|
1696
1820
|
}, children);
|
|
1697
1821
|
};
|
|
1698
|
-
var templateObject_1$
|
|
1822
|
+
var templateObject_1$a;
|
|
1699
1823
|
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1824
|
+
React.createElement;
|
|
1825
|
+
var _a$4 = tokens.semantic,
|
|
1826
|
+
typography$1 = _a$4.typography,
|
|
1827
|
+
color$2 = _a$4.color;
|
|
1703
1828
|
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
1704
1829
|
var styles = {
|
|
1705
1830
|
display: "font: ".concat(typography$1.display, "; letter-spacing: ").concat(tokens.base.letterSpacing[0], ";"),
|
|
@@ -1723,15 +1848,15 @@ var getTypographyStyles = function getTypographyStyles(variant) {
|
|
|
1723
1848
|
};
|
|
1724
1849
|
var getTextColor = function getTextColor(colorVariant) {
|
|
1725
1850
|
var colorMap = {
|
|
1726
|
-
"default": color$
|
|
1727
|
-
emphasis: color$
|
|
1728
|
-
subdued: color$
|
|
1729
|
-
inverse: color$
|
|
1730
|
-
disabled: color$
|
|
1731
|
-
interactive: color$
|
|
1732
|
-
error: color$
|
|
1733
|
-
success: color$
|
|
1734
|
-
warning: color$
|
|
1851
|
+
"default": color$2.text["default"],
|
|
1852
|
+
emphasis: color$2.text.emphasis,
|
|
1853
|
+
subdued: color$2.text.subdued,
|
|
1854
|
+
inverse: color$2.text.inverse,
|
|
1855
|
+
disabled: color$2.text.disabled,
|
|
1856
|
+
interactive: color$2.text.interactive,
|
|
1857
|
+
error: color$2.text.error,
|
|
1858
|
+
success: color$2.text.success,
|
|
1859
|
+
warning: color$2.text.warning
|
|
1735
1860
|
};
|
|
1736
1861
|
return colorMap[colorVariant] || colorMap["default"];
|
|
1737
1862
|
};
|
|
@@ -1758,9 +1883,11 @@ var getDefaultElement = function getDefaultElement(variant) {
|
|
|
1758
1883
|
};
|
|
1759
1884
|
var StyledTypography = styled.span.withConfig({
|
|
1760
1885
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1761
|
-
return !
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1886
|
+
return !prop.startsWith('$');
|
|
1887
|
+
},
|
|
1888
|
+
displayName: "Typography__StyledTypography",
|
|
1889
|
+
componentId: "sc-17mqo4k-0"
|
|
1890
|
+
})(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"], ["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"
|
|
1764
1891
|
/**
|
|
1765
1892
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
1766
1893
|
*
|
|
@@ -1827,8 +1954,581 @@ var Typography = function Typography(_a) {
|
|
|
1827
1954
|
"data-testid": dataTestId
|
|
1828
1955
|
}, children);
|
|
1829
1956
|
};
|
|
1957
|
+
var templateObject_1$9;
|
|
1958
|
+
|
|
1959
|
+
React.createElement;
|
|
1960
|
+
var border$3 = tokens.base.border;
|
|
1961
|
+
var ArtCardStyled = styled.div.withConfig({
|
|
1962
|
+
displayName: "ArtCard__ArtCardStyled",
|
|
1963
|
+
componentId: "sc-1788cyb-0"
|
|
1964
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n max-width: 768px;\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n }\n"], ["\n max-width: 768px;\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n }\n"])), border$3.radius[6]);
|
|
1965
|
+
var ArtCard = function ArtCard(_a) {
|
|
1966
|
+
var title = _a.title;
|
|
1967
|
+
_a.excerpt;
|
|
1968
|
+
var tag = _a.tag,
|
|
1969
|
+
artist = _a.artist,
|
|
1970
|
+
labels = _a.labels,
|
|
1971
|
+
coverImage = _a.coverImage,
|
|
1972
|
+
onImageClick = _a.onImageClick,
|
|
1973
|
+
imageHref = _a.imageHref;
|
|
1974
|
+
if (tag === 'art') {
|
|
1975
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArtCardStyled, null, /*#__PURE__*/React.createElement(Stack, {
|
|
1976
|
+
direction: "column",
|
|
1977
|
+
gap: "md"
|
|
1978
|
+
}, /*#__PURE__*/React.createElement(Picture, {
|
|
1979
|
+
title: title,
|
|
1980
|
+
src: coverImage,
|
|
1981
|
+
onClick: onImageClick,
|
|
1982
|
+
href: imageHref
|
|
1983
|
+
}), /*#__PURE__*/React.createElement(Stack, {
|
|
1984
|
+
direction: "row",
|
|
1985
|
+
alignItems: "flex-start",
|
|
1986
|
+
justifyContent: "space-between",
|
|
1987
|
+
gap: "xs"
|
|
1988
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
1989
|
+
direction: "column",
|
|
1990
|
+
gap: "xs"
|
|
1991
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
1992
|
+
variant: "h6"
|
|
1993
|
+
}, title), /*#__PURE__*/React.createElement(Typography, {
|
|
1994
|
+
variant: "small",
|
|
1995
|
+
color: "subdued"
|
|
1996
|
+
}, artist)), /*#__PURE__*/React.createElement(Stack, {
|
|
1997
|
+
direction: "row",
|
|
1998
|
+
alignItems: "center",
|
|
1999
|
+
gap: "xs"
|
|
2000
|
+
}, Array.isArray(labels) && labels.map(function (label, index) {
|
|
2001
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
2002
|
+
key: index,
|
|
2003
|
+
title: label,
|
|
2004
|
+
variant: "default"
|
|
2005
|
+
});
|
|
2006
|
+
}))))));
|
|
2007
|
+
}
|
|
2008
|
+
return null;
|
|
2009
|
+
};
|
|
2010
|
+
var templateObject_1$8;
|
|
2011
|
+
|
|
2012
|
+
React.createElement;
|
|
2013
|
+
var _a$3, _b$1, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2014
|
+
var BreadcrumbNavStyled = styled.nav.withConfig({
|
|
2015
|
+
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
2016
|
+
componentId: "sc-7ouzg5-0"
|
|
2017
|
+
})(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])), ((_b$1 = (_a$3 = tokens.semantic) === null || _a$3 === void 0 ? void 0 : _a$3.border) === null || _b$1 === void 0 ? void 0 : _b$1["default"]) || '0.0625rem solid #e9ecef');
|
|
2018
|
+
var BreadcrumbStyled = styled.li.withConfig({
|
|
2019
|
+
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
2020
|
+
componentId: "sc-7ouzg5-1"
|
|
2021
|
+
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n text-transform: uppercase;\n display: inline-block;\n margin-right: ", ";\n padding: ", ";\n position: relative;\n\n &:not(:last-of-type)::before {\n content: '';\n background-image: url('/assets/icons/caret.svg');\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n opacity: 0.5;\n display: inline-block;\n width: ", ";\n height: ", ";\n right: -", ";\n position: absolute;\n }\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n }\n\n > a {\n text-decoration: underline;\n color: ", ";\n }\n"], ["\n text-transform: uppercase;\n display: inline-block;\n margin-right: ", ";\n padding: ", ";\n position: relative;\n\n &:not(:last-of-type)::before {\n content: '';\n background-image: url('/assets/icons/caret.svg');\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n opacity: 0.5;\n display: inline-block;\n width: ", ";\n height: ", ";\n right: -", ";\n position: absolute;\n }\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n }\n\n > a {\n text-decoration: underline;\n color: ", ";\n }\n"])), ((_d = (_c = tokens.base) === null || _c === void 0 ? void 0 : _c.spacing) === null || _d === void 0 ? void 0 : _d['2']) || '0.5rem', ((_f = (_e = tokens.base) === null || _e === void 0 ? void 0 : _e.spacing) === null || _f === void 0 ? void 0 : _f['2']) || '0.5rem', ((_h = (_g = tokens.base) === null || _g === void 0 ? void 0 : _g.spacing) === null || _h === void 0 ? void 0 : _h['4']) || '1rem', ((_k = (_j = tokens.base) === null || _j === void 0 ? void 0 : _j.spacing) === null || _k === void 0 ? void 0 : _k['4']) || '1rem', ((_m = (_l = tokens.base) === null || _l === void 0 ? void 0 : _l.spacing) === null || _m === void 0 ? void 0 : _m['3']) || '0.75rem', tokens.semantic.color.text.subdued, tokens.semantic.color.text["default"]);
|
|
2022
|
+
var isInternalUrl = function isInternalUrl(url) {
|
|
2023
|
+
return url.startsWith('/') && !url.startsWith('http');
|
|
2024
|
+
};
|
|
2025
|
+
var Breadcrumbs = function Breadcrumbs(_a) {
|
|
2026
|
+
var breadcrumbs = _a.breadcrumbs;
|
|
2027
|
+
return /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(BreadcrumbNavStyled, {
|
|
2028
|
+
"aria-label": "breadcrumb"
|
|
2029
|
+
}, /*#__PURE__*/React.createElement("ol", null, breadcrumbs.map(function (breadcrumb, index) {
|
|
2030
|
+
return /*#__PURE__*/React.createElement(BreadcrumbStyled, {
|
|
2031
|
+
key: index
|
|
2032
|
+
}, index === breadcrumbs.length - 1 ? /*#__PURE__*/React.createElement(Typography, {
|
|
2033
|
+
variant: "caption"
|
|
2034
|
+
}, breadcrumb.label) : isInternalUrl(breadcrumb.url) ? /*#__PURE__*/React.createElement(Link, {
|
|
2035
|
+
href: breadcrumb.url
|
|
2036
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2037
|
+
variant: "caption"
|
|
2038
|
+
}, breadcrumb.label)) : /*#__PURE__*/React.createElement("a", {
|
|
2039
|
+
href: breadcrumb.url,
|
|
2040
|
+
target: "_blank",
|
|
2041
|
+
rel: "noopener noreferrer"
|
|
2042
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2043
|
+
variant: "caption"
|
|
2044
|
+
}, breadcrumb.label)));
|
|
2045
|
+
}))));
|
|
2046
|
+
};
|
|
2047
|
+
var templateObject_1$7, templateObject_2$4;
|
|
2048
|
+
|
|
2049
|
+
React.createElement;
|
|
2050
|
+
var ChipGroupWrapper = styled.div.withConfig({
|
|
2051
|
+
displayName: "ChipGroup__ChipGroupWrapper",
|
|
2052
|
+
componentId: "sc-ae049w-0"
|
|
2053
|
+
})(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"], ["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"])));
|
|
2054
|
+
var ChipGroup = function ChipGroup(_a) {
|
|
2055
|
+
var labels = _a.labels,
|
|
2056
|
+
_b = _a.variant,
|
|
2057
|
+
variant = _b === void 0 ? 'default' : _b,
|
|
2058
|
+
dataTestId = _a["data-testid"];
|
|
2059
|
+
return /*#__PURE__*/React.createElement(ChipGroupWrapper, {
|
|
2060
|
+
"data-testid": dataTestId
|
|
2061
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
2062
|
+
direction: "row",
|
|
2063
|
+
gap: "sm"
|
|
2064
|
+
}, labels && labels.map(function (title, index) {
|
|
2065
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
2066
|
+
key: index,
|
|
2067
|
+
title: title,
|
|
2068
|
+
variant: variant
|
|
2069
|
+
});
|
|
2070
|
+
})));
|
|
2071
|
+
};
|
|
2072
|
+
var templateObject_1$6;
|
|
2073
|
+
|
|
2074
|
+
React.createElement;
|
|
2075
|
+
var _a$2 = tokens.semantic,
|
|
2076
|
+
color$1 = _a$2.color,
|
|
2077
|
+
border$2 = _a$2.border,
|
|
2078
|
+
spacing$2 = _a$2.spacing;
|
|
2079
|
+
var StyledCodeBlock = styled.pre.withConfig({
|
|
2080
|
+
displayName: "CodeBlock__StyledCodeBlock",
|
|
2081
|
+
componentId: "sc-1p1t0kp-0"
|
|
2082
|
+
})(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n margin: ", " 0;\n position: relative;\n"], ["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n margin: ", " 0;\n position: relative;\n"])), color$1.background.subtle, border$2.subtle, tokens.base.border.radius[2], spacing$2.layout.md, tokens.base.fontFamily.monospace, tokens.base.fontSize[1], tokens.base.lineHeight[3], color$1.text["default"], spacing$2.layout.sm);
|
|
2083
|
+
var CodeBlockWrapper = styled.div.withConfig({
|
|
2084
|
+
displayName: "CodeBlock__CodeBlockWrapper",
|
|
2085
|
+
componentId: "sc-1p1t0kp-1"
|
|
2086
|
+
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n position: relative;\n display: inline-block;\n width: 100%;\n"], ["\n position: relative;\n display: inline-block;\n width: 100%;\n"])));
|
|
2087
|
+
var CopyButtonWrapper = styled.div.withConfig({
|
|
2088
|
+
displayName: "CodeBlock__CopyButtonWrapper",
|
|
2089
|
+
componentId: "sc-1p1t0kp-2"
|
|
2090
|
+
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n position: absolute;\n bottom: ", ";\n right: ", ";\n"], ["\n position: absolute;\n bottom: ", ";\n right: ", ";\n"])), spacing$2.layout.lg, spacing$2.layout.sm);
|
|
2091
|
+
var CopyButton = function CopyButton(_a) {
|
|
2092
|
+
var text = _a.text,
|
|
2093
|
+
onCopy = _a.onCopy;
|
|
2094
|
+
var _b = React.useState(false),
|
|
2095
|
+
copied = _b[0],
|
|
2096
|
+
setCopied = _b[1];
|
|
2097
|
+
var timeoutRef = React.useRef(null);
|
|
2098
|
+
var handleCopy = function handleCopy() {
|
|
2099
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
2100
|
+
var err_1;
|
|
2101
|
+
return __generator(this, function (_a) {
|
|
2102
|
+
switch (_a.label) {
|
|
2103
|
+
case 0:
|
|
2104
|
+
_a.trys.push([0, 2,, 3]);
|
|
2105
|
+
return [4 /*yield*/, navigator.clipboard.writeText(text)];
|
|
2106
|
+
case 1:
|
|
2107
|
+
_a.sent();
|
|
2108
|
+
setCopied(true);
|
|
2109
|
+
onCopy === null || onCopy === void 0 ? void 0 : onCopy();
|
|
2110
|
+
// Clear any existing timeout
|
|
2111
|
+
if (timeoutRef.current) {
|
|
2112
|
+
clearTimeout(timeoutRef.current);
|
|
2113
|
+
}
|
|
2114
|
+
// Set new timeout
|
|
2115
|
+
timeoutRef.current = setTimeout(function () {
|
|
2116
|
+
setCopied(false);
|
|
2117
|
+
timeoutRef.current = null;
|
|
2118
|
+
}, 2000);
|
|
2119
|
+
return [3 /*break*/, 3];
|
|
2120
|
+
case 2:
|
|
2121
|
+
err_1 = _a.sent();
|
|
2122
|
+
console.error('Failed to copy text: ', err_1);
|
|
2123
|
+
return [3 /*break*/, 3];
|
|
2124
|
+
case 3:
|
|
2125
|
+
return [2 /*return*/];
|
|
2126
|
+
}
|
|
2127
|
+
});
|
|
2128
|
+
});
|
|
2129
|
+
};
|
|
2130
|
+
// Cleanup timeout on unmount
|
|
2131
|
+
React.useEffect(function () {
|
|
2132
|
+
return function () {
|
|
2133
|
+
if (timeoutRef.current) {
|
|
2134
|
+
clearTimeout(timeoutRef.current);
|
|
2135
|
+
}
|
|
2136
|
+
};
|
|
2137
|
+
}, []);
|
|
2138
|
+
return /*#__PURE__*/React.createElement(CopyButtonWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
2139
|
+
variant: "secondary",
|
|
2140
|
+
size: "small",
|
|
2141
|
+
iconName: "copy",
|
|
2142
|
+
onClick: handleCopy,
|
|
2143
|
+
"data-testid": "copy-button"
|
|
2144
|
+
}, copied ? 'Copied!' : 'Copy'));
|
|
2145
|
+
};
|
|
2146
|
+
/**
|
|
2147
|
+
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
2148
|
+
*
|
|
2149
|
+
* @param children - The code content to display
|
|
2150
|
+
* @param showCopyButton - Whether to show the copy button (default: true)
|
|
2151
|
+
* @param onCopy - Optional callback when code is copied
|
|
2152
|
+
* @param data-testid - Test identifier for the code block
|
|
2153
|
+
*/
|
|
2154
|
+
var CodeBlock = function CodeBlock(_a) {
|
|
2155
|
+
var children = _a.children,
|
|
2156
|
+
_b = _a.showCopyButton,
|
|
2157
|
+
showCopyButton = _b === void 0 ? true : _b,
|
|
2158
|
+
onCopy = _a.onCopy,
|
|
2159
|
+
testId = _a["data-testid"];
|
|
2160
|
+
return /*#__PURE__*/React.createElement(CodeBlockWrapper, null, /*#__PURE__*/React.createElement(StyledCodeBlock, {
|
|
2161
|
+
"data-testid": testId
|
|
2162
|
+
}, children), showCopyButton && /*#__PURE__*/React.createElement(CopyButton, {
|
|
2163
|
+
text: children,
|
|
2164
|
+
onCopy: onCopy
|
|
2165
|
+
}));
|
|
2166
|
+
};
|
|
2167
|
+
var templateObject_1$5, templateObject_2$3, templateObject_3$3;
|
|
2168
|
+
|
|
2169
|
+
React.createElement;
|
|
2170
|
+
var _a$1 = tokens.base,
|
|
2171
|
+
spacing$1 = _a$1.spacing,
|
|
2172
|
+
border$1 = _a$1.border;
|
|
2173
|
+
var DesignCardStyled = styled.div.withConfig({
|
|
2174
|
+
displayName: "DesignCard__DesignCardStyled",
|
|
2175
|
+
componentId: "sc-1lah9zd-0"
|
|
2176
|
+
})(templateObject_1$4 || (templateObject_1$4 = __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]);
|
|
2177
|
+
var ImageWrapper = styled.div.withConfig({
|
|
2178
|
+
displayName: "DesignCard__ImageWrapper",
|
|
2179
|
+
componentId: "sc-1lah9zd-1"
|
|
2180
|
+
})(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);
|
|
2181
|
+
var ContentSection = styled.div.withConfig({
|
|
2182
|
+
displayName: "DesignCard__ContentSection",
|
|
2183
|
+
componentId: "sc-1lah9zd-2"
|
|
2184
|
+
})(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]);
|
|
2185
|
+
var ButtonWrapper = styled.div.withConfig({
|
|
2186
|
+
displayName: "DesignCard__ButtonWrapper",
|
|
2187
|
+
componentId: "sc-1lah9zd-3"
|
|
2188
|
+
})(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n button {\n margin-top: ", ";\n }\n"], ["\n button {\n margin-top: ", ";\n }\n"])), spacing$1[4]);
|
|
2189
|
+
var ContentWrapper = styled.div.withConfig({
|
|
2190
|
+
displayName: "DesignCard__ContentWrapper",
|
|
2191
|
+
componentId: "sc-1lah9zd-4"
|
|
2192
|
+
})(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"])));
|
|
2193
|
+
var DesignCard = function DesignCard(_a) {
|
|
2194
|
+
var title = _a.title,
|
|
2195
|
+
excerpt = _a.excerpt,
|
|
2196
|
+
_b = _a.labels,
|
|
2197
|
+
labels = _b === void 0 ? [] : _b,
|
|
2198
|
+
tag = _a.tag,
|
|
2199
|
+
coverImage = _a.coverImage,
|
|
2200
|
+
date = _a.date,
|
|
2201
|
+
onReadMore = _a.onReadMore,
|
|
2202
|
+
readMoreHref = _a.readMoreHref,
|
|
2203
|
+
_c = _a.readMoreText,
|
|
2204
|
+
readMoreText = _c === void 0 ? "Read more" : _c;
|
|
2205
|
+
if (tag === 'design') {
|
|
2206
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DesignCardStyled, null, /*#__PURE__*/React.createElement(ImageWrapper, null, /*#__PURE__*/React.createElement(Picture, {
|
|
2207
|
+
title: title,
|
|
2208
|
+
src: coverImage
|
|
2209
|
+
})), /*#__PURE__*/React.createElement(ContentSection, null, /*#__PURE__*/React.createElement(ContentWrapper, null, /*#__PURE__*/React.createElement(Stack, {
|
|
2210
|
+
direction: "column",
|
|
2211
|
+
gap: "md"
|
|
2212
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2213
|
+
variant: "h3"
|
|
2214
|
+
}, title), /*#__PURE__*/React.createElement(DateFormatter, {
|
|
2215
|
+
dateString: date
|
|
2216
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
2217
|
+
variant: "small"
|
|
2218
|
+
}, excerpt), /*#__PURE__*/React.createElement(Stack, {
|
|
2219
|
+
direction: "row",
|
|
2220
|
+
gap: "xs"
|
|
2221
|
+
}, Array.isArray(labels) && labels.map(function (label, index) {
|
|
2222
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
2223
|
+
key: index,
|
|
2224
|
+
title: label,
|
|
2225
|
+
variant: "default"
|
|
2226
|
+
});
|
|
2227
|
+
})), (onReadMore || readMoreHref) && /*#__PURE__*/React.createElement(ButtonWrapper, null, readMoreHref ? /*#__PURE__*/React.createElement(Button, {
|
|
2228
|
+
purpose: "link",
|
|
2229
|
+
url: readMoreHref
|
|
2230
|
+
}, readMoreText) : /*#__PURE__*/React.createElement(Button, {
|
|
2231
|
+
onClick: onReadMore
|
|
2232
|
+
}, readMoreText)))))), /*#__PURE__*/React.createElement(SectionSeparator, null));
|
|
2233
|
+
}
|
|
2234
|
+
return null;
|
|
2235
|
+
};
|
|
2236
|
+
var templateObject_1$4, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2;
|
|
2237
|
+
|
|
2238
|
+
React.createElement;
|
|
2239
|
+
var _a = tokens.base,
|
|
2240
|
+
spacing = _a.spacing,
|
|
2241
|
+
shadow = _a.shadow,
|
|
2242
|
+
zIndex = _a.zIndex,
|
|
2243
|
+
_b = tokens.semantic,
|
|
2244
|
+
color = _b.color,
|
|
2245
|
+
typography = _b.typography,
|
|
2246
|
+
border = _b.border;
|
|
2247
|
+
var DropdownContainer = styled.div.withConfig({
|
|
2248
|
+
displayName: "Dropdown__DropdownContainer",
|
|
2249
|
+
componentId: "sc-kz07c4-0"
|
|
2250
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n"], ["\n position: relative;\n width: 100%;\n"])));
|
|
2251
|
+
var DropdownTrigger = styled.button.withConfig({
|
|
2252
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2253
|
+
return !prop.startsWith('$');
|
|
2254
|
+
},
|
|
2255
|
+
displayName: "Dropdown__DropdownTrigger",
|
|
2256
|
+
componentId: "sc-kz07c4-1"
|
|
2257
|
+
})(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: all 0.15s ease;\n \n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n \n &:focus {\n outline: ", ";\n outline-offset: 2px;\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n border-color: ", ";\n }\n \n ", "\n"], ["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: all 0.15s ease;\n \n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n \n &:focus {\n outline: ", ";\n outline-offset: 2px;\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n border-color: ", ";\n }\n \n ", "\n"])), spacing[3], spacing[4], color.background["default"], border["default"], tokens.base.border.radius[2], typography.body, color.text["default"], color.background.surface, color.border.strong, tokens.semantic.border.focus, color.background.disabled, color.text.disabled, color.border.subtle, function (_a) {
|
|
2258
|
+
var $isOpen = _a.$isOpen;
|
|
2259
|
+
return $isOpen && "\n background-color: ".concat(color.background.surface, ";\n border-color: ").concat(color.border.strong, ";\n ");
|
|
2260
|
+
});
|
|
2261
|
+
var DropdownIcon = styled.div.withConfig({
|
|
2262
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2263
|
+
return !prop.startsWith('$');
|
|
2264
|
+
},
|
|
2265
|
+
displayName: "Dropdown__DropdownIcon",
|
|
2266
|
+
componentId: "sc-kz07c4-2"
|
|
2267
|
+
})(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: ", ";\n transition: transform 0.15s ease;\n \n ", "\n"], ["\n display: flex;\n align-items: center;\n margin-left: ", ";\n transition: transform 0.15s ease;\n \n ", "\n"])), spacing[2], function (_a) {
|
|
2268
|
+
var $isOpen = _a.$isOpen;
|
|
2269
|
+
return $isOpen && "\n transform: rotate(180deg);\n ";
|
|
2270
|
+
});
|
|
2271
|
+
var DropdownMenu = styled.div.withConfig({
|
|
2272
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2273
|
+
return !prop.startsWith('$');
|
|
2274
|
+
},
|
|
2275
|
+
displayName: "Dropdown__DropdownMenu",
|
|
2276
|
+
componentId: "sc-kz07c4-3"
|
|
2277
|
+
})(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: all 0.15s ease;\n max-height: 300px;\n overflow-y: auto;\n"], ["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: all 0.15s ease;\n max-height: 300px;\n overflow-y: auto;\n"])), zIndex[3], color.background["default"], border["default"], tokens.base.border.radius[2], shadow[3], spacing[1], function (_a) {
|
|
2278
|
+
var $isOpen = _a.$isOpen;
|
|
2279
|
+
return $isOpen ? 1 : 0;
|
|
2280
|
+
}, function (_a) {
|
|
2281
|
+
var $isOpen = _a.$isOpen;
|
|
2282
|
+
return $isOpen ? 'visible' : 'hidden';
|
|
2283
|
+
}, function (_a) {
|
|
2284
|
+
var $isOpen = _a.$isOpen;
|
|
2285
|
+
return $isOpen ? 'translateY(0)' : 'translateY(-8px)';
|
|
2286
|
+
});
|
|
2287
|
+
var DropdownOption = styled.button.withConfig({
|
|
2288
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2289
|
+
return !prop.startsWith('$');
|
|
2290
|
+
},
|
|
2291
|
+
displayName: "Dropdown__DropdownOption",
|
|
2292
|
+
componentId: "sc-kz07c4-4"
|
|
2293
|
+
})(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color 0.15s ease;\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"], ["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color 0.15s ease;\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"])), spacing[3], spacing[4], function (_a) {
|
|
2294
|
+
var $isSelected = _a.$isSelected,
|
|
2295
|
+
$isFocused = _a.$isFocused;
|
|
2296
|
+
if ($isFocused) return color.background.surface;
|
|
2297
|
+
if ($isSelected) return color.background.surface;
|
|
2298
|
+
return 'transparent';
|
|
2299
|
+
}, typography.body, color.text["default"], color.background.surface, color.background.surface, border.subtle);
|
|
2300
|
+
var Dropdown = function Dropdown(_a) {
|
|
2301
|
+
var options = _a.options,
|
|
2302
|
+
value = _a.value,
|
|
2303
|
+
onChange = _a.onChange,
|
|
2304
|
+
_b = _a.placeholder,
|
|
2305
|
+
placeholder = _b === void 0 ? 'Select an option' : _b,
|
|
2306
|
+
_c = _a.disabled,
|
|
2307
|
+
disabled = _c === void 0 ? false : _c,
|
|
2308
|
+
className = _a.className,
|
|
2309
|
+
label = _a.label;
|
|
2310
|
+
var _d = React.useState(false),
|
|
2311
|
+
isOpen = _d[0],
|
|
2312
|
+
setIsOpen = _d[1];
|
|
2313
|
+
var _e = React.useState(-1),
|
|
2314
|
+
focusedIndex = _e[0],
|
|
2315
|
+
setFocusedIndex = _e[1];
|
|
2316
|
+
var dropdownRef = React.useRef(null);
|
|
2317
|
+
// Generate unique ID for accessibility
|
|
2318
|
+
var dropdownId = React.useRef("dropdown-".concat(Math.random().toString(36).substr(2, 9))).current;
|
|
2319
|
+
var selectedOption = options.find(function (option) {
|
|
2320
|
+
return option.id === value;
|
|
2321
|
+
});
|
|
2322
|
+
// Close dropdown when clicking outside
|
|
2323
|
+
React.useEffect(function () {
|
|
2324
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
2325
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2326
|
+
setIsOpen(false);
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
2329
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
2330
|
+
return function () {
|
|
2331
|
+
return document.removeEventListener('mousedown', handleClickOutside);
|
|
2332
|
+
};
|
|
2333
|
+
}, []);
|
|
2334
|
+
// Close dropdown on escape key and handle arrow navigation
|
|
2335
|
+
React.useEffect(function () {
|
|
2336
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
2337
|
+
if (!isOpen) return;
|
|
2338
|
+
switch (event.key) {
|
|
2339
|
+
case 'Escape':
|
|
2340
|
+
setIsOpen(false);
|
|
2341
|
+
setFocusedIndex(-1);
|
|
2342
|
+
// Return focus to trigger button
|
|
2343
|
+
if (dropdownRef.current) {
|
|
2344
|
+
var trigger = dropdownRef.current.querySelector('button');
|
|
2345
|
+
trigger === null || trigger === void 0 ? void 0 : trigger.focus();
|
|
2346
|
+
}
|
|
2347
|
+
break;
|
|
2348
|
+
case 'ArrowDown':
|
|
2349
|
+
event.preventDefault();
|
|
2350
|
+
setFocusedIndex(function (prev) {
|
|
2351
|
+
var newIndex = prev < options.length - 1 ? prev + 1 : 0;
|
|
2352
|
+
return newIndex;
|
|
2353
|
+
});
|
|
2354
|
+
break;
|
|
2355
|
+
case 'ArrowUp':
|
|
2356
|
+
event.preventDefault();
|
|
2357
|
+
setFocusedIndex(function (prev) {
|
|
2358
|
+
var newIndex = prev > 0 ? prev - 1 : options.length - 1;
|
|
2359
|
+
return newIndex;
|
|
2360
|
+
});
|
|
2361
|
+
break;
|
|
2362
|
+
case 'Enter':
|
|
2363
|
+
case ' ':
|
|
2364
|
+
event.preventDefault();
|
|
2365
|
+
if (focusedIndex >= 0 && focusedIndex < options.length) {
|
|
2366
|
+
handleOptionClick(options[focusedIndex].id);
|
|
2367
|
+
}
|
|
2368
|
+
break;
|
|
2369
|
+
case 'Home':
|
|
2370
|
+
event.preventDefault();
|
|
2371
|
+
setFocusedIndex(0);
|
|
2372
|
+
break;
|
|
2373
|
+
case 'End':
|
|
2374
|
+
event.preventDefault();
|
|
2375
|
+
setFocusedIndex(options.length - 1);
|
|
2376
|
+
break;
|
|
2377
|
+
}
|
|
2378
|
+
};
|
|
2379
|
+
if (isOpen) {
|
|
2380
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
2381
|
+
return function () {
|
|
2382
|
+
return document.removeEventListener('keydown', handleKeyDown);
|
|
2383
|
+
};
|
|
2384
|
+
}
|
|
2385
|
+
return undefined;
|
|
2386
|
+
}, [isOpen, focusedIndex, options]);
|
|
2387
|
+
var handleTriggerClick = function handleTriggerClick() {
|
|
2388
|
+
if (!disabled) {
|
|
2389
|
+
setIsOpen(!isOpen);
|
|
2390
|
+
if (!isOpen) {
|
|
2391
|
+
// When opening, set focus to the currently selected option or first option
|
|
2392
|
+
var selectedIndex = options.findIndex(function (option) {
|
|
2393
|
+
return option.id === value;
|
|
2394
|
+
});
|
|
2395
|
+
setFocusedIndex(selectedIndex >= 0 ? selectedIndex : 0);
|
|
2396
|
+
} else {
|
|
2397
|
+
// When closing, reset focus
|
|
2398
|
+
setFocusedIndex(-1);
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
};
|
|
2402
|
+
var handleOptionClick = function handleOptionClick(optionId) {
|
|
2403
|
+
onChange(optionId);
|
|
2404
|
+
setIsOpen(false);
|
|
2405
|
+
setFocusedIndex(-1);
|
|
2406
|
+
};
|
|
2407
|
+
return /*#__PURE__*/React.createElement(DropdownContainer, {
|
|
2408
|
+
ref: dropdownRef,
|
|
2409
|
+
className: className
|
|
2410
|
+
}, label && /*#__PURE__*/React.createElement("label", {
|
|
2411
|
+
htmlFor: dropdownId,
|
|
2412
|
+
style: {
|
|
2413
|
+
display: 'block',
|
|
2414
|
+
marginBottom: spacing[2]
|
|
2415
|
+
}
|
|
2416
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2417
|
+
variant: "label"
|
|
2418
|
+
}, label)), /*#__PURE__*/React.createElement(DropdownTrigger, {
|
|
2419
|
+
id: dropdownId,
|
|
2420
|
+
$isOpen: isOpen,
|
|
2421
|
+
onClick: handleTriggerClick,
|
|
2422
|
+
disabled: disabled,
|
|
2423
|
+
"aria-expanded": isOpen,
|
|
2424
|
+
"aria-haspopup": "listbox"
|
|
2425
|
+
}, /*#__PURE__*/React.createElement("span", null, selectedOption ? selectedOption.label : placeholder), /*#__PURE__*/React.createElement(DropdownIcon, {
|
|
2426
|
+
$isOpen: isOpen
|
|
2427
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
2428
|
+
name: "arrowDown",
|
|
2429
|
+
iconColor: disabled ? 'disabled' : 'subdued'
|
|
2430
|
+
}))), /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
2431
|
+
$isOpen: isOpen,
|
|
2432
|
+
role: "listbox",
|
|
2433
|
+
"aria-labelledby": dropdownId
|
|
2434
|
+
}, options.map(function (option, index) {
|
|
2435
|
+
return /*#__PURE__*/React.createElement(DropdownOption, {
|
|
2436
|
+
key: option.id,
|
|
2437
|
+
$isSelected: option.id === value,
|
|
2438
|
+
$isFocused: index === focusedIndex,
|
|
2439
|
+
onClick: function onClick() {
|
|
2440
|
+
return handleOptionClick(option.id);
|
|
2441
|
+
},
|
|
2442
|
+
role: "option",
|
|
2443
|
+
"aria-selected": option.id === value
|
|
2444
|
+
}, option.label);
|
|
2445
|
+
})));
|
|
2446
|
+
};
|
|
2447
|
+
var templateObject_1$3, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
|
|
2448
|
+
|
|
2449
|
+
React.createElement;
|
|
2450
|
+
var PageTitleStyled = styled.div.withConfig({
|
|
2451
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2452
|
+
return !prop.startsWith('$');
|
|
2453
|
+
},
|
|
2454
|
+
displayName: "PageTitle__PageTitleStyled",
|
|
2455
|
+
componentId: "sc-16h256f-0"
|
|
2456
|
+
})(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin-bottom: ", ";\n margin-top: ", ";\n"])), tokens.base.spacing[6], function (_a) {
|
|
2457
|
+
var $hasBackButton = _a.$hasBackButton;
|
|
2458
|
+
return $hasBackButton ? tokens.base.spacing[0] : tokens.base.spacing[12];
|
|
2459
|
+
});
|
|
2460
|
+
var PageTitle = function PageTitle(_a) {
|
|
2461
|
+
var title = _a.title,
|
|
2462
|
+
_b = _a.hasBackButton,
|
|
2463
|
+
hasBackButton = _b === void 0 ? false : _b,
|
|
2464
|
+
subtitle = _a.subtitle;
|
|
2465
|
+
return /*#__PURE__*/React.createElement(PageTitleStyled, {
|
|
2466
|
+
$hasBackButton: hasBackButton
|
|
2467
|
+
}, hasBackButton && /*#__PURE__*/React.createElement(IconButton, {
|
|
2468
|
+
iconName: "back",
|
|
2469
|
+
size: "large",
|
|
2470
|
+
variant: "naked",
|
|
2471
|
+
url: "/music",
|
|
2472
|
+
"aria-label": "Go back to music page"
|
|
2473
|
+
}), /*#__PURE__*/React.createElement(Stack, {
|
|
2474
|
+
direction: "column",
|
|
2475
|
+
gap: "md"
|
|
2476
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2477
|
+
variant: "h1"
|
|
2478
|
+
}, title), subtitle && /*#__PURE__*/React.createElement(Typography, {
|
|
2479
|
+
variant: "caption",
|
|
2480
|
+
color: "subdued"
|
|
2481
|
+
}, subtitle)));
|
|
2482
|
+
};
|
|
1830
2483
|
var templateObject_1$2;
|
|
1831
2484
|
|
|
2485
|
+
React.createElement;
|
|
2486
|
+
var ReleaseCardStyled = styled.div.withConfig({
|
|
2487
|
+
displayName: "ReleaseCard__ReleaseCardStyled",
|
|
2488
|
+
componentId: "sc-44tbzg-0"
|
|
2489
|
+
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n"], ["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n"])), tokens.base.border.radius[2], tokens.semantic.color.border.strong);
|
|
2490
|
+
var ReleaseCard = function ReleaseCard(_a) {
|
|
2491
|
+
var title = _a.title,
|
|
2492
|
+
coverImage = _a.coverImage,
|
|
2493
|
+
artist = _a.artist,
|
|
2494
|
+
date = _a.date,
|
|
2495
|
+
slug = _a.slug;
|
|
2496
|
+
if (!coverImage || !date) {
|
|
2497
|
+
return null;
|
|
2498
|
+
}
|
|
2499
|
+
return /*#__PURE__*/React.createElement(ReleaseCardStyled, null, /*#__PURE__*/React.createElement(Link, {
|
|
2500
|
+
href: "/releases/".concat(slug),
|
|
2501
|
+
"aria-label": title
|
|
2502
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
2503
|
+
direction: "column",
|
|
2504
|
+
gap: "sm"
|
|
2505
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
2506
|
+
alt: title,
|
|
2507
|
+
src: coverImage,
|
|
2508
|
+
width: 300,
|
|
2509
|
+
height: 300,
|
|
2510
|
+
sizes: "(max-width: 640px) 50vw, (max-width: 1024px) 25vw, (max-width: 1280px) 16.66vw, 14.28vw",
|
|
2511
|
+
placeholder: "blur",
|
|
2512
|
+
blurDataURL: coverImage,
|
|
2513
|
+
style: {
|
|
2514
|
+
width: '100%',
|
|
2515
|
+
height: 'auto'
|
|
2516
|
+
}
|
|
2517
|
+
}), /*#__PURE__*/React.createElement(Stack, {
|
|
2518
|
+
direction: "column",
|
|
2519
|
+
gap: "none"
|
|
2520
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2521
|
+
variant: "small"
|
|
2522
|
+
}, title), /*#__PURE__*/React.createElement(Typography, {
|
|
2523
|
+
variant: "label",
|
|
2524
|
+
color: "subdued"
|
|
2525
|
+
}, artist), /*#__PURE__*/React.createElement(DateFormatter, {
|
|
2526
|
+
dateString: date
|
|
2527
|
+
})))));
|
|
2528
|
+
};
|
|
2529
|
+
var templateObject_1$1;
|
|
2530
|
+
|
|
2531
|
+
React.createElement;
|
|
1832
2532
|
// Breakpoints using base tokens
|
|
1833
2533
|
var breakpoints = {
|
|
1834
2534
|
xs: tokens.base.breakpoint.xs,
|
|
@@ -1847,10 +2547,16 @@ var media = {
|
|
|
1847
2547
|
xl: "@media (min-width: ".concat(breakpoints.xl, ")"),
|
|
1848
2548
|
'2xl': "@media (min-width: ".concat(breakpoints['2xl'], ")")
|
|
1849
2549
|
};
|
|
1850
|
-
var GridContainer = styled.div(
|
|
2550
|
+
var GridContainer = styled.div.withConfig({
|
|
2551
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2552
|
+
return !prop.startsWith('$');
|
|
2553
|
+
},
|
|
2554
|
+
displayName: "GridSystem__GridContainer",
|
|
2555
|
+
componentId: "sc-1lhwjqo-0"
|
|
2556
|
+
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n"], ["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n"])), function (props) {
|
|
1851
2557
|
return props.$cols;
|
|
1852
2558
|
}, function (props) {
|
|
1853
|
-
return props.$gap && styled.css(templateObject_1
|
|
2559
|
+
return props.$gap && styled.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), props.$gap);
|
|
1854
2560
|
}, function (props) {
|
|
1855
2561
|
return props.$gapX && styled.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["column-gap: ", ";"], ["column-gap: ", ";"])), props.$gapX);
|
|
1856
2562
|
}, function (props) {
|
|
@@ -1872,7 +2578,13 @@ var Grid = function Grid(_a) {
|
|
|
1872
2578
|
className: className
|
|
1873
2579
|
}, children);
|
|
1874
2580
|
};
|
|
1875
|
-
var GridColContainer = styled.div(
|
|
2581
|
+
var GridColContainer = styled.div.withConfig({
|
|
2582
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2583
|
+
return !prop.startsWith('$');
|
|
2584
|
+
},
|
|
2585
|
+
displayName: "GridSystem__GridColContainer",
|
|
2586
|
+
componentId: "sc-1lhwjqo-1"
|
|
2587
|
+
})(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"], ["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"])), function (props) {
|
|
1876
2588
|
return props.$span && styled.css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["grid-column: span ", " / span ", ";"], ["grid-column: span ", " / span ", ";"])), props.$span, props.$span);
|
|
1877
2589
|
}, function (props) {
|
|
1878
2590
|
return props.$order && styled.css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
@@ -1920,7 +2632,13 @@ var GridCol = function GridCol(_a) {
|
|
|
1920
2632
|
className: className
|
|
1921
2633
|
}, children);
|
|
1922
2634
|
};
|
|
1923
|
-
var ResponsiveGridContainer = styled.div(
|
|
2635
|
+
var ResponsiveGridContainer = styled.div.withConfig({
|
|
2636
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2637
|
+
return !prop.startsWith('$');
|
|
2638
|
+
},
|
|
2639
|
+
displayName: "GridSystem__ResponsiveGridContainer",
|
|
2640
|
+
componentId: "sc-1lhwjqo-2"
|
|
2641
|
+
})(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive column gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive row gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n"], ["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive column gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive row gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n"])), function (props) {
|
|
1924
2642
|
return props.$cols;
|
|
1925
2643
|
}, function (props) {
|
|
1926
2644
|
return props.$gap && styled.css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), props.$gap);
|
|
@@ -2008,35 +2726,28 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
2008
2726
|
className: className
|
|
2009
2727
|
}, children);
|
|
2010
2728
|
};
|
|
2011
|
-
var templateObject_1
|
|
2012
|
-
|
|
2013
|
-
var _a = tokens.semantic,
|
|
2014
|
-
typography = _a.typography,
|
|
2015
|
-
color = _a.color;
|
|
2016
|
-
var TimeStyled = styled.time(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography.label, color.text.subdued);
|
|
2017
|
-
var DateFormatter = function DateFormatter(_a) {
|
|
2018
|
-
var dateString = _a.dateString,
|
|
2019
|
-
_b = _a.formatString,
|
|
2020
|
-
formatString = _b === void 0 ? 'yyyy' : _b;
|
|
2021
|
-
var date = dateFns.parseISO(dateString);
|
|
2022
|
-
return /*#__PURE__*/React.createElement(TimeStyled, {
|
|
2023
|
-
dateTime: dateString
|
|
2024
|
-
}, dateFns.format(date, formatString));
|
|
2025
|
-
};
|
|
2026
|
-
var templateObject_1;
|
|
2729
|
+
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;
|
|
2027
2730
|
|
|
2731
|
+
exports.ArtCard = ArtCard;
|
|
2028
2732
|
exports.Avatar = Avatar;
|
|
2029
2733
|
exports.Box = Box;
|
|
2734
|
+
exports.Breadcrumbs = Breadcrumbs;
|
|
2030
2735
|
exports.Button = Button;
|
|
2031
2736
|
exports.Chip = Chip;
|
|
2737
|
+
exports.ChipGroup = ChipGroup;
|
|
2738
|
+
exports.CodeBlock = CodeBlock;
|
|
2032
2739
|
exports.Container = Container;
|
|
2033
|
-
exports.CoverImage = CoverImage;
|
|
2034
2740
|
exports.DateFormatter = DateFormatter;
|
|
2741
|
+
exports.DesignCard = DesignCard;
|
|
2742
|
+
exports.Dropdown = Dropdown;
|
|
2035
2743
|
exports.Grid = Grid;
|
|
2036
2744
|
exports.GridCol = GridCol;
|
|
2037
2745
|
exports.Icon = Icon;
|
|
2038
2746
|
exports.IconButton = IconButton;
|
|
2039
2747
|
exports.LegacyChip = LegacyChip;
|
|
2748
|
+
exports.PageTitle = PageTitle;
|
|
2749
|
+
exports.Picture = Picture;
|
|
2750
|
+
exports.ReleaseCard = ReleaseCard;
|
|
2040
2751
|
exports.ResponsiveGrid = ResponsiveGrid;
|
|
2041
2752
|
exports.SectionSeparator = SectionSeparator;
|
|
2042
2753
|
exports.Stack = Stack;
|