@guardian/stand 0.0.33 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/intended-audience-signifier/FlagIcons.cjs +128 -0
- package/dist/components/intended-audience-signifier/FlagIcons.js +9 -0
- package/dist/components/intended-audience-signifier/IntendedAudienceSignifier.cjs +67 -0
- package/dist/components/intended-audience-signifier/IntendedAudienceSignifier.js +35 -0
- package/dist/components/intended-audience-signifier/styles.cjs +31 -0
- package/dist/components/intended-audience-signifier/styles.js +28 -0
- package/dist/index.cjs +2 -0
- package/dist/index.js +1 -0
- package/dist/intended-audience-signifier.cjs +9 -0
- package/dist/intended-audience-signifier.js +2 -0
- package/dist/styleD/build/css/component/intendedAudienceSignifier.css +25 -0
- package/dist/styleD/build/css/component/link.css +1 -1
- package/dist/styleD/build/css/semantic/breakpoints.css +3 -12
- package/dist/styleD/build/typescript/component/intendedAudienceSignifier.cjs +29 -0
- package/dist/styleD/build/typescript/component/intendedAudienceSignifier.js +27 -0
- package/dist/styleD/build/typescript/component/link.cjs +1 -1
- package/dist/styleD/build/typescript/component/link.js +1 -1
- package/dist/styleD/build/typescript/semantic/breakpoints.cjs +3 -24
- package/dist/styleD/build/typescript/semantic/breakpoints.js +3 -24
- package/dist/styleD/utils/semantic/mq.cjs +4 -4
- package/dist/styleD/utils/semantic/mq.js +4 -4
- package/dist/types/components/intended-audience-signifier/FlagIcons.d.ts +5 -0
- package/dist/types/components/intended-audience-signifier/IntendedAudienceSignifier.d.ts +2 -0
- package/dist/types/components/intended-audience-signifier/sandbox.d.ts +5 -0
- package/dist/types/components/intended-audience-signifier/styles.d.ts +6 -0
- package/dist/types/components/intended-audience-signifier/types.d.ts +8 -0
- package/dist/types/components/topbar/styles.d.ts +2 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/intended-audience-signifier.d.ts +19 -0
- package/dist/types/styleD/build/typescript/component/intendedAudienceSignifier.d.ts +29 -0
- package/dist/types/styleD/build/typescript/semantic/breakpoints.d.ts +3 -24
- package/dist/types/styleD/utils/semantic/mq.d.ts +5 -14
- package/package.json +11 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
4
|
+
|
|
5
|
+
const ukFlag = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6
|
+
"svg",
|
|
7
|
+
{
|
|
8
|
+
height: "12px",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
id: "flag-icons-gb",
|
|
11
|
+
viewBox: "0 0 640 480",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#012169", d: "M0 0h640v480H0z" }),
|
|
14
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
+
"path",
|
|
16
|
+
{
|
|
17
|
+
fill: "#FFF",
|
|
18
|
+
d: "m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z"
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
24
|
+
fill: "#C8102E",
|
|
25
|
+
d: "m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z"
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#FFF", d: "M241 0v480h160V0zM0 160v160h640V160z" }),
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#C8102E", d: "M0 193v96h640v-96zM273 0v480h96V0z" })
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
const usFlag = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
34
|
+
"svg",
|
|
35
|
+
{
|
|
36
|
+
height: "12px",
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
+
id: "flag-icons-us",
|
|
39
|
+
viewBox: "0 0 640 480",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#bd3d44", d: "M0 0h640v480H0" }),
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
+
"path",
|
|
44
|
+
{
|
|
45
|
+
stroke: "#fff",
|
|
46
|
+
strokeWidth: "37",
|
|
47
|
+
d: "M0 55.3h640M0 129h640M0 203h640M0 277h640M0 351h640M0 425h640"
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#192f5d", d: "M0 0h364.8v258.5H0" }),
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "us-a", markerHeight: "30", markerWidth: "30", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#fff", d: "m14 0 9 27L0 10h28L5 27z" }) }),
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
53
|
+
"path",
|
|
54
|
+
{
|
|
55
|
+
fill: "none",
|
|
56
|
+
markerMid: "url(#us-a)",
|
|
57
|
+
d: "m0 0 16 11h61 61 61 61 60L47 37h61 61 60 61L16 63h61 61 61 61 60L47 89h61 61 60 61L16 115h61 61 61 61 60L47 141h61 61 60 61L16 166h61 61 61 61 60L47 192h61 61 60 61L16 218h61 61 61 61 60z"
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
const auFlag = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
64
|
+
"svg",
|
|
65
|
+
{
|
|
66
|
+
height: "12px",
|
|
67
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
68
|
+
id: "flag-icons-au",
|
|
69
|
+
viewBox: "0 0 640 480",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#00008B", d: "M0 0h640v480H0z" }),
|
|
72
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73
|
+
"path",
|
|
74
|
+
{
|
|
75
|
+
fill: "#fff",
|
|
76
|
+
d: "m37.5 0 122 90.5L281 0h39v31l-120 89.5 120 89V240h-40l-120-89.5L40.5 240H0v-30l119.5-89L0 32V0z"
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
+
"path",
|
|
81
|
+
{
|
|
82
|
+
fill: "red",
|
|
83
|
+
d: "M212 140.5 320 220v20l-135.5-99.5zm-92 10 3 17.5-96 72H0zM320 0v1.5l-124.5 94 1-22L295 0zM0 0l119.5 88h-30L0 21z"
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#fff", d: "M120.5 0v240h80V0zM0 80v80h320V80z" }),
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "red", d: "M0 96.5v48h320v-48zM136.5 0v240h48V0z" }),
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
+
"path",
|
|
90
|
+
{
|
|
91
|
+
fill: "#fff",
|
|
92
|
+
d: "m527 396.7-20.5 2.6 2.2 20.5-14.8-14.4-14.7 14.5 2-20.5-20.5-2.4 17.3-11.2-10.9-17.5 19.6 6.5 6.9-19.5 7.1 19.4 19.5-6.7-10.7 17.6zm-3.7-117.2 2.7-13-9.8-9 13.2-1.5 5.5-12.1 5.5 12.1 13.2 1.5-9.8 9 2.7 13-11.6-6.6zm-104.1-60-20.3 2.2 1.8 20.3-14.4-14.5-14.8 14.1 2.4-20.3-20.2-2.7 17.3-10.8-10.5-17.5 19.3 6.8L387 178l6.7 19.3 19.4-6.3-10.9 17.3 17.1 11.2ZM623 186.7l-20.9 2.7 2.3 20.9-15.1-14.7-15 14.8 2.1-21-20.9-2.4 17.7-11.5-11.1-17.9 20 6.7 7-19.8 7.2 19.8 19.9-6.9-11 18zm-96.1-83.5-20.7 2.3 1.9 20.8-14.7-14.8-15.1 14.4 2.4-20.7-20.7-2.8 17.7-11L467 73.5l19.7 6.9 7.3-19.5 6.8 19.7 19.8-6.5-11.1 17.6zM234 385.7l-45.8 5.4 4.6 45.9-32.8-32.4-33 32.2 4.9-45.9-45.8-5.8 38.9-24.8-24-39.4 43.6 15 15.8-43.4 15.5 43.5 43.7-14.7-24.3 39.2 38.8 25.1Z"
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
const globeIcon = /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
+
"svg",
|
|
100
|
+
{
|
|
101
|
+
style: { marginTop: "2px" },
|
|
102
|
+
width: "16px",
|
|
103
|
+
height: "16px",
|
|
104
|
+
fill: "#000000",
|
|
105
|
+
viewBox: "0 0 16 16",
|
|
106
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0M3.668 2.501l-.288.646a.847.847 0 0 0 1.479.815l.245-.368a.81.81 0 0 1 1.034-.275.81.81 0 0 0 .724 0l.261-.13a1 1 0 0 1 .775-.05l.984.34q.118.04.243.054c.784.093.855.377.694.801-.155.41-.616.617-1.035.487l-.01-.003C8.274 4.663 7.748 4.5 6 4.5 4.8 4.5 3.5 5.62 3.5 7c0 1.96.826 2.166 1.696 2.382.46.115.935.233 1.304.618.449.467.393 1.181.339 1.877C6.755 12.96 6.674 14 8.5 14c1.75 0 3-3.5 3-4.5 0-.262.208-.468.444-.7.396-.392.87-.86.556-1.8-.097-.291-.396-.568-.641-.756-.174-.133-.207-.396-.052-.551a.33.33 0 0 1 .42-.042l1.085.724c.11.072.255.058.348-.035.15-.15.415-.083.489.117.16.43.445 1.05.849 1.357L15 8A7 7 0 1 1 3.668 2.501" })
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
const DoubleChevronRightSvg = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
110
|
+
"svg",
|
|
111
|
+
{
|
|
112
|
+
width: "13",
|
|
113
|
+
height: "13",
|
|
114
|
+
viewBox: "0 0 9 7",
|
|
115
|
+
fill: "none",
|
|
116
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z", fill: "#545454" }),
|
|
119
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z", fill: "#545454" })
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
exports.DoubleChevronRightSvg = DoubleChevronRightSvg;
|
|
125
|
+
exports.auFlag = auFlag;
|
|
126
|
+
exports.globeIcon = globeIcon;
|
|
127
|
+
exports.ukFlag = ukFlag;
|
|
128
|
+
exports.usFlag = usFlag;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
const ukFlag = jsxs("svg", { height: "12px", xmlns: "http://www.w3.org/2000/svg", id: "flag-icons-gb", viewBox: "0 0 640 480", children: [jsx("path", { fill: "#012169", d: "M0 0h640v480H0z" }), jsx("path", { fill: "#FFF", d: "m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z" }), jsx("path", { fill: "#C8102E", d: "m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z" }), jsx("path", { fill: "#FFF", d: "M241 0v480h160V0zM0 160v160h640V160z" }), jsx("path", { fill: "#C8102E", d: "M0 193v96h640v-96zM273 0v480h96V0z" })] });
|
|
4
|
+
const usFlag = jsxs("svg", { height: "12px", xmlns: "http://www.w3.org/2000/svg", id: "flag-icons-us", viewBox: "0 0 640 480", children: [jsx("path", { fill: "#bd3d44", d: "M0 0h640v480H0" }), jsx("path", { stroke: "#fff", strokeWidth: "37", d: "M0 55.3h640M0 129h640M0 203h640M0 277h640M0 351h640M0 425h640" }), jsx("path", { fill: "#192f5d", d: "M0 0h364.8v258.5H0" }), jsx("marker", { id: "us-a", markerHeight: "30", markerWidth: "30", children: jsx("path", { fill: "#fff", d: "m14 0 9 27L0 10h28L5 27z" }) }), jsx("path", { fill: "none", markerMid: "url(#us-a)", d: "m0 0 16 11h61 61 61 61 60L47 37h61 61 60 61L16 63h61 61 61 61 60L47 89h61 61 60 61L16 115h61 61 61 61 60L47 141h61 61 60 61L16 166h61 61 61 61 60L47 192h61 61 60 61L16 218h61 61 61 61 60z" })] });
|
|
5
|
+
const auFlag = jsxs("svg", { height: "12px", xmlns: "http://www.w3.org/2000/svg", id: "flag-icons-au", viewBox: "0 0 640 480", children: [jsx("path", { fill: "#00008B", d: "M0 0h640v480H0z" }), jsx("path", { fill: "#fff", d: "m37.5 0 122 90.5L281 0h39v31l-120 89.5 120 89V240h-40l-120-89.5L40.5 240H0v-30l119.5-89L0 32V0z" }), jsx("path", { fill: "red", d: "M212 140.5 320 220v20l-135.5-99.5zm-92 10 3 17.5-96 72H0zM320 0v1.5l-124.5 94 1-22L295 0zM0 0l119.5 88h-30L0 21z" }), jsx("path", { fill: "#fff", d: "M120.5 0v240h80V0zM0 80v80h320V80z" }), jsx("path", { fill: "red", d: "M0 96.5v48h320v-48zM136.5 0v240h48V0z" }), jsx("path", { fill: "#fff", d: "m527 396.7-20.5 2.6 2.2 20.5-14.8-14.4-14.7 14.5 2-20.5-20.5-2.4 17.3-11.2-10.9-17.5 19.6 6.5 6.9-19.5 7.1 19.4 19.5-6.7-10.7 17.6zm-3.7-117.2 2.7-13-9.8-9 13.2-1.5 5.5-12.1 5.5 12.1 13.2 1.5-9.8 9 2.7 13-11.6-6.6zm-104.1-60-20.3 2.2 1.8 20.3-14.4-14.5-14.8 14.1 2.4-20.3-20.2-2.7 17.3-10.8-10.5-17.5 19.3 6.8L387 178l6.7 19.3 19.4-6.3-10.9 17.3 17.1 11.2ZM623 186.7l-20.9 2.7 2.3 20.9-15.1-14.7-15 14.8 2.1-21-20.9-2.4 17.7-11.5-11.1-17.9 20 6.7 7-19.8 7.2 19.8 19.9-6.9-11 18zm-96.1-83.5-20.7 2.3 1.9 20.8-14.7-14.8-15.1 14.4 2.4-20.7-20.7-2.8 17.7-11L467 73.5l19.7 6.9 7.3-19.5 6.8 19.7 19.8-6.5-11.1 17.6zM234 385.7l-45.8 5.4 4.6 45.9-32.8-32.4-33 32.2 4.9-45.9-45.8-5.8 38.9-24.8-24-39.4 43.6 15 15.8-43.4 15.5 43.5 43.7-14.7-24.3 39.2 38.8 25.1Z" })] });
|
|
6
|
+
const globeIcon = jsx("svg", { style: { marginTop: "2px" }, width: "16px", height: "16px", fill: "#000000", viewBox: "0 0 16 16", children: jsx("path", { d: "M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0M3.668 2.501l-.288.646a.847.847 0 0 0 1.479.815l.245-.368a.81.81 0 0 1 1.034-.275.81.81 0 0 0 .724 0l.261-.13a1 1 0 0 1 .775-.05l.984.34q.118.04.243.054c.784.093.855.377.694.801-.155.41-.616.617-1.035.487l-.01-.003C8.274 4.663 7.748 4.5 6 4.5 4.8 4.5 3.5 5.62 3.5 7c0 1.96.826 2.166 1.696 2.382.46.115.935.233 1.304.618.449.467.393 1.181.339 1.877C6.755 12.96 6.674 14 8.5 14c1.75 0 3-3.5 3-4.5 0-.262.208-.468.444-.7.396-.392.87-.86.556-1.8-.097-.291-.396-.568-.641-.756-.174-.133-.207-.396-.052-.551a.33.33 0 0 1 .42-.042l1.085.724c.11.072.255.058.348-.035.15-.15.415-.083.489.117.16.43.445 1.05.849 1.357L15 8A7 7 0 1 1 3.668 2.501" }) });
|
|
7
|
+
const DoubleChevronRightSvg = jsxs("svg", { width: "13", height: "13", viewBox: "0 0 9 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z", fill: "#545454" }), jsx("path", { d: "M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z", fill: "#545454" })] });
|
|
8
|
+
|
|
9
|
+
export { DoubleChevronRightSvg, auFlag, globeIcon, ukFlag, usFlag };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
4
|
+
var mergeDeep = require('../../util/mergeDeep.cjs');
|
|
5
|
+
var FlagIcons = require('./FlagIcons.cjs');
|
|
6
|
+
var styles = require('./styles.cjs');
|
|
7
|
+
|
|
8
|
+
const sourceIcons = {
|
|
9
|
+
UK: FlagIcons.ukFlag,
|
|
10
|
+
US: FlagIcons.usFlag,
|
|
11
|
+
AUS: FlagIcons.auFlag,
|
|
12
|
+
Global: FlagIcons.globeIcon
|
|
13
|
+
};
|
|
14
|
+
const getSourceIconElement = (sourceTag, audience) => {
|
|
15
|
+
if (audience === "Global") {
|
|
16
|
+
return FlagIcons.globeIcon;
|
|
17
|
+
}
|
|
18
|
+
return sourceIcons[sourceTag];
|
|
19
|
+
};
|
|
20
|
+
const getIntendedAudienceIconElement = (sourceTag, audience) => {
|
|
21
|
+
if (audience === "Domestic for Domestic") {
|
|
22
|
+
return getSourceIconElement(sourceTag, audience);
|
|
23
|
+
}
|
|
24
|
+
if (audience === "Global" || audience === "Domestic For Global") {
|
|
25
|
+
return FlagIcons.globeIcon;
|
|
26
|
+
}
|
|
27
|
+
return sourceIcons[audience];
|
|
28
|
+
};
|
|
29
|
+
function IntendedAudienceSignifier({
|
|
30
|
+
source,
|
|
31
|
+
intendedAudience,
|
|
32
|
+
theme = {},
|
|
33
|
+
cssOverrides,
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
const mergedTheme = mergeDeep.mergeDeep(styles.defaultIntendedAudienceSignifierTheme, theme);
|
|
38
|
+
if (intendedAudience === "Don't know") {
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
...props,
|
|
43
|
+
className,
|
|
44
|
+
css: [styles.intendedAudienceSignifierStyles(mergedTheme), cssOverrides],
|
|
45
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Don\u2018t know" })
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
...props,
|
|
53
|
+
className,
|
|
54
|
+
css: [styles.intendedAudienceSignifierStyles(mergedTheme), cssOverrides],
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: getSourceIconElement(source, intendedAudience) }),
|
|
57
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
58
|
+
" ",
|
|
59
|
+
FlagIcons.DoubleChevronRightSvg
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: getIntendedAudienceIconElement(source, intendedAudience) })
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exports.IntendedAudienceSignifier = IntendedAudienceSignifier;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { mergeDeep } from '../../util/mergeDeep.js';
|
|
3
|
+
import { DoubleChevronRightSvg, globeIcon, auFlag, usFlag, ukFlag } from './FlagIcons.js';
|
|
4
|
+
import { intendedAudienceSignifierStyles, defaultIntendedAudienceSignifierTheme } from './styles.js';
|
|
5
|
+
|
|
6
|
+
const sourceIcons = {
|
|
7
|
+
UK: ukFlag,
|
|
8
|
+
US: usFlag,
|
|
9
|
+
AUS: auFlag,
|
|
10
|
+
Global: globeIcon
|
|
11
|
+
};
|
|
12
|
+
const getSourceIconElement = (sourceTag, audience) => {
|
|
13
|
+
if (audience === "Global") {
|
|
14
|
+
return globeIcon;
|
|
15
|
+
}
|
|
16
|
+
return sourceIcons[sourceTag];
|
|
17
|
+
};
|
|
18
|
+
const getIntendedAudienceIconElement = (sourceTag, audience) => {
|
|
19
|
+
if (audience === "Domestic for Domestic") {
|
|
20
|
+
return getSourceIconElement(sourceTag, audience);
|
|
21
|
+
}
|
|
22
|
+
if (audience === "Global" || audience === "Domestic For Global") {
|
|
23
|
+
return globeIcon;
|
|
24
|
+
}
|
|
25
|
+
return sourceIcons[audience];
|
|
26
|
+
};
|
|
27
|
+
function IntendedAudienceSignifier({ source, intendedAudience, theme = {}, cssOverrides, className, ...props }) {
|
|
28
|
+
const mergedTheme = mergeDeep(defaultIntendedAudienceSignifierTheme, theme);
|
|
29
|
+
if (intendedAudience === "Don't know") {
|
|
30
|
+
return jsx("div", { ...props, className, css: [intendedAudienceSignifierStyles(mergedTheme), cssOverrides], children: jsx("span", { children: "Don\u2018t know" }) });
|
|
31
|
+
}
|
|
32
|
+
return jsxs("div", { ...props, className, css: [intendedAudienceSignifierStyles(mergedTheme), cssOverrides], children: [jsx("div", { children: getSourceIconElement(source, intendedAudience) }), jsxs("div", { children: [" ", DoubleChevronRightSvg] }), jsx("div", { children: getIntendedAudienceIconElement(source, intendedAudience) })] });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { IntendedAudienceSignifier };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('@emotion/react');
|
|
4
|
+
var intendedAudienceSignifier = require('../../styleD/build/typescript/component/intendedAudienceSignifier.cjs');
|
|
5
|
+
|
|
6
|
+
const defaultIntendedAudienceSignifierTheme = intendedAudienceSignifier.componentIntendedAudienceSignifier;
|
|
7
|
+
const intendedAudienceSignifierStyles = (theme) => react.css`
|
|
8
|
+
display: ${theme.display};
|
|
9
|
+
flex-direction: ${theme.flexDirection};
|
|
10
|
+
justify-content: ${theme.justifyContent};
|
|
11
|
+
align-items: ${theme.alignItems};
|
|
12
|
+
color: ${theme.color};
|
|
13
|
+
font-weight: ${theme.typography.fontWeight};
|
|
14
|
+
font-size: ${theme.typography.fontSize};
|
|
15
|
+
line-height: ${theme.typography.lineHeight};
|
|
16
|
+
border-width: ${theme.borderWidth};
|
|
17
|
+
border-style: ${theme.borderStyle};
|
|
18
|
+
border-color: ${theme.borderColor};
|
|
19
|
+
border-radius: ${theme.borderRadius};
|
|
20
|
+
padding: ${theme.paddingY} ${theme.paddingX};
|
|
21
|
+
box-sizing: ${theme.boxSizing};
|
|
22
|
+
width: ${theme.width};
|
|
23
|
+
gap: ${theme.gap};
|
|
24
|
+
svg {
|
|
25
|
+
height: ${theme.svg.height};
|
|
26
|
+
width: ${theme.svg.width};
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
exports.defaultIntendedAudienceSignifierTheme = defaultIntendedAudienceSignifierTheme;
|
|
31
|
+
exports.intendedAudienceSignifierStyles = intendedAudienceSignifierStyles;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { componentIntendedAudienceSignifier } from '../../styleD/build/typescript/component/intendedAudienceSignifier.js';
|
|
3
|
+
|
|
4
|
+
const defaultIntendedAudienceSignifierTheme = componentIntendedAudienceSignifier;
|
|
5
|
+
const intendedAudienceSignifierStyles = (theme) => css`
|
|
6
|
+
display: ${theme.display};
|
|
7
|
+
flex-direction: ${theme.flexDirection};
|
|
8
|
+
justify-content: ${theme.justifyContent};
|
|
9
|
+
align-items: ${theme.alignItems};
|
|
10
|
+
color: ${theme.color};
|
|
11
|
+
font-weight: ${theme.typography.fontWeight};
|
|
12
|
+
font-size: ${theme.typography.fontSize};
|
|
13
|
+
line-height: ${theme.typography.lineHeight};
|
|
14
|
+
border-width: ${theme.borderWidth};
|
|
15
|
+
border-style: ${theme.borderStyle};
|
|
16
|
+
border-color: ${theme.borderColor};
|
|
17
|
+
border-radius: ${theme.borderRadius};
|
|
18
|
+
padding: ${theme.paddingY} ${theme.paddingX};
|
|
19
|
+
box-sizing: ${theme.boxSizing};
|
|
20
|
+
width: ${theme.width};
|
|
21
|
+
gap: ${theme.gap};
|
|
22
|
+
svg {
|
|
23
|
+
height: ${theme.svg.height};
|
|
24
|
+
width: ${theme.svg.width};
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export { defaultIntendedAudienceSignifierTheme, intendedAudienceSignifierStyles };
|
package/dist/index.cjs
CHANGED
|
@@ -4,6 +4,7 @@ var autocomplete = require('./styleD/build/typescript/component/autocomplete.cjs
|
|
|
4
4
|
var byline = require('./styleD/build/typescript/component/byline.cjs');
|
|
5
5
|
var tagTable = require('./styleD/build/typescript/component/tagTable.cjs');
|
|
6
6
|
var userMenu = require('./styleD/build/typescript/component/userMenu.cjs');
|
|
7
|
+
var intendedAudienceSignifier = require('./styleD/build/typescript/component/intendedAudienceSignifier.cjs');
|
|
7
8
|
var avatar = require('./styleD/build/typescript/component/avatar.cjs');
|
|
8
9
|
var button = require('./styleD/build/typescript/component/button.cjs');
|
|
9
10
|
var checkbox = require('./styleD/build/typescript/component/checkbox.cjs');
|
|
@@ -38,6 +39,7 @@ exports.componentAutocomplete = autocomplete.componentAutocomplete;
|
|
|
38
39
|
exports.componentByline = byline.componentByline;
|
|
39
40
|
exports.componentTagTable = tagTable.componentTagTable;
|
|
40
41
|
exports.componentUserMenu = userMenu.componentUserMenu;
|
|
42
|
+
exports.componentIntendedAudienceSignifier = intendedAudienceSignifier.componentIntendedAudienceSignifier;
|
|
41
43
|
exports.componentAvatar = avatar.componentAvatar;
|
|
42
44
|
exports.componentButton = button.componentButton;
|
|
43
45
|
exports.componentCheckbox = checkbox.componentCheckbox;
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { componentAutocomplete } from './styleD/build/typescript/component/autoc
|
|
|
2
2
|
export { componentByline } from './styleD/build/typescript/component/byline.js';
|
|
3
3
|
export { componentTagTable } from './styleD/build/typescript/component/tagTable.js';
|
|
4
4
|
export { componentUserMenu } from './styleD/build/typescript/component/userMenu.js';
|
|
5
|
+
export { componentIntendedAudienceSignifier } from './styleD/build/typescript/component/intendedAudienceSignifier.js';
|
|
5
6
|
export { componentAvatar } from './styleD/build/typescript/component/avatar.js';
|
|
6
7
|
export { componentButton } from './styleD/build/typescript/component/button.js';
|
|
7
8
|
export { componentCheckbox } from './styleD/build/typescript/component/checkbox.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var IntendedAudienceSignifier = require('./components/intended-audience-signifier/IntendedAudienceSignifier.cjs');
|
|
4
|
+
var intendedAudienceSignifier = require('./styleD/build/typescript/component/intendedAudienceSignifier.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.IntendedAudienceSignifier = IntendedAudienceSignifier.IntendedAudienceSignifier;
|
|
9
|
+
exports.componentIntendedAudienceSignifier = intendedAudienceSignifier.componentIntendedAudienceSignifier;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--component-intended-audience-signifier-display: flex;
|
|
7
|
+
--component-intended-audience-signifier-flex-direction: row;
|
|
8
|
+
--component-intended-audience-signifier-justify-content: center;
|
|
9
|
+
--component-intended-audience-signifier-align-items: center;
|
|
10
|
+
--component-intended-audience-signifier-border-color: #000000;
|
|
11
|
+
--component-intended-audience-signifier-border-width: 1px;
|
|
12
|
+
--component-intended-audience-signifier-border-style: solid;
|
|
13
|
+
--component-intended-audience-signifier-border-radius: 0.125rem;
|
|
14
|
+
--component-intended-audience-signifier-padding-y: 2px;
|
|
15
|
+
--component-intended-audience-signifier-padding-x: 4px;
|
|
16
|
+
--component-intended-audience-signifier-box-sizing: border-box;
|
|
17
|
+
--component-intended-audience-signifier-width: fit-content;
|
|
18
|
+
--component-intended-audience-signifier-gap: 8px;
|
|
19
|
+
--component-intended-audience-signifier-svg-height: unset;
|
|
20
|
+
--component-intended-audience-signifier-svg-width: unset;
|
|
21
|
+
--component-intended-audience-signifier-color: #545454;
|
|
22
|
+
--component-intended-audience-signifier-typography-font-weight: 400;
|
|
23
|
+
--component-intended-audience-signifier-typography-font-size: 0.75rem;
|
|
24
|
+
--component-intended-audience-signifier-typography-line-height: 1;
|
|
25
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
:root {
|
|
6
|
-
--component-link-shared-focus-outline:
|
|
6
|
+
--component-link-shared-focus-outline: 0.0625rem solid #0072a9;
|
|
7
7
|
--component-link-shared-hover-color: #00344e;
|
|
8
8
|
--component-link-shared-hover-cursor: pointer;
|
|
9
9
|
--component-link-shared-enabled-color: #00496c;
|
|
@@ -3,16 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
:root {
|
|
6
|
-
--semantic-breakpoints-sm
|
|
7
|
-
--semantic-breakpoints-
|
|
8
|
-
--semantic-breakpoints-
|
|
9
|
-
--semantic-breakpoints-md-max: 1055px;
|
|
10
|
-
--semantic-breakpoints-lg-min: 1056px;
|
|
11
|
-
--semantic-breakpoints-lg-max: 1311px;
|
|
12
|
-
--semantic-breakpoints-xl-min: 1312px;
|
|
13
|
-
--semantic-breakpoints-xl-max: 1583px;
|
|
14
|
-
--semantic-breakpoints-max-min: 1584px;
|
|
15
|
-
--semantic-breakpoints-max-max: 1783px;
|
|
16
|
-
--semantic-breakpoints-maxplus-min: 1784px;
|
|
17
|
-
--semantic-breakpoints-maxplus-max: initial;
|
|
6
|
+
--semantic-breakpoints-sm: 0;
|
|
7
|
+
--semantic-breakpoints-md: 830px;
|
|
8
|
+
--semantic-breakpoints-lg: 1056px;
|
|
18
9
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const componentIntendedAudienceSignifier = {
|
|
4
|
+
display: "flex",
|
|
5
|
+
flexDirection: "row",
|
|
6
|
+
justifyContent: "center",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
borderColor: "#000000",
|
|
9
|
+
borderWidth: "1px",
|
|
10
|
+
borderStyle: "solid",
|
|
11
|
+
borderRadius: "0.125rem",
|
|
12
|
+
paddingY: "2px",
|
|
13
|
+
paddingX: "4px",
|
|
14
|
+
boxSizing: "border-box",
|
|
15
|
+
width: "fit-content",
|
|
16
|
+
gap: "8px",
|
|
17
|
+
svg: {
|
|
18
|
+
height: "unset",
|
|
19
|
+
width: "unset"
|
|
20
|
+
},
|
|
21
|
+
color: "#545454",
|
|
22
|
+
typography: {
|
|
23
|
+
fontWeight: 400,
|
|
24
|
+
fontSize: "0.75rem",
|
|
25
|
+
lineHeight: 1
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.componentIntendedAudienceSignifier = componentIntendedAudienceSignifier;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const componentIntendedAudienceSignifier = {
|
|
2
|
+
display: "flex",
|
|
3
|
+
flexDirection: "row",
|
|
4
|
+
justifyContent: "center",
|
|
5
|
+
alignItems: "center",
|
|
6
|
+
borderColor: "#000000",
|
|
7
|
+
borderWidth: "1px",
|
|
8
|
+
borderStyle: "solid",
|
|
9
|
+
borderRadius: "0.125rem",
|
|
10
|
+
paddingY: "2px",
|
|
11
|
+
paddingX: "4px",
|
|
12
|
+
boxSizing: "border-box",
|
|
13
|
+
width: "fit-content",
|
|
14
|
+
gap: "8px",
|
|
15
|
+
svg: {
|
|
16
|
+
height: "unset",
|
|
17
|
+
width: "unset"
|
|
18
|
+
},
|
|
19
|
+
color: "#545454",
|
|
20
|
+
typography: {
|
|
21
|
+
fontWeight: 400,
|
|
22
|
+
fontSize: "0.75rem",
|
|
23
|
+
lineHeight: 1
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { componentIntendedAudienceSignifier };
|
|
@@ -1,30 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const semanticBreakpoints = {
|
|
4
|
-
sm:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
md: {
|
|
9
|
-
min: "672px",
|
|
10
|
-
max: "1055px"
|
|
11
|
-
},
|
|
12
|
-
lg: {
|
|
13
|
-
min: "1056px",
|
|
14
|
-
max: "1311px"
|
|
15
|
-
},
|
|
16
|
-
xl: {
|
|
17
|
-
min: "1312px",
|
|
18
|
-
max: "1583px"
|
|
19
|
-
},
|
|
20
|
-
max: {
|
|
21
|
-
min: "1584px",
|
|
22
|
-
max: "1783px"
|
|
23
|
-
},
|
|
24
|
-
maxplus: {
|
|
25
|
-
min: "1784px",
|
|
26
|
-
max: "initial"
|
|
27
|
-
}
|
|
4
|
+
sm: "0px",
|
|
5
|
+
md: "830px",
|
|
6
|
+
lg: "1056px"
|
|
28
7
|
};
|
|
29
8
|
|
|
30
9
|
exports.semanticBreakpoints = semanticBreakpoints;
|
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
const semanticBreakpoints = {
|
|
2
|
-
sm:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
},
|
|
6
|
-
md: {
|
|
7
|
-
min: "672px",
|
|
8
|
-
max: "1055px"
|
|
9
|
-
},
|
|
10
|
-
lg: {
|
|
11
|
-
min: "1056px",
|
|
12
|
-
max: "1311px"
|
|
13
|
-
},
|
|
14
|
-
xl: {
|
|
15
|
-
min: "1312px",
|
|
16
|
-
max: "1583px"
|
|
17
|
-
},
|
|
18
|
-
max: {
|
|
19
|
-
min: "1584px",
|
|
20
|
-
max: "1783px"
|
|
21
|
-
},
|
|
22
|
-
maxplus: {
|
|
23
|
-
min: "1784px",
|
|
24
|
-
max: "initial"
|
|
25
|
-
}
|
|
2
|
+
sm: "0px",
|
|
3
|
+
md: "830px",
|
|
4
|
+
lg: "1056px"
|
|
26
5
|
};
|
|
27
6
|
|
|
28
7
|
export { semanticBreakpoints };
|
|
@@ -8,23 +8,23 @@ const minWidthQuery = (px) => `@media (min-width: ${px}px)`;
|
|
|
8
8
|
const maxWidthQuery = (px) => `@media (max-width: ${px - smidgen}px)`;
|
|
9
9
|
const minMaxWidthQuery = (minPx, maxPx) => `@media (min-width: ${minPx}px) and (max-width: ${maxPx - smidgen}px)`;
|
|
10
10
|
const from = Object.fromEntries(
|
|
11
|
-
Object.entries(breakpoints.semanticBreakpoints).map(([name,
|
|
11
|
+
Object.entries(breakpoints.semanticBreakpoints).map(([name, min]) => [
|
|
12
12
|
name,
|
|
13
13
|
minWidthQuery(parseMinPx(min))
|
|
14
14
|
])
|
|
15
15
|
);
|
|
16
16
|
const until = Object.fromEntries(
|
|
17
|
-
Object.entries(breakpoints.semanticBreakpoints).map(([name,
|
|
17
|
+
Object.entries(breakpoints.semanticBreakpoints).map(([name, min]) => [
|
|
18
18
|
name,
|
|
19
19
|
maxWidthQuery(parseMinPx(min))
|
|
20
20
|
])
|
|
21
21
|
);
|
|
22
22
|
const between = Object.fromEntries(
|
|
23
|
-
Object.entries(breakpoints.semanticBreakpoints).map(([fromName,
|
|
23
|
+
Object.entries(breakpoints.semanticBreakpoints).map(([fromName, fromMin]) => [
|
|
24
24
|
fromName,
|
|
25
25
|
{
|
|
26
26
|
and: Object.fromEntries(
|
|
27
|
-
Object.entries(breakpoints.semanticBreakpoints).filter(([toName]) => toName !== fromName).map(([toName,
|
|
27
|
+
Object.entries(breakpoints.semanticBreakpoints).filter(([toName]) => toName !== fromName).map(([toName, toMin]) => [
|
|
28
28
|
toName,
|
|
29
29
|
minMaxWidthQuery(parseMinPx(fromMin), parseMinPx(toMin))
|
|
30
30
|
])
|
|
@@ -5,18 +5,18 @@ const parseMinPx = (value) => value === "0" ? 0 : parseFloat(value);
|
|
|
5
5
|
const minWidthQuery = (px) => `@media (min-width: ${px}px)`;
|
|
6
6
|
const maxWidthQuery = (px) => `@media (max-width: ${px - smidgen}px)`;
|
|
7
7
|
const minMaxWidthQuery = (minPx, maxPx) => `@media (min-width: ${minPx}px) and (max-width: ${maxPx - smidgen}px)`;
|
|
8
|
-
const from = Object.fromEntries(Object.entries(semanticBreakpoints).map(([name,
|
|
8
|
+
const from = Object.fromEntries(Object.entries(semanticBreakpoints).map(([name, min]) => [
|
|
9
9
|
name,
|
|
10
10
|
minWidthQuery(parseMinPx(min))
|
|
11
11
|
]));
|
|
12
|
-
const until = Object.fromEntries(Object.entries(semanticBreakpoints).map(([name,
|
|
12
|
+
const until = Object.fromEntries(Object.entries(semanticBreakpoints).map(([name, min]) => [
|
|
13
13
|
name,
|
|
14
14
|
maxWidthQuery(parseMinPx(min))
|
|
15
15
|
]));
|
|
16
|
-
const between = Object.fromEntries(Object.entries(semanticBreakpoints).map(([fromName,
|
|
16
|
+
const between = Object.fromEntries(Object.entries(semanticBreakpoints).map(([fromName, fromMin]) => [
|
|
17
17
|
fromName,
|
|
18
18
|
{
|
|
19
|
-
and: Object.fromEntries(Object.entries(semanticBreakpoints).filter(([toName]) => toName !== fromName).map(([toName,
|
|
19
|
+
and: Object.fromEntries(Object.entries(semanticBreakpoints).filter(([toName]) => toName !== fromName).map(([toName, toMin]) => [
|
|
20
20
|
toName,
|
|
21
21
|
minMaxWidthQuery(parseMinPx(fromMin), parseMinPx(toMin))
|
|
22
22
|
]))
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ukFlag: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const usFlag: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const auFlag: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const globeIcon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const DoubleChevronRightSvg: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const componentName = "IntendedAudienceSignifier";
|
|
2
|
+
export declare const componentTsx = "import { IntendedAudienceSignifier } from '@guardian/stand/intended-audience-signifier';\n\nexport const Component = () => (\n\t<>\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Global' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Domestic for Domestic' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Domestic For Global' />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='Domestic For Global' theme={{ color: '#c70000' }} />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience='Global' cssOverrides={{ border-color: '#0000FF',align-items: 'flex-end' }}/>\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"AUS\" intendedAudience=\"Don't know\" />\n\t\t<IntendedAudienceSignifier source=\"UK\" intendedAudience='US' />\n\t\t<IntendedAudienceSignifier source=\"US\" intendedAudience='UK' />\n\t</>\n);\n";
|
|
3
|
+
export declare const componentCss = "\n/* import the intended audience signifier styles */\n@import '@guardian/stand/component/intendedAudienceSignifier.css';\n\n.stand-intended-audience-signifier {\n\tcolor: var(--component-intended-audience-signifier-color);\n\tfont-weight: var(--component-intended-audience-signifier-typography-font-weight);\n\tfont-size: var(--component-intended-audience-signifier-typography-font-size);\n\tline-height: var(--component-intended-audience-signifier-typography-line-height);\n\tborder-width: var(--component-intended-audience-signifier-border-width);\n\tborder-style: var(--component-intended-audience-signifier-border-style);\n\tborder-color: var(--component-intended-audience-signifier-border-color);\n\tdisplay: var(--component-intended-audience-signifier-display);\n\tflex-direction: var(--component-intended-audience-signifier-flex-direction);\n\tjustify-content: var(--component-intended-audience-signifier-justify-content);\n\talign-items: var(--component-intended-audience-signifier-align-items);\n\tborder-radius: var(--component-intended-audience-signifier-border-width);\n\tpadding: var(--component-intended-audience-signifier-padding-y) var(--component-intended-audience-signifier-padding-x);\n\tbox-sizing: var(--component-intended-audience-signifier-box-sizing);\n\twidth: var(--component-intended-audience-signifier-width);\n\tgap: var(--component-intended-audience-signifier-gap: 8px);\n}\n\n.stand-intended-audience-signifier svg {\n\twidth: var(--component-intended-audience-signifier-svg-width):\n\theight: var(--component-intended-audience-signifier-svg-height);\n}\n\n.stand-intended-audience-signifier-flag {\n\theight: 12px;\n}\n\n.stand-intended-audience-signifier-chevron {\n\twidth: 13px;\n\theight: 13px;\n\tfill: #545454;\n}\n";
|
|
4
|
+
export declare const componentHtml = "<div class=\"container flow-column\">\n\t<div class=\"stand-intended-audience-signifier\">\n\t\t<svg class=\"stand-intended-audience-signifier-flag\" viewBox=\"0 0 640 480\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path fill=\"#012169\" d=\"M0 0h640v480H0z\" />\n\t\t</svg>\n\t\t<svg class=\"stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t</svg>\n\t\t<svg class=\"stand-intended-audience-signifier-flag\" viewBox=\"0 0 640 480\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path fill=\"#bd3d44\" d=\"M0 0h640v480H0\" />\n\t\t</svg>\n\t</div>\n\n\t<div class=\"stand-intended-audience-signifier\" style=\"--component-intended-audience-signifier-color: #c70000;\">\n\t\t<span>AU</span>\n\t\t<svg class=\"stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t</svg>\n\t\t<span>GLOBAL</span>\n\t</div>\n</div>\n";
|
|
5
|
+
export declare const componentJs = "\nimport { componentIntendedAudienceSignifier } from \"@guardian/stand\";\n\nconst sheet = new CSSStyleSheet();\n\nsheet.replaceSync(`\n\t.js-stand-intended-audience-signifier {\n\t\tcolor: ${componentIntendedAudienceSignifier.color};\n\t\tfont-weight: ${componentIntendedAudienceSignifier.typography.fontWeight};\n\t\tfont-size: ${componentIntendedAudienceSignifier.typography.fontSize};\n\t\tline-height: ${componentIntendedAudienceSignifier.typography.lineHeight};\n\t\tborder-width: ${componentIntendedAudienceSignifier.borderWidth};\n\t\tborder-style: ${componentIntendedAudienceSignifier.borderStyle};\n\t\tborder-color: ${componentIntendedAudienceSignifier.borderColor};\n\t\tdisplay: ${componentIntendedAudienceSignifier.display};\n\t\tflex-direction: ${componentIntendedAudienceSignifier.flexDirection};\n\t\tjustify-content: ${componentIntendedAudienceSignifier.justifyContent};\n\t\talign-items: ${componentIntendedAudienceSignifier.alignItems};\n\t\tborder-radius: ${componentIntendedAudienceSignifier.borderRadius};\n\t\tpadding: ${componentIntendedAudienceSignifier.paddingY} ${componentIntendedAudienceSignifier.paddingX};\n\t\tbox-sizing: ${componentIntendedAudienceSignifier.boxSizing};\n\t\twidth: ${componentIntendedAudienceSignifier.width};\n\t\tgap: ${componentIntendedAudienceSignifier.gap};\n\t}\n\n\t.js-stand-intended-audience-signifier-chevron {\n\t\twidth: 13px;\n\t\theight: 13px;\n\t\tfill: #545454;\n\t}\n\n\t.stand-intended-audience-signifier svg {\n\t\twidth: ${componentIntendedAudienceSignifier.svg.width}:\n\t\theight: ${componentIntendedAudienceSignifier.svg.height};\n\t}\n`);\n\ndocument.adoptedStyleSheets.push(sheet);\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<div class=\"container flow-column\">\n\t\t<div class=\"js-stand-intended-audience-signifier\">\n\t\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-gb\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#012169\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#FFF\"\n\t\t\t\t\td=\"m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#C8102E\"\n\t\t\t\t\td=\"m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#FFF\" d=\"M241 0v480h160V0zM0 160v160h640V160z\" />\n\t\t\t\t<path fill=\"#C8102E\" d=\"M0 193v96h640v-96zM273 0v480h96V0z\" />\n\t\t\t</svg>\n\t\t\t<svg class=\"js-stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t\t</svg>\n\t\t\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-gb\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#012169\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#FFF\"\n\t\t\t\t\td=\"m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#C8102E\"\n\t\t\t\t\td=\"m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#FFF\" d=\"M241 0v480h160V0zM0 160v160h640V160z\" />\n\t\t\t\t<path fill=\"#C8102E\" d=\"M0 193v96h640v-96zM273 0v480h96V0z\" />\n\t\t\t</svg>\n\t\t</div>\n\n\t\t<div class=\"js-stand-intended-audience-signifier\" style=\"color: #c70000; border-color: #c70000;\">\n\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-au\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#00008B\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m37.5 0 122 90.5L281 0h39v31l-120 89.5 120 89V240h-40l-120-89.5L40.5 240H0v-30l119.5-89L0 32V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"red\"\n\t\t\t\t\td=\"M212 140.5 320 220v20l-135.5-99.5zm-92 10 3 17.5-96 72H0zM320 0v1.5l-124.5 94 1-22L295 0zM0 0l119.5 88h-30L0 21z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#fff\" d=\"M120.5 0v240h80V0zM0 80v80h320V80z\" />\n\t\t\t\t<path fill=\"red\" d=\"M0 96.5v48h320v-48zM136.5 0v240h48V0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m527 396.7-20.5 2.6 2.2 20.5-14.8-14.4-14.7 14.5 2-20.5-20.5-2.4 17.3-11.2-10.9-17.5 19.6 6.5 6.9-19.5 7.1 19.4 19.5-6.7-10.7 17.6zm-3.7-117.2 2.7-13-9.8-9 13.2-1.5 5.5-12.1 5.5 12.1 13.2 1.5-9.8 9 2.7 13-11.6-6.6zm-104.1-60-20.3 2.2 1.8 20.3-14.4-14.5-14.8 14.1 2.4-20.3-20.2-2.7 17.3-10.8-10.5-17.5 19.3 6.8L387 178l6.7 19.3 19.4-6.3-10.9 17.3 17.1 11.2ZM623 186.7l-20.9 2.7 2.3 20.9-15.1-14.7-15 14.8 2.1-21-20.9-2.4 17.7-11.5-11.1-17.9 20 6.7 7-19.8 7.2 19.8 19.9-6.9-11 18zm-96.1-83.5-20.7 2.3 1.9 20.8-14.7-14.8-15.1 14.4 2.4-20.7-20.7-2.8 17.7-11L467 73.5l19.7 6.9 7.3-19.5 6.8 19.7 19.8-6.5-11.1 17.6zM234 385.7l-45.8 5.4 4.6 45.9-32.8-32.4-33 32.2 4.9-45.9-45.8-5.8 38.9-24.8-24-39.4 43.6 15 15.8-43.4 15.5 43.5 43.7-14.7-24.3 39.2 38.8 25.1Z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t\t<svg class=\"js-stand-intended-audience-signifier-chevron\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n\t\t\t\t<path d=\"M5.75 0H3.5L6 3.5L3.5 7H5.75L8.25 3.5L5.75 0Z\" />\n\t\t\t\t<path d=\"M2.25 0H0L2.5 3.5L0 7H2.25L4.75 3.5L2.25 0Z\" />\n\t\t\t</svg>\n\t\t\t<svg\n\t\t\t\theight=\"12px\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tid=\"flag-icons-au\"\n\t\t\t\tviewBox=\"0 0 640 480\"\n\t\t\t>\n\t\t\t\t<path fill=\"#00008B\" d=\"M0 0h640v480H0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m37.5 0 122 90.5L281 0h39v31l-120 89.5 120 89V240h-40l-120-89.5L40.5 240H0v-30l119.5-89L0 32V0z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"red\"\n\t\t\t\t\td=\"M212 140.5 320 220v20l-135.5-99.5zm-92 10 3 17.5-96 72H0zM320 0v1.5l-124.5 94 1-22L295 0zM0 0l119.5 88h-30L0 21z\"\n\t\t\t\t/>\n\t\t\t\t<path fill=\"#fff\" d=\"M120.5 0v240h80V0zM0 80v80h320V80z\" />\n\t\t\t\t<path fill=\"red\" d=\"M0 96.5v48h320v-48zM136.5 0v240h48V0z\" />\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\td=\"m527 396.7-20.5 2.6 2.2 20.5-14.8-14.4-14.7 14.5 2-20.5-20.5-2.4 17.3-11.2-10.9-17.5 19.6 6.5 6.9-19.5 7.1 19.4 19.5-6.7-10.7 17.6zm-3.7-117.2 2.7-13-9.8-9 13.2-1.5 5.5-12.1 5.5 12.1 13.2 1.5-9.8 9 2.7 13-11.6-6.6zm-104.1-60-20.3 2.2 1.8 20.3-14.4-14.5-14.8 14.1 2.4-20.3-20.2-2.7 17.3-10.8-10.5-17.5 19.3 6.8L387 178l6.7 19.3 19.4-6.3-10.9 17.3 17.1 11.2ZM623 186.7l-20.9 2.7 2.3 20.9-15.1-14.7-15 14.8 2.1-21-20.9-2.4 17.7-11.5-11.1-17.9 20 6.7 7-19.8 7.2 19.8 19.9-6.9-11 18zm-96.1-83.5-20.7 2.3 1.9 20.8-14.7-14.8-15.1 14.4 2.4-20.7-20.7-2.8 17.7-11L467 73.5l19.7 6.9 7.3-19.5 6.8 19.7 19.8-6.5-11.1 17.6zM234 385.7l-45.8 5.4 4.6 45.9-32.8-32.4-33 32.2 4.9-45.9-45.8-5.8 38.9-24.8-24-39.4 43.6 15 15.8-43.4 15.5 43.5 43.7-14.7-24.3 39.2 38.8 25.1Z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</div>\n\t</div>\n`;\n";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { ComponentIntendedAudienceSignifier } from '../../styleD/build/typescript/component/intendedAudienceSignifier';
|
|
3
|
+
import type { Prettify } from '../../util/types';
|
|
4
|
+
export type IntendedAudienceSignifierTheme = Prettify<ComponentIntendedAudienceSignifier>;
|
|
5
|
+
export declare const defaultIntendedAudienceSignifierTheme: IntendedAudienceSignifierTheme;
|
|
6
|
+
export declare const intendedAudienceSignifierStyles: (theme: IntendedAudienceSignifierTheme) => SerializedStyles;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DefaultProps } from '../../util/types';
|
|
2
|
+
import type { IntendedAudienceSignifierTheme } from './styles';
|
|
3
|
+
export type Source = 'UK' | 'US' | 'AUS';
|
|
4
|
+
export type IntendedAudience = 'Global' | 'Domestic for Domestic' | 'Domestic For Global' | "Don't know" | 'UK' | 'US' | 'AUS';
|
|
5
|
+
export interface IntendedAudienceSignifierProps extends DefaultProps<IntendedAudienceSignifierTheme> {
|
|
6
|
+
source: Source;
|
|
7
|
+
intendedAudience: IntendedAudience;
|
|
8
|
+
}
|
|
@@ -7,8 +7,8 @@ export type PartialTopBarTheme = Prettify<DeepPartial<TopBarTheme>>;
|
|
|
7
7
|
export declare const defaultTopBarTheme: TopBarTheme;
|
|
8
8
|
export declare const topBarStyles: (theme: TopBarTheme) => SerializedStyles;
|
|
9
9
|
export declare const topBarContainerStyles: (theme: TopBarTheme, { collapseBelow, showUntil, }?: {
|
|
10
|
-
collapseBelow?: "sm" | "md" | "lg" |
|
|
11
|
-
showUntil?: "sm" | "md" | "lg" |
|
|
10
|
+
collapseBelow?: "sm" | "md" | "lg" | undefined;
|
|
11
|
+
showUntil?: "sm" | "md" | "lg" | undefined;
|
|
12
12
|
}) => SerializedStyles;
|
|
13
13
|
export declare const topBarSpacerStyles: (theme: TopBarTheme) => SerializedStyles;
|
|
14
14
|
export declare const topBarCollapsedNavMenuButtonStyles: (theme: TopBarTheme, menuOpen?: boolean) => SerializedStyles;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export { componentTagTable } from './styleD/build/typescript/component/tagTable'
|
|
|
13
13
|
export type { ComponentTagTable } from './styleD/build/typescript/component/tagTable';
|
|
14
14
|
export { componentUserMenu } from './styleD/build/typescript/component/userMenu';
|
|
15
15
|
export type { ComponentUserMenu } from './styleD/build/typescript/component/userMenu';
|
|
16
|
+
export { componentIntendedAudienceSignifier } from './styleD/build/typescript/component/intendedAudienceSignifier';
|
|
17
|
+
export type { ComponentIntendedAudienceSignifier } from './styleD/build/typescript/component/intendedAudienceSignifier';
|
|
16
18
|
/**
|
|
17
19
|
* design system components tokens exports
|
|
18
20
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IntendedAudienceSignifier component entry point
|
|
3
|
+
*
|
|
4
|
+
* Peer dependencies required to use these components:
|
|
5
|
+
* - `@emotion/react`
|
|
6
|
+
* - `react`
|
|
7
|
+
* - `react-dom`
|
|
8
|
+
* - `typescript`
|
|
9
|
+
*
|
|
10
|
+
* See the `peerDependencies` section of package.json for compatible versions.
|
|
11
|
+
*
|
|
12
|
+
* If you only need the built CSS (./component/intendedAudienceSiginifier.css),
|
|
13
|
+
* you don't need to install these.
|
|
14
|
+
*/
|
|
15
|
+
export { IntendedAudienceSignifier } from './components/intended-audience-signifier/IntendedAudienceSignifier';
|
|
16
|
+
export type { IntendedAudienceSignifierProps } from './components/intended-audience-signifier/types';
|
|
17
|
+
export type { IntendedAudienceSignifierTheme } from './components/intended-audience-signifier/styles';
|
|
18
|
+
export { componentIntendedAudienceSignifier } from './styleD/build/typescript/component/intendedAudienceSignifier';
|
|
19
|
+
export type { ComponentIntendedAudienceSignifier } from './styleD/build/typescript/component/intendedAudienceSignifier';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const componentIntendedAudienceSignifier: {
|
|
5
|
+
display: string;
|
|
6
|
+
flexDirection: string;
|
|
7
|
+
justifyContent: string;
|
|
8
|
+
alignItems: string;
|
|
9
|
+
borderColor: string;
|
|
10
|
+
borderWidth: string;
|
|
11
|
+
borderStyle: string;
|
|
12
|
+
borderRadius: string;
|
|
13
|
+
paddingY: string;
|
|
14
|
+
paddingX: string;
|
|
15
|
+
boxSizing: string;
|
|
16
|
+
width: string;
|
|
17
|
+
gap: string;
|
|
18
|
+
svg: {
|
|
19
|
+
height: string;
|
|
20
|
+
width: string;
|
|
21
|
+
};
|
|
22
|
+
color: string;
|
|
23
|
+
typography: {
|
|
24
|
+
fontWeight: number;
|
|
25
|
+
fontSize: string;
|
|
26
|
+
lineHeight: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type ComponentIntendedAudienceSignifier = typeof componentIntendedAudienceSignifier;
|
|
@@ -2,29 +2,8 @@
|
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/
|
|
4
4
|
export declare const semanticBreakpoints: {
|
|
5
|
-
sm:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
md: {
|
|
10
|
-
min: string;
|
|
11
|
-
max: string;
|
|
12
|
-
};
|
|
13
|
-
lg: {
|
|
14
|
-
min: string;
|
|
15
|
-
max: string;
|
|
16
|
-
};
|
|
17
|
-
xl: {
|
|
18
|
-
min: string;
|
|
19
|
-
max: string;
|
|
20
|
-
};
|
|
21
|
-
max: {
|
|
22
|
-
min: string;
|
|
23
|
-
max: string;
|
|
24
|
-
};
|
|
25
|
-
maxplus: {
|
|
26
|
-
min: string;
|
|
27
|
-
max: string;
|
|
28
|
-
};
|
|
5
|
+
sm: string;
|
|
6
|
+
md: string;
|
|
7
|
+
lg: string;
|
|
29
8
|
};
|
|
30
9
|
export type SemanticBreakpoints = typeof semanticBreakpoints;
|
|
@@ -12,7 +12,7 @@ export type Breakpoint = keyof typeof semanticBreakpoints;
|
|
|
12
12
|
* }
|
|
13
13
|
* `;
|
|
14
14
|
*/
|
|
15
|
-
export declare const from: Record<"sm" | "md" | "lg"
|
|
15
|
+
export declare const from: Record<"sm" | "md" | "lg", string>;
|
|
16
16
|
/**
|
|
17
17
|
* Returns a `max-width` media query string for everything *below* the given
|
|
18
18
|
* breakpoint (exclusive). Use to apply styles only on screens smaller than
|
|
@@ -26,7 +26,7 @@ export declare const from: Record<"sm" | "md" | "lg" | "xl" | "max" | "maxplus",
|
|
|
26
26
|
* }
|
|
27
27
|
* `;
|
|
28
28
|
*/
|
|
29
|
-
export declare const until: Record<"sm" | "md" | "lg"
|
|
29
|
+
export declare const until: Record<"sm" | "md" | "lg", string>;
|
|
30
30
|
/**
|
|
31
31
|
* Returns a combined `min-width` and `max-width` media query string for
|
|
32
32
|
* the range starting at breakpoint A up to (but not including) breakpoint B.
|
|
@@ -41,21 +41,12 @@ export declare const until: Record<"sm" | "md" | "lg" | "xl" | "max" | "maxplus"
|
|
|
41
41
|
*/
|
|
42
42
|
export declare const between: {
|
|
43
43
|
sm: {
|
|
44
|
-
and: Record<"md" | "lg"
|
|
44
|
+
and: Record<"md" | "lg", string>;
|
|
45
45
|
};
|
|
46
46
|
md: {
|
|
47
|
-
and: Record<"sm" | "lg"
|
|
47
|
+
and: Record<"sm" | "lg", string>;
|
|
48
48
|
};
|
|
49
49
|
lg: {
|
|
50
|
-
and: Record<"sm" | "md"
|
|
51
|
-
};
|
|
52
|
-
xl: {
|
|
53
|
-
and: Record<"sm" | "md" | "lg" | "max" | "maxplus", string>;
|
|
54
|
-
};
|
|
55
|
-
max: {
|
|
56
|
-
and: Record<"sm" | "md" | "lg" | "xl" | "maxplus", string>;
|
|
57
|
-
};
|
|
58
|
-
maxplus: {
|
|
59
|
-
and: Record<"sm" | "md" | "lg" | "xl" | "max", string>;
|
|
50
|
+
and: Record<"sm" | "md", string>;
|
|
60
51
|
};
|
|
61
52
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/stand",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/guardian/stand"
|
|
6
6
|
},
|
|
@@ -137,6 +137,11 @@
|
|
|
137
137
|
"import": "./dist/utils.js",
|
|
138
138
|
"require": "./dist/utils.cjs"
|
|
139
139
|
},
|
|
140
|
+
"./intendedAudienceSignifier": {
|
|
141
|
+
"types": "./dist/types/intended-audience-signifier.d.ts",
|
|
142
|
+
"import": "./dist/intended-audience-signifier.js",
|
|
143
|
+
"require": "./dist/intended-audience-signifier.cjs"
|
|
144
|
+
},
|
|
140
145
|
"./link": {
|
|
141
146
|
"types": "./dist/types/link.d.ts",
|
|
142
147
|
"import": "./dist/link.js",
|
|
@@ -152,6 +157,7 @@
|
|
|
152
157
|
"./base/spacing.css": "./dist/styleD/build/css/base/spacing.css",
|
|
153
158
|
"./base/sizing.css": "./dist/styleD/build/css/base/sizing.css",
|
|
154
159
|
"./base/radius.css": "./dist/styleD/build/css/base/radius.css",
|
|
160
|
+
"./semantic/breakpoints.css": "./dist/styleD/build/css/semantic/breakpoints.css",
|
|
155
161
|
"./semantic/colors.css": "./dist/styleD/build/css/semantic/colors.css",
|
|
156
162
|
"./semantic/typography.css": "./dist/styleD/build/css/semantic/typography.css",
|
|
157
163
|
"./semantic/sizing.css": "./dist/styleD/build/css/semantic/sizing.css",
|
|
@@ -176,6 +182,7 @@
|
|
|
176
182
|
"./component/textArea.css": "./dist/styleD/build/css/component/textArea.css",
|
|
177
183
|
"./component/alertBanner.css": "./dist/styleD/build/css/component/alertBanner.css",
|
|
178
184
|
"./component/datePicker.css": "./dist/styleD/build/css/component/datePicker.css",
|
|
185
|
+
"./component/intendedAudienceSignifier.css": "./dist/styleD/build/css/component/intendedAudienceSignifier.css",
|
|
179
186
|
"./component/link.css": "./dist/styleD/build/css/component/link.css"
|
|
180
187
|
},
|
|
181
188
|
"main": "./dist/index.cjs",
|
|
@@ -258,6 +265,9 @@
|
|
|
258
265
|
"date-picker": [
|
|
259
266
|
"./dist/types/date-picker.d.ts"
|
|
260
267
|
],
|
|
268
|
+
"intendedAudienceSignifier": [
|
|
269
|
+
"./dist/types/intended-audience-signifier.d.ts"
|
|
270
|
+
],
|
|
261
271
|
"link": [
|
|
262
272
|
"./dist/types/link.d.ts"
|
|
263
273
|
]
|