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