clearout all old style lib references

This commit is contained in:
Jon McClure 2022-08-20 23:09:41 +01:00
parent 2862eb64ae
commit 72f17db339
23 changed files with 95 additions and 169 deletions

View file

@ -38,6 +38,7 @@
"@storybook/theming": "6.5.9",
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"@tsconfig/svelte": "^3.0.0",
"@types/proper-url-join": "^2.1.1",
"@types/react-syntax-highlighter": "^15.5.4",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.32.0",
@ -73,7 +74,6 @@
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/free-regular-svg-icons": "^5.15.3",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@reuters-graphics/style-theme-eisbaer": "^0.3.5",
"@sveltejs/svelte-scroller": "^2.0.7",
"bootstrap": "^5.2.0",
"classnames": "^2.3.1",

View file

@ -23,9 +23,9 @@
const reframe = (embed) => {
pymParent = new pym.Parent(
'frame-parent',
/^http/.test(embed)
? embed
: urljoin(window.location.origin, embed, { trailingSlash: true })
/^http/.test(embed) ?
embed :
urljoin(window.location.origin, embed, { trailingSlash: true })
);
};
@ -78,8 +78,7 @@
/>
<style lang="scss">
@import '@reuters-graphics/style-color/scss/thematic/brand';
@import '@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../scss/fonts/mixins';
header {
@include font-display;

View file

@ -14,7 +14,7 @@
import {
withComponentDocs,
withStoryDocs
withStoryDocs,
} from '$lib/docs/utils/withParams.js';
const meta = {
@ -32,16 +32,13 @@
<Story
name="Default"
args={{
args="{{
section: 'World News',
hed: 'Reuters Graphics interactive',
}}
}}"
/>
<Story
name="With byline"
{...withStoryDocs(withBylineDocs)}
>
<Story name="With byline" {...withStoryDocs(withBylineDocs)}>
<Headline
hed="{'Reuters Graphics Interactive'}"
dek="{'The beginning of a beautiful page'}"
@ -50,19 +47,24 @@
<!-- Use named slots to add a byline... -->
<span slot="byline">By <strong>Peppa Pig</strong></span>
<!-- ...and a dateline. -->
<span slot="dateline">Published <time datetime="{new Date('2020-01-01').toISOString()}">Jan. 1, 2020</time></span>
<span slot="dateline"
>Published <time datetime="{new Date('2020-01-01').toISOString()}"
>Jan. 1, 2020</time
></span
>
</Headline>
</Story>
<Story
name="With crown"
{...withStoryDocs(withCrownDocs)}
>
<Story name="With crown" {...withStoryDocs(withCrownDocs)}>
<Headline>
<!-- Add a crown -->
<img slot="crown" src="{crownImgSrc}" alt="Illustration of Europe" />
<!-- Override the hed with a named slot -->
<h1 slot="hed" class="spaced font-serif">Europa</h1>
<span slot="dateline">Published <time datetime="{new Date('2020-01-01').toISOString()}">Jan. 1, 2020</time></span>
<span slot="dateline"
>Published <time datetime="{new Date('2020-01-01').toISOString()}"
>Jan. 1, 2020</time
></span
>
</Headline>
</Story>

View file

@ -51,7 +51,7 @@
@import '../SiteHeader/scss/_grids.scss';
@import '../SiteHeader/scss/_colors.scss';
@import '~@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../scss/fonts/mixins';
.content-container {
@include max-width;

View file

@ -48,7 +48,7 @@
@import '../SiteHeader/scss/_grids.scss';
@import '../SiteHeader/scss/_colors.scss';
@import '~@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../scss/fonts/mixins';
.content-container {
@include max-width;

View file

@ -122,7 +122,7 @@
@import '../SiteHeader/scss/_grids.scss';
@import '../SiteHeader/scss/_colors.scss';
@import '~@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../scss/fonts/mixins';
.content-container {
@include max-width;

View file

@ -21,7 +21,7 @@
<!-- svelte-ignore css-unused-selector -->
<style lang="scss">
@import '@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../../scss/fonts/mixins';
a {
text-decoration: none;

View file

@ -19,7 +19,7 @@
</IntersectionObserver>
<style lang="scss">
@import '@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../../scss/fonts/mixins';
@import '../../SiteHeader/scss/_breakpoints.scss';
@import '../../SiteHeader/scss/_grids.scss';

View file

@ -58,7 +58,7 @@
@import '../scss/_grids.scss';
@import '../scss/_colors.scss';
@import '../scss/_z-indexes.scss';
@import '@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../../scss/fonts/mixins';
$mobile-nav-height: 56px;

View file

@ -35,8 +35,8 @@
</div>
<style lang="scss">
@import '../../../scss/_colors.scss';
@import '@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../../../../scss/fonts/mixins';
@import '../../../../../scss/colours/thematic/tr';
.story-card a {
display: flex;

View file

@ -124,7 +124,7 @@
@import './../scss/_colors.scss';
@import './../scss/_breakpoints.scss';
@import './../scss/_z-indexes.scss';
@import '@reuters-graphics/style-main/scss/fonts/mixins';
@import '../../../scss/fonts/mixins';
$nav-height: 64px;
$mobile-nav-height: 56px;

View file

@ -14,7 +14,7 @@
import {
withComponentDocs,
withStoryDocs
withStoryDocs,
} from '$lib/docs/utils/withParams.js';
const meta = {

View file

@ -1,6 +1,6 @@
@import "mixins/block";
@import "mixins/body-text";
@import "fonts/mixins";
@import "mixins/graphic";
@import "mixins/note-text";
@import "mixins/visually-hidden";
@import 'mixins/block';
@import 'mixins/body-text';
@import 'fonts/mixins';
@import 'mixins/graphic';
@import 'mixins/note-text';
@import 'mixins/visually-hidden';

View file

@ -1,35 +0,0 @@
@import "~@reuters-graphics/style-main/scss/fonts/mixins";
@import "~@reuters-graphics/style-color/scss/categorical/base";
@import "~@reuters-graphics/style-color/scss/thematic/brand";
.article-metadata {
padding: 40px 0;
@include font-sans;
text-align: center;
.byline-container {
margin-bottom: 2px;
}
.byline {
a {
color: $brand-text;
}
}
.dateline-container {
@extend .uppercase;
color: $brand-text-secondary;
font-size: 0.8rem;
line-height: 1.2rem;
}
}
section.headline {
.article-metadata {
padding: 2rem 0 0;
}
}

View file

@ -1,25 +1,25 @@
@import "../fonts/variables";
@import '../fonts/variables';
@mixin font-sans($i: false) {
$important: if($i, "!important", "");
$important: if($i, '!important', '');
font-family: $font-family-sans-serif #{$important};
}
@mixin font-serif($i: false) {
$important: if($i, "!important", "");
$important: if($i, '!important', '');
font-family: $font-family-serif #{$important};
}
@mixin font-monospace($i: false) {
$important: if($i, "!important", "");
$important: if($i, '!important', '');
font-family: $font-family-monospace #{$important};
}
@mixin font-display($i: false) {
$important: if($i, "!important", "");
$important: if($i, '!important', '');
font-family: $font-family-display #{$important};
}

View file

@ -1,7 +1,10 @@
@import 'variables';
.font-sans {
font-family: var(--theme-font-family-sans-serif, $font-family-display) !important;
font-family: var(
--theme-font-family-sans-serif,
$font-family-display
) !important;
}
.font-serif {
@ -9,6 +12,8 @@
}
.font-monospace {
font-family: var(--theme-font-family-monospace, $font-family-monospace) !important;
font-family: var(
--theme-font-family-monospace,
$font-family-monospace
) !important;
}

View file

@ -1,7 +1,26 @@
$font-family-serif: var(--theme-font-family-serif, "freight-book", serif);
$font-family-serif: var(--theme-font-family-serif, 'freight-book', serif);
$font-family-sans-serif: var(--theme-font-family-sans-serif, "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif);
$font-family-sans-serif: var(
--theme-font-family-sans-serif,
'Source Sans Pro',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Helvetica,
Arial,
sans-serif
);
$font-family-monospace: var(--theme-font-family-monspace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
$font-family-monospace: var(
--theme-font-family-monspace,
Menlo,
Monaco,
Consolas,
'Liberation Mono',
'Courier New',
monospace
);
$font-family-display: "Knowledge", "Source Sans Pro", Arial, sans-serif;
$font-family-display: 'Knowledge', 'Source Sans Pro', Arial, sans-serif;

View file

@ -1,8 +1,6 @@
@import 'fonts/font-faces';
// Variables
@import '@reuters-graphics/style-color/scss/categorical/base';
@import '@reuters-graphics/style-color/scss/thematic/brand';
@import 'variables';
// Mixins
@ -16,6 +14,3 @@
@import 'typography/rules';
@import 'typography/main';
@import 'spacers/rules';
// Components
@import 'components/article-metadata';

View file

@ -6,7 +6,6 @@
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16), 0 4px 8px rgba(0, 0, 0, 0.24) !important;
}
.box-shadow-high {
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.24) !important;
}

View file

@ -1,5 +1,5 @@
@import "box-shadow";
@import "font-size";
@import "letter-spacing";
@import "text-shadow";
@import "transform";
@import 'box-shadow';
@import 'font-size';
@import 'letter-spacing';
@import 'text-shadow';
@import 'transform';

View file

@ -1,4 +1,4 @@
@import "../colours/thematic/tr";
@import '../colours/thematic/tr';
.text-shadow {
text-shadow: 2px 2px 4px $tr-light-grey;

View file

@ -1,5 +1,5 @@
@import "../fonts/variables";
@import "../colours/thematic/tr";
@import '../fonts/variables';
@import '../colours/thematic/tr';
// Font sizes
$font-size-xs: 0.8rem !default;
@ -17,21 +17,19 @@ $blockquote-font-size: ($font-size-base * 1.5) !default;
$line-height-base: 1.5 !default;
$text-muted: $tr-medium-grey;
$text-muted: $tr-medium-grey;
$blockquote-small-color: $tr-medium-grey;;
$blockquote-small-color: $tr-medium-grey;
$blockquote-border-color: $tr-dark-grey !default;
$blockquote-border-width: 0.25rem !default;
$hr-border-color: rgba($black, 0.1) !default;
// Headings
$headings-font-family: $font-family-display;
$headings-font-weight: 700 !default;
$headings-color: $brand-text-primary;
$headings-color: $tr-dark-grey;
$h1-font-size: $font-size-base * 2.5 !default;
$h2-font-size: $font-size-base * 2 !default;

View file

@ -1223,19 +1223,7 @@
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz#b44e52db3b6b20523e0c57ef8c42d315532cb903"
integrity sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==
"@fortawesome/fontawesome-common-types@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.3.0.tgz#949995a05c0d8801be7e0a594f775f1dbaa0d893"
integrity sha512-CA3MAZBTxVsF6SkfkHXDerkhcQs0QPofy43eFdbWJJkZiq3SfiaH1msOkac59rQaqto5EqWnASboY1dBuKen5w==
"@fortawesome/fontawesome-svg-core@^1.2.26":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.3.0.tgz#343fac91fa87daa630d26420bfedfba560f85885"
integrity sha512-UIL6crBWhjTNQcONt96ExjUnKt1D68foe3xjEensLDclqQ6YagwCRYVQdrp/hW0ALRp/5Fv/VKw+MqTUWYYvPg==
dependencies:
"@fortawesome/fontawesome-common-types" "^0.3.0"
"@fortawesome/free-brands-svg-icons@^5.12.0", "@fortawesome/free-brands-svg-icons@^5.15.4":
"@fortawesome/free-brands-svg-icons@^5.15.4":
version "5.15.4"
resolved "https://registry.yarnpkg.com/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.15.4.tgz#ec8a44dd383bcdd58aa7d1c96f38251e6fec9733"
integrity sha512-f1witbwycL9cTENJegcmcZRYyawAFbm8+c6IirLmwbbpqz46wyjbQYLuxOc7weXFXfB7QR8/Vd2u5R3q6JYD9g==
@ -1249,20 +1237,13 @@
dependencies:
"@fortawesome/fontawesome-common-types" "^0.2.36"
"@fortawesome/free-solid-svg-icons@^5.12.0", "@fortawesome/free-solid-svg-icons@^5.15.3":
"@fortawesome/free-solid-svg-icons@^5.15.3":
version "5.15.4"
resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz#2a68f3fc3ddda12e52645654142b9e4e8fbb6cc5"
integrity sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==
dependencies:
"@fortawesome/fontawesome-common-types" "^0.2.36"
"@fortawesome/react-fontawesome@^0.1.8":
version "0.1.19"
resolved "https://registry.yarnpkg.com/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.19.tgz#2b36917578596f31934e71f92b7cf9c425fd06e4"
integrity sha512-Hyb+lB8T18cvLNX0S3llz7PcSOAJMLwiVKBuuzwM/nI5uoBw+gQjnf9il0fR1C3DKOI5Kc79pkJ4/xB0Uw9aFQ==
dependencies:
prop-types "^15.8.1"
"@gar/promisify@^1.0.1":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6"
@ -1537,33 +1518,6 @@
eslint-plugin-react-hooks "*"
eslint-plugin-standard "*"
"@reuters-graphics/style-color@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@reuters-graphics/style-color/-/style-color-1.0.0.tgz#35fcf41d1c888b8353a0cb3f274bcdb10eea7d4b"
integrity sha512-F3b5Rzepia+kWmVDjtKXhqGkp+gcKw8bDLJyn55dq95jJV3CEExNQTvN66CI5QTQnoDmzeXSQv+/vODTGatzJQ==
"@reuters-graphics/style-main@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@reuters-graphics/style-main/-/style-main-0.3.2.tgz#ed6971e6603ff62aec3293b1212695e28c31eb20"
integrity sha512-HxU2on4QreDrIX18rII8AeVA2tsA2AOu1J9M6rRCfb1A+qapeU+LYSSxzQ7L+Mb+izHnrAPDIYnPcbQGKonIiQ==
dependencies:
"@reuters-graphics/style-color" "^1.0.0"
bootstrap "^4.6.0"
"@reuters-graphics/style-theme-eisbaer@^0.3.5":
version "0.3.6"
resolved "https://registry.yarnpkg.com/@reuters-graphics/style-theme-eisbaer/-/style-theme-eisbaer-0.3.6.tgz#96fd1116d4fdf71fbc452fc1fc02596105a1f87a"
integrity sha512-8GttJlDgb1F3BOncIzzTFYSVfR2GWRWp4xU2p0bhLT5n0WyiXowPJ4kdJkuF9KFkCgcOtgqs9ZsoKDEPN6Is5w==
dependencies:
"@fortawesome/fontawesome-svg-core" "^1.2.26"
"@fortawesome/free-brands-svg-icons" "^5.12.0"
"@fortawesome/free-solid-svg-icons" "^5.12.0"
"@fortawesome/react-fontawesome" "^0.1.8"
"@reuters-graphics/style-color" "^1.0.0"
"@reuters-graphics/style-main" "^0.3.2"
classnames "*"
copy-to-clipboard "^3.2.0"
"@rollup/pluginutils@^4.2.1":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d"
@ -2889,6 +2843,13 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
"@types/proper-url-join@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@types/proper-url-join/-/proper-url-join-2.1.1.tgz#e78f6cc7306f1140c5cac2fddf253070ecbdda85"
integrity sha512-OfcRK+o4tTHLwhB07ENYTeKZfzRn4ci4vOalLmdDraCYAcJxJJzvpxo0hLxExRM/QIuGzcF09pNeYol6hiyCXQ==
dependencies:
query-string "^6.3.0"
"@types/pug@^2.0.4":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@types/pug/-/pug-2.0.6.tgz#f830323c88172e66826d0bde413498b61054b5a6"
@ -4022,11 +3983,6 @@ boolbase@^1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==
bootstrap@^4.6.0:
version "4.6.2"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.6.2.tgz#8e0cd61611728a5bf65a3a2b8d6ff6c77d5d7479"
integrity sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==
bootstrap@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.2.0.tgz#838727fb60f1630db370fe57c63cbcf2962bb3d3"
@ -4523,7 +4479,7 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
classnames@*, classnames@^2.3.1:
classnames@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e"
integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==
@ -4771,13 +4727,6 @@ copy-descriptor@^0.1.0:
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==
copy-to-clipboard@^3.2.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.2.tgz#5b263ec2366224b100181dded7ce0579b340c107"
integrity sha512-Vme1Z6RUDzrb6xAI7EZlVZ5uvOk2F//GaxKUxajDqm9LhOVM1inxNAD2vy+UZDYsd0uyA9s7b3/FVZPSxqrCfg==
dependencies:
toggle-selection "^1.0.6"
core-js-compat@^3.21.0, core-js-compat@^3.22.1, core-js-compat@^3.8.1:
version "3.24.1"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.24.1.tgz#d1af84a17e18dfdd401ee39da9996f9a7ba887de"
@ -11509,11 +11458,6 @@ to-regex@^3.0.1, to-regex@^3.0.2:
regex-not "^1.0.2"
safe-regex "^1.1.0"
toggle-selection@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"
integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==
toidentifier@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"