@guardian/interactive-component-library 0.9.0 → 0.9.3
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const section = "
|
|
2
|
-
const fullWidth = "
|
|
3
|
-
const borderLeftCol = "
|
|
4
|
-
const header = "
|
|
5
|
-
const content = "
|
|
6
|
-
const borderTop = "
|
|
1
|
+
const section = "_section_1vdz3_9";
|
|
2
|
+
const fullWidth = "_fullWidth_1vdz3_57";
|
|
3
|
+
const borderLeftCol = "_borderLeftCol_1vdz3_74";
|
|
4
|
+
const header = "_header_1vdz3_81";
|
|
5
|
+
const content = "_content_1vdz3_86";
|
|
6
|
+
const borderTop = "_borderTop_1vdz3_91";
|
|
7
7
|
const defaultStyles = {
|
|
8
8
|
section,
|
|
9
9
|
fullWidth,
|
|
@@ -32,6 +32,14 @@ const SlopeChart = ({
|
|
|
32
32
|
}, [lines, y2Label, yScale]);
|
|
33
33
|
styles = mergeStyles({ ...defaultStyles }, styles);
|
|
34
34
|
const chart = /* @__PURE__ */ jsx("svg", { className: styles.svg, width, height, id: svgId, children: /* @__PURE__ */ jsxs("g", { transform: `translate(${padding.left} ${padding.top})`, children: [
|
|
35
|
+
/* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx(
|
|
36
|
+
"rect",
|
|
37
|
+
{
|
|
38
|
+
width: contentWidth,
|
|
39
|
+
height: contentHeight,
|
|
40
|
+
className: styles.background
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
35
43
|
/* @__PURE__ */ jsxs("g", { transform: `translate(0 ${contentHeight})`, children: [
|
|
36
44
|
/* @__PURE__ */ jsx(
|
|
37
45
|
"line",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
const slopeChartContainer = "
|
|
2
|
-
const svg = "
|
|
3
|
-
const line = "
|
|
4
|
-
const lineWhite = "
|
|
5
|
-
const circle = "
|
|
6
|
-
const label = "
|
|
7
|
-
const y1Label = "
|
|
8
|
-
const y2Label = "
|
|
9
|
-
const axis = "
|
|
10
|
-
const axisLabel = "
|
|
1
|
+
const slopeChartContainer = "_slopeChartContainer_1678z_1";
|
|
2
|
+
const svg = "_svg_1678z_5";
|
|
3
|
+
const line = "_line_1678z_9";
|
|
4
|
+
const lineWhite = "_lineWhite_1678z_14";
|
|
5
|
+
const circle = "_circle_1678z_19";
|
|
6
|
+
const label = "_label_1678z_23";
|
|
7
|
+
const y1Label = "_y1Label_1678z_29";
|
|
8
|
+
const y2Label = "_y2Label_1678z_33";
|
|
9
|
+
const axis = "_axis_1678z_37";
|
|
10
|
+
const axisLabel = "_axisLabel_1678z_42";
|
|
11
|
+
const background = "_background_1678z_46";
|
|
11
12
|
const defaultStyles = {
|
|
12
13
|
slopeChartContainer,
|
|
13
14
|
svg,
|
|
@@ -18,11 +19,13 @@ const defaultStyles = {
|
|
|
18
19
|
y1Label,
|
|
19
20
|
y2Label,
|
|
20
21
|
axis,
|
|
21
|
-
axisLabel
|
|
22
|
+
axisLabel,
|
|
23
|
+
background
|
|
22
24
|
};
|
|
23
25
|
export {
|
|
24
26
|
axis,
|
|
25
27
|
axisLabel,
|
|
28
|
+
background,
|
|
26
29
|
circle,
|
|
27
30
|
defaultStyles as default,
|
|
28
31
|
label,
|
package/dist/style.css
CHANGED
|
@@ -1983,50 +1983,54 @@ body.android {
|
|
|
1983
1983
|
|
|
1984
1984
|
._bodyRow_fhbur_58:last-child > ._bodyCell_fhbur_62 {
|
|
1985
1985
|
border-bottom: 0;
|
|
1986
|
-
}.
|
|
1986
|
+
}._slopeChartContainer_1678z_1 {
|
|
1987
1987
|
max-width: 300px;
|
|
1988
1988
|
}
|
|
1989
1989
|
|
|
1990
|
-
.
|
|
1990
|
+
._svg_1678z_5 {
|
|
1991
1991
|
overflow: visible;
|
|
1992
1992
|
}
|
|
1993
1993
|
|
|
1994
|
-
.
|
|
1994
|
+
._line_1678z_9 {
|
|
1995
1995
|
stroke: #121212;
|
|
1996
1996
|
stroke-width: 2;
|
|
1997
1997
|
}
|
|
1998
1998
|
|
|
1999
|
-
.
|
|
1999
|
+
._lineWhite_1678z_14 {
|
|
2000
2000
|
stroke: var(--primary-bg-color);
|
|
2001
2001
|
stroke-width: 3.25;
|
|
2002
2002
|
}
|
|
2003
2003
|
|
|
2004
|
-
.
|
|
2004
|
+
._circle_1678z_19 {
|
|
2005
2005
|
fill: #121212;
|
|
2006
2006
|
}
|
|
2007
2007
|
|
|
2008
|
-
.
|
|
2008
|
+
._label_1678z_23 {
|
|
2009
2009
|
font-family: var(--text-sans);
|
|
2010
2010
|
font-size: var(--sans-xxsmall);
|
|
2011
2011
|
fill: var(--primary-text-color);
|
|
2012
2012
|
}
|
|
2013
2013
|
|
|
2014
|
-
.
|
|
2014
|
+
._y1Label_1678z_29 {
|
|
2015
2015
|
transform: translateX(calc(var(--space-2) * -1));
|
|
2016
2016
|
}
|
|
2017
2017
|
|
|
2018
|
-
.
|
|
2018
|
+
._y2Label_1678z_33 {
|
|
2019
2019
|
transform: translateX(calc(var(--space-2)));
|
|
2020
2020
|
}
|
|
2021
2021
|
|
|
2022
|
-
.
|
|
2022
|
+
._axis_1678z_37 {
|
|
2023
2023
|
stroke: var(--primary-line-color);
|
|
2024
2024
|
stroke-width: 1;
|
|
2025
2025
|
}
|
|
2026
2026
|
|
|
2027
|
-
.
|
|
2027
|
+
._axisLabel_1678z_42 {
|
|
2028
2028
|
transform: translateY(var(--space-1));
|
|
2029
2029
|
}
|
|
2030
|
+
|
|
2031
|
+
._background_1678z_46 {
|
|
2032
|
+
fill: var(--secondary-bg-color);
|
|
2033
|
+
}
|
|
2030
2034
|
._tooltip_11t5d_1 {
|
|
2031
2035
|
pointer-events: none;
|
|
2032
2036
|
}
|
|
@@ -2188,14 +2192,14 @@ body.android {
|
|
|
2188
2192
|
--top-inset: 58px;
|
|
2189
2193
|
}
|
|
2190
2194
|
|
|
2191
|
-
.
|
|
2195
|
+
._section_1vdz3_9 {
|
|
2192
2196
|
background-color: var(--background-color);
|
|
2193
2197
|
display: grid;
|
|
2194
2198
|
grid-column-gap: 10px;
|
|
2195
2199
|
grid-row-gap: 10px;
|
|
2196
2200
|
grid-template-areas: "header" "content";
|
|
2197
2201
|
--padding: 10px;
|
|
2198
|
-
--bleed:
|
|
2202
|
+
--bleed: 0px;
|
|
2199
2203
|
width: calc(100% + var(--bleed) * 2);
|
|
2200
2204
|
padding-left: var(--padding);
|
|
2201
2205
|
padding-right: var(--padding);
|
|
@@ -2203,75 +2207,74 @@ body.android {
|
|
|
2203
2207
|
margin-right: calc(var(--bleed) * -1);
|
|
2204
2208
|
}
|
|
2205
2209
|
@media (min-width: 480px) {
|
|
2206
|
-
.
|
|
2210
|
+
._section_1vdz3_9 {
|
|
2207
2211
|
--padding: 20px;
|
|
2208
|
-
--bleed: 20px;
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
@media (min-width: 740px) and (max-width: 1140px) {
|
|
2212
|
-
._section_s7ln2_9 {
|
|
2213
|
-
--bleed: 0px;
|
|
2214
2212
|
}
|
|
2215
2213
|
}
|
|
2216
2214
|
@media (min-width: 980px) {
|
|
2217
|
-
.
|
|
2215
|
+
._section_1vdz3_9 {
|
|
2218
2216
|
width: calc(100% + var(--bleed) * 2 - 2px);
|
|
2219
2217
|
grid-template-columns: 620px;
|
|
2220
2218
|
}
|
|
2221
2219
|
}
|
|
2220
|
+
@media (min-width: 1140px) {
|
|
2221
|
+
._section_1vdz3_9 {
|
|
2222
|
+
--bleed: 20px;
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2222
2225
|
@media (min-width: 1140px) and (max-width: 1300px) {
|
|
2223
|
-
.
|
|
2226
|
+
._section_1vdz3_9 {
|
|
2224
2227
|
margin-left: calc(var(--bleed) * -1 - 1px);
|
|
2225
2228
|
}
|
|
2226
2229
|
}
|
|
2227
2230
|
@media (min-width: 1140px) {
|
|
2228
|
-
.
|
|
2231
|
+
._section_1vdz3_9 {
|
|
2229
2232
|
grid-template-columns: 140px 1px 620px 1fr;
|
|
2230
2233
|
grid-template-areas: "header border content .";
|
|
2231
2234
|
}
|
|
2232
2235
|
}
|
|
2233
2236
|
@media (min-width: 1300px) {
|
|
2234
|
-
.
|
|
2237
|
+
._section_1vdz3_9 {
|
|
2235
2238
|
grid-template-columns: 219px 1px 620px;
|
|
2236
2239
|
}
|
|
2237
2240
|
}
|
|
2238
2241
|
|
|
2239
2242
|
@media (min-width: 980px) {
|
|
2240
|
-
.
|
|
2243
|
+
._section_1vdz3_9._fullWidth_1vdz3_57 {
|
|
2241
2244
|
grid-template-columns: 1fr;
|
|
2242
2245
|
}
|
|
2243
2246
|
}
|
|
2244
2247
|
@media (min-width: 1140px) {
|
|
2245
|
-
.
|
|
2248
|
+
._section_1vdz3_9._fullWidth_1vdz3_57 {
|
|
2246
2249
|
grid-template-columns: 140px 1px 1fr;
|
|
2247
2250
|
grid-template-areas: "header border content";
|
|
2248
2251
|
}
|
|
2249
2252
|
}
|
|
2250
2253
|
@media (min-width: 1300px) {
|
|
2251
|
-
.
|
|
2254
|
+
._section_1vdz3_9._fullWidth_1vdz3_57 {
|
|
2252
2255
|
grid-template-columns: 219px 1px 1fr;
|
|
2253
2256
|
}
|
|
2254
2257
|
}
|
|
2255
2258
|
|
|
2256
2259
|
@media (min-width: 1140px) {
|
|
2257
|
-
.
|
|
2260
|
+
._section_1vdz3_9._borderLeftCol_1vdz3_74:before {
|
|
2258
2261
|
content: "";
|
|
2259
2262
|
grid-area: border;
|
|
2260
2263
|
border-left: 1px solid var(--border-divider-color);
|
|
2261
2264
|
}
|
|
2262
2265
|
}
|
|
2263
2266
|
|
|
2264
|
-
.
|
|
2267
|
+
._header_1vdz3_81 {
|
|
2265
2268
|
padding-top: 10px;
|
|
2266
2269
|
grid-area: header;
|
|
2267
2270
|
}
|
|
2268
2271
|
|
|
2269
|
-
.
|
|
2272
|
+
._content_1vdz3_86 {
|
|
2270
2273
|
padding-top: 10px;
|
|
2271
2274
|
grid-area: content;
|
|
2272
2275
|
}
|
|
2273
2276
|
|
|
2274
|
-
.
|
|
2277
|
+
._borderTop_1vdz3_91 {
|
|
2275
2278
|
border-top: 1px solid var(--border-divider-color);
|
|
2276
2279
|
}._text_1ci1k_1 {
|
|
2277
2280
|
font-family: var(--text-sans);
|